summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basic/source/basmgr/basmgr.cxx2
-rw-r--r--[-rwxr-xr-x]basic/source/classes/sbxmod.cxx5
-rw-r--r--basic/source/inc/sbdiagnose.hxx34
-rw-r--r--basic/source/runtime/makefile.mk3
-rw-r--r--basic/source/runtime/rtlproto.hxx1
-rw-r--r--basic/source/runtime/sbdiagnose.cxx134
-rw-r--r--basic/source/runtime/stdobj.cxx2
-rw-r--r--chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx67
-rw-r--r--chart2/source/controller/main/ChartController_Position.cxx11
-rw-r--r--chart2/source/controller/main/ChartController_Window.cxx9
-rw-r--r--chart2/source/inc/CharacterProperties.hxx3
-rw-r--r--chart2/source/inc/ExponentialRegressionCurveCalculator.hxx7
-rw-r--r--[-rwxr-xr-x]chart2/source/model/main/Diagram.cxx1
-rw-r--r--[-rwxr-xr-x]chart2/source/tools/CharacterProperties.cxx25
-rw-r--r--chart2/source/tools/ExponentialRegressionCurveCalculator.cxx77
-rw-r--r--chart2/source/view/axes/ScaleAutomatism.cxx28
-rwxr-xr-xchart2/source/view/charttypes/VSeriesPlotter.cxx16
-rw-r--r--chart2/source/view/main/ChartView.cxx7
-rw-r--r--chart2/source/view/main/PropertyMapper.cxx3
-rwxr-xr-x[-rw-r--r--]chart2/source/view/main/VLegend.cxx4
-rw-r--r--configure.in3
-rw-r--r--cppu/source/typelib/typelib.cxx14
-rw-r--r--desktop/source/app/app.cxx4
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/manager/dp_manager.cxx22
-rw-r--r--[-rwxr-xr-x]desktop/source/deployment/registry/dp_backend.cxx59
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/dp_backenddb.cxx5
-rw-r--r--extensions/source/plugin/unx/sysplug.cxx2
-rwxr-xr-x[-rw-r--r--]framework/source/services/backingwindow.cxx57
-rwxr-xr-x[-rw-r--r--]framework/source/services/substitutepathvars.cxx6
-rw-r--r--graphite/makefile.mk8
-rw-r--r--i18npool/source/paper/paper.cxx2
-rwxr-xr-x[-rw-r--r--]l10ntools/source/help/HelpCompiler.hxx8
-rw-r--r--l10ntools/source/help/HelpIndexerTool.java9
-rwxr-xr-x[-rw-r--r--]l10ntools/source/help/HelpLinker.cxx41
-rw-r--r--libxml2/libxml2-long-path.patch34
-rwxr-xr-x[-rw-r--r--]libxml2/makefile.mk3
-rw-r--r--lucene/long_path.patch37
-rw-r--r--lucene/makefile.mk7
-rw-r--r--python/prj/d.lst6
-rw-r--r--rsc/source/rscpp/cpp4.c2
-rw-r--r--sal/cppunittester/cppunittester.cxx102
-rw-r--r--sal/inc/cppunittester/protectorfactory.hxx45
-rw-r--r--sal/osl/os2/diagnose.c3
-rw-r--r--sal/osl/unx/diagnose.c14
-rwxr-xr-xsal/osl/w32/diagnose.c50
-rw-r--r--sal/osl/w32/file_dirvol.cxx4
-rwxr-xr-x[-rw-r--r--]sal/osl/w32/module.cxx23
-rwxr-xr-x[-rw-r--r--]sal/osl/w32/procimpl.cxx35
-rw-r--r--sal/prj/d.lst2
-rw-r--r--sc/inc/chart2uno.hxx64
-rw-r--r--sc/source/core/tool/charthelper.cxx5
-rw-r--r--sc/source/filter/starcalc/scflt.cxx13
-rw-r--r--sc/source/ui/drawfunc/fusel.cxx1
-rw-r--r--sc/source/ui/inc/gridwin.hxx2
-rw-r--r--sc/source/ui/inc/tabview.hxx2
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx188
-rw-r--r--sc/source/ui/view/gridwin.cxx20
-rw-r--r--sc/source/ui/view/tabview3.cxx9
-rw-r--r--set_soenv.in1
-rw-r--r--setup_native/source/win32/msi-encodinglist.txt6
-rw-r--r--sfx2/inc/sfx2/module.hxx12
-rw-r--r--sfx2/source/appl/module.cxx34
-rw-r--r--sfx2/source/doc/objxtor.cxx5
-rwxr-xr-xsfx2/source/view/viewprn.cxx37
-rw-r--r--slideshow/source/engine/debug.cxx2
-rwxr-xr-xsmoketestdoc/com/sun/star/comp/smoketest/MANIFEST.MF (renamed from smoketestoo_native/com/sun/star/comp/smoketest/MANIFEST.MF)0
-rwxr-xr-xsmoketestdoc/com/sun/star/comp/smoketest/TestExtension.idl (renamed from smoketestoo_native/com/sun/star/comp/smoketest/TestExtension.idl)0
-rwxr-xr-xsmoketestdoc/com/sun/star/comp/smoketest/TestExtension.java (renamed from smoketestoo_native/com/sun/star/comp/smoketest/TestExtension.java)0
-rwxr-xr-xsmoketestdoc/com/sun/star/comp/smoketest/delzip (renamed from smoketestoo_native/com/sun/star/comp/smoketest/delzip)0
-rwxr-xr-xsmoketestdoc/com/sun/star/comp/smoketest/makefile.mk (renamed from smoketestoo_native/com/sun/star/comp/smoketest/makefile.mk)41
-rwxr-xr-xsmoketestdoc/com/sun/star/comp/smoketest/manifest.xml (renamed from smoketestoo_native/com/sun/star/comp/smoketest/manifest.xml)0
-rw-r--r--smoketestdoc/data/Events.xml (renamed from smoketestoo_native/data/Events.xml)23
-rw-r--r--smoketestdoc/data/Global.xml (renamed from smoketestoo_native/data/Global.xml)479
-rw-r--r--smoketestdoc/data/OptionsDlg.xml (renamed from smoketestoo_native/data/OptionsDlg.xml)42
-rw-r--r--smoketestdoc/data/Test_10er.xml (renamed from smoketestoo_native/data/Test_10er.xml)388
-rw-r--r--smoketestdoc/data/Test_DB.xml (renamed from smoketestoo_native/data/Test_DB.xml)78
-rw-r--r--smoketestdoc/data/Test_Ext.xml (renamed from smoketestoo_native/data/Test_Ext.xml)57
-rw-r--r--smoketestdoc/data/content.xml113
-rw-r--r--smoketestdoc/data/dialog-lb.xml (renamed from smoketestoo_native/data/dialog-lb.xml)0
-rw-r--r--smoketestdoc/data/dialog-lc.xml (renamed from smoketestoo_native/data/dialog-lc.xml)0
-rw-r--r--smoketestdoc/data/makefile.mk (renamed from smoketestoo_native/data/makefile.mk)32
-rw-r--r--smoketestdoc/data/manifest.xml (renamed from smoketestoo_native/data/manifest.xml)0
-rw-r--r--smoketestdoc/data/meta.xml (renamed from smoketestoo_native/data/meta.xml)0
-rw-r--r--smoketestdoc/data/script-lb.xml (renamed from smoketestoo_native/data/script-lb.xml)0
-rw-r--r--smoketestdoc/data/script-lc.xml (renamed from smoketestoo_native/data/script-lc.xml)0
-rw-r--r--smoketestdoc/data/settings.xml (renamed from smoketestoo_native/data/settings.xml)0
-rw-r--r--smoketestdoc/data/styles.xml (renamed from smoketestoo_native/data/styles.xml)0
-rwxr-xr-xsmoketestdoc/prj/build.lst4
-rwxr-xr-xsmoketestdoc/prj/d.lst4
-rw-r--r--smoketestoo_native/data/content.xml28
-rwxr-xr-x[-rw-r--r--]smoketestoo_native/makefile.mk14
-rwxr-xr-x[-rw-r--r--]smoketestoo_native/prj/build.lst6
-rwxr-xr-x[-rw-r--r--]smoketestoo_native/smoketest.cxx7
-rw-r--r--solenv/bin/cws.pl13
-rw-r--r--solenv/bin/modules/installer/globals.pm8
-rwxr-xr-x[-rw-r--r--]solenv/bin/modules/installer/simplepackage.pm20
-rwxr-xr-xsolenv/bin/packmodule1
-rw-r--r--solenv/config/sdev300.ini1
-rw-r--r--solenv/gbuild/CppunitTest.mk4
-rw-r--r--solenv/gbuild/JunitTest.mk4
-rw-r--r--solenv/gbuild/extensions/post_PackModule.mk2
-rw-r--r--solenv/gbuild/gbuild.mk2
-rw-r--r--solenv/inc/installationtest.mk43
-rw-r--r--solenv/inc/langlist.mk5
-rw-r--r--solenv/inc/minor.mk6
-rw-r--r--solenv/inc/tg_wntx64.mk8
-rw-r--r--svl/source/undo/undo.cxx2
-rw-r--r--svx/source/form/fmundo.cxx78
-rw-r--r--svx/source/stbctrls/pszctrl.cxx2
-rw-r--r--svx/source/tbxctrls/itemwin.cxx4
-rw-r--r--sw/AllLangResTarget_sw.mk1
-rw-r--r--sw/inc/IDocumentLayoutAccess.hxx10
-rw-r--r--sw/inc/authfld.hxx4
-rw-r--r--sw/inc/calbck.hxx258
-rw-r--r--sw/inc/crsrsh.hxx5
-rw-r--r--sw/inc/dcontact.hxx42
-rw-r--r--sw/inc/doc.hxx25
-rw-r--r--sw/inc/docsh.hxx2
-rw-r--r--sw/inc/docufld.hxx12
-rw-r--r--sw/inc/editsh.hxx9
-rw-r--r--sw/inc/expfld.hxx9
-rw-r--r--sw/inc/fchrfmt.hxx5
-rw-r--r--sw/inc/fldbas.hxx2
-rw-r--r--sw/inc/fmtcol.hxx9
-rw-r--r--sw/inc/fmtfld.hxx8
-rw-r--r--sw/inc/fmthdft.hxx13
-rwxr-xr-xsw/inc/fmtmeta.hxx6
-rw-r--r--sw/inc/fmtpdsc.hxx9
-rw-r--r--sw/inc/format.hxx7
-rw-r--r--sw/inc/frmfmt.hxx10
-rw-r--r--sw/inc/ftninfo.hxx13
-rw-r--r--sw/inc/lineinfo.hxx7
-rw-r--r--sw/inc/ndnotxt.hxx2
-rw-r--r--sw/inc/ndtxt.hxx15
-rw-r--r--sw/inc/node.hxx23
-rw-r--r--sw/inc/numrule.hxx24
-rw-r--r--sw/inc/pagedesc.hxx4
-rw-r--r--sw/inc/paratr.hxx9
-rw-r--r--sw/inc/printdata.hxx9
-rw-r--r--sw/inc/reffld.hxx5
-rw-r--r--sw/inc/section.hxx12
-rw-r--r--sw/inc/swcrsr.hxx10
-rw-r--r--sw/inc/swddetbl.hxx4
-rwxr-xr-xsw/inc/switerator.hxx47
-rw-r--r--sw/inc/swtable.hxx26
-rw-r--r--sw/inc/swtblfmt.hxx6
-rw-r--r--sw/inc/tox.hxx12
-rw-r--r--sw/inc/txtatr.hxx12
-rw-r--r--sw/inc/txtftn.hxx3
-rw-r--r--sw/inc/txtinet.hxx7
-rw-r--r--sw/inc/unobaseclass.hxx2
-rw-r--r--sw/inc/unobookmark.hxx3
-rw-r--r--sw/inc/unochart.hxx17
-rw-r--r--sw/inc/unocrsr.hxx7
-rw-r--r--sw/inc/unodraw.hxx6
-rw-r--r--sw/inc/unofield.hxx31
-rw-r--r--sw/inc/unoflatpara.hxx3
-rw-r--r--sw/inc/unoframe.hxx15
-rw-r--r--sw/inc/unoport.hxx17
-rw-r--r--sw/inc/unoredline.hxx6
-rw-r--r--sw/inc/unoredlines.hxx4
-rw-r--r--sw/inc/unosett.hxx7
-rw-r--r--sw/inc/unostyle.hxx15
-rw-r--r--sw/inc/unotbl.hxx22
-rw-r--r--sw/inc/unotextmarkup.hxx6
-rw-r--r--sw/inc/unotxdoc.hxx13
-rw-r--r--sw/inc/usrfld.hxx5
-rw-r--r--sw/inc/viewopt.hxx18
-rw-r--r--sw/inc/viewsh.hxx14
-rw-r--r--sw/sdi/_docsh.sdi11
-rw-r--r--sw/sdi/_viewsh.sdi10
-rw-r--r--sw/source/core/access/accdoc.cxx8
-rw-r--r--sw/source/core/access/accframebase.cxx22
-rw-r--r--sw/source/core/access/accframebase.hxx3
-rw-r--r--sw/source/core/access/accfrmobj.cxx4
-rw-r--r--sw/source/core/access/accmap.cxx16
-rw-r--r--sw/source/core/access/accnotextframe.cxx8
-rw-r--r--sw/source/core/access/accnotextframe.hxx4
-rw-r--r--sw/source/core/access/accpara.cxx4
-rw-r--r--sw/source/core/access/accpara.hxx6
-rw-r--r--sw/source/core/access/acctable.cxx13
-rw-r--r--sw/source/core/access/acctable.hxx7
-rw-r--r--sw/source/core/access/acctextframe.cxx6
-rw-r--r--sw/source/core/access/acctextframe.hxx5
-rw-r--r--sw/source/core/attr/calbck.cxx502
-rw-r--r--sw/source/core/attr/cellatr.cxx11
-rw-r--r--sw/source/core/attr/format.cxx54
-rw-r--r--sw/source/core/crsr/bookmrk.cxx4
-rw-r--r--sw/source/core/crsr/callnk.cxx10
-rw-r--r--sw/source/core/crsr/callnk.hxx3
-rw-r--r--sw/source/core/crsr/crsrsh.cxx54
-rw-r--r--sw/source/core/crsr/crstrvl.cxx90
-rw-r--r--sw/source/core/crsr/crstrvl1.cxx2
-rw-r--r--sw/source/core/crsr/pam.cxx12
-rwxr-xr-xsw/source/core/crsr/swcrsr.cxx39
-rw-r--r--sw/source/core/crsr/trvlfnfl.cxx2
-rw-r--r--sw/source/core/crsr/trvltbl.cxx14
-rw-r--r--sw/source/core/crsr/unocrsr.cxx14
-rw-r--r--sw/source/core/crsr/viscrs.cxx16
-rw-r--r--sw/source/core/doc/acmplwrd.cxx9
-rw-r--r--sw/source/core/doc/doc.cxx174
-rw-r--r--sw/source/core/doc/docbm.cxx4
-rw-r--r--sw/source/core/doc/docchart.cxx6
-rw-r--r--sw/source/core/doc/doccorr.cxx10
-rw-r--r--sw/source/core/doc/docdesc.cxx192
-rw-r--r--sw/source/core/doc/docdraw.cxx58
-rw-r--r--sw/source/core/doc/docedt.cxx18
-rw-r--r--sw/source/core/doc/docfld.cxx77
-rw-r--r--sw/source/core/doc/docfly.cxx68
-rw-r--r--sw/source/core/doc/docfmt.cxx40
-rw-r--r--sw/source/core/doc/docftn.cxx66
-rw-r--r--sw/source/core/doc/docglbl.cxx7
-rw-r--r--sw/source/core/doc/doclay.cxx127
-rw-r--r--sw/source/core/doc/docnew.cxx30
-rw-r--r--sw/source/core/doc/docnum.cxx29
-rw-r--r--sw/source/core/doc/docredln.cxx10
-rw-r--r--sw/source/core/doc/doctxm.cxx89
-rw-r--r--sw/source/core/doc/fmtcol.cxx29
-rw-r--r--sw/source/core/doc/ftnidx.cxx7
-rw-r--r--sw/source/core/doc/htmltbl.cxx26
-rw-r--r--sw/source/core/doc/lineinfo.cxx29
-rw-r--r--sw/source/core/doc/notxtfrm.cxx18
-rw-r--r--sw/source/core/doc/number.cxx30
-rw-r--r--sw/source/core/doc/poolfmt.cxx2
-rw-r--r--sw/source/core/doc/swserv.cxx2
-rw-r--r--sw/source/core/doc/tblrwcl.cxx29
-rw-r--r--sw/source/core/doc/visiturl.cxx4
-rw-r--r--sw/source/core/docnode/ndcopy.cxx2
-rw-r--r--sw/source/core/docnode/ndsect.cxx55
-rw-r--r--sw/source/core/docnode/ndtbl.cxx78
-rw-r--r--sw/source/core/docnode/ndtbl1.cxx20
-rw-r--r--sw/source/core/docnode/node.cxx153
-rw-r--r--sw/source/core/docnode/node2lay.cxx101
-rw-r--r--sw/source/core/docnode/nodes.cxx81
-rw-r--r--sw/source/core/docnode/section.cxx152
-rw-r--r--sw/source/core/docnode/swbaslnk.cxx41
-rw-r--r--sw/source/core/draw/dcontact.cxx189
-rw-r--r--sw/source/core/draw/dflyobj.cxx7
-rw-r--r--sw/source/core/draw/dpage.cxx2
-rw-r--r--sw/source/core/draw/dview.cxx23
-rw-r--r--sw/source/core/edit/autofmt.cxx2
-rw-r--r--sw/source/core/edit/edattr.cxx2
-rw-r--r--sw/source/core/edit/eddel.cxx2
-rw-r--r--sw/source/core/edit/edfld.cxx53
-rw-r--r--sw/source/core/edit/edfldexp.cxx12
-rw-r--r--sw/source/core/edit/editsh.cxx44
-rw-r--r--sw/source/core/edit/edlingu.cxx10
-rw-r--r--sw/source/core/edit/edsect.cxx2
-rw-r--r--sw/source/core/edit/edtox.cxx10
-rw-r--r--sw/source/core/edit/edundo.cxx12
-rw-r--r--sw/source/core/fields/authfld.cxx93
-rw-r--r--sw/source/core/fields/cellfml.cxx18
-rw-r--r--sw/source/core/fields/dbfld.cxx66
-rw-r--r--sw/source/core/fields/ddefld.cxx16
-rw-r--r--sw/source/core/fields/ddetbl.cxx22
-rw-r--r--sw/source/core/fields/docufld.cxx116
-rw-r--r--sw/source/core/fields/expfld.cxx45
-rw-r--r--sw/source/core/fields/fldlst.cxx13
-rw-r--r--sw/source/core/fields/postithelper.cxx7
-rw-r--r--sw/source/core/fields/reffld.cxx68
-rw-r--r--sw/source/core/fields/tblcalc.cxx17
-rw-r--r--sw/source/core/fields/usrfld.cxx4
-rw-r--r--sw/source/core/frmedt/fecopy.cxx2
-rw-r--r--sw/source/core/frmedt/fedesc.cxx4
-rw-r--r--sw/source/core/frmedt/fefly1.cxx22
-rw-r--r--sw/source/core/frmedt/feflyole.cxx2
-rw-r--r--sw/source/core/frmedt/feshview.cxx162
-rw-r--r--sw/source/core/frmedt/fetab.cxx2
-rw-r--r--sw/source/core/frmedt/fews.cxx16
-rw-r--r--sw/source/core/frmedt/tblsel.cxx141
-rw-r--r--sw/source/core/graphic/ndgrf.cxx16
-rw-r--r--sw/source/core/inc/UndoAttribute.hxx2
-rw-r--r--sw/source/core/inc/UndoCore.hxx5
-rw-r--r--sw/source/core/inc/attrhint.hxx44
-rw-r--r--sw/source/core/inc/bodyfrm.hxx2
-rw-r--r--sw/source/core/inc/bookmrk.hxx7
-rw-r--r--sw/source/core/inc/cellfrm.hxx4
-rw-r--r--sw/source/core/inc/cntfrm.hxx9
-rw-r--r--sw/source/core/inc/colfrm.hxx2
-rw-r--r--sw/source/core/inc/fieldhint.hxx44
-rw-r--r--sw/source/core/inc/flyfrm.hxx21
-rw-r--r--sw/source/core/inc/flyfrms.hxx18
-rw-r--r--sw/source/core/inc/frame.hxx35
-rw-r--r--sw/source/core/inc/frmtool.hxx5
-rw-r--r--sw/source/core/inc/ftnboss.hxx2
-rw-r--r--sw/source/core/inc/ftnfrm.hxx4
-rw-r--r--sw/source/core/inc/hffrm.hxx6
-rw-r--r--sw/source/core/inc/layfrm.hxx2
-rw-r--r--sw/source/core/inc/notxtfrm.hxx4
-rw-r--r--sw/source/core/inc/pagedeschint.hxx46
-rw-r--r--sw/source/core/inc/pagefrm.hxx6
-rw-r--r--sw/source/core/inc/prevwpage.hxx27
-rw-r--r--sw/source/core/inc/rolbck.hxx5
-rw-r--r--sw/source/core/inc/rootfrm.hxx6
-rw-r--r--sw/source/core/inc/rowfrm.hxx4
-rw-r--r--sw/source/core/inc/sectfrm.hxx8
-rw-r--r--sw/source/core/inc/tabfrm.hxx7
-rw-r--r--sw/source/core/inc/txtfrm.hxx7
-rw-r--r--sw/source/core/layout/atrfrm.cxx191
-rw-r--r--sw/source/core/layout/calcmove.cxx13
-rw-r--r--sw/source/core/layout/colfrm.cxx19
-rw-r--r--sw/source/core/layout/findfrm.cxx25
-rw-r--r--sw/source/core/layout/flowfrm.cxx67
-rw-r--r--sw/source/core/layout/fly.cxx217
-rw-r--r--sw/source/core/layout/flycnt.cxx9
-rw-r--r--sw/source/core/layout/flyincnt.cxx6
-rw-r--r--sw/source/core/layout/flylay.cxx20
-rw-r--r--sw/source/core/layout/flypos.cxx30
-rw-r--r--sw/source/core/layout/frmtool.cxx404
-rw-r--r--sw/source/core/layout/ftnfrm.cxx206
-rw-r--r--sw/source/core/layout/hffrm.cxx28
-rw-r--r--sw/source/core/layout/layact.cxx32
-rw-r--r--sw/source/core/layout/laycache.cxx22
-rw-r--r--sw/source/core/layout/movedfwdfrmsbyobjpos.cxx9
-rw-r--r--sw/source/core/layout/newfrm.cxx51
-rw-r--r--sw/source/core/layout/pagechg.cxx145
-rw-r--r--sw/source/core/layout/pagedesc.cxx29
-rw-r--r--sw/source/core/layout/paintfrm.cxx55
-rw-r--r--sw/source/core/layout/sectfrm.cxx68
-rw-r--r--sw/source/core/layout/softpagebreak.cxx15
-rw-r--r--sw/source/core/layout/ssfrm.cxx98
-rw-r--r--sw/source/core/layout/tabfrm.cxx92
-rw-r--r--sw/source/core/layout/trvlfrm.cxx16
-rw-r--r--sw/source/core/layout/wsfrm.cxx126
-rw-r--r--sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx14
-rw-r--r--sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx8
-rw-r--r--sw/source/core/ole/ndole.cxx2
-rw-r--r--sw/source/core/para/paratr.cxx19
-rw-r--r--sw/source/core/table/swnewtable.cxx9
-rw-r--r--sw/source/core/table/swtable.cxx248
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx48
-rw-r--r--sw/source/core/text/blink.cxx2
-rw-r--r--sw/source/core/text/frmcrsr.cxx14
-rw-r--r--sw/source/core/text/frmform.cxx8
-rw-r--r--sw/source/core/text/frmpaint.cxx7
-rw-r--r--sw/source/core/text/inftxt.cxx8
-rw-r--r--sw/source/core/text/itratr.cxx42
-rw-r--r--sw/source/core/text/porfld.cxx16
-rw-r--r--sw/source/core/text/porfly.cxx3
-rw-r--r--sw/source/core/text/porlay.cxx16
-rw-r--r--sw/source/core/text/porrst.cxx13
-rw-r--r--sw/source/core/text/redlnitr.cxx4
-rw-r--r--sw/source/core/text/txtdrop.cxx20
-rw-r--r--sw/source/core/text/txtfld.cxx2
-rw-r--r--sw/source/core/text/txtfly.cxx15
-rw-r--r--sw/source/core/text/txtfrm.cxx53
-rw-r--r--sw/source/core/text/txtftn.cxx5
-rw-r--r--sw/source/core/text/txtio.cxx5
-rw-r--r--sw/source/core/tox/tox.cxx50
-rw-r--r--sw/source/core/tox/txmsrt.cxx2
-rw-r--r--sw/source/core/txtnode/SwGrammarContact.cxx44
-rw-r--r--sw/source/core/txtnode/atrfld.cxx47
-rw-r--r--sw/source/core/txtnode/atrflyin.cxx22
-rw-r--r--sw/source/core/txtnode/atrftn.cxx30
-rw-r--r--sw/source/core/txtnode/fmtatr2.cxx11
-rw-r--r--sw/source/core/txtnode/fntcache.cxx9
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx110
-rw-r--r--sw/source/core/txtnode/thints.cxx36
-rw-r--r--sw/source/core/txtnode/txtatr2.cxx23
-rwxr-xr-xsw/source/core/txtnode/txtedt.cxx10
-rw-r--r--sw/source/core/undo/SwUndoPageDesc.cxx32
-rw-r--r--sw/source/core/undo/rolbck.cxx10
-rw-r--r--sw/source/core/undo/unattr.cxx73
-rw-r--r--sw/source/core/undo/undobj1.cxx12
-rw-r--r--sw/source/core/undo/undraw.cxx129
-rw-r--r--sw/source/core/undo/unins.cxx2
-rw-r--r--sw/source/core/undo/untbl.cxx50
-rw-r--r--sw/source/core/unocore/unobkm.cxx8
-rw-r--r--sw/source/core/unocore/unochart.cxx4
-rw-r--r--sw/source/core/unocore/unocoll.cxx171
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx4
-rw-r--r--sw/source/core/unocore/unodraw.cxx194
-rw-r--r--sw/source/core/unocore/unofield.cxx254
-rw-r--r--sw/source/core/unocore/unoflatpara.cxx4
-rw-r--r--sw/source/core/unocore/unoframe.cxx313
-rw-r--r--sw/source/core/unocore/unoftn.cxx26
-rw-r--r--sw/source/core/unocore/unoidx.cxx38
-rw-r--r--sw/source/core/unocore/unoobj.cxx8
-rw-r--r--sw/source/core/unocore/unoobj2.cxx145
-rw-r--r--sw/source/core/unocore/unoparagraph.cxx8
-rw-r--r--sw/source/core/unocore/unoport.cxx12
-rw-r--r--sw/source/core/unocore/unoportenum.cxx4
-rw-r--r--sw/source/core/unocore/unoredline.cxx72
-rw-r--r--sw/source/core/unocore/unoredlines.cxx49
-rw-r--r--sw/source/core/unocore/unorefmk.cxx28
-rw-r--r--sw/source/core/unocore/unosect.cxx6
-rw-r--r--sw/source/core/unocore/unosett.cxx8
-rw-r--r--sw/source/core/unocore/unostyle.cxx10
-rw-r--r--sw/source/core/unocore/unotbl.cxx569
-rw-r--r--sw/source/core/unocore/unotext.cxx6
-rw-r--r--sw/source/core/unocore/unotextmarkup.cxx10
-rw-r--r--sw/source/core/view/printdata.cxx4
-rw-r--r--sw/source/core/view/vdraw.cxx2
-rw-r--r--sw/source/core/view/viewimp.cxx8
-rw-r--r--sw/source/core/view/viewpg.cxx1
-rw-r--r--sw/source/core/view/viewsh.cxx103
-rw-r--r--sw/source/core/view/vnew.cxx66
-rw-r--r--sw/source/core/view/vprint.cxx26
-rw-r--r--sw/source/filter/html/css1atr.cxx3
-rw-r--r--sw/source/filter/html/htmlforw.cxx3
-rw-r--r--sw/source/filter/html/htmltab.cxx2
-rw-r--r--sw/source/filter/html/htmlvsh.hxx5
-rw-r--r--sw/source/filter/html/swhtml.cxx6
-rw-r--r--sw/source/filter/html/swhtml.hxx2
-rw-r--r--sw/source/filter/inc/fltshell.hxx2
-rw-r--r--sw/source/filter/rtf/rtfnum.cxx2
-rw-r--r--sw/source/filter/rtf/rtftbl.cxx4
-rw-r--r--sw/source/filter/rtf/swparrtf.cxx4
-rw-r--r--sw/source/filter/ww1/fltshell.cxx8
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx2
-rwxr-xr-xsw/source/filter/ww8/wrtw8nds.cxx6
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx2
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx24
-rw-r--r--sw/source/filter/ww8/ww8graf2.cxx3
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx2
-rw-r--r--sw/source/filter/xml/wrtxml.cxx2
-rw-r--r--sw/source/filter/xml/xmlexp.cxx4
-rw-r--r--sw/source/filter/xml/xmlfmt.cxx4
-rw-r--r--sw/source/filter/xml/xmltbli.cxx2
-rw-r--r--sw/source/filter/xml/xmltexti.cxx6
-rw-r--r--sw/source/ui/app/docsh.cxx64
-rw-r--r--sw/source/ui/app/docsh2.cxx173
-rw-r--r--sw/source/ui/app/docstyle.cxx4
-rw-r--r--sw/source/ui/app/swmodul1.cxx4
-rw-r--r--sw/source/ui/config/viewopt.cxx20
-rw-r--r--sw/source/ui/dialog/SwSpellDialogChildWindow.cxx50
-rw-r--r--sw/source/ui/dochdl/swdtflvr.cxx23
-rw-r--r--sw/source/ui/docvw/PostItMgr.cxx10
-rw-r--r--sw/source/ui/docvw/edtwin.cxx2
-rw-r--r--sw/source/ui/fldui/fldmgr.cxx6
-rw-r--r--sw/source/ui/fldui/fldpage.cxx10
-rw-r--r--sw/source/ui/inc/view.hxx1
-rw-r--r--sw/source/ui/inc/wrtsh.hxx2
-rw-r--r--sw/source/ui/lingu/sdrhhcwrap.cxx49
-rw-r--r--sw/source/ui/lingu/sdrhhcwrap.hxx1
-rw-r--r--sw/source/ui/shells/textfld.cxx10
-rw-r--r--sw/source/ui/uiview/pview.cxx8
-rw-r--r--sw/source/ui/uiview/srcview.cxx2
-rw-r--r--sw/source/ui/uiview/view.cxx85
-rw-r--r--sw/source/ui/uiview/view0.cxx79
-rw-r--r--sw/source/ui/uiview/view2.cxx7
-rw-r--r--sw/source/ui/uiview/viewport.cxx20
-rw-r--r--sw/source/ui/uiview/viewtab.cxx8
-rw-r--r--sw/source/ui/uno/unomod.cxx11
-rwxr-xr-xsw/source/ui/uno/unotxdoc.cxx105
-rwxr-xr-xsw/source/ui/uno/unotxvw.cxx8
-rw-r--r--sw/source/ui/utlui/uitool.cxx4
-rw-r--r--sw/source/ui/vba/vbainformationhelper.cxx5
-rw-r--r--sw/source/ui/vba/wordvbahelper.cxx4
-rw-r--r--sw/source/ui/wrtsh/wrtsh1.cxx9
-rw-r--r--test/prj/build.lst3
-rw-r--r--test/prj/d.lst3
-rw-r--r--test/source/cpp/makefile.mk11
-rw-r--r--test/source/cpp/unoexceptionprotector/makefile.mk56
-rw-r--r--test/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx98
-rw-r--r--testautomation/graphics/required/includes/global/id_004.inc2
-rw-r--r--toolkit/inc/toolkit/controls/dialogcontrol.hxx26
-rw-r--r--toolkit/source/controls/dialogcontrol.cxx41
-rw-r--r--tools/inc/tools/debug.hxx8
-rw-r--r--tools/source/debug/debug.cxx50
-rw-r--r--ucb/source/ucp/tdoc/tdoc_docmgr.cxx20
-rw-r--r--vcl/aqua/source/gdi/salprn.cxx22
-rw-r--r--vcl/source/app/dbggui.cxx20
-rwxr-xr-xvcl/source/gdi/print3.cxx23
-rwxr-xr-xvcl/source/window/printdlg.cxx1
-rw-r--r--vcl/unx/inc/saldisp.hxx2
-rw-r--r--vcl/unx/source/app/saldisp.cxx32
-rw-r--r--vcl/unx/source/gdi/salgdi.cxx24
-rw-r--r--xmlhelp/source/com/sun/star/help/HelpIndexer.java8
-rwxr-xr-x[-rw-r--r--]xmlhelp/source/cxxhelp/provider/databases.cxx52
-rw-r--r--xmlhelp/source/cxxhelp/provider/databases.hxx2
-rwxr-xr-x[-rw-r--r--]xmlhelp/source/cxxhelp/provider/db.cxx45
-rwxr-xr-x[-rw-r--r--]xmlhelp/source/cxxhelp/provider/db.hxx21
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx141
-rw-r--r--xmloff/source/chart/SchXMLSeries2Context.cxx9
-rw-r--r--xmloff/source/chart/SchXMLTools.cxx2
-rw-r--r--xmloff/source/draw/shapeexport.cxx2
477 files changed, 6969 insertions, 8328 deletions
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index bb686c765f4c..a6a1fb5f23c0 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -1975,7 +1975,7 @@ ErrCode BasicManager::ExecuteMacro( String const& i_fullyQualifiedName, String c
sCall += ']';
SbxVariable* pRet = pMethod->GetParent()->Execute( sCall );
- if ( pRet )
+ if ( pRet && ( pRet != pMethod ) )
*i_retValue = *pRet;
return SbxBase::GetError();
}
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 592d69c514a0..c722e680fd8c 100755..100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -36,6 +36,7 @@
#include <svl/brdcst.hxx>
#include <tools/shl.hxx>
#include <basic/sbx.hxx>
+#include "sbdiagnose.hxx"
#include "sb.hxx"
#include <sbjsmeth.hxx>
#include "sbjsmod.hxx"
@@ -1178,6 +1179,10 @@ sal_uInt16 SbModule::Run( SbMethod* pMeth )
GlobalRunDeInit();
+#ifdef DBG_UTIL
+ ResetCapturedAssertions();
+#endif
+
// VBA always ensures screenupdating is enabled after completing
if ( mbVBACompat )
VBAUnlockDocuments( PTR_CAST( StarBASIC, GetParent() ) );
diff --git a/basic/source/inc/sbdiagnose.hxx b/basic/source/inc/sbdiagnose.hxx
new file mode 100644
index 000000000000..065efdb183e1
--- /dev/null
+++ b/basic/source/inc/sbdiagnose.hxx
@@ -0,0 +1,34 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2011 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef BASIC_SBDIAGNOSE_HXX
+#define BASIC_SBDIAGNOSE_HXX
+
+#ifdef DBG_UTIL
+void ResetCapturedAssertions();
+#endif
+
+#endif // BASIC_SBDIAGNOSE_HXX
diff --git a/basic/source/runtime/makefile.mk b/basic/source/runtime/makefile.mk
index 8ca052aaae1a..329448c67e75 100644
--- a/basic/source/runtime/makefile.mk
+++ b/basic/source/runtime/makefile.mk
@@ -54,7 +54,8 @@ SLOFILES= \
$(SLO)$/methods1.obj \
$(SLO)$/props.obj \
$(SLO)$/ddectrl.obj \
- $(SLO)$/dllmgr.obj
+ $(SLO)$/dllmgr.obj \
+ $(SLO)$/sbdiagnose.obj
.IF "$(GUI)$(COM)$(CPU)" == "WNTMSCI"
SLOFILES+= $(SLO)$/wnt.obj
diff --git a/basic/source/runtime/rtlproto.hxx b/basic/source/runtime/rtlproto.hxx
index bb8687ee0db6..bba1867d3591 100644
--- a/basic/source/runtime/rtlproto.hxx
+++ b/basic/source/runtime/rtlproto.hxx
@@ -344,6 +344,7 @@ extern RTLFUNC(CDateToIso);
extern RTLFUNC(CDateFromIso);
extern RTLFUNC(CompatibilityMode);
extern RTLFUNC(CDec);
+extern RTLFUNC(CaptureAssertions);
extern RTLFUNC(Partition); // Fong
diff --git a/basic/source/runtime/sbdiagnose.cxx b/basic/source/runtime/sbdiagnose.cxx
new file mode 100644
index 000000000000..97bfb0a00814
--- /dev/null
+++ b/basic/source/runtime/sbdiagnose.cxx
@@ -0,0 +1,134 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2011 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_basic.hxx"
+
+#include "rtlproto.hxx"
+#include "sbdiagnose.hxx"
+
+#include "basic/sbstar.hxx"
+
+#include <tools/debug.hxx>
+#include <comphelper/flagguard.hxx>
+
+#ifdef DBG_UTIL
+
+static DbgChannelId nRestoreChannelId = 0;
+static DbgChannelId nAssertionChannelId = 0;
+static StarBASICRef xAssertionChannelBasic;
+static String sCaptureFunctionName;
+static bool bReportingAssertion = false;
+
+void ResetCapturedAssertions()
+{
+ if ( nRestoreChannelId != 0 )
+ {
+ DBG_INSTOUTERROR( nRestoreChannelId );
+ }
+ nRestoreChannelId = 0;
+ xAssertionChannelBasic = NULL;
+ sCaptureFunctionName = String();
+ bReportingAssertion = false;
+}
+
+void DbgReportAssertion( const sal_Char* i_assertionMessage )
+{
+ if ( !xAssertionChannelBasic )
+ {
+ ResetCapturedAssertions();
+ return;
+ }
+
+ // prevent infinite recursion
+ if ( bReportingAssertion )
+ return;
+ ::comphelper::FlagRestorationGuard aGuard( bReportingAssertion, true );
+
+ SbxArrayRef const xArguments( new SbxArray( SbxVARIANT ) );
+ SbxVariableRef const xMessageText = new SbxVariable( SbxSTRING );
+ xMessageText->PutString( String::CreateFromAscii( i_assertionMessage ) );
+ xArguments->Put( xMessageText, 1 );
+
+ ErrCode const nError = xAssertionChannelBasic->Call( sCaptureFunctionName, xArguments );
+ if ( ( nError & SbERR_METHOD_NOT_FOUND ) != 0 )
+ ResetCapturedAssertions();
+}
+
+#endif
+
+/// capture assertions, route them to the given given Basic function
+RTLFUNC(CaptureAssertions)
+{
+ (void)bWrite;
+
+ // need exactly one argument
+ if ( rPar.Count() != 2 )
+ {
+ StarBASIC::Error( SbERR_BAD_ARGUMENT );
+ return;
+ }
+
+#ifdef DBG_UTIL
+ DBG_TESTSOLARMUTEX();
+
+ String const sFunctionName = rPar.Get(1)->GetString();
+ if ( sFunctionName.Len() == 0 )
+ {
+ ResetCapturedAssertions();
+ return;
+ }
+
+ if ( nAssertionChannelId == 0 )
+ {
+ // TODO: should we register a named channel at the VCL API, instead of an unnamed channel at the tools API?
+ // A named channel would mean it would appear in the nonpro-debug-options dialog
+ nAssertionChannelId = DbgRegisterUserChannel( &DbgReportAssertion );
+ }
+
+ DbgChannelId const nCurrentChannelId = (DbgChannelId)DbgGetErrorOut();
+ if ( nCurrentChannelId != nAssertionChannelId )
+ {
+ // remember the current channel
+ nRestoreChannelId = nCurrentChannelId;
+
+ // set the new channel
+ DBG_INSTOUTERROR( nAssertionChannelId );
+
+ // ensure OSL assertions are captured, too
+ DbgData aData( *DbgGetData() );
+ aData.bHookOSLAssert = sal_True;
+ DbgUpdateOslHook( &aData );
+ }
+
+ xAssertionChannelBasic = pBasic;
+ sCaptureFunctionName = sFunctionName;
+#else
+ (void)pBasic;
+ (void)rPar;
+ (void)bWrite;
+#endif
+}
+
diff --git a/basic/source/runtime/stdobj.cxx b/basic/source/runtime/stdobj.cxx
index ecc0dfb3321b..92d8152e60f4 100644
--- a/basic/source/runtime/stdobj.cxx
+++ b/basic/source/runtime/stdobj.cxx
@@ -147,6 +147,8 @@ static Methods aMethods[] = {
{ "number", SbxDOUBLE, 0,NULL,0 },
{ "CreateObject", SbxOBJECT, 1 | _FUNCTION, RTLNAME( CreateObject ),0 },
{ "class", SbxSTRING, 0,NULL,0 },
+{ "CaptureAssertions", SbxNULL, 1 | _FUNCTION, RTLNAME(CaptureAssertions), 0 },
+ { "methodName", SbxSTRING, 0, NULL, 0 },
{ "CreateUnoListener",SbxOBJECT, 1 | _FUNCTION, RTLNAME( CreateUnoListener ),0 },
{ "prefix", SbxSTRING, 0,NULL,0 },
{ "typename", SbxSTRING, 0,NULL,0 },
diff --git a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
index aa50b1fc41df..8104516c7177 100644
--- a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
@@ -193,6 +193,40 @@ void CharacterPropertyItemConverter::FillSpecialItem(
}
break;
+ case EE_CHAR_OVERLINE:
+ {
+ SvxOverlineItem aItem( UNDERLINE_NONE, EE_CHAR_OVERLINE );
+ bool bModified = false;
+
+ uno::Any aValue( GetPropertySet()->getPropertyValue( C2U( "CharOverline" ) ) );
+ if ( aValue.hasValue() )
+ {
+ aItem.PutValue( aValue, MID_TL_STYLE );
+ bModified = true;
+ }
+
+ aValue = GetPropertySet()->getPropertyValue( C2U( "CharOverlineHasColor" ) );
+ if ( aValue.hasValue() &&
+ ( *reinterpret_cast< const sal_Bool* >( aValue.getValue() ) != sal_False ) )
+ {
+ aItem.PutValue( aValue, MID_TL_HASCOLOR );
+ bModified = true;
+ }
+
+ aValue = GetPropertySet()->getPropertyValue( C2U( "CharOverlineColor" ) );
+ if ( aValue.hasValue() )
+ {
+ aItem.PutValue( aValue, MID_TL_COLOR );
+ bModified = true;
+ }
+
+ if ( bModified )
+ {
+ rOutItemSet.Put( aItem );
+ }
+ }
+ break;
+
case EE_CHAR_ITALIC:
case EE_CHAR_ITALIC_CJK:
case EE_CHAR_ITALIC_CTL:
@@ -397,6 +431,39 @@ bool CharacterPropertyItemConverter::ApplySpecialItem(
}
break;
+ case EE_CHAR_OVERLINE:
+ {
+ const SvxOverlineItem& rItem = static_cast< const SvxOverlineItem & >( rItemSet.Get( nWhichId ) );
+
+ if ( rItem.QueryValue( aValue, MID_TL_STYLE ) )
+ {
+ if ( aValue != GetPropertySet()->getPropertyValue( C2U( "CharOverline" ) ) )
+ {
+ GetPropertySet()->setPropertyValue( C2U( "CharOverline" ), aValue );
+ bChanged = true;
+ }
+ }
+
+ if ( rItem.QueryValue( aValue, MID_TL_COLOR ) )
+ {
+ if ( aValue != GetPropertySet()->getPropertyValue( C2U( "CharOverlineColor" ) ) )
+ {
+ GetPropertySet()->setPropertyValue( C2U( "CharOverlineColor" ), aValue );
+ bChanged = true;
+ }
+ }
+
+ if ( rItem.QueryValue( aValue, MID_TL_HASCOLOR ) )
+ {
+ if ( aValue != GetPropertySet()->getPropertyValue( C2U( "CharOverlineHasColor" ) ) )
+ {
+ GetPropertySet()->setPropertyValue( C2U( "CharOverlineHasColor" ), aValue );
+ bChanged = true;
+ }
+ }
+ }
+ break;
+
case EE_CHAR_ITALIC:
case EE_CHAR_ITALIC_CJK:
case EE_CHAR_ITALIC_CTL:
diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx
index 37cbdbb30f6b..d42d3112f67c 100644
--- a/chart2/source/controller/main/ChartController_Position.cxx
+++ b/chart2/source/controller/main/ChartController_Position.cxx
@@ -62,7 +62,7 @@ using namespace ::com::sun::star::chart2;
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void lcl_getPositionAndSizeFromItemSet( const SfxItemSet& rItemSet, Rectangle& rPosAndSize, const awt::Size aOriginalSize )
+void lcl_getPositionAndSizeFromItemSet( const SfxItemSet& rItemSet, awt::Rectangle& rPosAndSize, const awt::Size aOriginalSize )
{
long nPosX(0);
long nPosY(0);
@@ -121,7 +121,7 @@ void lcl_getPositionAndSizeFromItemSet( const SfxItemSet& rItemSet, Rectangle& r
break;
}
- rPosAndSize = Rectangle(Point(nPosX,nPosY),Size(nSizX,nSizY));
+ rPosAndSize = awt::Rectangle(nPosX,nPosY,nSizX,nSizY);
}
void SAL_CALL ChartController::executeDispatch_PositionAndSize()
@@ -166,19 +166,18 @@ void SAL_CALL ChartController::executeDispatch_PositionAndSize()
const SfxItemSet* pOutItemSet = pDlg->GetOutputItemSet();
if(pOutItemSet)
{
- Rectangle aObjectRect;
+ awt::Rectangle aObjectRect;
aItemSet.Put(*pOutItemSet);//overwrite old values with new values (-> all items are set)
lcl_getPositionAndSizeFromItemSet( aItemSet, aObjectRect, aSelectedSize );
awt::Size aPageSize( ChartModelHelper::getPageSize( getModel() ) );
- Rectangle aPageRect( 0,0,aPageSize.Width,aPageSize.Height );
+ awt::Rectangle aPageRect( 0,0,aPageSize.Width,aPageSize.Height );
bool bChanged = false;
if ( eObjectType == OBJECTTYPE_LEGEND )
bChanged = DiagramHelper::switchDiagramPositioningToExcludingPositioning( getModel(), false , true );
bool bMoved = PositionAndSizeHelper::moveObject( m_aSelection.getSelectedCID(), getModel()
- , awt::Rectangle(aObjectRect.getX(),aObjectRect.getY(),aObjectRect.getWidth(),aObjectRect.getHeight())
- , awt::Rectangle(aPageRect.getX(),aPageRect.getY(),aPageRect.getWidth(),aPageRect.getHeight()) );
+ , aObjectRect, aPageRect );
if( bMoved || bChanged )
aUndoGuard.commit();
}
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx
index 1692c5761ae9..ed855296427b 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -1686,7 +1686,16 @@ bool ChartController::requestQuickHelp(
if ( bSuccess )
{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ if ( m_pDrawViewWrapper && m_pDrawViewWrapper->IsTextEdit() )
+ {
+ this->EndTextEdit();
+ }
this->impl_selectObjectAndNotiy();
+ if ( m_pChartWindow )
+ {
+ m_pChartWindow->Invalidate();
+ }
return sal_True;
}
diff --git a/chart2/source/inc/CharacterProperties.hxx b/chart2/source/inc/CharacterProperties.hxx
index 0742435e9bfe..676618d0bc5c 100644
--- a/chart2/source/inc/CharacterProperties.hxx
+++ b/chart2/source/inc/CharacterProperties.hxx
@@ -63,6 +63,9 @@ public:
PROP_CHAR_UNDERLINE,
PROP_CHAR_UNDERLINE_COLOR,
PROP_CHAR_UNDERLINE_HAS_COLOR,
+ PROP_CHAR_OVERLINE,
+ PROP_CHAR_OVERLINE_COLOR,
+ PROP_CHAR_OVERLINE_HAS_COLOR,
PROP_CHAR_WEIGHT,
PROP_CHAR_POSTURE,
PROP_CHAR_AUTO_KERNING,
diff --git a/chart2/source/inc/ExponentialRegressionCurveCalculator.hxx b/chart2/source/inc/ExponentialRegressionCurveCalculator.hxx
index 91c3034ea79c..acecde281001 100644
--- a/chart2/source/inc/ExponentialRegressionCurveCalculator.hxx
+++ b/chart2/source/inc/ExponentialRegressionCurveCalculator.hxx
@@ -63,9 +63,10 @@ private:
throw (::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::uno::RuntimeException);
- // formula is: f(x) = m_fSlope ^ x + m_fIntercept
- double m_fSlope;
- double m_fIntercept;
+ // formula is: f(x) = exp(m_fLogIntercept) * exp( m_fLogSlope * x )
+ // mathematical model f(x) = Intercept * Slope^x
+ double m_fLogSlope;
+ double m_fLogIntercept;
};
} // namespace chart
diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx
index 322e84e1bc11..c6b9a0f2e112 100755..100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -196,6 +196,7 @@ private:
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_INCLUDE_HIDDEN_CELLS, true );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DIAGRAM_RIGHT_ANGLED_AXES, false );
::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_DIAGRAM_STARTING_ANGLE, 90 );
+ ::chart::SceneProperties::AddDefaultsToMap( rOutMap );
}
};
diff --git a/chart2/source/tools/CharacterProperties.cxx b/chart2/source/tools/CharacterProperties.cxx
index c403ca046b9e..f0c37a47c96c 100755..100644
--- a/chart2/source/tools/CharacterProperties.cxx
+++ b/chart2/source/tools/CharacterProperties.cxx
@@ -161,6 +161,28 @@ void CharacterProperties::AddPropertiesToVector(
::getBooleanCppuType(),
beans::PropertyAttribute::BOUND
| beans::PropertyAttribute::MAYBEDEFAULT ));
+ // CharOverline (see awt.FontUnderline)
+ rOutProperties.push_back(
+ Property( C2U( "CharOverline" ),
+ PROP_CHAR_OVERLINE,
+ ::getCppuType( reinterpret_cast< const sal_Int16* >( 0 ) ),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEDEFAULT ) );
+ // CharOverlineColor
+ rOutProperties.push_back(
+ Property( C2U( "CharOverlineColor" ),
+ PROP_CHAR_OVERLINE_COLOR,
+ ::getCppuType( reinterpret_cast< const sal_Int32* >( 0 ) ),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEDEFAULT
+ | beans::PropertyAttribute::MAYBEVOID ) );
+ // CharOverlineHasColor
+ rOutProperties.push_back(
+ Property( C2U( "CharOverlineHasColor" ),
+ PROP_CHAR_OVERLINE_HAS_COLOR,
+ ::getBooleanCppuType(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEDEFAULT ) );
// CharWeight (see awt.FontWeight)
rOutProperties.push_back(
Property( C2U( "CharWeight" ),
@@ -503,6 +525,9 @@ void CharacterProperties::AddDefaultsToMap(
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_UNDERLINE, awt::FontUnderline::NONE );
::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_CHAR_UNDERLINE_COLOR, -1 ); //automatic color (COL_AUTO)
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_UNDERLINE_HAS_COLOR, false );
+ ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_OVERLINE, awt::FontUnderline::NONE );
+ ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_CHAR_OVERLINE_COLOR, -1 ); //automatic color (COL_AUTO)
+ ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_OVERLINE_HAS_COLOR, false );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_WEIGHT, awt::FontWeight::NORMAL );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_POSTURE, awt::FontSlant_NONE );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_AUTO_KERNING, true );
diff --git a/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx b/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx
index d7bb86174323..495be222b6f4 100644
--- a/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx
@@ -43,11 +43,11 @@ namespace chart
{
ExponentialRegressionCurveCalculator::ExponentialRegressionCurveCalculator() :
- m_fSlope( 0.0 ),
- m_fIntercept( 0.0 )
+ m_fLogSlope( 0.0 ),
+ m_fLogIntercept( 0.0 )
{
- ::rtl::math::setNan( & m_fSlope );
- ::rtl::math::setNan( & m_fIntercept );
+ ::rtl::math::setNan( & m_fLogSlope );
+ ::rtl::math::setNan( & m_fLogIntercept );
}
ExponentialRegressionCurveCalculator::~ExponentialRegressionCurveCalculator()
@@ -67,9 +67,9 @@ void SAL_CALL ExponentialRegressionCurveCalculator::recalculateRegression(
const size_t nMax = aValues.first.size();
if( nMax == 0 )
{
- ::rtl::math::setNan( & m_fSlope );
- ::rtl::math::setNan( & m_fIntercept );
- ::rtl::math::setNan( & m_fCorrelationCoeffitient );
+ ::rtl::math::setNan( & m_fLogSlope );
+ ::rtl::math::setNan( & m_fLogIntercept );
+ ::rtl::math::setNan( & m_fCorrelationCoeffitient );// actual it is coefficient of determination
return;
}
@@ -96,12 +96,10 @@ void SAL_CALL ExponentialRegressionCurveCalculator::recalculateRegression(
fQxy += fDeltaX * fDeltaY;
}
- m_fSlope = fQxy / fQx;
- m_fIntercept = fAverageY - m_fSlope * fAverageX;
+ m_fLogSlope = fQxy / fQx;
+ m_fLogIntercept = fAverageY - m_fLogSlope * fAverageX;
m_fCorrelationCoeffitient = fQxy / sqrt( fQx * fQy );
- m_fSlope = exp( m_fSlope );
- m_fIntercept = exp( m_fIntercept );
}
double SAL_CALL ExponentialRegressionCurveCalculator::getCurveValue( double x )
@@ -111,10 +109,10 @@ double SAL_CALL ExponentialRegressionCurveCalculator::getCurveValue( double x )
double fResult;
::rtl::math::setNan( & fResult );
- if( ! ( ::rtl::math::isNan( m_fSlope ) ||
- ::rtl::math::isNan( m_fIntercept )))
+ if( ! ( ::rtl::math::isNan( m_fLogSlope ) ||
+ ::rtl::math::isNan( m_fLogIntercept )))
{
- fResult = m_fIntercept * pow( m_fSlope, x );
+ fResult = exp(m_fLogIntercept + x * m_fLogSlope);
}
return fResult;
@@ -150,31 +148,48 @@ OUString ExponentialRegressionCurveCalculator::ImplGetRepresentation(
const uno::Reference< util::XNumberFormatter >& xNumFormatter,
::sal_Int32 nNumberFormatKey ) const
{
+ double fIntercept = exp(m_fLogIntercept);
+ double fSlope = exp(m_fLogSlope);
+ bool bHasSlope = !rtl::math::approxEqual( fSlope, 1.0 );
+ bool bHasIntercept = !rtl::math::approxEqual( fIntercept, 1.0 );
+
OUStringBuffer aBuf( C2U( "f(x) = " ));
- if( m_fIntercept == 0.0 ||
- m_fSlope == 0.0 )
- {
- aBuf.append( sal_Unicode( '0' ));
- }
- else if( rtl::math::approxEqual( m_fSlope, 1.0 ) )
+ if ( fIntercept == 0.0)
{
- aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, m_fIntercept ));
+ // underflow, a true zero is impossible
+ aBuf.append( C2U( "exp( " ));
+ aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, m_fLogIntercept) );
+ aBuf.append( (m_fLogSlope < 0.0) ? C2U( " - " ) : C2U( " + " ));
+ aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, fabs(m_fLogSlope)) );
+ aBuf.append( C2U( " x )" ));
}
else
{
- if( ! rtl::math::approxEqual( m_fIntercept, 1.0 ) )
+ if (bHasIntercept)
{
- aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, m_fIntercept ));
- aBuf.append( sal_Unicode( 0x00b7 ));
+ aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, fIntercept) );
+ aBuf.append( C2U( " exp( " ));
+ aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, m_fLogSlope) );
+ aBuf.append( C2U( " x )" ));
+ }
+ else
+ {
+ // show logarithmic output, if intercept and slope both are near one
+ // otherwise drop output of intercept, which is 1 here
+ aBuf.append( C2U( " exp( " ));
+ if (!bHasSlope)
+ {
+ aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, m_fLogIntercept) );
+ aBuf.append( (m_fLogSlope < 0.0) ? C2U( " - " ) : C2U( " + " ));
+ aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, fabs(m_fLogSlope)) );
+ }
+ else
+ {
+ aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, m_fLogSlope) );
+ }
+ aBuf.append( C2U( " x )" ));
}
-
- if( m_fSlope < 0.0 )
- aBuf.append( sal_Unicode( '(' ));
- aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, m_fSlope ));
- if( m_fSlope < 0.0 )
- aBuf.append( sal_Unicode( ')' ));
- aBuf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "^x" ));
}
return aBuf.makeStringAndClear();
diff --git a/chart2/source/view/axes/ScaleAutomatism.cxx b/chart2/source/view/axes/ScaleAutomatism.cxx
index 075ad16347c2..0ca83bf354e9 100644
--- a/chart2/source/view/axes/ScaleAutomatism.cxx
+++ b/chart2/source/view/axes/ScaleAutomatism.cxx
@@ -49,9 +49,16 @@ using ::com::sun::star::chart::TimeUnit::MONTH;
using ::com::sun::star::chart::TimeUnit::YEAR;
const sal_Int32 MAXIMUM_MANUAL_INCREMENT_COUNT = 500;
-const sal_Int32 MAXIMUM_AUTO_INCREMENT_COUNT = 10;
const sal_Int32 MAXIMUM_SUB_INCREMENT_COUNT = 100;
+sal_Int32 lcl_getMaximumAutoIncrementCount( sal_Int32 nAxisType )
+{
+ sal_Int32 nMaximumAutoIncrementCount = 10;
+ if( nAxisType==AxisType::DATE )
+ nMaximumAutoIncrementCount = MAXIMUM_MANUAL_INCREMENT_COUNT;
+ return nMaximumAutoIncrementCount;
+}
+
namespace
{
@@ -102,7 +109,7 @@ ScaleAutomatism::ScaleAutomatism( const ScaleData& rSourceScale, const Date& rNu
: m_aSourceScale( rSourceScale )
, m_fValueMinimum( 0.0 )
, m_fValueMaximum( 0.0 )
- , m_nMaximumAutoMainIncrementCount( MAXIMUM_AUTO_INCREMENT_COUNT )
+ , m_nMaximumAutoMainIncrementCount( lcl_getMaximumAutoIncrementCount( rSourceScale.AxisType ) )
, m_bExpandBorderToIncrementRhythm( false )
, m_bExpandIfValuesCloseToBorder( false )
, m_bExpandWideValuesToZero( false )
@@ -149,8 +156,8 @@ void ScaleAutomatism::setMaximumAutoMainIncrementCount( sal_Int32 nMaximumAutoMa
{
if( nMaximumAutoMainIncrementCount < 2 )
m_nMaximumAutoMainIncrementCount = 2; //#i82006
- else if( nMaximumAutoMainIncrementCount > MAXIMUM_AUTO_INCREMENT_COUNT )
- m_nMaximumAutoMainIncrementCount = MAXIMUM_AUTO_INCREMENT_COUNT;
+ else if( nMaximumAutoMainIncrementCount > lcl_getMaximumAutoIncrementCount( m_aSourceScale.AxisType ) )
+ m_nMaximumAutoMainIncrementCount = lcl_getMaximumAutoIncrementCount( m_aSourceScale.AxisType );
else
m_nMaximumAutoMainIncrementCount = nMaximumAutoMainIncrementCount;
}
@@ -692,6 +699,19 @@ void ScaleAutomatism::calculateExplicitIncrementAndScaleForDateTimeAxis(
nNumer = static_cast<sal_Int32>( rtl::math::approxCeil( nIntervalDays/nDaysPerInterval ) );
if(nNumer<=0)
nNumer=1;
+ if( rExplicitIncrement.MajorTimeInterval.TimeUnit == DAY )
+ {
+ if( nNumer>2 && nNumer<7 )
+ nNumer=7;
+ else if( nNumer>7 )
+ {
+ rExplicitIncrement.MajorTimeInterval.TimeUnit = MONTH;
+ nDaysPerInterval = 31.0;
+ nNumer = static_cast<sal_Int32>( rtl::math::approxCeil( nIntervalDays/nDaysPerInterval ) );
+ if(nNumer<=0)
+ nNumer=1;
+ }
+ }
rExplicitIncrement.MajorTimeInterval.Number = nNumer;
nMainIncrementCount = nDayCount/(nNumer*nDaysPerInterval);
}
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 1077591dfce8..d245d44365ae 100755
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -1154,9 +1154,19 @@ void VSeriesPlotter::createRegressionCurveEquationShapes(
if( xTextShape.is())
{
ShapeFactory::setShapeName( xTextShape, rEquationCID );
- xTextShape->setPosition(
- RelativePositionHelper::getUpperLeftCornerOfAnchoredObject(
- aScreenPosition2D, xTextShape->getSize(), aRelativePosition.Anchor ));
+ awt::Size aSize( xTextShape->getSize() );
+ awt::Point aPos( RelativePositionHelper::getUpperLeftCornerOfAnchoredObject(
+ aScreenPosition2D, aSize, aRelativePosition.Anchor ) );
+ //ensure that the equation is fully placed within the page (if possible)
+ if( (aPos.X + aSize.Width) > m_aPageReferenceSize.Width )
+ aPos.X = m_aPageReferenceSize.Width - aSize.Width;
+ if( aPos.X < 0 )
+ aPos.X = 0;
+ if( (aPos.Y + aSize.Height) > m_aPageReferenceSize.Height )
+ aPos.Y = m_aPageReferenceSize.Height - aSize.Height;
+ if( aPos.Y < 0 )
+ aPos.Y = 0;
+ xTextShape->setPosition(aPos);
}
}
}
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index ad20a557756c..ee915ceac688 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -2198,12 +2198,9 @@ std::auto_ptr<VTitle> lcl_createTitle( TitleHelper::eTitleType eType
}
uno::Reference< XTitle > xTitle( TitleHelper::getTitle( eType, xChartModel ) );
- if(xTitle.is())
+ rtl::OUString aCompleteString( TitleHelper::getCompleteString( xTitle ) );
+ if( aCompleteString.getLength() != 0 )
{
- rtl::OUString aCompleteString( TitleHelper::getCompleteString( xTitle ) );
- if ( aCompleteString.getLength() == 0 )
- return apVTitle;//don't create empty titles as the resulting diagram position is wrong then
-
//create title
apVTitle = std::auto_ptr<VTitle>(new VTitle(xTitle));
rtl::OUString aCID( ObjectIdentifier::createClassifiedIdentifierForObject( xTitle, xChartModel ) );
diff --git a/chart2/source/view/main/PropertyMapper.cxx b/chart2/source/view/main/PropertyMapper.cxx
index 99b7c0bd2ae0..18b5f2717afd 100644
--- a/chart2/source/view/main/PropertyMapper.cxx
+++ b/chart2/source/view/main/PropertyMapper.cxx
@@ -242,6 +242,9 @@ const tMakePropertyNameMap& PropertyMapper::getPropertyNameMapForCharacterProper
( C2U( "CharUnderline" ), C2U("CharUnderline") )
( C2U( "CharUnderlineColor" ), C2U("CharUnderlineColor") )
( C2U( "CharUnderlineHasColor" ), C2U("CharUnderlineHasColor") )
+ ( C2U( "CharOverline" ), C2U("CharOverline") )
+ ( C2U( "CharOverlineColor" ), C2U("CharOverlineColor") )
+ ( C2U( "CharOverlineHasColor" ), C2U("CharOverlineHasColor") )
( C2U( "CharWeight" ), C2U("CharWeight") )
( C2U( "CharWeightAsian" ), C2U("CharWeightAsian") )
( C2U( "CharWeightComplex" ), C2U("CharWeightComplex") )
diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx
index 33e1d1f26aa4..12548e888fec 100644..100755
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
@@ -918,8 +918,8 @@ void VLegend::createShapes(
RelativeSize aRelativeSize;
if ((xLegendProp->getPropertyValue( C2U( "RelativeSize" )) >>= aRelativeSize))
{
- aLegendSize.Width = aRelativeSize.Primary * rPageSize.Width;
- aLegendSize.Height = aRelativeSize.Secondary * rPageSize.Height;
+ aLegendSize.Width = ::rtl::math::approxCeil( aRelativeSize.Primary * rPageSize.Width );
+ aLegendSize.Height = ::rtl::math::approxCeil( aRelativeSize.Secondary * rPageSize.Height );
}
else
eExpansion = ::com::sun::star::chart::ChartLegendExpansion_HIGH;
diff --git a/configure.in b/configure.in
index ec4d9ce11df4..b9fec5b18f25 100644
--- a/configure.in
+++ b/configure.in
@@ -3484,8 +3484,7 @@ if test "z$enable_odk" = "z" -o "$enable_odk" != "no"; then
if echo "$WITH_MINGWIN" | $EGREP -q "/"; then
if ! test -x "`echo $WITH_MINGWIN | $SED -e s/g++/strip/ | $SED -e s/c++/strip/`"; then MINGSTRIP=false; else MINGWSTRIP=$(basename $(echo $WITH_MINGWIN | $SED -e s/g++/strip/ | $SED -e s/c++/strip/)); fi
else
- AC_CHECK_TOOL(MINGWSTRIP, `echo $WITH_MINGWIN | $SED -e s/g++/strip/ |
-$SED -e s/c++/strip/`, false)
+ AC_CHECK_TOOL(MINGWSTRIP, `echo $WITH_MINGWIN | $SED -e s/g++/strip/ | $SED -e s/c++/strip/`, false)
fi
if test "$MINGWSTRIP" = "false"; then
AC_MSG_ERROR(MinGW32 binutils needed. Install them.)
diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx
index aa0d18589a89..935a64397505 100644
--- a/cppu/source/typelib/typelib.cxx
+++ b/cppu/source/typelib/typelib.cxx
@@ -330,20 +330,6 @@ TypeDescriptor_Init_Impl::~TypeDescriptor_Init_Impl() SAL_THROW( () )
delete pWeakMap;
pWeakMap = 0;
}
-#if OSL_DEBUG_LEVEL > 1
- OSL_ASSERT( nTypeDescriptionCount == 0 );
- OSL_ASSERT( nCompoundTypeDescriptionCount == 0 );
- OSL_ASSERT( nUnionTypeDescriptionCount == 0 );
- OSL_ASSERT( nIndirectTypeDescriptionCount == 0 );
- OSL_ASSERT( nArrayTypeDescriptionCount == 0 );
- OSL_ASSERT( nEnumTypeDescriptionCount == 0 );
- OSL_ASSERT( nInterfaceMethodTypeDescriptionCount == 0 );
- OSL_ASSERT( nInterfaceAttributeTypeDescriptionCount == 0 );
- OSL_ASSERT( nInterfaceTypeDescriptionCount == 0 );
- OSL_ASSERT( nTypeDescriptionReferenceCount == 0 );
-
- OSL_ASSERT( !pCallbacks || pCallbacks->empty() );
-#endif
delete pCallbacks;
pCallbacks = 0;
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 3b5ed1916f9b..033a87cfaea2 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -633,7 +633,9 @@ throw()
else if( TypeToCopy == +1 ) // Folder
{
osl::Directory aDir( srcUnqPath );
- aDir.open();
+ err = aDir.open();
+ if ( err != osl::FileBase::E_None )
+ return err;
err = osl::Directory::create( dstUnqPath );
osl::FileBase::RC next = err;
diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx
index 2e2c5e2a2f53..89ab4d0b7199 100644..100755
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -63,6 +63,7 @@
#include "com/sun/star/ucb/UnsupportedCommandException.hpp"
#include "boost/bind.hpp"
#include "tools/urlobj.hxx"
+#include "unotools/tempfile.hxx"
#include "osl/file.hxx"
#include <vector>
@@ -636,21 +637,12 @@ OUString PackageManagerImpl::insertToActivationLayer(
::ucbhelper::Content sourceContent(sourceContent_);
Reference<XCommandEnvironment> xCmdEnv(
sourceContent.getCommandEnvironment() );
- OUString destFolder, tempEntry;
- if (::osl::File::createTempFile(
- m_activePackages_expanded.getLength() == 0
- ? 0 : &m_activePackages_expanded,
- 0, &tempEntry ) != ::osl::File::E_None)
- throw RuntimeException(
- OUSTR("::osl::File::createTempFile() failed!"), 0 );
- if (m_activePackages_expanded.getLength() == 0) {
- destFolder = tempEntry;
- }
- else {
- tempEntry = tempEntry.copy( tempEntry.lastIndexOf( '/' ) + 1 );
- // tweak user|share to macrofied url:
- destFolder = makeURL( m_activePackages, tempEntry );
- }
+
+ String baseDir(m_activePackages_expanded);
+ ::utl::TempFile aTemp(&baseDir, sal_False);
+ OUString tempEntry = aTemp.GetURL();
+ tempEntry = tempEntry.copy(tempEntry.lastIndexOf('/') + 1);
+ OUString destFolder = makeURL( m_activePackages, tempEntry);
destFolder += OUSTR("_");
// prepare activation folder:
diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx
index 266d4406cfde..32413f3d11ba 100755..100644
--- a/desktop/source/deployment/registry/dp_backend.cxx
+++ b/desktop/source/deployment/registry/dp_backend.cxx
@@ -45,6 +45,7 @@
#include "com/sun/star/beans/StringPair.hpp"
#include "com/sun/star/sdbc/XResultSet.hpp"
#include "com/sun/star/sdbc/XRow.hpp"
+#include "unotools/tempfile.hxx"
using namespace ::dp_misc;
@@ -225,42 +226,43 @@ OUString PackageRegistryBackend::createFolder(
OUString const & relUrl,
Reference<ucb::XCommandEnvironment> const & xCmdEnv)
{
- OUString sDataFolder = makeURL(getCachePath(), relUrl);
+ const OUString sDataFolder = makeURL(getCachePath(), relUrl);
//make sure the folder exist
ucbhelper::Content dataContent;
::dp_misc::create_folder(&dataContent, sDataFolder, xCmdEnv);
- OUString sDataFolderURL = dp_misc::expandUnoRcUrl(sDataFolder);
-
- OUString tempEntry;
- if (::osl::File::createTempFile(
- &sDataFolderURL, 0, &tempEntry ) != ::osl::File::E_None)
- throw RuntimeException(
- OUSTR("::osl::File::createTempFile() failed!"), 0 );
- tempEntry = tempEntry.copy( tempEntry.lastIndexOf( '/' ) + 1 );
- OUString destFolder= makeURL(sDataFolder, tempEntry) + OUSTR("_");
- ::ucbhelper::Content destFolderContent;
- dp_misc::create_folder( &destFolderContent, destFolder, xCmdEnv );
-
- return destFolder;
+ const OUString sDataFolderURL = dp_misc::expandUnoRcUrl(sDataFolder);
+ const String baseDir(sDataFolder);
+ const ::utl::TempFile aTemp(&baseDir, sal_True);
+ const OUString url = aTemp.GetURL();
+ return sDataFolder + url.copy(url.lastIndexOf('/'));
}
+//folderURL can have the extension .tmp or .tmp_
+//Before OOo 3.4 the created a tmp file with osl_createTempFile and
+//then created a Folder with a same name and a trailing '_'
+//If the folderURL has no '_' then there is no corresponding tmp file.
void PackageRegistryBackend::deleteTempFolder(
OUString const & folderUrl)
{
- OSL_ASSERT(folderUrl.getLength()
- && folderUrl[folderUrl.getLength() - 1] == '_');
- if (folderUrl.getLength()
- && folderUrl[folderUrl.getLength() - 1] == '_')
+ if (folderUrl.getLength())
{
- const OUString tempFile = folderUrl.copy(0, folderUrl.getLength() - 1);
erase_path( folderUrl, Reference<XCommandEnvironment>(),
false /* no throw: ignore errors */ );
- erase_path( tempFile, Reference<XCommandEnvironment>(),
- false /* no throw: ignore errors */ );
+
+ if (folderUrl[folderUrl.getLength() - 1] == '_')
+ {
+ const OUString tempFile = folderUrl.copy(0, folderUrl.getLength() - 1);
+ erase_path( tempFile, Reference<XCommandEnvironment>(),
+ false /* no throw: ignore errors */ );
+ }
}
}
+//usedFolders can contain folder names which have the extension .tmp or .tmp_
+//Before OOo 3.4 we created a tmp file with osl_createTempFile and
+//then created a Folder with a same name and a trailing '_'
+//If the folderURL has no '_' then there is no corresponding tmp file.
void PackageRegistryBackend::deleteUnusedFolders(
OUString const & relUrl,
::std::list< OUString> const & usedFolders)
@@ -273,12 +275,14 @@ void PackageRegistryBackend::deleteUnusedFolders(
Reference<sdbc::XResultSet> xResultSet(
tempFolder.createCursor(
Sequence<OUString>( &StrTitle::get(), 1 ),
- ::ucbhelper::INCLUDE_DOCUMENTS_ONLY ) );
+ ::ucbhelper::INCLUDE_FOLDERS_ONLY ) );
// get all temp directories:
::std::vector<OUString> tempEntries;
char tmp[] = ".tmp";
+ //Check for ".tmp_" can be removed after OOo 4.0
+ char tmp_[] = ".tmp_";
while (xResultSet->next())
{
OUString title(
@@ -286,21 +290,18 @@ void PackageRegistryBackend::deleteUnusedFolders(
xResultSet, UNO_QUERY_THROW )->getString(
1 /* Title */ ) );
- if (title.endsWithAsciiL(tmp, sizeof(tmp) - 1))
+ if (title.endsWithAsciiL(tmp, sizeof(tmp) - 1)
+ || title.endsWithAsciiL(tmp_, sizeof(tmp_) - 1))
tempEntries.push_back(
makeURLAppendSysPathSegment(sDataFolder, title));
}
for ( ::std::size_t pos = 0; pos < tempEntries.size(); ++pos )
{
- //usedFolders contains the urls to the folders which have
- //a trailing underscore
- const OUString tempFolderName = tempEntries[ pos ] + OUSTR("_");
-
- if (::std::find( usedFolders.begin(), usedFolders.end(), tempFolderName ) ==
+ if (::std::find( usedFolders.begin(), usedFolders.end(), tempEntries[pos] ) ==
usedFolders.end())
{
- deleteTempFolder(tempFolderName);
+ deleteTempFolder(tempEntries[pos]);
}
}
}
diff --git a/desktop/source/deployment/registry/dp_backenddb.cxx b/desktop/source/deployment/registry/dp_backenddb.cxx
index 9629855aaf11..44e11efdef0e 100644..100755
--- a/desktop/source/deployment/registry/dp_backenddb.cxx
+++ b/desktop/source/deployment/registry/dp_backenddb.cxx
@@ -91,7 +91,10 @@ css::uno::Reference<css::xml::dom::XDocument> BackendDb::getDocument()
::osl::File::RC err = ::osl::DirectoryItem::get(m_urlDb, item);
if (err == ::osl::File::E_None)
{
- m_doc = xDocBuilder->parseURI(m_urlDb);
+ ::ucbhelper::Content descContent(
+ m_urlDb, css::uno::Reference<css::ucb::XCommandEnvironment>());
+ Reference<css::io::XInputStream> xIn = descContent.openStream();
+ m_doc = xDocBuilder->parse(xIn);
}
else if (err == ::osl::File::E_NOENT)
{
diff --git a/extensions/source/plugin/unx/sysplug.cxx b/extensions/source/plugin/unx/sysplug.cxx
index be5879bf238d..e78ddf2322cf 100644
--- a/extensions/source/plugin/unx/sysplug.cxx
+++ b/extensions/source/plugin/unx/sysplug.cxx
@@ -109,7 +109,7 @@ UnxPluginComm::~UnxPluginComm()
int status = 16777216;
pid_t nExit = waitpid( m_nCommPID, &status, WUNTRACED );
#if OSL_DEBUG_LEVEL > 1
- fprintf( stderr, "child %d (plugin app child %d) exited with status %d\n", nExit, m_nCommPID, WEXITSTATUS(status) );
+ fprintf( stderr, "child %d (plugin app child %d) exited with status %d\n", (int)nExit, (int)m_nCommPID, (int)WEXITSTATUS(status) );
#else
(void)nExit;
#endif
diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx
index 1d1e877a5a86..780efb1f3c6d 100644..100755
--- a/framework/source/services/backingwindow.cxx
+++ b/framework/source/services/backingwindow.cxx
@@ -400,7 +400,7 @@ void BackingWindow::prepareRecentFileMenu()
void BackingWindow::initBackground()
{
- SetBackground( GetSettings().GetStyleSettings().GetWorkspaceGradient() );
+ SetBackground();
bool bDark = GetSettings().GetStyleSettings().GetHighContrastMode();
if( bDark )
@@ -707,36 +707,39 @@ void BackingWindow::layoutButton(
void BackingWindow::Paint( const Rectangle& )
{
+ Wallpaper aBack( GetSettings().GetStyleSettings().GetWorkspaceGradient() );
+ Region aClip( Rectangle( Point( 0, 0 ), GetOutputSizePixel() ) );
+ Rectangle aBmpRect(maControlRect);
+ aBmpRect.Left() -= nShadowLeft;
+ aBmpRect.Top() -= nShadowTop;
+ aBmpRect.Right() += nShadowRight;
+ aBmpRect.Bottom() += nShadowBottom;
+ aClip.Exclude( aBmpRect );
+ Push( PUSH_CLIPREGION );
+ IntersectClipRegion( aClip );
+ DrawWallpaper( Rectangle( Point( 0, 0 ), GetOutputSizePixel() ), aBack );
+ Pop();
+
+ VirtualDevice aDev( *this );
+ aDev.EnableRTL( IsRTLEnabled() );
+ aDev.SetOutputSizePixel( aBmpRect.GetSize() );
+ Point aOffset( Point( 0, 0 ) - aBmpRect.TopLeft() );
+ aDev.DrawWallpaper( Rectangle( aOffset, GetOutputSizePixel() ), aBack );
// draw bitmap
- if( GetSettings().GetLayoutRTL() )
+ Point aTL( 0, 0 );
+ aDev.DrawBitmapEx( aTL, maBackgroundLeft );
+ aTL.X() += maBackgroundLeft.GetSizePixel().Width();
+ if( !!maBackgroundMiddle )
{
- Point aTL( maControlRect.TopLeft() );
- aTL.X() -= nShadowRight;
- aTL.Y() -= nShadowTop;
- DrawBitmapEx( aTL, maBackgroundLeft );
- aTL.X() += maBackgroundLeft.GetSizePixel().Width();
- if( !!maBackgroundMiddle )
- {
- DrawBitmapEx( aTL, maBackgroundMiddle );
- aTL.X() += maBackgroundMiddle.GetSizePixel().Width();
- }
- DrawBitmapEx( aTL, maBackgroundRight );
- }
- else
- {
- Point aTL( maControlRect.TopLeft() );
- aTL.X() -= nShadowLeft;
- aTL.Y() -= nShadowTop;
- DrawBitmapEx( aTL, maBackgroundLeft );
- aTL.X() += maBackgroundLeft.GetSizePixel().Width();
- if( !!maBackgroundMiddle )
- {
- DrawBitmapEx( aTL, maBackgroundMiddle );
- aTL.X() += maBackgroundMiddle.GetSizePixel().Width();
- }
- DrawBitmapEx( aTL, maBackgroundRight );
+ aDev.DrawBitmapEx( aTL, maBackgroundMiddle );
+ aTL.X() += maBackgroundMiddle.GetSizePixel().Width();
}
+ aDev.DrawBitmapEx( aTL, maBackgroundRight );
+
+ DrawOutDev( aBmpRect.TopLeft(), aBmpRect.GetSize(),
+ Point( 0, 0 ), aBmpRect.GetSize(),
+ aDev );
}
long BackingWindow::Notify( NotifyEvent& rNEvt )
diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx
index 5fde74764eda..b66d21cfe81c 100644..100755
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -1176,12 +1176,12 @@ void SubstitutePathVariables::SetPredefinedPathVariables( PredefinedPathVariable
}
aState = utl::Bootstrap::locateUserData( sVal );
+ //There can be the valid case that there is no user installation. For example, "unopkg sync"
+ //is currently (OOo3.4) run as part of the setup. Then no user installation is required.
+ //Therefore we do not assert here.
if( aState == ::utl::Bootstrap::PATH_EXISTS ) {
aPreDefPathVariables.m_FixedVar[ PREDEFVAR_USERPATH ] = ConvertOSLtoUCBURL( sVal );
}
- else {
- LOG_ERROR( "SubstitutePathVariables::SetPredefinedPathVariables", "Bootstrap code has no value for userpath");
- }
// Set $(inst), $(instpath), $(insturl)
aPreDefPathVariables.m_FixedVar[ PREDEFVAR_INSTURL ] = aPreDefPathVariables.m_FixedVar[ PREDEFVAR_INSTPATH ];
diff --git a/graphite/makefile.mk b/graphite/makefile.mk
index f4434909bfe4..77cd1df94a4e 100644
--- a/graphite/makefile.mk
+++ b/graphite/makefile.mk
@@ -71,7 +71,7 @@ VCNUM=8
# make use of stlport headerfiles
EXT_USE_STLPORT=TRUE
BUILD_ACTION=nmake VERBOSE=1
-.IF "$(debug)"=="true"
+.IF "x$(debug)"!="x"
BUILD_FLAGS= "CFG=DEBUG"
CFLAGSWITHPATH= $(CFLAGS:s!-Fd.!-Fd../../../../../!)
.ELSE
@@ -90,7 +90,7 @@ BUILD_FLAGS+= "CFLAGS4MSC=$(CFLAGS4MSC)" /F makefile.vc$(VCNUM) lib_dll
.IF "$(COM)"=="GCC"
# Does linux want --disable-shared?
-.IF "$(debug)"=="true"
+.IF "x$(debug)"!="x"
GR_CONFIGURE_FLAGS= --enable-debug=yes --disable-final --enable-static --disable-shared
.ELSE
GR_CONFIGURE_FLAGS= --enable-final=yes --enable-static --disable-shared
@@ -123,7 +123,7 @@ BUILD_DIR=$(CONFIGURE_DIR)
.IF "$(OS)"=="WNT" && "$(COM)"!="GCC"
#OUT2LIB=win32$/bin.msvc$/*.lib
-.IF "$(debug)"=="true"
+.IF "x$(debug)"!="x"
OUT2LIB=engine$/debug$/*.lib
.ELSE
OUT2LIB=engine$/release$/*.lib
@@ -141,7 +141,7 @@ OUT2LIB+=src$/.libs$/libgraphite.*.dylib
.ELSE
.IF "$(OS)"=="WNT" && "$(COM)"!="GCC"
#OUT2LIB+=engine$/src$/.libs$/libgraphite*.dll
-.IF "$(debug)"=="true"
+.IF "x$(debug)"!="x"
OUT2BIN= \
# engine$/debug$/*.dll \
engine$/debug$/*.pdb
diff --git a/i18npool/source/paper/paper.cxx b/i18npool/source/paper/paper.cxx
index 0d9235747fd6..aaac0e83a4eb 100644
--- a/i18npool/source/paper/paper.cxx
+++ b/i18npool/source/paper/paper.cxx
@@ -159,7 +159,7 @@ static PageDesc aDinTab[] =
static const size_t nTabSize = sizeof(aDinTab) / sizeof(aDinTab[0]);
-#define MAXSLOPPY 11
+#define MAXSLOPPY 21
bool PaperInfo::doSloppyFit()
{
diff --git a/l10ntools/source/help/HelpCompiler.hxx b/l10ntools/source/help/HelpCompiler.hxx
index e300fe26f16d..8ce6098d21a9 100644..100755
--- a/l10ntools/source/help/HelpCompiler.hxx
+++ b/l10ntools/source/help/HelpCompiler.hxx
@@ -102,6 +102,14 @@ namespace fs
HCDBG(std::cerr << "native_file_string is " << tmp.getStr() << std::endl);
return std::string(tmp.getStr());
}
+#ifdef WNT
+ wchar_t const * native_file_string_w() const
+ {
+ ::rtl::OUString ustrSystemPath;
+ osl::File::getSystemPathFromFileURL(data, ustrSystemPath);
+ return ustrSystemPath.getStr();
+ }
+#endif
std::string native_directory_string() const { return native_file_string(); }
std::string toUTF8() const
{
diff --git a/l10ntools/source/help/HelpIndexerTool.java b/l10ntools/source/help/HelpIndexerTool.java
index a39b5399e38d..c20d9f108ced 100644
--- a/l10ntools/source/help/HelpIndexerTool.java
+++ b/l10ntools/source/help/HelpIndexerTool.java
@@ -45,6 +45,15 @@ import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Date;
+
+/**
+ When this tool is used with long path names on Windows, that is paths which start
+ with \\?\, then the caller must make sure that the path is unique. This is achieved
+ by removing '.' and '..' from the path. Paths which are created by
+ osl_getSystemPathFromFileURL fulfill this requirement. This is necessary because
+ lucene is patched to not use File.getCanonicalPath. See long_path.patch in the lucene
+ module.
+ */
public class HelpIndexerTool
{
public HelpIndexerTool()
diff --git a/l10ntools/source/help/HelpLinker.cxx b/l10ntools/source/help/HelpLinker.cxx
index 4e3a4cedbe6f..036208520ede 100644..100755
--- a/l10ntools/source/help/HelpLinker.cxx
+++ b/l10ntools/source/help/HelpLinker.cxx
@@ -118,7 +118,13 @@ void IndexerPreProcessor::processDocument
{
fs::path fsCaptionPureTextFile_docURL = m_fsCaptionFilesDirName / aStdStr_EncodedDocPathURL;
std::string aCaptionPureTextFileStr_docURL = fsCaptionPureTextFile_docURL.native_file_string();
- FILE* pFile_docURL = fopen( aCaptionPureTextFileStr_docURL.c_str(), "w" );
+#ifdef WNT //We need _wfopen to support long file paths on Windows XP
+ FILE* pFile_docURL = _wfopen(
+ fsCaptionPureTextFile_docURL.native_file_string_w(), L"w" );
+#else
+ FILE* pFile_docURL = fopen(
+ fsCaptionPureTextFile_docURL.native_file_string().c_str(), "w" );
+#endif
if( pFile_docURL )
{
fprintf( pFile_docURL, "%s\n", pResNodeCaption->content );
@@ -135,8 +141,13 @@ void IndexerPreProcessor::processDocument
if( pResNodeContent )
{
fs::path fsContentPureTextFile_docURL = m_fsContentFilesDirName / aStdStr_EncodedDocPathURL;
- std::string aContentPureTextFileStr_docURL = fsContentPureTextFile_docURL.native_file_string();
- FILE* pFile_docURL = fopen( aContentPureTextFileStr_docURL.c_str(), "w" );
+#ifdef WNT //We need _wfopen to support long file paths on Windows XP
+ FILE* pFile_docURL = _wfopen(
+ fsContentPureTextFile_docURL.native_file_string_w(), L"w" );
+#else
+ FILE* pFile_docURL = fopen(
+ fsContentPureTextFile_docURL.native_file_string().c_str(), "w" );
+#endif
if( pFile_docURL )
{
fprintf( pFile_docURL, "%s\n", pResNodeContent->content );
@@ -226,9 +237,13 @@ public:
}
}
- void dump_DBHelp( const std::string& rFileName )
+ void dump_DBHelp( const fs::path& rFileName )
{
- FILE* pFile = fopen( rFileName.c_str(), "wb" );
+#ifdef WNT //We need _wfopen to support long file paths on Windows XP
+ FILE* pFile = _wfopen( rFileName.native_file_string_w(), L"wb" );
+#else
+ FILE* pFile = fopen( rFileName.native_file_string().c_str(), "wb" );
+#endif
if( pFile == NULL )
return;
@@ -430,9 +445,15 @@ void HelpLinker::link() throw( HelpProcessingException )
#endif
fs::path helpTextFileName_DBHelp(indexDirParentName / (mod + (bUse_ ? ".ht_" : ".ht")));
+#ifdef WNT
+ //We need _wfopen to support long file paths on Windows XP
+ FILE* pFileHelpText_DBHelp = _wfopen
+ ( helpTextFileName_DBHelp.native_file_string_w(), L"wb" );
+#else
+
FILE* pFileHelpText_DBHelp = fopen
( helpTextFileName_DBHelp.native_file_string().c_str(), "wb" );
-
+#endif
DB* dbBase(0);
#ifndef DBHELP_ONLY
fs::path dbBaseFileName(indexDirParentName / (mod + ".db"));
@@ -442,8 +463,14 @@ void HelpLinker::link() throw( HelpProcessingException )
#endif
fs::path dbBaseFileName_DBHelp(indexDirParentName / (mod + (bUse_ ? ".db_" : ".db")));
+#ifdef WNT
+ //We need _wfopen to support long file paths on Windows XP
+ FILE* pFileDbBase_DBHelp = _wfopen
+ ( dbBaseFileName_DBHelp.native_file_string_w(), L"wb" );
+#else
FILE* pFileDbBase_DBHelp = fopen
( dbBaseFileName_DBHelp.native_file_string().c_str(), "wb" );
+#endif
#ifndef DBHELP_ONLY
DB* keyWord(0);
@@ -692,7 +719,7 @@ void HelpLinker::link() throw( HelpProcessingException )
if( pFileDbBase_DBHelp != NULL )
fclose( pFileDbBase_DBHelp );
- helpKeyword.dump_DBHelp( keyWordFileName_DBHelp.native_file_string() );
+ helpKeyword.dump_DBHelp( keyWordFileName_DBHelp);
if( !bExtensionMode )
{
diff --git a/libxml2/libxml2-long-path.patch b/libxml2/libxml2-long-path.patch
new file mode 100644
index 000000000000..bd888d99e183
--- /dev/null
+++ b/libxml2/libxml2-long-path.patch
@@ -0,0 +1,34 @@
+--- misc/libxml2-2.7.6/uri.c 2009-10-02 17:28:55.000000000 +0200
++++ misc/build/libxml2-2.7.6/uri.c 2011-02-24 13:47:19.349299000 +0100
+@@ -2479,7 +2479,16 @@
+ if (path == NULL)
+ return(NULL);
+
+- /* sanitize filename starting with // so it can be used as URI */
++#if defined(_WIN32)
++ //We must not change the backslashes to slashes if the the path starts with
++ // \\?\
++ //Those pathes can be up to 32k characters long.
++ len = xmlStrlen(path);
++ if ((len > 3) && (path[0] == '\\') && (path[1] == '\\') && (path[2] == '?') && (path[3] == '\\') )
++ return xmlStrdup((const xmlChar *) path);
++#endif
++
++ /* sanitize filename starting with // so it can be used as URI */
+ if ((path[0] == '/') && (path[1] == '/') && (path[2] != '/'))
+ path++;
+
+--- misc/libxml2-2.7.6/xmlIO.c 2009-09-24 17:32:00.000000000 +0200
++++ misc/build/libxml2-2.7.6/xmlIO.c 2011-02-24 13:47:26.163762000 +0100
+@@ -772,6 +772,11 @@
+
+ #ifdef HAVE_STAT
+ #if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
++ //On Windows stat and wstat do not work with long pathname,
++ //which start with '\\?\'
++ if ((xmlStrlen(path) > 3) && (path[0] == '\\') && (path[1] == '\\') && (path[2] == '?') && (path[3] == '\\') )
++ return 1;
++
+ if (xmlWrapStat(path, &stat_buffer) == -1)
+ return 0;
+ #else
diff --git a/libxml2/makefile.mk b/libxml2/makefile.mk
index 20a22e46fe0f..6fd231f72470 100644..100755
--- a/libxml2/makefile.mk
+++ b/libxml2/makefile.mk
@@ -54,6 +54,9 @@ PATCH_FILES=libxml2-configure.patch \
libxml2-xpath.patch \
libxml2-global-symbols.patch \
+.IF "$(OS)" == "WNT"
+PATCH_FILES+= libxml2-long-path.patch
+.ENDIF
# This is only for UNX environment now
diff --git a/lucene/long_path.patch b/lucene/long_path.patch
new file mode 100644
index 000000000000..d3ab8e3ddb91
--- /dev/null
+++ b/lucene/long_path.patch
@@ -0,0 +1,37 @@
+--- misc/lucene-2.3.2/src/java/org/apache/lucene/store/FSDirectory.java 2008-05-01 22:27:58.000000000 +0200
++++ misc/build/lucene-2.3.2/src/java/org/apache/lucene/store/FSDirectory.java 2011-02-23 16:36:26.249515000 +0100
+@@ -165,7 +165,15 @@
+ public static FSDirectory getDirectory(File file, LockFactory lockFactory)
+ throws IOException
+ {
+- file = new File(file.getCanonicalPath());
++ String path = file.getPath();
++ //File.getCanonicalPath fails on Windows with long path names
++ //Tested with Java SE 6u23
++ //Long path names created by osl_getSystemPathFromFileURL are already
++ //unique because its implementation replaces the occurrences of .. and .
++ //That is using the com.sun.star.help.HelpIndexer service from c++ is
++ //relatively safe.
++ if (!path.startsWith("\\\\?\\"))
++ file = new File(file.getCanonicalPath());
+
+ if (file.exists() && !file.isDirectory())
+ throw new IOException(file + " not a directory");
+@@ -455,7 +463,16 @@
+ public String getLockID() {
+ String dirName; // name to be hashed
+ try {
+- dirName = directory.getCanonicalPath();
++ //File.getCanonicalPath fails on Windows with long path names
++ //Tested with Java SE 6u23
++ //Long path names created by osl_getSystemPathFromFileURL are already
++ //unique because its implementation replaces the occurrences of .. and .
++ //That is using the com.sun.star.help.HelpIndexer service from c++ is
++ //relatively safe.
++ if (!directory.getPath().startsWith("\\\\?\\"))
++ dirName = directory.getCanonicalPath();
++ else
++ dirName = directory.getPath();
+ } catch (IOException e) {
+ throw new RuntimeException(e.toString(), e);
+ }
diff --git a/lucene/makefile.mk b/lucene/makefile.mk
index 3ce8f058c942..98fab3f9a363 100644
--- a/lucene/makefile.mk
+++ b/lucene/makefile.mk
@@ -50,7 +50,12 @@ LUCENE_ANALYZERS_JAR=lucene-analyzers-$(LUCENE_MAJOR).$(LUCENE_MINOR).jar
TARFILE_NAME=$(LUCENE_NAME)
TARFILE_MD5=48d8169acc35f97e05d8dcdfd45be7f2
-PATCH_FILES=lucene.patch
+PATCH_FILES=lucene.patch
+
+.IF "$(OS)" == "WNT"
+PATCH_FILES+= long_path.patch
+.ENDIF
+
BUILD_DIR=.
BUILD_ACTION= ${ANT} -buildfile .$/contrib$/analyzers$/build.xml
diff --git a/python/prj/d.lst b/python/prj/d.lst
index def1bb84a414..e5c4d5bcb273 100644
--- a/python/prj/d.lst
+++ b/python/prj/d.lst
@@ -3,9 +3,6 @@ mkdir: %_DEST%\lib%_EXT%\python\lib-old
mkdir: %_DEST%\lib%_EXT%\python\lib-tk
mkdir: %_DEST%\lib%_EXT%\python\site-packages
mkdir: %_DEST%\lib%_EXT%\python\encodings
-mkdir: %_DEST%\lib%_EXT%\python\test
-mkdir: %_DEST%\lib%_EXT%\python\test\output
-mkdir: %_DEST%\lib%_EXT%\python\test\data
mkdir: %_DEST%\lib%_EXT%\python\email
mkdir: %_DEST%\lib%_EXT%\python\email\mime
mkdir: %_DEST%\lib%_EXT%\python\compiler
@@ -38,9 +35,6 @@ mkdir: %_DEST%\lib%_EXT%\python\ctypes\macholib
..\%__SRC%\misc\build\Python-2.6.1\Lib\lib-old\* %_DEST%\lib%_EXT%\python\lib-old\*
..\%__SRC%\misc\build\Python-2.6.1\Lib\lib-tk\* %_DEST%\lib%_EXT%\python\lib-tk\*
..\%__SRC%\misc\build\Python-2.6.1\Lib\site-packages\* %_DEST%\lib%_EXT%\python\site-packages\*
-..\%__SRC%\misc\build\Python-2.6.1\Lib\test\* %_DEST%\lib%_EXT%\python\test\*
-..\%__SRC%\misc\build\Python-2.6.1\Lib\test\output\* %_DEST%\lib%_EXT%\python\test\output\*
-..\%__SRC%\misc\build\Python-2.6.1\Lib\test\data\* %_DEST%\lib%_EXT%\python\test\data\*
..\%__SRC%\misc\build\Python-2.6.1\Lib\encodings\* %_DEST%\lib%_EXT%\python\encodings\*
..\%__SRC%\misc\build\Python-2.6.1\Lib\email\* %_DEST%\lib%_EXT%\python\email\*
..\%__SRC%\misc\build\Python-2.6.1\Lib\email\mime\* %_DEST%\lib%_EXT%\python\email\mime\*
diff --git a/rsc/source/rscpp/cpp4.c b/rsc/source/rscpp/cpp4.c
index b8f90ab4f7ed..04d715f35351 100644
--- a/rsc/source/rscpp/cpp4.c
+++ b/rsc/source/rscpp/cpp4.c
@@ -629,7 +629,7 @@ void dumpparm(char* why)
nargs, parmp - parm, why);
for (i = 0; i < nargs; i++) {
fprintf( pCppOut, "parm[%d] (%d) = \"%s\"\n",
- i + 1, strlen(parlist[i]), parlist[i]);
+ i + 1, (int)strlen(parlist[i]), parlist[i]);
}
}
#endif
diff --git a/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx
index ac99601f5ce5..c89a350d6708 100644
--- a/sal/cppunittester/cppunittester.cxx
+++ b/sal/cppunittester/cppunittester.cxx
@@ -30,6 +30,20 @@
#include <cstdlib>
#include <iostream>
+#include <limits>
+#include <string>
+
+#include "cppunittester/protectorfactory.hxx"
+#include "osl/module.h"
+#include "osl/module.hxx"
+#include "osl/thread.h"
+#include "rtl/process.h"
+#include "rtl/string.h"
+#include "rtl/string.hxx"
+#include "rtl/textcvt.h"
+#include "rtl/ustring.hxx"
+#include "sal/main.h"
+#include "sal/types.h"
#include "preextstl.h"
#include "cppunit/CompilerOutputter.h"
@@ -40,25 +54,87 @@
#include "cppunit/plugin/PlugInManager.h"
#include "cppunit/portability/Stream.h"
#include "postextstl.h"
-#include "osl/thread.h"
-#include "rtl/process.h"
-#include "rtl/string.hxx"
-#include "rtl/ustring.hxx"
-#include "sal/main.h"
+
+namespace {
+
+void usageFailure() {
+ std::cerr
+ << ("Usage: cppunittester (--protector <shared-library-path>"
+ " <function-symbol>)* <shared-library-path>")
+ << std::endl;
+ std::exit(EXIT_FAILURE);
+}
+
+rtl::OUString getArgument(sal_Int32 index) {
+ rtl::OUString arg;
+ rtl_getAppCommandArg(index, &arg.pData);
+ return arg;
+}
+
+std::string convertLazy(rtl::OUString const & s16) {
+ rtl::OString s8(rtl::OUStringToOString(s16, osl_getThreadTextEncoding()));
+ return std::string(
+ s8.getStr(),
+ ((static_cast< sal_uInt32 >(s8.getLength())
+ > std::numeric_limits< std::string::size_type >::max())
+ ? std::numeric_limits< std::string::size_type >::max()
+ : static_cast< std::string::size_type >(s8.getLength())));
+}
+
+std::string convertStrict(rtl::OUString const & s16) {
+ rtl::OString s8;
+ if (!s16.convertToString(
+ &s8, osl_getThreadTextEncoding(),
+ (RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR
+ | RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR))
+ || (static_cast< sal_uInt32 >(s8.getLength())
+ > std::numeric_limits< std::string::size_type >::max()))
+ {
+ std::cerr
+ << "Failure converting argument from UTF-16 back to system encoding"
+ << std::endl;
+ std::exit(EXIT_FAILURE);
+ }
+ return std::string(
+ s8.getStr(), static_cast< std::string::size_type >(s8.getLength()));
+}
+
+}
SAL_IMPLEMENT_MAIN() {
- if (rtl_getAppCommandArgCount() != 1) {
- std::cerr << "Usage: cppunittester <shared-library-path>" << std::endl;
- return EXIT_FAILURE;
+ CppUnit::TestResult result;
+ sal_uInt32 index = 0;
+ for (; index < rtl_getAppCommandArgCount(); index += 3) {
+ if (!getArgument(index).equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("--protector")))
+ {
+ break;
+ }
+ if (rtl_getAppCommandArgCount() - index < 3) {
+ usageFailure();
+ }
+ rtl::OUString lib(getArgument(index + 1));
+ rtl::OUString sym(getArgument(index + 2));
+ oslGenericFunction fn = (new osl::Module(lib, SAL_LOADMODULE_GLOBAL))
+ ->getFunctionSymbol(sym);
+ CppUnit::Protector * p = fn == 0
+ ? 0
+ : (*reinterpret_cast< cppunittester::ProtectorFactory * >(fn))();
+ if (p == 0) {
+ std::cerr
+ << "Failure instantiating protector \"" << convertLazy(lib)
+ << "\", \"" << convertLazy(sym) << '"' << std::endl;
+ std::exit(EXIT_FAILURE);
+ }
+ result.pushProtector(p);
+ }
+ if (rtl_getAppCommandArgCount() - index != 1) {
+ usageFailure();
}
- rtl::OUString path;
- rtl_getAppCommandArg(0, &path.pData);
CppUnit::PlugInManager manager;
- manager.load(
- rtl::OUStringToOString(path, osl_getThreadTextEncoding()).getStr());
+ manager.load(convertStrict(getArgument(index)));
CppUnit::TestRunner runner;
runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest());
- CppUnit::TestResult result;
CppUnit::TestResultCollector collector;
result.addListener(&collector);
runner.run(result);
diff --git a/sal/inc/cppunittester/protectorfactory.hxx b/sal/inc/cppunittester/protectorfactory.hxx
new file mode 100644
index 000000000000..c309dbe8aa85
--- /dev/null
+++ b/sal/inc/cppunittester/protectorfactory.hxx
@@ -0,0 +1,45 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2011 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
+#ifndef INCLUDED_CPPUNITTESTER_PROTECTORFACTORY_HXX
+#define INCLUDED_CPPUNITTESTER_PROTECTORFACTORY_HXX
+
+#include "sal/config.h"
+
+#include "sal/types.h"
+
+namespace CppUnit { class Protector; }
+
+namespace cppunittester {
+
+// The type of CppUnit::Protector factory functions that can be plugged into
+// cppunittester:
+extern "C" typedef CppUnit::Protector * SAL_CALL ProtectorFactory();
+
+}
+
+#endif
diff --git a/sal/osl/os2/diagnose.c b/sal/osl/os2/diagnose.c
index b105e0b78c29..b412a65ff090 100644
--- a/sal/osl/os2/diagnose.c
+++ b/sal/osl/os2/diagnose.c
@@ -124,7 +124,8 @@ sal_Bool SAL_CALL osl_assertFailedLine( const sal_Char* pszFileName, sal_Int32 n
fputs(szMessage, stderr);
- return sal_True; /* abort */
+ char const * env = getenv( "SAL_DIAGNOSE_ABORT" );
+ return ( ( env != NULL ) && ( *env != '\0' ) );
}
/*----------------------------------------------------------------------------*/
diff --git a/sal/osl/unx/diagnose.c b/sal/osl/unx/diagnose.c
index 02967b3ad7f7..5d9a4f31a40e 100644
--- a/sal/osl/unx/diagnose.c
+++ b/sal/osl/unx/diagnose.c
@@ -218,6 +218,11 @@ sal_Bool SAL_CALL osl_assertFailedLine (
oslDebugMessageFunc f = g_pDebugMessageFunc;
char szMessage[1024];
+ // after reporting the assertion, abort if told so by SAL_DIAGNOSE_ABORT, but *not* if
+ // assertions are routed to some external instance
+ char const * env = getenv( "SAL_DIAGNOSE_ABORT" );
+ sal_Bool const doAbort = ( ( env != NULL ) && ( *env != '\0' ) && ( f == NULL ) );
+
/* If there's a callback for detailed messages, use it */
if ( g_pDetailedDebugMessageFunc != NULL )
{
@@ -227,7 +232,7 @@ sal_Bool SAL_CALL osl_assertFailedLine (
/* if SAL assertions are disabled in general, stop here */
if ( getenv("DISABLE_SAL_DBGBOX") )
- return sal_False;
+ return doAbort;
/* format message into buffer */
if (pszMessage != 0)
@@ -252,9 +257,10 @@ sal_Bool SAL_CALL osl_assertFailedLine (
/* output backtrace */
osl_diagnose_backtrace_Impl(f);
- /* release lock and leave, w/o calling osl_breakDebug() */
+ /* release lock and leave */
pthread_mutex_unlock(&g_mutex);
- return sal_False;
+
+ return doAbort;
}
/************************************************************************/
@@ -262,7 +268,7 @@ sal_Bool SAL_CALL osl_assertFailedLine (
/************************************************************************/
void SAL_CALL osl_breakDebug()
{
- exit(0);
+ abort();
}
/************************************************************************/
diff --git a/sal/osl/w32/diagnose.c b/sal/osl/w32/diagnose.c
index 9c75e4502743..1feab6ded8da 100755
--- a/sal/osl/w32/diagnose.c
+++ b/sal/osl/w32/diagnose.c
@@ -93,6 +93,7 @@ sal_Bool SAL_CALL osl_assertFailedLine(const sal_Char* pszFileName, sal_Int32 nL
/* get app name or NULL if unknown (don't call assert) */
LPCSTR lpszAppName = "Error";
sal_Char szMessage[512];
+ char const * env = getenv( "SAL_DIAGNOSE_ABORT" );
/* format message into buffer */
szMessage[sizeof(szMessage)-1] = '\0'; /* zero terminate always */
@@ -105,39 +106,44 @@ sal_Bool SAL_CALL osl_assertFailedLine(const sal_Char* pszFileName, sal_Int32 nL
_pPrintDetailedDebugMessage( pszFileName, nLine, pszMessage );
else if ( _pPrintDebugMessage )
_pPrintDebugMessage( szMessage );
- else if ( !getenv( "DISABLE_SAL_DBGBOX" ) )
+ else
{
- TCHAR szBoxMessage[1024];
+ if ( !getenv( "DISABLE_SAL_DBGBOX" ) )
+ {
+ TCHAR szBoxMessage[1024];
- /* active popup window for the current thread */
- hWndParent = GetActiveWindow();
- if (hWndParent != NULL)
- hWndParent = GetLastActivePopup(hWndParent);
+ /* active popup window for the current thread */
+ hWndParent = GetActiveWindow();
+ if (hWndParent != NULL)
+ hWndParent = GetLastActivePopup(hWndParent);
- /* set message box flags */
- nFlags = MB_TASKMODAL | MB_ICONWARNING | MB_YESNOCANCEL | MB_DEFBUTTON2 | MB_SETFOREGROUND;
- if (hWndParent == NULL)
- nFlags |= MB_SERVICE_NOTIFICATION;
+ /* set message box flags */
+ nFlags = MB_TASKMODAL | MB_ICONWARNING | MB_YESNOCANCEL | MB_DEFBUTTON2 | MB_SETFOREGROUND;
+ if (hWndParent == NULL)
+ nFlags |= MB_SERVICE_NOTIFICATION;
- /* display the assert */
+ /* display the assert */
- szBoxMessage[sizeof(szBoxMessage)-1] = 0;
- _snprintf(szBoxMessage, sizeof(szBoxMessage)-1, "%s\n( Yes=Abort / No=Ignore / Cancel=Debugger )",
- szMessage);
+ szBoxMessage[sizeof(szBoxMessage)-1] = 0;
+ _snprintf(szBoxMessage, sizeof(szBoxMessage)-1, "%s\n( Yes=Abort / No=Ignore / Cancel=Debugger )",
+ szMessage);
- nCode = MessageBox(hWndParent, szBoxMessage, "Assertion Failed!", nFlags);
+ nCode = MessageBox(hWndParent, szBoxMessage, "Assertion Failed!", nFlags);
- if (nCode == IDYES)
- FatalExit(-1);
+ if (nCode == IDYES)
+ FatalExit(-1);
- if (nCode == IDNO)
- return sal_False; /* ignore */
+ if (nCode == IDNO)
+ return sal_False; /* ignore */
- if (nCode == IDCANCEL)
- return sal_True; /* will cause oslDebugBreak */
+ if (nCode == IDCANCEL)
+ return sal_True; /* will cause oslDebugBreak */
+ }
+ return ( ( env != NULL ) && ( *env != '\0' ) );
}
+
+ return sal_False;
#endif /* NO_DEBUG_CRT */
- return sal_False; /* not shure, not care */
}
sal_Int32 SAL_CALL osl_reportError(sal_uInt32 nType, const sal_Char* pszMessage)
diff --git a/sal/osl/w32/file_dirvol.cxx b/sal/osl/w32/file_dirvol.cxx
index 09bdec7988c3..549f42861f94 100644
--- a/sal/osl/w32/file_dirvol.cxx
+++ b/sal/osl/w32/file_dirvol.cxx
@@ -155,7 +155,7 @@ namespace /* private */
void parse_UNC_path(const sal_Unicode* path, UNCComponents* puncc)
{
OSL_PRECOND(is_UNC_path(path), "Precondition violated: No UNC path");
- OSL_PRECOND(rtl_ustr_indexOfChar(path, SLASH) != -1, "Path must not contain slashes");
+ OSL_PRECOND(rtl_ustr_indexOfChar(path, SLASH) == -1, "Path must not contain slashes");
const sal_Unicode* pend = path + rtl_ustr_getLength(path);
const sal_Unicode* ppos = path + 2;
@@ -691,7 +691,7 @@ static int path_make_parent(sal_Unicode* path)
If there are no more parents 0 will be returned,
e.g. 'c:\' or '\\Share' have no more parents */
- OSL_PRECOND(rtl_ustr_indexOfChar(path, SLASH) != -1, "Path must not contain slashes");
+ OSL_PRECOND(rtl_ustr_indexOfChar(path, SLASH) == -1, "Path must not contain slashes");
OSL_PRECOND(has_path_parent(path), "Path must have a parent");
sal_Unicode* pos_last_backslash = path + rtl_ustr_lastIndexOfChar(path, BACKSLASH);
diff --git a/sal/osl/w32/module.cxx b/sal/osl/w32/module.cxx
index b730bd3347df..65a17eb1352d 100644..100755
--- a/sal/osl/w32/module.cxx
+++ b/sal/osl/w32/module.cxx
@@ -36,6 +36,7 @@
#include <osl/thread.h>
#include <osl/file.h>
#include <rtl/logfile.h>
+#include <vector>
/*
under WIN32, we use the void* oslModule
@@ -65,10 +66,32 @@ oslModule SAL_CALL osl_loadModule(rtl_uString *strModuleName, sal_Int32 nRtldMod
rtl_uString_assign(&Module, strModuleName);
hInstance = LoadLibraryW(reinterpret_cast<LPCWSTR>(Module->buffer));
+
if (hInstance == NULL)
hInstance = LoadLibraryExW(reinterpret_cast<LPCWSTR>(Module->buffer), NULL,
LOAD_WITH_ALTERED_SEARCH_PATH);
+ //In case of long path names (\\?\c:\...) try to shorten the filename.
+ //LoadLibrary cannot handle file names which exceed 260 letters.
+ //In case the path is to long, the function will fail. However, the error
+ //code can be different. For example, it returned ERROR_FILENAME_EXCED_RANGE
+ //on Windows XP and ERROR_INSUFFICIENT_BUFFER on Windows 7 (64bit)
+ if (hInstance == NULL && Module->length > 260)
+ {
+ std::vector<sal_Unicode, rtl::Allocator<sal_Unicode> > vec(Module->length + 1);
+ DWORD len = GetShortPathNameW(reinterpret_cast<LPCWSTR>(Module->buffer),
+ &vec[0], Module->length + 1);
+ if (len )
+ {
+ hInstance = LoadLibraryW(&vec[0]);
+
+ if (hInstance == NULL)
+ hInstance = LoadLibraryExW(&vec[0], NULL,
+ LOAD_WITH_ALTERED_SEARCH_PATH);
+ }
+ }
+
+
if (hInstance <= (HINSTANCE)HINSTANCE_ERROR)
hInstance = 0;
diff --git a/sal/osl/w32/procimpl.cxx b/sal/osl/w32/procimpl.cxx
index fc04d5b84a8f..a2f86422df2a 100644..100755
--- a/sal/osl/w32/procimpl.cxx
+++ b/sal/osl/w32/procimpl.cxx
@@ -300,6 +300,39 @@ namespace /* private */
return quoted.makeStringAndClear();
}
+ //The parameter path must be a system path. If it is longer than 260 characters
+ //then it is shortened using the GetShortPathName function. This function only
+ //works if the path exists. Because "path" can be the path to an executable, it
+ //may not have the file extension ".exe". However, if the file on disk has the
+ //".exe" extension, then the function will fail. In this case a second attempt
+ //is started by adding the parameter "extension" to "path".
+ rtl::OUString getShortPath(rtl::OUString const & path, rtl::OUString const & extension)
+ {
+ rtl::OUString ret(path);
+ if (path.getLength() > 260)
+ {
+ std::vector<sal_Unicode, rtl::Allocator<sal_Unicode> > vec(path.getLength() + 1);
+ //GetShortPathNameW only works if the file can be found!
+ const DWORD len = GetShortPathNameW(
+ path.getStr(), &vec[0], path.getLength() + 1);
+
+ if (!len && GetLastError() == ERROR_FILE_NOT_FOUND
+ && extension.getLength())
+ {
+ const rtl::OUString extPath(path + extension);
+ std::vector<sal_Unicode, rtl::Allocator<sal_Unicode> > vec2(
+ extPath.getLength() + 1);
+ const DWORD len2 = GetShortPathNameW(
+ extPath.getStr(), &vec2[0], extPath.getLength() + 1);
+ ret = rtl::OUString(&vec2[0], len2);
+ }
+ else
+ {
+ ret = rtl::OUString(&vec[0], len);
+ }
+ }
+ return ret;
+ }
//##########################################################
// Returns the system path of the executable which can either
// be provided via the strImageName parameter or as first
@@ -326,6 +359,8 @@ namespace /* private */
if (osl_File_E_None != osl::FileBase::getSystemPathFromFileURL(exe_url, exe_path))
return rtl::OUString();
+ exe_path = getShortPath(exe_path, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".exe")));
+
if (exe_path.indexOf(' ') != -1)
exe_path = quote_string(exe_path);
diff --git a/sal/prj/d.lst b/sal/prj/d.lst
index 3ce270bbbfc4..253d7ea7f718 100644
--- a/sal/prj/d.lst
+++ b/sal/prj/d.lst
@@ -1,9 +1,11 @@
+mkdir: %_DEST%\inc%_EXT%\cppunittester
mkdir: %_DEST%\inc%_EXT%\sal
mkdir: %_DEST%\inc%_EXT%\osl
mkdir: %_DEST%\inc%_EXT%\rtl
mkdir: %_DEST%\inc%_EXT%\systools
mkdir: %_DEST%\inc%_EXT%\systools\win32
+..\inc\cppunittester\protectorfactory.hxx %_DEST%\inc%_EXT%\protectorfactory.hxx
..\%__SRC%\inc\rtlbootstrap.mk %_DEST%\inc%_EXT%\rtlbootstrap.mk
..\inc\sal\*.h %_DEST%\inc%_EXT%\sal\*.h
..\%__SRC%\inc\sal\typesizes.h %_DEST%\inc%_EXT%\sal\typesizes.h
diff --git a/sc/inc/chart2uno.hxx b/sc/inc/chart2uno.hxx
index 44737e711090..8ff1b0e9bd73 100644
--- a/sc/inc/chart2uno.hxx
+++ b/sc/inc/chart2uno.hxx
@@ -241,70 +241,6 @@ private:
};
-// LabeledDataSequence =======================================================
-
-class ScChart2LabeledDataSequence : public
- ::cppu::WeakImplHelper4<
- ::com::sun::star::chart2::data::XLabeledDataSequence,
- ::com::sun::star::util::XCloneable,
- ::com::sun::star::util::XModifyBroadcaster,
- ::com::sun::star::lang::XServiceInfo >,
- SfxListener
-{
-public:
-
- explicit ScChart2LabeledDataSequence( ScDocument* pDoc );
- virtual ~ScChart2LabeledDataSequence();
-
- // SfxListener -----------------------------------------------------------
-
- virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
-
- // XLabeledDataSequence --------------------------------------------------
-
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > SAL_CALL getValues()
- throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setValues(
- const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >& xSequence )
- throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > SAL_CALL getLabel()
- throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setLabel(
- const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >& xSequence )
- throw (::com::sun::star::uno::RuntimeException);
-
- // XCloneable ------------------------------------------------------------
-
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone()
- throw (::com::sun::star::uno::RuntimeException);
-
- // XModifyBroadcaster ----------------------------------------------------
-
- virtual void SAL_CALL addModifyListener(
- const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
- throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeModifyListener(
- const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
- throw (::com::sun::star::uno::RuntimeException);
-
- // XServiceInfo ----------------------------------------------------------
-
- virtual ::rtl::OUString SAL_CALL getImplementationName() throw(
- ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString&
- rServiceName) throw( ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
- getSupportedServiceNames() throw(
- ::com::sun::star::uno::RuntimeException);
-
-private:
- ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::data::XDataSequence > m_aData;
- ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::data::XDataSequence > m_aLabel;
- ScDocument* m_pDocument;
-};
-
// DataSequence ==============================================================
class ScChart2DataSequence : public
diff --git a/sc/source/core/tool/charthelper.cxx b/sc/source/core/tool/charthelper.cxx
index a2db16dff690..64b2a7776bb5 100644
--- a/sc/source/core/tool/charthelper.cxx
+++ b/sc/source/core/tool/charthelper.cxx
@@ -309,6 +309,7 @@ void ScChartHelper::AddRangesIfProtectedChart( ScRangeListVector& rRangesVector,
if ( xEmbeddedObj.is() )
{
bool bDisableDataTableDialog = false;
+ sal_Int32 nOldState = xEmbeddedObj->getCurrentState();
svt::EmbeddedObjectRef::TryRunningState( xEmbeddedObj );
uno::Reference< beans::XPropertySet > xProps( xEmbeddedObj->getComponent(), uno::UNO_QUERY );
if ( xProps.is() &&
@@ -333,6 +334,10 @@ void ScChartHelper::AddRangesIfProtectedChart( ScRangeListVector& rRangesVector,
}
}
}
+ if ( xEmbeddedObj->getCurrentState() != nOldState )
+ {
+ xEmbeddedObj->changeState( nOldState );
+ }
}
}
}
diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx
index a7d0150ee220..07f2462041d4 100644
--- a/sc/source/filter/starcalc/scflt.cxx
+++ b/sc/source/filter/starcalc/scflt.cxx
@@ -414,7 +414,10 @@ Sc10FontData::Sc10FontData(SvStream& rStream)
rStream >> PitchAndFamily;
sal_uInt16 nLen;
rStream >> nLen;
- rStream.Read(FaceName, nLen);
+ if (nLen < sizeof(FaceName))
+ rStream.Read(FaceName, nLen);
+ else
+ rStream.SetError(ERRCODE_IO_WRONGFORMAT);
}
@@ -452,10 +455,14 @@ Sc10NameData::Sc10NameData(SvStream& rStream)
sal_uInt8 nLen;
rStream >> nLen;
rStream.Read(Name, sizeof(Name) - 1);
+ if (nLen >= sizeof(Name))
+ nLen = sizeof(Name) - 1;
Name[nLen] = 0;
rStream >> nLen;
rStream.Read(Reference, sizeof(Reference) - 1);
+ if (nLen >= sizeof(Reference))
+ nLen = sizeof(Reference) - 1;
Reference[nLen] = 0;
rStream.Read(Reserved, sizeof(Reserved));
}
@@ -1452,6 +1459,8 @@ void Sc10Import::LoadTables()
sal_uInt8 nLen;
rStream >> nLen;
rStream.Read(TabName, sizeof(TabName) - 1);
+ if (nLen >= sizeof(TabName))
+ nLen = sizeof(TabName) - 1;
TabName[nLen] = 0;
//----------------------------------------------------------
@@ -1684,7 +1693,7 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab)
{
/*double Value =*/ ScfTools::ReadLongDouble(rStream);
sal_uInt8 Len;
- sal_Char s[256];
+ sal_Char s[256+1];
//rStream.Read(&Value, sizeof(Value));
rStream >> Len;
rStream.Read(&s[1], Len);
diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx
index 80a8d46de9da..368a27b4bd5d 100644
--- a/sc/source/ui/drawfunc/fusel.cxx
+++ b/sc/source/ui/drawfunc/fusel.cxx
@@ -56,6 +56,7 @@
#include "drwlayer.hxx"
#include "userdat.hxx"
#include "scmod.hxx"
+#include "client.hxx"
#include "charthelper.hxx"
#include "docuno.hxx"
#include "docsh.hxx"
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index aad45058de2c..3e6a7eb6085a 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -395,6 +395,8 @@ public:
void UpdateDPFromFieldPopupMenu();
+ void UpdateVisibleRange();
+
// #114409#
void CursorChanged();
void DrawLayerCreated();
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index 9c3327805a88..09861e778826 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -194,6 +194,8 @@ private:
void UpdateVarZoom();
+ void UpdateVisibleRange();
+
static void SetScrollBar( ScrollBar& rScroll, long nRangeMax, long nVisible, long nPos, sal_Bool bLayoutRTL );
static long GetScrollBarPos( ScrollBar& rScroll, sal_Bool bLayoutRTL );
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 835959e68e3d..edc47f6c7a58 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -53,6 +53,7 @@
#include <com/sun/star/table/CellAddress.hpp>
#include <com/sun/star/text/XText.hpp>
#include <comphelper/extract.hxx>
+#include <comphelper/processfactory.hxx>
#include <vector>
#include <list>
@@ -62,8 +63,6 @@ SC_SIMPLE_SERVICE_INFO( ScChart2DataProvider, "ScChart2DataProvider",
"com.sun.star.chart2.data.DataProvider")
SC_SIMPLE_SERVICE_INFO( ScChart2DataSource, "ScChart2DataSource",
"com.sun.star.chart2.data.DataSource")
-SC_SIMPLE_SERVICE_INFO( ScChart2LabeledDataSequence, "ScChart2LabeledDataSequence",
- "com.sun.star.chart2.data.LabeledDataSequence")
SC_SIMPLE_SERVICE_INFO( ScChart2DataSequence, "ScChart2DataSequence",
"com.sun.star.chart2.data.DataSequence")
#if USE_CHART2_EMPTYDATASEQUENCE
@@ -1051,27 +1050,40 @@ void ScChart2DataProvider::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint
namespace
{
-ScChart2LabeledDataSequence* lcl_createScChart2DataSequenceFromTokens( auto_ptr< vector<ScSharedTokenRef> > pValueTokens, auto_ptr< vector<ScSharedTokenRef> > pLabelTokens,
- ScDocument* pDoc, const uno::Reference < chart2::data::XDataProvider >& xDP, bool bIncludeHiddenCells )
+Reference< chart2::data::XLabeledDataSequence > lcl_createLabeledDataSequenceFromTokens(
+ auto_ptr< vector< ScSharedTokenRef > > pValueTokens, auto_ptr< vector< ScSharedTokenRef > > pLabelTokens,
+ ScDocument* pDoc, const Reference< chart2::data::XDataProvider >& xDP, bool bIncludeHiddenCells )
{
- ScChart2LabeledDataSequence* pRet = 0;
+ Reference< chart2::data::XLabeledDataSequence > xResult;
bool bHasValues = pValueTokens.get() && !pValueTokens->empty();
bool bHasLabel = pLabelTokens.get() && !pLabelTokens->empty();
if( bHasValues || bHasLabel )
{
- pRet = new ScChart2LabeledDataSequence(pDoc);
- if(bHasValues)
+ try
{
- uno::Reference < chart2::data::XDataSequence > xSeq(new ScChart2DataSequence(pDoc, xDP, pValueTokens.release(), bIncludeHiddenCells));
- pRet->setValues(xSeq);
+ Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
+ if ( xContext.is() )
+ {
+ xResult.set( xContext->getServiceManager()->createInstanceWithContext(
+ ::rtl::OUString::createFromAscii( "com.sun.star.chart2.data.LabeledDataSequence" ),
+ xContext ), uno::UNO_QUERY_THROW );
+ }
+ if ( bHasValues )
+ {
+ Reference< chart2::data::XDataSequence > xSeq( new ScChart2DataSequence( pDoc, xDP, pValueTokens.release(), bIncludeHiddenCells ) );
+ xResult->setValues( xSeq );
+ }
+ if ( bHasLabel )
+ {
+ Reference< chart2::data::XDataSequence > xLabelSeq( new ScChart2DataSequence( pDoc, xDP, pLabelTokens.release(), bIncludeHiddenCells ) );
+ xResult->setLabel( xLabelSeq );
+ }
}
- if(bHasLabel)
+ catch( const uno::Exception& )
{
- uno::Reference < chart2::data::XDataSequence > xLabelSeq(new ScChart2DataSequence(pDoc, xDP, pLabelTokens.release(), bIncludeHiddenCells));
- pRet->setLabel(xLabelSeq);
}
}
- return pRet;
+ return xResult;
}
//----------------------------------------------------
@@ -1474,7 +1486,7 @@ ScChart2DataProvider::createDataSource(
return xResult;
ScChart2DataSource* pDS = NULL;
- std::list < ScChart2LabeledDataSequence* > aSeqs;
+ ::std::list< Reference< chart2::data::XLabeledDataSequence > > aSeqs;
// Fill Categories
if( bCategories )
@@ -1488,9 +1500,12 @@ ScChart2DataProvider::createDataSource(
auto_ptr< vector<ScSharedTokenRef> > pLabelTokens(NULL);
pLabelTokens.reset(pChartMap->getLeftUpperCornerRanges());
- ScChart2LabeledDataSequence* pCategories = lcl_createScChart2DataSequenceFromTokens( pValueTokens, pLabelTokens, m_pDocument, this, m_bIncludeHiddenCells );//ownership of pointers is transfered!
- if( pCategories )
- aSeqs.push_back(pCategories);
+ Reference< chart2::data::XLabeledDataSequence > xCategories = lcl_createLabeledDataSequenceFromTokens(
+ pValueTokens, pLabelTokens, m_pDocument, this, m_bIncludeHiddenCells ); //ownership of pointers is transfered!
+ if ( xCategories.is() )
+ {
+ aSeqs.push_back( xCategories );
+ }
}
// Fill Serieses (values and label)
@@ -1509,42 +1524,47 @@ ScChart2DataProvider::createDataSource(
pValueTokens.reset(pChartMap->getDataRowRanges(static_cast<SCROW>(i)));
pLabelTokens.reset(pChartMap->getRowHeaderRanges(static_cast<SCROW>(i)));
}
- ScChart2LabeledDataSequence* pChartSeries = lcl_createScChart2DataSequenceFromTokens( pValueTokens, pLabelTokens, m_pDocument, this, m_bIncludeHiddenCells ); //ownership of pointers is transfered!
- if( pChartSeries )
- aSeqs.push_back(pChartSeries);
+ Reference< chart2::data::XLabeledDataSequence > xChartSeries = lcl_createLabeledDataSequenceFromTokens(
+ pValueTokens, pLabelTokens, m_pDocument, this, m_bIncludeHiddenCells ); //ownership of pointers is transfered!
+ if ( xChartSeries.is() )
+ {
+ aSeqs.push_back( xChartSeries );
+ }
}
pDS = new ScChart2DataSource(m_pDocument);
- std::list < ScChart2LabeledDataSequence* >::iterator aItr(aSeqs.begin());
- std::list < ScChart2LabeledDataSequence* >::iterator aEndItr(aSeqs.end());
+ ::std::list< Reference< chart2::data::XLabeledDataSequence > >::iterator aItr( aSeqs.begin() );
+ ::std::list< Reference< chart2::data::XLabeledDataSequence > >::iterator aEndItr( aSeqs.end() );
//reorder labeled sequences according to aSequenceMapping
- std::vector< ScChart2LabeledDataSequence* > aSeqVector;
+ ::std::vector< Reference< chart2::data::XLabeledDataSequence > > aSeqVector;
while(aItr != aEndItr)
{
aSeqVector.push_back(*aItr);
++aItr;
}
- std::map< sal_Int32, ScChart2LabeledDataSequence* > aSequenceMap;
+ ::std::map< sal_Int32, Reference< chart2::data::XLabeledDataSequence > > aSequenceMap;
for( sal_Int32 nNewIndex = 0; nNewIndex < aSequenceMapping.getLength(); nNewIndex++ )
{
// note: assuming that the values in the sequence mapping are always non-negative
- std::vector< ScChart2LabeledDataSequence* >::size_type nOldIndex( static_cast< sal_uInt32 >( aSequenceMapping[nNewIndex] ));
+ ::std::vector< Reference< chart2::data::XLabeledDataSequence > >::size_type nOldIndex( static_cast< sal_uInt32 >( aSequenceMapping[nNewIndex] ) );
if( nOldIndex < aSeqVector.size() )
{
pDS->AddLabeledSequence( aSeqVector[nOldIndex] );
aSeqVector[nOldIndex] = 0;
}
-
}
- std::vector< ScChart2LabeledDataSequence* >::iterator aVectorItr(aSeqVector.begin());
- std::vector< ScChart2LabeledDataSequence* >::iterator aVectorEndItr(aSeqVector.end());
+ ::std::vector< Reference< chart2::data::XLabeledDataSequence > >::iterator aVectorItr( aSeqVector.begin() );
+ ::std::vector< Reference< chart2::data::XLabeledDataSequence > >::iterator aVectorEndItr( aSeqVector.end() );
while(aVectorItr != aVectorEndItr)
{
- if(*aVectorItr)
- pDS->AddLabeledSequence(*aVectorItr);
+ Reference< chart2::data::XLabeledDataSequence > xSeq( *aVectorItr );
+ if ( xSeq.is() )
+ {
+ pDS->AddLabeledSequence( xSeq );
+ }
++aVectorItr;
}
@@ -2321,114 +2341,6 @@ void ScChart2DataSource::AddLabeledSequence(const uno::Reference < chart2::data:
m_aLabeledSequences.push_back(xNew);
}
-// LabeledDataSequence =======================================================
-
-ScChart2LabeledDataSequence::ScChart2LabeledDataSequence(
- ScDocument* pDoc ) :
- m_pDocument( pDoc )
-{
- if ( m_pDocument )
- m_pDocument->AddUnoObject( *this);
-}
-
-ScChart2LabeledDataSequence::~ScChart2LabeledDataSequence()
-{
- if ( m_pDocument )
- m_pDocument->RemoveUnoObject( *this);
-}
-
-// SfxListener -----------------------------------------------------------
-
-void ScChart2LabeledDataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint)
-{
- if ( rHint.ISA( SfxSimpleHint ) &&
- ((const SfxSimpleHint&)rHint).GetId() == SFX_HINT_DYING )
- {
- ScUnoGuard aGuard;
- m_pDocument = NULL;
- }
-}
-
-// XLabeledDataSequence --------------------------------------------------
-
-uno::Reference< chart2::data::XDataSequence > SAL_CALL ScChart2LabeledDataSequence::getValues()
- throw (uno::RuntimeException)
-{
- ScUnoGuard aGuard;
- return m_aData;
-}
-
-void SAL_CALL ScChart2LabeledDataSequence::setValues(
- const uno::Reference< chart2::data::XDataSequence >& xSequence )
- throw (uno::RuntimeException)
-{
- ScUnoGuard aGuard;
- m_aData = xSequence;
-}
-
-uno::Reference< chart2::data::XDataSequence > SAL_CALL ScChart2LabeledDataSequence::getLabel()
- throw (uno::RuntimeException)
-{
- ScUnoGuard aGuard;
- return m_aLabel;
-}
-
-void SAL_CALL ScChart2LabeledDataSequence::setLabel(
- const uno::Reference< chart2::data::XDataSequence >& xSequence )
- throw (uno::RuntimeException)
-{
- ScUnoGuard aGuard;
- m_aLabel = xSequence;
-}
-
-// XCloneable ================================================================
-
-uno::Reference< util::XCloneable > SAL_CALL ScChart2LabeledDataSequence::createClone()
- throw (uno::RuntimeException)
-{
- ScUnoGuard aGuard;
- uno::Reference< util::XCloneable > xToClone(m_aData, uno::UNO_QUERY);
- if (xToClone.is())
- {
- ScChart2LabeledDataSequence* pRet = new ScChart2LabeledDataSequence(m_pDocument);
- uno::Reference< chart2::data::XDataSequence > xSequence(xToClone->createClone(), uno::UNO_QUERY);
- pRet->setValues(xSequence);
- xToClone.set(m_aLabel, uno::UNO_QUERY);
- if(xToClone.is())
- {
- xSequence.set(xToClone->createClone(), uno::UNO_QUERY);
- pRet->setLabel(xSequence);
- }
- return pRet;
- }
- return NULL;
-}
-
-// XModifyBroadcaster ========================================================
-
-void SAL_CALL ScChart2LabeledDataSequence::addModifyListener( const uno::Reference< util::XModifyListener >& aListener )
- throw (uno::RuntimeException)
-{
- // quick'n dirty: just add the listener to each DataSequence
-
- uno::Reference<util::XModifyBroadcaster> xDataBroadcaster( m_aData, uno::UNO_QUERY );
- if ( xDataBroadcaster.is() )
- xDataBroadcaster->addModifyListener( aListener );
- uno::Reference<util::XModifyBroadcaster> xLabelBroadcaster( m_aLabel, uno::UNO_QUERY );
- if ( xLabelBroadcaster.is() )
- xLabelBroadcaster->addModifyListener( aListener );
-}
-
-void SAL_CALL ScChart2LabeledDataSequence::removeModifyListener( const uno::Reference< util::XModifyListener >& aListener )
- throw (uno::RuntimeException)
-{
- uno::Reference<util::XModifyBroadcaster> xDataBroadcaster( m_aData, uno::UNO_QUERY );
- if ( xDataBroadcaster.is() )
- xDataBroadcaster->removeModifyListener( aListener );
- uno::Reference<util::XModifyBroadcaster> xLabelBroadcaster( m_aLabel, uno::UNO_QUERY );
- if ( xLabelBroadcaster.is() )
- xLabelBroadcaster->removeModifyListener( aListener );
-}
// DataSequence ==============================================================
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index d350da754433..335f5ad14490 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -5100,6 +5100,26 @@ sal_Bool ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScen
return sal_False;
}
+void ScGridWindow::UpdateVisibleRange()
+{
+ // #163911# Update the visible range outside of paint (called when switching sheets).
+ // Use the same logic here as in ScGridWindow::Draw.
+
+ SCCOL nPosX = pViewData->GetPosX( eHWhich );
+ SCROW nPosY = pViewData->GetPosY( eVWhich );
+
+ SCCOL nXRight = nPosX + pViewData->VisibleCellsX(eHWhich);
+ if (nXRight > MAXCOL) nXRight = MAXCOL;
+ SCROW nYBottom = nPosY + pViewData->VisibleCellsY(eVWhich);
+ if (nYBottom > MAXROW) nYBottom = MAXROW;
+
+ // Store the current visible range.
+ maVisibleRange.mnCol1 = nPosX;
+ maVisibleRange.mnCol2 = nXRight;
+ maVisibleRange.mnRow1 = nPosY;
+ maVisibleRange.mnRow2 = nYBottom;
+}
+
// #114409#
void ScGridWindow::DrawLayerCreated()
{
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 19289e4cf703..6265d823001b 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -1548,6 +1548,12 @@ void ScTabView::SelectNextTab( short nDir, sal_Bool bExtendSelection )
PaintExtras();
}
+void ScTabView::UpdateVisibleRange()
+{
+ for (sal_uInt16 i=0; i<4; i++)
+ if (pGridWin[i] && pGridWin[i]->IsVisible())
+ pGridWin[i]->UpdateVisibleRange();
+}
// SetTabNo - angezeigte Tabelle
@@ -1736,6 +1742,9 @@ void ScTabView::SetTabNo( SCTAB nTab, sal_Bool bNew, sal_Bool bExtendSelection,
RepeatResize();
InvalidateSplit();
+ // #163911# Update the visible range in each GridWin directly, don't wait for the repaint event.
+ UpdateVisibleRange();
+
if ( aViewData.IsPagebreakMode() )
UpdatePageBreakData(); //! asynchron ??
diff --git a/set_soenv.in b/set_soenv.in
index 265e4e5b7b4d..793951eb8a4c 100644
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -2067,7 +2067,6 @@ if ($platform =~ m/os2/)
ToFile( "SWITCHAR", "-", "e");
}
ToFile( "SAL_ENABLE_FILE_LOCKING", "1", "e");
-ToFile( "DBGSV_INIT", "$SOLARENV/bin/dbgsv.ini", "e");
#
# Writing unset variables you might not need to file.
#
diff --git a/setup_native/source/win32/msi-encodinglist.txt b/setup_native/source/win32/msi-encodinglist.txt
index ebfe9371f59f..ea4baf3217fb 100644
--- a/setup_native/source/win32/msi-encodinglist.txt
+++ b/setup_native/source/win32/msi-encodinglist.txt
@@ -36,6 +36,7 @@ fi 1252 1035
fo 1252 1080 # Faroese
fr 1252 1036
fr-CA 1252 3084
+fur 0 1585
ga 0 2108 # Irish
gd 0 1084 # Gaelic (Scotland)
gl 1252 1110 # Galician
@@ -51,7 +52,9 @@ id 1252 1057 # Indonesian
is 1252 1039 # Icelandic
it 1252 1040
ja 932 1041
+jbo 0 1624
ka 0 1079 # Georgian
+kab 0 1625
kid 1252 1033 # key id pseudo language
kk 0 1087
km 0 1107 # Khmer
@@ -84,6 +87,8 @@ nn 1252 2068
no 1252 1044
nr 0 1580 # Ndebele South
ns 0 1132 # Northern Sotho (Sepedi)
+nso 0 1132
+ny 0 1598
oc 1252 1154 # Occitan-lengadocian
om 0 2162
or 0 1096 # Oriya
@@ -116,6 +121,7 @@ st 0 1072 # Southern Sotho, Sutu
sv 1252 1053
sw 1252 1089 # Swahili
sw-TZ 1252 1089 # Swahili
+so 0 1143
ta 0 1097 # Tamil
ta-IN 0 1097 # Tamil
te 0 1098
diff --git a/sfx2/inc/sfx2/module.hxx b/sfx2/inc/sfx2/module.hxx
index f944b29c18da..5551df850ff2 100644
--- a/sfx2/inc/sfx2/module.hxx
+++ b/sfx2/inc/sfx2/module.hxx
@@ -34,6 +34,7 @@
#include <sfx2/imgdef.hxx>
#include <sal/types.h>
#include <tools/fldunit.hxx>
+#include <com/sun/star/uno/Reference.hxx>
class ImageList;
@@ -56,6 +57,9 @@ class SfxStbCtrlFactArr_Impl;
class SfxTabPage;
class Window;
+namespace com { namespace sun { namespace star { namespace frame {
+ class XFrame;
+} } } }
//====================================================================
class SFX2_DLLPUBLIC SfxModule : public SfxShell
@@ -97,6 +101,14 @@ public:
static SfxModule* GetActiveModule( SfxViewFrame* pFrame=NULL );
static FieldUnit GetCurrentFieldUnit();
+ /** retrieves the field unit of the module belonging to the document displayed in the given frame
+
+ Effectively, this method looks up the SfxViewFrame belonging to the given XFrame, then the SfxModule belonging to
+ the document in this frame, then this module's field unit.
+
+ Failures in any of those steps are reported as assertion in non-product builds, and then FUNIT_100TH_MM is returned.
+ */
+ static FieldUnit GetModuleFieldUnit( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > const & i_frame );
FieldUnit GetFieldUnit() const;
//#if 0 // _SOLAR__PRIVATE
diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx
index 90b93cc3748e..87953e134292 100644
--- a/sfx2/source/appl/module.cxx
+++ b/sfx2/source/appl/module.cxx
@@ -51,6 +51,7 @@
#include <svl/intitem.hxx>
#include "sfx2/taskpane.hxx"
#include <tools/diagnose_ex.h>
+#include <rtl/strbuf.hxx>
#define SfxModule
#include "sfxslots.hxx"
@@ -423,6 +424,39 @@ SfxModule* SfxModule::GetActiveModule( SfxViewFrame* pFrame )
return pSh ? pSh->GetModule() : 0;
}
+FieldUnit SfxModule::GetModuleFieldUnit( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > const & i_frame )
+{
+ ENSURE_OR_RETURN( i_frame.is(), "SfxModule::GetModuleFieldUnit: invalid frame!", FUNIT_100TH_MM );
+
+ // find SfxViewFrame for the given XFrame
+ SfxViewFrame* pViewFrame = SfxViewFrame::GetFirst();
+ while ( pViewFrame != NULL )
+ {
+ if ( pViewFrame->GetFrame().GetFrameInterface() == i_frame )
+ break;
+ pViewFrame = SfxViewFrame::GetNext( *pViewFrame );
+ }
+ ENSURE_OR_RETURN( pViewFrame != NULL, "SfxModule::GetModuleFieldUnit: unable to find an SfxViewFrame for the given XFrame", FUNIT_100TH_MM );
+
+ // find the module
+ SfxModule const * pModule = GetActiveModule( pViewFrame );
+ ENSURE_OR_RETURN( pModule != NULL, "SfxModule::GetModuleFieldUnit: no SfxModule for the given frame!", FUNIT_100TH_MM );
+
+ SfxPoolItem const * pItem = pModule->GetItem( SID_ATTR_METRIC );
+ if ( pItem == NULL )
+ {
+#if OSL_DEBUG_LEVEL > 0
+ ::rtl::OStringBuffer message;
+ message.append( "SfxModule::GetFieldUnit: no metric item in the module implemented by '" );
+ message.append( typeid( *pModule ).name() );
+ message.append( "'!" );
+ OSL_ENSURE( false, message.makeStringAndClear().getStr() );
+#endif
+ return FUNIT_100TH_MM;
+ }
+ return (FieldUnit)( (SfxUInt16Item*)pItem )->GetValue();
+}
+
FieldUnit SfxModule::GetCurrentFieldUnit()
{
FieldUnit eUnit = FUNIT_INCH;
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 4255e9bd2939..3da1f374af1c 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -921,11 +921,6 @@ void SfxObjectShell::SetCurrentComponent( const Reference< XInterface >& _rxComp
s_xCurrentComponent = _rxComponent;
if ( pAppMgr )
pAppMgr->SetGlobalUNOConstant( "ThisComponent", makeAny( _rxComponent ) );
-
-#if OSL_DEBUG_LEVEL > 0
- const char* pComponentImplName = _rxComponent.get() ? typeid( *_rxComponent.get() ).name() : "void";
- OSL_TRACE( "current component is a %s\n", pComponentImplName );
-#endif
}
Reference< XInterface > SfxObjectShell::GetCurrentComponent()
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index b125efc87267..b91e8b4848ba 100755
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -80,13 +80,15 @@ class SfxPrinterController : public vcl::PrinterController, public SfxListener
sal_Bool m_bOrigStatus;
sal_Bool m_bNeedsChange;
sal_Bool m_bApi;
+ sal_Bool m_bTempPrinter;
util::DateTime m_aLastPrinted;
::rtl::OUString m_aLastPrintedBy;
Sequence< beans::PropertyValue > getMergedOptions() const;
const Any& getSelectionObject() const;
public:
- SfxPrinterController( const Any& i_rComplete,
+ SfxPrinterController( const boost::shared_ptr<Printer>& i_rPrinter,
+ const Any& i_rComplete,
const Any& i_rSelection,
const Any& i_rViewProp,
const Reference< view::XRenderable >& i_xRender,
@@ -105,7 +107,8 @@ public:
virtual void jobFinished( com::sun::star::view::PrintableState );
};
-SfxPrinterController::SfxPrinterController( const Any& i_rComplete,
+SfxPrinterController::SfxPrinterController( const boost::shared_ptr<Printer>& i_rPrinter,
+ const Any& i_rComplete,
const Any& i_rSelection,
const Any& i_rViewProp,
const Reference< view::XRenderable >& i_xRender,
@@ -113,7 +116,8 @@ SfxPrinterController::SfxPrinterController( const Any& i_rComplete,
SfxViewShell* pView,
const uno::Sequence< beans::PropertyValue >& rProps
)
- : maCompleteSelection( i_rComplete )
+ : PrinterController( i_rPrinter)
+ , maCompleteSelection( i_rComplete )
, maSelection( i_rSelection )
, mxRenderable( i_xRender )
, mpLastPrinter( NULL )
@@ -122,6 +126,7 @@ SfxPrinterController::SfxPrinterController( const Any& i_rComplete,
, m_bOrigStatus( sal_False )
, m_bNeedsChange( sal_False )
, m_bApi(i_bApi)
+ , m_bTempPrinter( i_rPrinter.get() != NULL )
{
if ( mpViewShell )
{
@@ -339,7 +344,7 @@ void SfxPrinterController::jobFinished( com::sun::star::view::PrintableState nSt
rBind.Invalidate( SID_PRINTDOC );
rBind.Invalidate( SID_PRINTDOCDIRECT );
rBind.Invalidate( SID_SETUPPRINTER );
- bCopyJobSetup = true;
+ bCopyJobSetup = ! m_bTempPrinter;
break;
}
@@ -349,7 +354,12 @@ void SfxPrinterController::jobFinished( com::sun::star::view::PrintableState nSt
if( bCopyJobSetup && mpViewShell )
{
- SfxPrinter* pDocPrt = mpViewShell->GetPrinter(sal_False);
+ // #i114306#
+ // Note: this possibly creates a printer that gets immediately replaced
+ // by a new one. The reason for this is that otherwise we would not get
+ // the printer's SfxItemSet here to copy. Awkward, but at the moment there is no
+ // other way here to get the item set.
+ SfxPrinter* pDocPrt = mpViewShell->GetPrinter(sal_True);
if( pDocPrt )
{
if( pDocPrt->GetName() == getPrinter()->GetName() )
@@ -608,8 +618,23 @@ void SfxViewShell::ExecPrint( const uno::Sequence < beans::PropertyValue >& rPro
aSelection <<= GetObjectShell()->GetModel();
Any aComplete( makeAny( GetObjectShell()->GetModel() ) );
Any aViewProp( makeAny( xController ) );
+ boost::shared_ptr<Printer> aPrt;
- boost::shared_ptr<vcl::PrinterController> pController( new SfxPrinterController( aComplete,
+ const beans::PropertyValue* pVal = rProps.getConstArray();
+ for( sal_Int32 i = 0; i < rProps.getLength(); i++ )
+ {
+ if( pVal[i].Name.equalsAscii( "PrinterName" ) )
+ {
+ rtl::OUString aPrinterName;
+ pVal[i].Value >>= aPrinterName;
+ aPrt.reset( new Printer( aPrinterName ) );
+ break;
+ }
+ }
+
+ boost::shared_ptr<vcl::PrinterController> pController( new SfxPrinterController(
+ aPrt,
+ aComplete,
aSelection,
aViewProp,
GetRenderable(),
diff --git a/slideshow/source/engine/debug.cxx b/slideshow/source/engine/debug.cxx
index 4c8ba5415f04..f3fd185a58b0 100644
--- a/slideshow/source/engine/debug.cxx
+++ b/slideshow/source/engine/debug.cxx
@@ -307,7 +307,7 @@ DebugTraceScope::DebugTraceScope (const sal_Char* sFormat, ...)
va_start(args, sFormat);
msMessage[mnBufferSize-1] = 0;
- _vsnprintf(msMessage, mnBufferSize-1, sFormat, args);
+ vsnprintf(msMessage, mnBufferSize-1, sFormat, args);
TRACE_BEGIN("[ %s", msMessage);
va_end(args);
}
diff --git a/smoketestoo_native/com/sun/star/comp/smoketest/MANIFEST.MF b/smoketestdoc/com/sun/star/comp/smoketest/MANIFEST.MF
index 09e2f42ca0f6..09e2f42ca0f6 100755
--- a/smoketestoo_native/com/sun/star/comp/smoketest/MANIFEST.MF
+++ b/smoketestdoc/com/sun/star/comp/smoketest/MANIFEST.MF
diff --git a/smoketestoo_native/com/sun/star/comp/smoketest/TestExtension.idl b/smoketestdoc/com/sun/star/comp/smoketest/TestExtension.idl
index 83c370e11a18..83c370e11a18 100755
--- a/smoketestoo_native/com/sun/star/comp/smoketest/TestExtension.idl
+++ b/smoketestdoc/com/sun/star/comp/smoketest/TestExtension.idl
diff --git a/smoketestoo_native/com/sun/star/comp/smoketest/TestExtension.java b/smoketestdoc/com/sun/star/comp/smoketest/TestExtension.java
index c08c719116ae..c08c719116ae 100755
--- a/smoketestoo_native/com/sun/star/comp/smoketest/TestExtension.java
+++ b/smoketestdoc/com/sun/star/comp/smoketest/TestExtension.java
diff --git a/smoketestoo_native/com/sun/star/comp/smoketest/delzip b/smoketestdoc/com/sun/star/comp/smoketest/delzip
index 636fda90bfcb..636fda90bfcb 100755
--- a/smoketestoo_native/com/sun/star/comp/smoketest/delzip
+++ b/smoketestdoc/com/sun/star/comp/smoketest/delzip
diff --git a/smoketestoo_native/com/sun/star/comp/smoketest/makefile.mk b/smoketestdoc/com/sun/star/comp/smoketest/makefile.mk
index da9b302791f0..173898970254 100755
--- a/smoketestoo_native/com/sun/star/comp/smoketest/makefile.mk
+++ b/smoketestdoc/com/sun/star/comp/smoketest/makefile.mk
@@ -25,9 +25,9 @@
#
#*************************************************************************
-PRJ = ..$/..$/..$/..$/..
-PRJNAME = smoke_test
-PACKAGE = com$/sun$/star$/comp$/smoketest
+PRJ = ../../../../..
+PRJNAME = smoketestdoc
+PACKAGE = com/sun/star/comp/smoketest
TARGET = com_sun_star_comp_smoketest
no_common_build_zip:=TRUE
@@ -40,7 +40,6 @@ no_common_build_zip:=TRUE
JARFILES = ridl.jar jurt.jar unoil.jar juh.jar
-
JARTARGET = TestExtension.jar
JARCOMPRESS = TRUE
CUSTOMMANIFESTFILE = MANIFEST.MF
@@ -48,41 +47,41 @@ CUSTOMMANIFESTFILE = MANIFEST.MF
ZIP1TARGET=TestExtension
ZIP1LIST=*
ZIPFLAGS=-r
-ZIP1DIR=$(MISC)$/$(TARGET)
+ZIP1DIR=$(MISC)/$(TARGET)
ZIP1EXT=.oxt
# --- Files --------------------------------------------------------
-#COPY_OXT_MANIFEST:= $(MISC)$/$(TARGET)$/META-INF$/manifest.xml
+#COPY_OXT_MANIFEST:= $(MISC)/$(TARGET)/META-INF/manifest.xml
JAVAFILES = TestExtension.java
# --- Targets ------------------------------------------------------
-ZIP1DEPS=$(MISC)$/$(TARGET)$/$(JARTARGET)\
- $(MISC)$/$(TARGET)$/TestExtension.rdb\
- $(MISC)$/$(TARGET)$/META-INF$/manifest.xml
+ZIP1DEPS=$(MISC)/$(TARGET)/$(JARTARGET)\
+ $(MISC)/$(TARGET)/TestExtension.rdb\
+ $(MISC)/$(TARGET)/META-INF/manifest.xml
.INCLUDE : target.mk
-$(MISC)$/$(TARGET)$/META-INF:
+$(MISC)/$(TARGET)/META-INF:
@-$(MKDIRHIER) $(@)
-$(MISC)$/TestExtension.urd: TestExtension.idl
- $(IDLC) -O$(MISC) -I$(SOLARIDLDIR) -cid -we $<
+$(MISC)/TestExtension.urd: TestExtension.idl
+ $(COMMAND_ECHO)$(IDLC) -O$(MISC) -I$(SOLARIDLDIR) -cid -we $<
-$(MISC)$/$(TARGET)$/META-INF$/manifest.xml $(MISC)$/$(TARGET)$/TestExtension.rdb : $(MISC)$/$(TARGET)$/META-INF
+$(MISC)/$(TARGET)/META-INF/manifest.xml $(MISC)/$(TARGET)/TestExtension.rdb : $(MISC)/$(TARGET)/META-INF
-$(MISC)$/$(TARGET)$/META-INF$/manifest.xml: manifest.xml
- $(COPY) $< $@
+$(MISC)/$(TARGET)/META-INF/manifest.xml: manifest.xml
+ $(COMMAND_ECHO)$(COPY) $< $@
-$(MISC)$/$(TARGET)$/TestExtension.rdb: $(MISC)$/TestExtension.urd
- $(REGMERGE) $@ /UCR $<
+$(MISC)/$(TARGET)/TestExtension.rdb: $(MISC)/TestExtension.urd
+ $(COMMAND_ECHO)$(REGMERGE) $@ /UCR $<
-$(JAVACLASSFILES) .UPDATEALL: $(MISC)$/$(TARGET)$/TestExtension.rdb
- $(JAVAMAKER) -O$(CLASSDIR) -BUCR -nD -X$(SOLARBINDIR)/types.rdb $<
+$(JAVACLASSFILES) .UPDATEALL: $(MISC)/$(TARGET)/TestExtension.rdb
+ $(COMMAND_ECHO)$(JAVAMAKER) -O$(CLASSDIR) -BUCR -nD -X$(SOLARBINDIR)/types.rdb $<
-$(MISC)$/$(TARGET)$/$(JARTARGET) : $(JARTARGETN)
- $(COPY) $< $@
+$(MISC)/$(TARGET)/$(JARTARGET) : $(JARTARGETN)
+ $(COMMAND_ECHO)$(COPY) $< $@
.ELSE
@all:
diff --git a/smoketestoo_native/com/sun/star/comp/smoketest/manifest.xml b/smoketestdoc/com/sun/star/comp/smoketest/manifest.xml
index 7e3e7947aa0f..7e3e7947aa0f 100755
--- a/smoketestoo_native/com/sun/star/comp/smoketest/manifest.xml
+++ b/smoketestdoc/com/sun/star/comp/smoketest/manifest.xml
diff --git a/smoketestoo_native/data/Events.xml b/smoketestdoc/data/Events.xml
index 61272293f633..414f2c48e884 100644
--- a/smoketestoo_native/data/Events.xml
+++ b/smoketestdoc/data/Events.xml
@@ -28,6 +28,8 @@
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Events" script:language="StarBasic">REM ***** BASIC *****
+Global s_CloseListenerCalled As Boolean
+
Sub PressCancel
gDlgState = cDlgCancel
end Sub
@@ -40,4 +42,25 @@ Sub PressTest
gOptionsDialog.EndExecute()
gDlgState = cDlgStartTest
end Sub
+
+Sub closeListener_queryClosing
+ &apos; not interested in
+ closeListener_queryClosing = TRUE
+End Sub
+
+Sub closeListener_notifyClosing
+ s_CloseListenerCalled = TRUE
+End Sub
+
+Sub closeListener_disposing
+ &apos; not interested in
+End Sub
+
+Sub ResetCloseListenerFlag
+ s_CloseListenerCalled = FALSE
+End Sub
+
+Function HasCloseListenerBeenCalled As Boolean
+ HasCloseListenerBeenCalled = s_CloseListenerCalled
+End Function
</script:module>
diff --git a/smoketestoo_native/data/Global.xml b/smoketestdoc/data/Global.xml
index 1ff082b0a1eb..99c7bf1fe9af 100644
--- a/smoketestoo_native/data/Global.xml
+++ b/smoketestdoc/data/Global.xml
@@ -28,30 +28,36 @@
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Global" script:language="StarBasic">REM ***** BASIC *****
-const cMaxErrorStates = 13
+const cMaxErrorStates = 14
const cCoGreen = 4057917, cCoRed = 16711680, cCoGrey = 12632256
const cParagraphBreak = 0
global const cExtensionFileName = &quot;TestExtension.oxt&quot;
-global const cDocNew = 0, cDocSaveOpen8 = 1, cDocSaveOpenXML = 2, cDocSaveOpen50 = 3, cDocClose = 4, cDocWrite = 5
+global const cDocNew = 0, cDocSaveOpen8 = 1, cDocSaveOpenXML = 2, cDocClose = 3
global const cDBService = 0, cDBOpen = 1, cDBInsert = 2, cDBDelete = 3, cDBSeek = 4, cDBClose = 5
global const cEXTService = 0, cEXTInstall = 1, cEXTUninstall = 2
+global const cTestClosureSetupDoc = 0, cTestClosureWriteStatus = 1
global const cLogfileFailed = 255
global const cStWriter = 0, cStCalc = 1, cStPraesentation = 2, cStZeichnen = 3
-global const cStMessage = 12, cStHTML = 6, cStChart = 4, cStJava = 7
+global const cStHTML = 6, cStChart = 4, cStJava = 7
global const cStMath = 5, cStDataBase = 9
global const cStExtension = 11
+global const cStTestGlue = 12
global const cStNone = -1
global const cFlt8 = 0, cFlt50 = 32, cFltNewDoc = 64, cFltXML = 128
-global const frmWriter = 1, frmCalc = 2, frmMessage = 3, frmImpress = 4
-global const frmMath = 5, frmImage = 6, frmChart = 7, frmHyperText = 8, frmDraw = 9
+global const frmWriter = 1, frmCalc = 2, frmImpress = 4
+global const frmMath = 5, frmChart = 7, frmHyperText = 8, frmDraw = 9
global const frmDataBase = 10, frmJava = 13
global const frmExtension = 14
+global const frmTestClosure = 15
+
+Global gCurrentDocTest As Integer
+Global gCurrentTestCase As Integer
global const cLogUnknown = 0, cLogFalse = 1, cLogTrue = 2
@@ -83,7 +89,7 @@ Global const cUserFieldTestWriter = &quot;Writer&quot;, cUserFieldTestCalc = &qu
Global const cUserFieldTestDraw = &quot;Draw&quot;, cUserFieldTestMath = &quot;Math&quot;, cUserFieldTestChart = &quot;Chart&quot;
Global const cUserFieldTestHTML = &quot;HTML&quot;, cUserFieldTestJava = &quot;Java&quot;, cUserFieldTestDatabase = &quot;Database&quot;
Global const cUserFieldTestExtension = &quot;Extension&quot;
-Global const cUserFieldTestOpenSaveXML = &quot;SaveOpenXML&quot;, cUserFieldTestOpenSave50 = &quot;SaveOpen50&quot;
+Global const cUserFieldTestOpenSaveXML = &quot;SaveOpenXML&quot;
Global const cUserFieldTestTerminateAfterTest = &quot;Terminate&quot;, cUserFieldTestOpenSave8 = &quot;SaveOpen8&quot;
Global const cOptionsDialogName = &quot;OptionsDlg&quot;, cTest10Modul = &quot;Standard&quot;
@@ -91,6 +97,7 @@ Global const cOptionsDialogName = &quot;OptionsDlg&quot;, cTest10Modul = &quot;S
Global const cDlgCancel = 1, cDlgOk = 0, cDlgStartTest = 2
global gErrorState (cMaxErrorStates, 5) as integer
+Global gTestCaseAnnotations( cMaxErrorStates, 5 ) As String
global gOutputDoc as Object
global gOutputDocNotUno as Object
@@ -100,7 +107,7 @@ Global bMakeWriterTest as boolean, bMakeCalcTest as boolean, bMakeImpressTest a
Global bMakeDrawTest as Boolean, bMakeMathTest as boolean, bMakeChartTest as boolean
Global bMakeHTMLTest as boolean, bMakeJavaTest as boolean, bMakeDBTest as boolean
Global bMakeExtensionTest as boolean
-Global bMakeSaveOpenXMLTest as boolean, bMakeSaveOpen50Test as boolean
+Global bMakeSaveOpenXMLTest as boolean
Global bMakeTerminateAfterTest as boolean, bShowTable as boolean
Global bMakeSaveOpen8Test as boolean
@@ -109,42 +116,110 @@ global sExtensionURL as string
Dim gDlgState as Integer
Sub SetGlobalDoc
- gOutPutDoc = ThisComponent
+ gOutputDoc = ThisComponent
end Sub
Sub ClearStatus
for j% = 0 to cMaxErrorStates
for i% = 0 to 5
- gErrorState (j%, i%) = cLogUnknown
+ gErrorState (j%, i%) = cLogUnknown
+ gTestCaseAnnotations( J%, i% ) = ""
next i%
next j%
end Sub
Sub ClearAllText
call SetGlobalDoc
- call ClearDoc (gOutPutDoc)
+ call ClearDoc (gOutputDoc)
call ClearStatus
end Sub
+Sub AssertionHandler( sMessage as String )
+ LogTestResult( &quot;assertion caught: &quot; + sMessage, FALSE )
+End Sub
+
Sub Main
+ On Local Error Goto MainError
+
+ gCurrentDocTest = frmTestClosure
+ gCurrentTestCase = cLogfileFailed
+
+ DeleteAllSavedFiles()
+ DeleteAllLogFiles()
+ SetupWorkPath()
+
+ if GetSystem (sWorkPath) = &quot;windows&quot; then
+ sWorkPath = ConvertPathToWin (sWorkPath)
+ end if
+
+ LocalTestLog% = OpenLogDat( GetLogFileName( gCurrentDocTest ) )
+
+ gCurrentTestCase = cTestClosureSetupDoc
+ CaptureAssertions( "AssertionHandler" )
+
call SetGlobalDoc
+
+ Dim bWasModified as Boolean
+ bWasModified = gOutputDoc.isModified()
+
if bShowTable then
- call ClearDoc (gOutPutDoc)
+ call ClearDoc (gOutputDoc)
end If
call ClearStatus
+ LogTestResult( GetTestGlueDescription( gCurrentTestCase ), TRUE )
+
+ Dim nPreserveFileHandle%
+ nPreserveFileHandle% = LocalTestLog%
Call Test_10er.Main
+ LocalTestLog% = nPreserveFileHandle%
+ gCurrentDocTest = frmTestClosure
+ gCurrentTestCase = cTestClosureWriteStatus
if bShowTable then
call CreateStatusTable2
call CreateStatusTable
call CreateDocState
+ LogTestResult( GetTestGlueDescription( gCurrentTestCase ), TRUE )
+ &apos; do this LogTestResult call before CreateSecondState, since the latter accesses (and displays) the result
call CreateSecondState
gOutputDoc.CurrentController.ViewCursor.JumpToFirstPage
- end if
+ Else
+ LogTestResult( GetTestGlueDescription( gCurrentTestCase ), TRUE )
+ End If
+
+ &apos; print the &apos;test complete&apos; marker
+ Print #LocalTestLog%, &quot;---&quot;
+ LocalTestLog% = 0
+
+ gOutputDoc.setModified( bWasModified )
+
+ CaptureAssertions( &quot;&quot; )
+ Exit Sub
+
+MainError:
+ If ( gCurrentTestCase = cLogfileFailed ) then
+ LogTestResult( &quot;&quot;, False )
+ Exit Sub
+ else
+ LogTestResult( &quot;testclosure &quot; + GetTestGlueDescription( gCurrentTestCase ), FALSE )
+ Close #LocalTestLog%
+ LocalTestLog = 0
+ End If
End Sub
+Function GetTestGlueDescription( nTestCase as Integer )
+ Select Case ( nTestCase )
+ case cTestClosureSetupDoc
+ GetTestGlueDescription = &quot;setup&quot;
+ case cTestClosureWriteStatus
+ GetTestGlueDescription = &quot;write_status&quot;
+ case Else
+ GetTestGlueDescription = &quot;&quot;
+ End Select
+End Function
+
Sub CreateStatusTable
dim tableHeaders(7) as string
tableHeaders(cStWriter) = &quot;Writer&quot;
@@ -156,22 +231,17 @@ Sub CreateStatusTable
tableHeaders(cStHTML) = &quot;HTML&quot;
tableHeaders(cStJava) = &quot;Java&quot;
- dim tableColums(3) as string
- tableColums(cDocNew) = &quot;new&quot;
- tableColums(cDocSaveOpen8) = &quot;V8.0&quot;
- tableColums(cDocSaveOpenXML) = &quot;XML&quot;
- tableColums(cDocSaveOpen50) = &quot;V5.0&quot;
-&apos; tableColums(cDocClose) = &quot;close&quot;
+ dim tableRows(3) as string
+ tableRows(cDocNew) = &quot;new&quot;
+ tableRows(cDocSaveOpen8) = &quot;V8.0&quot;
+ tableRows(cDocSaveOpenXML) = &quot;XML&quot;
+ tableRows(cDocClose) = &quot;close&quot;
- aDoc = gOutPutDoc
+ aDoc = gOutputDoc
xText = aDoc.Text
xCursor = xText.createTextCursor()
-&apos; xCursor.gotoStart(FALSE)
-&apos; xCursor.GoRight (2, False)
-&apos; SetParagraphBreak (xCursor)
-&apos; SetParagraphBreak (xCursor)
xCursor.gotoStart(FALSE)
xCursor.GoRight (4, False)
SetParagraphBreak (xCursor)
@@ -180,68 +250,48 @@ Sub CreateStatusTable
xCursor.GoRight (1, False)
table = aDoc.createInstance(&quot;com.sun.star.text.TextTable&quot;)
- table.initialize(7,9)
+ table.initialize(5,9)
table.Name = &quot;StTab1&quot;
+ table.BackColor = cCoGrey
xText.insertTextContent(xCursor, table, FALSE)
- tableCursor = table.createCursorByCellName(table.CellNames(0))
- tableCursor.gotoStart(FALSE)
- tableCursor.goRight(1,FALSE)
-
for i% = 0 to 7
- cName = tableCursor.getRangeName()
- xCell = table.getCellByName(cName)
- xCell.String=tableHeaders(i%)
-
- xCell.BackTransparent = False
- xCell.BackColor = cCoGrey
-
- tableCursor.goRight(1,FALSE)
+ tableCell = table.getCellByPosition( i% + 1, 0 )
+ tableCell.String = tableHeaders( i% )
next i%
- xCursor.gotoStart(FALSE)
-&apos; SetParagraphBreak (xCursor)
-&apos; SetParagraphBreak (xCursor)
-
- tableCursor.gotoStart(FALSE)
- cName = tableCursor.getRangeName()
- xCell = table.getCellByName(cName)
- xCell.BackTransparent = False
- xCell.BackColor = cCoGrey
-
- for i% = 0 to 3
- tableCursor.goDown(1,FALSE)
- cName = tableCursor.getRangeName()
- xCell = table.getCellByName(cName)
- xCell.String=tableColums(i%)
-
- xCell.BackTransparent = False
- xCell.BackColor = cCoGrey
+ for i% = LBound( tableRows ) to UBound( tableRows )
+ tableCell = table.getCellByPosition( 0, i% + 1 )
+ tableCell.String=tableRows(i%)
next i%
end Sub
Sub CreateStatusTable2
- dim tableHeaders(5) as string
- tableHeaders(cStDataBase-9) = &quot;Database&quot;
+ dim tableHeaders(4) as string
+ tableHeaders(0) = &quot;Database&quot;
tableHeaders(1) = &quot;&quot;
- tableHeaders(cStExtension-9) = &quot;Extension&quot;
+ tableHeaders(2) = &quot;Extension&quot;
tableHeaders(3) = &quot;&quot;
- tableHeaders(4) = &quot;&quot;
+ tableHeaders(4) = &quot;Other&quot;
+
+ dim tableRows(5) as string
+ tableRows(cDBService ) = &quot;services&quot;
+ tableRows(cDBOpen ) = &quot;open&quot;
+ tableRows(cDBInsert ) = &quot;insert&quot;
+ tableRows(cDBDelete ) = &quot;delete&quot;
+ tableRows(cDBSeek ) = &quot;seek&quot;
+ tableRows(cDBClose ) = &quot;close&quot;
- dim tableColums(5) as string
- tableColums(cDBService ) = &quot;services&quot;
- tableColums(cDBOpen ) = &quot;open&quot;
- tableColums(cDBInsert ) = &quot;insert&quot;
- tableColums(cDBDelete ) = &quot;delete&quot;
- tableColums(cDBSeek ) = &quot;seek&quot;
- tableColums(cDBClose ) = &quot;close&quot;
+ dim tableRows2(2) as string
+ tableRows2(cEXTService ) = &quot;services&quot;
+ tableRows2(cEXTInstall ) = &quot;install&quot;
+ tableRows2(cEXTUninstall ) = &quot;uninstall&quot;
- dim tableColums2(3) as string
- tableColums2(cEXTService ) = &quot;services&quot;
- tableColums2(cEXTInstall ) = &quot;install&quot;
- tableColums2(cEXTUninstall ) = &quot;uninstall&quot;
+ dim tableRows3(1) as string
+ tableRows3(cTestClosureSetupDoc ) = &quot;setup test&quot;
+ tableRows3(cTestClosureWriteStatus ) = &quot;write test result&quot;
- aDoc = gOutPutDoc
+ aDoc = gOutputDoc
xText = aDoc.Text
xCursor = xText.createTextCursor()
@@ -255,111 +305,98 @@ Sub CreateStatusTable2
table = aDoc.createInstance(&quot;com.sun.star.text.TextTable&quot;)
table.initialize(7,6)
table.Name = &quot;StTab2&quot;
- &apos;table.RelativeWidth =500
+ table.BackColor = cCoGrey
xText.insertTextContent(xCursor, table, FALSE)
- tableCursor = table.createCursorByCellName(table.CellNames(0))
- tableCursor.gotoStart(FALSE)
- tableCursor.goRight(1,FALSE)
-
- for i% = 0 to 5
- cName = tableCursor.getRangeName()
- xCell = table.getCellByName(cName)
- xCell.String=tableHeaders(i%)
-
- xCell.BackTransparent = False
- xCell.BackColor = cCoGrey
-
- tableCursor.goRight(1,FALSE)
+ for i% = LBound( tableHeaders ) to UBound( tableHeaders )
+ tableCell = table.getCellByPosition( i% + 1, 0 )
+ tableCell.String = tableHeaders(i%)
next i%
- tableCursor.gotoStart(FALSE)
-
- cName = tableCursor.getRangeName()
- xCell = table.getCellByName(cName)
- xCell.BackTransparent = False
- xCell.BackColor = cCoGrey
-
- for i% = 0 to 5
- tableCursor.goDown(1,FALSE)
- cName = tableCursor.getRangeName()
- xCell = table.getCellByName(cName)
- xCell.String=tableColums(i%)
-
- xCell.BackTransparent = False
- xCell.BackColor = cCoGrey
+ for i% = LBound( tableRows ) to UBound( tableRows )
+ tableCell = table.getCellByPosition( 0, i% + 1 )
+ tableCell.String=tableRows(i%)
next i%
- tableCursor.gotoStart(FALSE)
- tableCursor.goRight(2,FALSE)
-
- for i% = 0 to 3
- tableCursor.goDown(1,FALSE)
- cName = tableCursor.getRangeName()
- xCell = table.getCellByName(cName)
- xCell.String=tableColums2(i%)
+ for i% = LBound( tableRows2 ) to UBound( tableRows2 )
+ tableCell = table.getCellByPosition( 2, i% + 1 )
+ tableCell.String=tableRows2(i%)
+ next i%
- xCell.BackTransparent = False
- xCell.BackColor = cCoGrey
+ for i% = LBound( tableRows3 ) to UBound( tableRows3 )
+ tableCell = table.getCellByPosition( 4, i% + 1 )
+ tableCell.String=tableRows3(i%)
next i%
end Sub
Sub CreateDocState
- aDoc = gOutPutDoc
+ aDoc = gOutputDoc
table = aDoc.TextTables.GetByIndex (1)
- &apos;table = aDoc.TextTables.GetByName (&quot;StTab1&quot;)
for j% = 0 to 7
- for i% = 0 to 5
+ for i% = 0 to 3
sRangeName = GetRangeName(j%, i%+1)
tableCursor = table.createCursorByCellName(sRangeName)
- cName = tableCursor.getRangeName()
- xCell = table.getCellByName(cName)
-
- xCell.BackTransparent = False
-
- if gErrorState (j%, i%) = cLogTrue then
- xCell.BackColor = cCoGreen
- else if gErrorState (j%, i%) = cLogFalse then
- xCell.BackColor = cCoRed
- else
- xCell.BackColor = cCoGrey
- end If
- end If
-
+ cName = tableCursor.getRangeName()
+ xCell = table.getCellByName(cName)
+
+ xCell.BackTransparent = False
+
+ If gErrorState (j%, i%) = cLogTrue Then
+ xCell.BackColor = cCoGreen
+ else
+ If gErrorState (j%, i%) = cLogFalse Then
+ xCell.BackColor = cCoRed
+ If ( gTestCaseAnnotations( j%, i% ) &lt;&gt; "" ) Then
+ Dim annotation as Object
+ annotation = aDoc.createInstance( &quot;com.sun.star.text.TextField.Annotation&quot; )
+ annotation.Author = &quot;smoketest&quot;
+ annotation.Content = gTestCaseAnnotations( j%, i% )
+ xCell.insertTextContent( xCell, annotation, false )
+ End If
+ else
+ xCell.BackColor = cCoGrey
+ end If
+ end If
next i%
next j%
end Sub
Sub CreateSecondState
- aDoc = gOutPutDoc
+ aDoc = gOutputDoc
table = aDoc.TextTables.GetByIndex (0)
- &apos;table = aDoc.TextTables.GetByName (&quot;StTab2&quot;)
-
- for j% = 0 to cMaxErrorStates-9
- for i% = 0 to 5
- sRangeName = GetRangeName(j%, i%+1)
-
- tableCursor = table.createCursorByCellName(sRangeName)
- cName = tableCursor.getRangeName()
- xCell = table.getCellByName(cName)
-
- xCell.BackTransparent = False
-
- if gErrorState (j%+9, i%) = cLogTrue then
- xCell.BackColor = cCoGreen
- else if gErrorState (j%+9, i%) = cLogFalse then
- xCell.BackColor = cCoRed
- else
- xCell.BackColor = cCoGrey
- end If
+ Dim stateIndex(2) as Integer
+ stateIndex(0) = cStDataBase
+ stateIndex(1) = cStExtension
+ stateIndex(2) = cStTestGlue
+
+ Dim j as Integer
+ For j = LBound( stateIndex ) To UBound( stateIndex )
+ for i% = 1 to 6
+ tableCell = table.getCellByPosition( 2 * j + 1, i% )
+ tableCell.BackTransparent = False
+
+ if gErrorState( stateIndex(j), i% - 1 ) = cLogTrue then
+ tableCell.BackColor = cCoGreen
+ else
+ if gErrorState ( stateIndex(j), i% - 1 ) = cLogFalse then
+ tableCell.BackColor = cCoRed
+ If ( gTestCaseAnnotations( stateIndex(j), i% - 1 ) &lt;&gt; &quot;&quot; ) Then
+ Dim annotation as Object
+ annotation = aDoc.createInstance( &quot;com.sun.star.text.TextField.Annotation&quot; )
+ annotation.Author = &quot;smoketest&quot;
+ annotation.Content = gTestCaseAnnotations( stateIndex(j), i% - 1 )
+ tableCell.insertTextContent( tableCell, annotation, false )
+ End If
+ else
+ tableCell.BackColor = cCoGrey
+ end If
end If
-
next i%
next j%
end Sub
@@ -368,11 +405,33 @@ Function GetRangeName (nColumn as integer, nRow as integer) as string
GetRangeName = chr (nColumn+66) + Trim(Str(nRow+1))
end Function
-Sub SetStatus (nDocType as Integer, nAction as Integer, bState as Boolean)
+Sub LogTestResult( sTestCaseDescription as String, bSuccess as Boolean )
+ If ( gCurrentTestCase = cLogfileFailed ) Then
+ Dim sAnnotation as String
+ sAnnotation = &quot;creating logfile &apos;&quot; + GetLogFileName( gCurrentDocTest ) + &quot;&apos; failed&quot;
+ LogState( FALSE, sAnnotation, GlobalTestLog )
+ RecordTestCaseStatus( 0, FALSE, sAnnotation )
+ Else
+ bSuccess = RecordTestCaseStatus( gCurrentTestCase, bSuccess, sTestCaseDescription )
+ If ( LocalTestLog &lt;&gt; 0 ) Then
+ LogState( bSuccess, sTestCaseDescription, LocalTestLog )
+ EndIf
+ if ( GlobalTestLog &lt;&gt; 0 ) Then
+ LogState( bSuccess, sTestCaseDescription, GlobalTestLog )
+ EndIf
+ End If
+End Sub
+
+Function RecordTestCaseStatus( nAction as Integer, bState as Boolean, sFailureAnnotation as String ) as Boolean
Dim nStatusType as Integer
Dim nState as integer
- nStatusType = GetStatusType (nDocType)
- If nStatusType = cStNone then Exit Sub
+ nStatusType = GetStatusType( gCurrentDocTest )
+ If nStatusType = cStNone then Exit Function
+
+ If ( gErrorState( nStatusType, nAction ) = cLogFalse ) Then
+ &apos; don't overwrite a previous &quot;failed&quot; state for this test
+ bState = FALSE
+ End If
if bState then
nState = cLogTrue
@@ -381,30 +440,34 @@ Sub SetStatus (nDocType as Integer, nAction as Integer, bState as Boolean)
end If
gErrorState (nStatusType, nAction) = nState
-end Sub
+
+ If ( nState = cLogFalse ) And ( sFailureAnnotation &lt;&gt; &quot;&quot; ) Then
+ gTestCaseAnnotations( nStatusType, nAction ) = gTestCaseAnnotations( nStatusType, nAction ) + sFailureAnnotation + chr(13)
+ End If
+
+ RecordTestCaseStatus = bState
+End Function
Function GetStatusType (nDocType as Integer) as Integer
Select Case ( nDocType )
case frmWriter
- GetStatusType = cStWriter &apos; Textdokument
+ GetStatusType = cStWriter &apos; text document
case frmCalc
- GetStatusType = cStCalc &apos;Tabellendokument
- case frmMessage
- GetStatusType = cStMessage &apos;Nachricht
+ GetStatusType = cStCalc &apos; spreadsheet document
case frmImpress
- GetStatusType = cStPraesentation &apos;Präsentation
+ GetStatusType = cStPraesentation &apos; presentation
case frmDraw
- GetStatusType = cStZeichnen &apos;Zeichnen
+ GetStatusType = cStZeichnen &apos; drawing
case frmMath
- GetStatusType = cStMath &apos;Formel
- case frmImage
- GetStatusType = cStBild &apos;Bild
+ GetStatusType = cStMath &apos; formula
case frmHyperText
- GetStatusType = cStHTML &apos;Hypertext-Dokument
+ GetStatusType = cStHTML &apos; HTML document
case frmChart
- GetStatusType = cStChart &apos;Diagramm
+ GetStatusType = cStChart &apos; chart
case frmJava
GetStatusType = cStJava &apos;Java
+ case frmTestClosure
+ GetStatusType = cStTestGlue &apos; test framework
case frmDataBase
GetStatusType = cStDataBase &apos;DataBase
case frmExtension
@@ -494,56 +557,53 @@ end Sub
Sub SetOptions
call SetGlobalDoc
- SetUserFieldState (cUserFieldTestWriter, -(gOptionsDialog.getControl(&quot;cbWriterTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestCalc, -(gOptionsDialog.getControl(&quot;cbCalcTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestImpress, -(gOptionsDialog.getControl(&quot;cbImpressTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestDraw, -(gOptionsDialog.getControl(&quot;cbDrawTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestHTML, -(gOptionsDialog.getControl(&quot;cbHTMLTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestMath, -(gOptionsDialog.getControl(&quot;cbMathTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestChart, -(gOptionsDialog.getControl(&quot;cbChartTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestJava, -(gOptionsDialog.getControl(&quot;cbJavaTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestDatabase, -(gOptionsDialog.getControl(&quot;cbDatabaseTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestExtension, -(gOptionsDialog.getControl(&quot;cbExtensionTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestOpenSaveXML, -(gOptionsDialog.getControl(&quot;cbSaveOpenXMLTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestOpenSave50, -(gOptionsDialog.getControl(&quot;cbSaveOpen50Test&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestOpenSave8, -(gOptionsDialog.getControl(&quot;cbSaveOpen8Test&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestTerminateAfterTest, -(gOptionsDialog.getControl(&quot;cbTerminateAfterTest&quot;).getState), gOutPutDoc)
+ SetUserFieldState (cUserFieldTestWriter, -(gOptionsDialog.getControl(&quot;cbWriterTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestCalc, -(gOptionsDialog.getControl(&quot;cbCalcTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestImpress, -(gOptionsDialog.getControl(&quot;cbImpressTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestDraw, -(gOptionsDialog.getControl(&quot;cbDrawTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestHTML, -(gOptionsDialog.getControl(&quot;cbHTMLTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestMath, -(gOptionsDialog.getControl(&quot;cbMathTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestChart, -(gOptionsDialog.getControl(&quot;cbChartTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestJava, -(gOptionsDialog.getControl(&quot;cbJavaTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestDatabase, -(gOptionsDialog.getControl(&quot;cbDatabaseTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestExtension, -(gOptionsDialog.getControl(&quot;cbExtensionTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestOpenSaveXML, -(gOptionsDialog.getControl(&quot;cbSaveOpenXMLTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestOpenSave8, -(gOptionsDialog.getControl(&quot;cbSaveOpen8Test&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestTerminateAfterTest, -(gOptionsDialog.getControl(&quot;cbTerminateAfterTest&quot;).getState), gOutputDoc)
end Sub
Sub GetOptions
call SetGlobalDoc
- gOptionsDialog.getControl(&quot;cbWriterTest&quot;).setState( -( GetUserFieldState (cUserFieldTestWriter, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbCalcTest&quot;).setState ( -( GetUserFieldState (cUserFieldTestCalc, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbImpressTest&quot;).setState( -( GetUserFieldState (cUserFieldTestImpress, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbDrawTest&quot;).setState( -( GetUserFieldState (cUserFieldTestDraw, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbHTMLTest&quot;).setState( -( GetUserFieldState (cUserFieldTestHTML, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbMathTest&quot;).setState( -( GetUserFieldState (cUserFieldTestMath, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbChartTest&quot;).setState( -( GetUserFieldState (cUserFieldTestChart, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbJavaTest&quot;).setState( -( GetUserFieldState (cUserFieldTestJava, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbDatabaseTest&quot;).setState( -( GetUserFieldState (cUserFieldTestDatabase, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbExtensionTest&quot;).setState( -( GetUserFieldState (cUserFieldTestExtension, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbSaveOpenXMLTest&quot;).setState( -( GetUserFieldState (cUserFieldTestOpenSaveXML, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbSaveOpen50Test&quot;).setState( -( GetUserFieldState (cUserFieldTestOpenSave50, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbSaveOpen8Test&quot;).setState( -( GetUserFieldState (cUserFieldTestOpenSave8, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbTerminateAfterTest&quot;).setState( -( GetUserFieldState (cUserFieldTestTerminateAfterTest, gOutPutDoc)))
+ gOptionsDialog.getControl(&quot;cbWriterTest&quot;).setState( -( GetUserFieldState (cUserFieldTestWriter, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbCalcTest&quot;).setState ( -( GetUserFieldState (cUserFieldTestCalc, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbImpressTest&quot;).setState( -( GetUserFieldState (cUserFieldTestImpress, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbDrawTest&quot;).setState( -( GetUserFieldState (cUserFieldTestDraw, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbHTMLTest&quot;).setState( -( GetUserFieldState (cUserFieldTestHTML, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbMathTest&quot;).setState( -( GetUserFieldState (cUserFieldTestMath, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbChartTest&quot;).setState( -( GetUserFieldState (cUserFieldTestChart, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbJavaTest&quot;).setState( -( GetUserFieldState (cUserFieldTestJava, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbDatabaseTest&quot;).setState( -( GetUserFieldState (cUserFieldTestDatabase, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbExtensionTest&quot;).setState( -( GetUserFieldState (cUserFieldTestExtension, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbSaveOpenXMLTest&quot;).setState( -( GetUserFieldState (cUserFieldTestOpenSaveXML, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbSaveOpen8Test&quot;).setState( -( GetUserFieldState (cUserFieldTestOpenSave8, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbTerminateAfterTest&quot;).setState( -( GetUserFieldState (cUserFieldTestTerminateAfterTest, gOutputDoc)))
End Sub
Sub ReadOptions
call SetGlobalDoc
- bMakeWriterTest = GetUserFieldState (cUserFieldTestWriter, gOutPutDoc)
- bMakeCalcTest = GetUserFieldState (cUserFieldTestCalc, gOutPutDoc)
- bMakeImpressTest = GetUserFieldState (cUserFieldTestImpress, gOutPutDoc)
- bMakeDrawTest = GetUserFieldState (cUserFieldTestDraw, gOutPutDoc)
- bMakeHTMLTest = GetUserFieldState (cUserFieldTestHTML, gOutPutDoc)
- bMakeMathTest = GetUserFieldState (cUserFieldTestMath, gOutPutDoc)
- bMakeChartTest = GetUserFieldState (cUserFieldTestChart, gOutPutDoc)
- bMakeJavaTest = GetUserFieldState (cUserFieldTestJava, gOutPutDoc)
- bMakeDBTest = GetUserFieldState (cUserFieldTestDatabase, gOutPutDoc)
- bMakeExtensionTest = GetUserFieldState (cUserFieldTestExtension, gOutPutDoc)
- bMakeSaveOpenXMLTest = GetUserFieldState (cUserFieldTestOpenSaveXML, gOutPutDoc)
- bMakeSaveOpen50Test = GetUserFieldState (cUserFieldTestOpenSave50, gOutPutDoc)
- bMakeSaveOpen8Test = GetUserFieldState (cUserFieldTestOpenSave8, gOutPutDoc)
- bMakeTerminateAfterTest = GetUserFieldState (cUserFieldTestTerminateAfterTest, gOutPutDoc)
+ bMakeWriterTest = GetUserFieldState (cUserFieldTestWriter, gOutputDoc)
+ bMakeCalcTest = GetUserFieldState (cUserFieldTestCalc, gOutputDoc)
+ bMakeImpressTest = GetUserFieldState (cUserFieldTestImpress, gOutputDoc)
+ bMakeDrawTest = GetUserFieldState (cUserFieldTestDraw, gOutputDoc)
+ bMakeHTMLTest = GetUserFieldState (cUserFieldTestHTML, gOutputDoc)
+ bMakeMathTest = GetUserFieldState (cUserFieldTestMath, gOutputDoc)
+ bMakeChartTest = GetUserFieldState (cUserFieldTestChart, gOutputDoc)
+ bMakeJavaTest = GetUserFieldState (cUserFieldTestJava, gOutputDoc)
+ bMakeDBTest = GetUserFieldState (cUserFieldTestDatabase, gOutputDoc)
+ bMakeExtensionTest = GetUserFieldState (cUserFieldTestExtension, gOutputDoc)
+ bMakeSaveOpenXMLTest = GetUserFieldState (cUserFieldTestOpenSaveXML, gOutputDoc)
+ bMakeSaveOpen8Test = GetUserFieldState (cUserFieldTestOpenSave8, gOutputDoc)
+ bMakeTerminateAfterTest = GetUserFieldState (cUserFieldTestTerminateAfterTest, gOutputDoc)
end Sub
Sub SetDefaultOptions
@@ -565,11 +625,6 @@ Sub SetDefaultOptions
End If
bMakeSaveOpenXMLTest = true
REM Disable StarOffice 5.0 tests in case binfilter has not been included
- if Environ(&quot;WITH_BINFILTER&quot;) = &quot;NO&quot; then
- bMakeSaveOpen50Test = false
- else
- bMakeSaveOpen50Test = true
- End If
bMakeSaveOpen8Test = true
bMakeTerminateAfterTest = false
end Sub
@@ -579,8 +634,8 @@ Sub StartTestByOptions
call ReadOptions
call Main
if bMakeTerminateAfterTest then
- ClearDocFull (gOutPutDoc)
- gOutPutDoc.dispose
+ ClearDocFull (gOutputDoc)
+ gOutputDoc.dispose
&apos;StarDesktop.Terminate
&apos;EnableReschedule( false )
@@ -608,7 +663,7 @@ Function StartTestWithDefaultOptions
action(cDocNew) = &quot;new&quot;
action(cDocSaveOpen8) = &quot;V8.0&quot;
action(cDocSaveOpenXML) = &quot;XML&quot;
- action(cDocSaveOpen50) = &quot;V5.0&quot;
+ action(cDocClose) = &quot;close&quot;
dim baseAction(5) as string
baseAction(cDBService) = &quot;services&quot;
baseAction(cDBOpen) = &quot;open&quot;
diff --git a/smoketestoo_native/data/OptionsDlg.xml b/smoketestdoc/data/OptionsDlg.xml
index 213c880d4d51..c03026185886 100644
--- a/smoketestoo_native/data/OptionsDlg.xml
+++ b/smoketestdoc/data/OptionsDlg.xml
@@ -28,35 +28,37 @@
<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="OptionsDlg" dlg:left="173" dlg:top="100" dlg:width="223" dlg:height="214" dlg:closeable="true" dlg:moveable="true" dlg:title="Options for smoketest">
<dlg:bulletinboard>
- <dlg:titledbox dlg:id="fmTests" dlg:tab-index="0" dlg:left="114" dlg:top="7" dlg:width="101" dlg:height="157">
+ <dlg:titledbox dlg:id="fmTests" dlg:tab-index="0" dlg:left="114" dlg:top="7" dlg:width="100" dlg:height="157">
<dlg:title dlg:value="Tests"/>
</dlg:titledbox>
- <dlg:titledbox dlg:id="fmInstalls" dlg:tab-index="1" dlg:left="7" dlg:top="7" dlg:width="100" dlg:height="157">
+ <dlg:checkbox dlg:id="cbWriterTest" dlg:tab-index="1" dlg:left="19" dlg:top="21" dlg:width="80" dlg:height="8" dlg:value="Writer" dlg:checked="false"/>
+ <dlg:checkbox dlg:id="cbCalcTest" dlg:tab-index="2" dlg:left="19" dlg:top="35" dlg:width="80" dlg:height="8" dlg:value="Calc" dlg:checked="false"/>
+ <dlg:checkbox dlg:id="cbImpressTest" dlg:tab-index="3" dlg:left="19" dlg:top="49" dlg:width="80" dlg:height="8" dlg:value="Impress" dlg:checked="false"/>
+ <dlg:checkbox dlg:id="cbDrawTest" dlg:tab-index="4" dlg:left="19" dlg:top="63" dlg:width="80" dlg:height="8" dlg:value="Draw" dlg:checked="false"/>
+ <dlg:checkbox dlg:id="cbHTMLTest" dlg:tab-index="5" dlg:left="19" dlg:top="77" dlg:width="80" dlg:height="8" dlg:value="HTML" dlg:checked="false"/>
+ <dlg:checkbox dlg:id="cbMathTest" dlg:tab-index="6" dlg:left="19" dlg:top="91" dlg:width="80" dlg:height="8" dlg:value="Math" dlg:checked="false"/>
+ <dlg:checkbox dlg:id="cbChartTest" dlg:tab-index="7" dlg:left="19" dlg:top="105" dlg:width="80" dlg:height="8" dlg:value="Chart" dlg:checked="false"/>
+ <dlg:checkbox dlg:id="cbJavaTest" dlg:tab-index="8" dlg:left="19" dlg:top="119" dlg:width="80" dlg:height="8" dlg:value="Java" dlg:checked="false"/>
+ <dlg:checkbox dlg:id="cbDatabaseTest" dlg:tab-index="9" dlg:left="19" dlg:top="133" dlg:width="80" dlg:height="8" dlg:value="Database" dlg:checked="false"/>
+ <dlg:checkbox dlg:id="cbExtensionTest" dlg:tab-index="10" dlg:left="19" dlg:top="147" dlg:width="80" dlg:height="8" dlg:value="Extension" dlg:checked="false"/>
+
+ <dlg:titledbox dlg:id="fmInstalls" dlg:tab-index="11" dlg:left="7" dlg:top="7" dlg:width="100" dlg:height="157">
<dlg:title dlg:value="Functions"/>
</dlg:titledbox>
- <dlg:checkbox dlg:id="cbWriterTest" dlg:tab-index="2" dlg:left="126" dlg:top="21" dlg:width="80" dlg:height="8" dlg:value="Writer" dlg:checked="false"/>
- <dlg:checkbox dlg:id="cbCalcTest" dlg:tab-index="3" dlg:left="126" dlg:top="35" dlg:width="80" dlg:height="8" dlg:value="Calc" dlg:checked="false"/>
- <dlg:checkbox dlg:id="cbImpressTest" dlg:tab-index="4" dlg:left="126" dlg:top="49" dlg:width="80" dlg:height="8" dlg:value="Impress" dlg:checked="false"/>
- <dlg:checkbox dlg:id="cbDrawTest" dlg:tab-index="5" dlg:left="126" dlg:top="63" dlg:width="80" dlg:height="8" dlg:value="Draw" dlg:checked="false"/>
- <dlg:checkbox dlg:id="cbHTMLTest" dlg:tab-index="6" dlg:left="126" dlg:top="77" dlg:width="80" dlg:height="8" dlg:value="HTML" dlg:checked="false"/>
- <dlg:checkbox dlg:id="cbMathTest" dlg:tab-index="7" dlg:left="126" dlg:top="91" dlg:width="80" dlg:height="8" dlg:value="Math" dlg:checked="false"/>
- <dlg:checkbox dlg:id="cbChartTest" dlg:tab-index="8" dlg:left="126" dlg:top="105" dlg:width="80" dlg:height="8" dlg:value="Chart" dlg:checked="false"/>
- <dlg:checkbox dlg:id="cbSaveOpenXMLTest" dlg:tab-index="9" dlg:left="19" dlg:top="49" dlg:width="80" dlg:height="8" dlg:value="Save / Open XML" dlg:checked="false"/>
- <dlg:checkbox dlg:id="cbSaveOpen50Test" dlg:tab-index="10" dlg:left="19" dlg:top="63" dlg:width="80" dlg:height="8" dlg:value="Save / Open V5.0" dlg:checked="false"/>
- <dlg:checkbox dlg:id="cbTerminateAfterTest" dlg:tab-index="11" dlg:disabled="true" dlg:left="19" dlg:top="174" dlg:width="190" dlg:height="8" dlg:value="Terminate Office after test" dlg:checked="false"/>
- <dlg:titledbox dlg:id="fmBroker" dlg:tab-index="12" dlg:left="7" dlg:top="169" dlg:width="208" dlg:height="17"/>
- <dlg:button dlg:id="btOk" dlg:tab-index="13" dlg:left="7" dlg:top="193" dlg:width="65" dlg:height="15" dlg:value="Ok" dlg:button-type="ok">
+ <dlg:checkbox dlg:id="cbSaveOpen8Test" dlg:tab-index="12" dlg:left="126" dlg:top="21" dlg:width="80" dlg:height="8" dlg:value="Save / Open V8.0" dlg:checked="false"/>
+ <dlg:checkbox dlg:id="cbSaveOpenXMLTest" dlg:tab-index="13" dlg:left="126" dlg:top="35" dlg:width="80" dlg:height="8" dlg:value="Save / Open XML" dlg:checked="false"/>
+
+ <dlg:titledbox dlg:id="fmBroker" dlg:tab-index="15" dlg:left="7" dlg:top="169" dlg:width="208" dlg:height="17"/>
+ <dlg:checkbox dlg:id="cbTerminateAfterTest" dlg:tab-index="16" dlg:disabled="true" dlg:left="19" dlg:top="174" dlg:width="190" dlg:height="8" dlg:value="Terminate Office after test" dlg:checked="false"/>
+
+ <dlg:button dlg:id="btOk" dlg:tab-index="17" dlg:left="7" dlg:top="193" dlg:width="65" dlg:height="15" dlg:value="Ok" dlg:button-type="ok" dlg:default="true">
<script:event script:event-name="on-performaction" script:location="document" script:macro-name="Standard.Events.PressOk" script:language="StarBasic"/>
</dlg:button>
- <dlg:button dlg:id="btCancel" dlg:tab-index="14" dlg:left="80" dlg:top="193" dlg:width="65" dlg:height="15" dlg:value="Cancel" dlg:button-type="ok">
+ <dlg:button dlg:id="btCancel" dlg:tab-index="18" dlg:left="80" dlg:top="193" dlg:width="65" dlg:height="15" dlg:value="Cancel" dlg:button-type="ok">
<script:event script:event-name="on-performaction" script:location="document" script:macro-name="Standard.Events.PressCancel" script:language="StarBasic"/>
</dlg:button>
- <dlg:button dlg:id="btStart" dlg:tab-index="15" dlg:left="152" dlg:top="193" dlg:width="65" dlg:height="15" dlg:value="Smoketest">
+ <dlg:button dlg:id="btStart" dlg:tab-index="19" dlg:left="152" dlg:top="193" dlg:width="65" dlg:height="15" dlg:value="Smoketest">
<script:event script:event-name="on-performaction" script:location="vnd.sun.star.script" script:macro-name="Standard.Events.PressTest?language=Basic&amp;location=document" script:language="Script"/>
</dlg:button>
- <dlg:checkbox dlg:id="cbJavaTest" dlg:tab-index="16" dlg:left="126" dlg:top="119" dlg:width="80" dlg:height="8" dlg:value="Java" dlg:checked="false"/>
- <dlg:checkbox dlg:id="cbSaveOpen8Test" dlg:tab-index="17" dlg:left="19" dlg:top="35" dlg:width="80" dlg:height="8" dlg:value="Save / Open V8.0" dlg:checked="false"/>
- <dlg:checkbox dlg:id="cbDatabaseTest" dlg:tab-index="18" dlg:left="126" dlg:top="133" dlg:width="80" dlg:height="8" dlg:value="Database" dlg:checked="false"/>
- <dlg:checkbox dlg:id="cbExtensionTest" dlg:tab-index="19" dlg:left="126" dlg:top="147" dlg:width="80" dlg:height="8" dlg:value="Extension" dlg:checked="false"/>
</dlg:bulletinboard>
</dlg:window>
diff --git a/smoketestoo_native/data/Test_10er.xml b/smoketestdoc/data/Test_10er.xml
index 56a8d130fc13..b929caccb1b8 100644
--- a/smoketestoo_native/data/Test_10er.xml
+++ b/smoketestdoc/data/Test_10er.xml
@@ -30,12 +30,13 @@
const sSWLogFileName = &quot;swlog.dat&quot;, sSCLogFileName = &quot;sclog.dat&quot;
const sSDLogFileName = &quot;sdlog.dat&quot;, sSMathLogFileName = &quot;smalog.dat&quot;
-const sSImDLogFileName = &quot;simlog.dat&quot;, sSChartLogFileName = &quot;schlog.dat&quot;
-const sSHptLogFileName = &quot;shptlog.dat&quot;, sSMessageLogFileName = &quot;smeslog.dat&quot;
+const sSChartLogFileName = &quot;schlog.dat&quot;
+const sSHptLogFileName = &quot;shptlog.dat&quot;
const sSDrawLogFileName = &quot;sdrwlog.dat&quot;, sJavaLogFileName = &quot;javalog.dat&quot;
const sSDBLogFileName = &quot;dblog.dat&quot;, sExtLogFileName = &quot;extlog.dat&quot;
-const sLogFileName = &quot;log.dat&quot;
-const cTempFileName = &quot;ttt&quot;
+const sTestGlueLogFileName = &quot;testclosure.log&quot;
+const sLogFileName = &quot;smoketest.log&quot;
+const cTempFileName = &quot;smoketest_file&quot;
const cMessageSaveOpen8Doc = &quot;Save/Open open Documents (8.0)&quot;
const cMessageSaveOpenXMLDoc = &quot;Save/Open Document XML (6/7)&quot;
@@ -44,8 +45,8 @@ const cMessageCloseDoc = &quot;Close Document&quot;
Global sWorkPath$
Global sWorkPathURL$
-Global FileChannel%
-Global MainFileChannel%
+Global LocalTestLog%
+Global GlobalTestLog%
Sub Main
call TestAllDocs()
@@ -107,24 +108,21 @@ Sub DeleteAllLogFiles()
If FileExists (sWorkPath+sSMathLogFileName) then
Kill (sWorkPath+sSMathLogFileName)
End If
- If FileExists (sWorkPath+sSImDLogFileName) then
- Kill (sWorkPath+sSImDLogFileName)
- End If
If FileExists (sWorkPath+sSChartLogFileName) then
Kill (sWorkPath+sSChartLogFileName)
End If
If FileExists (sWorkPath+sSHptLogFileName) then
Kill (sWorkPath+sSHptLogFileName)
End If
- If FileExists (sWorkPath+sSMessageLogFileName) then
- Kill (sWorkPath+sSMessageLogFileName)
- End If
If FileExists (sWorkPath+sSDrawLogFileName) then
Kill (sWorkPath+sSDrawLogFileName)
End If
If FileExists (sWorkPath+sJavaLogFileName) then
Kill (sWorkPath+sJavaLogFileName)
End If
+ If FileExists (sWorkPath+sTestGlueLogFileName) then
+ Kill (sWorkPath+sTestGlueLogFileName)
+ End If
If FileExists (sWorkPath+sSDBLogFileName) then
Kill (sWorkPath+sSDBLogFileName)
End If
@@ -143,15 +141,13 @@ Function OpenLogDat (sFileName as String) as Integer
OpenLogDat = LocaleFileChannel%
end Function
-Function GetWorkPath as string
- sTemp = &quot;$(userpath)/temp/&quot;
- GetWorkPath = CreateUnoService(&quot;com.sun.star.config.SpecialConfigManager&quot;).SubstituteVariables(sTemp)
-End Function
+Sub SetupWorkPath
+ Dim configManager as Object
+ configManager = CreateUnoService( &quot;com.sun.star.config.SpecialConfigManager&quot; )
-Function GetWorkURL as string
- sTemp = &quot;$(userurl)/temp/&quot;
- GetWorkURL = CreateUnoService(&quot;com.sun.star.config.SpecialConfigManager&quot;).SubstituteVariables(sTemp)
-End Function
+ sWorkPath = configManager.SubstituteVariables( &quot;$(userpath)/temp/&quot; )
+ sWorkPathURL = configManager.SubstituteVariables( &quot;$(userurl)/temp/&quot; )
+End Sub
Function GetSystem (sTmpWorkPath as string) as string
GetSystem = &quot;&quot;
@@ -180,100 +176,104 @@ Sub TestAllDocs()
DIM sDocURL as String, sDocPath as String
DIM nStrPos as Long
- sWorkPath = GetWorkPath
- sWorkPathURL = GetWorkURL
-
- if GetSystem (sWorkPath) = &quot;windows&quot; then
- sWorkPath = ConvertPathToWin (sWorkPath)
- end if
-
&apos;search ExtensionURL
- sDocURL = gOutPutDoc.URL
+ sDocURL = gOutputDoc.URL
CompatibilityMode(true)
nStrPos = InStrRev (sDocURL, &quot;/&quot; )
CompatibilityMode(false)
sExtensionURL = Left (sDocURL, nStrPos)
- call DeleteAllSavedFiles()
- call DeleteAllLogFiles()
- MainFileChannel = OpenLogDat (sLogFileName)
- call WriteTestSequence (MainFileChannel)
+ GlobalTestLog = OpenLogDat (sLogFileName)
+ call WriteTestSequence
if bMakeWriterTest then
- call MakeDocTest (frmWriter)
+ gCurrentDocTest = frmWriter
+ call MakeDocTest
end if
if bMakeCalcTest then
- call MakeDocTest (frmCalc)
+ gCurrentDocTest = frmCalc
+ call MakeDocTest
end if
if bMakeImpressTest then
- call MakeDocTest (frmImpress)
+ gCurrentDocTest = frmImpress
+ call MakeDocTest
end if
if bMakeDrawTest then
- call MakeDocTest (frmDraw)
+ gCurrentDocTest = frmDraw
+ call MakeDocTest
end if
if bMakeHTMLTest then
- call MakeDocTest (frmHyperText)
+ gCurrentDocTest = frmHyperText
+ call MakeDocTest
end if
if bMakeChartTest then
- call MakeChartTest (frmChart)
+ gCurrentDocTest = frmChart
+ call MakeChartTest
end if
if bMakeMathTest then
- call MakeNewDoc (frmMath)
+ gCurrentDocTest = frmMath
+ call MakeNewDoc
end if
if bMakeJavaTest then
- call TestJava (frmJava)
+ gCurrentDocTest = frmJava
+ call TestJava
end if
if bMakeDBTest then
- call Test_DB.TestDB (frmDataBase)
+ gCurrentDocTest = frmDataBase
+ call Test_DB.TestDB
end if
if bMakeExtensionTest then
- call Test_Ext.TestExtensions (frmExtension)
+ gCurrentDocTest = frmExtension
+ call Test_Ext.TestExtensions
end if
- Close #MainFileChannel
+ Close #GlobalTestLog
+ GlobalTestLog = 0
end Sub
-Sub WriteTestSequence (FileChannel as integer)
- Print #FileChannel, &quot;Sequence of testing&quot;
+Sub WriteTestSequence
+ Print #GlobalTestLog, &quot;Sequence of testing&quot;
if bMakeWriterTest then
- WriteTests (&quot;writer : &quot;, true, FileChannel)
+ WriteTests (&quot;writer : &quot;, true, GlobalTestLog)
end if
if bMakeCalcTest then
- WriteTests (&quot;calc : &quot;, true, FileChannel)
+ WriteTests (&quot;calc : &quot;, true, GlobalTestLog)
end if
if bMakeImpressTest then
- WriteTests (&quot;impress : &quot;, true, FileChannel)
+ WriteTests (&quot;impress : &quot;, true, GlobalTestLog)
end if
if bMakeDrawTest then
- WriteTests (&quot;draw : &quot;, true, FileChannel)
+ WriteTests (&quot;draw : &quot;, true, GlobalTestLog)
end if
if bMakeHTMLTest then
- WriteTests (&quot;HTML : &quot;, true, FileChannel)
+ WriteTests (&quot;HTML : &quot;, true, GlobalTestLog)
end if
if bMakeChartTest then
- WriteTests (&quot;chart : &quot;, false, FileChannel)
+ WriteTests (&quot;chart : &quot;, false, GlobalTestLog)
end if
if bMakeMathTest then
- WriteTests (&quot;math : &quot;, false, FileChannel)
+ WriteTests (&quot;math : &quot;, false, GlobalTestLog)
end if
if bMakeJavaTest then
- WriteTests (&quot;Java : &quot;, false, FileChannel)
+ WriteTests (&quot;Java : &quot;, false, GlobalTestLog)
end if
if bMakeDBTest then
- WriteDBTests (&quot;Database : &quot;, FileChannel)
+ WriteDBTests (&quot;Database : &quot;, GlobalTestLog)
end if
if bMakeExtensionTest then
- WriteExtensionTests (&quot;Extension : &quot;, FileChannel)
- end if
+ WriteExtensionTests (&quot;Extension : &quot;, GlobalTestLog)
+ end if
- Print #FileChannel
-end Sub
+ Print #GlobalTestLog, &quot;testclosure : setup, write_status&quot;
-Sub WriteTests (sText as string, bTestAll as boolean, nFileChannel as integer)
- Dim sWriteStr as string
+ Print #GlobalTestLog
+ end Sub
- sWriteStr = sText
- sWriteStr = sWriteStr + &quot;new&quot;
+ Sub WriteTests (sText as string, bTestAll as boolean)
+ Dim sWriteStr as string
+
+ sWriteStr = sText
+ sWriteStr = sWriteStr + &quot;new&quot;
if bTestAll then
if bMakeSaveOpen8Test then
sWriteStr = sWriteStr + &quot;, save 8.0&quot;
@@ -291,7 +291,7 @@ Sub WriteTests (sText as string, bTestAll as boolean, nFileChannel as integer)
sWriteStr = sWriteStr + &quot;, close&quot;
- Print #nFileChannel, sWriteStr
+ Print #GlobalTestLog, sWriteStr
end Sub
Sub WriteDBTests (sText as string, nFileChannel as integer)
@@ -318,168 +318,142 @@ Sub WriteExtensionTests (sText as string, nFileChannel as integer)
Print #nFileChannel, sWriteStr
end Sub
-Sub MakeDocTest (FilterType as Integer)
+Sub MakeDocTest
Dim oDoc as Object
Dim sFileNameXML$, sFileName8$
- Dim bError as Boolean
- Dim nCurrentAction as Integer
+ Dim bSuccess as Boolean
On Local Error GoTo DOCTESTERROR
- nCurrentAction = cLogfileFailed
- FileChannel% = OpenLogDat (GetLogFileName(FilterType))
- nCurrentAction = cDocNew
- oDoc = LoadDoc (&quot;private:factory/&quot; + GetDocFilter(FilterType or cFltNewDoc))
- LogState (not IsNull (oDoc), GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, FileChannel)
- LogState (not IsNull (oDoc), GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, MainFileChannel)
- SetStatus (FilterType, cDocNew, not IsNull (oDoc))
+ gCurrentTestCase = cLogfileFailed
+ LocalTestLog% = OpenLogDat (GetLogFileName(gCurrentDocTest))
+ gCurrentTestCase = cDocNew
+ oDoc = LoadDoc (&quot;private:factory/&quot; + GetDocFilter(gCurrentDocTest or cFltNewDoc))
+ LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, not IsNull (oDoc) )
if not IsNull (oDoc) then
- nCurrentAction = cDocSaveOpen8
- if bMakeSaveOpen8Test and IsFilterAvailable (FilterType or cFlt8) then
- sFileName8 = sWorkPathURL+cTempFileName+&quot;.&quot;+GetDocEndings(FilterType or cFlt8)
- SaveDoc (sFileName8, oDoc, GetDocFilter(FilterType or cFlt8))
+ gCurrentTestCase = cDocSaveOpen8
+ if bMakeSaveOpen8Test and IsFilterAvailable (gCurrentDocTest or cFlt8) then
+ sFileName8 = sWorkPathURL+cTempFileName+&quot;.&quot;+GetDocEndings(gCurrentDocTest or cFlt8)
+ SaveDoc (sFileName8, oDoc, GetDocFilter(gCurrentDocTest or cFlt8))
end if
- nCurrentAction = cDocSaveOpenXML
- if bMakeSaveOpenXMLTest and IsFilterAvailable (FilterType or cFltXML) then
- sFileNameXML = sWorkPathURL+cTempFileName+&quot;.&quot;+GetDocEndings(FilterType or cFltXML)
- SaveDoc (sFileNameXML, oDoc, GetDocFilter(FilterType or cFltXML))
+ gCurrentTestCase = cDocSaveOpenXML
+ if bMakeSaveOpenXMLTest and IsFilterAvailable (gCurrentDocTest or cFltXML) then
+ sFileNameXML = sWorkPathURL+cTempFileName+&quot;.&quot;+GetDocEndings(gCurrentDocTest or cFltXML)
+ SaveDoc (sFileNameXML, oDoc, GetDocFilter(gCurrentDocTest or cFltXML))
end if
-&apos; oDoc.dispose
- nCurrentAction = cDocClose
- oDoc.close (true)
-&apos; bError = true &apos; nur zum ¦bergang, weil bError = oDoc.CurrentController.frame.close nicht geht
-&apos; LogState (bError, GetDocFilter(FilterType)+&quot; &quot;+ cMessageCloseDoc, FileChannel)
-&apos; LogState (bError, GetDocFilter(FilterType)+&quot; &quot;+ cMessageCloseDoc, MainFileChannel)
-&apos; SetStatus (FilterType, cDocClose, bError)
- nCurrentAction = cDocSaveOpen8
- if bMakeSaveOpen8Test and IsFilterAvailable (FilterType or cFlt8) then
+ gCurrentTestCase = cDocClose
+ bSuccess = CloseDoc( oDoc )
+ LogTestResult( GetDocFilter(gCurrentDocTest)+&quot; &quot;+ cMessageCloseDoc, bSuccess )
+ gCurrentTestCase = cDocSaveOpen8
+ if bMakeSaveOpen8Test and IsFilterAvailable (gCurrentDocTest or cFlt8) then
oDoc = LoadDoc (sFileName8)
&apos; oDoc = Documents.open(sFileName)
- LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageSaveOpen8Doc, FileChannel)
- LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageSaveOpen8Doc, MainFileChannel)
- SetStatus (FilterType, cDocSaveOpen8, not IsNull (oDoc))
+ LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+&quot; &quot;+ cMessageSaveOpen8Doc, not IsNull (oDoc) )
if not IsNull (oDoc) then
-&apos; oDoc.dispose
- nCurrentAction = cDocClose
+ gCurrentTestCase = cDocClose
oDoc.close (true)
end If
end if
- nCurrentAction = cDocSaveOpenXML
- if bMakeSaveOpenXMLTest and IsFilterAvailable (FilterType or cFltXML) then
+ gCurrentTestCase = cDocSaveOpenXML
+ if bMakeSaveOpenXMLTest and IsFilterAvailable (gCurrentDocTest or cFltXML) then
oDoc = LoadDoc (sFileNameXML)
&apos; oDoc = Documents.open(sFileName)
- LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageSaveOpenXMLDoc, FileChannel)
- LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageSaveOpenXMLDoc, MainFileChannel)
- SetStatus (FilterType, cDocSaveOpenXML, not IsNull (oDoc))
+ LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+&quot; &quot;+ cMessageSaveOpenXMLDoc, not IsNull (oDoc) )
if not IsNull (oDoc) then
-&apos; oDoc.dispose
- nCurrentAction = cDocClose
+ gCurrentTestCase = cDocClose
oDoc.close (true)
end If
end if
end If
- Print #FileChannel, &quot;---&quot;
- Close #FileChannel%
+ Print #LocalTestLog, &quot;---&quot;
+ Close #LocalTestLog%
+ LocalTestLog = 0
Exit Sub &apos; Without error
DOCTESTERROR:
- If (nCurrentAction = cLogfileFailed) then
- SetStatus (FilterType, cDocNew, False)
+ If ( gCurrentTestCase = cLogfileFailed ) then
+ LogTestResult( &quot; &quot;, False )
Exit Sub
else
- LogState (False, GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(nCurrentAction), FileChannel)
- LogState (False, GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(nCurrentAction), MainFileChannel)
- SetStatus (FilterType, nCurrentAction, False)
- Close #FileChannel%
+ LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(gCurrentTestCase), False )
+ Close #LocalTestLog%
+ LocalTestLog = 0
End If
Exit Sub &apos; With error
End Sub
-Sub MakeNewDoc (FilterType as Integer)
+Sub MakeNewDoc
DIM oDoc as Object
- Dim bError as Boolean
- Dim nCurrentAction as Integer
+ Dim bSuccess as Boolean
On Local Error GoTo DOCTESTERROR2
- nCurrentAction = cLogfileFailed
- FileChannel% = OpenLogDat (GetLogFileName(FilterType))
- nCurrentAction = cDocNew
-&apos; oDoc = Documents.Add(GetDocFilter(FilterType))
- oDoc = LoadDoc (&quot;private:factory/&quot; + GetDocFilter(FilterType or cFltNewDoc))
- LogState (not IsNull (oDoc), GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, FileChannel)
- LogState (not IsNull (oDoc), GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, MainFileChannel)
- SetStatus (FilterType, cDocNew, not IsNull (oDoc))
+ gCurrentTestCase = cLogfileFailed
+ LocalTestLog% = OpenLogDat (GetLogFileName(gCurrentDocTest))
+ gCurrentTestCase = cDocNew
+&apos; oDoc = Documents.Add(GetDocFilter(gCurrentDocTest))
+ oDoc = LoadDoc (&quot;private:factory/&quot; + GetDocFilter(gCurrentDocTest or cFltNewDoc))
+ LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, not IsNull (oDoc) )
if not IsNull (oDoc) then
- nCurrentAction = cDocClose
-&apos; oDoc.dispose
- oDoc.close (true)
-&apos; bError = true &apos; nur zum ¦bergang, weil bError = oDoc.CurrentController.frame.close nicht geht
-&apos; LogState (bError, GetDocFilter(FilterType)+&quot; &quot;+ cMessageCloseDoc, FileChannel)
-&apos; LogState (bError, GetDocFilter(FilterType)+&quot; &quot;+ cMessageCloseDoc, MainFileChannel)
-&apos; SetStatus (FilterType, cDocClose, bError)
+ gCurrentTestCase = cDocClose
+ bSuccess = CloseDoc( oDoc )
+ LogTestResult( GetDocFilter(gCurrentDocTest)+&quot; &quot;+ cMessageCloseDoc, bSuccess )
end If
- Print #FileChannel, &quot;---&quot;
- Close #FileChannel%
+ Print #LocalTestLog, &quot;---&quot;
+ Close #LocalTestLog%
+ LocalTestLog = 0
Exit Sub &apos; Without error
DOCTESTERROR2:
- If (nCurrentAction = cLogfileFailed) then
- SetStatus (FilterType, cDocNew, False)
+ If ( gCurrentTestCase = cLogfileFailed ) then
+ LogTestResult( &quot; &quot;, False )
Exit Sub
else
- LogState (False, GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(nCurrentAction), FileChannel)
- LogState (False, GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(nCurrentAction), MainFileChannel)
- SetStatus (FilterType, nCurrentAction, False)
- Close #FileChannel%
+ LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(gCurrentTestCase), False )
+ Close #LocalTestLog%
+ LocalTestLog = 0
End If
Exit Sub &apos; With error
End Sub
-Sub MakeChartTest (FilterType as Integer)
+Sub MakeChartTest
Dim oCharts as Object
Dim oDoc as Object
Dim oRange(0) as New com.sun.star.table.CellRangeAddress
Dim oRect as New com.sun.star.awt.Rectangle
const cChartName=&quot;TestChart&quot;
- Dim bError as Boolean
- Dim nCurrentAction as Integer
- On Local Error GoTo CHARTTESTERROR
- nCurrentAction = cLogfileFailed
- FileChannel% = OpenLogDat (GetLogFileName(FilterType))
- nCurrentAction = cDocNew
- oDoc = LoadDoc (&quot;private:factory/&quot; + GetDocFilter(frmCalc or cFltNewDoc))
+ Dim bSuccess as Boolean
+ On Local Error GoTo CHARTTESTERROR
+ gCurrentTestCase = cLogfileFailed
+ LocalTestLog% = OpenLogDat (GetLogFileName(gCurrentDocTest))
+ gCurrentTestCase = cDocNew
+ oDoc = LoadDoc (&quot;private:factory/&quot; + GetDocFilter(frmCalc or cFltNewDoc))
if not IsNull (oDoc) then
oCharts = oDoc.sheets(0).Charts
oCharts.AddNewByName (cChartName, oRect, oRange(), true, true)
- bError=oCharts.HasByName(cChartName)
- LogState (bError, GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, FileChannel)
- LogState (bError, GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, MainFileChannel)
- SetStatus (FilterType, cDocNew, bError)
-&apos; oDoc.dispose
- nCurrentAction = cDocClose
+ bSuccess=oCharts.HasByName(cChartName)
+ LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, bSuccess )
+ gCurrentTestCase = cDocClose
oDoc.close (true)
else
- LogState (not IsNull (oDoc), GetDocFilter(frmCalc or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, FileChannel)
- LogState (not IsNull (oDoc), GetDocFilter(frmCalc or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, MainFileChannel)
- SetStatus (frmCalc, cDocNew, not IsNull (oDoc))
+ LogTestResult( GetDocFilter(frmCalc or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, FALSE )
End if
- Print #FileChannel, &quot;---&quot;
- Close #FileChannel%
+ Print #LocalTestLog, &quot;---&quot;
+ Close #LocalTestLog%
+ LocalTestLog = 0
Exit Sub &apos; Without error
CHARTTESTERROR:
- If (nCurrentAction = cLogfileFailed) then
- SetStatus (FilterType, cDocNew, False)
+ If ( gCurrentTestCase = cLogfileFailed ) then
+ LogTestResult( &quot; &quot;, False )
Exit Sub
else
- LogState (False, GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(nCurrentAction), FileChannel)
- LogState (False, GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(nCurrentAction), MainFileChannel)
- SetStatus (FilterType, nCurrentAction, False)
- Close #FileChannel%
+ LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(gCurrentTestCase), FALSE )
+ Close #LocalTestLog%
+ LocalTestLog = 0
End If
Exit Sub &apos; With error
End Sub
@@ -520,48 +494,44 @@ end Function
Function GetDocFilter (DocType as Integer) as String
Select Case ( DocType )
case frmWriter or cFlt8
- GetDocFilter = &quot;writer8&quot; &apos; Textdokument
+ GetDocFilter = &quot;writer8&quot; &apos; text document
case frmCalc or cFlt8
- GetDocFilter = &quot;calc8&quot; &apos;Tabellendokument
+ GetDocFilter = &quot;calc8&quot; &apos; spreadsheet document
case frmImpress or cFlt8
- GetDocFilter = &quot;impress8&quot; &apos;Präsentation
+ GetDocFilter = &quot;impress8&quot; &apos; presentation
case frmDraw or cFlt8
- GetDocFilter = &quot;draw8&quot; &apos;Zeichen
+ GetDocFilter = &quot;draw8&quot; &apos; drawing
case frmMath or cFlt8
- GetDocFilter = &quot;math8&quot; &apos;Formel
+ GetDocFilter = &quot;math8&quot; &apos; formula
case frmWriter or cFltXML
- GetDocFilter = &quot;StarOffice XML (Writer)&quot; &apos; Textdokument
+ GetDocFilter = &quot;StarOffice XML (Writer)&quot; &apos; text document
case frmCalc or cFltXML
- GetDocFilter = &quot;StarOffice XML (Calc)&quot; &apos;Tabellendokument
+ GetDocFilter = &quot;StarOffice XML (Calc)&quot; &apos; spreadsheet document
case frmImpress or cFltXML
- GetDocFilter = &quot;StarOffice XML (Impress)&quot; &apos;Präsentation
+ GetDocFilter = &quot;StarOffice XML (Impress)&quot; &apos; presentation
case frmDraw or cFltXML
- GetDocFilter = &quot;StarOffice XML (Draw)&quot; &apos;Zeichen
+ GetDocFilter = &quot;StarOffice XML (Draw)&quot; &apos; drawing
case frmMath or cFltXML
- GetDocFilter = &quot;StarOffice XML (Math)&quot; &apos;Formel
+ GetDocFilter = &quot;StarOffice XML (Math)&quot; &apos; formula
case frmHyperText, frmHyperText or cFltXML
- GetDocFilter = &quot;HTML&quot; &apos;Hypertext-Dokument
+ GetDocFilter = &quot;HTML&quot; &apos; HTML document
case frmWriter or cFltNewDoc
- GetDocFilter = &quot;swriter&quot; &apos; Textdokument
+ GetDocFilter = &quot;swriter&quot; &apos; text document
case frmCalc or cFltNewDoc
- GetDocFilter = &quot;scalc&quot; &apos;Tabellendokument
- case frmMessage or cFltNewDoc
- GetDocFilter = &quot;Message&quot; &apos;Nachricht
+ GetDocFilter = &quot;scalc&quot; &apos; spreadsheet document
case frmImpress or cFltNewDoc
- GetDocFilter = &quot;simpress&quot; &apos;Präsentation
+ GetDocFilter = &quot;simpress&quot; &apos; presentation
case frmDraw or cFltNewDoc
- GetDocFilter = &quot;sdraw&quot; &apos;Zeichen
+ GetDocFilter = &quot;sdraw&quot; &apos; drawing
case frmMath or cFltNewDoc
- GetDocFilter = &quot;smath&quot; &apos;Formel
- case frmImage or cFltNewDoc
- GetDocFilter = &quot;simage&quot; &apos;Bild
+ GetDocFilter = &quot;smath&quot; &apos; formula
case frmHyperText or cFltNewDoc
- GetDocFilter = &quot;swriter/web&quot; &apos;Hypertext-Dokument
+ GetDocFilter = &quot;swriter/web&quot; &apos; HTML document
case frmChart or cFltNewDoc
- GetDocFilter = &quot;schart&quot; &apos;Diagramm
+ GetDocFilter = &quot;schart&quot; &apos; chart
case else
GetDocFilter = &quot;&quot;
end Select
@@ -570,25 +540,23 @@ end Function
Function GetLogFileName (DocType as Integer) as String
Select Case ( DocType )
case frmWriter
- GetLogFileName = sSWLogFileName &apos; Textdokument
+ GetLogFileName = sSWLogFileName &apos; text document
case frmCalc
- GetLogFileName = sSCLogFileName &apos;Tabellendokument
- case frmMessage
- GetLogFileName = sSMessageLogFileName &apos;Nachricht
+ GetLogFileName = sSCLogFileName &apos; spreadsheet document
case frmImpress
- GetLogFileName = sSDLogFileName &apos;PrÕsentation
+ GetLogFileName = sSDLogFileName &apos; presentation
case frmDraw
- GetLogFileName = sSDrawLogFileName &apos;Zeichnen
+ GetLogFileName = sSDrawLogFileName &apos; drawing
case frmMath
- GetLogFileName = sSMathLogFileName &apos;Formel
- case frmImage
- GetLogFileName = sSImDLogFileName &apos;Bild
+ GetLogFileName = sSMathLogFileName &apos; formula
case frmHyperText
- GetLogFileName = sSHptLogFileName &apos;Hypertext-Dokument
+ GetLogFileName = sSHptLogFileName &apos; HTML document
case frmChart
- GetLogFileName = sSChartLogFileName &apos;Diagramm
+ GetLogFileName = sSChartLogFileName &apos; chart
case frmJava
GetLogFileName = sJavaLogFileName &apos;Java
+ case frmTestClosure
+ GetLogFileName = sTestGlueLogFileName &apos; test framework
case frmDataBase
GetLogFileName = sSDBLogFileName &apos;Database
case frmExtension
@@ -620,16 +588,17 @@ Function IsFilterAvailable (FilterType as Integer) as boolean
end if
End Function
-Function TestJava (FilterType as Integer) as boolean
+Function TestJava
Dim oObj as Object
- FileChannel% = OpenLogDat (GetLogFileName(FilterType))
- oObj = createUnoService(cUnoJavaLoader)
- LogState (not IsNull (oObj), &quot;Java &quot;+ cMessageNewDoc, FileChannel)
- LogState (not IsNull (oObj), &quot;Java &quot;+ cMessageNewDoc, MainFileChannel)
- SetStatus (FilterType, cDocNew, not IsNull (oObj))
+ gCurrentTestCase = cLogfileFailed
+ LocalTestLog% = OpenLogDat (GetLogFileName(gCurrentDocTest))
+ gCurrentTestCase = cDocNew
+ oObj = createUnoService( cUnoJavaLoader )
+ LogTestResult( &quot;Java &quot;+ cMessageNewDoc, not IsNull (oObj) )
- Print #FileChannel, &quot;---&quot;
- Close #FileChannel%
+ Print #LocalTestLog, &quot;---&quot;
+ Close #LocalTestLog%
+ LocalTestLog = 0
TestJava = not IsNull (oObj)
End Function
@@ -694,4 +663,19 @@ Sub SaveDoc (DocName as String, oDoc as Object, sFilterName as string )
MessageBox &quot;Filtername is unknown!&quot;
end if
end Sub
+
+Function CloseDoc( oDoc as Object )
+ Dim oListener as Object
+ oListener = CreateUnoListener( "Events.closeListener_", "com.sun.star.util.XCloseListener" )
+ oDoc.addCloseListener( oListener )
+
+ Events.ResetCloseListenerFlag()
+ oDoc.close( true )
+ closeDoc = Events.HasCloseListenerBeenCalled()
+
+ if ( Not Events.HasCloseListenerBeenCalled() ) Then
+ &apos; do this only if closing was not successful - otherwise, we'd get a DisposedException
+ oDoc.removeCloseListener( oListener )
+ End If
+End Function
</script:module>
diff --git a/smoketestoo_native/data/Test_DB.xml b/smoketestdoc/data/Test_DB.xml
index 34ade11f75fb..1f5667cae5a5 100644
--- a/smoketestoo_native/data/Test_DB.xml
+++ b/smoketestdoc/data/Test_DB.xml
@@ -35,59 +35,53 @@ const cMessageDatabaseDelete = &quot;Delete record from Database&quot;
const cMessageDatabaseSeek = &quot;Read other record from Database&quot;
const cMessageDatabaseClose = &quot;Close Database&quot;
-Sub TestDB (FilterType as Integer)
-
-Dim oDBConnection as Object, oDataSource as Object, oDBContext as Object
-Dim sDBName as String, sTable as String, sCurrentMessage as String
-Dim nRowCount as Integer, nCurrentAction as Integer
-Dim bResult as Boolean
-Const sTestString = &quot;Automatical Test&quot;
+Sub TestDB
+ Dim oDBConnection as Object, oDataSource as Object, oDBContext as Object
+ Dim sDBName as String, sTable as String, sCurrentMessage as String
+ Dim nRowCount as Integer
+ Dim bResult as Boolean
+ Const sTestString = &quot;Automatical Test&quot;
On Local Error GoTo DBERROR
- nCurrentAction = cLogfileFailed
- FileChannel% = OpenLogDat (GetLogFileName(FilterType))
+ gCurrentTestCase = cLogfileFailed
+ LocalTestLog% = OpenLogDat (GetLogFileName(gCurrentDocTest))
- nCurrentAction = cDBService
+ gCurrentTestCase = cDBService
sCurrentMessage = cMessageDatabaseService + &quot; &quot; + cUnoDatabaseContext
oDBContext = CreateUnoService(cUnoDatabaseContext)
sDBName=oDBContext.ElementNames(0) &apos;Names of Databases
- nCurrentAction = cDBOpen
+ gCurrentTestCase = cDBOpen
sCurrentMessage = cMessageDatabaseOpen
oDataSource = oDBContext.GetByName(sDBName)
sTable=oDataSource.Tables.ElementNames(0)
oDBConnection = oDBContext.GetByName(sDBName).GetConnection(&quot;&quot;,&quot;&quot;)
- LogState (not IsNull (oDBConnection), &quot;Database &quot;+ cMessageDatabaseOpen, FileChannel)
- LogState (not IsNull (oDBConnection), &quot;Database &quot;+ cMessageDatabaseOpen, MainFileChannel)
- SetStatus (FilterType, cDBOpen, not IsNull (oDBConnection))
+ LogTestResult( &quot;Database &quot;+ cMessageDatabaseOpen, not IsNull (oDBConnection) )
if (IsNull(oDBConnection)) then
- Close #FileChannel%
+ Close #LocalTestLog%
+ LocalTestLog = 0
Exit Sub
End If
&apos; Database is open now
- nCurrentAction = cDBService
+ gCurrentTestCase = cDBService
sCurrentMessage = cMessageDatabaseService + &quot; &quot; + cUnoRowSet
oRowSet = createUnoService(cUnoRowSet)
if (IsNull(oRowSet)) then
- LogState (not IsNull (oRowSet), &quot;Database &quot;+ cMessageDatabaseService + &quot; &quot; + cUnoRowSet, FileChannel)
- LogState (not IsNull (oRowSet), &quot;Database &quot;+ cMessageDatabaseService + &quot; &quot; + cUnoRowSet, MainFileChannel)
- SetStatus (FilterType, cDBService, not IsNull (oRowSet))
+ LogTestResult( &quot;Database &quot;+ cMessageDatabaseService + &quot; &quot; + cUnoRowSet, not IsNull (oRowSet) )
Exit Sub
else
- LogState (not IsNull (oRowSet), &quot;Database &quot;+ cMessageDatabaseService, FileChannel)
- LogState (not IsNull (oRowSet), &quot;Database &quot;+ cMessageDatabaseService, MainFileChannel)
- SetStatus (FilterType, cDBService, not IsNull (oRowSet))
+ LogTestResult( &quot;Database &quot;+ cMessageDatabaseService, TRUE )
End If
- nCurrentAction = cDBInsert
+ gCurrentTestCase = cDBInsert
sCurrentMessage = cMessageDatabaseInsert
oRowSet.ActiveConnection = oDBConnection
@@ -105,14 +99,12 @@ Const sTestString = &quot;Automatical Test&quot;
oRowSet.moveToCurrentRow()
bResult = (oRowSet.getString(5) = sTestString)
- LogState (bResult, &quot;Database &quot;+ cMessageDatabaseInsert, FileChannel)
- LogState (bResult, &quot;Database &quot;+ cMessageDatabaseInsert, MainFileChannel)
- SetStatus (FilterType, cDBInsert, bResult)
+ LogTestResult( &quot;Database &quot;+ cMessageDatabaseInsert, bResult )
&apos;delete only if insert passed
if (bResult) Then
- nCurrentAction = cDBDelete
+ gCurrentTestCase = cDBDelete
sCurrentMessage = cMessageDatabaseDelete
oRowSet.deleteRow()
bResult = (nRowCount - oRowSet.RowCount = 0)
@@ -120,41 +112,35 @@ Const sTestString = &quot;Automatical Test&quot;
oRowSet.next()
bResult = (nRowCount - oRowSet.RowCount = 1)
End If
- LogState (bResult, &quot;Database &quot;+ cMessageDatabaseDelete, FileChannel)
- LogState (bResult, &quot;Database &quot;+ cMessageDatabaseDelete, MainFileChannel)
- SetStatus (FilterType, cDBDelete, bResult)
+ LogTestResult( &quot;Database &quot;+ cMessageDatabaseDelete, bResult )
End If
&apos; read other record
- nCurrentAction = cDBSeek
+ gCurrentTestCase = cDBSeek
sCurrentMessage = cMessageDatabaseSeek
oRowSet.first()
bResult = not (oRowSet.getString(5) = sTestString)
- LogState (bResult, &quot;Database &quot;+ cMessageDatabaseSeek, FileChannel)
- LogState (bResult, &quot;Database &quot;+ cMessageDatabaseSeek, MainFileChannel)
- SetStatus (FilterType, cDBSeek, bResult)
+ LogTestResult( &quot;Database &quot;+ cMessageDatabaseSeek, bResult )
- nCurrentAction = cDBClose
+ gCurrentTestCase = cDBClose
sCurrentMessage = cMessageDatabaseClose
oDBConnection.Dispose()
- LogState (True, &quot;Database &quot;+ cMessageDatabaseClose, FileChannel)
- LogState (True, &quot;Database &quot;+ cMessageDatabaseClose, MainFileChannel)
- SetStatus (FilterType, cDBClose, True)
+ LogTestResult( &quot;Database &quot;+ cMessageDatabaseClose, True )
- Print #FileChannel, &quot;---&quot;
- Close #FileChannel%
+ Print #LocalTestLog, &quot;---&quot;
+ Close #LocalTestLog%
+ LocalTestLog = 0
Exit Sub &apos; Without error
DBERROR:
- If (nCurrentAction = cLogfileFailed) then
- SetStatus (FilterType, cDBOpen, False)
+ If ( gCurrentTestCase = cLogfileFailed ) then
+ LogTestResult( &quot; &quot;, False )
Exit Sub
else
- LogState (False, &quot;Database &quot;+ sCurrentMessage, FileChannel)
- LogState (False, &quot;Database &quot;+ sCurrentMessage, MainFileChannel)
- SetStatus (FilterType, nCurrentAction, False)
- Close #FileChannel%
+ LogTestResult( &quot;Database &quot;+ sCurrentMessage, FALSE )
+ Close #LocalTestLog%
+ LocalTestLog = 0
End If
Exit Sub &apos; With error
End Sub
diff --git a/smoketestoo_native/data/Test_Ext.xml b/smoketestdoc/data/Test_Ext.xml
index 31d27dc7a4a7..ac39f4816d7b 100644
--- a/smoketestoo_native/data/Test_Ext.xml
+++ b/smoketestdoc/data/Test_Ext.xml
@@ -32,21 +32,20 @@ const cMessageExtensionService = &quot;Extension Service&quot;
const cMessageExtensionInstall = &quot;Install Extension&quot;
const cMessageExtensionUninstall = &quot;Uninstall Extension&quot;
-Sub TestExtensions (FilterType as Integer)
-Dim oTestExtension as Object, obj_null as Object
-Dim sCurrentMessage as String
-Dim nCurrentAction as Integer
-Dim bResult as Boolean
-Dim sImplementationNameString as String
-sImplementationNameString = cUnoSmoketestTestExtension + &quot;$_TestExtension&quot;
+Sub TestExtensions
+ Dim oTestExtension as Object, obj_null as Object
+ Dim sCurrentMessage as String
+ Dim bResult as Boolean
+ Dim sImplementationNameString as String
+ sImplementationNameString = cUnoSmoketestTestExtension + &quot;$_TestExtension&quot;
On Local Error GoTo EXTERROR
- nCurrentAction = cLogfileFailed
- FileChannel% = OpenLogDat (GetLogFileName(FilterType))
+ gCurrentTestCase = cLogfileFailed
+ LocalTestLog% = OpenLogDat (GetLogFileName(gCurrentDocTest))
sCurrentMessage = cMessageExtensionService
- nCurrentAction = cEXTService
+ gCurrentTestCase = cEXTService
&apos;Create an implementation of com.sun.star.ucb.XCommandEnvironment which is needed for
&apos;adding the extension. The implementation is in
@@ -58,16 +57,15 @@ sImplementationNameString = cUnoSmoketestTestExtension + &quot;$_TestExtension&q
ctx = getDefaultContext
ext_mgr = ctx.getValueByName(&quot;/singletons/&quot; + cExtensionManager)
- LogState (not IsNull (ext_mgr), &quot;Extension &quot;+ cMessageExtensionService, FileChannel)
- LogState (not IsNull (ext_mgr), &quot;Extension &quot;+ cMessageExtensionService, MainFileChannel)
- SetStatus (FilterType, cEXTService, not IsNull (ext_mgr))
+ LogTestResult( &quot;Extension &quot;+ cMessageExtensionService, not IsNull (ext_mgr) )
if (IsNull(ext_mgr)) then
- Close #FileChannel%
+ Close #LocalTestLog%
+ LocalTestLog = 0
Exit Sub
End If
sCurrentMessage = cMessageExtensionInstall
- nCurrentAction = cEXTInstall
+ gCurrentTestCase = cEXTInstall
&apos;Add the extension. We must provide a file URL here.
&apos;By passing &quot;user&quot; we determine that the actions we perform on
@@ -79,16 +77,15 @@ sImplementationNameString = cUnoSmoketestTestExtension + &quot;$_TestExtension&q
&apos;Check if the extension has been added by creating a service which is contained in the extension.
oTestExtension = createUnoService(cUnoSmoketestTestExtension)
bResult = (oTestExtension.getImplementationName = sImplementationNameString)
- LogState (bResult, &quot;Extension &quot;+ cMessageExtensionInstall, FileChannel)
- LogState (bResult, &quot;Extension &quot;+ cMessageExtensionInstall, MainFileChannel)
- SetStatus (FilterType, cEXTInstall, bResult)
+ LogTestResult( &quot;Extension &quot;+ cMessageExtensionInstall, bResult )
if (not bResult) then
- Close #FileChannel%
+ Close #LocalTestLog%
+ LocalTestLog = 0
Exit Sub
End If
sCurrentMessage = cMessageExtensionUninstall
- nCurrentAction = cEXTUninstall
+ gCurrentTestCase = cEXTUninstall
&apos;Remove the package
ext_mgr.removeExtension(&quot;org.openoffice.legacy.&quot; + cExtensionFileName, cExtensionFileName, &quot;user&quot;,obj_null, cmdEnv)
@@ -97,23 +94,21 @@ sImplementationNameString = cUnoSmoketestTestExtension + &quot;$_TestExtension&q
oTestExtension = createUnoService(cUnoSmoketestTestExtension)
&apos;The service must not be available anymore. Therefor isNull must return true.
- LogState (IsNull (oTestExtension), &quot;Extension &quot;+ cMessageExtensionUninstall, FileChannel)
- LogState (IsNull (oTestExtension), &quot;Extension &quot;+ cMessageExtensionUninstall, MainFileChannel)
- SetStatus (FilterType, cEXTUninstall, IsNull (oTestExtension))
+ LogTestResult( &quot;Extension &quot;+ cMessageExtensionUninstall, IsNull (oTestExtension) )
- Print #FileChannel, &quot;---&quot;
- Close #FileChannel%
+ Print #LocalTestLog, &quot;---&quot;
+ Close #LocalTestLog%
+ LocalTestLog = 0
Exit Sub &apos; Without error
EXTERROR:
- If (nCurrentAction = cLogfileFailed) then
- SetStatus (FilterType, cEXTService, False)
+ If ( gCurrentTestCase = cLogfileFailed ) then
+ LogTestResult( &quot; &quot;, False )
Exit Sub
else
- LogState (False, &quot;Extension &quot;+ sCurrentMessage, FileChannel)
- LogState (False, &quot;Extension &quot;+ sCurrentMessage, MainFileChannel)
- SetStatus (FilterType, nCurrentAction, False)
- Close #FileChannel%
+ LogTestResult( &quot;Extension &quot;+ sCurrentMessage, False )
+ Close #LocalTestLog%
+ LocalTestLog = 0
End If
Exit Sub &apos; With error
diff --git a/smoketestdoc/data/content.xml b/smoketestdoc/data/content.xml
new file mode 100644
index 000000000000..3c81bbfbad5e
--- /dev/null
+++ b/smoketestdoc/data/content.xml
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+<office:document-content xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" office:version="1.2" grddl:transformation="http://docs.oasis-open.org/office/1.2/xslt/odf2rdf.xsl" office:class="text">
+ <office:script/>
+ <office:font-decls>
+ <style:font-decl style:name="Arial Unicode MS" fo:font-family="&apos;Arial Unicode MS&apos;" style:font-pitch="variable"/>
+ <style:font-decl style:name="HG Mincho Light J" fo:font-family="&apos;HG Mincho Light J&apos;, &apos;MS Mincho&apos;, &apos;HG Mincho J&apos;, &apos;HG Mincho L&apos;, &apos;HG Mincho&apos;, Mincho, &apos;MS PMincho&apos;, &apos;MS Gothic&apos;, &apos;HG Gothic J&apos;, &apos;HG Gothic B&apos;, &apos;HG Gothic&apos;, Gothic, &apos;MS PGothic&apos;, &apos;Andale Sans UI&apos;, &apos;Arial Unicode MS&apos;, &apos;Lucida Sans Unicode&apos;, Tahoma" style:font-pitch="variable"/>
+ <style:font-decl style:name="Thorndale" fo:font-family="Thorndale, &apos;Times New Roman&apos;, Times, &apos;Lucida Serif&apos;, &apos;Lucida Bright&apos;, Timmons, &apos;New York&apos;, Serif" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-decl style:name="Arial" fo:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ </office:font-decls>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph">
+ <style:properties fo:text-align="center"/>
+ </style:style>
+ <style:style style:name="gr1" style:family="graphics">
+ <style:properties style:wrap="run-through" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:horizontal-pos="from-left" style:horizontal-rel="paragraph"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:body>
+ <office:forms form:automatic-focus="true" form:apply-design-mode="false">
+ <form:form form:name="Standard" form:apply-filter="true" form:command-type="table" form:service-name="com.sun.star.form.component.Form" office:target-frame="" xlink:href="">
+ <form:control form:name="start" form:service-name="com.sun.star.form.component.CommandButton" form:id="control1">
+ <form:button form:label="start smoketest" office:target-frame="" xlink:href="" form:image-data="" form:delay-for-repeat="PT0.50S" form:image-position="center">
+ <form:properties>
+ <form:property form:property-name="DefaultControl" form:property-type="string">
+ <form:property-value>stardiv.one.form.control.CommandButton</form:property-value>
+ </form:property>
+ </form:properties>
+ <office:events>
+ <script:event script:language="StarBasic" script:event-name="on-performaction" script:macro-name="Standard.Global.StartTestByOptions" script:location="document" script:library="document"/>
+ </office:events>
+ </form:button>
+ </form:control>
+ <form:control form:name="options" form:service-name="com.sun.star.form.component.CommandButton" form:id="control2">
+ <form:button form:label="options" office:target-frame="" xlink:href="" form:image-data="" form:delay-for-repeat="PT0.50S" form:image-position="center">
+ <form:properties>
+ <form:property form:property-name="DefaultControl" form:property-type="string">
+ <form:property-value>stardiv.one.form.control.CommandButton</form:property-value>
+ </form:property>
+ </form:properties>
+ <office:events>
+ <script:event script:language="StarBasic" script:event-name="on-performaction" script:macro-name="Standard.Global.ShowOptionsDlg" script:location="document" script:library="document"/>
+ </office:events>
+ </form:button>
+ </form:control>
+ <form:control form:name="table" form:service-name="com.sun.star.form.component.CommandButton" form:id="control3">
+ <form:button form:label="delete table" office:target-frame="" xlink:href="" form:image-data="" form:delay-for-repeat="PT0.50S" form:image-position="center">
+ <form:properties>
+ <form:property form:property-name="DefaultControl" form:property-type="string">
+ <form:property-value>stardiv.one.form.control.CommandButton</form:property-value>
+ </form:property>
+ </form:properties>
+ <office:events>
+ <script:event script:language="StarBasic" script:event-name="on-performaction" script:macro-name="Standard.Global.ClearAllText" script:location="document" script:library="document"/>
+ </office:events>
+ </form:button>
+ </form:control>
+ </form:form>
+ </office:forms>
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ </text:sequence-decls>
+ <text:user-field-decls>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="Writer"/>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="Calc"/>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="Impress"/>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="Draw"/>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="HTML"/>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="Math"/>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="Chart"/>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="SaveOpenXML"/>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="SaveOpen50"/>
+ <text:user-field-decl text:value-type="string" text:string-value="n" text:name="Terminate"/>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="Java"/>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="SaveOpen8"/>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="Database"/>
+ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="Extension"/>
+ </text:user-field-decls>
+ <text:p text:style-name="Standard">
+ <draw:control text:anchor-type="page" text:anchor-page-number="1" svg:x="2cm" svg:y="2cm" draw:z-index="1" draw:style-name="gr1" draw:text-style-name="P1" svg:width="2.477cm" svg:height="0.787cm" form:id="control1"/>
+ <draw:control text:anchor-type="page" text:anchor-page-number="1" svg:x="5cm" svg:y="2cm" draw:z-index="0" draw:style-name="gr1" draw:text-style-name="P1" svg:width="2.477cm" svg:height="0.787cm" form:id="control2"/>
+ <draw:control text:anchor-type="page" text:anchor-page-number="1" svg:x="8cm" svg:y="2cm" draw:z-index="2" draw:style-name="gr1" draw:text-style-name="P1" svg:width="2.477cm" svg:height="0.787cm" form:id="control3"/>
+ </text:p>
+ </office:body>
+</office:document-content>
diff --git a/smoketestoo_native/data/dialog-lb.xml b/smoketestdoc/data/dialog-lb.xml
index 973dfe688828..973dfe688828 100644
--- a/smoketestoo_native/data/dialog-lb.xml
+++ b/smoketestdoc/data/dialog-lb.xml
diff --git a/smoketestoo_native/data/dialog-lc.xml b/smoketestdoc/data/dialog-lc.xml
index e3a5a0e326e4..e3a5a0e326e4 100644
--- a/smoketestoo_native/data/dialog-lc.xml
+++ b/smoketestdoc/data/dialog-lc.xml
diff --git a/smoketestoo_native/data/makefile.mk b/smoketestdoc/data/makefile.mk
index 2096d07de90e..6cf2706b52b2 100644
--- a/smoketestoo_native/data/makefile.mk
+++ b/smoketestdoc/data/makefile.mk
@@ -26,7 +26,7 @@
#***********************************************************************/
PRJ = ..
-PRJNAME = smoketestoo_native
+PRJNAME = smoketestdoc
TARGET = data
.INCLUDE: settings.mk
@@ -50,21 +50,21 @@ $(MISC)/zip/smoketestdoc.sxw: \
script-lc.xml \
settings.xml \
styles.xml
- $(RM) -r $(MISC)/zip
- $(MKDIR) $(MISC)/zip
- $(COPY) content.xml meta.xml settings.xml styles.xml $(MISC)/zip/
- printf application/vnd.sun.xml.writer > $(MISC)/zip/mimetype
- $(MKDIR) $(MISC)/zip/META-INF
- $(COPY) manifest.xml $(MISC)/zip/META-INF/
- $(MKDIR) $(MISC)/zip/Basic
- $(COPY) script-lc.xml $(MISC)/zip/Basic/
- $(MKDIR) $(MISC)/zip/Basic/Standard
- $(COPY) script-lb.xml Events.xml Global.xml Test_10er.xml Test_DB.xml \
+ $(COMMAND_ECHO)$(RM) -r $(MISC)/zip
+ $(COMMAND_ECHO)$(MKDIR) $(MISC)/zip
+ $(COMMAND_ECHO)$(COPY) content.xml meta.xml settings.xml styles.xml $(MISC)/zip/
+ $(COMMAND_ECHO)printf application/vnd.sun.xml.writer > $(MISC)/zip/mimetype
+ $(COMMAND_ECHO)$(MKDIR) $(MISC)/zip/META-INF
+ $(COMMAND_ECHO)$(COPY) manifest.xml $(MISC)/zip/META-INF/
+ $(COMMAND_ECHO)$(MKDIR) $(MISC)/zip/Basic
+ $(COMMAND_ECHO)$(COPY) script-lc.xml $(MISC)/zip/Basic/
+ $(COMMAND_ECHO)$(MKDIR) $(MISC)/zip/Basic/Standard
+ $(COMMAND_ECHO)$(COPY) script-lb.xml Events.xml Global.xml Test_10er.xml Test_DB.xml \
Test_Ext.xml $(MISC)/zip/Basic/Standard/
- $(MKDIR) $(MISC)/zip/Dialogs
- $(COPY) dialog-lc.xml $(MISC)/zip/Dialogs/
- $(MKDIR) $(MISC)/zip/Dialogs/Standard
- $(COPY) dialog-lb.xml OptionsDlg.xml $(MISC)/zip/Dialogs/Standard/
- cd $(MISC)/zip && zip -rD $(@:f) .
+ $(COMMAND_ECHO)$(MKDIR) $(MISC)/zip/Dialogs
+ $(COMMAND_ECHO)$(COPY) dialog-lc.xml $(MISC)/zip/Dialogs/
+ $(COMMAND_ECHO)$(MKDIR) $(MISC)/zip/Dialogs/Standard
+ $(COMMAND_ECHO)$(COPY) dialog-lb.xml OptionsDlg.xml $(MISC)/zip/Dialogs/Standard/
+ $(COMMAND_ECHO)cd $(MISC)/zip && zip -rD $(@:f) .
.INCLUDE: target.mk
diff --git a/smoketestoo_native/data/manifest.xml b/smoketestdoc/data/manifest.xml
index 48fc9ce900a0..48fc9ce900a0 100644
--- a/smoketestoo_native/data/manifest.xml
+++ b/smoketestdoc/data/manifest.xml
diff --git a/smoketestoo_native/data/meta.xml b/smoketestdoc/data/meta.xml
index 43f14295e2b3..43f14295e2b3 100644
--- a/smoketestoo_native/data/meta.xml
+++ b/smoketestdoc/data/meta.xml
diff --git a/smoketestoo_native/data/script-lb.xml b/smoketestdoc/data/script-lb.xml
index fc4f6c6370ba..fc4f6c6370ba 100644
--- a/smoketestoo_native/data/script-lb.xml
+++ b/smoketestdoc/data/script-lb.xml
diff --git a/smoketestoo_native/data/script-lc.xml b/smoketestdoc/data/script-lc.xml
index e3a5a0e326e4..e3a5a0e326e4 100644
--- a/smoketestoo_native/data/script-lc.xml
+++ b/smoketestdoc/data/script-lc.xml
diff --git a/smoketestoo_native/data/settings.xml b/smoketestdoc/data/settings.xml
index cd4524b741ff..cd4524b741ff 100644
--- a/smoketestoo_native/data/settings.xml
+++ b/smoketestdoc/data/settings.xml
diff --git a/smoketestoo_native/data/styles.xml b/smoketestdoc/data/styles.xml
index 3f8d75fa6db3..3f8d75fa6db3 100644
--- a/smoketestoo_native/data/styles.xml
+++ b/smoketestdoc/data/styles.xml
diff --git a/smoketestdoc/prj/build.lst b/smoketestdoc/prj/build.lst
new file mode 100755
index 000000000000..ec825ab48049
--- /dev/null
+++ b/smoketestdoc/prj/build.lst
@@ -0,0 +1,4 @@
+smdoc smoketestdoc :: soltools codemaker unoil javaunohelper NULL
+smdoc smoketestdoc usr1 - all smdoc_mkout NULL
+smdoc smoketestdoc\data nmake - all smdoc_data NULL
+smdoc smoketestdoc\com\sun\star\comp\smoketest nmake - all smdoc_ext NULL
diff --git a/smoketestdoc/prj/d.lst b/smoketestdoc/prj/d.lst
new file mode 100755
index 000000000000..618cd83a145b
--- /dev/null
+++ b/smoketestdoc/prj/d.lst
@@ -0,0 +1,4 @@
+mkdir: %_DEST%\bin%_EXT%
+
+..\%__SRC%\bin\smoketestdoc.sxw %_DEST%\bin%_EXT%\smoketestdoc.sxw
+..\%__SRC%\bin\TestExtension.oxt %_DEST%\bin%_EXT%\TestExtension.oxt
diff --git a/smoketestoo_native/data/content.xml b/smoketestoo_native/data/content.xml
deleted file mode 100644
index dcd31b1759e4..000000000000
--- a/smoketestoo_native/data/content.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--**********************************************************************
-*
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* Copyright 2000, 2010 Oracle and/or its affiliates.
-*
-* OpenOffice.org - a multi-platform office productivity suite
-*
-* This file is part of OpenOffice.org.
-*
-* OpenOffice.org is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License version 3
-* only, as published by the Free Software Foundation.
-*
-* OpenOffice.org is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Lesser General Public License version 3 for more details
-* (a copy is included in the LICENSE file that accompanied this code).
-*
-* You should have received a copy of the GNU Lesser General Public License
-* version 3 along with OpenOffice.org. If not, see
-* <http://www.openoffice.org/license.html>
-* for a copy of the LGPLv3 License.
-*
-**********************************************************************-->
-<office:document-content xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" office:version="1.2" grddl:transformation="http://docs.oasis-open.org/office/1.2/xslt/odf2rdf.xsl" office:class="text"><office:script/><office:font-decls><style:font-decl style:name="Arial Unicode MS" fo:font-family="&apos;Arial Unicode MS&apos;" style:font-pitch="variable"/><style:font-decl style:name="HG Mincho Light J" fo:font-family="&apos;HG Mincho Light J&apos;, &apos;MS Mincho&apos;, &apos;HG Mincho J&apos;, &apos;HG Mincho L&apos;, &apos;HG Mincho&apos;, Mincho, &apos;MS PMincho&apos;, &apos;MS Gothic&apos;, &apos;HG Gothic J&apos;, &apos;HG Gothic B&apos;, &apos;HG Gothic&apos;, Gothic, &apos;MS PGothic&apos;, &apos;Andale Sans UI&apos;, &apos;Arial Unicode MS&apos;, &apos;Lucida Sans Unicode&apos;, Tahoma" style:font-pitch="variable"/><style:font-decl style:name="Thorndale" fo:font-family="Thorndale, &apos;Times New Roman&apos;, Times, &apos;Lucida Serif&apos;, &apos;Lucida Bright&apos;, Timmons, &apos;New York&apos;, Serif" style:font-family-generic="roman" style:font-pitch="variable"/><style:font-decl style:name="Arial" fo:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable"/></office:font-decls><office:automatic-styles><style:style style:name="P1" style:family="paragraph"><style:properties fo:text-align="center"/></style:style><style:style style:name="gr1" style:family="graphics"><style:properties style:wrap="run-through" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:horizontal-pos="from-left" style:horizontal-rel="paragraph"/></style:style></office:automatic-styles><office:body><office:forms form:automatic-focus="false" form:apply-design-mode="false"><form:form form:name="Standard" form:apply-filter="true" form:command-type="table" form:service-name="com.sun.star.form.component.Form" office:target-frame="" xlink:href=""><form:control form:name="options" form:service-name="com.sun.star.form.component.CommandButton" form:id="control1"><form:button form:label="options" office:target-frame="" xlink:href="" form:image-data="" form:delay-for-repeat="PT0.50S" form:image-position="center"><form:properties><form:property form:property-name="DefaultControl" form:property-type="string"><form:property-value>stardiv.one.form.control.CommandButton</form:property-value></form:property></form:properties><office:events><script:event script:language="StarBasic" script:event-name="on-performaction" script:macro-name="Standard.Global.ShowOptionsDlg" script:location="document" script:library="document"/></office:events></form:button></form:control><form:control form:name="start" form:service-name="com.sun.star.form.component.CommandButton" form:id="control2"><form:button form:label="start smoketest" office:target-frame="" xlink:href="" form:image-data="" form:delay-for-repeat="PT0.50S" form:image-position="center"><form:properties><form:property form:property-name="DefaultControl" form:property-type="string"><form:property-value>stardiv.one.form.control.CommandButton</form:property-value></form:property></form:properties><office:events><script:event script:language="StarBasic" script:event-name="on-performaction" script:macro-name="Standard.Global.StartTestByOptions" script:location="document" script:library="document"/></office:events></form:button></form:control><form:control form:name="table" form:service-name="com.sun.star.form.component.CommandButton" form:id="control3"><form:button form:label="delete table" office:target-frame="" xlink:href="" form:image-data="" form:delay-for-repeat="PT0.50S" form:image-position="center"><form:properties><form:property form:property-name="DefaultControl" form:property-type="string"><form:property-value>stardiv.one.form.control.CommandButton</form:property-value></form:property></form:properties><office:events><script:event script:language="StarBasic" script:event-name="on-performaction" script:macro-name="Standard.Global.ClearAllText" script:location="document" script:library="document"/></office:events></form:button></form:control></form:form></office:forms><text:sequence-decls><text:sequence-decl text:display-outline-level="0" text:name="Illustration"/><text:sequence-decl text:display-outline-level="0" text:name="Table"/><text:sequence-decl text:display-outline-level="0" text:name="Text"/><text:sequence-decl text:display-outline-level="0" text:name="Drawing"/></text:sequence-decls><text:user-field-decls><text:user-field-decl text:value-type="string" text:string-value="y" text:name="Writer"/><text:user-field-decl text:value-type="string" text:string-value="y" text:name="Calc"/><text:user-field-decl text:value-type="string" text:string-value="y" text:name="Impress"/><text:user-field-decl text:value-type="string" text:string-value="y" text:name="Draw"/><text:user-field-decl text:value-type="string" text:string-value="y" text:name="HTML"/><text:user-field-decl text:value-type="string" text:string-value="y" text:name="Math"/><text:user-field-decl text:value-type="string" text:string-value="y" text:name="Chart"/><text:user-field-decl text:value-type="string" text:string-value="y" text:name="SaveOpenXML"/><text:user-field-decl text:value-type="string" text:string-value="y" text:name="SaveOpen50"/><text:user-field-decl text:value-type="string" text:string-value="n" text:name="Terminate"/><text:user-field-decl text:value-type="string" text:string-value="y" text:name="Java"/><text:user-field-decl text:value-type="string" text:string-value="y" text:name="SaveOpen8"/><text:user-field-decl text:value-type="string" text:string-value="y" text:name="Database"/><text:user-field-decl text:value-type="string" text:string-value="y" text:name="Extension"/></text:user-field-decls><text:p text:style-name="Standard"><draw:control text:anchor-type="as-char" svg:y="0cm" draw:z-index="1" draw:style-name="gr1" draw:text-style-name="P1" svg:width="2.477cm" svg:height="0.787cm" form:id="control2"/><draw:control text:anchor-type="as-char" svg:y="0cm" draw:z-index="0" draw:style-name="gr1" draw:text-style-name="P1" svg:width="2.477cm" svg:height="0.787cm" form:id="control1"/><draw:control text:anchor-type="as-char" svg:y="0cm" draw:z-index="2" draw:style-name="gr1" draw:text-style-name="P1" svg:width="2.477cm" svg:height="0.787cm" form:id="control3"/></text:p><text:p text:style-name="Standard"/></office:body></office:document-content>
diff --git a/smoketestoo_native/makefile.mk b/smoketestoo_native/makefile.mk
index 18f3a42b789f..aab245371a72 100644..100755
--- a/smoketestoo_native/makefile.mk
+++ b/smoketestoo_native/makefile.mk
@@ -29,6 +29,8 @@ TARGET = smoketest
ENABLE_EXCEPTIONS = TRUE
+ABORT_ON_ASSERTION = TRUE
+
.INCLUDE: settings.mk
CFLAGSCXX += $(CPPUNIT_CFLAGS)
@@ -56,18 +58,18 @@ ALLTAR : cpptest
cpptest : $(SHL1TARGETN)
-TEST_ARGUMENTS = smoketest.doc=$(BIN)/smoketestdoc.sxw
+TEST_ARGUMENTS = smoketest.doc=$(OUTDIR)/bin$(UPDMINOREXT)/smoketestdoc.sxw
CPPTEST_LIBRARY = $(SHL1TARGETN)
.IF "$(OS)" != "WNT"
$(installationtest_instpath).flag : $(shell ls \
$(installationtest_instset)/OOo_*_install-arc_$(defaultlangiso).tar.gz)
- $(RM) -r $(installationtest_instpath)
- $(MKDIRHIER) $(installationtest_instpath)
- cd $(installationtest_instpath) && $(GNUTAR) xfz \
+ $(COMMAND_ECHO)$(RM) -r $(installationtest_instpath)
+ $(COMMAND_ECHO)$(MKDIRHIER) $(installationtest_instpath)
+ $(COMMAND_ECHO)cd $(installationtest_instpath) && $(GNUTAR) xfz \
$(installationtest_instset)/OOo_*_install-arc_$(defaultlangiso).tar.gz
- $(MV) $(installationtest_instpath)/OOo_*_install-arc_$(defaultlangiso) \
+ $(COMMAND_ECHO)$(MV) $(installationtest_instpath)/OOo_*_install-arc_$(defaultlangiso) \
$(installationtest_instpath)/opt
- $(TOUCH) $@
+ $(COMMAND_ECHO)$(TOUCH) $@
cpptest : $(installationtest_instpath).flag
.END
diff --git a/smoketestoo_native/prj/build.lst b/smoketestoo_native/prj/build.lst
index 147a363d3da5..9527079f56d2 100644..100755
--- a/smoketestoo_native/prj/build.lst
+++ b/smoketestoo_native/prj/build.lst
@@ -1,5 +1,3 @@
-smtoon smoketestoo_native :: instsetoo_native test NULL
+smtoon smoketestoo_native :: instsetoo_native test smoketestdoc NULL
smtoon smoketestoo_native usr1 - all smoketestoonative_mkout NULL
-smtoon smoketestoo_native\com\sun\star\comp\smoketest nmake - all smoketestoonative_csscs NULL
-smtoon smoketestoo_native\data nmake - all smoketestoonative_data NULL
-smtoon smoketestoo_native nmake - all,test10 smoketestoonative_mk smoketestoonative_csscs smoketestoonative_data NULL
+smtoon smoketestoo_native nmake - all,test10 smoketestoonative_mk NULL
diff --git a/smoketestoo_native/smoketest.cxx b/smoketestoo_native/smoketest.cxx
index a4e532123456..5fd16914b0d7 100644..100755
--- a/smoketestoo_native/smoketest.cxx
+++ b/smoketestoo_native/smoketest.cxx
@@ -151,13 +151,18 @@ void Test::test() {
CPPUNIT_ASSERT(
test::getTestArgument(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("smoketest.doc")), &doc));
- css::uno::Sequence< css::beans::PropertyValue > args(1);
+ css::uno::Sequence< css::beans::PropertyValue > args(2);
args[0].Name = rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM("MacroExecutionMode"));
args[0].Handle = -1;
args[0].Value <<=
com::sun::star::document::MacroExecMode::ALWAYS_EXECUTE_NO_WARN;
args[0].State = css::beans::PropertyState_DIRECT_VALUE;
+ args[1].Name = rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("ReadOnly"));
+ args[1].Handle = -1;
+ args[1].Value <<= sal_True;
+ args[1].State = css::beans::PropertyState_DIRECT_VALUE;
css::util::URL url;
url.Complete = rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM(
diff --git a/solenv/bin/cws.pl b/solenv/bin/cws.pl
index c613d13bcbb1..62a6b2763761 100644
--- a/solenv/bin/cws.pl
+++ b/solenv/bin/cws.pl
@@ -407,16 +407,9 @@ sub hg_clone_cws_or_milestone
my $masterws = $cws->master();
my ($master_local_source, $master_lan_source);
- if ($rep_type eq "ooo" || $rep_type eq "so")
- {
- $master_local_source = "$hg_local_source/" . $masterws;
- $master_lan_source = "$hg_lan_source/" . $masterws;
- }
- else
- {
- $master_local_source = "$hg_local_source/master_".$rep_type."/".$masterws;
- $master_lan_source = "$hg_lan_source/master_".$rep_type."/".$masterws;
- }
+
+ $master_local_source = "$hg_local_source/" . $masterws;
+ $master_lan_source = "$hg_lan_source/" . $masterws;
my $milestone_tag;
if ( $clone_milestone_only ) {
diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm
index 1536cb993db0..41df76644874 100644
--- a/solenv/bin/modules/installer/globals.pm
+++ b/solenv/bin/modules/installer/globals.pm
@@ -43,6 +43,7 @@ BEGIN
"km",
"nr",
"ns",
+ "nso",
"rw",
"ss",
"st",
@@ -88,7 +89,12 @@ BEGIN
"ml",
"as",
"ast",
- "ht"
+ "ht",
+ "jbo",
+ "fur",
+ "ny",
+ "so",
+ "kab"
);
@items_at_modules = ("Files", "Dirs", "Unixlinks");
@asianlanguages = ("ja", "ko", "zh-CN", "zh-TW");
diff --git a/solenv/bin/modules/installer/simplepackage.pm b/solenv/bin/modules/installer/simplepackage.pm
index 2e870ba48712..1f392f4f6c86 100644..100755
--- a/solenv/bin/modules/installer/simplepackage.pm
+++ b/solenv/bin/modules/installer/simplepackage.pm
@@ -127,25 +127,7 @@ sub register_extensions
if ( ! -f $unopkgfile ) { installer::exiter::exit_program("ERROR: $unopkgfile not found!", "register_extensions"); }
- my $localtemppath = installer::systemactions::create_directories("uno", $languagestringref);
-
- my $slash = "";
-
- if ( $installer::globals::iswindowsbuild )
- {
- if ( $^O =~ /cygwin/i )
- {
- $localtemppath = $installer::globals::cyg_temppath;
- $preregdir = qx{cygpath -m "$preregdir"};
- chomp($preregdir);
- }
- $localtemppath =~ s/\\/\//g;
- $slash = "/"; # Third slash for Windows. Other OS pathes already start with "/"
- }
-
- $preregdir =~ s/\/\s*$//g;
-
- my $systemcall = $unopkgfile . " sync --verbose -env:BUNDLED_EXTENSIONS_USER=\"file://" . $slash . $preregdir . "\"" . " -env:UserInstallation=file://" . $slash . $localtemppath . " -env:UNO_JAVA_JFW_ENV_JREHOME=true 2\>\&1 |";
+ my $systemcall = $unopkgfile . " sync --verbose" . " -env:UNO_JAVA_JFW_ENV_JREHOME=true 2\>\&1 |";
print "... $systemcall ...\n";
diff --git a/solenv/bin/packmodule b/solenv/bin/packmodule
index d3ae30d48dcd..f2279cfed3f7 100755
--- a/solenv/bin/packmodule
+++ b/solenv/bin/packmodule
@@ -55,6 +55,7 @@ def main(args):
deliverlog = open(os.path.join('inc', module, 'gb_deliver.log'))
packedmodule = zipfile.ZipFile(os.path.join(zipdir,module+'.zip'), 'w')
[packedmodule.write(path) for path in stripped_paths_to_pack(deliverlog)]
+ packedmodule.write(os.path.join('inc', module, 'gb_deliver.log'))
packedmodule.close()
if __name__ == "__main__":
diff --git a/solenv/config/sdev300.ini b/solenv/config/sdev300.ini
index fbd8f87617d5..441f97ceda50 100644
--- a/solenv/config/sdev300.ini
+++ b/solenv/config/sdev300.ini
@@ -200,7 +200,6 @@ finish
SOLARSRC %SRC_ROOT%
SOURCE_ROOT_DIR $expand(%SOLARSRC%/..)
ANT_HOME %COMMON_BUILD_TOOLS%$/apache-ant-1.7.1
- DBGSV_INIT %SOLARENV%/bin/dbgsv.ini
WORKDIR %SOLARVERSION%/%INPATH%/workdir
OUTDIR %SOLARVERSION%/%INPATH%
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index a3b18a4a0bbd..c44ad5947010 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -28,6 +28,10 @@
# CppunitTest class
+# in non-product builds, ensure that tools-based assertions do not pop up as message box, but are routed to the shell
+DBGSV_ERROR_OUT := shell
+export DBGSV_ERROR_OUT
+
# defined by platform
# gb_CppunitTest_TARGETTYPE
# gb_CppunitTest_get_filename
diff --git a/solenv/gbuild/JunitTest.mk b/solenv/gbuild/JunitTest.mk
index afc9486fd5a4..5699398241ca 100644
--- a/solenv/gbuild/JunitTest.mk
+++ b/solenv/gbuild/JunitTest.mk
@@ -30,6 +30,10 @@
gb_JunitTest_JAVACOMMAND := $(JAVAINTERPRETER) $(JAVAIFLAGS)
+# in non-product builds, ensure that tools-based assertions do not pop up as message box, but are routed to the shell
+DBGSV_ERROR_OUT := shell
+export DBGSV_ERROR_OUT
+
.PHONY : $(call gb_JunitTest_get_clean_target,%)
$(call gb_JunitTest_get_clean_target,%) : $(call gb_JavaClassSet_get_clean_target,$(call gb_JunitTest_get_classsetname,%))
$(call gb_Helper_abbreviate_dirs,\
diff --git a/solenv/gbuild/extensions/post_PackModule.mk b/solenv/gbuild/extensions/post_PackModule.mk
index 3a573cbc5d7e..f39268a9eea7 100644
--- a/solenv/gbuild/extensions/post_PackModule.mk
+++ b/solenv/gbuild/extensions/post_PackModule.mk
@@ -41,7 +41,7 @@ packmodule : COMMAND := true
endif
endef
-packmodule : all deliverlog
+packmodule : allandcheck deliverlog
$(eval $(call gb_PackModule_setpackmodulecommand))
$(COMMAND)
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 3c7010a32158..6d22074dc8e6 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -100,7 +100,7 @@ gb_ENABLE_PCH := $(false)
endif
# for clean, setuplocal and removelocal goals we switch off dependencies
-ifneq ($(filter clean setuplocal removelocal showdeliverables,$(MAKECMDGOALS)),)
+ifneq ($(filter cleanpackmodule clean setuplocal removelocal showdeliverables,$(MAKECMDGOALS)),)
gb_FULLDEPS := $(false)
else
gb_FULLDEPS := $(true)
diff --git a/solenv/inc/installationtest.mk b/solenv/inc/installationtest.mk
index b7b49c4aec3b..8553a739d5d1 100644
--- a/solenv/inc/installationtest.mk
+++ b/solenv/inc/installationtest.mk
@@ -23,6 +23,22 @@
# for a copy of the LGPLv3 License.
#***********************************************************************/
+# relevant for non-product builds only, but built unconditionally
+.IF "$(ABORT_ON_ASSERTION)" != ""
+ DBGSV_ERROR_OUT=abort
+ SAL_DIAGNOSE_ABORT=TRUE
+ .EXPORT: SAL_DIAGNOSE_ABORT
+.ELSE
+ DBGSV_ERROR_OUT=shell
+.ENDIF
+.EXPORT: DBGSV_ERROR_OUT
+
+# don't allow to overwrite DBGSV_ERROR_OUT with an INI file. Otherwise, people
+# might be tempted to put an DBGSV_INIT into their .bash_profile which points to a file
+# delcaring to ignore all assertions completely ...
+DBGSV_INIT=
+.EXPORT: DBGSV_INIT
+
.IF "$(OS)" == "WNT"
my_file = file:///
.ELSE
@@ -79,28 +95,29 @@ my_javaenv = \
# on other platforms, a single installation to solver is created in
# smoketestoo_native:
.IF "$(OS)" == "WNT" && "$(OOO_TEST_SOFFICE)" == ""
+OOO_EXTRACT_TO:=$(shell cygpath -m `mktemp -dt ooosmoke.XXXXXX`)
$(MISC)/$(TARGET)/installation.flag : $(shell \
ls $(installationtest_instset)/OOo_*_install-arc_$(defaultlangiso).zip)
- $(MKDIRHIER) $(@:d)
- my_tmp=$$(cygpath -m $$(mktemp -dt ooosmoke.XXXXXX)) && \
- unzip $(installationtest_instset)/OOo_*_install-arc_$(defaultlangiso).zip \
- -d "$$my_tmp" && \
- mv "$$my_tmp"/OOo_*_install-arc_$(defaultlangiso) "$$my_tmp"/opt && \
- echo "$$my_tmp" > $@
+ $(COMMAND_ECHO)$(MKDIRHIER) $(@:d)
+ $(COMMAND_ECHO)unzip -q $(installationtest_instset)/OOo_*_install-arc_$(defaultlangiso).zip -d "$(OOO_EXTRACT_TO)"
+ $(COMMAND_ECHO)mv "$(OOO_EXTRACT_TO)"/OOo_*_install-arc_$(defaultlangiso) "$(OOO_EXTRACT_TO)"/opt
+ $(COMMAND_ECHO)echo "$(OOO_EXTRACT_TO)" > $@
.END
cpptest .PHONY :
- $(RM) -r $(MISC)/$(TARGET)/user
- $(MKDIRHIER) $(MISC)/$(TARGET)/user
+ $(COMMAND_ECHO)$(RM) -r $(MISC)/$(TARGET)/user
+ $(COMMAND_ECHO)$(MKDIRHIER) $(MISC)/$(TARGET)/user
$(CPPUNITTESTER) \
-env:UNO_SERVICES=$(my_file)$(SOLARXMLDIR)/ure/services.rdb \
-env:UNO_TYPES=$(my_file)$(SOLARBINDIR)/types.rdb \
-env:arg-soffice=$(my_soffice) -env:arg-user=$(MISC)/$(TARGET)/user \
- $(my_cppenv) $(TEST_ARGUMENTS:^"-env:arg-testarg.") $(CPPTEST_LIBRARY)
- # As a workaround for #i111400#, ignore failure of $(RM):
- - $(RM) -r $(MISC)/$(TARGET)/user
+ $(my_cppenv) $(TEST_ARGUMENTS:^"-env:arg-testarg.") --protector \
+ $(SOLARSHAREDBIN)/unoexceptionprotector$(DLLPOST) \
+ unoexceptionprotector $(CPPTEST_LIBRARY)
+# As a workaround for #i111400#, ignore failure of $(RM):
+ $(COMMAND_ECHO)- $(RM) -r $(MISC)/$(TARGET)/user
.IF "$(OS)" == "WNT" && "$(OOO_TEST_SOFFICE)" == ""
- $(RM) -r $(installationtest_instpath) $(MISC)/$(TARGET)/installation.flag
+ $(COMMAND_ECHO)$(RM) -r $(installationtest_instpath) $(MISC)/$(TARGET)/installation.flag
cpptest : $(MISC)/$(TARGET)/installation.flag
.END
@@ -137,5 +154,5 @@ javatest : $(MISC)/$(TARGET)/installation.flag
.END
.ELSE
javatest .PHONY :
- echo 'javatest needs SOLAR_JAVA=TRUE and OOO_JUNIT_JAR'
+ @echo 'javatest needs SOLAR_JAVA=TRUE and OOO_JUNIT_JAR'
.END
diff --git a/solenv/inc/langlist.mk b/solenv/inc/langlist.mk
index e3ac2e5065ff..4f311a1bec4a 100644
--- a/solenv/inc/langlist.mk
+++ b/solenv/inc/langlist.mk
@@ -59,6 +59,7 @@ eu \
fa \
fi \
fr \
+fur \
ga \
gd \
gl \
@@ -73,6 +74,7 @@ hu \
is \
it \
ja \
+jbo \
kid \
ky \
ka \
@@ -104,6 +106,7 @@ nn \
nr \
ns \
nso \
+ny \
om \
oms \
oc \
@@ -131,7 +134,7 @@ sq \
sk \
sl \
sh \
-son \
+so \
sr \
ss \
st \
diff --git a/solenv/inc/minor.mk b/solenv/inc/minor.mk
index a1cbad32a4e0..19b8ca8eed4e 100644
--- a/solenv/inc/minor.mk
+++ b/solenv/inc/minor.mk
@@ -1,5 +1,5 @@
RSCVERSION=300
-RSCREVISION=300m102(Build:9577)
-BUILD=9577
-LAST_MINOR=m102
+RSCREVISION=300m103(Build:9578)
+BUILD=9578
+LAST_MINOR=m103
SOURCEVERSION=DEV300
diff --git a/solenv/inc/tg_wntx64.mk b/solenv/inc/tg_wntx64.mk
index 12e049763a84..85f60c0f95a0 100644
--- a/solenv/inc/tg_wntx64.mk
+++ b/solenv/inc/tg_wntx64.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -131,7 +131,7 @@ $(LIB2TARGET_X64) : $(LIB2FILES_X64) \
$(DEF1TARGETN_X64) : \
$(DEF1DEPN_X64) \
$(DEF1EXPORTFILE_X64)
- @-$(MKDIR) $(MISC_X64)
+ @-$(MKDIR) $(MISC_X64)
@-$(RM) $@.tmpfile
@echo ------------------------------
@echo Making Module-Definitionfile : $@
@@ -210,7 +210,7 @@ $(DEF2TARGETN_X64) : \
SHL1VERSIONOBJ_X64:=$(VERSIONOBJ_X64:d){$(subst,$(UPD)$(DLLPOSTFIX),_dflt $(SHL1TARGET_X64))}$(VERSIONOBJ_X64:f)
USE_VERSIONH_X64:=$(INCCOM)/$(SHL1VERSIONOBJ_X64:b).h
SHL1VERSIONOBJDEP_X64:=$(VERSIONOBJ_X64:d){$(subst,$(UPD)$(DLLPOSTFIX),_dflt $(SHL1TARGET_X64))}$(VERSIONOBJ_X64:f)
-$(MISC_X64)/$(SHL1VERSIONOBJ_X64:b).c : $(SOLARENV)/src/version.c $(INCCOM)/$(SHL1VERSIONOBJ_X64:b).h
+$(MISC_X64)/$(SHL1VERSIONOBJ_X64:b).c : make_x64_dirs $(SOLARENV)/src/version.c $(INCCOM)/$(SHL1VERSIONOBJ_X64:b).h
$(COMMAND_ECHO)$(TYPE) $(SOLARENV)/src/version.c | $(SED) s/_version.h/$(SHL1VERSIONOBJ_X64:b).h/ > $@
.INIT : $(SHL1VERSIONOBJDEP_X64)
.ENDIF
@@ -354,7 +354,7 @@ ALLTAR : $(SHL2IMPLIBN_X64)
SHL2VERSIONOBJ_X64:=$(VERSIONOBJ_X64:d){$(subst,$(UPD)$(DLLPOSTFIX),_dflt $(SHL2TARGET_X64))}$(VERSIONOBJ_X64:f)
USE_VERSIONH_X64:=$(INCCOM)/$(SHL2VERSIONOBJ_X64:b).h
SHL2VERSIONOBJDEP_X64:=$(VERSIONOBJ_X64:d){$(subst,$(UPD)$(DLLPOSTFIX),_dflt $(SHL2TARGET_X64))}$(VERSIONOBJ_X64:f)
-$(MISC_X64)/$(SHL2VERSIONOBJ_X64:b).c : $(SOLARENV)/src/version.c $(INCCOM)/$(SHL2VERSIONOBJ_X64:b).h
+$(MISC_X64)/$(SHL2VERSIONOBJ_X64:b).c : make_x64_dirs $(SOLARENV)/src/version.c $(INCCOM)/$(SHL2VERSIONOBJ_X64:b).h
$(COMMAND_ECHO)$(TYPE) $(SOLARENV)/src/version.c | $(SED) s/_version.h/$(SHL2VERSIONOBJ_X64:b).h/ > $@
.INIT : $(SHL2VERSIONOBJDEP_X64)
.ENDIF
diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx
index af22c04c79ff..fae0250e9002 100644
--- a/svl/source/undo/undo.cxx
+++ b/svl/source/undo/undo.cxx
@@ -711,7 +711,7 @@ sal_uInt16 SfxUndoManager::GetUndoActionId() const
DBG_ASSERT( m_pData->pActUndoArray->nCurUndoAction > 0, "svl::SfxUndoManager::GetUndoActionId(), illegal id!" );
if ( m_pData->pActUndoArray->nCurUndoAction == 0 )
- return NULL;
+ return 0;
return m_pData->pActUndoArray->aUndoActions[m_pData->pActUndoArray->nCurUndoAction-1].pAction->GetId();
}
diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx
index eee61c5c2dee..ecbfc8afbe1a 100644
--- a/svx/source/form/fmundo.cxx
+++ b/svx/source/form/fmundo.cxx
@@ -66,6 +66,7 @@
#include <comphelper/property.hxx>
#include <comphelper/uno3.hxx>
#include <comphelper/stl_types.hxx>
+#include <comphelper/componentcontext.hxx>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::awt;
@@ -88,7 +89,9 @@ typedef cppu::WeakImplHelper1< XScriptListener > ScriptEventListener_BASE;
class ScriptEventListenerWrapper : public ScriptEventListener_BASE
{
public:
- ScriptEventListenerWrapper( FmFormModel& _rModel) throw ( RuntimeException ) : pModel(&_rModel)
+ ScriptEventListenerWrapper( FmFormModel& _rModel) throw ( RuntimeException )
+ :m_rModel( _rModel )
+ ,m_attemptedListenerCreation( false )
{
}
@@ -98,7 +101,7 @@ public:
// XScriptListener
virtual void SAL_CALL firing(const ScriptEvent& evt) throw(RuntimeException)
{
- setModel();
+ attemptListenerCreation();
if ( m_vbaListener.is() )
{
m_vbaListener->firing( evt );
@@ -107,7 +110,7 @@ public:
virtual Any SAL_CALL approveFiring(const ScriptEvent& evt) throw( com::sun::star::reflection::InvocationTargetException, RuntimeException)
{
- setModel();
+ attemptListenerCreation();
if ( m_vbaListener.is() )
{
return m_vbaListener->approveFiring( evt );
@@ -116,61 +119,32 @@ public:
}
private:
- void setModel()
+ void attemptListenerCreation()
{
- if ( !m_vbaListener.is() )
- {
- Reference < XPropertySet > xProps(
- ::comphelper::getProcessServiceFactory(), UNO_QUERY );
- if ( xProps.is() )
- {
- Reference< XComponentContext > xCtx( xProps->getPropertyValue(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), UNO_QUERY );
- if ( xCtx.is() )
- {
- Reference< XMultiComponentFactory > xMFac(
- xCtx->getServiceManager(), UNO_QUERY );
-
- // SfxObjectShellRef is good here since the model controls the lifetime of the shell
- SfxObjectShellRef xObjSh = pModel->GetObjectShell();
- Reference< XMultiServiceFactory > xDocFac;
- if ( xObjSh.Is() )
- xDocFac.set( xObjSh->GetModel(), UNO_QUERY );
+ if ( m_attemptedListenerCreation )
+ return;
+ m_attemptedListenerCreation = true;
- if ( xMFac.is() )
- {
- m_vbaListener.set( xMFac->createInstanceWithContext(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "ooo.vba.EventListener" ) ), xCtx ),
- UNO_QUERY_THROW );
- }
- }
- }
+ try
+ {
+ ::comphelper::ComponentContext const aContext( ::comphelper::getProcessServiceFactory() );
+ Reference< XScriptListener > const xScriptListener( aContext.createComponent( "ooo.vba.EventListener" ), UNO_QUERY_THROW );
+ Reference< XPropertySet > const xListenerProps( xScriptListener, UNO_QUERY_THROW );
+ // SfxObjectShellRef is good here since the model controls the lifetime of the shell
+ SfxObjectShellRef const xObjectShell = m_rModel.GetObjectShell();
+ ENSURE_OR_THROW( xObjectShell.Is(), "no object shell!" );
+ xListenerProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Model" ) ), makeAny( xObjectShell->GetModel() ) );
+
+ m_vbaListener = xScriptListener;
}
- Reference< XPropertySet > xProps( m_vbaListener, UNO_QUERY );
- if ( xProps.is() )
+ catch( Exception const & )
{
- try
- {
- // SfxObjectShellRef is good here since the model controls the lifetime of the shell
- SfxObjectShellRef xObjSh = pModel->GetObjectShell();
- if ( xObjSh.Is() && m_vbaListener.is() )
- {
- Any aVal;
- aVal <<= xObjSh->GetModel();
- xProps->setPropertyValue(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Model" ) ),
- aVal );
- }
- }
- catch( Exception& )
- {
- //swallow any errors
- }
+ DBG_UNHANDLED_EXCEPTION();
}
}
- FmFormModel* pModel;
- Reference< XScriptListener > m_vbaListener;
+ FmFormModel& m_rModel;
+ Reference< XScriptListener > m_vbaListener;
+ bool m_attemptedListenerCreation;
};
diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx
index 094cfbd96ee5..d1bc7d4d610e 100644
--- a/svx/source/stbctrls/pszctrl.cxx
+++ b/svx/source/stbctrls/pszctrl.cxx
@@ -78,7 +78,7 @@
String SvxPosSizeStatusBarControl::GetMetricStr_Impl( long nVal )
{
// Applikations-Metrik besorgen und setzen
- FieldUnit eOutUnit = SfxModule::GetCurrentFieldUnit();
+ FieldUnit eOutUnit = SfxModule::GetModuleFieldUnit( getFrameInterface() );
FieldUnit eInUnit = FUNIT_100TH_MM;
String sMetric;
diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx
index 76fd7d423324..7666c1064e15 100644
--- a/svx/source/tbxctrls/itemwin.cxx
+++ b/svx/source/tbxctrls/itemwin.cxx
@@ -491,7 +491,7 @@ SvxMetricField::SvxMetricField(
SetLast( 5000 );
SetFirst( 0 );
- eDlgUnit = SfxModule::GetCurrentFieldUnit();
+ eDlgUnit = SfxModule::GetModuleFieldUnit( mxFrame );
SetFieldUnit( *this, eDlgUnit, sal_False );
Show();
}
@@ -576,7 +576,7 @@ void SvxMetricField::SetCoreUnit( SfxMapUnit eUnit )
void SvxMetricField::RefreshDlgUnit()
{
- FieldUnit eTmpUnit = SfxModule::GetCurrentFieldUnit();
+ FieldUnit eTmpUnit = SfxModule::GetModuleFieldUnit( mxFrame );
if ( eDlgUnit != eTmpUnit )
{
eDlgUnit = eTmpUnit;
diff --git a/sw/AllLangResTarget_sw.mk b/sw/AllLangResTarget_sw.mk
index d59ddd700a92..271e7577e6c7 100644
--- a/sw/AllLangResTarget_sw.mk
+++ b/sw/AllLangResTarget_sw.mk
@@ -107,6 +107,7 @@ $(eval $(call gb_SrsTarget_add_files,sw/res,\
sw/source/ui/dialog/wordcountdialog.src \
sw/source/ui/dochdl/dochdl.src \
sw/source/ui/dochdl/selglos.src \
+ sw/source/ui/docvw/annotation.src \
sw/source/ui/docvw/access.src \
sw/source/ui/docvw/docvw.src \
sw/source/ui/envelp/envelp.src \
diff --git a/sw/inc/IDocumentLayoutAccess.hxx b/sw/inc/IDocumentLayoutAccess.hxx
index 8ff2f4c52588..ee04ec055f1a 100644
--- a/sw/inc/IDocumentLayoutAccess.hxx
+++ b/sw/inc/IDocumentLayoutAccess.hxx
@@ -30,6 +30,7 @@
#include <swtypes.hxx>
+class ViewShell;
class SwRootFrm;
class SwFrmFmt;
class SfxItemSet;
@@ -44,12 +45,15 @@ public:
/** Returns the layout set at the document.
*/
- virtual const SwRootFrm* GetRootFrm() const = 0;
- virtual SwRootFrm* GetRootFrm() = 0;
+ virtual const ViewShell* GetCurrentViewShell() const = 0;
+ virtual ViewShell* GetCurrentViewShell() = 0; //swmod 071107//swmod 071225
+ virtual const SwRootFrm* GetCurrentLayout() const = 0;
+ virtual SwRootFrm* GetCurrentLayout() = 0; //swmod 080218
+ virtual bool HasLayout() const = 0;
/** !!!The old layout must be deleted!!!
*/
- virtual void SetRootFrm( SwRootFrm* pNew ) = 0;
+ virtual void SetCurrentViewShell( ViewShell* pNew ) = 0; //swmod 071107//swmod 071225
/**
*/
diff --git a/sw/inc/authfld.hxx b/sw/inc/authfld.hxx
index 03ef2af83cea..67ca9eb2b02f 100644
--- a/sw/inc/authfld.hxx
+++ b/sw/inc/authfld.hxx
@@ -89,13 +89,15 @@ class SW_DLLPUBLIC SwAuthorityFieldType : public SwFieldType
// @@@ private copy assignment, but public copy ctor? @@@
const SwAuthorityFieldType& operator=( const SwAuthorityFieldType& );
+protected:
+virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
+
public:
SwAuthorityFieldType(SwDoc* pDoc);
SwAuthorityFieldType( const SwAuthorityFieldType& );
~SwAuthorityFieldType();
virtual SwFieldType* Copy() const;
- virtual 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 );
diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx
index 407688df2a5f..f34ea4d9995e 100644
--- a/sw/inc/calbck.hxx
+++ b/sw/inc/calbck.hxx
@@ -25,143 +25,161 @@
*
************************************************************************/
-/*************************************************************
-#* Service-Klassen
- *************************************************************/
-
-/*
-#* Aendert sich ein Attribut in einem Format, so muss diese
-#* Aenderung an alle abhaengigen Formate und ueber sie an
-#* alle betroffenen Nodes propagiert werden. Dabei muss
-#* festgestellt werden, ob die Aenderung einen Effekt haben
-#* kann, oder ob das geaenderte Attribut von dem abhaengigen
-#* Format ueberdefiniert wird (so dass ohnehin der
-#* Attributwert des abhaengigen Formates den geaenderten
-#* Wert verdeckt). Weiterhin kann der betroffene Node
-#* feststellen, ob er von dem geaenderten Attribut Gebrauch
-#* macht (Beispiel: Linienabstand fuer Unterstreichung wurde
-#* geaendert, das Attribut Unterstreichung wurde aber nicht
-#* verwendet). So wird bei Aenderungen der minimale Aufwand
-#* zum Reformatieren erkannt.
- */
#ifndef _CALBCK_HXX
#define _CALBCK_HXX
#include <tools/rtti.hxx>
#include "swdllapi.h"
+#include <boost/noncopyable.hpp>
class SwModify;
class SwClientIter;
class SfxPoolItem;
-class SvStream;
+class SfxHint;
+
+/*
+ SwModify and SwClient cooperate in propagating attribute changes.
+ If an attribute changes, the change is notified to all dependent
+ formats and other interested objects, e.g. Nodes. The clients will detect
+ if the change affects them. It could be that the changed attribute is
+ overruled in the receiving object so that its change does not become
+ effective or that the receiver is not interested in the particular attribute
+ in general (though probably in other attributes of the SwModify object they
+ are registered in).
+ As SwModify objects are derived from SwClient, they can create a chain of SwClient
+ objects where changes can get propagated through.
+ Each SwClient can be registered at only one SwModify object, while each SwModify
+ object is connected to a list of SwClient objects. If an object derived from SwClient
+ wants to get notifications from more than one SwModify object, it must create additional
+ SwClient objects. The SwDepend class allows to handle their notifications in the same
+ notification callback as it forwards the Modify() calls it receives to a "master"
+ SwClient implementation.
+ The SwClientIter class allows to iterate over the SwClient objects registered at an
+ SwModify. For historical reasons its ability to use TypeInfo to restrict this iteration
+ to objects of a particular type created a lot of code that misuses SwClient-SwModify
+ relationships that basically should be used only for Modify() callbacks.
+ This is still subject to refactoring.
+ Until this gets resolved, new SwClientIter base code should be reduced to the absolute
+ minimum and it also should be wrapped by SwIterator templates that prevent that the
+ code gets polluted by pointer casts (see switerator.hxx).
+ */
// ----------
// SwClient
// ----------
-class SW_DLLPUBLIC SwClient
+class SW_DLLPUBLIC SwClient : ::boost::noncopyable
{
+ // avoids making the details of the linked list and the callback method public
friend class SwModify;
friend class SwClientIter;
- SwClient *pLeft, *pRight; // 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; // double-linked list of other clients
+ SwModify *pRegisteredIn; // event source
-protected:
- SwModify *pRegisteredIn;
+ // in general clients should not be removed when their SwModify sends out Modify()
+ // notifications; in some rare cases this is necessary, but only the concrete SwClient
+ // sub class will know that; this flag allows to make that known
+ bool mbIsAllowedToBeRemovedInModifyCall;
+
+ // callbacks received from SwModify (friend class - so these methods can be private)
+ // should be called only from SwModify the client is registered in
+ // mba: IMHO these methods should be pure virtual
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+ virtual void SwClientNotify( const SwModify& rModify, const SfxHint& rHint );
+protected:
// single argument ctors shall be explicit.
explicit SwClient(SwModify *pToRegisterIn);
+ // write access to pRegisteredIn shall be granted only to the object itself (protected access)
+ SwModify* GetRegisteredInNonConst() const { return pRegisteredIn; }
+ void SetIsAllowedToBeRemovedInModifyCall( bool bSet ) { mbIsAllowedToBeRemovedInModifyCall = bSet; }
+
public:
+
inline SwClient();
virtual ~SwClient();
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+ // in case an SwModify object is destroyed that itself is registered in another SwModify,
+ // its SwClient objects can decide to get registered to the latter instead by calling this method
+ void CheckRegistration( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue );
+
+ // controlled access to Modify method
+ // mba: this is still considered a hack and it should be fixed; the name makes grep-ing easier
+ void ModifyNotification( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue ) { Modify ( pOldValue, pNewValue ); }
+ void SwClientNotifyCall( const SwModify& rModify, const SfxHint& rHint ) { SwClientNotify( rModify, rHint ); }
+
const SwModify* GetRegisteredIn() const { return pRegisteredIn; }
+ bool IsLast() const { return !pLeft && !pRight; }
- //rtti, abgeleitete moegens gleichtun oder nicht. Wenn sie es gleichtun
- //kann ueber die Abhaengigkeitsliste eines Modify typsicher gecastet
- //werden.
+ // needed for class SwClientIter
TYPEINFO();
- void LockModify() { bModifyLocked = sal_True; }
- void UnlockModify() { bModifyLocked = sal_False; }
- void SetInCache( sal_Bool bNew ) { bInCache = bNew; }
- void SetInSwFntCache( sal_Bool bNew ) { bInSwFntCache = bNew; }
- sal_Bool IsModifyLocked() const { return bModifyLocked; }
- sal_Bool IsInDocDTOR() const { return bInDocDTOR; }
- sal_Bool IsInCache() const { return bInCache; }
- sal_Bool IsInSwFntCache() const { return bInSwFntCache; }
-
- // erfrage vom Client Informationen
+ // get information about attribute
virtual sal_Bool GetInfo( SfxPoolItem& ) const;
-
-private:
- SwClient( const SwClient& );
- SwClient &operator=( const SwClient& );
};
inline SwClient::SwClient() :
- pLeft(0), pRight(0), pRegisteredIn(0)
-{ bModifyLocked = bInModify = bInDocDTOR = bInCache = bInSwFntCache = sal_False; }
-
+ pLeft(0), pRight(0), pRegisteredIn(0), mbIsAllowedToBeRemovedInModifyCall(false)
+{}
// ----------
// SwModify
// ----------
-// Klasse hat eine doppelt Verkette Liste fuer die Abhaengigen.
-
class SW_DLLPUBLIC SwModify: public SwClient
{
- friend SvStream& operator<<( SvStream& aS, SwModify & );
+// friend class SwClientIter;
- friend class SwClientIter;
- SwClient* pRoot;
+ SwClient* pRoot; // the start of the linked list of clients
+ sal_Bool bModifyLocked : 1; // don't broadcast changes now
+ sal_Bool bLockClientList : 1; // may be set when this instance notifies its clients
+ sal_Bool bInDocDTOR : 1; // workaround for problems when a lot of objects are destroyed
+ sal_Bool bInCache : 1;
+ sal_Bool bInSwFntCache : 1;
- SwClient *_Remove(SwClient *pDepend);
+ // mba: IMHO this method should be pure virtual
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
public:
- SwModify() : pRoot(0) {}
+ SwModify();
+
+ // broadcasting: send notifications to all clients
+ void NotifyClients( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue );
+
+ // the same, but without setting bModifyLocked or checking for any of the flags
+ // mba: it would be interesting to know why this is necessary
+ // also allows to limit callback to certain type (HACK)
+ void ModifyBroadcast( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue, TypeId nType = TYPE(SwClient) );
+
+ // a more universal broadcasting mechanism
+ void CallSwClientNotify( const SfxHint& rHint ) const;
// single argument ctors shall be explicit.
- explicit SwModify(SwModify *pToRegisterIn );
+ explicit SwModify( SwModify *pToRegisterIn );
virtual ~SwModify();
- virtual void Modify( SfxPoolItem *pOldValue, SfxPoolItem *pNewValue );
void Add(SwClient *pDepend);
- SwClient *Remove(SwClient *pDepend)
- { return bInDocDTOR ? 0 : _Remove( pDepend ); }
-
+ SwClient* Remove(SwClient *pDepend);
const SwClient* GetDepends() const { return pRoot; }
- // erfrage vom Client Informationen
+ // get information about attribute
virtual sal_Bool GetInfo( SfxPoolItem& ) const;
- void SetInDocDTOR() { bInDocDTOR = sal_True; }
+ void LockModify() { bModifyLocked = sal_True; }
+ void UnlockModify() { bModifyLocked = sal_False; }
+ void SetInCache( sal_Bool bNew ) { bInCache = bNew; }
+ void SetInSwFntCache( sal_Bool bNew ) { bInSwFntCache = bNew; }
+ void SetInDocDTOR() { bInDocDTOR = sal_True; }
+ sal_Bool IsModifyLocked() const { return bModifyLocked; }
+ sal_Bool IsInDocDTOR() const { return bInDocDTOR; }
+ sal_Bool IsInCache() const { return bInCache; }
+ sal_Bool IsInSwFntCache() const { return bInSwFntCache; }
void CheckCaching( const sal_uInt16 nWhich );
-
- sal_Bool IsLastDepend() const
- { return pRoot && !pRoot->pLeft && !pRoot->pRight; }
-
-private:
- // forbidden and not implemented (see @ SwClient).
- SwModify & operator= (const SwModify &);
-
-protected:
- // forbidden and not implemented (see @ SwClient),
- // but GCC >= 3.4 needs an accessible "T (const T&)"
- // to pass a "T" as a "const T&" argument
- SwModify (const SwModify &);
+ bool IsLastDepend() { return pRoot && pRoot->IsLast(); }
+ int GetClientCount() const;
};
// ----------
@@ -169,9 +187,7 @@ 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.
+ * Helper class for objects that need to depend on more than one SwClient
*/
class SW_DLLPUBLIC SwDepend: public SwClient
{
@@ -182,69 +198,63 @@ public:
SwDepend(SwClient *pTellHim, SwModify *pDepend);
SwClient* GetToTell() { return pToTell; }
- virtual void Modify( SfxPoolItem *pOldValue, SfxPoolItem *pNewValue );
- // erfrage vom Client Informationen
virtual sal_Bool GetInfo( SfxPoolItem & ) const;
-private:
- // forbidden and not implemented (see @ SwClient).
- SwDepend (const SwDepend &);
- SwDepend & operator= (const SwDepend &);
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNewValue );
+ virtual void SwClientNotify( const SwModify& rModify, const SfxHint& rHint );
};
class SwClientIter
{
- friend SwClient* SwModify::_Remove(SwClient *); // fuer Ptr-Korrektur
- friend void SwModify::Add(SwClient *); // nur fuer ASSERT !
+ friend SwClient* SwModify::Remove(SwClient *); // for pointer adjustments
+ friend void SwModify::Add(SwClient *pDepend); // for pointer adjustments
- SwModify const& rRoot;
- SwClient *pAkt, *pDelNext;
- // fuers Updaten der aller Iteratoren beim Einfuegen/Loeschen von
- // Clients, wenn der Iterator gerade draufsteht.
- SwClientIter *pNxtIter;
+ const SwModify& rRoot;
- SwClient* mpWatchClient; // if set, SwModify::_Remove checks if this client is removed
+ // the current object in an iteration
+ SwClient* pAct;
- TypeId aSrchId; // fuer First/Next - suche diesen Type
+ // in case the current object is already removed, the next object in the list
+ // is marked down to become the current object in the next step
+ // this is necessary because iteration requires access to members of the current object
+ SwClient* pDelNext;
-public:
- SW_DLLPUBLIC SwClientIter( SwModify const& );
- SW_DLLPUBLIC ~SwClientIter();
+ // SwClientIter objects are tracked in linked list so that they can react
+ // when the current (pAct) or marked down (pDelNext) SwClient is removed
+ // from its SwModify
+ SwClientIter *pNxtIter;
- const SwModify& GetModify() const { return rRoot; }
+ // iterator can be limited to return only SwClient objects of a certain type
+ TypeId aSrchId;
-#ifndef CFRONT
- SwClient* operator++(int); // zum Naechsten
- SwClient* operator--(int); // zum Vorherigen
-#endif
- SwClient* operator++(); // zum Naechsten
- SwClient* operator--(); // zum Vorherigen
+public:
+ SW_DLLPUBLIC SwClientIter( const SwModify& );
+ SW_DLLPUBLIC ~SwClientIter();
- SwClient* GoStart(); // zum Anfang
- SwClient* GoEnd(); // zum Ende
+ const SwModify& GetModify() const { return rRoot; }
- inline SwClient* GoRoot(); // wieder ab Root (==Start) anfangen
+ SwClient* operator++(int);
+ SwClient* GoStart();
+ SwClient* GoEnd();
+ // returns the current SwClient object;
+ // in case this was already removed, the object marked down to become
+ // the next current one is returned
SwClient* operator()() const
- { return pDelNext == pAkt ? pAkt : pDelNext; }
+ { return pDelNext == pAct ? pAct : pDelNext; }
- int IsChanged() const { return pDelNext != pAkt; }
+ // return "true" if an object was removed from a client chain in iteration
+ // adding objects to a client chain in iteration is forbidden
+ // SwModify::Add() asserts this
+ bool IsChanged() const { return pDelNext != pAct; }
SW_DLLPUBLIC SwClient* First( TypeId nType );
SW_DLLPUBLIC SwClient* Next();
-
- const SwClient* GetWatchClient() const { return mpWatchClient; }
- void SetWatchClient( SwClient* pWatch ) { mpWatchClient = pWatch; }
+ SW_DLLPUBLIC SwClient* Last( TypeId nType );
+ SW_DLLPUBLIC SwClient* Previous();
};
-inline SwClient* SwClientIter::GoRoot() // wieder ab Root anfangen
-{
- pAkt = rRoot.pRoot;
- return (pDelNext = pAkt);
-}
-
-
-
#endif
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 4ae1650e8538..6dbb2fbc3fe7 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -327,6 +327,9 @@ protected:
*/
SW_DLLPRIVATE void UpdateMarkedListLevel();
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
public:
TYPEINFO();
SwCrsrShell( SwDoc& rDoc, Window *pWin, const SwViewOption *pOpt = 0 );
@@ -334,8 +337,6 @@ public:
SwCrsrShell( SwCrsrShell& rShell, Window *pWin );
virtual ~SwCrsrShell();
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-
// IShellCursorSupplier
virtual SwPaM & CreateNewShellCursor();
virtual SwPaM & GetCurrentShellCursor();
diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx
index 7d5fec3e37c0..e5754c510360 100644
--- a/sw/inc/dcontact.hxx
+++ b/sw/inc/dcontact.hxx
@@ -28,17 +28,14 @@
#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"
+#include <anchoreddrawobject.hxx>
class SfxPoolItem;
class SwFrmFmt;
@@ -50,13 +47,10 @@ class SwVirtFlyDrawObj;
class SwFmtAnchor;
class SwFlyDrawObj;
class SwRect;
-// OD 17.06.2003 #108784# - forward declaration for class <SwDrawVirtObj>
class SwDrawContact;
-// OD 2004-01-16 #110582#
struct SwPosition;
class SwIndex;
-// OD 2004-03-25 #i26791#
-#include <anchoreddrawobject.hxx>
+class SdrTextObj;
//Der Umgekehrte Weg: Sucht das Format zum angegebenen Objekt.
//Wenn das Object ein SwVirtFlyDrawObj ist so wird das Format von
@@ -212,7 +206,7 @@ public:
@author
*/
- virtual void GetAnchoredObjs( std::vector<SwAnchoredObject*>& _roAnchoredObjs ) const = 0;
+ virtual void GetAnchoredObjs( std::list<SwAnchoredObject*>& _roAnchoredObjs ) const = 0;
/** get minimum order number of anchored objects handled by with contact
@@ -240,14 +234,9 @@ private:
// OD 2004-04-01 #i26791#
SwFlyDrawObj* mpMasterObj;
- /** method to determine new order number for new instance of <SwVirtFlyDrawObj>
-
- OD 2004-08-16 #i27030#
- Used in method <CreateNewRef(..)>.
-
- @author OD
- */
- sal_uInt32 _GetOrdNumForNewRef( const SwFlyFrm* pFlyFrm );
+protected:
+ // virtuelle Methoden von SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
public:
TYPEINFO();
@@ -265,11 +254,6 @@ public:
virtual SdrObject* GetMaster();
virtual void SetMaster( SdrObject* _pNewMaster );
- SwVirtFlyDrawObj* CreateNewRef( SwFlyFrm* pFly );
-
- // virtuelle Methoden von SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
-
// OD 2004-01-16 #110582# - override methods to control Writer fly frames,
// which are linked, and to assure that all objects anchored at/inside the
// Writer fly frame are also made visible/invisible.
@@ -282,7 +266,7 @@ public:
@author
*/
- virtual void GetAnchoredObjs( std::vector<SwAnchoredObject*>& _roAnchoredObjs ) const;
+ virtual void GetAnchoredObjs( std::list<SwAnchoredObject*>& _roAnchoredObjs ) const;
};
// OD 16.05.2003 #108784# - new class for re-direct methods calls at a 'virtual'
@@ -468,6 +452,11 @@ class SwDrawContact : public SwContact
SwDrawContact( const SwDrawContact& );
SwDrawContact& operator=( const SwDrawContact& );
// <--
+
+ protected:
+ // virtuelle Methoden von SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
+
public:
TYPEINFO();
@@ -530,9 +519,6 @@ class SwDrawContact : public SwContact
// by frame.
SdrObject* GetDrawObjectByAnchorFrm( const SwFrm& _rAnchorFrm );
- // virtuelle Methoden von SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
-
// virtuelle Methoden von SdrObjUserCall
virtual void Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectangle& rOldBoundRect);
@@ -555,7 +541,9 @@ class SwDrawContact : public SwContact
@author
*/
- virtual void GetAnchoredObjs( std::vector<SwAnchoredObject*>& _roAnchoredObjs ) const;
+
+ static void GetTextObjectsFromFmt( std::list<SdrTextObj*>&, SwDoc* );
+ virtual void GetAnchoredObjs( std::list<SwAnchoredObject*>& _roAnchoredObjs ) const;
};
#endif
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 8ac03ff109bd..a72f4f46ec32 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -328,7 +328,7 @@ class SW_DLLPUBLIC SwDoc :
SwTOXTypes *pTOXTypes; // Verzeichnisse
SwDefTOXBase_Impl * pDefTOXBases; // defaults of SwTOXBase's
- SwRootFrm *pLayout; // Rootframe des spezifischen Layouts.
+ ViewShell *pCurrentView; // SwDoc should get a new member pCurrentView//swmod 071225
SdrModel *pDrawModel; // StarView Drawing
SwDocUpdtFld *pUpdtFlds; // Struktur zum Field-Update
@@ -458,7 +458,6 @@ private:
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
@@ -590,6 +589,8 @@ private:
bool mbProtectForm : 1;
bool mbTabAtLeftIndentForParagraphsInList; // OD 2008-06-05 #i89181# - see above
+ bool mbLastBrowseMode : 1;
+
// #i78591#
sal_uInt32 n32DummyCompatabilityOptions1;
sal_uInt32 n32DummyCompatabilityOptions2;
@@ -948,15 +949,18 @@ public:
/** IDocumentLayoutAccess
*/
- virtual const SwRootFrm* GetRootFrm() const ;
- virtual SwRootFrm* GetRootFrm();
- virtual void SetRootFrm( SwRootFrm* pNew );
+ virtual void SetCurrentViewShell( ViewShell* pNew );//swmod 071225
virtual SwLayouter* GetLayouter();
virtual const SwLayouter* GetLayouter() const;
virtual void SetLayouter( SwLayouter* pNew );
virtual SwFrmFmt* MakeLayoutFmt( RndStdIds eRequest, const SfxItemSet* pSet );
virtual void DelLayoutFmt( SwFrmFmt *pFmt );
virtual SwFrmFmt* CopyLayoutFmt( const SwFrmFmt& rSrc, const SwFmtAnchor& rNewAnchor, bool bSetTxtFlyAtt, bool bMakeFrms );
+ virtual const ViewShell *GetCurrentViewShell() const; //swmod 080219
+ virtual ViewShell *GetCurrentViewShell();//swmod 080219 It must be able to communicate to a ViewShell.This is going to be removerd later.
+ virtual const SwRootFrm *GetCurrentLayout() const;
+ virtual SwRootFrm *GetCurrentLayout();//swmod 080219
+ virtual bool HasLayout() const;
/** IDocumentTimerAccess
*/
@@ -1158,6 +1162,8 @@ public:
String GetUniqueOLEName() const;
String GetUniqueFrameName() const;
+ std::set<SwRootFrm*> GetAllLayouts();//swmod 080225
+
void SetFlyName( SwFlyFrmFmt& rFmt, const String& rName );
const SwFlyFrmFmt* FindFlyByName( const String& rName, sal_Int8 nNdTyp = 0 ) const;
@@ -1326,16 +1332,13 @@ public:
// get the set of printable pages for the XRenderable API by
// evaluating the respective settings (see implementation)
- void CalculatePagesForPrinting( SwRenderData &rData, const SwPrintUIOptions &rOptions, bool bIsPDFExport,
+ void CalculatePagesForPrinting( const SwRootFrm& rLayout, SwRenderData &rData, const SwPrintUIOptions &rOptions, bool bIsPDFExport,
sal_Int32 nDocPageCount );
void UpdatePagesForPrintingWithPostItData( SwRenderData &rData, const SwPrintUIOptions &rOptions, bool bIsPDFExport,
sal_Int32 nDocPageCount );
- void CalculatePagePairsForProspectPrinting( SwRenderData &rData, const SwPrintUIOptions &rOptions,
+ void CalculatePagePairsForProspectPrinting( const SwRootFrm& rLayout, SwRenderData &rData, const SwPrintUIOptions &rOptions,
sal_Int32 nDocPageCount );
- sal_uInt16 GetPageCount() const;
- const Size GetPageSize( sal_uInt16 nPageNum, bool bSkipEmptyPages ) const;
-
//PageDescriptor-Schnittstelle
sal_uInt16 GetPageDescCnt() const { return aPageDescs.Count(); }
const SwPageDesc& GetPageDesc( const sal_uInt16 i ) const { return *aPageDescs[i]; }
@@ -1898,7 +1901,7 @@ public:
// update all modified OLE-Objects. The modification is called over the
// StarOne - Interface --> Bug 67026
void SetOLEObjModified()
- { if( GetRootFrm() ) aOLEModifiedTimer.Start(); }
+ { if( GetCurrentViewShell() ) aOLEModifiedTimer.Start(); } //swmod 071107//swmod 071225
// -------------------- Uno - Schnittstellen ---------------------------
const SwUnoCrsrTbl& GetUnoCrsrTbl() const { return *pUnoCrsrTbl; }
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index 1b6091668c67..cf475663c5cd 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -278,7 +278,7 @@ public:
void EnterWait( sal_Bool bLockDispatcher );
void LeaveWait( sal_Bool bLockDispatcher );
- void ToggleBrowserMode(sal_Bool bOn, SwView* pView = 0);
+ void ToggleBrowserMode(sal_Bool bOn, SwView* pView);
sal_uLong LoadStylesFromFile( const String& rURL, SwgReaderOption& rOpt,
sal_Bool bUnoCall );
diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx
index af61eeec61dd..4889288caf09 100644
--- a/sw/inc/docufld.hxx
+++ b/sw/inc/docufld.hxx
@@ -639,8 +639,10 @@ public:
SwRefPageSetFieldType();
virtual SwFieldType* Copy() const;
+
+protected:
// ueberlagert, weil es nichts zum Updaten gibt!
- virtual void Modify( SfxPoolItem *, SfxPoolItem * );
+ virtual void Modify( const SfxPoolItem*, const SfxPoolItem * );
};
/*--------------------------------------------------------------------
@@ -680,15 +682,13 @@ class SwRefPageGetFieldType : public SwFieldType
sal_Int16 nNumberingType;
void UpdateField( SwTxtFld* pTxtFld, _SetGetExpFlds& rSetList );
-
+protected:
+ // ueberlagert, um alle RefPageGet-Felder zu updaten
+ virtual void Modify( const SfxPoolItem*, const SfxPoolItem * );
public:
SwRefPageGetFieldType( SwDoc* pDoc );
virtual SwFieldType* Copy() const;
-
- // ueberlagert, um alle RefPageGet-Felder zu updaten
- virtual void Modify( SfxPoolItem *, SfxPoolItem * );
sal_uInt16 MakeSetList( _SetGetExpFlds& rTmpLst );
-
SwDoc* GetDoc() const { return pDoc; }
};
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index d75839f5736c..43992dc7b359 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -564,7 +564,7 @@ public:
sal_Bool HasOtherCnt() const; // gibt es Rahmen, Fussnoten, ...
/* Anwenden der ViewOptions mit Start-/EndAction */
- inline void ApplyViewOptions( const SwViewOption &rOpt );
+ virtual void ApplyViewOptions( const SwViewOption &rOpt );
// Text innerhalb der Selektion erfragen
// Returnwert liefert sal_False, wenn der selektierte Bereich
@@ -940,13 +940,6 @@ private:
const SwEditShell &operator=(const SwEditShell &);
};
-inline void SwEditShell::ApplyViewOptions( const SwViewOption &rOpt )
-{
- SwCrsrShell::StartAction();
- ViewShell::ApplyViewOptions( rOpt );
- SwEditShell::EndAction();
-}
-
inline const sfx2::LinkManager& SwEditShell::GetLinkManager() const
{ return ((SwEditShell*)this)->GetLinkManager(); }
diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx
index 38d9c56b3213..3d3169fcf27a 100644
--- a/sw/inc/expfld.hxx
+++ b/sw/inc/expfld.hxx
@@ -82,8 +82,8 @@ public:
// ueberlagert, weil das Get-Field nicht veraendert werden kann
// und dann auch nicht aktualisiert werden muss. Aktualisierung
// erfolgt beim Aendern von Set-Werten !
-
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
};
/*--------------------------------------------------------------------
@@ -160,12 +160,14 @@ class SW_DLLPUBLIC SwSetExpFieldType : public SwValueFieldType
{
String sName;
const SwNode* pOutlChgNd;
-// sal_Unicode cDelim;
String sDelim;
sal_uInt16 nType;
sal_uInt8 nLevel;
sal_Bool bDeleted;
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
+
public:
SwSetExpFieldType( SwDoc* pDoc, const String& rName,
sal_uInt16 nType = nsSwGetSetExpType::GSE_EXPR );
@@ -183,7 +185,6 @@ public:
// ueberlagert, weil das Set-Field selbst dafuer sorgt, das
// es aktualisiert wird.
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
inline const String& GetSetRefName() const;
sal_uInt16 SetSeqRefNo( SwSetExpField& rFld );
diff --git a/sw/inc/fchrfmt.hxx b/sw/inc/fchrfmt.hxx
index 0b9cc9150227..53de41c11e3b 100644
--- a/sw/inc/fchrfmt.hxx
+++ b/sw/inc/fchrfmt.hxx
@@ -53,6 +53,9 @@ public:
// @@@ public copy ctor, but no copy assignment?
SwFmtCharFmt( const SwFmtCharFmt& rAttr );
+protected:
+ virtual void Modify( const SfxPoolItem*, const SfxPoolItem* );
+
private:
// @@@ public copy ctor, but no copy assignment?
SwFmtCharFmt & operator= (const SwFmtCharFmt &);
@@ -72,8 +75,6 @@ public:
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 );
- // an das SwTxtCharFmt weiterleiten (vom SwClient)
- virtual void Modify( SfxPoolItem*, SfxPoolItem* );
virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const;
void SetCharFmt( SwFmt* pFmt ) { pFmt->Add(this); }
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx
index fc375b3401c3..d248c74a53f5 100644
--- a/sw/inc/fldbas.hxx
+++ b/sw/inc/fldbas.hxx
@@ -288,7 +288,7 @@ public:
inline void SwFieldType::UpdateFlds() const
{
- ((SwFieldType*)this)->Modify( 0, 0 );
+ ((SwFieldType*)this)->ModifyNotification( 0, 0 );
}
/*--------------------------------------------------------------------
diff --git a/sw/inc/fmtcol.hxx b/sw/inc/fmtcol.hxx
index f7725cb6294a..2ef671b8463a 100644
--- a/sw/inc/fmtcol.hxx
+++ b/sw/inc/fmtcol.hxx
@@ -96,10 +96,11 @@ protected:
//nOutlineLevel( NO_NUMBERING ) //<-#outline level,removed by zhaojianwei
mbAssignedToOutlineStyle(false) //<-#outline level,added by zhaojianwei
{ pNextTxtFmtColl = this; }
-public:
// zum "abfischen" von UL-/LR-/FontHeight Aenderungen
- virtual void Modify( SfxPoolItem*, SfxPoolItem* );
+ virtual void Modify( const SfxPoolItem*, const SfxPoolItem* );
+
+public:
TYPEINFO(); //Bereits in Basisklasse Client drin.
@@ -255,6 +256,7 @@ public:
void SetCondition( sal_uLong nCond, sal_uLong nSubCond );
SwTxtFmtColl* GetTxtFmtColl() const { return (SwTxtFmtColl*)GetRegisteredIn(); }
+ void RegisterToFormat( SwFmt& );
};
@@ -281,9 +283,6 @@ public:
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 );
diff --git a/sw/inc/fmtfld.hxx b/sw/inc/fmtfld.hxx
index a6289406c505..372fa82fe5e7 100644
--- a/sw/inc/fmtfld.hxx
+++ b/sw/inc/fmtfld.hxx
@@ -27,6 +27,7 @@
#ifndef _FMTFLD_HXX
#define _FMTFLD_HXX
+#include <list>
#include <svl/poolitem.hxx>
#include <svl/brdcst.hxx>
#include <svl/smplhint.hxx>
@@ -37,6 +38,7 @@
class SwField;
class SwTxtFld;
class SwView;
+class SwFieldType;
// ATT_FLD ***********************************
class SW_DLLPUBLIC SwFmtFld : public SfxPoolItem, public SwClient, public SfxBroadcaster
@@ -53,6 +55,10 @@ class SW_DLLPUBLIC SwFmtFld : public SfxPoolItem, public SwClient, public SfxBro
// @@@ copy construction allowed, but copy assignment is not? @@@
SwFmtFld& operator=(const SwFmtFld& rFld);
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+ virtual void SwClientNotify( const SwModify& rModify, const SfxHint& rHint );
+
public:
TYPEINFO();
@@ -68,7 +74,6 @@ public:
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
- virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const;
const SwField *GetFld() const { return pField; }
@@ -87,6 +92,7 @@ public:
const SwTxtFld *GetTxtFld() const { return pTxtAttr; }
SwTxtFld *GetTxtFld() { return pTxtAttr; }
+ void RegisterToFieldType( SwFieldType& );
sal_Bool IsFldInDoc() const;
sal_Bool IsProtect() const;
};
diff --git a/sw/inc/fmthdft.hxx b/sw/inc/fmthdft.hxx
index c8773d61d1d5..73a56a283a2b 100644
--- a/sw/inc/fmthdft.hxx
+++ b/sw/inc/fmthdft.hxx
@@ -34,7 +34,7 @@
class SwFrmFmt;
class IntlWrapper;
-
+class SwFmt;
//Kopfzeile, fuer Seitenformate
//Client von FrmFmt das den Header beschreibt.
@@ -61,13 +61,15 @@ public:
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- const SwFrmFmt *GetHeaderFmt() const { return (SwFrmFmt*)pRegisteredIn; }
- SwFrmFmt *GetHeaderFmt() { return (SwFrmFmt*)pRegisteredIn; }
+ const SwFrmFmt *GetHeaderFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
+ SwFrmFmt *GetHeaderFmt() { return (SwFrmFmt*)GetRegisteredIn(); }
+ void RegisterToFormat( SwFmt& rFmt );
sal_Bool IsActive() const { return bActive; }
void SetActive( sal_Bool bNew = sal_True ) { bActive = bNew; }
};
+
//Fusszeile, fuer Seitenformate
//Client von FrmFmt das den Footer beschreibt.
@@ -93,9 +95,10 @@ public:
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- const SwFrmFmt *GetFooterFmt() const { return (SwFrmFmt*)pRegisteredIn; }
- SwFrmFmt *GetFooterFmt() { return (SwFrmFmt*)pRegisteredIn; }
+ const SwFrmFmt *GetFooterFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
+ SwFrmFmt *GetFooterFmt() { return (SwFrmFmt*)GetRegisteredIn(); }
+ void RegisterToFormat( SwFmt& rFmt );
sal_Bool IsActive() const { return bActive; }
void SetActive( sal_Bool bNew = sal_True ) { bActive = bNew; }
};
diff --git a/sw/inc/fmtmeta.hxx b/sw/inc/fmtmeta.hxx
index 922bf1cbf881..82c0d104f7b4 100755
--- a/sw/inc/fmtmeta.hxx
+++ b/sw/inc/fmtmeta.hxx
@@ -161,13 +161,13 @@ protected:
::com::sun::star::rdf::XMetadatable> const& xMeta)
{ m_wXMeta = xMeta; }
+ // SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
+
public:
explicit Meta(SwFmtMeta * const i_pFmt = 0);
virtual ~Meta();
- // SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
-
// sfx2::Metadatable
virtual ::sfx2::IXmlIdRegistry& GetRegistry();
virtual bool IsInClipboard() const;
diff --git a/sw/inc/fmtpdsc.hxx b/sw/inc/fmtpdsc.hxx
index 8305b9b98954..2363fddddf34 100644
--- a/sw/inc/fmtpdsc.hxx
+++ b/sw/inc/fmtpdsc.hxx
@@ -38,6 +38,7 @@ class SwPageDesc;
class SwHistory;
class SwPaM;
class IntlWrapper;
+class SwEndNoteInfo;
//Pagedescriptor
//Client vom SwPageDesc der durch das Attribut "beschrieben" wird.
@@ -55,6 +56,9 @@ class SW_DLLPUBLIC SwFmtPageDesc : public SfxPoolItem, public SwClient
sal_uInt16 nDescNameIdx; // SW3-Reader: Stringpool-Index des Vorlagennamens
SwModify* pDefinedIn; // Verweis auf das Objekt, in dem das
// Attribut gesetzt wurde (CntntNode/Format)
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
+ virtual void SwClientNotify( const SwModify&, const SfxHint& rHint );
public:
SwFmtPageDesc( const SwPageDesc *pDesc = 0 );
@@ -75,8 +79,6 @@ public:
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 void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
-
SwPageDesc *GetPageDesc() { return (SwPageDesc*)GetRegisteredIn(); }
const SwPageDesc *GetPageDesc() const { return (SwPageDesc*)GetRegisteredIn(); }
@@ -86,6 +88,9 @@ public:
// erfrage/setze, wo drin das Attribut verankert ist
inline const SwModify* GetDefinedIn() const { return pDefinedIn; }
void ChgDefinedIn( const SwModify* pNew ) { pDefinedIn = (SwModify*)pNew; }
+ void RegisterToEndNotInfo( SwEndNoteInfo& );
+ void RegisterToPageDesc( SwPageDesc& );
+ bool KnowsPageDesc() const;
};
diff --git a/sw/inc/format.hxx b/sw/inc/format.hxx
index d6e51aa6a617..b553c9eadbd2 100644
--- a/sw/inc/format.hxx
+++ b/sw/inc/format.hxx
@@ -44,9 +44,6 @@ class SwDoc;
class SW_DLLPUBLIC SwFmt : public SwModify
{
-// friend class SwSwgReader;
-// friend class SwSwgWriter;
-
String aFmtName;
SwAttrSet aSet;
@@ -70,6 +67,7 @@ protected:
SwFmt( SwAttrPool& rPool, const String &rFmtNm, const sal_uInt16* pWhichRanges,
SwFmt *pDrvdFrm, sal_uInt16 nFmtWhich );
SwFmt( const SwFmt& rFmt );
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNewValue );
public:
TYPEINFO(); //Bereits in Basisklasse Client drin.
@@ -80,7 +78,6 @@ public:
// fuer die Abfrage der Writer-Funktionen
sal_uInt16 Which() const { return nWhichId; }
- virtual void Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue );
// erfrage vom Format Informationen
virtual sal_Bool GetInfo( SfxPoolItem& ) const;
@@ -114,7 +111,7 @@ public:
virtual sal_uInt16 ResetAllFmtAttr();
// <--
- inline SwFmt* DerivedFrom() const { return (SwFmt*)pRegisteredIn; }
+ inline SwFmt* DerivedFrom() const { return (SwFmt*)GetRegisteredIn(); }
inline sal_Bool IsDefault() const { return DerivedFrom() == 0; }
inline const String& GetName() const { return aFmtName; }
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
index 16c72e1a9d19..526ee8f9a6de 100644
--- a/sw/inc/frmfmt.hxx
+++ b/sw/inc/frmfmt.hxx
@@ -27,15 +27,10 @@
#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>
-
#include <format.hxx>
-
#include "swdllapi.h"
class SwFlyFrm;
@@ -71,6 +66,8 @@ protected:
pDrvdFrm, nFmtWhich )
{}
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNewValue );
+
public:
TYPEINFO(); //Bereits in Basisklasse Client drin.
@@ -82,8 +79,6 @@ public:
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
@@ -146,6 +141,7 @@ public:
{ m_wXObject = xObject; }
DECL_FIXEDMEMPOOL_NEWDEL_DLL(SwFrmFmt)
+ void RegisterToFormat( SwFmt& rFmt );
};
//Das FlyFrame-Format ------------------------------
diff --git a/sw/inc/ftninfo.hxx b/sw/inc/ftninfo.hxx
index 6a5a5c583eba..ee208c428799 100644
--- a/sw/inc/ftninfo.hxx
+++ b/sw/inc/ftninfo.hxx
@@ -29,9 +29,6 @@
#include <tools/string.hxx>
#include "swdllapi.h"
-//#ifndef _NUMRULE_HXX
-//#include <numrule.hxx>
-//#endif
#include <calbck.hxx>
#include <editeng/numitem.hxx>
@@ -48,13 +45,16 @@ class SW_DLLPUBLIC SwEndNoteInfo : public SwClient
String sSuffix;
protected:
bool m_bEndNote;
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew );
+
public:
SvxNumberType aFmt;
sal_uInt16 nFtnOffset;
void ChgPageDesc( SwPageDesc *pDesc );
- SwPageDesc *GetPageDesc( SwDoc &rDoc ) const;
- SwClient *GetPageDescDep() const { return (SwClient*)&aPageDescDep; }
+ SwPageDesc* GetPageDesc( SwDoc &rDoc ) const;
+ bool KnowsPageDesc() const;
+ bool DependsOn( const SwPageDesc* ) const;
void SetFtnTxtColl(SwTxtFmtColl& rColl);
SwTxtFmtColl* GetFtnTxtColl() const { return (SwTxtFmtColl*) GetRegisteredIn(); } // kann 0 sein
@@ -67,8 +67,6 @@ public:
void SetAnchorCharFmt( SwCharFmt* );
SwClient *GetAnchorCharFmtDep() const { return (SwClient*)&aAnchorCharFmtDep; }
- virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
-
SwEndNoteInfo & operator=(const SwEndNoteInfo&);
sal_Bool operator==( const SwEndNoteInfo &rInf ) const;
@@ -80,6 +78,7 @@ public:
void SetPrefix(const String& rSet) { sPrefix = rSet; }
void SetSuffix(const String& rSet) { sSuffix = rSet; }
+ void ReleaseCollection() { if ( GetRegisteredInNonConst() ) GetRegisteredInNonConst()->Remove( this ); }
};
enum SwFtnPos
diff --git a/sw/inc/lineinfo.hxx b/sw/inc/lineinfo.hxx
index 51d6a8c18c9a..91f5ac7712de 100644
--- a/sw/inc/lineinfo.hxx
+++ b/sw/inc/lineinfo.hxx
@@ -28,9 +28,6 @@
#define SW_LINEINFO_HXX
#include "calbck.hxx"
-//#ifndef _NUMRULE_HXX
-//#include <numrule.hxx>
-//#endif
#include <editeng/numitem.hxx>
#include "swdllapi.h"
@@ -60,6 +57,8 @@ class SW_DLLPUBLIC SwLineNumberInfo : public SwClient //purpose of derivation fr
sal_Bool bCountInFlys; //Count also within FlyFrames?
sal_Bool bRestartEachPage; //Restart counting at the first paragraph of each page
//(even on follows when paragraphs are splitted)
+protected:
+ virtual void Modify( const SfxPoolItem*, const SfxPoolItem* );
public:
SwLineNumberInfo();
@@ -100,7 +99,7 @@ public:
sal_Bool IsRestartEachPage() const { return bRestartEachPage; }
void SetRestartEachPage( sal_Bool b ) { bRestartEachPage = b; }
- virtual void Modify( SfxPoolItem*, SfxPoolItem* );
+ bool HasCharFormat() const { return GetRegisteredIn() != 0; }
};
diff --git a/sw/inc/ndnotxt.hxx b/sw/inc/ndnotxt.hxx
index b61e46325bc5..5aab4f9a5708 100644
--- a/sw/inc/ndnotxt.hxx
+++ b/sw/inc/ndnotxt.hxx
@@ -63,7 +63,7 @@ protected:
public:
~SwNoTxtNode();
- virtual SwCntntFrm *MakeFrm();
+ virtual SwCntntFrm *MakeFrm( SwFrm* );
inline SwGrfFmtColl *GetGrfColl() const { return (SwGrfFmtColl*)GetRegisteredIn(); }
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index 5ccaf0329f70..26dbd29870b4 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -44,15 +44,11 @@
#include <vector>
#include <set>
-
+class SfxHint;
class SwNumRule;
class SwNodeNum;
-// --> OD 2008-05-06 #refactorlists#
class SwList;
-// <--
-// --> OD 2008-12-02 #i96772#
class SvxLRSpaceItem;
-// <--
namespace utl {
class TransliterationWrapper;
@@ -228,6 +224,10 @@ public:
//
// End: Data collected during idle time
//
+protected:
+ // fuers Umhaengen der TxtFmtCollections (Outline-Nummerierung!!)
+ virtual void Modify( const SfxPoolItem*, const SfxPoolItem* );
+ virtual void SwClientNotify( const SwModify&, const SfxHint& );
public:
using SwCntntNode::GetAttr;
@@ -356,7 +356,7 @@ public:
const ::com::sun::star::uno::Sequence<sal_Int32>& rOffsets );
// virtuelle Methoden aus dem CntntNode
- virtual SwCntntFrm *MakeFrm();
+ virtual SwCntntFrm *MakeFrm( SwFrm* );
virtual SwCntntNode *SplitCntntNode( const SwPosition & );
virtual SwCntntNode *JoinNext();
virtual SwCntntNode *JoinPrev();
@@ -794,9 +794,6 @@ public:
TYPEINFO(); // fuer rtti
- // fuers Umhaengen der TxtFmtCollections (Outline-Nummerierung!!)
- virtual void Modify( SfxPoolItem*, SfxPoolItem* );
-
// override SwIndexReg
virtual void Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
const bool bNegative = false, const bool bDelete = false );
diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx
index 9ee05188898c..4ff69260b044 100644
--- a/sw/inc/node.hxx
+++ b/sw/inc/node.hxx
@@ -64,6 +64,7 @@ class SwTOXBase;
class SwSectionNode;
class SwStartNode;
class SwTabFrm;
+class SwRootFrm;
class SwTable;
class SwTableNode;
class SwTableBox;
@@ -81,9 +82,8 @@ class IDocumentLineNumberAccess;
class IDocumentLinksAdministration;
class IDocumentFieldsAccess;
class IDocumentContentOperations;
-// --> OD 2007-10-31 #i83479#
class IDocumentListItems;
-// <--
+class SwOLENodes;
// --------------------
// class SwNode
@@ -397,13 +397,17 @@ protected:
// SwAttrSet (handle):
sal_uInt16 ClearItemsFromAttrSet( const std::vector<sal_uInt16>& rWhichIds );
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
public:
TYPEINFO(); //Bereits in Basisklasse Client drin.
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+ // MakeFrm will be called for a certain layout
+ // pSib is another SwFrm of the same layout (e.g. the SwRootFrm itself, a sibling, the parent)
+ virtual SwCntntFrm *MakeFrm( SwFrm* pSib ) = 0;
- virtual SwCntntFrm *MakeFrm() = 0;
virtual SwCntntNode *SplitCntntNode(const SwPosition & ) = 0;
+
virtual SwCntntNode *JoinNext();
virtual SwCntntNode *JoinPrev();
// koennen 2 Nodes zusammengefasst werden ?
@@ -417,7 +421,9 @@ public:
sal_Bool GoNext(SwIndex *, sal_uInt16 nMode ) const;
sal_Bool GoPrevious(SwIndex *, sal_uInt16 nMode ) const;
- SwCntntFrm *GetFrm( const Point* pDocPos = 0,
+ // Replacement for good old GetFrm(..):
+ SwCntntFrm *getLayoutFrm( const SwRootFrm*,
+ const Point* pDocPos = 0,
const SwPosition *pPos = 0,
const sal_Bool bCalcFrm = sal_True ) const;
// Gibt die tatsaechlcheGroesse des Frames zurueck bzw. ein leeres
@@ -501,11 +507,12 @@ public:
inline void SetModifyAtAttr( bool bSetModifyAtAttr ) const { mbSetModifyAtAttr = bSetModifyAtAttr; }
inline bool GetModifyAtAttr() const { return mbSetModifyAtAttr; }
+ static SwOLENodes* CreateOLENodesArray( const SwFmtColl& rColl, bool bOnlyWithInvalidSize );
+
private:
// privater Constructor, weil nie kopiert werden darf !!
SwCntntNode( const SwCntntNode & rNode );
SwCntntNode & operator= ( const SwCntntNode & rNode );
-
};
@@ -525,7 +532,7 @@ public:
const SwTable& GetTable() const { return *pTable; }
SwTable& GetTable() { return *pTable; }
- SwTabFrm *MakeFrm();
+ SwTabFrm *MakeFrm( SwFrm* );
//Legt die Frms fuer den TableNode (also die TabFrms) an.
void MakeFrms( SwNodeIndex* pIdxBehind );
@@ -572,7 +579,7 @@ public:
const SwSection& GetSection() const { return *m_pSection; }
SwSection& GetSection() { return *m_pSection; }
- SwFrm *MakeFrm();
+ SwFrm *MakeFrm( SwFrm* );
//Legt die Frms fuer den SectionNode (also die SectionFrms) an.
//Im Defaultfall wird bis die Frames bis zum Ende des Bereichs angelegt,
diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx
index d1125a0f4130..ba8f0d5f22b8 100644
--- a/sw/inc/numrule.hxx
+++ b/sw/inc/numrule.hxx
@@ -35,23 +35,17 @@
#include "swdllapi.h"
#include <swtypes.hxx>
#include <calbck.hxx>
-#include <errhdl.hxx> // Fuer die inline-ASSERTs
-#include <error.h> // Fuer die inline-ASSERTs
+#include <errhdl.hxx>
+#include <error.h>
#include <hints.hxx>
#include <hash_map>
#include <stringhash.hxx>
-// --> OD 2008-02-21 #refactorlists#
-class SwNodeNum;
#include <SwNumberTreeTypes.hxx>
-// <--
-// --> OD 2008-02-19 #refactorlists#
#include <vector>
+
class SwTxtFmtColl;
-// <--
-// --> OD 2008-07-08 #i91400#
class IDocumentListsAccess;
-// <--
-
+class SwNodeNum;
class Font;
class SvxBrushItem;
class SvxNumRule;
@@ -72,6 +66,9 @@ class SW_DLLPUBLIC SwNumFmt : public SvxNumberFormat, public SwClient
using SvxNumberFormat::operator ==;
using SvxNumberFormat::operator !=;
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew );
+
public:
SwNumFmt();
SwNumFmt( const SwNumFmt& );
@@ -84,9 +81,9 @@ public:
sal_Bool operator==( const SwNumFmt& ) const;
sal_Bool operator!=( const SwNumFmt& r ) const { return !(*this == r); }
- SwCharFmt* GetCharFmt() const { return (SwCharFmt*)pRegisteredIn; }
+ SwCharFmt* GetCharFmt() const { return (SwCharFmt*)GetRegisteredIn(); }
void SetCharFmt( SwCharFmt* );
- virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
+ void ForgetCharFmt();
virtual void SetCharFmtName(const String& rSet);
virtual const String& GetCharFmtName()const;
@@ -168,9 +165,6 @@ private:
String msDefaultListId;
// <--
- // forbidden and not implemented.
- SwNumRule();
-
public:
// --> OD 2008-02-08 #newlistlevelattrs#
// add parameter <eDefaultNumberFormatPositionAndSpaceMode>
diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx
index 8ba32064c3ba..af6f73f9d133 100644
--- a/sw/inc/pagedesc.hxx
+++ b/sw/inc/pagedesc.hxx
@@ -160,6 +160,9 @@ class SW_DLLPUBLIC SwPageDesc : public SwModify
SW_DLLPRIVATE SwPageDesc(const String&, SwFrmFmt*, SwDoc *pDc );
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNewValue );
+
public:
const String &GetName() const { return aDescName; }
void SetName( const String& rNewName ) { aDescName = rNewName; }
@@ -213,7 +216,6 @@ public:
void SetRegisterFmtColl( const SwTxtFmtColl* rFmt );
const SwTxtFmtColl* GetRegisterFmtColl() const;
- virtual void Modify( SfxPoolItem *pOldValue, SfxPoolItem *pNewValue );
void RegisterChange();
// erfragen und setzen der PoolFormat-Id
diff --git a/sw/inc/paratr.hxx b/sw/inc/paratr.hxx
index bdd4a0155614..8a7f119bb539 100644
--- a/sw/inc/paratr.hxx
+++ b/sw/inc/paratr.hxx
@@ -69,6 +69,10 @@ public:
private:
// @@@ public copy ctor, but no copy assignment?
SwFmtDrop & operator= (const SwFmtDrop &);
+
+protected:
+ virtual void Modify( const SfxPoolItem*, const SfxPoolItem* );
+
public:
// "pure virtual Methoden" vom SfxPoolItem
@@ -94,10 +98,9 @@ public:
inline sal_uInt16 GetDistance() const { return nDistance; }
inline sal_uInt16 &GetDistance() { return nDistance; }
- inline const SwCharFmt *GetCharFmt() const { return (SwCharFmt*)pRegisteredIn; }
- inline SwCharFmt *GetCharFmt() { return (SwCharFmt*)pRegisteredIn; }
+ inline const SwCharFmt *GetCharFmt() const { return (SwCharFmt*)GetRegisteredIn(); }
+ inline SwCharFmt *GetCharFmt() { return (SwCharFmt*)GetRegisteredIn(); }
void SetCharFmt( SwCharFmt *pNew );
- virtual void Modify( SfxPoolItem*, SfxPoolItem* );
// erfrage vom Client Informationen
virtual sal_Bool GetInfo( SfxPoolItem& ) const;
diff --git a/sw/inc/printdata.hxx b/sw/inc/printdata.hxx
index 02df0280cdbf..1e16d3d782e9 100644
--- a/sw/inc/printdata.hxx
+++ b/sw/inc/printdata.hxx
@@ -45,7 +45,8 @@ class _SetGetExpFlds;
class SwViewOption;
class OutputDevice;
class SwViewOptionAdjust_Impl;
-class SwWrtShell;
+class SwPrtOptions;
+class ViewShell;
class SfxViewShell;
// forward declarations
@@ -266,9 +267,9 @@ public:
void DeletePostItData();
bool IsViewOptionAdjust() const { return m_pViewOptionAdjust != 0; }
- bool NeedNewViewOptionAdjust( const SwWrtShell& ) const;
- void ViewOptionAdjustStart( SwWrtShell &rSh, const SwViewOption &rViewOptions );
- void ViewOptionAdjust( SwPrintData const*const pPrtOptions );
+ bool NeedNewViewOptionAdjust( const ViewShell& ) const;
+ void ViewOptionAdjustStart( ViewShell &rSh, const SwViewOption &rViewOptions );
+ void ViewOptionAdjust( SwPrintData const* const pPrtOptions );
void ViewOptionAdjustStop();
bool HasSwPrtOptions() const { return m_pPrtOptions != 0; }
diff --git a/sw/inc/reffld.hxx b/sw/inc/reffld.hxx
index fcd8ba2c70b8..daf690861260 100644
--- a/sw/inc/reffld.hxx
+++ b/sw/inc/reffld.hxx
@@ -72,13 +72,14 @@ enum REFERENCEMARK
class SwGetRefFieldType : public SwFieldType
{
SwDoc* pDoc;
+protected:
+ // ueberlagert, um alle Ref-Felder zu updaten
+ virtual void Modify( const SfxPoolItem*, const SfxPoolItem * );
public:
SwGetRefFieldType(SwDoc* pDoc );
virtual SwFieldType* Copy() const;
SwDoc* GetDoc() const { return pDoc; }
- // ueberlagert, um alle Ref-Felder zu updaten
- virtual void Modify( SfxPoolItem *, SfxPoolItem * );
void MergeWithOtherDoc( SwDoc& rDestDoc );
diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx
index 98948c228678..ad8bddde0007 100644
--- a/sw/inc/section.hxx
+++ b/sw/inc/section.hxx
@@ -161,7 +161,6 @@ public:
class SW_DLLPUBLIC SwSection
: public SwClient
- , private ::boost::noncopyable
{
// damit beim Anlegen/Loeschen von Frames das Flag richtig gepflegt wird!
friend class SwSectionNode;
@@ -177,6 +176,9 @@ private:
SW_DLLPRIVATE void ImplSetHiddenFlag(
bool const bHidden, bool const bCondition);
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew );
+
public:
TYPEINFO(); // rtti
@@ -193,10 +195,8 @@ public:
SectionType GetType() const { return m_Data.GetType(); }
void SetType(SectionType const eType) { return m_Data.SetType(eType); }
- SwSectionFmt* GetFmt() { return (SwSectionFmt*)pRegisteredIn; }
- SwSectionFmt* GetFmt() const { return (SwSectionFmt*)pRegisteredIn; }
-
- virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
+ SwSectionFmt* GetFmt() { return (SwSectionFmt*)GetRegisteredIn(); }
+ SwSectionFmt* GetFmt() const { return (SwSectionFmt*)GetRegisteredIn(); }
// setze die Hidden/Protected -> gesamten Baum updaten !
// (Attribute/Flags werden gesetzt/erfragt)
@@ -300,6 +300,7 @@ class SW_DLLPUBLIC SwSectionFmt
protected:
SwSectionFmt( SwSectionFmt* pDrvdFrm, SwDoc *pDoc );
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew );
public:
TYPEINFO(); //Bereits in Basisklasse Client drin.
@@ -311,7 +312,6 @@ public:
//Erzeugt die Ansichten
virtual void MakeFrms();
- virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
// erfrage vom Format Informationen
virtual sal_Bool GetInfo( SfxPoolItem& ) const;
diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx
index daa33e4f232a..925e6522a120 100644
--- a/sw/inc/swcrsr.hxx
+++ b/sw/inc/swcrsr.hxx
@@ -95,11 +95,7 @@ public:
// @@@ semantic: no copy ctor.
SwCursor( SwCursor& rCpy);
-private:
- // forbidden and not implemented.
- //SwCursor( const SwCursor& );
- // @@@ used e.g. in core/frmedt/fetab.cxx @@@
- // SwCursor & operator= ( const SwCursor& );
+
public:
virtual SwCursor* Create( SwPaM* pRing = 0 ) const;
@@ -139,7 +135,7 @@ public:
sal_Bool GoEndWord();
sal_Bool GoNextWord();
sal_Bool GoPrevWord();
- sal_Bool SelectWord( const Point* pPt = 0 );
+ sal_Bool SelectWord( ViewShell* pViewShell, const Point* pPt = 0 );
// API versions of above functions (will be used with a different
// WordType for the break iterator)
@@ -150,7 +146,7 @@ public:
sal_Bool GoEndWordWT( sal_Int16 nWordType );
sal_Bool GoNextWordWT( sal_Int16 nWordType );
sal_Bool GoPrevWordWT( sal_Int16 nWordType );
- sal_Bool SelectWordWT( sal_Int16 nWordType, const Point* pPt = 0 );
+ sal_Bool SelectWordWT( ViewShell* pViewShell, sal_Int16 nWordType, const Point* pPt = 0 );
enum SentenceMoveType
{
diff --git a/sw/inc/swddetbl.hxx b/sw/inc/swddetbl.hxx
index f7e7bb56f97d..a06f8b08e073 100644
--- a/sw/inc/swddetbl.hxx
+++ b/sw/inc/swddetbl.hxx
@@ -42,12 +42,14 @@ public:
sal_Bool bUpdate = sal_True );
~SwDDETable();
- void Modify( SfxPoolItem*, SfxPoolItem* );
void ChangeContent();
sal_Bool NoDDETable();
SwDDEFieldType* GetDDEFldType();
inline const SwDDEFieldType* GetDDEFldType() const;
+protected:
+ virtual void Modify( const SfxPoolItem*, const SfxPoolItem* );
+ virtual void SwClientNotify( const SwModify&, const SfxHint& );
};
diff --git a/sw/inc/switerator.hxx b/sw/inc/switerator.hxx
new file mode 100755
index 000000000000..be729771b54b
--- /dev/null
+++ b/sw/inc/switerator.hxx
@@ -0,0 +1,47 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SWITERATOR_HXX
+#define _SWITERATOR_HXX
+
+#include <calbck.hxx>
+#include <tools/debug.hxx>
+
+template< class TElementType, class TSource > class SwIterator
+{
+ SwClientIter aClientIter;
+public:
+
+ SwIterator( const TSource& rSrc ) : aClientIter(rSrc) { DBG_ASSERT( TElementType::IsOf( TYPE(SwClient) ), "Incompatible types!" ); }
+ TElementType* First() { SwClient* p = aClientIter.First(TYPE(TElementType)); return PTR_CAST(TElementType,p); }
+ TElementType* Last() { SwClient* p = aClientIter.Last( TYPE(TElementType)); return PTR_CAST(TElementType,p); }
+ TElementType* Next() { SwClient* p = aClientIter.Next(); return PTR_CAST(TElementType,p); }
+ TElementType* Previous() { SwClient* p = aClientIter.Previous(); return PTR_CAST(TElementType,p); }
+ static TElementType* FirstElement( const TSource& rMod ) { SwClient* p = SwClientIter(rMod).First(TYPE(TElementType)); return PTR_CAST(TElementType,p); }
+ bool IsChanged() { return aClientIter.IsChanged(); }
+};
+
+#endif
diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx
index 2dd3bfaf7467..80e54c7e7468 100644
--- a/sw/inc/swtable.hxx
+++ b/sw/inc/swtable.hxx
@@ -27,9 +27,7 @@
#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>
@@ -43,6 +41,7 @@ class SwStartNode;
#include <boost/noncopyable.hpp>
#endif
+class SwFmt;
class Color;
class SwFrmFmt;
class SwTableFmt;
@@ -86,7 +85,7 @@ typedef SwTableLine* SwTableLinePtr;
class SW_DLLPUBLIC SwTable: public SwClient //Client vom FrmFmt
{
- using SwClient::IsModifyLocked;
+
protected:
SwTableLines aLines;
@@ -116,6 +115,8 @@ protected:
sal_Bool IsModifyLocked(){ return bModifyLocked;}
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew );
+
public:
enum SearchType
{
@@ -175,10 +176,9 @@ public:
SwTableLines &GetTabLines() { return aLines; }
const SwTableLines &GetTabLines() const { return aLines; }
- SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)pRegisteredIn; }
- SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)pRegisteredIn; }
-
- virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
+ SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)GetRegisteredIn(); }
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
+ SwTableFmt* GetTableFmt() const { return (SwTableFmt*)GetRegisteredIn(); }
void GetTabCols( SwTabCols &rToFill, const SwTableBox *pStart,
sal_Bool bHidden = sal_False, sal_Bool bCurRowOnly = sal_False ) const;
@@ -322,6 +322,7 @@ public:
SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo );
sal_Bool SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType,
SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo );
+ void RegisterToFormat( SwFmt& rFmt );
#ifdef DBG_UTIL
void CheckConsistency() const;
#endif
@@ -348,8 +349,8 @@ public:
void SetUpper( SwTableBox *pNew ) { pUpper = pNew; }
- SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)pRegisteredIn; }
- SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)pRegisteredIn; }
+ SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)GetRegisteredIn(); }
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
//Macht ein eingenes FrmFmt wenn noch mehr Lines von ihm abhaengen.
SwFrmFmt* ClaimFrmFmt();
@@ -364,6 +365,7 @@ public:
SwTwips GetTableLineHeight( bool& bLayoutAvailable ) const;
bool hasSoftPageBreak() const;
+ void RegisterToFormat( SwFmt& rFmt );
};
class SW_DLLPUBLIC SwTableBox: public SwClient //Client vom FrmFmt
@@ -402,8 +404,8 @@ public:
const SwTableLine *GetUpper() const { return pUpper; }
void SetUpper( SwTableLine *pNew ) { pUpper = pNew; }
- SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)pRegisteredIn; }
- SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)pRegisteredIn; }
+ SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)GetRegisteredIn(); }
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
//Macht ein eingenes FrmFmt wenn noch mehr Boxen von ihm abhaengen.
SwFrmFmt* ClaimFrmFmt();
@@ -468,6 +470,8 @@ public:
const SwTableBox& FindEndOfRowSpan( const SwTable& rTable,
sal_uInt16 nMaxStep = USHRT_MAX ) const
{ return const_cast<SwTableBox*>(this)->FindEndOfRowSpan( rTable, nMaxStep ); }
+ void RegisterToFormat( SwFmt& rFmt ) ;
+ void ForgetFrmFmt();
};
class SwCellFrm;
diff --git a/sw/inc/swtblfmt.hxx b/sw/inc/swtblfmt.hxx
index 96479197cde6..86ace11c4e6b 100644
--- a/sw/inc/swtblfmt.hxx
+++ b/sw/inc/swtblfmt.hxx
@@ -86,12 +86,12 @@ protected:
: SwFrmFmt( rPool, rFmtNm, pDrvdFrm, RES_FRMFMT, aTableBoxSetRange )
{}
+ // zum Erkennen von Veraenderungen (haupts. TableBoxAttribute)
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNewValue );
+
public:
TYPEINFO(); //Bereits in Basisklasse Client drin.
- // zum Erkennen von Veraenderungen (haupts. TableBoxAttribute)
- virtual void Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue );
-
DECL_FIXEDMEMPOOL_NEWDEL(SwTableBoxFmt)
};
diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx
index f8bdb12f113b..88e5cea8a8fb 100644
--- a/sw/inc/tox.hxx
+++ b/sw/inc/tox.hxx
@@ -91,6 +91,10 @@ class SW_DLLPUBLIC SwTOXMark
SwTOXMark(); // to create the dflt. atr. in _InitCore
+protected:
+ // SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew );
+
public:
TYPEINFO(); // rtti
@@ -105,9 +109,6 @@ public:
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
- // SwClient
- virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
-
void InvalidateTOXMark();
String GetText() const;
@@ -151,7 +152,9 @@ public:
SW_DLLPRIVATE void SetXTOXMark(::com::sun::star::uno::Reference<
::com::sun::star::text::XDocumentIndexMark> const& xMark)
{ m_wXDocumentIndexMark = xMark; }
-
+ void DeRegister() { GetRegisteredInNonConst()->Remove( this ); }
+ void RegisterToTOXType( SwTOXType& rMark );
+ static void InsertTOXMarks( SwTOXMarks& aMarks, const SwTOXType& rType );
};
/*--------------------------------------------------------------------
@@ -592,6 +595,7 @@ public:
// #i21237#
void AdjustTabStops(SwDoc & rDoc, sal_Bool bDefaultRightTabStop);
SwTOXBase& operator=(const SwTOXBase& rSource);
+ void RegisterToTOXType( SwTOXType& rMark );
};
diff --git a/sw/inc/txtatr.hxx b/sw/inc/txtatr.hxx
index a8b4fbb2211f..cd16a93bd09b 100644
--- a/sw/inc/txtatr.hxx
+++ b/sw/inc/txtatr.hxx
@@ -50,9 +50,9 @@ public:
SwTxtCharFmt( SwFmtCharFmt& rAttr, xub_StrLen nStart, xub_StrLen nEnd );
virtual ~SwTxtCharFmt( );
- // werden vom SwFmtCharFmt hierher weitergeleitet
- virtual void Modify( SfxPoolItem*, SfxPoolItem* ); // SwClient
- virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const;
+ // werden vom SwFmtCharFmt hierher weitergeleitet (no derivation from SwClient!)
+ void ModifyNotification( const SfxPoolItem*, const SfxPoolItem* );
+ bool GetInfo( SfxPoolItem& rInfo ) const;
// get and set TxtNode pointer
void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; }
@@ -97,15 +97,17 @@ public:
class SW_DLLPUBLIC SwTxtRuby : public SwTxtAttrNesting, public SwClient
{
SwTxtNode* m_pTxtNode;
-
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
public:
SwTxtRuby( SwFmtRuby& rAttr, xub_StrLen nStart, xub_StrLen nEnd );
virtual ~SwTxtRuby();
TYPEINFO();
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const;
+ SW_DLLPRIVATE void InitRuby(SwTxtNode & rNode);
+
/// get and set TxtNode pointer
const SwTxtNode* GetpTxtNode() const { return m_pTxtNode; }
inline const SwTxtNode& GetTxtNode() const;
diff --git a/sw/inc/txtftn.hxx b/sw/inc/txtftn.hxx
index 4f19924172ef..e8c7c77e8f86 100644
--- a/sw/inc/txtftn.hxx
+++ b/sw/inc/txtftn.hxx
@@ -33,6 +33,7 @@ class SwNodeIndex;
class SwTxtNode;
class SwNodes;
class SwDoc;
+class SwFrm;
// ATT_FTN **********************************************************
@@ -59,7 +60,7 @@ public:
void MakeNewTextSection( SwNodes& rNodes );
// loesche die FtnFrame aus der Seite
- void DelFrms();
+ void DelFrms( const SwFrm* );
// bedingten Absatzvorlagen checken
void CheckCondColl();
diff --git a/sw/inc/txtinet.hxx b/sw/inc/txtinet.hxx
index 62d48320bf06..5ea0df9fe3b2 100644
--- a/sw/inc/txtinet.hxx
+++ b/sw/inc/txtinet.hxx
@@ -42,17 +42,18 @@ class SW_DLLPUBLIC SwTxtINetFmt : public SwTxtAttrNesting, public SwClient
bool m_bVisited : 1; // visited link?
bool m_bVisitedValid : 1; // is m_bVisited valid?
- // forbidden and not implemented.
- SwTxtINetFmt();
+protected:
+virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
public:
SwTxtINetFmt( SwFmtINetFmt& rAttr, xub_StrLen nStart, xub_StrLen nEnd );
virtual ~SwTxtINetFmt();
TYPEINFO();
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const;
+ SW_DLLPRIVATE void InitINetFmt(SwTxtNode & rNode);
+
// get and set TxtNode pointer
const SwTxtNode* GetpTxtNode() const { return m_pTxtNode; }
inline const SwTxtNode& GetTxtNode() const;
diff --git a/sw/inc/unobaseclass.hxx b/sw/inc/unobaseclass.hxx
index 6c12a01b0d47..9e3425e04c90 100644
--- a/sw/inc/unobaseclass.hxx
+++ b/sw/inc/unobaseclass.hxx
@@ -98,7 +98,7 @@ class UnoActionRemoveContext
::com::sun::star::uno::Sequence< sal_Int8 > CreateUnoTunnelId();
/// helper function for implementing SwClient::Modify
-void ClientModify(SwClient* pClient, SfxPoolItem *pOld, SfxPoolItem *pNew);
+void ClientModify(SwClient* pClient, const SfxPoolItem *pOld, const SfxPoolItem *pNew);
#include <boost/utility.hpp>
diff --git a/sw/inc/unobookmark.hxx b/sw/inc/unobookmark.hxx
index fdd5df4c8a6c..a212efd933f3 100644
--- a/sw/inc/unobookmark.hxx
+++ b/sw/inc/unobookmark.hxx
@@ -220,8 +220,9 @@ class SwXFieldmarkParameters
// XElementAccess
virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL hasElements( ) throw (::com::sun::star::uno::RuntimeException);
+ protected:
//SwClient
- virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew);
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
private:
::sw::mark::IFieldmark::parameter_map_t* getCoreParameters() throw (::com::sun::star::uno::RuntimeException);
};
diff --git a/sw/inc/unochart.hxx b/sw/inc/unochart.hxx
index 01e45671a3c0..de8a78610bf5 100644
--- a/sw/inc/unochart.hxx
+++ b/sw/inc/unochart.hxx
@@ -171,6 +171,10 @@ class SwChartDataProvider :
rtl::OUString GetBrokenCellRangeForExport( const rtl::OUString &rCellRangeRepresentation );
+protected:
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
public:
SwChartDataProvider( const SwDoc* pDoc );
virtual ~SwChartDataProvider();
@@ -197,10 +201,6 @@ 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( ) throw (::com::sun::star::uno::RuntimeException);
- //SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-
-
SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
void AddDataSequence( const SwTable &rTable, ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > &rxDataSequence );
@@ -292,6 +292,10 @@ class SwChartDataSequence :
SwChartDataSequence( const SwChartDataSequence &rObj );
SwChartDataSequence & operator = ( const SwChartDataSequence & );
+protected:
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
public:
SwChartDataSequence( SwChartDataProvider &rProvider,
SwFrmFmt &rTblFmt,
@@ -348,11 +352,6 @@ public:
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
-
- //SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-
-
SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
sal_Bool DeleteBox( const SwTableBox &rBox );
diff --git a/sw/inc/unocrsr.hxx b/sw/inc/unocrsr.hxx
index 91fbc0a1d552..05738f4fd3c4 100644
--- a/sw/inc/unocrsr.hxx
+++ b/sw/inc/unocrsr.hxx
@@ -40,13 +40,6 @@ public:
SwUnoCrsr( const SwPosition &rPos, SwPaM* pRing = 0 );
virtual ~SwUnoCrsr();
- // @@@ semantic: no copy ctor.
- SwUnoCrsr( SwUnoCrsr& );
-private:
- // forbidden and not implemented.
- //SwUnoCrsr( const SwUnoCrsr& );
- SwUnoCrsr & operator= ( const SwUnoCrsr& );
-
protected:
virtual const SwCntntFrm* DoSetBidiLevelLeftRight(
diff --git a/sw/inc/unodraw.hxx b/sw/inc/unodraw.hxx
index f0168d632f51..b1307f9678a0 100644
--- a/sw/inc/unodraw.hxx
+++ b/sw/inc/unodraw.hxx
@@ -257,6 +257,9 @@ class SwXShape : public SwXShapeBaseClass,
protected:
virtual ~SwXShape();
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
public:
SwXShape(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & xShape);
@@ -310,9 +313,6 @@ public:
virtual ::rtl::OUString SAL_CALL getShapeType( ) throw (::com::sun::star::uno::RuntimeException);
// <--
- //SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-
SwShapeDescriptor_Impl* GetDescImpl() {return pImpl;}
::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation > GetAggregationInterface() {return xShapeAgg;}
diff --git a/sw/inc/unofield.hxx b/sw/inc/unofield.hxx
index 66fe2cb92a99..02b57aff8c17 100644
--- a/sw/inc/unofield.hxx
+++ b/sw/inc/unofield.hxx
@@ -77,6 +77,9 @@ class SwXFieldMaster : public cppu::WeakImplHelper4
protected:
virtual ~SwXFieldMaster();
+ //SwClient
+virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
public:
SwXFieldMaster(SwDoc* pDoc, sal_uInt16 nResId);
@@ -109,9 +112,6 @@ 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 );
- //SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-
static rtl::OUString GetProgrammaticName(const SwFieldType& rType, SwDoc& rDoc);
static rtl::OUString LocalizeFormula(const SwSetExpField& rFld, const rtl::OUString& rFormula, sal_Bool bQuery);
@@ -122,9 +122,6 @@ public:
sal_uInt16 GetResId() const {return nResTypeId;}
};
-/* -----------------04.12.98 12:49-------------------
- *
- * --------------------------------------------------*/
struct SwFieldProperties_Impl;
class SwXTextField : public cppu::WeakImplHelper5
<
@@ -153,6 +150,9 @@ class SwXTextField : public cppu::WeakImplHelper5
SwDoc* GetDoc() {return m_pDoc;}
protected:
virtual ~SwXTextField();
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
public:
SwXTextField(sal_uInt16 nServiceId, SwDoc* pDoc=0);
SwXTextField(const SwFmtFld& rFmt, SwDoc* pDoc);
@@ -198,24 +198,18 @@ public:
//XUpdatable
virtual void SAL_CALL update( ) throw (::com::sun::star::uno::RuntimeException);
- //SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-
void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
const SwField* GetField() const;
const SwFmtFld* GetFldFmt(){return GetField() ? pFmtFld : 0; };
void Invalidate();
-};
-/// @return a SwXTextField, either an already existing one or a new one
-SwXTextField * CreateSwXTextField(SwDoc & rDoc, SwFmtFld const& rFmt);
+ /// @return an SwXTextField, either an already existing one or a new one
+ static SwXTextField* CreateSwXTextField(SwDoc & rDoc, SwFmtFld const& rFmt);
+};
-/* -----------------21.12.98 10:26-------------------
- *
- * --------------------------------------------------*/
typedef
cppu::WeakImplHelper2
<
@@ -292,9 +286,6 @@ public:
virtual void Invalidate();
};
-/* -----------------21.12.98 14:49-------------------
- *
- * --------------------------------------------------*/
class SwXFieldEnumeration : public cppu::WeakImplHelper2
<
::com::sun::star::container::XEnumeration,
@@ -309,6 +300,8 @@ class SwXFieldEnumeration : public cppu::WeakImplHelper2
protected:
virtual ~SwXFieldEnumeration();
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
public:
SwXFieldEnumeration(SwDoc* pDoc);
@@ -321,8 +314,6 @@ 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 );
- //SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
};
#endif
diff --git a/sw/inc/unoflatpara.hxx b/sw/inc/unoflatpara.hxx
index b69fb448c102..0662be96fdd6 100644
--- a/sw/inc/unoflatpara.hxx
+++ b/sw/inc/unoflatpara.hxx
@@ -122,8 +122,9 @@ public:
virtual css::uno::Reference< css::text::XFlatParagraph > SAL_CALL getParaBefore(const css::uno::Reference< css::text::XFlatParagraph > & xPara) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException);
virtual css::uno::Reference< css::text::XFlatParagraph > SAL_CALL getParaAfter(const css::uno::Reference< css::text::XFlatParagraph > & xPara) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException);
+protected:
// SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
private:
SwXFlatParagraphIterator( const SwXFlatParagraphIterator & ); // not defined
diff --git a/sw/inc/unoframe.hxx b/sw/inc/unoframe.hxx
index 269401e3d28f..297cb561cf88 100644
--- a/sw/inc/unoframe.hxx
+++ b/sw/inc/unoframe.hxx
@@ -55,10 +55,6 @@ class SwDoc;
class SwFmt;
class SwFlyFrmFmt;
-
-/*-----------------12.02.98 11:21-------------------
-
---------------------------------------------------*/
class BaseFrameProperties_Impl;
class SwXFrame : public cppu::WeakImplHelper6
<
@@ -87,6 +83,7 @@ class SwXFrame : public cppu::WeakImplHelper6
protected:
com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > mxStyleData;
com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > mxStyleFamily;
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
virtual ~SwXFrame();
public:
@@ -145,9 +142,6 @@ 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 );
- //SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-
void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
void attach( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xTextRange ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
@@ -163,9 +157,7 @@ public:
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 +236,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,
@@ -370,7 +360,8 @@ public:
// ::com::sun::star::util::XModifyListener
virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& aEvent ) throw(::com::sun::star::uno::RuntimeException);
- void Modify( SfxPoolItem*, SfxPoolItem* );
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
};
diff --git a/sw/inc/unoport.hxx b/sw/inc/unoport.hxx
index 9071a388a5b8..bb48c64b208b 100644
--- a/sw/inc/unoport.hxx
+++ b/sw/inc/unoport.hxx
@@ -133,9 +133,9 @@ private:
SwFmtFld * GetFldFmt(bool bInit = false);
-protected:
+ void init(const SwUnoCrsr* pPortionCursor);
- //SfxItemPropertySet& GetPropSet() { return aPropSet; }
+protected:
void SAL_CALL SetPropertyValues_Impl(
const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames,
@@ -145,9 +145,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 );
@@ -161,6 +158,9 @@ protected:
virtual ~SwXTextPortion();
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
public:
SwXTextPortion(const SwUnoCrsr* pPortionCrsr, ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > const& rParent, SwTextPortionType eType );
SwXTextPortion(const SwUnoCrsr* pPortionCrsr, ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > const& rParent, SwFrmFmt& rFmt );
@@ -229,9 +229,6 @@ public:
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createContentEnumeration(const rtl::OUString& aServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getAvailableServiceNames() throw( ::com::sun::star::uno::RuntimeException );
- //SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-
void SetRefMark( ::com::sun::star::uno::Reference<
::com::sun::star::text::XTextContent > xMark)
{ m_xRefMark = xMark; }
@@ -317,9 +314,9 @@ public:
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL
getSupportedServiceNames()
throw( ::com::sun::star::uno::RuntimeException );
-
+protected:
//SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
};
#endif
diff --git a/sw/inc/unoredline.hxx b/sw/inc/unoredline.hxx
index 65c14d82bbbf..cda88eb01aa7 100644
--- a/sw/inc/unoredline.hxx
+++ b/sw/inc/unoredline.hxx
@@ -148,9 +148,9 @@ 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);
- //SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-
const SwRedline* GetRedline() const {return pRedline;}
+protected:
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
};
#endif
diff --git a/sw/inc/unoredlines.hxx b/sw/inc/unoredlines.hxx
index 49db8cf27761..c0ce98d80336 100644
--- a/sw/inc/unoredlines.hxx
+++ b/sw/inc/unoredlines.hxx
@@ -95,9 +95,9 @@ public:
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
-
+protected:
//SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
};
diff --git a/sw/inc/unosett.hxx b/sw/inc/unosett.hxx
index 4c2d66868420..92f52d5ad190 100644
--- a/sw/inc/unosett.hxx
+++ b/sw/inc/unosett.hxx
@@ -176,6 +176,10 @@ class SwXNumberingRules : public cppu::WeakAggImplHelper5
static String sInvalidStyle;
protected:
virtual ~SwXNumberingRules();
+
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
public:
SwXNumberingRules(SwDocShell& rDocSh); // chapter numbering
SwXNumberingRules(const SwNumRule& rRule); // NumRule for paragraphs, numbering styles
@@ -223,9 +227,6 @@ public:
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rProperties, sal_Int32 nIndex)
throw( ::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException );
- //SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-
const String* GetNewCharStyleNames() const {return sNewCharStyleNames;}
const String* GetBulletFontNames() const {return sNewBulletFontNames;}
const SwNumRule* GetNumRule() {return pNumRule;}
diff --git a/sw/inc/unostyle.hxx b/sw/inc/unostyle.hxx
index 740b909f1f7a..080d2e03bc4b 100644
--- a/sw/inc/unostyle.hxx
+++ b/sw/inc/unostyle.hxx
@@ -211,6 +211,7 @@ protected:
void SAL_CALL SetPropertyValues_Impl( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL GetPropertyValues_Impl( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
public:
SwXStyle(SwDoc* pDoc, SfxStyleFamily eFam = SFX_STYLE_FAMILY_PARA, sal_Bool bConditional = sal_False);
SwXStyle(SfxStyleSheetBasePool& rPool, SfxStyleFamily eFam,
@@ -286,7 +287,6 @@ public:
StartListening(*pBasePool);
}
SwDoc* GetDoc() const { return m_pDoc; }
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
};
/* -----------------------------15.12.00 14:25--------------------------------
@@ -377,10 +377,12 @@ class SwXAutoStyleFamily : public cppu::WeakImplHelper1< com::sun::star::style::
SwDocShell *pDocShell;
IStyleAccess::SwAutoStyleFamily eFamily;
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
public:
SwXAutoStyleFamily(SwDocShell* pDocShell, IStyleAccess::SwAutoStyleFamily eFamily);
virtual ~SwXAutoStyleFamily();
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
//XAutoStyleFamily
virtual ::com::sun::star::uno::Reference< ::com::sun::star::style::XAutoStyle > SAL_CALL insertStyle( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& Values ) throw (::com::sun::star::uno::RuntimeException);
@@ -400,13 +402,14 @@ class SwXAutoStylesEnumerator : public cppu::WeakImplHelper1< ::com::sun::star::
public:
SwXAutoStylesEnumerator( SwDoc* pDoc, IStyleAccess::SwAutoStyleFamily eFam );
virtual ~SwXAutoStylesEnumerator();
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
//XEnumeration
virtual sal_Bool SAL_CALL hasMoreElements( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Any SAL_CALL nextElement( ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
};
+
/*-- 19.05.2006 11:20:02---------------------------------------------------
an automatic style
-----------------------------------------------------------------------*/
@@ -428,7 +431,6 @@ public:
SwXAutoStyle( SwDoc* pDoc, SfxItemSet_Pointer_t pInitSet, IStyleAccess::SwAutoStyleFamily eFam );
virtual ~SwXAutoStyle();
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
//XPropertySet
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
@@ -461,6 +463,9 @@ public:
// Special
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getProperties() throw (::com::sun::star::uno::RuntimeException);
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
};
#endif
diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx
index e359726f94dc..b875a8798f0f 100644
--- a/sw/inc/unotbl.hxx
+++ b/sw/inc/unotbl.hxx
@@ -115,6 +115,9 @@ protected:
virtual ~SwXCell();
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
public:
SwXCell(SwFrmFmt* pTblFmt, SwTableBox* pBox, sal_uInt16 nPos=USHRT_MAX );
SwXCell(SwFrmFmt* pTblFmt, const SwStartNode& rStartNode); // XML import interface
@@ -162,9 +165,6 @@ 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 );
- //SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-
//XEnumerationAccess - frueher XParagraphEnumerationAccess
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException );
@@ -194,6 +194,9 @@ class SwXTextTableRow : public cppu::WeakImplHelper2
SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
protected:
virtual ~SwXTextTableRow();
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
public:
SwXTextTableRow(SwFrmFmt* pFmt, SwTableLine* pLine);
@@ -214,9 +217,6 @@ 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 );
- //SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-
const SwTableLine* GetTblRow() const {return pLine;}
static SwTableLine* FindLine(SwTable* pTable, SwTableLine* pLine);
};
@@ -274,7 +274,7 @@ public:
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
//SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
// ITextCursorHelper
virtual const SwPaM* GetPaM() const;
@@ -418,7 +418,7 @@ public:
SwRangeDescriptor& rDesc);
//SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
};
@@ -503,7 +503,7 @@ public:
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
//SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
sal_uInt16 getRowCount(void);
@@ -565,7 +565,7 @@ public:
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
//SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
};
/* -----------------03.02.99 07:31-------------------
@@ -613,7 +613,7 @@ public:
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
//SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
};
#endif
diff --git a/sw/inc/unotextmarkup.hxx b/sw/inc/unotextmarkup.hxx
index 98bb3416d385..7d48595e8e3b 100644
--- a/sw/inc/unotextmarkup.hxx
+++ b/sw/inc/unotextmarkup.hxx
@@ -65,14 +65,14 @@ public:
// ::com::sun::star::text::XMultiTextMarkup:
virtual void SAL_CALL commitMultiTextMarkup( const ::com::sun::star::uno::Sequence< ::com::sun::star::text::TextMarkupDescriptor >& aMarkups ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
- //SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-
private:
SwXTextMarkup( const SwXTextMarkup & ); // not defined
SwXTextMarkup & operator =( const SwXTextMarkup & ); // not defined
protected:
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
SwTxtNode* mpTxtNode;
const ModelToViewHelper::ConversionMap* mpConversionMap;
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
index f51e4a7892f0..bb5168a16c1c 100644
--- a/sw/inc/unotxdoc.hxx
+++ b/sw/inc/unotxdoc.hxx
@@ -129,8 +129,7 @@ class SfxViewFrame;
class SwPrintUIOptions;
class SwPrintData;
class SwRenderData;
-class SwWrtShell;
-
+class ViewShell;
typedef UnoActionContext* UnoActionContextPtr;
SV_DECL_PTRARR(ActionContextArr, UnoActionContextPtr, 4, 4)
@@ -596,18 +595,16 @@ public:
-----------------------------------------------------------------------*/
class SwViewOptionAdjust_Impl
{
- SwWrtShell & m_rShell;
+ ViewShell & m_rShell;
SwViewOption m_aOldViewOptions;
// SwViewOption m_aRenderViewOptions; // view options to use when rendering for PDF export or printing
// bool m_bRestoreViewOptions;
public:
- SwViewOptionAdjust_Impl( SwWrtShell& rSh, const SwViewOption &rViewOptions );
+ SwViewOptionAdjust_Impl( ViewShell& rSh, const SwViewOption &rViewOptions );
~SwViewOptionAdjust_Impl();
-
- void AdjustViewOptions( SwPrintData const*const pPrtOptions );
-
- bool checkShell( const SwWrtShell& rCompare ) const
+ void AdjustViewOptions( SwPrintData const* const pPrtOptions );
+ bool checkShell( const ViewShell& rCompare ) const
{ return &rCompare == &m_rShell; }
};
diff --git a/sw/inc/usrfld.hxx b/sw/inc/usrfld.hxx
index 21243589daf1..11d1db177c84 100644
--- a/sw/inc/usrfld.hxx
+++ b/sw/inc/usrfld.hxx
@@ -61,8 +61,6 @@ public:
inline sal_Bool IsValid() const;
inline void ChgValid( sal_Bool bNew );
- virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
-
double GetValue(SwCalc& rCalc); // Member nValue neu berrechnen
inline double GetValue() const;
inline void SetValue(const double nVal);
@@ -75,6 +73,9 @@ public:
virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nMId ) const;
virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nMId );
+
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew );
};
inline sal_Bool SwUserFieldType::IsValid() const
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index 8bacf2ee8f67..c290f1ed9c99 100644
--- a/sw/inc/viewopt.hxx
+++ b/sw/inc/viewopt.hxx
@@ -158,10 +158,9 @@ 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 mbFormView : 1;
+ sal_Bool mbBrowseMode : 1; //swmod 080130
+ sal_Bool mbBookView : 1; // view mode for page preview
sal_Bool mbViewLayoutBookMode : 1; // book view mode for edit view
sal_Bool bShowPlaceHolderFields : 1; //only used in printing!
mutable bool bIdle;
@@ -409,13 +408,14 @@ 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; }
+ sal_Bool IsFormView() const { return mbFormView; }
+ void SetFormView( sal_Bool bSet ) { mbFormView = bSet; }
// <--
- inline sal_Bool IsPagePrevBookview() const { return bBookview; }
- inline void SetPagePrevBookview(sal_Bool bSet) { bBookview = bSet; }
+ inline sal_Bool getBrowseMode() const { return mbBrowseMode; }
+ inline void setBrowseMode(sal_Bool bSet) { mbBrowseMode = bSet; }
+ inline sal_Bool IsPagePrevBookview() const { return mbBookView; }
+ inline void SetPagePrevBookview(sal_Bool bSet) { mbBookView = bSet; }
sal_Bool IsAutoCompleteWords() const;
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index fd1224e41d32..2daf85092b40 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -36,6 +36,7 @@
#include <ring.hxx>
#include <swrect.hxx>
#include <errhdl.hxx>
+#include <boost/shared_ptr.hpp>// swmod 080115
#include <vcl/mapmod.hxx>
#include <vcl/print.hxx>
@@ -98,7 +99,8 @@ namespace vcl
// benoetigt werden.
// Zur Zeit wird fuer die DrawPage das PreView Flag benoetigt
#define VSHELLFLAG_ISPREVIEW ((long)0x1)
-
+#define VSHELLFLAG_SHARELAYOUT ((long)0x2)//swmod 080125 flag
+typedef boost::shared_ptr<SwRootFrm> SwRootFrmPtr;
class SW_DLLPUBLIC ViewShell : public Ring
{
@@ -170,6 +172,8 @@ class SW_DLLPUBLIC ViewShell : public Ring
SdrPaintWindow* mpTargetPaintWindow;
OutputDevice* mpBufferedOut;
+ SwRootFrmPtr pLayout; //swmod 080116
+
//Initialisierung, wird von den verschiedenen Konstruktoren gerufen.
SW_DLLPRIVATE void Init( const SwViewOption *pNewOpt );
@@ -277,7 +281,7 @@ public:
//Invalidierung der ersten Sichtbaren Seite fuer alle Shells im Ring.
void SetFirstVisPageInvalid();
- SwRootFrm *GetLayout() const;
+ SwRootFrm *GetLayout() const;//swmod 080116
sal_Bool IsNewLayout() const; //Wurde das Layout geladen oder neu
//erzeugt?
@@ -285,6 +289,10 @@ public:
void CalcLayout(); //Durchformatierung des Layouts erzwingen.
+ sal_uInt16 GetPageCount() const;
+
+ const Size GetPageSize( sal_uInt16 nPageNum, bool bSkipEmptyPages ) const;
+
inline SwDoc *GetDoc() const { return pDoc; } //niemals 0.
/** Provides access to the document setting interface
@@ -431,7 +439,7 @@ public:
void LayoutIdle();
inline const SwViewOption *GetViewOptions() const { return pOpt; }
- void ApplyViewOptions( const SwViewOption &rOpt );
+ virtual void ApplyViewOptions( const SwViewOption &rOpt );
void SetUIOptions( const SwViewOption &rOpt );
void SetReadonlyOption(sal_Bool bSet); // Readonly-Bit d. ViewOptions setzen
void SetPDFExportOption(sal_Bool bSet); // set/reset PDF export mode
diff --git a/sw/sdi/_docsh.sdi b/sw/sdi/_docsh.sdi
index 1c5b0db4f062..ad37160a3c1f 100644
--- a/sw/sdi/_docsh.sdi
+++ b/sw/sdi/_docsh.sdi
@@ -121,17 +121,6 @@ interface BaseTextDocument
StateMethod = GetState ;
]
- SID_BROWSER_MODE
- [
- ExecMethod = Execute;
- StateMethod = GetState;
- ]
-
- FN_PRINT_LAYOUT
- [
- ExecMethod = Execute;
- StateMethod = GetState;
- ]
SID_MAIL_PREPAREEXPORT
[
ExecMethod = Execute ;
diff --git a/sw/sdi/_viewsh.sdi b/sw/sdi/_viewsh.sdi
index ee5fc431e165..a17fbb8f5742 100644
--- a/sw/sdi/_viewsh.sdi
+++ b/sw/sdi/_viewsh.sdi
@@ -98,6 +98,16 @@ interface BaseTextEditView
ExecMethod = ExecDraw ;
StateMethod = GetDrawState ;
]
+ SID_BROWSER_MODE
+ [
+ ExecMethod = ExecViewOptions ;
+ StateMethod = StateViewOptions ;
+ ]
+ FN_PRINT_LAYOUT
+ [
+ ExecMethod = ExecViewOptions ;
+ StateMethod = StateViewOptions ;
+ ]
FN_REDLINE_PROTECT
[
ExecMethod = Execute;
diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx
index 4d9fb4d60e2e..08de7edba46f 100644
--- a/sw/source/core/access/accdoc.cxx
+++ b/sw/source/core/access/accdoc.cxx
@@ -66,10 +66,10 @@ using lang::IndexOutOfBoundsException;
// SwAccessiblePreview
//
-SwAccessibleDocumentBase::SwAccessibleDocumentBase ( SwAccessibleMap* pInitMap ) :
- SwAccessibleContext( pInitMap, AccessibleRole::DOCUMENT,
- pInitMap->GetShell()->getIDocumentLayoutAccess()->GetRootFrm() ),
- mxParent( pInitMap->GetShell()->GetWin()->GetAccessibleParentWindow()->GetAccessible() ),
+SwAccessibleDocumentBase::SwAccessibleDocumentBase ( SwAccessibleMap *_pMap ) :
+ SwAccessibleContext( _pMap, AccessibleRole::DOCUMENT,
+ _pMap->GetShell()->GetLayout() ),//swmod 071107//swmod 071225
+ mxParent( _pMap->GetShell()->GetWin()->GetAccessibleParentWindow()->GetAccessible() ),
mpChildWin( 0 )
{
}
diff --git a/sw/source/core/access/accframebase.cxx b/sw/source/core/access/accframebase.cxx
index 221c7e1650a2..91cbe0b9324f 100644
--- a/sw/source/core/access/accframebase.cxx
+++ b/sw/source/core/access/accframebase.cxx
@@ -216,7 +216,7 @@ SwAccessibleFrameBase::~SwAccessibleFrameBase()
{
}
-void SwAccessibleFrameBase::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
+void SwAccessibleFrameBase::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew)
{
sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ;
const SwFlyFrm *pFlyFrm = static_cast< const SwFlyFrm * >( GetFrm() );
@@ -230,13 +230,13 @@ void SwAccessibleFrameBase::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
OUString sOldName( GetName() );
ASSERT( !pOld ||
- static_cast < SwStringMsgPoolItem * >( pOld )->GetString() == String( sOldName ),
+ static_cast < const SwStringMsgPoolItem * >( pOld )->GetString() == String( sOldName ),
"invalid old name" );
const String& rNewName = pFrmFmt->GetName();
SetName( rNewName );
ASSERT( !pNew ||
- static_cast < SwStringMsgPoolItem * >( pNew )->GetString() == rNewName,
+ static_cast < const SwStringMsgPoolItem * >( pNew )->GetString() == rNewName,
"invalid new name" );
if( sOldName != GetName() )
@@ -250,18 +250,20 @@ void SwAccessibleFrameBase::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
}
break;
case RES_OBJECTDYING:
+ // mba: it seems that this class intentionally does not call code in base class SwClient
if( GetRegisteredIn() ==
- static_cast< SwModify *>( static_cast< SwPtrMsgPoolItem * >( pOld )->pObject ) )
- pRegisteredIn->Remove( this );
+ static_cast< SwModify *>( static_cast< const SwPtrMsgPoolItem * >( pOld )->pObject ) )
+ GetRegisteredInNonConst()->Remove( this );
break;
case RES_FMT_CHG:
- if( static_cast< SwFmtChg * >(pNew)->pChangedFmt == GetRegisteredIn() &&
- static_cast< SwFmtChg * >(pOld)->pChangedFmt->IsFmtInDTOR() )
- pRegisteredIn->Remove( this );
+ if( static_cast< const SwFmtChg * >(pNew)->pChangedFmt == GetRegisteredIn() &&
+ static_cast< const SwFmtChg * >(pOld)->pChangedFmt->IsFmtInDTOR() )
+ GetRegisteredInNonConst()->Remove( this );
break;
+
default:
- SwClient::Modify( pOld, pNew );
+ // mba: former call to base class method removed as it is meant to handle only RES_OBJECTDYING
break;
}
}
@@ -271,7 +273,7 @@ void SwAccessibleFrameBase::Dispose( sal_Bool bRecursive )
vos::OGuard aGuard(Application::GetSolarMutex());
if( GetRegisteredIn() )
- pRegisteredIn->Remove( this );
+ GetRegisteredInNonConst()->Remove( this );
SwAccessibleContext::Dispose( bRecursive );
}
diff --git a/sw/source/core/access/accframebase.hxx b/sw/source/core/access/accframebase.hxx
index faa4bb492697..551f8b452621 100644
--- a/sw/source/core/access/accframebase.hxx
+++ b/sw/source/core/access/accframebase.hxx
@@ -51,6 +51,7 @@ protected:
virtual void _InvalidateFocus();
virtual ~SwAccessibleFrameBase();
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
public:
@@ -60,8 +61,6 @@ public:
virtual sal_Bool HasCursor(); // required by map to remember that object
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-
static sal_uInt8 GetNodeType( const SwFlyFrm *pFlyFrm );
// The object is not visible an longer and should be destroyed
diff --git a/sw/source/core/access/accfrmobj.cxx b/sw/source/core/access/accfrmobj.cxx
index 47b4007c1496..66f41e2d7ec1 100644
--- a/sw/source/core/access/accfrmobj.cxx
+++ b/sw/source/core/access/accfrmobj.cxx
@@ -356,7 +356,7 @@ const SwFrm* SwAccessibleChild::GetParent( const sal_Bool bInPagePreview ) const
if( bInPagePreview )
pParent = pFly->FindPageFrm();
else
- pParent = pFly->FindRootFrm();
+ pParent = pFly->getRootFrm();
}
}
else
@@ -392,7 +392,7 @@ const SwFrm* SwAccessibleChild::GetParent( const sal_Bool bInPagePreview ) const
if( bInPagePreview )
pParent = pContact->GetAnchorFrm()->FindPageFrm();
else
- pParent = pContact->GetAnchorFrm()->FindRootFrm();
+ pParent = pContact->GetAnchorFrm()->getRootFrm();
}
}
}
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index df33bbeaf2fa..6684354ef7ac 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -68,14 +68,12 @@
#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>
+#include <switerator.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
@@ -2722,15 +2720,8 @@ SwAccessibleSelectedParas_Impl* SwAccessibleMap::_BuildSelectedParas()
if ( pTxtNode )
{
// loop on all text frames registered at the text node.
- SwClientIter aIter( *pTxtNode );
- for( SwFrm* pFrm = (SwFrm*)aIter.First( TYPE(SwFrm) );
- pFrm;
- pFrm = (SwFrm*)aIter.Next() )
- {
- ASSERT( dynamic_cast<SwTxtFrm*>(pFrm),
- "<SwAccessibleMap::_BuildSelectedParas()> - unexpected frame type" );
- SwTxtFrm* pTxtFrm( dynamic_cast<SwTxtFrm*>(pFrm) );
- if ( pTxtFrm )
+ SwIterator<SwTxtFrm,SwTxtNode> aIter( *pTxtNode );
+ for( SwTxtFrm* pTxtFrm = aIter.First(); pTxtFrm; pTxtFrm = aIter.Next() )
{
uno::WeakReference < XAccessible > xWeakAcc;
SwAccessibleContextMap_Impl::iterator aMapIter =
@@ -2758,7 +2749,6 @@ SwAccessibleSelectedParas_Impl* SwAccessibleMap::_BuildSelectedParas()
}
}
}
- }
// prepare next turn: get next cursor in ring
pCrsr = static_cast<SwPaM*>( pCrsr->GetNext() );
diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx
index fea47cb212e5..8764feff8d74 100644
--- a/sw/source/core/access/accnotextframe.cxx
+++ b/sw/source/core/access/accnotextframe.cxx
@@ -92,7 +92,7 @@ SwAccessibleNoTextFrame::~SwAccessibleNoTextFrame()
{
}
-void SwAccessibleNoTextFrame::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
+void SwAccessibleNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew)
{
const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ;
// --> OD 2009-07-14 #i73249#
@@ -112,9 +112,9 @@ void SwAccessibleNoTextFrame::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
case RES_TITLE_CHANGED:
{
const String& sOldTitle(
- dynamic_cast<SwStringMsgPoolItem*>(pOld)->GetString() );
+ dynamic_cast<const SwStringMsgPoolItem*>(pOld)->GetString() );
const String& sNewTitle(
- dynamic_cast<SwStringMsgPoolItem*>(pNew)->GetString() );
+ dynamic_cast<const SwStringMsgPoolItem*>(pNew)->GetString() );
if ( sOldTitle == sNewTitle )
{
break;
@@ -168,7 +168,7 @@ void SwAccessibleNoTextFrame::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
case RES_FMT_CHG:
if( static_cast< SwFmtChg * >(pNew)->pChangedFmt == GetRegisteredIn() &&
static_cast< SwFmtChg * >(pOld)->pChangedFmt->IsFmtInDTOR() )
- pRegisteredIn->Remove( this );
+ GetRegisteredIn()->Remove( this );
break;
*/
}
diff --git a/sw/source/core/access/accnotextframe.hxx b/sw/source/core/access/accnotextframe.hxx
index 6e070c6dd864..e07d9ff0ffc0 100644
--- a/sw/source/core/access/accnotextframe.hxx
+++ b/sw/source/core/access/accnotextframe.hxx
@@ -47,14 +47,14 @@ protected:
const SwNoTxtNode *GetNoTxtNode() const;
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
public:
SwAccessibleNoTextFrame( SwAccessibleMap* pInitMap,
sal_Int16 nInitRole,
const SwFlyFrm *pFlyFrm );
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-
//===== XAccessibleContext ==============================================
// --> OD 2009-07-14 #i73249#
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 1a1d7312de02..ec8ab7a7c703 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -2669,10 +2669,10 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getNumberOfLineWithCaret()
}
// --> OD 2010-02-19 #i108125#
-void SwAccessibleParagraph::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
+void SwAccessibleParagraph::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
{
mpParaChangeTrackInfo->reset();
- SwClient::Modify( pOld, pNew );
+ CheckRegistration( pOld, pNew );
}
// <--
diff --git a/sw/source/core/access/accpara.hxx b/sw/source/core/access/accpara.hxx
index 3d3f0bed687f..440fd08c7ebd 100644
--- a/sw/source/core/access/accpara.hxx
+++ b/sw/source/core/access/accpara.hxx
@@ -234,6 +234,8 @@ protected:
::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::uno::RuntimeException);
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew);
+
public:
SwAccessibleParagraph( SwAccessibleMap& rInitMap,
@@ -243,10 +245,6 @@ public:
virtual sal_Bool HasCursor(); // required by map to remember that object
- // --> OD 2010-02-19 #i108125#
- virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew);
- // <--
-
//===== XAccessibleContext ==============================================
/// Return this object's description.
diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx
index 8114f67ec3f0..fd788574aad7 100644
--- a/sw/source/core/access/acctable.cxx
+++ b/sw/source/core/access/acctable.cxx
@@ -740,7 +740,7 @@ SwAccessibleTable::~SwAccessibleTable()
delete mpTableData;
}
-void SwAccessibleTable::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
+void SwAccessibleTable::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew)
{
sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ;
const SwTabFrm *pTabFrm = static_cast< const SwTabFrm * >( GetFrm() );
@@ -787,13 +787,14 @@ void SwAccessibleTable::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
break;
case RES_OBJECTDYING:
+ // mba: it seems that this class intentionally does not call code in base class SwClient
if( GetRegisteredIn() ==
- static_cast< SwModify *>( static_cast< SwPtrMsgPoolItem * >( pOld )->pObject ) )
- pRegisteredIn->Remove( this );
+ static_cast< SwModify *>( static_cast< const SwPtrMsgPoolItem * >( pOld )->pObject ) )
+ GetRegisteredInNonConst()->Remove( this );
break;
default:
- SwClient::Modify( pOld, pNew );
+ // mba: former call to base class method removed as it is meant to handle only RES_OBJECTDYING
break;
}
}
@@ -1360,7 +1361,7 @@ void SwAccessibleTable::Dispose( sal_Bool bRecursive )
vos::OGuard aGuard(Application::GetSolarMutex());
if( GetRegisteredIn() )
- pRegisteredIn->Remove( this );
+ GetRegisteredInNonConst()->Remove( this );
SwAccessibleContext::Dispose( bRecursive );
}
@@ -1717,7 +1718,7 @@ SwAccessibleTableData_Impl* SwAccessibleTableColHeaders::CreateNewTableData()
}
-void SwAccessibleTableColHeaders::Modify( SfxPoolItem * /*pOld*/, SfxPoolItem * /*pNew*/ )
+void SwAccessibleTableColHeaders::Modify( const SfxPoolItem * /*pOld*/, const SfxPoolItem * /*pNew*/ )
{
}
diff --git a/sw/source/core/access/acctable.hxx b/sw/source/core/access/acctable.hxx
index 8bdf2e8b49b2..82141c09bead 100644
--- a/sw/source/core/access/acctable.hxx
+++ b/sw/source/core/access/acctable.hxx
@@ -89,12 +89,12 @@ protected:
// Is table data evailable?
sal_Bool HasTableData() const { return (mpTableData != 0); }
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
public:
SwAccessibleTable( SwAccessibleMap* pInitMap, const SwTabFrm* pTableFrm );
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-
//===== XInterface ======================================================
// (XInterface methods need to be implemented to disambigouate
@@ -277,13 +277,12 @@ protected:
{}
virtual SwAccessibleTableData_Impl* CreateNewTableData();
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
public:
SwAccessibleTableColHeaders( SwAccessibleMap *pMap, const SwTabFrm *pTabFrm );
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-
//===== XInterface ======================================================
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
diff --git a/sw/source/core/access/acctextframe.cxx b/sw/source/core/access/acctextframe.cxx
index 75fc1fdebc0e..c0188c7eb193 100644
--- a/sw/source/core/access/acctextframe.cxx
+++ b/sw/source/core/access/acctextframe.cxx
@@ -84,7 +84,7 @@ SwAccessibleTextFrame::~SwAccessibleTextFrame()
{
}
-void SwAccessibleTextFrame::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
+void SwAccessibleTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew)
{
const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ;
// --> OD 2009-07-14 #i73249#
@@ -103,9 +103,9 @@ void SwAccessibleTextFrame::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
case RES_TITLE_CHANGED:
{
const String& sOldTitle(
- dynamic_cast<SwStringMsgPoolItem*>(pOld)->GetString() );
+ dynamic_cast<const SwStringMsgPoolItem*>(pOld)->GetString() );
const String& sNewTitle(
- dynamic_cast<SwStringMsgPoolItem*>(pNew)->GetString() );
+ dynamic_cast<const SwStringMsgPoolItem*>(pNew)->GetString() );
if ( sOldTitle == sNewTitle )
{
break;
diff --git a/sw/source/core/access/acctextframe.hxx b/sw/source/core/access/acctextframe.hxx
index d6c9a7a74331..a2b891de18e4 100644
--- a/sw/source/core/access/acctextframe.hxx
+++ b/sw/source/core/access/acctextframe.hxx
@@ -46,13 +46,12 @@ protected:
virtual ~SwAccessibleTextFrame();
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
public:
SwAccessibleTextFrame( SwAccessibleMap* pInitMap, const SwFlyFrm* pFlyFrm );
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-
-
//===== XAccessibleContext ==============================================
// --> OD 2009-07-14 #i73249#
diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx
index bbdedfea13d4..68150f3f9e5d 100644
--- a/sw/source/core/attr/calbck.cxx
+++ b/sw/source/core/attr/calbck.cxx
@@ -28,127 +28,102 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-#include <hintids.hxx> // fuer RES_..
+#include <hintids.hxx> // contains RES_.. IDs
#include <frame.hxx>
#include <hints.hxx>
-#include <swcache.hxx>
-#include <swfntcch.hxx>
-
-#ifdef DBG_UTIL
-#include <unotextmarkup.hxx>
-#endif
+#include <swcache.hxx> // mba: get rid of that dependency
+#include <swfntcch.hxx> // mba: get rid of that dependency
static SwClientIter* pClientIters = 0;
-TYPEINIT0(SwClient); //rtti
-
-/*************************************************************************
-|* SwClient::SwClient(SwModify *)
-|*
-|* Beschreibung callback.doc V1.14
-|* Ersterstellung VB 20.03.91
-|* Letzte Aenderung MA 20. Mar. 95
-*************************************************************************/
-
+TYPEINIT0(SwClient);
+/*************************************************************************/
SwClient::SwClient(SwModify *pToRegisterIn)
- : pLeft( 0 ), pRight( 0 ), pRegisteredIn( 0 )
+ : pLeft( 0 ), pRight( 0 ), pRegisteredIn( 0 ), mbIsAllowedToBeRemovedInModifyCall(false)
{
- bModifyLocked =
- bInModify =
- bInDocDTOR =
- bInCache = sal_False;
- bInSwFntCache = sal_False;
-
if(pToRegisterIn)
+ // connect to SwModify
pToRegisterIn->Add(this);
}
-/*************************************************************************
-|* SwClient::Modify()
-|*
-|* Beschreibung callback.doc V1.14
-|* Ersterstellung VB 20.03.91
-|* Letzte Aenderung VB 20.03.91
-*************************************************************************/
-
-
-void SwClient::Modify( SfxPoolItem *pOld, SfxPoolItem * )
+/*************************************************************************/
+void SwClient::CheckRegistration( const SfxPoolItem* pOld, const SfxPoolItem * )
{
+ // this method only handles notification about dying SwModify objects
if( (!pOld || pOld->Which() != RES_OBJECTDYING) )
return;
- SwPtrMsgPoolItem *pDead = (SwPtrMsgPoolItem *)pOld;
- if(pDead->pObject == pRegisteredIn)
+ const SwPtrMsgPoolItem *pDead = static_cast<const SwPtrMsgPoolItem*>(pOld);
+ if(pDead && pDead->pObject == pRegisteredIn)
{
- SwModify *pAbove = (SwModify*)pRegisteredIn->GetRegisteredIn();
+ // I've got a notification from the object I know
+ SwModify *pAbove = const_cast<SwModify*>(pRegisteredIn->GetRegisteredIn());
if(pAbove)
{
+ // if the dying object itself was listening at an SwModify, I take over
+ // adding myself to pAbove will automatically remove me from my current pRegisteredIn
pAbove->Add(this);
return;
}
+
+ // destroy connection
pRegisteredIn->Remove(this);
}
}
-/*************************************************************************
-|* SwClient::~SwClient()
-|*
-|* Beschreibung callback.doc V1.14
-|* Ersterstellung VB 20.03.91
-|* Letzte Aenderung MA 25. Jan. 94
-*************************************************************************/
+void SwClient::Modify( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue )
+{
+ CheckRegistration( pOldValue, pNewValue );
+}
+void SwClient::SwClientNotify( const SwModify&, const SfxHint& )
+{
+
+}
+//*************************************************************************
SwClient::~SwClient()
{
+ DBG_ASSERT( !pRegisteredIn || pRegisteredIn->GetDepends(),"SwModify still known, but Client already disconnected!" );
if( pRegisteredIn && pRegisteredIn->GetDepends() )
+ // still connected
pRegisteredIn->Remove( this );
-
- ASSERT( !IsModifyLocked(), "Modify destroyed but locked." );
}
- // erfrage vom Client Informationen
sal_Bool SwClient::GetInfo( SfxPoolItem& ) const
{
return sal_True; // und weiter
}
-/*************************************************************************
-|* SwModify::SwModify( SwModify * )
-|*
-|* Beschreibung Dokument 1.7
-|* Ersterstellung JP 20.11.90
-|* Letzte Aenderung VB 20.03.91
-*************************************************************************/
-
-SwModify::SwModify( SwModify *pToRegisterIn )
- : SwClient(pToRegisterIn), pRoot( 0 )
+/*************************************************************************/
+SwModify::SwModify()
+ : SwClient(0), pRoot(0)
{
+ bModifyLocked = sal_False;
+ bLockClientList = sal_False;
+ bInDocDTOR = sal_False;
+ bInCache = sal_False;
+ bInSwFntCache = sal_False;
}
-// @@@ forbidden and not implemented, but needs to be accessible (protected).
-SwModify::SwModify( const SwModify & )
- : SwClient( 0 )
+SwModify::SwModify( SwModify *pToRegisterIn )
+ : SwClient(pToRegisterIn), pRoot( 0 )
{
- OSL_PRECOND(0, "SwModify(const SwModify&): not implemented.");
+ bModifyLocked = sal_False;
+ bLockClientList = sal_False;
+ bInDocDTOR = sal_False;
+ bInCache = sal_False;
+ bInSwFntCache = sal_False;
}
-/*************************************************************************
-|* SwModify::~SwModify()
-|*
-|* Beschreibung Dokument 1.7
-|* Ersterstellung JP 20.11.90
-|* Letzte Aenderung JP 15.04.94
-*************************************************************************/
-
-
-
+/*************************************************************************/
SwModify::~SwModify()
{
+ ASSERT( !IsModifyLocked(), "Modify destroyed but locked." );
+
if ( IsInCache() )
SwFrm::GetCache().Delete( this );
@@ -157,44 +132,40 @@ SwModify::~SwModify()
if( pRoot )
{
+ // there are depending objects
if( IsInDocDTOR() )
{
- // alle Clients "logisch" austragen
+ // if document gets destroyed anyway, just tell clients to forget me
+ // so that they don't try to get removed from my list later when they also get destroyed
SwClientIter aIter( *this );
- SwClient* p;
- while( 0 != ( p = aIter++ ) )
- p->pRegisteredIn = 0;
-
- p = aIter.GoRoot(); // wieder ab Root (==Start) anfangen
- do {
+ SwClient* p = aIter.GoStart();
+ while ( p )
+ {
p->pRegisteredIn = 0;
- } while( 0 != ( p = aIter-- ) );
+ p = aIter++;
+ }
}
else
{
- // verschicke die Nachricht an die abgeleiteten Objekte.
+ // notify all clients that they shall remove themselves
SwPtrMsgPoolItem aDyObject( RES_OBJECTDYING, this );
- Modify( &aDyObject, &aDyObject );
+ NotifyClients( &aDyObject, &aDyObject );
- // Zwangsummeldung aller derjenigen, die sich nicht ausgetragen
- // haben, durch Aufruf von SwClient::Modify()
+ // remove all clients that have not done themselves
+ // mba: possibly a hotfix for forgotten base class calls?!
while( pRoot )
- pRoot->SwClient::Modify(&aDyObject, &aDyObject);
+ pRoot->CheckRegistration(&aDyObject, &aDyObject);
}
}
}
-/*************************************************************************
-|* SwModify::Modify( SwHint * pOldValue, SwHint * pNewValue )
-|*
-|* Beschreibung Dokument 1.7
-|* Ersterstellung JP 20.11.90
-|* Letzte Aenderung MA 20. Mar. 95
-*************************************************************************/
-
-
+/*************************************************************************/
+void SwModify::Modify( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue )
+{
+ NotifyClients( pOldValue, pNewValue );
+}
-void SwModify::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
+void SwModify::NotifyClients( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue )
{
if (IsInCache() || IsInSwFntCache())
{
@@ -208,47 +179,35 @@ void SwModify::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
LockModify();
-#ifndef DBG_UTIL
- bInModify = sal_True;
-#else
+ // mba: WTF?!
if( !pOldValue )
- bInModify = sal_True;
+ bLockClientList = sal_True;
else
- // following Modifies don't calls an ASSRT
+ {
+ // following Modifies shouldn't call an ASSERT
switch( pOldValue->Which() )
{
case RES_OBJECTDYING:
case RES_REMOVE_UNO_OBJECT:
- bInModify = ((SwPtrMsgPoolItem *)pOldValue)->pObject != this;
+ bLockClientList = ((SwPtrMsgPoolItem *)pOldValue)->pObject != this;
break;
case RES_FOOTNOTE_DELETED:
case RES_REFMARK_DELETED:
case RES_TOXMARK_DELETED:
case RES_FIELD_DELETED:
- bInModify = sal_False;
+ bLockClientList = sal_False;
break;
default:
- bInModify = sal_True;
+ bLockClientList = sal_True;
}
-#endif
-
- SwClientIter aIter( *this );
- SwClient * pLast = aIter.GoStart();
- if( pLast ) // konnte zum Anfang gesprungen werden ??
- do
- {
- pLast->Modify( pOldValue, pNewValue );
- if( !pRoot ) // Baum schon Weg ??
- break;
- } while( 0 != ( pLast = aIter++ ));
+ }
- bInModify = sal_False;
+ ModifyBroadcast( pOldValue, pNewValue );
+ bLockClientList = sal_False;
UnlockModify();
}
-// erfrage vom Modify Informationen
-
sal_Bool SwModify::GetInfo( SfxPoolItem& rInfo ) const
{
sal_Bool bRet = sal_True; // bedeutet weiter zum naechsten
@@ -264,48 +223,38 @@ sal_Bool SwModify::GetInfo( SfxPoolItem& rInfo ) const
;
}
- return bRet; // und weiter
+ return bRet;
}
-/*************************************************************************
-|* 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?" );
+ ASSERT( !bLockClientList, "Client inserted while in Modify" );
- // nur wenn das hier noch nicht eingetragen ist einfuegen
if(pDepend->pRegisteredIn != this )
{
#ifdef DBG_UTIL
SwClientIter* pTmp = pClientIters;
while( pTmp )
{
- ASSERT( &pTmp->rRoot != pRoot,
- "Client beim angemeldeten ClientIter einfuegen?" );
+ ASSERT( &pTmp->GetModify() != pRoot, "Client added to active ClientIter" );
pTmp = pTmp->pNxtIter;
}
#endif
- // wenn schon wanders angemeldet, dann dort abmelden
+ // deregister new client in case it is already registered elsewhere
if( pDepend->pRegisteredIn != 0 )
pDepend->pRegisteredIn->Remove( pDepend );
if( !pRoot )
{
+ // first client added
pRoot = pDepend;
pRoot->pLeft = 0;
pRoot->pRight = 0;
}
else
{
- // immer hinter die Root haengen
+ // append client
pDepend->pRight = pRoot->pRight;
pRoot->pRight = pDepend;
pDepend->pLeft = pRoot;
@@ -313,29 +262,24 @@ void SwModify::Add(SwClient *pDepend)
pDepend->pRight->pLeft = pDepend;
}
+ // connect client to me
pDepend->pRegisteredIn = this;
}
}
-/*************************************************************************
-|* SwModify::_Remove( SwClient *pDepend )
-|*
-|* Beschreibung Dokument 1.7
-|* Ersterstellung JP 20.11.90
-|* Letzte Aenderung JP 14.09.94
-*************************************************************************/
-
+/*************************************************************************/
-
-SwClient *SwModify::_Remove(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 ( bInDocDTOR )
+ return 0;
+
+ ASSERT( !bLockClientList || pDepend->mbIsAllowedToBeRemovedInModifyCall, "SwClient shall be removed in Modify call!" );
- // loesche das Object aus der Liste und setze den
- // Registrierungs-Pointer zurueck
if( pDepend->pRegisteredIn == this )
{
+ // SwClient is my listener
+ // remove it from my list
SwClient* pR = pDepend->pRight;
SwClient* pL = pDepend->pLeft;
if( pRoot == pDepend )
@@ -346,40 +290,41 @@ SwClient *SwModify::_Remove(SwClient * pDepend)
if( pR )
pR->pLeft = pL;
- // alle Client-Iters updaten
+ // update ClientIters
SwClientIter* pTmp = pClientIters;
while( pTmp )
{
- if( pTmp->pAkt == pDepend || pTmp->pDelNext == pDepend )
+ if( pTmp->pAct == pDepend || pTmp->pDelNext == pDepend )
+ // if object being removed is the current or next object in an iterator, advance this iterator
pTmp->pDelNext = pR;
-
- // --> FME 2006-02-03 #127369# Notify SwClientIter if mpWatchClient is removed
- if ( pTmp->mpWatchClient == pDepend )
- pTmp->mpWatchClient = 0;
- // <--
-
pTmp = pTmp->pNxtIter;
}
pDepend->pLeft = 0;
pDepend->pRight = 0;
}
- else {
- ASSERT( sal_False, "SwModify::Remove(): pDepend nicht gefunden");
+ else
+ {
+ ASSERT( false, "SwModify::Remove(): pDepend nicht gefunden" );
}
+
+ // disconnect client from me
pDepend->pRegisteredIn = 0;
return pDepend;
}
-
-/*************************************************************************
-|* SwModify::CheckCaching( const sal_uInt16 nWhich )
-|*
-|* Ersterstellung JP 25.06.95
-|* Letzte Aenderung JP 25.06.95
-*************************************************************************/
-
-
+int SwModify::GetClientCount() const
+{
+ int nRet=0;
+ SwClientIter aIter( *this );
+ SwClient *pLast = aIter.GoStart();
+ if( pLast )
+ do
+ {
+ ++nRet;
+ } while( 0 != ( pLast = aIter++ ));
+ return nRet;
+}
void SwModify::CheckCaching( const sal_uInt16 nWhich )
{
@@ -411,19 +356,33 @@ void SwModify::CheckCaching( const sal_uInt16 nWhich )
}
}
+void SwModify::CallSwClientNotify( const SfxHint& rHint ) const
+{
+ SwClientIter aIter(*this);
+ SwClient * pClient = aIter.GoStart();
+ while (pClient)
+ {
+ pClient->SwClientNotify( *this, rHint );
+ pClient = aIter++;
+ }
+}
+
+void SwModify::ModifyBroadcast( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue, TypeId nType )
+{
+ SwClientIter aIter(*this);
+ SwClient * pClient = aIter.First( nType );
+ while (pClient)
+ {
+ pClient->Modify( pOldValue, pNewValue );
+ pClient = aIter.Next();
+ }
+}
// ----------
// SwDepend
// ----------
-/*************************************************************************
-|* SwDepend::SwDepend(SwClient *pTellHim,SwModify *pDepend)
-|*
-|* Beschreibung callback.doc V1.14
-|* Ersterstellung VB 20.03.91
-|* Letzte Aenderung VB 20.03.91
-*************************************************************************/
-
+/*************************************************************************/
SwDepend::SwDepend(SwClient *pTellHim, SwModify *pDepend)
: SwClient(pDepend)
@@ -431,27 +390,22 @@ SwDepend::SwDepend(SwClient *pTellHim, SwModify *pDepend)
pToTell = pTellHim;
}
-/*************************************************************************
-|*
-|* SwDepend::Modify(SwHint *, SwHint *)
-|*
-|* Beschreibung callback.doc V1.14
-|* Ersterstellung VB 20.03.91
-|* Letzte Aenderung VB 20.03.91
-|*
-*************************************************************************/
-
+/*************************************************************************/
-void SwDepend::Modify( SfxPoolItem *pOldValue, SfxPoolItem *pNewValue )
+void SwDepend::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem *pNewValue )
{
if(pNewValue && pNewValue->Which() == RES_OBJECTDYING)
- SwClient::Modify(pOldValue,pNewValue);
+ CheckRegistration(pOldValue,pNewValue);
else if(pToTell)
- pToTell->Modify(pOldValue, pNewValue);
+ pToTell->ModifyNotification(pOldValue, pNewValue);
}
+void SwDepend::SwClientNotify( const SwModify& rMod, const SfxHint& rHint )
+{
+ if ( pToTell )
+ pToTell->SwClientNotifyCall( rMod, rHint );
+}
- // erfrage vom Modify Informationen
sal_Bool SwDepend::GetInfo( SfxPoolItem& rInfo ) const
{
return pToTell ? pToTell->GetInfo( rInfo ) : sal_True;
@@ -459,14 +413,13 @@ sal_Bool SwDepend::GetInfo( SfxPoolItem& rInfo ) const
/********************************************************************/
-
-SwClientIter::SwClientIter( SwModify const& rModify )
+SwClientIter::SwClientIter( const SwModify& rModify )
: rRoot( rModify )
{
- // hinten einketten!
pNxtIter = 0;
if( pClientIters )
{
+ // append to list of ClientIters
SwClientIter* pTmp = pClientIters;
while( pTmp->pNxtIter )
pTmp = pTmp->pNxtIter;
@@ -475,9 +428,8 @@ SwClientIter::SwClientIter( SwModify const& rModify )
else
pClientIters = this;
- pAkt = rRoot.pRoot;
- pDelNext = pAkt;
- mpWatchClient = 0;
+ pAct = const_cast<SwClient*>(rRoot.GetDepends());
+ pDelNext = pAct;
}
@@ -486,6 +438,7 @@ SwClientIter::~SwClientIter()
{
if( pClientIters )
{
+ // reorganize list of ClientIters
if( pClientIters == this )
pClientIters = pNxtIter;
else
@@ -503,132 +456,109 @@ 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 )
+ if( pDelNext == pAct )
{
- pAkt = pAkt->pRight;
- pDelNext = pAkt;
+ pAct = pAct->pRight;
+ pDelNext = pAct;
}
else
- pAkt = pDelNext;
- return pAkt;
+ pAct = pDelNext;
+ return pAct;
}
-#endif
-
- // Prefix Operator
-SwClient* SwClientIter::operator++()
+SwClient* SwClientIter::GoStart()
{
- if( pDelNext == pAkt )
- {
- pAkt = pAkt->pRight;
- pDelNext = pAkt;
- }
- else
- pAkt = pDelNext;
- return pAkt;
+ pAct = const_cast<SwClient*>(rRoot.GetDepends());
+ if( pAct )
+ while( pAct->pLeft )
+ pAct = pAct->pLeft;
+ pDelNext = pAct;
+ return pAct;
}
-
-#ifndef CFRONT
- // Postfix Operator
-SwClient* SwClientIter::operator--(int)
+SwClient* SwClientIter::GoEnd()
{
-// 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->pLeft;
- else
- pAkt = pDelNext->pLeft;
- pDelNext = pAkt;
- return pAkt;
+ pAct = pDelNext;
+ if( !pAct )
+ pAct = const_cast<SwClient*>(rRoot.GetDepends());
+ if( pAct )
+ while( pAct->pRight )
+ pAct = pAct->pRight;
+ pDelNext = pAct;
+ return pAct;
}
-#endif
-
-
- // Prefix Operator
-SwClient* SwClientIter::operator--()
-{
- if( pDelNext == pAkt )
- pAkt = pAkt->pLeft;
- else
- pAkt = pDelNext->pLeft;
- pDelNext = pAkt;
- return pAkt;
-}
-
-
-SwClient* SwClientIter::GoStart() // zum Anfang des Baums
-{
- pAkt = rRoot.pRoot;
- if( pAkt )
- while( pAkt->pLeft )
- pAkt = pAkt->pLeft;
- pDelNext = pAkt;
- return pAkt;
-}
-
-
-SwClient* SwClientIter::GoEnd() // zum End des Baums
-{
- pAkt = pDelNext;
- if( !pAkt )
- pAkt = rRoot.pRoot;
- if( pAkt )
- while( pAkt->pRight )
- pAkt = pAkt->pRight;
- pDelNext = pAkt;
- return pAkt;
-}
-
-
SwClient* SwClientIter::First( TypeId nType )
{
aSrchId = nType;
GoStart();
- if( pAkt )
+ if( pAct )
do {
- if( pAkt->IsA( aSrchId ) )
+ if( pAct->IsA( aSrchId ) )
break;
- if( pDelNext == pAkt )
+ if( pDelNext == pAct )
{
- pAkt = pAkt->pRight;
- pDelNext = pAkt;
+ pAct = pAct->pRight;
+ pDelNext = pAct;
}
else
- pAkt = pDelNext;
+ pAct = pDelNext;
- } while( pAkt );
- return pAkt;
+ } while( pAct );
+ return pAct;
}
-
SwClient* SwClientIter::Next()
{
do {
- // erstmal zum naechsten
- if( pDelNext == pAkt )
+ if( pDelNext == pAct )
{
- pAkt = pAkt->pRight;
- pDelNext = pAkt;
+ pAct = pAct->pRight;
+ pDelNext = pAct;
}
else
- pAkt = pDelNext;
+ pAct = pDelNext;
- if( pAkt && pAkt->IsA( aSrchId ) )
+ if( pAct && pAct->IsA( aSrchId ) )
break;
- } while( pAkt );
- return pAkt;
+ } while( pAct );
+ return pAct;
+}
+
+SwClient* SwClientIter::Last( TypeId nType )
+{
+ aSrchId = nType;
+ GoEnd();
+ if( pAct )
+ do {
+ if( pAct->IsA( aSrchId ) )
+ break;
+
+ if( pDelNext == pAct )
+ pAct = pAct->pLeft;
+ else
+ pAct = pDelNext->pLeft;
+ pDelNext = pAct;
+
+ } while( pAct );
+ return pAct;
}
+SwClient* SwClientIter::Previous()
+{
+ do {
+ if( pDelNext == pAct )
+ pAct = pAct->pLeft;
+ else
+ pAct = pDelNext->pLeft;
+ pDelNext = pAct;
+ if( pAct && pAct->IsA( aSrchId ) )
+ break;
+ } while( pAct );
+ return pAct;
+}
diff --git a/sw/source/core/attr/cellatr.cxx b/sw/source/core/attr/cellatr.cxx
index cb5624b615e4..e171b4408018 100644
--- a/sw/source/core/attr/cellatr.cxx
+++ b/sw/source/core/attr/cellatr.cxx
@@ -29,9 +29,7 @@
#include "precompiled_sw.hxx"
#include <float.h>
-
#include <rtl/math.hxx>
-
#include <hintids.hxx> // fuer RES_..
#include <cellatr.hxx>
#include <calc.hxx>
@@ -41,7 +39,7 @@
#include <node.hxx>
#include <hints.hxx>
#include <rolbck.hxx>
-
+#include <switerator.hxx>
//TYPEINIT1( SwFmt, SwClient ); //rtti fuer SwFmt
@@ -112,9 +110,9 @@ const SwNode* SwTblBoxFormula::GetNodeOfFormula() const
const SwNode* pRet = 0;
if( pDefinedIn )
{
- SwClient* pBox = SwClientIter( *pDefinedIn ).First( TYPE( SwTableBox ));
+ SwTableBox* pBox = SwIterator<SwTableBox,SwModify>::FirstElement( *pDefinedIn );
if( pBox )
- pRet = ((SwTableBox*)pBox)->GetSttNd();
+ pRet = pBox->GetSttNd();
}
return pRet;
}
@@ -124,8 +122,7 @@ SwTableBox* SwTblBoxFormula::GetTableBox()
{
SwTableBox* pBox = 0;
if( pDefinedIn )
- pBox = (SwTableBox*)SwClientIter( *pDefinedIn ).
- First( TYPE( SwTableBox ));
+ pBox = SwIterator<SwTableBox,SwModify>::FirstElement( *pDefinedIn );
return pBox;
}
diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx
index f1c9142b7193..2e4212fea321 100644
--- a/sw/source/core/attr/format.cxx
+++ b/sw/source/core/attr/format.cxx
@@ -36,9 +36,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
@@ -142,16 +140,16 @@ SwFmt &SwFmt::operator=(const SwFmt& rFmt)
{
SwAttrSetChg aChgOld( aSet, aOld );
SwAttrSetChg aChgNew( aSet, aNew );
- Modify( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
+ ModifyNotification( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
}
- if( pRegisteredIn != rFmt.pRegisteredIn )
+ if( GetRegisteredIn() != rFmt.GetRegisteredIn() )
{
- if( pRegisteredIn )
- pRegisteredIn->Remove(this);
- if(rFmt.pRegisteredIn)
+ if( GetRegisteredIn() )
+ GetRegisteredInNonConst()->Remove(this);
+ if(rFmt.GetRegisteredIn())
{
- rFmt.pRegisteredIn->Add(this);
+ const_cast<SwFmt&>(rFmt).GetRegisteredInNonConst()->Add(this);
aSet.SetParent( &rFmt.aSet );
}
else
@@ -170,7 +168,7 @@ void SwFmt::SetName( const String& rNewName, sal_Bool bBroadcast )
SwStringMsgPoolItem aOld( RES_NAME_CHANGED, aFmtName );
SwStringMsgPoolItem aNew( RES_NAME_CHANGED, rNewName );
aFmtName = rNewName;
- Modify( &aOld, &aNew );
+ ModifyNotification( &aOld, &aNew );
}
else
{
@@ -229,7 +227,7 @@ void SwFmt::CopyAttrs( const SwFmt& rFmt, sal_Bool bReplace )
SwAttrSetChg aChgOld( aSet, aOld );
SwAttrSetChg aChgNew( aSet, aNew );
- Modify( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
+ ModifyNotification( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
}
}
@@ -269,7 +267,7 @@ SwFmt::~SwFmt()
SwFmtChg aNewFmt(pParentFmt);
SwClient * pDepend = (SwClient*)GetDepends();
pParentFmt->Add(pDepend);
- pDepend->Modify(&aOldFmt, &aNewFmt);
+ pDepend->ModifyNotification(&aOldFmt, &aNewFmt);
}
}
}
@@ -277,7 +275,7 @@ SwFmt::~SwFmt()
/*************************************************************************
-|* void SwFmt::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
+|* void SwFmt::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue )
|*
|* Beschreibung Dokument 1.14
|* Ersterstellung JP 22.11.90
@@ -285,7 +283,7 @@ SwFmt::~SwFmt()
*************************************************************************/
-void SwFmt::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
+void SwFmt::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue )
{
sal_Bool bWeiter = sal_True; // sal_True = Propagierung an die Abhaengigen
@@ -302,9 +300,9 @@ void SwFmt::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
SwFmt * pFmt = (SwFmt *) ((SwPtrMsgPoolItem *)pNewValue)->pObject;
// nicht umhaengen wenn dieses das oberste Format ist !!
- if( pRegisteredIn && pRegisteredIn == pFmt )
+ if( GetRegisteredIn() && GetRegisteredIn() == pFmt )
{
- if( pFmt->pRegisteredIn )
+ if( pFmt->GetRegisteredIn() )
{
// wenn Parent, dann im neuen Parent wieder anmelden
pFmt->DerivedFrom()->Add( this );
@@ -332,7 +330,7 @@ void SwFmt::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
if( aNew.Count() )
// keine mehr gesetzt, dann Ende !!
- SwModify::Modify( &aOld, &aNew );
+ NotifyClients( &aOld, &aNew );
bWeiter = sal_False;
}
break;
@@ -353,12 +351,12 @@ void SwFmt::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
{
// IsWritten-Flag zuruecksetzen. Hint nur an abhanegige
// Formate (und keine Frames) propagieren.
+ // mba: the code does the opposite from what is written in the comment!
ResetWritten();
- SwClientIter aIter( *this );
- for( SwClient *pClient = aIter.First( TYPE(SwFmt) ); pClient;
- pClient = aIter.Next() )
- pClient->Modify( pOldValue, pNewValue );
-
+ // mba: here we don't use the additional stuff from NotifyClients().
+ // should we?!
+ // mba: move the code that ignores this event to the clients
+ ModifyBroadcast( pOldValue, pNewValue, TYPE(SwFmt) );
bWeiter = sal_False;
}
break;
@@ -383,7 +381,7 @@ ASSERT( RES_PARATR_DROP == nWhich, "Modify ohne Absender verschickt" );
if( bWeiter )
{
// laufe durch alle abhaengigen Formate
- SwModify::Modify( pOldValue, pNewValue );
+ NotifyClients( pOldValue, pNewValue );
}
}
@@ -431,7 +429,7 @@ sal_Bool SwFmt::SetDerivedFrom(SwFmt *pDerFrom)
SwFmtChg aOldFmt(this);
SwFmtChg aNewFmt(this);
- Modify( &aOldFmt, &aNewFmt );
+ ModifyNotification( &aOldFmt, &aNewFmt );
return sal_True;
}
@@ -476,7 +474,7 @@ sal_Bool SwFmt::SetFmtAttr(const SfxPoolItem& rAttr )
SwAttrSetChg aChgOld( aSet, aOld );
SwAttrSetChg aChgNew( aSet, aNew );
- Modify( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
+ ModifyNotification( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
}
}
return bRet;
@@ -524,7 +522,7 @@ sal_Bool SwFmt::SetFmtAttr( const SfxItemSet& rSet )
aSet.SetModifyAtAttr( this );
SwAttrSetChg aChgOld( aSet, aOld );
SwAttrSetChg aChgNew( aSet, aNew );
- Modify( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
+ ModifyNotification( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
}
}
return bRet;
@@ -561,7 +559,7 @@ sal_Bool SwFmt::ResetFmtAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 )
{
SwAttrSetChg aChgOld( aSet, aOld );
SwAttrSetChg aChgNew( aSet, aNew );
- Modify( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
+ ModifyNotification( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
}
return bRet;
}
@@ -595,7 +593,7 @@ sal_uInt16 SwFmt::ResetAllFmtAttr()
{
SwAttrSetChg aChgOld( aSet, aOld );
SwAttrSetChg aChgNew( aSet, aNew );
- Modify( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
+ ModifyNotification( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
}
return aNew.Count();
}
@@ -644,7 +642,7 @@ void SwFmt::DelDiffs( const SfxItemSet& rSet )
{
SwAttrSetChg aChgOld( aSet, aOld );
SwAttrSetChg aChgNew( aSet, aNew );
- Modify( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
+ ModifyNotification( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
}
}
diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index 18dc67cfc958..5b6d5701ed62 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -166,9 +166,9 @@ namespace sw { namespace mark
}
- void MarkBase::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew)
+ void MarkBase::Modify( const SfxPoolItem *pOld, const SfxPoolItem *pNew )
{
- SwModify::Modify(pOld, pNew);
+ NotifyClients(pOld, pNew);
if (pOld && (RES_REMOVE_UNO_OBJECT == pOld->Which()))
{ // invalidate cached uno object
SetXBookmark(uno::Reference<text::XTextContent>(0));
diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx
index 74275c1014ef..8b5bf2fc5a46 100644
--- a/sw/source/core/crsr/callnk.cxx
+++ b/sw/source/core/crsr/callnk.cxx
@@ -69,7 +69,7 @@ SwCallLink::SwCallLink( SwCrsrShell & rSh )
bHasSelection = ( *pCrsr->GetPoint() != *pCrsr->GetMark() );
if( ND_TEXTNODE & nNdTyp )
- nLeftFrmPos = SwCallLink::GetFrm( (SwTxtNode&)rNd, nCntnt,
+ nLeftFrmPos = SwCallLink::getLayoutFrm( rShell.GetLayout(), (SwTxtNode&)rNd, nCntnt,
!rShell.ActionPend() );
else
{
@@ -124,7 +124,7 @@ SwCallLink::~SwCallLink()
{
// nur wenn mit Left/right getravellt, dann Text-Hints pruefen
// und sich nicht der Frame geaendert hat (Spalten!)
- if( nLeftFrmPos == SwCallLink::GetFrm( (SwTxtNode&)*pCNd, nAktCntnt,
+ if( nLeftFrmPos == SwCallLink::getLayoutFrm( rShell.GetLayout(), (SwTxtNode&)*pCNd, nAktCntnt,
!rShell.ActionPend() ) &&
(( nCmp = nCntnt ) + 1 == nAktCntnt || // Right
nCntnt -1 == ( nCmp = nAktCntnt )) ) // Left
@@ -191,7 +191,7 @@ SwCallLink::~SwCallLink()
const SwFrm* pFrm;
const SwFlyFrm *pFlyFrm;
- if( !rShell.ActionPend() && 0 != ( pFrm = pCNd->GetFrm(0,0,sal_False) ) &&
+ if( !rShell.ActionPend() && 0 != ( pFrm = pCNd->getLayoutFrm(rShell.GetLayout(),0,0,sal_False) ) &&
0 != ( pFlyFrm = pFrm->FindFlyFrm() ) && !rShell.IsTableMode() )
{
const SwNodeIndex* pIndex = pFlyFrm->GetFmt()->GetCntnt().GetCntntIdx();
@@ -208,9 +208,9 @@ SwCallLink::~SwCallLink()
}
}
-long SwCallLink::GetFrm( SwTxtNode& rNd, xub_StrLen nCntPos, sal_Bool bCalcFrm )
+long SwCallLink::getLayoutFrm( const SwRootFrm* pRoot, SwTxtNode& rNd, xub_StrLen nCntPos, sal_Bool bCalcFrm )
{
- SwTxtFrm* pFrm = (SwTxtFrm*)rNd.GetFrm(0,0,bCalcFrm), *pNext = pFrm;
+ SwTxtFrm* pFrm = (SwTxtFrm*)rNd.getLayoutFrm(pRoot,0,0,bCalcFrm), *pNext = pFrm;
if ( pFrm && !pFrm->IsHiddenNow() )
{
if( pFrm->HasFollow() )
diff --git a/sw/source/core/crsr/callnk.hxx b/sw/source/core/crsr/callnk.hxx
index ad2ea384cc8b..93f6e8f11738 100644
--- a/sw/source/core/crsr/callnk.hxx
+++ b/sw/source/core/crsr/callnk.hxx
@@ -31,6 +31,7 @@
class SwCrsrShell;
class SwTxtNode;
+class SwRootFrm;
class SwCallLink
{
@@ -48,7 +49,7 @@ public:
bool bAktSelection );
~SwCallLink();
- static long GetFrm( SwTxtNode& rNd, xub_StrLen nCntPos, sal_Bool bCalcFrm );
+ static long getLayoutFrm( const SwRootFrm*, SwTxtNode& rNd, xub_StrLen nCntPos, sal_Bool bCalcFrm );
};
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 8e77c070d62d..1a100eae0682 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -201,8 +201,8 @@ SwPaM* SwCrsrShell::GetCrsr( sal_Bool bMakeTblCrsr ) const
const SwCntntNode* pCNd;
if( pTblCrsr->GetPoint()->nNode.GetIndex() &&
pTblCrsr->GetMark()->nNode.GetIndex() &&
- 0 != ( pCNd = pTblCrsr->GetCntntNode() ) && pCNd->GetFrm() &&
- 0 != ( pCNd = pTblCrsr->GetCntntNode(sal_False) ) && pCNd->GetFrm())
+ 0 != ( pCNd = pTblCrsr->GetCntntNode() ) && pCNd->getLayoutFrm( GetLayout() ) &&
+ 0 != ( pCNd = pTblCrsr->GetCntntNode(sal_False) ) && pCNd->getLayoutFrm( GetLayout() ) )
{
SwShellTableCrsr* pTC = (SwShellTableCrsr*)pTblCrsr;
GetLayout()->MakeTblCrsrs( *pTC );
@@ -230,7 +230,7 @@ void SwCrsrShell::StartAction()
nAktNdTyp = rNd.GetNodeType();
bAktSelection = *pCurCrsr->GetPoint() != *pCurCrsr->GetMark();
if( ND_TEXTNODE & nAktNdTyp )
- nLeftFrmPos = SwCallLink::GetFrm( (SwTxtNode&)rNd, nAktCntnt, sal_True );
+ nLeftFrmPos = SwCallLink::getLayoutFrm( GetLayout(), (SwTxtNode&)rNd, nAktCntnt, sal_True );
else
nLeftFrmPos = 0;
}
@@ -322,6 +322,7 @@ if( GetWin() )
sal_uInt16 nParm = SwCrsrShell::CHKRANGE;
if ( !bIdleEnd )
nParm |= SwCrsrShell::SCROLLWIN;
+// if( !IsViewLocked() )
UpdateCrsr( nParm, bIdleEnd ); // Cursor-Aenderungen anzeigen
{
@@ -598,7 +599,7 @@ sal_Bool SwCrsrShell::MovePage( SwWhichPage fnWhichPage, SwPosPage fnPosPage )
SwCrsrSaveState aSaveState( *pCurCrsr );
Point& rPt = pCurCrsr->GetPtPos();
SwCntntFrm * pFrm = pCurCrsr->GetCntntNode()->
- GetFrm( &rPt, pCurCrsr->GetPoint() );
+ getLayoutFrm( GetLayout(), &rPt, pCurCrsr->GetPoint(), sal_False );
if( pFrm && sal_True == ( bRet = GetFrmInPage( pFrm, fnWhichPage,
fnPosPage, pCurCrsr ) ) &&
!pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE |
@@ -644,7 +645,7 @@ SwFrm* lcl_IsInHeaderFooter( const SwNodeIndex& rIdx, Point& rPt )
SwCntntNode* pCNd = rIdx.GetNode().GetCntntNode();
if( pCNd )
{
- pFrm = pCNd->GetFrm( &rPt, 0, sal_False )->GetUpper();
+ pFrm = pCNd->getLayoutFrm( pCNd->GetDoc()->GetCurrentLayout(), &rPt, 0, sal_False )->GetUpper();
while( pFrm && !pFrm->IsHeaderFrm() && !pFrm->IsFooterFrm() )
pFrm = pFrm->IsFlyFrm() ? ((SwFlyFrm*)pFrm)->AnchorFrm()
: pFrm->GetUpper();
@@ -730,10 +731,10 @@ int SwCrsrShell::SetCrsr( const Point &rLPt, sal_Bool bOnlyText, bool bBlock )
else if( aPos.nNode.GetNode().IsCntntNode() )
{
// im gleichen Frame gelandet?
- SwFrm* pOld = ((SwCntntNode&)aPos.nNode.GetNode()).GetFrm(
- &aCharRect.Pos(), 0, sal_False );
- SwFrm* pNew = ((SwCntntNode&)aPos.nNode.GetNode()).GetFrm(
- &aPt, 0, sal_False );
+ SwFrm* pOld = ((SwCntntNode&)aPos.nNode.GetNode()).getLayoutFrm(
+ GetLayout(), &aCharRect.Pos(), 0, sal_False );
+ SwFrm* pNew = ((SwCntntNode&)aPos.nNode.GetNode()).getLayoutFrm(
+ GetLayout(), &aPt, 0, sal_False );
if( pNew == pOld )
return bRet;
}
@@ -1263,7 +1264,7 @@ void SwCrsrShell::UpdateCrsrPos()
Size aOldSz( GetDocSize() );
SwCntntNode *pCNode = pShellCrsr->GetCntntNode();
SwCntntFrm *pFrm = pCNode ?
- pCNode->GetFrm( &pShellCrsr->GetPtPos(), pShellCrsr->GetPoint() ) :0;
+ pCNode->getLayoutFrm( GetLayout(), &pShellCrsr->GetPtPos(), pShellCrsr->GetPoint(), sal_False ) :0;
if( !pFrm || (pFrm->IsTxtFrm() && ((SwTxtFrm*)pFrm)->IsHiddenNow()) )
{
SwCrsrMoveState aTmpState( MV_NONE );
@@ -1400,7 +1401,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd )
}
SwCntntFrm *pTblFrm = pPos->nNode.GetNode().GetCntntNode()->
- GetFrm( &aTmpPt, pPos );
+ getLayoutFrm( GetLayout(), &aTmpPt, pPos, sal_False );
ASSERT( pTblFrm, "Tabelle Crsr nicht im Content ??" );
@@ -1417,7 +1418,8 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd )
// Second check if mark is in repeated headline:
if ( !bInRepeatedHeadline )
{
- SwCntntFrm* pMarkTblFrm = pITmpCrsr->GetCntntNode( sal_False )->GetFrm( &aTmpMk, pITmpCrsr->GetMark() );
+ SwCntntFrm* pMarkTblFrm = pITmpCrsr->GetCntntNode( sal_False )->
+ getLayoutFrm( GetLayout(), &aTmpMk, pITmpCrsr->GetMark(), sal_False );
ASSERT( pMarkTblFrm, "Tabelle Crsr nicht im Content ??" );
if ( pMarkTblFrm )
@@ -1630,8 +1632,8 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd )
sal_Bool bAgainst;
do {
bAgainst = sal_False;
- pFrm = pShellCrsr->GetCntntNode()->GetFrm(
- &pShellCrsr->GetPtPos(), pShellCrsr->GetPoint() );
+ pFrm = pShellCrsr->GetCntntNode()->getLayoutFrm( GetLayout(),
+ &pShellCrsr->GetPtPos(), pShellCrsr->GetPoint(), sal_False );
// ist der Frm nicht mehr vorhanden, dann muss das gesamte Layout
// erzeugt werden, weil ja mal hier einer vorhanden war !!
if ( !pFrm )
@@ -1639,8 +1641,8 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd )
do
{
CalcLayout();
- pFrm = pShellCrsr->GetCntntNode()->GetFrm(
- &pShellCrsr->GetPtPos(), pShellCrsr->GetPoint() );
+ pFrm = pShellCrsr->GetCntntNode()->getLayoutFrm( GetLayout(),
+ &pShellCrsr->GetPtPos(), pShellCrsr->GetPoint(), sal_False );
} while( !pFrm );
}
else if ( Imp()->IsIdleAction() )
@@ -1826,7 +1828,7 @@ void SwCrsrShell::RefreshBlockCursor()
ASSERT( 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() );
+ SwCntntFrm* pFrm = rBlock.GetCntntNode()->getLayoutFrm( GetLayout(), &aPt, rBlock.GetPoint(), sal_False );
Point aMk;
if( pBlockCrsr->getEndPoint() && pBlockCrsr->getStartPoint() )
{
@@ -2144,13 +2146,13 @@ SwCntntFrm *SwCrsrShell::GetCurrFrm( const sal_Bool bCalcFrm ) const
const sal_uInt16* pST = &nStartAction;
++(*((sal_uInt16*)pST));
const Size aOldSz( GetDocSize() );
- pRet = pNd->GetFrm( &pCurCrsr->GetPtPos(), pCurCrsr->GetPoint() );
+ pRet = pNd->getLayoutFrm( GetLayout(), &pCurCrsr->GetPtPos(), pCurCrsr->GetPoint() );
--(*((sal_uInt16*)pST));
if( aOldSz != GetDocSize() )
((SwCrsrShell*)this)->SizeChgNotify();
}
else
- pRet = pNd->GetFrm( &pCurCrsr->GetPtPos(), pCurCrsr->GetPoint(), sal_False);
+ pRet = pNd->getLayoutFrm( GetLayout(), &pCurCrsr->GetPtPos(), pCurCrsr->GetPoint(), sal_False);
}
return pRet;
}
@@ -2160,7 +2162,7 @@ SwCntntFrm *SwCrsrShell::GetCurrFrm( const sal_Bool bCalcFrm ) const
// Link weitergeleitet.
-void SwCrsrShell::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
+void SwCrsrShell::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
{
const sal_uInt16 nWhich = pOld ?
pOld->Which() :
@@ -2330,7 +2332,7 @@ sal_Bool SwCrsrShell::SetVisCrsr( const Point &rPt )
pSectNd->GetSection().IsProtectFlag())) )
return sal_False;
- SwCntntFrm *pFrm = pTxtNd->GetFrm( &aPt, &aPos );
+ SwCntntFrm *pFrm = pTxtNd->getLayoutFrm( GetLayout(), &aPt, &aPos );
if ( Imp()->IsIdleAction() )
pFrm->PrepareCrsr();
SwRect aTmp( aCharRect );
@@ -2686,7 +2688,7 @@ SwCrsrShell::~SwCrsrShell()
// der CursorShell haengt keine Chance geben, sich an den
// TextNode zu haengen.
if( GetRegisteredIn() )
- pRegisteredIn->Remove( this );
+ GetRegisteredInNonConst()->Remove( this );
}
SwShellCrsr* SwCrsrShell::getShellCrsr( bool bBlock )
@@ -2783,7 +2785,7 @@ sal_Bool SwCrsrShell::FindValidCntntNode( sal_Bool bOnlyText )
SwCntntNode* pCNd = rNdIdx.GetNode().GetCntntNode();
const SwCntntFrm * pFrm;
- if( pCNd && 0 != (pFrm = pCNd->GetFrm(0,pCurCrsr->GetPoint(),sal_False)) &&
+ if( pCNd && 0 != (pFrm = pCNd->getLayoutFrm( GetLayout(),0,pCurCrsr->GetPoint(),sal_False)) &&
!IsReadOnlyAvailable() && pFrm->IsProtected() &&
nNdIdx < rNds.GetEndOfExtras().GetIndex() )
{
@@ -2899,7 +2901,7 @@ sal_Bool SwCrsrShell::FindValidCntntNode( sal_Bool bOnlyText )
if( bOk && rNdIdx.GetIndex() < rNds.GetEndOfExtras().GetIndex() )
{
// Teste mal auf Fly - kann auch noch geschuetzt sein!!
- if( 0 == (pFrm = pCNd->GetFrm(0,0,sal_False)) ||
+ if( 0 == (pFrm = pCNd->getLayoutFrm( GetLayout(),0,0,sal_False)) ||
( !IsReadOnlyAvailable() && pFrm->IsProtected() ) ||
( bOnlyText && pCNd->IsNoTxtNode() ) )
{
@@ -2931,7 +2933,7 @@ sal_Bool SwCrsrShell::FindValidCntntNode( sal_Bool bOnlyText )
// falls Cursor im versteckten Bereich ist, auf jedenfall schon mal
// verschieben!!
- if( !pCNd || !pCNd->GetFrm(0,0,sal_False) )
+ if( !pCNd || !pCNd->getLayoutFrm( GetLayout(),0,0,sal_False) )
{
SwCrsrMoveState aTmpState( MV_NONE );
aTmpState.bSetInReadOnly = IsReadOnlyAvailable();
@@ -3496,7 +3498,7 @@ void SwCrsrShell::GetSmartTagTerm( const Point& rPt, SwRect& rSelectRect,
SwCrsrMoveState aState;
aState.bRealWidth = sal_True;
SwCntntNode* pCntntNode = pCrsr->GetCntntNode();
- SwCntntFrm *pCntntFrame = pCntntNode->GetFrm( &rPt, pCrsr->GetPoint(), sal_False);
+ SwCntntFrm *pCntntFrame = pCntntNode->getLayoutFrm( GetLayout(), &rPt, pCrsr->GetPoint(), sal_False);
pCntntFrame->GetCharRect( aStartRect, *pCrsr->GetPoint(), &aState );
rContent = nWordEnd;
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 08936c85210b..f2624677c4be 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -72,7 +72,7 @@
#include <fmturl.hxx>
#include "txtfrm.hxx"
#include <wrong.hxx>
-
+#include <switerator.hxx>
#include <vcl/window.hxx>
#include <docufld.hxx> // OD 2008-06-19 #i90516#
@@ -93,7 +93,7 @@ sal_Bool SwCrsrShell::GotoNextNum()
// dann versuche den Cursor auf die Position zu setzen,
// auf halber Heohe vom Char-SRectangle
Point aPt( pCurCrsr->GetPtPos() );
- SwCntntFrm * pFrm = pCurCrsr->GetCntntNode()->GetFrm( &aPt,
+ SwCntntFrm * pFrm = pCurCrsr->GetCntntNode()->getLayoutFrm( GetLayout(), &aPt,
pCurCrsr->GetPoint() );
pFrm->GetCharRect( aCharRect, *pCurCrsr->GetPoint() );
pFrm->Calc();
@@ -133,7 +133,7 @@ sal_Bool SwCrsrShell::GotoPrevNum()
// dann versuche den Cursor auf die Position zu setzen,
// auf halber Heohe vom Char-SRectangle
Point aPt( pCurCrsr->GetPtPos() );
- SwCntntFrm * pFrm = pCurCrsr->GetCntntNode()->GetFrm( &aPt,
+ SwCntntFrm * pFrm = pCurCrsr->GetCntntNode()->getLayoutFrm( GetLayout(), &aPt,
pCurCrsr->GetPoint() );
pFrm->GetCharRect( aCharRect, *pCurCrsr->GetPoint() );
pFrm->Calc();
@@ -277,7 +277,7 @@ sal_Bool SwCrsrShell::SetCrsrInHdFt( sal_uInt16 nDescNo, sal_Bool bInHeader )
const SwFrm* pFrm;
Point aPt( pCurCrsr->GetPtPos() );
- if( pCNd && 0 != ( pFrm = pCNd->GetFrm( &aPt, 0, sal_False ) ))
+ if( pCNd && 0 != ( pFrm = pCNd->getLayoutFrm( GetLayout(), &aPt, 0, sal_False ) ))
{
// dann kann der Cursor ja auch hinein gesetzt werden
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
@@ -328,7 +328,7 @@ sal_Bool SwCrsrShell::GotoNextTOXBase( const String* pName )
const SwCntntFrm* pCFrm;
if( pCNd &&
pCNd->EndOfSectionIndex() <= pSectNd->EndOfSectionIndex() &&
- 0 != ( pCFrm = pCNd->GetFrm() ) &&
+ 0 != ( pCFrm = pCNd->getLayoutFrm( GetLayout() ) ) &&
( IsReadOnlyAvailable() || !pCFrm->IsProtected() ))
{
pFnd = pCNd;
@@ -378,7 +378,7 @@ sal_Bool SwCrsrShell::GotoPrevTOXBase( const String* pName )
const SwCntntFrm* pCFrm;
if( pCNd &&
pCNd->EndOfSectionIndex() <= pSectNd->EndOfSectionIndex() &&
- 0 != ( pCFrm = pCNd->GetFrm() ) &&
+ 0 != ( pCFrm = pCNd->getLayoutFrm( GetLayout() ) ) &&
( IsReadOnlyAvailable() || !pCFrm->IsProtected() ))
{
pFnd = pCNd;
@@ -412,14 +412,13 @@ sal_Bool SwCrsrShell::GotoTOXMarkBase()
// dann nehme den 1. und hole den Verzeichnis-Typ.
// Suche in seiner Abhaengigkeitsliste nach dem eigentlichem
// Verzeichnis
- SwModify* pType = (SwModify*)aMarks[0]->GetRegisteredIn();
- SwClientIter aIter( *pType );
+ const SwTOXType* pType = aMarks[0]->GetTOXType();
+ SwIterator<SwTOXBase,SwTOXType> aIter( *pType );
const SwSectionNode* pSectNd;
const SwSectionFmt* pSectFmt;
- for( SwTOXBase* pTOX =
- (SwTOXBase*)aIter.First( TYPE( SwTOXBase ));
- pTOX; pTOX = (SwTOXBase*)aIter.Next() )
+ for( SwTOXBase* pTOX = aIter.First(); pTOX; pTOX = aIter.Next() )
+ {
if( pTOX->ISA( SwTOXBaseSection ) &&
0 != ( pSectFmt = ((SwTOXBaseSection*)pTOX)->GetFmt() ) &&
0 != ( pSectNd = pSectFmt->GetSectionNode() ))
@@ -431,7 +430,7 @@ sal_Bool SwCrsrShell::GotoTOXMarkBase()
const SwCntntFrm* pCFrm;
if( pCNd &&
pCNd->EndOfSectionIndex() < pSectNd->EndOfSectionIndex() &&
- 0 != ( pCFrm = pCNd->GetFrm() ) &&
+ 0 != ( pCFrm = pCNd->getLayoutFrm( GetLayout() ) ) &&
( IsReadOnlyAvailable() || !pCFrm->IsProtected() ))
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
@@ -446,6 +445,7 @@ sal_Bool SwCrsrShell::GotoTOXMarkBase()
}
}
}
+ }
return bRet;
}
@@ -479,9 +479,8 @@ sal_Bool SwCrsrShell::GotoNxtPrvTblFormula( sal_Bool bNext, sal_Bool bOnlyErrors
if( rPos.nNode < GetDoc()->GetNodes().GetEndOfExtras() )
// auch beim Einsammeln wird nur der erste Frame benutzt!
- aCurGEF.SetBodyPos( *rPos.nNode.GetNode().GetCntntNode()->GetFrm(
+ aCurGEF.SetBodyPos( *rPos.nNode.GetNode().GetCntntNode()->getLayoutFrm( GetLayout(),
&aPt, &rPos, sal_False ) );
-
{
const SfxPoolItem* pItem;
const SwTableBox* pTBox;
@@ -499,7 +498,7 @@ sal_Bool SwCrsrShell::GotoNxtPrvTblFormula( sal_Bool bNext, sal_Bool bOnlyErrors
const SwCntntFrm* pCFrm;
SwNodeIndex aIdx( *pTBox->GetSttNd() );
const SwCntntNode* pCNd = GetDoc()->GetNodes().GoNext( &aIdx );
- if( pCNd && 0 != ( pCFrm = pCNd->GetFrm( &aPt, 0, sal_False ) ) &&
+ if( pCNd && 0 != ( pCFrm = pCNd->getLayoutFrm( GetLayout(), &aPt, 0, sal_False ) ) &&
(IsReadOnlyAvailable() || !pCFrm->IsProtected() ))
{
_SetGetExpFld aCmp( *pTBox );
@@ -550,8 +549,7 @@ sal_Bool SwCrsrShell::GotoNxtPrvTOXMark( sal_Bool bNext )
if( rPos.nNode.GetIndex() < GetDoc()->GetNodes().GetEndOfExtras().GetIndex() )
// auch beim Einsammeln wird nur der erste Frame benutzt!
aCurGEF.SetBodyPos( *rPos.nNode.GetNode().
- GetCntntNode()->GetFrm( &aPt, &rPos, sal_False ) );
-
+ GetCntntNode()->getLayoutFrm( GetLayout(), &aPt, &rPos, sal_False ) );
{
const SfxPoolItem* pItem;
const SwCntntFrm* pCFrm;
@@ -564,7 +562,7 @@ sal_Bool SwCrsrShell::GotoNxtPrvTOXMark( sal_Bool bNext )
RES_TXTATR_TOXMARK, n ) ) &&
0 != (pTxtTOX = ((SwTOXMark*)pItem)->GetTxtTOXMark() ) &&
( pTxtNd = &pTxtTOX->GetTxtNode())->GetNodes().IsDocNodes() &&
- 0 != ( pCFrm = pTxtNd->GetFrm( &aPt, 0, sal_False )) &&
+ 0 != ( pCFrm = pTxtNd->getLayoutFrm( GetLayout(), &aPt, 0, sal_False )) &&
( IsReadOnlyAvailable() || !pCFrm->IsProtected() ))
{
SwNodeIndex aNdIndex( *pTxtNd ); // UNIX benoetigt dieses Obj.
@@ -631,18 +629,18 @@ void lcl_MakeFldLst( _SetGetExpFlds& rLst, const SwFieldType& rFldType,
// es muss immer der 1. Frame gesucht werden
Point aPt;
SwTxtFld* pTxtFld;
- SwClientIter aIter( (SwFieldType&)rFldType );
- sal_Bool bSubType = nSubType != USHRT_MAX;
- for( SwClient* pLast = aIter.First( TYPE( SwFmtFld )); pLast; pLast = aIter.Next() )
- if( 0 != ( pTxtFld = ((SwFmtFld*)pLast)->GetTxtFld() ) &&
+ SwIterator<SwFmtFld,SwFieldType> aIter(rFldType);
+ bool bSubType = nSubType != USHRT_MAX;
+ for( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld = aIter.Next() )
+ if( 0 != ( pTxtFld = pFmtFld->GetTxtFld() ) &&
( !bChkInpFlag || ((SwSetExpField*)pTxtFld->GetFld().GetFld())
->GetInputFlag() ) &&
- (!bSubType || (((SwFmtFld*)pLast)->GetFld()->GetSubType()
+ (!bSubType || (pFmtFld->GetFld()->GetSubType()
& 0xff ) == nSubType ))
{
SwCntntFrm* pCFrm;
const SwTxtNode& rTxtNode = pTxtFld->GetTxtNode();
- if( 0 != ( pCFrm = rTxtNode.GetFrm( &aPt, 0, sal_False )) &&
+ if( 0 != ( pCFrm = rTxtNode.getLayoutFrm( rTxtNode.GetDoc()->GetCurrentLayout(), &aPt, 0, sal_False )) &&
( bInReadOnly || !pCFrm->IsProtected() ))
{
_SetGetExpFld* pNew = new _SetGetExpFld(
@@ -727,7 +725,7 @@ sal_Bool SwCrsrShell::MoveFldType( const SwFieldType* pFldType, sal_Bool bNext,
{
// auch beim Einsammeln wird nur der erste Frame benutzt!
Point aPt;
- aSrch.SetBodyPos( *pTNd->GetFrm( &aPt, &rPos, sal_False ) );
+ aSrch.SetBodyPos( *pTNd->getLayoutFrm( GetLayout(), &aPt, &rPos, sal_False ) );
}
sal_Bool bFound = aSrtLst.Seek_Entry( &aSrch, &nPos );
@@ -1112,7 +1110,7 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_SMARTTAG;
// rCntntAtPos.pFndTxtAttr = pTxtAttr;
- if( pFldRect && 0 != ( pFrm = pTxtNd->GetFrm( &aPt ) ) )
+ if( pFldRect && 0 != ( pFrm = pTxtNd->getLayoutFrm( GetLayout(), &aPt ) ) )
pFrm->GetCharRect( *pFldRect, aPos, &aTmpState );
}
}
@@ -1132,7 +1130,7 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
if( pFld )
{
- if( pFldRect && 0 != ( pFrm = pTxtNd->GetFrm( &aPt ) ) )
+ if( pFldRect && 0 != ( pFrm = pTxtNd->getLayoutFrm( GetLayout(), &aPt ) ) )
pFrm->GetCharRect( *pFldRect, aPos, &aTmpState );
if( bSetCrsr )
@@ -1230,7 +1228,7 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
rCntntAtPos.pFndTxtAttr = pTxtAttr;
rCntntAtPos.aFnd.pAttr = &pTxtAttr->GetAttr();
- if( pFldRect && 0 != ( pFrm = pTxtNd->GetFrm( &aPt ) ) )
+ if( pFldRect && 0 != ( pFrm = pTxtNd->getLayoutFrm( GetLayout(), &aPt ) ) )
pFrm->GetCharRect( *pFldRect, aPos, &aTmpState );
}
}
@@ -1298,7 +1296,7 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
rCntntAtPos.pFndTxtAttr = pTxtAttr;
rCntntAtPos.aFnd.pAttr = &pTxtAttr->GetAttr();
- if( pFldRect && 0 != ( pFrm = pTxtNd->GetFrm( &aPt ) ) )
+ if( pFldRect && 0 != ( pFrm = pTxtNd->getLayoutFrm( GetLayout(), &aPt ) ) )
pFrm->GetCharRect( *pFldRect, aPos, &aTmpState );
}
}
@@ -1335,7 +1333,7 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_INETATTR;
rCntntAtPos.pFndTxtAttr = pTxtAttr;
- if( pFldRect && 0 != ( pFrm = pTxtNd->GetFrm( &aPt ) ) )
+ if( pFldRect && 0 != ( pFrm = pTxtNd->getLayoutFrm( GetLayout(), &aPt ) ) )
pFrm->GetCharRect( *pFldRect, aPos, &aTmpState );
}
}
@@ -1351,7 +1349,7 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
rCntntAtPos.pFndTxtAttr = 0;
bRet = sal_True;
- if( pFldRect && 0 != ( pFrm = pTxtNd->GetFrm( &aPt ) ) )
+ if( pFldRect && 0 != ( pFrm = pTxtNd->getLayoutFrm( GetLayout(), &aPt ) ) )
pFrm->GetCharRect( *pFldRect, aPos, &aTmpState );
}
}
@@ -1382,7 +1380,7 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
#endif
)
{
- SwFrm* pF = pTxtNd->GetFrm( &aPt );
+ SwFrm* pF = pTxtNd->getLayoutFrm( GetLayout(), &aPt );
if( pF )
{
// dann aber den CellFrame
@@ -1590,9 +1588,10 @@ sal_Bool SwContentAtPos::IsInProtectSect() const
const SwCntntFrm* pFrm;
return pNd && ( pNd->IsInProtectSect() ||
- ( 0 != ( pFrm = pNd->GetFrm(0,0,sal_False)) &&
+ ( 0 != ( pFrm = pNd->getLayoutFrm( pNd->GetDoc()->GetCurrentLayout(), 0,0,sal_False)) &&
pFrm->IsProtected() ));
}
+
bool SwContentAtPos::IsInRTLText()const
{
bool bRet = false;
@@ -1612,20 +1611,16 @@ bool SwContentAtPos::IsInRTLText()const
}
if(pNd)
{
- SwClientIter aClientIter( * const_cast<SwTxtNode*>(pNd) );
- SwClient* pLast = aClientIter.GoStart();
- while( pLast )
+ SwIterator<SwTxtFrm,SwTxtNode> aIter(*pNd);
+ SwTxtFrm* pTmpFrm = aIter.First();
+ while( pTmpFrm )
{
- if ( pLast->ISA( SwTxtFrm ) )
- {
- SwTxtFrm* pTmpFrm = static_cast<SwTxtFrm*>( pLast );
if ( !pTmpFrm->IsFollow())
{
bRet = pTmpFrm->IsRightToLeft();
break;
}
- }
- pLast = ++aClientIter;
+ pTmpFrm = aIter.Next();
}
}
return bRet;
@@ -2102,7 +2097,7 @@ sal_Bool SwCrsrShell::SelectNxtPrvHyperlink( sal_Bool bNext )
{
const SwCntntNode* pCNd = aCurPos.GetNodeFromCntnt()->GetCntntNode();
SwCntntFrm* pFrm;
- if( pCNd && 0 != ( pFrm = pCNd->GetFrm( &aPt )) )
+ if( pCNd && 0 != ( pFrm = pCNd->getLayoutFrm( GetLayout(), &aPt )) )
aCurPos.SetBodyPos( *pFrm );
}
@@ -2112,19 +2107,18 @@ sal_Bool SwCrsrShell::SelectNxtPrvHyperlink( sal_Bool bNext )
const SwCharFmts* pFmts = GetDoc()->GetCharFmts();
for( sal_uInt16 n = pFmts->Count(); 1 < n; )
{
- SwClientIter aIter( *(*pFmts)[ --n ] );
+ SwIterator<SwTxtINetFmt,SwCharFmt> aIter(*(*pFmts)[--n]);
- for( SwClient* pFnd = aIter.First(TYPE( SwTxtINetFmt ));
- pFnd; pFnd = aIter.Next() )
- if( 0 != ( pTxtNd = ((SwTxtINetFmt*)pFnd)->GetpTxtNode()) &&
+ for( SwTxtINetFmt* pFnd = aIter.First(); pFnd; pFnd = aIter.Next() )
+ if( 0 != ( pTxtNd = pFnd->GetpTxtNode()) &&
pTxtNd->GetNodes().IsDocNodes() )
{
- SwTxtINetFmt& rAttr = *(SwTxtINetFmt*)pFnd;
+ SwTxtINetFmt& rAttr = *pFnd;
SwPosition aTmpPos( *pTxtNd );
_SetGetExpFld aPos( aTmpPos.nNode, rAttr );
SwCntntFrm* pFrm;
if( pTxtNd->GetIndex() < nBodySttNdIdx &&
- 0 != ( pFrm = pTxtNd->GetFrm( &aPt )) )
+ 0 != ( pFrm = pTxtNd->getLayoutFrm( GetLayout(), &aPt )) )
aPos.SetBodyPos( *pFrm );
if( bNext
diff --git a/sw/source/core/crsr/crstrvl1.cxx b/sw/source/core/crsr/crstrvl1.cxx
index 55c407d1f209..3bdd40e7efd0 100644
--- a/sw/source/core/crsr/crstrvl1.cxx
+++ b/sw/source/core/crsr/crstrvl1.cxx
@@ -95,7 +95,7 @@ sal_Bool SwCrsrShell::GoStartSentence()
sal_Bool SwCrsrShell::SelectWord( const Point* pPt )
{
- return pCurCrsr->SelectWord( pPt );
+ return pCurCrsr->SelectWord( this, pPt );
}
sal_Bool SwCrsrShell::ExpandToSentenceBorders()
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index 48e22c79ec6b..e1599db289c9 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -640,7 +640,7 @@ sal_uInt16 SwPaM::GetPageNum( sal_Bool bAtPoint, const Point* pLayPos )
const SwPosition* pPos = bAtPoint ? m_pPoint : m_pMark;
if( 0 != ( pNd = pPos->nNode.GetNode().GetCntntNode() ) &&
- 0 != ( pCFrm = pNd->GetFrm( pLayPos, pPos, sal_False )) &&
+ 0 != ( pCFrm = pNd->getLayoutFrm( pNd->GetDoc()->GetCurrentLayout(), pLayPos, pPos, sal_False )) &&
0 != ( pPg = pCFrm->FindPageFrm() ))
return pPg->GetPhyPageNum();
return 0;
@@ -683,7 +683,7 @@ sal_Bool SwPaM::HasReadonlySel( bool bFormView ) const
const SwCntntFrm *pFrm;
if( 0 != ( pNd = GetPoint()->nNode.GetNode().GetCntntNode() ))
- pFrm = pNd->GetFrm( &aTmpPt, GetPoint(), sal_False );
+ pFrm = pNd->getLayoutFrm( pNd->GetDoc()->GetCurrentLayout(), &aTmpPt, GetPoint(), sal_False );
else
pFrm = 0;
@@ -711,7 +711,7 @@ sal_Bool SwPaM::HasReadonlySel( bool bFormView ) const
if( !bRet && HasMark() && GetPoint()->nNode != GetMark()->nNode )
{
if( 0 != ( pNd = GetMark()->nNode.GetNode().GetCntntNode() ))
- pFrm = pNd->GetFrm( &aTmpPt, GetMark(), sal_False );
+ pFrm = pNd->getLayoutFrm( pNd->GetDoc()->GetCurrentLayout(), &aTmpPt, GetMark(), sal_False );
else
pFrm = 0;
@@ -868,7 +868,7 @@ SwCntntNode* GetNode( SwPaM & rPam, sal_Bool& rbFirst, SwMoveFn fnMove,
{
if(
(
- 0 == ( pFrm = pNd->GetFrm()) ||
+ 0 == ( pFrm = pNd->getLayoutFrm( pNd->GetDoc()->GetCurrentLayout() ) ) ||
( !bInReadOnly && pFrm->IsProtected() ) ||
(pFrm->IsTxtFrm() && ((SwTxtFrm*)pFrm)->IsHiddenNow())
) ||
@@ -905,7 +905,7 @@ SwCntntNode* GetNode( SwPaM & rPam, sal_Bool& rbFirst, SwMoveFn fnMove,
{
// nur in der AutoTextSection koennen Node stehen, die
// nicht angezeigt werden !!
- if( 0 == ( pFrm = pNd->GetFrm()) ||
+ if( 0 == ( pFrm = pNd->getLayoutFrm( pNd->GetDoc()->GetCurrentLayout() ) ) ||
( !bInReadOnly && pFrm->IsProtected() ) ||
( pFrm->IsTxtFrm() &&
((SwTxtFrm*)pFrm)->IsHiddenNow() ) )
@@ -1236,7 +1236,7 @@ void SwPaM::InvalidatePaM()
SwInsTxt aHint( Start()->nContent.GetIndex(),
End()->nContent.GetIndex() - Start()->nContent.GetIndex() + 1 );
SwModify *_pModify=(SwModify*)_pTxtNd;
- _pModify->Modify( 0, &aHint);
+ _pModify->ModifyNotification( 0, &aHint);
}
}
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 63aae63019d3..b2fe94708d4f 100755
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -31,10 +31,8 @@
#include <hintids.hxx>
#include <editeng/protitem.hxx>
-
#include <com/sun/star/i18n/WordType.hdl>
#include <com/sun/star/i18n/CharType.hdl>
-
#include <unotools/charclass.hxx>
#include <svl/ctloptions.hxx>
#include <swmodule.hxx>
@@ -54,6 +52,7 @@
#include <scriptinfo.hxx>
#include <crstate.hxx>
#include <docsh.hxx>
+#include <viewsh.hxx>
#include <frmatr.hxx>
#include <breakit.hxx>
#include <crsskip.hxx>
@@ -350,7 +349,7 @@ sal_Bool SwCursor::IsSelOvr( int eFlags )
const SwNode* pNd = &GetPoint()->nNode.GetNode();
if( pNd->IsCntntNode() && !dynamic_cast<SwUnoCrsr*>(this) )
{
- const SwCntntFrm* pFrm = ((SwCntntNode*)pNd)->GetFrm();
+ const SwCntntFrm* pFrm = ((SwCntntNode*)pNd)->getLayoutFrm( pDoc->GetCurrentLayout() );
if( pFrm && pFrm->IsValid() && 0 == pFrm->Frm().Height() &&
0 != ( nsSwCursorSelOverFlags::SELOVER_CHANGEPOS & eFlags ) )
{
@@ -367,7 +366,7 @@ sal_Bool SwCursor::IsSelOvr( int eFlags )
if( !pFrm )
{
bGoNxt = !bGoNxt;
- pFrm = ((SwCntntNode*)pNd)->GetFrm();
+ pFrm = ((SwCntntNode*)pNd)->getLayoutFrm( pDoc->GetCurrentLayout() );
while ( pFrm && 0 == pFrm->Frm().Height() )
{
pFrm = bGoNxt ? pFrm->GetNextCntntFrm()
@@ -424,7 +423,7 @@ sal_Bool SwCursor::IsSelOvr( int eFlags )
const SwTableNode* pPtNd = pNd->FindTableNode();
if( (pNd = &GetMark()->nNode.GetNode())->IsCntntNode() &&
- !((SwCntntNode*)pNd)->GetFrm() && !dynamic_cast<SwUnoCrsr*>(this) )
+ !((SwCntntNode*)pNd)->getLayoutFrm( pDoc->GetCurrentLayout() ) && !dynamic_cast<SwUnoCrsr*>(this) )
{
DeleteMark();
RestoreSavePos();
@@ -695,7 +694,7 @@ sal_Bool SwCursor::IsAtValidPos( sal_Bool bPoint ) const
const SwPosition* pPos = bPoint ? GetPoint() : GetMark();
const SwNode* pNd = &pPos->nNode.GetNode();
- if( pNd->IsCntntNode() && !((SwCntntNode*)pNd)->GetFrm() &&
+ if( pNd->IsCntntNode() && !((SwCntntNode*)pNd)->getLayoutFrm( pDoc->GetCurrentLayout() ) &&
!dynamic_cast<const SwUnoCrsr*>(this) )
{
return sal_False;
@@ -1173,9 +1172,9 @@ sal_Bool SwCursor::GoPrevWord()
return GoPrevWordWT( WordType::ANYWORD_IGNOREWHITESPACES );
}
-sal_Bool SwCursor::SelectWord( const Point* pPt )
+sal_Bool SwCursor::SelectWord( ViewShell* pViewShell, const Point* pPt )
{
- return SelectWordWT( WordType::ANYWORD_IGNOREWHITESPACES, pPt );
+ return SelectWordWT( pViewShell, WordType::ANYWORD_IGNOREWHITESPACES, pPt );
}
sal_Bool SwCursor::IsStartWordWT( sal_Int16 nWordType ) const
@@ -1351,20 +1350,20 @@ sal_Bool SwCursor::GoPrevWordWT( sal_Int16 nWordType )
return bRet;
}
-sal_Bool SwCursor::SelectWordWT( sal_Int16 nWordType, const Point* pPt )
+sal_Bool SwCursor::SelectWordWT( ViewShell* pViewShell, sal_Int16 nWordType, const Point* pPt )
{
SwCrsrSaveState aSave( *this );
sal_Bool bRet = sal_False;
sal_Bool bForward = sal_True;
DeleteMark();
- SwRootFrm* pLayout;
- if( pPt && 0 != (pLayout = GetDoc()->GetRootFrm()) )
+ const SwRootFrm* pLayout = pViewShell->GetLayout();
+ if( pPt && 0 != pLayout )
{
// set the cursor to the layout position
Point aPt( *pPt );
pLayout->GetCrsrOfst( GetPoint(), aPt );
- }
+ } //swmod 071107//swmod 071225
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
if( pTxtNd && pBreakIt->GetBreakIter().is() )
@@ -1570,7 +1569,7 @@ SwCursor::DoSetBidiLevelLeftRight(
// for visual cursor travelling (used in bidi layout)
// we first have to convert the logic to a visual position
Point aPt;
- pSttFrm = rTNd.GetFrm( &aPt, GetPoint() );
+ pSttFrm = rTNd.getLayoutFrm( GetDoc()->GetCurrentLayout(), &aPt, GetPoint() );
if( pSttFrm )
{
sal_uInt8 nCrsrLevel = GetCrsrBidiLevel();
@@ -1709,7 +1708,7 @@ sal_Bool SwCursor::LeftRight( sal_Bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
if ( &rTmpNode != &rNode && rTmpNode.IsTxtNode() )
{
Point aPt;
- const SwCntntFrm* pEndFrm = ((SwTxtNode&)rTmpNode).GetFrm( &aPt, GetPoint() );
+ const SwCntntFrm* pEndFrm = ((SwTxtNode&)rTmpNode).getLayoutFrm( GetDoc()->GetCurrentLayout(), &aPt, GetPoint() );
if ( pEndFrm )
{
if ( ! pEndFrm->IsRightToLeft() != ! pSttFrm->IsRightToLeft() )
@@ -1778,7 +1777,7 @@ sal_Bool SwCursor::UpDown( sal_Bool bUp, sal_uInt16 nCnt,
Point aPt;
if( pPt )
aPt = *pPt;
- SwCntntFrm* pFrm = GetCntntNode()->GetFrm( &aPt, GetPoint() );
+ SwCntntFrm* pFrm = GetCntntNode()->getLayoutFrm( GetDoc()->GetCurrentLayout(), &aPt, GetPoint() );
if( pFrm )
{
@@ -1816,7 +1815,7 @@ sal_Bool SwCursor::UpDown( sal_Bool bUp, sal_uInt16 nCnt,
const SwNode* pEndNd = pTblNd->EndOfSectionNode();
GetPoint()->nNode = *pEndNd;
pTblCrsr->Move( fnMoveBackward, fnGoNode );
- pFrm = GetCntntNode()->GetFrm( &aPt, GetPoint() );
+ pFrm = GetCntntNode()->getLayoutFrm( GetDoc()->GetCurrentLayout(), &aPt, GetPoint() );
}
}
@@ -1825,7 +1824,7 @@ sal_Bool SwCursor::UpDown( sal_Bool bUp, sal_uInt16 nCnt,
: pFrm->UnitDown( this, nUpDownX, bInReadOnly ) ) &&
CheckNodesRange( aOldPos.nNode, GetPoint()->nNode, bChkRange ))
{
- pFrm = GetCntntNode()->GetFrm( &aPt, GetPoint() );
+ pFrm = GetCntntNode()->getLayoutFrm( GetDoc()->GetCurrentLayout(), &aPt, GetPoint() );
--nCnt;
}
@@ -1836,7 +1835,7 @@ sal_Bool SwCursor::UpDown( sal_Bool bUp, sal_uInt16 nCnt,
{
// dann versuche den Cursor auf die Position zu setzen,
// auf halber Heohe vom Char-Rectangle
- pFrm = GetCntntNode()->GetFrm( &aPt, GetPoint() );
+ pFrm = GetCntntNode()->getLayoutFrm( GetDoc()->GetCurrentLayout(), &aPt, GetPoint() );
SwCrsrMoveState eTmpState( MV_UPDOWN );
eTmpState.bSetInReadOnly = bInReadOnly;
SwRect aTmpRect;
@@ -1869,7 +1868,7 @@ sal_Bool SwCursor::UpDown( sal_Bool bUp, sal_uInt16 nCnt,
sal_Bool SwCursor::LeftRightMargin( sal_Bool bLeft, sal_Bool bAPI )
{
Point aPt;
- SwCntntFrm * pFrm = GetCntntNode()->GetFrm( &aPt, GetPoint() );
+ SwCntntFrm * pFrm = GetCntntNode()->getLayoutFrm( GetDoc()->GetCurrentLayout(), &aPt, GetPoint() );
// calculate cursor bidi level
if ( pFrm )
@@ -1883,7 +1882,7 @@ sal_Bool SwCursor::IsAtLeftRightMargin( sal_Bool bLeft, sal_Bool bAPI ) const
{
sal_Bool bRet = sal_False;
Point aPt;
- SwCntntFrm * pFrm = GetCntntNode()->GetFrm( &aPt, GetPoint() );
+ SwCntntFrm * pFrm = GetCntntNode()->getLayoutFrm( GetDoc()->GetCurrentLayout(), &aPt, GetPoint() );
if( pFrm )
{
SwPaM aPam( *GetPoint() );
diff --git a/sw/source/core/crsr/trvlfnfl.cxx b/sw/source/core/crsr/trvlfnfl.cxx
index e20724fe157d..c3eeaf61b952 100644
--- a/sw/source/core/crsr/trvlfnfl.cxx
+++ b/sw/source/core/crsr/trvlfnfl.cxx
@@ -95,7 +95,7 @@ sal_Bool SwCrsrShell::GotoFtnTxt()
_GetCrsr()->GetPoint()->nNode.GetNode().GetTxtNode() : NULL;
if( pTxtNd )
{
- const SwFrm *pFrm = pTxtNd->GetFrm( &_GetCrsr()->GetSttPos(),
+ const SwFrm *pFrm = pTxtNd->getLayoutFrm( GetLayout(), &_GetCrsr()->GetSttPos(),
_GetCrsr()->Start() );
const SwFtnBossFrm* pFtnBoss;
sal_Bool bSkip = pFrm && pFrm->IsInFtn();
diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx
index 0c6a659f2eb0..ee33dd8208e3 100644
--- a/sw/source/core/crsr/trvltbl.cxx
+++ b/sw/source/core/crsr/trvltbl.cxx
@@ -194,7 +194,7 @@ sal_Bool SwCrsrShell::_SelTblRowOrCol( bool bRow, bool bRowSimple )
const SwShellCrsr *pCrsr = _GetCrsr();
const SwFrm* pStartFrm = pFrm;
const SwCntntNode *pCNd = pCrsr->GetCntntNode( sal_False );
- const SwFrm* pEndFrm = pCNd ? pCNd->GetFrm( &pCrsr->GetMkPos() ) : 0;
+ const SwFrm* pEndFrm = pCNd ? pCNd->getLayoutFrm( GetLayout(), &pCrsr->GetMkPos() ) : 0;
if ( bRow )
{
@@ -381,7 +381,7 @@ bool lcl_FindNextCell( SwNodeIndex& rIdx, sal_Bool bInReadOnly )
if ( !pCNd )
return false;
- SwCntntFrm* pFrm = pCNd->GetFrm();
+ SwCntntFrm* pFrm = pCNd->getLayoutFrm( pCNd->GetDoc()->GetCurrentLayout() );
if ( 0 == pFrm || pCNd->FindTableNode() != pTblNd ||
(!bInReadOnly && pFrm->IsProtected() ) )
@@ -413,7 +413,7 @@ bool lcl_FindNextCell( SwNodeIndex& rIdx, sal_Bool bInReadOnly )
return false;
// check if we have found a suitable table cell:
- pFrm = pCNd->GetFrm();
+ pFrm = pCNd->getLayoutFrm( pCNd->GetDoc()->GetCurrentLayout() );
if ( 0 != pFrm && pCNd->FindTableNode() == pTblNd &&
(bInReadOnly || !pFrm->IsProtected() ) )
@@ -455,7 +455,7 @@ bool lcl_FindPrevCell( SwNodeIndex& rIdx, sal_Bool bInReadOnly )
if ( !pCNd )
return false;
- SwCntntFrm* pFrm = pCNd->GetFrm();
+ SwCntntFrm* pFrm = pCNd->getLayoutFrm( pCNd->GetDoc()->GetCurrentLayout() );
if( 0 == pFrm || pCNd->FindTableNode() != pTblNd ||
(!bInReadOnly && pFrm->IsProtected() ))
@@ -476,7 +476,7 @@ bool lcl_FindPrevCell( SwNodeIndex& rIdx, sal_Bool bInReadOnly )
if ( !pCNd )
return false;
- pFrm = pCNd->GetFrm();
+ pFrm = pCNd->getLayoutFrm( pCNd->GetDoc()->GetCurrentLayout() );
if( 0 != pFrm && pCNd->FindTableNode() == pTblNd &&
(bInReadOnly || !pFrm->IsProtected() ) )
@@ -747,7 +747,7 @@ String SwCrsrShell::GetBoxNms() const
if( IsTableMode() )
{
SwCntntNode *pCNd = pTblCrsr->Start()->nNode.GetNode().GetCntntNode();
- pFrm = pCNd ? pCNd->GetFrm() : 0;
+ pFrm = pCNd ? pCNd->getLayoutFrm( GetLayout() ) : 0;
if( !pFrm )
return sNm;
@@ -769,7 +769,7 @@ String SwCrsrShell::GetBoxNms() const
}
SwCntntNode* pCNd = pPos->nNode.GetNode().GetCntntNode();
- pFrm = pCNd ? pCNd->GetFrm() : 0;
+ pFrm = pCNd ? pCNd->getLayoutFrm( GetLayout() ) : 0;
if( pFrm )
{
diff --git a/sw/source/core/crsr/unocrsr.cxx b/sw/source/core/crsr/unocrsr.cxx
index b57e423623a2..7a25fe5c47a2 100644
--- a/sw/source/core/crsr/unocrsr.cxx
+++ b/sw/source/core/crsr/unocrsr.cxx
@@ -47,14 +47,6 @@ SwUnoCrsr::SwUnoCrsr( const SwPosition &rPos, SwPaM* pRing )
{}
-// @@@ semantic: no copy ctor.
-SwUnoCrsr::SwUnoCrsr( SwUnoCrsr& rICrsr )
- : SwCursor( rICrsr ), SwModify( 0 ),
- bRemainInSection( rICrsr.bRemainInSection ),
- bSkipOverHiddenSections( rICrsr.bSkipOverHiddenSections ),
- bSkipOverProtectSections( rICrsr.bSkipOverProtectSections )
-{}
-
SwUnoCrsr::~SwUnoCrsr()
{
SwDoc* pDoc = GetDoc();
@@ -252,9 +244,9 @@ void SwUnoTableCrsr::MakeBoxSels()
const SwCntntNode* pCNd;
bool bMakeTblCrsrs = true;
if( GetPoint()->nNode.GetIndex() && GetMark()->nNode.GetIndex() &&
- 0 != ( pCNd = GetCntntNode() ) && pCNd->GetFrm() &&
- 0 != ( pCNd = GetCntntNode(sal_False) ) && pCNd->GetFrm() )
- bMakeTblCrsrs = GetDoc()->GetRootFrm()->MakeTblCrsrs( *this );
+ 0 != ( pCNd = GetCntntNode() ) && pCNd->getLayoutFrm( pCNd->GetDoc()->GetCurrentLayout() ) &&
+ 0 != ( pCNd = GetCntntNode(sal_False) ) && pCNd->getLayoutFrm( pCNd->GetDoc()->GetCurrentLayout() ) )
+ bMakeTblCrsrs = GetDoc()->GetCurrentLayout()->MakeTblCrsrs( *this );
if ( !bMakeTblCrsrs )
{
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 53cd935289de..f526e9b765a8 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -454,7 +454,7 @@ void SwVisCrsr::_SetPosAndShow()
if( rNode.IsTxtNode() )
{
const SwTxtNode& rTNd = *rNode.GetTxtNode();
- const SwFrm* pFrm = rTNd.GetFrm( 0, 0, sal_False );
+ const SwFrm* pFrm = rTNd.getLayoutFrm( pCrsrShell->GetLayout(), 0, 0, sal_False );
if ( pFrm )
{
const SwScriptInfo* pSI = ((SwTxtFrm*)pFrm)->GetScriptInfo();
@@ -735,11 +735,11 @@ void SwShellCrsr::FillRects()
// die neuen Rechtecke berechnen
if( HasMark() &&
GetPoint()->nNode.GetNode().IsCntntNode() &&
- GetPoint()->nNode.GetNode().GetCntntNode()->GetFrm() &&
+ GetPoint()->nNode.GetNode().GetCntntNode()->getLayoutFrm( GetShell()->GetLayout() ) &&
(GetMark()->nNode == GetPoint()->nNode ||
(GetMark()->nNode.GetNode().IsCntntNode() &&
- GetMark()->nNode.GetNode().GetCntntNode()->GetFrm() ) ))
- GetDoc()->GetRootFrm()->CalcFrmRects( *this, GetShell()->IsTableMode() );
+ GetMark()->nNode.GetNode().GetCntntNode()->getLayoutFrm( GetShell()->GetLayout() ) ) ))
+ GetShell()->GetLayout()->CalcFrmRects( *this, GetShell()->IsTableMode() ); //swmod 071107//swmod 071225
}
@@ -812,7 +812,7 @@ short SwShellCrsr::MaxReplaceArived()
// eine SSelection kann erzeugt werden
SvUShorts aArr;
sal_uInt16 nActCnt;
- ViewShell *pShell = GetDoc()->GetRootFrm()->GetCurrShell(),
+ ViewShell *pShell = const_cast< SwCrsrShell* >( GetShell() ),
*pSh = pShell;
do {
for( nActCnt = 0; pSh->ActionPend(); ++nActCnt )
@@ -829,7 +829,7 @@ short SwShellCrsr::MaxReplaceArived()
for( nActCnt = aArr[n]; nActCnt--; )
pSh->StartAction();
pSh = (ViewShell*)pSh->GetNext();
- }
+ } //swmod 071107//swmod 071225
}
else
// ansonsten aus dem Basic, und dann auf RET_YES schalten
@@ -942,7 +942,7 @@ void SwShellTableCrsr::FillRects()
if( !pCNd )
continue;
- SwFrm* pFrm = pCNd->GetFrm( &GetSttPos() );
+ SwFrm* pFrm = pCNd->getLayoutFrm( GetShell()->GetLayout(), &GetSttPos() );
while( pFrm && !pFrm->IsCellFrm() )
pFrm = pFrm->GetUpper();
@@ -978,7 +978,7 @@ sal_Bool SwShellTableCrsr::IsInside( const Point& rPt ) const
if( !pCNd )
continue;
- SwFrm* pFrm = pCNd->GetFrm( &GetPtPos() );
+ SwFrm* pFrm = pCNd->getLayoutFrm( GetShell()->GetLayout(), &GetPtPos() );
while( pFrm && !pFrm->IsCellFrm() )
pFrm = pFrm->GetUpper();
ASSERT( pFrm, "Node nicht in einer Tabelle" );
diff --git a/sw/source/core/doc/acmplwrd.cxx b/sw/source/core/doc/acmplwrd.cxx
index e53679d8d92e..f1285cd48ba1 100644
--- a/sw/source/core/doc/acmplwrd.cxx
+++ b/sw/source/core/doc/acmplwrd.cxx
@@ -66,11 +66,12 @@ public:
SwAutoCompleteClient& operator=(const SwAutoCompleteClient& rClient);
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
const SwDoc& GetDoc(){return *pDoc;}
#ifdef DBG_UTIL
static sal_uLong GetElementCount() {return nSwAutoCompleteClientCount;}
#endif
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
};
/* -----------------------------05.08.2002 12:48------------------------------
@@ -156,15 +157,15 @@ SwAutoCompleteClient& SwAutoCompleteClient::operator=(const SwAutoCompleteClient
pAutoCompleteWord = rClient.pAutoCompleteWord;
pDoc = rClient.pDoc;
if(rClient.GetRegisteredIn())
- rClient.pRegisteredIn->Add(this);
+ ((SwModify*)rClient.GetRegisteredIn())->Add(this);
else if(GetRegisteredIn())
- pRegisteredIn->Remove(this);
+ GetRegisteredInNonConst()->Remove(this);
return *this;
}
/* -----------------------------05.08.2002 12:49------------------------------
---------------------------------------------------------------------------*/
-void SwAutoCompleteClient::Modify(SfxPoolItem *pOld, SfxPoolItem *)
+void SwAutoCompleteClient::Modify( const SfxPoolItem* pOld, const SfxPoolItem *)
{
switch( pOld ? pOld->Which() : 0 )
{
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 47dc02014aa7..c454da191cf7 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -112,11 +112,14 @@
#include <SwUndoFmt.hxx>
#include <unocrsr.hxx>
#include <docsh.hxx>
+#include <viewopt.hxx>
#include <docfld.hxx> // _SetGetExpFld
#include <docufld.hxx> // SwPostItField
#include <viewsh.hxx>
#include <shellres.hxx>
#include <txtfrm.hxx>
+#include <attrhint.hxx>
+
#include <wdocsh.hxx> // SwWebDocShell
#include <prtopt.hxx> // SwPrintOptions
@@ -127,6 +130,8 @@
#include <osl/interlck.h>
#include <vbahelper/vbaaccesshelper.hxx>
+#include "switerator.hxx"
+
/* @@@MAINTAINABILITY-HORROR@@@
Probably unwanted dependency on SwDocShell
*/
@@ -203,7 +208,7 @@ bool SwDoc::get(/*[in]*/ DocumentSettingId id) const
// <--
// COMPATIBILITY FLAGS END
- case BROWSE_MODE: return mbBrowseMode;
+ case BROWSE_MODE: return mbLastBrowseMode; // Attention: normally the ViewShell has to be asked!
case HTML_MODE: return mbHTMLMode;
case GLOBAL_DOCUMENT: return mbIsGlobalDoc;
case GLOBAL_DOCUMENT_SAVE_LINKS: return mbGlblDocSaveLinks;
@@ -327,8 +332,8 @@ void SwDoc::set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value)
// <--
// COMPATIBILITY FLAGS END
- case BROWSE_MODE:
- mbBrowseMode = value;
+ case BROWSE_MODE: //can be used temporary (load/save) when no ViewShell is avaiable
+ mbLastBrowseMode = value;
break;
case HTML_MODE:
mbHTMLMode = value;
@@ -371,7 +376,7 @@ const i18n::ForbiddenCharacters*
}
void SwDoc::setForbiddenCharacters(/*[in]*/ sal_uInt16 nLang,
- /*[in]*/ const i18n::ForbiddenCharacters& rFChars )
+ /*[in]*/ const com::sun::star::i18n::ForbiddenCharacters& rFChars )
{
if( !xForbiddenCharsTable.isValid() )
{
@@ -388,12 +393,14 @@ void SwDoc::setForbiddenCharacters(/*[in]*/ sal_uInt16 nLang,
pDrawModel->ReformatAllTextObjects();
}
- if( pLayout && !mbInReading )
+ SwRootFrm* pTmpRoot = GetCurrentLayout();
+ if( pTmpRoot && !mbInReading )
{
- pLayout->StartAllAction();
- pLayout->InvalidateAllCntnt();
- pLayout->EndAllAction();
- }
+ pTmpRoot->StartAllAction();
+ std::set<SwRootFrm*> aAllLayouts = GetAllLayouts();
+ std::for_each( aAllLayouts.begin(), aAllLayouts.end(), std::bind2nd(std::mem_fun(&SwRootFrm::InvalidateAllCntnt), INV_SIZE));
+ pTmpRoot->EndAllAction();
+ }//swmod 080310
SetModified();
}
@@ -457,12 +464,14 @@ void SwDoc::setCharacterCompressionType( /*[in]*/SwCharCompressType n )
pDrawModel->ReformatAllTextObjects();
}
- if( pLayout && !mbInReading )
+ SwRootFrm* pTmpRoot = GetCurrentLayout();
+ if( pTmpRoot && !mbInReading )
{
- pLayout->StartAllAction();
- pLayout->InvalidateAllCntnt();
- pLayout->EndAllAction();
- }
+ pTmpRoot->StartAllAction();
+ std::set<SwRootFrm*> aAllLayouts = GetAllLayouts();
+ std::for_each( aAllLayouts.begin(), aAllLayouts.end(), std::bind2nd(std::mem_fun(&SwRootFrm::InvalidateAllCntnt), INV_SIZE));
+ pTmpRoot->EndAllAction();
+ }//swmod 080310
SetModified();
}
}
@@ -1089,9 +1098,8 @@ sal_uInt16 _PostItFld::GetPageNo(
//Bereichs ermittelt werden.
rVirtPgNo = 0;
sal_uInt16 nPos = GetCntnt();
- SwClientIter aIter( (SwModify &)GetFld()->GetTxtNode() );
- for( SwTxtFrm* pFrm = (SwTxtFrm*)aIter.First( TYPE( SwFrm ));
- pFrm; pFrm = (SwTxtFrm*)aIter.Next() )
+ SwIterator<SwTxtFrm,SwTxtNode> aIter( GetFld()->GetTxtNode() );
+ for( SwTxtFrm* pFrm = aIter.First(); pFrm; pFrm = aIter.Next() )
{
if( pFrm->GetOfst() > nPos ||
(pFrm->HasFollow() && pFrm->GetFollow()->GetOfst() <= nPos) )
@@ -1121,13 +1129,11 @@ bool lcl_GetPostIts(
if( pFldType->GetDepends() )
{
// Modify-Object gefunden, trage alle Felder ins Array ein
- SwClientIter aIter( *pFldType );
- SwClient* pLast;
+ SwIterator<SwFmtFld,SwFieldType> aIter( *pFldType );
const SwTxtFld* pTxtFld;
-
- for( pLast = aIter.First( TYPE(SwFmtFld)); pLast; pLast = aIter.Next() )
+ for( SwFmtFld* pFld = aIter.First(); pFld; pFld = aIter.Next() )
{
- if( 0 != ( pTxtFld = ((SwFmtFld*)pLast)->GetTxtFld() ) &&
+ if( 0 != ( pTxtFld = pFld->GetTxtFld() ) &&
pTxtFld->GetTxtNode().GetNodes().IsDocNodes() )
{
bHasPostIts = true;
@@ -1218,15 +1224,12 @@ static sal_Int32 lcl_GetPaperBin( const SwPageFrm *pStartFrm )
void SwDoc::CalculatePagesForPrinting(
+ const SwRootFrm& rLayout,
/* out */ SwRenderData &rData,
const SwPrintUIOptions &rOptions,
bool bIsPDFExport,
sal_Int32 nDocPageCount )
{
- DBG_ASSERT( pLayout, "no layout present" );
- if (!pLayout)
- return;
-
const sal_Int32 nContent = rOptions.getIntValue( "PrintContent", 0 );
const bool bPrintSelection = nContent == 2;
@@ -1243,7 +1246,7 @@ void SwDoc::CalculatePagesForPrinting(
aMulti.SetTotalRange( Range( 0, RANGE_MAX ) );
aMulti.Select( aPages );
- const SwPageFrm *pStPage = (SwPageFrm*)pLayout->Lower();
+ const SwPageFrm *pStPage = dynamic_cast<const SwPageFrm*>( rLayout.Lower() );
const SwFrm *pEndPage = pStPage;
sal_uInt16 nFirstPageNo = 0;
@@ -1442,7 +1445,7 @@ void SwDoc::UpdatePagesForPrintingWithPostItData(
{
// get the correct number of current pages for the post-it document
rData.m_pPostItShell->CalcLayout();
- const sal_Int32 nPages = rData.m_pPostItDoc->GetPageCount();
+ const sal_Int32 nPages = rData.m_pPostItShell->GetPageCount();
aPostItLastStartPageNum[ nPhyPageNum ] = nPages;
}
}
@@ -1450,7 +1453,7 @@ void SwDoc::UpdatePagesForPrintingWithPostItData(
// format post-it doc to get correct number of pages
rData.m_pPostItShell->CalcLayout();
- const sal_Int32 nPostItDocPageCount = rData.m_pPostItDoc->GetPageCount();
+ const sal_Int32 nPostItDocPageCount = rData.m_pPostItShell->GetPageCount();
if (nPostItMode == POSTITS_ONLY || nPostItMode == POSTITS_ENDDOC)
{
@@ -1569,6 +1572,7 @@ void SwDoc::UpdatePagesForPrintingWithPostItData(
void SwDoc::CalculatePagePairsForProspectPrinting(
+ const SwRootFrm& rLayout,
/* out */ SwRenderData &rData,
const SwPrintUIOptions &rOptions,
sal_Int32 nDocPageCount )
@@ -1597,11 +1601,10 @@ void SwDoc::CalculatePagePairsForProspectPrinting(
}
StringRangeEnumerator aRange( aPageRange, 1, nDocPageCount, 0 );
- DBG_ASSERT( pLayout, "no layout present" );
- if (!pLayout || aRange.size() <= 0)
+ if ( aRange.size() <= 0)
return;
- const SwPageFrm *pStPage = (SwPageFrm*)pLayout->Lower();
+ const SwPageFrm *pStPage = dynamic_cast<const SwPageFrm*>( rLayout.Lower() );
sal_Int32 i = 0;
for ( i = 1; pStPage && i < nDocPageCount; ++i )
pStPage = (SwPageFrm*)pStPage->GetNext();
@@ -1611,7 +1614,7 @@ void SwDoc::CalculatePagePairsForProspectPrinting(
// currently for prospect printing all pages are valid to be printed
// thus we add them all to the respective map and set for later use
sal_Int32 nPageNum = 0;
- const SwPageFrm *pPageFrm = (SwPageFrm*)pLayout->Lower();
+ const SwPageFrm *pPageFrm = dynamic_cast<const SwPageFrm*>( rLayout.Lower() );
while( pPageFrm && nPageNum < nDocPageCount )
{
DBG_ASSERT( pPageFrm, "Empty page frame. How are we going to print this?" );
@@ -1714,38 +1717,6 @@ void SwDoc::CalculatePagePairsForProspectPrinting(
// thus we are done here.
}
-
-sal_uInt16 SwDoc::GetPageCount() const
-{
- return GetRootFrm() ? GetRootFrm()->GetPageNum() : 0;
-}
-
-const Size SwDoc::GetPageSize( sal_uInt16 nPageNum, bool bSkipEmptyPages ) const
-{
- Size aSize;
- if ( GetRootFrm() && nPageNum )
- {
- const SwPageFrm* pPage = static_cast<const SwPageFrm*>
- (GetRootFrm()->Lower());
-
- while ( --nPageNum && pPage->GetNext() )
- {
- pPage = static_cast<const SwPageFrm*>( pPage->GetNext() );
- }
-
- // switch to next page for an empty page, if empty pages are not skipped
- // in order to get a sensible page size for an empty page - e.g. for printing.
- if ( !bSkipEmptyPages && pPage->IsEmptyPage() && pPage->GetNext() )
- {
- pPage = static_cast<const SwPageFrm*>( pPage->GetNext() );
- }
-
- aSize = pPage->Frm().SSize();
- }
- return aSize;
-}
-
-
/*************************************************************************
* void UpdateDocStat( const SwDocStat& rStat );
*************************************************************************/
@@ -1775,10 +1746,8 @@ void SwDoc::UpdateDocStat( SwDocStat& rStat )
// #i93174#: notes contain paragraphs that are not nodes
{
SwFieldType * const pPostits( GetSysFldType(RES_POSTITFLD) );
- SwClientIter aIter(*pPostits);
- SwFmtFld const * pFmtFld =
- static_cast<SwFmtFld const*>(aIter.First( TYPE(SwFmtFld) ));
- while (pFmtFld)
+ SwIterator<SwFmtFld,SwFieldType> aIter( *pPostits );
+ for( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld = aIter.Next() )
{
if (pFmtFld->IsFldInDoc())
{
@@ -1786,11 +1755,10 @@ void SwDoc::UpdateDocStat( SwDocStat& rStat )
static_cast<SwPostItField const*>(pFmtFld->GetFld()));
rStat.nAllPara += pField->GetNumberOfParagraphs();
}
- pFmtFld = static_cast<SwFmtFld const*>(aIter.Next());
}
}
- rStat.nPage = GetRootFrm() ? GetRootFrm()->GetPageNum() : 0;
+ rStat.nPage = GetCurrentLayout() ? GetCurrentLayout()->GetPageNum() : 0; //swmod 080218
rStat.bModified = sal_False;
SetDocStat( rStat );
@@ -2096,46 +2064,35 @@ sal_Bool lcl_CheckSmartTagsAgain( const SwNodePtr& rpNd, void* )
void SwDoc::SpellItAgainSam( sal_Bool bInvalid, sal_Bool bOnlyWrong, sal_Bool bSmartTags )
{
- ASSERT( GetRootFrm(), "SpellAgain: Where's my RootFrm?" );
+ std::set<SwRootFrm*> aAllLayouts = GetAllLayouts();//swmod 080307
+ ASSERT( GetCurrentLayout(), "SpellAgain: Where's my RootFrm?" );
if( bInvalid )
{
- SwPageFrm *pPage = (SwPageFrm*)GetRootFrm()->Lower();
- while ( pPage )
- {
- if ( bSmartTags )
- pPage->InvalidateSmartTags();
-
- pPage->InvalidateSpelling();
- pPage = (SwPageFrm*)pPage->GetNext();
- }
- GetRootFrm()->SetNeedGrammarCheck( true );
-
+ std::for_each( aAllLayouts.begin(), aAllLayouts.end(),std::bind2nd(std::mem_fun(&SwRootFrm::AllInvalidateSmartTagsOrSpelling),bSmartTags));//swmod 080305
+ std::for_each( aAllLayouts.begin(), aAllLayouts.end(),std::bind2nd(std::mem_fun(&SwRootFrm::SetNeedGrammarCheck), true) );
if ( bSmartTags )
GetNodes().ForEach( lcl_CheckSmartTagsAgain, &bOnlyWrong );
-
GetNodes().ForEach( lcl_SpellAndGrammarAgain, &bOnlyWrong );
}
- GetRootFrm()->SetIdleFlags();
+ std::for_each( aAllLayouts.begin(), aAllLayouts.end(),std::mem_fun(&SwRootFrm::SetIdleFlags));//swmod 080307
}
void SwDoc::InvalidateAutoCompleteFlag()
{
- if( GetRootFrm() )
+ SwRootFrm* pTmpRoot = GetCurrentLayout();
+ if( pTmpRoot )
{
- SwPageFrm *pPage = (SwPageFrm*)GetRootFrm()->Lower();
- while ( pPage )
- {
- pPage->InvalidateAutoCompleteWords();
- pPage = (SwPageFrm*)pPage->GetNext();
- }
+ std::set<SwRootFrm*> aAllLayouts = GetAllLayouts();
+ std::for_each( aAllLayouts.begin(), aAllLayouts.end(),std::mem_fun(&SwRootFrm::AllInvalidateAutoCompleteWords));//swmod 080305
for( sal_uLong nNd = 1, nCnt = GetNodes().Count(); nNd < nCnt; ++nNd )
{
SwTxtNode* pTxtNode = GetNodes()[ nNd ]->GetTxtNode();
if ( pTxtNode ) pTxtNode->SetAutoCompleteWordDirty( true );
}
- GetRootFrm()->SetIdleFlags();
- }
+
+ std::for_each( aAllLayouts.begin(), aAllLayouts.end(),std::mem_fun(&SwRootFrm::SetIdleFlags));//swmod 080228
+ } //swmod 080219
}
const SwFmtINetFmt* SwDoc::FindINetAttr( const String& rName ) const
@@ -2241,9 +2198,8 @@ bool SwDoc::RemoveInvisibleContent()
{
SwTxtNode* pTxtNd;
- SwClientIter aIter( *GetSysFldType( RES_HIDDENPARAFLD ) );
- for( SwFmtFld* pFmtFld = (SwFmtFld*)aIter.First( TYPE( SwFmtFld ));
- pFmtFld; pFmtFld = (SwFmtFld*)aIter.Next() )
+ SwIterator<SwFmtFld,SwFieldType> aIter( *GetSysFldType( RES_HIDDENPARAFLD ) );
+ for( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld = aIter.Next() )
{
if( pFmtFld->GetTxtFld() &&
0 != ( pTxtNd = (SwTxtNode*)pFmtFld->GetTxtFld()->GetpTxtNode() ) &&
@@ -2486,14 +2442,11 @@ sal_Bool SwDoc::ConvertFieldsToText()
if ( RES_POSTITFLD == pCurType->Which() )
continue;
- SwClientIter aIter( *(SwFieldType*)pCurType );
- const SwFmtFld* pCurFldFmt = (SwFmtFld*)aIter.First( TYPE( SwFmtFld ));
+ SwIterator<SwFmtFld,SwFieldType> aIter( *pCurType );
::std::vector<const SwFmtFld*> aFieldFmts;
- while (pCurFldFmt)
- {
+ for( SwFmtFld* pCurFldFmt = aIter.First(); pCurFldFmt; pCurFldFmt = aIter.Next() )
aFieldFmts.push_back(pCurFldFmt);
- pCurFldFmt = (SwFmtFld*)aIter.Next();
- }
+
::std::vector<const SwFmtFld*>::iterator aBegin = aFieldFmts.begin();
::std::vector<const SwFmtFld*>::iterator aEnd = aFieldFmts.end();
while(aBegin != aEnd)
@@ -2785,21 +2738,8 @@ void SwDoc::ChkCondColls()
for (sal_uInt16 n = 0; n < pTxtFmtCollTbl->Count(); n++)
{
SwTxtFmtColl *pColl = (*pTxtFmtCollTbl)[n];
-
if (RES_CONDTXTFMTCOLL == pColl->Which())
- {
- SwClientIter aIter(*pColl);
-
- SwClient * pClient = aIter.First(TYPE(SwTxtNode));
- while (pClient)
- {
- SwTxtNode * pTxtNode = static_cast<SwTxtNode *>(pClient);
-
- pTxtNode->ChkCondColl();
-
- pClient = aIter.Next();
- }
- }
+ pColl->CallSwClientNotify( SwAttrHint(RES_CONDTXTFMTCOLL) );
}
}
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 50fb0e7b98f7..f0cc94b6ee19 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -1285,7 +1285,7 @@ void _SaveCntntIdx(SwDoc* pDoc,
if( pNode )
{
- SwFrm* pFrm = pNode->GetFrm();
+ SwFrm* pFrm = pNode->getLayoutFrm( pDoc->GetCurrentLayout() );
#if OSL_DEBUG_LEVEL > 1
static sal_Bool bViaDoc = sal_False;
if( bViaDoc )
@@ -1489,7 +1489,7 @@ void _RestoreCntntIdx(SwDoc* pDoc,
{
SwFrmFmt *pFrmFmt = (*pSpz)[ aSave.GetCount() ];
SfxPoolItem *pAnchor = (SfxPoolItem*)&pFrmFmt->GetAnchor();
- pFrmFmt->SwModify::Modify( pAnchor, pAnchor );
+ pFrmFmt->NotifyClients( pAnchor, pAnchor );
}
break;
diff --git a/sw/source/core/doc/docchart.cxx b/sw/source/core/doc/docchart.cxx
index 1d1890521acf..95cdd4caed1b 100644
--- a/sw/source/core/doc/docchart.cxx
+++ b/sw/source/core/doc/docchart.cxx
@@ -132,7 +132,7 @@ IMPL_LINK( SwDoc, DoUpdateAllCharts, Timer *, EMPTYARG )
return 0;
}
-void SwDoc::_UpdateCharts( const SwTable& rTbl, ViewShell& /*rVSh*/ ) const
+void SwDoc::_UpdateCharts( const SwTable& rTbl, ViewShell& rVSh ) const
{
String aName( rTbl.GetFrmFmt()->GetName() );
SwOLENode *pONd;
@@ -144,7 +144,7 @@ void SwDoc::_UpdateCharts( const SwTable& rTbl, ViewShell& /*rVSh*/ ) const
SwFrm* pFrm;
if( 0 != ( pONd = aIdx.GetNode().GetOLENode() ) &&
aName.Equals( pONd->GetChartTblName() ) &&
- 0 != ( pFrm = pONd->GetFrm() ) )
+ 0 != ( pFrm = pONd->getLayoutFrm( rVSh.GetLayout() ) ) )
{
SwChartDataProvider *pPCD = GetChartDataProvider();
if (pPCD)
@@ -248,7 +248,7 @@ void SwDoc::CreateChartInternalDataProviders( const SwTable *pTable )
aIdx++;
if( 0 != ( pONd = aIdx.GetNode().GetOLENode() ) &&
aName.Equals( pONd->GetChartTblName() ) /* OLE node is chart? */ &&
- 0 != (pONd->GetFrm()) /* chart frame is not hidden */ )
+ 0 != (pONd->getLayoutFrm( GetCurrentLayout() )) /* chart frame is not hidden */ )
{
uno::Reference < embed::XEmbeddedObject > xIP = pONd->GetOLEObj().GetOleRef();
if ( svt::EmbeddedObjectRef::TryRunningState( xIP ) )
diff --git a/sw/source/core/doc/doccorr.cxx b/sw/source/core/doc/doccorr.cxx
index 3477619fba33..6585b3359004 100644
--- a/sw/source/core/doc/doccorr.cxx
+++ b/sw/source/core/doc/doccorr.cxx
@@ -43,8 +43,6 @@
#include <swundo.hxx>
#include <hints.hxx>
-/* */
-
/*
* MACROS um ueber alle CrsrShells zu iterieren
*/
@@ -192,7 +190,7 @@ void PaMCorrAbs( const SwPaM& rRange,
{
// the UNO cursor has left its section. We need to notify it!
SwMsgPoolItem aHint( RES_UNOCURSOR_LEAVES_SECTION );
- pUnoCursor->Modify( &aHint, NULL );
+ pUnoCursor->ModifyNotification( &aHint, NULL );
}
}
}
@@ -334,9 +332,9 @@ void SwDoc::CorrRel(const SwNodeIndex& rOldNode,
SwEditShell* SwDoc::GetEditShell( ViewShell** ppSh ) const
{
// Layout und OLE-Shells sollten vorhanden sein!
- if( pLayout && pLayout->GetCurrShell() )
+ if( pCurrentView )
{
- ViewShell *pSh = pLayout->GetCurrShell(), *pVSh = pSh;
+ ViewShell *pSh = pCurrentView, *pVSh = pSh;
if( ppSh )
*ppSh = pSh;
@@ -348,7 +346,7 @@ SwEditShell* SwDoc::GetEditShell( ViewShell** ppSh ) const
} while( pVSh != ( pSh = (ViewShell*)pSh->GetNext() ));
}
else if( ppSh )
- *ppSh = 0;
+ *ppSh = 0; //swmod 071029//swmod 071225
return 0;
}
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index 463e15bf6b6e..52228110afb5 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -70,10 +70,10 @@
#include <GetMetricVal.hxx>
#include <unotools/syslocale.hxx>
#include <statstr.hrc>
+#include <switerator.hxx>
#include <hints.hxx>
-
#include <SwUndoPageDesc.hxx>
-
+#include <pagedeschint.hxx>
#include <tgrditem.hxx>
using namespace com::sun::star;
@@ -201,6 +201,7 @@ void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged )
ASSERT( i < aPageDescs.Count(), "PageDescs ueberindiziert." );
SwPageDesc *pDesc = aPageDescs[i];
+ SwRootFrm* pTmpRoot = GetCurrentLayout();//swmod 080219
if (GetIDocumentUndoRedo().DoesUndo())
{
@@ -396,9 +397,12 @@ void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged )
}
}
- if ( (bUseOn || bFollow) && GetRootFrm() )
+ if ( (bUseOn || bFollow) && pTmpRoot)
//Layot benachrichtigen!
- GetRootFrm()->CheckPageDescs( (SwPageFrm*)GetRootFrm()->Lower() );
+ {
+ std::set<SwRootFrm*> aAllLayouts = GetAllLayouts();
+ std::for_each( aAllLayouts.begin(), aAllLayouts.end(),std::mem_fun(&SwRootFrm::AllCheckPageDescs));//swmod 080304
+ }
//Jetzt noch die Seiten-Attribute uebernehmen.
::lcl_DescSetAttr( rChged.GetMaster(), pDesc->GetMaster() );
@@ -411,16 +415,10 @@ void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged )
pDesc->SetFtnInfo( rChged.GetFtnInfo() );
SwMsgPoolItem aInfo( RES_PAGEDESC_FTNINFO );
{
- SwClientIter aIter( pDesc->GetMaster() );
- for( SwClient* pLast = aIter.First(TYPE(SwFrm)); pLast;
- pLast = aIter.Next() )
- pLast->Modify( &aInfo, 0 );
+ pDesc->GetMaster().ModifyBroadcast( &aInfo, 0, TYPE(SwFrm) );
}
{
- SwClientIter aIter( pDesc->GetLeft() );
- for( SwClient* pLast = aIter.First(TYPE(SwFrm)); pLast;
- pLast = aIter.Next() )
- pLast->Modify( &aInfo, 0 );
+ pDesc->GetLeft().ModifyBroadcast( &aInfo, 0, TYPE(SwFrm) );
}
}
SetModified();
@@ -443,62 +441,33 @@ void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged )
|*
|*************************************************************************/
-void lcl_RemoveFrms( SwFrmFmt& rFmt, sal_Bool& rbFtnsRemoved )
-{
- SwClientIter aIter( rFmt );
- SwFrm *pFrm;
- for( pFrm = (SwFrm*)aIter.First(TYPE(SwFrm)); pFrm;
- pFrm = (SwFrm*)aIter.Next() )
- if ( !rbFtnsRemoved && pFrm->IsPageFrm() &&
- ((SwPageFrm*)pFrm)->IsFtnPage() )
- {
- rFmt.getIDocumentLayoutAccess()->GetRootFrm()->RemoveFtns( 0, sal_False, sal_True );
- rbFtnsRemoved = sal_True;
- }
- else
- {
- pFrm->Cut();
- delete pFrm;
- }
-}
-
// #i7983#
void SwDoc::PreDelPageDesc(SwPageDesc * pDel)
{
if (0 == pDel)
return;
- SwFmtPageDesc aDfltDesc( aPageDescs[0] );
- SwClientIter aIter( *pDel );
- SwClient* pLast;
- while( 0 != ( pLast = aIter.GoRoot() ))
+ // mba: test iteration as clients are removed while iteration
+ SwPageDescHint aHint( aPageDescs[0] );
+ pDel->CallSwClientNotify( aHint );
+
+ bool bHasLayout = HasLayout();
+ if ( pFtnInfo->DependsOn( pDel ) )
{
- if( pLast->ISA( SwFmtPageDesc ) )
+ pFtnInfo->ChgPageDesc( aPageDescs[0] );
+ if ( bHasLayout )
{
- const SwModify* pMod = ((SwFmtPageDesc*)pLast)->GetDefinedIn();
- if ( pMod )
- {
- if( pMod->ISA( SwCntntNode ) )
- ((SwCntntNode*)pMod)->SetAttr( aDfltDesc );
- else if( pMod->ISA( SwFmt ))
- ((SwFmt*)pMod)->SetFmtAttr( aDfltDesc );
- else
- {
- ASSERT( !this, "was ist das fuer ein Mofify-Obj?" );
- aPageDescs[0]->Add( pLast );
- }
- }
- else //Es kann noch eine Undo-Kopie existieren
- aPageDescs[0]->Add( pLast );
+ std::set<SwRootFrm*> aAllLayouts = GetAllLayouts();
+ std::for_each( aAllLayouts.begin(), aAllLayouts.end(),std::bind2nd(std::mem_fun(&SwRootFrm::CheckFtnPageDescs), false));
}
-
- sal_Bool bFtnInf = sal_False;
- if ( sal_True == (bFtnInf = pLast == pFtnInfo->GetPageDescDep()) ||
- pLast == pEndNoteInfo->GetPageDescDep() )
+ }
+ else if ( pEndNoteInfo->DependsOn( pDel ) )
+ {
+ pEndNoteInfo->ChgPageDesc( aPageDescs[0] );
+ if ( bHasLayout )
{
- aPageDescs[0]->Add( pLast );
- if ( GetRootFrm() )
- GetRootFrm()->CheckFtnPageDescs( !bFtnInf );
+ std::set<SwRootFrm*> aAllLayouts = GetAllLayouts();
+ std::for_each( aAllLayouts.begin(), aAllLayouts.end(),std::bind2nd(std::mem_fun(&SwRootFrm::CheckFtnPageDescs), true));
}
}
@@ -507,29 +476,13 @@ void SwDoc::PreDelPageDesc(SwPageDesc * pDel)
if ( aPageDescs[j]->GetFollow() == pDel )
{
aPageDescs[j]->SetFollow( 0 );
- //Clients des PageDesc sind die Attribute, denen sagen wir bescheid.
- //die Attribute wiederum reichen die Meldung an die Absaetze weiter.
-
- //Layot benachrichtigen!
- if( GetRootFrm() ) // ist nicht immer vorhanden!! (Orginizer)
- GetRootFrm()->CheckPageDescs( (SwPageFrm*)GetRootFrm()->Lower() );
+ if( bHasLayout )
+ {
+ std::set<SwRootFrm*> aAllLayouts = GetAllLayouts();
+ std::for_each( aAllLayouts.begin(), aAllLayouts.end(),std::mem_fun(&SwRootFrm::AllCheckPageDescs));//swmod 080228
+ }
}
}
-
- if( GetRootFrm() ) // ist nicht immer vorhanden!! (Orginizer)
- {
- //Wenn jetzt noch irgendwelche Seiten auf die FrmFmt'e (Master und Left)
- //Zeigen (z.B. irgendwelche Fussnotenseiten), so muessen die Seiten
- //vernichtet werden.
-
- // Wenn wir auf Endnotenseiten stossen, schmeissen wir alle Fussnoten weg,
- // anders kann die Reihenfolge der Seiten (FollowsPageDescs usw.)
- // nicht garantiert werden.
- sal_Bool bFtnsRemoved = sal_False;
-
- ::lcl_RemoveFrms( pDel->GetMaster(), bFtnsRemoved );
- ::lcl_RemoveFrms( pDel->GetLeft(), bFtnsRemoved );
- }
}
// #116530#
@@ -667,7 +620,7 @@ void SwDoc::PrtDataChanged()
ASSERT( get(IDocumentSettingAccess::USE_VIRTUAL_DEVICE) ||
0 != getPrinter( sal_False ), "PrtDataChanged will be called recursive!" )
// <--
-
+ SwRootFrm* pTmpRoot = GetCurrentLayout();//swmod 080219
SwWait *pWait = 0;
sal_Bool bEndAction = sal_False;
@@ -675,16 +628,16 @@ void SwDoc::PrtDataChanged()
GetDocShell()->UpdateFontList();
sal_Bool bDraw = sal_True;
- if ( GetRootFrm() )
+ if ( pTmpRoot )
{
- ViewShell *pSh = GetRootFrm()->GetCurrShell();
- if( !get(IDocumentSettingAccess::BROWSE_MODE) ||
- ( pSh && pSh->GetViewOptions()->IsPrtFormat() ) )
+ ViewShell *pSh = GetCurrentViewShell();
+ if( !pSh->GetViewOptions()->getBrowseMode() ||
+ pSh->GetViewOptions()->IsPrtFormat() )
{
if ( GetDocShell() )
pWait = new SwWait( *GetDocShell(), sal_True );
- GetRootFrm()->StartAllAction();
+ pTmpRoot->StartAllAction();
bEndAction = sal_True;
bDraw = sal_False;
@@ -695,7 +648,9 @@ void SwDoc::PrtDataChanged()
}
pFntCache->Flush();
- GetRootFrm()->InvalidateAllCntnt();
+
+ std::set<SwRootFrm*> aAllLayouts = GetAllLayouts();
+ std::for_each( aAllLayouts.begin(), aAllLayouts.end(),std::bind2nd(std::mem_fun(&SwRootFrm::InvalidateAllCntnt), INV_SIZE));//swmod 080304
if ( pSh )
{
@@ -704,11 +659,11 @@ void SwDoc::PrtDataChanged()
pSh->InitPrt( pPrt );
pSh = (ViewShell*)pSh->GetNext();
}
- while ( pSh != GetRootFrm()->GetCurrShell() );
+ while ( pSh != GetCurrentViewShell() );
}
}
- }
+ } //swmod 080218
if ( bDraw && pDrawModel )
{
const sal_Bool bTmpAddExtLeading = get(IDocumentSettingAccess::ADD_EXT_LEADING);
@@ -723,7 +678,7 @@ void SwDoc::PrtDataChanged()
PrtOLENotify( sal_True );
if ( bEndAction )
- GetRootFrm()->EndAllAction();
+ pTmpRoot->EndAllAction(); //swmod 080218
delete pWait;
}
@@ -737,18 +692,18 @@ extern SvPtrarr *pGlobalOLEExcludeList;
void SwDoc::PrtOLENotify( sal_Bool bAll )
{
SwFEShell *pShell = 0;
- if ( GetRootFrm() && GetRootFrm()->GetCurrShell() )
+ if ( GetCurrentViewShell() )
{
- ViewShell *pSh = GetRootFrm()->GetCurrShell();
+ ViewShell *pSh = GetCurrentViewShell();
if ( !pSh->ISA(SwFEShell) )
do
{ pSh = (ViewShell*)pSh->GetNext();
} while ( !pSh->ISA(SwFEShell) &&
- pSh != GetRootFrm()->GetCurrShell() );
+ pSh != GetCurrentViewShell() );
if ( pSh->ISA(SwFEShell) )
pShell = (SwFEShell*)pSh;
- }
+ } //swmod 071107//swmod 071225
if ( !pShell )
{
//Das hat ohne Shell und damit ohne Client keinen Sinn, weil nur darueber
@@ -767,28 +722,12 @@ void SwDoc::PrtOLENotify( sal_Bool bAll )
mbOLEPrtNotifyPending = mbAllOLENotify = sal_False;
-
- SwOLENodes *pNodes = 0;
- SwClientIter aIter( *(SwModify*)GetDfltGrfFmtColl() );
- for( SwCntntNode* pNd = (SwCntntNode*)aIter.First( TYPE( SwCntntNode ) );
- pNd;
- pNd = (SwCntntNode*)aIter.Next() )
- {
- SwOLENode *pONd;
- if ( 0 != (pONd = pNd->GetOLENode()) &&
- (bAll || pONd->IsOLESizeInvalid()) )
- {
- if ( !pNodes )
- pNodes = new SwOLENodes;
- pNodes->Insert( pONd, pNodes->Count() );
- }
- }
-
+ SwOLENodes *pNodes = SwCntntNode::CreateOLENodesArray( *GetDfltGrfFmtColl(), !bAll );
if ( pNodes )
{
::StartProgress( STR_STATSTR_SWGPRTOLENOTIFY,
0, pNodes->Count(), GetDocShell());
- GetRootFrm()->StartAllAction();
+ GetCurrentLayout()->StartAllAction(); //swmod 080218
for( sal_uInt16 i = 0; i < pNodes->Count(); ++i )
{
@@ -844,7 +783,7 @@ void SwDoc::PrtOLENotify( sal_Bool bAll )
}
}
delete pNodes;
- GetRootFrm()->EndAllAction();
+ GetCurrentLayout()->EndAllAction(); //swmod 080218
::EndProgress( GetDocShell() );
}
}
@@ -857,31 +796,19 @@ IMPL_LINK( SwDoc, DoUpdateModifiedOLE, Timer *, )
{
mbOLEPrtNotifyPending = mbAllOLENotify = sal_False;
- SwOLENodes aOLENodes;
- SwClientIter aIter( *(SwModify*)GetDfltGrfFmtColl() );
- for( SwCntntNode* pNd = (SwCntntNode*)aIter.First( TYPE( SwCntntNode ) );
- pNd;
- pNd = (SwCntntNode*)aIter.Next() )
- {
- SwOLENode *pONd = pNd->GetOLENode();
- if( pONd && pONd->IsOLESizeInvalid() )
- {
- aOLENodes.Insert( pONd, aOLENodes.Count() );
- }
- }
-
- if( aOLENodes.Count() )
+ SwOLENodes *pNodes = SwCntntNode::CreateOLENodesArray( *GetDfltGrfFmtColl(), true );
+ if( pNodes )
{
::StartProgress( STR_STATSTR_SWGPRTOLENOTIFY,
- 0, aOLENodes.Count(), GetDocShell());
- GetRootFrm()->StartAllAction();
+ 0, pNodes->Count(), GetDocShell());
+ GetCurrentLayout()->StartAllAction(); //swmod 080218
SwMsgPoolItem aMsgHint( RES_UPDATE_ATTR );
- for( sal_uInt16 i = 0; i < aOLENodes.Count(); ++i )
+ for( sal_uInt16 i = 0; i < pNodes->Count(); ++i )
{
::SetProgressState( i, GetDocShell() );
- SwOLENode* pOLENd = aOLENodes[i];
+ SwOLENode* pOLENd = (*pNodes)[i];
pOLENd->SetOLESizeInvalid( sal_False );
//Kennen wir nicht, also muss das Objekt geladen werden.
@@ -902,11 +829,12 @@ IMPL_LINK( SwDoc, DoUpdateModifiedOLE, Timer *, )
pOLENd->SetOLESizeInvalid( sal_True );
}*/
// repaint it
- pOLENd->Modify( &aMsgHint, &aMsgHint );
+ pOLENd->ModifyNotification( &aMsgHint, &aMsgHint );
}
}
- GetRootFrm()->EndAllAction();
+ GetCurrentLayout()->EndAllAction(); //swmod 080218
::EndProgress( GetDocShell() );
+ delete pNodes;
}
}
return 0;
diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx
index 91d99221e1fd..b18ccb6af8c4 100644
--- a/sw/source/core/doc/docdraw.cxx
+++ b/sw/source/core/doc/docdraw.cxx
@@ -65,21 +65,15 @@
#include <dflyobj.hxx>
#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>
-// <--
+#include <switerator.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::linguistic2;
@@ -563,28 +557,29 @@ _ZSortFly::_ZSortFly( const SwFrmFmt* pFrmFmt, const SwFmtAnchor* pFlyAn,
// #i11176#
// This also needs to work when no layout exists. Thus, for
// FlyFrames an alternative method is used now in that case.
- SwClientIter aIter( (SwFmt&)*pFmt );
-
if( RES_FLYFRMFMT == pFmt->Which() )
{
- if( pFmt->getIDocumentLayoutAccess()->GetRootFrm() )
+ if( pFmt->getIDocumentLayoutAccess()->GetCurrentViewShell() ) //swmod 071107//swmod 071225
{
// Schauen, ob es ein SdrObject dafuer gibt
- if( aIter.First( TYPE( SwFlyFrm) ) )
- nOrdNum = ((SwFlyFrm*)aIter())->GetVirtDrawObj()->GetOrdNum();
+ SwFlyFrm* pFly = SwIterator<SwFlyFrm,SwFmt>::FirstElement( *pFrmFmt );
+ if( pFly )
+ nOrdNum = pFly->GetVirtDrawObj()->GetOrdNum();
}
else
{
// Schauen, ob es ein SdrObject dafuer gibt
- if( aIter.First( TYPE(SwFlyDrawContact) ) )
- nOrdNum = ((SwFlyDrawContact*)aIter())->GetMaster()->GetOrdNum();
+ SwFlyDrawContact* pContact = SwIterator<SwFlyDrawContact,SwFmt>::FirstElement( *pFrmFmt );
+ if( pContact )
+ nOrdNum = pContact->GetMaster()->GetOrdNum();
}
}
else if( RES_DRAWFRMFMT == pFmt->Which() )
{
// Schauen, ob es ein SdrObject dafuer gibt
- if( aIter.First( TYPE(SwDrawContact) ) )
- nOrdNum = ((SwDrawContact*)aIter())->GetMaster()->GetOrdNum();
+ SwDrawContact* pContact = SwIterator<SwDrawContact,SwFmt>::FirstElement( *pFrmFmt );
+ if( pContact )
+ nOrdNum = pContact->GetMaster()->GetOrdNum();
}
else {
ASSERT( !this, "was ist das fuer ein Format?" );
@@ -669,7 +664,8 @@ void SwDoc::InitDrawModel()
nInvisibleControls = pDrawModel->GetLayerAdmin().NewLayer( sLayerNm )->GetID();
}
- pDrawModel->InsertPage( pDrawModel->AllocPage( sal_False ) );
+ SdrPage* pMasterPage = pDrawModel->AllocPage( sal_False );
+ pDrawModel->InsertPage( pMasterPage );
RTL_LOGFILE_CONTEXT_TRACE( aLog, "after create DrawDocument" );
RTL_LOGFILE_CONTEXT_TRACE( aLog, "before create Spellchecker/Hyphenator" );
@@ -694,10 +690,24 @@ void SwDoc::InitDrawModel()
pDrawModel->SetRefDevice( pRefDev );
pDrawModel->SetNotifyUndoActionHdl( LINK( this, SwDoc, AddDrawUndo ));
- if ( pLayout )
+ if ( pCurrentView )
{
- pLayout->SetDrawPage( pDrawModel->GetPage( 0 ) );
- pLayout->GetDrawPage()->SetSize( pLayout->Frm().SSize() );
+ ViewShell* pViewSh = pCurrentView;
+ do
+ {
+ SwRootFrm* pRoot = pViewSh->GetLayout();
+ if( pRoot && !pRoot->GetDrawPage() )
+ {
+ // Disable "multiple layout" for the moment:
+ // use pMasterPage instead of a new created SdrPage
+ // pDrawModel->AllocPage( FALSE );
+ // pDrawModel->InsertPage( pDrawPage );
+ SdrPage* pDrawPage = pMasterPage;
+ pRoot->SetDrawPage( pDrawPage );
+ pDrawPage->SetSize( pRoot->Frm().SSize() );
+ }
+ pViewSh = (ViewShell*)pViewSh->GetNext();
+ }while( pViewSh != pCurrentView );
}
}
@@ -863,14 +873,14 @@ SdrModel* SwDoc::_MakeDrawModel()
{
ASSERT( !pDrawModel, "_MakeDrawModel: Why?" );
InitDrawModel();
- if ( pLayout && pLayout->GetCurrShell() )
+ if ( pCurrentView )
{
- ViewShell* pTmp = pLayout->GetCurrShell();
+ ViewShell* pTmp = pCurrentView;
do
{
pTmp->MakeDrawView();
pTmp = (ViewShell*) pTmp->GetNext();
- } while ( pTmp != pLayout->GetCurrShell() );
+ } while ( pTmp != pCurrentView );
//Broadcast, damit die FormShell mit der DrawView verbunden werden kann
if( GetDocShell() )
@@ -878,7 +888,7 @@ SdrModel* SwDoc::_MakeDrawModel()
SfxSimpleHint aHnt( SW_BROADCAST_DRAWVIEWS_CREATED );
GetDocShell()->Broadcast( aHnt );
}
- }
+ } //swmod 071029//swmod 071225
return pDrawModel;
}
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 6e5c259a9d04..ef5ecb8c255c 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -219,7 +219,7 @@ void _RestFlyInRange( _SaveFlyArr & rArr, const SwNodeIndex& rSttIdx,
pFmt, pFmt->GetDoc()->GetSpzFrmFmts()->Count() );
pFmt->SetFmtAttr( aAnchor );
SwCntntNode* pCNd = aPos.nNode.GetNode().GetCntntNode();
- if( pCNd && pCNd->GetFrm( 0, 0, sal_False ) )
+ if( pCNd && pCNd->getLayoutFrm( pFmt->GetDoc()->GetCurrentLayout(), 0, 0, sal_False ) )
pFmt->MakeFrms();
}
}
@@ -416,7 +416,7 @@ bool lcl_SaveFtn( const SwNodeIndex& rSttNd, const SwNodeIndex& rEndNd,
}
else
{
- pSrch->DelFrms();
+ pSrch->DelFrms(0);
rFtnArr.Remove( nPos );
if( bSaveFtn )
rSaveArr.Insert( pSrch );
@@ -444,7 +444,7 @@ bool lcl_SaveFtn( const SwNodeIndex& rSttNd, const SwNodeIndex& rEndNd,
}
else
{
- pSrch->DelFrms();
+ pSrch->DelFrms(0);
rFtnArr.Remove( nPos );
if( bSaveFtn )
rSaveArr.Insert( pSrch );
@@ -846,13 +846,7 @@ bool SwDoc::Overwrite( const SwPaM &rRg, const String &rStr )
if( nOldAttrCnt != nNewAttrCnt )
{
SwUpdateAttr aHint( 0, 0, 0 );
- SwClientIter aIter( *pNode );
- SwClient* pGTO = aIter.First(TYPE( SwCrsrShell ));
- while( pGTO )
- {
- pGTO->Modify( 0, &aHint );
- pGTO = aIter.Next();
- }
+ pNode->ModifyBroadcast( 0, &aHint, TYPE( SwCrsrShell ) );
}
if (!GetIDocumentUndoRedo().DoesUndo() &&
@@ -1923,7 +1917,7 @@ uno::Any SwDoc::Spell( SwPaM& rPaM,
switch( pNd->GetNodeType() )
{
case ND_TEXTNODE:
- if( 0 != ( pCntFrm = ((SwTxtNode*)pNd)->GetFrm()) )
+ if( 0 != ( pCntFrm = ((SwTxtNode*)pNd)->getLayoutFrm( GetCurrentLayout() )) )
{
// geschutze Cellen/Flys ueberspringen, ausgeblendete
//ebenfalls
@@ -2153,7 +2147,7 @@ sal_Bool lcl_HyphenateNode( const SwNodePtr& rpNd, void* pArgs )
SwHyphArgs *pHyphArgs = (SwHyphArgs*)pArgs;
if( pNode )
{
- SwCntntFrm* pCntFrm = pNode->GetFrm();
+ SwCntntFrm* pCntFrm = pNode->getLayoutFrm( pNode->GetDoc()->GetCurrentLayout() );
if( pCntFrm && !((SwTxtFrm*)pCntFrm)->IsHiddenNow() )
{
sal_uInt16 *pPageSt = pHyphArgs->GetPageSt();
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index 28d41e9e5364..89552c3b1ad9 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -73,6 +73,7 @@
#include <poolfmt.hrc> // fuer InitFldTypes
#include <SwUndoField.hxx>
+#include "switerator.hxx"
using namespace ::com::sun::star::uno;
@@ -360,10 +361,10 @@ void SwDoc::UpdateFlds( SfxPoolItem *pNewHt, bool bCloseDB )
if( !pNewHt )
{
SwMsgPoolItem aUpdateDDE( RES_UPDATEDDETBL );
- (*pFldTypes)[i]->Modify( 0, &aUpdateDDE );
+ (*pFldTypes)[i]->ModifyNotification( 0, &aUpdateDDE );
}
else
- (*pFldTypes)[i]->Modify( 0, pNewHt );
+ (*pFldTypes)[i]->ModifyNotification( 0, pNewHt );
break;
}
case RES_GETEXPFLD:
@@ -374,7 +375,7 @@ void SwDoc::UpdateFlds( SfxPoolItem *pNewHt, bool bCloseDB )
if( !pNewHt )
break;
default:
- (*pFldTypes)[i]->Modify( 0, pNewHt );
+ (*pFldTypes)[i]->ModifyNotification ( 0, pNewHt );
}
}
@@ -426,7 +427,7 @@ void SwDoc::UpdateRefFlds( SfxPoolItem* pHt )
SwFieldType* pFldType;
for( sal_uInt16 i = 0; i < pFldTypes->Count(); ++i )
if( RES_GETREFFLD == ( pFldType = (*pFldTypes)[i] )->Which() )
- pFldType->Modify( 0, pHt );
+ pFldType->ModifyNotification( 0, pHt );
}
void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
@@ -444,9 +445,9 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
if( pHt && RES_TABLEFML_UPDATE == pHt->Which() )
pUpdtFld = (SwTableFmlUpdate*)pHt;
- SwClientIter aIter( *pFldType );
- for( SwFmtFld* pFmtFld = (SwFmtFld*)aIter.First( TYPE( SwFmtFld ));
- pFmtFld; pFmtFld = (SwFmtFld*)aIter.Next() )
+ SwIterator<SwFmtFld,SwFieldType> aIter( *pFldType );
+ for( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld = aIter.Next() )
+ {
if( pFmtFld->GetTxtFld() )
{
SwTblField* pFld = (SwTblField*)pFmtFld->GetFld();
@@ -497,6 +498,7 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
// setze bei allen das Value-Flag zurueck
pFld->ChgValid( sal_False );
}
+ }
break;
}
@@ -525,16 +527,13 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
if( pFldType )
{
- SwClient* pLast;
- SwClientIter aIter( *pFldType );
- // dann rechne mal schoen
- // JP 27.03.97: Beim Berechnen am Ende anfangen - weil neue
- // Felder immer am Anfang der Modifykette eingefuegt
- // werden. Beim Import haben wir damit eine bessere/
- // schnellere Berechnung bei "Kettenformeln"
- if( 0 != ( pLast = aIter.GoEnd() ))
- do {
- SwFmtFld* pFmtFld = (SwFmtFld*)pLast;
+ SwIterator<SwFmtFld,SwFieldType> aIter( *pFldType );
+ for( SwFmtFld* pFmtFld = aIter.Last(); pFmtFld; pFmtFld = aIter.Previous() )
+ {
+ // start calculation at the end
+ // new fields are inserted at the beginning of the modify chain
+ // that gives faster calculation on import
+ // mba: do we really need this "optimization"? Is it still valid?
SwTblField* pFld;
if( !pFmtFld->GetTxtFld() || (nsSwExtendedSubType::SUB_CMD &
(pFld = (SwTblField*)pFmtFld->GetFld())->GetSubType() ))
@@ -567,7 +566,7 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
{
// steht im Sonderbereich, wird teuer !!
Point aPt; // den im Layout 1. Frame returnen - Tab.Kopfzeile !!
- pFrm = rTxtNd.GetFrm( &aPt );
+ pFrm = rTxtNd.getLayoutFrm( GetCurrentLayout(), &aPt );
if( pFrm )
{
SwPosition aPos( *pTblNd );
@@ -603,8 +602,8 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
}
pCalc->SetCalcError( CALC_NOERR );
}
- pFmtFld->Modify( 0, pHt );
- } while( 0 != ( pLast = aIter-- ));
+ pFmtFld->ModifyNotification( 0, pHt );
+ }
}
// dann berechene noch die Formeln an den Boxen
@@ -639,7 +638,7 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
if( !pCNd )
pCNd = GetNodes().GoNext( &aCNdIdx );
- if( pCNd && 0 != (pFrm = pCNd->GetFrm( &aPt )) )
+ if( pCNd && 0 != (pFrm = pCNd->getLayoutFrm( GetCurrentLayout(), &aPt )) )
{
SwPosition aPos( *pCNd );
if( GetBodyTxtNode( *this, aPos, *pFrm ) )
@@ -702,10 +701,10 @@ void SwDoc::UpdatePageFlds( SfxPoolItem* pMsgHnt )
case RES_CHAPTERFLD:
case RES_GETEXPFLD:
case RES_REFPAGEGETFLD:
- pFldType->Modify( 0, pMsgHnt );
+ pFldType->ModifyNotification( 0, pMsgHnt );
break;
case RES_DOCSTATFLD:
- pFldType->Modify( 0, 0 );
+ pFldType->ModifyNotification( 0, 0 );
break;
}
SetNewFldLst(true);
@@ -1544,7 +1543,7 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds )
}
} // switch
- pFmtFld->Modify( 0, 0 ); // Formatierung anstossen
+ pFmtFld->ModifyNotification( 0, 0 ); // Formatierung anstossen
if( pUpdtFld == pTxtFld ) // sollte nur dieses geupdatet werden
{
@@ -1687,9 +1686,8 @@ const SwDBData& SwDoc::GetDBDesc()
case RES_DBNUMSETFLD:
case RES_DBSETNUMBERFLD:
{
- SwClientIter aIter( rFldType );
- SwFmtFld* pFld = (SwFmtFld*)aIter.First( TYPE( SwFmtFld ));
- while(pFld)
+ SwIterator<SwFmtFld,SwFieldType> aIter( rFldType );
+ for( SwFmtFld* pFld = aIter.First(); pFld; pFld = aIter.Next() )
{
if(pFld->IsFldInDoc())
{
@@ -1701,7 +1699,6 @@ const SwDBData& SwDoc::GetDBDesc()
aDBData = (static_cast < SwDBNameInfField* > (pFld->GetFld()))->GetRealDBData();
break;
}
- pFld = (SwFmtFld*)aIter.Next();
}
}
break;
@@ -1957,7 +1954,7 @@ void SwDoc::ChangeDBFields( const SvStringsDtor& rOldNames,
SwDBFieldType* pTyp = (SwDBFieldType*)InsertFldType(
SwDBFieldType(this, pOldTyp->GetColumnName(), aNewDBData));
- pTyp->Add(pFmtFld); // Feld auf neuen Typ umhaengen
+ pFmtFld->RegisterToFieldType( *pTyp );
pFld->ChgTyp(pTyp);
((SwDBField*)pFld)->ClearInitialized();
@@ -2102,10 +2099,8 @@ void SwDoc::SetFixFields( bool bOnlyTimeDate, const DateTime* pNewDateTime )
for( ; nStt < 5; ++nStt )