summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basctl/source/basicide/baside2b.cxx7
-rw-r--r--basctl/source/basicide/bastype3.cxx21
-rw-r--r--basic/inc/basic/sbmod.hxx8
-rw-r--r--basic/inc/basic/sbstar.hxx1
-rw-r--r--basic/source/classes/sbxmod.cxx49
-rw-r--r--configure.in1
-rw-r--r--connectivity/source/parse/sqlbison.y2
-rw-r--r--dbaccess/source/core/api/KeySet.cxx13
-rw-r--r--dbaccess/source/core/api/KeySet.hxx3
-rw-r--r--dbaccess/source/core/api/OptimisticSet.cxx5
-rw-r--r--dbaccess/source/core/api/RowSetCache.cxx2
-rw-r--r--default_images/oracleirm/res/irmprotecteditem.bmp0
-rw-r--r--desktop/source/app/app.cxx2
-rw-r--r--editeng/inc/editeng/svxrtf.hxx19
-rw-r--r--editeng/source/editeng/editdoc.cxx4
-rw-r--r--editeng/source/editeng/editdoc.hxx7
-rw-r--r--editeng/source/editeng/editdoc2.cxx10
-rwxr-xr-xediteng/source/editeng/impedit2.cxx74
-rw-r--r--editeng/source/editeng/impedit3.cxx6
-rwxr-xr-xediteng/source/editeng/impedit4.cxx16
-rw-r--r--editeng/source/misc/txtrange.cxx22
-rw-r--r--editeng/source/rtf/makefile.mk2
-rw-r--r--editeng/source/rtf/rtfitem.cxx18
-rw-r--r--editeng/source/rtf/svxrtf.cxx50
-rw-r--r--filter/source/xsltdialog/xmlfileview.cxx30
-rw-r--r--forms/source/component/ListBox.cxx4
-rw-r--r--framework/inc/framework.hrc8
-rw-r--r--framework/source/services/backingwindow.cxx8
-rw-r--r--instsetoo_native/inc_openoffice/windows/msi_languages/makefile.mk5
-rw-r--r--instsetoo_native/util/makefile.mk24
-rw-r--r--jvmfwk/inc/jvmfwk/framework.h1
-rw-r--r--jvmfwk/inc/jvmfwk/vendorplugin.h19
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx5
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx62
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.map5
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx4
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/util.cxx8
-rw-r--r--jvmfwk/source/elements.cxx10
-rw-r--r--jvmfwk/source/framework.cxx48
-rw-r--r--jvmfwk/source/framework.hxx4
-rw-r--r--l10ntools/scripts/keyidGen.pl2
-rwxr-xr-xl10ntools/scripts/localize.pl3
-rw-r--r--officecfg/registry/data/org/openoffice/VCL.xcu68
-rwxr-xr-xpostprocess/rebase/coffbase.txt68
-rw-r--r--sax/source/tools/converter.cxx4
-rw-r--r--sc/source/core/data/docpool.cxx14
-rw-r--r--sc/source/core/data/documen9.cxx10
-rw-r--r--sc/source/core/data/document.cxx24
-rw-r--r--sc/source/core/data/fillinfo.cxx6
-rw-r--r--sc/source/filter/excel/xiname.cxx6
-rw-r--r--sc/source/filter/inc/xiname.hxx4
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx6
-rw-r--r--sc/source/filter/xml/xmlfonte.cxx12
-rw-r--r--sc/source/ui/docshell/docfunc.cxx2
-rw-r--r--sc/source/ui/docshell/docsh5.cxx8
-rw-r--r--sc/source/ui/docshell/makefile.mk1
-rw-r--r--sc/source/ui/miscdlgs/conflictsdlg.cxx4
-rw-r--r--sc/source/ui/undo/undotab.cxx84
-rw-r--r--sc/source/ui/unoobj/defltuno.cxx2
-rw-r--r--sc/source/ui/unoobj/docuno.cxx26
-rw-r--r--sc/source/ui/view/pfuncache.cxx2
-rw-r--r--sc/source/ui/view/tabvwshf.cxx4
-rw-r--r--sc/source/ui/view/viewfun2.cxx35
-rw-r--r--scp2/source/javafilter/registryitem_javafilter.scp8
-rwxr-xr-xscp2/source/ooo/directory_ooo_macosx.scp4
-rw-r--r--scp2/source/sdkoo/sdkoo.scp3
-rwxr-xr-xsd/source/core/drawdoc2.cxx12
-rw-r--r--[-rwxr-xr-x]sdext/source/pdfimport/config/description.xml2
-rw-r--r--sdext/source/pdfimport/inc/treevisitorfactory.hxx2
-rw-r--r--sdext/source/pdfimport/tree/drawtreevisiting.cxx59
-rw-r--r--sdext/source/pdfimport/tree/drawtreevisiting.hxx15
-rw-r--r--sdext/source/pdfimport/tree/pdfiprocessor.cxx415
-rw-r--r--sdext/source/pdfimport/tree/pdfiprocessor.hxx9
-rw-r--r--sdext/source/pdfimport/tree/treevisitorfactory.cxx14
-rw-r--r--set_soenv.in1
-rw-r--r--setup_native/scripts/osx_install_languagepack.applescript2
-rw-r--r--setup_native/scripts/osx_install_patch.applescript2
-rw-r--r--setup_native/source/mac/Info.plist.langpack6
-rw-r--r--setup_native/source/mac/broffice/DS_Storebin12292 -> 12292 bytes
-rw-r--r--setup_native/source/mac/ooo/DS_Storebin12292 -> 12292 bytes
-rw-r--r--setup_native/source/mac/ooo/DS_Store_Langpackbin12292 -> 12292 bytes
-rw-r--r--sfx2/source/inc/workwin.hxx4
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx2
-rw-r--r--sfx2/source/view/viewimp.hxx33
-rw-r--r--sfx2/source/view/viewprn.cxx44
-rw-r--r--sfx2/source/view/viewsh.cxx135
-rwxr-xr-x[-rw-r--r--]solenv/bin/build.pl697
-rwxr-xr-xsolenv/bin/modules/SourceConfig.pm13
-rw-r--r--solenv/bin/modules/installer/simplepackage.pm40
-rw-r--r--solenv/bin/modules/installer/substfilenamefiles.pm5
-rw-r--r--solenv/bin/modules/installer/windows/msiglobal.pm1
-rw-r--r--solenv/bin/modules/installer/windows/property.pm4
-rw-r--r--solenv/inc/minor.mk6
-rw-r--r--starmath/source/cfgitem.cxx80
-rw-r--r--starmath/source/cfgitem.hxx16
-rw-r--r--svl/inc/poolcach.hxx13
-rw-r--r--svl/inc/svl/itempool.hxx8
-rw-r--r--svl/inc/svl/poolitem.hxx5
-rw-r--r--svl/inc/svl/svarray.hxx264
-rw-r--r--svl/inc/svl/svstdarr.hxx36
-rw-r--r--svl/source/inc/poolio.hxx19
-rw-r--r--svl/source/items/itempool.cxx89
-rw-r--r--svl/source/items/poolcach.cxx20
-rw-r--r--svl/source/items/poolio.cxx151
-rw-r--r--svl/source/items/whassert.hxx2
-rw-r--r--svl/source/memtools/svarray.cxx14
-rw-r--r--svtools/inc/svtools/parrtf.hxx4
-rw-r--r--svtools/inc/svtools/syntaxhighlight.hxx5
-rw-r--r--svtools/source/edit/editsyntaxhighlighter.cxx2
-rw-r--r--svtools/source/edit/makefile.mk10
-rw-r--r--svtools/source/edit/syntaxhighlight.cxx5
-rw-r--r--svtools/source/edit/textdata.cxx10
-rw-r--r--svtools/source/svrtf/makefile.mk2
-rw-r--r--svtools/source/svrtf/parrtf.cxx33
-rw-r--r--svx/source/dialog/fntctrl.cxx14
-rw-r--r--svx/source/form/fmshimp.cxx6
-rw-r--r--svx/source/form/fmsrcimp.cxx22
-rw-r--r--svx/source/inc/fmsrcimp.hxx14
-rw-r--r--svx/source/unodraw/UnoNameItemTable.cxx30
-rw-r--r--svx/source/unodraw/UnoNamespaceMap.cxx10
-rw-r--r--svx/source/unodraw/unomtabl.cxx44
-rw-r--r--svx/source/unodraw/unoshape.cxx14
-rw-r--r--svx/source/xoutdev/xattr.cxx66
-rw-r--r--sw/inc/authfld.hxx10
-rw-r--r--sw/inc/calc.hxx10
-rw-r--r--sw/inc/chpfld.hxx13
-rw-r--r--sw/inc/dbfld.hxx18
-rw-r--r--sw/inc/dbmgr.hxx1
-rw-r--r--sw/inc/ddefld.hxx13
-rw-r--r--sw/inc/docufld.hxx27
-rw-r--r--sw/inc/editsh.hxx4
-rw-r--r--sw/inc/expfld.hxx41
-rw-r--r--sw/inc/fldbas.hxx23
-rw-r--r--sw/inc/flddat.hxx12
-rw-r--r--sw/inc/flddropdown.hxx43
-rw-r--r--sw/inc/inetfld.hxx13
-rw-r--r--sw/inc/pagepreviewlayout.hxx3
-rw-r--r--[-rwxr-xr-x]sw/inc/printdata.hxx32
-rw-r--r--sw/inc/reffld.hxx13
-rw-r--r--sw/inc/swprtopt.hxx102
-rw-r--r--sw/inc/txtfld.hxx3
-rw-r--r--sw/inc/unotbl.hxx2
-rw-r--r--[-rwxr-xr-x]sw/inc/unotxdoc.hxx3
-rw-r--r--sw/inc/usrfld.hxx13
-rw-r--r--[-rwxr-xr-x]sw/inc/viewsh.hxx16
-rw-r--r--sw/qa/complex/writer/LoadSaveTest.java254
-rw-r--r--sw/qa/unoapi/knownissues.xcl3
-rw-r--r--sw/source/core/bastyp/calc.cxx78
-rw-r--r--sw/source/core/crsr/callnk.cxx4
-rw-r--r--sw/source/core/crsr/crstrvl.cxx11
-rw-r--r--sw/source/core/crsr/findtxt.cxx3
-rw-r--r--sw/source/core/doc/doc.cxx29
-rw-r--r--sw/source/core/doc/docbasic.cxx4
-rw-r--r--sw/source/core/doc/docbm.cxx4
-rw-r--r--sw/source/core/doc/doccorr.cxx215
-rw-r--r--sw/source/core/doc/docfld.cxx72
-rw-r--r--sw/source/core/doc/docfmt.cxx6
-rw-r--r--sw/source/core/doc/docftn.cxx13
-rw-r--r--sw/source/core/doc/docnew.cxx4
-rw-r--r--sw/source/core/doc/docnum.cxx71
-rw-r--r--sw/source/core/doc/doctxm.cxx4
-rw-r--r--sw/source/core/doc/notxtfrm.cxx4
-rw-r--r--sw/source/core/doc/visiturl.cxx4
-rw-r--r--sw/source/core/docnode/ndtbl.cxx14
-rw-r--r--sw/source/core/docnode/node.cxx4
-rw-r--r--sw/source/core/edit/edattr.cxx2
-rw-r--r--sw/source/core/edit/edfld.cxx9
-rw-r--r--sw/source/core/edit/editsh.cxx26
-rw-r--r--sw/source/core/edit/edtox.cxx19
-rw-r--r--sw/source/core/fields/cellfml.cxx2
-rw-r--r--sw/source/core/fields/dbfld.cxx47
-rw-r--r--sw/source/core/fields/docufld.cxx71
-rw-r--r--sw/source/core/fields/expfld.cxx78
-rw-r--r--sw/source/core/fields/fldbas.cxx36
-rw-r--r--sw/source/core/fields/macrofld.cxx19
-rw-r--r--sw/source/core/fields/reffld.cxx11
-rw-r--r--sw/source/core/fields/tblcalc.cxx48
-rw-r--r--sw/source/core/fields/usrfld.cxx21
-rw-r--r--sw/source/core/frmedt/fecopy.cxx11
-rw-r--r--sw/source/core/frmedt/makefile.mk2
-rw-r--r--sw/source/core/frmedt/tblsel.cxx15
-rw-r--r--sw/source/core/inc/MarkManager.hxx4
-rw-r--r--sw/source/core/inc/cellfrm.hxx7
-rw-r--r--sw/source/core/inc/flyfrm.hxx7
-rw-r--r--sw/source/core/inc/frame.hxx10
-rw-r--r--sw/source/core/inc/layfrm.hxx9
-rw-r--r--sw/source/core/inc/mvsave.hxx24
-rw-r--r--sw/source/core/inc/notxtfrm.hxx7
-rw-r--r--sw/source/core/inc/rootfrm.hxx10
-rw-r--r--sw/source/core/inc/scriptinfo.hxx70
-rw-r--r--sw/source/core/inc/tabfrm.hxx9
-rw-r--r--sw/source/core/inc/txmsrt.hxx22
-rw-r--r--sw/source/core/inc/txtfrm.hxx8
-rw-r--r--sw/source/core/inc/viewimp.hxx13
-rw-r--r--sw/source/core/layout/calcmove.cxx7
-rw-r--r--sw/source/core/layout/frmtool.cxx2
-rw-r--r--sw/source/core/layout/layact.cxx2
-rw-r--r--sw/source/core/layout/laycache.cxx16
-rw-r--r--sw/source/core/layout/layhelp.hxx4
-rw-r--r--sw/source/core/layout/makefile.mk1
-rw-r--r--sw/source/core/layout/pagechg.cxx7
-rw-r--r--sw/source/core/layout/paintfrm.cxx28
-rw-r--r--sw/source/core/layout/trvlfrm.cxx6
-rw-r--r--sw/source/core/layout/unusedf.cxx4
-rw-r--r--sw/source/core/text/frmpaint.cxx6
-rw-r--r--sw/source/core/text/itratr.cxx4
-rw-r--r--sw/source/core/text/porlay.cxx119
-rw-r--r--sw/source/core/text/pormulti.cxx102
-rw-r--r--sw/source/core/text/txtfld.cxx91
-rw-r--r--sw/source/core/tox/txmsrt.cxx25
-rw-r--r--sw/source/core/txtnode/atrfld.cxx5
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx36
-rw-r--r--sw/source/core/txtnode/thints.cxx3
-rw-r--r--sw/source/core/undo/makefile.mk1
-rw-r--r--sw/source/core/undo/rolbck.cxx8
-rw-r--r--sw/source/core/undo/unnum.cxx17
-rw-r--r--sw/source/core/undo/untbl.cxx4
-rw-r--r--sw/source/core/unocore/unofield.cxx15
-rw-r--r--sw/source/core/unocore/unostyle.cxx6
-rw-r--r--sw/source/core/unocore/unotbl.cxx11
-rw-r--r--sw/source/core/view/pagepreviewlayout.cxx6
-rw-r--r--sw/source/core/view/printdata.cxx18
-rw-r--r--sw/source/core/view/vdraw.cxx8
-rw-r--r--sw/source/core/view/viewpg.cxx10
-rw-r--r--[-rwxr-xr-x]sw/source/core/view/vprint.cxx151
-rw-r--r--sw/source/filter/ascii/ascatr.cxx2
-rw-r--r--sw/source/filter/html/htmlatr.cxx16
-rw-r--r--sw/source/filter/html/htmlfldw.cxx2
-rw-r--r--sw/source/filter/html/htmlfly.cxx8
-rw-r--r--sw/source/filter/html/htmlgrin.cxx17
-rw-r--r--sw/source/filter/html/makefile.mk2
-rw-r--r--sw/source/filter/html/swhtml.cxx2
-rw-r--r--sw/source/filter/html/swhtml.hxx4
-rw-r--r--sw/source/filter/rtf/makefile.mk1
-rw-r--r--sw/source/filter/rtf/rtfatr.cxx10
-rw-r--r--sw/source/filter/rtf/rtfnum.cxx29
-rw-r--r--sw/source/filter/rtf/rtftbl.cxx92
-rw-r--r--sw/source/filter/rtf/swparrtf.cxx24
-rw-r--r--sw/source/filter/rtf/swparrtf.hxx11
-rw-r--r--sw/source/filter/rtf/wrtrtf.cxx72
-rw-r--r--sw/source/filter/rtf/wrtrtf.hxx3
-rw-r--r--sw/source/filter/writer/writer.cxx6
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx3
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx10
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx12
-rw-r--r--sw/source/filter/xml/xmlexp.cxx4
-rw-r--r--sw/source/filter/xml/xmlfonte.cxx6
-rw-r--r--sw/source/filter/xml/xmltbli.cxx6
-rw-r--r--[-rwxr-xr-x]sw/source/ui/app/docsh.cxx4
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx14
-rw-r--r--sw/source/ui/chrdlg/makefile.mk3
-rw-r--r--[-rwxr-xr-x]sw/source/ui/config/optpage.cxx26
-rw-r--r--sw/source/ui/config/prtopt.cxx3
-rw-r--r--sw/source/ui/dbui/dbmgr.cxx3
-rw-r--r--sw/source/ui/docvw/AnnotationWin.cxx3
-rw-r--r--sw/source/ui/docvw/SidebarWin.cxx3
-rw-r--r--sw/source/ui/docvw/edtwin2.cxx5
-rw-r--r--sw/source/ui/docvw/srcedtw.cxx40
-rw-r--r--sw/source/ui/fldui/DropDownFieldDialog.cxx12
-rw-r--r--sw/source/ui/fldui/inpdlg.cxx14
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx2
-rw-r--r--sw/source/ui/inc/unotxvw.hxx2
-rw-r--r--sw/source/ui/inc/view.hxx1
-rw-r--r--sw/source/ui/inc/wrtsh.hxx3
-rw-r--r--[-rwxr-xr-x]sw/source/ui/uiview/pview.cxx22
-rw-r--r--sw/source/ui/uiview/view.cxx21
-rw-r--r--sw/source/ui/uiview/viewprt.cxx1
-rw-r--r--sw/source/ui/uno/unomod.cxx2
-rw-r--r--sw/source/ui/uno/unotxdoc.cxx14
-rw-r--r--sw/source/ui/uno/unotxvw.cxx7
-rw-r--r--sw/source/ui/utlui/initui.cxx3
-rw-r--r--sw/source/ui/utlui/uitool.cxx3
-rw-r--r--sw/source/ui/wrtsh/wrtsh2.cxx11
-rwxr-xr-xtestautomation/framework/required/includes/window_functions.inc8
-rw-r--r--unotools/source/ucbhelper/tempfile.cxx14
-rw-r--r--unoxml/source/dom/document.cxx38
-rw-r--r--unoxml/source/dom/document.hxx5
-rw-r--r--unoxml/source/dom/node.cxx16
-rw-r--r--unoxml/source/rdf/librdf_repository.cxx18
-rw-r--r--unoxml/source/xpath/xpathapi.cxx2
-rw-r--r--unoxml/source/xpath/xpathapi.hxx2
-rw-r--r--unoxml/source/xpath/xpathobject.cxx4
-rw-r--r--unoxml/source/xpath/xpathobject.hxx3
-rw-r--r--vcl/aqua/inc/salinst.h3
-rw-r--r--vcl/aqua/source/app/salinst.cxx16
-rwxr-xr-xvcl/aqua/source/app/vclnsapp.mm6
-rw-r--r--vcl/aqua/source/dtrans/DataFlavorMapping.cxx10
-rw-r--r--vcl/aqua/source/window/salframe.cxx25
-rw-r--r--vcl/aqua/source/window/salmenu.cxx7
-rw-r--r--vcl/inc/vcl/arrange.hxx7
-rw-r--r--vcl/inc/vcl/outdev.hxx5
-rw-r--r--vcl/inc/vcl/print.hxx2
-rw-r--r--vcl/inc/vcl/prndlg.hxx2
-rw-r--r--vcl/inc/vcl/salinst.hxx11
-rw-r--r--vcl/inc/vcl/svdata.hxx38
-rw-r--r--vcl/inc/vcl/svids.hrc9
-rw-r--r--vcl/os2/inc/salinst.h5
-rw-r--r--vcl/os2/source/app/salinst.cxx12
-rw-r--r--vcl/os2/source/window/makefile.mk2
-rw-r--r--vcl/os2/source/window/salmenu.cxx132
-rw-r--r--vcl/source/app/dbggui.cxx57
-rw-r--r--vcl/source/app/salvtables.cxx23
-rw-r--r--vcl/source/app/svdata.cxx128
-rw-r--r--vcl/source/components/factory.cxx10
-rw-r--r--vcl/source/components/makefile.mk7
-rw-r--r--vcl/source/components/stringmirror.cxx123
-rwxr-xr-xvcl/source/control/edit.cxx4
-rw-r--r--vcl/source/control/field.cxx41
-rw-r--r--vcl/source/control/fixed.cxx39
-rw-r--r--vcl/source/control/spinfld.cxx5
-rw-r--r--vcl/source/gdi/outdev3.cxx122
-rw-r--r--vcl/source/gdi/print2.cxx29
-rwxr-xr-xvcl/source/gdi/print3.cxx8
-rw-r--r--vcl/source/src/print.src8
-rw-r--r--vcl/source/src/stdtext.src5
-rw-r--r--vcl/source/window/arrange.cxx69
-rw-r--r--vcl/source/window/brdwin.cxx6
-rw-r--r--vcl/source/window/menu.cxx46
-rw-r--r--vcl/source/window/printdlg.cxx76
-rwxr-xr-x[-rw-r--r--]vcl/source/window/window.cxx8
-rw-r--r--vcl/unx/gtk/app/gtkdata.cxx23
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx3
-rw-r--r--vcl/unx/headless/svpinst.cxx31
-rw-r--r--vcl/unx/headless/svpinst.hxx7
-rw-r--r--vcl/unx/inc/plugins/gtk/gtkdata.hxx4
-rw-r--r--vcl/unx/inc/saldisp.hxx3
-rw-r--r--vcl/unx/inc/salinst.h5
-rw-r--r--vcl/unx/inc/wmadaptor.hxx6
-rw-r--r--vcl/unx/source/app/saldisp.cxx5
-rw-r--r--vcl/unx/source/app/salinst.cxx18
-rw-r--r--vcl/unx/source/app/salsys.cxx2
-rw-r--r--vcl/unx/source/app/wmadaptor.cxx58
-rw-r--r--vcl/unx/source/printer/printerinfomanager.cxx2
-rw-r--r--vcl/unx/source/printergfx/printerjob.cxx4
-rw-r--r--vcl/unx/source/window/makefile.mk2
-rw-r--r--vcl/unx/source/window/salmenu.cxx132
-rwxr-xr-x[-rw-r--r--]vcl/win/inc/salinst.h4
-rw-r--r--vcl/win/source/app/salinst.cxx12
-rwxr-xr-x[-rw-r--r--]vcl/win/source/window/salmenu.cxx2
-rw-r--r--writerfilter/source/dmapper/BorderHandler.cxx3
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx2
-rw-r--r--writerfilter/source/dmapper/FontTable.cxx13
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx2
-rw-r--r--writerfilter/source/ooxml/OOXMLFactory.cxx2
-rw-r--r--writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx3
-rw-r--r--xmloff/source/core/SettingsExportHelper.cxx8
-rw-r--r--xmloff/source/core/xmlehelp.cxx2
-rw-r--r--xmloff/source/core/xmlexp.cxx2
-rw-r--r--xmloff/source/core/xmluconv.cxx4
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx12
-rw-r--r--xmloff/source/draw/shapeexport3.cxx4
-rw-r--r--xmloff/source/draw/xexptran.cxx48
-rw-r--r--xmloff/source/style/MarkerStyle.cxx6
-rw-r--r--xmloff/source/style/fonthdl.cxx6
-rw-r--r--xmloff/source/style/xmlnumi.cxx10
-rw-r--r--xmloff/source/text/XMLTextMarkImportContext.cxx5
-rw-r--r--xmloff/source/text/txtparae.cxx2
-rw-r--r--xmloff/source/transform/FormPropOASISTContext.cxx2
-rw-r--r--xmloff/source/transform/PropertyActionsOOo.cxx4
-rw-r--r--xmloff/source/transform/TransformerBase.cxx10
-rw-r--r--xpdf/makefile.mk2
-rw-r--r--xpdf/xpdf-3.02-sec.patch29
362 files changed, 4389 insertions, 3979 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index ce5e8ee53a14..782485b535a2 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -28,8 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_basctl.hxx"
-
-#include <svl/svarray.hxx>
+#include <vector>
#define _BASIC_TEXTPORTIONS
#include <basic/sbdef.hxx>
#include <ide_pch.hxx>
@@ -773,8 +772,8 @@ void EditorWindow::ImpDoHighlight( ULONG nLine )
pEditEngine->RemoveAttribs( nLine, TRUE );
HighlightPortions aPortions;
aHighlighter.getHighlightPortions( nLine, aLine, aPortions );
- USHORT nCount = aPortions.Count();
- for ( USHORT i = 0; i < nCount; i++ )
+
+ for ( size_t i = 0; i < aPortions.size(); i++ )
{
HighlightPortion& r = aPortions[i];
const Color& rColor = ((ModulWindowLayout*)pModulWindow->GetLayoutWindow())->getSyntaxColor(r.tokenType);
diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx
index de9eff56ca24..77e92189507b 100644
--- a/basctl/source/basicide/bastype3.cxx
+++ b/basctl/source/basicide/bastype3.cxx
@@ -42,14 +42,13 @@
#include <basdoc.hxx>
#include <com/sun/star/script/XLibraryContainer.hpp>
#include <com/sun/star/script/XLibraryContainerPassword.hpp>
+#include <deque>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star;
-SV_DECL_VARARR( EntryArray, SvLBoxEntry*, 4, 4 )
-
-SV_IMPL_VARARR( EntryArray, SvLBoxEntry*);
+typedef std::deque< SvLBoxEntry* > EntryArray;
void __EXPORT BasicTreeListBox::RequestingChilds( SvLBoxEntry* pEntry )
@@ -196,7 +195,7 @@ SbxVariable* BasicTreeListBox::FindVariable( SvLBoxEntry* pEntry )
case 2:
case 1:
{
- aEntries.C40_INSERT( SvLBoxEntry, pEntry, 0 );
+ aEntries.push_front( pEntry );
}
break;
case 0:
@@ -210,14 +209,14 @@ SbxVariable* BasicTreeListBox::FindVariable( SvLBoxEntry* pEntry )
SbxVariable* pVar = 0;
bool bDocumentObjects = false;
- if ( aEntries.Count() )
+ if ( !aEntries.empty() )
{
- for ( USHORT n = 0; n < aEntries.Count(); n++ )
+ for ( size_t n = 0; n < aEntries.size(); n++ )
{
SvLBoxEntry* pLE = aEntries[n];
- DBG_ASSERT( pLE, "Entrie im Array nicht gefunden" );
+ DBG_ASSERT( pLE, "Can not find entry in array" );
BasicEntry* pBE = (BasicEntry*)pLE->GetUserData();
- DBG_ASSERT( pBE, "Keine Daten im Eintrag gefunden!" );
+ DBG_ASSERT( pBE, "The data in the entry not found!" );
String aName( GetEntryText( pLE ) );
switch ( pBE->GetType() )
@@ -301,7 +300,7 @@ BasicEntryDescriptor BasicTreeListBox::GetEntryDescriptor( SvLBoxEntry* pEntry )
case 2:
case 1:
{
- aEntries.C40_INSERT( SvLBoxEntry, pEntry, 0 );
+ aEntries.push_front( pEntry );
}
break;
case 0:
@@ -319,9 +318,9 @@ BasicEntryDescriptor BasicTreeListBox::GetEntryDescriptor( SvLBoxEntry* pEntry )
pEntry = GetParent( pEntry );
}
- if ( aEntries.Count() )
+ if ( !aEntries.empty() )
{
- for ( USHORT n = 0; n < aEntries.Count(); n++ )
+ for ( size_t n = 0; n < aEntries.size(); n++ )
{
SvLBoxEntry* pLE = aEntries[n];
DBG_ASSERT( pLE, "Entrie im Array nicht gefunden" );
diff --git a/basic/inc/basic/sbmod.hxx b/basic/inc/basic/sbmod.hxx
index abb482f7bfe5..0bc764e863fe 100644
--- a/basic/inc/basic/sbmod.hxx
+++ b/basic/inc/basic/sbmod.hxx
@@ -35,10 +35,12 @@
#include <rtl/ustring.hxx>
#include <vector>
+#include <deque>
+
class SbMethod;
class SbProperty;
class SbiRuntime;
-class SbiBreakpoints;
+typedef std::deque< USHORT > SbiBreakpoints;
class SbiImage;
class SbProcedureProperty;
class SbIfaceMapperMethod;
@@ -115,8 +117,8 @@ public:
const SbxObject* FindType( String aTypeName ) const;
virtual BOOL IsBreakable( USHORT nLine ) const;
- virtual USHORT GetBPCount() const;
- virtual USHORT GetBP( USHORT n ) const;
+ virtual size_t GetBPCount() const;
+ virtual USHORT GetBP( size_t n ) const;
virtual BOOL IsBP( USHORT nLine ) const;
virtual BOOL SetBP( USHORT nLine );
virtual BOOL ClearBP( USHORT nLine );
diff --git a/basic/inc/basic/sbstar.hxx b/basic/inc/basic/sbstar.hxx
index a234dc206ec7..7d189c363364 100644
--- a/basic/inc/basic/sbstar.hxx
+++ b/basic/inc/basic/sbstar.hxx
@@ -44,7 +44,6 @@ class SbiInstance; // runtime instance
class SbiRuntime; // currently running procedure
class SbiImage; // compiled image
class BasicLibInfo; // info block for basic manager
-class SbiBreakpoints;
class SbTextPortions;
class SbMethod;
class BasicManager;
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 8b1069bbeab3..e70f38bbeaed 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -444,11 +444,7 @@ TYPEINIT1(SbJScriptMethod,SbMethod)
TYPEINIT1(SbObjModule,SbModule)
TYPEINIT1(SbUserFormModule,SbObjModule)
-SV_DECL_VARARR(SbiBreakpoints,USHORT,4,4)
-SV_IMPL_VARARR(SbiBreakpoints,USHORT)
-
-
-SV_IMPL_VARARR(HighlightPortions, HighlightPortion)
+typedef std::vector<HighlightPortion> HighlightPortions;
bool getDefaultVBAMode( StarBASIC* pb )
{
@@ -1478,15 +1474,15 @@ BOOL SbModule::IsBreakable( USHORT nLine ) const
return FALSE;
}
-USHORT SbModule::GetBPCount() const
+size_t SbModule::GetBPCount() const
{
- return pBreaks ? pBreaks->Count() : 0;
+ return pBreaks ? pBreaks->size() : 0;
}
-USHORT SbModule::GetBP( USHORT n ) const
+USHORT SbModule::GetBP( size_t n ) const
{
- if( pBreaks && n < pBreaks->Count() )
- return pBreaks->GetObject( n );
+ if( pBreaks && n < pBreaks->size() )
+ return pBreaks->operator[]( n );
else
return 0;
}
@@ -1495,11 +1491,9 @@ BOOL SbModule::IsBP( USHORT nLine ) const
{
if( pBreaks )
{
- const USHORT* p = pBreaks->GetData();
- USHORT n = pBreaks->Count();
- for( USHORT i = 0; i < n; i++, p++ )
+ for( size_t i = 0; i < pBreaks->size(); i++ )
{
- USHORT b = *p;
+ USHORT b = pBreaks->operator[]( i );
if( b == nLine )
return TRUE;
if( b < nLine )
@@ -1515,18 +1509,16 @@ BOOL SbModule::SetBP( USHORT nLine )
return FALSE;
if( !pBreaks )
pBreaks = new SbiBreakpoints;
- const USHORT* p = pBreaks->GetData();
- USHORT n = pBreaks->Count();
- USHORT i;
- for( i = 0; i < n; i++, p++ )
+ size_t i;
+ for( i = 0; i < pBreaks->size(); i++ )
{
- USHORT b = *p;
+ USHORT b = pBreaks->operator[]( i );
if( b == nLine )
return TRUE;
if( b < nLine )
break;
}
- pBreaks->Insert( &nLine, 1, i );
+ pBreaks->insert( pBreaks->begin() + i, nLine );
// #38568: Zur Laufzeit auch hier SbDEBUG_BREAK setzen
if( pINST && pINST->pRun )
@@ -1540,19 +1532,19 @@ BOOL SbModule::ClearBP( USHORT nLine )
BOOL bRes = FALSE;
if( pBreaks )
{
- const USHORT* p = pBreaks->GetData();
- USHORT n = pBreaks->Count();
- for( USHORT i = 0; i < n; i++, p++ )
+ for( size_t i = 0; i < pBreaks->size(); i++ )
{
- USHORT b = *p;
+ USHORT b = pBreaks->operator[]( i );
if( b == nLine )
{
- pBreaks->Remove( i, 1 ); bRes = TRUE; break;
+ pBreaks->erase( pBreaks->begin() + i );
+ bRes = TRUE;
+ break;
}
if( b < nLine )
break;
}
- if( !pBreaks->Count() )
+ if( pBreaks->empty() )
delete pBreaks, pBreaks = NULL;
}
return bRes;
@@ -1560,7 +1552,8 @@ BOOL SbModule::ClearBP( USHORT nLine )
void SbModule::ClearAllBP()
{
- delete pBreaks; pBreaks = NULL;
+ delete pBreaks;
+ pBreaks = NULL;
}
void
@@ -1588,7 +1581,7 @@ BOOL SbModule::LoadData( SvStream& rStrm, USHORT nVer )
Clear();
if( !SbxObject::LoadData( rStrm, 1 ) )
return FALSE;
- // Sicherheitshalber...
+ // Precaution...
SetFlag( SBX_EXTSEARCH | SBX_GBLSEARCH );
BYTE bImage;
rStrm >> bImage;
diff --git a/configure.in b/configure.in
index 587d21a7521c..df50904f7157 100644
--- a/configure.in
+++ b/configure.in
@@ -5078,6 +5078,7 @@ else
SYSTEM_REDLAND=NO
fi
AC_SUBST(SYSTEM_REDLAND)
+AC_SUBST(REDLAND_CFLAGS)
AC_SUBST(REDLAND_LIBS)
dnl ===================================================================
diff --git a/connectivity/source/parse/sqlbison.y b/connectivity/source/parse/sqlbison.y
index 84e9aa2532ff..9709d33fdf76 100644
--- a/connectivity/source/parse/sqlbison.y
+++ b/connectivity/source/parse/sqlbison.y
@@ -2627,7 +2627,7 @@ value_exp_commalist:
}
;
function_arg:
- value_exp
+ result
| value_exp comparison value_exp
{
$$ = SQL_NEW_RULE;
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index 5de2c497c031..a2a324f11469 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -200,7 +200,8 @@ void OKeySet::initColumns()
void OKeySet::findTableColumnsMatching_throw( const Any& i_aTable,
const ::rtl::OUString& i_rUpdateTableName,
const Reference<XDatabaseMetaData>& i_xMeta,
- const Reference<XNameAccess>& i_xQueryColumns)
+ const Reference<XNameAccess>& i_xQueryColumns,
+ ::std::auto_ptr<SelectColumnsMetaData>& o_pKeyColumnNames)
{
// first ask the database itself for the best columns which can be used
Sequence< ::rtl::OUString> aBestColumnNames;
@@ -242,17 +243,17 @@ void OKeySet::findTableColumnsMatching_throw( const Any& i_aTable,
sUpdateTableName = dbtools::composeTableName( i_xMeta, sCatalog, sSchema, sTable, sal_False, ::dbtools::eInDataManipulation );
}
- ::dbaccess::getColumnPositions(i_xQueryColumns,aBestColumnNames,sUpdateTableName,(*m_pKeyColumnNames),true);
+ ::dbaccess::getColumnPositions(i_xQueryColumns,aBestColumnNames,sUpdateTableName,(*o_pKeyColumnNames),true);
::dbaccess::getColumnPositions(i_xQueryColumns,xTblColumns->getElementNames(),sUpdateTableName,(*m_pColumnNames),true);
::dbaccess::getColumnPositions(i_xQueryColumns,aParameterColumns,sUpdateTableName,(*m_pParameterNames),true);
- if ( m_pKeyColumnNames->empty() )
+ if ( o_pKeyColumnNames->empty() )
{
::dbtools::throwGenericSQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Could not find any key column." ) ), *this );
}
- for ( SelectColumnsMetaData::const_iterator keyColumn = m_pKeyColumnNames->begin();
- keyColumn != m_pKeyColumnNames->end();
+ for ( SelectColumnsMetaData::const_iterator keyColumn = o_pKeyColumnNames->begin();
+ keyColumn != o_pKeyColumnNames->end();
++keyColumn
)
{
@@ -298,7 +299,7 @@ void OKeySet::construct(const Reference< XResultSet>& _xDriverSet,const ::rtl::O
Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData();
Reference<XColumnsSupplier> xQueryColSup(m_xComposer,UNO_QUERY);
const Reference<XNameAccess> xQueryColumns = xQueryColSup->getColumns();
- findTableColumnsMatching_throw(makeAny(m_xTable),m_sUpdateTableName,xMeta,xQueryColumns);
+ findTableColumnsMatching_throw(makeAny(m_xTable),m_sUpdateTableName,xMeta,xQueryColumns,m_pKeyColumnNames);
// the first row is empty because it's now easier for us to distinguish when we are beforefirst or first
// without extra varaible to be set
diff --git a/dbaccess/source/core/api/KeySet.hxx b/dbaccess/source/core/api/KeySet.hxx
index 1266c271040a..ecb56d7c88b4 100644
--- a/dbaccess/source/core/api/KeySet.hxx
+++ b/dbaccess/source/core/api/KeySet.hxx
@@ -145,7 +145,8 @@ namespace dbaccess
void findTableColumnsMatching_throw( const ::com::sun::star::uno::Any& i_aTable,
const ::rtl::OUString& i_rUpdateTableName,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData>& i_xMeta,
- const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& i_xQueryColumns);
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& i_xQueryColumns,
+ ::std::auto_ptr<SelectColumnsMetaData>& o_pKeyColumnNames);
::rtl::OUStringBuffer createKeyFilter();
void tryRefetch(const ORowSetRow& _rInsertRow,bool bRefetch);
void executeUpdate(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOrginalRow,const ::rtl::OUString& i_sSQL,const ::rtl::OUString& i_sTableName,const ::std::vector<sal_Int32>& _aIndexColumnPositions = ::std::vector<sal_Int32>());
diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx
index 99bbc17f1f0f..837824751f0f 100644
--- a/dbaccess/source/core/api/OptimisticSet.cxx
+++ b/dbaccess/source/core/api/OptimisticSet.cxx
@@ -124,6 +124,7 @@ void OptimisticSet::construct(const Reference< XResultSet>& _xDriverSet,const ::
initColumns();
Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData();
+ bool bCase = (xMeta.is() && xMeta->storesMixedCaseQuotedIdentifiers()) ? true : false;
Reference<XColumnsSupplier> xQueryColSup(m_xComposer,UNO_QUERY);
const Reference<XNameAccess> xQueryColumns = xQueryColSup->getColumns();
const Reference<XTablesSupplier> xTabSup(m_xComposer,UNO_QUERY);
@@ -133,7 +134,9 @@ void OptimisticSet::construct(const Reference< XResultSet>& _xDriverSet,const ::
const ::rtl::OUString* pTableNameEnd = pTableNameIter + aTableNames.getLength();
for( ; pTableNameIter != pTableNameEnd ; ++pTableNameIter)
{
- findTableColumnsMatching_throw(xTables->getByName(*pTableNameIter),*pTableNameIter,xMeta,xQueryColumns);
+ ::std::auto_ptr<SelectColumnsMetaData> pKeyColumNames(new SelectColumnsMetaData(bCase));
+ findTableColumnsMatching_throw(xTables->getByName(*pTableNameIter),*pTableNameIter,xMeta,xQueryColumns,pKeyColumNames);
+ m_pKeyColumnNames->insert(pKeyColumNames->begin(),pKeyColumNames->end());
}
// the first row is empty because it's now easier for us to distinguish when we are beforefirst or first
diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx
index be9984938e01..e4e468b13779 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -188,7 +188,7 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
}
catch(const Exception&)
{
- DBG_UNHANDLED_EXCEPTION();
+ // DBG_UNHANDLED_EXCEPTION();
}
m_pCacheSet = NULL;
m_xCacheSet.clear();
diff --git a/default_images/oracleirm/res/irmprotecteditem.bmp b/default_images/oracleirm/res/irmprotecteditem.bmp
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/default_images/oracleirm/res/irmprotecteditem.bmp
+++ /dev/null
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 1b3eb1aa5a4a..d80aa37fdece 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -785,7 +785,6 @@ BOOL Desktop::QueryExit()
{
RTL_LOGFILE_CONTEXT_TRACE( aLog, "<- store config items" );
utl::ConfigManager::GetConfigManager()->StoreConfigItems();
- FlushConfiguration();
RTL_LOGFILE_CONTEXT_TRACE( aLog, "<- store config items" );
}
catch ( RuntimeException& )
@@ -817,6 +816,7 @@ BOOL Desktop::QueryExit()
}
else
{
+ FlushConfiguration();
try
{
// it is no problem to call DisableOfficeIPCThread() more than once
diff --git a/editeng/inc/editeng/svxrtf.hxx b/editeng/inc/editeng/svxrtf.hxx
index 25d20fe0fdcd..f1214f1283a6 100644
--- a/editeng/inc/editeng/svxrtf.hxx
+++ b/editeng/inc/editeng/svxrtf.hxx
@@ -37,6 +37,8 @@
#include <svl/svstdarr.hxx>
#include <editeng/editengdllapi.h>
+#include <deque>
+
class Font;
class Color;
class Graphic;
@@ -82,12 +84,15 @@ public:
typedef Color* ColorPtr;
-SV_DECL_PTRARR( SvxRTFColorTbl, ColorPtr, 16, 4 )
+typedef std::deque< ColorPtr > SvxRTFColorTbl;
DECLARE_TABLE( SvxRTFFontTbl, Font* )
DECLARE_TABLE( SvxRTFStyleTbl, SvxRTFStyleType* )
typedef SvxRTFItemStackType* SvxRTFItemStackTypePtr;
SV_DECL_PTRARR_DEL( SvxRTFItemStackList, SvxRTFItemStackTypePtr, 1, 1 )
-SV_DECL_PTRARR_STACK( SvxRTFItemStack, SvxRTFItemStackTypePtr, 0, 1 )
+
+// SvxRTFItemStack can't be "std::stack< SvxRTFItemStackTypePtr >" type, because
+// the methods are using operator[] in sw/source/filter/rtf/rtftbl.cxx file
+typedef std::deque< SvxRTFItemStackTypePtr > SvxRTFItemStack;
// einige Hilfsklassen fuer den RTF-Parser
struct SvxRTFStyleType
@@ -376,7 +381,7 @@ public:
virtual SvParserState CallParser(); // Aufruf des Parsers
- inline const Color& GetColor( USHORT nId ) const;
+ inline const Color& GetColor( size_t nId ) const;
const Font& GetFont( USHORT nId ); // aendert den dflt Font
virtual int IsEndPara( SvxNodeIdx* pNd, xub_StrLen nCnt ) const = 0;
@@ -451,12 +456,12 @@ public:
};
-// ----------- Inline Implementierungen --------------
+// ----------- Inline Implementations --------------
-inline const Color& SvxRTFParser::GetColor( USHORT nId ) const
+inline const Color& SvxRTFParser::GetColor( size_t nId ) const
{
ColorPtr pColor = (ColorPtr)pDfltColor;
- if( nId < aColorTbl.Count() )
+ if( nId < aColorTbl.size() )
pColor = aColorTbl[ nId ];
return *pColor;
}
@@ -464,7 +469,7 @@ inline const Color& SvxRTFParser::GetColor( USHORT nId ) const
inline SfxItemSet& SvxRTFParser::GetAttrSet()
{
SvxRTFItemStackTypePtr pTmp;
- if( bNewGroup || 0 == ( pTmp = aAttrStack.Top()) )
+ if( bNewGroup || 0 == ( pTmp = aAttrStack.back()) )
pTmp = _GetAttrSet();
return pTmp->aAttrSet;
}
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index 9ac179a2a47f..a8b9efd1fff7 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -255,10 +255,6 @@ USHORT aV5Map[] = {
};
SV_IMPL_PTRARR( DummyContentList, ContentNode* );
-SV_IMPL_VARARR( ScriptTypePosInfos, ScriptTypePosInfo );
-SV_IMPL_VARARR( WritingDirectionInfos, WritingDirectionInfo );
-// SV_IMPL_VARARR( ExtraCharInfos, ExtraCharInfo );
-
int SAL_CALL CompareStart( const void* pFirst, const void* pSecond )
{
diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx
index bf2e3d01852b..16b4da6f8429 100644
--- a/editeng/source/editeng/editdoc.hxx
+++ b/editeng/source/editeng/editdoc.hxx
@@ -40,6 +40,8 @@
#include <svl/itempool.hxx>
#include <tools/table.hxx>
+#include <deque>
+
class ImpEditEngine;
class SvxTabStop;
class SvtCTLOptions;
@@ -96,7 +98,7 @@ struct ScriptTypePosInfo
}
};
-SV_DECL_VARARR( ScriptTypePosInfos, ScriptTypePosInfo, 0, 4 )
+typedef std::deque< ScriptTypePosInfo > ScriptTypePosInfos;
struct WritingDirectionInfo
{
@@ -112,7 +114,8 @@ struct WritingDirectionInfo
}
};
-SV_DECL_VARARR( WritingDirectionInfos, WritingDirectionInfo, 0, 4 )
+
+typedef std::deque< WritingDirectionInfo > WritingDirectionInfos;
typedef EditCharAttrib* EditCharAttribPtr;
SV_DECL_PTRARR( CharAttribArray, EditCharAttribPtr, 0, 4 )
diff --git a/editeng/source/editeng/editdoc2.cxx b/editeng/source/editeng/editdoc2.cxx
index b2a83ffd6274..3610423ba3c0 100644
--- a/editeng/source/editeng/editdoc2.cxx
+++ b/editeng/source/editeng/editdoc2.cxx
@@ -238,9 +238,8 @@ void ParaPortion::MarkInvalid( USHORT nStart, short nDiff )
}
}
bInvalid = TRUE;
- aScriptInfos.Remove( 0, aScriptInfos.Count() );
- aWritingDirectionInfos.Remove( 0, aWritingDirectionInfos.Count() );
-// aExtraCharInfos.Remove( 0, aExtraCharInfos.Count() );
+ aScriptInfos.clear();
+ aWritingDirectionInfos.clear();
}
void ParaPortion::MarkSelectionInvalid( USHORT nStart, USHORT /* nEnd */ )
@@ -258,9 +257,8 @@ void ParaPortion::MarkSelectionInvalid( USHORT nStart, USHORT /* nEnd */ )
nInvalidDiff = 0;
bInvalid = TRUE;
bSimple = FALSE;
- aScriptInfos.Remove( 0, aScriptInfos.Count() );
- aWritingDirectionInfos.Remove( 0, aWritingDirectionInfos.Count() );
-// aExtraCharInfos.Remove( 0, aExtraCharInfos.Count() );
+ aScriptInfos.clear();
+ aWritingDirectionInfos.clear();
}
USHORT ParaPortion::GetLineNumber( USHORT nIndex )
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 148ca08816ae..fe20464eb905 100755
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -1719,9 +1719,7 @@ void ImpEditEngine::InitScriptTypes( USHORT nPara )
{
ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara );
ScriptTypePosInfos& rTypes = pParaPortion->aScriptInfos;
- rTypes.Remove( 0, rTypes.Count() );
-
-// pParaPortion->aExtraCharInfos.Remove( 0, pParaPortion->aExtraCharInfos.Count() );
+ rTypes.clear();
ContentNode* pNode = pParaPortion->GetNode();
if ( pNode->Len() )
@@ -1770,19 +1768,19 @@ void ImpEditEngine::InitScriptTypes( USHORT nPara )
sal_Int32 nPos = 0;
short nScriptType = _xBI->getScriptType( aOUText, nPos );
- rTypes.Insert( ScriptTypePosInfo( nScriptType, (USHORT)nPos, nTextLen ), rTypes.Count() );
+ rTypes.push_back( ScriptTypePosInfo( nScriptType, (USHORT)nPos, nTextLen ) );
nPos = _xBI->endOfScript( aOUText, nPos, nScriptType );
while ( ( nPos != (-1) ) && ( nPos < nTextLen ) )
{
- rTypes[rTypes.Count()-1].nEndPos = (USHORT)nPos;
+ rTypes.back().nEndPos = (USHORT)nPos;
nScriptType = _xBI->getScriptType( aOUText, nPos );
long nEndPos = _xBI->endOfScript( aOUText, nPos, nScriptType );
- if ( ( nScriptType == i18n::ScriptType::WEAK ) || ( nScriptType == rTypes[rTypes.Count()-1].nScriptType ) )
+ if ( ( nScriptType == i18n::ScriptType::WEAK ) || ( nScriptType == rTypes.back().nScriptType ) )
{
// Expand last ScriptTypePosInfo, don't create weak or unecessary portions
- rTypes[rTypes.Count()-1].nEndPos = (USHORT)nEndPos;
+ rTypes.back().nEndPos = (USHORT)nEndPos;
}
else
{
@@ -1793,26 +1791,26 @@ void ImpEditEngine::InitScriptTypes( USHORT nPara )
case U_ENCLOSING_MARK:
case U_COMBINING_SPACING_MARK:
--nPos;
- rTypes[rTypes.Count()-1].nEndPos--;
+ rTypes.back().nEndPos--;
break;
}
}
- rTypes.Insert( ScriptTypePosInfo( nScriptType, (USHORT)nPos, nTextLen ), rTypes.Count() );
+ rTypes.push_back( ScriptTypePosInfo( nScriptType, (USHORT)nPos, nTextLen ) );
}
nPos = nEndPos;
}
if ( rTypes[0].nScriptType == i18n::ScriptType::WEAK )
- rTypes[0].nScriptType = ( rTypes.Count() > 1 ) ? rTypes[1].nScriptType : GetI18NScriptTypeOfLanguage( GetDefaultLanguage() );
+ rTypes[0].nScriptType = ( rTypes.size() > 1 ) ? rTypes[1].nScriptType : GetI18NScriptTypeOfLanguage( GetDefaultLanguage() );
// create writing direction information:
- if ( !pParaPortion->aWritingDirectionInfos.Count() )
+ if ( pParaPortion->aWritingDirectionInfos.empty() )
InitWritingDirections( nPara );
// i89825: Use CTL font for numbers embedded into an RTL run:
WritingDirectionInfos& rDirInfos = pParaPortion->aWritingDirectionInfos;
- for ( USHORT n = 0; n < rDirInfos.Count(); ++n )
+ for ( size_t n = 0; n < rDirInfos.size(); ++n )
{
const xub_StrLen nStart = rDirInfos[n].nStartPos;
const xub_StrLen nEnd = rDirInfos[n].nEndPos;
@@ -1821,30 +1819,30 @@ void ImpEditEngine::InitScriptTypes( USHORT nPara )
if ( nCurrDirType % 2 == UBIDI_RTL || // text in RTL run
( nCurrDirType > UBIDI_LTR && !lcl_HasStrongLTR( aText, nStart, nEnd ) ) ) // non-strong text in embedded LTR run
{
- USHORT nIdx = 0;
+ size_t nIdx = 0;
// Skip entries in ScriptArray which are not inside the RTL run:
- while ( nIdx < rTypes.Count() && rTypes[nIdx].nStartPos < nStart )
+ while ( nIdx < rTypes.size() && rTypes[nIdx].nStartPos < nStart )
++nIdx;
// Remove any entries *inside* the current run:
- while ( nIdx < rTypes.Count() && rTypes[nIdx].nEndPos <= nEnd )
- rTypes.Remove( nIdx );
+ while ( nIdx < rTypes.size() && rTypes[nIdx].nEndPos <= nEnd )
+ rTypes.erase( rTypes.begin()+nIdx );
// special case:
- if(nIdx < rTypes.Count() && rTypes[nIdx].nStartPos < nStart && rTypes[nIdx].nEndPos > nEnd)
+ if(nIdx < rTypes.size() && rTypes[nIdx].nStartPos < nStart && rTypes[nIdx].nEndPos > nEnd)
{
- rTypes.Insert( ScriptTypePosInfo( rTypes[nIdx].nScriptType, (USHORT)nEnd, rTypes[nIdx].nEndPos ), nIdx );
+ rTypes.insert( rTypes.begin()+nIdx, ScriptTypePosInfo( rTypes[nIdx].nScriptType, (USHORT)nEnd, rTypes[nIdx].nEndPos ) );
rTypes[nIdx].nEndPos = nStart;
}
if( nIdx )
rTypes[nIdx - 1].nEndPos = nStart;
- rTypes.Insert( ScriptTypePosInfo( i18n::ScriptType::COMPLEX, (USHORT)nStart, (USHORT)nEnd), nIdx );
+ rTypes.insert( rTypes.begin()+nIdx, ScriptTypePosInfo( i18n::ScriptType::COMPLEX, (USHORT)nStart, (USHORT)nEnd) );
++nIdx;
- if( nIdx < rTypes.Count() )
+ if( nIdx < rTypes.size() )
rTypes[nIdx].nStartPos = nEnd;
}
}
@@ -1853,7 +1851,7 @@ void ImpEditEngine::InitScriptTypes( USHORT nPara )
USHORT nDebugStt = 0;
USHORT nDebugEnd = 0;
short nDebugType = 0;
- for ( USHORT n = 0; n < rTypes.Count(); ++n )
+ for ( size_t n = 0; n < rTypes.size(); ++n )
{
nDebugStt = rTypes[n].nStartPos;
nDebugEnd = rTypes[n].nEndPos;
@@ -1874,12 +1872,12 @@ USHORT ImpEditEngine::GetScriptType( const EditPaM& rPaM, USHORT* pEndPos ) cons
{
USHORT nPara = GetEditDoc().GetPos( rPaM.GetNode() );
ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara );
- if ( !pParaPortion->aScriptInfos.Count() )
+ if ( pParaPortion->aScriptInfos.empty() )
((ImpEditEngine*)this)->InitScriptTypes( nPara );
ScriptTypePosInfos& rTypes = pParaPortion->aScriptInfos;
USHORT nPos = rPaM.GetIndex();
- for ( USHORT n = 0; n < rTypes.Count(); n++ )
+ for ( size_t n = 0; n < rTypes.size(); n++ )
{
if ( ( rTypes[n].nStartPos <= nPos ) && ( rTypes[n].nEndPos >= nPos ) )
{
@@ -1906,7 +1904,7 @@ USHORT ImpEditEngine::GetScriptType( const EditSelection& rSel ) const
for ( USHORT nPara = nStartPara; nPara <= nEndPara; nPara++ )
{
ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara );
- if ( !pParaPortion->aScriptInfos.Count() )
+ if ( pParaPortion->aScriptInfos.empty() )
((ImpEditEngine*)this)->InitScriptTypes( nPara );
ScriptTypePosInfos& rTypes = pParaPortion->aScriptInfos;
@@ -1916,7 +1914,7 @@ USHORT ImpEditEngine::GetScriptType( const EditSelection& rSel ) const
// well as with just moving the cursor from char to char.
USHORT nS = ( nPara == nStartPara ) ? aSel.Min().GetIndex() : 0;
USHORT nE = ( nPara == nEndPara ) ? aSel.Max().GetIndex() : pParaPortion->GetNode()->Len();
- for ( USHORT n = 0; n < rTypes.Count(); n++ )
+ for ( size_t n = 0; n < rTypes.size(); n++ )
{
if (rTypes[n].nStartPos <= nS && nE <= rTypes[n].nEndPos)
{
@@ -1947,12 +1945,12 @@ BOOL ImpEditEngine::IsScriptChange( const EditPaM& rPaM ) const
{
USHORT nPara = GetEditDoc().GetPos( rPaM.GetNode() );
ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara );
- if ( !pParaPortion->aScriptInfos.Count() )
+ if ( pParaPortion->aScriptInfos.empty() )
((ImpEditEngine*)this)->InitScriptTypes( nPara );
ScriptTypePosInfos& rTypes = pParaPortion->aScriptInfos;
USHORT nPos = rPaM.GetIndex();
- for ( USHORT n = 0; n < rTypes.Count(); n++ )
+ for ( size_t n = 0; n < rTypes.size(); n++ )
{
if ( rTypes[n].nStartPos == nPos )
{
@@ -1969,11 +1967,11 @@ BOOL ImpEditEngine::HasScriptType( USHORT nPara, USHORT nType ) const
BOOL bTypeFound = FALSE;
ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara );
- if ( !pParaPortion->aScriptInfos.Count() )
+ if ( pParaPortion->aScriptInfos.empty() )
((ImpEditEngine*)this)->InitScriptTypes( nPara );
ScriptTypePosInfos& rTypes = pParaPortion->aScriptInfos;
- for ( USHORT n = rTypes.Count(); n && !bTypeFound; )
+ for ( size_t n = rTypes.size(); n && !bTypeFound; )
{
if ( rTypes[--n].nScriptType == nType )
bTypeFound = TRUE;
@@ -1985,11 +1983,11 @@ void ImpEditEngine::InitWritingDirections( USHORT nPara )
{
ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara );
WritingDirectionInfos& rInfos = pParaPortion->aWritingDirectionInfos;
- rInfos.Remove( 0, rInfos.Count() );
+ rInfos.clear();
BOOL bCTL = FALSE;
ScriptTypePosInfos& rTypes = pParaPortion->aScriptInfos;
- for ( USHORT n = 0; n < rTypes.Count(); n++ )
+ for ( size_t n = 0; n < rTypes.size(); n++ )
{
if ( rTypes[n].nScriptType == i18n::ScriptType::COMPLEX )
{
@@ -2014,16 +2012,16 @@ void ImpEditEngine::InitWritingDirections( USHORT nPara )
ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(aText.GetBuffer()), aText.Len(), nBidiLevel, NULL, &nError ); // UChar != sal_Unicode in MinGW
nError = U_ZERO_ERROR;
- long nCount = ubidi_countRuns( pBidi, &nError );
+ size_t nCount = ubidi_countRuns( pBidi, &nError );
int32_t nStart = 0;
int32_t nEnd;
UBiDiLevel nCurrDir;
- for ( USHORT nIdx = 0; nIdx < nCount; ++nIdx )
+ for ( size_t nIdx = 0; nIdx < nCount; ++nIdx )
{
ubidi_getLogicalRun( pBidi, nStart, &nEnd, &nCurrDir );
- rInfos.Insert( WritingDirectionInfo( nCurrDir, (USHORT)nStart, (USHORT)nEnd ), rInfos.Count() );
+ rInfos.push_back( WritingDirectionInfo( nCurrDir, (USHORT)nStart, (USHORT)nEnd ) );
nStart = nEnd;
}
@@ -2031,8 +2029,8 @@ void ImpEditEngine::InitWritingDirections( USHORT nPara )
}
// No infos mean no CTL and default dir is L2R...
- if ( !rInfos.Count() )
- rInfos.Insert( WritingDirectionInfo( 0, 0, (USHORT)pParaPortion->GetNode()->Len() ), rInfos.Count() );
+ if ( rInfos.empty() )
+ rInfos.push_back( WritingDirectionInfo( 0, 0, (USHORT)pParaPortion->GetNode()->Len() ) );
}
@@ -2096,12 +2094,12 @@ BYTE ImpEditEngine::GetRightToLeft( USHORT nPara, USHORT nPos, USHORT* pStart, U
if ( pNode && pNode->Len() )
{
ParaPortion* pParaPortion = GetParaPortions().SaveGetObject( nPara );
- if ( !pParaPortion->aWritingDirectionInfos.Count() )
+ if ( pParaPortion->aWritingDirectionInfos.empty() )
InitWritingDirections( nPara );
// BYTE nType = 0;
WritingDirectionInfos& rDirInfos = pParaPortion->aWritingDirectionInfos;
- for ( USHORT n = 0; n < rDirInfos.Count(); n++ )
+ for ( size_t n = 0; n < rDirInfos.size(); n++ )
{
if ( ( rDirInfos[n].nStartPos <= nPos ) && ( rDirInfos[n].nEndPos >= nPos ) )
{
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 08f50a0da884..14f3f35c66b1 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -2294,15 +2294,15 @@ void ImpEditEngine::CreateTextPortions( ParaPortion* pParaPortion, sal_uInt16& r
}
aPositions.Insert( pNode->Len() );
- if ( !pParaPortion->aScriptInfos.Count() )
+ if ( pParaPortion->aScriptInfos.empty() )
((ImpEditEngine*)this)->InitScriptTypes( GetParaPortions().GetPos( pParaPortion ) );
const ScriptTypePosInfos& rTypes = pParaPortion->aScriptInfos;
- for ( USHORT nT = 0; nT < rTypes.Count(); nT++ )
+ for ( size_t nT = 0; nT < rTypes.size(); nT++ )
aPositions.Insert( rTypes[nT].nStartPos );
const WritingDirectionInfos& rWritingDirections = pParaPortion->aWritingDirectionInfos;
- for ( USHORT nD = 0; nD < rWritingDirections.Count(); nD++ )
+ for ( size_t nD = 0; nD < rWritingDirections.size(); nD++ )
aPositions.Insert( rWritingDirections[nD].nStartPos );
if ( mpIMEInfos && mpIMEInfos->nLen && mpIMEInfos->pAttribs && ( mpIMEInfos->aPos.GetNode() == pNode ) )
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 46a0668394f2..b5225751a8cb 100755
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -397,8 +397,8 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel )
else if ( nScriptType == 2 )
nWhich = EE_CHAR_FONTINFO_CTL;
- sal_uInt16 i = 0;
- SvxFontItem* pFontItem = (SvxFontItem*)aEditDoc.GetItemPool().GetItem( nWhich, i );
+ sal_uInt32 i = 0;
+ SvxFontItem* pFontItem = (SvxFontItem*)aEditDoc.GetItemPool().GetItem2( nWhich, i );
while ( pFontItem )
{
bool bAlreadyExist = false;
@@ -411,7 +411,7 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel )
if ( !bAlreadyExist )
aFontTable.Insert( aFontTable.Count(), new SvxFontItem( *pFontItem ) );
- pFontItem = (SvxFontItem*)aEditDoc.GetItemPool().GetItem( nWhich, ++i );
+ pFontItem = (SvxFontItem*)aEditDoc.GetItemPool().GetItem2( nWhich, ++i );
}
}
@@ -467,17 +467,17 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel )
// ColorList rausschreiben...
SvxColorList aColorList;
- sal_uInt16 i = 0;
- SvxColorItem* pColorItem = (SvxColorItem*)aEditDoc.GetItemPool().GetItem( EE_CHAR_COLOR, i );
+ sal_uInt32 i = 0;
+ SvxColorItem* pColorItem = (SvxColorItem*)aEditDoc.GetItemPool().GetItem2( EE_CHAR_COLOR, i );
while ( pColorItem )
{
- USHORT nPos = i;
+ sal_uInt32 nPos = i;
if ( pColorItem->GetValue() == COL_AUTO )
nPos = 0;
aColorList.Insert( new SvxColorItem( *pColorItem ), nPos );
- pColorItem = (SvxColorItem*)aEditDoc.GetItemPool().GetItem( EE_CHAR_COLOR, ++i );
+ pColorItem = (SvxColorItem*)aEditDoc.GetItemPool().GetItem2( EE_CHAR_COLOR, ++i );
}
- aColorList.Insert( new SvxColorItem( (const SvxColorItem&)aEditDoc.GetItemPool().GetDefaultItem( EE_CHAR_COLOR) ), (sal_uInt32)i );
+ aColorList.Insert( new SvxColorItem( (const SvxColorItem&)aEditDoc.GetItemPool().GetDefaultItem( EE_CHAR_COLOR) ), i );
rOutput << '{' << OOO_STRING_SVTOOLS_RTF_COLORTBL;
for ( j = 0; j < aColorList.Count(); j++ )
diff --git a/editeng/source/misc/txtrange.cxx b/editeng/source/misc/txtrange.cxx
index 61e4a5253ced..a69fd59439c2 100644
--- a/editeng/source/misc/txtrange.cxx
+++ b/editeng/source/misc/txtrange.cxx
@@ -196,7 +196,7 @@ public:
SvxBoundArgs::SvxBoundArgs( TextRanger* pRanger, SvLongs *pLong,
const Range& rRange )
- : aBoolArr( 4, 4 ), pLongArr( pLong ), pTextRanger( pRanger ),
+ : pLongArr( pLong ), pTextRanger( pRanger ),
nTop( rRange.Min() ), nBottom( rRange.Max() ),
bInner( pRanger->IsInner() ), bMultiple( bInner || !pRanger->IsSimple() ),
bConcat( FALSE ), bRotate( pRanger->IsVertical() )
@@ -291,7 +291,7 @@ void SvxBoundArgs::NoteRange( BOOL bToggle )
bToggle = FALSE;
USHORT nIdx = 0;
USHORT nCount = pLongArr->Count();
- DBG_ASSERT( nCount == 2 * aBoolArr.Count(), "NoteRange: Incompatible Sizes" );
+ DBG_ASSERT( nCount == 2 * aBoolArr.size(), "NoteRange: Incompatible Sizes" );
while( nIdx < nCount && (*pLongArr)[ nIdx ] < nMin )
++nIdx;
BOOL bOdd = nIdx % 2 ? TRUE : FALSE;
@@ -300,7 +300,7 @@ void SvxBoundArgs::NoteRange( BOOL bToggle )
{ // Dann wird ein neues eingefuegt ...
pLongArr->Insert( nMin, nIdx );
pLongArr->Insert( nMax, nIdx + 1 );
- aBoolArr.Insert( bToggle, nIdx / 2 );
+ aBoolArr.insert( aBoolArr.begin() + nIdx / 2, bToggle );
}
else
{ // ein vorhandes Intervall erweitern ...
@@ -332,9 +332,9 @@ void SvxBoundArgs::NoteRange( BOOL bToggle )
USHORT nStop = nMaxIdx + nDiff;
for( USHORT i = nMaxIdx; i < nStop; ++i )
bToggle ^= aBoolArr[ i ];
- aBoolArr.Remove( nMaxIdx, nDiff );
+ aBoolArr.erase( aBoolArr.begin() + nMaxIdx, aBoolArr.begin() + (nMaxIdx + nDiff) );
}
- DBG_ASSERT( nMaxIdx < aBoolArr.Count(), "NoteRange: Too much deleted" );
+ DBG_ASSERT( nMaxIdx < aBoolArr.size(), "NoteRange: Too much deleted" );
aBoolArr[ nMaxIdx ] ^= bToggle;
}
}
@@ -479,13 +479,13 @@ void SvxBoundArgs::Calc( const PolyPolygon& rPoly )
void SvxBoundArgs::Add()
{
USHORT nLongIdx = 1;
- USHORT nCount = aBoolArr.Count();
+ size_t nCount = aBoolArr.size();
if( nCount && ( !bInner || !pTextRanger->IsSimple() ) )
{
- BOOL bDelete = aBoolArr[ 0 ];
+ BOOL bDelete = aBoolArr.front();
if( bInner )
bDelete = !bDelete;
- for( USHORT nBoolIdx = 1; nBoolIdx < nCount; ++nBoolIdx )
+ for( size_t nBoolIdx = 1; nBoolIdx < nCount; ++nBoolIdx )
{
if( bDelete )
{
@@ -497,7 +497,7 @@ void SvxBoundArgs::Add()
next /= 2;
nBoolIdx = nBoolIdx - next;
nCount = nCount - next;
- aBoolArr.Remove( nBoolIdx, next );
+ aBoolArr.erase( aBoolArr.begin() + nBoolIdx, aBoolArr.begin() + (nBoolIdx + next) );
if( nBoolIdx )
aBoolArr[ nBoolIdx - 1 ] = FALSE;
#if OSL_DEBUG_LEVEL > 1
@@ -508,7 +508,7 @@ void SvxBoundArgs::Add()
bDelete = nBoolIdx < nCount && aBoolArr[ nBoolIdx ];
nLongIdx += 2;
DBG_ASSERT( nLongIdx == 2*nBoolIdx+1, "BoundArgs: Array-Idx Confusion" );
- DBG_ASSERT( aBoolArr.Count()*2 == pLongArr->Count(),
+ DBG_ASSERT( aBoolArr.size()*2 == pLongArr->Count(),
"BoundArgs: Array-Count: Confusion" );
}
}
@@ -538,7 +538,7 @@ void SvxBoundArgs::Concat( const PolyPolygon* pPoly )
DBG_ASSERT( pPoly, "Nothing to do?" );
SvLongs *pOld = pLongArr;
pLongArr = new SvLongs( 2, 8 );
- aBoolArr.Remove( 0, aBoolArr.Count() );
+ aBoolArr.clear();
bInner = FALSE;
Calc( *pPoly );
USHORT nCount = pLongArr->Count();
diff --git a/editeng/source/rtf/makefile.mk b/editeng/source/rtf/makefile.mk
index ef1c5f44b196..38b2ef7b45bc 100644
--- a/editeng/source/rtf/makefile.mk
+++ b/editeng/source/rtf/makefile.mk
@@ -38,11 +38,11 @@ TARGET=rtf
# --- Files --------------------------------------------------------
EXCEPTIONSFILES= \
+ $(SLO)$/rtfitem.obj \
$(SLO)$/svxrtf.obj
SLOFILES= \
$(EXCEPTIONSFILES) \
- $(SLO)$/rtfitem.obj \
$(SLO)$/rtfgrf.obj
# ==========================================================================
diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx
index 89b44be23ba8..3141ab20afcd 100644
--- a/editeng/source/rtf/rtfitem.cxx
+++ b/editeng/source/rtf/rtfitem.cxx
@@ -228,7 +228,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
RTF_CharTypeDef eCharType = NOTDEF_CHARTYPE;
USHORT nFontAlign;
- int bChkStkPos = !bNewGroup && aAttrStack.Top();
+ int bChkStkPos = !bNewGroup && aAttrStack.back();
while( bWeiter && IsParserWorking() ) // solange bekannte Attribute erkannt werden
{
@@ -250,7 +250,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
if( !bChkStkPos )
break;
- SvxRTFItemStackType* pAkt = aAttrStack.Top();
+ SvxRTFItemStackType* pAkt = aAttrStack.back();
if( !pAkt || (pAkt->pSttNd->GetIdx() == pInsPos->GetNodeIdx() &&
pAkt->nSttCnt == pInsPos->GetCntIdx() ))
break;
@@ -269,10 +269,10 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
// alle bis hierher gueltigen Attribute "setzen"
AttrGroupEnd();
- pAkt = aAttrStack.Top(); // can be changed after AttrGroupEnd!
+ pAkt = aAttrStack.back(); // can be changed after AttrGroupEnd!
pNew->aAttrSet.SetParent( pAkt ? &pAkt->aAttrSet : 0 );
- aAttrStack.Push( pNew );
+ aAttrStack.push_back( pNew );
pAkt = pNew;
}
else
@@ -305,7 +305,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
nStyleNo = -1 == nTokenValue ? 0 : USHORT(nTokenValue);
// setze am akt. auf dem AttrStack stehenden Style die
// StyleNummer
- SvxRTFItemStackType* pAkt = aAttrStack.Top();
+ SvxRTFItemStackType* pAkt = aAttrStack.back();
if( !pAkt )
break;
@@ -1869,9 +1869,9 @@ void SvxRTFParser::ReadBackgroundAttr( int nToken, SfxItemSet& rSet,
// pard / plain abarbeiten
void SvxRTFParser::RTFPardPlain( int bPard, SfxItemSet** ppSet )
{
- if( !bNewGroup && aAttrStack.Top() ) // nicht am Anfang einer neuen Gruppe
+ if( !bNewGroup && aAttrStack.back() ) // not at the beginning of a new group
{
- SvxRTFItemStackType* pAkt = aAttrStack.Top();
+ SvxRTFItemStackType* pAkt = aAttrStack.back();
int nLastToken = GetStackPtr(-1)->nTokenId;
int bNewStkEntry = TRUE;
@@ -1887,9 +1887,9 @@ void SvxRTFParser::RTFPardPlain( int bPard, SfxItemSet** ppSet )
// alle bis hierher gueltigen Attribute "setzen"
AttrGroupEnd();
- pAkt = aAttrStack.Top(); // can be changed after AttrGroupEnd!
+ pAkt = aAttrStack.back(); // can be changed after AttrGroupEnd!
pNew->aAttrSet.SetParent( pAkt ? &pAkt->aAttrSet : 0 );
- aAttrStack.Push( pNew );
+ aAttrStack.push_back( pNew );
pAkt = pNew;
}
else
diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx
index 61ae8e256c67..14b17807a0ea 100644
--- a/editeng/source/rtf/svxrtf.cxx
+++ b/editeng/source/rtf/svxrtf.cxx
@@ -55,7 +55,6 @@
using namespace ::com::sun::star;
-SV_IMPL_PTRARR( SvxRTFColorTbl, ColorPtr )
SV_IMPL_PTRARR( SvxRTFItemStackList, SvxRTFItemStackType* )
CharSet lcl_GetDefaultTextEncodingForRTF()
@@ -83,7 +82,6 @@ SvxRTFParser::SvxRTFParser( SfxItemPool& rPool, SvStream& rIn,
int bReadNewDoc )
: SvRTFParser( rIn, 5 ),
rStrm(rIn),
- aColorTbl( 16, 4 ),
aFontTbl( 16, 4 ),
pInsPos( 0 ),
pAttrPool( &rPool ),
@@ -124,13 +122,13 @@ void SvxRTFParser::ResetPard()
SvxRTFParser::~SvxRTFParser()
{
- if( aColorTbl.Count() )
+ if( !aColorTbl.empty() )
ClearColorTbl();
if( aFontTbl.Count() )
ClearFontTbl();
if( aStyleTbl.Count() )
ClearStyleTbl();
- if( aAttrStack.Count() )
+ if( !aAttrStack.empty() )
ClearAttrStack();
delete pRTFDefaults;
@@ -149,18 +147,18 @@ void SvxRTFParser::SetInsPos( const SvxPosition& rNew )
SvParserState SvxRTFParser::CallParser()
{
- DBG_ASSERT( pInsPos, "keine Einfuegeposition" );
+ DBG_ASSERT( pInsPos, "no insertion" );
if( !pInsPos )
return SVPAR_ERROR;
- if( aColorTbl.Count() )
+ if( !aColorTbl.empty() )
ClearColorTbl();
if( aFontTbl.Count() )
ClearFontTbl();
if( aStyleTbl.Count() )
ClearStyleTbl();
- if( aAttrStack.Count() )
+ if( !aAttrStack.empty() )
ClearAttrStack();
bIsSetDfltTab = FALSE;
@@ -488,10 +486,10 @@ void SvxRTFParser::ReadColorTable()
// eine Farbe ist Fertig, in die Tabelle eintragen
// versuche die Werte auf SV interne Namen zu mappen
ColorPtr pColor = new Color( nRed, nGreen, nBlue );
- if( !aColorTbl.Count() &&
+ if( aColorTbl.empty() &&
BYTE(-1) == nRed && BYTE(-1) == nGreen && BYTE(-1) == nBlue )
pColor->SetColor( COL_AUTO );
- aColorTbl.Insert( pColor, aColorTbl.Count() );
+ aColorTbl.push_back( pColor );
nRed = 0, nGreen = 0, nBlue = 0;
// Color konnte vollstaendig gelesen werden,
@@ -818,7 +816,11 @@ void SvxRTFParser::ReadInfo( const sal_Char* pChkForVerNo )
void SvxRTFParser::ClearColorTbl()
{
- aColorTbl.DeleteAndDestroy( 0, aColorTbl.Count() );
+ while ( !aColorTbl.empty() )
+ {
+ delete aColorTbl.back();
+ aColorTbl.pop_back();
+ }
}
void SvxRTFParser::ClearFontTbl()
@@ -836,9 +838,10 @@ void SvxRTFParser::ClearStyleTbl()
void SvxRTFParser::ClearAttrStack()
{
SvxRTFItemStackType* pTmp;
- for( ULONG nCnt = aAttrStack.Count(); nCnt; --nCnt )
+ for( size_t nCnt = aAttrStack.size(); nCnt; --nCnt )
{
- pTmp = aAttrStack.Pop();
+ pTmp = aAttrStack.back();
+ aAttrStack.pop_back();
delete pTmp;
}
}
@@ -872,7 +875,7 @@ const Font& SvxRTFParser::GetFont( USHORT nId )
SvxRTFItemStackType* SvxRTFParser::_GetAttrSet( int bCopyAttr )
{
- SvxRTFItemStackType* pAkt = aAttrStack.Top();
+ SvxRTFItemStackType* pAkt = aAttrStack.back();
SvxRTFItemStackType* pNew;
if( pAkt )
pNew = new SvxRTFItemStackType( *pAkt, *pInsPos, bCopyAttr );
@@ -881,7 +884,7 @@ SvxRTFItemStackType* SvxRTFParser::_GetAttrSet( int bCopyAttr )
*pInsPos );
pNew->SetRTFDefaults( GetRTFDefaults() );
- aAttrStack.Push( pNew );
+ aAttrStack.push_back( pNew );
bNewGroup = FALSE;
return pNew;
}
@@ -936,10 +939,11 @@ void SvxRTFParser::_ClearStyleAttr( SvxRTFItemStackType& rStkType )
void SvxRTFParser::AttrGroupEnd() // den akt. Bearbeiten, vom Stack loeschen
{
- if( aAttrStack.Count() )
+ if( !aAttrStack.empty() )
{
- SvxRTFItemStackType *pOld = aAttrStack.Pop();
- SvxRTFItemStackType *pAkt = aAttrStack.Top();
+ SvxRTFItemStackType *pOld = aAttrStack.back();
+ aAttrStack.pop_back();
+ SvxRTFItemStackType *pAkt = aAttrStack.back();
do { // middle check loop
ULONG nOldSttNdIdx = pOld->pSttNd->GetIdx();
@@ -1114,9 +1118,9 @@ void SvxRTFParser::AttrGroupEnd() // den akt. Bearbeiten, vom Stack loeschen
// alle bis hierher gueltigen Attribute "setzen"
AttrGroupEnd();
- pAkt = aAttrStack.Top(); // can be changed after AttrGroupEnd!
+ pAkt = aAttrStack.back(); // can be changed after AttrGroupEnd!
pNew->aAttrSet.SetParent( pAkt ? &pAkt->aAttrSet : 0 );
- aAttrStack.Push( pNew );
+ aAttrStack.push_back( pNew );
pAkt = pNew;
}
}
@@ -1144,8 +1148,8 @@ void SvxRTFParser::AttrGroupEnd() // den akt. Bearbeiten, vom Stack loeschen
void SvxRTFParser::SetAllAttrOfStk() // end all Attr. and set it into doc
{
- // noch alle Attrbute vom Stack holen !!
- while( aAttrStack.Count() )
+ // repeat until all attributes will be taken from stack
+ while( !aAttrStack.empty() )
AttrGroupEnd();
for( USHORT n = aAttrSetList.Count(); n; )
@@ -1174,10 +1178,10 @@ void SvxRTFParser::SetAttrSet( SvxRTFItemStackType &rSet )
SetAttrSet( *(*rSet.pChildList)[ n ] );
}
- // wurde noch kein Text eingefuegt ? (SttPos vom obersten StackEintrag!)
+ // Is text wasn't inserted? (Get SttPos from the top of stack!)
int SvxRTFParser::IsAttrSttPos()
{
- SvxRTFItemStackType* pAkt = aAttrStack.Top();
+ SvxRTFItemStackType* pAkt = aAttrStack.back();
return !pAkt || (pAkt->pSttNd->GetIdx() == pInsPos->GetNodeIdx() &&
pAkt->nSttCnt == pInsPos->GetCntIdx());
}
diff --git a/filter/source/xsltdialog/xmlfileview.cxx b/filter/source/xsltdialog/xmlfileview.cxx
index a9cb18bed8d2..8bd0001dc198 100644
--- a/filter/source/xsltdialog/xmlfileview.cxx
+++ b/filter/source/xsltdialog/xmlfileview.cxx
@@ -55,6 +55,8 @@
#include "xmlfileview.hrc"
#include "xmlfilterhelpids.hrc"
+#include <deque>
+
using namespace rtl;
using namespace osl;
using namespace com::sun::star::lang;
@@ -77,8 +79,7 @@ struct SwTextPortion
svtools::ColorConfigEntry eType;
};
-SV_DECL_VARARR(SwTextPortions, SwTextPortion,16,16)
-SV_IMPL_VARARR(SwTextPortions, SwTextPortion);
+typedef std::deque<SwTextPortion> SwTextPortions;
class XMLErrorHandler : public ::cppu::WeakImplHelper1< XErrorHandler >
{
@@ -688,10 +689,10 @@ void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
const USHORT nStrLen = rSource.Len();
- USHORT nInsert = 0; // Anzahl der eingefuegten Portions
- USHORT nActPos = 0; //Position, an der '<' gefunden wurde
- USHORT nOffset = 0; //Offset von nActPos zur '<'
- USHORT nPortStart = USHRT_MAX; // fuer die TextPortion
+ USHORT nInsert = 0; // Number of inserted Portions
+ USHORT nActPos = 0; // Position, at the '<' was found
+ USHORT nOffset = 0; // Offset of nActPos for '<'
+ USHORT nPortStart = USHRT_MAX; // For the TextPortion
USHORT nPortEnd = 0; //
SwTextPortion aText;
while(nActPos < nStrLen)
@@ -709,7 +710,8 @@ void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
aText.nStart += 1;
aText.nEnd = nActPos - 1;
aText.eType = svtools::HTMLUNKNOWN;
- aPortionList.Insert(aText, nInsert++);
+ aPortionList.push_back( aText );
+ nInsert++;
}
sal_Unicode cFollowFirst = rSource.GetChar((xub_StrLen)(nActPos + 1));
sal_Unicode cFollowNext = rSource.GetChar((xub_StrLen)(nActPos + 2));
@@ -801,7 +803,8 @@ void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
aText2.nStart = nPortStart + 1;
aText2.nEnd = nPortEnd;
aText2.eType = eFoundType;
- aPortionList.Insert(aText2, nInsert++);
+ aPortionList.push_back( aText2 );
+ nInsert++;
eFoundType = svtools::HTMLUNKNOWN;
}
@@ -815,7 +818,8 @@ void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
aText.nStart = nPortEnd + 1;
aText.nEnd = nActPos - 1;
aText.eType = svtools::HTMLUNKNOWN;
- aPortionList.Insert(aText, nInsert++);
+ aPortionList.push_back( aText );
+ nInsert++;
}
}
@@ -833,7 +837,7 @@ void XMLFileWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff )
SwTextPortions aPortionList;
lcl_Highlight(rSource, aPortionList);
- USHORT nCount = aPortionList.Count();
+ size_t nCount = aPortionList.size();
if ( !nCount )
return;
@@ -841,7 +845,7 @@ void XMLFileWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff )
if ( rLast.nStart > rLast.nEnd ) // Nur bis Bug von MD behoeben
{
nCount--;
- aPortionList.Remove( nCount);
+ aPortionList.pop_back();
if ( !nCount )
return;
}
@@ -857,7 +861,7 @@ void XMLFileWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff )
// Wenn zwei gleiche Attribute hintereinander eingestellt werden,
// optimiert das die TextEngine.
USHORT nLastEnd = 0;
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( size_t i = 0; i < nCount; i++ )
{
SwTextPortion& r = aPortionList[i];
DBG_ASSERT( r.nLine == aPortionList[0].nLine, "doch mehrere Zeilen ?" );
@@ -877,7 +881,7 @@ void XMLFileWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff )
}
svtools::ColorConfig aConfig;
- for ( USHORT i = 0; i < aPortionList.Count(); i++ )
+ for ( size_t i = 0; i < aPortionList.size(); i++ )
{
SwTextPortion& r = aPortionList[i];
if ( r.nStart > r.nEnd ) // Nur bis Bug von MD behoeben
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx
index d2de4882dead..da335308933e 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -647,6 +647,8 @@ namespace frm
DBG_ASSERT( m_eListSourceType != ListSourceType_VALUELIST, "OListBoxModel::loadData: cannot load value list from DB!" );
DBG_ASSERT( !hasExternalListSource(), "OListBoxModel::loadData: cannot load from DB when I have an external list source!" );
+ const sal_Int16 nNULLPosBackup( m_nNULLPos );
+ const sal_Int32 nBoundColumnTypeBackup( m_nBoundColumnType );
m_nNULLPos = -1;
m_nBoundColumnType = DataType::SQLNULL;
@@ -782,6 +784,8 @@ namespace frm
// if none of the settings of the row set changed, compared to the last
// invocation of loadData, then don't re-fill the list. Instead, assume
// the list entries are the same.
+ m_nNULLPos = nNULLPosBackup;
+ m_nBoundColumnType = nBoundColumnTypeBackup;
return;
}
xListCursor.reset( m_aListRowSet.execute() );
diff --git a/framework/inc/framework.hrc b/framework/inc/framework.hrc
index eea91edeaa07..1817b60d90e9 100644
--- a/framework/inc/framework.hrc
+++ b/framework/inc/framework.hrc
@@ -35,9 +35,9 @@
#define RID_GROUPS_OFFSET 32000
#define RID_GROUPS_END 32767
-#define RID_FWK_DIALOG_START (RID_FWK_START + 2048)
+#define RID_FWK_DIALOG_START_CORRECT (RID_FWK_START + 2048)
-#define DLG_FILTER_SELECT (RID_FWK_DIALOG_START + 0)
+#define DLG_FILTER_SELECT (RID_FWK_DIALOG_START_CORRECT + 0)
#define STR_FILTER_DOWNLOAD (RID_FWK_START+0)
#define STR_FILTER_CHOOSER (RID_FWK_START+1)
@@ -45,7 +45,7 @@
#define STR_FILTER_ZIPPED (RID_FWK_START+3)
// ResIds for BackingWindow
-#define DLG_BACKING (RID_FWK_DIALOG_START+100)
+#define DLG_BACKING (RID_FWK_DIALOG_START_CORRECT+100)
#define STR_BACKING_WELCOME 1
#define STR_BACKING_WELCOMEPRODUCT 2
#define STR_BACKING_CREATE 3
@@ -78,7 +78,7 @@
#define BMP_BACKING_OPENTEMPLATE 17
// Ids of TabWindow
-#define WIN_TABWINDOW (RID_FWK_DIALOG_START+101)
+#define WIN_TABWINDOW (RID_FWK_DIALOG_START_CORRECT+101)
#define TC_TABCONTROL 1
#endif
diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx
index 7879761fbce5..8c477a78892f 100644
--- a/framework/source/services/backingwindow.cxx
+++ b/framework/source/services/backingwindow.cxx
@@ -29,6 +29,7 @@
#include "precompiled_framework.hxx"
#include "backingwindow.hxx"
+#include "classes/resource.hrc"
#include "framework.hrc"
#include "classes/fwkresid.hxx"
#include <services.h>
@@ -388,8 +389,13 @@ void BackingWindow::prepareRecentFileMenu()
aBuf.append( aMenuTitle );
mpRecentMenu->InsertItem( static_cast<USHORT>(i+1), aBuf.makeStringAndClear() );
}
- maOpenButton.SetPopupMenu( mpRecentMenu );
}
+ else
+ {
+ String aNoDoc( FwkResId( STR_NODOCUMENT ) );
+ mpRecentMenu->InsertItem( 0xffff, aNoDoc );
+ }
+ maOpenButton.SetPopupMenu( mpRecentMenu );
}
void BackingWindow::initBackground()
diff --git a/instsetoo_native/inc_openoffice/windows/msi_languages/makefile.mk b/instsetoo_native/inc_openoffice/windows/msi_languages/makefile.mk
index df3cd544890e..0a854df4f633 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_languages/makefile.mk
+++ b/instsetoo_native/inc_openoffice/windows/msi_languages/makefile.mk
@@ -32,6 +32,7 @@ TARGET=win_ulffiles
# --- Settings -----------------------------------------------------
+common_build:=
.INCLUDE : settings.mk
# ------------------------------------------------------------------
@@ -48,8 +49,8 @@ ULFFILES = \
SIS.ulf \
UIText.ulf
-MLFFILES = $(foreach,i,$(ULFFILES) $(COMMONMISC)$/$(TARGET)$/$(i:b).mlf)
-UULFFILES = $(COMMONMISC)$/$(TARGET)$/Nsis.uulf
+MLFFILES = $(foreach,i,$(ULFFILES) $(MISC)$/$(TARGET)$/$(i:b).mlf)
+UULFFILES = $(MISC)$/$(TARGET)$/Nsis.uulf
# --- Targets ------------------------------------------------------
diff --git a/instsetoo_native/util/makefile.mk b/instsetoo_native/util/makefile.mk
index fceadbfdca65..2972d04111bd 100644
--- a/instsetoo_native/util/makefile.mk
+++ b/instsetoo_native/util/makefile.mk
@@ -209,33 +209,33 @@ $(MAKETARGETS){$(PKGFORMAT:^".")} : $(ADDDEPS)
.ENDIF # "$(MAKETARGETS:e)"=="" && "$(MAKETARGETS:s/_//)"!="$(MAKETARGETS)"
.ENDIF # "$(MAKETARGETS)"!=""
openoffice_%{$(PKGFORMAT:^".") .archive} :
- $(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p OpenOffice -u $(OUT) -buildid $(BUILD) -msitemplate $(MSIOFFICETEMPLATEDIR) -msilanguage $(COMMONMISC)$/win_ulffiles -format $(@:e:s/.//) $(VERBOSESWITCH)
+ $(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p OpenOffice -u $(OUT) -buildid $(BUILD) -msitemplate $(MSIOFFICETEMPLATEDIR) -msilanguage $(MISC)$/win_ulffiles -format $(@:e:s/.//) $(VERBOSESWITCH)
$(PERL) -w $(SOLARENV)$/bin$/gen_update_info.pl --buildid $(BUILD) --arch "$(RTL_ARCH)" --os "$(RTL_OS)" --lstfile $(PRJ)$/util$/openoffice.lst --product OpenOffice --languages $(subst,$(@:s/_/ /:1)_, $(@:b)) $(PRJ)$/util$/update.xml > $(MISC)/$(@:b)_$(RTL_OS)_$(RTL_ARCH)$(@:e).update.xml
$(foreach,i,$(alllangiso) openofficewithjre_$i) : $$@{$(PKGFORMAT:^".")}
openofficewithjre_%{$(PKGFORMAT:^".")} :
- $(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p OpenOffice_wJRE -u $(OUT) -buildid $(BUILD) -msitemplate $(MSIOFFICETEMPLATEDIR) -msilanguage $(COMMONMISC)$/win_ulffiles -format $(@:e:s/.//) $(VERBOSESWITCH)
+ $(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p OpenOffice_wJRE -u $(OUT) -buildid $(BUILD) -msitemplate $(MSIOFFICETEMPLATEDIR) -msilanguage $(MISC)$/win_ulffiles -format $(@:e:s/.//) $(VERBOSESWITCH)
$(foreach,i,$(alllangiso) openofficedev_$i) : $$@{$(PKGFORMAT:^".")}
openofficedev_%{$(PKGFORMAT:^".")} :
- $(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p OpenOffice_Dev -u $(OUT) -buildid $(BUILD) -msitemplate $(MSIOFFICETEMPLATEDIR) -msilanguage $(COMMONMISC)$/win_ulffiles -format $(@:e:s/.//) $(VERBOSESWITCH)
+ $(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p OpenOffice_Dev -u $(OUT) -buildid $(BUILD) -msitemplate $(MSIOFFICETEMPLATEDIR) -msilanguage $(MISC)$/win_ulffiles -format $(@:e:s/.//) $(VERBOSESWITCH)
$(PERL) -w $(SOLARENV)$/bin$/gen_update_info.pl --buildid $(BUILD) --arch "$(RTL_ARCH)" --os "$(RTL_OS)" --lstfile $(PRJ)$/util$/openoffice.lst --product OpenOffice_Dev --languages $(subst,$(@:s/_/ /:1)_, $(@:b)) $(PRJ)$/util$/update.xml > $(MISC)/$(@:b)_$(RTL_OS)_$(RTL_ARCH)$(@:e).update.xml
$(foreach,i,$(alllangiso) ooolanguagepack_$i) : $$@{$(PKGFORMAT:^".")}
ooolanguagepack_%{$(PKGFORMAT:^".")} :
- $(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p OpenOffice -u $(OUT) -buildid $(BUILD) -msitemplate $(MSILANGPACKTEMPLATEDIR) -msilanguage $(COMMONMISC)$/win_ulffiles -languagepack -format $(@:e:s/.//) $(VERBOSESWITCH)
+ $(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p OpenOffice -u $(OUT) -buildid $(BUILD) -msitemplate $(MSILANGPACKTEMPLATEDIR) -msilanguage $(MISC)$/win_ulffiles -languagepack -format $(@:e:s/.//) $(VERBOSESWITCH)
$(foreach,i,$(alllangiso) ooodevlanguagepack_$i) : $$@{$(PKGFORMAT:^".")}
ooodevlanguagepack_%{$(PKGFORMAT:^".")} :
- $(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p OpenOffice_Dev -u $(OUT) -buildid $(BUILD) -msitemplate $(MSILANGPACKTEMPLATEDIR) -msilanguage $(COMMONMISC)$/win_ulffiles -languagepack -format $(@:e:s/.//) $(VERBOSESWITCH)
+ $(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p OpenOffice_Dev -u $(OUT) -buildid $(BUILD) -msitemplate $(MSILANGPACKTEMPLATEDIR) -msilanguage $(MISC)$/win_ulffiles -languagepack -format $(@:e:s/.//) $(VERBOSESWITCH)
$(foreach,i,$(alllangiso) sdkoo_$i) : $$@{$(PKGFORMAT:^".")}
sdkoo_%{$(PKGFORMAT:^".")} :
- $(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p OpenOffice_SDK -u $(OUT) -buildid $(BUILD) -msitemplate $(MSISDKOOTEMPLATEDIR) -msilanguage $(COMMONMISC)$/win_ulffiles -dontstrip -format $(@:e:s/.//) $(VERBOSESWITCH)
+ $(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p OpenOffice_SDK -u $(OUT) -buildid $(BUILD) -msitemplate $(MSISDKOOTEMPLATEDIR) -msilanguage $(MISC)$/win_ulffiles -dontstrip -format $(@:e:s/.//) $(VERBOSESWITCH)
$(foreach,i,$(alllangiso) sdkoodev_$i) : $$@{$(PKGFORMAT:^".")}
sdkoodev_%{$(PKGFORMAT:^".")} :
- $(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p OpenOffice_Dev_SDK -u $(OUT) -buildid $(BUILD) -msitemplate $(MSISDKOOTEMPLATEDIR) -msilanguage $(COMMONMISC)$/win_ulffiles -dontstrip -format $(@:e:s/.//) $(VERBOSESWITCH)
+ $(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p OpenOffice_Dev_SDK -u $(OUT) -buildid $(BUILD) -msitemplate $(MSISDKOOTEMPLATEDIR) -msilanguage $(MISC)$/win_ulffiles -dontstrip -format $(@:e:s/.//) $(VERBOSESWITCH)
$(foreach,i,$(alllangiso) ure_$i) : $$@{$(PKGFORMAT:^".")}
ure_%{$(PKGFORMAT:^".")} :
@@ -245,7 +245,7 @@ ure_%{$(PKGFORMAT:^".")} :
$(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst \
-l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p URE -u $(OUT) -buildid $(BUILD) -format $(@:e:s/.//) $(VERBOSESWITCH) \
-msitemplate $(MSIURETEMPLATEDIR) \
- -msilanguage $(COMMONMISC)$/win_ulffiles
+ -msilanguage $(MISC)$/win_ulffiles
.ENDIF
$(foreach,i,$(alllangiso) broffice_$i) : $$@{$(PKGFORMAT:^".")}
@@ -256,21 +256,21 @@ $(MAKETARGETS){$(PKGFORMAT:^".")} : $(ADDDEPS)
.ENDIF # "$(MAKETARGETS:e)"=="" && "$(MAKETARGETS:s/_//)"!="$(MAKETARGETS)"
.ENDIF # "$(MAKETARGETS)"!=""
broffice_%{$(PKGFORMAT:^".")} :
- +$(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p BrOffice -u $(OUT) -buildid $(BUILD) -msitemplate $(MSIOFFICETEMPLATEDIR) -msilanguage $(COMMONMISC)$/win_ulffiles -format $(@:e:s/.//) $(VERBOSESWITCH)
+ +$(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p BrOffice -u $(OUT) -buildid $(BUILD) -msitemplate $(MSIOFFICETEMPLATEDIR) -msilanguage $(MISC)$/win_ulffiles -format $(@:e:s/.//) $(VERBOSESWITCH)
$(PERL) -w $(SOLARENV)$/bin$/gen_update_info.pl --buildid $(BUILD) --arch "$(RTL_ARCH)" --os "$(RTL_OS)" --lstfile $(PRJ)$/util$/openoffice.lst --product BrOffice --languages $(subst,$(@:s/_/ /:1)_, $(@:b)) $(PRJ)$/util$/update.xml > $(MISC)/$(@:b)_$(RTL_OS)_$(RTL_ARCH)$(@:e).update.xml
$(foreach,i,$(alllangiso) brofficewithjre_$i) : $$@{$(PKGFORMAT:^".")}
brofficewithjre_%{$(PKGFORMAT:^".")} :
- +$(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p BrOffice_wJRE -u $(OUT) -buildid $(BUILD) -msitemplate $(MSIOFFICETEMPLATEDIR) -msilanguage $(COMMONMISC)$/win_ulffiles -format $(@:e:s/.//) $(VERBOSESWITCH)
+ +$(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p BrOffice_wJRE -u $(OUT) -buildid $(BUILD) -msitemplate $(MSIOFFICETEMPLATEDIR) -msilanguage $(MISC)$/win_ulffiles -format $(@:e:s/.//) $(VERBOSESWITCH)
$(foreach,i,$(alllangiso) brofficedev_$i) : $$@{$(PKGFORMAT:^".")}
brofficedev_%{$(PKGFORMAT:^".")} :
- +$(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p BrOffice_Dev -u $(OUT) -buildid $(BUILD) -msitemplate $(MSIOFFICETEMPLATEDIR) -msilanguage $(COMMONMISC)$/win_ulffiles -format $(@:e:s/.//) $(VERBOSESWITCH)
+ +$(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p BrOffice_Dev -u $(OUT) -buildid $(BUILD) -msitemplate $(MSIOFFICETEMPLATEDIR) -msilanguage $(MISC)$/win_ulffiles -format $(@:e:s/.//) $(VERBOSESWITCH)
$(PERL) -w $(SOLARENV)$/bin$/gen_update_info.pl --buildid $(BUILD) --arch "$(RTL_ARCH)" --os "$(RTL_OS)" --lstfile $(PRJ)$/util$/openoffice.lst --product BrOffice_Dev --languages $(subst,$(@:s/_/ /:1)_, $(@:b)) $(PRJ)$/util$/update.xml > $(MISC)/$(@:b)_$(RTL_OS)_$(RTL_ARCH)$(@:e).update.xml
$(foreach,i,$(alllangiso) broolanguagepack_$i) : $$@{$(PKGFORMAT:^".")}
broolanguagepack_%{$(PKGFORMAT:^".")} :
- +$(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p BrOffice -u $(OUT) -buildid $(BUILD) -msitemplate $(MSILANGPACKTEMPLATEDIR) -msilanguage $(COMMONMISC)$/win_ulffiles -languagepack -format $(@:e:s/.//) $(VERBOSESWITCH)
+ +$(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p BrOffice -u $(OUT) -buildid $(BUILD) -msitemplate $(MSILANGPACKTEMPLATEDIR) -msilanguage $(MISC)$/win_ulffiles -languagepack -format $(@:e:s/.//) $(VERBOSESWITCH)
.ELSE # "$(alllangiso)"!=""
openoffice:
diff --git a/jvmfwk/inc/jvmfwk/framework.h b/jvmfwk/inc/jvmfwk/framework.h
index 53914a3debed..7c3551f70116 100644
--- a/jvmfwk/inc/jvmfwk/framework.h
+++ b/jvmfwk/inc/jvmfwk/framework.h
@@ -830,6 +830,7 @@ javaFrameworkError SAL_CALL jfw_getJRELocations(
JFW_E_NONE the function ran successfully.</br>
JFW_E_ERROR an error occurred during execution.</br>
JFW_E_INVALID_ARG pInfo contains invalid data</br>
+ JFW_E_NO_PLUGIN a plug-in library could not be found.<br/>
*/
javaFrameworkError SAL_CALL jfw_existJRE(const JavaInfo *pInfo, sal_Bool *exist);
diff --git a/jvmfwk/inc/jvmfwk/vendorplugin.h b/jvmfwk/inc/jvmfwk/vendorplugin.h
index 258833490ab7..15707b1bbe88 100644
--- a/jvmfwk/inc/jvmfwk/vendorplugin.h
+++ b/jvmfwk/inc/jvmfwk/vendorplugin.h
@@ -238,6 +238,25 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
+/** checks if the installation of the jre still exists.
+
+ This function checks if the JRE described by pInfo still
+ exists. The check must be very quick because it is called by javaldx
+ (Linux, Solaris) at start up.
+
+ @param pInfo
+ [in] the JavaInfo object with information about the JRE.
+ @param pp_exist
+ [out] the parameter is set to either sal_True or sal_False. The value is
+ only valid if the function returns JFW_E_NONE.
+
+ @return
+ JFW_PLUGIN_E_NONE the function ran successfully.</br>
+ JFW_PLUGIN_E_ERROR an error occurred during execution.</br>
+ JFW_PLUGIN_E_INVALID_ARG pInfo contains invalid data</br>
+ */
+javaPluginError jfw_plugin_existJRE(const JavaInfo *pInfo, sal_Bool *exist);
+
#ifdef __cplusplus
}
#endif
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx
index 6dd18ccc9f18..3ae1c0f16b92 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx
@@ -73,7 +73,7 @@ char const* const* OtherInfo::getRuntimePaths(int * size)
"/bin/hotspot/jvm.dll"
#elif UNX
#ifdef MACOSX
- "/../../../JavaVM"
+ "/../../../../../Frameworks/JavaVM.framework/JavaVM" //as of 1.6.0_22
#else
"/lib/" JFW_PLUGIN_ARCH "/client/libjvm.so", // for Blackdown PPC
"/lib/" JFW_PLUGIN_ARCH "/server/libjvm.so", // for Blackdown AMD64
@@ -95,8 +95,7 @@ char const* const* OtherInfo::getLibraryPaths(int* size)
#ifdef UNX
static char const * ar[] = {
#ifdef MACOSX
- "/../Libraries",
- "/lib"
+ //mac version does not have a ld library path anymore
#else
"/bin",
"/jre/bin",
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index 896342b5389d..b43edf53b3bc 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -470,10 +470,10 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
{
JFW_ENSURE(0, OUSTR("[Java framework]sunjavaplugin" SAL_DLLEXTENSION
" could not load Java runtime library: \n")
- + sRuntimeLib + OUSTR("."));
+ + sRuntimeLib + OUSTR("\n"));
JFW_TRACE0(OUSTR("[Java framework]sunjavaplugin" SAL_DLLEXTENSION
" could not load Java runtime library: \n")
- + sRuntimeLib + OUSTR("."));
+ + sRuntimeLib + OUSTR("\n"));
return JFW_PLUGIN_E_VM_CREATION_FAILED;
}
@@ -614,5 +614,63 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
return errcode;
}
+extern "C"
+javaPluginError jfw_plugin_existJRE(const JavaInfo *pInfo, sal_Bool *exist)
+{
+ javaPluginError ret = JFW_PLUGIN_E_NONE;
+ if (!pInfo || !exist)
+ return JFW_PLUGIN_E_INVALID_ARG;
+ ::rtl::OUString sLocation(pInfo->sLocation);
+
+ if (sLocation.getLength() == 0)
+ return JFW_PLUGIN_E_INVALID_ARG;
+ ::osl::DirectoryItem item;
+ ::osl::File::RC rc_item = ::osl::DirectoryItem::get(sLocation, item);
+ if (::osl::File::E_None == rc_item)
+ {
+ *exist = sal_True;
+ }
+ else if (::osl::File::E_NOENT == rc_item)
+ {
+ *exist = sal_False;
+ }
+ else
+ {
+ ret = JFW_PLUGIN_E_ERROR;
+ }
+#ifdef MACOSX
+ //We can have the situation that the JavaVM runtime library is not
+ //contained within JAVA_HOME. Then the check for JAVA_HOME would return
+ //true although the runtime library may not be loadable.
+ if (ret == JFW_PLUGIN_E_NONE && *exist == sal_True)
+ {
+ rtl::OUString sRuntimeLib = getRuntimeLib(pInfo->arVendorData);
+ JFW_TRACE2(OUSTR("[Java framework] Checking existence of Java runtime library.\n"));
+
+ ::osl::DirectoryItem itemRt;
+ ::osl::File::RC rc_itemRt = ::osl::DirectoryItem::get(sRuntimeLib, itemRt);
+ if (::osl::File::E_None == rc_itemRt)
+ {
+ *exist = sal_True;
+ JFW_TRACE2(OUSTR("[Java framework] Java runtime library exist: ")
+ + sRuntimeLib + OUSTR("\n"));
+
+ }
+ else if (::osl::File::E_NOENT == rc_itemRt)
+ {
+ *exist = sal_False;
+ JFW_TRACE2(OUSTR("[Java framework] Java runtime library does not exist: ")
+ + sRuntimeLib + OUSTR("\n"));
+ }
+ else
+ {
+ ret = JFW_PLUGIN_E_ERROR;
+ JFW_TRACE2(OUSTR("[Java framework] Error while looking for Java runtime library: ")
+ + sRuntimeLib + OUSTR(" \n"));
+ }
+ }
+#endif
+ return ret;
+}
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.map b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.map
index db75c9611076..901867f0a43d 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.map
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.map
@@ -6,3 +6,8 @@ UDK_3_0_0 {
local:
*;
};
+
+UDK_3.1 { # OOo 3.3
+ global:
+ jfw_plugin_existJRE;
+} UDK_3_0_0;
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
index e17a6c788096..5d52046c705e 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
@@ -418,9 +418,9 @@ SelfTest::SelfTest()
break;
}
if (bRet)
- JFW_TRACE2("[Java framework] sunjavaplugin: Testing class SunVersion succeeded.");
+ JFW_TRACE2("[Java framework] sunjavaplugin: Testing class SunVersion succeeded.\n");
else
- OSL_ENSURE(bRet, "[Java framework] sunjavaplugin: SunVersion self test failed");
+ OSL_ENSURE(bRet, "[Java framework] sunjavaplugin: SunVersion self test failed.\n");
}
#endif
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index bd49956c8baf..fc2a5b98215a 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -450,12 +450,12 @@ bool getJavaProps(const OUString & exePath,
rs = stdoutReader.readLine( & aLine);
if (rs != FileHandleReader::RESULT_OK)
break;
- JFW_TRACE2(OString("[Java framework] line:\" ")
- + aLine + OString(" \".\n"));
+// JFW_TRACE2(OString("[Java framework] line:\" ")
+// + aLine + OString(" \".\n"));
OUString sLine;
if (!decodeOutput(aLine, &sLine))
continue;
- JFW_TRACE2(OString("[Java framework] line:\" ")
+ JFW_TRACE2(OString("[Java framework]:\" ")
+ OString( CHAR_POINTER(sLine)) + OString(" \".\n"));
sLine = sLine.trim();
if (sLine.getLength() == 0)
@@ -509,7 +509,7 @@ bool decodeOutput(const rtl::OString& s, rtl::OUString* out)
} while (nIndex >= 0);
*out = buff.makeStringAndClear();
- JFW_TRACE2(*out);
+// JFW_TRACE2(*out);
return true;
}
diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx
index c4e44f7ac375..9674c28d54df 100644
--- a/jvmfwk/source/elements.cxx
+++ b/jvmfwk/source/elements.cxx
@@ -930,6 +930,16 @@ void CNodeJavaInfo::loadFromNode(xmlDoc * pDoc, xmlNode * pJavaInfo)
pDoc, cur->children, 1);
rtl::OUString sRequire = xmlRequire;
nRequirements = sRequire.toInt64(16);
+#ifdef MACOSX
+ //javaldx is not used anymore in the mac build. In case the Java
+ //corresponding to the saved settings does not exist anymore the
+ //javavm services will look for an existing Java after creation of
+ //the JVM failed. See stoc/source/javavm/javavm.cxx. Only if
+ //nRequirements does not have the flag JFW_REQUIRE_NEEDRESTART the
+ //jvm of the new selected JRE will be started. Old settings (before
+ //OOo 3.3) still contain the flag which can be safely ignored.
+ nRequirements &= ~JFW_REQUIRE_NEEDRESTART;
+#endif
}
else if (xmlStrcmp(cur->name, (xmlChar*) "vendorData") == 0)
{
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index 1a2ac3b954ef..1194e73402dd 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -1114,29 +1114,39 @@ javaFrameworkError SAL_CALL jfw_getJRELocations(
javaFrameworkError jfw_existJRE(const JavaInfo *pInfo, sal_Bool *exist)
{
- javaFrameworkError ret = JFW_E_NONE;
- if (!pInfo || !exist)
- return JFW_E_INVALID_ARG;
- ::rtl::OUString sLocation(pInfo->sLocation);
-
- if (sLocation.getLength() == 0)
- return JFW_E_INVALID_ARG;
+ //get the function jfw_plugin_existJRE
+ jfw::VendorSettings aVendorSettings;
+ jfw::CJavaInfo aInfo;
+ aInfo = (const ::JavaInfo*) pInfo; //makes a copy of pInfo
+ rtl::OUString sLibPath = aVendorSettings.getPluginLibrary(aInfo.getVendor());
+ osl::Module modulePlugin(sLibPath);
+ if ( ! modulePlugin)
+ return JFW_E_NO_PLUGIN;
+ rtl::OUString sFunctionName(
+ RTL_CONSTASCII_USTRINGPARAM("jfw_plugin_existJRE"));
+ jfw_plugin_existJRE_ptr pFunc =
+ (jfw_plugin_existJRE_ptr)
+ osl_getFunctionSymbol(modulePlugin, sFunctionName.pData);
+ if (pFunc == NULL)
+ return JFW_E_ERROR;
+
+ javaPluginError plerr = (*pFunc)(pInfo, exist);
- ::osl::DirectoryItem item;
- ::osl::File::RC rc_item = ::osl::DirectoryItem::get(sLocation, item);
- if (::osl::File::E_None == rc_item)
- {
- *exist = sal_True;
- }
- else if (::osl::File::E_NOENT == rc_item)
- {
- *exist = sal_False;
- }
- else
+ javaFrameworkError ret = JFW_E_NONE;
+ switch (plerr)
{
+ case JFW_PLUGIN_E_NONE:
+ ret = JFW_E_NONE;
+ break;
+ case JFW_PLUGIN_E_INVALID_ARG:
+ ret = JFW_E_INVALID_ARG;
+ break;
+ case JFW_PLUGIN_E_ERROR:
+ ret = JFW_E_ERROR;
+ break;
+ default:
ret = JFW_E_ERROR;
}
-
return ret;
}
diff --git a/jvmfwk/source/framework.hxx b/jvmfwk/source/framework.hxx
index 57e6a262bcd3..163d12e85938 100644
--- a/jvmfwk/source/framework.hxx
+++ b/jvmfwk/source/framework.hxx
@@ -64,6 +64,10 @@ typedef javaPluginError (*jfw_plugin_startJavaVirtualMachine_ptr)(
JavaVM ** ppVM,
JNIEnv ** ppEnv);
+typedef javaPluginError (*jfw_plugin_existJRE_ptr)(
+ const JavaInfo *info,
+ sal_Bool *exist);
+
namespace jfw
{
diff --git a/l10ntools/scripts/keyidGen.pl b/l10ntools/scripts/keyidGen.pl
index 2a4ac5caefc3..53423c2d6f02 100644
--- a/l10ntools/scripts/keyidGen.pl
+++ b/l10ntools/scripts/keyidGen.pl
@@ -112,7 +112,7 @@ sub makenumber
$h = shift;
# 1 2 3 4
# 1234567890123456789012345678901234567890
- $symbols="0123456789abcdefghijklmnopqrstuvwxyz+-<=>";
+ $symbols="0123456789abcdefghijklmnopqrstuvwxyz+-[=]";
$order = length($symbols);
$result = "";
while ( length( $result ) < 6 )
diff --git a/l10ntools/scripts/localize.pl b/l10ntools/scripts/localize.pl
index 230b6d46f395..323f7fe549b6 100755
--- a/l10ntools/scripts/localize.pl
+++ b/l10ntools/scripts/localize.pl
@@ -175,8 +175,9 @@ sub splitfile{
exit( -1 );
}
my $src_root = $ENV{SOURCE_ROOT_DIR};
+ my $ooo_src_root = $ENV{SRC_ROOT};
my $so_l10n_path = $src_root."/sun/l10n_so/source";
- my $ooo_l10n_path = $src_root."/ooo/l10n/source";
+ my $ooo_l10n_path = $ooo_src_root."/l10n/source";
#print "$so_l10n_path\n";
#print "$ooo_l10n_path\n";
diff --git a/officecfg/registry/data/org/openoffice/VCL.xcu b/officecfg/registry/data/org/openoffice/VCL.xcu
index 575c0aba053b..3c9f0c6af44c 100644
--- a/officecfg/registry/data/org/openoffice/VCL.xcu
+++ b/officecfg/registry/data/org/openoffice/VCL.xcu
@@ -60,6 +60,11 @@
<value>Default</value>
</prop>
</node>
+ <node oor:name="WM" oor:op="replace">
+ <prop oor:name="ShouldSwitchWorkspace" oor:op="replace" oor:type="xs:string">
+ <value></value>
+ </prop>
+ </node>
</node>
<node oor:name="DefaultFonts">
<node oor:name="en" oor:op="replace">
@@ -1423,9 +1428,8 @@
</node>
<node oor:name="arial" oor:op="replace">
<prop oor:name="SubstFonts">
- <value>liberationsans;albany;albanyamt;nimbussansl;helvetica;lucidasans;lucida;geneva;helmet;nimbussans;andalesansui;arialunicodems;lucidaunicode</value>
+ <value>liberationsans;albany;albanyamt;arimo;nimbussansl;helvetica;lucidasans;lucida;geneva;helmet;nimbussans;andalesansui;arialunicodems;lucidaunicode</value>
</prop>
- <prop oor:name="SubstFontsMS"><value></value></prop>
<prop oor:name="SubstFontsPS"><value>Helvetica</value></prop>
<prop oor:name="SubstFontsHTML"><value>sans-serif</value></prop>
<prop oor:name="FontWeight"><value>Normal</value></prop>
@@ -1436,24 +1440,9 @@
<prop oor:name="SubstFonts">
<value>arialnarrowmt;liberationsansnarrow;helveticanarrow;helmetcondensed;dejavusanscondensed;nimbussanslcondensed;nimbussanscondensed</value>
</prop>
- <prop oor:name="SubstFontsMS">
- <value></value>
- </prop>
- <prop oor:name="SubstFontsPS">
- <value></value>
- </prop>
- <prop oor:name="SubstFontsHTML">
- <value></value>
- </prop>
- <prop oor:name="FontWeight">
- <value>Normal</value>
- </prop>
- <prop oor:name="FontWidth">
- <value>Condensed</value>
- </prop>
- <prop oor:name="FontType">
- <value>Normal,SansSerif</value>
- </prop>
+ <prop oor:name="FontWeight"><value>Normal</value></prop>
+ <prop oor:name="FontWidth"><value>Condensed</value></prop>
+ <prop oor:name="FontType"><value>Normal,SansSerif</value></prop>
</node>
<node oor:name="arialunicode" oor:op="replace">
<prop oor:name="SubstFonts">
@@ -1478,6 +1467,17 @@
<value>Normal,SansSerif,Full</value>
</prop>
</node>
+ <node oor:name="arimo" oor:op="replace">
+ <prop oor:name="SubstFonts">
+ <value>arial;liberationsans;albany;albanyamt;helvetica;</value>
+ </prop>
+ <prop oor:name="SubstFontsMS"><value>arial</value></prop>
+ <prop oor:name="SubstFontsPS"><value>helvetica</value></prop>
+ <prop oor:name="SubstFontsHTML"><value>sans-serif</value></prop>
+ <prop oor:name="FontWeight"><value>Normal</value></prop>
+ <prop oor:name="FontWidth"><value>Normal</value></prop>
+ <prop oor:name="FontType"><value>Standard,Normal,SansSerif</value></prop>
+ </node>
<node oor:name="arioso" oor:op="replace">
<prop oor:name="SubstFonts">
<value>palacescript;palacescriptmt;arioso;shelley;zapfchancery;itczapfchancery;monotypecorsiva;corsiva;chancery;chanceryl;lucidacalligraphy;lucidahandwriting;andymt;comicsansms;andy;kidprint;</value>
@@ -2394,7 +2394,7 @@
</node>
<node oor:name="courier" oor:op="replace">
<prop oor:name="SubstFonts">
- <value>cumberland;cumberlandamt;liberationmono;couriernew;nimbusmonol;lucidatypewriter;lucidasanstypewriter;monaco;monospaced;nimbusmono;nimbusmonol</value>
+ <value>cumberland;cumberlandamt;cousine;liberationmono;couriernew;nimbusmonol;lucidatypewriter;lucidasanstypewriter;monaco;monospaced;nimbusmono;nimbusmonol</value>
</prop>
<prop oor:name="SubstFontsMS"><value>Courier New</value></prop>
<prop oor:name="SubstFontsPS"><value></value></prop>
@@ -2405,9 +2405,19 @@
</node>
<node oor:name="couriernew" oor:op="replace">
<prop oor:name="SubstFonts">
- <value>cumberland;cumberlandamt;liberationmono;dejavusansmono;nimbusmonol;courier;lucidatypewriter;lucidasanstypewriter;monaco;monospaced;nimbusmono;nimbusmonol</value>
+ <value>cumberland;cumberlandamt;cousine;liberationmono;dejavusansmono;nimbusmonol;courier;lucidatypewriter;lucidasanstypewriter;monaco;monospaced;nimbusmono;nimbusmonol</value>
+ </prop>
+ <prop oor:name="SubstFontsPS"><value>Courier</value></prop>
+ <prop oor:name="SubstFontsHTML"><value>monospace</value></prop>
+ <prop oor:name="FontWeight"><value>Normal</value></prop>
+ <prop oor:name="FontWidth"><value>Normal</value></prop>
+ <prop oor:name="FontType"><value>Standard,Normal,Fixed,Typewriter</value></prop>
+ </node>
+ <node oor:name="cousine" oor:op="replace">
+ <prop oor:name="SubstFonts">
+ <value>couriernew;cumberland;cumberlandamt;liberationmono;courier</value>
</prop>
- <prop oor:name="SubstFontsMS"><value></value></prop>
+ <prop oor:name="SubstFontsMS"><value>Courier New</value></prop>
<prop oor:name="SubstFontsPS"><value>Courier</value></prop>
<prop oor:name="SubstFontsHTML"><value>monospace</value></prop>
<prop oor:name="FontWeight"><value>Normal</value></prop>
@@ -7287,7 +7297,6 @@
<prop oor:name="SubstFonts">
<value>thorndale;thorndaleamt;liberationserif;nimbusromanno9l;times;timesroman;newyork;timmons;lucidaserif;lucidabright;roman;nimbusromanno9;bookman;itcbookman;garamond;garamondmt;palatino</value>
</prop>
- <prop oor:name="SubstFontsMS"><value></value></prop>
<prop oor:name="SubstFontsPS"><value>Times</value></prop>
<prop oor:name="SubstFontsHTML"><value>serif</value></prop>
<prop oor:name="FontWeight"><value>Normal</value></prop>
@@ -7316,6 +7325,17 @@
<prop oor:name="FontWidth"><value>Normal</value></prop>
<prop oor:name="FontType"><value>Normal,Serif</value></prop>
</node>
+ <node oor:name="timos" oor:op="replace">
+ <prop oor:name="SubstFonts">
+ <value>timesnewroman;thorndale;thorndaleamt;liberationserif;nimbusromanno9l;times;timesroman;newyork;timmons</value>
+ </prop>
+ <prop oor:name="SubstFontsMS"><value>Times New Roman</value></prop>
+ <prop oor:name="SubstFontsPS"><value>Times</value></prop>
+ <prop oor:name="SubstFontsHTML"><value>serif</value></prop>
+ <prop oor:name="FontWeight"><value>Normal</value></prop>
+ <prop oor:name="FontWidth"><value>Normal</value></prop>
+ <prop oor:name="FontType"><value>Standard,Normal,Serif</value></prop>
+ </node>
<node oor:name="tmsrmn" oor:op="replace">
<prop oor:name="SubstFonts">
<value>thorndaleamt;thorndale;timesnewroman;liberationserif;nimbusromanno9l;times;timesroman;newyork;timmons;serif;lucidaserif;lucidabright;roman;nimbusromanno9;bookman;itcbookman;garamond;garamondmt;palatino</value>
diff --git a/postprocess/rebase/coffbase.txt b/postprocess/rebase/coffbase.txt
index 9098ab2810cf..16be8531d383 100755
--- a/postprocess/rebase/coffbase.txt
+++ b/postprocess/rebase/coffbase.txt
@@ -47,7 +47,7 @@ cli_uno.dll 0x0000000065c20000 0x00030000
collator_data.dll 0x0000000065aa0000 0x00170000
communimi.dll 0x0000000065a80000 0x00010000
comphelp4msc.dll 0x0000000065980000 0x000f0000
-configmgr2.uno.dll 0x0000000065800000 0x00170000
+configmgr.uno.dll 0x000000005adb0000 0x00070000
connector.uno.dll 0x00000000657e0000 0x00010000
cppcanvasmi.dll 0x0000000065780000 0x00050000
cppu3.dll 0x0000000065740000 0x00030000
@@ -126,11 +126,11 @@ i18nsearch.uno.dll 0x0000000063570000 0x00010000
i18nutilmsc.dll 0x0000000063540000 0x00020000
icdmi.dll 0x0000000063520000 0x00010000
icgmi.dll 0x00000000634f0000 0x00020000
-icudt36l.dll 0x0000000062b00000 0x009c0000
-icuin36.dll 0x0000000062a20000 0x000d0000
-icule36.dll 0x00000000629d0000 0x00040000
-icutu36.dll 0x00000000629a0000 0x00020000
-icuuc36.dll 0x00000000628b0000 0x000e0000
+icudt40.dll 0x0000000059bb0000 0x00d50000
+icuin40.dll 0x0000000059a90000 0x00110000
+icule40.dll 0x0000000059a40000 0x00040000
+icutu40.dll 0x0000000059a10000 0x00020000
+icuuc40.dll 0x0000000059910000 0x000f0000
idxmi.dll 0x0000000062880000 0x00020000
imemi.dll 0x0000000062860000 0x00010000
index_data.dll 0x00000000627c0000 0x00090000
@@ -180,8 +180,8 @@ localedata_others.dll 0x0000000061aa0000 0x000b0000
logmi.dll 0x0000000061a70000 0x00020000
lpsolve55.dll 0x0000000061970000 0x00070000
mcnttype.dll 0x0000000061950000 0x00010000
-mozab2.dll 0x0000000061900000 0x00020000
-mozabdrv2.dll 0x0000000061880000 0x00070000
+mozabmi.dll 0x00000000597a0000 0x00020000
+mozabdrvmi.dll 0x00000000597d0000 0x00070000
msci_uno.dll 0x0000000061860000 0x00010000
mysql2.dll 0x0000000061820000 0x00030000
namingservice.uno.dll 0x0000000061800000 0x00010000
@@ -348,3 +348,55 @@ npsoplugin.dll 0x000000005b0b0000 0x00010000
migrationoo2.uno.dll 0x000000005b080000 0x00020000
inprocserv.dll 0x000000005b060000 0x00010000
lngmi.dll 0x000000005af50000 0x00100000
+adomi.dll 0x000000005aea0000 0x00080000
+cppunit_dll.dll 0x000000005ad60000 0x00040000
+drawinglayermi.dll 0x000000005ac00000 0x00100000
+editengmi.dll 0x000000005aa80000 0x00170000
+formi.dll 0x000000005aa30000 0x00020000
+foruimi.dll 0x000000005a9f0000 0x00030000
+freebl3.dll 0x000000005a9a0000 0x00040000
+hsqldb.dll 0x000000005a950000 0x00040000
+i18npapermi.dll 0x000000005a930000 0x00010000
+jdbcmi.dll 0x00000000598b0000 0x00050000
+jpipx.dll 0x0000000059890000 0x00010000
+log_uno_uno.dll 0x0000000059870000 0x00010000
+migrationoo3.uno.dll 0x0000000059850000 0x00010000
+msfiltermi.dll 0x00000000596e0000 0x000b0000
+msformsmi.uno.dll 0x0000000059680000 0x00050000
+mswordmi.dll 0x0000000059560000 0x00110000
+mysqlcppconn.dll 0x00000000594c0000 0x00090000
+mysqlmi.dll 0x0000000059480000 0x00030000
+neon.dll 0x0000000059450000 0x00020000
+nspr4.dll 0x0000000059410000 0x00030000
+nss3.dll 0x0000000059330000 0x000d0000
+nssckbi.dll 0x00000000592c0000 0x00060000
+nssdbm3.dll 0x0000000059290000 0x00020000
+nssutil3.dll 0x0000000059260000 0x00020000
+odbcbasemi.dll 0x00000000591f0000 0x00060000
+odbcmi.dll 0x00000000591d0000 0x00010000
+ooofilt_x64.dll 0x0000000059130000 0x00090000
+oooimprovementmi.dll 0x0000000059100000 0x00020000
+plc4.dll 0x00000000590e0000 0x00010000
+plds4.dll 0x00000000590c0000 0x00010000
+propertyhdl.dll 0x0000000059070000 0x00040000
+propertyhdl_x64.dll 0x0000000058fe0000 0x00080000
+python26.dll 0x0000000058da0000 0x00230000
+rebase.dll 0x0000000058d50000 0x00040000
+reg64msi.dll 0x0000000058cc0000 0x00030000
+scfiltmi.dll 0x0000000058aa0000 0x001c0000
+sdfiltmi.dll 0x0000000058a20000 0x00070000
+shlxthdl_x64.dll 0x0000000058940000 0x000d0000
+smime3.dll 0x0000000058910000 0x00020000
+so_activex_x64.dll 0x00000000588c0000 0x00040000
+softokn3.dll 0x0000000058880000 0x00030000
+sqlite3.dll 0x00000000587c0000 0x00070000
+ssl3.dll 0x0000000058780000 0x00030000
+svxcoremi.dll 0x0000000058230000 0x00540000
+test.dll 0x0000000058120000 0x00010000
+test_converter.dll 0x0000000058100000 0x00010000
+ucpext.uno.dll 0x00000000580d0000 0x00020000
+ucpmyucp1.uno.dll 0x00000000580a0000 0x00020000
+vbaeventsmi.uno.dll 0x0000000058070000 0x00020000
+vbahelpermi.dll 0x0000000057fc0000 0x000a0000
+vbaswobjmi.uno.dll 0x0000000057ef0000 0x000c0000
+wpftmi.dll 0x0000000057e50000 0x00060000
diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index 5df3044bd6d3..26b3c48998f3 100644
--- a/sax/source/tools/converter.cxx
+++ b/sax/source/tools/converter.cxx
@@ -66,7 +66,7 @@ bool Converter::convertMeasure( sal_Int32& rValue,
bool bNeg = false;
double nVal = 0;
- sal_Int32 nPos = 0L;
+ sal_Int32 nPos = 0;
sal_Int32 nLen = rString.getLength();
// skip white space
@@ -579,7 +579,7 @@ bool Converter::convertNumber( sal_Int32& rValue,
bool bNeg = false;
rValue = 0;
- sal_Int32 nPos = 0L;
+ sal_Int32 nPos = 0;
sal_Int32 nLen = rString.getLength();
// skip white space
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index 8b2f48d8a2cc..2bb5922242cb 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -642,10 +642,10 @@ void ScDocumentPool::CheckRef( const SfxPoolItem& rItem ) // static
void ScDocumentPool::StyleDeleted( ScStyleSheet* pStyle )
{
- USHORT nCount = GetItemCount(ATTR_PATTERN);
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt32 nCount = GetItemCount2(ATTR_PATTERN);
+ for (sal_uInt32 i=0; i<nCount; i++)
{
- ScPatternAttr* pPattern = (ScPatternAttr*)GetItem(ATTR_PATTERN, i);
+ ScPatternAttr* pPattern = (ScPatternAttr*)GetItem2(ATTR_PATTERN, i);
if ( pPattern && pPattern->GetStyleSheet() == pStyle )
pPattern->StyleToName();
}
@@ -658,10 +658,12 @@ void ScDocumentPool::CellStyleCreated( const String& rName )
// Calling StyleSheetChanged isn't enough because the pool may still contain items
// for undo or clipboard content.
- sal_uInt16 nCount = GetItemCount(ATTR_PATTERN);
- for (sal_uInt16 i=0; i<nCount; i++)
+ sal_uInt32 nCount = GetItemCount2(ATTR_PATTERN);
+ for (sal_uInt32 i=0; i<nCount; i++)
{
- ScPatternAttr* pPattern = (ScPatternAttr*)GetItem(ATTR_PATTERN, i);
+ ScPatternAttr *const pPattern =
+ const_cast<ScPatternAttr*>(
+ static_cast<ScPatternAttr const*>(GetItem2(ATTR_PATTERN, i)));
if ( pPattern && pPattern->GetStyleSheet() == NULL )
{
const String* pStyleName = pPattern->GetStyleName();
diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index abef7d53c2af..37b3c830bb30 100644
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -694,14 +694,14 @@ void ScDocument::UpdateFontCharSet()
CharSet eSysSet = gsl_getSystemTextEncoding();
if ( eSrcSet != eSysSet || bUpdateOld )
{
- USHORT nCount,i;
+ sal_uInt32 nCount,i;
SvxFontItem* pItem;
ScDocumentPool* pPool = xPoolHelper->GetDocPool();
- nCount = pPool->GetItemCount(ATTR_FONT);
+ nCount = pPool->GetItemCount2(ATTR_FONT);
for (i=0; i<nCount; i++)
{
- pItem = (SvxFontItem*)pPool->GetItem(ATTR_FONT, i);
+ pItem = (SvxFontItem*)pPool->GetItem2(ATTR_FONT, i);
if ( pItem && ( pItem->GetCharSet() == eSrcSet ||
( bUpdateOld && pItem->GetCharSet() != RTL_TEXTENCODING_SYMBOL ) ) )
pItem->GetCharSet() = eSysSet;
@@ -710,10 +710,10 @@ void ScDocument::UpdateFontCharSet()
if ( pDrawLayer )
{
SfxItemPool& rDrawPool = pDrawLayer->GetItemPool();
- nCount = rDrawPool.GetItemCount(EE_CHAR_FONTINFO);
+ nCount = rDrawPool.GetItemCount2(EE_CHAR_FONTINFO);
for (i=0; i<nCount; i++)
{
- pItem = (SvxFontItem*)rDrawPool.GetItem(EE_CHAR_FONTINFO, i);
+ pItem = (SvxFontItem*)rDrawPool.GetItem2(EE_CHAR_FONTINFO, i);
if ( pItem && ( pItem->GetCharSet() == eSrcSet ||
( bUpdateOld && pItem->GetCharSet() != RTL_TEXTENCODING_SYMBOL ) ) )
pItem->GetCharSet() = eSysSet;
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 1efe32446eef..192e6f69bc67 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -4197,10 +4197,10 @@ bool ScDocument::HasAttrib( SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
ScDocumentPool* pPool = xPoolHelper->GetDocPool();
BOOL bAnyItem = FALSE;
- USHORT nRotCount = pPool->GetItemCount( ATTR_ROTATE_VALUE );
- for (USHORT nItem=0; nItem<nRotCount; nItem++)
+ sal_uInt32 nRotCount = pPool->GetItemCount2( ATTR_ROTATE_VALUE );
+ for (sal_uInt32 nItem=0; nItem<nRotCount; nItem++)
{
- const SfxPoolItem* pItem = pPool->GetItem( ATTR_ROTATE_VALUE, nItem );
+ const SfxPoolItem* pItem = pPool->GetItem2( ATTR_ROTATE_VALUE, nItem );
if ( pItem )
{
// 90 or 270 degrees is former SvxOrientationItem - only look for other values
@@ -4225,10 +4225,10 @@ bool ScDocument::HasAttrib( SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
ScDocumentPool* pPool = xPoolHelper->GetDocPool();
BOOL bHasRtl = FALSE;
- USHORT nDirCount = pPool->GetItemCount( ATTR_WRITINGDIR );
- for (USHORT nItem=0; nItem<nDirCount; nItem++)
+ sal_uInt32 nDirCount = pPool->GetItemCount2( ATTR_WRITINGDIR );
+ for (sal_uInt32 nItem=0; nItem<nDirCount; nItem++)
{
- const SfxPoolItem* pItem = pPool->GetItem( ATTR_WRITINGDIR, nItem );
+ const SfxPoolItem* pItem = pPool->GetItem2( ATTR_WRITINGDIR, nItem );
if ( pItem && ((const SvxFrameDirectionItem*)pItem)->GetValue() == FRMDIR_HORI_RIGHT_TOP )
{
bHasRtl = TRUE;
@@ -4939,11 +4939,11 @@ void ScDocument::UpdStlShtPtrsFrmNms()
ScDocumentPool* pPool = xPoolHelper->GetDocPool();
- USHORT nCount = pPool->GetItemCount(ATTR_PATTERN);
+ sal_uInt32 nCount = pPool->GetItemCount2(ATTR_PATTERN);
ScPatternAttr* pPattern;
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt32 i=0; i<nCount; i++)
{
- pPattern = (ScPatternAttr*)pPool->GetItem(ATTR_PATTERN, i);
+ pPattern = (ScPatternAttr*)pPool->GetItem2(ATTR_PATTERN, i);
if (pPattern)
pPattern->UpdateStyleSheet();
}
@@ -4957,11 +4957,11 @@ void ScDocument::StylesToNames()
ScDocumentPool* pPool = xPoolHelper->GetDocPool();
- USHORT nCount = pPool->GetItemCount(ATTR_PATTERN);
+ sal_uInt32 nCount = pPool->GetItemCount2(ATTR_PATTERN);
ScPatternAttr* pPattern;
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt32 i=0; i<nCount; i++)
{
- pPattern = (ScPatternAttr*)pPool->GetItem(ATTR_PATTERN, i);
+ pPattern = (ScPatternAttr*)pPool->GetItem2(ATTR_PATTERN, i);
if (pPattern)
pPattern->StyleToName();
}
diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx
index 99da4979a1b6..12b4bb27950d 100644
--- a/sc/source/core/data/fillinfo.cxx
+++ b/sc/source/core/data/fillinfo.cxx
@@ -272,9 +272,9 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
// Attribut im Dokument ueberhaupt verwendet?
BOOL bAnyItem = FALSE;
- USHORT nRotCount = pPool->GetItemCount( ATTR_ROTATE_VALUE );
- for (USHORT nItem=0; nItem<nRotCount; nItem++)
- if (pPool->GetItem( ATTR_ROTATE_VALUE, nItem ))
+ sal_uInt32 nRotCount = pPool->GetItemCount2( ATTR_ROTATE_VALUE );
+ for (sal_uInt32 nItem=0; nItem<nRotCount; nItem++)
+ if (pPool->GetItem2( ATTR_ROTATE_VALUE, nItem ))
{
bAnyItem = TRUE;
break;
diff --git a/sc/source/filter/excel/xiname.cxx b/sc/source/filter/excel/xiname.cxx
index 5d21d91c9f53..3d373f6c36ba 100644
--- a/sc/source/filter/excel/xiname.cxx
+++ b/sc/source/filter/excel/xiname.cxx
@@ -45,6 +45,7 @@ XclImpName::XclImpName( XclImpStream& rStrm, sal_uInt16 nXclNameIdx ) :
mpScData( 0 ),
mcBuiltIn( EXC_BUILTIN_UNKNOWN ),
mnScTab( SCTAB_MAX ),
+ mbFunction( false ),
mbVBName( false )
{
ExcelToSc& rFmlaConv = GetOldFmlaConverter();
@@ -93,7 +94,8 @@ XclImpName::XclImpName( XclImpStream& rStrm, sal_uInt16 nXclNameIdx ) :
// 2) *** convert sheet index and name *** --------------------------------
- // Visual Basic procedure
+ // functions and VBA
+ mbFunction = ::get_flag( nFlags, EXC_NAME_FUNC );
mbVBName = ::get_flag( nFlags, EXC_NAME_VB );
// get built-in name, or convert characters invalid in Calc
@@ -210,7 +212,7 @@ XclImpName::XclImpName( XclImpStream& rStrm, sal_uInt16 nXclNameIdx ) :
// 4) *** create a defined name in the Calc document *** ------------------
// #163146# do not ignore hidden names (may be regular names created by VBA scripts)
- if( pTokArr /*&& (bBuiltIn || !::get_flag( nFlags, EXC_NAME_HIDDEN ))*/ && !mbVBName )
+ if( pTokArr /*&& (bBuiltIn || !::get_flag( nFlags, EXC_NAME_HIDDEN ))*/ && !mbFunction && !mbVBName )
{
// create the Calc name data
ScRangeData* pData = new ScRangeData( GetDocPtr(), maScName, *pTokArr, ScAddress(), nNameType );
diff --git a/sc/source/filter/inc/xiname.hxx b/sc/source/filter/inc/xiname.hxx
index ccf1b88af947..b5d9ca642d4f 100644
--- a/sc/source/filter/inc/xiname.hxx
+++ b/sc/source/filter/inc/xiname.hxx
@@ -50,6 +50,7 @@ public:
inline SCTAB GetScTab() const { return mnScTab; }
inline const ScRangeData* GetScRangeData() const { return mpScData; }
inline bool IsGlobal() const { return mnScTab == SCTAB_MAX; }
+ inline bool IsFunction() const { return mbFunction; }
inline bool IsVBName() const { return mbVBName; }
private:
@@ -58,7 +59,8 @@ private:
const ScRangeData* mpScData; /// Pointer to Calc defined name (no ownership).
sal_Unicode mcBuiltIn; /// Excel built-in name index.
SCTAB mnScTab; /// Calc sheet index of local names.
- bool mbVBName; /// true = Visual Basic procedure.
+ bool mbFunction; /// true = Name refers to a function (add-in or VBA).
+ bool mbVBName; /// true = Visual Basic procedure or function.
};
// ----------------------------------------------------------------------------
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index ca5403e3b18d..bfd9b2b69dae 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -4389,10 +4389,10 @@ XMLNumberFormatAttributesExportHelper* ScXMLExport::GetNumberFormatAttributesExp
void ScXMLExport::CollectUserDefinedNamespaces(const SfxItemPool* pPool, sal_uInt16 nAttrib)
{
const SfxPoolItem* pItem;
- sal_uInt16 nItems(pPool->GetItemCount( nAttrib ));
- for( sal_uInt16 i = 0; i < nItems; ++i )
+ sal_uInt32 nItems(pPool->GetItemCount2( nAttrib ));
+ for( sal_uInt32 i = 0; i < nItems; ++i )
{
- if( 0 != (pItem = pPool->GetItem( nAttrib, i ) ) )
+ if( 0 != (pItem = pPool->GetItem2( nAttrib, i ) ) )
{
const SvXMLAttrContainerItem *pUnknown((const SvXMLAttrContainerItem *)pItem);
if( (pUnknown->GetAttrCount() > 0) )
diff --git a/sc/source/filter/xml/xmlfonte.cxx b/sc/source/filter/xml/xmlfonte.cxx
index 5cbb2604581f..50fe06e9629c 100644
--- a/sc/source/filter/xml/xmlfonte.cxx
+++ b/sc/source/filter/xml/xmlfonte.cxx
@@ -70,10 +70,10 @@ void ScXMLFontAutoStylePool_Impl::AddFontItems(sal_uInt16* pWhichIds, sal_uInt8
sal::static_int_cast<sal_Int16>(pFont->GetPitch()),
pFont->GetCharSet() );
}
- sal_uInt16 nItems(pItemPool->GetItemCount( nWhichId ));
- for( sal_uInt16 j = 0; j < nItems; ++j )
+ sal_uInt32 nItems(pItemPool->GetItemCount2( nWhichId ));
+ for( sal_uInt32 j = 0; j < nItems; ++j )
{
- if( 0 != (pItem = pItemPool->GetItem( nWhichId, j ) ) )
+ if( 0 != (pItem = pItemPool->GetItem2( nWhichId, j ) ) )
{
const SvxFontItem *pFont((const SvxFontItem *)pItem);
Add( pFont->GetFamilyName(), pFont->GetStyleName(),
@@ -113,11 +113,11 @@ ScXMLFontAutoStylePool_Impl::ScXMLFontAutoStylePool_Impl(
for (sal_uInt8 j = 0; j < 4; ++j)
{
sal_uInt16 nPageWhichId(aPageWhichIds[j]);
- sal_uInt16 nPageHFItems(rPagePool.GetItemCount(nPageWhichId));
+ sal_uInt32 nPageHFItems(rPagePool.GetItemCount2(nPageWhichId));
const ScPageHFItem* pPageItem;
- for (sal_uInt16 k = 0; k < nPageHFItems; ++k)
+ for (sal_uInt32 k = 0; k < nPageHFItems; ++k)
{
- if (0 != (pPageItem = static_cast<const ScPageHFItem*>(rPagePool.GetItem(nPageWhichId, k))))
+ if (0 != (pPageItem = static_cast<const ScPageHFItem*>(rPagePool.GetItem2(nPageWhichId, k))))
{
const EditTextObject* pLeftArea(pPageItem->GetLeftArea());
if (pLeftArea)
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 36b6641d94a6..fc8ba28a217e 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -2806,7 +2806,7 @@ BOOL ScDocFunc::DeleteTable( SCTAB nTab, BOOL bRecord, BOOL /* bApi */ )
if (bRecord)
{
SvShorts theTabs;
- theTabs.Insert(nTab,theTabs.Count());
+ theTabs.push_back(nTab);
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoDeleteTab( &rDocShell, theTabs, pUndoDoc, pUndoData ));
}
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index 84979e3dbcdf..013511ab0acb 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -891,8 +891,8 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec
{
SvShorts aSrcList;
SvShorts aDestList;
- aSrcList.Insert(nSrcTab,0);
- aDestList.Insert(nDestTab,0);
+ aSrcList.push_front(nSrcTab);
+ aDestList.push_front(nDestTab);
GetUndoManager()->AddUndoAction(
new ScUndoCopyTab( this, aSrcList, aDestList ) );
}
@@ -950,8 +950,8 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec
{
SvShorts aSrcList;
SvShorts aDestList;
- aSrcList.Insert(nSrcTab,0);
- aDestList.Insert(nDestTab,0);
+ aSrcList.push_front(nSrcTab);
+ aDestList.push_front(nDestTab);
GetUndoManager()->AddUndoAction(
new ScUndoMoveTab( this, aSrcList, aDestList ) );
}
diff --git a/sc/source/ui/docshell/makefile.mk b/sc/source/ui/docshell/makefile.mk
index 99a7495b6b49..af45c63c2cdf 100644
--- a/sc/source/ui/docshell/makefile.mk
+++ b/sc/source/ui/docshell/makefile.mk
@@ -98,6 +98,7 @@ EXCEPTIONSFILES= \
$(SLO)$/docsh.obj \
$(SLO)$/docsh3.obj \
$(SLO)$/docsh4.obj \
+ $(SLO)$/docsh5.obj \
$(SLO)$/docsh8.obj \
$(SLO)$/externalrefmgr.obj \
$(SLO)$/dbdocimp.obj \
diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx
index 361f201281dc..89f818e21928 100644
--- a/sc/source/ui/miscdlgs/conflictsdlg.cxx
+++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx
@@ -36,7 +36,7 @@
#include "conflictsdlg.hrc"
#include "scresid.hxx"
#include "viewdata.hxx"
-#include "tabview.hxx"
+#include "dbfunc.hxx"
//=============================================================================
@@ -660,7 +660,7 @@ IMPL_LINK( ScConflictsDlg, UpdateSelectionHdl, Timer*, EMPTYARG )
return 0;
}
- ScTabView* pTabView = reinterpret_cast< ScTabView* >( mpViewData->GetView() );
+ ScTabView* pTabView = mpViewData->GetView();
pTabView->DoneBlockMode();
BOOL bContMark = FALSE;
SvLBoxEntry* pEntry = maLbConflicts.FirstSelected();
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 70845f6c0bc9..d9acc34bf28c 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -252,11 +252,11 @@ void ScUndoInsertTables::Undo()
SvShorts TheTabs;
for(int i=0;i<pNameList->Count();i++)
{
- TheTabs.Insert( sal::static_int_cast<short>(nTab+i), TheTabs.Count() );
+ TheTabs.push_back( sal::static_int_cast<short>(nTab+i) );
}
pViewShell->DeleteTables( TheTabs, FALSE );
- TheTabs.Remove(0,TheTabs.Count());
+ TheTabs.clear();
bDrawIsInUndo = FALSE;
pDocShell->SetInUndo( FALSE ); //! EndUndo
@@ -310,15 +310,14 @@ ScUndoDeleteTab::ScUndoDeleteTab( ScDocShell* pNewDocShell,const SvShorts &aTab,
ScDocument* pUndoDocument, ScRefUndoData* pRefData ) :
ScMoveUndo( pNewDocShell, pUndoDocument, pRefData, SC_UNDO_REFLAST )
{
- for(int i=0;i<aTab.Count();i++)
- theTabs.Insert(aTab[sal::static_int_cast<USHORT>(i)],theTabs.Count());
+ theTabs=aTab;
SetChangeTrack();
}
ScUndoDeleteTab::~ScUndoDeleteTab()
{
- theTabs.Remove(0,theTabs.Count());
+ theTabs.clear();
}
String ScUndoDeleteTab::GetComment() const
@@ -335,7 +334,7 @@ void ScUndoDeleteTab::SetChangeTrack()
nStartChangeAction = pChangeTrack->GetActionMax() + 1;
nEndChangeAction = 0;
ScRange aRange( 0, 0, 0, MAXCOL, MAXROW, 0 );
- for ( int i = 0; i < theTabs.Count(); i++ )
+ for ( size_t i = 0; i < theTabs.size(); i++ )
{
aRange.aStart.SetTab( theTabs[sal::static_int_cast<USHORT>(i)] );
aRange.aEnd.SetTab( theTabs[sal::static_int_cast<USHORT>(i)] );
@@ -358,13 +357,13 @@ SCTAB lcl_GetVisibleTabBefore( ScDocument& rDoc, SCTAB nTab )
void ScUndoDeleteTab::Undo()
{
BeginUndo();
- int i=0;
+ size_t i=0;
ScDocument* pDoc = pDocShell->GetDocument();
BOOL bLink = FALSE;
String aName;
- for(i=0;i<theTabs.Count();i++)
+ for(i=0;i<theTabs.size();i++)
{
SCTAB nTab = theTabs[sal::static_int_cast<USHORT>(i)];
pRefUndoDoc->GetName( nTab, aName );
@@ -422,7 +421,7 @@ void ScUndoDeleteTab::Undo()
if ( pChangeTrack )
pChangeTrack->Undo( nStartChangeAction, nEndChangeAction );
- for(i=0;i<theTabs.Count();i++)
+ for(i=0;i<theTabs.size();i++)
{
pDocShell->Broadcast( ScTablesHint( SC_TAB_INSERTED, theTabs[sal::static_int_cast<USHORT>(i)]) );
}
@@ -436,7 +435,7 @@ void ScUndoDeleteTab::Undo()
// nicht ShowTable wegen SetTabNo(..., TRUE):
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
- pViewShell->SetTabNo( lcl_GetVisibleTabBefore( *pDoc, theTabs[0] ), TRUE );
+ pViewShell->SetTabNo( lcl_GetVisibleTabBefore( *pDoc, theTabs.front() ), TRUE );
// EndUndo();
}
@@ -444,7 +443,7 @@ void ScUndoDeleteTab::Undo()
void ScUndoDeleteTab::Redo()
{
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- pViewShell->SetTabNo( lcl_GetVisibleTabBefore( *pDocShell->GetDocument(), theTabs[0] ) );
+ pViewShell->SetTabNo( lcl_GetVisibleTabBefore( *pDocShell->GetDocument(), theTabs.front() ) );
RedoSdrUndoAction( pDrawUndo ); // Draw Redo first
@@ -548,18 +547,14 @@ ScUndoMoveTab::ScUndoMoveTab( ScDocShell* pNewDocShell,
const SvShorts &aNewTab) :
ScSimpleUndo( pNewDocShell )
{
- int i;
- for(i=0;i<aOldTab.Count();i++)
- theOldTabs.Insert(aOldTab[sal::static_int_cast<USHORT>(i)],theOldTabs.Count());
-
- for(i=0;i<aNewTab.Count();i++)
- theNewTabs.Insert(aNewTab[sal::static_int_cast<USHORT>(i)],theNewTabs.Count());
+ theOldTabs=aOldTab;
+ theNewTabs=aNewTab;
}
ScUndoMoveTab::~ScUndoMoveTab()
{
- theNewTabs.Remove(0,theNewTabs.Count());
- theOldTabs.Remove(0,theOldTabs.Count());
+ theNewTabs.clear();
+ theOldTabs.clear();
}
String ScUndoMoveTab::GetComment() const
@@ -574,11 +569,11 @@ void ScUndoMoveTab::DoChange( BOOL bUndo ) const
if (bUndo) // UnDo
{
- for(int i=theNewTabs.Count()-1;i>=0;i--)
+ for (size_t i = theNewTabs.size(); i > 0; i--)
{
- SCTAB nDestTab = theNewTabs[sal::static_int_cast<USHORT>(i)];
- SCTAB nOldTab = theOldTabs[sal::static_int_cast<USHORT>(i)];
- if (nDestTab > MAXTAB) // angehaengt ?
+ SCTAB nDestTab = theNewTabs[i - 1];
+ SCTAB nOldTab = theOldTabs[i - 1];
+ if (nDestTab > MAXTAB) // append ?
nDestTab = pDoc->GetTableCount() - 1;
pDoc->MoveTab( nDestTab, nOldTab );
@@ -588,12 +583,12 @@ void ScUndoMoveTab::DoChange( BOOL bUndo ) const
}
else
{
- for(int i=0;i<theNewTabs.Count();i++)
+ for(size_t i=0;i<theNewTabs.size();i++)
{
- SCTAB nDestTab = theNewTabs[sal::static_int_cast<USHORT>(i)];
- SCTAB nNewTab = theNewTabs[sal::static_int_cast<USHORT>(i)];
- SCTAB nOldTab = theOldTabs[sal::static_int_cast<USHORT>(i)];
- if (nDestTab > MAXTAB) // angehaengt ?
+ SCTAB nDestTab = theNewTabs[i];
+ SCTAB nNewTab = theNewTabs[i];
+ SCTAB nOldTab = theOldTabs[i];
+ if (nDestTab > MAXTAB) // append ?
nDestTab = pDoc->GetTableCount() - 1;
pDoc->MoveTab( nOldTab, nNewTab );
@@ -621,7 +616,7 @@ void ScUndoMoveTab::Redo()
void ScUndoMoveTab::Repeat(SfxRepeatTarget& /* rTarget */)
{
- // kein Repeat ! ? !
+ // No Repeat ! ? !
}
BOOL ScUndoMoveTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const
@@ -632,7 +627,7 @@ BOOL ScUndoMoveTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const
//----------------------------------------------------------------------------------
//
-// Tabelle kopieren
+// Copy table
//
ScUndoCopyTab::ScUndoCopyTab( ScDocShell* pNewDocShell,
@@ -643,12 +638,8 @@ ScUndoCopyTab::ScUndoCopyTab( ScDocShell* pNewDocShell,
{
pDrawUndo = GetSdrUndoAction( pDocShell->GetDocument() );
- int i;
- for(i=0;i<aOldTab.Count();i++)
- theOldTabs.Insert(aOldTab[sal::static_int_cast<USHORT>(i)],theOldTabs.Count());
-
- for(i=0;i<aNewTab.Count();i++)
- theNewTabs.Insert(aNewTab[sal::static_int_cast<USHORT>(i)],theNewTabs.Count());
+ theOldTabs=aOldTab;
+ theNewTabs=aNewTab;
}
ScUndoCopyTab::~ScUndoCopyTab()
@@ -666,7 +657,7 @@ void ScUndoCopyTab::DoChange() const
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
- pViewShell->SetTabNo(theOldTabs[0],TRUE);
+ pViewShell->SetTabNo(theOldTabs.front(),TRUE);
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); // Navigator
@@ -681,10 +672,9 @@ void ScUndoCopyTab::Undo()
DoSdrUndoAction( pDrawUndo, pDoc ); // before the sheets are deleted
- int i;
- for(i=theNewTabs.Count()-1;i>=0;i--)
+ for (size_t i = theNewTabs.size(); i > 0; i--)
{
- SCTAB nDestTab = theNewTabs[sal::static_int_cast<USHORT>(i)];
+ SCTAB nDestTab = theNewTabs[i - 1];
if (nDestTab > MAXTAB) // append?
nDestTab = pDoc->GetTableCount() - 1;
@@ -696,9 +686,9 @@ void ScUndoCopyTab::Undo()
// ScTablesHint broadcasts after all sheets have been deleted,
// so sheets and draw pages are in sync!
- for(i=theNewTabs.Count()-1;i>=0;i--)
+ for (size_t i = theNewTabs.size(); i > 0; i--)
{
- SCTAB nDestTab = theNewTabs[sal::static_int_cast<USHORT>(i)];
+ SCTAB nDestTab = theNewTabs[i - 1];
if (nDestTab > MAXTAB) // append?
nDestTab = pDoc->GetTableCount() - 1;
@@ -714,12 +704,12 @@ void ScUndoCopyTab::Redo()
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
SCTAB nDestTab = 0;
- for(int i=0;i<theNewTabs.Count();i++)
+ for(size_t i=0;i<theNewTabs.size();i++)
{
- nDestTab = theNewTabs[sal::static_int_cast<USHORT>(i)];
- SCTAB nNewTab = theNewTabs[sal::static_int_cast<USHORT>(i)];
- SCTAB nOldTab = theOldTabs[sal::static_int_cast<USHORT>(i)];
- if (nDestTab > MAXTAB) // angehaengt ?
+ nDestTab = theNewTabs[i];
+ SCTAB nNewTab = theNewTabs[i];
+ SCTAB nOldTab = theOldTabs[i];
+ if (nDestTab > MAXTAB) // append ?
nDestTab = pDoc->GetTableCount() - 1;
bDrawIsInUndo = TRUE;
diff --git a/sc/source/ui/unoobj/defltuno.cxx b/sc/source/ui/unoobj/defltuno.cxx
index f3f76685e5cb..c0faf59fa51b 100644
--- a/sc/source/ui/unoobj/defltuno.cxx
+++ b/sc/source/ui/unoobj/defltuno.cxx
@@ -377,7 +377,7 @@ uno::Any SAL_CALL ScDocDefaultsObj::getPropertyDefault( const rtl::OUString& aPr
if (pEntry->nWID)
{
ScDocumentPool* pPool = pDocShell->GetDocument()->GetPool();
- const SfxPoolItem* pItem = pPool->GetItem( pEntry->nWID, SFX_ITEMS_STATICDEFAULT );
+ const SfxPoolItem* pItem = pPool->GetItem2( pEntry->nWID, SFX_ITEMS_DEFAULT );
if (pItem)
pItem->QueryValue( aRet, pEntry->nMemberId );
}
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 3d3f0f479601..c92525b8ca57 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -815,6 +815,16 @@ BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection,
rMark.MarkFromRangeList( rRanges, FALSE );
rMark.MarkToSimple();
+ if ( rMark.IsMultiMarked() )
+ {
+ // #i115266# copy behavior of old printing:
+ // treat multiple selection like a single selection with the enclosing range
+ ScRange aMultiMarkArea;
+ rMark.GetMultiMarkArea( aMultiMarkArea );
+ rMark.ResetMark();
+ rMark.SetMarkArea( aMultiMarkArea );
+ }
+
if ( rMark.IsMarked() && !rMark.IsMultiMarked() )
{
// a sheet object is treated like an empty selection: print the used area of the sheet
@@ -974,15 +984,17 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32
ScMarkData aMark;
ScPrintSelectionStatus aStatus;
String aPagesStr;
- if ( !FillRenderMarkData( aSelection, rOptions, aMark, aStatus, aPagesStr ) )
- throw lang::IllegalArgumentException();
-
- if ( !pPrintFuncCache || !pPrintFuncCache->IsSameSelection( aStatus ) )
+ // #i115266# if FillRenderMarkData fails, keep nTotalPages at 0, but still handle getRenderer(0) below
+ long nTotalPages = 0;
+ if ( FillRenderMarkData( aSelection, rOptions, aMark, aStatus, aPagesStr ) )
{
- delete pPrintFuncCache;
- pPrintFuncCache = new ScPrintFuncCache( pDocShell, aMark, aStatus );
+ if ( !pPrintFuncCache || !pPrintFuncCache->IsSameSelection( aStatus ) )
+ {
+ delete pPrintFuncCache;
+ pPrintFuncCache = new ScPrintFuncCache( pDocShell, aMark, aStatus );
+ }
+ nTotalPages = pPrintFuncCache->GetPageCount();
}
- long nTotalPages = pPrintFuncCache->GetPageCount();
sal_Int32 nRenderer = lcl_GetRendererNum( nSelRenderer, aPagesStr, nTotalPages );
if ( nRenderer >= nTotalPages )
{
diff --git a/sc/source/ui/view/pfuncache.cxx b/sc/source/ui/view/pfuncache.cxx
index 6a206ef3eb13..b503d3a73fb7 100644
--- a/sc/source/ui/view/pfuncache.cxx
+++ b/sc/source/ui/view/pfuncache.cxx
@@ -72,6 +72,8 @@ ScPrintFuncCache::ScPrintFuncCache( ScDocShell* pD, const ScMarkData& rMark,
long nThisTab = 0;
if ( rMark.GetTableSelect( nTab ) )
{
+ pDoc->InvalidatePageBreaks( nTab ); // user print area (selection) may be different
+
ScPrintFunc aFunc( pDocSh, pPrinter, nTab, nAttrPage, 0, pSelRange, &aSelection.GetOptions() );
nThisTab = aFunc.GetTotalPages();
nFirstAttr[nTab] = aFunc.GetFirstPageNo(); // from page style or previous sheet
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index db1ee8864c7b..37c1b0ab1e84 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -648,7 +648,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
{
if(rMark.GetTableSelect(i) &&!pDoc->IsTabProtected(i))
{
- TheTabs.Insert(i,TheTabs.Count());
+ TheTabs.push_back(i);
bTabFlag=TRUE;
if(nNewTab==i) nNewTab++;
}
@@ -658,7 +658,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
pViewData->SetTabNo(nNewTab);
DeleteTables(TheTabs);
- TheTabs.Remove(0,TheTabs.Count());
+ TheTabs.clear();
rReq.Done();
}
}
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index a125cbea6f50..e73eabff4237 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -2148,8 +2148,7 @@ BOOL ScViewFunc::DeleteTables(const SvShorts &TheTabs, BOOL bRecord )
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
BOOL bVbaEnabled = pDoc ? pDoc->IsInVBAMode() : FALSE;
- SCTAB nNewTab = TheTabs[0];
- int i;
+ SCTAB nNewTab = TheTabs.front();
WaitObject aWait( GetFrameWin() );
if (bRecord && !pDoc->IsUndoEnabled())
bRecord = FALSE;
@@ -2169,9 +2168,9 @@ BOOL ScViewFunc::DeleteTables(const SvShorts &TheTabs, BOOL bRecord )
// pUndoDoc->InitUndo( pDoc, 0, nCount-1 ); // incl. Ref.
String aOldName;
- for(i=0;i<TheTabs.Count();i++)
+ for (size_t i = 0; i < TheTabs.size(); i++)
{
- SCTAB nTab = TheTabs[sal::static_int_cast<USHORT>(i)];
+ SCTAB nTab = TheTabs[i];
if (i==0)
pUndoDoc->InitUndo( pDoc, nTab,nTab, TRUE,TRUE ); // incl. Spalten/Zeilenflags
else
@@ -2219,11 +2218,11 @@ BOOL ScViewFunc::DeleteTables(const SvShorts &TheTabs, BOOL bRecord )
BOOL bDelDone = FALSE;
- for(i=TheTabs.Count()-1;i>=0;i--)
+ for (size_t i = TheTabs.size(); i > 0; i--)
{
String sCodeName;
- BOOL bHasCodeName = pDoc->GetCodeName( TheTabs[sal::static_int_cast<USHORT>(i)], sCodeName );
- if (pDoc->DeleteTab( TheTabs[sal::static_int_cast<USHORT>(i)], pUndoDoc ))
+ BOOL bHasCodeName = pDoc->GetCodeName( TheTabs[i-1], sCodeName );
+ if (pDoc->DeleteTab( TheTabs[i-1], pUndoDoc ))
{
bDelDone = TRUE;
if( bVbaEnabled )
@@ -2233,7 +2232,7 @@ BOOL ScViewFunc::DeleteTables(const SvShorts &TheTabs, BOOL bRecord )
VBA_DeleteModule( *pDocSh, sCodeName );
}
}
- pDocSh->Broadcast( ScTablesHint( SC_TAB_DELETED, TheTabs[sal::static_int_cast<USHORT>(i)] ) );
+ pDocSh->Broadcast( ScTablesHint( SC_TAB_DELETED, TheTabs[i-1] ) );
}
}
if (bRecord)
@@ -2583,13 +2582,13 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy )
{
String aTabName;
pDoc->GetName( i, aTabName);
- TheTabs.Insert(i,TheTabs.Count());
+ TheTabs.push_back(i);
for(SCTAB j=i+1;j<nTabCount;j++)
{
if((!pDoc->IsVisible(j))&&(pDoc->IsScenario(j)))
{
pDoc->GetName( j, aTabName);
- TheTabs.Insert(j,TheTabs.Count());
+ TheTabs.push_back(j);
i=j;
}
else break;
@@ -2609,7 +2608,7 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy )
if(nDestTab==SC_TAB_APPEND)
nDestTab=pDestDoc->GetTableCount();
SCTAB nDestTab1=nDestTab;
- for( USHORT j=0; j<TheTabs.Count(); j++, nDestTab1++ )
+ for( size_t j=0; j<TheTabs.size(); j++, nDestTab1++ )
{ // #63304# insert sheets first and update all references
String aName;
pDoc->GetName( TheTabs[j], aName );
@@ -2623,7 +2622,7 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy )
if ( nErrVal > 0 )
{
nDestTab1 = nDestTab;
- for(USHORT i=0;i<TheTabs.Count();i++)
+ for(size_t i=0;i<TheTabs.size();i++)
{
nErrVal = pDestDoc->TransferTab( pDoc, TheTabs[i], nDestTab1,
FALSE ); // no insert
@@ -2661,7 +2660,7 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy )
pDestDoc->GetName(nDestTab, sName);
pDestShell->GetUndoManager()->AddUndoAction(
new ScUndoImportTab( pDestShell, nDestTab,
- static_cast<SCTAB>(TheTabs.Count()), FALSE));
+ static_cast<SCTAB>(TheTabs.size()), FALSE));
}
else
@@ -2714,7 +2713,7 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy )
if ( pDestDoc->IsChartListenerCollectionNeedsUpdate() )
pDestDoc->UpdateChartListenerCollection();
- pDestDoc->DeleteTab(static_cast<SCTAB>(TheTabs.Count())); // alte erste Tabelle
+ pDestDoc->DeleteTab(static_cast<SCTAB>(TheTabs.size())); // first old table
//? pDestDoc->SelectTable(0, TRUE); // neue erste Tabelle selektieren
if (pDestViewSh)
pDestViewSh->TabChanged(); // Pages auf dem Drawing-Layer
@@ -2730,12 +2729,12 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy )
pDestShell->PostPaintGridAll();
}
- TheTabs.Remove(0,TheTabs.Count());
+ TheTabs.clear();
pDestShell->SetDocumentModified();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
}
- else // innerhalb des Dokuments
+ else // within the documents
{
ScMarkData& rMark = GetViewData()->GetMarkData();
@@ -2804,7 +2803,7 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy )
pDoc->SetVisible(nDestTab1,bVisible );
}
- TheTabs.Insert(nMovTab,TheTabs.Count());
+ TheTabs.push_back(nMovTab);
if(!bCopy)
{
@@ -2814,7 +2813,7 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy )
}
}
- TheDestTabs.Insert(nDestTab1,TheDestTabs.Count());
+ TheDestTabs.push_back(nDestTab1);
delete pString;
}
diff --git a/scp2/source/javafilter/registryitem_javafilter.scp b/scp2/source/javafilter/registryitem_javafilter.scp
index 1340d637e009..3626d914bef4 100644
--- a/scp2/source/javafilter/registryitem_javafilter.scp
+++ b/scp2/source/javafilter/registryitem_javafilter.scp
@@ -46,7 +46,7 @@ RegistryItem gid_Regitem_Clsid__43887c67_4d5d_4127_Baac_87a288494c7c__Inprocserv
ParentID = PREDEFINED_HKEY_CLASSES_ROOT;
Subkey = "CLSID\{43887C67-4D5D-4127-BAAC-87A288494C7C}\InProcServer32";
ModuleID = gid_Module_Optional_Javafilter_Pocketpc_Pocket_Excel;
- Value = "[INSTALLLOCATION]Basis\program\xmergesync.dll";
+ Value = "[INSTALLLOCATION]program\xmergesync.dll";
End
RegistryItem gid_Regitem_Clsid__43887c67_4d5d_4127_Baac_87a288494c7c__Inprocserver32_Threadingmodel
@@ -106,7 +106,7 @@ RegistryItem gid_Regitem_Clsid__Bdd611c3_7bab_460f_8711_5b9ac9ef6020__Inprocserv
ParentID = PREDEFINED_HKEY_CLASSES_ROOT;
Subkey = "CLSID\{BDD611C3-7BAB-460F-8711-5B9AC9EF6020}\InProcServer32";
ModuleID = gid_Module_Optional_Javafilter_Pocketpc_Pocket_Word;
- Value = "[INSTALLLOCATION]Basis\program\xmergesync.dll";
+ Value = "[INSTALLLOCATION]program\xmergesync.dll";
End
RegistryItem gid_Regitem_Clsid__Bdd611c3_7bab_460f_8711_5b9ac9ef6020__Inprocserver32_Threadingmodel
@@ -166,7 +166,7 @@ RegistryItem gid_Regitem_Clsid__C6ab3e74_9f4f_4370_8120_A8a6fabb7a7c__Inprocserv
ParentID = PREDEFINED_HKEY_CLASSES_ROOT;
Subkey = "CLSID\{C6AB3E74-9F4F-4370-8120-A8A6FABB7A7C}\InProcServer32";
ModuleID = gid_Module_Optional_Javafilter_Pocketpc_Pocket_Excel;
- Value = "[INSTALLLOCATION]Basis\program\xmergesync.dll";
+ Value = "[INSTALLLOCATION]program\xmergesync.dll";
End
RegistryItem gid_Regitem_Clsid__C6ab3e74_9f4f_4370_8120_A8a6fabb7a7c__Inprocserver32_Threadingmodel
@@ -226,7 +226,7 @@ RegistryItem gid_Regitem_Clsid__Cb43f086_838d_4fa4_B5f6_3406b9a57439__Inprocserv
ParentID = PREDEFINED_HKEY_CLASSES_ROOT;
Subkey = "CLSID\{CB43F086-838D-4FA4-B5F6-3406B9A57439}\InProcServer32";
ModuleID = gid_Module_Optional_Javafilter_Pocketpc_Pocket_Word;
- Value = "[INSTALLLOCATION]Basis\program\xmergesync.dll";
+ Value = "[INSTALLLOCATION]program\xmergesync.dll";
End
RegistryItem gid_Regitem_Clsid__Cb43f086_838d_4fa4_B5f6_3406b9a57439__Inprocserver32_Threadingmodel
diff --git a/scp2/source/ooo/directory_ooo_macosx.scp b/scp2/source/ooo/directory_ooo_macosx.scp
index 9cd00117dcbf..ee4ad7522938 100755
--- a/scp2/source/ooo/directory_ooo_macosx.scp
+++ b/scp2/source/ooo/directory_ooo_macosx.scp
@@ -31,8 +31,8 @@
Directory gid_Dir_Bundle
ParentID = PD_PROGDIR;
HostName = "%PRODUCTNAME.app";
- LangPackHostName = "%PRODUCTNAME %PRODUCTVERSION Language Pack.app";
- PatchHostName = "%PRODUCTNAME %PRODUCTVERSION Patch.app";
+ LangPackHostName = "%PRODUCTNAME Language Pack.app";
+ PatchHostName = "%PRODUCTNAME Patch.app";
End
#endif
diff --git a/scp2/source/sdkoo/sdkoo.scp b/scp2/source/sdkoo/sdkoo.scp
index d47e14d0a63a..c9319f68dfd4 100644
--- a/scp2/source/sdkoo/sdkoo.scp
+++ b/scp2/source/sdkoo/sdkoo.scp
@@ -82,7 +82,8 @@ End
Directory gid_Dir_Basis_Sdk
#if defined MACOSX
ParentID = PREDEFINED_PROGDIR;
- DosName = "OpenOffice.org${OOOBASEVERSION}_SDK";
+ // DosName = "OpenOffice.org${OOOBASEVERSION}_SDK";
+ DosName = "OpenOffice.org_SDK";
#else
#if defined WNT
ParentID = gid_Dir_Sdkoo_Root;
diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx
index 6ccf0d2f73cb..a3dff08902b8 100755
--- a/sd/source/core/drawdoc2.cxx
+++ b/sd/source/core/drawdoc2.cxx
@@ -307,10 +307,10 @@ void SdDrawDocument::UpdatePageRelativeURLs(const String& rOldName, const String
return;
SfxItemPool& pPool(GetPool());
- USHORT nCount = pPool.GetItemCount(EE_FEATURE_FIELD);
- for (USHORT nOff = 0; nOff < nCount; nOff++)
+ sal_uInt32 nCount = pPool.GetItemCount2(EE_FEATURE_FIELD);
+ for (sal_uInt32 nOff = 0; nOff < nCount; nOff++)
{
- const SfxPoolItem *pItem = pPool.GetItem(EE_FEATURE_FIELD, nOff);
+ const SfxPoolItem *pItem = pPool.GetItem2(EE_FEATURE_FIELD, nOff);
const SvxFieldItem* pFldItem = dynamic_cast< const SvxFieldItem * > (pItem);
if(pFldItem)
@@ -352,10 +352,10 @@ void SdDrawDocument::UpdatePageRelativeURLs(SdPage* pPage, USHORT nPos, sal_Int3
bool bNotes = (pPage->GetPageKind() == PK_NOTES);
SfxItemPool& pPool(GetPool());
- USHORT nCount = pPool.GetItemCount(EE_FEATURE_FIELD);
- for (USHORT nOff = 0; nOff < nCount; nOff++)
+ sal_uInt32 nCount = pPool.GetItemCount2(EE_FEATURE_FIELD);
+ for (sal_uInt32 nOff = 0; nOff < nCount; nOff++)
{
- const SfxPoolItem *pItem = pPool.GetItem(EE_FEATURE_FIELD, nOff);
+ const SfxPoolItem *pItem = pPool.GetItem2(EE_FEATURE_FIELD, nOff);
const SvxFieldItem* pFldItem;
if ((pFldItem = dynamic_cast< const SvxFieldItem * > (pItem)) != 0)
diff --git a/sdext/source/pdfimport/config/description.xml b/sdext/source/pdfimport/config/description.xml
index b22b81587fc7..1fdd3b28aea1 100755..100644
--- a/sdext/source/pdfimport/config/description.xml
+++ b/sdext/source/pdfimport/config/description.xml
@@ -16,7 +16,7 @@
</simple-license>
</registration>
- <version value="1.0.3" />
+ <version value="1.0.4" />
<platform value="UPDATED_SUPPORTED_PLATFORM" />
diff --git a/sdext/source/pdfimport/inc/treevisitorfactory.hxx b/sdext/source/pdfimport/inc/treevisitorfactory.hxx
index c573b63b6012..ba42eb759b04 100644
--- a/sdext/source/pdfimport/inc/treevisitorfactory.hxx
+++ b/sdext/source/pdfimport/inc/treevisitorfactory.hxx
@@ -53,7 +53,7 @@ namespace pdfi
virtual boost::shared_ptr<ElementTreeVisitor> createStyleCollectingVisitor(
StyleContainer&, PDFIProcessor&) const = 0;
/// Create visitor that emits tree to an output target
- virtual boost::shared_ptr<ElementTreeVisitor> createEmittingVisitor(EmitContext&) const = 0;
+ virtual boost::shared_ptr<ElementTreeVisitor> createEmittingVisitor(EmitContext&, PDFIProcessor&) const = 0;
};
typedef boost::shared_ptr<TreeVisitorFactory> TreeVisitorFactorySharedPtr;
diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.cxx b/sdext/source/pdfimport/tree/drawtreevisiting.cxx
index 2fd17d059e23..5f1bb429ce8a 100644
--- a/sdext/source/pdfimport/tree/drawtreevisiting.cxx
+++ b/sdext/source/pdfimport/tree/drawtreevisiting.cxx
@@ -36,13 +36,15 @@
#include "drawtreevisiting.hxx"
#include "genericelements.hxx"
-#include <basegfx/polygon/b2dpolypolygontools.hxx>
-#include <basegfx/range/b2drange.hxx>
+#include "basegfx/polygon/b2dpolypolygontools.hxx"
+#include "basegfx/range/b2drange.hxx"
-#include <com/sun/star/i18n/XBreakIterator.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include "com/sun/star/i18n/XBreakIterator.hpp"
+#include "com/sun/star/lang/XMultiServiceFactory.hpp"
#include "comphelper/processfactory.hxx"
-#include <com/sun/star/i18n/ScriptType.hpp>
+#include "com/sun/star/i18n/ScriptType.hpp"
+#include "com/sun/star/i18n/DirectionProperty.hpp"
+
#include <string.h>
using namespace ::com::sun::star;
@@ -79,6 +81,18 @@ const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator >
return mxBreakIter;
}
+const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCharacterClassification >& DrawXmlEmitter::GetCharacterClassification()
+{
+ if ( !mxCharClass.is() )
+ {
+ Reference< XComponentContext > xContext( m_rEmitContext.m_xContext, uno::UNO_SET_THROW );
+ Reference< XMultiComponentFactory > xMSF( xContext->getServiceManager(), uno::UNO_SET_THROW );
+ Reference < XInterface > xInterface = xMSF->createInstanceWithContext(::rtl::OUString::createFromAscii("com.sun.star.i18n.CharacterClassification"), xContext);
+ mxCharClass = uno::Reference< i18n::XCharacterClassification >( xInterface, uno::UNO_QUERY );
+ }
+ return mxCharClass;
+}
+
void DrawXmlEmitter::visit( HyperlinkElement& elem, const std::list< Element* >::const_iterator& )
{
if( elem.Children.empty() )
@@ -119,30 +133,25 @@ void DrawXmlEmitter::visit( TextElement& elem, const std::list< Element* >::cons
rtl::OUString str(elem.Text.getStr());
- // Check for CTL
- bool isComplex = false;
- for(int i=0; i< elem.Text.getLength(); i++)
- {
- sal_Int16 nType = GetBreakIterator()->getScriptType( str, i + 1);
- if (nType == ::com::sun::star::i18n::ScriptType::COMPLEX)
- isComplex = true;
- }
-
- #if 0
- // FIXME: need to have a service to do this mirroring
- if (isComplex) // If so, reverse string
+ // Check for RTL
+ bool isRTL = false;
+ Reference< i18n::XCharacterClassification > xCC( GetCharacterClassification() );
+ if( xCC.is() )
{
- rtl::OUString flippedStr(RTL_CONSTASCII_USTRINGPARAM( "" ));
- for(int i = str.getLength() - 1; i >= 0; i--)
+ for(int i=1; i< elem.Text.getLength(); i++)
{
- sal_Unicode cChar = str[ i ];
- cChar = static_cast<sal_Unicode>(GetMirroredChar( cChar ));
- rtl::OUString uC(cChar);
- flippedStr += uC;
+ sal_Int16 nType = xCC->getCharacterDirection( str, i );
+ if ( nType == ::com::sun::star::i18n::DirectionProperty_RIGHT_TO_LEFT ||
+ nType == ::com::sun::star::i18n::DirectionProperty_RIGHT_TO_LEFT_ARABIC ||
+ nType == ::com::sun::star::i18n::DirectionProperty_RIGHT_TO_LEFT_EMBEDDING ||
+ nType == ::com::sun::star::i18n::DirectionProperty_RIGHT_TO_LEFT_OVERRIDE
+ )
+ isRTL = true;
}
- str = flippedStr;
}
- #endif
+
+ if (isRTL) // If so, reverse string
+ str = m_rProcessor.mirrorString( str );
m_rEmitContext.rEmitter.beginTag( "text:span", aProps );
diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.hxx b/sdext/source/pdfimport/tree/drawtreevisiting.hxx
index fd347fa4f302..b499db1ca811 100644
--- a/sdext/source/pdfimport/tree/drawtreevisiting.hxx
+++ b/sdext/source/pdfimport/tree/drawtreevisiting.hxx
@@ -29,9 +29,11 @@
#define INCLUDED_PDFI_DRAWTREEVISITING_HXX
#include "treevisiting.hxx"
-#include <com/sun/star/i18n/XBreakIterator.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
+
+#include "com/sun/star/i18n/XBreakIterator.hpp"
+#include "com/sun/star/i18n/XCharacterClassification.hpp"
+#include "com/sun/star/lang/XMultiServiceFactory.hpp"
+#include "com/sun/star/uno/XComponentContext.hpp"
namespace pdfi
{
@@ -89,6 +91,9 @@ namespace pdfi
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xCtx;
::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator > mxBreakIter;
+ ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCharacterClassification > mxCharClass;
+
+ PDFIProcessor& m_rProcessor;
EmitContext& m_rEmitContext ;
/// writes Impress doc when false
@@ -100,8 +105,10 @@ namespace pdfi
public:
const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator >& GetBreakIterator();
+ const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCharacterClassification >& GetCharacterClassification();
enum DocType{ DRAW_DOC, IMPRESS_DOC };
- explicit DrawXmlEmitter(EmitContext& rEmitContext, DocType eDocType) :
+ explicit DrawXmlEmitter(EmitContext& rEmitContext, DocType eDocType, PDFIProcessor& rProc ) :
+ m_rProcessor( rProc ),
m_rEmitContext(rEmitContext),
m_bWriteDrawDocument(eDocType==DRAW_DOC)
{}
diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.cxx b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
index d823cac524cf..54171d8de5e7 100644
--- a/sdext/source/pdfimport/tree/pdfiprocessor.cxx
+++ b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
@@ -87,7 +87,8 @@ namespace pdfi
m_fWordSpace(0.0),
m_bIsWhiteSpaceInLine( false ),
m_xStatusIndicator( xStat ),
- m_bHaveTextOnDocLevel(false)
+ m_bHaveTextOnDocLevel(false),
+ m_bMirrorMapperTried(false)
{
FontAttributes aDefFont;
aDefFont.familyName = USTR("Helvetica");
@@ -847,7 +848,7 @@ void PDFIProcessor::emit( XmlEmitter& rEmitter,
EmitContext aContext( rEmitter, aStyles, m_aImages, *this, m_xStatusIndicator, m_xContext );
ElementTreeVisitorSharedPtr aEmittingVisitor(
- rVisitorFactory.createEmittingVisitor(aContext));
+ rVisitorFactory.createEmittingVisitor(aContext, *this));
PropertyMap aProps;
// document prolog
@@ -1046,4 +1047,414 @@ void PDFIProcessor::sortElements( Element* pEle, bool bDeep )
return outRect;
}
+// helper method: get a mirrored string
+rtl::OUString PDFIProcessor::mirrorString( const rtl::OUString& i_rString )
+{
+ if( ! m_xMirrorMapper.is() && ! m_bMirrorMapperTried )
+ {
+ m_bMirrorMapperTried = true;
+ uno::Reference< lang::XMultiComponentFactory > xMSF( m_xContext->getServiceManager(), uno::UNO_SET_THROW );
+ uno::Reference < uno::XInterface > xInterface = xMSF->createInstanceWithContext(::rtl::OUString::createFromAscii("com.sun.star.awt.StringMirror"), m_xContext);
+ m_xMirrorMapper = uno::Reference< util::XStringMapping >( xInterface, uno::UNO_QUERY );
+ #if OSL_DEBUG_LEVEL > 1
+ if( m_xMirrorMapper.is() )
+ fprintf( stderr, "using mirror mapper service\n" );
+ #endif
+ }
+ if( m_xMirrorMapper.is() )
+ {
+ uno::Sequence< rtl::OUString > aSeq( 1 );
+ aSeq.getArray()[0] = i_rString;
+ m_xMirrorMapper->mapStrings( aSeq );
+ return aSeq[0];
+ }
+
+ prepareMirrorMap();
+ sal_Int32 nLen = i_rString.getLength();
+ rtl::OUStringBuffer aRet( nLen );
+ for(int i = nLen - 1; i >= 0; i--)
+ {
+ sal_Unicode cChar = i_rString[ i ];
+ aRet.append( m_aMirrorMap[cChar] );
+ }
+ return aRet.makeStringAndClear();
+}
+
+void PDFIProcessor::prepareMirrorMap()
+{
+ if( m_aMirrorMap.empty() )
+ {
+ #if OSL_DEBUG_LEVEL > 1
+ fprintf( stderr, "falling back to static mirror list\n" );
+ #endif
+
+ m_aMirrorMap.reserve( 0x10000 );
+ for( int i = 0; i < 0x10000; i++ )
+ m_aMirrorMap.push_back( sal_Unicode(i) );
+
+ m_aMirrorMap[ 0x0028 ] = 0x0029; // LEFT PARENTHESIS
+ m_aMirrorMap[ 0x0029 ] = 0x0028; // RIGHT PARENTHESIS
+ m_aMirrorMap[ 0x003C ] = 0x003E; // LESS-THAN SIGN
+ m_aMirrorMap[ 0x003E ] = 0x003C; // GREATER-THAN SIGN
+ m_aMirrorMap[ 0x005B ] = 0x005D; // LEFT SQUARE BRACKET
+ m_aMirrorMap[ 0x005D ] = 0x005B; // RIGHT SQUARE BRACKET
+ m_aMirrorMap[ 0x007B ] = 0x007D; // LEFT CURLY BRACKET
+ m_aMirrorMap[ 0x007D ] = 0x007B; // RIGHT CURLY BRACKET
+ m_aMirrorMap[ 0x00AB ] = 0x00BB; // LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+ m_aMirrorMap[ 0x00BB ] = 0x00AB; // RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+ m_aMirrorMap[ 0x0F3A ] = 0x0F3B; // TIBETAN MARK GUG RTAGS GYON
+ m_aMirrorMap[ 0x0F3B ] = 0x0F3A; // TIBETAN MARK GUG RTAGS GYAS
+ m_aMirrorMap[ 0x0F3C ] = 0x0F3D; // TIBETAN MARK ANG KHANG GYON
+ m_aMirrorMap[ 0x0F3D ] = 0x0F3C; // TIBETAN MARK ANG KHANG GYAS
+ m_aMirrorMap[ 0x169B ] = 0x169C; // OGHAM FEATHER MARK
+ m_aMirrorMap[ 0x169C ] = 0x169B; // OGHAM REVERSED FEATHER MARK
+ m_aMirrorMap[ 0x2039 ] = 0x203A; // SINGLE LEFT-POINTING ANGLE QUOTATION MARK
+ m_aMirrorMap[ 0x203A ] = 0x2039; // SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
+ m_aMirrorMap[ 0x2045 ] = 0x2046; // LEFT SQUARE BRACKET WITH QUILL
+ m_aMirrorMap[ 0x2046 ] = 0x2045; // RIGHT SQUARE BRACKET WITH QUILL
+ m_aMirrorMap[ 0x207D ] = 0x207E; // SUPERSCRIPT LEFT PARENTHESIS
+ m_aMirrorMap[ 0x207E ] = 0x207D; // SUPERSCRIPT RIGHT PARENTHESIS
+ m_aMirrorMap[ 0x208D ] = 0x208E; // SUBSCRIPT LEFT PARENTHESIS
+ m_aMirrorMap[ 0x208E ] = 0x208D; // SUBSCRIPT RIGHT PARENTHESIS
+ m_aMirrorMap[ 0x2208 ] = 0x220B; // ELEMENT OF
+ m_aMirrorMap[ 0x2209 ] = 0x220C; // NOT AN ELEMENT OF
+ m_aMirrorMap[ 0x220A ] = 0x220D; // SMALL ELEMENT OF
+ m_aMirrorMap[ 0x220B ] = 0x2208; // CONTAINS AS MEMBER
+ m_aMirrorMap[ 0x220C ] = 0x2209; // DOES NOT CONTAIN AS MEMBER
+ m_aMirrorMap[ 0x220D ] = 0x220A; // SMALL CONTAINS AS MEMBER
+ m_aMirrorMap[ 0x2215 ] = 0x29F5; // DIVISION SLASH
+ m_aMirrorMap[ 0x223C ] = 0x223D; // TILDE OPERATOR
+ m_aMirrorMap[ 0x223D ] = 0x223C; // REVERSED TILDE
+ m_aMirrorMap[ 0x2243 ] = 0x22CD; // ASYMPTOTICALLY EQUAL TO
+ m_aMirrorMap[ 0x2252 ] = 0x2253; // APPROXIMATELY EQUAL TO OR THE IMAGE OF
+ m_aMirrorMap[ 0x2253 ] = 0x2252; // IMAGE OF OR APPROXIMATELY EQUAL TO
+ m_aMirrorMap[ 0x2254 ] = 0x2255; // COLON EQUALS
+ m_aMirrorMap[ 0x2255 ] = 0x2254; // EQUALS COLON
+ m_aMirrorMap[ 0x2264 ] = 0x2265; // LESS-THAN OR EQUAL TO
+ m_aMirrorMap[ 0x2265 ] = 0x2264; // GREATER-THAN OR EQUAL TO
+ m_aMirrorMap[ 0x2266 ] = 0x2267; // LESS-THAN OVER EQUAL TO
+ m_aMirrorMap[ 0x2267 ] = 0x2266; // GREATER-THAN OVER EQUAL TO
+ m_aMirrorMap[ 0x2268 ] = 0x2269; // [BEST FIT] LESS-THAN BUT NOT EQUAL TO
+ m_aMirrorMap[ 0x2269 ] = 0x2268; // [BEST FIT] GREATER-THAN BUT NOT EQUAL TO
+ m_aMirrorMap[ 0x226A ] = 0x226B; // MUCH LESS-THAN
+ m_aMirrorMap[ 0x226B ] = 0x226A; // MUCH GREATER-THAN
+ m_aMirrorMap[ 0x226E ] = 0x226F; // [BEST FIT] NOT LESS-THAN
+ m_aMirrorMap[ 0x226F ] = 0x226E; // [BEST FIT] NOT GREATER-THAN
+ m_aMirrorMap[ 0x2270 ] = 0x2271; // [BEST FIT] NEITHER LESS-THAN NOR EQUAL TO
+ m_aMirrorMap[ 0x2271 ] = 0x2270; // [BEST FIT] NEITHER GREATER-THAN NOR EQUAL TO
+ m_aMirrorMap[ 0x2272 ] = 0x2273; // [BEST FIT] LESS-THAN OR EQUIVALENT TO
+ m_aMirrorMap[ 0x2273 ] = 0x2272; // [BEST FIT] GREATER-THAN OR EQUIVALENT TO
+ m_aMirrorMap[ 0x2274 ] = 0x2275; // [BEST FIT] NEITHER LESS-THAN NOR EQUIVALENT TO
+ m_aMirrorMap[ 0x2275 ] = 0x2274; // [BEST FIT] NEITHER GREATER-THAN NOR EQUIVALENT TO
+ m_aMirrorMap[ 0x2276 ] = 0x2277; // LESS-THAN OR GREATER-THAN
+ m_aMirrorMap[ 0x2277 ] = 0x2276; // GREATER-THAN OR LESS-THAN
+ m_aMirrorMap[ 0x2278 ] = 0x2279; // [BEST FIT] NEITHER LESS-THAN NOR GREATER-THAN
+ m_aMirrorMap[ 0x2279 ] = 0x2278; // [BEST FIT] NEITHER GREATER-THAN NOR LESS-THAN
+ m_aMirrorMap[ 0x227A ] = 0x227B; // PRECEDES
+ m_aMirrorMap[ 0x227B ] = 0x227A; // SUCCEEDS
+ m_aMirrorMap[ 0x227C ] = 0x227D; // PRECEDES OR EQUAL TO
+ m_aMirrorMap[ 0x227D ] = 0x227C; // SUCCEEDS OR EQUAL TO
+ m_aMirrorMap[ 0x227E ] = 0x227F; // [BEST FIT] PRECEDES OR EQUIVALENT TO
+ m_aMirrorMap[ 0x227F ] = 0x227E; // [BEST FIT] SUCCEEDS OR EQUIVALENT TO
+ m_aMirrorMap[ 0x2280 ] = 0x2281; // [BEST FIT] DOES NOT PRECEDE
+ m_aMirrorMap[ 0x2281 ] = 0x2280; // [BEST FIT] DOES NOT SUCCEED
+ m_aMirrorMap[ 0x2282 ] = 0x2283; // SUBSET OF
+ m_aMirrorMap[ 0x2283 ] = 0x2282; // SUPERSET OF
+ m_aMirrorMap[ 0x2284 ] = 0x2285; // [BEST FIT] NOT A SUBSET OF
+ m_aMirrorMap[ 0x2285 ] = 0x2284; // [BEST FIT] NOT A SUPERSET OF
+ m_aMirrorMap[ 0x2286 ] = 0x2287; // SUBSET OF OR EQUAL TO
+ m_aMirrorMap[ 0x2287 ] = 0x2286; // SUPERSET OF OR EQUAL TO
+ m_aMirrorMap[ 0x2288 ] = 0x2289; // [BEST FIT] NEITHER A SUBSET OF NOR EQUAL TO
+ m_aMirrorMap[ 0x2289 ] = 0x2288; // [BEST FIT] NEITHER A SUPERSET OF NOR EQUAL TO
+ m_aMirrorMap[ 0x228A ] = 0x228B; // [BEST FIT] SUBSET OF WITH NOT EQUAL TO
+ m_aMirrorMap[ 0x228B ] = 0x228A; // [BEST FIT] SUPERSET OF WITH NOT EQUAL TO
+ m_aMirrorMap[ 0x228F ] = 0x2290; // SQUARE IMAGE OF
+ m_aMirrorMap[ 0x2290 ] = 0x228F; // SQUARE ORIGINAL OF
+ m_aMirrorMap[ 0x2291 ] = 0x2292; // SQUARE IMAGE OF OR EQUAL TO
+ m_aMirrorMap[ 0x2292 ] = 0x2291; // SQUARE ORIGINAL OF OR EQUAL TO
+ m_aMirrorMap[ 0x2298 ] = 0x29B8; // CIRCLED DIVISION SLASH
+ m_aMirrorMap[ 0x22A2 ] = 0x22A3; // RIGHT TACK
+ m_aMirrorMap[ 0x22A3 ] = 0x22A2; // LEFT TACK
+ m_aMirrorMap[ 0x22A6 ] = 0x2ADE; // ASSERTION
+ m_aMirrorMap[ 0x22A8 ] = 0x2AE4; // TRUE
+ m_aMirrorMap[ 0x22A9 ] = 0x2AE3; // FORCES
+ m_aMirrorMap[ 0x22AB ] = 0x2AE5; // DOUBLE VERTICAL BAR DOUBLE RIGHT TURNSTILE
+ m_aMirrorMap[ 0x22B0 ] = 0x22B1; // PRECEDES UNDER RELATION
+ m_aMirrorMap[ 0x22B1 ] = 0x22B0; // SUCCEEDS UNDER RELATION
+ m_aMirrorMap[ 0x22B2 ] = 0x22B3; // NORMAL SUBGROUP OF
+ m_aMirrorMap[ 0x22B3 ] = 0x22B2; // CONTAINS AS NORMAL SUBGROUP
+ m_aMirrorMap[ 0x22B4 ] = 0x22B5; // NORMAL SUBGROUP OF OR EQUAL TO
+ m_aMirrorMap[ 0x22B5 ] = 0x22B4; // CONTAINS AS NORMAL SUBGROUP OR EQUAL TO
+ m_aMirrorMap[ 0x22B6 ] = 0x22B7; // ORIGINAL OF
+ m_aMirrorMap[ 0x22B7 ] = 0x22B6; // IMAGE OF
+ m_aMirrorMap[ 0x22C9 ] = 0x22CA; // LEFT NORMAL FACTOR SEMIDIRECT PRODUCT
+ m_aMirrorMap[ 0x22CA ] = 0x22C9; // RIGHT NORMAL FACTOR SEMIDIRECT PRODUCT
+ m_aMirrorMap[ 0x22CB ] = 0x22CC; // LEFT SEMIDIRECT PRODUCT
+ m_aMirrorMap[ 0x22CC ] = 0x22CB; // RIGHT SEMIDIRECT PRODUCT
+ m_aMirrorMap[ 0x22CD ] = 0x2243; // REVERSED TILDE EQUALS
+ m_aMirrorMap[ 0x22D0 ] = 0x22D1; // DOUBLE SUBSET
+ m_aMirrorMap[ 0x22D1 ] = 0x22D0; // DOUBLE SUPERSET
+ m_aMirrorMap[ 0x22D6 ] = 0x22D7; // LESS-THAN WITH DOT
+ m_aMirrorMap[ 0x22D7 ] = 0x22D6; // GREATER-THAN WITH DOT
+ m_aMirrorMap[ 0x22D8 ] = 0x22D9; // VERY MUCH LESS-THAN
+ m_aMirrorMap[ 0x22D9 ] = 0x22D8; // VERY MUCH GREATER-THAN
+ m_aMirrorMap[ 0x22DA ] = 0x22DB; // LESS-THAN EQUAL TO OR GREATER-THAN
+ m_aMirrorMap[ 0x22DB ] = 0x22DA; // GREATER-THAN EQUAL TO OR LESS-THAN
+ m_aMirrorMap[ 0x22DC ] = 0x22DD; // EQUAL TO OR LESS-THAN
+ m_aMirrorMap[ 0x22DD ] = 0x22DC; // EQUAL TO OR GREATER-THAN
+ m_aMirrorMap[ 0x22DE ] = 0x22DF; // EQUAL TO OR PRECEDES
+ m_aMirrorMap[ 0x22DF ] = 0x22DE; // EQUAL TO OR SUCCEEDS
+ m_aMirrorMap[ 0x22E0 ] = 0x22E1; // [BEST FIT] DOES NOT PRECEDE OR EQUAL
+ m_aMirrorMap[ 0x22E1 ] = 0x22E0; // [BEST FIT] DOES NOT SUCCEED OR EQUAL
+ m_aMirrorMap[ 0x22E2 ] = 0x22E3; // [BEST FIT] NOT SQUARE IMAGE OF OR EQUAL TO
+ m_aMirrorMap[ 0x22E3 ] = 0x22E2; // [BEST FIT] NOT SQUARE ORIGINAL OF OR EQUAL TO
+ m_aMirrorMap[ 0x22E4 ] = 0x22E5; // [BEST FIT] SQUARE IMAGE OF OR NOT EQUAL TO
+ m_aMirrorMap[ 0x22E5 ] = 0x22E4; // [BEST FIT] SQUARE ORIGINAL OF OR NOT EQUAL TO
+ m_aMirrorMap[ 0x22E6 ] = 0x22E7; // [BEST FIT] LESS-THAN BUT NOT EQUIVALENT TO
+ m_aMirrorMap[ 0x22E7 ] = 0x22E6; // [BEST FIT] GREATER-THAN BUT NOT EQUIVALENT TO
+ m_aMirrorMap[ 0x22E8 ] = 0x22E9; // [BEST FIT] PRECEDES BUT NOT EQUIVALENT TO
+ m_aMirrorMap[ 0x22E9 ] = 0x22E8; // [BEST FIT] SUCCEEDS BUT NOT EQUIVALENT TO
+ m_aMirrorMap[ 0x22EA ] = 0x22EB; // [BEST FIT] NOT NORMAL SUBGROUP OF
+ m_aMirrorMap[ 0x22EB ] = 0x22EA; // [BEST FIT] DOES NOT CONTAIN AS NORMAL SUBGROUP
+ m_aMirrorMap[ 0x22EC ] = 0x22ED; // [BEST FIT] NOT NORMAL SUBGROUP OF OR EQUAL TO
+ m_aMirrorMap[ 0x22ED ] = 0x22EC; // [BEST FIT] DOES NOT CONTAIN AS NORMAL SUBGROUP OR EQUAL
+ m_aMirrorMap[ 0x22F0 ] = 0x22F1; // UP RIGHT DIAGONAL ELLIPSIS
+ m_aMirrorMap[ 0x22F1 ] = 0x22F0; // DOWN RIGHT DIAGONAL ELLIPSIS
+ m_aMirrorMap[ 0x22F2 ] = 0x22FA; // ELEMENT OF WITH LONG HORIZONTAL STROKE
+ m_aMirrorMap[ 0x22F3 ] = 0x22FB; // ELEMENT OF WITH VERTICAL BAR AT END OF HORIZONTAL STROKE
+ m_aMirrorMap[ 0x22F4 ] = 0x22FC; // SMALL ELEMENT OF WITH VERTICAL BAR AT END OF HORIZONTAL STROKE
+ m_aMirrorMap[ 0x22F6 ] = 0x22FD; // ELEMENT OF WITH OVERBAR
+ m_aMirrorMap[ 0x22F7 ] = 0x22FE; // SMALL ELEMENT OF WITH OVERBAR
+ m_aMirrorMap[ 0x22FA ] = 0x22F2; // CONTAINS WITH LONG HORIZONTAL STROKE
+ m_aMirrorMap[ 0x22FB ] = 0x22F3; // CONTAINS WITH VERTICAL BAR AT END OF HORIZONTAL STROKE
+ m_aMirrorMap[ 0x22FC ] = 0x22F4; // SMALL CONTAINS WITH VERTICAL BAR AT END OF HORIZONTAL STROKE
+ m_aMirrorMap[ 0x22FD ] = 0x22F6; // CONTAINS WITH OVERBAR
+ m_aMirrorMap[ 0x22FE ] = 0x22F7; // SMALL CONTAINS WITH OVERBAR
+ m_aMirrorMap[ 0x2308 ] = 0x2309; // LEFT CEILING
+ m_aMirrorMap[ 0x2309 ] = 0x2308; // RIGHT CEILING
+ m_aMirrorMap[ 0x230A ] = 0x230B; // LEFT FLOOR
+ m_aMirrorMap[ 0x230B ] = 0x230A; // RIGHT FLOOR
+ m_aMirrorMap[ 0x2329 ] = 0x232A; // LEFT-POINTING ANGLE BRACKET
+ m_aMirrorMap[ 0x232A ] = 0x2329; // RIGHT-POINTING ANGLE BRACKET
+ m_aMirrorMap[ 0x2768 ] = 0x2769; // MEDIUM LEFT PARENTHESIS ORNAMENT
+ m_aMirrorMap[ 0x2769 ] = 0x2768; // MEDIUM RIGHT PARENTHESIS ORNAMENT
+ m_aMirrorMap[ 0x276A ] = 0x276B; // MEDIUM FLATTENED LEFT PARENTHESIS ORNAMENT
+ m_aMirrorMap[ 0x276B ] = 0x276A; // MEDIUM FLATTENED RIGHT PARENTHESIS ORNAMENT
+ m_aMirrorMap[ 0x276C ] = 0x276D; // MEDIUM LEFT-POINTING ANGLE BRACKET ORNAMENT
+ m_aMirrorMap[ 0x276D ] = 0x276C; // MEDIUM RIGHT-POINTING ANGLE BRACKET ORNAMENT
+ m_aMirrorMap[ 0x276E ] = 0x276F; // HEAVY LEFT-POINTING ANGLE QUOTATION MARK ORNAMENT
+ m_aMirrorMap[ 0x276F ] = 0x276E; // HEAVY RIGHT-POINTING ANGLE QUOTATION MARK ORNAMENT
+ m_aMirrorMap[ 0x2770 ] = 0x2771; // HEAVY LEFT-POINTING ANGLE BRACKET ORNAMENT
+ m_aMirrorMap[ 0x2771 ] = 0x2770; // HEAVY RIGHT-POINTING ANGLE BRACKET ORNAMENT
+ m_aMirrorMap[ 0x2772 ] = 0x2773; // LIGHT LEFT TORTOISE SHELL BRACKET
+ m_aMirrorMap[ 0x2773 ] = 0x2772; // LIGHT RIGHT TORTOISE SHELL BRACKET
+ m_aMirrorMap[ 0x2774 ] = 0x2775; // MEDIUM LEFT CURLY BRACKET ORNAMENT
+ m_aMirrorMap[ 0x2775 ] = 0x2774; // MEDIUM RIGHT CURLY BRACKET ORNAMENT
+ m_aMirrorMap[ 0x27C3 ] = 0x27C4; // OPEN SUBSET
+ m_aMirrorMap[ 0x27C4 ] = 0x27C3; // OPEN SUPERSET
+ m_aMirrorMap[ 0x27C5 ] = 0x27C6; // LEFT S-SHAPED BAG DELIMITER
+ m_aMirrorMap[ 0x27C6 ] = 0x27C5; // RIGHT S-SHAPED BAG DELIMITER
+ m_aMirrorMap[ 0x27C8 ] = 0x27C9; // REVERSE SOLIDUS PRECEDING SUBSET
+ m_aMirrorMap[ 0x27C9 ] = 0x27C8; // SUPERSET PRECEDING SOLIDUS
+ m_aMirrorMap[ 0x27D5 ] = 0x27D6; // LEFT OUTER JOIN
+ m_aMirrorMap[ 0x27D6 ] = 0x27D5; // RIGHT OUTER JOIN
+ m_aMirrorMap[ 0x27DD ] = 0x27DE; // LONG RIGHT TACK
+ m_aMirrorMap[ 0x27DE ] = 0x27DD; // LONG LEFT TACK
+ m_aMirrorMap[ 0x27E2 ] = 0x27E3; // WHITE CONCAVE-SIDED DIAMOND WITH LEFTWARDS TICK
+ m_aMirrorMap[ 0x27E3 ] = 0x27E2; // WHITE CONCAVE-SIDED DIAMOND WITH RIGHTWARDS TICK
+ m_aMirrorMap[ 0x27E4 ] = 0x27E5; // WHITE SQUARE WITH LEFTWARDS TICK
+ m_aMirrorMap[ 0x27E5 ] = 0x27E4; // WHITE SQUARE WITH RIGHTWARDS TICK
+ m_aMirrorMap[ 0x27E6 ] = 0x27E7; // MATHEMATICAL LEFT WHITE SQUARE BRACKET
+ m_aMirrorMap[ 0x27E7 ] = 0x27E6; // MATHEMATICAL RIGHT WHITE SQUARE BRACKET
+ m_aMirrorMap[ 0x27E8 ] = 0x27E9; // MATHEMATICAL LEFT ANGLE BRACKET
+ m_aMirrorMap[ 0x27E9 ] = 0x27E8; // MATHEMATICAL RIGHT ANGLE BRACKET
+ m_aMirrorMap[ 0x27EA ] = 0x27EB; // MATHEMATICAL LEFT DOUBLE ANGLE BRACKET
+ m_aMirrorMap[ 0x27EB ] = 0x27EA; // MATHEMATICAL RIGHT DOUBLE ANGLE BRACKET
+ m_aMirrorMap[ 0x27EC ] = 0x27ED; // MATHEMATICAL LEFT WHITE TORTOISE SHELL BRACKET
+ m_aMirrorMap[ 0x27ED ] = 0x27EC; // MATHEMATICAL RIGHT WHITE TORTOISE SHELL BRACKET
+ m_aMirrorMap[ 0x27EE ] = 0x27EF; // MATHEMATICAL LEFT FLATTENED PARENTHESIS
+ m_aMirrorMap[ 0x27EF ] = 0x27EE; // MATHEMATICAL RIGHT FLATTENED PARENTHESIS
+ m_aMirrorMap[ 0x2983 ] = 0x2984; // LEFT WHITE CURLY BRACKET
+ m_aMirrorMap[ 0x2984 ] = 0x2983; // RIGHT WHITE CURLY BRACKET
+ m_aMirrorMap[ 0x2985 ] = 0x2986; // LEFT WHITE PARENTHESIS
+ m_aMirrorMap[ 0x2986 ] = 0x2985; // RIGHT WHITE PARENTHESIS
+ m_aMirrorMap[ 0x2987 ] = 0x2988; // Z NOTATION LEFT IMAGE BRACKET
+ m_aMirrorMap[ 0x2988 ] = 0x2987; // Z NOTATION RIGHT IMAGE BRACKET
+ m_aMirrorMap[ 0x2989 ] = 0x298A; // Z NOTATION LEFT BINDING BRACKET
+ m_aMirrorMap[ 0x298A ] = 0x2989; // Z NOTATION RIGHT BINDING BRACKET
+ m_aMirrorMap[ 0x298B ] = 0x298C; // LEFT SQUARE BRACKET WITH UNDERBAR
+ m_aMirrorMap[ 0x298C ] = 0x298B; // RIGHT SQUARE BRACKET WITH UNDERBAR
+ m_aMirrorMap[ 0x298D ] = 0x2990; // LEFT SQUARE BRACKET WITH TICK IN TOP CORNER
+ m_aMirrorMap[ 0x298E ] = 0x298F; // RIGHT SQUARE BRACKET WITH TICK IN BOTTOM CORNER
+ m_aMirrorMap[ 0x298F ] = 0x298E; // LEFT SQUARE BRACKET WITH TICK IN BOTTOM CORNER
+ m_aMirrorMap[ 0x2990 ] = 0x298D; // RIGHT SQUARE BRACKET WITH TICK IN TOP CORNER
+ m_aMirrorMap[ 0x2991 ] = 0x2992; // LEFT ANGLE BRACKET WITH DOT
+ m_aMirrorMap[ 0x2992 ] = 0x2991; // RIGHT ANGLE BRACKET WITH DOT
+ m_aMirrorMap[ 0x2993 ] = 0x2994; // LEFT ARC LESS-THAN BRACKET
+ m_aMirrorMap[ 0x2994 ] = 0x2993; // RIGHT ARC GREATER-THAN BRACKET
+ m_aMirrorMap[ 0x2995 ] = 0x2996; // DOUBLE LEFT ARC GREATER-THAN BRACKET
+ m_aMirrorMap[ 0x2996 ] = 0x2995; // DOUBLE RIGHT ARC LESS-THAN BRACKET
+ m_aMirrorMap[ 0x2997 ] = 0x2998; // LEFT BLACK TORTOISE SHELL BRACKET
+ m_aMirrorMap[ 0x2998 ] = 0x2997; // RIGHT BLACK TORTOISE SHELL BRACKET
+ m_aMirrorMap[ 0x29B8 ] = 0x2298; // CIRCLED REVERSE SOLIDUS
+ m_aMirrorMap[ 0x29C0 ] = 0x29C1; // CIRCLED LESS-THAN
+ m_aMirrorMap[ 0x29C1 ] = 0x29C0; // CIRCLED GREATER-THAN
+ m_aMirrorMap[ 0x29C4 ] = 0x29C5; // SQUARED RISING DIAGONAL SLASH
+ m_aMirrorMap[ 0x29C5 ] = 0x29C4; // SQUARED FALLING DIAGONAL SLASH
+ m_aMirrorMap[ 0x29CF ] = 0x29D0; // LEFT TRIANGLE BESIDE VERTICAL BAR
+ m_aMirrorMap[ 0x29D0 ] = 0x29CF; // VERTICAL BAR BESIDE RIGHT TRIANGLE
+ m_aMirrorMap[ 0x29D1 ] = 0x29D2; // BOWTIE WITH LEFT HALF BLACK
+ m_aMirrorMap[ 0x29D2 ] = 0x29D1; // BOWTIE WITH RIGHT HALF BLACK
+ m_aMirrorMap[ 0x29D4 ] = 0x29D5; // TIMES WITH LEFT HALF BLACK
+ m_aMirrorMap[ 0x29D5 ] = 0x29D4; // TIMES WITH RIGHT HALF BLACK
+ m_aMirrorMap[ 0x29D8 ] = 0x29D9; // LEFT WIGGLY FENCE
+ m_aMirrorMap[ 0x29D9 ] = 0x29D8; // RIGHT WIGGLY FENCE
+ m_aMirrorMap[ 0x29DA ] = 0x29DB; // LEFT DOUBLE WIGGLY FENCE
+ m_aMirrorMap[ 0x29DB ] = 0x29DA; // RIGHT DOUBLE WIGGLY FENCE
+ m_aMirrorMap[ 0x29F5 ] = 0x2215; // REVERSE SOLIDUS OPERATOR
+ m_aMirrorMap[ 0x29F8 ] = 0x29F9; // BIG SOLIDUS
+ m_aMirrorMap[ 0x29F9 ] = 0x29F8; // BIG REVERSE SOLIDUS
+ m_aMirrorMap[ 0x29FC ] = 0x29FD; // LEFT-POINTING CURVED ANGLE BRACKET
+ m_aMirrorMap[ 0x29FD ] = 0x29FC; // RIGHT-POINTING CURVED ANGLE BRACKET
+ m_aMirrorMap[ 0x2A2B ] = 0x2A2C; // MINUS SIGN WITH FALLING DOTS
+ m_aMirrorMap[ 0x2A2C ] = 0x2A2B; // MINUS SIGN WITH RISING DOTS
+ m_aMirrorMap[ 0x2A2D ] = 0x2A2E; // PLUS SIGN IN LEFT HALF CIRCLE
+ m_aMirrorMap[ 0x2A2E ] = 0x2A2D; // PLUS SIGN IN RIGHT HALF CIRCLE
+ m_aMirrorMap[ 0x2A34 ] = 0x2A35; // MULTIPLICATION SIGN IN LEFT HALF CIRCLE
+ m_aMirrorMap[ 0x2A35 ] = 0x2A34; // MULTIPLICATION SIGN IN RIGHT HALF CIRCLE
+ m_aMirrorMap[ 0x2A3C ] = 0x2A3D; // INTERIOR PRODUCT
+ m_aMirrorMap[ 0x2A3D ] = 0x2A3C; // RIGHTHAND INTERIOR PRODUCT
+ m_aMirrorMap[ 0x2A64 ] = 0x2A65; // Z NOTATION DOMAIN ANTIRESTRICTION
+ m_aMirrorMap[ 0x2A65 ] = 0x2A64; // Z NOTATION RANGE ANTIRESTRICTION
+ m_aMirrorMap[ 0x2A79 ] = 0x2A7A; // LESS-THAN WITH CIRCLE INSIDE
+ m_aMirrorMap[ 0x2A7A ] = 0x2A79; // GREATER-THAN WITH CIRCLE INSIDE
+ m_aMirrorMap[ 0x2A7D ] = 0x2A7E; // LESS-THAN OR SLANTED EQUAL TO
+ m_aMirrorMap[ 0x2A7E ] = 0x2A7D; // GREATER-THAN OR SLANTED EQUAL TO
+ m_aMirrorMap[ 0x2A7F ] = 0x2A80; // LESS-THAN OR SLANTED EQUAL TO WITH DOT INSIDE
+ m_aMirrorMap[ 0x2A80 ] = 0x2A7F; // GREATER-THAN OR SLANTED EQUAL TO WITH DOT INSIDE
+ m_aMirrorMap[ 0x2A81 ] = 0x2A82; // LESS-THAN OR SLANTED EQUAL TO WITH DOT ABOVE
+ m_aMirrorMap[ 0x2A82 ] = 0x2A81; // GREATER-THAN OR SLANTED EQUAL TO WITH DOT ABOVE
+ m_aMirrorMap[ 0x2A83 ] = 0x2A84; // LESS-THAN OR SLANTED EQUAL TO WITH DOT ABOVE RIGHT
+ m_aMirrorMap[ 0x2A84 ] = 0x2A83; // GREATER-THAN OR SLANTED EQUAL TO WITH DOT ABOVE LEFT
+ m_aMirrorMap[ 0x2A8B ] = 0x2A8C; // LESS-THAN ABOVE DOUBLE-LINE EQUAL ABOVE GREATER-THAN
+ m_aMirrorMap[ 0x2A8C ] = 0x2A8B; // GREATER-THAN ABOVE DOUBLE-LINE EQUAL ABOVE LESS-THAN
+ m_aMirrorMap[ 0x2A91 ] = 0x2A92; // LESS-THAN ABOVE GREATER-THAN ABOVE DOUBLE-LINE EQUAL
+ m_aMirrorMap[ 0x2A92 ] = 0x2A91; // GREATER-THAN ABOVE LESS-THAN ABOVE DOUBLE-LINE EQUAL
+ m_aMirrorMap[ 0x2A93 ] = 0x2A94; // LESS-THAN ABOVE SLANTED EQUAL ABOVE GREATER-THAN ABOVE SLANTED EQUAL
+ m_aMirrorMap[ 0x2A94 ] = 0x2A93; // GREATER-THAN ABOVE SLANTED EQUAL ABOVE LESS-THAN ABOVE SLANTED EQUAL
+ m_aMirrorMap[ 0x2A95 ] = 0x2A96; // SLANTED EQUAL TO OR LESS-THAN
+ m_aMirrorMap[ 0x2A96 ] = 0x2A95; // SLANTED EQUAL TO OR GREATER-THAN
+ m_aMirrorMap[ 0x2A97 ] = 0x2A98; // SLANTED EQUAL TO OR LESS-THAN WITH DOT INSIDE
+ m_aMirrorMap[ 0x2A98 ] = 0x2A97; // SLANTED EQUAL TO OR GREATER-THAN WITH DOT INSIDE
+ m_aMirrorMap[ 0x2A99 ] = 0x2A9A; // DOUBLE-LINE EQUAL TO OR LESS-THAN
+ m_aMirrorMap[ 0x2A9A ] = 0x2A99; // DOUBLE-LINE EQUAL TO OR GREATER-THAN
+ m_aMirrorMap[ 0x2A9B ] = 0x2A9C; // DOUBLE-LINE SLANTED EQUAL TO OR LESS-THAN
+ m_aMirrorMap[ 0x2A9C ] = 0x2A9B; // DOUBLE-LINE SLANTED EQUAL TO OR GREATER-THAN
+ m_aMirrorMap[ 0x2AA1 ] = 0x2AA2; // DOUBLE NESTED LESS-THAN
+ m_aMirrorMap[ 0x2AA2 ] = 0x2AA1; // DOUBLE NESTED GREATER-THAN
+ m_aMirrorMap[ 0x2AA6 ] = 0x2AA7; // LESS-THAN CLOSED BY CURVE
+ m_aMirrorMap[ 0x2AA7 ] = 0x2AA6; // GREATER-THAN CLOSED BY CURVE
+ m_aMirrorMap[ 0x2AA8 ] = 0x2AA9; // LESS-THAN CLOSED BY CURVE ABOVE SLANTED EQUAL
+ m_aMirrorMap[ 0x2AA9 ] = 0x2AA8; // GREATER-THAN CLOSED BY CURVE ABOVE SLANTED EQUAL
+ m_aMirrorMap[ 0x2AAA ] = 0x2AAB; // SMALLER THAN
+ m_aMirrorMap[ 0x2AAB ] = 0x2AAA; // LARGER THAN
+ m_aMirrorMap[ 0x2AAC ] = 0x2AAD; // SMALLER THAN OR EQUAL TO
+ m_aMirrorMap[ 0x2AAD ] = 0x2AAC; // LARGER THAN OR EQUAL TO
+ m_aMirrorMap[ 0x2AAF ] = 0x2AB0; // PRECEDES ABOVE SINGLE-LINE EQUALS SIGN
+ m_aMirrorMap[ 0x2AB0 ] = 0x2AAF; // SUCCEEDS ABOVE SINGLE-LINE EQUALS SIGN
+ m_aMirrorMap[ 0x2AB3 ] = 0x2AB4; // PRECEDES ABOVE EQUALS SIGN
+ m_aMirrorMap[ 0x2AB4 ] = 0x2AB3; // SUCCEEDS ABOVE EQUALS SIGN
+ m_aMirrorMap[ 0x2ABB ] = 0x2ABC; // DOUBLE PRECEDES
+ m_aMirrorMap[ 0x2ABC ] = 0x2ABB; // DOUBLE SUCCEEDS
+ m_aMirrorMap[ 0x2ABD ] = 0x2ABE; // SUBSET WITH DOT
+ m_aMirrorMap[ 0x2ABE ] = 0x2ABD; // SUPERSET WITH DOT
+ m_aMirrorMap[ 0x2ABF ] = 0x2AC0; // SUBSET WITH PLUS SIGN BELOW
+ m_aMirrorMap[ 0x2AC0 ] = 0x2ABF; // SUPERSET WITH PLUS SIGN BELOW
+ m_aMirrorMap[ 0x2AC1 ] = 0x2AC2; // SUBSET WITH MULTIPLICATION SIGN BELOW
+ m_aMirrorMap[ 0x2AC2 ] = 0x2AC1; // SUPERSET WITH MULTIPLICATION SIGN BELOW
+ m_aMirrorMap[ 0x2AC3 ] = 0x2AC4; // SUBSET OF OR EQUAL TO WITH DOT ABOVE
+ m_aMirrorMap[ 0x2AC4 ] = 0x2AC3; // SUPERSET OF OR EQUAL TO WITH DOT ABOVE
+ m_aMirrorMap[ 0x2AC5 ] = 0x2AC6; // SUBSET OF ABOVE EQUALS SIGN
+ m_aMirrorMap[ 0x2AC6 ] = 0x2AC5; // SUPERSET OF ABOVE EQUALS SIGN
+ m_aMirrorMap[ 0x2ACD ] = 0x2ACE; // SQUARE LEFT OPEN BOX OPERATOR
+ m_aMirrorMap[ 0x2ACE ] = 0x2ACD; // SQUARE RIGHT OPEN BOX OPERATOR
+ m_aMirrorMap[ 0x2ACF ] = 0x2AD0; // CLOSED SUBSET
+ m_aMirrorMap[ 0x2AD0 ] = 0x2ACF; // CLOSED SUPERSET
+ m_aMirrorMap[ 0x2AD1 ] = 0x2AD2; // CLOSED SUBSET OR EQUAL TO
+ m_aMirrorMap[ 0x2AD2 ] = 0x2AD1; // CLOSED SUPERSET OR EQUAL TO
+ m_aMirrorMap[ 0x2AD3 ] = 0x2AD4; // SUBSET ABOVE SUPERSET
+ m_aMirrorMap[ 0x2AD4 ] = 0x2AD3; // SUPERSET ABOVE SUBSET
+ m_aMirrorMap[ 0x2AD5 ] = 0x2AD6; // SUBSET ABOVE SUBSET
+ m_aMirrorMap[ 0x2AD6 ] = 0x2AD5; // SUPERSET ABOVE SUPERSET
+ m_aMirrorMap[ 0x2ADE ] = 0x22A6; // SHORT LEFT TACK
+ m_aMirrorMap[ 0x2AE3 ] = 0x22A9; // DOUBLE VERTICAL BAR LEFT TURNSTILE
+ m_aMirrorMap[ 0x2AE4 ] = 0x22A8; // VERTICAL BAR DOUBLE LEFT TURNSTILE
+ m_aMirrorMap[ 0x2AE5 ] = 0x22AB; // DOUBLE VERTICAL BAR DOUBLE LEFT TURNSTILE
+ m_aMirrorMap[ 0x2AEC ] = 0x2AED; // DOUBLE STROKE NOT SIGN
+ m_aMirrorMap[ 0x2AED ] = 0x2AEC; // REVERSED DOUBLE STROKE NOT SIGN
+ m_aMirrorMap[ 0x2AF7 ] = 0x2AF8; // TRIPLE NESTED LESS-THAN
+ m_aMirrorMap[ 0x2AF8 ] = 0x2AF7; // TRIPLE NESTED GREATER-THAN
+ m_aMirrorMap[ 0x2AF9 ] = 0x2AFA; // DOUBLE-LINE SLANTED LESS-THAN OR EQUAL TO
+ m_aMirrorMap[ 0x2AFA ] = 0x2AF9; // DOUBLE-LINE SLANTED GREATER-THAN OR EQUAL TO
+ m_aMirrorMap[ 0x2E02 ] = 0x2E03; // LEFT SUBSTITUTION BRACKET
+ m_aMirrorMap[ 0x2E03 ] = 0x2E02; // RIGHT SUBSTITUTION BRACKET
+ m_aMirrorMap[ 0x2E04 ] = 0x2E05; // LEFT DOTTED SUBSTITUTION BRACKET
+ m_aMirrorMap[ 0x2E05 ] = 0x2E04; // RIGHT DOTTED SUBSTITUTION BRACKET
+ m_aMirrorMap[ 0x2E09 ] = 0x2E0A; // LEFT TRANSPOSITION BRACKET
+ m_aMirrorMap[ 0x2E0A ] = 0x2E09; // RIGHT TRANSPOSITION BRACKET
+ m_aMirrorMap[ 0x2E0C ] = 0x2E0D; // LEFT RAISED OMISSION BRACKET
+ m_aMirrorMap[ 0x2E0D ] = 0x2E0C; // RIGHT RAISED OMISSION BRACKET
+ m_aMirrorMap[ 0x2E1C ] = 0x2E1D; // LEFT LOW PARAPHRASE BRACKET
+ m_aMirrorMap[ 0x2E1D ] = 0x2E1C; // RIGHT LOW PARAPHRASE BRACKET
+ m_aMirrorMap[ 0x2E20 ] = 0x2E21; // LEFT VERTICAL BAR WITH QUILL
+ m_aMirrorMap[ 0x2E21 ] = 0x2E20; // RIGHT VERTICAL BAR WITH QUILL
+ m_aMirrorMap[ 0x2E22 ] = 0x2E23; // TOP LEFT HALF BRACKET
+ m_aMirrorMap[ 0x2E23 ] = 0x2E22; // TOP RIGHT HALF BRACKET
+ m_aMirrorMap[ 0x2E24 ] = 0x2E25; // BOTTOM LEFT HALF BRACKET
+ m_aMirrorMap[ 0x2E25 ] = 0x2E24; // BOTTOM RIGHT HALF BRACKET
+ m_aMirrorMap[ 0x2E26 ] = 0x2E27; // LEFT SIDEWAYS U BRACKET
+ m_aMirrorMap[ 0x2E27 ] = 0x2E26; // RIGHT SIDEWAYS U BRACKET
+ m_aMirrorMap[ 0x2E28 ] = 0x2E29; // LEFT DOUBLE PARENTHESIS
+ m_aMirrorMap[ 0x2E29 ] = 0x2E28; // RIGHT DOUBLE PARENTHESIS
+ m_aMirrorMap[ 0x3008 ] = 0x3009; // LEFT ANGLE BRACKET
+ m_aMirrorMap[ 0x3009 ] = 0x3008; // RIGHT ANGLE BRACKET
+ m_aMirrorMap[ 0x300A ] = 0x300B; // LEFT DOUBLE ANGLE BRACKET
+ m_aMirrorMap[ 0x300B ] = 0x300A; // RIGHT DOUBLE ANGLE BRACKET
+ m_aMirrorMap[ 0x300C ] = 0x300D; // [BEST FIT] LEFT CORNER BRACKET
+ m_aMirrorMap[ 0x300D ] = 0x300C; // [BEST FIT] RIGHT CORNER BRACKET
+ m_aMirrorMap[ 0x300E ] = 0x300F; // [BEST FIT] LEFT WHITE CORNER BRACKET
+ m_aMirrorMap[ 0x300F ] = 0x300E; // [BEST FIT] RIGHT WHITE CORNER BRACKET
+ m_aMirrorMap[ 0x3010 ] = 0x3011; // LEFT BLACK LENTICULAR BRACKET
+ m_aMirrorMap[ 0x3011 ] = 0x3010; // RIGHT BLACK LENTICULAR BRACKET
+ m_aMirrorMap[ 0x3014 ] = 0x3015; // LEFT TORTOISE SHELL BRACKET
+ m_aMirrorMap[ 0x3015 ] = 0x3014; // RIGHT TORTOISE SHELL BRACKET
+ m_aMirrorMap[ 0x3016 ] = 0x3017; // LEFT WHITE LENTICULAR BRACKET
+ m_aMirrorMap[ 0x3017 ] = 0x3016; // RIGHT WHITE LENTICULAR BRACKET
+ m_aMirrorMap[ 0x3018 ] = 0x3019; // LEFT WHITE TORTOISE SHELL BRACKET
+ m_aMirrorMap[ 0x3019 ] = 0x3018; // RIGHT WHITE TORTOISE SHELL BRACKET
+ m_aMirrorMap[ 0x301A ] = 0x301B; // LEFT WHITE SQUARE BRACKET
+ m_aMirrorMap[ 0x301B ] = 0x301A; // RIGHT WHITE SQUARE BRACKET
+ m_aMirrorMap[ 0xFE59 ] = 0xFE5A; // SMALL LEFT PARENTHESIS
+ m_aMirrorMap[ 0xFE5A ] = 0xFE59; // SMALL RIGHT PARENTHESIS
+ m_aMirrorMap[ 0xFE5B ] = 0xFE5C; // SMALL LEFT CURLY BRACKET
+ m_aMirrorMap[ 0xFE5C ] = 0xFE5B; // SMALL RIGHT CURLY BRACKET
+ m_aMirrorMap[ 0xFE5D ] = 0xFE5E; // SMALL LEFT TORTOISE SHELL BRACKET
+ m_aMirrorMap[ 0xFE5E ] = 0xFE5D; // SMALL RIGHT TORTOISE SHELL BRACKET
+ m_aMirrorMap[ 0xFE64 ] = 0xFE65; // SMALL LESS-THAN SIGN
+ m_aMirrorMap[ 0xFE65 ] = 0xFE64; // SMALL GREATER-THAN SIGN
+ m_aMirrorMap[ 0xFF08 ] = 0xFF09; // FULLWIDTH LEFT PARENTHESIS
+ m_aMirrorMap[ 0xFF09 ] = 0xFF08; // FULLWIDTH RIGHT PARENTHESIS
+ m_aMirrorMap[ 0xFF1C ] = 0xFF1E; // FULLWIDTH LESS-THAN SIGN
+ m_aMirrorMap[ 0xFF1E ] = 0xFF1C; // FULLWIDTH GREATER-THAN SIGN
+ m_aMirrorMap[ 0xFF3B ] = 0xFF3D; // FULLWIDTH LEFT SQUARE BRACKET
+ m_aMirrorMap[ 0xFF3D ] = 0xFF3B; // FULLWIDTH RIGHT SQUARE BRACKET
+ m_aMirrorMap[ 0xFF5B ] = 0xFF5D; // FULLWIDTH LEFT CURLY BRACKET
+ m_aMirrorMap[ 0xFF5D ] = 0xFF5B; // FULLWIDTH RIGHT CURLY BRACKET
+ m_aMirrorMap[ 0xFF5F ] = 0xFF60; // FULLWIDTH LEFT WHITE PARENTHESIS
+ m_aMirrorMap[ 0xFF60 ] = 0xFF5F; // FULLWIDTH RIGHT WHITE PARENTHESIS
+ m_aMirrorMap[ 0xFF62 ] = 0xFF63; // [BEST FIT] HALFWIDTH LEFT CORNER BRACKET
+ m_aMirrorMap[ 0xFF63 ] = 0xFF62; // [BEST FIT] HALFWIDTH RIGHT CORNER BRACKET
+ }
+}
+
}
diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.hxx b/sdext/source/pdfimport/tree/pdfiprocessor.hxx
index e646d6999df7..45a6d3c915f8 100644
--- a/sdext/source/pdfimport/tree/pdfiprocessor.hxx
+++ b/sdext/source/pdfimport/tree/pdfiprocessor.hxx
@@ -28,6 +28,7 @@
#ifndef INCLUDED_PDFI_PROCESSOR_HXX
#define INCLUDED_PDFI_PROCESSOR_HXX
+#include <com/sun/star/util/XStringMapping.hpp>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#include <com/sun/star/task/XStatusIndicator.hpp>
#include <com/sun/star/rendering/XVolatileBitmap.hpp>
@@ -108,7 +109,10 @@ namespace pdfi
void sortElements( Element* pElement, bool bDeep = false );
void sortDocument( bool bDeep = false );
+ rtl::OUString mirrorString( const rtl::OUString& i_rInString );
+
private:
+ void prepareMirrorMap();
void processGlyphLine();
void processGlyph( double fPreAvarageSpaceValue,
CharGlyph& rGlyph,
@@ -242,6 +246,11 @@ namespace pdfi
m_xStatusIndicator;
bool m_bHaveTextOnDocLevel;
+ std::vector< sal_Unicode > m_aMirrorMap;
+ com::sun::star::uno::Reference<
+ com::sun::star::util::XStringMapping >
+ m_xMirrorMapper;
+ bool m_bMirrorMapperTried;
};
class CharGlyph
{
diff --git a/sdext/source/pdfimport/tree/treevisitorfactory.cxx b/sdext/source/pdfimport/tree/treevisitorfactory.cxx
index e8a44bbe661d..5c6667ea43f9 100644
--- a/sdext/source/pdfimport/tree/treevisitorfactory.cxx
+++ b/sdext/source/pdfimport/tree/treevisitorfactory.cxx
@@ -50,7 +50,7 @@ namespace pdfi
return boost::shared_ptr<ElementTreeVisitor>(new WriterXmlFinalizer(rStyles,rProc));
}
- virtual boost::shared_ptr<ElementTreeVisitor> createEmittingVisitor(EmitContext& rEmitContext) const
+ virtual boost::shared_ptr<ElementTreeVisitor> createEmittingVisitor(EmitContext& rEmitContext, PDFIProcessor&) const
{
return boost::shared_ptr<ElementTreeVisitor>(new WriterXmlEmitter(rEmitContext));
}
@@ -72,10 +72,12 @@ namespace pdfi
return boost::shared_ptr<ElementTreeVisitor>(new DrawXmlFinalizer(rStyles,rProc));
}
- virtual boost::shared_ptr<ElementTreeVisitor> createEmittingVisitor(EmitContext& rEmitContext) const
+ virtual boost::shared_ptr<ElementTreeVisitor> createEmittingVisitor(EmitContext& rEmitContext, PDFIProcessor& rProc) const
{
return boost::shared_ptr<ElementTreeVisitor>(new DrawXmlEmitter(rEmitContext,
- DrawXmlEmitter::IMPRESS_DOC));
+ DrawXmlEmitter::IMPRESS_DOC,
+ rProc
+ ));
}
};
@@ -95,10 +97,12 @@ namespace pdfi
return boost::shared_ptr<ElementTreeVisitor>(new DrawXmlFinalizer(rStyles,rProc));
}
- virtual boost::shared_ptr<ElementTreeVisitor> createEmittingVisitor(EmitContext& rEmitContext) const
+ virtual boost::shared_ptr<ElementTreeVisitor> createEmittingVisitor(EmitContext& rEmitContext, PDFIProcessor& rProc) const
{
return boost::shared_ptr<ElementTreeVisitor>(new DrawXmlEmitter(rEmitContext,
- DrawXmlEmitter::DRAW_DOC));
+ DrawXmlEmitter::DRAW_DOC,
+ rProc
+ ));
}
};
diff --git a/set_soenv.in b/set_soenv.in
index ab8693ed85b1..6bd65867a5a7 100644
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -1916,6 +1916,7 @@ ToFile( "BUILD_UNOWINREG", "@BUILD_UNOWINREG@", "e" );
ToFile( "USE_XINERAMA", "@USE_XINERAMA@", "e" );
ToFile( "XINERAMA_LINK", "@XINERAMA_LINK@", "e" );
ToFile( "SYSTEM_REDLAND", "@SYSTEM_REDLAND@", "e" );
+ToFile( "REDLAND_CFLAGS", "@REDLAND_CFLAGS@", "e" );
ToFile( "REDLAND_LIBS", "@REDLAND_LIBS@", "e" );
ToFile( "SYSTEM_HUNSPELL", "@SYSTEM_HUNSPELL@", "e" );
ToFile( "HUNSPELL_CFLAGS", "@HUNSPELL_CFLAGS@", "e" );
diff --git a/setup_native/scripts/osx_install_languagepack.applescript b/setup_native/scripts/osx_install_languagepack.applescript
index 33d376adec1b..9fb4bdacbec1 100644
--- a/setup_native/scripts/osx_install_languagepack.applescript
+++ b/setup_native/scripts/osx_install_languagepack.applescript
@@ -45,7 +45,7 @@ if (button returned of result) is AbortLabel then
return 2
end if
-set the found_ooos to (do shell script "mdfind \"kMDItemContentType == 'com.apple.application-bundle' && kMDItemDisplayName == '[PRODUCTNAME]*' && kMDItemDisplayName != '[FULLPRODUCTNAME].app'\"") & "
+set the found_ooos to (do shell script "mdfind \"kMDItemContentType == 'com.apple.application-bundle' && kMDItemDisplayName == '[PRODUCTNAME]*' && kMDItemDisplayName != '[FULLAPPPRODUCTNAME].app'\"") & "
" & chooseMyOwn
-- the choice returned is of type "list"
diff --git a/setup_native/scripts/osx_install_patch.applescript b/setup_native/scripts/osx_install_patch.applescript
index 33a9d4126339..e9dbd442d3a7 100644
--- a/setup_native/scripts/osx_install_patch.applescript
+++ b/setup_native/scripts/osx_install_patch.applescript
@@ -43,7 +43,7 @@ if (button returned of result) is AbortLabel then
return 2
end if
-set the found_ooos to (do shell script "mdfind \"kMDItemContentType == 'com.apple.application-bundle' && kMDItemDisplayName == '[PRODUCTNAME]*' && kMDItemDisplayName != '[FULLPRODUCTNAME].app'\"") & "
+set the found_ooos to (do shell script "mdfind \"kMDItemContentType == 'com.apple.application-bundle' && kMDItemDisplayName == '[PRODUCTNAME]*' && kMDItemDisplayName != '[FULLAPPPRODUCTNAME].app'\"") & "
" & chooseMyOwn
-- the choice returned is of type "list"
diff --git a/setup_native/source/mac/Info.plist.langpack b/setup_native/source/mac/Info.plist.langpack
index 3c1eb2c6f369..38fc794aa483 100644
--- a/setup_native/source/mac/Info.plist.langpack
+++ b/setup_native/source/mac/Info.plist.langpack
@@ -10,9 +10,9 @@
<key>UTImportedTypeDeclarations</key>
<key>CFBundleExecutable</key>
- <string>[FULLPRODUCTNAME]</string>
+ <string>[FULLAPPPRODUCTNAME]</string>
<key>CFBundleGetInfoString</key>
- <string>[FULLPRODUCTNAME]</string>
+ <string>[FULLAPPPRODUCTNAME]</string>
<key>CFBundleIconFile</key>
<string>ooo3_installer.icns</string>
<key>CFBundleShortVersionString</key>
@@ -22,7 +22,7 @@
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
- <string>[FULLPRODUCTNAME]</string>
+ <string>[FULLAPPPRODUCTNAME]</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
diff --git a/setup_native/source/mac/broffice/DS_Store b/setup_native/source/mac/broffice/DS_Store
index b0407ef50452..a534e3bedbf8 100644
--- a/setup_native/source/mac/broffice/DS_Store
+++ b/setup_native/source/mac/broffice/DS_Store
Binary files differ
diff --git a/setup_native/source/mac/ooo/DS_Store b/setup_native/source/mac/ooo/DS_Store
index e722b546e576..dae0af0a4bbf 100644
--- a/setup_native/source/mac/ooo/DS_Store
+++ b/setup_native/source/mac/ooo/DS_Store
Binary files differ
diff --git a/setup_native/source/mac/ooo/DS_Store_Langpack b/setup_native/source/mac/ooo/DS_Store_Langpack
index 3a8ad71a5660..21b08ffb18cc 100644
--- a/setup_native/source/mac/ooo/DS_Store_Langpack
+++ b/setup_native/source/mac/ooo/DS_Store_Langpack
Binary files differ
diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx
index a82b72bc2947..0e263a58b90e 100644
--- a/sfx2/source/inc/workwin.hxx
+++ b/sfx2/source/inc/workwin.hxx
@@ -28,6 +28,7 @@
#define _SFXWORKWIN_HXX
#include <vector>
+#include <deque>
#include <com/sun/star/frame/XDispatch.hpp>
#include <com/sun/star/frame/XFrame.hpp>
#ifndef _COM_SUN_STAR_UI_XUILEMENT_HPP_
@@ -175,11 +176,10 @@ enum SfxDockingConfig
DECL_PTRARRAY( SfxChildList_Impl, SfxChild_Impl*, 2, 2 )
DECL_PTRARRAY( SfxChildWindows_Impl, SfxChildWin_Impl*, 2, 2 )
-SV_DECL_OBJARR( SfxObjectBarArr_Impl, SfxObjectBar_Impl, 1, 2 )
struct SfxObjectBarList_Impl
{
- SfxObjectBarArr_Impl aArr;
+ std::deque<SfxObjectBar_Impl> aArr;
USHORT nAct;
SfxObjectBar_Impl operator[] ( USHORT n )
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index cda5fd0bdd7d..93c4eeb33cee 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -1052,7 +1052,7 @@ void SAL_CALL SfxBaseController::dispose() throw( ::com::sun::star::uno::Runtime
if ( pFrame && pFrame->GetViewShell() == m_pData->m_pViewShell )
pFrame->GetFrame().SetIsClosing_Impl();
m_pData->m_pViewShell->DiscardClients_Impl();
- m_pData->m_pViewShell->pImp->bControllerSet = sal_False ;
+ m_pData->m_pViewShell->pImp->m_bControllerSet = false;
if ( pFrame )
{
diff --git a/sfx2/source/view/viewimp.hxx b/sfx2/source/view/viewimp.hxx
index be20cd2f2a47..0826e78870bb 100644
--- a/sfx2/source/view/viewimp.hxx
+++ b/sfx2/source/view/viewimp.hxx
@@ -25,8 +25,8 @@
*
************************************************************************/
-#ifndef _VIEWIMP_HXX
-#define _VIEWIMP_HXX
+#ifndef SFX_VIEWIMP_HXX
+#define SFX_VIEWIMP_HXX
// include ---------------------------------------------------------------
@@ -56,28 +56,29 @@ struct SfxViewShell_Impl
{
::osl::Mutex aMutex;
::cppu::OInterfaceContainerHelper aInterceptorContainer;
- BOOL bControllerSet;
+ bool m_bControllerSet;
SfxShellArr_Impl aArr;
SvBorder aBorder;
Size aOptimalSize;
Size aMargin;
- USHORT nPrinterLocks;
- BOOL bCanPrint;
- BOOL bHasPrintOptions;
- BOOL bPlugInsActive;
- BOOL bIsShowView;
- BOOL bOwnsMenu;
- BOOL bGotOwnerShip;
- BOOL bGotFrameOwnerShip;
- SfxScrollingMode eScroll;
- USHORT nFamily;
- SfxBaseController* pController;
- ::svt::AcceleratorExecute* pAccExec;
+ USHORT m_nPrinterLocks;
+ bool m_bCanPrint;
+ bool m_bHasPrintOptions;
+ bool m_bPlugInsActive;
+ bool m_bIsShowView;
+ // FIXME UNUSED ???
+ //bool m_bOwnsMenu;
+ bool m_bGotOwnership;
+ bool m_bGotFrameOwnership;
+ SfxScrollingMode m_eScroll;
+ USHORT m_nFamily;
+ ::rtl::Reference<SfxBaseController> m_pController;
+ ::std::auto_ptr< ::svt::AcceleratorExecute > m_pAccExec;
com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue > aPrintOpts;
::rtl::Reference< SfxClipboardChangeListener > xClipboardListener;
::boost::shared_ptr< vcl::PrinterController > m_pPrinterController;
- SfxViewShell_Impl();
+ SfxViewShell_Impl(USHORT const nFlags);
};
#endif
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 4ed0173be8e1..d1cfd8c2d181 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -143,18 +143,26 @@ SfxPrinterController::SfxPrinterController( const Any& i_rComplete,
aRenderOptions[1].Value = i_rViewProp;
aRenderOptions[2].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsPrinter" ) );
aRenderOptions[2].Value <<= sal_True;
- Sequence< beans::PropertyValue > aRenderParms( mxRenderable->getRenderer( 0 , getSelectionObject(), aRenderOptions ) );
- int nProps = aRenderParms.getLength();
- for( int i = 0; i < nProps; i++ )
+ try
{
- if( aRenderParms[i].Name.equalsAscii( "ExtraPrintUIOptions" ) )
+ Sequence< beans::PropertyValue > aRenderParms( mxRenderable->getRenderer( 0 , getSelectionObject(), aRenderOptions ) );
+ int nProps = aRenderParms.getLength();
+ for( int i = 0; i < nProps; i++ )
{
- Sequence< beans::PropertyValue > aUIProps;
- aRenderParms[i].Value >>= aUIProps;
- setUIOptions( aUIProps );
- break;
+ if( aRenderParms[i].Name.equalsAscii( "ExtraPrintUIOptions" ) )
+ {
+ Sequence< beans::PropertyValue > aUIProps;
+ aRenderParms[i].Value >>= aUIProps;
+ setUIOptions( aUIProps );
+ break;
+ }
}
}
+ catch( lang::IllegalArgumentException& )
+ {
+ // the first renderer should always be available for the UI options,
+ // but catch the exception to be safe
+ }
}
// set some job parameters
@@ -234,7 +242,13 @@ Sequence< beans::PropertyValue > SfxPrinterController::getPageParameters( int i_
if( mxRenderable.is() && pPrinter )
{
Sequence< beans::PropertyValue > aJobOptions( getMergedOptions() );
- aResult = mxRenderable->getRenderer( i_nPage, getSelectionObject(), aJobOptions );
+ try
+ {
+ aResult = mxRenderable->getRenderer( i_nPage, getSelectionObject(), aJobOptions );
+ }
+ catch( lang::IllegalArgumentException& )
+ {
+ }
}
return aResult;
}
@@ -836,7 +850,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
// execute PrinterSetupDialog
PrinterSetupDialog* pPrintSetupDlg = new PrinterSetupDialog( GetWindow() );
- if ( pImp->bHasPrintOptions )
+ if (pImp->m_bHasPrintOptions)
{
// additional controls for dialog
pExecutor = new SfxDialogExecutor_Impl( this, pPrintSetupDlg );
@@ -985,7 +999,7 @@ ErrCode SfxViewShell::DoPrint( SfxPrinter* /*pPrinter*/,
BOOL SfxViewShell::IsPrinterLocked() const
{
- return pImp->nPrinterLocks > 0;
+ return pImp->m_nPrinterLocks > 0;
}
//--------------------------------------------------------------------
@@ -994,9 +1008,13 @@ void SfxViewShell::LockPrinter( BOOL bLock)
{
BOOL bChanged = FALSE;
if ( bLock )
- bChanged = 1 == ++pImp->nPrinterLocks;
+ {
+ bChanged = 1 == ++pImp->m_nPrinterLocks;
+ }
else
- bChanged = 0 == --pImp->nPrinterLocks;
+ {
+ bChanged = 0 == --pImp->m_nPrinterLocks;
+ }
if ( bChanged )
{
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 5c65c967434f..5c41ba167c55 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -240,9 +240,21 @@ static ::rtl::OUString RetrieveLabelFromCommand(
}
//=========================================================================
-SfxViewShell_Impl::SfxViewShell_Impl()
+SfxViewShell_Impl::SfxViewShell_Impl(USHORT const nFlags)
: aInterceptorContainer( aMutex )
-, pAccExec(0)
+, m_bControllerSet(false)
+, m_nPrinterLocks(0)
+, m_bCanPrint(SFX_VIEW_CAN_PRINT == (nFlags & SFX_VIEW_CAN_PRINT))
+, m_bHasPrintOptions(
+ SFX_VIEW_HAS_PRINTOPTIONS == (nFlags & SFX_VIEW_HAS_PRINTOPTIONS))
+, m_bPlugInsActive(true)
+, m_bIsShowView(SFX_VIEW_NO_SHOW != (nFlags & SFX_VIEW_NO_SHOW))
+, m_bGotOwnership(false)
+, m_bGotFrameOwnership(false)
+, m_eScroll(SCROLLING_DEFAULT)
+, m_nFamily(-1) // undefined, default set by TemplateDialog
+, m_pController(0)
+, m_pAccExec(0)
{}
//=========================================================================
@@ -374,7 +386,9 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
{
SFX_REQUEST_ARG(rReq, pItem, SfxUInt16Item, nId, FALSE);
if (pItem)
- pImp->nFamily = pItem->GetValue();
+ {
+ pImp->m_nFamily = pItem->GetValue();
+ }
break;
}
@@ -674,7 +688,9 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
case SID_PLUGINS_ACTIVE:
{
SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nId, FALSE);
- BOOL bActive = pShowItem ? pShowItem->GetValue() : !pImp->bPlugInsActive;
+ bool const bActive = (pShowItem)
+ ? pShowItem->GetValue()
+ : !pImp->m_bPlugInsActive;
// ggf. recorden
if ( !rReq.IsAPI() )
rReq.AppendItem( SfxBoolItem( nId, bActive ) );
@@ -684,7 +700,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
rReq.Done(TRUE);
// ausfuehren
- if ( !pShowItem || bActive != pImp->bPlugInsActive )
+ if (!pShowItem || (bActive != pImp->m_bPlugInsActive))
{
SfxFrame* pTopFrame = &GetFrame()->GetTopFrame();
if ( pTopFrame != &GetFrame()->GetFrame() )
@@ -704,7 +720,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
SfxViewShell *pView = pTopFrame->GetCurrentViewFrame()->GetViewShell();
if ( pView )
{
- pView->pImp->bPlugInsActive = bActive;
+ pView->pImp->m_bPlugInsActive = bActive;
Rectangle aVisArea = GetObjectShell()->GetVisArea();
VisAreaChanged(aVisArea);
@@ -758,7 +774,7 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet )
case SID_SETUPPRINTER:
case SID_PRINTER_NAME:
{
- BOOL bEnabled = pImp->bCanPrint && !pImp->nPrinterLocks;
+ bool bEnabled = pImp->m_bCanPrint && !pImp->m_nPrinterLocks;
bEnabled = bEnabled && !Application::GetSettings().GetMiscSettings().GetDisablePrinting();
if ( bEnabled )
{
@@ -812,7 +828,8 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet )
// PlugIns running
case SID_PLUGINS_ACTIVE:
{
- rSet.Put( SfxBoolItem( SID_PLUGINS_ACTIVE, !pImp->bPlugInsActive) );
+ rSet.Put( SfxBoolItem( SID_PLUGINS_ACTIVE,
+ !pImp->m_bPlugInsActive) );
break;
}
/*
@@ -832,7 +849,7 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet )
*/
case SID_STYLE_FAMILY :
{
- rSet.Put( SfxUInt16Item( SID_STYLE_FAMILY, pImp->nFamily ) );
+ rSet.Put( SfxUInt16Item( SID_STYLE_FAMILY, pImp->m_nFamily ) );
break;
}
}
@@ -1155,8 +1172,10 @@ void SfxViewShell::InvalidateBorder()
DBG_ASSERT( GetViewFrame(), "SfxViewShell without SfxViewFrame" );
GetViewFrame()->InvalidateBorderImpl( this );
- if ( pImp->pController )
- pImp->pController->BorderWidthsChanged_Impl();
+ if (pImp->m_pController.is())
+ {
+ pImp->m_pController->BorderWidthsChanged_Impl();
+ }
}
//--------------------------------------------------------------------
@@ -1171,8 +1190,10 @@ void SfxViewShell::SetBorderPixel( const SvBorder &rBorder )
GetViewFrame()->SetBorderPixelImpl( this, rBorder );
// notify related controller that border size is changed
- if ( pImp->pController )
- pImp->pController->BorderWidthsChanged_Impl();
+ if (pImp->m_pController.is())
+ {
+ pImp->m_pController->BorderWidthsChanged_Impl();
+ }
}
}
@@ -1247,7 +1268,7 @@ SfxViewShell::SfxViewShell
)
: SfxShell(this)
- ,pImp( new SfxViewShell_Impl )
+, pImp( new SfxViewShell_Impl(nFlags) )
,pIPClientList( 0 )
,pFrame(pViewFrame)
,pSubShell(0)
@@ -1257,22 +1278,12 @@ SfxViewShell::SfxViewShell
DBG_CTOR(SfxViewShell, 0);
//pImp->pPrinterCommandQueue = new SfxAsyncPrintExec_Impl( this );
- pImp->pController = 0;
- pImp->bIsShowView =
- !(SFX_VIEW_NO_SHOW == (nFlags & SFX_VIEW_NO_SHOW));
-
- pImp->bCanPrint = SFX_VIEW_CAN_PRINT == (nFlags & SFX_VIEW_CAN_PRINT);
- pImp->bHasPrintOptions =
- SFX_VIEW_HAS_PRINTOPTIONS == (nFlags & SFX_VIEW_HAS_PRINTOPTIONS);
- pImp->bPlugInsActive = TRUE;
- pImp->bGotOwnerShip = FALSE;
- pImp->bGotFrameOwnerShip = FALSE;
+
if ( pViewFrame->GetParentViewFrame() )
- pImp->bPlugInsActive = pViewFrame->GetParentViewFrame()->GetViewShell()->pImp->bPlugInsActive;
- pImp->eScroll = SCROLLING_DEFAULT;
- pImp->nPrinterLocks = 0;
- pImp->bControllerSet = FALSE;
- pImp->nFamily = 0xFFFF; // undefined, default set by TemplateDialog
+ {
+ pImp->m_bPlugInsActive = pViewFrame->GetParentViewFrame()
+ ->GetViewShell()->pImp->m_bPlugInsActive;
+ }
SetMargin( pViewFrame->GetMargin_Impl() );
SetPool( &pViewFrame->GetObjectShell()->GetPool() );
@@ -1301,16 +1312,10 @@ SfxViewShell::~SfxViewShell()
pImp->xClipboardListener = NULL;
}
- if ( pImp->pController )
+ if (pImp->m_pController.is())
{
- pImp->pController->ReleaseShell_Impl();
- pImp->pController->release();
- pImp->pController = NULL;
- }
-
- if (pImp->pAccExec)
- {
- DELETEZ( pImp->pAccExec );
+ pImp->m_pController->ReleaseShell_Impl();
+ pImp->m_pController.clear();
}
//DELETEZ( pImp->pPrinterCommandQueue );
@@ -1660,7 +1665,8 @@ void SfxViewShell::Notify( SfxBroadcaster& rBC,
SFX_ITEMSET_ARG( pSet, pItem, SfxUnoAnyItem, SID_VIEW_DATA, sal_False );
if ( pItem )
{
- pImp->pController->restoreViewData( pItem->GetValue() );
+ pImp->m_pController->restoreViewData(
+ pItem->GetValue() );
pSet->ClearItem( SID_VIEW_DATA );
}
@@ -1679,13 +1685,15 @@ void SfxViewShell::Notify( SfxBroadcaster& rBC,
BOOL SfxViewShell::ExecKey_Impl(const KeyEvent& aKey)
{
- if (!pImp->pAccExec)
+ if (!pImp->m_pAccExec.get())
{
- pImp->pAccExec = ::svt::AcceleratorExecute::createAcceleratorHelper();
- pImp->pAccExec->init(::comphelper::getProcessServiceFactory(), pFrame->GetFrame().GetFrameInterface());
+ pImp->m_pAccExec.reset(
+ ::svt::AcceleratorExecute::createAcceleratorHelper() );
+ pImp->m_pAccExec->init(::comphelper::getProcessServiceFactory(),
+ pFrame->GetFrame().GetFrameInterface());
}
- return pImp->pAccExec->execute(aKey.GetKeyCode());
+ return pImp->m_pAccExec->execute(aKey.GetKeyCode());
}
//--------------------------------------------------------------------
@@ -1828,7 +1836,7 @@ void SfxViewShell::CheckIPClient_Impl( SfxInPlaceClient *pIPClient, const Rectan
( ( pIPClient->GetObjectMiscStatus() & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE ) != 0 );
// this method is called when either a client is created or the "Edit/Plugins" checkbox is checked
- if ( !pIPClient->IsObjectInPlaceActive() && pImp->bPlugInsActive )
+ if ( !pIPClient->IsObjectInPlaceActive() && pImp->m_bPlugInsActive )
{
// object in client is currently not active
// check if the object wants to be activated always or when it becomes at least partially visible
@@ -1844,7 +1852,7 @@ void SfxViewShell::CheckIPClient_Impl( SfxInPlaceClient *pIPClient, const Rectan
}
}
}
- else if ( !pImp->bPlugInsActive )
+ else if (!pImp->m_bPlugInsActive)
{
// object in client is currently active and "Edit/Plugins" checkbox is selected
// check if the object wants to be activated always or when it becomes at least partially visible
@@ -1858,7 +1866,7 @@ void SfxViewShell::CheckIPClient_Impl( SfxInPlaceClient *pIPClient, const Rectan
BOOL SfxViewShell::PlugInsActive() const
{
- return pImp->bPlugInsActive;
+ return pImp->m_bPlugInsActive;
}
//--------------------------------------------------------------------
@@ -1884,14 +1892,14 @@ void SfxViewShell::DiscardClients_Impl()
SfxScrollingMode SfxViewShell::GetScrollingMode() const
{
- return pImp->eScroll;
+ return pImp->m_eScroll;
}
//--------------------------------------------------------------------
void SfxViewShell::SetScrollingMode( SfxScrollingMode eMode )
{
- pImp->eScroll = eMode;
+ pImp->m_eScroll = eMode;
}
//--------------------------------------------------------------------
@@ -1958,7 +1966,7 @@ void SfxViewShell::MarginChanged()
BOOL SfxViewShell::IsShowView_Impl() const
{
- return pImp->bIsShowView;
+ return pImp->m_bIsShowView;
}
//--------------------------------------------------------------------
@@ -1990,9 +1998,8 @@ SfxInPlaceClientList* SfxViewShell::GetIPClientList_Impl( BOOL bCreate ) const
void SfxViewShell::SetController( SfxBaseController* pController )
{
- pImp->pController = pController;
- pImp->pController->acquire();
- pImp->bControllerSet = TRUE;
+ pImp->m_pController = pController;
+ pImp->m_bControllerSet = true;
// there should be no old listener, but if there is one, it should be disconnected
if ( pImp->xClipboardListener.is() )
@@ -2004,12 +2011,12 @@ void SfxViewShell::SetController( SfxBaseController* pController )
Reference < XController > SfxViewShell::GetController()
{
- return pImp->pController;
+ return pImp->m_pController.get();
}
SfxBaseController* SfxViewShell::GetBaseController_Impl() const
{
- return pImp->pController;
+ return pImp->m_pController.get();
}
void SfxViewShell::AddContextMenuInterceptor_Impl( const REFERENCE< XCONTEXTMENUINTERCEPTOR >& xInterceptor )
@@ -2131,20 +2138,20 @@ void SfxViewShell::TakeOwnerShip_Impl()
{
// currently there is only one reason to take OwnerShip: a hidden frame is printed
// so the ViewShell will check this on EndPrint (->prnmon.cxx)
- pImp->bGotOwnerShip = TRUE;
+ pImp->m_bGotOwnership = true;
}
void SfxViewShell::TakeFrameOwnerShip_Impl()
{
// currently there is only one reason to take OwnerShip: a hidden frame is printed
// so the ViewShell will check this on EndPrint (->prnmon.cxx)
- pImp->bGotFrameOwnerShip = TRUE;
+ pImp->m_bGotFrameOwnership = true;
}
void SfxViewShell::CheckOwnerShip_Impl()
{
BOOL bSuccess = FALSE;
- if( pImp->bGotOwnerShip )
+ if (pImp->m_bGotOwnership)
{
com::sun::star::uno::Reference < com::sun::star::util::XCloseable > xModel(
GetObjectShell()->GetModel(), com::sun::star::uno::UNO_QUERY );
@@ -2162,7 +2169,7 @@ void SfxViewShell::CheckOwnerShip_Impl()
}
}
- if( !bSuccess && pImp->bGotFrameOwnerShip )
+ if (!bSuccess && pImp->m_bGotFrameOwnership)
{
// document couldn't be closed or it shouldn't, now try at least to close the frame
com::sun::star::uno::Reference < com::sun::star::util::XCloseable > xFrame(
@@ -2182,19 +2189,23 @@ void SfxViewShell::CheckOwnerShip_Impl()
long SfxViewShell::HandleNotifyEvent_Impl( NotifyEvent& rEvent )
{
- if ( pImp->pController )
- return pImp->pController->HandleEvent_Impl( rEvent );
+ if (pImp->m_pController.is())
+ {
+ return pImp->m_pController->HandleEvent_Impl( rEvent );
+ }
return 0;
}
BOOL SfxViewShell::HasKeyListeners_Impl()
{
- return pImp->pController ? pImp->pController->HasKeyListeners_Impl() : FALSE;
+ return (pImp->m_pController.is())
+ ? pImp->m_pController->HasKeyListeners_Impl() : FALSE;
}
BOOL SfxViewShell::HasMouseClickListeners_Impl()
{
- return pImp->pController ? pImp->pController->HasMouseClickListeners_Impl() : FALSE;
+ return (pImp->m_pController.is())
+ ? pImp->m_pController->HasMouseClickListeners_Impl() : FALSE;
}
void SfxViewShell::SetAdditionalPrintOptions( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& rOpts )
diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl
index bff6e870f2e9..0ba604d55cec 100644..100755
--- a/solenv/bin/build.pl
+++ b/solenv/bin/build.pl
@@ -30,6 +30,7 @@
#
# build - build entire project
#
+ use strict;
use Config;
use POSIX;
use Cwd qw (cwd);
@@ -46,6 +47,7 @@
use lib ("$ENV{SOLARENV}/bin/modules");
use SourceConfig;
use RepositoryHelper;
+ use Cwd 'chdir';
my $in_so_env = 0;
if (defined $ENV{COMMON_ENV_TOOLS}) {
@@ -61,24 +63,19 @@
$verbose_mode = ($ENV{verbose} =~ /^t\S*$/i);
}
my $enable_multiprocessing = 1;
- my $cygwin = 0;
- $cygwin++ if ($^O eq 'cygwin');
- if ($ENV{GUI} eq 'WNT' && !$cygwin) {
- eval { require Win32::Process; import Win32::Process; };
- $enable_multiprocessing = 0 if ($@);
- eval { require Win32::Pipe; import Win32::Pipe; };
- };
-
### for XML file format
eval { require XMLBuildListParser; import XMLBuildListParser; };
+ my $enable_xml = 0;
+ my @modes_array = ();
if (!$@) {
$enable_xml = 1;
@modes_array = split('\s' , $ENV{BUILD_TYPE});
};
#### script id #####
- ( $script_name = $0 ) =~ s/^.*\b(\w+)\.pl$/$1/;
- $id_str = ' $Revision: 275224 $ ';
+ ( my $script_name = $0 ) =~ s/^.*\b(\w+)\.pl$/$1/;
+ my $id_str = ' $Revision: 275224 $ ';
+ my $script_rev = 0;
$id_str =~ /Revision:\s+(\S+)\s+\$/
? ($script_rev = $1) : ($script_rev = "-");
@@ -90,103 +87,98 @@
# #
#########################
- $modules_number++;
- $perl = "";
- $remove_command = "";
- use Cwd 'chdir';
- $perl = 'perl';
- $remove_command = 'rm -rf';
- $nul = '> /dev/null';
+ my $modules_number++;
+ my $perl = 'perl';
+ my $remove_command = 'rm -rf';
+ my $nul = '> /dev/null';
- $processes_to_run = 0;
+ my $processes_to_run = 0;
# delete $pid when not needed
- %projects_deps_hash = (); # hash of projects with no dependencies,
+ my %projects_deps_hash = (); # hash of projects with no dependencies,
# that could be built now
- %broken_build = (); # hash of hashes of the modules,
+ my %broken_build = (); # hash of hashes of the modules,
# where build was broken (error occurred)
- %folders_hashes = ();
- %running_children = ();
- $dependencies_hash = 0;
- $cmd_file = '';
- $build_all_parents = 0;
- $show = 0;
- $checkparents = 0;
- $deliver = 0;
- $pre_custom_job = '';
- $custom_job = '';
- $post_custom_job = '';
- %local_deps_hash = ();
- %PathHash = ();
- %PlatformHash = ();
- %AliveDependencies = ();
- %global_deps_hash = (); # hash of dependencies of the all modules
- %global_deps_hash_backup = (); # backup hash of external dependencies of the all modules
- %module_deps_hash_backup = (); # backup hash of internal dependencies for aech module
- %modules_with_errors = (); # hash of modules hashes, which cannot be built further
- @broken_modules_names = (); # array of modules, which cannot be built further
- @dmake_args = ();
- %dead_parents = ();
- $initial_module = '';
- $all_dependent = 1; # a flag indicating if the hash has independent keys
- $build_from_with_branches = '';
- $build_all_cont = '';
- $build_since = '';
- $dlv_switch = '';
- $child = 0;
- %processes_hash = ();
- %module_announced = ();
- $prepare = ''; # prepare for following incompatible build
- $ignore = '';
- $html = '';
- @ignored_errors = ();
- %incompatibles = ();
- %skip_modules = ();
- %exclude_branches = ();
- $only_platform = ''; # the only platform to prepare
- $only_common = ''; # the only common output tree to delete when preparing
- %build_modes = ();
- $maximal_processes = 0; # the max number of the processes run
- %modules_types = (); # modules types ('mod', 'img', 'lnk') hash
- %platforms = (); # platforms available or being working with
- %platforms_to_copy = (); # copy output trees for the platforms when --prepare
- $tmp_dir = get_tmp_dir(); # temp directory for checkout and other actions
+ my %folders_hashes = ();
+ my %running_children = ();
+ my $dependencies_hash = 0;
+ my $cmd_file = '';
+ my $build_all_parents = 0;
+ my $show = 0;
+ my $checkparents = 0;
+ my $deliver = 0;
+ my $pre_custom_job = '';
+ my $custom_job = '';
+ my $post_custom_job = '';
+ my %local_deps_hash = ();
+ my %path_hash = ();
+ my %platform_hash = ();
+ my %alive_dependencies = ();
+ my %global_deps_hash = (); # hash of dependencies of the all modules
+ my %global_deps_hash_backup = (); # backup hash of external dependencies of the all modules
+ my %module_deps_hash_backup = (); # backup hash of internal dependencies for aech module
+ my @broken_module_names = (); # array of modules, which cannot be built further
+ my @dmake_args = ();
+ my %dead_parents = ();
+ my $initial_module = '';
+ my $all_dependent = 1; # a flag indicating if the hash has independent keys
+ my $build_from_with_branches = '';
+ my $build_all_cont = '';
+ my $build_since = '';
+ my $dlv_switch = '';
+ my $child = 0;
+ my %processes_hash = ();
+ my %module_announced = ();
+ my $prepare = ''; # prepare for following incompatible build
+ my $ignore = '';
+ my $html = '';
+ my @ignored_errors = ();
+ my %incompatibles = ();
+ my %skip_modules = ();
+ my %exclude_branches = ();
+ my $only_platform = ''; # the only platform to prepare
+ my $only_common = ''; # the only common output tree to delete when preparing
+ my %build_modes = ();
+ my $maximal_processes = 0; # the max number of the processes run
+ my %modules_types = (); # modules types ('mod', 'img', 'lnk') hash
+ my %platforms = (); # platforms available or being working with
+ my %platforms_to_copy = (); # copy output trees for the platforms when --prepare
+ my $tmp_dir = get_tmp_dir(); # temp directory for checkout and other actions
# $dmake_batch = undef; #
- @possible_build_lists = ('build.lst', 'build.xlist'); # build lists names
- %build_list_paths = (); # build lists names
- %build_lists_hash = (); # hash of arrays $build_lists_hash{$module} = \($path, $xml_list_object)
- $pre_job = 'announce'; # job to add for not-single module build
- $post_job = ''; # -"-
- %windows_procs = ();
- @warnings = (); # array of warnings to be shown at the end of the process
- @errors = (); # array of errors to be shown at the end of the process
- %html_info = (); # hash containing all necessary info for generating of html page
- %module_by_hash = (); # hash containing all modules names as values and correspondent hashes as keys
- %build_in_progress = (); # hash of modules currently being built
- %build_is_finished = (); # hash of already built modules
- %modules_with_errors = (); # hash of modules with build errors
- %build_in_progress_shown = (); # hash of modules being built,
+ my @possible_build_lists = ('build.lst', 'build.xlist'); # build lists names
+ my %build_list_paths = (); # build lists names
+ my %build_lists_hash = (); # hash of arrays $build_lists_hash{$module} = \($path, $xml_list_object)
+ my $pre_job = 'announce'; # job to add for not-single module build
+ my $post_job = ''; # -"-
+ my @warnings = (); # array of warnings to be shown at the end of the process
+ my @errors = (); # array of errors to be shown at the end of the process
+ my %html_info = (); # hash containing all necessary info for generating of html page
+ my %module_by_hash = (); # hash containing all modules names as values and correspondent hashes as keys
+ my %build_in_progress = (); # hash of modules currently being built
+ my %build_is_finished = (); # hash of already built modules
+ my %modules_with_errors = (); # hash of modules with build errors
+ my %build_in_progress_shown = (); # hash of modules being built,
# and shown last time (to keep order)
- $build_time = time;
- $html_last_updated = 0;
- %jobs_hash = ();
- $html_path = undef;
- $build_finished = 0;
- $html_file = '';
- %had_error = (); # hack for misteriuos windows problems - try run dmake 2 times if first time there was an error
- $mkout = CorrectPath("$ENV{SOLARENV}/bin/mkout.pl");
- %weights_hash = (); # hash contains info about how many modules are dependent from one module
+ my $build_time = time;
+ my $html_last_updated = 0;
+ my %jobs_hash = ();
+ my $html_path = undef;
+ my $build_finished = 0;
+ my $html_file = '';
+ my %had_error = (); # hack for misteriuos windows problems - try run dmake 2 times if first time there was an error
+ my $mkout = correct_path("$ENV{SOLARENV}/bin/mkout.pl");
+ my %weights_hash = (); # hash contains info about how many modules are dependent from one module
# %weight_stored = ();
- $grab_output = 1;
- $stop_build_on_error = 0; # for multiprocessing mode: do not build further module if there is an error
- $interactive = 0; # for interactive mode... (for testing purpose enabled by default)
- $parent_process = 1;
- $server_mode = 0;
- $setenv_string = ''; # string for configuration of the client environment
- $ports_string = ''; # string with possible ports for server
- @server_ports = ();
- $html_port = 0;
- $server_socket_obj = undef; # socket object for server
- $html_socket_obj = undef; # socket object for server
+ my $grab_output = 1;
+ my $stop_build_on_error = 0; # for multiprocessing mode: do not build further module if there is an error
+ my $interactive = 0; # for interactive mode... (for testing purpose enabled by default)
+ my $parent_process = 1;
+ my $server_mode = 0;
+ my $setenv_string = ''; # string for configuration of the client environment
+ my $ports_string = ''; # string with possible ports for server
+ my @server_ports = ();
+ my $html_port = 0;
+ my $server_socket_obj = undef; # socket object for server
+ my $html_socket_obj = undef; # socket object for server
my %clients_jobs = ();
my %clients_times = ();
my $client_timeout = 0; # time for client to build (in sec)...
@@ -205,19 +197,28 @@
my $clear_config = 0;
my $finisched_children = 0;
my $debug = 0;
- %module_deps_hash_pids = ();
+ my %module_deps_hash_pids = ();
my @argv = @ARGV;
my $source_config_file;
+ my @modules_built = ();
+ my $deliver_command = $ENV{DELIVER};
+ my %prj_platform = ();
+ my $check_error_string = '';
+ my $dmake = '';
+ my $dmake_args = '';
+ my $echo = '';
+ my $new_line = "\n";
+ my $incompatible = 0;
+ my $local_host_ip = 'localhost';
### main ###
get_options();
-# my $temp_html_file = CorrectPath($tmp_dir. '/' . $ENV{INPATH}. '.build.html');
+# my $temp_html_file = correct_path($tmp_dir. '/' . $ENV{INPATH}. '.build.html');
get_build_modes();
- %deliver_env = ();
+ my %deliver_env = ();
if ($prepare) {
get_platforms(\%platforms);
- @modules_built = ();
$deliver_env{'BUILD_SOSL'}++;
$deliver_env{'COMMON_OUTDIR'}++;
@@ -227,14 +228,14 @@
$deliver_env{'OUTPATH'}++;
$deliver_env{'L10N_framework'}++;
};
- $StandDir = get_stand_dir(); # This also sets $initial_module
- $source_config = SourceConfig -> new($StandDir);
+ my $workspace_path = get_workspace_path(); # This also sets $initial_module
+ my $source_config = SourceConfig -> new($workspace_path);
if ($html) {
if (defined $html_path) {
- $html_file = CorrectPath($html_path . '/' . $ENV{INPATH}. '.build.html');
+ $html_file = correct_path($html_path . '/' . $ENV{INPATH}. '.build.html');
} else {
- my $log_directory = Cwd::realpath(CorrectPath($StandDir . '/..')) . '/log';
+ my $log_directory = Cwd::realpath(correct_path($workspace_path . '/..')) . '/log';
if ((!-d $log_directory) && (!mkdir($log_directory))) {
print_error("Cannot create $log_directory for writing html file\n");
};
@@ -250,17 +251,9 @@
get_module_and_buildlist_paths();
provide_consistency() if (defined $ENV{CWS_WORK_STAMP} && defined($ENV{COMMON_ENV_TOOLS}));
- $deliver_command = $ENV{DELIVER};
$deliver_command .= ' -verbose' if ($html);
$deliver_command .= ' '. $dlv_switch if ($dlv_switch);
$ENV{mk_tmp}++;
- %prj_platform = ();
- $check_error_string = '';
- $dmake = '';
-# $dmake_bin = '';
- $dmake_args = '';
- $echo = '';
- $new_line = "\n";
get_commands();
unlink ($cmd_file);
@@ -293,7 +286,7 @@
if (scalar keys %broken_build) {
cancel_build();
# } elsif (!$custom_job && $post_custom_job) {
-# do_post_custom_job(CorrectPath($StandDir.$initial_module));
+# do_post_custom_job(correct_path($workspace_path.$initial_module));
};
print_warnings();
if (scalar keys %active_modules) {
@@ -308,7 +301,7 @@
print $echo."$_\n";
};
print $new_line;
- print $echo."not found and couldn't be built. Dependencies on that module(s) ignored. Maybe you should correct build lists.\n";
+ print $echo."not found and couldn't be built. dependencies on that module(s) ignored. Maybe you should correct build lists.\n";
print $new_line;
do_exit(1) if ($checkparents);
};
@@ -365,7 +358,7 @@ sub generate_config_file {
sub start_interactive {
- $pid = open(HTML_PIPE, "-|");
+ my $pid = open(HTML_PIPE, "-|");
print "Pipe is open\n";
if ($pid) { # parent
@@ -439,7 +432,6 @@ sub start_html_message_trigger {
};
sub get_html_orders {
-# print "Parent gonna read\n";
return if (!$interactive);
my $buffer_size = 1024;
my $buffer;
@@ -483,7 +475,6 @@ sub get_html_orders {
schedule_rebuild(\%modules_to_rebuild);
generate_html_file();
};
-# print "Parent got nothing to read\n";
};
sub schedule_delete {
@@ -553,7 +544,7 @@ sub get_build_list_path {
my $possible_dir_path = $module_paths{$_}.'/prj/';
if (-d $possible_dir_path) {
foreach my $build_list (@possible_build_lists) {
- my $possible_build_list_path = CorrectPath($possible_dir_path . $build_list);
+ my $possible_build_list_path = correct_path($possible_dir_path . $build_list);
if (-f $possible_build_list_path) {
$build_list_paths{$module} = $possible_build_list_path;
return $possible_build_list_path;
@@ -563,7 +554,7 @@ sub get_build_list_path {
};
};
$dead_parents{$module}++;
- $build_list_paths{$module} = CorrectPath(retrieve_build_list($module)) if (!defined $build_list_paths{$module});
+ $build_list_paths{$module} = correct_path(retrieve_build_list($module)) if (!defined $build_list_paths{$module});
return $build_list_paths{$module};
};
@@ -586,9 +577,9 @@ sub get_parent_deps {
$parents_deps_hash{$_}++;
}
$$deps_hash{$module} = \%parents_deps_hash;
- foreach $Parent (keys %parents_deps_hash) {
- if (!defined($$deps_hash{$Parent}) && (!defined $exclude_branches{$module})) {
- push (@unresolved_parents, $Parent);
+ foreach my $parent (keys %parents_deps_hash) {
+ if (!defined($$deps_hash{$parent}) && (!defined $exclude_branches{$module})) {
+ push (@unresolved_parents, $parent);
};
};
};
@@ -655,7 +646,7 @@ sub reverse_dependensies {
#
sub build_all {
if ($build_all_parents) {
- my ($Prj, $PrjDir, $orig_prj);
+ my ($prj, $prj_dir, $orig_prj);
get_parent_deps( $initial_module, \%global_deps_hash);
if (scalar keys %active_modules) {
$active_modules{$initial_module}++;
@@ -680,11 +671,11 @@ sub build_all {
exit 0;
} elsif ($incompatible) {
my @missing_modules = ();
- foreach (keys %global_deps_hash) {
+ foreach (sort keys %global_deps_hash) {
push(@missing_modules, $_) if (!defined $active_modules{$_});
};
if (scalar @missing_modules) {
- print_error("There are modules:\n@missing_modules\n\nthat should be built, but they are not activated. Please, verify your $source_config_file.\n");
+ push(@warnings, "The modules: \"@missing_modules\" should be have been built, but they are not activated and have been skipped. Be aware, that can cause compatibility problems. Maybe you should verify your $source_config_file.\n");
};
};
foreach my $module (keys %dead_parents, keys %skip_modules) {
@@ -703,26 +694,26 @@ sub build_all {
if ($server_mode) {
run_server();
};
- while ($Prj = pick_prj_to_build(\%global_deps_hash)) {
- if (!defined $dead_parents{$Prj}) {
+ while ($prj = pick_prj_to_build(\%global_deps_hash)) {
+ if (!defined $dead_parents{$prj}) {
if (scalar keys %broken_build) {
- print $echo . "Skipping project $Prj because of error(s)\n";
- remove_from_dependencies($Prj, \%global_deps_hash);
- $build_is_finished{$Prj}++;
+ print $echo . "Skipping project $prj because of error(s)\n";
+ remove_from_dependencies($prj, \%global_deps_hash);
+ $build_is_finished{$prj}++;
next;
};
- $PrjDir = $module_paths{$Prj};
- get_module_dep_hash($Prj, \%local_deps_hash);
- my $info_hash = $html_info{$Prj};
- $$info_hash{DIRS} = check_deps_hash(\%local_deps_hash, $Prj);
- $module_by_hash{\%local_deps_hash} = $Prj;
+ $prj_dir = $module_paths{$prj};
+ get_module_dep_hash($prj, \%local_deps_hash);
+ my $info_hash = $html_info{$prj};
+ $$info_hash{DIRS} = check_deps_hash(\%local_deps_hash, $prj);
+ $module_by_hash{\%local_deps_hash} = $prj;
build_dependent(\%local_deps_hash);
print $check_error_string;
};
- remove_from_dependencies($Prj, \%global_deps_hash);
- $build_is_finished{$Prj}++;
+ remove_from_dependencies($prj, \%global_deps_hash);
+ $build_is_finished{$prj}++;
};
} else {
store_build_list_content($initial_module);
@@ -742,7 +733,7 @@ sub build_all {
sub backup_deps_hash {
my $source_hash = shift;
my $backup_hash = shift;
- foreach $key (keys %$source_hash) {
+ foreach my $key (keys %$source_hash) {
my %values_hash = %{$$source_hash{$key}};
$$backup_hash{$key} = \%values_hash;
};
@@ -812,7 +803,6 @@ sub dmake_dir {
_exit(0);
} elsif ($error_code && ($error_code != -1)) {
return $error_code;
-# print_error("Error $? occurred while making $job_name");
};
};
@@ -890,7 +880,6 @@ sub get_prj_platform {
};
};
};
-#seek(BUILD_LST, 0, 0);
};
#
@@ -901,8 +890,8 @@ sub get_deps_from_object {
my ($module, $build_list_object, $dependencies_hash) = @_;
foreach my $dir ($build_list_object->getJobDirectories("make", $ENV{GUI})) {
- $PathHash{$dir} = $module_paths{$module};
- $PathHash{$dir} .= $dir if ($dir ne '/');
+ $path_hash{$dir} = $module_paths{$module};
+ $path_hash{$dir} .= $dir if ($dir ne '/');
my %deps_hash = ();
foreach my $dep ($build_list_object->getJobDependencies($dir, "make", $ENV{GUI})) {
@@ -933,7 +922,7 @@ sub get_module_dep_hash {
#
sub get_deps_hash {
my ($dummy, $module_to_build);
- %DeadDependencies = ();
+ my %dead_dependencies = ();
$module_to_build = shift;
my $dependencies_hash = shift;
if ($custom_job) {
@@ -964,37 +953,37 @@ sub get_deps_hash {
};
s/\r\n//;
if ($_ =~ /\s+nmake\s+/o) {
- my ($Platform, $Dependencies, $Dir, $DirAlias);
+ my ($platform, $dependencies, $dir, $dir_alias);
my %deps_hash = ();
- $Dependencies = $';
+ $dependencies = $';
$dummy = $`;
$dummy =~ /(\S+)\s+(\S*)/o;
- $Dir = $2;
- $Dependencies =~ /(\w+)/o;
- $Platform = $1;
- $Dependencies = $';
- while ($Dependencies =~ /,(\w+)/o) {
- $Dependencies = $';
+ $dir = $2;
+ $dependencies =~ /(\w+)/o;
+ $platform = $1;
+ $dependencies = $';
+ while ($dependencies =~ /,(\w+)/o) {
+ $dependencies = $';
};
- $Dependencies =~ /\s+(\S+)\s+/o;
- $DirAlias = $1;
- if (!CheckPlatform($Platform)) {
- next if (defined $PlatformHash{$DirAlias});
- $DeadDependencies{$DirAlias}++;
+ $dependencies =~ /\s+(\S+)\s+/o;
+ $dir_alias = $1;
+ if (!check_platform($platform)) {
+ next if (defined $platform_hash{$dir_alias});
+ $dead_dependencies{$dir_alias}++;
next;
};
- delete $DeadDependencies{$DirAlias} if (defined $DeadDependencies{$DirAlias});
- print_error("Directory alias $DirAlias is defined at least twice!! Please, correct build.lst in module $module_to_build") if (defined $$dependencies_hash{$DirAlias});
- $PlatformHash{$DirAlias}++;
- $Dependencies = $';
- print_error("$module_to_build/prj/build.lst has wrongly written dependencies string:\n$_\n") if (!$Dependencies);
- $deps_hash{$_}++ foreach (GetDependenciesArray($Dependencies));
- $$dependencies_hash{$DirAlias} = \%deps_hash;
+ delete $dead_dependencies{$dir_alias} if (defined $dead_dependencies{$dir_alias});
+ print_error("Directory alias $dir_alias is defined at least twice!! Please, correct build.lst in module $module_to_build") if (defined $$dependencies_hash{$dir_alias});
+ $platform_hash{$dir_alias}++;
+ $dependencies = $';
+ print_error("$module_to_build/prj/build.lst has wrongly written dependencies string:\n$_\n") if (!$dependencies);
+ $deps_hash{$_}++ foreach (get_dependency_array($dependencies));
+ $$dependencies_hash{$dir_alias} = \%deps_hash;
my $local_dir = '';
- if ($Dir =~ /(\\|\/)/o) {
+ if ($dir =~ /(\\|\/)/o) {
$local_dir = "/$'";
};
- $PathHash{$DirAlias} = CorrectPath($module_paths{$module_to_build} . $local_dir);
+ $path_hash{$dir_alias} = correct_path($module_paths{$module_to_build} . $local_dir);
} elsif ($_ !~ /^\s*$/ && $_ !~ /^\w*\s/o) {
chomp;
push(@errors, $_);
@@ -1011,16 +1000,15 @@ sub get_deps_hash {
print_error($message);
};
};
- foreach my $alias (keys %DeadDependencies) {
- next if defined $AliveDependencies{$alias};
- if (!IsHashNative($alias)) {
+ foreach my $alias (keys %dead_dependencies) {
+ next if defined $alive_dependencies{$alias};
+# if (!IsHashNative($alias)) {
remove_from_dependencies($alias, $dependencies_hash);
- delete $DeadDependencies{$alias};
- };
+ delete $dead_dependencies{$alias};
+# };
};
};
-# check_deps_hash($dependencies_hash);
- resolve_aliases($dependencies_hash, \%PathHash);
+ resolve_aliases($dependencies_hash, \%path_hash);
if (!$prepare) {
add_prerequisite_job($dependencies_hash, $module_to_build, $pre_custom_job);
add_prerequisite_job($dependencies_hash, $module_to_build, $pre_job);
@@ -1039,7 +1027,7 @@ sub add_prerequisite_job {
return if (!$job);
$job = "$module $job";
foreach (keys %$dependencies_hash) {
- $deps_hash = $$dependencies_hash{$_};
+ my $deps_hash = $$dependencies_hash{$_};
$$deps_hash{$job}++;
};
$$dependencies_hash{$job} = {};
@@ -1061,15 +1049,15 @@ sub add_dependent_job {
# this procedure converts aliases to absolute paths
#
sub resolve_aliases {
- my ($dependencies_hash, $PathHash) = @_;
+ my ($dependencies_hash, $path_hash) = @_;
foreach my $dir_alias (keys %$dependencies_hash) {
my $aliases_hash_ref = $$dependencies_hash{$dir_alias};
my %paths_hash = ();
foreach (keys %$aliases_hash_ref) {
- $paths_hash{$$PathHash{$_}}++;
+ $paths_hash{$$path_hash{$_}}++;
};
delete $$dependencies_hash{$dir_alias};
- $$dependencies_hash{$$PathHash{$dir_alias}} = \%paths_hash;
+ $$dependencies_hash{$$path_hash{$dir_alias}} = \%paths_hash;
};
};
@@ -1089,7 +1077,7 @@ sub mark_platform {
# Convert path from abstract (with '\' and/or '/' delimiters)
# to system-independent
#
-sub CorrectPath {
+sub correct_path {
$_ = shift;
s/\\/\//g;
return $_;
@@ -1140,76 +1128,50 @@ sub get_commands {
#
# Procedure retrieves list of projects to be built from build.lst
#
-sub get_stand_dir {
+sub get_workspace_path {
if (!defined $ENV{GUI}) {
$ENV{mk_tmp} = '';
die "No environment set\n";
};
my $repository_helper = RepositoryHelper->new();
- my $StandDir = $repository_helper->get_repository_root();
+ my $workspace_path = $repository_helper->get_repository_root();
my $initial_dir = $repository_helper->get_initial_directory();
- if ($StandDir eq $initial_dir) {
+ if ($workspace_path eq $initial_dir) {
print_error('Found no project to build');
};
- $initial_module = substr($initial_dir, length($StandDir) + 1);
+ $initial_module = substr($initial_dir, length($workspace_path) + 1);
if ($initial_module =~ /(\\|\/)/) {
$initial_module = $`;
};
- $module_paths{$initial_module} = $StandDir . "/$initial_module";
-# $build_list_paths{$initial_module} =$StandDir . '/prj/'.$_;
-# if ( defined $ENV{PWD} ) {
-# $StandDir = $ENV{PWD};
-# } elsif (defined $ENV{_cwd}) {
-# $StandDir = $ENV{_cwd};
-# } else {
-# $StandDir = cwd();
-# };
-# my $previous_dir = '';
-# do {
-# foreach (@possible_build_lists) {# ('build.lst', 'build.xlist');
-# if (-e $StandDir . '/prj/'.$_) {
-# $initial_module = File::Basename::basename($StandDir);
-# $build_list_paths{$initial_module} =$StandDir . '/prj/'.$_;
-# $StandDir = File::Basename::dirname($StandDir);
-# $module_paths{$initial_module} = $StandDir . "/$initial_module";
- return $StandDir;
-# } elsif ($StandDir eq $previous_dir) {
-# $ENV{mk_tmp} = '';
-# print_error('Found no project to build');
-# };
-# };
-# $previous_dir = $StandDir;
-# $StandDir = File::Basename::dirname(Cwd::realpath($StandDir));
-# print_error('Found no project to build') if (!$StandDir);
-# }
-# while (chdir "$StandDir");
+ $module_paths{$initial_module} = $workspace_path . "/$initial_module";
+ return $workspace_path;
};
#
# Picks project which can be built now from hash and then deletes it from hash
#
sub pick_prj_to_build {
- my $DepsHash = shift;
+ my $deps_hash = shift;
get_html_orders();
- my $Prj = find_indep_prj($DepsHash);
- if ($Prj) {
- delete $$DepsHash{$Prj};
+ my $prj = find_indep_prj($deps_hash);
+ if ($prj) {
+ delete $$deps_hash{$prj};
generate_html_file();
};
- return $Prj;
+ return $prj;
};
#
# Make a decision if the project should be built on this platform
#
-sub CheckPlatform {
- my $Platform = shift;
- return 1 if ($Platform eq 'all');
- return 1 if (($ENV{GUI} eq 'WIN') && ($Platform eq 'w'));
- return 1 if (($ENV{GUI} eq 'UNX') && ($Platform eq 'u'));
- return 1 if (($ENV{GUI} eq 'OS2') && ($Platform eq 'p'));
+sub check_platform {
+ my $platform = shift;
+ return 1 if ($platform eq 'all');
+ return 1 if (($ENV{GUI} eq 'WIN') && ($platform eq 'w'));
+ return 1 if (($ENV{GUI} eq 'UNX') && ($platform eq 'u'));
+ return 1 if (($ENV{GUI} eq 'OS2') && ($platform eq 'p'));
return 1 if (($ENV{GUI} eq 'WNT') &&
- (($Platform eq 'w') || ($Platform eq 'n')));
+ (($platform eq 'w') || ($platform eq 'n')));
return 0;
};
@@ -1218,14 +1180,14 @@ sub CheckPlatform {
# of all from given project dependent projects
#
sub remove_from_dependencies {
- my ($ExclPrj, $i, $Prj, $Dependencies);
- $ExclPrj = shift;
- my $ExclPrj_orig = '';
- $ExclPrj_orig = $` if (($ExclPrj =~ /\.lnk$/o) || ($ExclPrj =~ /\.link$/o));
- $Dependencies = shift;
- foreach $Prj (keys %$Dependencies) {
- my $prj_deps_hash = $$Dependencies{$Prj};
- delete $$prj_deps_hash{$ExclPrj} if (defined $$prj_deps_hash{$ExclPrj});
+ my ($exclude_prj, $i, $prj, $dependencies);
+ $exclude_prj = shift;
+ my $exclude_prj_orig = '';
+ $exclude_prj_orig = $` if (($exclude_prj =~ /\.lnk$/o) || ($exclude_prj =~ /\.link$/o));
+ $dependencies = shift;
+ foreach $prj (keys %$dependencies) {
+ my $prj_deps_hash = $$dependencies{$prj};
+ delete $$prj_deps_hash{$exclude_prj} if (defined $$prj_deps_hash{$exclude_prj});
};
};
@@ -1247,8 +1209,8 @@ sub check_deps_hash {
do {
$consistent = '';
- foreach $key (sort keys %deps_hash) {
- $local_deps_ref = $deps_hash{$key};
+ foreach my $key (sort keys %deps_hash) {
+ my $local_deps_ref = $deps_hash{$key};
if (!scalar keys %$local_deps_ref) {
if (defined $module) {
$build_number++;
@@ -1282,7 +1244,7 @@ sub check_deps_hash {
BUILD_NUMBER => $build_number,
STATUS => 'waiting',
LOG_PATH => '../' . $source_config->get_module_repository($module) . "/$module/$ENV{INPATH}/misc/logs/$log_name",
- LONG_LOG_PATH => CorrectPath($module_paths{$module} . "/$ENV{INPATH}/misc/logs/$log_name"),
+ LONG_LOG_PATH => correct_path($module_paths{$module} . "/$ENV{INPATH}/misc/logs/$log_name"),
START_TIME => 0,
FINISH_TIME => 0,
CLIENT => '-'
@@ -1315,16 +1277,16 @@ sub check_deps_hash {
# Find project with no dependencies left.
#
sub find_indep_prj {
- my ($Dependencies, $i);
+ my ($dependencies, $i);
my @candidates = ();
$all_dependent = 1;
handle_dead_children(0) if ($processes_to_run);
my $children = children_number();
return '' if (!$server_mode && $children && ($children >= $processes_to_run));
- $Dependencies = shift;
- if (scalar keys %$Dependencies) {
- foreach my $job (keys %$Dependencies) {
- if (!scalar keys %{$$Dependencies{$job}}) {
+ $dependencies = shift;
+ if (scalar keys %$dependencies) {
+ foreach my $job (keys %$dependencies) {
+ if (!scalar keys %{$$dependencies{$job}}) {
push(@candidates, $job);
last if (!$processes_to_run);
};
@@ -1366,56 +1328,55 @@ sub get_waiters_number {
#
# Check if given entry is HASH-native, that is not a user-defined data
#
-sub IsHashNative {
- my $Prj = shift;
- return 1 if ($Prj =~ /^HASH\(0x[\d | a | b | c | d | e | f]{6,}\)/);
- return 0;
-};
+#sub IsHashNative {
+# my $prj = shift;
+# return 1 if ($prj =~ /^HASH\(0x[\d | a | b | c | d | e | f]{6,}\)/);
+# return 0;
+#};
#
# Getting array of dependencies from the string given
#
-sub GetDependenciesArray {
- my ($DepString, @Dependencies, $ParentPrj, $prj, $string);
- @Dependencies = ();
- $DepString = shift;
- $string = $DepString;
+sub get_dependency_array {
+ my ($dep_string, @dependencies, $parent_prj, $prj, $string);
+ @dependencies = ();
+ $dep_string = shift;
+ $string = $dep_string;
$prj = shift;
- while ($DepString !~ /^NULL/o) {
- print_error("Project $prj has wrongly written dependencies string:\n $string") if (!$DepString);
- $DepString =~ /(\S+)\s*/o;
- $ParentPrj = $1;
- $DepString = $';
- if ($ParentPrj =~ /\.(\w+)$/o) {
- $ParentPrj = $`;
- if (($prj_platform{$ParentPrj} ne $1) &&
- ($prj_platform{$ParentPrj} ne 'all')) {
- print_error ("$ParentPrj\.$1 is a wrongly dependency identifier!\nCheck if it is platform dependent");
+ while ($dep_string !~ /^NULL/o) {
+ print_error("Project $prj has wrongly written dependencies string:\n $string") if (!$dep_string);
+ $dep_string =~ /(\S+)\s*/o;
+ $parent_prj = $1;
+ $dep_string = $';
+ if ($parent_prj =~ /\.(\w+)$/o) {
+ $parent_prj = $`;
+ if (($prj_platform{$parent_prj} ne $1) &&
+ ($prj_platform{$parent_prj} ne 'all')) {
+ print_error ("$parent_prj\.$1 is a wrongly dependency identifier!\nCheck if it is platform dependent");
};
- $AliveDependencies{$ParentPrj}++ if (CheckPlatform($1));
- push(@Dependencies, $ParentPrj);
+ $alive_dependencies{$parent_prj}++ if (check_platform($1));
+ push(@dependencies, $parent_prj);
} else {
- if ((exists($prj_platform{$ParentPrj})) &&
- ($prj_platform{$ParentPrj} ne 'all') ) {
- print_error("$ParentPrj is a wrongly used dependency identifier!\nCheck if it is platform dependent");
+ if ((exists($prj_platform{$parent_prj})) &&
+ ($prj_platform{$parent_prj} ne 'all') ) {
+ print_error("$parent_prj is a wrongly used dependency identifier!\nCheck if it is platform dependent");
};
- push(@Dependencies, $ParentPrj);
+ push(@dependencies, $parent_prj);
};
};
- return @Dependencies;
+ return @dependencies;
};
#
# Getting current directory list
#
-sub GetDirectoryList {
- my ($Path);
- $Path = shift;
- opendir(CurrentDirList, $Path);
- @DirectoryList = readdir(CurrentDirList);
+sub get_directory_list {
+ my $path = shift;
+ opendir(CurrentDirList, $path);
+ my @directory_list = readdir(CurrentDirList);
closedir(CurrentDirList);
- return @DirectoryList;
+ return @directory_list;
};
sub print_error {
@@ -1640,7 +1601,7 @@ sub get_options {
};
if ($interactive) {
$html++; # enable html page generation...
- $local_host_name = hostname();
+ my $local_host_name = hostname();
$local_host_ip = inet_ntoa(scalar(gethostbyname($local_host_name)) || 'localhost');
}
# Default build modes(for OpenOffice.org)
@@ -1701,14 +1662,14 @@ sub get_switch_options {
#
sub cancel_build {
# close_server_socket();
- my $broken_modules_number = scalar @broken_modules_names;
+ my $broken_modules_number = scalar @broken_module_names;
my $message_part = 'build ';
if (scalar keys %incompatibles) {
my @incompatible_modules = keys %incompatibles;
if ($stop_build_on_error) {
- $message_part .= "--from @incompatible_modules:@broken_modules_names\n";
+ $message_part .= "--from @incompatible_modules:@broken_module_names\n";
} else {
- $message_part .= "--from @broken_modules_names\n";
+ $message_part .= "--from @broken_module_names\n";
};
} else {
if ($processes_to_run) {
@@ -1716,14 +1677,14 @@ sub cancel_build {
} else {
$message_part .= "--all:";
};
- $message_part .= "@broken_modules_names\n";
+ $message_part .= "@broken_module_names\n";
};
if ($broken_modules_number && $build_all_parents) {
print "\n";
print $broken_modules_number;
print " module(s): ";
- foreach (@broken_modules_names) {
+ foreach (@broken_module_names) {
print "\n\t$_";
};
print "\nneed(s) to be rebuilt\n\nReason(s):\n\n";
@@ -1779,38 +1740,20 @@ sub handle_dead_children {
my $try_once_more = 0;
do {
my $pid = 0;
- if ($ENV{GUI} eq 'WNT' && !$cygwin) {
- foreach $pid (keys %processes_hash) {
- my $exit_code = undef;
- my $proc_obj = $windows_procs{$pid};
- $proc_obj->GetExitCode($exit_code);
- if ( $exit_code != 259 ) {
- $try_once_more = store_error($pid, $exit_code);
- delete $windows_procs{$pid};
- if ($try_once_more) {
- give_second_chance($pid);
- } else {
- clear_from_child($pid);
- };
- };
- };
- sleep 1 if (children_number() >= $processes_to_run || ($force_wait && ($running_children == children_number())));
+ if (children_number() >= $processes_to_run ||
+ ($force_wait && ($running_children == children_number()))) {
+ $pid = wait();
} else {
- if (children_number() >= $processes_to_run ||
- ($force_wait && ($running_children == children_number()))) {
- $pid = wait();
+ $pid = waitpid( -1, &WNOHANG);
+ };
+ if ($pid > 0) {
+ $try_once_more = store_error($pid, $?);
+ if ($try_once_more) {
+ give_second_chance($pid);
} else {
- $pid = waitpid( -1, &WNOHANG);
- };
- if ($pid > 0) {
- $try_once_more = store_error($pid, $?);
- if ($try_once_more) {
- give_second_chance($pid);
- } else {
- clear_from_child($pid);
- };
- $finisched_children++;
+ clear_from_child($pid);
};
+ $finisched_children++;
};
} while(children_number() >= $processes_to_run);
};
@@ -1883,7 +1826,7 @@ sub build_dependent {
mp_success_exit();
} else {
if (dmake_dir($child_nick)) {
- push(@broken_modules_names, $module_by_hash{$dependencies_hash});
+ push(@broken_module_names, $module_by_hash{$dependencies_hash});
cancel_build();
};
};
@@ -1942,19 +1885,19 @@ sub store_pid {
# Build everything that should be built multiprocessing version
#
sub build_multiprocessing {
- my $Prj;
+ my $prj;
do {
my $got_module = 0;
$finisched_children = 0;
- while ($Prj = pick_prj_to_build(\%global_deps_hash)) {
- if (!defined $projects_deps_hash{$Prj}) {
- $projects_deps_hash{$Prj} = {};
- get_module_dep_hash($Prj, $projects_deps_hash{$Prj});
- my $info_hash = $html_info{$Prj};
- $$info_hash{DIRS} = check_deps_hash($projects_deps_hash{$Prj}, $Prj);
- $module_by_hash{$projects_deps_hash{$Prj}} = $Prj;
+ while ($prj = pick_prj_to_build(\%global_deps_hash)) {
+ if (!defined $projects_deps_hash{$prj}) {
+ $projects_deps_hash{$prj} = {};
+ get_module_dep_hash($prj, $projects_deps_hash{$prj});
+ my $info_hash = $html_info{$prj};
+ $$info_hash{DIRS} = check_deps_hash($projects_deps_hash{$prj}, $prj);
+ $module_by_hash{$projects_deps_hash{$prj}} = $prj;
}
- $module_build_queue{$Prj}++;
+ $module_build_queue{$prj}++;
$got_module++;
};
if (!$got_module) {
@@ -1983,7 +1926,7 @@ sub build_multiprocessing {
sub mp_success_exit {
# close_server_socket();
# if (!$custom_job && $post_custom_job) {
-# do_post_custom_job(CorrectPath($StandDir.$initial_module));
+# do_post_custom_job(correct_path($workspace_path.$initial_module));
# };
print "\nMultiprocessing build is finished\n";
print "Maximal number of processes run: $maximal_processes\n";
@@ -1999,8 +1942,7 @@ sub build_actual_queue {
do {
my @sorted_queue = sort {(scalar keys %{$projects_deps_hash{$a}}) <=> (scalar keys %{$projects_deps_hash{$b}})} keys %$build_queue;
my $started_children = 0;
-# foreach $Prj (@sorted_queue) {
- foreach $Prj (keys %$build_queue) {
+ foreach my $prj (keys %$build_queue) {
get_html_orders();
if ($reschedule_queue) {
$reschedule_queue = 0;
@@ -2013,19 +1955,19 @@ sub build_actual_queue {
};
return;
};
- if (defined $modules_with_errors{$projects_deps_hash{$Prj}} && !$ignore) {
- push (@broken_modules_names, $Prj);
- delete $$build_queue{$Prj};
+ if (defined $modules_with_errors{$projects_deps_hash{$prj}} && !$ignore) {
+ push (@broken_module_names, $prj);
+ delete $$build_queue{$prj};
next;
};
- $started_children += build_dependent($projects_deps_hash{$Prj});
- if ((!scalar keys %{$projects_deps_hash{$Prj}}) &&
- !$running_children{$projects_deps_hash{$Prj}}) {
- if (!defined $modules_with_errors{$projects_deps_hash{$Prj}} || $ignore)
+ $started_children += build_dependent($projects_deps_hash{$prj});
+ if ((!scalar keys %{$projects_deps_hash{$prj}}) &&
+ !$running_children{$projects_deps_hash{$prj}}) {
+ if (!defined $modules_with_errors{$projects_deps_hash{$prj}} || $ignore)
{
- remove_from_dependencies($Prj, \%global_deps_hash);
- $build_is_finished{$Prj}++;
- delete $$build_queue{$Prj};
+ remove_from_dependencies($prj, \%global_deps_hash);
+ $build_is_finished{$prj}++;
+ delete $$build_queue{$prj};
$finished_projects++;
};
};
@@ -2044,6 +1986,7 @@ sub build_actual_queue {
sub run_job {
my ($job, $path, $registered_name) = @_;
my $job_to_do = $job;
+ my $error_code = 0;
print "$registered_name\n";
return 0 if ( $show );
$job_to_do = $deliver_command if ($job eq 'deliver');
@@ -2101,38 +2044,38 @@ sub do_custom_job {
# Print announcement for module just started
#
sub announce_module {
- my $Prj = shift;
- $build_in_progress{$Prj}++;
- print_announce($Prj);
+ my $prj = shift;
+ $build_in_progress{$prj}++;
+ print_announce($prj);
};
sub print_announce {
- my $Prj = shift;
- return if (defined $module_announced{$Prj});
+ my $prj = shift;
+ return if (defined $module_announced{$prj});
my $prj_type = '';
- $prj_type = $modules_types{$Prj} if (defined $modules_types{$Prj});
+ $prj_type = $modules_types{$prj} if (defined $modules_types{$prj});
my $text;
if ($prj_type eq 'lnk') {
- if (!defined $active_modules{$Prj}) {
- $text = "Skipping module $Prj\n";
+ if (!defined $active_modules{$prj}) {
+ $text = "Skipping module $prj\n";
} else {
- $text = "Skipping link to $Prj\n";
+ $text = "Skipping link to $prj\n";
};
- $build_is_finished{$Prj}++;
+ $build_is_finished{$prj}++;
} elsif ($prj_type eq 'img') {
- $text = "Skipping incomplete $Prj\n";
- $build_is_finished{$Prj}++;
+ $text = "Skipping incomplete $prj\n";
+ $build_is_finished{$prj}++;
} elsif ($custom_job) {
- $text = "Running custom job \"$custom_job\" in module $Prj\n";
+ $text = "Running custom job \"$custom_job\" in module $prj\n";
} else {
- $text = "Building module $Prj\n";
+ $text = "Building module $prj\n";
};
my $announce_string = $new_line;
$announce_string .= $echo . "=============\n";
$announce_string .= $echo . $text;
$announce_string .= $echo . "=============\n";
print $announce_string;
- $module_announced{$Prj}++;
+ $module_announced{$prj}++;
};
sub are_all_dependent {
@@ -2179,7 +2122,7 @@ sub modules_classify {
#
sub provide_consistency {
check_dir();
- foreach $var_ref (\$build_all_cont, \$build_since) {
+ foreach my $var_ref (\$build_all_cont, \$build_since) {
if ($$var_ref) {
return if (defined $module_paths{$$var_ref});
print_error("Cannot find module '$$var_ref'", 9);
@@ -2234,7 +2177,7 @@ sub clear_module {
closedir(DIRHANDLE);
foreach (@dir_content) {
next if (/^\.+$/);
- my $dir = CorrectPath($module_paths{$module}.'/'.$_);
+ my $dir = correct_path($module_paths{$module}.'/'.$_);
if ((!-d $dir.'/.svn') && is_output_tree($dir)) {
#print "I would delete $dir\n";
rmtree("$dir", 0, 1);
@@ -2296,7 +2239,7 @@ sub retrieve_build_list {
$solver_inc_dir .= '/inc';
$solver_inc_dir .= $ENV{UPDMINOREXT} if (defined $ENV{UPDMINOREXT});
$solver_inc_dir .= "/$module";
- $solver_inc_dir = CorrectPath($solver_inc_dir);
+ $solver_inc_dir = correct_path($solver_inc_dir);
$dead_parents{$module}++;
print "Fetching dependencies for module $module from solver...";
foreach (@possible_build_lists) {
@@ -2323,7 +2266,7 @@ sub fix_permissions {
};
sub prepare_build_from_with_branches {
- ($full_deps_hash, $reversed_full_deps_hash) = @_;
+ my ($full_deps_hash, $reversed_full_deps_hash) = @_;
foreach my $prerequisite (keys %$full_deps_hash) {
foreach my $dependent_module (keys %incompatibles) {
if (defined ${$$reversed_full_deps_hash{$prerequisite}}{$dependent_module}) {
@@ -2418,7 +2361,7 @@ sub prepare_build_all_cont {
$border_prj = $build_all_cont if ($build_all_cont);
$border_prj = $build_since if ($build_since);
while ($prj = pick_prj_to_build($deps_hash)) {
- $orig_prj = '';
+ my $orig_prj = '';
$orig_prj = $` if ($prj =~ /\.lnk$/o);
$orig_prj = $` if ($prj =~ /\.link$/o);
if (($border_prj ne $prj) &&
@@ -2497,7 +2440,7 @@ sub get_workspace_platforms {
my $workspace_patforms = shift;
my $solver_path = $ENV{SOLARVERSION};
opendir(SOLVERDIR, $solver_path);
- @dir_list = readdir(SOLVERDIR);
+ my @dir_list = readdir(SOLVERDIR);
close SOLVERDIR;
foreach (@dir_list) {
next if /^common/;
@@ -2624,7 +2567,7 @@ sub read_ssolar_vars {
my ($verswitch, $source_root, $cwsname);
$verswitch = "-ver $ENV{UPDMINOR}" if (defined $ENV{UPDMINOR});
$source_root = '-sourceroot' if (defined $ENV{SOURCE_ROOT_USED});
- $cws_name = "-cwsname $ENV{CWS_WORK_STAMP}" if (defined $ENV{CWS_WORK_STAMP});
+ my $cws_name = "-cwsname $ENV{CWS_WORK_STAMP}" if (defined $ENV{CWS_WORK_STAMP});
my $param = "-$ENV{WORK_STAMP} $verswitch $source_root $cws_name $pro $platform";
my $ss_command = "$perl $setsolar -file $tmp_file $param $nul";
@@ -2661,8 +2604,8 @@ sub get_solar_vars {
sub get_current_module {
my $module_name = shift;
my $link_name = $module_name . '.lnk';
- $link_name .= '.link' if (-e $StandDir.$module_name . '.link');
- chdir $StandDir;
+ $link_name .= '.link' if (-e $workspace_path.$module_name . '.link');
+ chdir $workspace_path;
getcwd();
print "\nBreaking link to module $module_name";
my $result = rename $link_name, $module_name;
@@ -2683,7 +2626,7 @@ sub check_dir {
if (($current_module =~ /(\.lnk)$/) || ($current_module =~ /(\.link)$/)) {
$current_module = $`;
# we're dealing with a link => fallback to SOLARSRC under UNIX
- $StandDir = $ENV{SOLARSRC}.'/';
+ $workspace_path = $ENV{SOLARSRC}.'/';
get_current_module($current_module);
return;
} else {
@@ -2736,9 +2679,9 @@ sub do_exit {
if ( $^O eq 'os2' )
{
# perl 5.10 returns 'resource busy' for rmtree
- rmdir(CorrectPath($tmp_dir)) if ($tmp_dir);
+ rmdir(correct_path($tmp_dir)) if ($tmp_dir);
}
- rmtree(CorrectPath($tmp_dir), 0, 0) if ($tmp_dir);
+ rmtree(correct_path($tmp_dir), 0, 0) if ($tmp_dir);
print STDERR "Cannot delete $tmp_dir. Please remove it manually\n" if (-d $tmp_dir);
exit($exit_code);
};
@@ -2755,7 +2698,7 @@ sub sort_modules_appearance {
delete $build_in_progress{$_} if (defined $build_in_progress{$_});
delete $build_in_progress_shown{$_} if (defined $build_in_progress_shown{$_});
};
- @modules_order = sort keys %modules_with_errors;
+ my @modules_order = sort keys %modules_with_errors;
foreach (keys %modules_with_errors) {
delete $build_in_progress{$_} if (defined $build_in_progress{$_});
delete $build_is_finished{$_} if (defined $build_is_finished{$_});
@@ -3459,7 +3402,7 @@ sub run_server {
print $new_socket_obj $job_string_base . $job_string;
$clients_jobs{$pid} = $job_string;
$clients_times{$pid} = time;
- $children_running = children_number();
+ my $children_running = children_number();
$verbose_mode && print 'Running processes: ', $children_running, "\n";
$maximal_processes = $children_running if ($children_running > $maximal_processes);
} else {
@@ -3541,23 +3484,23 @@ sub pick_jobdir {
my $build_queue = shift;
my $i = 0;
foreach (@$build_queue) {
- $Prj = $$build_queue[$i];
- my $prj_deps_hash = $projects_deps_hash{$Prj};
+ my $prj = $$build_queue[$i];
+ my $prj_deps_hash = $projects_deps_hash{$prj};
if (defined $modules_with_errors{$prj_deps_hash} && !$ignore) {
- push (@broken_modules_names, $Prj);
+ push (@broken_module_names, $prj);
splice (@$build_queue, $i, 1);
next;
};
$running_children{$prj_deps_hash} = 0 if (!defined $running_children{$prj_deps_hash});
- $child_nick = pick_prj_to_build($prj_deps_hash);
+ my $child_nick = pick_prj_to_build($prj_deps_hash);
if ($child_nick) {
return ($child_nick, $prj_deps_hash);
}
if ((!scalar keys %$prj_deps_hash) && !$running_children{$prj_deps_hash}) {
if (!defined $modules_with_errors{$prj_deps_hash} || $ignore)
{
- remove_from_dependencies($Prj, \%global_deps_hash);
- $build_is_finished{$Prj}++;
+ remove_from_dependencies($prj, \%global_deps_hash);
+ $build_is_finished{$prj}++;
splice (@$build_queue, $i, 1);
next;
};
@@ -3568,16 +3511,16 @@ sub pick_jobdir {
sub fill_modules_queue {
my $build_queue = shift;
- my $Prj;
- while ($Prj = pick_prj_to_build(\%global_deps_hash)) {
- push @$build_queue, $Prj;
- $projects_deps_hash{$Prj} = {};
- get_module_dep_hash($Prj, $projects_deps_hash{$Prj});
- my $info_hash = $html_info{$Prj};
- $$info_hash{DIRS} = check_deps_hash($projects_deps_hash{$Prj}, $Prj);
- $module_by_hash{$projects_deps_hash{$Prj}} = $Prj;
- };
- if (!$Prj && !children_number() && (!scalar @$build_queue)) {
+ my $prj;
+ while ($prj = pick_prj_to_build(\%global_deps_hash)) {
+ push @$build_queue, $prj;
+ $projects_deps_hash{$prj} = {};
+ get_module_dep_hash($prj, $projects_deps_hash{$prj});
+ my $info_hash = $html_info{$prj};
+ $$info_hash{DIRS} = check_deps_hash($projects_deps_hash{$prj}, $prj);
+ $module_by_hash{$projects_deps_hash{$prj}} = $prj;
+ };
+ if (!$prj && !children_number() && (!scalar @$build_queue)) {
cancel_build() if (scalar keys %broken_build);
mp_success_exit();
};
diff --git a/solenv/bin/modules/SourceConfig.pm b/solenv/bin/modules/SourceConfig.pm
index dfaa797d8f48..116a5e9fb893 100755
--- a/solenv/bin/modules/SourceConfig.pm
+++ b/solenv/bin/modules/SourceConfig.pm
@@ -388,7 +388,18 @@ sub add_active_repositories {
sub add_active_modules {
my $self = shift;
- $self->{NEW_MODULES} = shift;
+ my $module_list_ref = shift;
+ my $ignored_modules_string = '';
+ my @real_modules = ();
+ foreach my $module (sort @$module_list_ref) {
+ if ($self->get_module_path($module)) {
+ push(@real_modules, $module);
+ } else {
+ $ignored_modules_string .= " $module";
+ };
+ };
+ push (@{$self->{WARNINGS}}, "\nWARNING: following modules are not found in active repositories, and have not been added to the " . $self->get_config_file_default_path() . ":$ignored_modules_string\n") if ($ignored_modules_string);
+ $self->{NEW_MODULES} = \@real_modules;
croak('Empty module list passed for addition to source_config') if (!scalar @{$self->{NEW_MODULES}});
$self->{VERBOSE} = shift;
generate_config_file($self);
diff --git a/solenv/bin/modules/installer/simplepackage.pm b/solenv/bin/modules/installer/simplepackage.pm
index 7936b6d00377..d76b81a55850 100644
--- a/solenv/bin/modules/installer/simplepackage.pm
+++ b/solenv/bin/modules/installer/simplepackage.pm
@@ -347,9 +347,10 @@ sub replace_one_variable_in_shellscript
sub replace_variables_in_scriptfile
{
- my ($scriptfile, $volume_name, $allvariables) = @_;
+ my ($scriptfile, $volume_name, $volume_name_app, $allvariables) = @_;
replace_one_variable_in_shellscript($scriptfile, $volume_name, "FULLPRODUCTNAME" );
+ replace_one_variable_in_shellscript($scriptfile, $volume_name_app, "FULLAPPPRODUCTNAME" );
replace_one_variable_in_shellscript($scriptfile, $allvariables->{'PRODUCTNAME'}, "PRODUCTNAME" );
replace_one_variable_in_shellscript($scriptfile, $allvariables->{'PRODUCTVERSION'}, "PRODUCTVERSION" );
@@ -408,10 +409,17 @@ sub create_package
$folder = $packagename;
}
- my $volume_name = $allvariables->{'PRODUCTNAME'} . ' ' . $allvariables->{'PRODUCTVERSION'};
- $volume_name = $volume_name . ' ' . $allvariables->{'PRODUCTEXTENSION'} if $allvariables->{'PRODUCTEXTENSION'};
+ # my $volume_name = $allvariables->{'PRODUCTNAME'} . ' ' . $allvariables->{'PRODUCTVERSION'}; # Adding PRODUCTVERSION makes this difficult to maintain!
+ my $volume_name = $allvariables->{'PRODUCTNAME'};
+ my $volume_name_classic = $allvariables->{'PRODUCTNAME'} . ' ' . $allvariables->{'PRODUCTVERSION'};
+ my $volume_name_classic_app = $volume_name; # "app" should not contain version number
+ # $volume_name = $volume_name . ' ' . $allvariables->{'PRODUCTEXTENSION'} if $allvariables->{'PRODUCTEXTENSION'}; # Adding PRODUCTEXTENSION makes this difficult to maintain!
+ $volume_name_classic = $volume_name_classic . ' ' . $allvariables->{'PRODUCTEXTENSION'} if $allvariables->{'PRODUCTEXTENSION'};
+ $volume_name_classic_app = $volume_name_classic_app . ' ' . $allvariables->{'PRODUCTEXTENSION'} if $allvariables->{'PRODUCTEXTENSION'};
if ( $allvariables->{'DMG_VOLUMEEXTENSION'} ) {
$volume_name = $volume_name . ' ' . $allvariables->{'DMG_VOLUMEEXTENSION'};
+ $volume_name_classic = $volume_name_classic . ' ' . $allvariables->{'DMG_VOLUMEEXTENSION'};
+ $volume_name_classic_app = $volume_name_classic_app . ' ' . $allvariables->{'DMG_VOLUMEEXTENSION'};
}
my $sla = 'sla.r';
@@ -427,11 +435,22 @@ sub create_package
if (( $installer::globals::languagepack ) || ( $installer::globals::patch ))
{
$localtempdir = "$tempdir/$packagename";
- if ( $installer::globals::languagepack ) { $volume_name = "$volume_name Language Pack"; }
- if ( $installer::globals::patch ) { $volume_name = "$volume_name Patch"; }
+ if ( $installer::globals::languagepack )
+ {
+ $volume_name = "$volume_name Language Pack";
+ $volume_name_classic = "$volume_name_classic Language Pack";
+ $volume_name_classic_app = "$volume_name_classic_app Language Pack";
+ }
+ if ( $installer::globals::patch )
+ {
+ $volume_name = "$volume_name Patch";
+ $volume_name_classic = "$volume_name_classic Patch";
+ $volume_name_classic_app = "$volume_name_classic_app Patch";
+ }
# Create tar ball named tarball.tar.bz2
- my $appfolder = $localtempdir . "/" . $volume_name . "\.app";
+ # my $appfolder = $localtempdir . "/" . $volume_name . "\.app";
+ my $appfolder = $localtempdir . "/" . $volume_name_classic_app . "\.app";
my $contentsfolder = $appfolder . "/Contents";
my $tarballname = "tarball.tar.bz2";
@@ -474,7 +493,8 @@ sub create_package
if ( $installer::globals::languagepack ) { $scriptfilename = "osx_install_languagepack.applescript"; }
if ( $installer::globals::patch ) { $scriptfilename = "osx_install_patch.applescript"; }
my $scripthelpersolverfilename = "mac_install.script";
- my $scripthelperrealfilename = $volume_name;
+ # my $scripthelperrealfilename = $volume_name;
+ my $scripthelperrealfilename = $volume_name_classic_app;
my $translationfilename = $installer::globals::macinstallfilename;
# Finding both files in solver
@@ -497,7 +517,8 @@ sub create_package
my $scriptfilecontent = installer::files::read_file($scriptfilename);
my $translationfilecontent = installer::files::read_file($$translationfileref);
localize_scriptfile($scriptfilecontent, $translationfilecontent, $languagestringref);
- replace_variables_in_scriptfile($scriptfilecontent, $volume_name, $allvariables);
+ # replace_variables_in_scriptfile($scriptfilecontent, $volume_name, $allvariables);
+ replace_variables_in_scriptfile($scriptfilecontent, $volume_name_classic, $volume_name_classic_app, $allvariables);
installer::files::save_file($scriptfilename, $scriptfilecontent);
$systemcall = "chmod 775 " . "\"" . $scriptfilename . "\"";
@@ -524,7 +545,8 @@ sub create_package
# Replacing variables in Info.plist
$scriptfilecontent = installer::files::read_file($destfile);
- replace_one_variable_in_shellscript($scriptfilecontent, $volume_name, "FULLPRODUCTNAME" );
+ # replace_one_variable_in_shellscript($scriptfilecontent, $volume_name, "FULLPRODUCTNAME" );
+ replace_one_variable_in_shellscript($scriptfilecontent, $volume_name_classic_app, "FULLAPPPRODUCTNAME" ); # OpenOffice.org Language Pack
installer::files::save_file($destfile, $scriptfilecontent);
chdir $localfrom;
diff --git a/solenv/bin/modules/installer/substfilenamefiles.pm b/solenv/bin/modules/installer/substfilenamefiles.pm
index 12cb6ab8eb4f..fd9557ff81c0 100644
--- a/solenv/bin/modules/installer/substfilenamefiles.pm
+++ b/solenv/bin/modules/installer/substfilenamefiles.pm
@@ -34,16 +34,13 @@ use installer::pathanalyzer;
use installer::systemactions;
#########################################################
-# Analyzing files with flag SCPZIP_REPLACE
-# $item can be "File" or "ScpAction"
+# Analyzing files with flag SUBST_FILENAME
#########################################################
sub resolving_subst_filename_flag
{
my ($filesarrayref, $variableshashref, $languagestringref) = @_;
- my $diritem = lc($item);
-
my $replacedirbase = installer::systemactions::create_directories("change_filename", $languagestringref);
installer::logger::include_header_into_logfile("Files with flag SUBST_FILENAME:");
diff --git a/solenv/bin/modules/installer/windows/msiglobal.pm b/solenv/bin/modules/installer/windows/msiglobal.pm
index 9f2d21f8b7f8..716f63499a02 100644
--- a/solenv/bin/modules/installer/windows/msiglobal.pm
+++ b/solenv/bin/modules/installer/windows/msiglobal.pm
@@ -1696,7 +1696,6 @@ sub include_cabs_into_msi
$msifilename = installer::converter::make_path_conform($msifilename);
# msidb.exe really wants backslashes. (And double escaping because system() expands the string.)
- $idtdirbase =~ s/\//\\\\/g;
$msifilename =~ s/\//\\\\/g;
$extraslash = "\\";
diff --git a/solenv/bin/modules/installer/windows/property.pm b/solenv/bin/modules/installer/windows/property.pm
index 35866103d9fa..9e5557e4dacc 100644
--- a/solenv/bin/modules/installer/windows/property.pm
+++ b/solenv/bin/modules/installer/windows/property.pm
@@ -358,8 +358,8 @@ sub set_important_properties
if (( $allvariables->{'PRODUCTEXTENSION'} ) && ( $allvariables->{'PRODUCTEXTENSION'} eq "Beta" ))
{
- my $registryline = "WRITE_REGISTRY" . "\t" . "0" . "\n";
- push(@{$propertyfile}, $registryline);
+ # my $registryline = "WRITE_REGISTRY" . "\t" . "0" . "\n";
+ # push(@{$propertyfile}, $registryline);
my $betainfoline = "BETAPRODUCT" . "\t" . "1" . "\n";
push(@{$propertyfile}, $betainfoline);
}
diff --git a/solenv/inc/minor.mk b/solenv/inc/minor.mk
index a2e06a2dd244..884208e18051 100644
--- a/solenv/inc/minor.mk
+++ b/solenv/inc/minor.mk
@@ -1,5 +1,5 @@
RSCVERSION=300
-RSCREVISION=300m91(Build:9538)
-BUILD=9538
-LAST_MINOR=m91
+RSCREVISION=300m92(Build:9541)
+BUILD=9541
+LAST_MINOR=m92
SOURCEVERSION=DEV300
diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx
index 21ae6c0e63df..c8db4720b943 100644
--- a/starmath/source/cfgitem.cxx
+++ b/starmath/source/cfgitem.cxx
@@ -48,8 +48,6 @@ static const char* aRootName = "Office.Math";
#define SYMBOL_LIST "SymbolList"
#define FONT_FORMAT_LIST "FontFormatList"
-SV_IMPL_OBJARR( SmFntFmtListEntryArr, SmFntFmtListEntry );
-
/////////////////////////////////////////////////////////////////
@@ -294,10 +292,9 @@ SmFontFormatList::SmFontFormatList()
void SmFontFormatList::Clear()
{
- USHORT nCnt = aEntries.Count();
- if (nCnt)
+ if (!aEntries.empty())
{
- aEntries.Remove( 0, nCnt );
+ aEntries.clear();
SetModified( TRUE );
}
}
@@ -311,7 +308,7 @@ void SmFontFormatList::AddFontFormat( const String &rFntFmtId,
if (!pFntFmt)
{
SmFntFmtListEntry aEntry( rFntFmtId, rFntFmt );
- aEntries.Insert( aEntry, aEntries.Count() );
+ aEntries.push_back( aEntry );
SetModified( TRUE );
}
}
@@ -319,35 +316,32 @@ void SmFontFormatList::AddFontFormat( const String &rFntFmtId,
void SmFontFormatList::RemoveFontFormat( const String &rFntFmtId )
{
- USHORT nPos = 0xFFFF;
// search for entry
- USHORT nCnt = aEntries.Count();
- for (USHORT i = 0; i < nCnt && nPos == 0xFFFF; ++i)
+ for (size_t i = 0; i < aEntries.size(); ++i)
{
if (aEntries[i].aId == rFntFmtId)
- nPos = i;
- }
-
- // remove entry if found
- if (nPos != 0xFFFF)
- {
- aEntries.Remove( nPos );
- SetModified( TRUE );
+ {
+ // remove entry if found
+ aEntries.erase( aEntries.begin() + i );
+ SetModified( TRUE );
+ break;
+ }
}
}
const SmFontFormat * SmFontFormatList::GetFontFormat( const String &rFntFmtId ) const
{
- SmFontFormat *pRes = 0;
+ const SmFontFormat *pRes = 0;
- USHORT nCnt = aEntries.Count();
- USHORT i;
- for (i = 0; i < nCnt && !pRes; ++i)
+ for (size_t i = 0; i < aEntries.size(); ++i)
{
if (aEntries[i].aId == rFntFmtId)
+ {
pRes = &aEntries[i].aFntFmt;
+ break;
+ }
}
return pRes;
@@ -355,11 +349,11 @@ const SmFontFormat * SmFontFormatList::GetFontFormat( const String &rFntFmtId )
-const SmFontFormat * SmFontFormatList::GetFontFormat( USHORT nPos ) const
+const SmFontFormat * SmFontFormatList::GetFontFormat( size_t nPos ) const
{
- SmFontFormat *pRes = 0;
- if (nPos < aEntries.Count())
- pRes = &aEntries[ nPos ].aFntFmt;
+ const SmFontFormat *pRes = 0;
+ if (nPos < aEntries.size())
+ pRes = &aEntries[nPos].aFntFmt;
return pRes;
}
@@ -368,12 +362,13 @@ const String SmFontFormatList::GetFontFormatId( const SmFontFormat &rFntFmt ) co
{
String aRes;
- USHORT nCnt = aEntries.Count();
- USHORT i;
- for (i = 0; i < nCnt && 0 == aRes.Len(); ++i)
+ for (size_t i = 0; i < aEntries.size(); ++i)
{
if (aEntries[i].aFntFmt == rFntFmt)
+ {
aRes = aEntries[i].aId;
+ break;
+ }
}
return aRes;
@@ -392,10 +387,10 @@ const String SmFontFormatList::GetFontFormatId( const SmFontFormat &rFntFmt, BOO
}
-const String SmFontFormatList::GetFontFormatId( USHORT nPos ) const
+const String SmFontFormatList::GetFontFormatId( size_t nPos ) const
{
String aRes;
- if (nPos < aEntries.Count())
+ if (nPos < aEntries.size())
aRes = aEntries[nPos].aId;
return aRes;
}
@@ -409,12 +404,15 @@ const String SmFontFormatList::GetNewFontFormatId() const
String aPrefix( RTL_CONSTASCII_STRINGPARAM( "Id" ) );
INT32 nCnt = GetCount();
- for (INT32 i = 1; i <= nCnt + 1 && 0 == aRes.Len(); ++i)
+ for (INT32 i = 1; i <= nCnt + 1; ++i)
{
String aTmpId( aPrefix );
aTmpId += String::CreateFromInt32( i );
if (!GetFontFormat( aTmpId ))
+ {
aRes = aTmpId;
+ break;
+ }
}
DBG_ASSERT( 0 != aRes.Len(), "failed to create new FontFormatId" );
@@ -767,14 +765,14 @@ void SmMathConfig::SaveFontFormatList()
Sequence< OUString > aNames = lcl_GetFontPropertyNames();
INT32 nSymbolProps = aNames.getLength();
- USHORT nCount = rFntFmtList.GetCount();
+ size_t nCount = rFntFmtList.GetCount();
Sequence< PropertyValue > aValues( nCount * nSymbolProps );
PropertyValue *pValues = aValues.getArray();
PropertyValue *pVal = pValues;
OUString aDelim( OUString::valueOf( (sal_Unicode) '/' ) );
- for (USHORT i = 0; i < nCount; ++i)
+ for (size_t i = 0; i < nCount; ++i)
{
String aFntFmtId( rFntFmtList.GetFontFormatId( i ) );
const SmFontFormat aFntFmt( *rFntFmtList.GetFontFormat( aFntFmtId ) );
@@ -817,7 +815,8 @@ void SmMathConfig::SaveFontFormatList()
pVal->Value <<= (INT16) aFntFmt.nItalic;
pVal++;
}
- DBG_ASSERT( pVal - pValues == nCount * nSymbolProps, "properties missing" );
+ DBG_ASSERT( static_cast<size_t>(pVal - pValues) == (nCount * nSymbolProps),
+ "properties missing" );
ReplaceSetProperties( A2OU( FONT_FORMAT_LIST ) , aValues );
rFntFmtList.SetModified( FALSE );
@@ -826,13 +825,12 @@ void SmMathConfig::SaveFontFormatList()
void SmMathConfig::StripFontFormatList( const std::vector< SmSym > &rSymbols )
{
- size_t nCount = rSymbols.size();
- USHORT i;
+ size_t i;
// build list of used font-formats only
//!! font-format IDs may be different !!
SmFontFormatList aUsedList;
- for (i = 0; i < nCount; ++i)
+ for (i = 0; i < rSymbols.size(); ++i)
{
DBG_ASSERT( rSymbols[i].GetName().Len() > 0, "non named symbol" );
aUsedList.GetFontFormatId( SmFontFormat( rSymbols[i].GetFace() ) , TRUE );
@@ -845,14 +843,14 @@ void SmMathConfig::StripFontFormatList( const std::vector< SmSym > &rSymbols )
// remove unused font-formats from list
SmFontFormatList &rFntFmtList = GetFontFormatList();
- USHORT nCnt = rFntFmtList.GetCount();
+ size_t nCnt = rFntFmtList.GetCount();
SmFontFormat *pTmpFormat = new SmFontFormat[ nCnt ];
String *pId = new String [ nCnt ];
- INT32 k;
+ size_t k;
for (k = 0; k < nCnt; ++k)
{
- pTmpFormat[k] = *rFntFmtList.GetFontFormat( (USHORT) k );
- pId[k] = rFntFmtList.GetFontFormatId( (USHORT) k );
+ pTmpFormat[k] = *rFntFmtList.GetFontFormat( k );
+ pId[k] = rFntFmtList.GetFontFormatId( k );
}
for (k = 0; k < nCnt; ++k)
{
diff --git a/starmath/source/cfgitem.hxx b/starmath/source/cfgitem.hxx
index 9e4aa9f39f2f..8e3330a6466f 100644
--- a/starmath/source/cfgitem.hxx
+++ b/starmath/source/cfgitem.hxx
@@ -32,6 +32,7 @@
#ifndef _MATH_CFGITEM_HXX_
#define _MATH_CFGITEM_HXX_
+#include <deque>
#include <vector>
#include <com/sun/star/beans/PropertyValues.hpp>
@@ -41,7 +42,6 @@
#include <tools/solar.h>
#include <rtl/ustring.hxx>
#include <unotools/configitem.hxx>
-#include <svl/svarray.hxx>
#include <vcl/timer.hxx>
#include <symbol.hxx>
@@ -82,14 +82,10 @@ struct SmFntFmtListEntry
SmFntFmtListEntry( const String &rId, const SmFontFormat &rFntFmt );
};
-
-SV_DECL_OBJARR( SmFntFmtListEntryArr, SmFntFmtListEntry, 8, 8 )
-
-
class SmFontFormatList
{
- SmFntFmtListEntryArr aEntries;
- BOOL bModified;
+ std::deque<SmFntFmtListEntry> aEntries;
+ BOOL bModified;
// disallow copy-constructor and assignment-operator for now
SmFontFormatList( const SmFontFormatList & );
@@ -103,12 +99,12 @@ public:
void RemoveFontFormat( const String &rFntFmtId );
const SmFontFormat * GetFontFormat( const String &rFntFmtId ) const;
- const SmFontFormat * GetFontFormat( USHORT nPos ) const;
+ const SmFontFormat * GetFontFormat( size_t nPos ) const;
const String GetFontFormatId( const SmFontFormat &rFntFmt ) const;
const String GetFontFormatId( const SmFontFormat &rFntFmt, BOOL bAdd );
- const String GetFontFormatId( USHORT nPos ) const;
+ const String GetFontFormatId( size_t nPos ) const;
const String GetNewFontFormatId() const;
- USHORT GetCount() const { return aEntries.Count(); }
+ size_t GetCount() const { return aEntries.size(); }
BOOL IsModified() const { return bModified; }
void SetModified( BOOL bVal ) { bModified = bVal; }
diff --git a/svl/inc/poolcach.hxx b/svl/inc/poolcach.hxx
index 949c0aee5bad..78bdca8177e6 100644
--- a/svl/inc/poolcach.hxx
+++ b/svl/inc/poolcach.hxx
@@ -29,13 +29,24 @@
#include "svl/svldllapi.h"
#include <tools/solar.h>
+#include <vector>
+
+//------------------------------------------------------------------------
-class SfxItemModifyArr_Impl;
class SfxItemPool;
class SfxItemSet;
class SfxPoolItem;
class SfxSetItem;
+struct SfxItemModifyImpl
+{
+ const SfxSetItem *pOrigItem;
+ SfxSetItem *pPoolItem;
+};
+
+typedef std::vector<SfxItemModifyImpl> SfxItemModifyArr_Impl;
+
+
class SVL_DLLPUBLIC SfxItemPoolCache
{
SfxItemPool *pPool;
diff --git a/svl/inc/svl/itempool.hxx b/svl/inc/svl/itempool.hxx
index cbc6b7c4dd11..daaa2b481ba3 100644
--- a/svl/inc/svl/itempool.hxx
+++ b/svl/inc/svl/itempool.hxx
@@ -104,7 +104,7 @@ class SVL_DLLPUBLIC SfxItemPool
*/
{
- SVL_DLLPRIVATE void readTheItems(SvStream & rStream, USHORT nCount, USHORT nVersion,
+ SVL_DLLPRIVATE void readTheItems(SvStream & rStream, sal_uInt32 nCount, USHORT nVersion,
SfxPoolItem * pDefItem, SfxPoolItemArray_Impl ** pArr);
UniString aName;
@@ -208,9 +208,9 @@ public:
const SfxPoolItem &rItem,
FASTBOOL bDirect = FALSE ) const;
- USHORT GetSurrogate(const SfxPoolItem *) const;
- const SfxPoolItem * GetItem(USHORT nWhich, USHORT nSurrogate) const;
- USHORT GetItemCount(USHORT nWhich) const;
+ sal_uInt32 GetSurrogate(const SfxPoolItem *) const;
+ const SfxPoolItem * GetItem2(USHORT nWhich, sal_uInt32 nSurrogate) const;
+ sal_uInt32 GetItemCount2(USHORT nWhich) const;
const SfxPoolItem* LoadSurrogate(SvStream& rStream,
USHORT &rWhich, USHORT nSlotId,
const SfxItemPool* pRefPool = 0 );
diff --git a/svl/inc/svl/poolitem.hxx b/svl/inc/svl/poolitem.hxx
index c0cf53fb6ded..d78e32877440 100644
--- a/svl/inc/svl/poolitem.hxx
+++ b/svl/inc/svl/poolitem.hxx
@@ -50,8 +50,9 @@ class IntlWrapper;
namespace com { namespace sun { namespace star { namespace uno { class Any; } } } }
-#define SFX_ITEMS_DIRECT 0xffff
-#define SFX_ITEMS_NULL 0xfff0 // anstelle StoreSurrogate
+static const sal_uInt32 SFX_ITEMS_DIRECT= 0xffffffff;
+static const sal_uInt32 SFX_ITEMS_NULL= 0xfffffff0; // instead StoreSurrogate
+static const sal_uInt32 SFX_ITEMS_DEFAULT= 0xfffffffe;
#define SFX_ITEMS_POOLDEFAULT 0xffff
#define SFX_ITEMS_STATICDEFAULT 0xfffe
diff --git a/svl/inc/svl/svarray.hxx b/svl/inc/svl/svarray.hxx
index 99b2901b95f9..d48998247eeb 100644
--- a/svl/inc/svl/svarray.hxx
+++ b/svl/inc/svl/svarray.hxx
@@ -39,12 +39,6 @@
* enthaelt. (Sie werden im Speicher verschoben, koennen also
* z.B. keine String sein)
*
-* SV_DECL_OBJARR(nm, AE, IS, GS)
-* SV_IMPL_OBJARR( nm, AE )
-* definiere/implementiere ein Array das Objecte enthaelt.
-* (Hier koennen es auch Strings sein)
-*
-*
* SV_DECL_PTRARR(nm, AE, IS, GS)
* SV_IMPL_PTRARR(nm, AE)
* definiere/implementiere ein Array das Pointer haelt. Diese
@@ -86,10 +80,6 @@
* Basiert auf einem VARARR.
* Sortierung mit Hilfe der Object-operatoren "<" und "=="
*
-* JP 23.12.94 neu:
-* SV_DECL_PTRARR_STACK(nm, AE, IS, GS)
-* ein Stack mit einem PtrArray als Grundlage.
-*
* JP 09.10.96: vordefinierte Arrays:
* VarArr: SvBools, SvULongs, SvUShorts, SvLongs, SvShorts
* PtrArr: SvStrings, SvStringsDtor
@@ -207,8 +197,6 @@ public:\
#define _SV_DECL_VARARR(nm, AE, IS, GS ) \
_SV_DECL_VARARR_GEN(nm, AE, IS, GS, AE & )
-#define _SV_DECL_VARARR_PLAIN(nm, AE, IS, GS ) \
-_SV_DECL_VARARR_GEN(nm, AE, IS, GS, AE )
#define SV_DECL_VARARR_GEN(nm, AE, IS, GS, AERef, vis )\
_SV_DECL_VARARR_GEN(nm, AE, IS, GS, AERef, vis )\
@@ -219,15 +207,10 @@ nm& operator=( const nm& );\
#define SV_DECL_VARARR(nm, AE, IS, GS ) \
SV_DECL_VARARR_GEN(nm, AE, IS, GS, AE &, )
-#define SV_DECL_VARARR_PLAIN(nm, AE, IS, GS ) \
-SV_DECL_VARARR_GEN(nm, AE, IS, GS, AE, )
#define SV_DECL_VARARR_VISIBILITY(nm, AE, IS, GS, vis ) \
SV_DECL_VARARR_GEN(nm, AE, IS, GS, AE &, vis )
-#define SV_DECL_VARARR_PLAIN_VISIBILITY(nm, AE, IS, GS, vis ) \
-SV_DECL_VARARR_GEN(nm, AE, IS, GS, AE, vis )
-
#define SV_IMPL_VARARR_GEN( nm, AE, AERef )\
nm::nm( USHORT nInit, BYTE )\
: pData (0),\
@@ -329,192 +312,6 @@ _SVVARARR_IMPL_GET_OP_INLINE(nm, AE )\
#define SV_IMPL_VARARR( nm, AE ) \
SV_IMPL_VARARR_GEN( nm, AE, AE & )
-#define SV_IMPL_VARARR_PLAIN( nm, AE ) \
-SV_IMPL_VARARR_GEN( nm, AE, AE )
-
-#if defined(PRODUCT)
-
-#define _SVOBJARR_DEF_GET_OP_INLINE( nm,ArrElem )\
-ArrElem& operator[](USHORT nP) const { return *(pData+nP); }\
-\
-void Insert( const nm *pI, USHORT nP,\
- USHORT nS = 0, USHORT nE = USHRT_MAX )\
-{\
- if( USHRT_MAX == nE ) \
- nE = pI->nA; \
- if( nS < nE ) \
- Insert( (const ArrElem*)pI->pData+nS, (USHORT)nE-nS, nP );\
-}
-
-#define _SVOBJARR_IMPL_GET_OP_INLINE( nm, ArrElem )
-
-#else
-
-#define _SVOBJARR_DEF_GET_OP_INLINE( nm,ArrElem ) \
-ArrElem& operator[](USHORT nP) const;\
-void Insert( const nm *pI, USHORT nP,\
- USHORT nS = 0, USHORT nE = USHRT_MAX );
-
-#define _SVOBJARR_IMPL_GET_OP_INLINE( nm, ArrElem )\
-ArrElem& nm::operator[](USHORT nP) const\
-{\
- DBG_ASSERT( pData && nP < nA,"Op[]");\
- return *(pData+nP);\
-}\
-void nm::Insert( const nm *pI, USHORT nP, USHORT nStt, USHORT nE )\
-{\
- DBG_ASSERT( nP <= nA,"Ins,Ar[Start.End]");\
- if( USHRT_MAX == nE ) \
- nE = pI->nA; \
- if( nStt < nE ) \
- Insert( (const ArrElem*)pI->pData+nStt, (USHORT)nE-nStt, nP );\
-}
-
-#endif
-
-#define _SV_DECL_OBJARR(nm, AE, IS, GS)\
-typedef BOOL (*FnForEach_##nm)( const AE&, void* );\
-class nm\
-{\
-protected:\
- AE *pData;\
- USHORT nFree;\
- USHORT nA;\
-\
- void _resize(size_t n);\
- void _destroy();\
-\
-public:\
- nm( USHORT= IS, BYTE= GS );\
- ~nm() { _destroy(); }\
-\
- _SVOBJARR_DEF_GET_OP_INLINE(nm,AE)\
- AE& GetObject(USHORT nP) const { return (*this)[nP]; } \
-\
- void Insert( const AE &aE, USHORT nP );\
- void Insert( const AE *pE, USHORT nL, USHORT nP );\
- void Remove( USHORT nP, USHORT nL = 1 );\
- USHORT Count() const { return nA; }\
- const AE* GetData() const { return (const AE*)pData; }\
-\
- void ForEach( CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
- {\
- _ForEach( 0, nA, fnForEach, pArgs );\
- }\
- void ForEach( USHORT nS, USHORT nE, \
- CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
- {\
- _ForEach( nS, nE, fnForEach, pArgs );\
- }\
-\
- void _ForEach( USHORT nStt, USHORT nE, \
- CONCAT( FnForEach_, nm ) fnCall, void* pArgs = 0 );\
-\
-
-#define SV_DECL_OBJARR(nm, AE, IS, GS)\
-_SV_DECL_OBJARR(nm, AE, IS, GS)\
-private:\
-nm( const nm& );\
-nm& operator=( const nm& );\
-};
-
-#define SV_IMPL_OBJARR( nm, AE )\
-nm::nm( USHORT nInit, BYTE )\
- : pData (0),\
- nFree (nInit),\
- nA (0)\
-{\
- if( nInit )\
- {\
- pData = (AE*)(rtl_allocateMemory(sizeof(AE) * nInit));\
- DBG_ASSERT( pData, "CTOR, allocate");\
- }\
-}\
-\
-void nm::_destroy()\
-{\
- if(pData)\
- {\
- AE* pTmp=pData;\
- for(USHORT n=0; n < nA; n++,pTmp++ )\
- {\
- pTmp->~AE();\
- }\
- rtl_freeMemory(pData);\
- pData = 0;\
- }\
-}\
-\
-void nm::_resize (size_t n)\
-{\
- USHORT nL = ((n < USHRT_MAX) ? USHORT(n) : USHRT_MAX);\
- AE* pE = (AE*)(rtl_reallocateMemory (pData, sizeof(AE) * nL));\
- if ((pE != 0) || (nL == 0))\
- {\
- pData = pE;\
- nFree = nL - nA;\
- }\
-}\
-\
-void nm::Insert( const AE &aE, USHORT nP )\
-{\
- DBG_ASSERT( nP <= nA && nA < USHRT_MAX,"Ins 1");\
- if (nFree < 1)\
- _resize (nA + ((nA > 1) ? nA : 1));\
- if( pData && nP < nA )\
- memmove( pData+nP+1, pData+nP, (nA-nP) * sizeof( AE ));\
- AE* pTmp = pData+nP;\
- new( (DummyType*) pTmp ) AE( (AE&)aE );\
- ++nA; --nFree;\
-}\
-\
-void nm::Insert( const AE* pE, USHORT nL, USHORT nP )\
-{\
- DBG_ASSERT(nP<=nA && ((long)nA+nL) < USHRT_MAX, "Ins n");\
- if (nFree < nL)\
- _resize (nA + ((nA > nL) ? nA : nL));\
- if( pData && nP < nA )\
- memmove( pData+nP+nL, pData+nP, (nA-nP) * sizeof( AE ));\
- if( pE )\
- {\
- AE* pTmp = pData+nP;\
- for( USHORT n = 0; n < nL; n++, pTmp++, pE++)\
- {\
- new( (DummyType*) pTmp ) AE( (AE&)*pE );\
- }\
- }\
- nA = nA + nL; nFree = nFree - nL;\
-}\
-\
-void nm::Remove( USHORT nP, USHORT nL )\
-{\
- if( !nL )\
- return;\
- DBG_ASSERT( nP < nA && nP + nL <= nA,"Del");\
- AE* pTmp=pData+nP;\
- USHORT nCtr = nP;\
- for(USHORT n=0; n < nL; n++,pTmp++,nCtr++)\
- {\
- if( nCtr < nA )\
- pTmp->~AE();\
- }\
- if( pData && nP+1 < nA )\
- memmove( pData+nP, pData+nP+nL, (nA-nP-nL) * sizeof( AE ));\
- nA = nA - nL; nFree = nFree + nL;\
- if (nFree > nA) \
- _resize (nA);\
-}\
-\
-void nm::_ForEach( USHORT nStt, USHORT nE, \
- CONCAT( FnForEach_, nm ) fnCall, void* pArgs )\
-{\
- if( nStt >= nE || nE > nA )\
- return;\
- for( ; nStt < nE && (*fnCall)( *(pData+nStt), pArgs ); nStt++)\
- ;\
-}\
-\
-_SVOBJARR_IMPL_GET_OP_INLINE(nm, AE)\
#define _SV_DECL_PTRARR_DEF_GEN( nm, AE, IS, GS, AERef, vis )\
_SV_DECL_VARARR_GEN( nm, AE, IS, GS, AERef, vis)\
@@ -523,8 +320,6 @@ USHORT GetPos( const AERef aE ) const;\
#define _SV_DECL_PTRARR_DEF( nm, AE, IS, GS, vis )\
_SV_DECL_PTRARR_DEF_GEN( nm, AE, IS, GS, AE &, vis )
-#define _SV_DECL_PTRARR_DEF_PLAIN( nm, AE, IS, GS, vis )\
-_SV_DECL_PTRARR_DEF_GEN( nm, AE, IS, GS, AE, vis )
#define SV_DECL_PTRARR_GEN(nm, AE, IS, GS, Base, AERef, VPRef, vis )\
typedef BOOL (*FnForEach_##nm)( const AERef, void* );\
@@ -580,13 +375,9 @@ private:\
#define SV_DECL_PTRARR(nm, AE, IS, GS )\
SV_DECL_PTRARR_GEN(nm, AE, IS, GS, SvPtrarr, AE &, VoidPtr &, )
-#define SV_DECL_PTRARR_PLAIN(nm, AE, IS, GS )\
-SV_DECL_PTRARR_GEN(nm, AE, IS, GS, SvPtrarrPlain, AE, VoidPtr, )
#define SV_DECL_PTRARR_VISIBILITY(nm, AE, IS, GS, vis )\
SV_DECL_PTRARR_GEN(nm, AE, IS, GS, SvPtrarr, AE &, VoidPtr &, vis )
-#define SV_DECL_PTRARR_PLAIN_VISIBILITY(nm, AE, IS, GS, vis )\
-SV_DECL_PTRARR_GEN(nm, AE, IS, GS, SvPtrarrPlain, AE, VoidPtr, vis )
#define SV_DECL_PTRARR_DEL_GEN(nm, AE, IS, GS, Base, AERef, VPRef, vis )\
typedef BOOL (*FnForEach_##nm)( const AERef, void* );\
@@ -643,13 +434,9 @@ private:\
#define SV_DECL_PTRARR_DEL(nm, AE, IS, GS )\
SV_DECL_PTRARR_DEL_GEN(nm, AE, IS, GS, SvPtrarr, AE &, VoidPtr &, )
-#define SV_DECL_PTRARR_DEL_PLAIN(nm, AE, IS, GS )\
-SV_DECL_PTRARR_DEL_GEN(nm, AE, IS, GS, SvPtrarrPlain, AE, VoidPtr, )
#define SV_DECL_PTRARR_DEL_VISIBILITY(nm, AE, IS, GS, vis )\
SV_DECL_PTRARR_DEL_GEN(nm, AE, IS, GS, SvPtrarr, AE &, VoidPtr &, vis)
-#define SV_DECL_PTRARR_DEL_PLAIN_VISIBILITY(nm, AE, IS, GS, vis )\
-SV_DECL_PTRARR_DEL_GEN(nm, AE, IS, GS, SvPtrarrPlain, AE, VoidPtr, vis)
#define SV_IMPL_PTRARR_GEN(nm, AE, Base)\
void nm::DeleteAndDestroy( USHORT nP, USHORT nL )\
@@ -664,12 +451,9 @@ void nm::DeleteAndDestroy( USHORT nP, USHORT nL )\
#define SV_IMPL_PTRARR(nm, AE )\
SV_IMPL_PTRARR_GEN(nm, AE, SvPtrarr )
-#define SV_IMPL_PTRARR_PLAIN(nm, AE )\
-SV_IMPL_PTRARR_GEN(nm, AE, SvPtrarrPlain )
typedef void* VoidPtr;
_SV_DECL_PTRARR_DEF( SvPtrarr, VoidPtr, 0, 1, SVL_DLLPUBLIC )
-_SV_DECL_PTRARR_DEF_PLAIN( SvPtrarrPlain, VoidPtr, 0, 1, SVL_DLLPUBLIC )
// SORTARR - Begin
@@ -983,69 +767,21 @@ SV_IMPL_VARARR(nm##_SAR, AE)\
_SV_IMPL_SORTAR_ALG( nm,AE )\
_SV_SEEK_OBJECT( nm,AE )
-#define SV_DECL_PTRARR_STACK(nm, AE, IS, GS)\
-class nm: private SvPtrarr \
-{\
-public:\
- nm( USHORT nIni=IS, BYTE nG=GS )\
- : SvPtrarr(nIni,nG) {}\
- void Insert( const nm *pI, USHORT nP,\
- USHORT nS = 0, USHORT nE = USHRT_MAX ) {\
- SvPtrarr::Insert( pI, nP, nS, nE ); \
- }\
- void Remove( USHORT nP, USHORT nL = 1 ) {\
- SvPtrarr::Remove( nP, nL ); \
- }\
- void Push( const AE &aE ) {\
- SvPtrarr::Insert( (const VoidPtr &)aE, SvPtrarr::Count() );\
- }\
- USHORT Count() const { return SvPtrarr::Count(); }\
- AE operator[](USHORT nP) const {\
- return (AE)SvPtrarr::operator[]( nP );\
- }\
- AE GetObject(USHORT nP) const {\
- return (AE)SvPtrarr::GetObject( nP );\
- }\
- AE Pop(){\
- AE pRet = 0;\
- if( SvPtrarr::Count() ){\
- pRet = GetObject( SvPtrarr::Count()-1 );\
- SvPtrarr::Remove(Count()-1);\
- }\
- return pRet;\
- }\
- AE Top() const {\
- AE pRet = 0;\
- if( SvPtrarr::Count() )\
- pRet = GetObject( SvPtrarr::Count()-1 ); \
- return pRet;\
- }\
-};
-
#if defined (C40) || defined (C41) || defined (C42) || defined(C50) || defined(C52)
#define C40_INSERT( c, p, n) Insert( (c const *) p, n )
-#define C40_PUSH( c, p) Push( (c const *) p )
#define C40_PTR_INSERT( c, p) Insert( (c const *) p )
-#define C40_REMOVE( c, p ) Remove( (c const *) p )
#define C40_REPLACE( c, p, n) Replace( (c const *) p, n )
-#define C40_PTR_REPLACE( c, p) Replace( (c const *) p )
#define C40_GETPOS( c, r) GetPos( (c const *)r )
#else
#if defined WTC || defined ICC || defined HPUX || (defined GCC && __GNUC__ >= 3) || (defined(WNT) && _MSC_VER >= 1400)
#define C40_INSERT( c, p, n ) Insert( (c const *&) p, n )
-#define C40_PUSH( c, p) Push( (c const *&) p )
#define C40_PTR_INSERT( c, p ) Insert( (c const *&) p )
-#define C40_REMOVE( c, p ) Remove( (c const *&) p )
#define C40_REPLACE( c, p, n ) Replace( (c const *&) p, n )
-#define C40_PTR_REPLACE( c, p ) Replace( (c const *&) p )
#define C40_GETPOS( c, r) GetPos( (c const *&) r )
#else
#define C40_INSERT( c, p, n ) Insert( p, n )
-#define C40_PUSH( c, p) Push( p )
#define C40_PTR_INSERT( c, p ) Insert( p )
-#define C40_REMOVE( c, p) Remove( p )
#define C40_REPLACE( c, p, n ) Replace( p, n )
-#define C40_PTR_REPLACE( c, p ) Replace( p )
#define C40_GETPOS( c, r) GetPos( r )
#endif
#endif
diff --git a/svl/inc/svl/svstdarr.hxx b/svl/inc/svl/svstdarr.hxx
index fa3c94034256..608705dca43d 100644
--- a/svl/inc/svl/svstdarr.hxx
+++ b/svl/inc/svl/svstdarr.hxx
@@ -42,20 +42,11 @@
#include "svl/svldllapi.h"
#include <svl/svarray.hxx>
+#include <deque>
-//#ifdef _SVSTDARR_BOOLS
-#ifndef _SVSTDARR_BOOLS_DECL
-SV_DECL_VARARR_VISIBILITY( SvBools, BOOL, 1, 1, SVL_DLLPUBLIC )
-#define _SVSTDARR_BOOLS_DECL
-#endif
-//#endif
+typedef std::deque< BOOL > SvBools;
-//#ifdef _SVSTDARR_BYTES
-#ifndef _SVSTDARR_BYTES_DECL
-SV_DECL_VARARR_VISIBILITY( SvBytes, BYTE, 1, 1, SVL_DLLPUBLIC )
-#define _SVSTDARR_BYTES_DECL
-#endif
-//#endif
+typedef std::deque< BYTE > SvBytes;
//#ifdef _SVSTDARR_ULONGS
#ifndef _SVSTDARR_ULONGS_DECL
@@ -139,12 +130,7 @@ SV_DECL_VARARR_SORT_VISIBILITY( SvLongsSort, long, 1, 1, SVL_DLLPUBLIC )
#endif
//#endif
-//#ifdef _SVSTDARR_SHORTS
-#ifndef _SVSTDARR_SHORTS_DECL
-SV_DECL_VARARR_VISIBILITY( SvShorts, short, 1, 1, SVL_DLLPUBLIC )
-#define _SVSTDARR_SHORTS_DECL
-#endif
-//#endif
+typedef std::deque< short > SvShorts;
/*
form here all Arrays for Strings, ByteString and then
@@ -255,17 +241,5 @@ SV_DECL_PTRARR_SORT_DEL_VISIBILITY( SvByteStringsISortDtor, ByteStringPtr, 1, 1,
#endif
//#endif
-//#ifdef _SVSTDARR_XUB_STRLEN
-#ifndef _SVSTDARR_XUB_STRLEN_DECL
-SV_DECL_VARARR_VISIBILITY( SvXub_StrLens, xub_StrLen, 1, 1, SVL_DLLPUBLIC )
-#define _SVSTDARR_XUB_STRLEN_DECL
-#endif
-//#endif
-
-//#ifdef _SVSTDARR_XUB_STRLENSORT
-#ifndef _SVSTDARR_XUB_STRLENSORT_DECL
-SV_DECL_VARARR_SORT_VISIBILITY( SvXub_StrLensSort, xub_StrLen, 1, 1, SVL_DLLPUBLIC )
-#define _SVSTDARR_XUB_STRLENSORT_DECL
-#endif
-//#endif
+typedef std::deque< xub_StrLen > SvXub_StrLens;
diff --git a/svl/source/inc/poolio.hxx b/svl/source/inc/poolio.hxx
index 70122a5b1998..79cbbc463700 100644
--- a/svl/source/inc/poolio.hxx
+++ b/svl/source/inc/poolio.hxx
@@ -25,7 +25,8 @@
*
************************************************************************/
#include <svl/brdcst.hxx>
-
+#include <boost/shared_ptr.hpp>
+#include <deque>
#ifndef DELETEZ
#define DELETEZ(pPtr) { delete pPtr; pPtr = 0; }
@@ -53,16 +54,17 @@ struct SfxPoolVersion_Impl
{}
};
-SV_DECL_PTRARR( SfxPoolItemArrayBase_Impl, SfxPoolItem*, 0, 5 )
-SV_DECL_PTRARR_DEL( SfxPoolVersionArr_Impl, SfxPoolVersion_Impl*, 0, 2 )
+typedef std::deque<SfxPoolItem*> SfxPoolItemArrayBase_Impl;
+
+typedef boost::shared_ptr< SfxPoolVersion_Impl > SfxPoolVersion_ImplPtr;
+typedef std::deque< SfxPoolVersion_ImplPtr > SfxPoolVersionArr_Impl;
struct SfxPoolItemArray_Impl: public SfxPoolItemArrayBase_Impl
{
- USHORT nFirstFree;
+ size_t nFirstFree;
- SfxPoolItemArray_Impl (USHORT nInitSize = 0)
- : SfxPoolItemArrayBase_Impl( nInitSize ),
- nFirstFree( 0 )
+ SfxPoolItemArray_Impl ()
+ : nFirstFree( 0 )
{}
};
@@ -96,7 +98,8 @@ struct SfxItemPool_Impl
void DeleteItems()
{
- delete[] ppPoolItems; ppPoolItems = 0;
+ delete[] ppPoolItems;
+ ppPoolItems = 0;
}
};
diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx
index 5c5f106a1c36..d8bdeb330776 100644
--- a/svl/source/items/itempool.cxx
+++ b/svl/source/items/itempool.cxx
@@ -38,14 +38,6 @@
#include <svl/brdcst.hxx>
#include <svl/smplhint.hxx>
#include "poolio.hxx"
-#include <algorithm>
-
-// STATIC DATA -----------------------------------------------------------
-
-
-//========================================================================
-
-SV_IMPL_PTRARR( SfxPoolVersionArr_Impl, SfxPoolVersion_Impl* );
//========================================================================
@@ -275,13 +267,12 @@ SfxItemPool::SfxItemPool
(*( ppPoolDefaults + n ))->SetKind( SFX_ITEMS_POOLDEFAULT );
}
- // Version-Map kopieren
- USHORT nVerCount = rPool.pImp->aVersions.Count();
- for ( USHORT nVer = 0; nVer < nVerCount; ++nVer )
+ // Copy Version-Map
+ for ( size_t nVer = 0; nVer < rPool.pImp->aVersions.size(); ++nVer )
{
- const SfxPoolVersion_Impl *pOld = rPool.pImp->aVersions.GetObject(nVer);
- const SfxPoolVersion_Impl *pNew = new SfxPoolVersion_Impl( *pOld );
- pImp->aVersions.Insert( pNew, nVer );
+ const SfxPoolVersion_ImplPtr pOld = rPool.pImp->aVersions[nVer];
+ SfxPoolVersion_ImplPtr pNew = SfxPoolVersion_ImplPtr( new SfxPoolVersion_Impl( *pOld ) );
+ pImp->aVersions.push_back( pNew );
}
// Verkettung wiederherstellen
@@ -454,9 +445,8 @@ void SfxItemPool::SetSecondaryPool( SfxItemPool *pPool )
pSecondary->pImp->ppPoolItems + n;
if ( *ppItemArr )
{
- SfxPoolItem** ppHtArr =
- (SfxPoolItem**)(*ppItemArr)->GetData();
- for( USHORT i = (*ppItemArr)->Count(); i; ++ppHtArr, --i )
+ SfxPoolItemArrayBase_Impl::iterator ppHtArr = (*ppItemArr)->begin();
+ for( size_t i = (*ppItemArr)->size(); i; ++ppHtArr, --i )
if ( !(*ppHtArr) )
{
DBG_ERROR( "old secondary pool must be empty" );
@@ -582,8 +572,8 @@ void SfxItemPool::Delete()
{
if ( *ppItemArr )
{
- SfxPoolItem** ppHtArr = (SfxPoolItem**)(*ppItemArr)->GetData();
- for ( USHORT n = (*ppItemArr)->Count(); n; --n, ++ppHtArr )
+ SfxPoolItemArrayBase_Impl::iterator ppHtArr = (*ppItemArr)->begin();
+ for ( size_t n = (*ppItemArr)->size(); n; --n, ++ppHtArr )
if (*ppHtArr)
{
#ifdef DBG_UTIL
@@ -614,8 +604,8 @@ void SfxItemPool::Delete()
{
if ( *ppItemArr )
{
- SfxPoolItem** ppHtArr = (SfxPoolItem**)(*ppItemArr)->GetData();
- for ( USHORT n = (*ppItemArr)->Count(); n; --n, ++ppHtArr )
+ SfxPoolItemArrayBase_Impl::iterator ppHtArr = (*ppItemArr)->begin();
+ for ( size_t n = (*ppItemArr)->size(); n; --n, ++ppHtArr )
if (*ppHtArr)
{
#ifdef DBG_UTIL
@@ -663,8 +653,8 @@ void SfxItemPool::Cleanup()
((*ppDefaultItem && (*ppDefaultItem)->ISA(SfxSetItem)) ||
(*ppStaticDefaultItem)->ISA(SfxSetItem)) )
{
- SfxPoolItem** ppHtArr = (SfxPoolItem**)(*ppItemArr)->GetData();
- for ( USHORT n = (*ppItemArr)->Count(); n; --n, ++ppHtArr )
+ SfxPoolItemArrayBase_Impl::iterator ppHtArr = (*ppItemArr)->begin();
+ for ( size_t n = (*ppItemArr)->size(); n; --n, ++ppHtArr )
if ( *ppHtArr && !(*ppHtArr)->GetRefCount() )
{
DELETEZ(*ppHtArr);
@@ -681,8 +671,8 @@ void SfxItemPool::Cleanup()
{
if ( *ppItemArr )
{
- SfxPoolItem** ppHtArr = (SfxPoolItem**)(*ppItemArr)->GetData();
- for ( USHORT n = (*ppItemArr)->Count(); n; --n, ++ppHtArr )
+ SfxPoolItemArrayBase_Impl::iterator ppHtArr = (*ppItemArr)->begin();
+ for ( size_t n = (*ppItemArr)->size(); n; --n, ++ppHtArr )
if ( *ppHtArr && !(*ppHtArr)->GetRefCount() )
DELETEZ( *ppHtArr );
}
@@ -782,15 +772,16 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, USHORT nWhich )
if( !*ppItemArr )
*ppItemArr = new SfxPoolItemArray_Impl;
- SfxPoolItem **ppFree = 0;
- SfxPoolItem** ppHtArray = (SfxPoolItem**)(*ppItemArr)->GetData();
+ SfxPoolItemArrayBase_Impl::iterator ppFree;
+ BOOL ppFreeIsSet = FALSE;
+ SfxPoolItemArrayBase_Impl::iterator ppHtArray = (*ppItemArr)->begin();
if ( IsItemFlag_Impl( nIndex, SFX_ITEM_POOLABLE ) )
{
// wenn es ueberhaupt gepoolt ist, koennte es schon drin sein
if ( IsPooledItem(&rItem) )
{
// 1. Schleife: teste ob der Pointer vorhanden ist.
- for( USHORT n = (*ppItemArr)->Count(); n; ++ppHtArray, --n )
+ for( size_t n = (*ppItemArr)->size(); n; ++ppHtArray, --n )
if( &rItem == (*ppHtArray) )
{
AddRef( **ppHtArray );
@@ -799,8 +790,8 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, USHORT nWhich )
}
// 2. Schleife: dann muessen eben die Attribute verglichen werden
- USHORT n;
- for ( n = (*ppItemArr)->Count(), ppHtArray = (SfxPoolItem**)(*ppItemArr)->GetData();
+ size_t n;
+ for ( n = (*ppItemArr)->size(), ppHtArray = (*ppItemArr)->begin();
n; ++ppHtArray, --n )
{
if ( *ppHtArray )
@@ -812,22 +803,26 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, USHORT nWhich )
}
}
else
- if ( !ppFree )
+ if ( ppFreeIsSet == FALSE )
+ {
ppFree = ppHtArray;
+ ppFreeIsSet = TRUE;
+ }
}
}
else
{
// freien Platz suchen
- SfxPoolItem** ppHtArr;
- USHORT n, nCount = (*ppItemArr)->Count();
+ SfxPoolItemArrayBase_Impl::iterator ppHtArr;
+ size_t n, nCount = (*ppItemArr)->size();
for ( n = (*ppItemArr)->nFirstFree,
- ppHtArr = (SfxPoolItem**)(*ppItemArr)->GetData() + n;
+ ppHtArr = (*ppItemArr)->begin() + n;
n < nCount;
++ppHtArr, ++n )
if ( !*ppHtArr )
{
ppFree = ppHtArr;
+ ppFreeIsSet = TRUE;
break;
}
@@ -853,9 +848,9 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, USHORT nWhich )
#endif
#endif
AddRef( *pNewItem, pImp->nInitRefCount );
- const SfxPoolItem* pTemp = pNewItem;
- if ( !ppFree )
- (*ppItemArr)->Insert( pTemp, (*ppItemArr)->Count() );
+ SfxPoolItem* pTemp = pNewItem;
+ if ( ppFreeIsSet == FALSE )
+ (*ppItemArr)->push_back( pTemp );
else
{
DBG_ASSERT( *ppFree == 0, "using surrogate in use" );
@@ -915,8 +910,8 @@ void SfxItemPool::Remove( const SfxPoolItem& rItem )
// Item im eigenen Pool suchen
SfxPoolItemArray_Impl** ppItemArr = (pImp->ppPoolItems + nIndex);
SFX_ASSERT( *ppItemArr, rItem.Which(), "removing Item not in Pool" );
- SfxPoolItem** ppHtArr = (SfxPoolItem**)(*ppItemArr)->GetData();
- for( USHORT n = (*ppItemArr)->Count(); n; ++ppHtArr, --n )
+ SfxPoolItemArrayBase_Impl::iterator ppHtArr = (*ppItemArr)->begin();
+ for( size_t n = (*ppItemArr)->size(); n; ++ppHtArr, --n )
if( *ppHtArr == &rItem )
{
if ( (*ppHtArr)->GetRefCount() ) //!
@@ -928,7 +923,7 @@ void SfxItemPool::Remove( const SfxPoolItem& rItem )
}
// ggf. kleinstmoegliche freie Position merken
- USHORT nPos = (*ppItemArr)->Count() - n;
+ size_t nPos = (*ppItemArr)->size() - n;
if ( (*ppItemArr)->nFirstFree > nPos )
(*ppItemArr)->nFirstFree = nPos;
@@ -1009,24 +1004,24 @@ void SfxItemPool::FillItemIdRanges_Impl( USHORT*& pWhichRanges ) const
// -----------------------------------------------------------------------
-const SfxPoolItem *SfxItemPool::GetItem(USHORT nWhich, USHORT nOfst) const
+const SfxPoolItem *SfxItemPool::GetItem2(USHORT nWhich, sal_uInt32 nOfst) const
{
DBG_CHKTHIS(SfxItemPool, 0);
if ( !IsInRange(nWhich) )
{
if ( pSecondary )
- return pSecondary->GetItem( nWhich, nOfst );
+ return pSecondary->GetItem2( nWhich, nOfst );
SFX_ASSERT( 0, nWhich, "unknown Which-Id - cannot resolve surrogate" );
return 0;
}
// dflt-Attribut?
- if ( nOfst == SFX_ITEMS_STATICDEFAULT )
+ if ( nOfst == SFX_ITEMS_DEFAULT )
return *(ppStaticDefaults + GetIndex_Impl(nWhich));
SfxPoolItemArray_Impl* pItemArr = *(pImp->ppPoolItems + GetIndex_Impl(nWhich));
- if( pItemArr && nOfst < pItemArr->Count() )
+ if( pItemArr && nOfst < pItemArr->size() )
return (*pItemArr)[nOfst];
return 0;
@@ -1034,21 +1029,21 @@ const SfxPoolItem *SfxItemPool::GetItem(USHORT nWhich, USHORT nOfst) const
// -----------------------------------------------------------------------
-USHORT SfxItemPool::GetItemCount(USHORT nWhich) const
+sal_uInt32 SfxItemPool::GetItemCount2(USHORT nWhich) const
{
DBG_CHKTHIS(SfxItemPool, 0);
if ( !IsInRange(nWhich) )
{
if ( pSecondary )
- return pSecondary->GetItemCount( nWhich );
+ return pSecondary->GetItemCount2( nWhich );
SFX_ASSERT( 0, nWhich, "unknown Which-Id - cannot resolve surrogate" );
return 0;
}
SfxPoolItemArray_Impl* pItemArr = *(pImp->ppPoolItems + GetIndex_Impl(nWhich));
if ( pItemArr )
- return pItemArr->Count();
+ return pItemArr->size();
return 0;
}
diff --git a/svl/source/items/poolcach.cxx b/svl/source/items/poolcach.cxx
index b918add10f0f..fee18724bcc2 100644
--- a/svl/source/items/poolcach.cxx
+++ b/svl/source/items/poolcach.cxx
@@ -41,18 +41,6 @@
DBG_NAME(SfxItemPoolCache)
-
-//------------------------------------------------------------------------
-
-struct SfxItemModifyImpl
-{
- const SfxSetItem *pOrigItem;
- SfxSetItem *pPoolItem;
-};
-
-SV_DECL_VARARR( SfxItemModifyArr_Impl, SfxItemModifyImpl, 8, 8 )
-SV_IMPL_VARARR( SfxItemModifyArr_Impl, SfxItemModifyImpl);
-
//------------------------------------------------------------------------
SfxItemPoolCache::SfxItemPoolCache( SfxItemPool *pItemPool,
@@ -84,7 +72,7 @@ SfxItemPoolCache::SfxItemPoolCache( SfxItemPool *pItemPool,
SfxItemPoolCache::~SfxItemPoolCache()
{
DBG_DTOR(SfxItemPoolCache, 0);
- for ( USHORT nPos = 0; nPos < pCache->Count(); ++nPos ) {
+ for ( size_t nPos = 0; nPos < pCache->size(); ++nPos ) {
pPool->Remove( *(*pCache)[nPos].pPoolItem );
pPool->Remove( *(*pCache)[nPos].pOrigItem );
}
@@ -103,8 +91,8 @@ const SfxSetItem& SfxItemPoolCache::ApplyTo( const SfxSetItem &rOrigItem, BOOL b
DBG_ASSERT( IsDefaultItem( &rOrigItem ) || IsPooledItem( &rOrigItem ),
"original not in pool" );
- // Suchen, ob diese Transformations schon einmal vorkam
- for ( USHORT nPos = 0; nPos < pCache->Count(); ++nPos )
+ // Find whether this Transformations ever occurred
+ for ( size_t nPos = 0; nPos < pCache->size(); ++nPos )
{
SfxItemModifyImpl &rMapEntry = (*pCache)[nPos];
if ( rMapEntry.pOrigItem == &rOrigItem )
@@ -143,7 +131,7 @@ const SfxSetItem& SfxItemPoolCache::ApplyTo( const SfxSetItem &rOrigItem, BOOL b
SfxItemModifyImpl aModify;
aModify.pOrigItem = &rOrigItem;
aModify.pPoolItem = (SfxSetItem*) pNewPoolItem;
- pCache->Insert( aModify, pCache->Count() );
+ pCache->push_back( aModify );
DBG_ASSERT( !pItemToPut ||
&pNewPoolItem->GetItemSet().Get( pItemToPut->Which() ) == pItemToPut,
diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx
index 6aeb64d76d1a..8bf8f2b2434b 100644
--- a/svl/source/items/poolio.cxx
+++ b/svl/source/items/poolio.cxx
@@ -178,10 +178,10 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
// Version-Maps
{
SfxMultiVarRecordWriter aVerRec( &rStream, SFX_ITEMPOOL_REC_VERSIONMAP, 0 );
- for ( USHORT nVerNo = 0; nVerNo < pImp->aVersions.Count(); ++nVerNo )
+ for ( size_t nVerNo = 0; nVerNo < pImp->aVersions.size(); ++nVerNo )
{
aVerRec.NewContent();
- SfxPoolVersion_Impl *pVer = pImp->aVersions[nVerNo];
+ SfxPoolVersion_ImplPtr pVer = pImp->aVersions[nVerNo];
rStream << pVer->_nVer << pVer->_nStart << pVer->_nEnd;
USHORT nCount = pVer->_nEnd - pVer->_nStart + 1;
USHORT nNewWhich = 0;
@@ -207,7 +207,7 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
SfxPoolItemArray_Impl **pArr = pImp->ppPoolItems;
SfxPoolItem **ppDefItem = ppStaticDefaults;
const USHORT nSize = GetSize_Impl();
- for ( USHORT i = 0; i < nSize && !rStream.GetError(); ++i, ++pArr, ++ppDefItem )
+ for ( size_t i = 0; i < nSize && !rStream.GetError(); ++i, ++pArr, ++ppDefItem )
{
// Version des Items feststellen
USHORT nItemVersion = (*ppDefItem)->GetVersion( _nFileFormatVersion );
@@ -229,16 +229,16 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
aWhichIdsRec.NewContent(nSlotId, 0);
rStream << (*ppDefItem)->Which();
rStream << nItemVersion;
- const USHORT nCount = (*pArr)->Count();
- DBG_ASSERT(nCount, "ItemArr ist leer");
+ const sal_uInt32 nCount = ::std::min<size_t>( (*pArr)->size(), SAL_MAX_UINT32 );
+ DBG_ASSERT(nCount, "ItemArr is empty");
rStream << nCount;
// Items an sich schreiben
SfxMultiMixRecordWriter aItemsRec( &rStream, SFX_ITEMPOOL_REC_ITEMS, 0 );
- for ( USHORT j = 0; j < nCount; ++j )
+ for ( size_t j = 0; j < nCount; ++j )
{
// Item selbst besorgen
- const SfxPoolItem *pItem = (*pArr)->GetObject(j);
+ const SfxPoolItem *pItem = (*pArr)->operator[](j);
if ( pItem && pItem->GetRefCount() ) //! siehe anderes MI-REF
{
aItemsRec.NewContent(j, 'X' );
@@ -353,8 +353,8 @@ void SfxItemPool::LoadCompleted()
if ( *ppItemArr )
{
// "uber alle Items mit dieser Which-Id iterieren
- SfxPoolItem** ppHtArr = (SfxPoolItem**)(*ppItemArr)->GetData();
- for( USHORT n = (*ppItemArr)->Count(); n; --n, ++ppHtArr )
+ SfxPoolItemArrayBase_Impl::iterator ppHtArr = (*ppItemArr)->begin();
+ for( size_t n = (*ppItemArr)->size(); n; --n, ++ppHtArr )
if (*ppHtArr)
{
#ifdef DBG_UTIL
@@ -382,15 +382,15 @@ void SfxItemPool::LoadCompleted()
//============================================================================
// This had to be moved to a method of its own to keep Solaris GCC happy:
void SfxItemPool::readTheItems (
- SvStream & rStream, USHORT nItemCount, USHORT nVersion,
+ SvStream & rStream, sal_uInt32 nItemCount, USHORT nVersion,
SfxPoolItem * pDefItem, SfxPoolItemArray_Impl ** ppArr)
{
SfxMultiRecordReader aItemsRec( &rStream, SFX_ITEMPOOL_REC_ITEMS );
- SfxPoolItemArray_Impl *pNewArr = new SfxPoolItemArray_Impl( nItemCount );
+ SfxPoolItemArray_Impl *pNewArr = new SfxPoolItemArray_Impl();
SfxPoolItem *pItem = 0;
- USHORT n, nLastSurrogate = USHORT(-1);
+ ULONG n, nLastSurrogate = ULONG(-1);
while (aItemsRec.GetContent())
{
// n"achstes Surrogat holen
@@ -400,7 +400,7 @@ void SfxItemPool::readTheItems (
// fehlende auff"ullen
for ( pItem = 0, n = nLastSurrogate+1; n < nSurrogate; ++n )
- pNewArr->C40_INSERT(SfxPoolItem, pItem, n);
+ pNewArr->push_back( (SfxPoolItem*) pItem );
nLastSurrogate = nSurrogate;
// Ref-Count und Item laden
@@ -408,7 +408,7 @@ void SfxItemPool::readTheItems (
rStream >> nRef;
pItem = pDefItem->Create(rStream, nVersion);
- pNewArr->C40_INSERT(SfxPoolItem, pItem, nSurrogate);
+ pNewArr->push_back( (SfxPoolItem*) pItem );
if ( !bPersistentRefCounts )
// bis <SfxItemPool::LoadCompleted()> festhalten
@@ -424,33 +424,32 @@ void SfxItemPool::readTheItems (
// fehlende auff"ullen
for ( pItem = 0, n = nLastSurrogate+1; n < nItemCount; ++n )
- pNewArr->C40_INSERT(SfxPoolItem, pItem, n);
+ pNewArr->push_back( (SfxPoolItem*) pItem );
SfxPoolItemArray_Impl *pOldArr = *ppArr;
*ppArr = pNewArr;
// die Items merken, die schon im Pool sind
- int bEmpty = TRUE;
+ bool bEmpty = true;
if ( 0 != pOldArr )
- for ( n = 0; bEmpty && n < pOldArr->Count(); ++n )
- bEmpty = pOldArr->GetObject(n) == 0;
+ for ( n = 0; bEmpty && n < pOldArr->size(); ++n )
+ bEmpty = pOldArr->operator[](n) == 0;
DBG_ASSERTWARNING( bEmpty, "loading non-empty pool" );
if ( !bEmpty )
{
// f"ur alle alten suchen, ob ein gleiches neues existiert
- for ( USHORT nOld = 0; nOld < pOldArr->Count(); ++nOld )
+ for ( size_t nOld = 0; nOld < pOldArr->size(); ++nOld )
{
SfxPoolItem *pOldItem = (*pOldArr)[nOld];
if ( pOldItem )
{
- USHORT nFree = USHRT_MAX;
- int bFound = FALSE;
- USHORT nCount = (*ppArr)->Count();
- for ( USHORT nNew = nCount; !bFound && nNew--; )
+ sal_uInt32 nFree = SAL_MAX_UINT32;
+ bool bFound = false;
+ for ( size_t nNew = (*ppArr)->size(); nNew--; )
{
// geladenes Item
SfxPoolItem *&rpNewItem =
- (SfxPoolItem*&)(*ppArr)->GetData()[nNew];
+ (SfxPoolItem*&)(*ppArr)->operator[](nNew);
// surrogat unbenutzt?
if ( !rpNewItem )
@@ -464,17 +463,18 @@ void SfxItemPool::readTheItems (
SetRefCount( *rpNewItem, 0 );
delete rpNewItem;
rpNewItem = pOldItem;
- bFound = TRUE;
+ bFound = true;
+ break;
}
}
// vorhervorhandene, nicht geladene uebernehmen
if ( !bFound )
{
- if ( nFree != USHRT_MAX )
- (SfxPoolItem*&)(*ppArr)->GetData()[nFree] = pOldItem;
+ if ( nFree != SAL_MAX_UINT32 )
+ (SfxPoolItem*&)(*ppArr)->operator[](nFree) = pOldItem;
else
- (*ppArr)->C40_INSERT( SfxPoolItem, pOldItem, nCount );
+ (*ppArr)->push_back( (SfxPoolItem*) pOldItem );
}
}
}
@@ -495,14 +495,14 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
// "uber alle Which-Werte iterieren
SfxPoolItemArray_Impl** ppItemArr = pImp->ppPoolItems;
- for( USHORT nArrCnt = GetSize_Impl(); nArrCnt; --nArrCnt, ++ppItemArr )
+ for( size_t nArrCnt = GetSize_Impl(); nArrCnt; --nArrCnt, ++ppItemArr )
{
// ist "uberhaupt ein Item mit dem Which-Wert da?
if ( *ppItemArr )
{
// "uber alle Items mit dieser Which-Id iterieren
- SfxPoolItem** ppHtArr = (SfxPoolItem**)(*ppItemArr)->GetData();
- for( USHORT n = (*ppItemArr)->Count(); n; --n, ++ppHtArr )
+ SfxPoolItemArrayBase_Impl::iterator ppHtArr = (*ppItemArr)->begin();
+ for( size_t n = (*ppItemArr)->size(); n; --n, ++ppHtArr )
if (*ppHtArr)
{
#ifdef DBG_UTIL
@@ -611,10 +611,10 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
rStream >> nVersion >> nHStart >> nHEnd;
USHORT nCount = nHEnd - nHStart + 1;
- // Version neuer als bekannt?
- if ( nVerNo >= pImp->aVersions.Count() )
+ // Is new version is known?
+ if ( nVerNo >= pImp->aVersions.size() )
{
- // neue Version hinzufuegen
+ // Add new Version
USHORT *pMap = new USHORT[nCount];
for ( USHORT n = 0; n < nCount; ++n )
rStream >> pMap[n];
@@ -632,7 +632,8 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
while ( aWhichIdsRec.GetContent() )
{
// SlotId, Which-Id und Item-Version besorgen
- USHORT nCount, nVersion, nWhich;
+ sal_uInt32 nCount;
+ USHORT nVersion, nWhich;
//!USHORT nSlotId = aWhichIdsRec.GetContentTag();
rStream >> nWhich;
if ( pImp->nLoadingVersion != pImp->nVersion )
@@ -799,10 +800,10 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
USHORT nCount = nHEnd - nHStart + 1;
USHORT nBytes = (nCount)*sizeof(USHORT);
- // Version neuer als bekannt?
- if ( nVerNo >= pImp->aVersions.Count() )
+ // Is new version is known?
+ if ( nVerNo >= pImp->aVersions.size() )
{
- // neue Version hinzufuegen
+ // Add new Version
USHORT *pMap = new USHORT[nCount];
for ( USHORT n = 0; n < nCount; ++n )
rStream >> pMap[n];
@@ -849,7 +850,7 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
USHORT nIndex = GetIndex_Impl(nWhich);
ppArr = pImp->ppPoolItems + nIndex;
- pNewArr = new SfxPoolItemArray_Impl( nCount );
+ pNewArr = new SfxPoolItemArray_Impl();
pDefItem = *(ppStaticDefaults + nIndex);
}
@@ -897,8 +898,8 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
AddRef(*pItem, nRef);
}
}
-
- pNewArr->C40_INSERT( SfxPoolItem, pItem, j);
+ //pNewArr->insert( pItem, j );
+ pNewArr->push_back( (SfxPoolItem*) pItem );
// restliche gespeicherte Laenge skippen (neueres Format)
nLastPos = rStream.Tell();
@@ -924,24 +925,23 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
// die Items merken, die schon im Pool sind
int bEmpty = TRUE;
if ( 0 != pOldArr )
- for ( USHORT n = 0; bEmpty && n < pOldArr->Count(); ++n )
- bEmpty = pOldArr->GetObject(n) == 0;
+ for ( size_t n = 0; bEmpty && n < pOldArr->size(); ++n )
+ bEmpty = pOldArr->operator[](n) == 0;
DBG_ASSERTWARNING( bEmpty, "loading non-empty pool" );
if ( !bEmpty )
{
// f"ur alle alten suchen, ob ein gleiches neues existiert
- for ( USHORT nOld = 0; nOld < pOldArr->Count(); ++nOld )
+ for ( size_t nOld = 0; nOld < pOldArr->size(); ++nOld )
{
SfxPoolItem *pOldItem = (*pOldArr)[nOld];
if ( pOldItem )
{
- int bFound = FALSE;
- for ( USHORT nNew = 0;
- !bFound && nNew < (*ppArr)->Count();
- ++nNew )
+ bool bFound = false;
+ for ( size_t nNew = 0;
+ nNew < (*ppArr)->size(); ++nNew )
{
SfxPoolItem *&rpNewItem =
- (SfxPoolItem*&)(*ppArr)->GetData()[nNew];
+ (SfxPoolItem*&)(*ppArr)->operator[](nNew);
if ( rpNewItem && *rpNewItem == *pOldItem )
{
@@ -949,11 +949,11 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
SetRefCount( *rpNewItem, 0 );
delete rpNewItem;
rpNewItem = pOldItem;
- bFound = TRUE;
+ bFound = true;
SFX_TRACE( "reusing item", pOldItem );
+ break;
}
}
- //! DBG_ASSERT( bFound, "old-item not found in file" );
if ( !bFound )
{
SFX_TRACE( "item not found: ", pOldItem );
@@ -1039,7 +1039,7 @@ const SfxPoolItem* SfxItemPool::LoadSurrogate
L"adt Surrogat aus 'rStream' und liefert das dadurch in 'rRefPool'
repr"asentierte SfxPoolItem zu"ruck. Ist das im Stream befindliche
Surrogat == SFX_ITEMS_DIRECT (!SFX_ITEM_POOLABLE) wird 0 zur"uckgegeben,
- das Item ist direkt aus dem Stream zu laden. Bei 0xfff0 (SFX_ITEMS_NULL)
+ das Item ist direkt aus dem Stream zu laden. Bei 0xfffffff0 (SFX_ITEMS_NULL)
wird auch 0 zurueckgegeben und rWhich auf 0 gesetzt, das Item ist nicht
verfuegbar.
@@ -1071,15 +1071,15 @@ const SfxPoolItem* SfxItemPool::LoadSurrogate
*/
{
- // erstmal das Surrogat lesen
- USHORT nSurrogat;
+ // Read the first surrogate
+ sal_uInt32 nSurrogat;
rStream >> nSurrogat;
- // direkt gespeichertes Item?
+ // Is item stored directly?
if ( SFX_ITEMS_DIRECT == nSurrogat )
return 0;
- // nicht vorhandenes Item?
+ // Item does not exist?
if ( SFX_ITEMS_NULL == nSurrogat )
{
rWhich = 0;
@@ -1114,13 +1114,13 @@ const SfxPoolItem* SfxItemPool::LoadSurrogate
if ( pTarget->IsInRange(rWhich) )
{
// dflt-Attribut?
- if ( SFX_ITEMS_STATICDEFAULT == nSurrogat )
+ if ( SFX_ITEMS_DEFAULT == nSurrogat )
return *(pTarget->ppStaticDefaults +
pTarget->GetIndex_Impl(rWhich));
SfxPoolItemArray_Impl* pItemArr = *(pTarget->pImp->ppPoolItems +
pTarget->GetIndex_Impl(rWhich));
- pItem = pItemArr && nSurrogat < pItemArr->Count()
+ pItem = pItemArr && nSurrogat < pItemArr->size()
? (*pItemArr)[nSurrogat]
: 0;
if ( !pItem )
@@ -1184,17 +1184,17 @@ FASTBOOL SfxItemPool::StoreSurrogate
FASTBOOL bRealSurrogate = IsItemFlag(*pItem, SFX_ITEM_POOLABLE);
rStream << ( bRealSurrogate
? GetSurrogate( pItem )
- : (UINT16) SFX_ITEMS_DIRECT );
+ : SFX_ITEMS_DIRECT );
return bRealSurrogate;
}
- rStream << (UINT16) SFX_ITEMS_NULL;
+ rStream << SFX_ITEMS_NULL;
return TRUE;
}
// -----------------------------------------------------------------------
-USHORT SfxItemPool::GetSurrogate(const SfxPoolItem *pItem) const
+sal_uInt32 SfxItemPool::GetSurrogate(const SfxPoolItem *pItem) const
{
DBG_CHKTHIS(SfxItemPool, 0);
DBG_ASSERT( pItem, "no 0-Pointer Surrogate" );
@@ -1210,18 +1210,18 @@ USHORT SfxItemPool::GetSurrogate(const SfxPoolItem *pItem) const
// Pointer auf static- oder pool-dflt-Attribut?
if( IsStaticDefaultItem(pItem) || IsPoolDefaultItem(pItem) )
- return SFX_ITEMS_STATICDEFAULT;
+ return SFX_ITEMS_DEFAULT;
SfxPoolItemArray_Impl* pItemArr = *(pImp->ppPoolItems + GetIndex_Impl(pItem->Which()));
- DBG_ASSERT(pItemArr, "ItemArr nicht vorhanden");
- const USHORT nCount = pItemArr->Count();
- for ( USHORT i = 0; i < nCount; ++i )
+ DBG_ASSERT(pItemArr, "ItemArr is not available");
+
+ for ( size_t i = 0; i < pItemArr->size(); ++i )
{
const SfxPoolItem *p = (*pItemArr)[i];
if ( p == pItem )
return i;
}
- SFX_ASSERT( 0, pItem->Which(), "Item nicht im Pool");
+ SFX_ASSERT( 0, pItem->Which(), "Item not in the pool");
return SFX_ITEMS_NULL;
}
@@ -1326,10 +1326,10 @@ void SfxItemPool::SetVersionMap
*/
{
- // neuen Map-Eintrag erzeugen und einf"ugen
- const SfxPoolVersion_Impl *pVerMap = new SfxPoolVersion_Impl(
- nVer, nOldStart, nOldEnd, pOldWhichIdTab );
- pImp->aVersions.Insert( pVerMap, pImp->aVersions.Count() );
+ // create new map entry to insert
+ const SfxPoolVersion_ImplPtr pVerMap = SfxPoolVersion_ImplPtr( new SfxPoolVersion_Impl(
+ nVer, nOldStart, nOldEnd, pOldWhichIdTab ) );
+ pImp->aVersions.push_back( pVerMap );
DBG_ASSERT( nVer > pImp->nVersion, "Versions not sorted" );
pImp->nVersion = nVer;
@@ -1398,9 +1398,9 @@ USHORT SfxItemPool::GetNewWhich
if ( nDiff > 0 )
{
// von der Top-Version bis runter zur File-Version stufenweise mappen
- for ( USHORT nMap = pImp->aVersions.Count(); nMap > 0; --nMap )
+ for ( size_t nMap = pImp->aVersions.size(); nMap > 0; --nMap )
{
- SfxPoolVersion_Impl *pVerInfo = pImp->aVersions[nMap-1];
+ SfxPoolVersion_ImplPtr pVerInfo = pImp->aVersions[nMap-1];
if ( pVerInfo->_nVer > pImp->nVersion )
{ USHORT nOfs;
USHORT nCount = pVerInfo->_nEnd - pVerInfo->_nStart + 1;
@@ -1424,9 +1424,9 @@ USHORT SfxItemPool::GetNewWhich
else if ( nDiff < 0 )
{
// von der File-Version bis zur aktuellen Version stufenweise mappen
- for ( USHORT nMap = 0; nMap < pImp->aVersions.Count(); ++nMap )
+ for ( size_t nMap = 0; nMap < pImp->aVersions.size(); ++nMap )
{
- SfxPoolVersion_Impl *pVerInfo = pImp->aVersions[nMap];
+ SfxPoolVersion_ImplPtr pVerInfo = pImp->aVersions[nMap];
if ( pVerInfo->_nVer > pImp->nLoadingVersion )
{
DBG_ASSERT( nFileWhich >= pVerInfo->_nStart &&
@@ -1637,7 +1637,8 @@ const SfxPoolItem* SfxItemPool::LoadItem( SvStream &rStream, FASTBOOL bDirect,
else
{
// WID in der Version nicht vorhanden => ueberspringen
- USHORT nSurro, nVersion, nLen;
+ sal_uInt32 nSurro;
+ USHORT nVersion, nLen;
rStream >> nSurro;
if ( SFX_ITEMS_DIRECT == nSurro )
{
diff --git a/svl/source/items/whassert.hxx b/svl/source/items/whassert.hxx
index 9933294b4d86..237cf73f6c7f 100644
--- a/svl/source/items/whassert.hxx
+++ b/svl/source/items/whassert.hxx
@@ -42,7 +42,7 @@
ByteString aMsg( sMessage ); \
aMsg.Append(RTL_CONSTASCII_STRINGPARAM("\nwith Id/Pos: ")); \
aMsg += ByteString::CreateFromInt32( nId ); \
- DbgOut( aMsg.GetBuffer(), DBG_OUT_ERROR, __FILE__, __LINE__); \
+ DbgError( aMsg.GetBuffer(), __FILE__, __LINE__); \
} \
} \
}
diff --git a/svl/source/memtools/svarray.cxx b/svl/source/memtools/svarray.cxx
index b2184442ea0e..622533dceae2 100644
--- a/svl/source/memtools/svarray.cxx
+++ b/svl/source/memtools/svarray.cxx
@@ -61,7 +61,6 @@
#include <tools/debug.hxx>
SV_IMPL_VARARR(SvPtrarr,VoidPtr)
-SV_IMPL_VARARR_PLAIN(SvPtrarrPlain,VoidPtr)
USHORT SvPtrarr::GetPos( const VoidPtr& aElement ) const
{ USHORT n;
@@ -69,25 +68,12 @@ USHORT SvPtrarr::GetPos( const VoidPtr& aElement ) const
return ( n >= nA ? USHRT_MAX : n );
}
-USHORT SvPtrarrPlain::GetPos( const VoidPtr aElement ) const
-{ USHORT n;
- for( n=0; n < nA && *(GetData()+n) != aElement; ) n++;
- return ( n >= nA ? USHRT_MAX : n );
-}
-
-
-SV_IMPL_VARARR( SvBools, BOOL )
-SV_IMPL_VARARR( SvBytes, BYTE )
SV_IMPL_VARARR( SvULongs, ULONG )
SV_IMPL_VARARR( SvUShorts, USHORT )
SV_IMPL_VARARR( SvLongs, long)
-SV_IMPL_VARARR( SvShorts, short )
SV_IMPL_VARARR_SORT( SvULongsSort, ULONG )
SV_IMPL_VARARR_SORT( SvLongsSort, long )
-SV_IMPL_VARARR_SORT( SvXub_StrLensSort, xub_StrLen )
-
-SV_IMPL_VARARR( SvXub_StrLens, xub_StrLen )
SV_IMPL_PTRARR( SvStrings, StringPtr )
SV_IMPL_PTRARR( SvStringsDtor, StringPtr )
diff --git a/svtools/inc/svtools/parrtf.hxx b/svtools/inc/svtools/parrtf.hxx
index 179f5a28259a..b96e3937231d 100644
--- a/svtools/inc/svtools/parrtf.hxx
+++ b/svtools/inc/svtools/parrtf.hxx
@@ -30,7 +30,7 @@
#include "svtools/svtdllapi.h"
#include <svtools/svparser.hxx>
-#include <svl/svarray.hxx>
+#include <stack>
struct RtfParserState_Impl
{
@@ -42,7 +42,7 @@ struct RtfParserState_Impl
{}
};
-SV_DECL_VARARR( RtfParserStates_Impl, RtfParserState_Impl, 16, 16 )
+typedef std::stack< RtfParserState_Impl > RtfParserStates_Impl;
class SVT_DLLPUBLIC SvRTFParser : public SvParser
{
diff --git a/svtools/inc/svtools/syntaxhighlight.hxx b/svtools/inc/svtools/syntaxhighlight.hxx
index 8cf7126fa24c..e406c33fc54f 100644
--- a/svtools/inc/svtools/syntaxhighlight.hxx
+++ b/svtools/inc/svtools/syntaxhighlight.hxx
@@ -57,8 +57,6 @@
#include <tools/string.hxx>
#include <tools/gen.hxx>
-#include <svl/svarray.hxx>
-
// Token-Typen TT_...
enum TokenTypes
@@ -79,8 +77,7 @@ enum TokenTypes
struct HighlightPortion { UINT16 nBegin; UINT16 nEnd; TokenTypes tokenType; };
-
-SV_DECL_VARARR(HighlightPortions, HighlightPortion, 0, 16)
+typedef std::vector<HighlightPortion> HighlightPortions;
/////////////////////////////////////////////////////////////////////////
// Hilfsklasse zur Untersuchung von JavaScript-Modulen, zunaechst zum
diff --git a/svtools/source/edit/editsyntaxhighlighter.cxx b/svtools/source/edit/editsyntaxhighlighter.cxx
index 01bb7ad41682..af38c444c0f2 100644
--- a/svtools/source/edit/editsyntaxhighlighter.cxx
+++ b/svtools/source/edit/editsyntaxhighlighter.cxx
@@ -193,7 +193,7 @@ void MultiLineEditSyntaxHighlight::UpdateData()
GetTextEngine()->RemoveAttribs( nLine, TRUE );
HighlightPortions aPortions;
aHighlighter.getHighlightPortions( nLine, aLine, aPortions );
- for ( USHORT i = 0; i < aPortions.Count(); i++ )
+ for ( size_t i = 0; i < aPortions.size(); i++ )
{
HighlightPortion& r = aPortions[i];
GetTextEngine()->SetAttrib( TextAttribFontColor( GetColorValue(r.tokenType) ), nLine, r.nBegin, r.nEnd, TRUE );
diff --git a/svtools/source/edit/makefile.mk b/svtools/source/edit/makefile.mk
index 58a63be58f78..8d4da553cb0d 100644
--- a/svtools/source/edit/makefile.mk
+++ b/svtools/source/edit/makefile.mk
@@ -38,25 +38,23 @@ TARGET=edit
# --- Files --------------------------------------------------------
SLOFILES= \
+ $(EXCEPTIONSFILES) \
$(SLO)$/textdata.obj \
- $(SLO)$/textdoc.obj \
- $(SLO)$/texteng.obj \
$(SLO)$/textundo.obj \
- $(SLO)$/textview.obj \
$(SLO)$/txtattr.obj \
$(SLO)$/xtextedt.obj \
$(SLO)$/sychconv.obj \
$(SLO)$/svmedit.obj \
$(SLO)$/svmedit2.obj \
- $(SLO)$/textwindowpeer.obj \
- $(SLO)$/syntaxhighlight.obj \
$(SLO)$/editsyntaxhighlighter.obj
EXCEPTIONSFILES= \
$(SLO)$/textview.obj \
$(SLO)$/textdoc.obj \
$(SLO)$/texteng.obj \
- $(SLO)$/textwindowpeer.obj
+ $(SLO)$/textwindowpeer.obj \
+ $(SLO)$/syntaxhighlight.obj \
+
# --- Targets ------------------------------------------------------
diff --git a/svtools/source/edit/syntaxhighlight.cxx b/svtools/source/edit/syntaxhighlight.cxx
index 5729eb712bfe..87585f5b2587 100644
--- a/svtools/source/edit/syntaxhighlight.cxx
+++ b/svtools/source/edit/syntaxhighlight.cxx
@@ -34,9 +34,6 @@
#include <tools/debug.hxx>
-SV_IMPL_VARARR(HighlightPortions, HighlightPortion)
-
-
// ##########################################################################
// ATTENTION: all these words needs to be in small caps
// ##########################################################################
@@ -849,7 +846,7 @@ void SimpleTokenizer_Impl::getHighlightPortions( UINT32 nParseLine, const String
portion.nEnd = (UINT16)(pEndPos - mpStringBegin);
portion.tokenType = eType;
- portions.Insert(portion, portions.Count());
+ portions.push_back(portion);
}
}
diff --git a/svtools/source/edit/textdata.cxx b/svtools/source/edit/textdata.cxx
index 32bdfe40a3fb..cb33ea7d50e6 100644
--- a/svtools/source/edit/textdata.cxx
+++ b/svtools/source/edit/textdata.cxx
@@ -37,7 +37,7 @@ SV_IMPL_PTRARR( TextLines, TextLinePtr );
SV_IMPL_VARARR( TEWritingDirectionInfos, TEWritingDirectionInfo );
- // -------------------------------------------------------------------------
+// -------------------------------------------------------------------------
// (+) class TextSelection
// -------------------------------------------------------------------------
@@ -66,7 +66,7 @@ void TextSelection::Justify()
}
- // -------------------------------------------------------------------------
+// -------------------------------------------------------------------------
// (+) class TETextPortionList
// -------------------------------------------------------------------------
TETextPortionList::TETextPortionList()
@@ -129,7 +129,7 @@ USHORT TETextPortionList::GetPortionStartIndex( USHORT nPortion )
*/
- // -------------------------------------------------------------------------
+// -------------------------------------------------------------------------
// (+) class TEParaPortion
// -------------------------------------------------------------------------
TEParaPortion::TEParaPortion( TextNode* pN )
@@ -254,7 +254,7 @@ void TEParaPortion::CorrectValuesBehindLastFormattedLine( USHORT nLastFormattedL
}
}
- // -------------------------------------------------------------------------
+// -------------------------------------------------------------------------
// (+) class TEParaPortions
// -------------------------------------------------------------------------
TEParaPortions::TEParaPortions()
@@ -274,7 +274,7 @@ void TEParaPortions::Reset()
clear();
}
- // -------------------------------------------------------------------------
+// -------------------------------------------------------------------------
// (+) class IdleFormatter
// -------------------------------------------------------------------------
IdleFormatter::IdleFormatter()
diff --git a/svtools/source/svrtf/makefile.mk b/svtools/source/svrtf/makefile.mk
index 5ebb0e28c69e..cb76882f5f94 100644
--- a/svtools/source/svrtf/makefile.mk
+++ b/svtools/source/svrtf/makefile.mk
@@ -30,6 +30,8 @@ PRJ=..$/..
PRJNAME=svtools
TARGET=svrtf
+ENABLE_EXCEPTIONS=TRUE
+
# --- Settings -----------------------------------------------------
.INCLUDE : settings.mk
diff --git a/svtools/source/svrtf/parrtf.cxx b/svtools/source/svrtf/parrtf.cxx
index 1c578d160307..3a775a7fc345 100644
--- a/svtools/source/svrtf/parrtf.cxx
+++ b/svtools/source/svrtf/parrtf.cxx
@@ -44,8 +44,6 @@ const int MAX_TOKEN_LEN = 128;
#define RTF_ISDIGIT( c ) (c >= '0' && c <= '9')
#define RTF_ISALPHA( c ) ( (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') )
-SV_IMPL_VARARR( RtfParserStates_Impl, RtfParserState_Impl )
-
SvRTFParser::SvRTFParser( SvStream& rIn, BYTE nStackSize )
: SvParser( rIn, nStackSize ),
eUNICodeSet( RTL_TEXTENCODING_MS_1252 ), // default ist ANSI-CodeSet
@@ -175,14 +173,13 @@ int SvRTFParser::_GetNextToken()
nUCharOverread = (BYTE)nTokenValue;
#if 1
//cmc: other ifdef breaks #i3584
- aParserStates[ aParserStates.Count()-1].
+ aParserStates.top().
nUCharOverread = nUCharOverread;
#else
if( !nUCharOverread )
- nUCharOverread = aParserStates[
- aParserStates.Count()-1].nUCharOverread;
+ nUCharOverread = aParserStates.top().nUCharOverread;
else
- aParserStates[ aParserStates.Count()-1].
+ aParserStates.top().
nUCharOverread = nUCharOverread;
#endif
}
@@ -252,12 +249,12 @@ int SvRTFParser::_GetNextToken()
if( 0 <= nOpenBrakets )
{
RtfParserState_Impl aState( nUCharOverread, GetSrcEncoding() );
- aParserStates.Insert(
- aState, sal::static_int_cast< USHORT >(nOpenBrakets) );
+ aParserStates.push( aState );
}
++nOpenBrakets;
- DBG_ASSERT( nOpenBrakets == aParserStates.Count(),
- "ParserStateStack unequal to bracket count" );
+ DBG_ASSERT(
+ static_cast<size_t>(nOpenBrakets) == aParserStates.size(),
+ "ParserStateStack unequal to bracket count" );
nRet = nNextCh;
}
break;
@@ -266,12 +263,11 @@ int SvRTFParser::_GetNextToken()
--nOpenBrakets;
if( 0 <= nOpenBrakets )
{
- aParserStates.Remove(
- sal::static_int_cast< USHORT >(nOpenBrakets) );
- if( aParserStates.Count() )
+ aParserStates.pop();
+ if( !aParserStates.empty() )
{
const RtfParserState_Impl& rRPS =
- aParserStates[ aParserStates.Count() - 1 ];
+ aParserStates.top();
nUCharOverread = rRPS.nUCharOverread;
SetSrcEncoding( rRPS.eCodeSet );
}
@@ -281,8 +277,9 @@ int SvRTFParser::_GetNextToken()
SetSrcEncoding( GetCodeSet() );
}
}
- DBG_ASSERT( nOpenBrakets == aParserStates.Count(),
- "ParserStateStack unequal to bracket count" );
+ DBG_ASSERT(
+ static_cast<size_t>(nOpenBrakets) == aParserStates.size(),
+ "ParserStateStack unequal to bracket count" );
nRet = nNextCh;
break;
@@ -690,8 +687,8 @@ void SvRTFParser::SetEncoding( rtl_TextEncoding eEnc )
if (eEnc == RTL_TEXTENCODING_DONTKNOW)
eEnc = GetCodeSet();
- if (aParserStates.Count())
- aParserStates[aParserStates.Count() - 1].eCodeSet = eEnc;
+ if (!aParserStates.empty())
+ aParserStates.top().eCodeSet = eEnc;
SetSrcEncoding(eEnc);
}
diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx
index 27b01dacec7e..e8088e53282f 100644
--- a/svx/source/dialog/fntctrl.cxx
+++ b/svx/source/dialog/fntctrl.cxx
@@ -212,10 +212,10 @@ inline BOOL FontPrevWin_Impl::Is100PercentFontWidthValid() const
void FontPrevWin_Impl::_CheckScript()
{
aScriptText = aText;
- USHORT nCnt = aScriptChg.Count();
+ size_t nCnt = aScriptChg.size();
if( nCnt )
{
- aScriptChg.Remove( 0, nCnt );
+ aScriptChg.clear();
aScriptType.Remove( 0, nCnt );
aTextWidth.Remove( 0, nCnt );
nCnt = 0;
@@ -250,16 +250,16 @@ void FontPrevWin_Impl::_CheckScript()
if (nType == U_NON_SPACING_MARK || nType == U_ENCLOSING_MARK ||
nType == U_COMBINING_SPACING_MARK )
{
- aScriptChg.Insert( nChg - 1, nCnt );
+ aScriptChg.push_back( nChg - 1 );
}
else
{
- aScriptChg.Insert( nChg, nCnt );
+ aScriptChg.push_back( nChg );
}
}
else
{
- aScriptChg.Insert( nChg, nCnt );
+ aScriptChg.push_back( nChg );
}
aScriptType.Insert( nScript, nCnt );
aTextWidth.Insert( ULONG(0), nCnt++ );
@@ -289,7 +289,7 @@ Size FontPrevWin_Impl::CalcTextSize( OutputDevice* pWin, OutputDevice* _pPrinter
USHORT nIdx = 0;
xub_StrLen nStart = 0;
xub_StrLen nEnd;
- USHORT nCnt = aScriptChg.Count();
+ size_t nCnt = aScriptChg.size();
if( nCnt )
{
nEnd = aScriptChg[ nIdx ];
@@ -368,7 +368,7 @@ void FontPrevWin_Impl::DrawPrev( OutputDevice* pWin, Printer* _pPrinter,
USHORT nIdx = 0;
xub_StrLen nStart = 0;
xub_StrLen nEnd;
- USHORT nCnt = aScriptChg.Count();
+ size_t nCnt = aScriptChg.size();
if( nCnt )
{
nEnd = aScriptChg[ nIdx ];
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 52ad139543c5..c080f5b7a7fa 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -1050,7 +1050,7 @@ void FmXFormShell::InvalidateSlot( sal_Int16 nId, sal_Bool bWithId )
{
m_arrInvalidSlots.Insert(nId, m_arrInvalidSlots.Count());
BYTE nFlags = ( bWithId ? 0x01 : 0 );
- m_arrInvalidSlots_Flags.Insert(nFlags, m_arrInvalidSlots_Flags.Count());
+ m_arrInvalidSlots_Flags.push_back(nFlags);
}
else
if (nId)
@@ -1088,7 +1088,7 @@ IMPL_LINK(FmXFormShell, OnInvalidateSlots, void*, EMPTYARG)
::osl::MutexGuard aGuard(m_aInvalidationSafety);
m_nInvalidationEvent = 0;
- DBG_ASSERT(m_arrInvalidSlots.Count() == m_arrInvalidSlots_Flags.Count(),
+ DBG_ASSERT(m_arrInvalidSlots.Count() == m_arrInvalidSlots_Flags.size(),
"FmXFormShell::OnInvalidateSlots : inconsistent slot arrays !");
BYTE nFlags;
for (sal_Int16 i=0; i<m_arrInvalidSlots.Count(); ++i)
@@ -1102,7 +1102,7 @@ IMPL_LINK(FmXFormShell, OnInvalidateSlots, void*, EMPTYARG)
}
m_arrInvalidSlots.Remove(0, m_arrInvalidSlots.Count());
- m_arrInvalidSlots_Flags.Remove(0, m_arrInvalidSlots_Flags.Count());
+ m_arrInvalidSlots_Flags.clear();
return 0L;
}
diff --git a/svx/source/form/fmsrcimp.cxx b/svx/source/form/fmsrcimp.cxx
index a4bb5753e8bb..ee870f0c29b0 100644
--- a/svx/source/form/fmsrcimp.cxx
+++ b/svx/source/form/fmsrcimp.cxx
@@ -82,11 +82,6 @@ using namespace ::com::sun::star::i18n;
using namespace ::com::sun::star::beans;
using namespace ::svxform;
-// ***************************************************************************************************
-
-// ***************************************************************************************************
-
-SV_IMPL_OBJARR(SvInt32Array, sal_Int32);
//========================================================================
// = FmSearchThread
@@ -848,7 +843,7 @@ void FmSearchEngine::Init(const ::rtl::OUString& sVisibleFields)
// analyze the fields
// additionally, create the mapping: because the list of used columns can be shorter than the list
// of columns of the cursor, we need a mapping: "used column numer n" -> "cursor column m"
- m_arrFieldMapping.Remove(0, m_arrFieldMapping.Count());
+ m_arrFieldMapping.clear();
// important: The case of the columns does not need to be exact - for instance:
// - a user created a form which works on a table, for which the driver returns a column name "COLUMN"
@@ -911,8 +906,8 @@ void FmSearchEngine::Init(const ::rtl::OUString& sVisibleFields)
}
// set the field selection back to the first
pFieldNames = seqFieldNames.getArray();;
- DBG_ASSERT(nFoundIndex != -1, "FmSearchEngine::Init : Es wurden ungueltige Feldnamen angegeben !");
- m_arrFieldMapping.Insert(nFoundIndex, m_arrFieldMapping.Count());
+ DBG_ASSERT(nFoundIndex != -1, "FmSearchEngine::Init : Invalid field name were given !");
+ m_arrFieldMapping.push_back(nFoundIndex);
}
}
catch(Exception&)
@@ -1273,18 +1268,21 @@ void FmSearchEngine::RebuildUsedFields(sal_Int32 nFieldIndex, sal_Bool bForce)
return;
// (da ich keinen Wechsel des Iterators von aussen zulasse, heisst selber ::com::sun::star::sdbcx::Index auch immer selbe Spalte, also habe ich nix zu tun)
- DBG_ASSERT((nFieldIndex >= -1) && (nFieldIndex<m_arrFieldMapping.Count()), "FmSearchEngine::RebuildUsedFields : nFieldIndex ist ungueltig !");
+ DBG_ASSERT((nFieldIndex == -1) ||
+ ((nFieldIndex >= 0) &&
+ (static_cast<size_t>(nFieldIndex) < m_arrFieldMapping.size())),
+ "FmSearchEngine::RebuildUsedFields : nFieldIndex is invalid!");
// alle Felder, die ich durchsuchen muss, einsammeln
m_arrUsedFields.clear();
if (nFieldIndex == -1)
{
Reference< ::com::sun::star::container::XIndexAccess > xFields;
- for (sal_uInt16 i=0; i<m_arrFieldMapping.Count(); ++i)
+ for (size_t i=0; i<m_arrFieldMapping.size(); ++i)
{
Reference< ::com::sun::star::sdbcx::XColumnsSupplier > xSupplyCols(IFACECAST(m_xSearchCursor), UNO_QUERY);
DBG_ASSERT(xSupplyCols.is(), "FmSearchEngine::RebuildUsedFields : invalid cursor (no columns supplier) !");
xFields = Reference< ::com::sun::star::container::XIndexAccess > (xSupplyCols->getColumns(), UNO_QUERY);
- BuildAndInsertFieldInfo(xFields, m_arrFieldMapping.GetObject(i));
+ BuildAndInsertFieldInfo(xFields, m_arrFieldMapping[i]);
}
}
else
@@ -1293,7 +1291,7 @@ void FmSearchEngine::RebuildUsedFields(sal_Int32 nFieldIndex, sal_Bool bForce)
Reference< ::com::sun::star::sdbcx::XColumnsSupplier > xSupplyCols(IFACECAST(m_xSearchCursor), UNO_QUERY);
DBG_ASSERT(xSupplyCols.is(), "FmSearchEngine::RebuildUsedFields : invalid cursor (no columns supplier) !");
xFields = Reference< ::com::sun::star::container::XIndexAccess > (xSupplyCols->getColumns(), UNO_QUERY);
- BuildAndInsertFieldInfo(xFields, m_arrFieldMapping.GetObject((sal_uInt16)nFieldIndex));
+ BuildAndInsertFieldInfo(xFields, m_arrFieldMapping[static_cast< size_t >(nFieldIndex)]);
}
m_nCurrentFieldIndex = nFieldIndex;
diff --git a/svx/source/inc/fmsrcimp.hxx b/svx/source/inc/fmsrcimp.hxx
index e620c34bdd4a..3a3af0ac7d8f 100644
--- a/svx/source/inc/fmsrcimp.hxx
+++ b/svx/source/inc/fmsrcimp.hxx
@@ -46,15 +46,7 @@
#include <unotools/collatorwrapper.hxx>
#include <vos/thread.hxx>
-#ifndef _SVSTDARR_ULONGS
-#define _SVSTDARR_ULONGS
-#include <svl/svstdarr.hxx>
-#endif
-
-// ===================================================================================================
-// Hilfsstrukturen
-
-SV_DECL_OBJARR(SvInt32Array, sal_Int32, 16, 16)
+#include <deque>
// ===================================================================================================
// = class FmSearchThread - wie der Name schon sagt
@@ -189,8 +181,8 @@ class SVX_DLLPUBLIC FmSearchEngine
enum SEARCHFOR_TYPE { SEARCHFOR_STRING, SEARCHFOR_NULL, SEARCHFOR_NOTNULL };
// zugrundeliegende Daten
- CursorWrapper m_xSearchCursor;
- SvInt32Array m_arrFieldMapping;
+ CursorWrapper m_xSearchCursor;
+ std::deque<sal_Int32> m_arrFieldMapping;
// da der Iterator durchaus mehr Spalten haben kann, als ich eigentlich verwalte (in meiner Feld-Listbox),
// muss ich mir hier ein Mapping dieser ::com::sun::star::form-Schluessel auf die Indizies der entsprechenden Spalten im Iterator halten
diff --git a/svx/source/unodraw/UnoNameItemTable.cxx b/svx/source/unodraw/UnoNameItemTable.cxx
index a802af33fbbd..c7eb679e5e63 100644
--- a/svx/source/unodraw/UnoNameItemTable.cxx
+++ b/svx/source/unodraw/UnoNameItemTable.cxx
@@ -201,11 +201,11 @@ void SAL_CALL SvxUnoNameItemTable::replaceByName( const OUString& aApiName, cons
// if it is not in our own sets, modify the pool!
sal_Bool bFound = sal_False;
- USHORT nSurrogate;
- USHORT nCount = mpModelPool ? mpModelPool->GetItemCount( mnWhich ) : 0;
+ sal_uInt32 nSurrogate;
+ sal_uInt32 nCount = mpModelPool ? mpModelPool->GetItemCount2( mnWhich ) : 0;
for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
{
- pItem = (NameOrIndex*)mpModelPool->GetItem( mnWhich, nSurrogate);
+ pItem = (NameOrIndex*)mpModelPool->GetItem2( mnWhich, nSurrogate);
if( pItem && pItem->GetName() == aSearchName )
{
pItem->PutValue( aElement, mnMemberId );
@@ -238,12 +238,12 @@ uno::Any SAL_CALL SvxUnoNameItemTable::getByName( const OUString& aApiName )
{
const String aSearchName( aName );
NameOrIndex *pItem;
- sal_Int32 nSurrogate;
+ sal_uInt32 nSurrogate;
- sal_Int32 nSurrogateCount = mpModelPool ? (sal_Int32)mpModelPool->GetItemCount( mnWhich ) : 0;
+ sal_uInt32 nSurrogateCount = mpModelPool ? mpModelPool->GetItemCount2( mnWhich ) : 0;
for( nSurrogate = 0; nSurrogate < nSurrogateCount; nSurrogate++ )
{
- pItem = (NameOrIndex*)mpModelPool->GetItem( mnWhich, (USHORT)nSurrogate );
+ pItem = (NameOrIndex*)mpModelPool->GetItem2( mnWhich, nSurrogate );
if( isValid( pItem ) && (pItem->GetName() == aSearchName) )
{
@@ -266,11 +266,11 @@ uno::Sequence< OUString > SAL_CALL SvxUnoNameItemTable::getElementNames( )
NameOrIndex *pItem;
OUString aApiName;
- const sal_Int32 nSurrogateCount = mpModelPool ? (sal_Int32)mpModelPool->GetItemCount( mnWhich ) : 0;
- sal_Int32 nSurrogate;
+ const sal_uInt32 nSurrogateCount = mpModelPool ? mpModelPool->GetItemCount2( mnWhich ) : 0;
+ sal_uInt32 nSurrogate;
for( nSurrogate = 0; nSurrogate < nSurrogateCount; nSurrogate++ )
{
- pItem = (NameOrIndex*)mpModelPool->GetItem( mnWhich, (USHORT)nSurrogate );
+ pItem = (NameOrIndex*)mpModelPool->GetItem2( mnWhich, nSurrogate );
if( !isValid( pItem ) )
continue;
@@ -305,14 +305,14 @@ sal_Bool SAL_CALL SvxUnoNameItemTable::hasByName( const OUString& aApiName )
return sal_False;
const String aSearchName( aName );
- USHORT nSurrogate;
+ sal_uInt32 nSurrogate;
const NameOrIndex *pItem;
- USHORT nCount = mpModelPool ? mpModelPool->GetItemCount( mnWhich ) : 0;
+ sal_uInt32 nCount = mpModelPool ? mpModelPool->GetItemCount2( mnWhich ) : 0;
for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
{
- pItem = (NameOrIndex*)mpModelPool->GetItem( mnWhich, nSurrogate );
+ pItem = (NameOrIndex*)mpModelPool->GetItem2( mnWhich, nSurrogate );
if( isValid( pItem ) && (pItem->GetName() == aSearchName) )
return sal_True;
}
@@ -327,11 +327,11 @@ sal_Bool SAL_CALL SvxUnoNameItemTable::hasElements( )
const NameOrIndex *pItem;
- sal_Int32 nSurrogate;
- const sal_Int32 nSurrogateCount = mpModelPool ? (sal_Int32)mpModelPool->GetItemCount( mnWhich ) : 0;
+ sal_uInt32 nSurrogate;
+ const sal_uInt32 nSurrogateCount = mpModelPool ? mpModelPool->GetItemCount2( mnWhich ) : 0;
for( nSurrogate = 0; nSurrogate < nSurrogateCount; nSurrogate++ )
{
- pItem = (NameOrIndex*)mpModelPool->GetItem( mnWhich, (USHORT)nSurrogate );
+ pItem = (NameOrIndex*)mpModelPool->GetItem2( mnWhich, nSurrogate );
if( isValid( pItem ) )
return sal_True;
diff --git a/svx/source/unodraw/UnoNamespaceMap.cxx b/svx/source/unodraw/UnoNamespaceMap.cxx
index 5c7ad5226aff..faf38d64b520 100644
--- a/svx/source/unodraw/UnoNamespaceMap.cxx
+++ b/svx/source/unodraw/UnoNamespaceMap.cxx
@@ -118,8 +118,8 @@ namespace svx
sal_uInt16* mpWhichId;
- sal_uInt16 mnItemCount;
- sal_uInt16 mnItem;
+ sal_uInt32 mnItemCount;
+ sal_uInt32 mnItem;
const SvXMLAttrContainerItem* mpCurrentAttr;
sal_uInt16 mnCurrentAttr;
@@ -145,7 +145,7 @@ NamespaceIteratorImpl::NamespaceIteratorImpl( sal_uInt16* pWhichIds, SfxItemPool
mpWhichId = pWhichIds;
mnItem = 0;
- mnItemCount = (mpWhichId && (0 != *mpWhichId) && mpPool) ? mpPool->GetItemCount( *mpWhichId ) : 0;
+ mnItemCount = (mpWhichId && (0 != *mpWhichId) && mpPool) ? mpPool->GetItemCount2( *mpWhichId ) : 0;
}
sal_Bool NamespaceIteratorImpl::next( ::rtl::OUString& rPrefix, ::rtl::OUString& rURL )
@@ -165,7 +165,7 @@ sal_Bool NamespaceIteratorImpl::next( ::rtl::OUString& rPrefix, ::rtl::OUString&
const SfxPoolItem* pItem = 0;
// look for the next available item in the current pool
- while( (mnItem < mnItemCount) && ( NULL == (pItem = mpPool->GetItem( *mpWhichId, mnItem ) ) ) )
+ while( (mnItem < mnItemCount) && ( NULL == (pItem = mpPool->GetItem2( *mpWhichId, mnItem ) ) ) )
mnItem++;
// are we finished with the current whichid?
@@ -177,7 +177,7 @@ sal_Bool NamespaceIteratorImpl::next( ::rtl::OUString& rPrefix, ::rtl::OUString&
if( 0 != *mpWhichId )
{
mnItem = 0;
- mnItemCount = (mpWhichId && (0 != *mpWhichId) && mpPool) ? mpPool->GetItemCount( *mpWhichId ) : 0;
+ mnItemCount = (mpWhichId && (0 != *mpWhichId) && mpPool) ? mpPool->GetItemCount2( *mpWhichId ) : 0;
return next( rPrefix, rURL );
}
diff --git a/svx/source/unodraw/unomtabl.cxx b/svx/source/unodraw/unomtabl.cxx
index dbb7269c1318..60d19e8d13a9 100644
--- a/svx/source/unodraw/unomtabl.cxx
+++ b/svx/source/unodraw/unomtabl.cxx
@@ -276,11 +276,11 @@ void SAL_CALL SvxUnoMarkerTable::replaceByName( const OUString& aApiName, const
// if it is not in our own sets, modify the pool!
sal_Bool bFound = sal_False;
- USHORT nSurrogate;
- const USHORT nStartCount = mpModelPool ? mpModelPool->GetItemCount( XATTR_LINESTART ) : 0;
+ sal_uInt32 nSurrogate;
+ const sal_uInt32 nStartCount = mpModelPool ? mpModelPool->GetItemCount2( XATTR_LINESTART ) : 0;
for( nSurrogate = 0; nSurrogate < nStartCount; nSurrogate++ )
{
- pItem = (NameOrIndex*)mpModelPool->GetItem( XATTR_LINESTART, nSurrogate);
+ pItem = (NameOrIndex*)mpModelPool->GetItem2( XATTR_LINESTART, nSurrogate);
if( pItem && pItem->GetName() == aSearchName )
{
pItem->PutValue( aElement );
@@ -289,10 +289,10 @@ void SAL_CALL SvxUnoMarkerTable::replaceByName( const OUString& aApiName, const
}
}
- const USHORT nEndCount = mpModelPool ? mpModelPool->GetItemCount( XATTR_LINEEND ) : 0;
+ const sal_uInt32 nEndCount = mpModelPool ? mpModelPool->GetItemCount2( XATTR_LINEEND ) : 0;
for( nSurrogate = 0; nSurrogate < nEndCount; nSurrogate++ )
{
- pItem = (NameOrIndex*)mpModelPool->GetItem( XATTR_LINEEND, nSurrogate);
+ pItem = (NameOrIndex*)mpModelPool->GetItem2( XATTR_LINEEND, nSurrogate);
if( pItem && pItem->GetName() == aSearchName )
{
pItem->PutValue( aElement );
@@ -310,10 +310,10 @@ void SAL_CALL SvxUnoMarkerTable::replaceByName( const OUString& aApiName, const
static sal_Bool getByNameFromPool( const String& rSearchName, SfxItemPool* pPool, USHORT nWhich, uno::Any& rAny )
{
NameOrIndex *pItem;
- const sal_Int32 nSurrogateCount = pPool ? (sal_Int32)pPool->GetItemCount( nWhich ) : 0;
- for( sal_Int32 nSurrogate = 0; nSurrogate < nSurrogateCount; nSurrogate++ )
+ const sal_uInt32 nSurrogateCount = pPool ? pPool->GetItemCount2( nWhich ) : 0;
+ for( sal_uInt32 nSurrogate = 0; nSurrogate < nSurrogateCount; nSurrogate++ )
{
- pItem = (NameOrIndex*)pPool->GetItem( nWhich, (USHORT)nSurrogate );
+ pItem = (NameOrIndex*)pPool->GetItem2( nWhich, nSurrogate );
if( pItem && pItem->GetName() == rSearchName )
{
@@ -357,15 +357,15 @@ uno::Any SAL_CALL SvxUnoMarkerTable::getByName( const OUString& aApiName )
static void createNamesForPool( SfxItemPool* pPool, USHORT nWhich, std::set< OUString, comphelper::UStringLess >& rNameSet )
{
- const sal_Int32 nSuroCount = pPool->GetItemCount( nWhich );
- sal_Int32 nSurrogate;
+ const sal_uInt32 nSuroCount = pPool->GetItemCount2( nWhich );
+ sal_uInt32 nSurrogate;
- NameOrIndex *pItem;
+ NameOrIndex* pItem;
OUString aName;
for( nSurrogate = 0; nSurrogate < nSuroCount; nSurrogate++ )
{
- pItem = (NameOrIndex*)pPool->GetItem( nWhich, (USHORT)nSurrogate );
+ pItem = (NameOrIndex*)pPool->GetItem2( nWhich, nSurrogate );
if( pItem == NULL || pItem->GetName().Len() == 0 )
continue;
@@ -415,20 +415,20 @@ sal_Bool SAL_CALL SvxUnoMarkerTable::hasByName( const OUString& aName )
NameOrIndex *pItem;
SvxUnogetInternalNameForItem( XATTR_LINESTART, aName, aSearchName );
- USHORT nStartCount = mpModelPool ? mpModelPool->GetItemCount( XATTR_LINESTART ) : 0;
- USHORT nSurrogate;
+ sal_uInt32 nStartCount = mpModelPool ? mpModelPool->GetItemCount2( XATTR_LINESTART ) : 0;
+ sal_uInt32 nSurrogate;
for( nSurrogate = 0; nSurrogate < nStartCount; nSurrogate++ )
{
- pItem = (NameOrIndex*)mpModelPool->GetItem( XATTR_LINESTART, nSurrogate);
+ pItem = (NameOrIndex*)mpModelPool->GetItem2( XATTR_LINESTART, nSurrogate);
if( pItem && pItem->GetName() == aSearchName )
return sal_True;
}
SvxUnogetInternalNameForItem( XATTR_LINEEND, aName, aSearchName );
- USHORT nEndCount = mpModelPool ? mpModelPool->GetItemCount( XATTR_LINEEND ) : 0;
+ sal_uInt32 nEndCount = mpModelPool ? mpModelPool->GetItemCount2( XATTR_LINEEND ) : 0;
for( nSurrogate = 0; nSurrogate < nEndCount; nSurrogate++ )
{
- pItem = (NameOrIndex*)mpModelPool->GetItem( XATTR_LINEEND, nSurrogate);
+ pItem = (NameOrIndex*)mpModelPool->GetItem2( XATTR_LINEEND, nSurrogate);
if( pItem && pItem->GetName() == aSearchName )
return sal_True;
}
@@ -450,19 +450,19 @@ sal_Bool SAL_CALL SvxUnoMarkerTable::hasElements( )
NameOrIndex *pItem;
- const USHORT nStartCount = mpModelPool ? mpModelPool->GetItemCount( XATTR_LINESTART ) : 0;
- USHORT nSurrogate;
+ const sal_uInt32 nStartCount = mpModelPool ? mpModelPool->GetItemCount2( XATTR_LINESTART ) : 0;
+ sal_uInt32 nSurrogate;
for( nSurrogate = 0; nSurrogate < nStartCount; nSurrogate++ )
{
- pItem = (NameOrIndex*)mpModelPool->GetItem( XATTR_LINESTART, nSurrogate);
+ pItem = (NameOrIndex*)mpModelPool->GetItem2( XATTR_LINESTART, nSurrogate);
if( pItem && pItem->GetName().Len() != 0 )
return sal_True;
}
- const USHORT nEndCount = mpModelPool ? mpModelPool->GetItemCount( XATTR_LINEEND ) : 0;
+ const sal_uInt32 nEndCount = mpModelPool ? mpModelPool->GetItemCount2( XATTR_LINEEND ) : 0;
for( nSurrogate = 0; nSurrogate < nEndCount; nSurrogate++ )
{
- pItem = (NameOrIndex*)mpModelPool->GetItem( XATTR_LINEEND, nSurrogate);
+ pItem = (NameOrIndex*)mpModelPool->GetItem2( XATTR_LINEEND, nSurrogate);
if( pItem && pItem->GetName().Len() != 0 )
return sal_True;
}
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 9c5affc38f9b..afb8cbb8723a 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -1722,12 +1722,12 @@ sal_Bool SAL_CALL SvxShape::SetFillAttribute( sal_Int32 nWID, const OUString& rN
const SfxItemPool* pPool = rSet.GetPool();
const String aSearchName( aName );
- const USHORT nCount = pPool->GetItemCount((USHORT)nWID);
- const NameOrIndex *pItem;
+ const sal_uInt32 nCount = pPool->GetItemCount2((USHORT)nWID);
+ const NameOrIndex* pItem;
- for( USHORT nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+ for( sal_uInt32 nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
{
- pItem = (NameOrIndex*)pPool->GetItem((USHORT)nWID, nSurrogate);
+ pItem = (NameOrIndex*)pPool->GetItem2((USHORT)nWID, nSurrogate);
if( pItem && ( pItem->GetName() == aSearchName ) )
{
rSet.Put( *pItem );
@@ -1756,11 +1756,11 @@ sal_Bool SAL_CALL SvxShape::SetFillAttribute( sal_Int32 nWID, const OUString& rN
const SfxItemPool& rPool = pModel->GetItemPool();
const String aSearchName( rName );
- const USHORT nCount = rPool.GetItemCount((USHORT)nWhich);
- const NameOrIndex *pItem = 0;
+ const sal_uInt32 nCount = rPool.GetItemCount((USHORT)nWhich);
+ const NameOrIndex* pItem = 0;
bool bFound = false;
- for( USHORT nSurrogate = 0; ! bFound && nSurrogate < nCount; nSurrogate++ )
+ for( sal_uInt32 nSurrogate = 0; ! bFound && nSurrogate < nCount; nSurrogate++ )
{
pItem = (NameOrIndex*)rPool.GetItem((USHORT)nWhich, nSurrogate);
if( pItem && ( pItem->GetName() == aSearchName ) )
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index a301e47e5c25..627c3ed6fb45 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -250,12 +250,12 @@ String NameOrIndex::CheckNamedItem( const NameOrIndex* pCheckItem, const sal_uIn
if( aUniqueName.Len() && pPool1 )
{
- const sal_uInt16 nCount = pPool1->GetItemCount( nWhich );
+ const sal_uInt32 nCount = pPool1->GetItemCount2( nWhich );
const NameOrIndex *pItem;
- for( sal_uInt16 nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+ for( sal_uInt32 nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
{
- pItem = (NameOrIndex*)pPool1->GetItem( nWhich, nSurrogate );
+ pItem = (NameOrIndex*)pPool1->GetItem2( nWhich, nSurrogate );
if( pItem && ( pItem->GetName() == pCheckItem->GetName() ) )
{
@@ -332,11 +332,11 @@ String NameOrIndex::CheckNamedItem( const NameOrIndex* pCheckItem, const sal_uIn
if( (aUniqueName.Len() == 0) && pPool1 )
{
- const sal_uInt16 nCount = pPool1->GetItemCount( nWhich );
+ const sal_uInt32 nCount = pPool1->GetItemCount2( nWhich );
const NameOrIndex *pItem;
- for( sal_uInt16 nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
+ for( sal_uInt32 nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
{
- pItem = (NameOrIndex*)pPool1->GetItem( nWhich, nSurrogate );
+ pItem = (NameOrIndex*)pPool1->GetItem2( nWhich, nSurrogate );
if( pItem && pItem->GetName().Len() )
{
@@ -2003,16 +2003,16 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
// 2. if we have a name check if there is already an item with the
// same name in the documents pool with a different line end or start
- sal_uInt16 nCount, nSurrogate;
+ sal_uInt32 nCount, nSurrogate;
const SfxItemPool* pPool1 = &pModel->GetItemPool();
if( aUniqueName.Len() && pPool1 )
{
- nCount = pPool1->GetItemCount( XATTR_LINESTART );
+ nCount = pPool1->GetItemCount2( XATTR_LINESTART );
for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
{
- const XLineStartItem* pItem = (const XLineStartItem*)pPool1->GetItem( XATTR_LINESTART, nSurrogate );
+ const XLineStartItem* pItem = (const XLineStartItem*)pPool1->GetItem2( XATTR_LINESTART, nSurrogate );
if( pItem && ( pItem->GetName() == pLineStartItem->GetName() ) )
{
@@ -2030,11 +2030,11 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
if( !bForceNew )
{
- nCount = pPool1->GetItemCount( XATTR_LINEEND );
+ nCount = pPool1->GetItemCount2( XATTR_LINEEND );
for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
{
- const XLineEndItem* pItem = (const XLineEndItem*)pPool1->GetItem( XATTR_LINEEND, nSurrogate );
+ const XLineEndItem* pItem = (const XLineEndItem*)pPool1->GetItem2( XATTR_LINEEND, nSurrogate );
if( pItem && ( pItem->GetName() == pLineStartItem->GetName() ) )
{
@@ -2055,10 +2055,10 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
const SfxItemPool* pPool2 = pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : NULL;
if( aUniqueName.Len() && pPool2)
{
- nCount = pPool2->GetItemCount( XATTR_LINESTART );
+ nCount = pPool2->GetItemCount2( XATTR_LINESTART );
for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
{
- const XLineStartItem* pItem = (const XLineStartItem*)pPool2->GetItem( XATTR_LINESTART, nSurrogate );
+ const XLineStartItem* pItem = (const XLineStartItem*)pPool2->GetItem2( XATTR_LINESTART, nSurrogate );
if( pItem && ( pItem->GetName() == pLineStartItem->GetName() ) )
{
@@ -2076,10 +2076,10 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
if( !bForceNew )
{
- nCount = pPool2->GetItemCount( XATTR_LINEEND );
+ nCount = pPool2->GetItemCount2( XATTR_LINEEND );
for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
{
- const XLineEndItem* pItem = (const XLineEndItem*)pPool2->GetItem( XATTR_LINEEND, nSurrogate );
+ const XLineEndItem* pItem = (const XLineEndItem*)pPool2->GetItem2( XATTR_LINEEND, nSurrogate );
if( pItem && ( pItem->GetName() == pLineStartItem->GetName() ) )
{
@@ -2109,12 +2109,12 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
if( pPool1 )
{
- nCount = pPool1->GetItemCount( XATTR_LINESTART );
- sal_uInt16 nSurrogate2;
+ nCount = pPool1->GetItemCount2( XATTR_LINESTART );
+ sal_uInt32 nSurrogate2;
for( nSurrogate2 = 0; nSurrogate2 < nCount; nSurrogate2++ )
{
- const XLineStartItem* pItem = (const XLineStartItem*)pPool1->GetItem( XATTR_LINESTART, nSurrogate2 );
+ const XLineStartItem* pItem = (const XLineStartItem*)pPool1->GetItem2( XATTR_LINESTART, nSurrogate2 );
if( pItem && pItem->GetName().Len() )
{
@@ -2134,10 +2134,10 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
}
}
- nCount = pPool1->GetItemCount( XATTR_LINEEND );
+ nCount = pPool1->GetItemCount2( XATTR_LINEEND );
for( nSurrogate2 = 0; nSurrogate2 < nCount; nSurrogate2++ )
{
- const XLineEndItem* pItem = (const XLineEndItem*)pPool1->GetItem( XATTR_LINEEND, nSurrogate2 );
+ const XLineEndItem* pItem = (const XLineEndItem*)pPool1->GetItem2( XATTR_LINEEND, nSurrogate2 );
if( pItem && pItem->GetName().Len() )
{
@@ -2406,11 +2406,11 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
const SfxItemPool* pPool1 = &pModel->GetItemPool();
if( aUniqueName.Len() && pPool1 )
{
- nCount = pPool1->GetItemCount( XATTR_LINESTART );
+ nCount = pPool1->GetItemCount2( XATTR_LINESTART );
for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
{
- const XLineStartItem* pItem = (const XLineStartItem*)pPool1->GetItem( XATTR_LINESTART, nSurrogate );
+ const XLineStartItem* pItem = (const XLineStartItem*)pPool1->GetItem2( XATTR_LINESTART, nSurrogate );
if( pItem && ( pItem->GetName() == pLineEndItem->GetName() ) )
{
@@ -2428,11 +2428,11 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
if( !bForceNew )
{
- nCount = pPool1->GetItemCount( XATTR_LINEEND );
+ nCount = pPool1->GetItemCount2( XATTR_LINEEND );
for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
{
- const XLineEndItem* pItem = (const XLineEndItem*)pPool1->GetItem( XATTR_LINEEND, nSurrogate );
+ const XLineEndItem* pItem = (const XLineEndItem*)pPool1->GetItem2( XATTR_LINEEND, nSurrogate );
if( pItem && ( pItem->GetName() == pLineEndItem->GetName() ) )
{
@@ -2453,10 +2453,10 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
const SfxItemPool* pPool2 = pModel->GetStyleSheetPool() ? &pModel->GetStyleSheetPool()->GetPool() : NULL;
if( aUniqueName.Len() && pPool2)
{
- nCount = pPool2->GetItemCount( XATTR_LINESTART );
+ nCount = pPool2->GetItemCount2( XATTR_LINESTART );
for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
{
- const XLineStartItem* pItem = (const XLineStartItem*)pPool2->GetItem( XATTR_LINESTART, nSurrogate );
+ const XLineStartItem* pItem = (const XLineStartItem*)pPool2->GetItem2( XATTR_LINESTART, nSurrogate );
if( pItem && ( pItem->GetName() == pLineEndItem->GetName() ) )
{
@@ -2474,10 +2474,10 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
if( !bForceNew )
{
- nCount = pPool2->GetItemCount( XATTR_LINEEND );
+ nCount = pPool2->GetItemCount2( XATTR_LINEEND );
for( nSurrogate = 0; nSurrogate < nCount; nSurrogate++ )
{
- const XLineEndItem* pItem = (const XLineEndItem*)pPool2->GetItem( XATTR_LINEEND, nSurrogate );
+ const XLineEndItem* pItem = (const XLineEndItem*)pPool2->GetItem2( XATTR_LINEEND, nSurrogate );
if( pItem && ( pItem->GetName() == pLineEndItem->GetName() ) )
{
@@ -2507,12 +2507,12 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
if( pPool1 )
{
- nCount = pPool1->GetItemCount( XATTR_LINESTART );
- sal_uInt16 nSurrogate2;
+ nCount = pPool1->GetItemCount2( XATTR_LINESTART );
+ sal_uInt32 nSurrogate2;
for( nSurrogate2 = 0; nSurrogate2 < nCount; nSurrogate2++ )
{
- const XLineStartItem* pItem = (const XLineStartItem*)pPool1->GetItem( XATTR_LINESTART, nSurrogate2 );
+ const XLineStartItem* pItem = (const XLineStartItem*)pPool1->GetItem2( XATTR_LINESTART, nSurrogate2 );
if( pItem && pItem->GetName().Len() )
{
@@ -2532,10 +2532,10 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
}
}
- nCount = pPool1->GetItemCount( XATTR_LINEEND );
+ nCount = pPool1->GetItemCount2( XATTR_LINEEND );
for( nSurrogate2 = 0; nSurrogate2 < nCount; nSurrogate2++ )
{
- const XLineEndItem* pItem = (const XLineEndItem*)pPool1->GetItem( XATTR_LINEEND, nSurrogate2 );
+ const XLineEndItem* pItem = (const XLineEndItem*)pPool1->GetItem2( XATTR_LINEEND, nSurrogate2 );
if( pItem && pItem->GetName().Len() )
{
diff --git a/sw/inc/authfld.hxx b/sw/inc/authfld.hxx
index 7d3ff5514b72..71f8a201243f 100644
--- a/sw/inc/authfld.hxx
+++ b/sw/inc/authfld.hxx
@@ -24,8 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _AUTHFLD_HXX
-#define _AUTHFLD_HXX
+#ifndef SW_AUTHFLD_HXX
+#define SW_AUTHFLD_HXX
#include "swdllapi.h"
#include <fldbas.hxx>
@@ -166,6 +166,10 @@ class SwAuthorityField : public SwField
{
long m_nHandle;
mutable long m_nTempSequencePos;
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
public:
SwAuthorityField(SwAuthorityFieldType* pType, const String& rFieldContents);
SwAuthorityField(SwAuthorityFieldType* pType, long nHandle);
@@ -173,8 +177,6 @@ public:
const String& GetFieldText(ToxAuthorityField eField) const;
- virtual String Expand() const;
- virtual SwField* Copy() const;
virtual void SetPar1(const String& rStr);
virtual SwFieldType* ChgTyp( SwFieldType* );
diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx
index f5cbcc6c8c38..4db19fc9a29d 100644
--- a/sw/inc/calc.hxx
+++ b/sw/inc/calc.hxx
@@ -28,6 +28,7 @@
#define _CALC_HXX
#include <svl/svarray.hxx>
+#include <unotools/syslocale.hxx>
#ifndef __SBX_SBXVALUE //autogen
#include <basic/sbxvar.hxx>
@@ -185,6 +186,7 @@ class SwCalc
xub_StrLen nCommandPos;
SwDoc& rDoc;
+ SvtSysLocale m_aSysLocale;
const LocaleDataWrapper* pLclData;
CharClass* pCharClass;
@@ -228,11 +230,11 @@ public:
void SetCalcError( SwCalcError eErr ) { eError = eErr; }
BOOL IsCalcError() const { return 0 != eError; }
- static BOOL Str2Double( const String& rStr, xub_StrLen& rPos,
+ static bool Str2Double( const String& rStr, xub_StrLen& rPos,
double& rVal,
- const LocaleDataWrapper* pData = 0 );
- static BOOL Str2Double( const String& rStr, xub_StrLen& rPos,
- double& rVal, SwDoc* pDoc );
+ LocaleDataWrapper const*const pData = 0 );
+ static bool Str2Double( const String& rStr, xub_StrLen& rPos,
+ double& rVal, SwDoc *const pDoc );
SW_DLLPUBLIC static BOOL IsValidVarName( const String& rStr,
String* pValidName = 0 );
diff --git a/sw/inc/chpfld.hxx b/sw/inc/chpfld.hxx
index 40f2f9ecf1d3..5d63c866c68d 100644
--- a/sw/inc/chpfld.hxx
+++ b/sw/inc/chpfld.hxx
@@ -24,8 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _CHPFLD_HXX
-#define _CHPFLD_HXX
+#ifndef SW_CHPFLD_HXX
+#define SW_CHPFLD_HXX
#include "fldbas.hxx"
@@ -69,6 +69,10 @@ class SW_DLLPUBLIC SwChapterField : public SwField
friend class SwChapterFieldType;
BYTE nLevel;
String sTitle, sNumber, sPre, sPost;
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
public:
SwChapterField(SwChapterFieldType*, sal_uInt32 nFmt = 0);
@@ -82,9 +86,6 @@ public:
// <--
void ChangeExpansion(const SwTxtNode &rNd, BOOL bSrchNum);
- virtual String Expand() const;
- virtual SwField* Copy() const;
-
inline BYTE GetLevel() const;
inline void SetLevel(BYTE);
@@ -99,4 +100,4 @@ inline void SwChapterField::SetLevel(BYTE nLev) { nLevel = nLev; }
inline const String& SwChapterField::GetNumber() const { return sNumber; }
inline const String& SwChapterField::GetTitle() const { return sTitle; }
-#endif // _CHPFLD_HXX
+#endif // SW_CHPFLD_HXX
diff --git a/sw/inc/dbfld.hxx b/sw/inc/dbfld.hxx
index 4114c0cfe0d3..c13c766e1147 100644
--- a/sw/inc/dbfld.hxx
+++ b/sw/inc/dbfld.hxx
@@ -24,8 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _DBFLD_HXX
-#define _DBFLD_HXX
+#ifndef SW_DBFLD_HXX
+#define SW_DBFLD_HXX
#include "swdllapi.h"
#include "fldbas.hxx"
@@ -79,6 +79,9 @@ class SW_DLLPUBLIC SwDBField : public SwValueField
BOOL bValidValue : 1;
BOOL bInitialized : 1;
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
public:
SwDBField(SwDBFieldType*, ULONG nFmt = 0);
virtual ~SwDBField();
@@ -87,14 +90,11 @@ public:
// Der aktuelle Text
inline void SetExpansion(const String& rStr);
- virtual String Expand() const;
- virtual SwField* Copy() const;
virtual USHORT GetSubType() const;
virtual void SetSubType(USHORT nType);
- // Name oder Inhalt
- virtual String GetCntnt(BOOL bName = FALSE) const;
+ virtual String GetFieldName() const;
// fuer Berechnungen in Ausdruecken
void ChgValue( double d, BOOL bVal );
@@ -157,8 +157,8 @@ public:
SwDBData GetDBData(SwDoc* pDoc);
void SetDBData(const SwDBData& rDBData); // #111840#
- // Name oder Inhalt
- virtual String GetCntnt(BOOL bName = FALSE) const;
+ virtual String GetFieldName() const;
+
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
virtual USHORT GetSubType() const;
@@ -335,4 +335,4 @@ inline void SwDBSetNumberField::SetSetNumber(long nNum)
{ nNumber = nNum; }
-#endif // _DBFLD_HXX
+#endif // SW_DBFLD_HXX
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index d044f5e80fa6..fd2f694f5e3f 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -73,7 +73,6 @@ struct SwDBFormatData
class SwView;
class SwWrtShell;
-class SwPrtOptions;
class SfxProgress;
class ListBox;
class Button;
diff --git a/sw/inc/ddefld.hxx b/sw/inc/ddefld.hxx
index d9a011461eba..87b8a9f53dea 100644
--- a/sw/inc/ddefld.hxx
+++ b/sw/inc/ddefld.hxx
@@ -24,8 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _DDEFLD_HXX
-#define _DDEFLD_HXX
+#ifndef SW_DDEFLD_HXX
+#define SW_DDEFLD_HXX
#include <sfx2/lnkbase.hxx>
#include "swdllapi.h"
@@ -97,13 +97,14 @@ public:
class SwDDEField : public SwField
{
+private:
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
public:
SwDDEField(SwDDEFieldType*);
~SwDDEField();
- virtual String Expand() const;
- virtual SwField* Copy() const;
-
// ueber Typen Parameter ermitteln
// Name kann nicht geaendert werden
virtual const String& GetPar1() const;
@@ -114,4 +115,4 @@ public:
};
-#endif // _DDEFLD_HXX
+#endif // SW_DDEFLD_HXX
diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx
index 8483cf7b2d39..3607ad0cd970 100644
--- a/sw/inc/docufld.hxx
+++ b/sw/inc/docufld.hxx
@@ -24,8 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _DOCUFLD_HXX
-#define _DOCUFLD_HXX
+#ifndef SW_DOCUFLD_HXX
+#define SW_DOCUFLD_HXX
#include <tools/date.hxx>
@@ -363,6 +363,9 @@ class SwHiddenTxtField : public SwField
BOOL bIsHidden : 1; // ist es nicht sichtbar?
BOOL bValid : 1; // DB-Feld evaluiert?
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
public:
SwHiddenTxtField( SwHiddenTxtFieldType*,
BOOL bConditional,
@@ -377,9 +380,7 @@ public:
const String& rFalse,
USHORT nSubType = TYP_HIDDENTXTFLD);
- virtual String GetCntnt(BOOL bName = FALSE) const;
- virtual String Expand() const;
- virtual SwField* Copy() const;
+ virtual String GetFieldName() const;
void Evaluate(SwDoc*);
@@ -463,6 +464,9 @@ class SW_DLLPUBLIC SwMacroField : public SwField
String aText;
BOOL bIsScriptURL;
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
public:
// Direkte Eingabe alten Wert loeschen
SwMacroField( SwMacroFieldType*, const String& rLibAndName,
@@ -473,9 +477,7 @@ public:
String GetMacroName() const;
SvxMacro GetSvxMacro() const;
- virtual String GetCntnt(BOOL bName = FALSE) const;
- virtual String Expand() const;
- virtual SwField* Copy() const;
+ virtual String GetFieldName() const;
// Library und FileName
virtual const String& GetPar1() const;
@@ -571,6 +573,9 @@ class SW_DLLPUBLIC SwDocInfoField : public SwValueField
String aContent;
String aName;
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
public:
SwDocInfoField(SwDocInfoFieldType*, USHORT nSub, const String& rName, sal_uInt32 nFmt=0);
SwDocInfoField(SwDocInfoFieldType*, USHORT nSub, const String& rName, const String& rValue, sal_uInt32 nFmt=0);
@@ -578,9 +583,7 @@ public:
virtual void SetSubType(USHORT);
virtual USHORT GetSubType() const;
virtual void SetLanguage(USHORT nLng);
- virtual String Expand() const;
- virtual String GetCntnt(BOOL bName = FALSE) const;
- virtual SwField* Copy() const;
+ virtual String GetFieldName() const;
String GetName() const { return aName; }
void SetName( const String& rName ) { aName = rName; }
inline void SetExpansion(const String& rStr) { aContent = rStr; }
@@ -833,4 +836,4 @@ public:
};
-#endif // _DOCUFLD_HXX
+#endif // SW_DOCUFLD_HXX
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index 9dc09103606e..85201ff9b5b9 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -201,7 +201,6 @@ public:
// change text to Upper/Lower/Hiragana/Katagana/...
void TransliterateText( sal_uInt32 nType );
- void TransliterateText( const String& rModuleName );
// count words in current selection
void CountWords( SwDocStat& rStat ) const;
@@ -416,9 +415,6 @@ public:
const SwTOXType* GetTOXType(TOXTypes eTyp, USHORT nId) const;
void InsertTOXType(const SwTOXType& rTyp);
- // new field stuff
- BOOL UpdateField(sw::mark::IFieldmark &fieldBM);
-
//AutoMark file
const String& GetTOIAutoMarkURL() const;
void SetTOIAutoMarkURL(const String& rSet);
diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx
index 00598528e891..32fdbe202462 100644
--- a/sw/inc/expfld.hxx
+++ b/sw/inc/expfld.hxx
@@ -24,8 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _EXPFLD_HXX
-#define _EXPFLD_HXX
+#ifndef SW_EXPFLD_HXX
+#define SW_EXPFLD_HXX
#include <svl/svarray.hxx>
#include "swdllapi.h"
@@ -98,6 +98,9 @@ class SW_DLLPUBLIC SwGetExpField : public SwFormulaField
bool bLateInitialization; // #i82544#
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
public:
SwGetExpField( SwGetExpFieldType*, const String& rFormel,
USHORT nSubType = nsSwGetSetExpType::GSE_EXPR, ULONG nFmt = 0);
@@ -105,9 +108,6 @@ public:
virtual void SetValue( const double& rVal );
virtual void SetLanguage(USHORT nLng);
- virtual String Expand() const;
- virtual SwField* Copy() const;
-
inline const String& GetExpStr() const;
inline void ChgExpStr(const String& rExpand);
@@ -119,7 +119,7 @@ public:
// (wird nur von der Formatierung aufgerufen!!)
void ChangeExpansion( const SwFrm&, const SwTxtFld& );
- virtual String GetCntnt(BOOL bName = FALSE) const;
+ virtual String GetFieldName() const;
// Die Formel aendern
virtual String GetPar2() const;
@@ -234,14 +234,14 @@ class SW_DLLPUBLIC SwSetExpField : public SwFormulaField
USHORT nSeqNo;
USHORT nSubType;
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
public:
SwSetExpField(SwSetExpFieldType*, const String& rFormel, ULONG nFmt = 0);
virtual void SetValue( const double& rVal );
- virtual String Expand() const;
- virtual SwField* Copy() const;
-
inline const String& GetExpStr() const;
inline void ChgExpStr( const String& rExpand );
@@ -252,7 +252,8 @@ public:
inline void SetInputFlag(BOOL bInp);
inline BOOL GetInputFlag() const;
- virtual String GetCntnt(BOOL bName = FALSE) const;
+ virtual String GetFieldName() const;
+
virtual USHORT GetSubType() const;
virtual void SetSubType(USHORT nType);
@@ -319,15 +320,17 @@ class SW_DLLPUBLIC SwInputField : public SwField
String aHelp;
String aToolTip;
USHORT nSubType;
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
public:
// Direkte Eingabe ueber Dialog alten Wert loeschen
SwInputField(SwInputFieldType*, const String& rContent ,
const String& rPrompt, USHORT nSubType = 0,
ULONG nFmt = 0);
- virtual String GetCntnt(BOOL bName = FALSE) const;
- virtual String Expand() const;
- virtual SwField* Copy() const;
+ virtual String GetFieldName() const;
// Content
virtual const String& GetPar1() const;
@@ -405,9 +408,14 @@ class SwTblField : public SwValueField, public SwTableFormula
String sExpand;
USHORT nSubType;
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
// suche den TextNode, in dem das Feld steht
virtual const SwNode* GetNodeOfFormula() const;
+ String GetCommand();
+
public:
SwTblField( SwTblFieldType*, const String& rFormel,
USHORT nSubType = 0, ULONG nFmt = 0);
@@ -415,8 +423,6 @@ public:
virtual void SetValue( const double& rVal );
virtual USHORT GetSubType() const;
virtual void SetSubType(USHORT nType);
- virtual String Expand() const;
- virtual SwField* Copy() const;
const String& GetExpStr() const { return sExpand; }
void ChgExpStr(const String& rStr) { sExpand = rStr; }
@@ -424,7 +430,8 @@ public:
// berechne sich selbst
void CalcField( SwTblCalcPara& rCalcPara );
- virtual String GetCntnt(BOOL bName = FALSE) const;
+ virtual String GetFieldName() const;
+
// Die Formel
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
@@ -433,4 +440,4 @@ public:
};
-#endif // _EXPFLD_HXX
+#endif // SW_EXPFLD_HXX
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx
index a2e08366ba24..fd570f623eaf 100644
--- a/sw/inc/fldbas.hxx
+++ b/sw/inc/fldbas.hxx
@@ -24,10 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _FLDBAS_HXX
-#define _FLDBAS_HXX
-
-#ifndef FIELDIDS_ONLY // SWG-Testreader!!
+#ifndef SW_FLDBAS_HXX
+#define SW_FLDBAS_HXX
#include <i18npool/lang.h>
#include <tools/debug.hxx>
@@ -40,7 +38,6 @@ class SwDoc;
class SvStringsDtor;
class SvNumberFormatter;
-#endif // FIELDIDS_ONLY
/*--------------------------------------------------------------------
Beschreibung: die ID's fuer die Feldtypen
@@ -236,8 +233,6 @@ enum SwDateTimeSubType
TIMEFLD = 4
};
-#ifndef FIELDIDS_ONLY // SWG-Testreader!!
-
extern USHORT __FAR_DATA aTypeTab[];
@@ -331,13 +326,16 @@ public:
virtual SwFieldType* ChgTyp( SwFieldType* );
/** expand the field.
- @param bInClipboard field is in clipboard document?
+ @param bCached return cached field value.
+ @remark most callers should use the cached field value.
+ this is because various fields need special handing
+ (ChangeExpansion()) to return correct values, and only
+ SwTxtFormatter::NewFldPortion() sets things up properly.
@return the generated text (suitable for display)
*/
- String ExpandField(bool const bInClipboard) const;
+ String ExpandField(bool const bCached) const;
- // liefert den Namen oder den Inhalt
- virtual String GetCntnt(BOOL bName = FALSE) const;
+ virtual String GetFieldName() const;
SwField * CopyField() const;
@@ -461,5 +459,4 @@ public:
String GetExpandedFormula() const;
};
-#endif // FIELDIDS_ONLY
-#endif // _FLDBAS_HXX
+#endif // SW_FLDBAS_HXX
diff --git a/sw/inc/flddat.hxx b/sw/inc/flddat.hxx
index d302f45a96bc..1196f0f1264d 100644
--- a/sw/inc/flddat.hxx
+++ b/sw/inc/flddat.hxx
@@ -25,8 +25,8 @@
*
************************************************************************/
-#ifndef _FLDDAT_HXX
-#define _FLDDAT_HXX
+#ifndef SW_FLDDAT_HXX
+#define SW_FLDDAT_HXX
#include <tools/string.hxx>
@@ -115,6 +115,9 @@ class SW_DLLPUBLIC SwDateTimeField : public SwValueField
USHORT nSubType;
long nOffset; // Offset in Minuten
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
public:
SwDateTimeField(SwDateTimeFieldType* pType, USHORT nSubType = DATEFLD,
ULONG nFmt = 0, USHORT nLng = 0);
@@ -138,11 +141,8 @@ public:
void SetDateTime(const DateTime& rDT);
static double GetDateTime(SwDoc* pDoc, const DateTime& rDT);
- virtual String Expand() const;
- virtual SwField* Copy() const;
-
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nMId ) const;
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nMId );
};
-#endif // _FLDDAT_HXX
+#endif // SW_FLDDAT_HXX
diff --git a/sw/inc/flddropdown.hxx b/sw/inc/flddropdown.hxx
index 77963bf1510a..e3e40a82b940 100644
--- a/sw/inc/flddropdown.hxx
+++ b/sw/inc/flddropdown.hxx
@@ -24,19 +24,14 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _FLDDROPDOWN_HXX
-#define _FLDDROPDOWN_HXX
+#ifndef SW_FLDDROPDOWN_HXX
+#define SW_FLDDROPDOWN_HXX
-#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX
#include "com/sun/star/uno/Sequence.hxx"
-#endif
#include "swdllapi.h"
#include "fldbas.hxx"
-#ifndef INCLUDED_VECTOR
#include <vector>
-#define INCLUDED_VECTOR
-#endif
/**
Field type for dropdown boxes.
@@ -95,6 +90,23 @@ class SW_DLLPUBLIC SwDropDownField : public SwField
*/
String aToolTip;
+ /**
+ Expands the field.
+
+ The expanded value of the field is the value of the selected
+ item. If no item is selected, an empty string is returned.
+
+ @return the expanded value of the field
+ */
+ virtual String Expand() const;
+
+ /**
+ Creates a copy of this field.
+
+ @return the copy of this field
+ */
+ virtual SwField * Copy() const;
+
public:
/**
Constructor
@@ -116,23 +128,6 @@ public:
virtual ~SwDropDownField();
/**
- Expands the field.
-
- The expanded value of the field is the value of the selected
- item. If no item is selected, an empty string is returned.
-
- @return the expanded value of the field
- */
- virtual String Expand() const;
-
- /**
- Creates a copy of this field.
-
- @return the copy of this field
- */
- virtual SwField * Copy() const;
-
- /**
Returns the selected value.
@see Expand
diff --git a/sw/inc/inetfld.hxx b/sw/inc/inetfld.hxx
index 2bb3c6f9c880..de3f81c49e31 100644
--- a/sw/inc/inetfld.hxx
+++ b/sw/inc/inetfld.hxx
@@ -24,8 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _INETFLD_HXX
-#define _INETFLD_HXX
+#ifndef SW_INETFLD_HXX
+#define SW_INETFLD_HXX
#include "fldbas.hxx"
@@ -69,15 +69,16 @@ class SwINetField : public SwField
String sText;
SvxMacroTableDtor* pMacroTbl;
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
public:
// Direkte Eingabe alten Wert loeschen
SwINetField( SwINetFieldType* pTyp, USHORT nFmt,
const String& rURL, const String& rText );
virtual ~SwINetField();
- virtual String GetCntnt(BOOL bName = FALSE) const;
- virtual String Expand() const;
- virtual SwField* Copy() const;
+ virtual String GetFieldName() const;
// URL
virtual const String& GetPar1() const;
@@ -105,5 +106,5 @@ public:
};
-#endif // _INETFLD_HXX
+#endif // SW_INETFLD_HXX
diff --git a/sw/inc/pagepreviewlayout.hxx b/sw/inc/pagepreviewlayout.hxx
index 589e2850b1ab..01d83afae52e 100644
--- a/sw/inc/pagepreviewlayout.hxx
+++ b/sw/inc/pagepreviewlayout.hxx
@@ -558,9 +558,6 @@ public:
sal_uInt16 GetColOfPage( sal_uInt16 _nPageNum ) const;
// OD 18.12.2002 #103492#
- Size GetMaxPageSize() const;
-
- // OD 18.12.2002 #103492#
Size GetPrevwDocSize() const;
/** get size of a preview page by its physical page number
diff --git a/sw/inc/printdata.hxx b/sw/inc/printdata.hxx
index f76ac65e747a..02df0280cdbf 100755..100644
--- a/sw/inc/printdata.hxx
+++ b/sw/inc/printdata.hxx
@@ -24,8 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _SW_PRINTDATA_HXX
-#define _SW_PRINTDATA_HXX
+#ifndef SW_PRINTDATA_HXX
+#define SW_PRINTDATA_HXX
#include <sal/types.h>
@@ -45,7 +45,6 @@ class _SetGetExpFlds;
class SwViewOption;
class OutputDevice;
class SwViewOptionAdjust_Impl;
-class SwPrtOptions;
class SwWrtShell;
class SfxViewShell;
@@ -248,7 +247,7 @@ class SwRenderData
// the view options to be applied for printing
SwViewOptionAdjust_Impl * m_pViewOptionAdjust;
- SwPrtOptions * m_pPrtOptions;
+ SwPrintData * m_pPrtOptions;
public:
@@ -269,14 +268,14 @@ public:
bool IsViewOptionAdjust() const { return m_pViewOptionAdjust != 0; }
bool NeedNewViewOptionAdjust( const SwWrtShell& ) const;
void ViewOptionAdjustStart( SwWrtShell &rSh, const SwViewOption &rViewOptions );
- void ViewOptionAdjust( const SwPrtOptions *pPrtOptions );
+ void ViewOptionAdjust( SwPrintData const*const pPrtOptions );
void ViewOptionAdjustStop();
bool HasSwPrtOptions() const { return m_pPrtOptions != 0; }
- void SetSwPrtOptions( SwPrtOptions * pOpt ) { m_pPrtOptions = pOpt; }
- const SwPrtOptions * GetSwPrtOptions() const { return m_pPrtOptions; }
- SwPrtOptions & GetSwPrtOptionsRef() { return *m_pPrtOptions; }
- void MakeSwPrtOptions( SwPrtOptions &rOptions, const SwDocShell *pDocShell,
+ void SetSwPrtOptions(SwPrintData *const pOpt) { m_pPrtOptions = pOpt; }
+ SwPrintData const* GetSwPrtOptions() const { return m_pPrtOptions; }
+ SwPrintData & GetSwPrtOptionsRef() { return *m_pPrtOptions; }
+ void MakeSwPrtOptions( SwPrintData & rOptions, const SwDocShell *pDocShell,
const SwPrintUIOptions *pOpt, const SwRenderData *pData, bool bIsPDFExport );
@@ -320,4 +319,17 @@ public:
////////////////////////////////////////////////////////////
-#endif //_SW_PRINTDATA_HXX
+// last remnants of swprtopt.hxx:
+
+#define POSTITS_NONE 0
+#define POSTITS_ONLY 1
+#define POSTITS_ENDDOC 2
+#define POSTITS_ENDPAGE 3
+
+namespace sw {
+
+void InitPrintOptionsFromApplication(SwPrintData & o_rData, bool const bWeb);
+
+} // namespace sw
+
+#endif // SW_PRINTDATA_HXX
diff --git a/sw/inc/reffld.hxx b/sw/inc/reffld.hxx
index b2b61dff6434..44d17eb38ca8 100644
--- a/sw/inc/reffld.hxx
+++ b/sw/inc/reffld.hxx
@@ -24,8 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _REFFLD_HXX
-#define _REFFLD_HXX
+#ifndef SW_REFFLD_HXX
+#define SW_REFFLD_HXX
#include <fldbas.hxx>
@@ -99,6 +99,9 @@ private:
USHORT nSubType;
USHORT nSeqNo;
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
// --> OD 2007-08-24 #i81002#
String MakeRefNumStr( const SwTxtNode& rTxtNodeOfField,
const SwTxtNode& rTxtNodeOfReferencedItem,
@@ -110,9 +113,7 @@ public:
virtual ~SwGetRefField();
- virtual String GetCntnt(BOOL bName = FALSE) const;
- virtual String Expand() const;
- virtual SwField* Copy() const;
+ virtual String GetFieldName() const;
const String& GetSetRefName() const { return sSetRefName; }
@@ -158,5 +159,5 @@ public:
};
-#endif // _REFFLD_HXX
+#endif // SW_REFFLD_HXX
diff --git a/sw/inc/swprtopt.hxx b/sw/inc/swprtopt.hxx
deleted file mode 100644
index 626c74d88feb..000000000000
--- a/sw/inc/swprtopt.hxx
+++ /dev/null
@@ -1,102 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SWPRTOPT_HXX
-#define _SWPRTOPT_HXX
-
-#include <tools/multisel.hxx>
-#include <printdata.hxx>
-
-#include <set>
-#include <map>
-#include <vector>
-#include <utility>
-
-#define POSTITS_NONE 0
-#define POSTITS_ONLY 1
-#define POSTITS_ENDDOC 2
-#define POSTITS_ENDPAGE 3
-
-
-class PrintDialog;
-class SfxPrinter;
-
-
-////////////////////////////////////////////////////////////
-
-
-class SwPrtOptions : public SwPrintData
-{
- USHORT nJobNo;
- String sJobName;
-
-public:
- MultiSelection aMulti;
- Point aOffset;
- ULONG nMergeCnt; // Anzahl der Serienbriefe
- ULONG nMergeAct; // Aktueller Serienbriefnr.
- USHORT nCopyCount;
-
- BOOL bCollate,
- bPrintSelection, // Markierung drucken
- bJobStartet;
-
- SwPrtOptions( const String& rJobName ) :
- nJobNo( 1 ),
- sJobName( rJobName ),
- aOffset( Point(0,0) ),
- nMergeCnt( 0 ),
- nMergeAct( 0 ),
- bCollate(FALSE),
- bPrintSelection (FALSE),
- bJobStartet(FALSE)
- {}
-
- const String& MakeNextJobName(); // steht in vprint.cxx
- const String& GetJobName() const { return sJobName; }
-
-#if defined(TCPP)
- // seit neuestem (SV 223) kann der keinen mehr generieren
- inline SwPrtOptions(const SwPrtOptions& rNew) {*this = rNew;}
-#endif
-
-
- SwPrtOptions& operator=(const SwPrintData& rData)
- {
- SwPrintData::operator=(rData);
- return *this;
- }
-
- // get print options
- void MakeOptions( BOOL bWeb );
-};
-
-
-////////////////////////////////////////////////////////////
-
-#endif //_SWPRTOPT_HXX
-
diff --git a/sw/inc/txtfld.hxx b/sw/inc/txtfld.hxx
index d0be4a008cab..6dd556a84436 100644
--- a/sw/inc/txtfld.hxx
+++ b/sw/inc/txtfld.hxx
@@ -41,8 +41,7 @@ class SwTxtFld : public SwTxtAttr
SwTxtNode * m_pTxtNode;
public:
- SwTxtFld(SwFmtFld & rAttr, xub_StrLen const nStart,
- bool const bInClipboard);
+ SwTxtFld(SwFmtFld & rAttr, xub_StrLen const nStart);
virtual ~SwTxtFld();
void CopyFld( SwTxtFld *pDest ) const;
diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx
index 372b55ca9193..3121a6420a69 100644
--- a/sw/inc/unotbl.hxx
+++ b/sw/inc/unotbl.hxx
@@ -421,8 +421,6 @@ public:
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
-
- static SwXTextTable* GetImplementation(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xRef );
};
/* -----------------27.04.98 16:41-------------------
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
index b50d5b0a1b76..2869415d3978 100755..100644
--- a/sw/inc/unotxdoc.hxx
+++ b/sw/inc/unotxdoc.hxx
@@ -129,7 +129,6 @@ class SfxViewFrame;
class SwPrintUIOptions;
class SwPrintData;
class SwRenderData;
-class SwPrtOptions;
class SwWrtShell;
@@ -606,7 +605,7 @@ public:
SwViewOptionAdjust_Impl( SwWrtShell& rSh, const SwViewOption &rViewOptions );
~SwViewOptionAdjust_Impl();
- void AdjustViewOptions( const SwPrtOptions *pPrtOptions );
+ void AdjustViewOptions( SwPrintData const*const pPrtOptions );
bool checkShell( const SwWrtShell& rCompare ) const
{ return &rCompare == &m_rShell; }
diff --git a/sw/inc/usrfld.hxx b/sw/inc/usrfld.hxx
index b755cbc1631b..dea534074179 100644
--- a/sw/inc/usrfld.hxx
+++ b/sw/inc/usrfld.hxx
@@ -24,8 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _USRFLD_HXX
-#define _USRFLD_HXX
+#ifndef SW_USRFLD_HXX
+#define SW_USRFLD_HXX
#include "swdllapi.h"
#include "fldbas.hxx"
@@ -106,6 +106,9 @@ class SW_DLLPUBLIC SwUserField : public SwValueField
{
USHORT nSubType;
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
public:
SwUserField(SwUserFieldType*, USHORT nSub = 0, sal_uInt32 nFmt = 0);
@@ -115,9 +118,7 @@ public:
virtual double GetValue() const;
virtual void SetValue( const double& rVal );
- virtual String Expand() const;
- virtual SwField* Copy() const;
- virtual String GetCntnt(BOOL bName = FALSE) const;
+ virtual String GetFieldName() const;
// Name kann nicht geaendert werden
virtual const String& GetPar1() const;
@@ -129,4 +130,4 @@ public:
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhichId );
};
-#endif // _USRFLD_HXX
+#endif // SW_USRFLD_HXX
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index 6c7011d78bb4..480876904d59 100755..100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -24,8 +24,9 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _VIEWSH_HXX
-#define _VIEWSH_HXX
+#ifndef SW_VIEWSH_HXX
+#define SW_VIEWSH_HXX
+
#include <com/sun/star/embed/XClassifiedObject.hpp>
#include <com/sun/star/embed/XEmbeddedObject.hpp>
#include <tools/rtti.hxx>
@@ -67,7 +68,6 @@ class SfxItemPool;
class SfxViewShell;
class SwViewOption;
class SwViewImp;
-class SwPrtOptions;
class SwPrintData;
class SwPagePreViewPrtData;
class Window;
@@ -357,7 +357,8 @@ public:
// printing of one page.
// bIsPDFExport == true is: do PDF Export (no printing!)
- sal_Bool PrintOrPDFExport( OutputDevice *pOutDev, const SwPrtOptions &rPrintData,
+ sal_Bool PrintOrPDFExport( OutputDevice *pOutDev,
+ SwPrintData const& rPrintData,
sal_Int32 nRenderer /* offset in vector of pages to print */ );
// printing of one brochure page
@@ -368,8 +369,7 @@ public:
static void PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintData& rOptions,
OutputDevice* pOleOut, const Rectangle& rRect );
- // creates temporary doc with selected text for PDF export
- SwDoc * CreatePrtDoc( SfxObjectShellRef& );
+ /// fill temporary doc with selected text for Print or PDF export
SwDoc * FillPrtDoc( SwDoc* pPrtDoc, const SfxPrinter* pPrt );
//Wird intern fuer die Shell gerufen die Druckt. Formatiert die Seiten.
@@ -467,7 +467,7 @@ public:
input parameter - constant reference to print options, to which the
view option will be adjusted.
*/
- void AdjustOptionsForPagePreview( const SwPrtOptions &_rPrintOptions );
+ void AdjustOptionsForPagePreview( SwPrintData const& rPrintOptions );
sal_Bool IsViewLocked() const { return bViewLocked; }
void LockView( sal_Bool b ) { bViewLocked = b; }
@@ -633,4 +633,4 @@ inline const SfxItemPool& ViewShell::GetAttrPool() const
-#endif //_VIEWSH_HXX
+#endif // SW_VIEWSH_HXX
diff --git a/sw/qa/complex/writer/LoadSaveTest.java b/sw/qa/complex/writer/LoadSaveTest.java
new file mode 100644
index 000000000000..a1600488c7bc
--- /dev/null
+++ b/sw/qa/complex/writer/LoadSaveTest.java
@@ -0,0 +1,254 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+package complex.writer;
+
+import complexlib.ComplexTestCase;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.AnyConverter;
+import com.sun.star.uno.XComponentContext;
+import com.sun.star.lang.WrappedTargetException;
+import com.sun.star.lang.WrappedTargetRuntimeException;
+import com.sun.star.lang.EventObject;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.lang.XComponent;
+import com.sun.star.lang.XServiceInfo;
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.beans.PropertyValue;
+import com.sun.star.beans.Pair;
+import com.sun.star.util.XCloseable;
+import com.sun.star.frame.XStorable;
+import com.sun.star.document.DocumentEvent;
+import com.sun.star.document.XDocumentEventBroadcaster;
+import com.sun.star.document.XDocumentEventListener;
+import com.sun.star.text.XTextDocument;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.io.File;
+
+/**
+ * a small program to load documents from one directory (recursively)
+ * and store them in another, implemented as a complex test.
+ */
+public class LoadSaveTest extends ComplexTestCase
+{
+ private XMultiServiceFactory m_xMSF = null;
+ private XComponentContext m_xContext = null;
+ private XDocumentEventBroadcaster m_xGEB = null;
+ private String m_TmpDir = null;
+
+ private String m_fileURL = "file://";
+ // these should be parameters or something?
+ private String m_SourceDir = "FIXME";
+ private String m_TargetDir = "/tmp/out";
+
+ public String[] getTestMethodNames() {
+ return new String[] { "testLoadStore" };
+ }
+
+ public void before() throws Exception
+ {
+ m_xMSF = (XMultiServiceFactory) param.getMSF();
+ XPropertySet xPropertySet = (XPropertySet)
+ UnoRuntime.queryInterface(XPropertySet.class, m_xMSF);
+ Object defaultCtx = xPropertySet.getPropertyValue("DefaultContext");
+ m_xContext = (XComponentContext)
+ UnoRuntime.queryInterface(XComponentContext.class, defaultCtx);
+ assure("could not get component context.", m_xContext != null);
+ Object oGEB = m_xMSF.createInstance(
+ "com.sun.star.frame.GlobalEventBroadcaster");
+ m_xGEB = (XDocumentEventBroadcaster)
+ UnoRuntime.queryInterface(XDocumentEventBroadcaster.class, oGEB);
+ assure("could not get global event broadcaster.", m_xGEB != null);
+ m_TmpDir = util.utils.getOfficeTemp/*Dir*/(m_xMSF);
+ log.println("tempdir: " + m_TmpDir);
+ log.println("sourcedir: " + m_SourceDir);
+ log.println("targetdir: " + m_TargetDir);
+ }
+
+ /*
+ public void after()
+ {
+ }
+ */
+
+ public void testLoadStore() throws Exception
+ {
+ Pair<List<String>, List<String>> dirsFiles =
+ getDirAndFileNames(m_SourceDir);
+ makeDirs(m_TargetDir, dirsFiles.First);
+ for (String fileName : dirsFiles.Second)
+ {
+ try {
+ testDoc(fileName);
+ } catch (Exception e) {
+ report(e);
+ }
+ }
+ }
+
+ public void testDoc(String fileName) throws Exception
+ {
+ XComponent xDoc = null;
+ EventListener xListener = new EventListener();
+ try {
+ m_xGEB.addDocumentEventListener(xListener);
+
+ log.println("Loading document: " + fileName + " ...");
+
+ PropertyValue[] loadProps = new PropertyValue[1];
+ loadProps[0] = new PropertyValue();
+ loadProps[0].Name = "ReadOnly";
+ loadProps[0].Value = new Boolean(true);
+
+ String sourceFile = m_fileURL + m_SourceDir + fileName;
+
+ xDoc = util.DesktopTools.loadDoc(m_xMSF, sourceFile, loadProps);
+
+ log.println("... done");
+
+ {
+ // apparently OnLayoutFinished is not sent for every doc???
+ // 10 seconds is evidently not enough for large documents
+ int time = 0;
+ while (!xListener.IsLayoutFinished() && (time < 30000)) {
+ Thread.sleep(100);
+ time += 100;
+ }
+ if (time >= 30000) {
+ log.println("timeout: no OnLayoutFinished received!");
+ }
+ }
+
+ log.println("Storing document: " + fileName + " ...");
+
+ XStorable xStor = (XStorable) UnoRuntime.queryInterface(
+ XStorable.class, xDoc);
+
+ String targetFile = m_fileURL + m_TargetDir + fileName;
+
+ xStor.storeToURL(targetFile, new PropertyValue[0]);
+
+ log.println("... done");
+
+ } finally {
+ if (xDoc != null) {
+ util.DesktopTools.closeDoc(xDoc);
+ }
+ if (xListener != null) {
+ m_xGEB.removeDocumentEventListener(xListener);
+ }
+ }
+ }
+
+ class EventListener implements XDocumentEventListener
+ {
+ boolean m_isLayoutFinished = false;
+ boolean IsLayoutFinished() { return m_isLayoutFinished; }
+ public void documentEventOccured(DocumentEvent Event)
+ {
+// log.println("event: " + Event.EventName);
+ if ("OnLayoutFinished".equals(Event.EventName))
+ {
+ // we only have one doc at any time, so no need to check
+ m_isLayoutFinished = true;
+// log.println("received OnLayoutFinished");
+ }
+ }
+ public void disposing(EventObject Event) { }
+ }
+
+ void report2(Exception e)
+ {
+ if (e instanceof WrappedTargetException)
+ {
+ log.println("Cause:");
+ Exception cause = (Exception)
+ (((WrappedTargetException)e).TargetException);
+ log.println(cause.toString());
+ report2(cause);
+ } else if (e instanceof WrappedTargetRuntimeException) {
+ log.println("Cause:");
+ Exception cause = (Exception)
+ (((WrappedTargetRuntimeException)e).TargetException);
+ log.println(cause.toString());
+ report2(cause);
+ }
+ }
+
+ void report(Exception e) {
+ log.println("Exception occurred:");
+ log.println(e.toString());
+ e.printStackTrace((java.io.PrintWriter) log);
+ report2(e);
+// failed();
+ }
+
+ Pair<List<String>, List<String>> getDirAndFileNames(String dir)
+ {
+ List<String> dirs = new ArrayList<String>();
+ List<String> files = new ArrayList<String>();
+ File root = new File(dir);
+ getDirAndFileNames(root, "", dirs, files);
+ return new Pair<List<String>, List<String>>(dirs, files);
+ }
+
+ void getDirAndFileNames(File file, String relPath,
+ List<String> dirs, List<String> files)
+ {
+ assure("does not exist: " + relPath, file.exists());
+ if (file.isDirectory()) {
+ dirs.add(relPath);
+ File[] subfiles = file.listFiles();
+ for (File subfile : subfiles)
+ {
+ String subfileName =
+ relPath + File.separator + subfile.getName();
+ getDirAndFileNames(subfile, subfileName, dirs, files);
+ }
+ }
+ else if (file.isFile()) {
+ if (file.getName().endsWith(".odt")) {
+ files.add(relPath);
+ }
+ }
+ }
+
+ void makeDirs(String target, List<String> dirs) throws Exception
+ {
+ for (String dir : dirs) {
+ File f = new File(target + dir);
+ if (!f.exists()) {
+ if (!f.mkdir()) {
+ throw new Exception("cannot mkdir: " + target + dir);
+ }
+ }
+ }
+ }
+}
+
diff --git a/sw/qa/unoapi/knownissues.xcl b/sw/qa/unoapi/knownissues.xcl
index ea5bf843f3ec..99d7c7f12881 100644
--- a/sw/qa/unoapi/knownissues.xcl
+++ b/sw/qa/unoapi/knownissues.xcl
@@ -21,9 +21,6 @@ sw.XMLStylesImporter::com::sun::star::xml::sax::XDocumentHandler
### i23422 ###
sw.SwXTextViewCursor::com::sun::star::beans::XMultiPropertyStates
-### i112111 ###
-sw.SwXViewSettings::com::sun::star::beans::XPropertySet
-
### i23623 ###
sw.SwXStyleFamily::com::sun::star::container::XNameReplace
diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index f837fa7a108c..baf76e5fe5ec 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -38,6 +38,7 @@
// #include <cmath>
#include <cfloat>
#include <hintids.hxx>
+#include <osl/diagnose.hxx>
#include <rtl/math.hxx>
#include <editeng/langitem.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -270,7 +271,7 @@ SwCalc::SwCalc( SwDoc& rD )
:
aErrExpr( aEmptyStr, SwSbxValue(), 0 ),
rDoc( rD ),
- pLclData( &SvtSysLocale().GetLocaleData() ),
+ pLclData( m_aSysLocale.GetLocaleDataPtr() ),
pCharClass( &GetAppCharClass() ),
nListPor( 0 ),
eError( CALC_NOERR )
@@ -419,7 +420,7 @@ SwCalc::~SwCalc()
{
for( USHORT n = 0; n < TBLSZ; ++n )
delete VarTable[n];
- if( pLclData != &SvtSysLocale().GetLocaleData() )
+ if( pLclData != m_aSysLocale.GetLocaleDataPtr() )
delete pLclData;
if( pCharClass != &GetAppCharClass() )
delete pCharClass;
@@ -1608,63 +1609,64 @@ String SwCalc::GetDBName(const String& rName)
//------------------------------------------------------------------------------
-/******************************************************************************
- * Methode : BOOL SwCalc::Str2Double( double& )
- * Beschreibung:
- * Erstellt : OK 07.06.94 12:56
- * Aenderung : JP 27.10.98
- ******************************************************************************/
-BOOL SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos,
- double& rVal, const LocaleDataWrapper* pLclData )
+namespace
{
- const LocaleDataWrapper* pLclD = pLclData;
- if( !pLclD )
- pLclD = &SvtSysLocale().GetLocaleData();
+static bool
+lcl_Str2Double( const String& rCommand, xub_StrLen& rCommandPos, double& rVal,
+ const LocaleDataWrapper* const pLclData )
+{
+ OSL_ASSERT(pLclData);
const xub_Unicode nCurrCmdPos = rCommandPos;
rtl_math_ConversionStatus eStatus;
const sal_Unicode* pEnd;
rVal = rtl_math_uStringToDouble( rCommand.GetBuffer() + rCommandPos,
rCommand.GetBuffer() + rCommand.Len(),
- pLclD->getNumDecimalSep().GetChar(0),
- pLclD->getNumThousandSep().GetChar(0),
+ pLclData->getNumDecimalSep().GetChar(0),
+ pLclData->getNumThousandSep().GetChar(0),
&eStatus, &pEnd );
rCommandPos = static_cast<xub_StrLen>(pEnd - rCommand.GetBuffer());
- if( !pLclData && pLclD != &SvtSysLocale().GetLocaleData() )
- delete (LocaleDataWrapper*)pLclD;
-
return rtl_math_ConversionStatus_Ok == eStatus && nCurrCmdPos != rCommandPos;
}
-BOOL SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos,
- double& rVal, SwDoc* pDoc )
+}
+
+/******************************************************************************
+ * Methode : BOOL SwCalc::Str2Double( double& )
+ * Beschreibung:
+ * Erstellt : OK 07.06.94 12:56
+ * Aenderung : JP 27.10.98
+ ******************************************************************************/
+bool SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos,
+ double& rVal, const LocaleDataWrapper* const pLclData )
+{
+ const SvtSysLocale aSysLocale;
+ return lcl_Str2Double( rCommand, rCommandPos, rVal,
+ pLclData ? pLclData : aSysLocale.GetLocaleDataPtr() );
+}
+
+bool SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos,
+ double& rVal, SwDoc* const pDoc )
{
- const LocaleDataWrapper* pLclD = &SvtSysLocale().GetLocaleData();
+ const SvtSysLocale aSysLocale;
+ ::std::auto_ptr<const LocaleDataWrapper> pLclD;
if( pDoc )
{
-
LanguageType eLang = GetDocAppScriptLang( *pDoc );
- if( eLang != SvxLocaleToLanguage( pLclD->getLocale() ) )
- pLclD = new LocaleDataWrapper(
+ if (eLang !=
+ SvxLocaleToLanguage(aSysLocale.GetLocaleData().getLocale()))
+ {
+ pLclD.reset( new LocaleDataWrapper(
::comphelper::getProcessServiceFactory(),
- SvxCreateLocale( eLang ) );
+ SvxCreateLocale( eLang ) ) );
+ }
}
- const xub_Unicode nCurrCmdPos = rCommandPos;
- rtl_math_ConversionStatus eStatus;
- const sal_Unicode* pEnd;
- rVal = rtl_math_uStringToDouble( rCommand.GetBuffer() + rCommandPos,
- rCommand.GetBuffer() + rCommand.Len(),
- pLclD->getNumDecimalSep().GetChar(0),
- pLclD->getNumThousandSep().GetChar(0),
- &eStatus, &pEnd );
- rCommandPos = static_cast<xub_StrLen>(pEnd - rCommand.GetBuffer());
-
- if( pLclD != &SvtSysLocale().GetLocaleData() )
- delete (LocaleDataWrapper*)pLclD;
+ bool const bRet = lcl_Str2Double( rCommand, rCommandPos, rVal,
+ (pLclD.get()) ? pLclD.get() : aSysLocale.GetLocaleDataPtr() );
- return rtl_math_ConversionStatus_Ok == eStatus && nCurrCmdPos != rCommandPos;
+ return bRet;
}
//------------------------------------------------------------------------------
diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx
index bf06a19d83b0..37087c189355 100644
--- a/sw/source/core/crsr/callnk.cxx
+++ b/sw/source/core/crsr/callnk.cxx
@@ -196,6 +196,10 @@ SwCallLink::~SwCallLink()
{
const SwNodeIndex* pIndex = pFlyFrm->GetFmt()->GetCntnt().GetCntntIdx();
ASSERT( pIndex, "Fly ohne Cntnt" );
+
+ if (!pIndex)
+ return;
+
const SwNode& rStNd = pIndex->GetNode();
if( rStNd.EndOfSectionNode()->StartOfSectionIndex() > nNode ||
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index c11092c5fd9d..e16207f03fa0 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -484,10 +484,10 @@ BOOL SwCrsrShell::GotoNxtPrvTblFormula( BOOL bNext, BOOL bOnlyErrors )
{
const SfxPoolItem* pItem;
const SwTableBox* pTBox;
- USHORT n, nMaxItems = GetDoc()->GetAttrPool().GetItemCount( RES_BOXATR_FORMULA );
+ sal_uInt32 n, nMaxItems = GetDoc()->GetAttrPool().GetItemCount2( RES_BOXATR_FORMULA );
for( n = 0; n < nMaxItems; ++n )
- if( 0 != (pItem = GetDoc()->GetAttrPool().GetItem(
+ if( 0 != (pItem = GetDoc()->GetAttrPool().GetItem2(
RES_BOXATR_FORMULA, n ) ) &&
0 != (pTBox = ((SwTblBoxFormula*)pItem)->GetTableBox() ) &&
pTBox->GetSttNd() &&
@@ -556,10 +556,10 @@ BOOL SwCrsrShell::GotoNxtPrvTOXMark( BOOL bNext )
const SwCntntFrm* pCFrm;
const SwTxtNode* pTxtNd;
const SwTxtTOXMark* pTxtTOX;
- USHORT n, nMaxItems = GetDoc()->GetAttrPool().GetItemCount( RES_TXTATR_TOXMARK );
+ sal_uInt32 n, nMaxItems = GetDoc()->GetAttrPool().GetItemCount2( RES_TXTATR_TOXMARK );
for( n = 0; n < nMaxItems; ++n )
- if( 0 != (pItem = GetDoc()->GetAttrPool().GetItem(
+ if( 0 != (pItem = GetDoc()->GetAttrPool().GetItem2(
RES_TXTATR_TOXMARK, n ) ) &&
0 != (pTxtTOX = ((SwTOXMark*)pItem)->GetTxtTOXMark() ) &&
( pTxtNd = &pTxtTOX->GetTxtNode())->GetNodes().IsDocNodes() &&
@@ -717,8 +717,7 @@ BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext,
SwFmtFld* pFmtFld = new SwFmtFld( SwDateTimeField(
(SwDateTimeFieldType*)pDoc->GetSysFldType( RES_DATETIMEFLD ) ) );
- pTxtFld = new SwTxtFld( *pFmtFld, rPos.nContent.GetIndex(),
- pDoc->IsClipBoard() );
+ pTxtFld = new SwTxtFld( *pFmtFld, rPos.nContent.GetIndex() );
pTxtFld->ChgTxtNode( pTNd );
}
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index 4a0697692975..ed4bcc089957 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -143,8 +143,7 @@ String& lcl_CleanStr( const SwTxtNode& rNd, xub_StrLen nStart,
// hinterher alle am Stringende (koenten ja 'normale' 0x7f drinstehen
BOOL bEmpty = RES_TXTATR_FIELD != pHt->Which() ||
!(static_cast<SwTxtFld const*>(pHt)
- ->GetFld().GetFld()->ExpandField(
- rNd.GetDoc()->IsClipBoard()).Len());
+ ->GetFld().GetFld()->ExpandField(true).Len());
if ( bEmpty && nStart == nAkt )
{
rArr.Insert( nAkt, rArr.Count() );
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 2df835f06c12..d4de8d35a87e 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -100,7 +100,6 @@
#include <fldupde.hxx>
#include <swbaslnk.hxx>
#include <printdata.hxx>
-#include <swprtopt.hxx>
#include <cmdid.h> // fuer den dflt - Printer in SetJob
#include <statstr.hrc> // StatLine-String
#include <comcore.hrc>
@@ -1843,10 +1842,10 @@ void SwDoc::DocInfoChgd( )
const SwFmtRefMark* SwDoc::GetRefMark( const String& rName ) const
{
const SfxPoolItem* pItem;
- USHORT nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_REFMARK );
- for( USHORT n = 0; n < nMaxItems; ++n )
+ sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_REFMARK );
+ for( sal_uInt32 n = 0; n < nMaxItems; ++n )
{
- if( 0 == (pItem = GetAttrPool().GetItem( RES_TXTATR_REFMARK, n ) ))
+ if( 0 == (pItem = GetAttrPool().GetItem2( RES_TXTATR_REFMARK, n ) ))
continue;
const SwFmtRefMark* pFmtRef = (SwFmtRefMark*)pItem;
@@ -1865,10 +1864,10 @@ const SwFmtRefMark* SwDoc::GetRefMark( USHORT nIndex ) const
const SwTxtRefMark* pTxtRef;
const SwFmtRefMark* pRet = 0;
- USHORT nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_REFMARK );
- USHORT nCount = 0;
- for( USHORT n = 0; n < nMaxItems; ++n )
- if( 0 != (pItem = GetAttrPool().GetItem( RES_TXTATR_REFMARK, n )) &&
+ sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_REFMARK );
+ sal_uInt32 nCount = 0;
+ for( sal_uInt32 n = 0; n < nMaxItems; ++n )
+ if( 0 != (pItem = GetAttrPool().GetItem2( RES_TXTATR_REFMARK, n )) &&
0 != (pTxtRef = ((SwFmtRefMark*)pItem)->GetTxtRefMark()) &&
&pTxtRef->GetTxtNode().GetNodes() == &GetNodes() )
{
@@ -1891,10 +1890,10 @@ USHORT SwDoc::GetRefMarks( SvStringsDtor* pNames ) const
const SfxPoolItem* pItem;
const SwTxtRefMark* pTxtRef;
- USHORT nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_REFMARK );
- USHORT nCount = 0;
- for( USHORT n = 0; n < nMaxItems; ++n )
- if( 0 != (pItem = GetAttrPool().GetItem( RES_TXTATR_REFMARK, n )) &&
+ sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_REFMARK );
+ sal_uInt32 nCount = 0;
+ for( sal_uInt32 n = 0; n < nMaxItems; ++n )
+ if( 0 != (pItem = GetAttrPool().GetItem2( RES_TXTATR_REFMARK, n )) &&
0 != (pTxtRef = ((SwFmtRefMark*)pItem)->GetTxtRefMark()) &&
&pTxtRef->GetTxtNode().GetNodes() == &GetNodes() )
{
@@ -2135,9 +2134,9 @@ const SwFmtINetFmt* SwDoc::FindINetAttr( const String& rName ) const
const SwFmtINetFmt* pItem;
const SwTxtINetFmt* pTxtAttr;
const SwTxtNode* pTxtNd;
- USHORT n, nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_INETFMT );
+ sal_uInt32 n, nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_INETFMT );
for( n = 0; n < nMaxItems; ++n )
- if( 0 != (pItem = (SwFmtINetFmt*)GetAttrPool().GetItem(
+ if( 0 != (pItem = (SwFmtINetFmt*)GetAttrPool().GetItem2(
RES_TXTATR_INETFMT, n ) ) &&
pItem->GetName().Equals( rName ) &&
0 != ( pTxtAttr = pItem->GetTxtINetFmt()) &&
@@ -2451,7 +2450,7 @@ BOOL SwDoc::ConvertFieldsToText()
nWhich != RES_REFPAGEGETFLD&&
nWhich != RES_REFPAGESETFLD))
{
- String sText = pField->GetCntnt();
+ String sText = pField->ExpandField(true);
//database fields should not convert their command into text
if( RES_DBFLD == pCurType->Which() && !static_cast<const SwDBField*>(pField)->IsInitialized())
sText.Erase();
diff --git a/sw/source/core/doc/docbasic.cxx b/sw/source/core/doc/docbasic.cxx
index f52c7ad89dbf..37568933e522 100644
--- a/sw/source/core/doc/docbasic.cxx
+++ b/sw/source/core/doc/docbasic.cxx
@@ -167,9 +167,9 @@ USHORT SwDoc::CallEvent( USHORT nEvent, const SwCallMouseEvent& rCallEvent,
if( bCheckPtr )
{
const SfxPoolItem* pItem;
- USHORT n, nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_INETFMT );
+ sal_uInt32 n, nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_INETFMT );
for( n = 0; n < nMaxItems; ++n )
- if( 0 != (pItem = GetAttrPool().GetItem( RES_TXTATR_INETFMT, n ) )
+ if( 0 != (pItem = GetAttrPool().GetItem2( RES_TXTATR_INETFMT, n ) )
&& rCallEvent.PTR.pINetAttr == pItem )
{
bCheckPtr = FALSE; // als Flag missbrauchen
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 0080694722ba..587c846667f4 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -305,7 +305,7 @@ namespace sw { namespace mark
MarkManager::MarkManager(SwDoc& rDoc)
: m_pDoc(&rDoc)
{ }
-
+#if OSL_DEBUG_LEVEL > 1
void MarkManager::dumpFieldmarks( ) const
{
const_iterator_t pIt = m_vFieldmarks.begin();
@@ -316,7 +316,7 @@ namespace sw { namespace mark
::rtl::OUStringToOString(str, RTL_TEXTENCODING_UTF8).getStr());
}
}
-
+#endif
::sw::mark::IMark* MarkManager::makeMark(const SwPaM& rPaM,
const ::rtl::OUString& rName,
const IDocumentMarkAccess::MarkType eType)
diff --git a/sw/source/core/doc/doccorr.cxx b/sw/source/core/doc/doccorr.cxx
index e567a52085be..0520a9b5c81c 100644
--- a/sw/source/core/doc/doccorr.cxx
+++ b/sw/source/core/doc/doccorr.cxx
@@ -73,9 +73,9 @@
namespace
{
- // find the relevant section in which the SwUnoCrsr may wander. returns NULL if
- // no restrictions apply
- const SwStartNode* lcl_FindUnoCrsrSection( const SwNode& rNode )
+ // find the relevant section in which the SwUnoCrsr may wander.
+ // returns NULL if no restrictions apply
+ static const SwStartNode* lcl_FindUnoCrsrSection( const SwNode& rNode )
{
const SwStartNode* pStartNode = rNode.StartOfSectionNode();
while( ( pStartNode != NULL ) &&
@@ -86,45 +86,28 @@ namespace
return pStartNode;
}
- static inline void lcl_PaMCorrAbs1(SwPaM * pPam,
- SwNode const * const pOldNode,
- const SwPosition& rNewPos,
- const xub_StrLen nOffset)
- {
- for(int nb = 0; nb < 2; ++nb)
- if(&((pPam)->GetBound(BOOL(nb)).nNode.GetNode()) == pOldNode)
- {
- (pPam)->GetBound(BOOL(nb)) = rNewPos;
- (pPam)->GetBound(BOOL(nb)).nContent += nOffset;
- }
- };
-
- static inline bool lcl_PaMCorrAbs2(SwPaM* pPam,
- const SwPosition& rNewPos,
- ULONG nSttNode,
- ULONG nEndNode)
+ static inline bool lcl_PosCorrAbs(SwPosition & rPos,
+ const SwPosition& rStart,
+ const SwPosition& rEnd,
+ const SwPosition& rNewPos)
{
- bool bRet = false;
-
- for(int nb = 0; nb < 2; ++nb)
- if((pPam)->GetBound(BOOL(nb)).nNode >= nSttNode &&
- (pPam)->GetBound(BOOL(nb)).nNode <= nEndNode)
- {
- (pPam)->GetBound(BOOL(nb)) = rNewPos;
- bRet = true;
- }
- return bRet;
+ if ((rStart <= rPos) && (rPos <= rEnd))
+ {
+ rPos = rNewPos;
+ return true;
+ }
+ return false;
};
- static inline void lcl_PaMCorrAbs3(SwPaM * pPam,
+ static inline bool lcl_PaMCorrAbs(SwPaM & rPam,
const SwPosition& rStart,
const SwPosition& rEnd,
const SwPosition& rNewPos)
{
- for(int nb = 0; nb < 2; ++nb)
- if(rStart <= (pPam)->GetBound(BOOL(nb)) &&
- (pPam)->GetBound(BOOL(nb)) <= rEnd )
- (pPam)->GetBound(BOOL(nb)) = rNewPos;
+ bool bRet = false;
+ bRet |= lcl_PosCorrAbs(rPam.GetBound(true ), rStart, rEnd, rNewPos);
+ bRet |= lcl_PosCorrAbs(rPam.GetBound(false), rStart, rEnd, rNewPos);
+ return bRet;
};
static inline void lcl_PaMCorrRel1(SwPaM * pPam,
@@ -143,119 +126,69 @@ namespace
}
}
-void PaMCorrAbs( const SwNodeIndex &rOldNode,
- const SwPosition &rNewPos,
- const xub_StrLen nOffset)
-{
- const SwNode* pOldNode = &rOldNode.GetNode();
- const SwPosition aNewPos( rNewPos );
- const SwDoc* pDoc = pOldNode->GetDoc();
- SwCrsrShell* pShell = pDoc->GetEditShell();
-
- if( pShell )
- {
- FOREACHSHELL_START( pShell )
- SwPaM *_pStkCrsr = PCURSH->GetStkCrsr();
- if( _pStkCrsr )
- do {
- lcl_PaMCorrAbs1( _pStkCrsr, pOldNode, aNewPos, nOffset );
- } while ( (_pStkCrsr != 0 ) &&
- ((_pStkCrsr=(SwPaM *)_pStkCrsr->GetNext()) != PCURSH->GetStkCrsr()) );
-
- FOREACHPAM_START( PCURSH->_GetCrsr() )
- lcl_PaMCorrAbs1( PCURCRSR, pOldNode, aNewPos, nOffset );
- FOREACHPAM_END()
-
- if( PCURSH->IsTableMode() )
- lcl_PaMCorrAbs1( PCURSH->GetTblCrs(), pOldNode, aNewPos, nOffset );
-
- FOREACHSHELL_END( pShell )
- }
-
- {
- SwUnoCrsrTbl& rTbl = (SwUnoCrsrTbl&)pDoc->GetUnoCrsrTbl();
- for( USHORT n = 0; n < rTbl.Count(); ++n )
- {
- FOREACHPAM_START( rTbl[ n ] )
- lcl_PaMCorrAbs1( PCURCRSR, pOldNode, aNewPos, nOffset );
- FOREACHPAM_END()
-
- SwUnoTableCrsr* pUnoTblCrsr =
- dynamic_cast<SwUnoTableCrsr*>(rTbl[ n ]);
- if( pUnoTblCrsr )
- {
- FOREACHPAM_START( &pUnoTblCrsr->GetSelRing() )
- lcl_PaMCorrAbs1( PCURCRSR, pOldNode, aNewPos, nOffset );
- FOREACHPAM_END()
- }
- }
- }
-}
-
-void PaMCorrAbs( const SwNodeIndex &rStartNode,
- const SwNodeIndex &rEndNode,
- const SwPosition &rNewPos )
+void PaMCorrAbs( const SwPaM& rRange,
+ const SwPosition& rNewPos )
{
- const ULONG nSttNode = rStartNode.GetIndex();
- const ULONG nEndNode = rEndNode.GetIndex();
- const SwPosition aNewPos( rNewPos );
- SwDoc* pDoc = rStartNode.GetNode().GetDoc();
+ SwPosition const aStart( *rRange.Start() );
+ SwPosition const aEnd( *rRange.End() );
+ SwPosition const aNewPos( rNewPos );
+ SwDoc *const pDoc = aStart.nNode.GetNode().GetDoc();
+ SwCrsrShell *const pShell = pDoc->GetEditShell();
- SwCrsrShell* pShell = pDoc->GetEditShell();
if( pShell )
{
FOREACHSHELL_START( pShell )
SwPaM *_pStkCrsr = PCURSH->GetStkCrsr();
if( _pStkCrsr )
do {
- lcl_PaMCorrAbs2( _pStkCrsr, aNewPos, nSttNode, nEndNode );
+ lcl_PaMCorrAbs( *_pStkCrsr, aStart, aEnd, aNewPos );
} while ( (_pStkCrsr != 0 ) &&
((_pStkCrsr=(SwPaM *)_pStkCrsr->GetNext()) != PCURSH->GetStkCrsr()) );
FOREACHPAM_START( PCURSH->_GetCrsr() )
- lcl_PaMCorrAbs2( PCURCRSR, aNewPos, nSttNode, nEndNode );
+ lcl_PaMCorrAbs( *PCURCRSR, aStart, aEnd, aNewPos );
FOREACHPAM_END()
if( PCURSH->IsTableMode() )
- lcl_PaMCorrAbs2( PCURSH->GetTblCrs(), aNewPos, nSttNode, nEndNode );
+ lcl_PaMCorrAbs( *PCURSH->GetTblCrs(), aStart, aEnd, aNewPos );
FOREACHSHELL_END( pShell )
}
-
{
- SwUnoCrsrTbl& rTbl = (SwUnoCrsrTbl&)pDoc->GetUnoCrsrTbl();
+ SwUnoCrsrTbl& rTbl = const_cast<SwUnoCrsrTbl&>(pDoc->GetUnoCrsrTbl());
+
for( USHORT n = 0; n < rTbl.Count(); ++n )
{
- bool bChange = false;
+ SwUnoCrsr *const pUnoCursor = rTbl[ n ];
- SwUnoCrsr* pUnoCursor = rTbl[ n ];
+ bool bChange = false; // has the UNO cursor been corrected?
// determine whether the UNO cursor will leave it's designated
// section
- bool bLeaveSection =
+ bool const bLeaveSection =
pUnoCursor->IsRemainInSection() &&
( lcl_FindUnoCrsrSection( aNewPos.nNode.GetNode() ) !=
lcl_FindUnoCrsrSection(
pUnoCursor->GetPoint()->nNode.GetNode() ) );
FOREACHPAM_START( pUnoCursor )
- bChange |= lcl_PaMCorrAbs2(PCURCRSR, aNewPos, nSttNode, nEndNode);
+ bChange |= lcl_PaMCorrAbs( *PCURCRSR, aStart, aEnd, aNewPos );
FOREACHPAM_END()
- SwUnoTableCrsr* pUnoTblCrsr =
- dynamic_cast<SwUnoTableCrsr*>(pUnoCursor);
+ SwUnoTableCrsr *const pUnoTblCrsr =
+ dynamic_cast<SwUnoTableCrsr *>(rTbl[ n ]);
if( pUnoTblCrsr )
{
FOREACHPAM_START( &pUnoTblCrsr->GetSelRing() )
bChange |=
- lcl_PaMCorrAbs2( PCURCRSR, aNewPos, nSttNode, nEndNode );
+ lcl_PaMCorrAbs( *PCURCRSR, aStart, aEnd, aNewPos );
FOREACHPAM_END()
}
// if a UNO cursor leaves its designated section, we must inform
// (and invalidate) said cursor
- if( bChange && bLeaveSection )
+ if (bChange && bLeaveSection)
{
// the UNO cursor has left its section. We need to notify it!
SwMsgPoolItem aHint( RES_UNOCURSOR_LEAVES_SECTION );
@@ -265,72 +198,31 @@ void PaMCorrAbs( const SwNodeIndex &rStartNode,
}
}
-
-void PaMCorrAbs( const SwPaM& rRange,
- const SwPosition& rNewPos )
-{
- SwPosition aStart( *rRange.Start() );
- SwPosition aEnd( *rRange.End() );
- SwPosition aNewPos( rNewPos );
- SwDoc* pDoc = aStart.nNode.GetNode().GetDoc();
- SwCrsrShell* pShell = pDoc->GetEditShell();
-
- if( pShell )
- {
- FOREACHSHELL_START( pShell )
- SwPaM *_pStkCrsr = PCURSH->GetStkCrsr();
- if( _pStkCrsr )
- do {
- lcl_PaMCorrAbs3( _pStkCrsr, aStart, aEnd, aNewPos );
- } while ( (_pStkCrsr != 0 ) &&
- ((_pStkCrsr=(SwPaM *)_pStkCrsr->GetNext()) != PCURSH->GetStkCrsr()) );
-
- FOREACHPAM_START( PCURSH->_GetCrsr() )
- lcl_PaMCorrAbs3( PCURCRSR, aStart, aEnd, aNewPos );
- FOREACHPAM_END()
-
- if( PCURSH->IsTableMode() )
- lcl_PaMCorrAbs3( PCURSH->GetTblCrs(), aStart, aEnd, aNewPos );
-
- FOREACHSHELL_END( pShell )
- }
- {
- SwUnoCrsrTbl& rTbl = (SwUnoCrsrTbl&)pDoc->GetUnoCrsrTbl();
- for( USHORT n = 0; n < rTbl.Count(); ++n )
- {
- FOREACHPAM_START( rTbl[ n ] )
- lcl_PaMCorrAbs3( PCURCRSR, aStart, aEnd, aNewPos );
- FOREACHPAM_END()
-
- SwUnoTableCrsr* pUnoTblCrsr =
- dynamic_cast<SwUnoTableCrsr*>(rTbl[ n ]);
- if( pUnoTblCrsr )
- {
- FOREACHPAM_START( &pUnoTblCrsr->GetSelRing() )
- lcl_PaMCorrAbs3( PCURCRSR, aStart, aEnd, aNewPos );
- FOREACHPAM_END()
- }
- }
- }
-}
-
void SwDoc::CorrAbs(const SwNodeIndex& rOldNode,
const SwPosition& rNewPos,
const xub_StrLen nOffset,
BOOL bMoveCrsr)
{
+ SwCntntNode *const pCntntNode( rOldNode.GetNode().GetCntntNode() );
+ SwPaM const aPam(rOldNode, 0,
+ rOldNode, (pCntntNode) ? pCntntNode->Len() : 0);
+ SwPosition aNewPos(rNewPos);
+ aNewPos.nContent += nOffset;
+
getIDocumentMarkAccess()->correctMarksAbsolute(rOldNode, rNewPos, nOffset);
- { // fix readlines
+ { // fix redlines
SwRedlineTbl& rTbl = *pRedlineTbl;
for( USHORT n = 0; n < rTbl.Count(); ++n )
{
// is on position ??
- lcl_PaMCorrAbs1( rTbl[ n ], &rOldNode.GetNode(), SwPosition(rNewPos), nOffset );
+ lcl_PaMCorrAbs(*rTbl[ n ], *aPam.Start(), *aPam.End(), aNewPos);
}
}
if(bMoveCrsr)
- ::PaMCorrAbs(rOldNode, rNewPos, nOffset);
+ {
+ ::PaMCorrAbs(aPam, aNewPos);
+ }
}
void SwDoc::CorrAbs(const SwPaM& rRange,
@@ -352,12 +244,15 @@ void SwDoc::CorrAbs(const SwNodeIndex& rStartNode,
const SwPosition& rNewPos,
BOOL bMoveCrsr)
{
- SwPosition aNewPos(rNewPos);
-
_DelBookmarks(rStartNode, rEndNode);
if(bMoveCrsr)
- ::PaMCorrAbs(rStartNode, rEndNode, rNewPos);
+ {
+ SwCntntNode *const pCntntNode( rEndNode.GetNode().GetCntntNode() );
+ SwPaM const aPam(rStartNode, 0,
+ rEndNode, (pCntntNode) ? pCntntNode->Len() : 0);
+ ::PaMCorrAbs(aPam, rNewPos);
+ }
}
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index f4e80e9de52a..7e18e990d070 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -436,9 +436,8 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
"Was ist das fuer ein MessageItem?" );
SwFieldType* pFldType(0);
- USHORT i;
- for( i = 0; i < pFldTypes->Count(); ++i )
+ for (USHORT i = 0; i < pFldTypes->Count(); ++i)
{
if( RES_TABLEFLD == ( pFldType = (*pFldTypes)[i] )->Which() )
{
@@ -507,13 +506,15 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
// und dann noch alle Tabellen Box Formeln abklappern
const SfxPoolItem* pItem;
- USHORT nMaxItems = GetAttrPool().GetItemCount( RES_BOXATR_FORMULA );
- for( i = 0; i < nMaxItems; ++i )
- if( 0 != (pItem = GetAttrPool().GetItem( RES_BOXATR_FORMULA, i ) ) &&
+ sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_BOXATR_FORMULA );
+ for (sal_uInt32 i = 0; i < nMaxItems; ++i)
+ {
+ if( 0 != (pItem = GetAttrPool().GetItem2( RES_BOXATR_FORMULA, i ) ) &&
((SwTblBoxFormula*)pItem)->GetDefinedIn() )
{
((SwTblBoxFormula*)pItem)->ChangeState( pHt );
}
+ }
// alle Felder/Boxen sind jetzt invalide, also kann das Rechnen anfangen
@@ -608,8 +609,9 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
}
// dann berechene noch die Formeln an den Boxen
- for( i = 0; i < nMaxItems; ++i )
- if( 0 != (pItem = GetAttrPool().GetItem( RES_BOXATR_FORMULA, i ) ) &&
+ for (sal_uInt32 i = 0; i < nMaxItems; ++i )
+ {
+ if( 0 != (pItem = GetAttrPool().GetItem2( RES_BOXATR_FORMULA, i ) ) &&
((SwTblBoxFormula*)pItem)->GetDefinedIn() &&
!((SwTblBoxFormula*)pItem)->IsValid() )
{
@@ -685,6 +687,7 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
}
}
}
+ }
if( pCalc )
delete pCalc;
@@ -1732,7 +1735,6 @@ String lcl_DBDataToString(const SwDBData& rData)
void SwDoc::GetAllUsedDB( SvStringsDtor& rDBNameList,
const SvStringsDtor* pAllDBNames )
{
- USHORT n;
SvStringsDtor aUsedDBNames;
SvStringsDtor aAllDBNames;
@@ -1743,7 +1745,7 @@ void SwDoc::GetAllUsedDB( SvStringsDtor& rDBNameList,
}
SwSectionFmts& rArr = GetSections();
- for( n = rArr.Count(); n; )
+ for (USHORT n = rArr.Count(); n; )
{
SwSection* pSect = rArr[ --n ]->GetSection();
@@ -1757,10 +1759,10 @@ void SwDoc::GetAllUsedDB( SvStringsDtor& rDBNameList,
}
const SfxPoolItem* pItem;
- USHORT nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_FIELD );
- for( n = 0; n < nMaxItems; ++n )
+ sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_FIELD );
+ for (sal_uInt32 n = 0; n < nMaxItems; ++n)
{
- if( 0 == (pItem = GetAttrPool().GetItem( RES_TXTATR_FIELD, n ) ))
+ if( 0 == (pItem = GetAttrPool().GetItem2( RES_TXTATR_FIELD, n ) ))
continue;
const SwFmtFld* pFmtFld = (SwFmtFld*)pItem;
@@ -1916,10 +1918,9 @@ void SwDoc::ChangeDBFields( const SvStringsDtor& rOldNames,
aNewDBData.nCommandType = (short)rNewName.GetToken(2, DB_DELIM).ToInt32();
String sFormel;
- USHORT n;
SwSectionFmts& rArr = GetSections();
- for( n = rArr.Count(); n; )
+ for (USHORT n = rArr.Count(); n; )
{
SwSection* pSect = rArr[ --n ]->GetSection();
@@ -1932,11 +1933,11 @@ void SwDoc::ChangeDBFields( const SvStringsDtor& rOldNames,
}
const SfxPoolItem* pItem;
- USHORT nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_FIELD );
+ sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_FIELD );
- for( n = 0; n < nMaxItems; ++n )
+ for (sal_uInt32 n = 0; n < nMaxItems; ++n )
{
- if( 0 == (pItem = GetAttrPool().GetItem( RES_TXTATR_FIELD, n ) ))
+ if( 0 == (pItem = GetAttrPool().GetItem2( RES_TXTATR_FIELD, n ) ))
continue;
SwFmtFld* pFmtFld = (SwFmtFld*)pItem;
@@ -2329,9 +2330,8 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
SwSectionNode* pSectNd;
USHORT nArrStt = 0;
ULONG nSttCntnt = rDoc.GetNodes().GetEndOfExtras().GetIndex();
- USHORT n;
- for( n = rArr.Count(); n; )
+ for (USHORT n = rArr.Count(); n; )
{
SwSection* pSect = rArr[ --n ]->GetSection();
if( pSect && pSect->IsHidden() && pSect->GetCondition().Len() &&
@@ -2351,13 +2351,13 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
// erst alle anzeigen, damit die Frames vorhanden sind. Mit deren
// Position wird das BodyAnchor ermittelt.
// Dafuer erst den ContentBereich, dann die Sonderbereiche!!!
- for( n = nArrStt; n < aTmpArr.Count(); ++n )
+ for (USHORT n = nArrStt; n < aTmpArr.Count(); ++n)
{
pSectNd = rDoc.GetNodes()[ aTmpArr[ n ] ]->GetSectionNode();
ASSERT( pSectNd, "Wo ist mein SectionNode" );
pSectNd->GetSection().SetCondHidden( FALSE );
}
- for( n = 0; n < nArrStt; ++n )
+ for (USHORT n = 0; n < nArrStt; ++n)
{
pSectNd = rDoc.GetNodes()[ aTmpArr[ n ] ]->GetSectionNode();
ASSERT( pSectNd, "Wo ist mein SectionNode" );
@@ -2365,8 +2365,10 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
}
// so, erst jetzt alle sortiert in die Liste eintragen
- for( n = 0; n < aTmpArr.Count(); ++n )
+ for (USHORT n = 0; n < aTmpArr.Count(); ++n)
+ {
GetBodyNode( *rDoc.GetNodes()[ aTmpArr[ n ] ]->GetSectionNode() );
+ }
}
String sTrue( String::CreateFromAscii(
@@ -2378,10 +2380,10 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
USHORT nWhich, n;
const String* pFormel = 0;
const SfxPoolItem* pItem;
- USHORT nMaxItems = rDoc.GetAttrPool().GetItemCount( RES_TXTATR_FIELD );
+ sal_uInt32 nMaxItems = rDoc.GetAttrPool().GetItemCount2( RES_TXTATR_FIELD );
for( n = 0; n < nMaxItems; ++n )
{
- if( 0 == (pItem = rDoc.GetAttrPool().GetItem( RES_TXTATR_FIELD, n )) )
+ if( 0 == (pItem = rDoc.GetAttrPool().GetItem2( RES_TXTATR_FIELD, n )) )
continue;
const SwFmtFld* pFmtFld = (SwFmtFld*)pItem;
@@ -2464,24 +2466,26 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
{
SwDBData aDBData(((SwDBNumSetField*)pFld)->GetDBData(&rDoc));
- if( bIsDBMgr &&
- rDoc.GetNewDBMgr()->OpenDataSource( aDBData.sDataSource, aDBData.sCommand )&&
- GETFLD_ALL == eGetMode ||
- ( GETFLD_CALC & eGetMode &&
- ((SwDBNumSetField*)pFld)->IsCondValid()))
+ if (
+ (bIsDBMgr && rDoc.GetNewDBMgr()->OpenDataSource(aDBData.sDataSource, aDBData.sCommand)) &&
+ (GETFLD_ALL == eGetMode || (GETFLD_CALC & eGetMode && ((SwDBNumSetField*)pFld)->IsCondValid()))
+ )
+ {
pFormel = &pFld->GetPar1();
+ }
}
break;
case RES_DBNEXTSETFLD:
{
SwDBData aDBData(((SwDBNextSetField*)pFld)->GetDBData(&rDoc));
- if( bIsDBMgr &&
- rDoc.GetNewDBMgr()->OpenDataSource( aDBData.sDataSource, aDBData.sCommand )&&
- GETFLD_ALL == eGetMode ||
- ( GETFLD_CALC & eGetMode &&
- ((SwDBNextSetField*)pFld)->IsCondValid() ))
+ if (
+ (bIsDBMgr && rDoc.GetNewDBMgr()->OpenDataSource(aDBData.sDataSource, aDBData.sCommand)) &&
+ (GETFLD_ALL == eGetMode || (GETFLD_CALC & eGetMode && ((SwDBNextSetField*)pFld)->IsCondValid()))
+ )
+ {
pFormel = &pFld->GetPar1();
+ }
}
break;
}
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index d971ac0c51fe..eba51c0354f8 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -1347,9 +1347,9 @@ void SwDoc::SetDefault( const SfxItemSet& rSet )
nOldWidth = ((SvxTabStopItem&)aOld.Get(RES_PARATR_TABSTOP))[ 0 ].GetTabPos();
int bChg = FALSE;
- USHORT nMaxItems = GetAttrPool().GetItemCount( RES_PARATR_TABSTOP );
- for( USHORT n = 0; n < nMaxItems; ++n )
- if( 0 != (pTmpItem = GetAttrPool().GetItem( RES_PARATR_TABSTOP, n ) ))
+ sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_PARATR_TABSTOP );
+ for( sal_uInt32 n = 0; n < nMaxItems; ++n )
+ if( 0 != (pTmpItem = GetAttrPool().GetItem2( RES_PARATR_TABSTOP, n ) ))
bChg |= lcl_SetNewDefTabStops( nOldWidth, nNewWidth,
*(SvxTabStopItem*)pTmpItem );
diff --git a/sw/source/core/doc/docftn.cxx b/sw/source/core/doc/docftn.cxx
index 61bab9fdd525..306f7b3dfcc8 100644
--- a/sw/source/core/doc/docftn.cxx
+++ b/sw/source/core/doc/docftn.cxx
@@ -333,10 +333,15 @@ void SwDoc::SetEndNoteInfo(const SwEndNoteInfo& rInfo)
}
BOOL bNumChg = rInfo.nFtnOffset != GetEndNoteInfo().nFtnOffset;
- BOOL bExtra = !bNumChg &&
- rInfo.aFmt.GetNumberingType() != GetEndNoteInfo().aFmt.GetNumberingType()||
- rInfo.GetPrefix() != GetEndNoteInfo().GetPrefix() ||
- rInfo.GetSuffix() != GetEndNoteInfo().GetSuffix();
+ // this seems to be an optimization: UpdateAllFtn() is only called
+ // if the offset changes; if the offset is the same,
+ // but type/prefix/suffix changes, just set new numbers.
+ bool const bExtra = !bNumChg &&
+ ( (rInfo.aFmt.GetNumberingType() !=
+ GetEndNoteInfo().aFmt.GetNumberingType())
+ || (rInfo.GetPrefix() != GetEndNoteInfo().GetPrefix())
+ || (rInfo.GetSuffix() != GetEndNoteInfo().GetSuffix())
+ );
BOOL bFtnDesc = rInfo.GetPageDesc( *this ) !=
GetEndNoteInfo().GetPageDesc( *this );
SwCharFmt *pOldChrFmt = GetEndNoteInfo().GetCharFmt( *this ),
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 1b3d5fe6eb55..ebd93bbfd692 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -835,8 +835,8 @@ void SwDoc::ClearDoc()
pFirstNd->SetAttr( SwFmtPageDesc( pDummyPgDsc ));
SwPosition aPos( *pFirstNd, SwIndex( pFirstNd ));
- ::PaMCorrAbs( aSttIdx, SwNodeIndex( GetNodes().GetEndOfContent() ),
- aPos );
+ SwPaM const tmpPaM(aSttIdx, SwNodeIndex(GetNodes().GetEndOfContent()));
+ ::PaMCorrAbs(tmpPaM, aPos);
}
GetNodes().Delete( aSttIdx,
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index 1224c5c02f17..6ba37816b0dc 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -1092,7 +1092,23 @@ void SwDoc::SetNumRule( const SwPaM& rPam,
{
SvUShortsSort aResetAttrsArray;
aResetAttrsArray.Insert( RES_LR_SPACE );
- ResetAttrs( rPam, sal_True, &aResetAttrsArray );
+ // --> OD 2010-10-05 #i114929#
+ // On a selection setup a corresponding Point-and-Mark in order to get
+ // the indentation attribute reset on all paragraphs touched by the selection
+ if ( rPam.HasMark() &&
+ rPam.End()->nNode.GetNode().GetTxtNode() )
+ {
+ SwPaM aPam( rPam.Start()->nNode,
+ rPam.End()->nNode );
+ aPam.Start()->nContent = 0;
+ aPam.End()->nContent = rPam.End()->nNode.GetNode().GetTxtNode()->Len();
+ ResetAttrs( aPam, FALSE, &aResetAttrsArray );
+ }
+ else
+ {
+ ResetAttrs( rPam, FALSE, &aResetAttrsArray );
+ }
+ // <--
}
// <--
@@ -1104,22 +1120,27 @@ void SwDoc::SetNumRule( const SwPaM& rPam,
void SwDoc::SetCounted(const SwPaM & rPam, bool bCounted)
{
- // --> OD 2008-04-03 #refactorlists#
-// ULONG nStartPos = rPam.Start()->nNode.GetIndex();
-// ULONG nEndPos = rPam.End()->nNode.GetIndex();
-
-// for (ULONG n = nStartPos; n <= nEndPos; n++)
-// {
-// SwTxtNode * pNd = GetNodes()[n]->GetTxtNode();
-
-// if (pNd)
-// pNd->SetCountedInList(bCounted);
-// }
if ( bCounted )
{
SvUShortsSort aResetAttrsArray;
aResetAttrsArray.Insert( RES_PARATR_LIST_ISCOUNTED );
- ResetAttrs( rPam, sal_True, &aResetAttrsArray );
+ // --> OD 2010-10-05 #i114929#
+ // On a selection setup a corresponding Point-and-Mark in order to get
+ // the list-is-counted attribute reset on all paragraphs touched by the selection
+ if ( rPam.HasMark() &&
+ rPam.End()->nNode.GetNode().GetTxtNode() )
+ {
+ SwPaM aPam( rPam.Start()->nNode,
+ rPam.End()->nNode );
+ aPam.Start()->nContent = 0;
+ aPam.End()->nContent = rPam.End()->nNode.GetNode().GetTxtNode()->Len();
+ ResetAttrs( aPam, FALSE, &aResetAttrsArray );
+ }
+ else
+ {
+ ResetAttrs( rPam, FALSE, &aResetAttrsArray );
+ }
+ // <--
}
else
{
@@ -1128,30 +1149,6 @@ void SwDoc::SetCounted(const SwPaM & rPam, bool bCounted)
}
}
-//void SwDoc::ReplaceNumRule(const SwPaM & rPaM, const SwNumRule & rNumRule)
-//{
-// if (DoesUndo())
-// StartUndo(UNDO_START, NULL);
-
-// ULONG nStt = rPaM.Start()->nNode.GetIndex();
-// ULONG nEnd = rPaM.End()->nNode.GetIndex();
-
-// for (ULONG n = nStt; n <= nEnd; n++)
-// {
-// SwTxtNode * pCNd = GetNodes()[n]->GetTxtNode();
-
-// if (pCNd && NULL != pCNd->GetNumRule())
-// {
-// SwPaM aPam(*pCNd);
-
-// InsertPoolItem(aPam, SwNumRuleItem(rNumRule.GetName()), 0);
-// }
-// }
-
-// if (DoesUndo())
-// EndUndo(UNDO_START, NULL);
-//}
-
void SwDoc::SetNumRuleStart( const SwPosition& rPos, BOOL bFlag )
{
SwTxtNode* pTxtNd = rPos.nNode.GetNode().GetTxtNode();
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index 58b3e084cf7a..e144c47ee9a1 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -110,9 +110,9 @@ USHORT SwDoc::GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const
const SwTxtTOXMark* pMark;
const SfxPoolItem* pItem;
const SwTOXType* pTOXType;
- USHORT i, nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_TOXMARK );
+ sal_uInt32 i, nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_TOXMARK );
for( i = 0; i < nMaxItems; ++i )
- if( 0 != (pItem = GetAttrPool().GetItem( RES_TXTATR_TOXMARK, i ) ) &&
+ if( 0 != (pItem = GetAttrPool().GetItem2( RES_TXTATR_TOXMARK, i ) ) &&
0!= ( pTOXType = ((SwTOXMark*)pItem)->GetTOXType()) &&
TOX_INDEX == pTOXType->GetType() &&
0 != ( pMark = ((SwTOXMark*)pItem)->GetTxtTOXMark() ) &&
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index bb10e9c1941b..e967e7f33fa8 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -71,9 +71,7 @@
#include <poolfmt.hxx>
#include <mdiexp.hxx>
#include <swwait.hxx>
-#ifndef _COMCORE_HRC
#include <comcore.hrc>
-#endif
#include <accessibilityoptions.hxx>
#include <com/sun/star/embed/EmbedMisc.hpp>
#include <com/sun/star/embed/EmbedStates.hpp>
@@ -266,7 +264,7 @@ void lcl_ClearArea( const SwFrm &rFrm,
|*
*************************************************************************/
-void SwNoTxtFrm::Paint( const SwRect &rRect, const SwPrtOptions * /*pPrintData*/ ) const
+void SwNoTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
{
if ( Frm().IsEmpty() )
return;
diff --git a/sw/source/core/doc/visiturl.cxx b/sw/source/core/doc/visiturl.cxx
index 0bea7c73f65b..322d27d7a859 100644
--- a/sw/source/core/doc/visiturl.cxx
+++ b/sw/source/core/doc/visiturl.cxx
@@ -71,9 +71,9 @@ void SwURLStateChanged::Notify( SfxBroadcaster& , const SfxHint& rHint )
const SwFmtINetFmt* pItem;
const SwTxtINetFmt* pTxtAttr;
const SwTxtNode* pTxtNd;
- USHORT n, nMaxItems = pDoc->GetAttrPool().GetItemCount( RES_TXTATR_INETFMT );
+ sal_uInt32 n, nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_INETFMT );
for( n = 0; n < nMaxItems; ++n )
- if( 0 != (pItem = (SwFmtINetFmt*)pDoc->GetAttrPool().GetItem(
+ if( 0 != (pItem = (SwFmtINetFmt*)pDoc->GetAttrPool().GetItem2(
RES_TXTATR_INETFMT, n ) ) &&
( pItem->GetValue() == sURL ||
( sBkmk.Len() && pItem->GetValue() == sBkmk )) &&
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index f0683ae700a5..588ef88f7740 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -2126,9 +2126,10 @@ BOOL SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
*aSavePaM.GetMark() = SwPosition( *pTblNd );
aSavePaM.Move( fnMoveBackward, fnGoNode );
}
- ::PaMCorrAbs( SwNodeIndex( *pTblNd ),
- SwNodeIndex( *pTblNd->EndOfSectionNode() ),
- *aSavePaM.GetMark() );
+ {
+ SwPaM const tmpPaM(*pTblNd, *pTblNd->EndOfSectionNode());
+ ::PaMCorrAbs(tmpPaM, *aSavePaM.GetMark());
+ }
// harte SeitenUmbrueche am nachfolgenden Node verschieben
BOOL bSavePageBreak = FALSE, bSavePageDesc = FALSE;
@@ -2182,9 +2183,10 @@ BOOL SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
*aSavePaM.GetMark() = SwPosition( *pTblNd );
aSavePaM.Move( fnMoveBackward, fnGoNode );
}
- ::PaMCorrAbs( SwNodeIndex( *pTblNd ),
- SwNodeIndex( *pTblNd->EndOfSectionNode() ),
- *aSavePaM.GetMark() );
+ {
+ SwPaM const tmpPaM(*pTblNd, *pTblNd->EndOfSectionNode());
+ ::PaMCorrAbs(tmpPaM, *aSavePaM.GetMark());
+ }
// harte SeitenUmbrueche am nachfolgenden Node verschieben
SwCntntNode* pNextNd = GetNodes()[ pTblNd->EndOfSectionIndex()+1 ]->GetCntntNode();
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index f1ab04ed0c09..1eb673f241d4 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -740,9 +740,9 @@ const SwPageDesc* SwNode::FindPageDesc( BOOL bCalcLay,
SwFindNearestNode aInfo( *pNd );
// dann ueber alle Nodes aller PageDesc
const SfxPoolItem* pItem;
- USHORT i, nMaxItems = pDoc->GetAttrPool().GetItemCount( RES_PAGEDESC );
+ sal_uInt32 i, nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_PAGEDESC );
for( i = 0; i < nMaxItems; ++i )
- if( 0 != (pItem = pDoc->GetAttrPool().GetItem( RES_PAGEDESC, i ) ) &&
+ if( 0 != (pItem = pDoc->GetAttrPool().GetItem2( RES_PAGEDESC, i ) ) &&
((SwFmtPageDesc*)pItem)->GetDefinedIn() )
{
const SwModify* pMod = ((SwFmtPageDesc*)pItem)->GetDefinedIn();
diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx
index 31c4a7dfea3e..f1f288f99d06 100644
--- a/sw/source/core/edit/edattr.cxx
+++ b/sw/source/core/edit/edattr.cxx
@@ -457,7 +457,7 @@ BOOL lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
const SwField* const pFld = pAttr->GetFld().GetFld();
if (pFld)
{
- sExp += pFld->ExpandField(rTNd.GetDoc()->IsClipBoard());
+ sExp += pFld->ExpandField(true);
}
}
}
diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx
index 1e4f699fa203..aa84aa480121 100644
--- a/sw/source/core/edit/edfld.cxx
+++ b/sw/source/core/edit/edfld.cxx
@@ -224,8 +224,7 @@ void SwEditShell::FieldToText( SwFieldType* pType )
*pFmtFld->GetTxtFld()->GetStart() );
// Feldinhalt durch Text ersetzen
- String const aEntry(
- pFmtFld->GetFld()->ExpandField(GetDoc()->IsClipBoard()) );
+ String const aEntry( pFmtFld->GetFld()->ExpandField(true) );
pPaM->SetMark();
pPaM->Move( fnMoveForward );
GetDoc()->DeleteRange( *pPaM );
@@ -342,11 +341,11 @@ SwTxtFld* lcl_FindInputFld( SwDoc* pDoc, SwField& rFld )
((SwSetExpField&)rFld).GetInputFlag() ) )
{
const SfxPoolItem* pItem;
- USHORT n, nMaxItems =
- pDoc->GetAttrPool().GetItemCount( RES_TXTATR_FIELD );
+ sal_uInt32 n, nMaxItems =
+ pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_FIELD );
for( n = 0; n < nMaxItems; ++n )
if( 0 != (pItem =
- pDoc->GetAttrPool().GetItem( RES_TXTATR_FIELD, n ) )
+ pDoc->GetAttrPool().GetItem2( RES_TXTATR_FIELD, n ) )
&& ((SwFmtFld*)pItem)->GetFld() == &rFld )
{
pTFld = ((SwFmtFld*)pItem)->GetTxtFld();
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index 32ab9fa07e94..7a143a2d29d9 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -1184,32 +1184,6 @@ void SwEditShell::TransliterateText( sal_uInt32 nType )
EndAllAction();
}
-void SwEditShell::TransliterateText( const String& rModuleName )
-{
- utl::TransliterationWrapper aTrans(::comphelper::getProcessServiceFactory(), 0 );
- aTrans.loadModuleByImplName( rModuleName, LANGUAGE_SYSTEM );
- StartAllAction();
- SET_CURR_SHELL( this );
-
- SwPaM* pCrsr = GetCrsr();
- if( pCrsr->GetNext() != pCrsr )
- {
- GetDoc()->StartUndo(UNDO_EMPTY, NULL);
- FOREACHPAM_START( this )
-
- if( PCURCRSR->HasMark() )
- GetDoc()->TransliterateText( *PCURCRSR, aTrans );
-
- FOREACHPAM_END()
- GetDoc()->EndUndo(UNDO_EMPTY, NULL);
- }
- else
- GetDoc()->TransliterateText( *pCrsr, aTrans );
-
- EndAllAction();
-}
-
-
void SwEditShell::CountWords( SwDocStat& rStat ) const
{
FOREACHPAM_START( this )
diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx
index 230e45f71079..b1188588fe4d 100644
--- a/sw/source/core/edit/edtox.cxx
+++ b/sw/source/core/edit/edtox.cxx
@@ -234,25 +234,6 @@ BOOL SwEditShell::UpdateTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet )
return bRet;
}
-BOOL SwEditShell::UpdateField( sw::mark::IFieldmark &fieldBM)
-{
-// SwDocShell* pDocSh = pDoc->GetDocShell();
- //@TODO implement me...; add undo etc...
- if ( pDoc && fieldBM.IsExpanded( ) ) {
- SwPosition aSttPos = fieldBM.GetMarkStart( );
- aSttPos.nContent++;
-
- SwPosition aEndPos = fieldBM.GetMarkEnd( );
- aEndPos.nContent--;
-
- SwPaM aPaM( aSttPos, aEndPos );
- pDoc->DeleteRange(aPaM);
- pDoc->InsertString(aPaM, String::CreateFromAscii("Implement me ;-)") );
- }
- return TRUE;
-}
-
-
/*--------------------------------------------------------------------
Beschreibung: Aktuelles Verzeichnis vor oder in dem der Cursor
steht
diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx
index 182ed12d6ddd..36b981b90752 100644
--- a/sw/source/core/fields/cellfml.cxx
+++ b/sw/source/core/fields/cellfml.cxx
@@ -203,7 +203,7 @@ double SwTableBox::GetValue( SwTblCalcPara& rCalcPara ) const
break;
default:
- String const value(pFld->ExpandField(pDoc->IsClipBoard()));
+ String const value(pFld->ExpandField(true));
nRet = rCalcPara.rCalc.Calculate(value).GetDouble();
}
}
diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx
index 15c44286921c..ec3f5200ba67 100644
--- a/sw/source/core/fields/dbfld.cxx
+++ b/sw/source/core/fields/dbfld.cxx
@@ -28,7 +28,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <float.h>
#include <sfx2/app.hxx>
#include <svl/zforlist.hxx>
@@ -44,15 +43,11 @@
#include <pam.hxx>
#include <ndtxt.hxx>
#include <dbfld.hxx>
-#ifndef _DBMGR_HXX
#include <dbmgr.hxx>
-#endif
#include <docfld.hxx>
#include <expfld.hxx>
#include <txtatr.hxx>
-#ifndef _UNOFLDMID_H
#include <unofldmid.h>
-#endif
using namespace ::com::sun::star::sdbc;
@@ -281,27 +276,23 @@ SwField* SwDBField::Copy() const
return pTmp;
}
-String SwDBField::GetCntnt(BOOL bName) const
+String SwDBField::GetFieldName() const
{
- if(bName)
- {
- const String& rDBName = ((SwDBFieldType*)GetTyp())->GetName();
+ const String& rDBName = static_cast<SwDBFieldType*>(GetTyp())->GetName();
//TODO/CLEANUP
//Funktion tut nichts!
//String sContent( SFX_APP()->LocalizeDBName(INI2NATIONAL,
// rDBName.GetToken(0, DB_DELIM)));
- String sContent( rDBName.GetToken(0, DB_DELIM) );
+ String sContent( rDBName.GetToken(0, DB_DELIM) );
- if (sContent.Len() > 1)
- {
- sContent += DB_DELIM;
- sContent += rDBName.GetToken(1, DB_DELIM);
- sContent += DB_DELIM;
- sContent += rDBName.GetToken(2, DB_DELIM);
- }
- return lcl_DBTrennConv(sContent);
+ if (sContent.Len() > 1)
+ {
+ sContent += DB_DELIM;
+ sContent += rDBName.GetToken(1, DB_DELIM);
+ sContent += DB_DELIM;
+ sContent += rDBName.GetToken(2, DB_DELIM);
}
- return Expand();
+ return lcl_DBTrennConv(sContent);
}
//------------------------------------------------------------------------------
@@ -547,19 +538,15 @@ void SwDBNameInfField::SetDBData(const SwDBData & rDBData)
//------------------------------------------------------------------------------
-String SwDBNameInfField::GetCntnt(BOOL bName) const
+String SwDBNameInfField::GetFieldName() const
{
- String sStr(SwField::GetCntnt(bName));
-
- if(bName)
+ String sStr( SwField::GetFieldName() );
+ if (aDBData.sDataSource.getLength())
{
- if (aDBData.sDataSource.getLength())
- {
- sStr += ':';
- sStr += String(aDBData.sDataSource);
- sStr += DB_DELIM;
- sStr += String(aDBData.sCommand);
- }
+ sStr += ':';
+ sStr += String(aDBData.sDataSource);
+ sStr += DB_DELIM;
+ sStr += String(aDBData.sCommand);
}
return lcl_DBTrennConv(sStr);
}
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index fba7115075e8..f6b727987cd3 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -171,9 +171,9 @@ void SwPageNumberFieldType::ChangeExpansion( SwDoc* pDoc, sal_uInt16 nPage,
// es NIE zurueck
const SfxItemPool &rPool = pDoc->GetAttrPool();
const SwFmtPageDesc *pDesc;
- sal_uInt16 nMaxItems = rPool.GetItemCount( RES_PAGEDESC );
- for( sal_uInt16 n = 0; n < nMaxItems; ++n )
- if( 0 != (pDesc = (SwFmtPageDesc*)rPool.GetItem( RES_PAGEDESC, n ) )
+ sal_uInt32 nMaxItems = rPool.GetItemCount2( RES_PAGEDESC );
+ for( sal_uInt32 n = 0; n < nMaxItems; ++n )
+ if( 0 != (pDesc = (SwFmtPageDesc*)rPool.GetItem2( RES_PAGEDESC, n ) )
&& pDesc->GetNumOffset() && pDesc->GetDefinedIn() )
{
if( pDesc->GetDefinedIn()->ISA( SwCntntNode ))
@@ -1198,30 +1198,30 @@ String SwDocInfoField::Expand() const
/* ---------------------------------------------------------------------------
---------------------------------------------------------------------------*/
-String SwDocInfoField::GetCntnt(sal_Bool bName) const
+String SwDocInfoField::GetFieldName() const
{
- if ( bName )
- {
- String aStr(SwFieldType::GetTypeStr(GetTypeId()));
- aStr += ':';
+ String aStr(SwFieldType::GetTypeStr(GetTypeId()));
+ aStr += ':';
- sal_uInt16 nSub = nSubType & 0xff;
+ sal_uInt16 const nSub = nSubType & 0xff;
- switch(nSub)
- {
- case DI_CUSTOM:
- aStr += aName;
- break;
+ switch (nSub)
+ {
+ case DI_CUSTOM:
+ aStr += aName;
+ break;
- default:
- aStr += *ViewShell::GetShellRes()->aDocInfoLst[ nSub - DI_SUBTYPE_BEGIN ];
- break;
- }
- if( IsFixed() )
- ( aStr += ' ' ) += ViewShell::GetShellRes()->aFixedStr;
- return aStr;
+ default:
+ aStr += *ViewShell::GetShellRes()
+ ->aDocInfoLst[ nSub - DI_SUBTYPE_BEGIN ];
+ break;
}
- return Expand();
+ if (IsFixed())
+ {
+ aStr += ' ';
+ aStr += ViewShell::GetShellRes()->aFixedStr;
+ }
+ return aStr;
}
/* ---------------------------------------------------------------------------
@@ -1517,25 +1517,20 @@ void SwHiddenTxtField::Evaluate(SwDoc* pDoc)
/* ---------------------------------------------------------------------------
---------------------------------------------------------------------------*/
-String SwHiddenTxtField::GetCntnt(sal_Bool bName) const
+String SwHiddenTxtField::GetFieldName() const
{
- if ( bName )
- {
- String aStr(SwFieldType::GetTypeStr(nSubType));
- aStr += ' ';
- aStr += aCond;
- aStr += ' ';
- aStr += aTRUETxt;
+ String aStr(SwFieldType::GetTypeStr(nSubType));
+ aStr += ' ';
+ aStr += aCond;
+ aStr += ' ';
+ aStr += aTRUETxt;
- if(nSubType == TYP_CONDTXTFLD)
- {
-static char __READONLY_DATA cTmp[] = " : ";
- aStr.AppendAscii(cTmp);
- aStr += aFALSETxt;
- }
- return aStr;
+ if (nSubType == TYP_CONDTXTFLD)
+ {
+ aStr.AppendAscii(" : ");
+ aStr += aFALSETxt;
}
- return Expand();
+ return aStr;
}
/* ---------------------------------------------------------------------------
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index 25b0cf932e83..e55c8598cf90 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -305,18 +305,15 @@ String SwGetExpField::Expand() const
return sExpand;
}
-String SwGetExpField::GetCntnt(BOOL bName) const
-{
- if ( bName )
- {
- String aStr( SwFieldType::GetTypeStr( static_cast<USHORT>(nsSwGetSetExpType::GSE_FORMULA & nSubType
- ? TYP_FORMELFLD
- : TYP_GETFLD ) ));
- aStr += ' ';
- aStr += GetFormula();
- return aStr;
- }
- return Expand();
+String SwGetExpField::GetFieldName() const
+{
+ String aStr( SwFieldType::GetTypeStr(
+ static_cast<USHORT>(((nsSwGetSetExpType::GSE_FORMULA & nSubType) != 0)
+ ? TYP_FORMELFLD
+ : TYP_GETFLD ) ));
+ aStr += ' ';
+ aStr += GetFormula();
+ return aStr;
}
SwField* SwGetExpField::Copy() const
@@ -834,35 +831,28 @@ String SwSetExpField::Expand() const
}
/*--------------------------------------------------------------------
- Beschreibung: liefert den Namen oder den Inhalt
+ @return the field name
--------------------------------------------------------------------*/
-String SwSetExpField::GetCntnt(BOOL bName) const
+String SwSetExpField::GetFieldName() const
{
- if( bName )
- {
- USHORT nStrType;
-
- if( IsSequenceFld() )
- nStrType = TYP_SEQFLD;
- else if( bInput )
- nStrType = TYP_SETINPFLD;
- else
- nStrType = TYP_SETFLD;
+ SwFldTypesEnum const nStrType( (IsSequenceFld())
+ ? TYP_SEQFLD
+ : (bInput)
+ ? TYP_SETINPFLD
+ : TYP_SETFLD );
- String aStr( SwFieldType::GetTypeStr( nStrType ) );
- aStr += ' ';
- aStr += GetTyp()->GetName();
+ String aStr( SwFieldType::GetTypeStr( static_cast<USHORT>(nStrType) ) );
+ aStr += ' ';
+ aStr += GetTyp()->GetName();
- if( TYP_SEQFLD != nStrType )
- {
- // Sequence nicht die Formel ausgeben
- aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " = " ));
- aStr += GetFormula();
- }
- return aStr;
+ // Sequence: without formula
+ if (TYP_SEQFLD != nStrType)
+ {
+ aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " = " ) );
+ aStr += GetFormula();
}
- return Expand();
+ return aStr;
}
SwField* SwSetExpField::Copy() const
@@ -1021,20 +1011,16 @@ SwInputField::SwInputField(SwInputFieldType* pTyp, const String& rContent,
{
}
-String SwInputField::GetCntnt(BOOL bName) const
+String SwInputField::GetFieldName() const
{
- if ( bName )
+ String aStr(SwField::GetFieldName());
+ if ((nSubType & 0x00ff) == INP_USR)
{
- String aStr(SwField::GetCntnt(bName));
- if ((nSubType & 0x00ff) == INP_USR)
- {
- aStr += GetTyp()->GetName();
- aStr += ' ';
- aStr += aContent;
- }
- return aStr;
+ aStr += GetTyp()->GetName();
+ aStr += ' ';
+ aStr += aContent;
}
- return Expand();
+ return aStr;
}
SwField* SwInputField::Copy() const
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx
index e35c27d0464b..6ffe675c760a 100644
--- a/sw/source/core/fields/fldbas.cxx
+++ b/sw/source/core/fields/fldbas.cxx
@@ -28,16 +28,12 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-// #include <math.h>
#include <float.h>
#include <rtl/math.hxx>
#include <svl/zforlist.hxx>
#include <svl/zformat.hxx>
#include <editeng/unolingu.hxx>
-#ifndef _UNOFLDMID_H
#include <unofldmid.h>
-#endif
#include <doc.hxx>
#include <editsh.hxx>
#include <frame.hxx>
@@ -53,9 +49,7 @@
#include <expfld.hxx>
#include <shellres.hxx>
#include <calc.hxx>
-#ifndef _COMCORE_HRC
#include <comcore.hrc>
-#endif
#include <math.h>
#include <float.h>
@@ -269,21 +263,20 @@ USHORT SwField::GetTypeId() const
Beschreibung: liefert den Namen oder den Inhalt
--------------------------------------------------------------------*/
-String SwField::GetCntnt( BOOL bName ) const
+String SwField::GetFieldName() const
{
- String sRet;
- if( bName )
+ USHORT nTypeId = GetTypeId();
+ if (RES_DATETIMEFLD == GetTyp()->Which())
{
- USHORT nTypeId = GetTypeId();
- if( RES_DATETIMEFLD == GetTyp()->Which() )
- nTypeId = static_cast<USHORT>(GetSubType() & DATEFLD ? TYP_DATEFLD : TYP_TIMEFLD);
-
- sRet = SwFieldType::GetTypeStr( nTypeId );
- if( IsFixed() )
- ( sRet += ' ' ) += ViewShell::GetShellRes()->aFixedStr;
+ nTypeId = static_cast<USHORT>(
+ ((GetSubType() & DATEFLD) != 0) ? TYP_DATEFLD : TYP_TIMEFLD);
+ }
+ String sRet = SwFieldType::GetTypeStr( nTypeId );
+ if (IsFixed())
+ {
+ sRet += ' ';
+ sRet += ViewShell::GetShellRes()->aFixedStr;
}
- else
- sRet = Expand();
return sRet;
}
@@ -434,9 +427,9 @@ BOOL SwField::IsFixed() const
return bRet;
}
-String SwField::ExpandField(bool const bInClipboard) const
+String SwField::ExpandField(bool const bCached) const
{
- if (!bInClipboard) // #i85766# do not expand fields in clipboard documents
+ if (!bCached) // #i85766# do not expand fields in clipboard documents
{
m_Cache = Expand();
}
@@ -447,7 +440,8 @@ SwField * SwField::CopyField() const
{
SwField *const pNew = Copy();
// #i85766# cache expansion of source (for clipboard)
- pNew->m_Cache = Expand();
+ // use this->cache, not this->Expand(): only text formatting calls Expand()
+ pNew->m_Cache = m_Cache;
return pNew;
}
diff --git a/sw/source/core/fields/macrofld.cxx b/sw/source/core/fields/macrofld.cxx
index 70a0d2dcf689..f77bcf1fd457 100644
--- a/sw/source/core/fields/macrofld.cxx
+++ b/sw/source/core/fields/macrofld.cxx
@@ -28,20 +28,19 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <hintids.hxx>
#include <doc.hxx>
#include <docufld.hxx>
-#ifndef _UNOFLDMID_H
#include <unofldmid.h>
-#endif
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/uri/XUriReferenceFactory.hpp>
#include <com/sun/star/uri/XVndSunStarScriptUrl.hpp>
#include <comphelper/processfactory.hxx>
+
using namespace ::com::sun::star;
using ::rtl::OUString;
+
/*--------------------------------------------------------------------
Beschreibung: MacroFeldtypen
--------------------------------------------------------------------*/
@@ -79,16 +78,12 @@ SwField* SwMacroField::Copy() const
return new SwMacroField((SwMacroFieldType*)GetTyp(), aMacro, aText);
}
-String SwMacroField::GetCntnt(BOOL bName) const
+String SwMacroField::GetFieldName() const
{
- if(bName)
- {
- String aStr(GetTyp()->GetName());
- aStr += ' ';
- aStr += aMacro;
- return aStr;
- }
- return Expand();
+ String aStr(GetTyp()->GetName());
+ aStr += ' ';
+ aStr += aMacro;
+ return aStr;
}
String SwMacroField::GetLibName() const
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 8b03b7e54664..1af598eb4e46 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -62,18 +62,12 @@
// <--
#include <ftnidx.hxx>
#include <viewsh.hxx>
-#ifndef _UNOFLDMID_H
#include <unofldmid.h>
-#endif
#include <SwStyleNameMapper.hxx>
#include <shellres.hxx>
#include <poolfmt.hxx>
-#ifndef _POOLFMT_HRC
#include <poolfmt.hrc>
-#endif
-#ifndef _COMCORE_HRC
#include <comcore.hrc>
-#endif
#include <numrule.hxx>
#include <SwNodeNum.hxx>
@@ -280,11 +274,8 @@ String SwGetRefField::Expand() const
}
-String SwGetRefField::GetCntnt(BOOL bName) const
+String SwGetRefField::GetFieldName() const
{
- if( !bName )
- return Expand();
-
String aStr(GetTyp()->GetName());
aStr += ' ';
aStr += sSetRefName;
diff --git a/sw/source/core/fields/tblcalc.cxx b/sw/source/core/fields/tblcalc.cxx
index ae340b9a7ba5..abaacf8abc9e 100644
--- a/sw/source/core/fields/tblcalc.cxx
+++ b/sw/source/core/fields/tblcalc.cxx
@@ -37,9 +37,8 @@
#include <txtfld.hxx>
#include <expfld.hxx>
#include <docfld.hxx> // fuer _SetGetExpFld
-#ifndef _UNOFLDMID_H
#include <unofldmid.h>
-#endif
+
using namespace ::com::sun::star;
using ::rtl::OUString;
@@ -91,22 +90,12 @@ SwField* SwTblField::Copy() const
}
-String SwTblField::GetCntnt(BOOL bName) const
+String SwTblField::GetFieldName() const
{
- if( bName )
- {
- String aStr(GetTyp()->GetName());
- aStr += ' ';
-
- USHORT nOldSubType = nSubType;
- SwTblField* pThis = (SwTblField*)this;
- pThis->nSubType |= nsSwExtendedSubType::SUB_CMD;
- aStr += Expand();
- pThis->nSubType = nOldSubType;
-
- return aStr;
- }
- return Expand();
+ String aStr(GetTyp()->GetName());
+ aStr += ' ';
+ aStr += const_cast<SwTblField *>(this)->GetCommand();
+ return aStr;
}
// suche den TextNode, in dem das Feld steht
@@ -127,21 +116,28 @@ const SwNode* SwTblField::GetNodeOfFormula() const
return 0;
}
+String SwTblField::GetCommand()
+{
+ if (EXTRNL_NAME != GetNameType())
+ {
+ SwNode const*const pNd = GetNodeOfFormula();
+ SwTableNode const*const pTblNd = (pNd) ? pNd->FindTableNode() : 0;
+ if (pTblNd)
+ {
+ PtrToBoxNm( &pTblNd->GetTable() );
+ }
+ }
+ return (EXTRNL_NAME == GetNameType())
+ ? SwTableFormula::GetFormula()
+ : String();
+}
String SwTblField::Expand() const
{
String aStr;
if (nSubType & nsSwExtendedSubType::SUB_CMD)
{
- if( EXTRNL_NAME != GetNameType() )
- {
- const SwNode* pNd = GetNodeOfFormula();
- const SwTableNode* pTblNd = pNd ? pNd->FindTableNode() : 0;
- if( pTblNd )
- ((SwTblField*)this)->PtrToBoxNm( &pTblNd->GetTable() );
- }
- if( EXTRNL_NAME == GetNameType() )
- aStr = SwTableFormula::GetFormula();
+ aStr = const_cast<SwTblField *>(this)->GetCommand();
}
else
{
diff --git a/sw/source/core/fields/usrfld.cxx b/sw/source/core/fields/usrfld.cxx
index f9437cd0fbd5..ccb10ca03ee1 100644
--- a/sw/source/core/fields/usrfld.cxx
+++ b/sw/source/core/fields/usrfld.cxx
@@ -40,12 +40,12 @@
#include <doc.hxx>
#include <editsh.hxx>
#include <dpage.hxx>
-#ifndef _UNOFLDMID_H
#include <unofldmid.h>
-#endif
+
using namespace ::com::sun::star;
using ::rtl::OUString;
+
/*--------------------------------------------------------------------
Beschreibung: Benutzerfelder
--------------------------------------------------------------------*/
@@ -72,17 +72,14 @@ SwField* SwUserField::Copy() const
return pTmp;
}
-String SwUserField::GetCntnt(sal_Bool bName) const
+String SwUserField::GetFieldName() const
{
- if ( bName )
- { String aStr(SwFieldType::GetTypeStr(TYP_USERFLD));
- aStr += ' ';
- aStr += GetTyp()->GetName();
- aStr.AppendAscii(" = ");
- aStr += ((SwUserFieldType*)GetTyp())->GetContent();
- return aStr;
- }
- return Expand();
+ String aStr(SwFieldType::GetTypeStr(TYP_USERFLD));
+ aStr += ' ';
+ aStr += GetTyp()->GetName();
+ aStr.AppendAscii(" = ");
+ aStr += static_cast<SwUserFieldType*>(GetTyp())->GetContent();
+ return aStr;
}
double SwUserField::GetValue() const
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index 9fe5c9a22204..79a2b64433d9 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -885,9 +885,8 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
SwCntntNode* pCNd = GetDoc()->GetNodes().GoNext( &aNdIdx );
SwPosition aPos( aNdIdx, SwIndex( pCNd, 0 ));
// #i59539: Don't remove all redline
- ::PaMCorrAbs( SwNodeIndex( *pDestNd ),
- SwNodeIndex( *pDestNd->EndOfSectionNode() ),
- aPos );
+ SwPaM const tmpPaM(*pDestNd, *pDestNd->EndOfSectionNode());
+ ::PaMCorrAbs(tmpPaM, aPos);
}
bRet = GetDoc()->InsCopyOfTbl( aDestPos, aBoxes, &pSrcNd->GetTable(),
@@ -902,7 +901,11 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
SwCntntNode* pCNd = GetDoc()->GetNodes().GoNext( &aNdIdx );
SwPosition aPos( aNdIdx, SwIndex( pCNd, 0 ));
// #i59539: Don't remove all redline
- ::PaMCorrAbs( PCURCRSR->GetPoint()->nNode, aPos );
+ SwNode & rNode(PCURCRSR->GetPoint()->nNode.GetNode());
+ SwCntntNode *const pCntntNode( rNode.GetCntntNode() );
+ SwPaM const tmpPam(rNode, 0,
+ rNode, (pCntntNode) ? pCntntNode->Len() : 0);
+ ::PaMCorrAbs(tmpPam, aPos);
}
break; // aus der "while"-Schleife heraus
diff --git a/sw/source/core/frmedt/makefile.mk b/sw/source/core/frmedt/makefile.mk
index 8b277f899425..45344a44f574 100644
--- a/sw/source/core/frmedt/makefile.mk
+++ b/sw/source/core/frmedt/makefile.mk
@@ -62,9 +62,9 @@ SLOFILES = $(EXCEPTIONSFILES) \
$(SLO)$/feflyole.obj \
$(SLO)$/feshview.obj \
$(SLO)$/fetab.obj \
- $(SLO)$/tblsel.obj
EXCEPTIONSFILES=\
+ $(SLO)$/tblsel.obj \
$(SLO)$/fecopy.obj \
$(SLO)$/fefly1.obj \
$(SLO)$/fews.obj
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx
index 8cabf285e12b..af95f9e7b276 100644
--- a/sw/source/core/frmedt/tblsel.cxx
+++ b/sw/source/core/frmedt/tblsel.cxx
@@ -55,6 +55,7 @@
// OD 26.08.2003 #i18103#
#include <sectfrm.hxx>
#include <frmtool.hxx>
+#include <deque>
//siehe auch swtable.cxx
#define COLFUZZY 20L
@@ -152,8 +153,7 @@ struct _Sort_CellFrm
: pFrm( &rCFrm ) {}
};
-SV_DECL_VARARR( _Sort_CellFrms, _Sort_CellFrm, 16, 16 )
-SV_IMPL_VARARR( _Sort_CellFrms, _Sort_CellFrm )
+typedef std::deque< _Sort_CellFrm > _Sort_CellFrms;
SV_IMPL_PTRARR( SwChartBoxes, SwTableBoxPtr );
SV_IMPL_PTRARR( SwChartLines, SwChartBoxes* );
@@ -616,9 +616,8 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
rUnion.Top() <= nFrmBottom &&
nFrmBottom <= nUnionBottom+ nYFuzzy )
- aCellFrms.Insert(
- _Sort_CellFrm( *(SwCellFrm*)pCell ),
- aCellFrms.Count() );
+ aCellFrms.push_back(
+ _Sort_CellFrm( *(SwCellFrm*)pCell) );
else
{
bValidChartSel = FALSE;
@@ -643,12 +642,12 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
// alle Zellen der (Teil-)Tabelle zusammen. Dann teste mal ob
// all huebsch nebeneinander liegen.
- USHORT n, nEnd, nCellCnt = 0;
+ size_t n, nCellCnt = 0;
long nYPos = LONG_MAX;
long nXPos = 0;
long nHeight = 0;
- for( n = 0, nEnd = aCellFrms.Count(); n < nEnd; ++n )
+ for( n = 0 ; n < aCellFrms.size(); ++n )
{
const _Sort_CellFrm& rCF = aCellFrms[ n ];
if( (rCF.pFrm->Frm().*fnRect->fnGetTop)() != nYPos )
@@ -699,7 +698,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
{
nYPos = LONG_MAX;
SwChartBoxes* pBoxes = 0;
- for( n = 0, nEnd = aCellFrms.Count(); n < nEnd; ++n )
+ for( n = 0; n < aCellFrms.size(); ++n )
{
const _Sort_CellFrm& rCF = aCellFrms[ n ];
if( (rCF.pFrm->Frm().*fnRect->fnGetTop)() != nYPos )
diff --git a/sw/source/core/inc/MarkManager.hxx b/sw/source/core/inc/MarkManager.hxx
index 1a5cd1724050..5b03672f461f 100644
--- a/sw/source/core/inc/MarkManager.hxx
+++ b/sw/source/core/inc/MarkManager.hxx
@@ -39,9 +39,9 @@ namespace sw { namespace mark
{
public:
MarkManager(/*[in/out]*/ SwDoc& rDoc);
-
+#if OSL_DEBUG_LEVEL > 1
void dumpFieldmarks( ) const;
-
+#endif
// IDocumentMarkAccess
virtual ::sw::mark::IMark* makeMark(const SwPaM& rPaM, const ::rtl::OUString& rName, IDocumentMarkAccess::MarkType eMark);
diff --git a/sw/source/core/inc/cellfrm.hxx b/sw/source/core/inc/cellfrm.hxx
index fb479fc86549..8b45aa5e2d8d 100644
--- a/sw/source/core/inc/cellfrm.hxx
+++ b/sw/source/core/inc/cellfrm.hxx
@@ -24,8 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _CELLFRM_HXX
-#define _CELLFRM_HXX
+#ifndef SW_CELLFRM_HXX
+#define SW_CELLFRM_HXX
#include <tools/mempool.hxx>
@@ -48,7 +48,8 @@ public:
virtual BOOL GetCrsrOfst( SwPosition *, Point&, SwCrsrMoveState* = 0 ) const;
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
- virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
+ virtual void Paint( SwRect const&,
+ SwPrintData const*const pPrintData = NULL ) const;
virtual void CheckDirection( BOOL bVert );
// --> OD 2010-02-17 #i103961#
diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx
index cadac60cb8ca..8e84ecf3c976 100644
--- a/sw/source/core/inc/flyfrm.hxx
+++ b/sw/source/core/inc/flyfrm.hxx
@@ -24,8 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _FLYFRM_HXX
-#define _FLYFRM_HXX
+#ifndef SW_FLYFRM_HXX
+#define SW_FLYFRM_HXX
#include "layfrm.hxx"
@@ -158,7 +158,8 @@ public:
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
// erfrage vom Client Informationen
virtual BOOL GetInfo( SfxPoolItem& ) const;
- virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
+ virtual void Paint( SwRect const&,
+ SwPrintData const*const pPrintData = NULL ) const;
virtual Size ChgSize( const Size& aNewSize );
virtual BOOL GetCrsrOfst( SwPosition *, Point&,
SwCrsrMoveState* = 0 ) const;
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index e1560a230d7a..9837f3fe3e55 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -24,8 +24,9 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _FRAME_HXX
-#define _FRAME_HXX
+#ifndef SW_FRAME_HXX
+#define SW_FRAME_HXX
+
#include <svl/svarray.hxx>
#include "swtypes.hxx" // fuer SwTwips
#include "swrect.hxx"
@@ -53,7 +54,7 @@ class SvxBrushItem;
class SwSelectionList;
struct SwPosition;
struct SwCrsrMoveState;
-class SwPrtOptions;
+class SwPrintData;
// --> OD 2004-07-06 #i28701#
class SwSortedObjs;
@@ -822,7 +823,8 @@ public:
SwCrsrMoveState* = 0 ) const;
virtual BOOL GetCharRect( SwRect &, const SwPosition&,
SwCrsrMoveState* = 0 ) const;
- virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
+ virtual void Paint( SwRect const&,
+ SwPrintData const*const pPrintData = NULL ) const;
// der "kurze Dienstweg" zwischen den Frames und der Formatierung.
// Wer den void* falsch Casted ist selbst schuld!
diff --git a/sw/source/core/inc/layfrm.hxx b/sw/source/core/inc/layfrm.hxx
index 28216e326b41..d48bbf3f3e42 100644
--- a/sw/source/core/inc/layfrm.hxx
+++ b/sw/source/core/inc/layfrm.hxx
@@ -24,8 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _LAYFRM_HXX
-#define _LAYFRM_HXX
+#ifndef SW_LAYFRM_HXX
+#define SW_LAYFRM_HXX
#include "frame.hxx"
@@ -105,7 +105,8 @@ public:
SwLayoutFrm( SwFrmFmt* );
~SwLayoutFrm();
- virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
+ virtual void Paint( SwRect const&,
+ SwPrintData const*const pPrintData = NULL ) const;
const SwFrm *Lower() const { return pLower; }
SwFrm *Lower() { return pLower; }
const SwCntntFrm *ContainsCntnt() const;
@@ -206,4 +207,4 @@ inline SwFrm* SwLayoutFrm::GetLastLower()
return const_cast<SwFrm*>(static_cast<const SwLayoutFrm*>(this)->GetLastLower());
}
-#endif //_LAYFRM_HXX
+#endif // SW_LAYFRM_HXX
diff --git a/sw/source/core/inc/mvsave.hxx b/sw/source/core/inc/mvsave.hxx
index ca98a089969d..67434e14928a 100644
--- a/sw/source/core/inc/mvsave.hxx
+++ b/sw/source/core/inc/mvsave.hxx
@@ -24,14 +24,11 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _MVSAVE_HXX
-#define _MVSAVE_HXX
-
+#ifndef SW_MVSAVE_HXX
+#define SW_MVSAVE_HXX
#include <tools/string.hxx>
-#ifndef _KEYCOD_HXX //autogen
#include <vcl/keycod.hxx>
-#endif
#include <svl/svarray.hxx>
#include <IDocumentMarkAccess.hxx>
#include <vector>
@@ -150,25 +147,10 @@ public:
// Crsr verschieben kann
// die Funktionen rufen nicht die SwDoc::Corr - Methoden!
- // Setzt alle PaMs an OldPos auf NewPos + Offset
-void PaMCorrAbs( const SwPosition &rOldPos,
- const SwPosition &rNewPos,
- const xub_StrLen nOffset = 0 );
-
- // Setzt alle PaMs in OldNode auf NewPos + Offset
-void PaMCorrAbs( const SwNodeIndex &rOldNode,
- const SwPosition &rNewPos,
- const xub_StrLen nOffset = 0 );
-
// Setzt alle PaMs im Bereich vom Range nach NewPos
void PaMCorrAbs( const SwPaM& rRange,
const SwPosition& rNewPos );
- // Setzt alle PaMs im Bereich von [StartNode, EndNode] nach NewPos
-void PaMCorrAbs( const SwNodeIndex &rStartNode,
- const SwNodeIndex &rEndNode,
- const SwPosition &rNewPos );
-
// Setzt alle PaMs in OldNode auf relative Pos
void PaMCorrRel( const SwNodeIndex &rOldNode,
const SwPosition &rNewPos,
@@ -227,5 +209,5 @@ public:
};
-#endif // _MVSAVE_HXX
+#endif // SW_MVSAVE_HXX
diff --git a/sw/source/core/inc/notxtfrm.hxx b/sw/source/core/inc/notxtfrm.hxx
index 7782a6b90d98..d5fae730fd61 100644
--- a/sw/source/core/inc/notxtfrm.hxx
+++ b/sw/source/core/inc/notxtfrm.hxx
@@ -24,8 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _NOTXTFRM_HXX
-#define _NOTXTFRM_HXX
+#ifndef SW_NOTXTFRM_HXX
+#define SW_NOTXTFRM_HXX
#include <cntfrm.hxx>
@@ -56,7 +56,8 @@ public:
~SwNoTxtFrm();
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
- virtual void Paint(const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
+ virtual void Paint( SwRect const&,
+ SwPrintData const*const pPrintData = NULL ) const;
virtual BOOL GetCharRect( SwRect &, const SwPosition&,
SwCrsrMoveState* = 0) const;
BOOL GetCrsrOfst(SwPosition* pPos, Point& aPoint,
diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx
index ee894a0ef539..f43a2362ee98 100644
--- a/sw/source/core/inc/rootfrm.hxx
+++ b/sw/source/core/inc/rootfrm.hxx
@@ -24,8 +24,9 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _ROOTFRM_HXX
-#define _ROOTFRM_HXX
+#ifndef SW_ROOTFRM_HXX
+#define SW_ROOTFRM_HXX
+
#include "layfrm.hxx"
class SwCntntFrm;
@@ -197,7 +198,8 @@ public:
virtual BOOL GetCrsrOfst( SwPosition *, Point&,
SwCrsrMoveState* = 0 ) const;
- virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
+ virtual void Paint( SwRect const&,
+ SwPrintData const*const pPrintData = NULL ) const;
virtual SwTwips ShrinkFrm( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
virtual SwTwips GrowFrm ( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
#ifdef DBG_UTIL
@@ -365,5 +367,5 @@ inline void SwRootFrm::SetVirtPageNum( const BOOL bOf) const
((SwRootFrm*)this)->bIsVirtPageNum = bOf;
}
-#endif //_ROOTFRM_HXX
+#endif // SW_ROOTFRM_HXX
diff --git a/sw/source/core/inc/scriptinfo.hxx b/sw/source/core/inc/scriptinfo.hxx
index 07d58e5a72ef..a470571f845f 100644
--- a/sw/source/core/inc/scriptinfo.hxx
+++ b/sw/source/core/inc/scriptinfo.hxx
@@ -139,24 +139,24 @@ public:
inline BYTE GetDefaultDir() const { return nDefaultDir; };
// array operations, nCnt refers to array position
- inline USHORT CountScriptChg() const;
- inline xub_StrLen GetScriptChg( const USHORT nCnt ) const;
+ inline size_t CountScriptChg() const;
+ inline xub_StrLen GetScriptChg( const size_t nCnt ) const;
inline BYTE GetScriptType( const USHORT nCnt ) const;
- inline USHORT CountDirChg() const;
- inline xub_StrLen GetDirChg( const USHORT nCnt ) const;
- inline BYTE GetDirType( const USHORT nCnt ) const;
+ inline size_t CountDirChg() const;
+ inline xub_StrLen GetDirChg( const size_t nCnt ) const;
+ inline BYTE GetDirType( const size_t nCnt ) const;
- inline USHORT CountKashida() const;
- inline xub_StrLen GetKashida( const USHORT nCnt ) const;
+ inline size_t CountKashida() const;
+ inline xub_StrLen GetKashida( const size_t nCnt ) const;
- inline USHORT CountCompChg() const;
- inline xub_StrLen GetCompStart( const USHORT nCnt ) const;
- inline xub_StrLen GetCompLen( const USHORT nCnt ) const;
- inline BYTE GetCompType( const USHORT nCnt ) const;
+ inline size_t CountCompChg() const;
+ inline xub_StrLen GetCompStart( const size_t nCnt ) const;
+ inline xub_StrLen GetCompLen( const size_t nCnt ) const;
+ inline BYTE GetCompType( const size_t nCnt ) const;
- inline USHORT CountHiddenChg() const;
- inline xub_StrLen GetHiddenChg( const USHORT nCnt ) const;
+ inline size_t CountHiddenChg() const;
+ inline xub_StrLen GetHiddenChg( const size_t nCnt ) const;
static void CalcHiddenRanges( const SwTxtNode& rNode,
MultiSelection& rHiddenMulti );
@@ -356,59 +356,59 @@ inline void SwScriptInfo::SetInvalidity( const xub_StrLen nPos )
if ( nPos < nInvalidityPos )
nInvalidityPos = nPos;
};
-inline USHORT SwScriptInfo::CountScriptChg() const { return aScriptChg.Count(); }
-inline xub_StrLen SwScriptInfo::GetScriptChg( const USHORT nCnt ) const
+inline size_t SwScriptInfo::CountScriptChg() const { return aScriptChg.size(); }
+inline xub_StrLen SwScriptInfo::GetScriptChg( const size_t nCnt ) const
{
- ASSERT( nCnt < aScriptChg.Count(),"No ScriptChange today!");
+ ASSERT( nCnt < aScriptChg.size(),"No ScriptChange today!");
return aScriptChg[ nCnt ];
}
inline BYTE SwScriptInfo::GetScriptType( const xub_StrLen nCnt ) const
{
- ASSERT( nCnt < aScriptChg.Count(),"No ScriptType today!");
+ ASSERT( nCnt < aScriptType.size(),"No ScriptType today!");
return aScriptType[ nCnt ];
}
-inline USHORT SwScriptInfo::CountDirChg() const { return aDirChg.Count(); }
-inline xub_StrLen SwScriptInfo::GetDirChg( const USHORT nCnt ) const
+inline size_t SwScriptInfo::CountDirChg() const { return aDirChg.size(); }
+inline xub_StrLen SwScriptInfo::GetDirChg( const size_t nCnt ) const
{
- ASSERT( nCnt < aDirChg.Count(),"No DirChange today!");
+ ASSERT( nCnt < aDirChg.size(),"No DirChange today!");
return aDirChg[ nCnt ];
}
-inline BYTE SwScriptInfo::GetDirType( const xub_StrLen nCnt ) const
+inline BYTE SwScriptInfo::GetDirType( const size_t nCnt ) const
{
- ASSERT( nCnt < aDirChg.Count(),"No DirType today!");
+ ASSERT( nCnt < aDirType.size(),"No DirType today!");
return aDirType[ nCnt ];
}
-inline USHORT SwScriptInfo::CountKashida() const { return aKashida.Count(); }
-inline xub_StrLen SwScriptInfo::GetKashida( const USHORT nCnt ) const
+inline size_t SwScriptInfo::CountKashida() const { return aKashida.size(); }
+inline xub_StrLen SwScriptInfo::GetKashida( const size_t nCnt ) const
{
- ASSERT( nCnt < aKashida.Count(),"No Kashidas today!");
+ ASSERT( nCnt < aKashida.size(),"No Kashidas today!");
return aKashida[ nCnt ];
}
-inline USHORT SwScriptInfo::CountCompChg() const { return aCompChg.Count(); };
-inline xub_StrLen SwScriptInfo::GetCompStart( const USHORT nCnt ) const
+inline size_t SwScriptInfo::CountCompChg() const { return aCompChg.size(); };
+inline xub_StrLen SwScriptInfo::GetCompStart( const size_t nCnt ) const
{
- ASSERT( nCnt < aCompChg.Count(),"No CompressionStart today!");
+ ASSERT( nCnt < aCompChg.size(),"No CompressionStart today!");
return aCompChg[ nCnt ];
}
-inline xub_StrLen SwScriptInfo::GetCompLen( const USHORT nCnt ) const
+inline xub_StrLen SwScriptInfo::GetCompLen( const size_t nCnt ) const
{
- ASSERT( nCnt < aCompChg.Count(),"No CompressionLen today!");
+ ASSERT( nCnt < aCompLen.size(),"No CompressionLen today!");
return aCompLen[ nCnt ];
}
-inline BYTE SwScriptInfo::GetCompType( const USHORT nCnt ) const
+inline BYTE SwScriptInfo::GetCompType( const size_t nCnt ) const
{
- ASSERT( nCnt < aCompChg.Count(),"No CompressionType today!");
+ ASSERT( nCnt < aCompType.size(),"No CompressionType today!");
return aCompType[ nCnt ];
}
-inline USHORT SwScriptInfo::CountHiddenChg() const { return aHiddenChg.Count(); };
-inline xub_StrLen SwScriptInfo::GetHiddenChg( const USHORT nCnt ) const
+inline size_t SwScriptInfo::CountHiddenChg() const { return aHiddenChg.size(); };
+inline xub_StrLen SwScriptInfo::GetHiddenChg( const size_t nCnt ) const
{
- ASSERT( nCnt < aHiddenChg.Count(),"No HiddenChg today!");
+ ASSERT( nCnt < aHiddenChg.size(),"No HiddenChg today!");
return aHiddenChg[ nCnt ];
}
diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx
index 3f55c6bdf0ec..c12685ab3058 100644
--- a/sw/source/core/inc/tabfrm.hxx
+++ b/sw/source/core/inc/tabfrm.hxx
@@ -24,8 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _TABFRM_HXX
-#define _TABFRM_HXX
+#ifndef SW_TABFRM_HXX
+#define SW_TABFRM_HXX
#include <tools/mempool.hxx>
#include "layfrm.hxx"
@@ -129,7 +129,8 @@ public:
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
virtual BOOL GetInfo( SfxPoolItem &rHnt ) const;
- virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
+ virtual void Paint( SwRect const&,
+ SwPrintData const*const pPrintData = NULL ) const;
virtual void CheckDirection( BOOL bVert );
virtual void Cut();
@@ -230,4 +231,4 @@ inline SwTabFrm *SwTabFrm::GetFollow()
return (SwTabFrm*)SwFlowFrm::GetFollow();
}
-#endif //_TABFRM_HXX
+#endif // SW_TABFRM_HXX
diff --git a/sw/source/core/inc/txmsrt.hxx b/sw/source/core/inc/txmsrt.hxx
index d88aae514904..e82f5dc71253 100644
--- a/sw/source/core/inc/txmsrt.hxx
+++ b/sw/source/core/inc/txmsrt.hxx
@@ -24,8 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _TXMSRT_HXX
-#define _TXMSRT_HXX
+#ifndef SW_TXMSRT_HXX
+#define SW_TXMSRT_HXX
#include <i18npool/lang.h>
#include <tox.hxx>
@@ -154,7 +154,7 @@ private:
String sSortTxt;
String sSortTxtReading;
- virtual void _GetText( String&, String& ) = 0;
+ virtual void GetText_Impl( String&, String& ) const = 0;
};
inline void SwTOXSortTabBase::GetTxt( String& rSortTxt,
@@ -163,7 +163,7 @@ inline void SwTOXSortTabBase::GetTxt( String& rSortTxt,
if( !bValidTxt )
{
SwTOXSortTabBase* pThis = (SwTOXSortTabBase*)this;
- pThis->_GetText( pThis->sSortTxt, pThis->sSortTxtReading );
+ pThis->GetText_Impl( pThis->sSortTxt, pThis->sSortTxtReading );
pThis->bValidTxt = TRUE;
}
@@ -194,7 +194,7 @@ struct SwTOXIndex : public SwTOXSortTabBase
virtual BOOL operator<( const SwTOXSortTabBase& );
private:
- virtual void _GetText( String&, String& );
+ virtual void GetText_Impl( String&, String& ) const;
BYTE nKeyLevel;
};
@@ -211,7 +211,7 @@ struct SwTOXCustom : public SwTOXSortTabBase
virtual BOOL operator<( const SwTOXSortTabBase& );
private:
- virtual void _GetText( String&, String& );
+ virtual void GetText_Impl( String&, String& ) const;
String aKey;
String sReading;
@@ -231,7 +231,7 @@ struct SwTOXContent : public SwTOXSortTabBase
virtual void FillText( SwTxtNode& rNd, const SwIndex& rInsPos, USHORT nAuthField = 0 ) const;
virtual USHORT GetLevel() const;
private:
- virtual void _GetText( String&, String& );
+ virtual void GetText_Impl( String&, String& ) const;
};
@@ -248,7 +248,7 @@ struct SwTOXPara : public SwTOXSortTabBase
virtual String GetURL() const;
private:
- virtual void _GetText( String&, String& );
+ virtual void GetText_Impl( String&, String& ) const;
SwTOXElement eType;
USHORT m_nLevel;
@@ -267,7 +267,7 @@ struct SwTOXTable : public SwTOXSortTabBase
virtual String GetURL() const;
private:
- virtual void _GetText( String&, String& );
+ virtual void GetText_Impl( String&, String& ) const;
USHORT nLevel;
};
@@ -277,7 +277,7 @@ struct SwTOXAuthority : public SwTOXSortTabBase
private:
SwFmtFld& m_rField;
virtual void FillText( SwTxtNode& rNd, const SwIndex& rInsPos, USHORT nAuthField = 0 ) const;
- virtual void _GetText( String&, String& );
+ virtual void GetText_Impl( String&, String& ) const;
public:
SwTOXAuthority( const SwCntntNode& rNd, SwFmtFld& rField, const SwTOXInternational& rIntl );
@@ -291,4 +291,4 @@ public:
};
-#endif // _TXMSRT_HXX
+#endif // SW_TXMSRT_HXX
diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index 5a8783df261b..0e7db85e64ac 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -24,8 +24,9 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _TXTFRM_HXX
-#define _TXTFRM_HXX
+#ifndef SW_TXTFRM_HXX
+#define SW_TXTFRM_HXX
+
#include <tools/mempool.hxx>
#include <tools/string.hxx>
#include "cntfrm.hxx"
@@ -292,7 +293,8 @@ public:
void PaintExtraData( const SwRect & rRect ) const; //Seitennummer usw.
SwRect Paint();
- virtual void Paint( const SwRect &, const SwPrtOptions *pPrintData = NULL ) const;
+ virtual void Paint( SwRect const&,
+ SwPrintData const*const pPrintData = NULL ) const;
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
virtual sal_Bool GetInfo( SfxPoolItem & ) const;
diff --git a/sw/source/core/inc/viewimp.hxx b/sw/source/core/inc/viewimp.hxx
index 0f89b3b75663..6d48f11812c1 100644
--- a/sw/source/core/inc/viewimp.hxx
+++ b/sw/source/core/inc/viewimp.hxx
@@ -24,8 +24,10 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _VIEWIMP_HXX
-#define _VIEWIMP_HXX
+#ifndef SW_VIEWIMP_HXX
+#define SW_VIEWIMP_HXX
+
+#include <vector>
#include <vcl/timer.hxx>
#include <tools/color.hxx>
@@ -53,10 +55,9 @@ struct SdrPaintProcRec;
class SwAccessibleMap;
class SdrObject;
class Fraction;
-class SwPrtOptions;
+class SwPrintData;
class SwPagePreviewLayout;
struct PrevwPage;
-#include <vector>
class SwTxtFrm;
class SwViewImp
@@ -215,7 +216,7 @@ public:
// and <heaven>.
// OD 25.06.2003 #108784# - correct type of 1st parameter
void PaintLayer( const SdrLayerID _nLayerID,
- const SwPrtOptions *pPrintData,
+ SwPrintData const*const pPrintData,
const SwRect& _rRect,
const Color* _pPageBackgrdColor = 0,
const bool _bIsPageRightToLeft = false ) const;
@@ -360,5 +361,5 @@ inline void SwViewImp::AddAccessibleObj( const SdrObject *pObj )
SwRect aEmptyRect;
MoveAccessible( 0, pObj, aEmptyRect );
}
-#endif //_VIEWIMP_HXX
+#endif // SW_VIEWIMP_HXX
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index 28287c957ad1..5cd97d1a1d26 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -1004,10 +1004,11 @@ BOOL SwCntntFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
SwAnchoredObject* pObj = (*GetDrawObjs())[i];
const SwFrmFmt& rFmt = pObj->GetFrmFmt();
const BOOL bFly = pObj->ISA(SwFlyFrm);
- if ( bFly &&
- WEIT_WECH == pObj->GetObjRect().Width()||
- rFmt.GetFrmSize().GetWidthPercent() )
+ if ((bFly && (WEIT_WECH == pObj->GetObjRect().Width()))
+ || rFmt.GetFrmSize().GetWidthPercent())
+ {
continue;
+ }
if ( FLY_AS_CHAR == rFmt.GetAnchor().GetAnchorId() )
{
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 395009122063..661f68603603 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -1738,7 +1738,7 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
// die in den Fussnoten liegen, nicht etwa die (spaltigen) Bereiche,
// in denen die Fussnoten(Container) liegen.
// #109767# Table frame is in section, insert section in cell frame.
- if( pSct && ( pFtnFrm && !pSct->IsInFtn() ) || pUpper->IsCellFrm() )
+ if( pSct && ((pFtnFrm && !pSct->IsInFtn()) || pUpper->IsCellFrm()) )
pSct = NULL;
if( pSct )
{ // damit der SectionFrm nicht zerstoert wird durch pTmp->MoveFwd()
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index aec3fde909f1..ac20d8a4f86b 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -2430,7 +2430,7 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
#endif
bVis = ((SwCrsrShell*)pSh)->GetCharRect().IsOver(pSh->VisArea());
}
- aBools.Insert( bVis, aBools.Count() );
+ aBools.push_back( bVis );
pSh = (ViewShell*)pSh->GetNext();
} while ( pSh != pImp->GetShell() );
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index 39b8a60ef695..a85ee7091ff1 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -102,7 +102,7 @@ void SwLayCacheImpl::Insert( USHORT nType, ULONG nIndex, xub_StrLen nOffset )
{
aType.Insert( nType, aType.Count() );
SvULongs::Insert( nIndex, SvULongs::Count() );
- aOffset.Insert( nOffset, aOffset.Count() );
+ aOffset.push_back( nOffset );
}
BOOL SwLayCacheImpl::Read( SvStream& rStream )
@@ -1238,12 +1238,12 @@ SwLayCacheIoImpl::SwLayCacheIoImpl( SvStream& rStrm, BOOL bWrtMd ) :
BOOL SwLayCacheIoImpl::OpenRec( BYTE cType )
{
BOOL bRes = TRUE;
- UINT16 nLvl = aRecTypes.Count();
+ size_t nLvl = aRecTypes.size();
ASSERT( nLvl == aRecSizes.Count(), "OpenRec: Level" );
UINT32 nPos = pStream->Tell();
if( bWriteMode )
{
- aRecTypes.Insert( cType, nLvl );
+ aRecTypes.push_back( cType );
aRecSizes.Insert( nPos, nLvl );
*pStream << (UINT32) 0;
}
@@ -1252,7 +1252,7 @@ BOOL SwLayCacheIoImpl::OpenRec( BYTE cType )
UINT32 nVal;
*pStream >> nVal;
BYTE cRecTyp = (BYTE)nVal;
- aRecTypes.Insert( cRecTyp, nLvl );
+ aRecTypes.push_back( cRecTyp );
sal_uInt32 nSize = nVal >> 8;
aRecSizes.Insert( nPos + nSize, nLvl );
if( !nVal || cRecTyp != cType ||
@@ -1261,7 +1261,7 @@ BOOL SwLayCacheIoImpl::OpenRec( BYTE cType )
ASSERT( nVal, "OpenRec: Record-Header is 0" );
ASSERT( cRecTyp == cType,
"OpenRec: Wrong Record Type" );
- aRecTypes[nLvl] = 0;
+ aRecTypes.back() = 0;
aRecSizes[nLvl] = pStream->Tell();
bRes = sal_False;
bError = TRUE;
@@ -1275,7 +1275,7 @@ BOOL SwLayCacheIoImpl::OpenRec( BYTE cType )
BOOL SwLayCacheIoImpl::CloseRec( BYTE )
{
BOOL bRes = TRUE;
- UINT16 nLvl = aRecTypes.Count();
+ size_t nLvl = aRecTypes.size();
ASSERT( nLvl == aRecSizes.Count(), "CloseRec: wrong Level" );
ASSERT( nLvl, "CloseRec: no levels" );
if( nLvl )
@@ -1287,7 +1287,7 @@ BOOL SwLayCacheIoImpl::CloseRec( BYTE )
UINT32 nBgn = aRecSizes[nLvl];
pStream->Seek( nBgn );
UINT32 nSize = nPos - nBgn;
- UINT32 nVal = ( nSize << 8 ) | aRecTypes[nLvl];
+ UINT32 nVal = ( nSize << 8 ) | aRecTypes.back();
*pStream << nVal;
pStream->Seek( nPos );
if( pStream->GetError() != SVSTREAM_OK )
@@ -1307,7 +1307,7 @@ BOOL SwLayCacheIoImpl::CloseRec( BYTE )
bRes = FALSE;
}
- aRecTypes.Remove( nLvl, 1 );
+ aRecTypes.pop_back();
aRecSizes.Remove( nLvl, 1 );
}
diff --git a/sw/source/core/layout/layhelp.hxx b/sw/source/core/layout/layhelp.hxx
index 7e7fd96e8817..8eb958f5bfae 100644
--- a/sw/source/core/layout/layhelp.hxx
+++ b/sw/source/core/layout/layhelp.hxx
@@ -71,11 +71,11 @@ class SwLayCacheImpl : public SvULongs
void Insert( USHORT nType, ULONG nIndex, xub_StrLen nOffset );
public:
- SwLayCacheImpl() : SvULongs( 20, 10 ), aOffset( 20, 10 ), aType( 20, 10 ) {}
+ SwLayCacheImpl() : SvULongs( 20, 10 ), aType( 20, 10 ) {}
BOOL Read( SvStream& rStream );
ULONG GetBreakIndex( USHORT nIdx ) const { return GetObject( nIdx ); }
- xub_StrLen GetBreakOfst( USHORT nIdx ) const { return aOffset[ nIdx ]; }
+ xub_StrLen GetBreakOfst( size_t nIdx ) const { return aOffset[ nIdx ]; }
USHORT GetBreakType( USHORT nIdx ) const { return aType[ nIdx ]; }
USHORT GetFlyCount() const { return aFlyCache.Count(); }
diff --git a/sw/source/core/layout/makefile.mk b/sw/source/core/layout/makefile.mk
index 7019203aa20f..076069b51339 100644
--- a/sw/source/core/layout/makefile.mk
+++ b/sw/source/core/layout/makefile.mk
@@ -49,6 +49,7 @@ CDEFS+=-DDEBUG
EXCEPTIONSFILES = \
$(SLO)$/anchoreddrawobject.obj \
$(SLO)$/flycnt.obj \
+ $(SLO)$/layact.obj \
$(SLO)$/laycache.obj \
$(SLO)$/layouter.obj \
$(SLO)$/movedfwdfrmsbyobjpos.obj \
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 01f09f2c41c3..626627a3c993 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -1827,10 +1827,11 @@ void SwRootFrm::ImplCalcBrowseWidth()
SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i];
const SwFrmFmt& rFmt = pAnchoredObj->GetFrmFmt();
const BOOL bFly = pAnchoredObj->ISA(SwFlyFrm);
- if ( bFly &&
- WEIT_WECH == pAnchoredObj->GetObjRect().Width()||
- rFmt.GetFrmSize().GetWidthPercent() )
+ if ((bFly && (WEIT_WECH == pAnchoredObj->GetObjRect().Width()))
+ || rFmt.GetFrmSize().GetWidthPercent())
+ {
continue;
+ }
long nWidth = 0;
switch ( rFmt.GetAnchor().GetAnchorId() )
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 09fc6b00e03d..9f518285bd30 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -30,12 +30,7 @@
#include <com/sun/star/text/HoriOrientation.hpp>
-
-#include <hintids.hxx>
-
-#ifndef _SOUND_HXX //autogen
#include <vcl/sound.hxx>
-#endif
#include <tools/poly.hxx>
#define _SVSTDARR_LONGS
#include <svl/svstdarr.hxx>
@@ -49,19 +44,15 @@
// --> collapsing borders FME 2005-05-27 #i29550#
#include <svx/framelink.hxx>
// <--
-#ifndef _GRAPH_HXX //autogen
#include <vcl/graph.hxx>
-#endif
#include <svx/svdpagv.hxx>
-#include <tgrditem.hxx>
-
+#include <hintids.hxx>
+#include <tgrditem.hxx>
#include <fmtsrnd.hxx>
#include <fmtclds.hxx>
#include <tools/shl.hxx>
-#ifndef _COMCORE_HRC
#include <comcore.hrc>
-#endif
#include <swmodule.hxx>
#include <rootfrm.hxx>
#include <pagefrm.hxx>
@@ -89,15 +80,11 @@
#include <ptqueue.hxx>
#include <noteurl.hxx>
#include <virtoutp.hxx>
-#ifndef _LINEINFO_HXX
#include <lineinfo.hxx>
-#endif
#include <dbg_lay.hxx>
#include <accessibilityoptions.hxx>
// OD 20.12.2002 #94627#
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
// OD 28.02.2003 #b4779636#, #107692#
#include <swtable.hxx>
// OD 02.07.2003 #108784#
@@ -2735,7 +2722,8 @@ void SwTabFrmPainter::Insert( SwLineEntry& rNew, bool bHori )
|*
|*************************************************************************/
-void SwRootFrm::Paint( const SwRect& rRect, const SwPrtOptions *pPrintData ) const
+void
+SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const
{
ASSERT( Lower() && Lower()->IsPageFrm(), "Lower der Root keine Seite." );
@@ -3185,7 +3173,7 @@ SwShortCut::SwShortCut( const SwFrm& rFrm, const SwRect& rRect )
}
}
-void SwLayoutFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */ ) const
+void SwLayoutFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
{
ViewShell *pSh = GetShell();
@@ -3473,7 +3461,7 @@ BOOL SwFlyFrm::IsPaint( SdrObject *pObj, const ViewShell *pSh )
/*************************************************************************
|* SwCellFrm::Paint( const SwRect& ) const
|*************************************************************************/
-void SwCellFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */ ) const
+void SwCellFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
{
if ( GetLayoutRowSpan() >= 1 )
SwLayoutFrm::Paint( rRect );
@@ -3492,7 +3480,7 @@ void SwCellFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */
void MA_FASTCALL lcl_PaintLowerBorders( const SwLayoutFrm *pLay,
const SwRect &rRect, const SwPageFrm *pPage );
-void SwFlyFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */ ) const
+void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
{
//wegen der Ueberlappung von Rahmen und Zeichenobjekten muessen die
//Flys ihre Umrandung (und die der Innenliegenden) direkt ausgeben.
@@ -3727,7 +3715,7 @@ void SwFlyFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */
|*
|*************************************************************************/
-void SwTabFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */ ) const
+void SwTabFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
{
if ( pGlobalShell->GetViewOptions()->IsTable() )
{
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index 018e48440b59..ff0c6ec8f48f 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -1811,10 +1811,10 @@ USHORT SwFrm::GetVirtPageNum() const
const SwFrm *pFrm = 0;
const SfxItemPool &rPool = pPage->GetFmt()->GetDoc()->GetAttrPool();
const SfxPoolItem* pItem;
- USHORT nMaxItems = rPool.GetItemCount( RES_PAGEDESC );
- for( USHORT n = 0; n < nMaxItems; ++n )
+ sal_uInt32 nMaxItems = rPool.GetItemCount2( RES_PAGEDESC );
+ for( sal_uInt32 n = 0; n < nMaxItems; ++n )
{
- if( 0 == (pItem = rPool.GetItem( RES_PAGEDESC, n ) ))
+ if( 0 == (pItem = rPool.GetItem2( RES_PAGEDESC, n ) ))
continue;
const SwFmtPageDesc *pDesc = (SwFmtPageDesc*)pItem;
diff --git a/sw/source/core/layout/unusedf.cxx b/sw/source/core/layout/unusedf.cxx
index ea01592741ec..4b9a9417480a 100644
--- a/sw/source/core/layout/unusedf.cxx
+++ b/sw/source/core/layout/unusedf.cxx
@@ -28,8 +28,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
#include "rootfrm.hxx"
#include "cntfrm.hxx"
#include "flyfrm.hxx"
@@ -41,7 +39,7 @@ void SwFrm::Format( const SwBorderAttrs * )
ASSERT( FALSE, "Format() der Basisklasse gerufen." );
}
-void SwFrm::Paint(const SwRect &, const SwPrtOptions * ) const
+void SwFrm::Paint(SwRect const&, SwPrintData const*const) const
{
ASSERT( FALSE, "Paint() der Basisklasse gerufen." );
}
diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index 443900e1942c..9babcdde2b79 100644
--- a/sw/source/core/text/frmpaint.cxx
+++ b/sw/source/core/text/frmpaint.cxx
@@ -38,12 +38,8 @@
#include <tgrditem.hxx>
#include <paratr.hxx>
-#ifndef _FMTLINE_HXX
#include <fmtline.hxx>
-#endif
-#ifndef _LINEINFO_HXX
#include <lineinfo.hxx>
-#endif
#include <charfmt.hxx>
#include <pagefrm.hxx>
#include <viewsh.hxx> // ViewShell
@@ -596,7 +592,7 @@ sal_Bool SwTxtFrm::PaintEmpty( const SwRect &rRect, sal_Bool bCheck ) const
* SwTxtFrm::Paint()
*************************************************************************/
-void SwTxtFrm::Paint( const SwRect &rRect, const SwPrtOptions * /*pPrintData*/ ) const
+void SwTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
{
ResetRepaint();
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index 36eaed83795c..c4ec51b5ecb4 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -779,7 +779,7 @@ void SwTxtNode::GetMinMaxSize( ULONG nIndex, ULONG& rMin, ULONG &rMax,
case RES_TXTATR_FIELD :
{
SwField *pFld = (SwField*)pHint->GetFld().GetFld();
- const String aTxt = pFld->GetCntnt( FALSE );
+ const String aTxt = pFld->ExpandField(true);
if( lcl_MinMaxString( aArg, aIter.GetFnt(), aTxt, 0,
aTxt.Len() ) )
nAdd = 20;
@@ -982,7 +982,7 @@ USHORT SwTxtNode::GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd )
case RES_TXTATR_FIELD :
{
SwField *pFld = (SwField*)pHint->GetFld().GetFld();
- const String aTxt = pFld->GetCntnt( FALSE );
+ String const aTxt = pFld->ExpandField(true);
SwDrawTextInfo aDrawInf( pSh, *pOut, 0, aTxt, 0, aTxt.Len() );
nProWidth += aIter.GetFnt()->_GetTxtSize( aDrawInf ).Width();
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index dd2c1c3a1d38..84732637628c 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -805,8 +805,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
MultiSelection aHiddenMulti( aRange );
CalcHiddenRanges( rNode, aHiddenMulti );
- aHiddenChg.Remove( 0, aHiddenChg.Count() );
- USHORT nHiddenIdx = 0;
+ aHiddenChg.clear();
USHORT i = 0;
for( i = 0; i < aHiddenMulti.GetRangeCount(); ++i )
{
@@ -814,8 +813,8 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
const xub_StrLen nStart = (xub_StrLen)rRange.Min();
const xub_StrLen nEnd = (xub_StrLen)rRange.Max() + 1;
- aHiddenChg.Insert( nStart, nHiddenIdx++ );
- aHiddenChg.Insert( nEnd, nHiddenIdx++ );
+ aHiddenChg.push_back( nStart );
+ aHiddenChg.push_back( nEnd );
}
//
@@ -915,9 +914,9 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
//
// remove invalid entries from script information arrays
- const USHORT nScriptRemove = aScriptChg.Count() - nCnt;
- aScriptChg.Remove( nCnt, nScriptRemove );
- aScriptType.Remove( nCnt, nScriptRemove );
+ const size_t nScriptRemove = aScriptChg.size() - nCnt;
+ aScriptChg.erase( aScriptChg.begin() + nCnt, aScriptChg.end() );
+ aScriptType.erase( aScriptType.begin() + nCnt, aScriptType.begin() + (nCnt + nScriptRemove) );
// get the start of the last compression group
USHORT nLastCompression = nChg;
@@ -933,10 +932,10 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
}
// remove invalid entries from compression information arrays
- const USHORT nCompRemove = aCompChg.Count() - nCntComp;
- aCompChg.Remove( nCntComp, nCompRemove );
- aCompLen.Remove( nCntComp, nCompRemove );
- aCompType.Remove( nCntComp, nCompRemove );
+ const size_t nCompRemove = aCompChg.size() - nCntComp;
+ aCompChg.erase( aCompChg.begin() + nCntComp, aCompChg.end() );
+ aCompLen.erase( aCompLen.begin() + nCntComp, aCompLen.begin() + (nCntComp + nCompRemove) );
+ aCompType.erase( aCompType.begin() + nCntComp, aCompType.end() );
// get the start of the last kashida group
USHORT nLastKashida = nChg;
@@ -947,7 +946,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
}
// remove invalid entries from kashida array
- aKashida.Remove( nCntKash, aKashida.Count() - nCntKash );
+ aKashida.erase( aKashida.begin() + nCntKash, aKashida.end() );
//
// TAKE CARE OF WEAK CHARACTERS: WE MUST FIND AN APPROPRIATE
@@ -981,8 +980,9 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
if ( nScript != nNextScript )
{
- aScriptChg.Insert( nEnd, nCnt );
- aScriptType.Insert( nScript, nCnt++ );
+ aScriptChg.insert( aScriptChg.begin() + nCnt, nEnd );
+ aScriptType.insert( aScriptType.begin() + nCnt, nScript );
+ nCnt++;
nScript = nNextScript;
}
}
@@ -991,7 +991,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
// UPDATE THE SCRIPT INFO ARRAYS:
//
- while ( nChg < rTxt.Len() || ( !aScriptChg.Count() && !rTxt.Len() ) )
+ while ( nChg < rTxt.Len() || ( aScriptChg.empty() && !rTxt.Len() ) )
{
ASSERT( i18n::ScriptType::WEAK != nScript,
"Inserting WEAK into SwScriptInfo structure" );
@@ -1032,18 +1032,19 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
if (nType == U_NON_SPACING_MARK || nType == U_ENCLOSING_MARK ||
nType == U_COMBINING_SPACING_MARK )
{
- aScriptChg.Insert( nChg - 1, nCnt );
+ aScriptChg.insert( aScriptChg.begin() + nCnt, nChg - 1 );
}
else
{
- aScriptChg.Insert( nChg, nCnt );
+ aScriptChg.insert( aScriptChg.begin() + nCnt, nChg );
}
}
else
{
- aScriptChg.Insert( nChg, nCnt );
+ aScriptChg.insert( aScriptChg.begin() + nCnt, nChg );
}
- aScriptType.Insert( nScript, nCnt++ );
+ aScriptType.insert( aScriptType.begin() + nCnt, nScript );
+ nCnt++;
// if current script is asian, we search for compressable characters
// in this range
@@ -1087,10 +1088,11 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
if ( CHARCOMPRESS_PUNCTUATION_KANA == aCompEnum ||
ePrevState != KANA )
{
- aCompChg.Insert( nPrevChg, nCntComp );
+ aCompChg.insert( aCompChg.begin() + nCntComp, nPrevChg );
BYTE nTmpType = ePrevState;
- aCompType.Insert( nTmpType, nCntComp );
- aCompLen.Insert( nLastCompression - nPrevChg, nCntComp++ );
+ aCompType.insert( aCompType.begin() + nCntComp, nTmpType );
+ aCompLen.insert( aCompLen.begin() + nCntComp, nLastCompression - nPrevChg );
+ nCntComp++;
}
}
@@ -1108,10 +1110,11 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
if ( CHARCOMPRESS_PUNCTUATION_KANA == aCompEnum ||
ePrevState != KANA )
{
- aCompChg.Insert( nPrevChg, nCntComp );
+ aCompChg.insert( aCompChg.begin() + nCntComp, nPrevChg );
BYTE nTmpType = ePrevState;
- aCompType.Insert( nTmpType, nCntComp );
- aCompLen.Insert( nLastCompression - nPrevChg, nCntComp++ );
+ aCompType.insert( aCompType.begin() + nCntComp, nTmpType );
+ aCompLen.insert( aCompLen.begin() + nCntComp, nLastCompression - nPrevChg );
+ nCntComp++;
}
}
}
@@ -1277,7 +1280,10 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
} // end of current word
if ( STRING_LEN != nKashidaPos )
- aKashida.Insert( nKashidaPos, nCntKash++ );
+ {
+ aKashida.insert( aKashida.begin() + nCntKash, nKashidaPos);
+ nCntKash++;
+ }
} // end of kashida search
}
@@ -1292,7 +1298,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
// check kashida data
long nTmpKashidaPos = -1;
sal_Bool bWrongKash = sal_False;
- for (i = 0; i < aKashida.Count(); ++i )
+ for (i = 0; i < aKashida.size(); ++i )
{
long nCurrKashidaPos = GetKashida( i );
if ( nCurrKashidaPos <= nTmpKashidaPos )
@@ -1306,9 +1312,8 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
#endif
// remove invalid entries from direction information arrays
- const USHORT nDirRemove = aDirChg.Count();
- aDirChg.Remove( 0, nDirRemove );
- aDirType.Remove( 0, nDirRemove );
+ aDirChg.clear();
+ aDirType.clear();
// Perform Unicode Bidi Algorithm for text direction information
bool bPerformUBA = UBIDI_LTR != nDefaultDir;
@@ -1328,7 +1333,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
// 1. All text in RTL runs will use the CTL font
// #i89825# change the script type also to CTL (hennerdrewes)
// 2. Text in embedded LTR runs that does not have any strong LTR characters (numbers!)
- for ( USHORT nDirIdx = 0; nDirIdx < aDirChg.Count(); ++nDirIdx )
+ for ( size_t nDirIdx = 0; nDirIdx < aDirChg.size(); ++nDirIdx )
{
const BYTE nCurrDirType = GetDirType( nDirIdx );
// nStart ist start of RTL run:
@@ -1340,7 +1345,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
( nCurrDirType > UBIDI_LTR && !lcl_HasStrongLTR( rTxt, nStart, nEnd ) ) ) // non-strong text in embedded LTR run
{
// nScriptIdx points into the ScriptArrays:
- USHORT nScriptIdx = 0;
+ size_t nScriptIdx = 0;
// Skip entries in ScriptArray which are not inside the RTL run:
// Make nScriptIdx become the index of the script group with
@@ -1360,21 +1365,21 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
// we have to insert a new script change:
if ( nStart > 0 && nStartPosOfGroup < nStart )
{
- aScriptChg.Insert( nStart, nScriptIdx );
- aScriptType.Insert( nScriptTypeOfGroup, nScriptIdx );
+ aScriptChg.insert( aScriptChg.begin() + nScriptIdx, nStart );
+ aScriptType.insert( aScriptType.begin() + nScriptIdx, nScriptTypeOfGroup );
++nScriptIdx;
}
// Remove entries in ScriptArray which end inside the RTL run:
- while ( nScriptIdx < aScriptChg.Count() && GetScriptChg( nScriptIdx ) <= nEnd )
+ while ( nScriptIdx < aScriptChg.size() && GetScriptChg( nScriptIdx ) <= nEnd )
{
- aScriptChg.Remove( nScriptIdx, 1 );
- aScriptType.Remove( nScriptIdx, 1 );
+ aScriptChg.erase( aScriptChg.begin() + nScriptIdx );
+ aScriptType.erase( aScriptType.begin() + nScriptIdx );
}
// Insert a new entry in ScriptArray for the end of the RTL run:
- aScriptChg.Insert( nEnd, nScriptIdx );
- aScriptType.Insert( i18n::ScriptType::COMPLEX, nScriptIdx );
+ aScriptChg.insert( aScriptChg.begin() + nScriptIdx, nEnd );
+ aScriptType.insert( aScriptType.begin() + nScriptIdx, i18n::ScriptType::COMPLEX );
#if OSL_DEBUG_LEVEL > 1
BYTE nScriptType;
@@ -1384,7 +1389,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
(void) nLastScriptChg;
(void) nLastScriptType;
- for ( USHORT i2 = 0; i2 < aScriptChg.Count(); ++i2 )
+ for ( size_t i2 = 0; i2 < aScriptChg.size(); ++i2 )
{
nScriptChg = GetScriptChg( i2 );
nScriptType = GetScriptType( i2 );
@@ -1401,9 +1406,8 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
void SwScriptInfo::UpdateBidiInfo( const String& rTxt )
{
// remove invalid entries from direction information arrays
- const USHORT nDirRemove = aDirChg.Count();
- aDirChg.Remove( 0, nDirRemove );
- aDirType.Remove( 0, nDirRemove );
+ aDirChg.clear();
+ aDirType.clear();
//
// Bidi functions from icu 2.0
@@ -1420,13 +1424,12 @@ void SwScriptInfo::UpdateBidiInfo( const String& rTxt )
int32_t nEnd;
UBiDiLevel nCurrDir;
// counter for direction information arrays
- USHORT nCntDir = 0;
for ( USHORT nIdx = 0; nIdx < nCount; ++nIdx )
{
ubidi_getLogicalRun( pBidi, nStart, &nEnd, &nCurrDir );
- aDirChg.Insert( (USHORT)nEnd, nCntDir );
- aDirType.Insert( (BYTE)nCurrDir, nCntDir++ );
+ aDirChg.push_back( (USHORT)nEnd );
+ aDirType.push_back( (BYTE)nCurrDir );
nStart = nEnd;
}
@@ -2011,7 +2014,7 @@ sal_Bool SwScriptInfo::IsArabicText( const XubString& rTxt, xub_StrLen nStt, xub
sal_Bool SwScriptInfo::IsKashidaValid ( xub_StrLen nKashPos ) const
{
- for ( xub_StrLen i = 0; i < aKashidaInvalid.Count(); ++i )
+ for ( size_t i = 0; i < aKashidaInvalid.size(); ++i )
{
if ( aKashidaInvalid [ i ] == nKashPos )
return false;
@@ -2023,13 +2026,13 @@ sal_Bool SwScriptInfo::IsKashidaValid ( xub_StrLen nKashPos ) const
* SwScriptInfo::ClearKashidaInvalid()
*************************************************************************/
-void SwScriptInfo::ClearKashidaInvalid ( xub_StrLen nKashPos )
+void SwScriptInfo::ClearKashidaInvalid ( xub_StrLen nKashPos )
{
- for ( xub_StrLen i = 0; i < aKashidaInvalid.Count(); ++i )
+ for ( size_t i = 0; i < aKashidaInvalid.size(); ++i )
{
if ( aKashidaInvalid [ i ] == nKashPos )
{
- aKashidaInvalid.Remove (i, 1);
+ aKashidaInvalid.erase ( aKashidaInvalid.begin() + i );
return;
}
}
@@ -2085,7 +2088,7 @@ bool SwScriptInfo::MarkOrClearKashidaInvalid ( xub_StrLen nStt, xub_StrLen nLen,
void SwScriptInfo::MarkKashidaInvalid ( xub_StrLen nKashPos )
{
- aKashidaInvalid.Insert( nKashPos, aKashidaInvalid.Count() );
+ aKashidaInvalid.push_back( nKashPos );
}
/*************************************************************************
@@ -2122,8 +2125,8 @@ USHORT SwScriptInfo::GetKashidaPositions ( xub_StrLen nStt, xub_StrLen nLen,
void SwScriptInfo::SetNoKashidaLine ( xub_StrLen nStt, xub_StrLen nLen )
{
- aNoKashidaLine.Insert( nStt, aNoKashidaLine.Count());
- aNoKashidaLineEnd.Insert( nStt+nLen, aNoKashidaLineEnd.Count());
+ aNoKashidaLine.push_back( nStt );
+ aNoKashidaLineEnd.push_back( nStt+nLen );
}
/*************************************************************************
@@ -2133,7 +2136,7 @@ void SwScriptInfo::SetNoKashidaLine ( xub_StrLen nStt, xub_StrLen nLen )
bool SwScriptInfo::IsKashidaLine ( xub_StrLen nCharIdx ) const
{
- for( xub_StrLen i = 0; i < aNoKashidaLine.Count(); ++i )
+ for( size_t i = 0; i < aNoKashidaLine.size(); ++i )
{
if( nCharIdx >= aNoKashidaLine[ i ] && nCharIdx < aNoKashidaLineEnd[ i ])
return false;
@@ -2146,13 +2149,13 @@ bool SwScriptInfo::IsKashidaLine ( xub_StrLen nCharIdx ) const
void SwScriptInfo::ClearNoKashidaLine ( xub_StrLen nStt, xub_StrLen nLen )
{
- xub_StrLen i = 0;
- while( i < aNoKashidaLine.Count())
+ size_t i = 0;
+ while( i < aNoKashidaLine.size())
{
if( nStt + nLen >= aNoKashidaLine[ i ] && nStt < aNoKashidaLineEnd [ i ] )
{
- aNoKashidaLine.Remove(i, 1);
- aNoKashidaLineEnd.Remove(i, 1);
+ aNoKashidaLine.erase(aNoKashidaLine.begin() + i);
+ aNoKashidaLineEnd.erase(aNoKashidaLineEnd.begin() + i);
}
else
++i;
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index f9f86db667b9..35f45f20d4c7 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -1022,10 +1022,10 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
{
pRet->pItem = NULL;
pRet->pAttr = (*pHints)[n2Lines];
- aEnd.Insert( *pRet->pAttr->GetEnd(), 0 );
+ aEnd.push_front( *pRet->pAttr->GetEnd() );
if( pItem )
{
- aEnd[ 0 ] = GetTxt().Len();
+ aEnd.front() = GetTxt().Len();
bOn = ((SvxTwoLinesItem*)pItem)->GetEndBracket() ==
p2Lines->GetEndBracket() &&
((SvxTwoLinesItem*)pItem)->GetStartBracket() ==
@@ -1036,7 +1036,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
{
pRet->pItem = pItem;
pRet->pAttr = NULL;
- aEnd.Insert( GetTxt().Len(), 0 );
+ aEnd.push_front( GetTxt().Len() );
}
pRet->nId = SW_MC_DOUBLE;
pRet->nLevel = GetTxtFrm()->IsRightToLeft() ? 1 : 0;
@@ -1070,23 +1070,23 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
// If the start of the next atribute is behind the end of
// the last attribute on the aEnd-stack, this is the endposition
// on the stack is the end of the 2-line portion.
- if( !bOn || aEnd[ aEnd.Count()-1 ] < *pTmp->GetStart() )
+ if( !bOn || aEnd.back() < *pTmp->GetStart() )
break;
// At this moment, bOn is TRUE and the next attribute starts
// behind rPos, so we could move rPos to the next startpoint
rPos = *pTmp->GetStart();
// We clean up the aEnd-stack, endpositions equal to rPos are
// superfluous.
- while( aEnd.Count() && aEnd[ aEnd.Count()-1 ] <= rPos )
+ while( !aEnd.empty() && aEnd.back() <= rPos )
{
bOn = !bOn;
- aEnd.Remove( aEnd.Count()-1, 1 );
+ aEnd.pop_back();
}
// If the endstack is empty, we simulate an attribute with
// state TRUE and endposition rPos
- if( !aEnd.Count() )
+ if( aEnd.empty() )
{
- aEnd.Insert( rPos, 0 );
+ aEnd.push_front( rPos );
bOn = sal_True;
}
}
@@ -1098,8 +1098,8 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
if( bTwo == bOn )
{ // .. with the same state, so the last attribute could
// be continued.
- if( aEnd[ aEnd.Count()-1 ] < *pTmp->GetEnd() )
- aEnd[ aEnd.Count()-1 ] = *pTmp->GetEnd();
+ if( aEnd.back() < *pTmp->GetEnd() )
+ aEnd.back() = *pTmp->GetEnd();
}
else
{ // .. with a different state.
@@ -1107,17 +1107,17 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
// If this is smaller than the last on the stack, we put
// it on the stack. If it has the same endposition, the last
// could be removed.
- if( aEnd[ aEnd.Count()-1 ] > *pTmp->GetEnd() )
- aEnd.Insert( *pTmp->GetEnd(), aEnd.Count() );
- else if( aEnd.Count() > 1 )
- aEnd.Remove( aEnd.Count()-1, 1 );
+ if( aEnd.back() > *pTmp->GetEnd() )
+ aEnd.push_back( *pTmp->GetEnd() );
+ else if( aEnd.size() > 1 )
+ aEnd.pop_back();
else
- aEnd[ aEnd.Count()-1 ] = *pTmp->GetEnd();
+ aEnd.back() = *pTmp->GetEnd();
}
}
}
- if( bOn && aEnd.Count() )
- rPos = aEnd[ aEnd.Count()-1 ];
+ if( bOn && !aEnd.empty() )
+ rPos = aEnd.back();
return pRet;
}
if( nRotate < nCount || ( pRotItem && pRotItem == pRotate &&
@@ -1133,7 +1133,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
// The bOn flag signs the state of the last 2-line attribute in the
// aEnd-stack, which could interrupts the winning rotation attribute.
sal_Bool bOn = pItem ? sal_True : sal_False;
- aEnd.Insert( GetTxt().Len(), 0 );
+ aEnd.push_front( GetTxt().Len() );
// n2Lines is the index of the last 2-line-attribute, which contains
// the actual position.
i = 0;
@@ -1145,17 +1145,17 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
continue;
if( n2Start < *pTmp->GetStart() )
{
- if( bOn || aEnd[ aEnd.Count()-1 ] < *pTmp->GetStart() )
+ if( bOn || aEnd.back() < *pTmp->GetStart() )
break;
n2Start = *pTmp->GetStart();
- while( aEnd.Count() && aEnd[ aEnd.Count()-1 ] <= n2Start )
+ while( !aEnd.empty() && aEnd.back() <= n2Start )
{
bOn = !bOn;
- aEnd.Remove( aEnd.Count()-1, 1 );
+ aEnd.pop_back();
}
- if( !aEnd.Count() )
+ if( aEnd.empty() )
{
- aEnd.Insert( n2Start, 0 );
+ aEnd.push_front( n2Start );
bOn = sal_False;
}
}
@@ -1170,36 +1170,36 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
{
if( bTwo == bOn )
{
- if( aEnd[ aEnd.Count()-1 ] < *pTmp->GetEnd() )
- aEnd[ aEnd.Count()-1 ] = *pTmp->GetEnd();
+ if( aEnd.back() < *pTmp->GetEnd() )
+ aEnd.back() = *pTmp->GetEnd();
}
else
{
bOn = bTwo;
- if( aEnd[ aEnd.Count()-1 ] > *pTmp->GetEnd() )
- aEnd.Insert( *pTmp->GetEnd(), aEnd.Count() );
- else if( aEnd.Count() > 1 )
- aEnd.Remove( aEnd.Count()-1, 1 );
+ if( aEnd.back() > *pTmp->GetEnd() )
+ aEnd.push_back( *pTmp->GetEnd() );
+ else if( aEnd.size() > 1 )
+ aEnd.pop_back();
else
- aEnd[ aEnd.Count()-1 ] = *pTmp->GetEnd();
+ aEnd.back() = *pTmp->GetEnd();
}
}
}
- if( !bOn && aEnd.Count() )
- n2Start = aEnd[ aEnd.Count()-1 ];
+ if( !bOn && !aEnd.empty() )
+ n2Start = aEnd.back();
- if( aEnd.Count() )
- aEnd.Remove( 0, aEnd.Count() );
+ if( !aEnd.empty() )
+ aEnd.clear();
bOn = sal_True;
if( nRotate < nCount )
{
pRet->pItem = NULL;
pRet->pAttr = (*pHints)[nRotate];
- aEnd.Insert( *pRet->pAttr->GetEnd(), 0 );
+ aEnd.push_front( *pRet->pAttr->GetEnd() );
if( pRotItem )
{
- aEnd[ 0 ] = GetTxt().Len();
+ aEnd.front() = GetTxt().Len();
bOn = ((SvxCharRotateItem*)pRotItem)->GetValue() ==
pRotate->GetValue();
}
@@ -1208,7 +1208,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
{
pRet->pItem = pRotItem;
pRet->pAttr = NULL;
- aEnd.Insert( GetTxt().Len(), 0 );
+ aEnd.push_front( GetTxt().Len() );
}
i = 0;
while( i < nCount )
@@ -1218,17 +1218,17 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
continue;
if( rPos < *pTmp->GetStart() )
{
- if( !bOn || aEnd[ aEnd.Count()-1 ] < *pTmp->GetStart() )
+ if( !bOn || aEnd.back() < *pTmp->GetStart() )
break;
rPos = *pTmp->GetStart();
- while( aEnd.Count() && aEnd[ aEnd.Count()-1 ] <= rPos )
+ while( !aEnd.empty() && aEnd.back() <= rPos )
{
bOn = !bOn;
- aEnd.Remove( aEnd.Count()-1, 1 );
+ aEnd.pop_back();
}
- if( !aEnd.Count() )
+ if( aEnd.empty() )
{
- aEnd.Insert( rPos, 0 );
+ aEnd.push_front( rPos );
bOn = sal_True;
}
}
@@ -1241,23 +1241,23 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
{
if( bTwo == bOn )
{
- if( aEnd[ aEnd.Count()-1 ] < *pTmp->GetEnd() )
- aEnd[ aEnd.Count()-1 ] = *pTmp->GetEnd();
+ if( aEnd.back() < *pTmp->GetEnd() )
+ aEnd.back() = *pTmp->GetEnd();
}
else
{
bOn = bTwo;
- if( aEnd[ aEnd.Count()-1 ] > *pTmp->GetEnd() )
- aEnd.Insert( *pTmp->GetEnd(), aEnd.Count() );
- else if( aEnd.Count() > 1 )
- aEnd.Remove( aEnd.Count()-1, 1 );
+ if( aEnd.back() > *pTmp->GetEnd() )
+ aEnd.push_back( *pTmp->GetEnd() );
+ else if( aEnd.size() > 1 )
+ aEnd.pop_back();
else
- aEnd[ aEnd.Count()-1 ] = *pTmp->GetEnd();
+ aEnd.back() = *pTmp->GetEnd();
}
}
}
- if( bOn && aEnd.Count() )
- rPos = aEnd[ aEnd.Count()-1 ];
+ if( bOn && !aEnd.empty() )
+ rPos = aEnd.back();
if( rPos > n2Start )
rPos = n2Start;
return pRet;
diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index 526dbe74c4d9..514ac96d3d46 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -106,6 +106,8 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
}
ViewShell *pSh = rInf.GetVsh();
+ SwDoc *const pDoc( (pSh) ? pSh->GetDoc() : 0 );
+ bool const bInClipboard( (pDoc) ? pDoc->IsClipBoard() : true );
sal_Bool bPlaceHolder = sal_False;
switch( pFld->GetTyp()->Which() )
@@ -117,16 +119,26 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
case RES_COMBINED_CHARS:
{
- String sStr( pFld->GetCntnt( bName ));
if( bName )
- pRet = new SwFldPortion( sStr );
+ {
+ String const sName( pFld->GetFieldName() );
+ pRet = new SwFldPortion(sName);
+ }
else
- pRet = new SwCombinedPortion( sStr );
+ {
+ String const sContent( pFld->ExpandField(bInClipboard) );
+ pRet = new SwCombinedPortion(sContent);
+ }
}
break;
case RES_HIDDENTXTFLD:
- pRet = new SwHiddenPortion(pFld->GetCntnt( bName ));
+ {
+ String const str( (bName)
+ ? pFld->GetFieldName()
+ : pFld->ExpandField(bInClipboard) );
+ pRet = new SwHiddenPortion(str);
+ }
break;
case RES_CHAPTERFLD:
@@ -135,13 +147,25 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
((SwChapterField*)pFld)->ChangeExpansion( pFrame,
&((SwTxtFld*)pHint)->GetTxtNode() );
}
- pRet = new SwFldPortion( pFld->GetCntnt( bName ) );
+ {
+ String const str( (bName)
+ ? pFld->GetFieldName()
+ : pFld->ExpandField(bInClipboard) );
+ pRet = new SwFldPortion( str );
+ }
break;
case RES_DOCSTATFLD:
if( !bName && pSh && !pSh->Imp()->IsUpdateExpFlds() )
+ {
((SwDocStatField*)pFld)->ChangeExpansion( pFrame );
- pRet = new SwFldPortion( pFld->GetCntnt( bName ) );
+ }
+ {
+ String const str( (bName)
+ ? pFld->GetFieldName()
+ : pFld->ExpandField(bInClipboard) );
+ pRet = new SwFldPortion( str );
+ }
break;
case RES_PAGENUMBERFLD:
@@ -153,7 +177,6 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
const SwRootFrm* pTmpRootFrm = pSh->GetLayout();
const sal_Bool bVirt = pTmpRootFrm->IsVirtPageNum();
- SwDoc* pDoc = pSh->GetDoc();
MSHORT nVirtNum = pFrame->GetVirtPageNum();
MSHORT nNumPages = pTmpRootFrm->GetPageNum();
sal_Int16 nNumFmt = -1;
@@ -163,7 +186,12 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
pPageNr->ChangeExpansion( pDoc, nVirtNum, nNumPages,
bVirt, nNumFmt > -1 ? &nNumFmt : 0);
}
- pRet = new SwFldPortion( pFld->GetCntnt( bName ) );
+ {
+ String const str( (bName)
+ ? pFld->GetFieldName()
+ : pFld->ExpandField(bInClipboard) );
+ pRet = new SwFldPortion( str );
+ }
break;
}
case RES_GETEXPFLD:
@@ -183,7 +211,12 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
pExpFld->ChgBodyTxtFlag( sal_True );
}
}
- pRet = new SwFldPortion( pFld->GetCntnt( bName ) );
+ {
+ String const str( (bName)
+ ? pFld->GetFieldName()
+ : pFld->ExpandField(bInClipboard) );
+ pRet = new SwFldPortion( str );
+ }
break;
}
case RES_DBFLD:
@@ -207,13 +240,25 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
}
*/
}
- pRet = new SwFldPortion( pFld->GetCntnt( bName ) );
+ {
+ String const str( (bName)
+ ? pFld->GetFieldName()
+ : pFld->ExpandField(bInClipboard) );
+ pRet = new SwFldPortion(str);
+ }
break;
}
case RES_REFPAGEGETFLD:
if( !bName && pSh && !pSh->Imp()->IsUpdateExpFlds() )
+ {
((SwRefPageGetField*)pFld)->ChangeExpansion( pFrame, (SwTxtFld*)pHint );
- pRet = new SwFldPortion( pFld->GetCntnt( bName ) );
+ }
+ {
+ String const str( (bName)
+ ? pFld->GetFieldName()
+ : pFld->ExpandField(bInClipboard) );
+ pRet = new SwFldPortion(str);
+ }
break;
case RES_JUMPEDITFLD:
@@ -224,9 +269,12 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
break;
default:
- {
- pRet = new SwFldPortion(pFld->GetCntnt( bName ) );
- }
+ {
+ String const str( (bName)
+ ? pFld->GetFieldName()
+ : pFld->ExpandField(bInClipboard) );
+ pRet = new SwFldPortion(str);
+ }
}
if( bNewFlyPor )
@@ -249,7 +297,12 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
else
pTmpFnt->SetDiffFnt( &pChFmt->GetAttrSet(), pFrm->GetTxtNode()->getIDocumentSettingAccess() );
}
- pRet = new SwFldPortion( pFld->GetCntnt( bName ), pTmpFnt, bPlaceHolder );
+ {
+ String const str( (bName)
+ ? pFld->GetFieldName()
+ : pFld->ExpandField(bInClipboard) );
+ pRet = new SwFldPortion(str, pTmpFnt, bPlaceHolder);
+ }
}
return pRet;
@@ -488,13 +541,7 @@ SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const
}
else
{
- // --> OD 2006-06-02 #b6432095#
- // use method <SwNumRule::MakeNumString(..)> instead of
- // method <SwTxtNode::GetNumString()>, because for levels with
- // numbering none the prefix and the suffix strings have to be provided.
-// XubString aTxt( pTxtNd->GetNumString() );
- XubString aTxt( pNumRule->MakeNumString( *(pTxtNd->GetNum()) ) );
- // <--
+ XubString aTxt( pTxtNd->GetNumString() );
// --> OD 2008-01-23 #newlistlevelattrs#
if ( aTxt.Len() > 0 )
{
diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx
index 61f873b010b7..ba3145c1139b 100644
--- a/sw/source/core/tox/txmsrt.cxx
+++ b/sw/source/core/tox/txmsrt.cxx
@@ -51,9 +51,7 @@
#include <authfld.hxx>
#include <toxwrap.hxx>
-#ifndef _COMCORE_HRC
#include <comcore.hrc>
-#endif
#include <numrule.hxx>
extern BOOL IsFrameBehind( const SwTxtNode& rMyNd, xub_StrLen nMySttPos,
@@ -403,7 +401,7 @@ BOOL SwTOXIndex::operator<( const SwTOXSortTabBase& rCmpBase )
//
-void SwTOXIndex::_GetText( String& rTxt, String& rTxtReading )
+void SwTOXIndex::GetText_Impl( String& rTxt, String& rTxtReading ) const
{
ASSERT(pTxtMark, "pTxtMark == 0, Kein Stichwort");
const SwTOXMark& rTOXMark = pTxtMark->GetTOXMark();
@@ -530,7 +528,7 @@ USHORT SwTOXCustom::GetLevel() const
}
-void SwTOXCustom::_GetText( String& rTxt, String &rTxtReading )
+void SwTOXCustom::GetText_Impl( String& rTxt, String &rTxtReading ) const
{
rTxt = aKey;
rTxtReading = sReading;
@@ -553,7 +551,7 @@ SwTOXContent::SwTOXContent( const SwTxtNode& rNd, const SwTxtTOXMark* pMark,
// Der Text des Inhalts
//
-void SwTOXContent::_GetText( String& rTxt, String& rTxtReading )
+void SwTOXContent::GetText_Impl( String& rTxt, String& rTxtReading ) const
{
const xub_StrLen* pEnd = pTxtMark->GetEnd();
if( pEnd && !pTxtMark->GetTOXMark().IsAlternativeText() )
@@ -612,7 +610,7 @@ SwTOXPara::SwTOXPara( const SwCntntNode& rNd, SwTOXElement eT, USHORT nLevel )
}
-void SwTOXPara::_GetText( String& rTxt, String& )
+void SwTOXPara::GetText_Impl( String& rTxt, String& ) const
{
const SwCntntNode* pNd = aTOXSources[0].pNd;
switch( eType )
@@ -801,7 +799,7 @@ SwTOXTable::SwTOXTable( const SwCntntNode& rNd )
}
-void SwTOXTable::_GetText( String& rTxt, String& )
+void SwTOXTable::GetText_Impl( String& rTxt, String& ) const
{
const SwNode* pNd = aTOXSources[0].pNd;
if( pNd && 0 != ( pNd = pNd->FindTableNode() ) )
@@ -868,11 +866,14 @@ USHORT SwTOXAuthority::GetLevel() const
/*-- 15.09.99 14:28:08---------------------------------------------------
-----------------------------------------------------------------------*/
-void SwTOXAuthority::_GetText( String& rTxt, String& )
+static String lcl_GetText(SwFmtFld const& rField)
+{
+ return rField.GetFld()->ExpandField(true);
+}
+
+void SwTOXAuthority::GetText_Impl( String& rTxt, String& ) const
{
- bool const isClipBoard(
- m_rField.GetTxtFld()->GetTxtNode().GetDoc()->IsClipBoard());
- rTxt = m_rField.GetFld()->ExpandField(isClipBoard);
+ rTxt = lcl_GetText(m_rField);
}
/* -----------------21.09.99 12:50-------------------
@@ -885,7 +886,7 @@ void SwTOXAuthority::FillText( SwTxtNode& rNd,
String sText;
if(AUTH_FIELD_IDENTIFIER == nAuthField)
{
- sText = pField->Expand();
+ sText = lcl_GetText(m_rField);
const SwAuthorityFieldType* pType = (const SwAuthorityFieldType*)pField->GetTyp();
sal_Unicode cChar = pType->GetPrefix();
if(cChar && cChar != ' ')
diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx
index 6b1adc76fbec..be01f06cd472 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -259,10 +259,9 @@ BOOL SwFmtFld::IsProtect() const
|*
*************************************************************************/
-SwTxtFld::SwTxtFld(SwFmtFld & rAttr, xub_StrLen const nStartPos,
- bool const bInClipboard)
+SwTxtFld::SwTxtFld(SwFmtFld & rAttr, xub_StrLen const nStartPos)
: SwTxtAttr( rAttr, nStartPos )
- , m_aExpand( rAttr.GetFld()->ExpandField(bInClipboard) )
+ , m_aExpand( rAttr.GetFld()->ExpandField(true) )
, m_pTxtNode( 0 )
{
rAttr.pTxtAttr = this;
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 76560bae91d7..d6a6dfb045ac 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -99,6 +99,10 @@
#include <list.hxx>
// <--
+
+using namespace ::com::sun::star;
+
+
SV_DECL_PTRARR( TmpHints, SwTxtAttr*, 0, 4 )
TYPEINIT1( SwTxtNode, SwCntntNode )
@@ -2566,9 +2570,14 @@ void SwTxtNode::NumRuleChgd()
}
SetInSwFntCache( FALSE );
- SvxLRSpaceItem& rLR = (SvxLRSpaceItem&)GetSwAttrSet().GetLRSpace();
-
- SwModify::Modify( &rLR, &rLR );
+ // Sending "noop" modify in order to cause invalidations of registered
+ // <SwTxtFrm> instances to get the list style change respectively the change
+ // in the list tree reflected in the layout.
+ // Important note:
+ {
+ SvxLRSpaceItem& rLR = (SvxLRSpaceItem&)GetSwAttrSet().GetLRSpace();
+ SwModify::Modify( &rLR, &rLR );
+ }
}
// -> #i27615#
@@ -2834,13 +2843,19 @@ XubString SwTxtNode::GetNumString( const bool _bInclPrefixAndSuffixStrings, cons
}
const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L;
if ( pRule &&
- IsCountedInList() &&
- pRule->Get( static_cast<USHORT>(GetActualListLevel()) ).IsTxtFmt() )
+ IsCountedInList() )
{
- return pRule->MakeNumString( GetNum()->GetNumberVector(),
+ SvxNumberType const& rNumberType(
+ pRule->Get( static_cast<USHORT>(GetActualListLevel()) ) );
+ if (rNumberType.IsTxtFmt() ||
+ // #b6432095#
+ (style::NumberingType::NUMBER_NONE == rNumberType.GetNumberingType()))
+ {
+ return pRule->MakeNumString( GetNum()->GetNumberVector(),
_bInclPrefixAndSuffixStrings ? TRUE : FALSE,
FALSE,
_nRestrictToThisLevel );
+ }
}
return aEmptyStr;
@@ -3057,8 +3072,7 @@ void SwTxtNode::Replace0xFF( XubString& rTxt, xub_StrLen& rTxtStt,
{
const XubString aExpand(
static_cast<SwTxtFld const*>(pAttr)->GetFld()
- .GetFld()->ExpandField(
- GetDoc()->IsClipBoard()));
+ .GetFld()->ExpandField(true));
rTxt.Insert( aExpand, nPos );
nPos = nPos + aExpand.Len();
nEndPos = nEndPos + aExpand.Len();
@@ -3207,7 +3221,7 @@ BOOL SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx,
{
XubString const aExpand(
static_cast<SwTxtFld const*>(pHt)->GetFld().GetFld()
- ->ExpandField(GetDoc()->IsClipBoard()));
+ ->ExpandField(true));
if( aExpand.Len() )
{
aDestIdx++; // dahinter einfuegen;
@@ -3305,7 +3319,7 @@ const ModelToViewHelper::ConversionMap*
{
const XubString aExpand(
static_cast<SwTxtFld const*>(pAttr)->GetFld().GetFld()
- ->ExpandField(GetDoc()->IsClipBoard()));
+ ->ExpandField(true));
if ( aExpand.Len() > 0 )
{
const xub_StrLen nFieldPos = *pAttr->GetStart();
@@ -5080,8 +5094,6 @@ bool SwTxtNode::IsInContent() const
#include <unoparagraph.hxx>
-using namespace ::com::sun::star;
-
uno::Reference< rdf::XMetadatable >
SwTxtNode::MakeUnoObject()
{
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index ac2f281b0d90..4d56942ecef4 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -1043,8 +1043,7 @@ SwTxtAttr* MakeTxtAttr( SwDoc & rDoc, SfxPoolItem& rAttr,
pNew = new SwTxtINetFmt( (SwFmtINetFmt&)rNew, nStt, nEnd );
break;
case RES_TXTATR_FIELD:
- pNew = new SwTxtFld( static_cast<SwFmtFld &>(rNew), nStt,
- rDoc.IsClipBoard() );
+ pNew = new SwTxtFld( static_cast<SwFmtFld &>(rNew), nStt );
break;
case RES_TXTATR_FLYCNT:
{
diff --git a/sw/source/core/undo/makefile.mk b/sw/source/core/undo/makefile.mk
index c381761adba1..35771fa444bf 100644
--- a/sw/source/core/undo/makefile.mk
+++ b/sw/source/core/undo/makefile.mk
@@ -49,6 +49,7 @@ EXCEPTIONSFILES = \
$(SLO)$/unattr.obj \
$(SLO)$/undobj.obj \
$(SLO)$/undraw.obj \
+ $(SLO)$/unnum.obj \
$(SLO)$/unovwr.obj \
$(SLO)$/untbl.obj
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx
index 6df9f9aa24b8..d9a0cc8514a4 100644
--- a/sw/source/core/undo/rolbck.cxx
+++ b/sw/source/core/undo/rolbck.cxx
@@ -1389,7 +1389,13 @@ SwRegHistory::SwRegHistory( const SwNode& rNd, SwHistory* pHst )
void SwRegHistory::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
- if ( m_pHistory && ( pOld || pNew ) )
+ // --> OD 2010-10-05 #i114861#
+ // Do not handle a "noop" modify
+ // - e.g. <SwTxtNode::NumRuleChgd()> uses such a "noop" modify
+// if ( m_pHistory && ( pOld || pNew ) )
+ if ( m_pHistory && ( pOld || pNew ) &&
+ pOld != pNew )
+ // <--
{
if ( pNew->Which() < POOLATTR_END )
{
diff --git a/sw/source/core/undo/unnum.cxx b/sw/source/core/undo/unnum.cxx
index e7885db39b5f..8cf782e85b53 100644
--- a/sw/source/core/undo/unnum.cxx
+++ b/sw/source/core/undo/unnum.cxx
@@ -197,13 +197,12 @@ void SwUndoInsNum::SaveOldNumRule( const SwNumRule& rOld )
pOldNumRule = new SwNumRule( rOld );
}
-/* */
+/* */
SwUndoDelNum::SwUndoDelNum( const SwPaM& rPam )
: SwUndo( UNDO_DELNUM ), SwUndRng( rPam ),
- aNodeIdx( BYTE( nEndNode - nSttNode > 255 ? 255 : nEndNode - nSttNode )),
- aLevels( BYTE( nEndNode - nSttNode > 255 ? 255 : nEndNode - nSttNode ))
+ aNodeIdx( BYTE( nEndNode - nSttNode > 255 ? 255 : nEndNode - nSttNode ))
{
pHistory = new SwHistory;
}
@@ -229,7 +228,7 @@ void SwUndoDelNum::Undo( SwUndoIter& rUndoIter )
for( USHORT n = 0; n < aNodeIdx.Count(); ++n )
{
SwTxtNode* pNd = rDoc.GetNodes()[ aNodeIdx[ n ] ]->GetTxtNode();
- ASSERT( pNd, "wo ist der TextNode geblieben?" );
+ ASSERT( pNd, "Where is TextNode gone?" );
pNd->SetAttrListLevel(aLevels[ n ] );
if( pNd->GetCondFmtColl() )
@@ -261,12 +260,12 @@ void SwUndoDelNum::AddNode( const SwTxtNode& rNd, BOOL )
USHORT nIns = aNodeIdx.Count();
aNodeIdx.Insert( rNd.GetIndex(), nIns );
- aLevels.Insert( static_cast<BYTE>(rNd.GetActualListLevel()), nIns );
+ aLevels.insert( aLevels.begin() + nIns, static_cast<BYTE>(rNd.GetActualListLevel()) );
}
}
-/* */
+/* */
SwUndoMoveNum::SwUndoMoveNum( const SwPaM& rPam, long nOff, BOOL bIsOutlMv )
@@ -325,7 +324,7 @@ void SwUndoMoveNum::Repeat( SwUndoIter& rUndoIter )
rUndoIter.GetDoc().MoveParagraph( *rUndoIter.pAktPam, nOffset, FALSE );
}
-/* */
+/* */
SwUndoNumUpDown::SwUndoNumUpDown( const SwPaM& rPam, short nOff )
@@ -356,7 +355,7 @@ void SwUndoNumUpDown::Repeat( SwUndoIter& rUndoIter )
rUndoIter.GetDoc().NumUpDown( *rUndoIter.pAktPam, 1 == nOffset );
}
-/* */
+/* */
// #115901#
SwUndoNumOrNoNum::SwUndoNumOrNoNum( const SwNodeIndex& rIdx, BOOL bOldNum,
@@ -402,7 +401,7 @@ void SwUndoNumOrNoNum::Repeat( SwUndoIter& rUndoIter )
TRUE);
}
-/* */
+/* */
SwUndoNumRuleStart::SwUndoNumRuleStart( const SwPosition& rPos, BOOL bFlg )
: SwUndo( UNDO_SETNUMRULESTART ),
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index f66cae89ce21..9a654170187a 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -1745,7 +1745,7 @@ void SwUndoTblNdsChg::SaveNewBoxes( const SwTableNode& rTblNd,
( nNodes != ( pSourceBox->GetSttNd()->EndOfSectionIndex() -
pSourceBox->GetSttIdx() ) )
&& ( nNodes - 1 > nLineDiff );
- aMvBoxes.Insert( bNodesMoved, nInsPos );
+ aMvBoxes.insert( aMvBoxes.begin() + nInsPos, bNodesMoved );
}
}
}
@@ -1805,7 +1805,7 @@ void SwUndoTblNdsChg::Undo( SwUndoIter& rUndoIter )
}
Ptrs.pDelSects->DeleteAndDestroy( 0, Ptrs.pDelSects->Count() );
}
- else if( aMvBoxes.Count() )
+ else if( !aMvBoxes.empty() )
{
// dann muessen Nodes verschoben und nicht geloescht werden!
// Dafuer brauchen wir aber ein temp Array
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index bd4a4ce5ef98..f63fee217e29 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -1267,13 +1267,16 @@ uno::Reference< beans::XPropertySet > SwXTextField::getTextFieldMaster(void) th
OUString SwXTextField::getPresentation(sal_Bool bShowCommand) throw( uno::RuntimeException )
{
vos::OGuard aGuard(Application::GetSolarMutex());
- OUString sRet;
- const SwField* pField = GetField();
- if(pField)
- sRet = pField->GetCntnt(bShowCommand);
- else
+
+ SwField const*const pField = GetField();
+ if (!pField)
+ {
throw uno::RuntimeException();
- return sRet;
+ }
+ ::rtl::OUString const ret( (bShowCommand)
+ ? pField->GetFieldName()
+ : pField->ExpandField(true) );
+ return ret;
}
/* -----------------18.02.99 13:39-------------------
*
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 4309622c9545..ae23406c04ce 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -3993,11 +3993,11 @@ SwAutoStylesEnumImpl::SwAutoStylesEnumImpl( SwDoc* pInitDoc, IStyleAccess::SwAut
{
std::set< std::pair< USHORT, USHORT > > aRubyMap;
SwAttrPool& rAttrPool = pDoc->GetAttrPool();
- USHORT nCount = rAttrPool.GetItemCount( RES_TXTATR_CJK_RUBY );
+ sal_uInt32 nCount = rAttrPool.GetItemCount2( RES_TXTATR_CJK_RUBY );
- for ( USHORT nI = 0; nI < nCount; ++nI )
+ for ( sal_uInt32 nI = 0; nI < nCount; ++nI )
{
- const SwFmtRuby* pItem = static_cast<const SwFmtRuby*>(rAttrPool.GetItem( RES_TXTATR_CJK_RUBY, nI ));
+ const SwFmtRuby* pItem = static_cast<const SwFmtRuby*>(rAttrPool.GetItem2( RES_TXTATR_CJK_RUBY, nI ));
if ( pItem && pItem->GetTxtRuby() )
{
std::pair< USHORT, USHORT > aPair( pItem->GetPosition(), pItem->GetAdjustment() );
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index fdc382ad99d9..5669ec8e6b99 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -2285,17 +2285,6 @@ void SwTableProperties_Impl::ApplyTblAttr(const SwTable& rTbl, SwDoc& rDoc)
rDoc.SetAttr( aSet, *rTbl.GetFrmFmt() );
}
}
-/* -----------------------------11.07.00 12:14--------------------------------
-
- ---------------------------------------------------------------------------*/
-SwXTextTable* SwXTextTable::GetImplementation(uno::Reference< XInterface> xRef )
-{
- uno::Reference<lang::XUnoTunnel> xTunnel( xRef, uno::UNO_QUERY);
- if(xTunnel.is())
- return reinterpret_cast< SwXTextTable * >(
- sal::static_int_cast< sal_IntPtr >( xTunnel->getSomething(SwXTextTable::getUnoTunnelId()) ));
- return 0;
-}
/* -----------------------------10.03.00 18:02--------------------------------
---------------------------------------------------------------------------*/
diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx
index 001d958bc523..6897e6065db0 100644
--- a/sw/source/core/view/pagepreviewlayout.cxx
+++ b/sw/source/core/view/pagepreviewlayout.cxx
@@ -1450,12 +1450,6 @@ sal_uInt16 SwPagePreviewLayout::GetColOfPage( sal_uInt16 _nPageNum ) const
return nCol;
}
-Size SwPagePreviewLayout::GetMaxPageSize() const
-{
- ASSERT( PreviewLayoutValid(), "PagePreviewLayout not valid" );
- return maMaxPageSize;
-}
-
Size SwPagePreviewLayout::GetPrevwDocSize() const
{
ASSERT( PreviewLayoutValid(), "PagePreviewLayout not valid" );
diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx
index d6cbf11b8731..b54922a1b8e7 100644
--- a/sw/source/core/view/printdata.cxx
+++ b/sw/source/core/view/printdata.cxx
@@ -40,7 +40,6 @@
#include <wdocsh.hxx>
#include <viewsh.hxx>
#include <docfld.hxx>
-#include <swprtopt.hxx>
#include <svl/languageoptions.hxx>
#include <toolkit/awt/vclxdevice.hxx>
@@ -127,7 +126,7 @@ void SwRenderData::ViewOptionAdjustStart( SwWrtShell &rSh, const SwViewOption &r
}
-void SwRenderData::ViewOptionAdjust( const SwPrtOptions *pPrtOptions )
+void SwRenderData::ViewOptionAdjust(SwPrintData const*const pPrtOptions)
{
m_pViewOptionAdjust->AdjustViewOptions( pPrtOptions );
}
@@ -144,7 +143,7 @@ void SwRenderData::ViewOptionAdjustStop()
void SwRenderData::MakeSwPrtOptions(
- SwPrtOptions &rOptions,
+ SwPrintData & rOptions,
const SwDocShell *pDocShell,
const SwPrintUIOptions *pOpt,
const SwRenderData *pData,
@@ -156,7 +155,7 @@ void SwRenderData::MakeSwPrtOptions(
// get default print options
const TypeId aSwWebDocShellTypeId = TYPE(SwWebDocShell);
BOOL bWeb = pDocShell->IsA( aSwWebDocShellTypeId );
- rOptions.MakeOptions( bWeb );
+ ::sw::InitPrintOptionsFromApplication(rOptions, bWeb);
// get print options to use from provided properties
rOptions.bPrintGraphic = pOpt->IsPrintGraphics();
@@ -183,17 +182,6 @@ void SwRenderData::MakeSwPrtOptions(
//! function will destroy the pointers
rOptions.SetPrintUIOptions( pOpt );
rOptions.SetRenderData( pData );
-
- // rOptions.aMulti is not used anymore in the XRenderable API
- // Thus we set it to a dummy value here.
- rOptions.aMulti = MultiSelection( Range( 1, 1 ) );
-
- //! Note: Since for PDF export of (multi-)selection a temporary
- //! document is created that contains only the selects parts,
- //! and thus that document is to printed in whole the,
- //! rOptions.bPrintSelection parameter will be false.
- if (bIsPDFExport)
- rOptions.bPrintSelection = FALSE;
}
diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx
index 1aa7c91a4c69..4c1f045f79be 100644
--- a/sw/source/core/view/vdraw.cxx
+++ b/sw/source/core/view/vdraw.cxx
@@ -52,7 +52,7 @@
#include "viewimp.hxx"
#include "dflyobj.hxx"
#include "viewopt.hxx"
-#include "swprtopt.hxx"
+#include "printdata.hxx"
#include "dcontact.hxx"
#include "dview.hxx"
#include "flyfrm.hxx"
@@ -179,7 +179,7 @@ void SwViewImp::UnlockPaint()
// outliner of the draw view for painting layers <hell> and <heaven>.
// OD 25.06.2003 #108784# - correct type of 1st parameter
void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
- const SwPrtOptions * _pPrintData,
+ SwPrintData const*const pPrintData,
const SwRect& ,
const Color* _pPageBackgrdColor,
const bool _bIsPageRightToLeft ) const
@@ -226,11 +226,11 @@ void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
}
pOutDev->Push( PUSH_LINECOLOR ); // #114231#
- if (_pPrintData)
+ if (pPrintData)
{
// hide drawings but not form controls (form controls are handled elsewhere)
SdrView &rSdrView = const_cast< SdrView & >(GetPageView()->GetView());
- rSdrView.setHideDraw( !_pPrintData->IsPrintDraw() );
+ rSdrView.setHideDraw( !pPrintData->IsPrintDraw() );
}
GetPageView()->DrawLayer(_nLayerID, pOutDev);
pOutDev->Pop();
diff --git a/sw/source/core/view/viewpg.cxx b/sw/source/core/view/viewpg.cxx
index fcb702a7112a..1119fc55d2a2 100644
--- a/sw/source/core/view/viewpg.cxx
+++ b/sw/source/core/view/viewpg.cxx
@@ -41,19 +41,15 @@
#include <rootfrm.hxx>
#include <viewimp.hxx>
#include <viewopt.hxx>
-#include <swprtopt.hxx> // SwPrtOptions
+#include <printdata.hxx>
#include <fldbas.hxx>
#include <ptqueue.hxx>
#include <swregion.hxx>
#include <hints.hxx>
#include <fntcache.hxx>
-#ifndef _STATSTR_HRC
#include <statstr.hrc> // Text fuer SfxProgress
-#endif
-#ifndef _COMCORE_HRC
#include <comcore.hrc>
-#endif
#include <IDocumentFieldsAccess.hxx>
#include <IDocumentDeviceAccess.hxx>
@@ -77,7 +73,7 @@ void ViewShell::ShowPreViewSelection( sal_uInt16 nSelPage )
OD 09.01.2003 #i6467#
*/
-void ViewShell::AdjustOptionsForPagePreview( const SwPrtOptions &_rPrintOptions )
+void ViewShell::AdjustOptionsForPagePreview(SwPrintData const& rPrintOptions)
{
if ( !IsPreView() )
{
@@ -85,7 +81,7 @@ void ViewShell::AdjustOptionsForPagePreview( const SwPrtOptions &_rPrintOptions
return;
}
- PrepareForPrint( _rPrintOptions );
+ PrepareForPrint( rPrintOptions );
return;
}
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index e74fb21f720a..83e0289e6082 100755..100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -71,7 +71,7 @@
#include <docufld.hxx> // PostItFld /-Type
#include <shellres.hxx>
#include <viewopt.hxx>
-#include <swprtopt.hxx> // SwPrtOptions
+#include <printdata.hxx> // SwPrintData
#include <pagedesc.hxx>
#include <poolfmt.hxx> // fuer RES_POOLPAGE_JAKET
#include <mdiexp.hxx> // Ansteuern der Statusleiste
@@ -369,107 +369,6 @@ void ViewShell::CalcPagesForPrint( USHORT nMax )
/******************************************************************************/
-SwDoc * ViewShell::CreatePrtDoc( SfxObjectShellRef &rDocShellRef)
-{
- ASSERT( this->IsA( TYPE(SwFEShell) ),"ViewShell::Prt for FEShell only");
- SwFEShell* pFESh = (SwFEShell*)this;
- // Wir bauen uns ein neues Dokument
- SwDoc *pPrtDoc = new SwDoc;
- pPrtDoc->acquire();
- pPrtDoc->SetRefForDocShell( (SfxObjectShellRef*)&(long&)rDocShellRef );
- pPrtDoc->LockExpFlds();
-
- const SfxPoolItem* pCpyItem;
- const SfxItemPool& rPool = GetAttrPool();
- for( USHORT nWh = POOLATTR_BEGIN; nWh < POOLATTR_END; ++nWh )
- if( 0 != ( pCpyItem = rPool.GetPoolDefaultItem( nWh ) ) )
- pPrtDoc->GetAttrPool().SetPoolDefaultItem( *pCpyItem );
-
- // JP 29.07.99 - Bug 67951 - set all Styles from the SourceDoc into
- // the PrintDoc - will be replaced!
- pPrtDoc->ReplaceStyles( *GetDoc() );
-
- SwShellCrsr *pActCrsr = pFESh->_GetCrsr();
- SwShellCrsr *pFirstCrsr = dynamic_cast<SwShellCrsr*>(pActCrsr->GetNext());
- if( !pActCrsr->HasMark() ) // bei Multiselektion kann der aktuelle Cursor leer sein
- {
- pActCrsr = dynamic_cast<SwShellCrsr*>(pActCrsr->GetPrev());
- }
-
- Point aSelPoint;
- if( pFESh->IsTableMode() )
- {
- SwShellTableCrsr* pShellTblCrsr = pFESh->GetTableCrsr();
-
- const SwCntntNode* pCntntNode = pShellTblCrsr->GetNode()->GetCntntNode();
- const SwCntntFrm *pCntntFrm = pCntntNode ? pCntntNode->GetFrm( 0, pShellTblCrsr->Start() ) : 0;
- if( pCntntFrm )
- {
- SwRect aCharRect;
- SwCrsrMoveState aTmpState( MV_NONE );
- pCntntFrm->GetCharRect( aCharRect, *pShellTblCrsr->Start(), &aTmpState );
- aSelPoint = Point( aCharRect.Left(), aCharRect.Top() );
- }
- }
- else
- {
- aSelPoint = pFirstCrsr->GetSttPos();
- }
-
- const SwPageFrm* pPage = GetLayout()->GetPageAtPos( aSelPoint );
- ASSERT( pPage, "no page found!" );
-
- // get page descriptor - fall back to the first one if pPage could not be found
- const SwPageDesc* pPageDesc = pPage ? pPrtDoc->FindPageDescByName(
- pPage->GetPageDesc()->GetName() ) : &pPrtDoc->_GetPageDesc( (sal_uInt16)0 );
-
- if( !pFESh->IsTableMode() && pActCrsr->HasMark() )
- { // Am letzten Absatz die Absatzattribute richten:
- SwNodeIndex aNodeIdx( *pPrtDoc->GetNodes().GetEndOfContent().StartOfSectionNode() );
- SwTxtNode* pTxtNd = pPrtDoc->GetNodes().GoNext( &aNodeIdx )->GetTxtNode();
- SwCntntNode *pLastNd =
- pActCrsr->GetCntntNode( (*pActCrsr->GetMark()) <= (*pActCrsr->GetPoint()) );
- // Hier werden die Absatzattribute des ersten Absatzes uebertragen
- if( pLastNd && pLastNd->IsTxtNode() )
- ((SwTxtNode*)pLastNd)->CopyCollFmt( *pTxtNd );
- }
-
- // es wurde in der CORE eine neu angelegt (OLE-Objekte kopiert!)
-// if( aDocShellRef.Is() )
-// SwDataExchange::InitOle( aDocShellRef, pPrtDoc );
- // und fuellen es mit dem selektierten Bereich
- pFESh->Copy( pPrtDoc );
-
- //Jetzt noch am ersten Absatz die Seitenvorlage setzen
- {
- SwNodeIndex aNodeIdx( *pPrtDoc->GetNodes().GetEndOfContent().StartOfSectionNode() );
- SwCntntNode* pCNd = pPrtDoc->GetNodes().GoNext( &aNodeIdx ); // gehe zum 1. ContentNode
- if( pFESh->IsTableMode() )
- {
- SwTableNode* pTNd = pCNd->FindTableNode();
- if( pTNd )
- pTNd->GetTable().GetFrmFmt()->SetFmtAttr( SwFmtPageDesc( pPageDesc ) );
- }
- else
- {
- pCNd->SetAttr( SwFmtPageDesc( pPageDesc ) );
- if( pFirstCrsr->HasMark() )
- {
- SwTxtNode *pTxtNd = pCNd->GetTxtNode();
- if( pTxtNd )
- {
- SwCntntNode *pFirstNd =
- pFirstCrsr->GetCntntNode( (*pFirstCrsr->GetMark()) > (*pFirstCrsr->GetPoint()) );
- // Hier werden die Absatzattribute des ersten Absatzes uebertragen
- if( pFirstNd && pFirstNd->IsTxtNode() )
- ((SwTxtNode*)pFirstNd)->CopyCollFmt( *pTxtNd );
- }
- }
- }
- }
- return pPrtDoc;
-}
-
SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
{
ASSERT( this->IsA( TYPE(SwFEShell) ),"ViewShell::Prt for FEShell only");
@@ -582,7 +481,7 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
sal_Bool ViewShell::PrintOrPDFExport(
OutputDevice *pOutDev,
- const SwPrtOptions &rPrintData,
+ SwPrintData const& rPrintData,
sal_Int32 nRenderer /* the index in the vector of pages to be printed */ )
{
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -608,31 +507,14 @@ sal_Bool ViewShell::PrintOrPDFExport(
//!! (h?ngt mit OLE Objekten im Dokument zusammen.)
SfxObjectShellRef aDocShellRef;
- //! Note: Since for PDF export of (multi-)selection a temporary
- //! document is created that contains only the selects parts,
- //! and thus that document is to printed in whole the,
- //! rPrintData.bPrintSelection parameter will be false.
- BOOL bSelection = rPrintData.bPrintSelection;
-
- // PDF export for (multi-)selection has already generated a temporary document
- // with the selected text. (see XRenderable implementation in unotxdoc.cxx)
- // Thus we like to go in the 'else' part here in that case.
- // Is is implemented this way because PDF export calls this Prt function
+ // Print/PDF export for (multi-)selection has already generated a
+ // temporary document with the selected text.
+ // (see XRenderable implementation in unotxdoc.cxx)
+ // It is implemented this way because PDF export calls this Prt function
// once per page and we do not like to always have the temporary document
- // to be created that often here in the 'then' part.
- if ( bSelection )
- {
- pOutDevDoc = CreatePrtDoc( aDocShellRef );
-
- // eine ViewShell darauf
- pShell = new ViewShell( *pOutDevDoc, 0, pOpt, pOutDev );
- pOutDevDoc->SetRefForDocShell( 0 );
- }
- else
- {
- pOutDevDoc = GetDoc();
- pShell = new ViewShell( *this, 0, pOutDev );
- }
+ // to be created that often here.
+ pOutDevDoc = GetDoc();
+ pShell = new ViewShell( *this, 0, pOutDev );
SdrView *pDrawView = pShell->GetDrawView();
if (pDrawView)
@@ -682,6 +564,8 @@ sal_Bool ViewShell::PrintOrPDFExport(
rPrintData.GetRenderData().m_pPostItShell : pShell;
::SetSwVisArea( pViewSh2, pStPage->Frm() );
+// FIXME disabled because rPrintData.aOffset is always (0,0)
+#if 0
// wenn wir einen Umschlag drucken wird ein Offset beachtet
if( pStPage->GetFmt()->GetPoolFmtId() == RES_POOLPAGE_JAKET )
{
@@ -691,6 +575,7 @@ sal_Bool ViewShell::PrintOrPDFExport(
aTmp.SetOrigin( aNewOrigin );
pOutDev->SetMapMode( aTmp );
}
+#endif
pShell->InitPrt( pOutDev );
@@ -705,12 +590,6 @@ sal_Bool ViewShell::PrintOrPDFExport(
delete pShell;
- if (bSelection )
- {
- if ( !pOutDevDoc->release() )
- delete pOutDevDoc;
- }
-
// restore settings of OutputDevice (should be done always now since the
// output device is now provided by a call from outside the Writer)
pOutDev->Pop();
@@ -788,9 +667,9 @@ void ViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintDat
BOOL ViewShell::IsAnyFieldInDoc() const
{
const SfxPoolItem* pItem;
- USHORT nMaxItems = pDoc->GetAttrPool().GetItemCount( RES_TXTATR_FIELD );
- for( USHORT n = 0; n < nMaxItems; ++n )
- if( 0 != (pItem = pDoc->GetAttrPool().GetItem( RES_TXTATR_FIELD, n )))
+ sal_uInt32 nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_FIELD );
+ for( sal_uInt32 n = 0; n < nMaxItems; ++n )
+ if( 0 != (pItem = pDoc->GetAttrPool().GetItem2( RES_TXTATR_FIELD, n )))
{
const SwFmtFld* pFmtFld = (SwFmtFld*)pItem;
const SwTxtFld* pTxtFld = pFmtFld->GetTxtFld();
diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx
index c1ba4908a339..f2a8229c3092 100644
--- a/sw/source/filter/ascii/ascatr.cxx
+++ b/sw/source/filter/ascii/ascatr.cxx
@@ -125,7 +125,7 @@ BOOL SwASC_AttrIter::OutAttr( xub_StrLen nSwPos )
{
case RES_TXTATR_FIELD:
sOut = static_cast<SwTxtFld const*>(pHt)->GetFld().GetFld()
- ->ExpandField(rWrt.pDoc->IsClipBoard());
+ ->ExpandField(true);
break;
case RES_TXTATR_FTN:
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index 573d5c7ebc5f..6b7c99fa42f1 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -1250,8 +1250,9 @@ class HTMLEndPosLst
SvXub_StrLens aScriptChgLst; // positions where script changes
// 0 is not contained in this list,
// but the text length
- SvUShorts aScriptLst; // the script that is valif up to the position
- // contained in aScriptChgList at the same index
+ // the script that is valif up to the position
+ // contained in aScriptChgList at the same index
+ ::std::vector<USHORT> aScriptLst;
SwDoc *pDoc; // das aktuelle Dokument
SwDoc* pTemplate; // die HTML-Vorlage (oder 0)
@@ -1797,8 +1798,8 @@ HTMLEndPosLst::HTMLEndPosLst( SwDoc *pD, SwDoc* pTempl,
{
sal_uInt16 nScript = pBreakIt->GetBreakIter()->getScriptType( rText, nPos );
nPos = (xub_StrLen)pBreakIt->GetBreakIter()->endOfScript( rText, nPos, nScript );
- aScriptChgLst.Insert( nPos, aScriptChgLst.Count() );
- aScriptLst.Insert( nScript, aScriptLst.Count() );
+ aScriptChgLst.push_back( nPos );
+ aScriptLst.push_back( nScript );
}
}
@@ -1995,9 +1996,8 @@ void HTMLEndPosLst::Insert( const SfxPoolItem& rItem,
if( bDependsOnScript )
{
- sal_uInt16 nScriptChgs = aScriptChgLst.Count();
xub_StrLen nPos = nStart;
- for( sal_uInt16 i=0; i < nScriptChgs; i++ )
+ for( size_t i=0; i < aScriptChgLst.size(); i++ )
{
xub_StrLen nChgPos = aScriptChgLst[i];
if( nPos >= nChgPos )
@@ -2080,8 +2080,8 @@ sal_uInt16 HTMLEndPosLst::GetScriptAtPos( xub_StrLen nPos ,
{
sal_uInt16 nRet = CSS1_OUTMODE_ANY_SCRIPT;
- sal_uInt16 nScriptChgs = aScriptChgLst.Count();
- sal_uInt16 i=0;
+ size_t nScriptChgs = aScriptChgLst.size();
+ size_t i=0;
while( i < nScriptChgs && nPos >= aScriptChgLst[i] )
i++;
ASSERT( i < nScriptChgs, "script list is to short" );
diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx
index 50b7bdc7ddc8..6b905e450dee 100644
--- a/sw/source/filter/html/htmlfldw.cxx
+++ b/sw/source/filter/html/htmlfldw.cxx
@@ -305,7 +305,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
}
// Inhalt des Feldes ausgeben
- String const sExpand( pFld->ExpandField(rWrt.pDoc->IsClipBoard()) );
+ String const sExpand( pFld->ExpandField(true) );
sal_Bool bNeedsCJKProcessing = sal_False;
if( sExpand.Len() )
{
diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx
index 88fe896d6a17..24875b456565 100644
--- a/sw/source/filter/html/htmlfly.cxx
+++ b/sw/source/filter/html/htmlfly.cxx
@@ -1835,10 +1835,10 @@ void SwHTMLWriter::CollectLinkTargets()
const SwTxtINetFmt* pTxtAttr;
const SwTxtNode* pTxtNd;
- USHORT n, nMaxItems = pDoc->GetAttrPool().GetItemCount( RES_TXTATR_INETFMT );
+ sal_uInt32 n, nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_INETFMT );
for( n = 0; n < nMaxItems; ++n )
{
- if( 0 != (pINetFmt = (SwFmtINetFmt*)pDoc->GetAttrPool().GetItem(
+ if( 0 != (pINetFmt = (SwFmtINetFmt*)pDoc->GetAttrPool().GetItem2(
RES_TXTATR_INETFMT, n ) ) &&
0 != ( pTxtAttr = pINetFmt->GetTxtINetFmt()) &&
0 != ( pTxtNd = pTxtAttr->GetpTxtNode() ) &&
@@ -1849,10 +1849,10 @@ void SwHTMLWriter::CollectLinkTargets()
}
const SwFmtURL *pURL;
- nMaxItems = pDoc->GetAttrPool().GetItemCount( RES_URL );
+ nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_URL );
for( n = 0; n < nMaxItems; ++n )
{
- if( 0 != (pURL = (SwFmtURL*)pDoc->GetAttrPool().GetItem(
+ if( 0 != (pURL = (SwFmtURL*)pDoc->GetAttrPool().GetItem2(
RES_URL, n ) ) )
{
AddLinkTarget( pURL->GetURL() );
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index afcb979abe6c..75f39c728313 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -166,7 +166,7 @@ void SwHTMLParser::ConnectImageMaps()
}
-/* */
+/* */
void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri,
sal_Int16 eHoriOri,
@@ -302,12 +302,11 @@ void SwHTMLParser::RegisterFlyFrm( SwFrmFmt *pFlyFmt )
SURROUND_THROUGHT == pFlyFmt->GetSurround().GetSurround() )
{
aMoveFlyFrms.Insert( pFlyFmt, aMoveFlyFrms.Count() );
- aMoveFlyCnts.Insert( pPam->GetPoint()->nContent.GetIndex(),
- aMoveFlyCnts.Count() );
+ aMoveFlyCnts.push_back( pPam->GetPoint()->nContent.GetIndex() );
}
}
-/* */
+/* */
void SwHTMLParser::GetDefaultScriptType( ScriptType& rType,
String& rTypeStr ) const
@@ -319,7 +318,7 @@ void SwHTMLParser::GetDefaultScriptType( ScriptType& rType,
rTypeStr = GetScriptTypeString( pHeaderAttrs );
}
-/* */
+/* */
void SwHTMLParser::InsertImage()
{
@@ -816,7 +815,7 @@ IMAGE_SETEVENT:
InsertBookmark( aId );
}
-/* */
+/* */
void SwHTMLParser::InsertBodyOptions()
{
@@ -1047,7 +1046,7 @@ void SwHTMLParser::InsertBodyOptions()
InsertBookmark( aId );
}
-/* */
+/* */
void SwHTMLParser::NewAnchor()
{
@@ -1268,7 +1267,7 @@ void SwHTMLParser::EndAnchor()
EndTag( HTML_ANCHOR_OFF );
}
-/* */
+/* */
void SwHTMLParser::InsertBookmark( const String& rName )
{
@@ -1324,7 +1323,7 @@ BOOL SwHTMLParser::HasCurrentParaBookmarks( BOOL bIgnoreStack ) const
return bHasMarks;
}
-/* */
+/* */
void SwHTMLParser::StripTrailingPara()
{
diff --git a/sw/source/filter/html/makefile.mk b/sw/source/filter/html/makefile.mk
index b99cc6789424..495a415d0266 100644
--- a/sw/source/filter/html/makefile.mk
+++ b/sw/source/filter/html/makefile.mk
@@ -71,7 +71,9 @@ SLOFILES = \
$(SLO)$/SwAppletImpl.obj \
EXCEPTIONSFILES = \
+ $(SLO)$/htmlatr.obj \
$(SLO)$/htmlfld.obj \
+ $(SLO)$/htmlgrin.obj \
$(SLO)$/htmlplug.obj \
$(SLO)$/htmlsect.obj \
$(SLO)$/swhtml.obj \
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index fba6a477757d..230da033d50c 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -2881,7 +2881,7 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
pFrmFmt->MakeFrms();
aMoveFlyFrms.Remove( n, 1 );
- aMoveFlyCnts.Remove( n, 1 );
+ aMoveFlyCnts.erase( aMoveFlyCnts.begin() + n );
}
}
while( aFields.Count() )
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index e7d684842beb..f9d978a73aee 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -406,8 +406,8 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
_HTMLAttrs aParaAttrs; // vorlauefige Absatz-Attribute
_HTMLAttrTable aAttrTab; // "offene" Attribute
_HTMLAttrContexts aContexts;// der aktuelle Attribut/Token-Kontext
- SwHTMLFrmFmts aMoveFlyFrms;// Fly-Frames, deren Anker verschoben wird
- SvXub_StrLens aMoveFlyCnts;// und deren Content-Positionen
+ SwHTMLFrmFmts aMoveFlyFrms;// Fly-Frames, the anchor is moved
+ SvXub_StrLens aMoveFlyCnts;// and the Content-Positions
SwApplet_Impl *pAppletImpl; // das aktuelle Applet
diff --git a/sw/source/filter/rtf/makefile.mk b/sw/source/filter/rtf/makefile.mk
index 2ff764d730a1..5be61050a54d 100644
--- a/sw/source/filter/rtf/makefile.mk
+++ b/sw/source/filter/rtf/makefile.mk
@@ -46,6 +46,7 @@ CDEFS=$(CDEFS) -Dmydebug
EXCEPTIONSFILES= \
$(SLO)$/rtffly.obj \
$(SLO)$/rtfnum.obj \
+ $(SLO)$/rtftbl.obj \
$(SLO)$/swparrtf.obj \
$(SLO)$/wrtrtf.obj
diff --git a/sw/source/filter/rtf/rtfatr.cxx b/sw/source/filter/rtf/rtfatr.cxx
index 17050299c84b..db91ec79d2e7 100644
--- a/sw/source/filter/rtf/rtfatr.cxx
+++ b/sw/source/filter/rtf/rtfatr.cxx
@@ -1425,7 +1425,7 @@ void ExportPICT(const Size &rOrig, const Size &rRendered, const Size &rMapped,
const SwCropGrf &rCr, const char *pBLIPType, const sal_uInt8 *pGraphicAry,
unsigned long nSize, SwRTFWriter &rWrt)
{
- bool bIsWMF = (const char *)pBLIPType == (const char *)OOO_STRING_SVTOOLS_RTF_WMETAFILE ? true : false;
+ bool bIsWMF = (pBLIPType && !strcmp(pBLIPType, OOO_STRING_SVTOOLS_RTF_WMETAFILE)) ? true : false;
if (pBLIPType && nSize && pGraphicAry)
{
rWrt.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_PICT;
@@ -1570,7 +1570,7 @@ static Writer& OutRTF_SwGrfNode(Writer& rWrt, SwCntntNode & rNode)
the wmf format wrapped in nonshppict, so as to keep wordpad happy. If its
a wmf already then we don't need any such wrapping
*/
- bool bIsWMF = (const sal_Char*)pBLIPType == (const sal_Char*)OOO_STRING_SVTOOLS_RTF_WMETAFILE ? true : false;
+ bool bIsWMF = (pBLIPType && !strcmp(pBLIPType, OOO_STRING_SVTOOLS_RTF_WMETAFILE)) ? true : false;
if (!bIsWMF)
OutComment(rRTFWrt, OOO_STRING_SVTOOLS_RTF_SHPPICT);
@@ -2903,7 +2903,7 @@ static Writer& OutRTF_SwField( Writer& rWrt, const SfxPoolItem& rHt )
case RES_HIDDENTXTFLD:
if( TYP_CONDTXTFLD == ((SwHiddenTxtField*)pFld)->GetSubType() )
RTFOutFuncs::Out_String( rWrt.Strm(),
- pFld->ExpandField(rWrt.pDoc->IsClipBoard()),
+ pFld->ExpandField(true),
rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt );
else
{
@@ -2960,7 +2960,7 @@ static Writer& OutRTF_SwField( Writer& rWrt, const SfxPoolItem& rHt )
if( ' ' != cCh ) // vorweg immer einen Trenner
rWrt.Strm() << ' ';
RTFOutFuncs::Out_String( rWrt.Strm(),
- pFld->ExpandField(rWrt.pDoc->IsClipBoard()),
+ pFld->ExpandField(true),
rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt );
}
break;
@@ -2970,7 +2970,7 @@ static Writer& OutRTF_SwField( Writer& rWrt, const SfxPoolItem& rHt )
{
rWrt.Strm() << "}{" << OOO_STRING_SVTOOLS_RTF_FLDRSLT << ' ';
RTFOutFuncs::Out_String( rWrt.Strm(),
- pFld->ExpandField(rWrt.pDoc->IsClipBoard()),
+ pFld->ExpandField(true),
rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt );
rWrt.Strm() << "}}";
rRTFWrt.bOutFmtAttr = FALSE;
diff --git a/sw/source/filter/rtf/rtfnum.cxx b/sw/source/filter/rtf/rtfnum.cxx
index 507f35375ed6..26129421013d 100644
--- a/sw/source/filter/rtf/rtfnum.cxx
+++ b/sw/source/filter/rtf/rtfnum.cxx
@@ -62,9 +62,6 @@
#define RTF_NUMRULE_NAME "RTF_Num"
-SV_IMPL_VARARR( SwListArr, SwListEntry )
-
-
void lcl_ExpandNumFmts( SwNumRule& rRule )
{
// dann noch das NumFormat in alle Ebenen setzen
@@ -343,7 +340,7 @@ void SwRTFParser::ReadListTable()
if( 1 == nNumOpenBrakets )
{
if( aEntry.nListId )
- aListArr.Insert( aEntry, aListArr.Count() );
+ aListArr.push_back( aEntry );
aEntry.Clear();
}
}
@@ -510,7 +507,7 @@ void SwRTFParser::ReadListOverrideTable()
if( aEntry.nListId && aEntry.nListNo )
{
int nMatch=-1;
- for( USHORT n = aListArr.Count(); n; )
+ for( size_t n = aListArr.size(); n; )
{
if( aListArr[ --n ].nListId == aEntry.nListId)
{
@@ -529,7 +526,7 @@ void SwRTFParser::ReadListOverrideTable()
{
aEntry.nListDocPos=aListArr[nMatch2].nListDocPos;
aEntry.nListTemplateId=aListArr[nMatch2].nListTemplateId;
- aListArr.Insert(aEntry, aListArr.Count());
+ aListArr.push_back( aEntry );
}
if(pOrigRule)
aListArr[nMatch2].nListDocPos = aEntry.nListDocPos;
@@ -573,7 +570,7 @@ void SwRTFParser::ReadListOverrideTable()
// dann erzeugen wir mal schnell eine Kopie von der NumRule,
// denn diese wird jetzt mal kurz veraendert.
if( aEntry.nListId )
- for( USHORT n = 0; n < aListArr.Count(); ++n )
+ for( size_t n = 0; n < aListArr.size(); ++n )
if( aListArr[ n ].nListId == aEntry.nListId )
{
pRule = pDoc->GetNumRuleTbl()[
@@ -590,7 +587,7 @@ void SwRTFParser::ReadListOverrideTable()
// <--
pRule->SetAutoRule( FALSE );
nNumLvl = (BYTE)-1;
- aListArr.Insert( aEntry, aListArr.Count() );
+ aListArr.push_back( aEntry );
break;
}
@@ -671,11 +668,11 @@ void SwRTFParser::ReadListOverrideTable()
// now decrement all position in the listtable, which will
// behind the doc-rule position
- for( USHORT n = aListArr.Count(); n; )
+ for( size_t n = aListArr.size(); n; )
{
SwListEntry& rEntry = aListArr[ --n ];
if( rEntry.nListDocPos == nRulePos )
- aListArr.Remove( n );
+ aListArr.erase( aListArr.begin()+n );
else if( rEntry.nListDocPos > nRulePos )
--rEntry.nListDocPos;
}
@@ -699,11 +696,11 @@ SwNumRule* SwRTFParser::GetNumRuleOfListNo( long nListNo, BOOL bRemoveFromList )
{
SwNumRule* pRet = 0;
SwListEntry* pEntry;
- for( USHORT n = aListArr.Count(); n; )
+ for( size_t n = aListArr.size(); n; )
if( ( pEntry = &aListArr[ --n ])->nListNo == nListNo )
{
if( bRemoveFromList )
- aListArr.Remove( n );
+ aListArr.erase( aListArr.begin()+n );
else
{
pEntry->bRuleUsed = TRUE;
@@ -743,14 +740,14 @@ void SwRTFParser::RemoveUnusedNumRules()
{
SwListEntry* pEntry;
SvPtrarr aDelArr;
- USHORT n;
- for( n = aListArr.Count(); n; )
+ size_t n;
+ for( n = aListArr.size(); n; )
{
if( !( pEntry = &aListArr[ --n ])->bRuleUsed )
{
// really *NOT* used by anyone else?
BOOL unused=TRUE;
- for(USHORT j = 0; j < aListArr.Count(); ++j)
+ for(size_t j = 0; j < aListArr.size(); ++j)
{
if (aListArr[n].nListNo==aListArr[j].nListNo)
unused&=!aListArr[j].bRuleUsed;
@@ -847,7 +844,7 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken )
RTL_CONSTASCII_STRINGPARAM( RTF_NUMRULE_NAME " 1" )));
SwListEntry aEntry( nListNo, 0, pDoc->MakeNumRule( sTmp ));
aEntry.nListNo = nListNo;
- aListArr.Insert( aEntry, aListArr.Count() );
+ aListArr.push_back( aEntry );
pCurRule = pDoc->GetNumRuleTbl()[ aEntry.nListDocPos ];
// --> OD 2008-07-08 #i91400#
pCurRule->SetName( pDoc->GetUniqueNumRuleName( &sTmp, FALSE ), *pDoc );
diff --git a/sw/source/filter/rtf/rtftbl.cxx b/sw/source/filter/rtf/rtftbl.cxx
index 2c182532079d..6737ebce596e 100644
--- a/sw/source/filter/rtf/rtftbl.cxx
+++ b/sw/source/filter/rtf/rtftbl.cxx
@@ -165,10 +165,7 @@ void SwRTFParser::ReadTable( int nToken )
enum Limits {eMAXCELLS=64000};
- SvBools aMergeBackup;
- int nCount = aMergeBoxes.Count();
- for (USHORT i = 0; i < nCount; ++i)
- aMergeBackup.Insert(aMergeBoxes[i], i);
+ SvBools aMergeBackup(aMergeBoxes);
// kein TROWD aber ein TabellenToken -> zwischen TROWD und Tab.Token
// waren andere Zeichen (siehe Bug 27445.rtf)
@@ -177,10 +174,10 @@ void SwRTFParser::ReadTable( int nToken )
if( RTF_TROWD == nToken )
nToken = GetNextToken(); // RTF_TROWD ueberlesen
- // Flags fuer die gemergten Boxen loeschen
- aMergeBoxes.Remove( 0, aMergeBoxes.Count() );
- aMergeBoxes.Insert( (BOOL)FALSE, USHORT(0) );
- nAktBox = 0;
+ // Flag for delete merged boxes
+ aMergeBoxes.clear();
+ aMergeBoxes.push_back( (BOOL)FALSE );
+ m_nCurrentBox = 0;
// wenn schon in einer Tabellen, dann splitte oder benutze
// die bisherigen Boxen weiter
@@ -194,11 +191,11 @@ void SwRTFParser::ReadTable( int nToken )
// very robust to avoid crashes like bug 127425 + crash reports 118743
if( pLine )
{
- USHORT nTmpBox = nAktBox;
+ USHORT nTmpBox = m_nCurrentBox;
if( nTmpBox > pLine->GetTabBoxes().Count() )
nTmpBox = pLine->GetTabBoxes().Count();
- for( USHORT n = nTmpBox; n; )
+ for (USHORT n = nTmpBox; n; )
{
const SwTableBox *pTmp = pLine->GetTabBoxes()[ --n ];
if( pTmp )
@@ -223,7 +220,7 @@ void SwRTFParser::ReadTable( int nToken )
sal_Int16 eVerOrient = text::VertOrientation::NONE;
long nLineHeight = 0;
- USHORT nBoxCnt = aMergeBoxes.Count()-1;
+ size_t nBoxCnt = aMergeBoxes.size()-1;
SwBoxFrmFmts aBoxFmts;
SwTableBoxFmt* pBoxFmt = pDoc->MakeTableBoxFmt();
SvxFrameDirection eDir = FRMDIR_HORI_LEFT_TOP;
@@ -292,15 +289,16 @@ void SwRTFParser::ReadTable( int nToken )
// the first cell cannot be merged with earlier ones.
if (nBoxCnt != 0)
{
- aMergeBoxes[ nBoxCnt ] = TRUE;
+ aMergeBoxes.back() = TRUE;
}
break;
case RTF_CELLX:
- if (!bTrowdRead) {
+ if (!bTrowdRead && (aMergeBoxes.size() < (SAL_MAX_UINT16 - 1)))
+ {
SwTableBoxFmt* pFmt = pBoxFmt;
SwTwips nSize = nTokenValue - nTblSz;
- if( aMergeBoxes[ nBoxCnt ] )
+ if( aMergeBoxes.back() )
{
// neue Zellen lesen und noch keine Formate vorhanden,
// dann benutze das der vorhergebende
@@ -308,9 +306,12 @@ void SwRTFParser::ReadTable( int nToken )
{
SwTableLines& rLns = pTableNode->GetTable().GetTabLines();
SwTableLine* pLine = rLns[ rLns.Count()-1 ];
- if(nAktBox!=0)
- --nAktBox;
- pFmt = (SwTableBoxFmt*)pLine->GetTabBoxes()[ nAktBox ]->GetFrmFmt();
+ if (m_nCurrentBox != 0)
+ {
+ --m_nCurrentBox;
+ }
+ pFmt = static_cast<SwTableBoxFmt*>(
+ pLine->GetTabBoxes()[ m_nCurrentBox ]->GetFrmFmt());
}
else
pFmt = aBoxFmts[ aBoxFmts.Count()-1 ];
@@ -336,7 +337,8 @@ void SwRTFParser::ReadTable( int nToken )
nSize = COL_DFLT_WIDTH;
pFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, nSize, 0 ));
nTblSz = nTokenValue;
- aMergeBoxes.Insert( (BOOL)FALSE, ++nBoxCnt );
+ aMergeBoxes.push_back( (BOOL)FALSE );
+ ++nBoxCnt;
SvxBoxItem aBox(pFmt->GetBox());
@@ -483,7 +485,7 @@ void SwRTFParser::ReadTable( int nToken )
default:
if( ( nToken & ~(0xff | RTF_TABLEDEF)) == RTF_SHADINGDEF )
{
- if( aMergeBoxes[ nBoxCnt ] )
+ if( aMergeBoxes.back() )
break;
ReadBackgroundAttr( nToken,
(SfxItemSet&)pBoxFmt->GetAttrSet(), TRUE );
@@ -491,7 +493,7 @@ void SwRTFParser::ReadTable( int nToken )
else if( ( nToken & ~(0xff | RTF_TABLEDEF) ) == RTF_BRDRDEF ||
IsBorderToken(nToken))
{
- if( aMergeBoxes[ nBoxCnt ] )
+ if( aMergeBoxes.back() )
break;
SfxItemSet& rSet = (SfxItemSet&)pBoxFmt->GetAttrSet();
@@ -512,7 +514,7 @@ void SwRTFParser::ReadTable( int nToken )
if( text::VertOrientation::NONE != eVerOrient )
{
- if( !aMergeBoxes[ nBoxCnt ] )
+ if( !aMergeBoxes.back() )
pBoxFmt->SetFmtAttr( SwFmtVertOrient( 0, eVerOrient ));
eVerOrient = text::VertOrientation::NONE;
}
@@ -523,13 +525,11 @@ void SwRTFParser::ReadTable( int nToken )
// das letzte temp. BoxFmt loeschen
delete pBoxFmt;
- // es wurde keine einzige Box erkannt
- if( nAktBox == nBoxCnt || ( bReadNewCell && !pTableNode ))
+ // It has been recognized as not single box
+ if ((m_nCurrentBox == nBoxCnt) || ( bReadNewCell && !pTableNode ))
{
- int nC = aMergeBackup.Count();
- for (USHORT i = 0; i < nC; ++i)
- aMergeBoxes.Insert(aMergeBackup[i], i);
- SkipToken( -1 ); // zum Letzen gueltigen zurueck
+ aMergeBoxes = aMergeBackup;
+ SkipToken( -1 ); // go back to the last valid
return;
}
@@ -636,7 +636,9 @@ void SwRTFParser::ReadTable( int nToken )
aBoxFmts.Remove( 0, n );
if( aBoxFmts.Count() ) // es muessen noch neue zugefuegt werden
- nAktBox = n;
+ {
+ m_nCurrentBox = n;
+ }
else // es mussen noch Boxen geloescht werden
{
// remove ContentIndex of other Bound
@@ -746,7 +748,7 @@ void SwRTFParser::ReadTable( int nToken )
((SfxItemSet&)pFmt->GetAttrSet()).Put( aL );
}
- nAktBox = 0;
+ m_nCurrentBox = 0;
pOldTblNd = pTableNode;
{
@@ -798,12 +800,14 @@ void SwRTFParser::ReadTable( int nToken )
aBoxFmts[ nStt ],
// Formate fuer den TextNode der Box
pColl, 0,
- nAktBox + nStt, 1 );
+ m_nCurrentBox + nStt, 1 );
}
}
if( bChkExistTbl )
- nAktBox = 0;
+ {
+ m_nCurrentBox = 0;
+ }
maInsertedTables.InsertTable(*pTableNode, *pPam);
@@ -815,7 +819,8 @@ void SwRTFParser::ReadTable( int nToken )
if (pNewLine)
{
SwTableBoxes &rBoxes = pNewLine->GetTabBoxes();
- if (SwTableBox* pBox = (nAktBox < rBoxes.Count() ? rBoxes[nAktBox] : 0))
+ if (SwTableBox* pBox = ((m_nCurrentBox < rBoxes.Count())
+ ? rBoxes[m_nCurrentBox] : 0))
{
if (const SwStartNode *pStart = pBox->GetSttNd())
{
@@ -861,7 +866,7 @@ void SwRTFParser::ReadTable( int nToken )
//which were intended to be inside the tablerow are now left outside
//the table after the row was placed before the current insertion point
SvxRTFItemStack& rAttrStk = GetAttrStack();
- for (USHORT n = 0; n < rAttrStk.Count(); ++n)
+ for (size_t n = 0; n < rAttrStk.size(); ++n)
{
SvxRTFItemStackType* pStk = rAttrStk[n];
pStk->MoveFullNode(aOldPos, aNewPos);
@@ -885,16 +890,19 @@ void SwRTFParser::GotoNextBox()
SwTableBoxes& rBoxes = pLine->GetTabBoxes();
SwTableBox* pBox = rBoxes[ rBoxes.Count()-1 ];
- if( ++nAktBox >= aMergeBoxes.Count() )
- nAktBox = aMergeBoxes.Count()-1;
+ if (++m_nCurrentBox >= aMergeBoxes.size())
+ {
+ OSL_ENSURE(aMergeBoxes.size() < SAL_MAX_UINT16, "too many boxes?");
+ m_nCurrentBox = static_cast<USHORT>(aMergeBoxes.size()-1);
+ }
- if( !aMergeBoxes[ nAktBox ] )
+ if (!aMergeBoxes[ m_nCurrentBox ])
{
int bMove = TRUE;
if( pBox->GetSttIdx() > pPam->GetPoint()->nNode.GetIndex() )
{
USHORT nRealBox = 0;
- for( USHORT nTmp = 0; nTmp < nAktBox; ++nTmp )
+ for (USHORT nTmp = 0; nTmp < m_nCurrentBox; ++nTmp)
if( !aMergeBoxes[ nTmp ] )
++nRealBox;
@@ -906,7 +914,8 @@ void SwRTFParser::GotoNextBox()
}
}
- if( bMove && nAktBox + 1 == aMergeBoxes.Count() )
+ if (bMove &&
+ (static_cast<size_t>(m_nCurrentBox + 1) == aMergeBoxes.size()))
// dann hinter die Tabelle
pPam->Move( fnMoveForward, fnGoNode );
}
@@ -972,7 +981,7 @@ void SwRTFParser::NewTblLine()
ULONG nOldPos = pPam->GetPoint()->nNode.GetIndex();
pPam->GetPoint()->nNode = *pBox->GetSttNd();
pPam->Move( fnMoveForward );
- nAktBox = 0;
+ m_nCurrentBox = 0;
// alle Nodes in den Boxen auf die "default" Vorlage setzten
{
@@ -1002,11 +1011,10 @@ void SwRTFParser::NewTblLine()
pPam->DeleteMark();
}
- // alle Attribute, die schon auf den nachfolgen zeigen auf die neue
- // Box umsetzen !!
+ // all attributes which will be displayed in new Box
SvxRTFItemStack& rAttrStk = GetAttrStack();
const SvxRTFItemStackType* pStk;
- for( USHORT n = 0; n < rAttrStk.Count(); ++n )
+ for( size_t n = 0; n < rAttrStk.size(); ++n )
if( ( pStk = rAttrStk[ n ])->GetSttNodeIdx() == ULONG(nOldPos) &&
!pStk->GetSttCnt() )
((SvxRTFItemStackType*)pStk)->SetStartPos( SwxPosition( pPam ) );
diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx
index e83ab108bbc9..a599ce095488 100644
--- a/sw/source/filter/rtf/swparrtf.cxx
+++ b/sw/source/filter/rtf/swparrtf.cxx
@@ -188,7 +188,6 @@ SwRTFParser::SwRTFParser(SwDoc* pD,
maCharStyleMapper(*pD),
maSegments(*this),
maInsertedTables(*pD),
- aMergeBoxes(0, 5),
aTblFmts(0, 10),
mpBookmarkStart(0),
mpRedlineStack(0),
@@ -205,7 +204,7 @@ SwRTFParser::SwRTFParser(SwDoc* pD,
sBaseURL( rBaseURL ),
nAktPageDesc(0),
nAktFirstPageDesc(0),
- nAktBox(0),
+ m_nCurrentBox(0),
nInsTblRow(USHRT_MAX),
nNewNumSectDef(USHRT_MAX),
nRowsToRepeat(0),
@@ -1759,7 +1758,7 @@ void SwRTFParser::NextToken( int nToken )
if (!CantUseTables())
{
// aus der Line raus
- nAktBox = 0;
+ m_nCurrentBox = 0;
pTableNode = 0;
// noch in der Tabelle drin?
SwNodeIndex& rIdx = pPam->GetPoint()->nNode;
@@ -3548,14 +3547,13 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
{
ASSERT( RTF_FOOTNOTE == nToken ||
RTF_FLY_INPARA == nToken ||
- pPageDesc, "PageDesc fehlt" );
+ pPageDesc, "PageDesc is missing" );
bool bContainsParaCache = bContainsPara;
- // alle wichtigen Sachen sichern
+ // backup all important data
SwPosition aSavePos( *pPam->GetPoint() );
- SvxRTFItemStack aSaveStack;
- aSaveStack.Insert( &GetAttrStack(), 0 );
- GetAttrStack().Remove( 0, GetAttrStack().Count() );
+ SvxRTFItemStack aSaveStack(GetAttrStack());
+ GetAttrStack().clear();
// save the fly array - after read, all flys may be set into
// the header/footer
@@ -3605,7 +3603,7 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
// wurde an der Position ein Escapement aufgespannt, so entferne
// das jetzt. Fussnoten sind bei uns immer hochgestellt.
- SvxRTFItemStackTypePtr pTmp = aSaveStack.Top();
+ SvxRTFItemStackTypePtr pTmp = aSaveStack.back();
if( pTmp && pTmp->GetSttNodeIdx() ==
pPam->GetPoint()->nNode.GetIndex() &&
pTmp->GetSttCnt() == nPos )
@@ -3764,7 +3762,7 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
else
SetNewGroup( FALSE ); // { - Klammer war kein Group-Start!
mbIsFootnote = bOldIsFootnote;
- GetAttrStack().Insert( &aSaveStack, 0 );
+ GetAttrStack() = aSaveStack;
aFlyArr.Insert( &aSaveArray, 0 );
aSaveArray.Remove( 0, aSaveArray.Count() );
@@ -4123,12 +4121,12 @@ void SwRTFParser::DelLastNode()
if( pCNd && pCNd->StartOfSectionIndex()+2 <
pCNd->EndOfSectionIndex() )
{
- if( GetAttrStack().Count() )
+ if( !GetAttrStack().empty() )
{
// Attribut Stack-Eintraege, muessen ans Ende des vorherigen
// Nodes verschoben werden.
BOOL bMove = FALSE;
- for( USHORT n = GetAttrStack().Count(); n; )
+ for( size_t n = GetAttrStack().size(); n; )
{
SvxRTFItemStackType* pStkEntry = (SvxRTFItemStackType*)
GetAttrStack()[ --n ];
@@ -4180,7 +4178,7 @@ void SwRTFParser::UnknownAttrToken( int nToken, SfxItemSet* pSet )
// auf die neue Box umsetzen !!
SvxRTFItemStack& rAttrStk = GetAttrStack();
const SvxRTFItemStackType* pStk;
- for( USHORT n = 0; n < rAttrStk.Count(); ++n )
+ for( size_t n = 0; n < rAttrStk.size(); ++n )
if( ( pStk = rAttrStk[ n ])->GetSttNodeIdx() == nOldPos &&
!pStk->GetSttCnt() )
((SvxRTFItemStackType*)pStk)->SetStartPos( SwxPosition( pPam ) );
diff --git a/sw/source/filter/rtf/swparrtf.hxx b/sw/source/filter/rtf/swparrtf.hxx
index c1694ef852a8..0d6a0ce39ca1 100644
--- a/sw/source/filter/rtf/swparrtf.hxx
+++ b/sw/source/filter/rtf/swparrtf.hxx
@@ -29,9 +29,6 @@
#ifndef _SWPARRTF_HXX
#define _SWPARRTF_HXX
-#ifndef __SGI_STL_MAP
-#include <map>
-#endif
#ifndef __SGI_STL_DEQUE
#include <deque>
#endif
@@ -47,9 +44,7 @@
#include <editeng/numitem.hxx>
#include <editeng/boxitem.hxx>
#include <redline.hxx>
-#ifndef __SGI_STL_ALGORITHM
-#include <algorithm>
-#endif
+
#include <fltshell.hxx> // fuer den Attribut Stack
#include <ndindex.hxx>
#include "../inc/msfilter.hxx"
@@ -160,7 +155,7 @@ DECLARE_TABLE( SwRTFStyleTbl, SwTxtFmtColl* )
DECLARE_TABLE( SwRTFCharStyleTbl, SwCharFmt* )
typedef SwFlySave* SwFlySavePtr;
SV_DECL_PTRARR_DEL( SwFlySaveArr, SwFlySavePtr, 0, 20 )
-SV_DECL_VARARR( SwListArr, SwListEntry, 0, 20 )
+typedef std::deque< SwListEntry > SwListArr;
struct DocPageInformation
{
@@ -323,7 +318,7 @@ class SwRTFParser : public SvxRTFParser
String sBaseURL;
USHORT nAktPageDesc, nAktFirstPageDesc;
- USHORT nAktBox; // akt. Box
+ USHORT m_nCurrentBox;
USHORT nInsTblRow; // beim nach \row kein \pard -> neue Line anlegen
USHORT nNewNumSectDef; // jeder SectionWechsel kann neue Rules definieren
USHORT nRowsToRepeat;
diff --git a/sw/source/filter/rtf/wrtrtf.cxx b/sw/source/filter/rtf/wrtrtf.cxx
index 8e17bee3874b..8c80d688a2ee 100644
--- a/sw/source/filter/rtf/wrtrtf.cxx
+++ b/sw/source/filter/rtf/wrtrtf.cxx
@@ -85,8 +85,6 @@ const sal_Char SwRTFWriter::sNewLine = '\012';
const sal_Char __FAR_DATA SwRTFWriter::sNewLine[] = "\015\012";
#endif
-SV_DECL_VARARR( RTFColorTbl, Color, 5, 8 )
-SV_IMPL_VARARR( RTFColorTbl, Color )
SwRTFWriter::SwRTFWriter( const String& rFltName, const String & rBaseURL ) :
@@ -638,13 +636,18 @@ void SwRTFWriter::OutDocInfoStat()
static void InsColor( RTFColorTbl& rTbl, const Color& rCol )
{
- USHORT n;
- for( n = 0; n < rTbl.Count(); ++n )
+ for( size_t n = 0; n < rTbl.size(); ++n )
if( rTbl[n] == rCol )
- return; // schon vorhanden, zurueck
+ return; // already exists, return
- n = COL_AUTO == rCol.GetColor() ? 0 : rTbl.Count();
- rTbl.Insert( rCol, n );
+ if ( COL_AUTO == rCol.GetColor() )
+ {
+ rTbl.push_front( rCol );
+ }
+ else
+ {
+ rTbl.push_back( rCol );
+ }
}
static void InsColorLine( RTFColorTbl& rTbl, const SvxBoxItem& rBox )
@@ -663,14 +666,15 @@ static void InsColorLine( RTFColorTbl& rTbl, const SvxBoxItem& rBox )
void SwRTFWriter::OutRTFColorTab()
{
- ASSERT( pColTbl, "Wo ist meine Color-Tabelle?" );
+ ASSERT( pColTbl, "Where's table color?" );
- // dann baue die ColorTabelle aus allen Attributen, die Colors
- // enthalten und im Pool angemeldet sind auf.
- USHORT n, nMaxItem;
+ // Build the color table from all attributes. The Colors
+ // included and registered in the pool are on.
+ size_t n;
+ sal_uInt32 nMaxItem;
const SfxItemPool& rPool = pDoc->GetAttrPool();
- // das Charakter - Color Attribut
+ // the character - Color attribute
{
const SvxColorItem* pCol = (const SvxColorItem*)GetDfltAttr(
RES_CHRATR_COLOR );
@@ -678,30 +682,30 @@ void SwRTFWriter::OutRTFColorTab()
if( 0 != ( pCol = (const SvxColorItem*)rPool.GetPoolDefaultItem(
RES_CHRATR_COLOR ) ))
InsColor( *pColTbl, pCol->GetValue() );
- nMaxItem = rPool.GetItemCount(RES_CHRATR_COLOR);
+ nMaxItem = rPool.GetItemCount2(RES_CHRATR_COLOR);
for( n = 0; n < nMaxItem; ++n )
{
- if( 0 != (pCol = (const SvxColorItem*)rPool.GetItem(
+ if( 0 != (pCol = (const SvxColorItem*)rPool.GetItem2(
RES_CHRATR_COLOR, n ) ) )
InsColor( *pColTbl, pCol->GetValue() );
}
const SvxUnderlineItem* pUnder = (const SvxUnderlineItem*)GetDfltAttr( RES_CHRATR_UNDERLINE );
InsColor( *pColTbl, pUnder->GetColor() );
- nMaxItem = rPool.GetItemCount(RES_CHRATR_UNDERLINE);
+ nMaxItem = rPool.GetItemCount2(RES_CHRATR_UNDERLINE);
for( n = 0; n < nMaxItem;n++)
{
- if( 0 != (pUnder = (const SvxUnderlineItem*)rPool.GetItem( RES_CHRATR_UNDERLINE, n ) ) )
+ if( 0 != (pUnder = (const SvxUnderlineItem*)rPool.GetItem2( RES_CHRATR_UNDERLINE, n ) ) )
InsColor( *pColTbl, pUnder->GetColor() );
}
const SvxOverlineItem* pOver = (const SvxOverlineItem*)GetDfltAttr( RES_CHRATR_OVERLINE );
InsColor( *pColTbl, pOver->GetColor() );
- nMaxItem = rPool.GetItemCount(RES_CHRATR_OVERLINE);
+ nMaxItem = rPool.GetItemCount2(RES_CHRATR_OVERLINE);
for( n = 0; n < nMaxItem;n++)
{
- if( 0 != (pOver = (const SvxOverlineItem*)rPool.GetItem( RES_CHRATR_OVERLINE, n ) ) )
+ if( 0 != (pOver = (const SvxOverlineItem*)rPool.GetItem2( RES_CHRATR_OVERLINE, n ) ) )
InsColor( *pColTbl, pOver->GetColor() );
}
@@ -721,9 +725,9 @@ void SwRTFWriter::OutRTFColorTab()
{
InsColor( *pColTbl, pBkgrd->GetColor() );
}
- nMaxItem = rPool.GetItemCount( *pIds );
+ nMaxItem = rPool.GetItemCount2( *pIds );
for( n = 0; n < nMaxItem; ++n )
- if( 0 != (pBkgrd = (const SvxBrushItem*)rPool.GetItem(
+ if( 0 != (pBkgrd = (const SvxBrushItem*)rPool.GetItem2(
*pIds , n ) ))
{
InsColor( *pColTbl, pBkgrd->GetColor() );
@@ -740,9 +744,9 @@ void SwRTFWriter::OutRTFColorTab()
{
InsColor( *pColTbl, pShadow->GetColor() );
}
- nMaxItem = rPool.GetItemCount(RES_SHADOW);
+ nMaxItem = rPool.GetItemCount2(RES_SHADOW);
for( n = 0; n < nMaxItem; ++n )
- if( 0 != (pShadow = (const SvxShadowItem*)rPool.GetItem(
+ if( 0 != (pShadow = (const SvxShadowItem*)rPool.GetItem2(
RES_SHADOW, n ) ) )
{
InsColor( *pColTbl, pShadow->GetColor() );
@@ -756,16 +760,16 @@ void SwRTFWriter::OutRTFColorTab()
if( 0 != ( pBox = (const SvxBoxItem*)rPool.GetPoolDefaultItem(
RES_BOX ) ))
InsColorLine( *pColTbl, *pBox );
- nMaxItem = rPool.GetItemCount(RES_BOX);
+ nMaxItem = rPool.GetItemCount2(RES_BOX);
for( n = 0; n < nMaxItem; ++n )
- if( 0 != (pBox = (const SvxBoxItem*)rPool.GetItem( RES_BOX, n ) ))
+ if( 0 != (pBox = (const SvxBoxItem*)rPool.GetItem2( RES_BOX, n ) ))
InsColorLine( *pColTbl, *pBox );
}
// und raus damit
Strm() << SwRTFWriter::sNewLine << '{' << OOO_STRING_SVTOOLS_RTF_COLORTBL;
- for( n = 0; n < pColTbl->Count(); n++ )
+ for( n = 0; n < pColTbl->size(); n++ )
{
const Color& rCol = (*pColTbl)[ n ];
if( n || COL_AUTO != rCol.GetColor() )
@@ -884,10 +888,10 @@ void SwRTFWriter::OutRTFFontTab()
PutNumFmtFontsInAttrPool();
PutCJKandCTLFontsInAttrPool();
- USHORT nMaxItem = rPool.GetItemCount(RES_CHRATR_FONT);
- for (USHORT nGet = 0; nGet < nMaxItem; ++nGet)
+ sal_uInt32 nMaxItem = rPool.GetItemCount2(RES_CHRATR_FONT);
+ for (sal_uInt32 nGet = 0; nGet < nMaxItem; ++nGet)
{
- pFont = (const SvxFontItem*)rPool.GetItem(RES_CHRATR_FONT, nGet);
+ pFont = (const SvxFontItem*)rPool.GetItem2(RES_CHRATR_FONT, nGet);
if (pFont)
_OutFont(*this, *pFont, n++);
}
@@ -1345,12 +1349,12 @@ void SwRTFWriter::OutFlyFrm()
USHORT SwRTFWriter::GetId( const Color& rColor ) const
{
- ASSERT( pColTbl, "Wo ist meine Color-Tabelle?" );
- for( USHORT n = 0; n < pColTbl->Count(); n++ )
+ ASSERT( pColTbl, "Where's color table?" );
+ for( size_t n = 0; n < pColTbl->size(); n++ )
if( rColor == (*pColTbl)[ n ] )
return n;
- ASSERT( FALSE, "Color nicht in der Tabelle" );
+ ASSERT( FALSE, "Color not exists in the pColTbl table" );
return 0;
}
@@ -1370,9 +1374,9 @@ USHORT SwRTFWriter::GetId( const SvxFontItem& rFont ) const
++n;
}
- USHORT nMaxItem = rPool.GetItemCount( RES_CHRATR_FONT );
- for( USHORT nGet = 0; nGet < nMaxItem; ++nGet )
- if( 0 != (pFont = (const SvxFontItem*)rPool.GetItem(
+ sal_uInt32 nMaxItem = rPool.GetItemCount2( RES_CHRATR_FONT );
+ for( sal_uInt32 nGet = 0; nGet < nMaxItem; ++nGet )
+ if( 0 != (pFont = (const SvxFontItem*)rPool.GetItem2(
RES_CHRATR_FONT, nGet )) )
{
if( rFont == *pFont )
diff --git a/sw/source/filter/rtf/wrtrtf.hxx b/sw/source/filter/rtf/wrtrtf.hxx
index 18486f5a3224..737a3164b95a 100644
--- a/sw/source/filter/rtf/wrtrtf.hxx
+++ b/sw/source/filter/rtf/wrtrtf.hxx
@@ -30,6 +30,7 @@
#include <shellio.hxx>
#include <wrt_fn.hxx>
#include "../inc/msfilter.hxx"
+#include <deque>
#include <com/sun/star/util/DateTime.hpp>
@@ -37,7 +38,6 @@
class Color;
class Font;
class SvPtrarr;
-class RTFColorTbl;
class SwFmt;
class SwFlyFrmFmt;
class SwPosFlyFrms;
@@ -57,6 +57,7 @@ extern SwNodeFnTab aRTFNodeFnTab;
// be used
#define DEF_ENCODING RTL_TEXTENCODING_ASCII_US
+typedef std::deque<Color> RTFColorTbl;
class RTF_WrtRedlineAuthor : public sw::util::WrtRedlineAuthor
{
diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx
index d70b6d6c754e..2a77d47dd65b 100644
--- a/sw/source/filter/writer/writer.cxx
+++ b/sw/source/filter/writer/writer.cxx
@@ -487,9 +487,9 @@ void Writer::_AddFontItems( SfxItemPool& rPool, USHORT nW )
if( 0 != ( pFont = (const SvxFontItem*)rPool.GetPoolDefaultItem( nW )) )
_AddFontItem( rPool, *pFont );
- USHORT nMaxItem = rPool.GetItemCount( nW );
- for( USHORT nGet = 0; nGet < nMaxItem; ++nGet )
- if( 0 != (pFont = (const SvxFontItem*)rPool.GetItem( nW, nGet )) )
+ sal_uInt32 nMaxItem = rPool.GetItemCount2( nW );
+ for( sal_uInt32 nGet = 0; nGet < nMaxItem; ++nGet )
+ if( 0 != (pFont = (const SvxFontItem*)rPool.GetItem2( nW, nGet )) )
_AddFontItem( rPool, *pFont );
}
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 7f1b6658800e..c7f5c06cb81c 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -343,7 +343,8 @@ void WW8Export::DoFormText(const SwInputField * pFld)
OutputField(0, ww::eFORMTEXT, aEmptyStr, WRITEFIELD_CMD_END);
- SwWW8Writer::WriteString16(Strm(), pFld->Expand(), false);
+ String const fieldStr( pFld->ExpandField(true) );
+ SwWW8Writer::WriteString16(Strm(), fieldStr, false);
static BYTE aArr2[] = {
0x03, 0x6a, 0x00, 0x00, 0x00, 0x00, // sprmCPicLocation
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index e22ca1c9b731..fd20d2f6dc65 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -1284,7 +1284,7 @@ void WW8_WrtBookmarks::Append( WW8_CP nStartCp, const String& rNm, const ::sw::
aSttCps.Insert(nStartCp, nPos);
aEndCps.Insert(nStartCp, nPos);
- aFieldMarks.Insert(BOOL(false), nPos);
+ aFieldMarks.insert(aFieldMarks.begin() + nPos, BOOL(false));
maSwBkmkNms.insert(aIter, rNm);
}
else
@@ -2859,10 +2859,10 @@ void MSWordExportBase::CollectOutlineBookmarks(const SwDoc &rDoc)
const SwTxtINetFmt* pTxtAttr;
const SwTxtNode* pTxtNd;
- USHORT n, nMaxItems = rDoc.GetAttrPool().GetItemCount( RES_TXTATR_INETFMT );
+ sal_uInt32 n, nMaxItems = rDoc.GetAttrPool().GetItemCount2( RES_TXTATR_INETFMT );
for( n = 0; n < nMaxItems; ++n )
{
- if( 0 != (pINetFmt = (SwFmtINetFmt*)rDoc.GetAttrPool().GetItem(
+ if( 0 != (pINetFmt = (SwFmtINetFmt*)rDoc.GetAttrPool().GetItem2(
RES_TXTATR_INETFMT, n ) ) &&
0 != ( pTxtAttr = pINetFmt->GetTxtINetFmt()) &&
0 != ( pTxtNd = pTxtAttr->GetpTxtNode() ) &&
@@ -2873,10 +2873,10 @@ void MSWordExportBase::CollectOutlineBookmarks(const SwDoc &rDoc)
}
const SwFmtURL *pURL;
- nMaxItems = rDoc.GetAttrPool().GetItemCount( RES_URL );
+ nMaxItems = rDoc.GetAttrPool().GetItemCount2( RES_URL );
for( n = 0; n < nMaxItems; ++n )
{
- if( 0 != (pURL = (SwFmtURL*)rDoc.GetAttrPool().GetItem(
+ if( 0 != (pURL = (SwFmtURL*)rDoc.GetAttrPool().GetItem2(
RES_URL, n ) ) )
{
AddLinkTarget( pURL->GetURL() );
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 89aef162ec01..6e00687ffafa 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -1743,9 +1743,9 @@ static void InsertSpecialChar( WW8Export& rWrt, BYTE c,
aItems.GetData());
}
-String lcl_GetExpandedField(const SwField &rFld, SwDoc const& rDoc)
+String lcl_GetExpandedField(const SwField &rFld)
{
- String sRet(rFld.ExpandField(rDoc.IsClipBoard()));
+ String sRet(rFld.ExpandField(true));
//replace LF 0x0A with VT 0x0B
sRet.SearchAndReplaceAll(0x0A, 0x0B);
@@ -1871,7 +1871,7 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
{
String sOut;
if( pFld )
- sOut = lcl_GetExpandedField(*pFld, *pDoc);
+ sOut = lcl_GetExpandedField(*pFld);
else
sOut = rFldCmd;
if( sOut.Len() )
@@ -2598,7 +2598,7 @@ void WW8AttributeOutput::RefField( const SwField &rFld, const String &rRef)
sStr.APPEND_CONST_ASC( "\" " );
m_rWW8Export.OutputField( &rFld, ww::eREF, sStr, WRITEFIELD_START |
WRITEFIELD_CMD_START | WRITEFIELD_CMD_END );
- String sVar = lcl_GetExpandedField( rFld, *GetExport().pDoc );
+ String sVar = lcl_GetExpandedField( rFld );
if ( sVar.Len() )
{
if ( m_rWW8Export.IsUnicode() )
@@ -2614,7 +2614,7 @@ void WW8AttributeOutput::RefField( const SwField &rFld, const String &rRef)
void WW8AttributeOutput::WriteExpand( const SwField* pFld )
{
- String sExpand( lcl_GetExpandedField( *pFld, *GetExport().pDoc ) );
+ String sExpand( lcl_GetExpandedField( *pFld ) );
if ( m_rWW8Export.IsUnicode() )
SwWW8Writer::WriteString16( m_rWW8Export.Strm(), sExpand, false );
else
@@ -2776,7 +2776,7 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField )
if (pDocInfoField != NULL)
{
- String sFieldname = pDocInfoField->GetCntnt(TRUE);
+ String sFieldname = pDocInfoField->GetFieldName();
xub_StrLen nIndex = sFieldname.Search(':');
if (nIndex != sFieldname.Len())
diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx
index 77dd1e63f53c..5ba2fd3e68ab 100644
--- a/sw/source/filter/xml/xmlexp.cxx
+++ b/sw/source/filter/xml/xmlexp.cxx
@@ -244,10 +244,10 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass )
for( sal_uInt16 j=0; j < nWhichIds; j++ )
{
sal_uInt16 nWhichId = aWhichIds[j];
- sal_uInt16 i=0, nItems = rPool.GetItemCount( nWhichId );
+ sal_uInt32 i=0, nItems = rPool.GetItemCount2( nWhichId );
for( i = 0; i < nItems; ++i )
{
- if( 0 != (pItem = rPool.GetItem( nWhichId , i ) ) )
+ if( 0 != (pItem = rPool.GetItem2( nWhichId , i ) ) )
{
const SvXMLAttrContainerItem *pUnknown =
PTR_CAST( SvXMLAttrContainerItem, pItem );
diff --git a/sw/source/filter/xml/xmlfonte.cxx b/sw/source/filter/xml/xmlfonte.cxx
index 80c8e982c0dd..b611c02fe36c 100644
--- a/sw/source/filter/xml/xmlfonte.cxx
+++ b/sw/source/filter/xml/xmlfonte.cxx
@@ -80,10 +80,10 @@ SwXMLFontAutoStylePool_Impl::SwXMLFontAutoStylePool_Impl(
Add( rFont.GetFamilyName(), rFont.GetStyleName(),
static_cast< sal_uInt16 >(rFont.GetFamily()), static_cast< sal_uInt16 >(rFont.GetPitch()),
rFont.GetCharSet() );
- sal_uInt16 nItems = rPool.GetItemCount( nWhichId );
- for( sal_uInt16 j = 0; j < nItems; ++j )
+ sal_uInt32 nItems = rPool.GetItemCount2( nWhichId );
+ for( sal_uInt32 j = 0; j < nItems; ++j )
{
- if( 0 != (pItem = rPool.GetItem( nWhichId, j ) ) )
+ if( 0 != (pItem = rPool.GetItem2( nWhichId, j ) ) )
{
const SvxFontItem *pFont =
(const SvxFontItem *)pItem;
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 4b6af56066fc..b83d5fcca0c0 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -1539,14 +1539,14 @@ void SwXMLTableContext::InsertColumn( sal_Int32 nWidth2, sal_Bool bRelWidth2,
else if( nWidth2 > USHRT_MAX )
nWidth2 = USHRT_MAX;
aColumnWidths.Insert( (sal_uInt16)nWidth2, aColumnWidths.Count() );
- aColumnRelWidths.Insert( bRelWidth2, aColumnRelWidths.Count() );
+ aColumnRelWidths.push_back( bRelWidth2 );
if( (pDfltCellStyleName && pDfltCellStyleName->getLength() > 0) ||
pColumnDefaultCellStyleNames )
{
if( !pColumnDefaultCellStyleNames )
{
pColumnDefaultCellStyleNames = new SvStringsDtor;
- sal_uInt16 nCount = aColumnRelWidths.Count() - 1;
+ size_t nCount = aColumnRelWidths.size() - 1;
while( nCount-- )
pColumnDefaultCellStyleNames->Insert( new String,
pColumnDefaultCellStyleNames->Count() );
@@ -1649,7 +1649,7 @@ void SwXMLTableContext::InsertCell( const OUString& rStyleName,
for( i=GetColumnCount(); i<nColsReq; i++ )
{
aColumnWidths.Insert( MINLAY, aColumnWidths.Count() );
- aColumnRelWidths.Insert( sal_True, aColumnRelWidths.Count() );
+ aColumnRelWidths.push_back( sal_True );
}
// adjust columns in *all* rows, if columns must be inserted
for( i=0; i<pRows->Count(); i++ )
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index c7ee43255f3b..d01af0213156 100755..100644
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -65,7 +65,7 @@
#include <fmtfld.hxx>
#include <node.hxx>
#include <swwait.hxx>
-#include <swprtopt.hxx>
+#include <printdata.hxx>
#include <frmatr.hxx>
#include <view.hxx> // fuer die aktuelle Sicht
#include <edtwin.hxx>
@@ -895,7 +895,7 @@ void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup,
pDev->SetLineColor();
pDev->SetBackground();
BOOL bWeb = 0 != PTR_CAST(SwWebDocShell, this);
- SwPrtOptions aOpts( aEmptyStr );
+ SwPrintData aOpts;
ViewShell::PrtOle2( pDoc, SW_MOD()->GetUsrPref(bWeb), aOpts, pDev, aRect );
pDev->Pop();
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index 8caf959195dd..f31e5d7dc7a7 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -364,10 +364,10 @@ void SwDropCapsPict::DrawPrev( const Point& rPt )
Font aOldFont = mpPrinter->GetFont();
USHORT nScript;
- USHORT nIdx = 0;
+ size_t nIdx = 0;
xub_StrLen nStart = 0;
xub_StrLen nEnd;
- USHORT nCnt = maScriptChg.Count();
+ size_t nCnt = maScriptChg.size();
if( nCnt )
{
@@ -406,10 +406,10 @@ void SwDropCapsPict::CheckScript( void )
return;
maScriptText = maText;
- USHORT nCnt = maScriptChg.Count();
+ size_t nCnt = maScriptChg.size();
if( nCnt )
{
- maScriptChg.Remove( 0, nCnt );
+ maScriptChg.clear();
maScriptType.Remove( 0, nCnt );
maTextWidth.Remove( 0, nCnt );
nCnt = 0;
@@ -436,7 +436,7 @@ void SwDropCapsPict::CheckScript( void )
do
{
nChg = (xub_StrLen)xBreak->endOfScript( maText, nChg, nScript );
- maScriptChg.Insert( nChg, nCnt );
+ maScriptChg.push_back( nChg );
maScriptType.Insert( nScript, nCnt );
maTextWidth.Insert( ULONG(0), nCnt++ );
@@ -453,10 +453,10 @@ Size SwDropCapsPict::CalcTextSize( void )
InitPrinter();
USHORT nScript;
- USHORT nIdx = 0;
+ size_t nIdx = 0;
xub_StrLen nStart = 0;
xub_StrLen nEnd;
- USHORT nCnt = maScriptChg.Count();
+ size_t nCnt = maScriptChg.size();
if( nCnt )
{
nEnd = maScriptChg[ nIdx ];
diff --git a/sw/source/ui/chrdlg/makefile.mk b/sw/source/ui/chrdlg/makefile.mk
index 42aad1aeddf1..6b05d0fbfb56 100644
--- a/sw/source/ui/chrdlg/makefile.mk
+++ b/sw/source/ui/chrdlg/makefile.mk
@@ -30,6 +30,9 @@ PRJ=..$/..$/..
PRJNAME=sw
TARGET=chrdlg
LIBTARGET=NO
+
+ENABLE_EXCEPTIONS=TRUE
+
# --- Settings -----------------------------------------------------
.INCLUDE : $(PRJ)$/inc$/swpre.mk
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 921d2a652002..81448870d925 100755..100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -27,20 +27,16 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#ifdef SW_DLLIMPLEMENTATION
#undef SW_DLLIMPLEMENTATION
#endif
-
#include <hintids.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#include <vcl/svapp.hxx>
-#ifndef _SVSTDARR_HXX
#define _SVSTDARR_STRINGSDTOR
#include <svl/svstdarr.hxx>
-#endif
#include <svl/cjkoptions.hxx>
#include <svtools/ctrltool.hxx>
#include <svl/eitem.hxx>
@@ -55,15 +51,9 @@
#include <fmtcol.hxx>
#include <charatr.hxx>
#include <swtypes.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
-#ifndef IDOCUMENTDEVICEACCESS_HXX_INCLUDED
#include <IDocumentDeviceAccess.hxx>
-#endif
#include <swmodule.hxx>
#include <wrtsh.hxx>
#include <uitool.hxx>
@@ -72,27 +62,15 @@
#include <uiitems.hxx>
#include <initui.hxx>
#include <optpage.hxx>
-#include <swprtopt.hxx>
-#ifndef _MODCFG_HXX
+#include <printdata.hxx>
#include <modcfg.hxx>
-#endif
-#ifndef _SRCVIEW_HXX
#include <srcview.hxx>
-#endif
#include <crstate.hxx>
#include <viewopt.hxx>
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
-#ifndef _CONFIG_HRC
#include <config.hrc>
-#endif
-#ifndef _REDLOPT_HRC
#include <redlopt.hrc>
-#endif
-#ifndef _OPTDLG_HRC
#include <optdlg.hrc>
-#endif
#include <svx/strarray.hxx>
#include <svl/slstitm.hxx>
#include <sfx2/request.hxx>
diff --git a/sw/source/ui/config/prtopt.cxx b/sw/source/ui/config/prtopt.cxx
index a07c2c154696..d81c743604db 100644
--- a/sw/source/ui/config/prtopt.cxx
+++ b/sw/source/ui/config/prtopt.cxx
@@ -28,16 +28,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <unotools/configmgr.hxx>
#include <prtopt.hxx>
-#include <swprtopt.hxx>
#include <tools/debug.hxx>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <unomid.h>
+
using namespace utl;
using rtl::OUString;
using namespace com::sun::star::uno;
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index cf894f8728c4..349a419e1c35 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -62,10 +62,8 @@
#include <unotools/tempfile.hxx>
#include <unotools/pathoptions.hxx>
#include <svl/urihelper.hxx>
-#ifndef _SVSTDARR_HXX
#define _SVSTDARR_STRINGSDTOR
#include <svl/svstdarr.hxx>
-#endif
#include <svl/zforlist.hxx>
#include <svl/zformat.hxx>
#include <svl/stritem.hxx>
@@ -86,7 +84,6 @@
#include <swundo.hxx>
#include <flddat.hxx>
#include <modcfg.hxx>
-#include <swprtopt.hxx>
#include <shellio.hxx>
#include <dbui.hxx>
#include <dbmgr.hxx>
diff --git a/sw/source/ui/docvw/AnnotationWin.cxx b/sw/source/ui/docvw/AnnotationWin.cxx
index 91ea1e13b077..08fb91dcc3c6 100644
--- a/sw/source/ui/docvw/AnnotationWin.cxx
+++ b/sw/source/ui/docvw/AnnotationWin.cxx
@@ -208,7 +208,8 @@ void SwAnnotationWin::InitAnswer(OutlinerParaObject* pText)
{
//collect our old meta data
SwSidebarWin* pWin = Mgr().GetNextPostIt(KEY_PAGEUP, this);
- const LocaleDataWrapper& rLocalData = SvtSysLocale().GetLocaleData();
+ const SvtSysLocale aSysLocale;
+ const LocaleDataWrapper& rLocalData = aSysLocale.GetLocaleData();
String aText = String(SW_RES(STR_REPLY));
SwRewriter aRewriter;
aRewriter.AddRule(UNDO_ARG1, pWin->GetAuthor());
diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx
index dc4f006e2026..884409826362 100644
--- a/sw/source/ui/docvw/SidebarWin.cxx
+++ b/sw/source/ui/docvw/SidebarWin.cxx
@@ -389,7 +389,8 @@ void SwSidebarWin::InitControls()
void SwSidebarWin::CheckMetaText()
{
- const LocaleDataWrapper& rLocalData = SvtSysLocale().GetLocaleData();
+ const SvtSysLocale aSysLocale;
+ const LocaleDataWrapper& rLocalData = aSysLocale.GetLocaleData();
String sMeta = GetAuthor();
if (sMeta.Len() == 0)
{
diff --git a/sw/source/ui/docvw/edtwin2.cxx b/sw/source/ui/docvw/edtwin2.cxx
index be201c32c24e..1ecf32144ee5 100644
--- a/sw/source/ui/docvw/edtwin2.cxx
+++ b/sw/source/ui/docvw/edtwin2.cxx
@@ -304,8 +304,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
{
USHORT nOldSubType = pFld->GetSubType();
((SwField*)pFld)->SetSubType(nsSwExtendedSubType::SUB_CMD);
- sTxt =
- pFld->ExpandField(rSh.GetDoc()->IsClipBoard());
+ sTxt = pFld->ExpandField(true);
((SwField*)pFld)->SetSubType(nOldSubType);
}
break;
@@ -340,7 +339,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
break;
case RES_DBFLD:
- sTxt = ((SwDBField*)pFld)->GetCntnt(TRUE);
+ sTxt = pFld->GetFieldName();
break;
case RES_USERFLD:
diff --git a/sw/source/ui/docvw/srcedtw.cxx b/sw/source/ui/docvw/srcedtw.cxx
index 55a0cb47e296..56c4eba3b8f1 100644
--- a/sw/source/ui/docvw/srcedtw.cxx
+++ b/sw/source/ui/docvw/srcedtw.cxx
@@ -62,6 +62,8 @@
#ifndef _HELPID_H
#include <helpid.h>
#endif
+#include <deque>
+
struct SwTextPortion
@@ -75,17 +77,8 @@ struct SwTextPortion
#define MAX_HIGHLIGHTTIME 200
#define SYNTAX_HIGHLIGHT_TIMEOUT 200
-SV_DECL_VARARR(SwTextPortions, SwTextPortion,16,16)
-
-/* -----------------15.01.97 12.07-------------------
-
---------------------------------------------------*/
+typedef std::deque<SwTextPortion> SwTextPortions;
-SV_IMPL_VARARR(SwTextPortions, SwTextPortion)
-
-/*-----------------15.01.97 12.08-------------------
-
---------------------------------------------------*/
static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
{
@@ -101,11 +94,11 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
const USHORT nStrLen = rSource.Len();
- USHORT nInsert = 0; // Anzahl der eingefuegten Portions
- USHORT nActPos = 0; //Position, an der '<' gefunden wurde
- USHORT nOffset = 0; //Offset von nActPos zur '<'
- USHORT nPortStart = USHRT_MAX; // fuer die TextPortion
- USHORT nPortEnd = 0; //
+ USHORT nInsert = 0; // Number of inserted Portions
+ USHORT nActPos = 0; // Position, at the '<' was found
+ USHORT nOffset = 0; // Offset of nActPos for '<'
+ USHORT nPortStart = USHRT_MAX; // For the TextPortion
+ USHORT nPortEnd = 0; //
SwTextPortion aText;
while(nActPos < nStrLen)
{
@@ -122,7 +115,8 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
aText.nStart += 1;
aText.nEnd = nActPos - 1;
aText.eType = svtools::HTMLUNKNOWN;
- aPortionList.Insert(aText, nInsert++);
+ aPortionList.push_back( aText );
+ nInsert++;
}
sal_Unicode cFollowFirst = rSource.GetChar((xub_StrLen)(nActPos + 1));
sal_Unicode cFollowNext = rSource.GetChar((xub_StrLen)(nActPos + 2));
@@ -212,7 +206,8 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
aTextPortion.nStart = nPortStart + 1;
aTextPortion.nEnd = nPortEnd;
aTextPortion.eType = eFoundType;
- aPortionList.Insert(aTextPortion, nInsert++);
+ aPortionList.push_back( aTextPortion );
+ nInsert++;
eFoundType = svtools::HTMLUNKNOWN;
}
@@ -226,7 +221,8 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
aText.nStart = nPortEnd + 1;
aText.nEnd = nActPos - 1;
aText.eType = svtools::HTMLUNKNOWN;
- aPortionList.Insert(aText, nInsert++);
+ aPortionList.push_back( aText );
+ nInsert++;
}
}
@@ -749,7 +745,7 @@ void SwSrcEditWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff )
SwTextPortions aPortionList;
lcl_Highlight(rSource, aPortionList);
- USHORT nCount = aPortionList.Count();
+ size_t nCount = aPortionList.size();
if ( !nCount )
return;
@@ -757,7 +753,7 @@ void SwSrcEditWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff )
if ( rLast.nStart > rLast.nEnd ) // Nur bis Bug von MD behoeben
{
nCount--;
- aPortionList.Remove( nCount);
+ aPortionList.pop_back();
if ( !nCount )
return;
}
@@ -777,7 +773,7 @@ void SwSrcEditWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff )
#ifdef DBG_UTIL
USHORT nLine = aPortionList[0].nLine;
#endif
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( size_t i = 0; i < nCount; i++ )
{
SwTextPortion& r = aPortionList[i];
DBG_ASSERT( r.nLine == nLine, "doch mehrere Zeilen ?" );
@@ -796,7 +792,7 @@ void SwSrcEditWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff )
}
}
- for ( USHORT i = 0; i < aPortionList.Count(); i++ )
+ for ( size_t i = 0; i < aPortionList.size(); i++ )
{
SwTextPortion& r = aPortionList[i];
if ( r.nStart > r.nEnd ) // Nur bis Bug von MD behoeben
diff --git a/sw/source/ui/fldui/DropDownFieldDialog.cxx b/sw/source/ui/fldui/DropDownFieldDialog.cxx
index 68ce692f6a32..1d3fafa880a1 100644
--- a/sw/source/ui/fldui/DropDownFieldDialog.cxx
+++ b/sw/source/ui/fldui/DropDownFieldDialog.cxx
@@ -32,21 +32,14 @@
#undef SW_DLLIMPLEMENTATION
#endif
-
#include <wrtsh.hxx>
#include <fldbas.hxx>
#include <fldmgr.hxx>
-#ifndef _MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
#include <DropDownFieldDialog.hxx>
#include <flddropdown.hxx>
-#ifndef _FLDUI_HRC
#include <fldui.hrc>
-#endif
-#ifndef _SW_DROPDOWNFIELDDIALOG_HRC
#include <DropDownFieldDialog.hrc>
-#endif
using namespace ::com::sun::star;
@@ -124,13 +117,12 @@ void sw::DropDownFieldDialog::Apply()
{
rSh.StartAllAction();
- SwDropDownField * pCopy = (SwDropDownField *) pDropField->Copy();
+ ::std::auto_ptr<SwDropDownField> const pCopy(
+ static_cast<SwDropDownField *>( pDropField->CopyField() ) );
pCopy->SetPar1(sSelect);
rSh.SwEditShell::UpdateFlds(*pCopy);
- delete pCopy;
-
rSh.SetUndoNoResetModified();
rSh.EndAllAction();
}
diff --git a/sw/source/ui/fldui/inpdlg.cxx b/sw/source/ui/fldui/inpdlg.cxx
index 46c05c4ac63b..6676b72a1f84 100644
--- a/sw/source/ui/fldui/inpdlg.cxx
+++ b/sw/source/ui/fldui/inpdlg.cxx
@@ -32,13 +32,7 @@
#undef SW_DLLIMPLEMENTATION
#endif
-
-
-#define _INPDLG_CXX
-
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <unotools/charclass.hxx>
#include <editeng/unolingu.hxx>
#include <wrtsh.hxx>
@@ -48,12 +42,8 @@
#include <inpdlg.hxx>
#include <fldmgr.hxx>
-#ifndef _FLDUI_HRC
#include <fldui.hrc>
-#endif
-#ifndef _INPDLG_HRC
#include <inpdlg.hrc>
-#endif
/*--------------------------------------------------------------------
@@ -128,7 +118,9 @@ SwFldInputDlg::SwFldInputDlg( Window *pParent, SwWrtShell &rS,
//values are formatted - formulas are not
CharClass aCC( SvxCreateLocale( pSetFld->GetLanguage() ));
if( aCC.isNumeric( sFormula ))
- aStr = pSetFld->Expand();
+ {
+ aStr = pSetFld->ExpandField(true);
+ }
else
aStr = sFormula;
aLabelED.SetText( pSetFld->GetPromptText() );
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 5bff86b1a4c7..49bd1b2a0c7e 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -1080,7 +1080,7 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
aWidthED .GetValue() == aWidthED .GetMin() &&
aHeightED.GetValue() == aHeightED.GetMin());
- if ((bNew && !bFormat) || (bValueModified || bCheckChanged) && bLegalValue)
+ if ((bNew && !bFormat) || ((bValueModified || bCheckChanged) && bLegalValue))
{
sal_Int64 nNewWidth = aWidthED.DenormalizePercent(aWidthED.GetRealValue(FUNIT_TWIP));
sal_Int64 nNewHeight = aHeightED.DenormalizePercent(aHeightED.GetRealValue(FUNIT_TWIP));
diff --git a/sw/source/ui/inc/unotxvw.hxx b/sw/source/ui/inc/unotxvw.hxx
index 91cf8823e124..4990df84f43b 100644
--- a/sw/source/ui/inc/unotxvw.hxx
+++ b/sw/source/ui/inc/unotxvw.hxx
@@ -156,7 +156,7 @@ public:
void Invalidate();
// temporary document used for PDF export of selections/multi-selections
- SfxObjectShellRef BuildTmpSelectionDoc( SfxObjectShellRef& );
+ SfxObjectShellRef BuildTmpSelectionDoc();
};
/* -----------------17.09.98 12:52-------------------
diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx
index a21dc8cfb30e..78817eec874c 100644
--- a/sw/source/ui/inc/view.hxx
+++ b/sw/source/ui/inc/view.hxx
@@ -83,7 +83,6 @@ class CommandEvent;
class InsCaptionOpt;
class SvGlobalName;
class SvtAccessibilityOptions;
-class SwPrtOptions;
class SwTransferable;
class SwMailMergeConfigItem;
class SwTxtNode; // #i23726#
diff --git a/sw/source/ui/inc/wrtsh.hxx b/sw/source/ui/inc/wrtsh.hxx
index 2fce41b1a972..20d057ecf05a 100644
--- a/sw/source/ui/inc/wrtsh.hxx
+++ b/sw/source/ui/inc/wrtsh.hxx
@@ -320,9 +320,6 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)();
void InsertTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = 0);
BOOL UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = 0);
- // new fields
- BOOL UpdateField( sw::mark::IFieldmark &fieldBM);
-
// Numerierung und Bullets
/**
Turns on numbering or bullets.
diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx
index 2319be573e25..669d3eb446b8 100755..100644
--- a/sw/source/ui/uiview/pview.cxx
+++ b/sw/source/ui/uiview/pview.cxx
@@ -28,8 +28,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
#include <sfx2/objface.hxx>
#include <vcl/timer.hxx>
#include <vcl/field.hxx>
@@ -54,10 +52,7 @@
#include <svx/svdview.hxx>
#include <svx/dlgutil.hxx>
#include <svx/zoomslideritem.hxx>
-#ifndef _SVX_SVXIDS_HRC //autogen
#include <svx/svxids.hrc>
-#endif
-
#include <swwait.hxx>
#include <globdoc.hxx>
@@ -73,27 +68,16 @@
#include <view.hxx>
#include <textsh.hxx>
#include <scroll.hxx>
-#include <swprtopt.hxx>
+#include <prtopt.hxx>
#include <docstat.hxx>
#include <usrpref.hxx>
#include <viewfunc.hxx>
-
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
-#ifndef _POPUP_HRC
#include <popup.hrc>
-#endif
-#ifndef _PVIEW_HRC
#include <pview.hrc>
-#endif
#define SwPagePreView
#include <sfx2/msg.hxx>
@@ -105,6 +89,7 @@
#include <svx/dialogs.hrc>
#include <vos/mutex.hxx>
+
using namespace ::com::sun::star;
@@ -1292,8 +1277,7 @@ void SwPagePreView::Init(const SwViewOption * pPrefs)
GetViewShell()->ApplyAccessiblityOptions(SW_MOD()->GetAccessibilityOptions());
// OD 09.01.2003 #i6467# - adjust view shell option to the same as for print
- SwPrtOptions aPrintOptions( GetViewFrame()->GetObjectShell()->GetTitle(0) );
- aPrintOptions.MakeOptions( false );
+ SwPrintData const aPrintOptions = *SW_MOD()->GetPrtOptions(false);
GetViewShell()->AdjustOptionsForPagePreview( aPrintOptions );
IDocumentSettingAccess* pIDSA = pESh->getIDocumentSettingAccess();
diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index 15c94782883f..b1fd76c63aff 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -94,7 +94,6 @@
#include <frmui.hrc>
#include <cfgitems.hxx>
#include <prtopt.hxx>
-#include <swprtopt.hxx>
#include <linguistic/lngprops.hxx>
#include <editeng/unolingu.hxx>
//#include <sfx2/app.hxx>
@@ -1912,8 +1911,7 @@ SfxObjectShellRef & SwView::GetOrCreateTmpSelectionDoc()
if (!rxTmpDoc.Is())
{
SwXTextView *pImpl = GetViewImpl()->GetUNOObject_Impl();
- rxTmpDoc = pImpl->BuildTmpSelectionDoc(
- GetViewImpl()->GetEmbeddedObjRef() );
+ rxTmpDoc = pImpl->BuildTmpSelectionDoc();
}
return rxTmpDoc;
}
@@ -1927,17 +1925,12 @@ void SwView::AddTransferable(SwTransferable& rTransferable)
/* --------------------------------------------------*/
-void SwPrtOptions::MakeOptions( BOOL bWeb )
-{
- *this = *SW_MOD()->GetPrtOptions(bWeb);
-
- nCopyCount = 1;
- bCollate = FALSE;
- bPrintSelection = FALSE;
- bJobStartet = FALSE;
+namespace sw {
- aMulti.SetTotalRange( Range( 0, RANGE_MAX ) );
- aMulti.SelectAll();
- aMulti.Select( 0, FALSE );
+void InitPrintOptionsFromApplication(SwPrintData & o_rData, bool const bWeb)
+{
+ o_rData = *SW_MOD()->GetPrtOptions(bWeb);
}
+} // namespace sw
+
diff --git a/sw/source/ui/uiview/viewprt.cxx b/sw/source/ui/uiview/viewprt.cxx
index 8721f425eb8d..7ddc594dd223 100644
--- a/sw/source/ui/uiview/viewprt.cxx
+++ b/sw/source/ui/uiview/viewprt.cxx
@@ -70,7 +70,6 @@
#include <docsh.hxx>
#include <viewopt.hxx>
#include <prtopt.hxx>
-#include <swprtopt.hxx>
#include <fontcfg.hxx>
#include <cfgitems.hxx>
#include <dbmgr.hxx>
diff --git a/sw/source/ui/uno/unomod.cxx b/sw/source/ui/uno/unomod.cxx
index c3d56910ad5a..75b76b6de887 100644
--- a/sw/source/ui/uno/unomod.cxx
+++ b/sw/source/ui/uno/unomod.cxx
@@ -916,7 +916,7 @@ void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, u
case HANDLE_VIEWSET_TABSTOPS : bBoolVal = mpConstViewOption->IsTab(sal_True); break;
case HANDLE_VIEWSET_BREAKS : bBoolVal = mpConstViewOption->IsLineBreak(sal_True); break;
case HANDLE_VIEWSET_HIDDEN_TEXT : bBoolVal = mpConstViewOption->IsShowHiddenField(); break;
- case HANDLE_VIEWSET_HIDDEN_CHARACTERS : bBoolVal = mpConstViewOption->IsShowHiddenChar(); break;
+ case HANDLE_VIEWSET_HIDDEN_CHARACTERS : bBoolVal = mpConstViewOption->IsShowHiddenChar(sal_True); break;
case HANDLE_VIEWSET_HIDDEN_PARAGRAPHS : bBoolVal = mpConstViewOption->IsShowHiddenPara(); break;
case HANDLE_VIEWSET_TABLE_BOUNDARIES : bBoolVal = SwViewOption::IsTableBoundaries(); break;
case HANDLE_VIEWSET_TEXT_BOUNDARIES : bBoolVal = SwViewOption::IsDocBoundaries(); break;
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index 2bacca54776d..c9c80599541d 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -47,7 +47,7 @@
#include <srcview.hxx>
#include <viewsh.hxx>
#include <pvprtdat.hxx>
-#include <swprtopt.hxx>
+#include <printdata.hxx>
#include <svl/stritem.hxx>
#include <unotxdoc.hxx>
#include <svl/numuno.hxx>
@@ -2716,14 +2716,15 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount(
m_pRenderData->ViewOptionAdjustStart( *pWrtShell, *pWrtShell->GetViewOptions() );
}
- m_pRenderData->SetSwPrtOptions( new SwPrtOptions( C2U( bIsPDFExport ? "PDF export" : "Printing" ) ) );
+ m_pRenderData->SetSwPrtOptions( new SwPrintData );
m_pRenderData->MakeSwPrtOptions( m_pRenderData->GetSwPrtOptionsRef(), pRenderDocShell,
m_pPrintUIOptions, m_pRenderData, bIsPDFExport );
if (pView->IsA(aSwViewTypeId))
{
// PDF export should not make use of the SwPrtOptions
- const SwPrtOptions *pPrtOptions = bIsPDFExport? NULL : m_pRenderData->GetSwPrtOptions();
+ const SwPrintData *pPrtOptions = (bIsPDFExport)
+ ? NULL : m_pRenderData->GetSwPrtOptions();
m_pRenderData->ViewOptionAdjust( pPrtOptions );
}
@@ -3087,7 +3088,8 @@ void SAL_CALL SwXTextDocument::render(
}
// <--
- const SwPrtOptions &rSwPrtOptions = *m_pRenderData->GetSwPrtOptions();
+ SwPrintData const& rSwPrtOptions =
+ *m_pRenderData->GetSwPrtOptions();
if (bPrintProspect)
pVwSh->PrintProspect( pOut, rSwPrtOptions, nRenderer );
else // normal printing and PDF export
@@ -4110,8 +4112,8 @@ SwViewOptionAdjust_Impl::~SwViewOptionAdjust_Impl()
}
-void SwViewOptionAdjust_Impl::AdjustViewOptions(
- const SwPrtOptions *pPrtOptions )
+void
+SwViewOptionAdjust_Impl::AdjustViewOptions(SwPrintData const*const pPrtOptions)
{
// to avoid unnecessary reformatting the view options related to the content
// below should only change if necessary, that is if respective content is present
diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx
index 1f1fc9149e34..c03935464abf 100644
--- a/sw/source/ui/uno/unotxvw.cxx
+++ b/sw/source/ui/uno/unotxvw.cxx
@@ -903,14 +903,17 @@ void SAL_CALL SwXTextView::setRubyList(
/*-- 29.12.02 15:45:29---------------------------------------------------
-----------------------------------------------------------------------*/
-SfxObjectShellRef SwXTextView::BuildTmpSelectionDoc( SfxObjectShellRef& /*rRef*/ )
+SfxObjectShellRef SwXTextView::BuildTmpSelectionDoc()
{
SwWrtShell& rOldSh = m_pView->GetWrtShell();
SfxPrinter *pPrt = rOldSh.getIDocumentDeviceAccess()->getPrinter( false );
SwDocShell* pDocSh;
SfxObjectShellRef xDocSh( pDocSh = new SwDocShell( /*pPrtDoc, */SFX_CREATE_MODE_STANDARD ) );
xDocSh->DoInitNew( 0 );
- rOldSh.FillPrtDoc(pDocSh->GetDoc(), pPrt);
+ SwDoc *const pTempDoc( pDocSh->GetDoc() );
+ // #i103634#, #i112425#: do not expand numbering and fields on PDF export
+ pTempDoc->SetClipBoard(true);
+ rOldSh.FillPrtDoc(pTempDoc, pPrt);
SfxViewFrame* pDocFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 );
SwView* pDocView = (SwView*) pDocFrame->GetViewShell();
pDocView->AttrChangedNotify( &pDocView->GetWrtShell() );//Damit SelectShell gerufen wird.
diff --git a/sw/source/ui/utlui/initui.cxx b/sw/source/ui/utlui/initui.cxx
index d40283e39146..75e412a27eb6 100644
--- a/sw/source/ui/utlui/initui.cxx
+++ b/sw/source/ui/utlui/initui.cxx
@@ -260,7 +260,8 @@ ImpAutoFmtNameListLoader::ImpAutoFmtNameListLoader( SvStringsDtor& rLst )
p->SearchAndReplace(C2S("%1"), C2S(",,"));
p->SearchAndReplace(C2S("%2"), C2S("''"));
#else
- const LocaleDataWrapper& rLclD = SvtSysLocale().GetLocaleData();
+ const SvtSysLocale aSysLocale;
+ const LocaleDataWrapper& rLclD = aSysLocale.GetLocaleData();
//unter richtigen Betriebssystemen funktioniert es auch so
p->SearchAndReplace(C2S("%1"), rLclD.getDoubleQuotationMarkStart());
p->SearchAndReplace(C2S("%2"), rLclD.getDoubleQuotationMarkEnd());
diff --git a/sw/source/ui/utlui/uitool.cxx b/sw/source/ui/utlui/uitool.cxx
index 01f6c4e84d7a..32c355313d7f 100644
--- a/sw/source/ui/utlui/uitool.cxx
+++ b/sw/source/ui/utlui/uitool.cxx
@@ -730,7 +730,8 @@ SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, USHORT *pPercent,
String GetAppLangDateTimeString( const DateTime& rDT )
{
- const LocaleDataWrapper& rAppLclData = SvtSysLocale().GetLocaleData();
+ const SvtSysLocale aSysLocale;
+ const LocaleDataWrapper& rAppLclData = aSysLocale.GetLocaleData();
String sRet( rAppLclData.getDate( rDT ));
( sRet += ' ' ) += rAppLclData.getTime( rDT, FALSE, FALSE );
return sRet;
diff --git a/sw/source/ui/wrtsh/wrtsh2.cxx b/sw/source/ui/wrtsh/wrtsh2.cxx
index 17af61be8bad..0e51cd4c756c 100644
--- a/sw/source/ui/wrtsh/wrtsh2.cxx
+++ b/sw/source/ui/wrtsh/wrtsh2.cxx
@@ -239,15 +239,8 @@ BOOL SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet)
return bResult;
}
-BOOL SwWrtShell::UpdateField( sw::mark::IFieldmark &fieldBM )
-{
- return SwEditShell::UpdateField(fieldBM);
-}
-
-
-
- // ein Klick aus das angegebene Feld. Der Cursor steht auf diesem.
- // Fuehre die vor definierten Aktionen aus.
+// handler for click on the field given as parameter.
+// the cursor is positioned on the field.
void SwWrtShell::ClickToField( const SwField& rFld )
diff --git a/testautomation/framework/required/includes/window_functions.inc b/testautomation/framework/required/includes/window_functions.inc
index efbbacf44b63..dfb6b2600df8 100755
--- a/testautomation/framework/required/includes/window_functions.inc
+++ b/testautomation/framework/required/includes/window_functions.inc
@@ -35,12 +35,6 @@ testcase tWindowFunctions
printlog( "Update test for window functions" )
- if ( gtSysName = "Mac OS X" ) then
- qaErrorLog( "#i114476# No testing for Mac as some Window attributes do not exist" )
- goto endsub
- endif
-
-
printlog( "Create initial document" )
gApplication = "WRITER"
hInitSingleDoc()
@@ -114,7 +108,7 @@ testcase tWindowFunctions
if ( DocumentWriter.IsMin() ) then
printlog( "Window is minimized" )
else
- qaerrorlog( "#i32672# Window not minimized" )
+ warnlog( "Window not minimized" )
endif
kontext "DocumentWriter"
diff --git a/unotools/source/ucbhelper/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx
index e77dc529e410..87fddc0c65cd 100644
--- a/unotools/source/ucbhelper/tempfile.cxx
+++ b/unotools/source/ucbhelper/tempfile.cxx
@@ -198,19 +198,19 @@ String ConstructTempDir_Impl( const String* pParent )
void CreateTempName_Impl( String& rName, sal_Bool bKeep, sal_Bool bDir = sal_True )
{
// add a suitable tempname
- // Prefix can have 5 chars, leaving 3 for numbers. 26 ** 3 == 17576
- // ER 13.07.00 why not radix 36 [0-9A-Z] ?!?
- const unsigned nRadix = 26;
+ // 36 ** 6 == 2176782336
+ unsigned const nRadix = 36;
+ unsigned long const nMax = (nRadix*nRadix*nRadix*nRadix*nRadix*nRadix);
String aName( rName );
aName += String::CreateFromAscii( "sv" );
rName.Erase();
- static unsigned long u = Time::GetSystemTicks();
- for ( unsigned long nOld = u; ++u != nOld; )
+ unsigned long nSeed = Time::GetSystemTicks() % nMax;
+ for ( unsigned long u = nSeed; ++u != nSeed; )
{
- u %= (nRadix*nRadix*nRadix);
+ u %= nMax;
String aTmp( aName );
- aTmp += String::CreateFromInt32( (sal_Int32) (unsigned) u, nRadix );
+ aTmp += String::CreateFromInt64( static_cast<sal_Int64>(u), nRadix );
aTmp += String::CreateFromAscii( ".tmp" );
if ( bDir )
diff --git a/unoxml/source/dom/document.cxx b/unoxml/source/dom/document.cxx
index 656aa1cbef6c..fcd43832adf0 100644
--- a/unoxml/source/dom/document.cxx
+++ b/unoxml/source/dom/document.cxx
@@ -53,50 +53,12 @@
namespace DOM
{
- void CDocument::addnode(xmlNodePtr aNode)
- {
- if (aNode != (xmlNodePtr)m_aDocPtr)
- {
- Reference< XNode >* nref = new Reference< XNode >(CNode::get(aNode));
- m_aNodeRefList.push_back(nref);
- }
- }
-
CDocument::~CDocument()
{
- Reference< XNode >* pRef;
- nodereflist_t::const_iterator r = m_aNodeRefList.begin();
- while (r!=m_aNodeRefList.end())
- {
- pRef = *r;
- delete pRef;
- r++;
- }
-
- // get rid of leftover instances, if anybody still holds a
- // reference to one of these, it will be invalid!
- /*
- CNode* aNode = 0;
- nodelist_t::const_iterator i = m_aNodeList.begin();
- while (i!=m_aNodeList.end())
- {
- aNode = CNode::get(*i, sal_False);
- if (aNode != 0)
- {
- // CNode::remove(*i);
- // delete will remove
- delete aNode;
- }
- i++;
- }
- */
-
xmlFreeDoc(m_aDocPtr);
-
}
CDocument::CDocument(xmlDocPtr aDocPtr):
- m_aNodeRefList(),
m_aDocPtr(aDocPtr),
m_streamListeners()
{
diff --git a/unoxml/source/dom/document.hxx b/unoxml/source/dom/document.hxx
index b653619031a1..3fe593ff2b24 100644
--- a/unoxml/source/dom/document.hxx
+++ b/unoxml/source/dom/document.hxx
@@ -72,12 +72,9 @@ namespace DOM
XActiveDataControl, XActiveDataSource, XSAXSerializable, XFastSAXSerializable>
{
friend class CNode;
- typedef std::list< Reference< XNode >* > nodereflist_t;
typedef set< Reference< XStreamListener > > listenerlist_t;
private:
- nodereflist_t m_aNodeRefList;
-
xmlDocPtr m_aDocPtr;
// datacontrol/source state
@@ -87,8 +84,6 @@ namespace DOM
protected:
CDocument(xmlDocPtr aDocPtr);
- void addnode(xmlNodePtr aNode);
-
public:
virtual ~CDocument();
diff --git a/unoxml/source/dom/node.cxx b/unoxml/source/dom/node.cxx
index fb4a6bf508b3..d4b317b425b3 100644
--- a/unoxml/source/dom/node.cxx
+++ b/unoxml/source/dom/node.cxx
@@ -228,7 +228,7 @@ namespace DOM
// m_aNodeType = NodeType::NOTATION_NODE;
pNode = static_cast< CNode* >(new CAttr((xmlAttrPtr)aNode));
break;
- // unsopported node types
+ // unsupported node types
case XML_HTML_DOCUMENT_NODE:
case XML_ELEMENT_DECL:
case XML_ATTRIBUTE_DECL:
@@ -238,18 +238,10 @@ namespace DOM
pNode = 0;
break;
}
- }
- if ( pNode != 0 )
- {
- if(CNode::theNodeMap.insert(nodemap_t::value_type(aNode, pNode)).second)
+
+ if ( pNode != 0 )
{
- // insertion done, register node with document
- xmlDocPtr doc = aNode->doc;
- if( doc != NULL)
- {
- CDocument* pDoc = static_cast< CDocument* >(CNode::get((xmlNodePtr)doc));
- pDoc->addnode(aNode);
- } else
+ if(!CNode::theNodeMap.insert(nodemap_t::value_type(aNode, pNode)).second)
{
// if insertion failed, delete the new instance and return null
delete pNode;
diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx
index a7e50e7e232d..83de4df8050f 100644
--- a/unoxml/source/rdf/librdf_repository.cxx
+++ b/unoxml/source/rdf/librdf_repository.cxx
@@ -39,7 +39,10 @@
#include <boost/shared_array.hpp>
#include <boost/bind.hpp>
-#include <librdf.h>
+#include <libxslt/security.h>
+
+// #i114999# do not include librdf.h, it is broken in redland 1.0.11
+#include <redland.h>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
@@ -64,19 +67,6 @@
#include <comphelper/stlunosequence.hxx>
#include <comphelper/sequenceasvector.hxx>
#include <comphelper/makesequence.hxx>
-#include <librdf.h>
-#include <libxslt/security.h>
-
-#include <boost/utility.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/shared_array.hpp>
-#include <boost/bind.hpp>
-
-#include <map>
-#include <functional>
-#include <algorithm>
-
-#include <string.h>
/**
diff --git a/unoxml/source/xpath/xpathapi.cxx b/unoxml/source/xpath/xpathapi.cxx
index 80666d9e2031..f40082e25e9b 100644
--- a/unoxml/source/xpath/xpathapi.cxx
+++ b/unoxml/source/xpath/xpathapi.cxx
@@ -352,7 +352,7 @@ namespace XPath
throw XPathException();
}
xmlXPathFreeContext(xpathCtx);
- Reference< XXPathObject > aObj(new CXPathObject(xpathObj));
+ Reference< XXPathObject > aObj(new CXPathObject(xpathObj, contextNode));
return aObj;
}
diff --git a/unoxml/source/xpath/xpathapi.hxx b/unoxml/source/xpath/xpathapi.hxx
index fdfff24353cc..048fafaae8e9 100644
--- a/unoxml/source/xpath/xpathapi.hxx
+++ b/unoxml/source/xpath/xpathapi.hxx
@@ -69,7 +69,7 @@ namespace XPath
private:
nsmap_t m_nsmap;
- const Reference < XMultiServiceFactory >& m_aFactory;
+ const Reference< XMultiServiceFactory > m_aFactory;
extensions_t m_extensions;
public:
diff --git a/unoxml/source/xpath/xpathobject.cxx b/unoxml/source/xpath/xpathobject.cxx
index 083d19080c4b..757de0c5aac4 100644
--- a/unoxml/source/xpath/xpathobject.cxx
+++ b/unoxml/source/xpath/xpathobject.cxx
@@ -31,8 +31,8 @@
namespace XPath
{
- CXPathObject::CXPathObject(xmlXPathObjectPtr xpathObj)
- : m_pXPathObj(xpathObj, xmlXPathFreeObject)
+ CXPathObject::CXPathObject(xmlXPathObjectPtr xpathObj, const Reference< XNode >& contextNode)
+ : m_pXPathObj(xpathObj, xmlXPathFreeObject), m_xContextNode(contextNode)
{
switch (m_pXPathObj->type)
{
diff --git a/unoxml/source/xpath/xpathobject.hxx b/unoxml/source/xpath/xpathobject.hxx
index 8e256bc8a994..348fae8e21e6 100644
--- a/unoxml/source/xpath/xpathobject.hxx
+++ b/unoxml/source/xpath/xpathobject.hxx
@@ -52,10 +52,11 @@ namespace XPath
{
private:
boost::shared_ptr<xmlXPathObject> m_pXPathObj;
+ const Reference< XNode > m_xContextNode;
XPathObjectType m_xPathObjectType;
public:
- CXPathObject(xmlXPathObjectPtr xpathObj);
+ CXPathObject(xmlXPathObjectPtr xpathObj, const Reference< XNode >& contextNode);
/**
get object type
diff --git a/vcl/aqua/inc/salinst.h b/vcl/aqua/inc/salinst.h
index 0bceb99d1d0e..4b0385844eed 100644
--- a/vcl/aqua/inc/salinst.h
+++ b/vcl/aqua/inc/salinst.h
@@ -134,9 +134,10 @@ public:
virtual vos::IMutex* GetYieldMutex();
virtual ULONG ReleaseYieldMutex();
virtual void AcquireYieldMutex( ULONG nCount );
+ virtual bool CheckYieldMutex();
virtual void Yield( bool bWait, bool bHandleAllCurrentEvents );
virtual bool AnyInput( USHORT nType );
- virtual SalMenu* CreateMenu( BOOL bMenuBar );
+ virtual SalMenu* CreateMenu( BOOL bMenuBar, Menu* pVCLMenu );
virtual void DestroyMenu( SalMenu* );
virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData );
virtual void DestroyMenuItem( SalMenuItem* );
diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx
index 2ebb24437c24..5d2fc3f00741 100644
--- a/vcl/aqua/source/app/salinst.cxx
+++ b/vcl/aqua/source/app/salinst.cxx
@@ -566,6 +566,22 @@ void AquaSalInstance::AcquireYieldMutex( ULONG nCount )
// -----------------------------------------------------------------------
+bool AquaSalInstance::CheckYieldMutex()
+{
+ bool bRet = true;
+
+ SalYieldMutex* pYieldMutex = mpSalYieldMutex;
+ if ( pYieldMutex->GetThreadId() !=
+ vos::OThread::getCurrentIdentifier() )
+ {
+ bRet = false;
+ }
+
+ return bRet;
+}
+
+// -----------------------------------------------------------------------
+
bool AquaSalInstance::isNSAppThread() const
{
return vos::OThread::getCurrentIdentifier() == maMainThread;
diff --git a/vcl/aqua/source/app/vclnsapp.mm b/vcl/aqua/source/app/vclnsapp.mm
index f33599fa086e..ff2b4226bfa0 100755
--- a/vcl/aqua/source/app/vclnsapp.mm
+++ b/vcl/aqua/source/app/vclnsapp.mm
@@ -358,6 +358,8 @@
-(NSApplicationTerminateReply)applicationShouldTerminate: (NSApplication *) app
{
+ YIELD_GUARD;
+
SalData* pSalData = GetSalData();
#if 1 // currently do some really bad hack
if( ! pSalData->maFrames.empty() )
@@ -421,6 +423,8 @@
-(void)systemColorsChanged: (NSNotification*) pNotification
{
+ YIELD_GUARD;
+
const SalData* pSalData = GetSalData();
if( !pSalData->maFrames.empty() )
pSalData->maFrames.front()->CallCallback( SALEVENT_SETTINGSCHANGED, NULL );
@@ -428,6 +432,8 @@
-(void)screenParametersChanged: (NSNotification*) pNotification
{
+ YIELD_GUARD;
+
SalData* pSalData = GetSalData();
std::list< AquaSalFrame* >::iterator it;
for( it = pSalData->maFrames.begin(); it != pSalData->maFrames.end(); ++it )
diff --git a/vcl/aqua/source/dtrans/DataFlavorMapping.cxx b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
index e0a95a532bf8..01f989cbc1c1 100644
--- a/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
+++ b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
@@ -575,11 +575,19 @@ DataProviderPtr_t DataFlavorMapper::getDataProvider(NSString* systemFlavor, Refe
if (isByteSequenceType(data.getValueType()))
{
+ /*
+ the HTMLFormatDataProvider prepends segment information to HTML
+ this is useful for exchange with MS Word (which brings this stuff from Windows)
+ but annoying for other applications. Since this extension is not a standard datatype
+ on the Mac, let us not provide but provide normal HTML
+
if ([systemFlavor caseInsensitiveCompare: NSHTMLPboardType] == NSOrderedSame)
{
dp = DataProviderPtr_t(new HTMLFormatDataProvider(data));
}
- else if ([systemFlavor caseInsensitiveCompare: NSPICTPboardType] == NSOrderedSame)
+ else
+ */
+ if ([systemFlavor caseInsensitiveCompare: NSPICTPboardType] == NSOrderedSame)
{
dp = DataProviderPtr_t(new BMPDataProvider(data, PICTImageFileType));
}
diff --git a/vcl/aqua/source/window/salframe.cxx b/vcl/aqua/source/window/salframe.cxx
index ce4370c57b9f..4530778c5775 100644
--- a/vcl/aqua/source/window/salframe.cxx
+++ b/vcl/aqua/source/window/salframe.cxx
@@ -578,12 +578,27 @@ void AquaSalFrame::SetWindowState( const SalFrameState* pState )
VCLToCocoa( aStateRect );
aStateRect = [NSWindow frameRectForContentRect: aStateRect styleMask: mnStyleMask];
- // relase and acquire mutex again since this call can block waiting for an internal lock
+ [mpWindow setFrame: aStateRect display: NO];
+ if( pState->mnState == SAL_FRAMESTATE_MINIMIZED )
+ [mpWindow miniaturize: NSApp];
+ else if( [mpWindow isMiniaturized] )
+ [mpWindow deminiaturize: NSApp];
+
+
+ /* ZOOMED is not really maximized (actually it toggles between a user set size and
+ the program specified one), but comes closest since the default behavior is
+ "maximized" if the user did not intervene
+ */
+ if( pState->mnState == SAL_FRAMESTATE_MAXIMIZED )
{
- [mpWindow setFrame: aStateRect display: NO];
+ if(! [mpWindow isZoomed])
+ [mpWindow zoom: NSApp];
+ }
+ else
+ {
+ if( [mpWindow isZoomed] )
+ [mpWindow zoom: NSApp];
}
-
- // FIXME: HTH maximized state ?
// get new geometry
UpdateFrameGeometry();
@@ -641,8 +656,6 @@ BOOL AquaSalFrame::GetWindowState( SalFrameState* pState )
pState->mnWidth = long(aStateRect.size.width);
pState->mnHeight = long(aStateRect.size.height);
- // FIXME: HTH maximized state ?
-
if( [mpWindow isMiniaturized] )
pState->mnState = SAL_FRAMESTATE_MINIMIZED;
else if( ! [mpWindow isZoomed] )
diff --git a/vcl/aqua/source/window/salmenu.cxx b/vcl/aqua/source/window/salmenu.cxx
index ed3086d8506f..82102f2e7095 100644
--- a/vcl/aqua/source/window/salmenu.cxx
+++ b/vcl/aqua/source/window/salmenu.cxx
@@ -79,10 +79,14 @@ const AquaSalMenu* AquaSalMenu::pCurrentMenuBar = NULL;
-(void)showPreferences: (id) sender
{
+ YIELD_GUARD;
+
[self showDialog: SHOWDIALOG_ID_PREFERENCES];
}
-(void)showAbout: (id) sender
{
+ YIELD_GUARD;
+
[self showDialog: SHOWDIALOG_ID_ABOUT];
}
@end
@@ -203,11 +207,12 @@ static void initAppMenu()
// =======================================================================
-SalMenu* AquaSalInstance::CreateMenu( BOOL bMenuBar )
+SalMenu* AquaSalInstance::CreateMenu( BOOL bMenuBar, Menu* pVCLMenu )
{
initAppMenu();
AquaSalMenu *pAquaSalMenu = new AquaSalMenu( bMenuBar );
+ pAquaSalMenu->mpVCLMenu = pVCLMenu;
return pAquaSalMenu;
}
diff --git a/vcl/inc/vcl/arrange.hxx b/vcl/inc/vcl/arrange.hxx
index 83568609f87b..f98197231be9 100644
--- a/vcl/inc/vcl/arrange.hxx
+++ b/vcl/inc/vcl/arrange.hxx
@@ -385,7 +385,12 @@ namespace vcl
sal_uInt64 getMap( sal_uInt32 i_nX, sal_uInt32 i_nY )
{ return static_cast< sal_uInt64 >(i_nX) | (static_cast< sal_uInt64>(i_nY) << 32 ); }
- Size getOptimalSize( WindowSizeType, std::vector<long>& o_rColumnWidths, std::vector<long>& o_rRowHeights ) const;
+ static void distributeExtraSize( std::vector<long>& io_rSizes, const std::vector<sal_Int32>& i_rPrios, long i_nExtraWidth );
+
+ Size getOptimalSize( WindowSizeType,
+ std::vector<long>& o_rColumnWidths, std::vector<long>& o_rRowHeights,
+ std::vector<sal_Int32>& o_rColumnPrio, std::vector<sal_Int32>& o_rRowPrio
+ ) const;
protected:
virtual Element* getElement( size_t i_nIndex )
{ return i_nIndex < m_aElements.size() ? &m_aElements[ i_nIndex ] : 0; }
diff --git a/vcl/inc/vcl/outdev.hxx b/vcl/inc/vcl/outdev.hxx
index f787df3692ce..12c4202af144 100644
--- a/vcl/inc/vcl/outdev.hxx
+++ b/vcl/inc/vcl/outdev.hxx
@@ -185,6 +185,9 @@ struct KerningPair
#define TEXT_DRAW_MULTILINE ((USHORT)0x1000)
#define TEXT_DRAW_WORDBREAK ((USHORT)0x2000)
#define TEXT_DRAW_NEWSELLIPSIS ((USHORT)0x4000)
+// in the long run we should make text style flags longer
+// but at the moment we can get away with this 2 bit field for ellipsis style
+#define TEXT_DRAW_CENTERELLIPSIS (TEXT_DRAW_ENDELLIPSIS | TEXT_DRAW_PATHELLIPSIS)
#define TEXT_DRAW_WORDBREAK_HYPHENATION (((USHORT)0x8000) | TEXT_DRAW_WORDBREAK)
@@ -1114,7 +1117,7 @@ public:
/** Added return value to see if EPS could be painted directly.
Theoreticaly, handing over a matrix would be needed to handle
- painting rotated EPS files (e.g. contained mín Metafiles). This
+ painting rotated EPS files (e.g. contained in Metafiles). This
would then need to be supported for Mac and PS printers, but
that's too much for now, wrote #i107046# for this */
bool DrawEPS( const Point& rPt, const Size& rSz,
diff --git a/vcl/inc/vcl/print.hxx b/vcl/inc/vcl/print.hxx
index c389034d918f..810fbd353f8c 100644
--- a/vcl/inc/vcl/print.hxx
+++ b/vcl/inc/vcl/print.hxx
@@ -400,7 +400,7 @@ protected:
PrinterController( const boost::shared_ptr<Printer>& );
public:
enum NupOrderType
- { LRTB, TBLR };
+ { LRTB, TBLR, TBRL, RLTB };
struct MultiPageSetup
{
// all metrics in 100th mm
diff --git a/vcl/inc/vcl/prndlg.hxx b/vcl/inc/vcl/prndlg.hxx
index fdaf06c9854e..d53354c40b4a 100644
--- a/vcl/inc/vcl/prndlg.hxx
+++ b/vcl/inc/vcl/prndlg.hxx
@@ -59,6 +59,8 @@ namespace vcl
VirtualDevice maPageVDev;
rtl::OUString maReplacementString;
rtl::OUString maToolTipString;
+ FixedLine maHorzDim;
+ FixedLine maVertDim;
bool useHCColorReplacement() const;
public:
diff --git a/vcl/inc/vcl/salinst.hxx b/vcl/inc/vcl/salinst.hxx
index 9b92bf95e3fe..71b820803473 100644
--- a/vcl/inc/vcl/salinst.hxx
+++ b/vcl/inc/vcl/salinst.hxx
@@ -60,6 +60,7 @@ struct SalItemParams;
class SalSession;
struct SystemGraphicsData;
struct SystemWindowData;
+class Menu;
namespace vos { class IMutex; }
@@ -133,6 +134,8 @@ public:
virtual vos::IMutex* GetYieldMutex() = 0;
virtual ULONG ReleaseYieldMutex() = 0;
virtual void AcquireYieldMutex( ULONG nCount ) = 0;
+ // return true, if yield mutex is owned by this thread, else false
+ virtual bool CheckYieldMutex() = 0;
// wait next event and dispatch
// must returned by UserEvent (SalFrame::PostEvent)
@@ -141,10 +144,10 @@ public:
virtual bool AnyInput( USHORT nType ) = 0;
// Menues
- virtual SalMenu* CreateMenu( BOOL bMenuBar ) = 0;
- virtual void DestroyMenu( SalMenu* pMenu) = 0;
- virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData ) = 0;
- virtual void DestroyMenuItem( SalMenuItem* pItem ) = 0;
+ virtual SalMenu* CreateMenu( BOOL bMenuBar, Menu* pMenu );
+ virtual void DestroyMenu( SalMenu* pMenu);
+ virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData );
+ virtual void DestroyMenuItem( SalMenuItem* pItem );
// may return NULL to disable session management
virtual SalSession* CreateSalSession() = 0;
diff --git a/vcl/inc/vcl/svdata.hxx b/vcl/inc/vcl/svdata.hxx
index 0d54a82a1937..a4ce806a7e8a 100644
--- a/vcl/inc/vcl/svdata.hxx
+++ b/vcl/inc/vcl/svdata.hxx
@@ -28,20 +28,19 @@
#ifndef _SV_SVDATA_HXX
#define _SV_SVDATA_HXX
-#ifndef _VOS_THREAD_HXX
-#include <vos/thread.hxx>
-#endif
-#include <tools/string.hxx>
-#include <tools/gen.hxx>
-#include <tools/shl.hxx>
-#include <tools/link.hxx>
-#include <vcl/vclevent.hxx>
-#include <vcl/sv.h>
-#include <tools/color.hxx>
-#include <tools/debug.hxx>
-#include <vcl/dllapi.h>
-#include <com/sun/star/uno/Reference.hxx>
-#include <unotools/options.hxx>
+#include "vos/thread.hxx"
+#include "tools/string.hxx"
+#include "tools/gen.hxx"
+#include "tools/shl.hxx"
+#include "tools/link.hxx"
+#include "tools/fldunit.hxx"
+#include "vcl/vclevent.hxx"
+#include "vcl/sv.h"
+#include "tools/color.hxx"
+#include "tools/debug.hxx"
+#include "vcl/dllapi.h"
+#include "com/sun/star/uno/Reference.hxx"
+#include "unotools/options.hxx"
namespace com {
namespace sun {
@@ -247,6 +246,8 @@ struct ImplSVWinData
// - ImplSVCtrlData -
// ------------------
+typedef std::vector< std::pair< String, FieldUnit > > FieldUnitStringList;
+
struct ImplSVCtrlData
{
ImageList* mpCheckImgList; // ImageList for CheckBoxes
@@ -270,6 +271,8 @@ struct ImplSVCtrlData
ULONG mnLastRadioFColor; // Letzte FaceColor fuer RadioImage
ULONG mnLastRadioWColor; // Letzte WindowColor fuer RadioImage
ULONG mnLastRadioLColor; // Letzte LightColor fuer RadioImage
+ FieldUnitStringList* mpFieldUnitStrings; // list with field units
+ FieldUnitStringList* mpCleanUnitStrings; // same list but with some "fluff" like spaces removed
};
@@ -318,8 +321,7 @@ struct ImplSVNWFData
// checkbox
bool mbScrollbarJumpPage; // true for "jump to here" behavior
int mnStatusBarLowerRightOffset; // amount in pixel to avoid in the lower righthand corner
- // used on the Mac where the system resizer paints over
- // our window content
+ bool mbCanDrawWidgetAnySize; // set to true currently on gtk
};
@@ -393,6 +395,10 @@ inline ImplSVData* ImplGetAppSVData() { return ImplGetSVData(); }
bool ImplInitAccessBridge( BOOL bAllowCancel, BOOL &rCancelled );
+FieldUnitStringList* ImplGetFieldUnits();
+FieldUnitStringList* ImplGetCleanedFieldUnits();
+
+
// -----------------------------------------------------------------------
// -----------------
diff --git a/vcl/inc/vcl/svids.hrc b/vcl/inc/vcl/svids.hrc
index 059ed1524b7c..e915644aa8ec 100644
--- a/vcl/inc/vcl/svids.hrc
+++ b/vcl/inc/vcl/svids.hrc
@@ -122,8 +122,10 @@
#define SV_PRINT_PRT_NUP_ORIENTATION_PORTRAIT 1
#define SV_PRINT_PRT_NUP_ORIENTATION_LANDSCAPE 2
-#define SV_PRINT_PRT_NUP_ORDER_LRTD 0
-#define SV_PRINT_PRT_NUP_ORDER_TDLR 1
+#define SV_PRINT_PRT_NUP_ORDER_LRTB 0
+#define SV_PRINT_PRT_NUP_ORDER_TBLR 1
+#define SV_PRINT_PRT_NUP_ORDER_TBRL 2
+#define SV_PRINT_PRT_NUP_ORDER_RLTB 3
#define SV_PRINT_TAB_JOB 2
#define SV_PRINT_PRINTERS_FL 1
@@ -212,7 +214,8 @@
#define SV_ACCESSERROR_JAVA_NOT_CONFIGURED 10507
#define SV_ACCESSERROR_JAVA_DISABLED 10508
#define SV_ACCESSERROR_TURNAROUND_MSG 10509
-#define SV_ACCESSERROR_LAST SV_ACCESSERROR_TURNAROUND_MSG
+#define SV_ACCESSERROR_NO_FONTS 10510
+#define SV_ACCESSERROR_LAST SV_ACCESSERROR_NO_FONTS
#define SV_SHORTCUT_HELP 10600
#define SV_SHORTCUT_CONTEXTHELP 10601
diff --git a/vcl/os2/inc/salinst.h b/vcl/os2/inc/salinst.h
index 0948f605c286..7826a62e1f9b 100644
--- a/vcl/os2/inc/salinst.h
+++ b/vcl/os2/inc/salinst.h
@@ -85,12 +85,9 @@ public:
virtual vos::IMutex* GetYieldMutex();
virtual ULONG ReleaseYieldMutex();
virtual void AcquireYieldMutex( ULONG nCount );
+ virtual bool CheckYieldMutex();
virtual void Yield( bool, bool );
virtual bool AnyInput( USHORT nType );
- virtual SalMenu* CreateMenu( BOOL bMenuBar );
- virtual void DestroyMenu( SalMenu* );
- virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData );
- virtual void DestroyMenuItem( SalMenuItem* );
virtual SalSession* CreateSalSession();
virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes );
virtual void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType);
diff --git a/vcl/os2/source/app/salinst.cxx b/vcl/os2/source/app/salinst.cxx
index b08a9769ccf4..df564f36ee0a 100644
--- a/vcl/os2/source/app/salinst.cxx
+++ b/vcl/os2/source/app/salinst.cxx
@@ -298,10 +298,9 @@ void ImplSalAcquireYieldMutex( ULONG nCount )
// -----------------------------------------------------------------------
-#ifdef DBG_UTIL
-
-void ImplDbgTestSolarMutex()
+bool Os2SalInstance::CheckYieldMutex()
{
+ bool bRet = true;
SalData* pSalData = GetSalData();
ULONG nCurThreadId = GetCurrentThreadId();
if ( pSalData->mnAppThreadId != nCurThreadId )
@@ -311,7 +310,7 @@ void ImplDbgTestSolarMutex()
SalYieldMutex* pYieldMutex = pSalData->mpFirstInstance->mpSalYieldMutex;
if ( pYieldMutex->mnThreadId != nCurThreadId )
{
- DBG_ERROR( "SolarMutex not locked, and not thread save code in VCL is called from outside of the main thread" );
+ bRet = false;
}
}
}
@@ -322,14 +321,13 @@ void ImplDbgTestSolarMutex()
SalYieldMutex* pYieldMutex = pSalData->mpFirstInstance->mpSalYieldMutex;
if ( pYieldMutex->mnThreadId != nCurThreadId )
{
- DBG_ERROR( "SolarMutex not locked in the main thread" );
+ bRet = false;
}
}
}
+ return bRet;
}
-#endif
-
// =======================================================================
void InitSalData()
diff --git a/vcl/os2/source/window/makefile.mk b/vcl/os2/source/window/makefile.mk
index f4a6ad0cb870..560d35880b21 100644
--- a/vcl/os2/source/window/makefile.mk
+++ b/vcl/os2/source/window/makefile.mk
@@ -40,7 +40,7 @@ CXXFILES__YD= salframe.cxx \
salobj.cxx
SLOFILES= $(SLO)$/salframe.obj \
- $(SLO)$/salobj.obj $(SLO)$/salmenu.obj
+ $(SLO)$/salobj.obj
# --- Targets ------------------------------------------------------
diff --git a/vcl/os2/source/window/salmenu.cxx b/vcl/os2/source/window/salmenu.cxx
deleted file mode 100644
index 339ab5dbfadb..000000000000
--- a/vcl/os2/source/window/salmenu.cxx
+++ /dev/null
@@ -1,132 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#define INCL_DOS
-#define INCL_PM
-#define INCL_WIN
-#include <svpm.h>
-#include <saldata.hxx>
-#include <salinst.h>
-#include <salmenu.h>
-
-
-// =======================================================================
-
-// Os2SalInst factory methods
-
-SalMenu* Os2SalInstance::CreateMenu( BOOL bMenuBar )
-{
- return NULL; // no support for native menues
-}
-
-void Os2SalInstance::DestroyMenu( SalMenu* pSalMenu )
-{
- delete pSalMenu;
-}
-
-
-SalMenuItem* Os2SalInstance::CreateMenuItem( const SalItemParams* pItemData )
-{
- return NULL; // no support for native menues
-}
-
-void Os2SalInstance::DestroyMenuItem( SalMenuItem* pSalMenuItem )
-{
- delete pSalMenuItem;
-}
-
-
-// =======================================================================
-
-
-/*
- * Os2SalMenu
- */
-
-
-Os2SalMenu::~Os2SalMenu()
-{
-}
-
-BOOL Os2SalMenu::VisibleMenuBar()
-{
- return FALSE;
-}
-
-void Os2SalMenu::SetFrame( const SalFrame *pFrame )
-{
-}
-
-void Os2SalMenu::InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos )
-{
-}
-
-void Os2SalMenu::RemoveItem( unsigned nPos )
-{
-}
-
-void Os2SalMenu::SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsigned nPos )
-{
-}
-
-void Os2SalMenu::CheckItem( unsigned nPos, BOOL bCheck )
-{
-}
-
-void Os2SalMenu::EnableItem( unsigned nPos, BOOL bEnable )
-{
-}
-
-void Os2SalMenu::SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const Image& rImage )
-{
-}
-
-void Os2SalMenu::SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const XubString& rText )
-{
-}
-
-void Os2SalMenu::SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const XubString& rKeyName )
-{
-}
-
-void Os2SalMenu::GetSystemMenuData( SystemMenuData* pData )
-{
-}
-
-// =======================================================================
-
-/*
- * SalMenuItem
- */
-
-
-Os2SalMenuItem::~Os2SalMenuItem()
-{
-}
-
-// -------------------------------------------------------------------
-
diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx
index dd9a5b4a15ee..b48db1d6ee97 100644
--- a/vcl/source/app/dbggui.cxx
+++ b/vcl/source/app/dbggui.cxx
@@ -37,32 +37,33 @@
#include <cmath>
#include <limits.h>
-#include <vcl/svdata.hxx>
-#include <svsys.h>
+#include "vcl/svdata.hxx"
+#include "svsys.h"
#ifdef WNT
#undef min
#endif
-#include <tools/debug.hxx>
-#include <vcl/svdata.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/event.hxx>
-#include <vcl/lstbox.hxx>
-#include <vcl/button.hxx>
-#include <vcl/edit.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/group.hxx>
-#include <vcl/field.hxx>
-#include <vcl/msgbox.hxx>
-#include <vcl/wrkwin.hxx>
-#include <vcl/sound.hxx>
-#include <vcl/threadex.hxx>
-#include <vcl/dbggui.hxx>
-#include <com/sun/star/i18n/XCharacterClassification.hpp>
-
-#include <vcl/unohelp.hxx>
-#include <vcl/unohelp2.hxx>
-#include <vos/mutex.hxx>
+#include "tools/debug.hxx"
+#include "vcl/svdata.hxx"
+#include "vcl/svapp.hxx"
+#include "vcl/event.hxx"
+#include "vcl/lstbox.hxx"
+#include "vcl/button.hxx"
+#include "vcl/edit.hxx"
+#include "vcl/fixed.hxx"
+#include "vcl/group.hxx"
+#include "vcl/field.hxx"
+#include "vcl/msgbox.hxx"
+#include "vcl/wrkwin.hxx"
+#include "vcl/sound.hxx"
+#include "vcl/threadex.hxx"
+#include "vcl/dbggui.hxx"
+#include "com/sun/star/i18n/XCharacterClassification.hpp"
+
+#include "vcl/unohelp.hxx"
+#include "vcl/unohelp2.hxx"
+#include "vos/mutex.hxx"
+#include "vcl/salinst.hxx"
#include <map>
#include <algorithm>
@@ -1963,9 +1964,11 @@ void DbgPrintWindow( const char* pLine )
// =======================================================================
-#ifdef WNT
-void ImplDbgTestSolarMutex();
-#endif
+void ImplDbgTestSolarMutex()
+{
+ bool bCheck = ImplGetSVData()->mpDefInst->CheckYieldMutex();
+ OSL_ENSURE( bCheck, "SolarMutex not locked" );
+}
// =======================================================================
@@ -1973,9 +1976,7 @@ void DbgGUIInit()
{
DbgSetPrintMsgBox( DbgPrintMsgBox );
DbgSetPrintWindow( DbgPrintWindow );
-#ifdef WNT
DbgSetTestSolarMutex( ImplDbgTestSolarMutex );
-#endif
}
// -----------------------------------------------------------------------
@@ -1984,9 +1985,7 @@ void DbgGUIDeInit()
{
DbgSetPrintMsgBox( NULL );
DbgSetPrintWindow( NULL );
-#ifdef WNT
DbgSetTestSolarMutex( NULL );
-#endif
DbgWindow* pDbgWindow = ImplGetSVData()->maWinData.mpDbgWin;
if ( pDbgWindow )
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 9a2404d36740..2a04389d8f44 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -74,6 +74,29 @@ void SalInstance::FillFontPathList( std::list< rtl::OString >& )
// do nothing
}
+SalMenu* SalInstance::CreateMenu( BOOL, Menu* )
+{
+ // default: no native menus
+ return NULL;
+}
+
+void SalInstance::DestroyMenu( SalMenu* pMenu )
+{
+ (void)pMenu;
+ OSL_ENSURE( pMenu == 0, "DestroyMenu called with non-native menus" );
+}
+
+SalMenuItem* SalInstance::CreateMenuItem( const SalItemParams* )
+{
+ return NULL;
+}
+
+void SalInstance::DestroyMenuItem( SalMenuItem* pItem )
+{
+ (void)pItem;
+ OSL_ENSURE( pItem == 0, "DestroyMenu called with non-native menus" );
+}
+
SalTimer::~SalTimer()
{
}
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index f8b0d1d3379f..03b0365cff63 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -27,47 +27,49 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
+
#include <string.h>
-#ifndef _SV_SVSYS_HXX
-#include <svsys.h>
-#endif
-#include <vcl/salinst.hxx>
-#include <vcl/salframe.hxx>
-
-#ifndef _VOS_MUTEX_HXX
-#include <vos/mutex.hxx>
-#endif
-
-#include <osl/process.h>
-#include <osl/file.hxx>
-#include <uno/current_context.hxx>
-#include <cppuhelper/implbase1.hxx>
-#include <tools/debug.hxx>
-#include <unotools/fontcfg.hxx>
-#include <vcl/configsettings.hxx>
-#include <vcl/svdata.hxx>
-#include <vcl/window.h>
-#include <vcl/svapp.hxx>
-#include <vcl/wrkwin.hxx>
-#include <vcl/msgbox.hxx>
-#include <vcl/unohelp.hxx>
-#include <vcl/button.hxx> // for Button::GetStandardText
-#include <vcl/dockwin.hxx> // for DockingManager
-#include <vcl/salimestatus.hxx>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/awt/XExtendedToolkit.hpp>
-#include <com/sun/star/java/JavaNotConfiguredException.hpp>
-#include <com/sun/star/java/JavaVMCreationFailureException.hpp>
-#include <com/sun/star/java/MissingJavaRuntimeException.hpp>
-#include <com/sun/star/java/JavaDisabledException.hpp>
-
-#include <com/sun/star/lang/XComponent.hpp>
+#include "rtl/instance.hxx"
+#include "osl/process.h"
+#include "osl/file.hxx"
+
+#include "svsys.h"
+
+#include "tools/debug.hxx"
+#include "tools/resary.hxx"
+
+#include "vcl/salinst.hxx"
+#include "vcl/salframe.hxx"
+#include "vcl/configsettings.hxx"
+#include "vcl/svdata.hxx"
+#include "vcl/window.h"
+#include "vcl/svapp.hxx"
+#include "vcl/wrkwin.hxx"
+#include "vcl/msgbox.hxx"
+#include "vcl/unohelp.hxx"
+#include "vcl/button.hxx" // for Button::GetStandardText
+#include "vcl/dockwin.hxx" // for DockingManager
+#include "vcl/salimestatus.hxx"
+#include "vcl/salsys.hxx"
+#include "vcl/svids.hrc"
+
+#include "unotools/fontcfg.hxx"
+
+#include "vos/mutex.hxx"
+
+#include "cppuhelper/implbase1.hxx"
+#include "uno/current_context.hxx"
+
+#include "com/sun/star/lang/XMultiServiceFactory.hpp"
+#include "com/sun/star/lang/XComponent.hpp"
+#include "com/sun/star/awt/XExtendedToolkit.hpp"
+#include "com/sun/star/java/JavaNotConfiguredException.hpp"
+#include "com/sun/star/java/JavaVMCreationFailureException.hpp"
+#include "com/sun/star/java/MissingJavaRuntimeException.hpp"
+#include "com/sun/star/java/JavaDisabledException.hpp"
#include <stdio.h>
-#include <vcl/salsys.hxx>
-#include <vcl/svids.hrc>
-#include <rtl/instance.hxx>
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
@@ -112,7 +114,6 @@ void ImplInitSVData()
// init global instance data
memset( pImplSVData, 0, sizeof( ImplSVData ) );
pImplSVData->maHelpData.mbAutoHelpId = sal_True;
- pImplSVData->maHelpData.mbAutoHelpId = sal_True;
pImplSVData->maNWFData.maMenuBarHighlightTextColor = Color( COL_TRANSPARENT );
// find out whether we are running in the testtool
@@ -163,6 +164,11 @@ void ImplDeInitSVData()
delete pSVData->maAppData.mpMSFTempFileName;
pSVData->maAppData.mpMSFTempFileName = NULL;
}
+
+ if( pSVData->maCtrlData.mpFieldUnitStrings )
+ delete pSVData->maCtrlData.mpFieldUnitStrings, pSVData->maCtrlData.mpFieldUnitStrings = NULL;
+ if( pSVData->maCtrlData.mpCleanUnitStrings )
+ delete pSVData->maCtrlData.mpCleanUnitStrings, pSVData->maCtrlData.mpCleanUnitStrings = NULL;
}
// -----------------------------------------------------------------------
@@ -240,6 +246,52 @@ ResId VclResId( sal_Int32 nId )
return ResId( nId, *pMgr );
}
+FieldUnitStringList* ImplGetFieldUnits()
+{
+ ImplSVData* pSVData = ImplGetSVData();
+ if( ! pSVData->maCtrlData.mpFieldUnitStrings )
+ {
+ ResMgr* pResMgr = ImplGetResMgr();
+ if( pResMgr )
+ {
+ ResStringArray aUnits( ResId (SV_FUNIT_STRINGS, *pResMgr) );
+ sal_uInt32 nUnits = aUnits.Count();
+ pSVData->maCtrlData.mpFieldUnitStrings = new FieldUnitStringList();
+ pSVData->maCtrlData.mpFieldUnitStrings->reserve( nUnits );
+ for( sal_uInt32 i = 0; i < nUnits; i++ )
+ {
+ std::pair< String, FieldUnit > aElement( aUnits.GetString(i), static_cast<FieldUnit>(aUnits.GetValue(i)) );
+ pSVData->maCtrlData.mpFieldUnitStrings->push_back( aElement );
+ }
+ }
+ }
+ return pSVData->maCtrlData.mpFieldUnitStrings;
+}
+
+FieldUnitStringList* ImplGetCleanedFieldUnits()
+{
+ ImplSVData* pSVData = ImplGetSVData();
+ if( ! pSVData->maCtrlData.mpCleanUnitStrings )
+ {
+ FieldUnitStringList* pUnits = ImplGetFieldUnits();
+ if( pUnits )
+ {
+ size_t nUnits = pUnits->size();
+ pSVData->maCtrlData.mpCleanUnitStrings = new FieldUnitStringList();
+ pSVData->maCtrlData.mpCleanUnitStrings->reserve( nUnits );
+ for( size_t i = 0; i < nUnits; i++ )
+ {
+ String aUnit( (*pUnits)[i].first );
+ aUnit.EraseAllChars( sal_Unicode( ' ' ) );
+ aUnit.ToLowerAscii();
+ std::pair< String, FieldUnit > aElement( aUnit, (*pUnits)[i].second );
+ pSVData->maCtrlData.mpCleanUnitStrings->push_back( aElement );
+ }
+ }
+ }
+ return pSVData->maCtrlData.mpCleanUnitStrings;
+}
+
DockingManager* ImplGetDockingManager()
{
ImplSVData* pSVData = ImplGetSVData();
diff --git a/vcl/source/components/factory.cxx b/vcl/source/components/factory.cxx
index c4debea79001..7cfdecbfdb00 100644
--- a/vcl/source/components/factory.cxx
+++ b/vcl/source/components/factory.cxx
@@ -62,6 +62,10 @@ extern Sequence< OUString > SAL_CALL FontIdentificator_getSupportedServiceNames(
extern OUString SAL_CALL FontIdentificator_getImplementationName();
extern Reference< XInterface > SAL_CALL FontIdentificator_createInstance( const Reference< XMultiServiceFactory > & );
+extern Sequence< OUString > SAL_CALL StringMirror_getSupportedServiceNames();
+extern OUString SAL_CALL StringMirror_getImplementationName();
+extern Reference< XInterface > SAL_CALL StringMirror_createInstance( const Reference< XMultiServiceFactory > & );
+
extern Sequence< OUString > SAL_CALL Clipboard_getSupportedServiceNames();
extern OUString SAL_CALL Clipboard_getImplementationName();
extern Reference< XSingleServiceFactory > SAL_CALL Clipboard_createFactory( const Reference< XMultiServiceFactory > & );
@@ -116,6 +120,12 @@ extern "C" {
xMgr, vcl::FontIdentificator_getImplementationName(), vcl::FontIdentificator_createInstance,
vcl::FontIdentificator_getSupportedServiceNames() );
}
+ else if( vcl::StringMirror_getImplementationName().equalsAscii( pImplementationName ) )
+ {
+ xFactory = ::cppu::createSingleFactory(
+ xMgr, vcl::StringMirror_getImplementationName(), vcl::StringMirror_createInstance,
+ vcl::StringMirror_getSupportedServiceNames() );
+ }
else if( vcl::Clipboard_getImplementationName().equalsAscii( pImplementationName ) )
{
xFactory = vcl::Clipboard_createFactory( xMgr );
diff --git a/vcl/source/components/makefile.mk b/vcl/source/components/makefile.mk
index e30975dbc099..982687104c01 100644
--- a/vcl/source/components/makefile.mk
+++ b/vcl/source/components/makefile.mk
@@ -39,9 +39,10 @@ ENABLE_EXCEPTIONS=TRUE
# --- Files --------------------------------------------------------
-SLOFILES= $(SLO)$/display.obj \
- $(SLO)$/dtranscomp.obj \
- $(SLO)$/fontident.obj \
+SLOFILES= $(SLO)$/display.obj \
+ $(SLO)$/dtranscomp.obj \
+ $(SLO)$/fontident.obj \
+ $(SLO)$/stringmirror.obj \
$(SLO)$/factory.obj
# --- Targets ------------------------------------------------------
diff --git a/vcl/source/components/stringmirror.cxx b/vcl/source/components/stringmirror.cxx
new file mode 100644
index 000000000000..78806914a7c4
--- /dev/null
+++ b/vcl/source/components/stringmirror.cxx
@@ -0,0 +1,123 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_vcl.hxx"
+
+#include "com/sun/star/lang/XServiceInfo.hpp"
+#include "com/sun/star/util/XStringMapping.hpp"
+
+#include "cppuhelper/implbase2.hxx"
+#include "rtl/ustrbuf.hxx"
+#include "vcl/svapp.hxx"
+
+using ::rtl::OUString;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::util;
+
+// -----------------------------------------------------------------------
+
+namespace vcl
+{
+
+class StringMirror : public ::cppu::WeakAggImplHelper2< XStringMapping, XServiceInfo >
+{
+public:
+ StringMirror()
+ {}
+
+ virtual ~StringMirror()
+ {}
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName( ) throw (RuntimeException);
+ virtual ::sal_Bool SAL_CALL supportsService( const OUString& ) throw (RuntimeException);
+ virtual Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw (RuntimeException);
+
+ // XStringMapping
+ virtual sal_Bool SAL_CALL mapStrings( Sequence< OUString >& io_rStrings ) throw (RuntimeException)
+ {
+ sal_Int32 nItems = io_rStrings.getLength();
+ for( sal_Int32 n = 0; n < nItems; n++ )
+ {
+ rtl::OUString& rStr( io_rStrings.getArray()[n] );
+
+ sal_Int32 nLen = rStr.getLength();
+ rtl::OUStringBuffer aMirror( nLen );
+ for(sal_Int32 i = nLen - 1; i >= 0; i--)
+ {
+ sal_Unicode cChar = rStr[ i ];
+ aMirror.append(sal_Unicode(GetMirroredChar(cChar)));
+ }
+ rStr = aMirror.makeStringAndClear();
+ }
+ return sal_True;
+ }
+};
+
+Sequence< OUString > StringMirror_getSupportedServiceNames()
+{
+ static OUString aServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.StringMirror" ) );
+ static Sequence< OUString > aServiceNames( &aServiceName, 1 );
+ return aServiceNames;
+}
+
+OUString StringMirror_getImplementationName()
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM( "vcl::StringMirror" ) );
+}
+
+Reference< XInterface > SAL_CALL StringMirror_createInstance( const Reference< XMultiServiceFactory >& )
+{
+ return static_cast< ::cppu::OWeakObject * >( new StringMirror );
+}
+
+
+// XServiceInfo
+OUString SAL_CALL StringMirror::getImplementationName() throw (RuntimeException)
+{
+ return StringMirror_getImplementationName();
+}
+
+sal_Bool SAL_CALL StringMirror::supportsService( const OUString& i_rServiceName ) throw (RuntimeException)
+{
+ Sequence< OUString > aSN( StringMirror_getSupportedServiceNames() );
+ for( sal_Int32 nService = 0; nService < aSN.getLength(); nService++ )
+ {
+ if( aSN[nService] == i_rServiceName )
+ return sal_True;
+ }
+ return sal_False;
+}
+
+Sequence< OUString > SAL_CALL StringMirror::getSupportedServiceNames() throw (RuntimeException)
+{
+ return StringMirror_getSupportedServiceNames();
+}
+
+} // namespace vcl
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index a692cbea0260..5091a4722845 100755
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -1801,6 +1801,9 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
}
break;
+ /* #i101255# disable autocomplete tab forward/backward
+ users expect tab/shif-tab to move the focus to other controls
+ not suddenly to cycle the autocompletion
case KEY_TAB:
{
if ( !mbReadOnly && maAutocompleteHdl.IsSet() &&
@@ -1822,6 +1825,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
}
}
break;
+ */
default:
{
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index 6c2b06783984..4c4e3c870429 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -52,8 +52,6 @@
using namespace ::com::sun::star;
-static ResStringArray *strAllUnits = NULL;
-
// -----------------------------------------------------------------------
#define FORMAT_NUMERIC 1
@@ -1131,34 +1129,37 @@ static XubString ImplMetricGetUnitText( const XubString& rStr )
// #104355# support localized mesaurements
-static String ImplMetricToString( FieldUnit rUnit )
+static const String& ImplMetricToString( FieldUnit rUnit )
{
- if( !strAllUnits )
+ FieldUnitStringList* pList = ImplGetFieldUnits();
+ if( pList )
{
- ResMgr* pResMgr = ImplGetResMgr();
- strAllUnits = new ResStringArray( ResId (SV_FUNIT_STRINGS, *pResMgr) );
+ // return unit's default string (ie, the first one )
+ for( FieldUnitStringList::const_iterator it = pList->begin(); it != pList->end(); ++it )
+ {
+ if ( it->second == rUnit )
+ return it->first;
+ }
}
- // return unit's default string (ie, the first one )
- for( USHORT i=0; i < strAllUnits->Count(); i++ )
- if( (FieldUnit) strAllUnits->GetValue( i ) == rUnit )
- return strAllUnits->GetString( i );
- return String();
+ return String::EmptyString();
}
static FieldUnit ImplStringToMetric( const String &rMetricString )
{
- if( !strAllUnits )
+ FieldUnitStringList* pList = ImplGetCleanedFieldUnits();
+ if( pList )
{
- ResMgr* pResMgr = ImplGetResMgr();
- strAllUnits = new ResStringArray( ResId (SV_FUNIT_STRINGS, *pResMgr) );
+ // return FieldUnit
+ String aStr( rMetricString );
+ aStr.ToLowerAscii();
+ aStr.EraseAllChars( sal_Unicode( ' ' ) );
+ for( FieldUnitStringList::const_iterator it = pList->begin(); it != pList->end(); ++it )
+ {
+ if ( it->first.Equals( aStr ) )
+ return it->second;
+ }
}
- // return FieldUnit
- String aStr( rMetricString );
- aStr.ToLowerAscii();
- for( USHORT i=0; i < strAllUnits->Count(); i++ )
- if ( strAllUnits->GetString( i ).Equals( aStr ) )
- return (FieldUnit) strAllUnits->GetValue( i );
return FUNIT_NONE;
}
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index 37406293d7cf..f73cf008a5e5 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -27,13 +27,13 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <vcl/decoview.hxx>
-#include <vcl/event.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/controldata.hxx>
-#include <vcl/window.h>
+#include "vcl/decoview.hxx"
+#include "vcl/event.hxx"
+#include "vcl/fixed.hxx"
+#include "vcl/controldata.hxx"
+#include "vcl/window.h"
-#include <tools/rc.h>
+#include "tools/rc.h"
// =======================================================================
@@ -501,7 +501,7 @@ void FixedLine::ImplDraw( bool bLayout )
String* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
DecorationView aDecoView( this );
- if ( !aText.Len() || (nWinStyle & WB_VERT) )
+ if ( !aText.Len() )
{
if( !pVector )
{
@@ -520,11 +520,34 @@ void FixedLine::ImplDraw( bool bLayout )
}
}
}
+ else if( (nWinStyle & WB_VERT) )
+ {
+ long nWidth = GetTextWidth( aText );
+ Push( PUSH_FONT );
+ Font aFont( GetFont() );
+ aFont.SetOrientation( 900 );
+ SetFont( aFont );
+ Point aStartPt( aOutSize.Width()/2, aOutSize.Height()-1 );
+ if( (nWinStyle & WB_VCENTER) )
+ aStartPt.Y() -= (aOutSize.Height() - nWidth)/2;
+ Point aTextPt( aStartPt );
+ aTextPt.X() -= GetTextHeight()/2;
+ DrawText( aTextPt, aText, 0, STRING_LEN, pVector, pDisplayText );
+ Pop();
+ if( aOutSize.Height() - aStartPt.Y() > FIXEDLINE_TEXT_BORDER )
+ aDecoView.DrawSeparator( Point( aStartPt.X(), aOutSize.Height()-1 ),
+ Point( aStartPt.X(), aStartPt.Y() + FIXEDLINE_TEXT_BORDER ) );
+ if( aStartPt.Y() - nWidth - FIXEDLINE_TEXT_BORDER > 0 )
+ aDecoView.DrawSeparator( Point( aStartPt.X(), aStartPt.Y() - nWidth - FIXEDLINE_TEXT_BORDER ),
+ Point( aStartPt.X(), 0 ) );
+ }
else
{
USHORT nStyle = TEXT_DRAW_MNEMONIC | TEXT_DRAW_LEFT | TEXT_DRAW_VCENTER | TEXT_DRAW_ENDELLIPSIS;
Rectangle aRect( 0, 0, aOutSize.Width(), aOutSize.Height() );
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
+ if( (nWinStyle & WB_CENTER) )
+ nStyle |= TEXT_DRAW_CENTER;
if ( !IsEnabled() )
nStyle |= TEXT_DRAW_DISABLE;
@@ -539,6 +562,8 @@ void FixedLine::ImplDraw( bool bLayout )
{
long nTop = aRect.Top() + ((aRect.GetHeight()-1)/2);
aDecoView.DrawSeparator( Point( aRect.Right()+FIXEDLINE_TEXT_BORDER, nTop ), Point( aOutSize.Width()-1, nTop ), false );
+ if( aRect.Left() > FIXEDLINE_TEXT_BORDER )
+ aDecoView.DrawSeparator( Point( 0, nTop ), Point( aRect.Left()-FIXEDLINE_TEXT_BORDER, nTop ), false );
}
}
}
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index 754270e9012f..c51ac834f1b4 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -114,8 +114,9 @@ BOOL ImplDrawNativeSpinfield( Window *pWin, const SpinbuttonValue& rSpinbuttonVa
Size aSize( pBorder->GetOutputSizePixel() ); // the size of the border window, i.e., the whole control
Rectangle aBound, aContent;
Rectangle aNatRgn( aPt, aSize );
- if( pBorder->GetNativeControlRegion(CTRL_SPINBOX, PART_ENTIRE_CONTROL,
- aNatRgn, 0, rSpinbuttonValue, rtl::OUString(), aBound, aContent) )
+ if( ! ImplGetSVData()->maNWFData.mbCanDrawWidgetAnySize &&
+ pBorder->GetNativeControlRegion( CTRL_SPINBOX, PART_ENTIRE_CONTROL,
+ aNatRgn, 0, rSpinbuttonValue, rtl::OUString(), aBound, aContent) )
{
aSize = aContent.GetSize();
}
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index 8eb4dec3c92a..f4ea98484c33 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -27,62 +27,57 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <cstring>
-#include <i18npool/mslangid.hxx>
-#ifndef _SV_SVSYS_HXX
-#include <svsys.h>
-#endif
-#include <vcl/salgdi.hxx>
-#include <vcl/sallayout.hxx>
-#include <rtl/tencinfo.h>
-#include <tools/debug.hxx>
-#include <vcl/svdata.hxx>
-#include <vcl/metric.hxx>
-#include <vcl/impfont.hxx>
-#include <vcl/metaact.hxx>
-#include <vcl/gdimtf.hxx>
-#include <vcl/outdata.hxx>
-#include <vcl/outfont.hxx>
-#include <basegfx/polygon/b2dpolygon.hxx>
-#include <basegfx/polygon/b2dpolypolygon.hxx>
-#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <tools/poly.hxx>
-#include <vcl/outdev.h>
-#include <vcl/virdev.hxx>
-#include <vcl/print.hxx>
-#include <vcl/event.hxx>
-#include <vcl/window.h>
-#include <vcl/window.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/bmpacc.hxx>
-#include <unotools/fontcvt.hxx>
-#include <vcl/outdev.hxx>
-#include <vcl/edit.hxx>
-#include <unotools/fontcfg.hxx>
-#include <vcl/sysdata.hxx>
-#include <vcl/textlayout.hxx>
-#ifndef _OSL_FILE_H
-#include <osl/file.h>
-#endif
+#include "i18npool/mslangid.hxx"
+
+#include "svsys.h"
+#include "vcl/salgdi.hxx"
+#include "vcl/sallayout.hxx"
+#include "rtl/tencinfo.h"
+#include "tools/debug.hxx"
+#include "vcl/svdata.hxx"
+#include "vcl/metric.hxx"
+#include "vcl/impfont.hxx"
+#include "vcl/metaact.hxx"
+#include "vcl/gdimtf.hxx"
+#include "vcl/outdata.hxx"
+#include "vcl/outfont.hxx"
+#include "basegfx/polygon/b2dpolygon.hxx"
+#include "basegfx/polygon/b2dpolypolygon.hxx"
+#include "basegfx/matrix/b2dhommatrix.hxx"
+#include "tools/poly.hxx"
+#include "vcl/outdev.h"
+#include "vcl/virdev.hxx"
+#include "vcl/print.hxx"
+#include "vcl/event.hxx"
+#include "vcl/window.h"
+#include "vcl/window.hxx"
+#include "vcl/svapp.hxx"
+#include "vcl/bmpacc.hxx"
+#include "unotools/fontcvt.hxx"
+#include "vcl/outdev.hxx"
+#include "vcl/edit.hxx"
+#include "unotools/fontcfg.hxx"
+#include "vcl/sysdata.hxx"
+#include "vcl/textlayout.hxx"
+#include "vcl/svids.hrc"
+#include "osl/file.h"
#ifdef ENABLE_GRAPHITE
-#include <vcl/graphite_features.hxx>
+#include "vcl/graphite_features.hxx"
#endif
#ifdef USE_BUILTIN_RASTERIZER
-#include <vcl/glyphcache.hxx>
+#include "vcl/glyphcache.hxx"
#endif
-#include <vcl/unohelp.hxx>
-#include <pdfwriter_impl.hxx>
-#include <vcl/controllayout.hxx>
-#include <rtl/logfile.hxx>
+#include "vcl/unohelp.hxx"
+#include "pdfwriter_impl.hxx"
+#include "vcl/controllayout.hxx"
+#include "rtl/logfile.hxx"
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUES_HDL_
-#include <com/sun/star/beans/PropertyValues.hdl>
-#endif
-#include <com/sun/star/i18n/XBreakIterator.hpp>
-#include <com/sun/star/i18n/WordType.hpp>
-#include <com/sun/star/linguistic2/XLinguServiceManager.hpp>
+#include "com/sun/star/beans/PropertyValues.hpp"
+#include "com/sun/star/i18n/XBreakIterator.hpp"
+#include "com/sun/star/i18n/WordType.hpp"
+#include "com/sun/star/linguistic2/XLinguServiceManager.hpp"
#if defined UNX
#define GLYPH_FONT_HEIGHT 128
@@ -92,7 +87,7 @@
#define GLYPH_FONT_HEIGHT 256
#endif
-#include <sal/alloca.h>
+#include "sal/alloca.h"
#include <cmath>
#include <cstring>
@@ -2927,6 +2922,18 @@ void OutputDevice::ImplInitFontList() const
mpGraphics->GetDevFontList( mpFontList );
}
}
+ if( meOutDevType == OUTDEV_WINDOW && ! mpFontList->Count() )
+ {
+ String aError( RTL_CONSTASCII_USTRINGPARAM( "Application error: no fonts and no vcl resource found on your system" ) );
+ ResMgr* pMgr = ImplGetResMgr();
+ if( pMgr )
+ {
+ String aResStr( ResId( SV_ACCESSERROR_NO_FONTS, *pMgr ) );
+ if( aResStr.Len() )
+ aError = aResStr;
+ }
+ Application::Abort( aError );
+ }
}
// =======================================================================
@@ -6834,7 +6841,20 @@ String OutputDevice::ImplGetEllipsisString( const OutputDevice& rTargetDevice, c
if ( nIndex != STRING_LEN )
{
- if ( nStyle & TEXT_DRAW_ENDELLIPSIS )
+ if( (nStyle & TEXT_DRAW_CENTERELLIPSIS) == TEXT_DRAW_CENTERELLIPSIS )
+ {
+ String aTmpStr( aStr );
+ xub_StrLen nEraseChars = 4;
+ while( nEraseChars < aStr.Len() && _rLayout.GetTextWidth( aTmpStr, 0, aTmpStr.Len() ) > nMaxWidth )
+ {
+ aTmpStr = aStr;
+ xub_StrLen i = (aTmpStr.Len() - nEraseChars)/2;
+ aTmpStr.Erase( i, nEraseChars++ );
+ aTmpStr.InsertAscii( "...", i );
+ }
+ aStr = aTmpStr;
+ }
+ else if ( nStyle & TEXT_DRAW_ENDELLIPSIS )
{
aStr.Erase( nIndex );
if ( nIndex > 1 )
diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx
index d560b0b6e7cc..25ba80003fd7 100644
--- a/vcl/source/gdi/print2.cxx
+++ b/vcl/source/gdi/print2.cxx
@@ -404,9 +404,20 @@ static Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevic
break;
case META_LINE_ACTION:
- aActionBounds = Rectangle( static_cast<const MetaLineAction&>(rAct).GetStartPoint(),
- static_cast<const MetaLineAction&>(rAct).GetEndPoint() );
+ {
+ const MetaLineAction& rMetaLineAction = static_cast<const MetaLineAction&>(rAct);
+ aActionBounds = Rectangle( rMetaLineAction.GetStartPoint(), rMetaLineAction.GetEndPoint() );
+ const long nLineWidth(rMetaLineAction.GetLineInfo().GetWidth());
+ if(nLineWidth)
+ {
+ const long nHalfLineWidth((nLineWidth + 1) / 2);
+ aActionBounds.Left() -= nHalfLineWidth;
+ aActionBounds.Top() -= nHalfLineWidth;
+ aActionBounds.Right() += nHalfLineWidth;
+ aActionBounds.Bottom() += nHalfLineWidth;
+ }
break;
+ }
case META_RECT_ACTION:
aActionBounds = static_cast<const MetaRectAction&>(rAct).GetRect();
@@ -446,8 +457,20 @@ static Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevic
break;
case META_POLYLINE_ACTION:
- aActionBounds = static_cast<const MetaPolyLineAction&>(rAct).GetPolygon().GetBoundRect();
+ {
+ const MetaPolyLineAction& rMetaPolyLineAction = static_cast<const MetaPolyLineAction&>(rAct);
+ aActionBounds = rMetaPolyLineAction.GetPolygon().GetBoundRect();
+ const long nLineWidth(rMetaPolyLineAction.GetLineInfo().GetWidth());
+ if(nLineWidth)
+ {
+ const long nHalfLineWidth((nLineWidth + 1) / 2);
+ aActionBounds.Left() -= nHalfLineWidth;
+ aActionBounds.Top() -= nHalfLineWidth;
+ aActionBounds.Right() += nHalfLineWidth;
+ aActionBounds.Bottom() += nHalfLineWidth;
+ }
break;
+ }
case META_POLYGON_ACTION:
aActionBounds = static_cast<const MetaPolygonAction&>(rAct).GetPolygon().GetBoundRect();
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 9d8f3bf2f9a0..98eac5e982d3 100755
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -1031,6 +1031,14 @@ PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilte
nCellX = (nSubPage / rMPS.nRows);
nCellY = (nSubPage % rMPS.nRows);
break;
+ case PrinterController::RLTB:
+ nCellX = rMPS.nColumns - 1 - (nSubPage % rMPS.nColumns);
+ nCellY = (nSubPage / rMPS.nColumns);
+ break;
+ case PrinterController::TBRL:
+ nCellX = rMPS.nColumns - 1 - (nSubPage / rMPS.nRows);
+ nCellY = (nSubPage % rMPS.nRows);
+ break;
}
// scale the metafile down to a sub page size
double fScaleX = double(aSubPageSize.Width())/double(aPageSize.aSize.Width());
diff --git a/vcl/source/src/print.src b/vcl/source/src/print.src
index 13ae6b0ead76..436ab40bdc5f 100644
--- a/vcl/source/src/print.src
+++ b/vcl/source/src/print.src
@@ -297,14 +297,16 @@ ModalDialog SV_DLG_PRINT
{
HelpID = "vcl:ListBox:SV_PRINT_TAB_NUP:SV_PRINT_PRT_NUP_ORDER_BOX";
Pos = MAP_APPFONT( 0, 0 );
- Size = MAP_APPFONT( 10, 20 );
+ Size = MAP_APPFONT( 10, 50 );
DropDown = TRUE;
Border = TRUE;
CurPos = 0;
StringList [en-US] =
{
- < "left to right, then down"; SV_PRINT_PRT_NUP_ORDER_LRTD; >;
- < "top to bottom, then right"; SV_PRINT_PRT_NUP_ORDER_TDLR; >;
+ < "left to right, then down"; SV_PRINT_PRT_NUP_ORDER_LRTB; >;
+ < "top to bottom, then right"; SV_PRINT_PRT_NUP_ORDER_TBLR; >;
+ < "top to bottom, then left"; SV_PRINT_PRT_NUP_ORDER_TBRL; >;
+ < "right to left, then down"; SV_PRINT_PRT_NUP_ORDER_RLTB; >;
};
HelpText [en-US] = "Select order in which pages are to be printed.";
};
diff --git a/vcl/source/src/stdtext.src b/vcl/source/src/stdtext.src
index 2c6574220a5f..1b95f7bb1d72 100644
--- a/vcl/source/src/stdtext.src
+++ b/vcl/source/src/stdtext.src
@@ -101,6 +101,11 @@ String SV_ACCESSERROR_TURNAROUND_MSG
Text [ en-US ] = "The Java Access Bridge could not be started.";
};
+String SV_ACCESSERROR_NO_FONTS
+{
+ Text [ en-US ] = "No fonts could be found on the system.";
+};
+
String SV_STDTEXT_ABOUT
{
Text [ en-US ] = "About %PRODUCTNAME";
diff --git a/vcl/source/window/arrange.cxx b/vcl/source/window/arrange.cxx
index dad48235f8fb..9749299d4d6b 100644
--- a/vcl/source/window/arrange.cxx
+++ b/vcl/source/window/arrange.cxx
@@ -728,7 +728,10 @@ MatrixArranger::~MatrixArranger()
{
}
-Size MatrixArranger::getOptimalSize( WindowSizeType i_eType, std::vector<long>& o_rColumnWidths, std::vector<long>& o_rRowHeights ) const
+Size MatrixArranger::getOptimalSize( WindowSizeType i_eType,
+ std::vector<long>& o_rColumnWidths, std::vector<long>& o_rRowHeights,
+ std::vector<sal_Int32>& o_rColumnPrio, std::vector<sal_Int32>& o_rRowPrio
+ ) const
{
Size aMatrixSize( 2*m_nOuterBorder, 2*m_nOuterBorder );
@@ -746,6 +749,8 @@ Size MatrixArranger::getOptimalSize( WindowSizeType i_eType, std::vector<long>&
// now allocate row and column depth vectors
o_rColumnWidths = std::vector< long >( nColumns, 0 );
o_rRowHeights = std::vector< long >( nRows, 0 );
+ o_rColumnPrio = std::vector< sal_Int32 >( nColumns, 0 );
+ o_rRowPrio = std::vector< sal_Int32 >( nRows, 0 );
// get sizes an allocate them into rows/columns
for( std::vector< MatrixElement >::const_iterator it = m_aElements.begin();
@@ -756,6 +761,10 @@ Size MatrixArranger::getOptimalSize( WindowSizeType i_eType, std::vector<long>&
o_rColumnWidths[ it->m_nX ] = aSize.Width();
if( aSize.Height() > o_rRowHeights[ it->m_nY ] )
o_rRowHeights[ it->m_nY ] = aSize.Height();
+ if( it->m_nExpandPriority > o_rColumnPrio[ it->m_nX ] )
+ o_rColumnPrio[ it->m_nX ] = it->m_nExpandPriority;
+ if( it->m_nExpandPriority > o_rRowPrio[ it->m_nY ] )
+ o_rRowPrio[ it->m_nY ] = it->m_nExpandPriority;
}
// add up sizes
@@ -775,9 +784,48 @@ Size MatrixArranger::getOptimalSize( WindowSizeType i_eType, std::vector<long>&
Size MatrixArranger::getOptimalSize( WindowSizeType i_eType ) const
{
std::vector<long> aColumnWidths, aRowHeights;
- return getOptimalSize( i_eType, aColumnWidths, aRowHeights );
+ std::vector<sal_Int32> aColumnPrio, aRowPrio;
+ return getOptimalSize( i_eType, aColumnWidths, aRowHeights, aColumnPrio, aRowPrio );
}
+void MatrixArranger::distributeExtraSize( std::vector<long>& io_rSizes, const std::vector<sal_Int32>& i_rPrios, long i_nExtraWidth )
+{
+ if( ! io_rSizes.empty() && io_rSizes.size() == i_rPrios.size() ) // sanity check
+ {
+ // find all elements with the highest expand priority
+ size_t nElements = io_rSizes.size();
+ std::vector< size_t > aIndices;
+ sal_Int32 nHighPrio = 0;
+ for( size_t i = 0; i < nElements; i++ )
+ {
+ sal_Int32 nCurPrio = i_rPrios[ i ];
+ if( nCurPrio > nHighPrio )
+ {
+ aIndices.clear();
+ nHighPrio = nCurPrio;
+ }
+ if( nCurPrio == nHighPrio )
+ aIndices.push_back( i );
+ }
+
+ // distribute extra space evenly among collected elements
+ nElements = aIndices.size();
+ if( nElements > 0 )
+ {
+ long nDelta = i_nExtraWidth / nElements;
+ for( size_t i = 0; i < nElements; i++ )
+ {
+ io_rSizes[ aIndices[i] ] += nDelta;
+ i_nExtraWidth -= nDelta;
+ }
+ // add the last pixels to the last row element
+ if( i_nExtraWidth > 0 && nElements > 0 )
+ io_rSizes[aIndices.back()] += i_nExtraWidth;
+ }
+ }
+}
+
+
void MatrixArranger::resize()
{
// assure that we have at least one row and column
@@ -786,19 +834,30 @@ void MatrixArranger::resize()
// check if we can get optimal size, else fallback to minimal size
std::vector<long> aColumnWidths, aRowHeights;
- Size aOptSize( getOptimalSize( WINDOWSIZE_PREFERRED, aColumnWidths, aRowHeights ) );
+ std::vector<sal_Int32> aColumnPrio, aRowPrio;
+ Size aOptSize( getOptimalSize( WINDOWSIZE_PREFERRED, aColumnWidths, aRowHeights, aColumnPrio, aRowPrio ) );
if( aOptSize.Height() > m_aManagedArea.GetHeight() ||
aOptSize.Width() > m_aManagedArea.GetWidth() )
{
std::vector<long> aMinColumnWidths, aMinRowHeights;
- getOptimalSize( WINDOWSIZE_MINIMUM, aMinColumnWidths, aMinRowHeights );
+ getOptimalSize( WINDOWSIZE_MINIMUM, aMinColumnWidths, aMinRowHeights, aColumnPrio, aRowPrio );
if( aOptSize.Height() > m_aManagedArea.GetHeight() )
aRowHeights = aMinRowHeights;
if( aOptSize.Width() > m_aManagedArea.GetWidth() )
aColumnWidths = aMinColumnWidths;
}
- // FIXME: distribute extra space available
+ // distribute extra space available
+ long nExtraSize = m_aManagedArea.GetWidth();
+ for( size_t i = 0; i < aColumnWidths.size(); ++i )
+ nExtraSize -= aColumnWidths[i] + m_nBorderX;
+ if( nExtraSize > 0 )
+ distributeExtraSize( aColumnWidths, aColumnPrio, nExtraSize );
+ nExtraSize = m_aManagedArea.GetHeight();
+ for( size_t i = 0; i < aRowHeights.size(); ++i )
+ nExtraSize -= aRowHeights[i] + m_nBorderY;
+ if( nExtraSize > 0 )
+ distributeExtraSize( aRowHeights, aRowPrio, nExtraSize );
// prepare offsets
std::vector<long> aColumnX( aColumnWidths.size() );
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index b221d1f7d928..2ff7d0a687e7 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -1348,8 +1348,10 @@ void ImplSmallBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice*, co
Rectangle aBoundingRgn( aPoint, Size( mnWidth, mnHeight ) );
Rectangle aContentRgn( aCtrlRegion );
- if(pWin->GetNativeControlRegion( aCtrlType, aCtrlPart, aCtrlRegion,
- nState, aControlValue, rtl::OUString(), aBoundingRgn, aContentRgn ))
+ if( ! ImplGetSVData()->maNWFData.mbCanDrawWidgetAnySize &&
+ pWin->GetNativeControlRegion( aCtrlType, aCtrlPart, aCtrlRegion,
+ nState, aControlValue, rtl::OUString(),
+ aBoundingRgn, aContentRgn ))
{
aCtrlRegion=aContentRgn;
}
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index b6f80588d776..52ad54957dd0 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -978,7 +978,7 @@ void Menu::ImplInit()
mpLayoutData = NULL;
mpFirstDel = NULL; // Dtor notification list
// Native-support: returns NULL if not supported
- mpSalMenu = ImplGetSVData()->mpDefInst->CreateMenu( bIsMenuBar );
+ mpSalMenu = ImplGetSVData()->mpDefInst->CreateMenu( bIsMenuBar, this );
}
Menu* Menu::ImplGetStartedFrom() const
@@ -2484,6 +2484,16 @@ Size Menu::ImplCalcSize( Window* pWin )
if ( !bIsMenuBar )
{
+ // popup menus should not be wider than half the screen
+ // except on rather small screens
+ // TODO: move GetScreenNumber from SystemWindow to Window ?
+ // currently we rely on internal privileges
+ unsigned int nScreenNumber = pWin->ImplGetWindowImpl()->mpFrame->maGeometry.nScreenNumber;
+ Rectangle aDispRect( Application::GetScreenPosSizePixel( nScreenNumber ) );
+ long nScreenWidth = aDispRect.GetWidth() >= 800 ? aDispRect.GetWidth() : 800;
+ if( nMaxWidth > nScreenWidth/2 )
+ nMaxWidth = nScreenWidth/2;
+
USHORT gfxExtra = (USHORT) Max( nExtra, 7L ); // #107710# increase space between checkmarks/images/text
nCheckPos = (USHORT)nExtra;
if (nMenuFlags & MENU_FLAG_SHOWCHECKIMAGES)
@@ -2577,6 +2587,26 @@ static void ImplPaintCheckBackground( Window* i_pWindow, const Rectangle& i_rRec
}
}
+static String getShortenedString( const String& i_rLong, Window* i_pWin, long i_nMaxWidth )
+{
+ xub_StrLen nPos = STRING_NOTFOUND;
+ String aNonMnem( OutputDevice::GetNonMnemonicString( i_rLong, nPos ) );
+ aNonMnem = i_pWin->GetEllipsisString( aNonMnem, i_nMaxWidth, TEXT_DRAW_CENTERELLIPSIS );
+ // re-insert mnemonic
+ if( nPos != STRING_NOTFOUND )
+ {
+ if( nPos < aNonMnem.Len() && i_rLong.GetChar(nPos+1) == aNonMnem.GetChar(nPos) )
+ {
+ rtl::OUStringBuffer aBuf( i_rLong.Len() );
+ aBuf.append( aNonMnem.GetBuffer(), nPos );
+ aBuf.append( sal_Unicode('~') );
+ aBuf.append( aNonMnem.GetBuffer()+nPos );
+ aNonMnem = aBuf.makeStringAndClear();
+ }
+ }
+ return aNonMnem;
+}
+
void Menu::ImplPaint( Window* pWin, USHORT nBorder, long nStartY, MenuItemData* pThisItemOnly, BOOL bHighlighted, bool bLayout ) const
{
// Fuer Symbole: nFontHeight x nFontHeight
@@ -2767,7 +2797,19 @@ void Menu::ImplPaint( Window* pWin, USHORT nBorder, long nStartY, MenuItemData*
pWin->GetSettings().GetStyleSettings().GetMenuColor();
pWin->SetBackground( Wallpaper( aBg ) );
}
- pWin->DrawCtrlText( aTmpPos, pData->aText, 0, pData->aText.Len(), nStyle, pVector, pDisplayText );
+ // how much space is there for the text ?
+ long nMaxItemTextWidth = aOutSz.Width() - aTmpPos.X() - nExtra - nOuterSpace;
+ if( !bIsMenuBar && pData->aAccelKey.GetCode() && !ImplAccelDisabled() )
+ {
+ XubString aAccText = pData->aAccelKey.GetName();
+ nMaxItemTextWidth -= pWin->GetTextWidth( aAccText ) + 3*nExtra;
+ }
+ if( !bIsMenuBar && pData->pSubMenu )
+ {
+ nMaxItemTextWidth -= nFontHeight - nExtra;
+ }
+ String aItemText( getShortenedString( pData->aText, pWin, nMaxItemTextWidth ) );
+ pWin->DrawCtrlText( aTmpPos, aItemText, 0, aItemText.Len(), nStyle, pVector, pDisplayText );
if( bSetTmpBackground )
pWin->SetBackground();
}
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index f24ed500b7df..5e4e0d59ccc6 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -69,6 +69,8 @@ PrintDialog::PrintPreviewWindow::PrintPreviewWindow( Window* i_pParent, const Re
, maOrigSize( 10, 10 )
, maPageVDev( *this )
, maToolTipString( String( VclResId( SV_PRINT_PRINTPREVIEW_TXT ) ) )
+ , maHorzDim( this, WB_HORZ | WB_CENTER )
+ , maVertDim( this, WB_VERT | WB_VCENTER )
{
SetPaintTransparent( TRUE );
SetBackground();
@@ -76,6 +78,11 @@ PrintDialog::PrintPreviewWindow::PrintPreviewWindow( Window* i_pParent, const Re
maPageVDev.SetBackground( GetSettings().GetStyleSettings().GetWindowColor() );
else
maPageVDev.SetBackground( Color( COL_WHITE ) );
+ maHorzDim.Show();
+ maVertDim.Show();
+
+ maHorzDim.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "2.0in" ) ) );
+ maVertDim.SetText( String( RTL_CONSTASCII_USTRINGPARAM( "2.0in" ) ) );
}
PrintDialog::PrintPreviewWindow::~PrintPreviewWindow()
@@ -162,9 +169,10 @@ void PrintDialog::PrintPreviewWindow::DataChanged( const DataChangedEvent& i_rDC
void PrintDialog::PrintPreviewWindow::Resize()
{
Size aNewSize( GetSizePixel() );
+ long nTextHeight = maHorzDim.GetTextHeight();
// leave small space for decoration
- aNewSize.Width() -= 2;
- aNewSize.Height() -= 2;
+ aNewSize.Width() -= nTextHeight + 2;
+ aNewSize.Height() -= nTextHeight + 2;
Size aScaledSize;
double fScale = 1.0;
@@ -206,16 +214,28 @@ void PrintDialog::PrintPreviewWindow::Resize()
}
maPageVDev.SetOutputSizePixel( aScaledSize, FALSE );
+
+ // position dimension lines
+ Point aRef( nTextHeight + (aNewSize.Width() - maPreviewSize.Width())/2,
+ nTextHeight + (aNewSize.Height() - maPreviewSize.Height())/2 );
+ maHorzDim.SetPosSizePixel( Point( aRef.X(), aRef.Y() - nTextHeight ),
+ Size( maPreviewSize.Width(), nTextHeight ) );
+ maVertDim.SetPosSizePixel( Point( aRef.X() - nTextHeight, aRef.Y() ),
+ Size( nTextHeight, maPreviewSize.Height() ) );
+
}
void PrintDialog::PrintPreviewWindow::Paint( const Rectangle& )
{
+ long nTextHeight = maHorzDim.GetTextHeight();
Size aSize( GetSizePixel() );
+ aSize.Width() -= nTextHeight;
+ aSize.Height() -= nTextHeight;
if( maReplacementString.getLength() != 0 )
{
// replacement is active
Push();
- Rectangle aTextRect( Point( 0, 0 ), aSize );
+ Rectangle aTextRect( Point( nTextHeight, nTextHeight ), aSize );
DecorationView aVw( this );
aVw.DrawFrame( aTextRect, FRAME_DRAW_GROUP );
aTextRect.Left() += 2;
@@ -233,8 +253,8 @@ void PrintDialog::PrintPreviewWindow::Paint( const Rectangle& )
{
GDIMetaFile aMtf( maMtf );
- Point aOffset( (aSize.Width() - maPreviewSize.Width()) / 2,
- (aSize.Height() - maPreviewSize.Height()) / 2 );
+ Point aOffset( (aSize.Width() - maPreviewSize.Width()) / 2 + nTextHeight,
+ (aSize.Height() - maPreviewSize.Height()) / 2 + nTextHeight );
Size aVDevSize( maPageVDev.GetOutputSizePixel() );
const Size aLogicSize( maPageVDev.PixelToLogic( aVDevSize, MapMode( MAP_100TH_MM ) ) );
@@ -294,13 +314,6 @@ void PrintDialog::PrintPreviewWindow::setPreview( const GDIMetaFile& i_rNewPrevi
{
rtl::OUStringBuffer aBuf( 256 );
aBuf.append( maToolTipString );
- #if OSL_DEBUG_LEVEL > 0
- aBuf.appendAscii( "\n---\nPageSize: " );
- aBuf.append( sal_Int32( i_rOrigSize.Width()/100) );
- aBuf.appendAscii( "mm x " );
- aBuf.append( sal_Int32( i_rOrigSize.Height()/100) );
- aBuf.appendAscii( "mm" );
- #endif
SetQuickHelpText( aBuf.makeStringAndClear() );
maMtf = i_rNewPreview;
if( useHCColorReplacement() )
@@ -312,6 +325,27 @@ void PrintDialog::PrintPreviewWindow::setPreview( const GDIMetaFile& i_rNewPrevi
maReplacementString = i_rReplacement;
maPageVDev.SetReferenceDevice( i_nDPIX, i_nDPIY );
maPageVDev.EnableOutput( TRUE );
+
+ // use correct measurements
+ const LocaleDataWrapper& rLocWrap( GetSettings().GetLocaleDataWrapper() );
+ MapUnit eUnit = MAP_MM;
+ int nDigits = 0;
+ if( rLocWrap.getMeasurementSystemEnum() == MEASURE_US )
+ {
+ eUnit = MAP_100TH_INCH;
+ nDigits = 2;
+ }
+ Size aLogicPaperSize( LogicToLogic( i_rOrigSize, MapMode( MAP_100TH_MM ), MapMode( eUnit ) ) );
+ String aNumText( rLocWrap.getNum( aLogicPaperSize.Width(), nDigits ) );
+ aBuf.append( aNumText );
+ aBuf.appendAscii( eUnit == MAP_MM ? "mm" : "in" );
+ maHorzDim.SetText( aBuf.makeStringAndClear() );
+
+ aNumText = rLocWrap.getNum( aLogicPaperSize.Height(), nDigits );
+ aBuf.append( aNumText );
+ aBuf.appendAscii( eUnit == MAP_MM ? "mm" : "in" );
+ maVertDim.SetText( aBuf.makeStringAndClear() );
+
Resize();
Invalidate();
}
@@ -364,12 +398,18 @@ void PrintDialog::ShowNupOrderWindow::Paint( const Rectangle& i_rRect )
int nX = 0, nY = 0;
switch( mnOrderMode )
{
- case SV_PRINT_PRT_NUP_ORDER_LRTD:
+ case SV_PRINT_PRT_NUP_ORDER_LRTB:
nX = (i % mnColumns); nY = (i / mnColumns);
break;
- case SV_PRINT_PRT_NUP_ORDER_TDLR:
+ case SV_PRINT_PRT_NUP_ORDER_TBLR:
nX = (i / mnRows); nY = (i % mnRows);
break;
+ case SV_PRINT_PRT_NUP_ORDER_RLTB:
+ nX = mnColumns - 1 - (i % mnColumns); nY = (i / mnColumns);
+ break;
+ case SV_PRINT_PRT_NUP_ORDER_TBRL:
+ nX = mnColumns - 1 - (i / mnRows); nY = (i % mnRows);
+ break;
}
Size aTextSize( GetTextWidth( aPageText ), nTextHeight );
int nDeltaX = (aSubSize.Width() - aTextSize.Width()) / 2;
@@ -2078,10 +2118,14 @@ void PrintDialog::updateNup()
int nOrderMode = int(sal_IntPtr(maNUpPage.maNupOrderBox.GetEntryData(
maNUpPage.maNupOrderBox.GetSelectEntryPos() )));
- if( nOrderMode == SV_PRINT_PRT_NUP_ORDER_LRTD )
+ if( nOrderMode == SV_PRINT_PRT_NUP_ORDER_LRTB )
aMPS.nOrder = PrinterController::LRTB;
- else if( nOrderMode == SV_PRINT_PRT_NUP_ORDER_TDLR )
+ else if( nOrderMode == SV_PRINT_PRT_NUP_ORDER_TBLR )
aMPS.nOrder = PrinterController::TBLR;
+ else if( nOrderMode == SV_PRINT_PRT_NUP_ORDER_RLTB )
+ aMPS.nOrder = PrinterController::RLTB;
+ else if( nOrderMode == SV_PRINT_PRT_NUP_ORDER_TBRL )
+ aMPS.nOrder = PrinterController::TBRL;
int nOrientationMode = int(sal_IntPtr(maNUpPage.maNupOrientationBox.GetEntryData(
maNUpPage.maNupOrientationBox.GetSelectEntryPos() )));
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index e5705c994f4f..69999f6c7188 100644..100755
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -9364,7 +9364,7 @@ void Window::DrawSelectionBackground( const Rectangle& rRect,
if( bDark )
aSelectionFillCol = COL_BLACK;
else
- nPercent = bRoundEdges ? 90 : 80; // just checked (light)
+ nPercent = 80; // just checked (light)
}
else
{
@@ -9379,7 +9379,7 @@ void Window::DrawSelectionBackground( const Rectangle& rRect,
nPercent = 0;
}
else
- nPercent = bRoundEdges ? 50 : 20; // selected, pressed or checked ( very dark )
+ nPercent = bRoundEdges ? 40 : 20; // selected, pressed or checked ( very dark )
}
else if( bChecked || highlight == 1 )
{
@@ -9392,7 +9392,7 @@ void Window::DrawSelectionBackground( const Rectangle& rRect,
nPercent = 0;
}
else
- nPercent = bRoundEdges ? 70 : 35; // selected, pressed or checked ( very dark )
+ nPercent = bRoundEdges ? 60 : 35; // selected, pressed or checked ( very dark )
}
else
{
@@ -9408,7 +9408,7 @@ void Window::DrawSelectionBackground( const Rectangle& rRect,
nPercent = 0;
}
else
- nPercent = bRoundEdges ? 80 : 70; // selected ( dark )
+ nPercent = 70; // selected ( dark )
}
}
diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
index 322530b881cc..f308822df147 100644
--- a/vcl/unx/gtk/app/gtkdata.cxx
+++ b/vcl/unx/gtk/app/gtkdata.cxx
@@ -217,11 +217,12 @@ void GtkSalDisplay::monitorsChanged( GdkScreen* pScreen )
{
gint nMonitors = gdk_screen_get_n_monitors(pScreen);
m_aXineramaScreens = std::vector<Rectangle>();
+ m_aXineramaScreenIndexMap = std::vector<int>(nMonitors);
for (gint i = 0; i < nMonitors; ++i)
{
GdkRectangle dest;
gdk_screen_get_monitor_geometry(pScreen, i, &dest);
- addXineramaScreenUnique( dest.x, dest.y, dest.width, dest.height );
+ m_aXineramaScreenIndexMap[i] = addXineramaScreenUnique( dest.x, dest.y, dest.width, dest.height );
}
m_bXinerama = m_aXineramaScreens.size() > 1;
if( ! m_aFrames.empty() )
@@ -235,6 +236,26 @@ void GtkSalDisplay::monitorsChanged( GdkScreen* pScreen )
}
}
+extern "C"
+{
+ typedef gint(* screen_get_primary_monitor)(GdkScreen *screen);
+}
+
+int GtkSalDisplay::GetDefaultMonitorNumber() const
+{
+ int n = 0;
+ GdkScreen* pScreen = gdk_display_get_screen( m_pGdkDisplay, m_nDefaultScreen );
+#if GTK_CHECK_VERSION(2,20,0)
+ n = m_aXineramaScreenIndexMap[gdk_screen_get_primary_monitor(pScreen)];
+#else
+ static screen_get_primary_monitor sym_gdk_screen_get_primary_monitor =
+ (screen_get_primary_monitor)osl_getAsciiFunctionSymbol( GetSalData()->m_pPlugin, "gdk_screen_get_primary_monitor" );
+ if (sym_gdk_screen_get_primary_monitor)
+ n = m_aXineramaScreenIndexMap[sym_gdk_screen_get_primary_monitor( pScreen )];
+#endif
+ return n;
+}
+
void GtkSalDisplay::initScreen( int nScreen ) const
{
if( nScreen < 0 || nScreen >= static_cast<int>(m_aScreens.size()) )
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 447a970f6bcd..318f593ac6a3 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -411,6 +411,9 @@ void GtkData::initNWF( void )
// open first menu on F10
pSVData->maNWFData.mbOpenMenuOnF10 = true;
+ // omit GetNativeControl while painting (see brdwin.cxx)
+ pSVData->maNWFData.mbCanDrawWidgetAnySize = true;
+
int nScreens = GetX11SalData()->GetDisplay()->GetScreenCount();
gWidgetData = std::vector<NWFWidgetData>( nScreens );
for( int i = 0; i < nScreens; i++ )
diff --git a/vcl/unx/headless/svpinst.cxx b/vcl/unx/headless/svpinst.cxx
index 5c3be54f9ddc..fc788b2a0530 100644
--- a/vcl/unx/headless/svpinst.cxx
+++ b/vcl/unx/headless/svpinst.cxx
@@ -327,6 +327,19 @@ void SvpSalInstance::AcquireYieldMutex( ULONG nCount )
}
}
+bool SvpSalInstance::CheckYieldMutex()
+{
+ bool bRet = true;
+
+ if ( m_aYieldMutex.GetThreadId() !=
+ vos::OThread::getCurrentIdentifier() )
+ {
+ bRet = false;
+ }
+
+ return bRet;
+}
+
void SvpSalInstance::Yield( bool bWait, bool bHandleAllCurrentEvents )
{
// first, check for already queued events.
@@ -419,24 +432,6 @@ bool SvpSalInstance::AnyInput( USHORT nType )
return false;
}
-SalMenu* SvpSalInstance::CreateMenu( BOOL )
-{
- return NULL;
-}
-
-void SvpSalInstance::DestroyMenu( SalMenu* )
-{
-}
-
-SalMenuItem* SvpSalInstance::CreateMenuItem( const SalItemParams* )
-{
- return NULL;
-}
-
-void SvpSalInstance::DestroyMenuItem( SalMenuItem* )
-{
-}
-
SalSession* SvpSalInstance::CreateSalSession()
{
return NULL;
diff --git a/vcl/unx/headless/svpinst.hxx b/vcl/unx/headless/svpinst.hxx
index d931a2735ff9..02d5e3fa9494 100644
--- a/vcl/unx/headless/svpinst.hxx
+++ b/vcl/unx/headless/svpinst.hxx
@@ -176,6 +176,7 @@ public:
virtual vos::IMutex* GetYieldMutex();
virtual ULONG ReleaseYieldMutex();
virtual void AcquireYieldMutex( ULONG nCount );
+ virtual bool CheckYieldMutex();
// wait next event and dispatch
// must returned by UserEvent (SalFrame::PostEvent)
@@ -183,12 +184,6 @@ public:
virtual void Yield( bool bWait, bool bHandleAllCurrentEvents );
virtual bool AnyInput( USHORT nType );
- // Menues
- virtual SalMenu* CreateMenu( BOOL bMenuBar );
- virtual void DestroyMenu( SalMenu* pMenu);
- virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData );
- virtual void DestroyMenuItem( SalMenuItem* pItem );
-
// may return NULL to disable session management
virtual SalSession* CreateSalSession();
diff --git a/vcl/unx/inc/plugins/gtk/gtkdata.hxx b/vcl/unx/inc/plugins/gtk/gtkdata.hxx
index d4dec957a6b3..b650cffbae8b 100644
--- a/vcl/unx/inc/plugins/gtk/gtkdata.hxx
+++ b/vcl/unx/inc/plugins/gtk/gtkdata.hxx
@@ -59,6 +59,8 @@ class GtkSalDisplay : public SalDisplay
GdkDisplay* m_pGdkDisplay;
GdkCursor *m_aCursors[ POINTER_COUNT ];
bool m_bStartupCompleted;
+ std::vector< int > m_aXineramaScreenIndexMap;
+
GdkCursor* getFromXPM( const char *pBitmap, const char *pMask,
int nWidth, int nHeight, int nXHot, int nYHot );
public:
@@ -73,6 +75,8 @@ public:
virtual long Dispatch( XEvent *pEvent );
virtual void initScreen( int nScreen ) const;
+ virtual int GetDefaultMonitorNumber() const;
+
static GdkFilterReturn filterGdkEvent( GdkXEvent* sys_event,
GdkEvent* event,
gpointer data );
diff --git a/vcl/unx/inc/saldisp.hxx b/vcl/unx/inc/saldisp.hxx
index 3734cbec6ef7..99c9bea699d6 100644
--- a/vcl/unx/inc/saldisp.hxx
+++ b/vcl/unx/inc/saldisp.hxx
@@ -405,7 +405,7 @@ protected:
int processRandREvent( XEvent* );
void doDestruct();
- void addXineramaScreenUnique( long i_nX, long i_nY, long i_nWidth, long i_nHeight );
+ int addXineramaScreenUnique( long i_nX, long i_nY, long i_nWidth, long i_nHeight );
public:
static SalDisplay *GetSalDisplay( Display* display );
static BOOL BestVisual( Display *pDisp,
@@ -475,6 +475,7 @@ public:
XLIB_Window GetDrawable( int nScreen ) const { return getDataForScreen( nScreen ).m_aRefWindow; }
Display *GetDisplay() const { return pDisp_; }
int GetDefaultScreenNumber() const { return m_nDefaultScreen; }
+ virtual int GetDefaultMonitorNumber() const { return 0; }
const Size& GetScreenSize( int nScreen ) const { return getDataForScreen( nScreen ).m_aSize; }
srv_vendor_t GetServerVendor() const { return meServerVendor; }
void SetServerVendor() { meServerVendor = sal_GetServerVendor(pDisp_); }
diff --git a/vcl/unx/inc/salinst.h b/vcl/unx/inc/salinst.h
index 8f4719f098f0..133f0bf6037f 100644
--- a/vcl/unx/inc/salinst.h
+++ b/vcl/unx/inc/salinst.h
@@ -102,13 +102,10 @@ public:
virtual vos::IMutex* GetYieldMutex();
virtual ULONG ReleaseYieldMutex();
virtual void AcquireYieldMutex( ULONG nCount );
+ virtual bool CheckYieldMutex();
virtual void Yield( bool bWait, bool bHandleAllCurrentEvents );
virtual bool AnyInput( USHORT nType );
- virtual SalMenu* CreateMenu( BOOL bMenuBar );
- virtual void DestroyMenu( SalMenu* pMenu);
- virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData );
- virtual void DestroyMenuItem( SalMenuItem* pItem );
virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes );
void FillFontPathList( std::list< rtl::OString >& o_rFontPaths );
diff --git a/vcl/unx/inc/wmadaptor.hxx b/vcl/unx/inc/wmadaptor.hxx
index cbedede2cc99..e8620db29c6f 100644
--- a/vcl/unx/inc/wmadaptor.hxx
+++ b/vcl/unx/inc/wmadaptor.hxx
@@ -165,6 +165,8 @@ protected:
bool m_bLegacyPartialFullscreen;
int m_nWinGravity;
int m_nInitWinGravity;
+ bool m_bWMshouldSwitchWorkspace;
+ bool m_bWMshouldSwitchWorkspaceInit;
WMAdaptor( SalDisplay * )
;
@@ -177,6 +179,7 @@ protected:
*/
virtual bool isValid() const;
+ bool getWMshouldSwitchWorkspace() const;
public:
virtual ~WMAdaptor();
@@ -214,8 +217,9 @@ public:
/*
* attemp to switch the desktop to a certain workarea
+ * if bConsiderWM is true, then on some WMs the call will not result in any action
*/
- void switchToWorkArea( int nWorkArea ) const;
+ void switchToWorkArea( int nWorkArea, bool bConsiderWM = true ) const;
/*
* sets window title
diff --git a/vcl/unx/source/app/saldisp.cxx b/vcl/unx/source/app/saldisp.cxx
index acf8c91ab5db..354c4d433d42 100644
--- a/vcl/unx/source/app/saldisp.cxx
+++ b/vcl/unx/source/app/saldisp.cxx
@@ -2592,7 +2592,7 @@ void SalDisplay::PrintInfo() const
sal::static_int_cast< unsigned int >(GetVisual(m_nDefaultScreen).GetVisualId()) );
}
-void SalDisplay::addXineramaScreenUnique( long i_nX, long i_nY, long i_nWidth, long i_nHeight )
+int SalDisplay::addXineramaScreenUnique( long i_nX, long i_nY, long i_nWidth, long i_nHeight )
{
// see if any frame buffers are at the same coordinates
// this can happen with weird configuration e.g. on
@@ -2608,10 +2608,11 @@ void SalDisplay::addXineramaScreenUnique( long i_nX, long i_nY, long i_nWidth, l
{
m_aXineramaScreens[n].SetSize( Size( i_nWidth, i_nHeight ) );
}
- return;
+ return (int)n;
}
}
m_aXineramaScreens.push_back( Rectangle( Point( i_nX, i_nY ), Size( i_nWidth, i_nHeight ) ) );
+ return (int)m_aXineramaScreens.size()-1;
}
void SalDisplay::InitXinerama()
diff --git a/vcl/unx/source/app/salinst.cxx b/vcl/unx/source/app/salinst.cxx
index 49a9cceb8617..88af0b70ef7e 100644
--- a/vcl/unx/source/app/salinst.cxx
+++ b/vcl/unx/source/app/salinst.cxx
@@ -259,6 +259,24 @@ void X11SalInstance::AcquireYieldMutex( ULONG nCount )
}
}
+// -----------------------------------------------------------------------
+
+bool X11SalInstance::CheckYieldMutex()
+{
+ bool bRet = true;
+
+ SalYieldMutex* pYieldMutex = mpSalYieldMutex;
+ if ( pYieldMutex->GetThreadId() !=
+ vos::OThread::getCurrentIdentifier() )
+ {
+ bRet = false;
+ }
+
+ return bRet;
+}
+
+// -----------------------------------------------------------------------
+
void X11SalInstance::Yield( bool bWait, bool bHandleAllCurrentEvents )
{ GetX11SalData()->GetLib()->Yield( bWait, bHandleAllCurrentEvents ); }
diff --git a/vcl/unx/source/app/salsys.cxx b/vcl/unx/source/app/salsys.cxx
index 1ccb214df4ed..84c9dba32e40 100644
--- a/vcl/unx/source/app/salsys.cxx
+++ b/vcl/unx/source/app/salsys.cxx
@@ -71,7 +71,7 @@ bool X11SalSystem::IsMultiDisplay()
unsigned int X11SalSystem::GetDefaultDisplayNumber()
{
SalDisplay* pSalDisp = GetX11SalData()->GetDisplay();
- return pSalDisp->GetDefaultScreenNumber();
+ return pSalDisp->IsXinerama() ? pSalDisp->GetDefaultMonitorNumber() : pSalDisp->GetDefaultScreenNumber();
}
Rectangle X11SalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen )
diff --git a/vcl/unx/source/app/wmadaptor.cxx b/vcl/unx/source/app/wmadaptor.cxx
index aa2e4c84ef24..f816c5d1426e 100644
--- a/vcl/unx/source/app/wmadaptor.cxx
+++ b/vcl/unx/source/app/wmadaptor.cxx
@@ -31,21 +31,22 @@
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
-#include <sal/alloca.h>
-#include <wmadaptor.hxx>
-#include <saldisp.hxx>
-#include <saldata.hxx>
-#include <salframe.h>
-#include <vcl/salgdi.hxx>
-#include <osl/thread.h>
-#include <rtl/locale.h>
-#include <osl/process.h>
-
-#include <tools/prex.h>
+#include "sal/alloca.h"
+#include "wmadaptor.hxx"
+#include "saldisp.hxx"
+#include "saldata.hxx"
+#include "salframe.h"
+#include "vcl/salgdi.hxx"
+#include "osl/thread.h"
+#include "rtl/locale.h"
+#include "osl/process.h"
+#include "vcl/configsettings.hxx"
+
+#include "tools/prex.h"
#include <X11/X.h>
#include <X11/Xatom.h>
#include <X11/Xresource.h>
-#include <tools/postx.h>
+#include "tools/postx.h"
#if OSL_DEBUG_LEVEL > 1
#include <stdio.h>
@@ -238,7 +239,9 @@ WMAdaptor::WMAdaptor( SalDisplay* pDisplay ) :
m_bEnableAlwaysOnTopWorks( false ),
m_bLegacyPartialFullscreen( false ),
m_nWinGravity( StaticGravity ),
- m_nInitWinGravity( StaticGravity )
+ m_nInitWinGravity( StaticGravity ),
+ m_bWMshouldSwitchWorkspace( true ),
+ m_bWMshouldSwitchWorkspaceInit( false )
{
Atom aRealType = None;
int nFormat = 8;
@@ -965,6 +968,30 @@ bool WMAdaptor::getNetWmName()
return bNetWM;
}
+bool WMAdaptor::getWMshouldSwitchWorkspace() const
+{
+ if( ! m_bWMshouldSwitchWorkspaceInit )
+ {
+ WMAdaptor * pWMA = const_cast<WMAdaptor*>(this);
+
+ pWMA->m_bWMshouldSwitchWorkspace = true;
+ vcl::SettingsConfigItem* pItem = vcl::SettingsConfigItem::get();
+ rtl::OUString aSetting( pItem->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "WM" ) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ShouldSwitchWorkspace" ) ) ) );
+ if( aSetting.getLength() == 0 )
+ {
+ if( m_aWMName.EqualsAscii( "awesome" ) )
+ {
+ pWMA->m_bWMshouldSwitchWorkspace = false;
+ }
+ }
+ else
+ pWMA->m_bWMshouldSwitchWorkspace = aSetting.toBoolean();
+ pWMA->m_bWMshouldSwitchWorkspaceInit = true;
+ }
+ return m_bWMshouldSwitchWorkspace;
+}
+
/*
* WMAdaptor::isValid()
*/
@@ -2338,8 +2365,11 @@ int WMAdaptor::getWindowWorkArea( XLIB_Window aWindow ) const
* WMAdaptor::getCurrentWorkArea
*/
// fixme: multi screen case
-void WMAdaptor::switchToWorkArea( int nWorkArea ) const
+void WMAdaptor::switchToWorkArea( int nWorkArea, bool bConsiderWM ) const
{
+ if( bConsiderWM && ! getWMshouldSwitchWorkspace() )
+ return;
+
if( m_aWMAtoms[ NET_CURRENT_DESKTOP ] )
{
XEvent aEvent;
diff --git a/vcl/unx/source/printer/printerinfomanager.cxx b/vcl/unx/source/printer/printerinfomanager.cxx
index bd6ce761e989..af189b1b01b5 100644
--- a/vcl/unx/source/printer/printerinfomanager.cxx
+++ b/vcl/unx/source/printer/printerinfomanager.cxx
@@ -642,7 +642,7 @@ const PrinterInfo& PrinterInfoManager::getPrinterInfo( const OUString& rPrinter
static PrinterInfo aEmptyInfo;
::std::hash_map< OUString, Printer, OUStringHash >::const_iterator it = m_aPrinters.find( rPrinter );
- DBG_ASSERT( it != m_aPrinters.end(), "Do not ask for info about nonexistant printers" );
+ DBG_ASSERT( it != m_aPrinters.end(), "Do not ask for info about nonexistent printers" );
return it != m_aPrinters.end() ? it->second.m_aInfo : aEmptyInfo;
}
diff --git a/vcl/unx/source/printergfx/printerjob.cxx b/vcl/unx/source/printergfx/printerjob.cxx
index 26a1d75f68c2..af2cf14b1a0c 100644
--- a/vcl/unx/source/printergfx/printerjob.cxx
+++ b/vcl/unx/source/printergfx/printerjob.cxx
@@ -496,6 +496,10 @@ PrinterJob::StartJob (
sal_Bool
PrinterJob::EndJob ()
{
+ // no pages ? that really means no print job
+ if( maPageList.empty() )
+ return sal_False;
+
// write document setup (done here because it
// includes the accumulated fonts
if( mpJobHeader )
diff --git a/vcl/unx/source/window/makefile.mk b/vcl/unx/source/window/makefile.mk
index 808b712903f3..c5cd95ba6b1c 100644
--- a/vcl/unx/source/window/makefile.mk
+++ b/vcl/unx/source/window/makefile.mk
@@ -48,7 +48,7 @@ dummy:
.ELSE # "$(GUIBASE)"!="unx"
SLOFILES= \
- $(SLO)/FWS.obj $(SLO)/salframe.obj $(SLO)/salobj.obj $(SLO)/salmenu.obj
+ $(SLO)/FWS.obj $(SLO)/salframe.obj $(SLO)/salobj.obj
.ENDIF # "$(GUIBASE)"!="unx"
diff --git a/vcl/unx/source/window/salmenu.cxx b/vcl/unx/source/window/salmenu.cxx
deleted file mode 100644
index 0739b6cd5352..000000000000
--- a/vcl/unx/source/window/salmenu.cxx
+++ /dev/null
@@ -1,132 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-
-#include <saldata.hxx>
-#include <salinst.h>
-#include <salmenu.h>
-
-
-// =======================================================================
-
-// X11SalInst factory methods
-
-SalMenu* X11SalInstance::CreateMenu( BOOL /*bMenuBar*/ )
-{
- return NULL; // no support for native menues
-}
-
-void X11SalInstance::DestroyMenu( SalMenu* pSalMenu )
-{
- delete pSalMenu;
-}
-
-
-SalMenuItem* X11SalInstance::CreateMenuItem( const SalItemParams* )
-{
- return NULL; // no support for native menues
-}
-
-void X11SalInstance::DestroyMenuItem( SalMenuItem* pSalMenuItem )
-{
- delete pSalMenuItem;
-}
-
-
-// =======================================================================
-
-
-/*
- * X11SalMenu
- */
-
-
-X11SalMenu::~X11SalMenu()
-{
-}
-
-BOOL X11SalMenu::VisibleMenuBar()
-{
- return FALSE;
-}
-
-void X11SalMenu::SetFrame( const SalFrame* )
-{
-}
-
-void X11SalMenu::InsertItem( SalMenuItem*, unsigned )
-{
-}
-
-void X11SalMenu::RemoveItem( unsigned )
-{
-}
-
-void X11SalMenu::SetSubMenu( SalMenuItem*, SalMenu*, unsigned )
-{
-}
-
-void X11SalMenu::CheckItem( unsigned, BOOL )
-{
-}
-
-void X11SalMenu::EnableItem( unsigned, BOOL )
-{
-}
-
-void X11SalMenu::SetItemImage( unsigned, SalMenuItem*, const Image& )
-{
-}
-
-void X11SalMenu::SetItemText( unsigned, SalMenuItem*, const XubString& )
-{
-}
-
-void X11SalMenu::SetAccelerator( unsigned, SalMenuItem*, const KeyCode&, const XubString& )
-{
-}
-
-void X11SalMenu::GetSystemMenuData( SystemMenuData* )
-{
-}
-
-// =======================================================================
-
-/*
- * SalMenuItem
- */
-
-
-X11SalMenuItem::~X11SalMenuItem()
-{
-}
-
-// -------------------------------------------------------------------
-
diff --git a/vcl/win/inc/salinst.h b/vcl/win/inc/salinst.h
index f3005e3ad30b..1ab59f8f7f9f 100644..100755
--- a/vcl/win/inc/salinst.h
+++ b/vcl/win/inc/salinst.h
@@ -77,9 +77,11 @@ public:
virtual vos::IMutex* GetYieldMutex();
virtual ULONG ReleaseYieldMutex();
virtual void AcquireYieldMutex( ULONG nCount );
+ virtual bool CheckYieldMutex();
+
virtual void Yield( bool bWait, bool bHandleAllCurrentEvents );
virtual bool AnyInput( USHORT nType );
- virtual SalMenu* CreateMenu( BOOL bMenuBar );
+ virtual SalMenu* CreateMenu( BOOL bMenuBar, Menu* );
virtual void DestroyMenu( SalMenu* );
virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData );
virtual void DestroyMenuItem( SalMenuItem* );
diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx
index 97dbb5285cca..419723ee6442 100644
--- a/vcl/win/source/app/salinst.cxx
+++ b/vcl/win/source/app/salinst.cxx
@@ -323,10 +323,9 @@ void ImplSalAcquireYieldMutex( ULONG nCount )
// -----------------------------------------------------------------------
-#ifdef DBG_UTIL
-
-void ImplDbgTestSolarMutex()
+bool WinSalInstance::CheckYieldMutex()
{
+ bool bRet = true;
SalData* pSalData = GetSalData();
DWORD nCurThreadId = GetCurrentThreadId();
if ( pSalData->mnAppThreadId != nCurThreadId )
@@ -336,7 +335,7 @@ void ImplDbgTestSolarMutex()
SalYieldMutex* pYieldMutex = pSalData->mpFirstInstance->mpSalYieldMutex;
if ( pYieldMutex->mnThreadId != nCurThreadId )
{
- DBG_ERROR( "SolarMutex not locked, and not thread save code in VCL is called from outside of the main thread" );
+ bRet = false;
}
}
}
@@ -347,14 +346,13 @@ void ImplDbgTestSolarMutex()
SalYieldMutex* pYieldMutex = pSalData->mpFirstInstance->mpSalYieldMutex;
if ( pYieldMutex->mnThreadId != nCurThreadId )
{
- DBG_ERROR( "SolarMutex not locked in the main thread" );
+ bRet = false;
}
}
}
+ return bRet;
}
-#endif
-
// =======================================================================
void SalData::initKeyCodeMap()
diff --git a/vcl/win/source/window/salmenu.cxx b/vcl/win/source/window/salmenu.cxx
index 1eb75969ea38..47da911b012e 100644..100755
--- a/vcl/win/source/window/salmenu.cxx
+++ b/vcl/win/source/window/salmenu.cxx
@@ -59,7 +59,7 @@ BOOL SalData::IsKnownMenuHandle( HMENU hMenu )
// WinSalInst factory methods
-SalMenu* WinSalInstance::CreateMenu( BOOL bMenuBar )
+SalMenu* WinSalInstance::CreateMenu( BOOL bMenuBar, Menu* )
{
WinSalMenu *pSalMenu = new WinSalMenu();
diff --git a/writerfilter/source/dmapper/BorderHandler.cxx b/writerfilter/source/dmapper/BorderHandler.cxx
index df2503793884..9fa737f47de2 100644
--- a/writerfilter/source/dmapper/BorderHandler.cxx
+++ b/writerfilter/source/dmapper/BorderHandler.cxx
@@ -51,6 +51,9 @@ BorderHandler::BorderHandler( bool bOOXML ) :
m_nLineDistance(0),
m_bOOXML( bOOXML )
{
+ const int nBorderCount(BORDER_COUNT);
+ std::fill_n(m_aFilledLines, nBorderCount, false);
+ std::fill_n(m_aBorderLines, nBorderCount, table::BorderLine());
}
/*-- 24.04.2007 09:06:35---------------------------------------------------
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 4c176b59b4ef..301774dc2b96 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -627,7 +627,7 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap )
#ifdef DEBUG_DOMAINMAPPER
dmapper_logger->attribute("isTextAppend", xTextAppend.is());
- dmapper_logger->attribute("isIgnor", m_TableManager.isIgnore());
+ dmapper_logger->attribute("isIgnor", getTableManager().isIgnore());
#endif
if(xTextAppend.is() && ! getTableManager( ).isIgnore())
diff --git a/writerfilter/source/dmapper/FontTable.cxx b/writerfilter/source/dmapper/FontTable.cxx
index 20f3d602156b..4bde0ac275b5 100644
--- a/writerfilter/source/dmapper/FontTable.cxx
+++ b/writerfilter/source/dmapper/FontTable.cxx
@@ -39,7 +39,7 @@ namespace dmapper
struct FontTable_Impl
{
- std::vector< FontEntry > aFontEntries;
+ std::vector< FontEntry::Pointer_t > aFontEntries;
FontEntry::Pointer_t pCurrentEntry;
FontTable_Impl() {}
};
@@ -568,7 +568,7 @@ void FontTable::entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_
m_pImpl->pCurrentEntry.reset(new FontEntry);
ref->resolve(*this);
//append it to the table
- m_pImpl->aFontEntries.push_back( *m_pImpl->pCurrentEntry );
+ m_pImpl->aFontEntries.push_back( m_pImpl->pCurrentEntry );
m_pImpl->pCurrentEntry.reset();
}
/*-- 19.06.2006 12:04:34---------------------------------------------------
@@ -657,12 +657,9 @@ void FontTable::endShape( )
-----------------------------------------------------------------------*/
const FontEntry::Pointer_t FontTable::getFontEntry(sal_uInt32 nIndex)
{
- FontEntry::Pointer_t pRet;
- if(m_pImpl->aFontEntries.size() > nIndex)
- {
- pRet.reset(&m_pImpl->aFontEntries[nIndex]);
- }
- return pRet;
+ return (m_pImpl->aFontEntries.size() > nIndex)
+ ? m_pImpl->aFontEntries[nIndex]
+ : FontEntry::Pointer_t();
}
/*-- 21.06.2006 11:21:38---------------------------------------------------
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 5f2e2268abb8..5088e8729577 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -235,7 +235,7 @@ void lcl_mergeProps( PropertyMapPtr pToFill, PropertyMapPtr pToAdd, TblStyleTyp
( nStyleId == TBL_STYLE_FIRSTCOL )
};
- for ( int i = 0 ; i < 7; i++ )
+ for ( unsigned i = 0 ; i != sizeof(pPropsToCheck) / sizeof(PropertyIds); i++ )
{
PropertyIds nId = pPropsToCheck[i];
PropertyDefinition aProp( nId, false );
diff --git a/writerfilter/source/ooxml/OOXMLFactory.cxx b/writerfilter/source/ooxml/OOXMLFactory.cxx
index 964d9e1cb5ee..a277d5928af6 100644
--- a/writerfilter/source/ooxml/OOXMLFactory.cxx
+++ b/writerfilter/source/ooxml/OOXMLFactory.cxx
@@ -25,6 +25,8 @@
*
************************************************************************/
+#include <stdio.h>
+
#include <rtl/instance.hxx>
#include <osl/mutex.hxx>
#include "OOXMLFactory.hxx"
diff --git a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx
index 1768d486c80d..83c568dfba50 100644
--- a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx
@@ -193,9 +193,6 @@ void SAL_CALL OOXMLFastDocumentHandler::startDocument()
void SAL_CALL OOXMLFastDocumentHandler::endDocument()
throw (uno::RuntimeException, xml::sax::SAXException)
{
-#ifdef DEBUG_CONTEXT_STACK
- OOXMLFastContextHandler::dumpOpenContexts();
-#endif
}
void SAL_CALL OOXMLFastDocumentHandler::setDocumentLocator
diff --git a/xmloff/source/core/SettingsExportHelper.cxx b/xmloff/source/core/SettingsExportHelper.cxx
index 48e3dc92b61d..90e1ba583dd5 100644
--- a/xmloff/source/core/SettingsExportHelper.cxx
+++ b/xmloff/source/core/SettingsExportHelper.cxx
@@ -203,6 +203,7 @@ void XMLSettingsExportHelper::exportBool(const sal_Bool bValue, const rtl::OUStr
void XMLSettingsExportHelper::exportByte(const sal_Int8 nValue, const rtl::OUString& rName) const
{
+#if 0
DBG_ASSERT(rName.getLength(), "no name");
m_rContext.AddAttribute( XML_NAME, rName );
m_rContext.AddAttribute( XML_TYPE, XML_BYTE );
@@ -211,6 +212,13 @@ void XMLSettingsExportHelper::exportByte(const sal_Int8 nValue, const rtl::OUStr
SvXMLUnitConverter::convertNumber(sBuffer, sal_Int32(nValue));
m_rContext.Characters( sBuffer.makeStringAndClear() );
m_rContext.EndElement( sal_False );
+#else
+ (void) nValue; (void) rName;
+ OSL_ENSURE(false, "XMLSettingsExportHelper::exportByte(): #i114162#:\n"
+ "config-items of type \"byte\" are not valid ODF, "
+ "so storing them is disabled!\n"
+ "Use a different type instead (e.g. \"short\").");
+#endif
}
void XMLSettingsExportHelper::exportShort(const sal_Int16 nValue, const rtl::OUString& rName) const
{
diff --git a/xmloff/source/core/xmlehelp.cxx b/xmloff/source/core/xmlehelp.cxx
index e50e180b089a..2a2b1c2257b8 100644
--- a/xmloff/source/core/xmlehelp.cxx
+++ b/xmloff/source/core/xmlehelp.cxx
@@ -416,7 +416,7 @@ double SvXMLExportHelper::GetConversionFactor(::rtl::OUStringBuffer& rUnit,
MapUnit SvXMLExportHelper::GetUnitFromString(const ::rtl::OUString& rString, MapUnit eDefaultUnit)
{
- sal_Int32 nPos = 0L;
+ sal_Int32 nPos = 0;
sal_Int32 nLen = rString.getLength();
MapUnit eRetUnit = eDefaultUnit;
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index b1ba8520c1db..ac46c740ee97 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -752,7 +752,7 @@ void SAL_CALL SvXMLExport::setSourceDocument( const uno::Reference< lang::XCompo
sal_Int32 nIndex;
OUString aURL;
- for( nIndex = 0; nIndex < nCount; nIndex++, *pPrefix++ )
+ for( nIndex = 0; nIndex < nCount; ++nIndex, ++pPrefix )
{
if( xNamespaceMap->getByName( *pPrefix ) >>= aURL )
_GetNamespaceMap().Add( *pPrefix, aURL, XML_NAMESPACE_UNKNOWN );
diff --git a/xmloff/source/core/xmluconv.cxx b/xmloff/source/core/xmluconv.cxx
index 28abf2edbcbd..efd0a8127d87 100644
--- a/xmloff/source/core/xmluconv.cxx
+++ b/xmloff/source/core/xmluconv.cxx
@@ -200,7 +200,7 @@ sal_Bool SvXMLUnitConverter::convertMeasure( sal_Int32& rValue,
sal_Bool bNeg = sal_False;
double nVal = 0;
- sal_Int32 nPos = 0L;
+ sal_Int32 nPos = 0;
const sal_Int32 nLen = rString.getLength();
// skip white space
@@ -679,7 +679,7 @@ sal_Bool SvXMLUnitConverter::convertNumber64( sal_Int64& rValue,
sal_Bool bNeg = sal_False;
rValue = 0;
- sal_Int32 nPos = 0L;
+ sal_Int32 nPos = 0;
const sal_Int32 nLen = rString.getLength();
// skip white space
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 2ad03f6576de..149829f0f440 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -853,7 +853,7 @@ void SdXMLExport::ImpPrepAutoLayoutInfos()
}
// prepare name creation
- for(sal_Int32 nCnt = 0L; nCnt < mnDocDrawPageCount; nCnt++)
+ for (sal_Int32 nCnt = 0; nCnt < mnDocDrawPageCount; nCnt++)
{
Any aAny(mxDocDrawPages->getByIndex(nCnt));
Reference<XDrawPage> xDrawPage;
@@ -1207,11 +1207,11 @@ void SdXMLExport::ImpWriteAutoLayoutInfos()
Point aTmpPos(aPartPos);
- for(sal_Int32 a = 0L; a < nRowCnt; a++)
+ for (sal_Int32 a = 0; a < nRowCnt; a++)
{
aTmpPos.X() = aPartPos.X();
- for(sal_Int32 b = 0L; b < nColCnt; b++)
+ for (sal_Int32 b = 0; b < nColCnt; b++)
{
Rectangle aTmpRect(aTmpPos, aPartSize);
@@ -1416,7 +1416,7 @@ void SdXMLExport::ImpPrepPageMasterInfos()
if(mnDocMasterPageCount)
{
// look for needed page-masters, create these
- for(sal_Int32 nMPageId = 0L; nMPageId < mnDocMasterPageCount; nMPageId++)
+ for (sal_Int32 nMPageId = 0; nMPageId < mnDocMasterPageCount; nMPageId++)
{
Reference< XDrawPage > xMasterPage( mxDocMasterPages->getByIndex(nMPageId), UNO_QUERY );
ImpXMLEXPPageMasterInfo* pNewInfo = 0L;
@@ -1841,7 +1841,7 @@ void SdXMLExport::ImpWritePresentationStyles()
{
if(IsImpress())
{
- for(sal_Int32 nCnt = 0L; nCnt < mnDocMasterPageCount; nCnt++)
+ for (sal_Int32 nCnt = 0; nCnt < mnDocMasterPageCount; nCnt++)
{
Any aAny(mxDocMasterPages->getByIndex(nCnt));
Reference<container::XNamed> xNamed;
@@ -2554,7 +2554,7 @@ void SdXMLExport::_ExportMasterStyles()
}
// export MasterPages in master-styles section
- for(sal_Int32 nMPageId = 0L; nMPageId < mnDocMasterPageCount; nMPageId++)
+ for (sal_Int32 nMPageId = 0; nMPageId < mnDocMasterPageCount; nMPageId++)
{
Reference< XDrawPage > xMasterPage( mxDocMasterPages->getByIndex(nMPageId), UNO_QUERY );
if(xMasterPage.is())
diff --git a/xmloff/source/draw/shapeexport3.cxx b/xmloff/source/draw/shapeexport3.cxx
index 559f94f6d51f..f51302b64156 100644
--- a/xmloff/source/draw/shapeexport3.cxx
+++ b/xmloff/source/draw/shapeexport3.cxx
@@ -218,7 +218,7 @@ void XMLShapeExport::ImpExport3DShape(
drawing::DoubleSequence* pInnerSequenceY = xPolyPolygon3D.SequenceY.getArray();
sal_Int32 a;
- for( a= 0L; a < nOuterSequenceCount; a++)
+ for (a = 0; a < nOuterSequenceCount; a++)
{
sal_Int32 nInnerSequenceCount(pInnerSequenceX->getLength());
double* pArrayX = pInnerSequenceX->getArray();
@@ -268,7 +268,7 @@ void XMLShapeExport::ImpExport3DShape(
pInnerSequenceX = xPolyPolygon3D.SequenceX.getArray();
pInnerSequenceY = xPolyPolygon3D.SequenceY.getArray();
- for(a = 0L; a < nOuterSequenceCount; a++)
+ for (a = 0; a < nOuterSequenceCount; a++)
{
sal_Int32 nInnerSequenceCount(pInnerSequenceX->getLength());
double* pArrayX = pInnerSequenceX->getArray();
diff --git a/xmloff/source/draw/xexptran.cxx b/xmloff/source/draw/xexptran.cxx
index e486394988db..969e3a0d5f8f 100644
--- a/xmloff/source/draw/xexptran.cxx
+++ b/xmloff/source/draw/xexptran.cxx
@@ -1455,8 +1455,8 @@ SdXMLImExPointsElement::SdXMLImExPointsElement(const OUString& rNew,
// second loop
if(nNumPoints)
{
- nPos = 0L;
- maPoly.realloc(1L);
+ nPos = 0;
+ maPoly.realloc(1);
drawing::PointSequence* pOuterSequence = maPoly.getArray();
pOuterSequence->realloc(nNumPoints);
awt::Point* pInnerSequence = pOuterSequence->getArray();
@@ -2651,8 +2651,8 @@ SdXMLImExSvgDElement::SdXMLImExSvgDElement(const OUString& rNew,
while(nPos < nLen && Imp_IsOnNumberChar(aStr, nPos))
{
- sal_Int32 nX(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv));
- sal_Int32 nY(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv));
+ sal_Int32 nX(Imp_ImportNumberAndSpaces(0, aStr, nPos, nLen, rConv));
+ sal_Int32 nY(Imp_ImportNumberAndSpaces(0, aStr, nPos, nLen, rConv));
if(bRelative)
{
@@ -2682,8 +2682,8 @@ SdXMLImExSvgDElement::SdXMLImExSvgDElement(const OUString& rNew,
while(nPos < nLen && Imp_IsOnNumberChar(aStr, nPos))
{
- sal_Int32 nX(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv));
- sal_Int32 nY(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv));
+ sal_Int32 nX(Imp_ImportNumberAndSpaces(0, aStr, nPos, nLen, rConv));
+ sal_Int32 nY(Imp_ImportNumberAndSpaces(0, aStr, nPos, nLen, rConv));
if(bRelative)
{
@@ -2713,7 +2713,7 @@ SdXMLImExSvgDElement::SdXMLImExSvgDElement(const OUString& rNew,
while(nPos < nLen && Imp_IsOnNumberChar(aStr, nPos))
{
- sal_Int32 nX(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv));
+ sal_Int32 nX(Imp_ImportNumberAndSpaces(0, aStr, nPos, nLen, rConv));
sal_Int32 nY(mnLastY);
if(bRelative)
@@ -2741,7 +2741,7 @@ SdXMLImExSvgDElement::SdXMLImExSvgDElement(const OUString& rNew,
while(nPos < nLen && Imp_IsOnNumberChar(aStr, nPos))
{
sal_Int32 nX(mnLastX);
- sal_Int32 nY(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv));
+ sal_Int32 nY(Imp_ImportNumberAndSpaces(0, aStr, nPos, nLen, rConv));
if(bRelative)
nY += mnLastY;
@@ -2769,10 +2769,10 @@ SdXMLImExSvgDElement::SdXMLImExSvgDElement(const OUString& rNew,
{
sal_Int32 nX1;
sal_Int32 nY1;
- sal_Int32 nX2(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv));
- sal_Int32 nY2(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv));
- sal_Int32 nX(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv));
- sal_Int32 nY(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv));
+ sal_Int32 nX2(Imp_ImportNumberAndSpaces(0, aStr, nPos, nLen, rConv));
+ sal_Int32 nY2(Imp_ImportNumberAndSpaces(0, aStr, nPos, nLen, rConv));
+ sal_Int32 nX(Imp_ImportNumberAndSpaces(0, aStr, nPos, nLen, rConv));
+ sal_Int32 nY(Imp_ImportNumberAndSpaces(0, aStr, nPos, nLen, rConv));
if(bRelative)
{
@@ -2830,12 +2830,12 @@ SdXMLImExSvgDElement::SdXMLImExSvgDElement(const OUString& rNew,
while(nPos < nLen && Imp_IsOnNumberChar(aStr, nPos))
{
- sal_Int32 nX1(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv));
- sal_Int32 nY1(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv));
- sal_Int32 nX2(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv));
- sal_Int32 nY2(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv));
- sal_Int32 nX(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv));
- sal_Int32 nY(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv));
+ sal_Int32 nX1(Imp_ImportNumberAndSpaces(0, aStr, nPos, nLen, rConv));
+ sal_Int32 nY1(Imp_ImportNumberAndSpaces(0, aStr, nPos, nLen, rConv));
+ sal_Int32 nX2(Imp_ImportNumberAndSpaces(0, aStr, nPos, nLen, rConv));
+ sal_Int32 nY2(Imp_ImportNumberAndSpaces(0, aStr, nPos, nLen, rConv));
+ sal_Int32 nX(Imp_ImportNumberAndSpaces(0, aStr, nPos, nLen, rConv));
+ sal_Int32 nY(Imp_ImportNumberAndSpaces(0, aStr, nPos, nLen, rConv));
if(bRelative)
{
@@ -2879,10 +2879,10 @@ SdXMLImExSvgDElement::SdXMLImExSvgDElement(const OUString& rNew,
while(nPos < nLen && Imp_IsOnNumberChar(aStr, nPos))
{
- sal_Int32 nXX(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv));
- sal_Int32 nYY(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv));
- sal_Int32 nX(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv));
- sal_Int32 nY(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv));
+ sal_Int32 nXX(Imp_ImportNumberAndSpaces(0, aStr, nPos, nLen, rConv));
+ sal_Int32 nYY(Imp_ImportNumberAndSpaces(0, aStr, nPos, nLen, rConv));
+ sal_Int32 nX(Imp_ImportNumberAndSpaces(0, aStr, nPos, nLen, rConv));
+ sal_Int32 nY(Imp_ImportNumberAndSpaces(0, aStr, nPos, nLen, rConv));
if(bRelative)
{
@@ -2932,8 +2932,8 @@ SdXMLImExSvgDElement::SdXMLImExSvgDElement(const OUString& rNew,
{
sal_Int32 nXX;
sal_Int32 nYY;
- sal_Int32 nX(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv));
- sal_Int32 nY(Imp_ImportNumberAndSpaces(0L, aStr, nPos, nLen, rConv));
+ sal_Int32 nX(Imp_ImportNumberAndSpaces(0, aStr, nPos, nLen, rConv));
+ sal_Int32 nY(Imp_ImportNumberAndSpaces(0, aStr, nPos, nLen, rConv));
if(bRelative)
{
diff --git a/xmloff/source/style/MarkerStyle.cxx b/xmloff/source/style/MarkerStyle.cxx
index 4835691b5909..7f134bd65176 100644
--- a/xmloff/source/style/MarkerStyle.cxx
+++ b/xmloff/source/style/MarkerStyle.cxx
@@ -212,7 +212,7 @@ sal_Bool XMLMarkerStyleExport::exportXML(
sal_Int32 a, b;
sal_Bool bClosed(sal_False);
- for(a = 0L; a < nOuterCnt; a++)
+ for (a = 0; a < nOuterCnt; a++)
{
drawing::PointSequence* pSequence = pOuterSequence++;
const awt::Point *pPoints = pSequence->getConstArray();
@@ -229,7 +229,7 @@ sal_Bool XMLMarkerStyleExport::exportXML(
}
}
- for(b = 0L; b < nPointCount; b++)
+ for (b = 0; b < nPointCount; b++)
{
const awt::Point aPoint = pPoints[b];
@@ -259,7 +259,7 @@ sal_Bool XMLMarkerStyleExport::exportXML(
drawing::FlagSequence* pOuterFlags = aBezier.Flags.getArray();
SdXMLImExSvgDElement aSvgDElement(aViewBox);
- for(a = 0L; a < nOuterCnt; a++)
+ for (a = 0; a < nOuterCnt; a++)
{
drawing::PointSequence* pSequence = pOuterSequence++;
drawing::FlagSequence* pFlags = pOuterFlags++;
diff --git a/xmloff/source/style/fonthdl.cxx b/xmloff/source/style/fonthdl.cxx
index 89ad6e9db8b8..c91a7edcfc03 100644
--- a/xmloff/source/style/fonthdl.cxx
+++ b/xmloff/source/style/fonthdl.cxx
@@ -136,12 +136,12 @@ sal_Bool XMLFontFamilyNamePropHdl::exportXML( OUString& rStrExpValue, const uno:
if( rValue >>= aStrFamilyName )
{
OUStringBuffer sValue( aStrFamilyName.getLength() + 2L );
- sal_Int32 nPos = 0L;
+ sal_Int32 nPos = 0;
do
{
sal_Int32 nFirst = nPos;
nPos = aStrFamilyName.indexOf( sal_Unicode(';'), nPos );
- sal_Int32 nLast = (-1L == nPos ? aStrFamilyName.getLength() : nPos);
+ sal_Int32 nLast = (-1 == nPos ? aStrFamilyName.getLength() : nPos);
// Set position to the character behind the ';', so we won't
// forget this.
@@ -173,7 +173,7 @@ sal_Bool XMLFontFamilyNamePropHdl::exportXML( OUString& rStrExpValue, const uno:
sValue.append( sal_Unicode( ',' ) );
sValue.append( sal_Unicode( ' ' ));
}
- sal_Int32 nLen = nLast-nFirst+1L;
+ sal_Int32 nLen = nLast-nFirst+1;
OUString sFamily( aStrFamilyName.copy( nFirst, nLen ) );
sal_Bool bQuote = sal_False;
for( sal_Int32 i=0; i < nLen; i++ )
diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx
index 7306c7d5f0de..72efeabaaca4 100644
--- a/xmloff/source/style/xmlnumi.cxx
+++ b/xmloff/source/style/xmlnumi.cxx
@@ -374,7 +374,7 @@ SvxXMLListLevelStyleContext_Impl::SvxXMLListLevelStyleContext_Impl(
if( nLevel >= 1L )
nLevel--;
else
- nLevel = 0L;
+ nLevel = 0;
break;
case XML_TOK_TEXT_LEVEL_ATTR_STYLE_NAME:
sTextStyleName = rValue;
@@ -471,7 +471,7 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties(
{
sal_Int16 eType;
- sal_Int32 nCount = 0L;
+ sal_Int32 nCount = 0;
if( bBullet )
{
eType = NumberingType::CHAR_SPECIAL;
@@ -480,7 +480,7 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties(
if( bImage )
{
eType = NumberingType::BITMAP;
- nCount = 15L;
+ nCount = 15;
if( (sImageURL.getLength() > 0L) || xBase64Stream.is() )
nCount++;
@@ -490,7 +490,7 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties(
eType = NumberingType::ARABIC;
GetImport().GetMM100UnitConverter().convertNumFormat(
eType, sNumFormat, sNumLetterSync, sal_True );
- nCount = 15L;
+ nCount = 15;
}
if( ( bBullet || bNum ) && nRelSize )
@@ -505,7 +505,7 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties(
if( nCount > 0 )
{
beans::PropertyValue *pProps = aPropSeq.getArray();
- sal_Int32 nPos = 0L;
+ sal_Int32 nPos = 0;
pProps[nPos].Name =
OUString::createFromAscii( XML_UNO_NAME_NRULE_NUMBERINGTYPE );
pProps[nPos++].Value <<= (sal_Int16)eType ;
diff --git a/xmloff/source/text/XMLTextMarkImportContext.cxx b/xmloff/source/text/XMLTextMarkImportContext.cxx
index 00cdce37f4d5..922777808734 100644
--- a/xmloff/source/text/XMLTextMarkImportContext.cxx
+++ b/xmloff/source/text/XMLTextMarkImportContext.cxx
@@ -287,7 +287,12 @@ void XMLTextMarkImportContext::EndElement()
Reference<XTextCursor> xInsertionCursor =
m_rHelper.GetText()->createTextCursorByRange(
xEndRange);
+ try {
xInsertionCursor->gotoRange(xStartRange, sal_True);
+ } catch (uno::Exception&) {
+ OSL_ENSURE(false,
+ "cannot go to end position of bookmark");
+ }
//DBG_ASSERT(! xInsertionCursor->isCollapsed(),
// "we want no point mark");
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 140656fd4298..4b6eba9a5f43 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -3423,7 +3423,7 @@ void XMLTextParagraphExport::exportTextRange(
void XMLTextParagraphExport::exportText( const OUString& rText,
sal_Bool& rPrevCharIsSpace )
{
- sal_Int32 nExpStartPos = 0L;
+ sal_Int32 nExpStartPos = 0;
sal_Int32 nEndPos = rText.getLength();
sal_Int32 nSpaceChars = 0;
for( sal_Int32 nPos = 0; nPos < nEndPos; nPos++ )
diff --git a/xmloff/source/transform/FormPropOASISTContext.cxx b/xmloff/source/transform/FormPropOASISTContext.cxx
index 91452183e13e..57ec2b33cf20 100644
--- a/xmloff/source/transform/FormPropOASISTContext.cxx
+++ b/xmloff/source/transform/FormPropOASISTContext.cxx
@@ -53,7 +53,7 @@ XMLTokenEnum XMLFormPropOASISTransformerContext::GetValueType(
sal_Bool bNeg = sal_False;
sal_uInt32 nVal = 0;
- sal_Int32 nPos = 0L;
+ sal_Int32 nPos = 0;
sal_Int32 nLen = rValue.getLength();
// skip white space
diff --git a/xmloff/source/transform/PropertyActionsOOo.cxx b/xmloff/source/transform/PropertyActionsOOo.cxx
index 34b5ef85560b..bb3e66ff13b6 100644
--- a/xmloff/source/transform/PropertyActionsOOo.cxx
+++ b/xmloff/source/transform/PropertyActionsOOo.cxx
@@ -645,6 +645,10 @@ XMLTransformerActionInit aTextPropertyOOoAttrActionTable[] =
NO_PARAMS }, /* generated entry */
{ XML_NAMESPACE_FO, XML_HYPHENATION_PUSH_CHAR_COUNT, XML_ATACTION_COPY,
NO_PARAMS }, /* generated entry */
+ { XML_NAMESPACE_STYLE, XML_TEXT_OVERLINE_STYLE, XML_ATACTION_REMOVE,
+ NO_PARAMS }, /* #i113645# */
+ { XML_NAMESPACE_STYLE, XML_TEXT_OVERLINE_COLOR, XML_ATACTION_REMOVE,
+ NO_PARAMS }, /* #i113645# */
{ XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT, NO_PARAMS }
};
diff --git a/xmloff/source/transform/TransformerBase.cxx b/xmloff/source/transform/TransformerBase.cxx
index 9df6ed0c461e..d8b6a51ebc00 100644
--- a/xmloff/source/transform/TransformerBase.cxx
+++ b/xmloff/source/transform/TransformerBase.cxx
@@ -616,8 +616,8 @@ XMLMutableAttributeList *XMLTransformerBase::ProcessAttrList(
// --> OD 2004-10-29 #i13778#,#i36248#
// apply correct twip-to-1/100mm
nMeasure = (sal_Int32)( nMeasure >= 0
- ? ((nMeasure*127L+36L)/72L)
- : ((nMeasure*127L-36L)/72L) );
+ ? ((nMeasure*127+36)/72)
+ : ((nMeasure*127-36)/72) );
// <--
rtl::OUStringBuffer aBuffer;
@@ -778,8 +778,8 @@ XMLMutableAttributeList *XMLTransformerBase::ProcessAttrList(
// --> OD 2004-10-29 #i13778#,#i36248#
// apply correct 1/100mm-to-twip conversion
nMeasure = (sal_Int32)( nMeasure >= 0
- ? ((nMeasure*72L+63L)/127L)
- : ((nMeasure*72L-63L)/127L) );
+ ? ((nMeasure*72+63)/127)
+ : ((nMeasure*72-63)/127) );
// <--
OUStringBuffer aBuffer;
@@ -1201,7 +1201,7 @@ sal_Bool XMLTransformerBase::NegPercent( OUString& rValue )
sal_Bool bNeg = sal_False;
double nVal = 0;
- sal_Int32 nPos = 0L;
+ sal_Int32 nPos = 0;
sal_Int32 nLen = rValue.getLength();
// skip white space
diff --git a/xpdf/makefile.mk b/xpdf/makefile.mk
index c3dea0f006d5..452ab84fd0e4 100644
--- a/xpdf/makefile.mk
+++ b/xpdf/makefile.mk
@@ -48,7 +48,7 @@ dummy:
TARFILE_NAME=xpdf-3.02
TARFILE_MD5=599dc4cc65a07ee868cf92a667a913d2
-PATCH_FILES=$(TARFILE_NAME).patch
+PATCH_FILES=$(TARFILE_NAME).patch xpdf-3.02-sec.patch
CONFIGURE_DIR=
BUILD_DIR=$(CONFIGURE_DIR)
diff --git a/xpdf/xpdf-3.02-sec.patch b/xpdf/xpdf-3.02-sec.patch
new file mode 100644
index 000000000000..a33b85e8ab17
--- /dev/null
+++ b/xpdf/xpdf-3.02-sec.patch
@@ -0,0 +1,29 @@
+--- misc/xpdf-3.02/fofi/FoFiType1.cc 2007-02-27 23:05:51.000000000 +0100
++++ misc/build/xpdf-3.02/fofi/FoFiType1.cc 2010-10-20 18:10:09.000000000 +0200
+@@ -224,7 +224,7 @@
+ code = code * 8 + (*p2 - '0');
+ }
+ }
+- if (code < 256) {
++ if (code < 256 && code >= 0) {
+ for (p = p2; *p == ' ' || *p == '\t'; ++p) ;
+ if (*p == '/') {
+ ++p;
+--- misc/xpdf-3.02/xpdf/Gfx.cc 2007-02-27 23:05:52.000000000 +0100
++++ misc/build/xpdf-3.02/xpdf/Gfx.cc 2010-10-20 18:14:32.000000000 +0200
+@@ -444,6 +444,7 @@
+ xref = xrefA;
+ subPage = gFalse;
+ printCommands = globalParams->getPrintCommands();
++ parser = NULL;
+
+ // start the resource stack
+ res = new GfxResources(xref, resDict, NULL);
+@@ -486,6 +487,7 @@
+ xref = xrefA;
+ subPage = gTrue;
+ printCommands = globalParams->getPrintCommands();
++ parser = NULL;
+
+ // start the resource stack
+ res = new GfxResources(xref, resDict, NULL);