summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/addin/inc/addin.h3
-rw-r--r--sc/inc/AccessibleFilterMenu.hxx3
-rw-r--r--sc/inc/AccessibleFilterMenuItem.hxx3
-rw-r--r--sc/inc/AccessibleFilterTopWindow.hxx3
-rw-r--r--sc/inc/AccessibleGlobal.hxx3
-rw-r--r--sc/inc/ViewSettingsSequenceDefines.hxx3
-rw-r--r--sc/inc/addincfg.hxx2
-rw-r--r--sc/inc/addincol.hxx2
-rw-r--r--sc/inc/address.hxx5
-rw-r--r--sc/inc/addruno.hxx4
-rw-r--r--sc/inc/afmtuno.hxx2
-rw-r--r--sc/inc/appluno.hxx2
-rw-r--r--sc/inc/appoptio.hxx7
-rw-r--r--sc/inc/arealink.hxx2
-rw-r--r--sc/inc/attarray.hxx2
-rw-r--r--sc/inc/attrib.hxx2
-rw-r--r--sc/inc/autoform.hxx3
-rw-r--r--sc/inc/autonamecache.hxx2
-rw-r--r--sc/inc/bigrange.hxx3
-rw-r--r--sc/inc/brdcst.hxx3
-rw-r--r--sc/inc/callform.hxx3
-rw-r--r--sc/inc/cell.hxx4
-rw-r--r--sc/inc/cellform.hxx2
-rw-r--r--sc/inc/cellsuno.hxx2
-rw-r--r--sc/inc/cfgids.hxx2
-rw-r--r--sc/inc/chart2uno.hxx3
-rw-r--r--sc/inc/chartarr.hxx2
-rw-r--r--sc/inc/charthelper.hxx3
-rw-r--r--sc/inc/chartlis.hxx2
-rw-r--r--sc/inc/chartlock.hxx3
-rw-r--r--sc/inc/chartpos.hxx2
-rw-r--r--sc/inc/chartuno.hxx2
-rw-r--r--sc/inc/chgtrack.hxx2
-rw-r--r--sc/inc/chgviset.hxx2
-rw-r--r--sc/inc/clipparam.hxx3
-rw-r--r--sc/inc/collect.hxx3
-rw-r--r--sc/inc/column.hxx2
-rw-r--r--sc/inc/compiler.hxx5
-rw-r--r--sc/inc/compressedarray.hxx3
-rw-r--r--sc/inc/conditio.hxx2
-rw-r--r--sc/inc/confuno.hxx2
-rw-r--r--sc/inc/consoli.hxx2
-rw-r--r--sc/inc/convuno.hxx2
-rw-r--r--sc/inc/cursuno.hxx2
-rw-r--r--sc/inc/dapiuno.hxx2
-rw-r--r--sc/inc/datauno.hxx2
-rw-r--r--sc/inc/dbcolect.hxx3
-rw-r--r--sc/inc/dbdocutl.hxx2
-rw-r--r--sc/inc/dbtoken.hxx2
-rw-r--r--sc/inc/defltuno.hxx2
-rw-r--r--sc/inc/detdata.hxx3
-rw-r--r--sc/inc/detfunc.hxx3
-rw-r--r--sc/inc/dispuno.hxx2
-rw-r--r--sc/inc/dociter.hxx2
-rw-r--r--sc/inc/docoptio.hxx37
-rw-r--r--sc/inc/docparam.hxx3
-rw-r--r--sc/inc/docpool.hxx3
-rw-r--r--sc/inc/document.hxx29
-rw-r--r--sc/inc/docuno.hxx2
-rw-r--r--sc/inc/dpcachetable.hxx3
-rw-r--r--sc/inc/dpdimsave.hxx2
-rw-r--r--sc/inc/dpglobal.hxx3
-rw-r--r--sc/inc/dpgroup.hxx2
-rw-r--r--sc/inc/dpobject.hxx2
-rw-r--r--sc/inc/dpoutput.hxx2
-rw-r--r--sc/inc/dpoutputgeometry.hxx3
-rw-r--r--sc/inc/dpsave.hxx2
-rw-r--r--sc/inc/dpsdbtab.hxx2
-rw-r--r--sc/inc/dpshttab.hxx2
-rw-r--r--sc/inc/dptabdat.hxx2
-rw-r--r--sc/inc/dptablecache.hxx3
-rw-r--r--sc/inc/dptabres.hxx2
-rw-r--r--sc/inc/dptabsrc.hxx2
-rw-r--r--sc/inc/drawattr.hxx2
-rw-r--r--sc/inc/drawpage.hxx2
-rw-r--r--sc/inc/drdefuno.hxx2
-rw-r--r--sc/inc/drwlayer.hxx7
-rw-r--r--sc/inc/editsrc.hxx2
-rw-r--r--sc/inc/editutil.hxx2
-rw-r--r--sc/inc/eventuno.hxx2
-rw-r--r--sc/inc/externalrefmgr.hxx3
-rw-r--r--sc/inc/fielduno.hxx2
-rw-r--r--sc/inc/fillinfo.hxx2
-rw-r--r--sc/inc/filter.hxx2
-rw-r--r--sc/inc/filtopt.hxx2
-rw-r--r--sc/inc/filtuno.hxx2
-rw-r--r--sc/inc/fmtuno.hxx2
-rw-r--r--sc/inc/forbiuno.hxx2
-rw-r--r--sc/inc/formulaparserpool.hxx2
-rw-r--r--sc/inc/formularesult.hxx3
-rw-r--r--sc/inc/funcdesc.hxx3
-rw-r--r--sc/inc/funcuno.hxx2
-rw-r--r--sc/inc/global.hxx4
-rw-r--r--sc/inc/globstr.hrc22
-rw-r--r--sc/inc/hints.hxx3
-rw-r--r--sc/inc/inputopt.hxx2
-rw-r--r--sc/inc/linkuno.hxx2
-rw-r--r--sc/inc/listenercalls.hxx2
-rw-r--r--sc/inc/lookupcache.hxx3
-rw-r--r--sc/inc/macromgr.hxx72
-rw-r--r--sc/inc/markarr.hxx2
-rw-r--r--sc/inc/markdata.hxx2
-rw-r--r--sc/inc/miscuno.hxx2
-rw-r--r--sc/inc/mutexhlp.hxx2
-rw-r--r--sc/inc/nameuno.hxx2
-rw-r--r--sc/inc/navicfg.hxx2
-rw-r--r--sc/inc/notesuno.hxx2
-rw-r--r--sc/inc/olinetab.hxx2
-rw-r--r--sc/inc/optuno.hxx2
-rw-r--r--sc/inc/optutil.hxx5
-rw-r--r--sc/inc/pagepar.hxx2
-rw-r--r--sc/inc/pageuno.hxx2
-rw-r--r--sc/inc/paramisc.hxx2
-rw-r--r--sc/inc/patattr.hxx3
-rw-r--r--sc/inc/pch/precompiled_sc.cxx3
-rw-r--r--sc/inc/pch/precompiled_sc.hxx5
-rw-r--r--sc/inc/pivot.hxx3
-rw-r--r--sc/inc/postit.hxx3
-rw-r--r--sc/inc/printopt.hxx3
-rw-r--r--sc/inc/prnsave.hxx2
-rw-r--r--sc/inc/progress.hxx2
-rw-r--r--sc/inc/queryparam.hxx3
-rw-r--r--sc/inc/rangelst.hxx3
-rw-r--r--sc/inc/rangenam.hxx4
-rw-r--r--sc/inc/rangeseq.hxx2
-rw-r--r--sc/inc/rangeutl.hxx2
-rw-r--r--sc/inc/rechead.hxx2
-rw-r--r--sc/inc/recursionhelper.hxx3
-rw-r--r--sc/inc/refdata.hxx3
-rw-r--r--sc/inc/reffind.hxx2
-rw-r--r--sc/inc/refreshtimer.hxx10
-rw-r--r--sc/inc/reftokenhelper.hxx3
-rw-r--r--sc/inc/sc.hrc11
-rw-r--r--sc/inc/scabstdlg.hxx15
-rw-r--r--sc/inc/scdll.hxx2
-rw-r--r--sc/inc/scdllapi.h3
-rw-r--r--sc/inc/scerrors.hxx2
-rw-r--r--sc/inc/scextopt.hxx2
-rw-r--r--sc/inc/scitems.hxx2
-rw-r--r--sc/inc/scmatrix.hxx3
-rw-r--r--sc/inc/scmod.hxx6
-rw-r--r--sc/inc/scresid.hxx2
-rw-r--r--sc/inc/scwarngs.hxx2
-rw-r--r--sc/inc/segmenttree.hxx3
-rw-r--r--sc/inc/servuno.hxx2
-rw-r--r--sc/inc/shapeuno.hxx4
-rw-r--r--sc/inc/sheetdata.hxx2
-rw-r--r--sc/inc/sheetevents.hxx2
-rw-r--r--sc/inc/shellids.hxx2
-rw-r--r--sc/inc/simplerangelist.hxx3
-rw-r--r--sc/inc/sortparam.hxx3
-rw-r--r--sc/inc/srchuno.hxx2
-rw-r--r--sc/inc/stlpool.hxx2
-rw-r--r--sc/inc/stlsheet.hxx2
-rw-r--r--sc/inc/stringutil.hxx3
-rw-r--r--sc/inc/strload.hxx2
-rw-r--r--sc/inc/styleuno.hxx2
-rw-r--r--sc/inc/subtotal.hxx2
-rw-r--r--sc/inc/tabbgcolor.hxx3
-rw-r--r--sc/inc/table.hxx5
-rw-r--r--sc/inc/tablink.hxx3
-rw-r--r--sc/inc/tabopparams.hxx2
-rw-r--r--sc/inc/tabprotection.hxx3
-rw-r--r--sc/inc/targuno.hxx2
-rw-r--r--sc/inc/textuno.hxx2
-rw-r--r--sc/inc/token.hxx3
-rw-r--r--sc/inc/tokenarray.hxx2
-rw-r--r--sc/inc/tokenuno.hxx2
-rw-r--r--sc/inc/unitconv.hxx2
-rw-r--r--sc/inc/unonames.hxx8
-rw-r--r--sc/inc/unoreflist.hxx2
-rw-r--r--sc/inc/unowids.hxx2
-rw-r--r--sc/inc/userdat.hxx6
-rw-r--r--sc/inc/userlist.hxx2
-rw-r--r--sc/inc/validat.hxx2
-rw-r--r--sc/inc/viewopti.hxx3
-rw-r--r--sc/inc/viewuno.hxx10
-rw-r--r--sc/inc/waitoff.hxx3
-rw-r--r--sc/inc/warnpassword.hxx2
-rw-r--r--sc/inc/xmlwrap.hxx2
-rw-r--r--sc/inc/zforauto.hxx2
-rwxr-xr-xsc/prj/build.lst1
-rw-r--r--sc/qa/unit/export.map7
-rw-r--r--sc/qa/unit/makefile.mk137
-rw-r--r--sc/qa/unit/ucalc.cxx104
-rw-r--r--sc/sdi/cellsh.sdi1
-rw-r--r--sc/sdi/drawsh.sdi6
-rw-r--r--sc/sdi/scalc.sdi115
-rw-r--r--sc/source/core/data/attarray.cxx338
-rw-r--r--sc/source/core/data/attrib.cxx2
-rw-r--r--sc/source/core/data/autonamecache.cxx2
-rw-r--r--sc/source/core/data/bcaslot.cxx3
-rw-r--r--sc/source/core/data/cell.cxx49
-rw-r--r--sc/source/core/data/cell2.cxx6
-rw-r--r--sc/source/core/data/clipparam.cxx3
-rw-r--r--sc/source/core/data/column.cxx32
-rw-r--r--sc/source/core/data/column2.cxx2
-rw-r--r--sc/source/core/data/column3.cxx27
-rw-r--r--sc/source/core/data/compressedarray.cxx3
-rw-r--r--sc/source/core/data/conditio.cxx3
-rw-r--r--sc/source/core/data/dbdocutl.cxx2
-rw-r--r--sc/source/core/data/dociter.cxx7
-rw-r--r--sc/source/core/data/docparam.cxx3
-rw-r--r--sc/source/core/data/docpool.cxx2
-rw-r--r--sc/source/core/data/documen2.cxx9
-rw-r--r--sc/source/core/data/documen3.cxx10
-rw-r--r--sc/source/core/data/documen4.cxx2
-rw-r--r--sc/source/core/data/documen5.cxx11
-rw-r--r--sc/source/core/data/documen6.cxx2
-rw-r--r--sc/source/core/data/documen7.cxx2
-rw-r--r--sc/source/core/data/documen8.cxx10
-rw-r--r--sc/source/core/data/documen9.cxx11
-rw-r--r--sc/source/core/data/document.cxx172
-rw-r--r--sc/source/core/data/dpcachetable.cxx3
-rw-r--r--sc/source/core/data/dpdimsave.cxx2
-rw-r--r--sc/source/core/data/dpglobal.cxx2
-rw-r--r--sc/source/core/data/dpgroup.cxx2
-rw-r--r--sc/source/core/data/dpobject.cxx5
-rw-r--r--sc/source/core/data/dpoutput.cxx2
-rw-r--r--sc/source/core/data/dpoutputgeometry.cxx3
-rw-r--r--sc/source/core/data/dpsave.cxx2
-rw-r--r--sc/source/core/data/dpsdbtab.cxx2
-rw-r--r--sc/source/core/data/dpshttab.cxx2
-rw-r--r--sc/source/core/data/dptabdat.cxx3
-rw-r--r--sc/source/core/data/dptablecache.cxx3
-rw-r--r--sc/source/core/data/dptabres.cxx3
-rw-r--r--sc/source/core/data/dptabsrc.cxx12
-rw-r--r--sc/source/core/data/drawpage.cxx2
-rw-r--r--sc/source/core/data/drwlayer.cxx45
-rw-r--r--sc/source/core/data/fillinfo.cxx2
-rw-r--r--sc/source/core/data/global.cxx2
-rw-r--r--sc/source/core/data/global2.cxx2
-rw-r--r--sc/source/core/data/globalx.cxx3
-rw-r--r--sc/source/core/data/makefile.mk2
-rw-r--r--sc/source/core/data/markarr.cxx2
-rw-r--r--sc/source/core/data/markdata.cxx2
-rw-r--r--sc/source/core/data/olinetab.cxx2
-rw-r--r--sc/source/core/data/pagepar.cxx3
-rw-r--r--sc/source/core/data/patattr.cxx2
-rw-r--r--sc/source/core/data/pivot2.cxx2
-rw-r--r--sc/source/core/data/poolhelp.cxx2
-rw-r--r--sc/source/core/data/postit.cxx3
-rw-r--r--sc/source/core/data/scdpoutputimpl.cxx3
-rw-r--r--sc/source/core/data/scdpoutputimpl.hxx3
-rw-r--r--sc/source/core/data/segmenttree.cxx2
-rw-r--r--sc/source/core/data/sheetevents.cxx2
-rw-r--r--sc/source/core/data/sortparam.cxx16
-rw-r--r--sc/source/core/data/stlpool.cxx2
-rw-r--r--sc/source/core/data/stlsheet.cxx2
-rw-r--r--sc/source/core/data/tabbgcolor.cxx3
-rw-r--r--sc/source/core/data/table1.cxx2
-rw-r--r--sc/source/core/data/table2.cxx6
-rw-r--r--sc/source/core/data/table3.cxx2
-rw-r--r--sc/source/core/data/table4.cxx10
-rw-r--r--sc/source/core/data/table5.cxx2
-rw-r--r--sc/source/core/data/table6.cxx3
-rw-r--r--sc/source/core/data/tabprotection.cxx2
-rw-r--r--sc/source/core/data/userdat.cxx2
-rw-r--r--sc/source/core/data/validat.cxx12
-rw-r--r--sc/source/core/inc/addinhelpid.hxx2
-rw-r--r--sc/source/core/inc/addinlis.hxx2
-rw-r--r--sc/source/core/inc/adiasync.hxx3
-rw-r--r--sc/source/core/inc/bcaslot.hxx3
-rw-r--r--sc/source/core/inc/cellkeytranslator.hxx3
-rw-r--r--sc/source/core/inc/core_pch.hxx2
-rw-r--r--sc/source/core/inc/ddelink.hxx2
-rw-r--r--sc/source/core/inc/doubleref.hxx3
-rw-r--r--sc/source/core/inc/interpre.hxx27
-rw-r--r--sc/source/core/inc/jumpmatrix.hxx2
-rw-r--r--sc/source/core/inc/parclass.hxx2
-rw-r--r--sc/source/core/inc/poolhelp.hxx6
-rw-r--r--sc/source/core/inc/refupdat.hxx2
-rw-r--r--sc/source/core/inc/scrdata.hxx2
-rw-r--r--sc/source/core/src/makefile.mk2
-rw-r--r--sc/source/core/tool/addincfg.cxx2
-rw-r--r--sc/source/core/tool/addincol.cxx18
-rw-r--r--sc/source/core/tool/addinhelpid.cxx2
-rw-r--r--sc/source/core/tool/addinlis.cxx20
-rw-r--r--sc/source/core/tool/address.cxx33
-rw-r--r--sc/source/core/tool/adiasync.cxx2
-rw-r--r--sc/source/core/tool/appoptio.cxx6
-rw-r--r--sc/source/core/tool/autoform.cxx27
-rw-r--r--sc/source/core/tool/callform.cxx2
-rw-r--r--sc/source/core/tool/cellform.cxx16
-rw-r--r--sc/source/core/tool/cellkeytranslator.cxx3
-rw-r--r--sc/source/core/tool/chartarr.cxx2
-rw-r--r--sc/source/core/tool/charthelper.cxx3
-rw-r--r--sc/source/core/tool/chartlis.cxx2
-rw-r--r--sc/source/core/tool/chartlock.cxx3
-rw-r--r--sc/source/core/tool/chartpos.cxx3
-rw-r--r--sc/source/core/tool/chgtrack.cxx3
-rw-r--r--sc/source/core/tool/chgviset.cxx13
-rw-r--r--sc/source/core/tool/collect.cxx2
-rw-r--r--sc/source/core/tool/compiler.cxx21
-rw-r--r--sc/source/core/tool/consoli.cxx2
-rw-r--r--sc/source/core/tool/dbcolect.cxx2
-rw-r--r--sc/source/core/tool/ddelink.cxx2
-rw-r--r--sc/source/core/tool/detdata.cxx2
-rw-r--r--sc/source/core/tool/detfunc.cxx2
-rw-r--r--sc/source/core/tool/docoptio.cxx65
-rw-r--r--sc/source/core/tool/doubleref.cxx2
-rw-r--r--sc/source/core/tool/editutil.cxx3
-rw-r--r--sc/source/core/tool/filtopt.cxx2
-rw-r--r--sc/source/core/tool/formulaparserpool.cxx2
-rw-r--r--sc/source/core/tool/hints.cxx2
-rw-r--r--sc/source/core/tool/inputopt.cxx2
-rw-r--r--sc/source/core/tool/interpr1.cxx40
-rw-r--r--sc/source/core/tool/interpr2.cxx7
-rw-r--r--sc/source/core/tool/interpr3.cxx19
-rw-r--r--sc/source/core/tool/interpr4.cxx234
-rw-r--r--sc/source/core/tool/interpr5.cxx8
-rw-r--r--sc/source/core/tool/interpr6.cxx3
-rw-r--r--sc/source/core/tool/lookupcache.cxx3
-rw-r--r--sc/source/core/tool/makefile.mk2
-rw-r--r--sc/source/core/tool/navicfg.cxx2
-rw-r--r--sc/source/core/tool/odffmap.cxx6
-rw-r--r--sc/source/core/tool/optutil.cxx2
-rw-r--r--sc/source/core/tool/parclass.cxx2
-rw-r--r--sc/source/core/tool/printopt.cxx2
-rw-r--r--sc/source/core/tool/prnsave.cxx2
-rw-r--r--sc/source/core/tool/progress.cxx2
-rw-r--r--sc/source/core/tool/queryparam.cxx2
-rw-r--r--sc/source/core/tool/rangelst.cxx21
-rw-r--r--sc/source/core/tool/rangenam.cxx2
-rw-r--r--sc/source/core/tool/rangeseq.cxx2
-rw-r--r--sc/source/core/tool/rangeutl.cxx2
-rw-r--r--sc/source/core/tool/rechead.cxx2
-rw-r--r--sc/source/core/tool/refdata.cxx3
-rw-r--r--sc/source/core/tool/reffind.cxx2
-rw-r--r--sc/source/core/tool/refreshtimer.cxx6
-rw-r--r--sc/source/core/tool/reftokenhelper.cxx23
-rw-r--r--sc/source/core/tool/refupdat.cxx2
-rw-r--r--sc/source/core/tool/scmatrix.cxx2
-rw-r--r--sc/source/core/tool/simplerangelist.cxx3
-rw-r--r--sc/source/core/tool/stringutil.cxx3
-rw-r--r--sc/source/core/tool/subtotal.cxx3
-rw-r--r--sc/source/core/tool/token.cxx2
-rw-r--r--sc/source/core/tool/unitconv.cxx2
-rw-r--r--sc/source/core/tool/userlist.cxx2
-rw-r--r--sc/source/core/tool/viewopti.cxx2
-rw-r--r--sc/source/core/tool/zforauto.cxx3
-rw-r--r--sc/source/filter/dif/difexp.cxx2
-rw-r--r--sc/source/filter/dif/difimp.cxx2
-rw-r--r--sc/source/filter/dif/makefile.mk2
-rw-r--r--sc/source/filter/excel/colrowst.cxx2
-rw-r--r--sc/source/filter/excel/excdoc.cxx111
-rw-r--r--sc/source/filter/excel/excel.cxx21
-rw-r--r--sc/source/filter/excel/excform.cxx59
-rw-r--r--sc/source/filter/excel/excform8.cxx7
-rw-r--r--sc/source/filter/excel/excimp8.cxx29
-rw-r--r--sc/source/filter/excel/excrecds.cxx30
-rw-r--r--sc/source/filter/excel/exctools.cxx2
-rw-r--r--sc/source/filter/excel/expop2.cxx72
-rw-r--r--sc/source/filter/excel/fontbuff.cxx2
-rw-r--r--sc/source/filter/excel/frmbase.cxx2
-rw-r--r--sc/source/filter/excel/impop.cxx3
-rw-r--r--sc/source/filter/excel/makefile.mk6
-rw-r--r--sc/source/filter/excel/namebuff.cxx2
-rw-r--r--sc/source/filter/excel/read.cxx66
-rw-r--r--sc/source/filter/excel/tokstack.cxx8
-rw-r--r--sc/source/filter/excel/xechart.cxx2
-rw-r--r--sc/source/filter/excel/xecontent.cxx35
-rw-r--r--sc/source/filter/excel/xeescher.cxx407
-rw-r--r--sc/source/filter/excel/xeformula.cxx9
-rw-r--r--sc/source/filter/excel/xehelper.cxx2
-rw-r--r--sc/source/filter/excel/xelink.cxx2
-rw-r--r--sc/source/filter/excel/xename.cxx4
-rw-r--r--sc/source/filter/excel/xepage.cxx52
-rw-r--r--sc/source/filter/excel/xepivot.cxx160
-rw-r--r--sc/source/filter/excel/xerecord.cxx2
-rw-r--r--sc/source/filter/excel/xeroot.cxx2
-rw-r--r--sc/source/filter/excel/xestream.cxx427
-rw-r--r--sc/source/filter/excel/xestring.cxx8
-rw-r--r--sc/source/filter/excel/xestyle.cxx72
-rw-r--r--sc/source/filter/excel/xetable.cxx213
-rw-r--r--sc/source/filter/excel/xeview.cxx2
-rw-r--r--sc/source/filter/excel/xichart.cxx2
-rw-r--r--sc/source/filter/excel/xicontent.cxx19
-rw-r--r--sc/source/filter/excel/xiescher.cxx164
-rw-r--r--sc/source/filter/excel/xiformula.cxx2
-rw-r--r--sc/source/filter/excel/xihelper.cxx2
-rw-r--r--sc/source/filter/excel/xilink.cxx2
-rw-r--r--sc/source/filter/excel/xiname.cxx31
-rw-r--r--sc/source/filter/excel/xipage.cxx2
-rw-r--r--sc/source/filter/excel/xipivot.cxx2
-rw-r--r--sc/source/filter/excel/xiroot.cxx3
-rw-r--r--sc/source/filter/excel/xistream.cxx2
-rw-r--r--sc/source/filter/excel/xistring.cxx2
-rw-r--r--sc/source/filter/excel/xistyle.cxx65
-rw-r--r--sc/source/filter/excel/xiview.cxx2
-rw-r--r--sc/source/filter/excel/xladdress.cxx2
-rw-r--r--sc/source/filter/excel/xlchart.cxx3
-rw-r--r--sc/source/filter/excel/xlescher.cxx5
-rw-r--r--sc/source/filter/excel/xlformula.cxx2
-rw-r--r--sc/source/filter/excel/xlpage.cxx32
-rw-r--r--sc/source/filter/excel/xlpivot.cxx2
-rw-r--r--sc/source/filter/excel/xlroot.cxx13
-rw-r--r--sc/source/filter/excel/xlstyle.cxx2
-rw-r--r--sc/source/filter/excel/xltoolbar.cxx434
-rw-r--r--sc/source/filter/excel/xltoolbar.hxx98
-rw-r--r--sc/source/filter/excel/xltools.cxx10
-rw-r--r--sc/source/filter/excel/xltracer.cxx2
-rw-r--r--sc/source/filter/excel/xlview.cxx2
-rw-r--r--sc/source/filter/ftools/fapihelper.cxx2
-rw-r--r--sc/source/filter/ftools/fprogressbar.cxx2
-rw-r--r--sc/source/filter/ftools/ftools.cxx2
-rw-r--r--sc/source/filter/ftools/makefile.mk2
-rw-r--r--sc/source/filter/html/htmlexp.cxx9
-rw-r--r--sc/source/filter/html/htmlexp2.cxx2
-rw-r--r--sc/source/filter/html/htmlimp.cxx2
-rw-r--r--sc/source/filter/html/htmlpars.cxx2
-rw-r--r--sc/source/filter/html/makefile.mk2
-rw-r--r--sc/source/filter/inc/XclExpChangeTrack.hxx48
-rw-r--r--sc/source/filter/inc/XclImpChangeTrack.hxx2
-rw-r--r--sc/source/filter/inc/biff.hxx2
-rw-r--r--sc/source/filter/inc/colrowst.hxx2
-rw-r--r--sc/source/filter/inc/decl.h2
-rw-r--r--sc/source/filter/inc/dif.hxx2
-rw-r--r--sc/source/filter/inc/eeimport.hxx3
-rw-r--r--sc/source/filter/inc/eeparser.hxx2
-rw-r--r--sc/source/filter/inc/excdefs.hxx2
-rw-r--r--sc/source/filter/inc/excdoc.hxx4
-rw-r--r--sc/source/filter/inc/excform.hxx7
-rw-r--r--sc/source/filter/inc/excimp8.hxx5
-rw-r--r--sc/source/filter/inc/excrecds.hxx6
-rw-r--r--sc/source/filter/inc/excscen.hxx2
-rw-r--r--sc/source/filter/inc/exp_op.hxx17
-rw-r--r--sc/source/filter/inc/expbase.hxx2
-rw-r--r--sc/source/filter/inc/fapihelper.hxx2
-rw-r--r--sc/source/filter/inc/filt_pch.hxx10
-rw-r--r--sc/source/filter/inc/fkttab.h2
-rw-r--r--sc/source/filter/inc/flttypes.hxx2
-rw-r--r--sc/source/filter/inc/formel.hxx2
-rw-r--r--sc/source/filter/inc/fprogressbar.hxx2
-rw-r--r--sc/source/filter/inc/ftools.hxx3
-rw-r--r--sc/source/filter/inc/funktion.h2
-rw-r--r--sc/source/filter/inc/htmlexp.hxx2
-rw-r--r--sc/source/filter/inc/htmlimp.hxx3
-rw-r--r--sc/source/filter/inc/htmlpars.hxx2
-rw-r--r--sc/source/filter/inc/imp_op.hxx2
-rw-r--r--sc/source/filter/inc/lotattr.hxx2
-rw-r--r--sc/source/filter/inc/lotfntbf.hxx3
-rw-r--r--sc/source/filter/inc/lotform.hxx2
-rw-r--r--sc/source/filter/inc/lotimpop.hxx3
-rw-r--r--sc/source/filter/inc/lotrange.hxx2
-rw-r--r--sc/source/filter/inc/namebuff.hxx2
-rw-r--r--sc/source/filter/inc/op.h3
-rw-r--r--sc/source/filter/inc/optab.h2
-rw-r--r--sc/source/filter/inc/otlnbuff.hxx2
-rw-r--r--sc/source/filter/inc/qpro.hxx2
-rw-r--r--sc/source/filter/inc/qproform.hxx3
-rw-r--r--sc/source/filter/inc/qprostyle.hxx3
-rw-r--r--sc/source/filter/inc/root.hxx2
-rw-r--r--sc/source/filter/inc/rtfexp.hxx2
-rw-r--r--sc/source/filter/inc/rtfimp.hxx3
-rw-r--r--sc/source/filter/inc/rtfparse.hxx3
-rw-r--r--sc/source/filter/inc/scflt.hxx2
-rw-r--r--sc/source/filter/inc/scfobj.hxx2
-rw-r--r--sc/source/filter/inc/scmem.h2
-rw-r--r--sc/source/filter/inc/tokstack.hxx2
-rw-r--r--sc/source/filter/inc/tool.h2
-rw-r--r--sc/source/filter/inc/xcl97dum.hxx3
-rw-r--r--sc/source/filter/inc/xcl97esc.hxx13
-rw-r--r--sc/source/filter/inc/xcl97rec.hxx41
-rw-r--r--sc/source/filter/inc/xechart.hxx2
-rw-r--r--sc/source/filter/inc/xecontent.hxx4
-rw-r--r--sc/source/filter/inc/xeescher.hxx57
-rw-r--r--sc/source/filter/inc/xeformula.hxx2
-rw-r--r--sc/source/filter/inc/xehelper.hxx2
-rw-r--r--sc/source/filter/inc/xelink.hxx2
-rw-r--r--sc/source/filter/inc/xename.hxx2
-rw-r--r--sc/source/filter/inc/xepage.hxx2
-rw-r--r--sc/source/filter/inc/xepivot.hxx3
-rw-r--r--sc/source/filter/inc/xerecord.hxx2
-rw-r--r--sc/source/filter/inc/xeroot.hxx2
-rw-r--r--sc/source/filter/inc/xestream.hxx20
-rw-r--r--sc/source/filter/inc/xestring.hxx2
-rw-r--r--sc/source/filter/inc/xestyle.hxx26
-rw-r--r--sc/source/filter/inc/xetable.hxx13
-rw-r--r--sc/source/filter/inc/xeview.hxx2
-rw-r--r--sc/source/filter/inc/xichart.hxx2
-rw-r--r--sc/source/filter/inc/xicontent.hxx2
-rw-r--r--sc/source/filter/inc/xiescher.hxx55
-rw-r--r--sc/source/filter/inc/xiformula.hxx2
-rw-r--r--sc/source/filter/inc/xihelper.hxx2
-rw-r--r--sc/source/filter/inc/xilink.hxx2
-rw-r--r--sc/source/filter/inc/xiname.hxx6
-rw-r--r--sc/source/filter/inc/xipage.hxx2
-rw-r--r--sc/source/filter/inc/xipivot.hxx2
-rw-r--r--sc/source/filter/inc/xiroot.hxx3
-rw-r--r--sc/source/filter/inc/xistream.hxx2
-rw-r--r--sc/source/filter/inc/xistring.hxx2
-rw-r--r--sc/source/filter/inc/xistyle.hxx4
-rw-r--r--sc/source/filter/inc/xiview.hxx2
-rw-r--r--sc/source/filter/inc/xladdress.hxx2
-rw-r--r--sc/source/filter/inc/xlchart.hxx2
-rw-r--r--sc/source/filter/inc/xlconst.hxx2
-rw-r--r--sc/source/filter/inc/xlcontent.hxx2
-rw-r--r--sc/source/filter/inc/xlescher.hxx4
-rw-r--r--sc/source/filter/inc/xlformula.hxx2
-rw-r--r--sc/source/filter/inc/xllink.hxx2
-rw-r--r--sc/source/filter/inc/xlname.hxx2
-rw-r--r--sc/source/filter/inc/xlpage.hxx8
-rw-r--r--sc/source/filter/inc/xlpivot.hxx2
-rw-r--r--sc/source/filter/inc/xlroot.hxx5
-rw-r--r--sc/source/filter/inc/xlstream.hxx2
-rw-r--r--sc/source/filter/inc/xlstring.hxx2
-rw-r--r--sc/source/filter/inc/xlstyle.hxx2
-rw-r--r--sc/source/filter/inc/xltable.hxx2
-rw-r--r--sc/source/filter/inc/xltools.hxx2
-rw-r--r--sc/source/filter/inc/xltracer.hxx2
-rw-r--r--sc/source/filter/inc/xlview.hxx2
-rw-r--r--sc/source/filter/lotus/expop.cxx2
-rw-r--r--sc/source/filter/lotus/export.cxx2
-rw-r--r--sc/source/filter/lotus/filter.cxx2
-rw-r--r--sc/source/filter/lotus/lotattr.cxx2
-rw-r--r--sc/source/filter/lotus/lotform.cxx2
-rw-r--r--sc/source/filter/lotus/lotimpop.cxx6
-rw-r--r--sc/source/filter/lotus/lotread.cxx2
-rw-r--r--sc/source/filter/lotus/lotus.cxx2
-rw-r--r--sc/source/filter/lotus/makefile.mk2
-rw-r--r--sc/source/filter/lotus/memory.cxx2
-rw-r--r--sc/source/filter/lotus/op.cxx3
-rw-r--r--sc/source/filter/lotus/optab.cxx3
-rw-r--r--sc/source/filter/lotus/tool.cxx2
-rw-r--r--sc/source/filter/qpro/biff.cxx2
-rw-r--r--sc/source/filter/qpro/makefile.mk2
-rw-r--r--sc/source/filter/qpro/qpro.cxx3
-rw-r--r--sc/source/filter/qpro/qproform.cxx6
-rw-r--r--sc/source/filter/qpro/qprostyle.cxx3
-rw-r--r--sc/source/filter/rtf/eeimpars.cxx2
-rw-r--r--sc/source/filter/rtf/expbase.cxx2
-rw-r--r--sc/source/filter/rtf/makefile.mk2
-rw-r--r--sc/source/filter/rtf/rtfexp.cxx33
-rw-r--r--sc/source/filter/rtf/rtfimp.cxx2
-rw-r--r--sc/source/filter/rtf/rtfparse.cxx2
-rw-r--r--sc/source/filter/starcalc/makefile.mk2
-rw-r--r--sc/source/filter/starcalc/scflt.cxx2
-rw-r--r--sc/source/filter/starcalc/scfobj.cxx2
-rw-r--r--sc/source/filter/xcl97/XclExpChangeTrack.cxx471
-rw-r--r--sc/source/filter/xcl97/XclImpChangeTrack.cxx2
-rw-r--r--sc/source/filter/xcl97/makefile.mk2
-rw-r--r--sc/source/filter/xcl97/xcl97dum.cxx2
-rw-r--r--sc/source/filter/xcl97/xcl97esc.cxx54
-rw-r--r--sc/source/filter/xcl97/xcl97rec.cxx408
-rw-r--r--sc/source/filter/xml/XMLCalculationSettingsContext.cxx3
-rw-r--r--sc/source/filter/xml/XMLCalculationSettingsContext.hxx3
-rw-r--r--sc/source/filter/xml/XMLCellRangeSourceContext.cxx2
-rw-r--r--sc/source/filter/xml/XMLCellRangeSourceContext.hxx2
-rw-r--r--sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx3
-rw-r--r--sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx3
-rw-r--r--sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx3
-rw-r--r--sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx3
-rw-r--r--sc/source/filter/xml/XMLCodeNameProvider.cxx5
-rw-r--r--sc/source/filter/xml/XMLCodeNameProvider.hxx3
-rw-r--r--sc/source/filter/xml/XMLColumnRowGroupExport.cxx2
-rw-r--r--sc/source/filter/xml/XMLColumnRowGroupExport.hxx2
-rw-r--r--sc/source/filter/xml/XMLConsolidationContext.cxx2
-rw-r--r--sc/source/filter/xml/XMLConsolidationContext.hxx2
-rw-r--r--sc/source/filter/xml/XMLConverter.cxx2
-rw-r--r--sc/source/filter/xml/XMLConverter.hxx2
-rw-r--r--sc/source/filter/xml/XMLDDELinksContext.cxx5
-rw-r--r--sc/source/filter/xml/XMLDDELinksContext.hxx3
-rw-r--r--sc/source/filter/xml/XMLDetectiveContext.cxx2
-rw-r--r--sc/source/filter/xml/XMLDetectiveContext.hxx2
-rw-r--r--sc/source/filter/xml/XMLEmptyContext.cxx3
-rw-r--r--sc/source/filter/xml/XMLEmptyContext.hxx3
-rw-r--r--sc/source/filter/xml/XMLExportDDELinks.cxx3
-rw-r--r--sc/source/filter/xml/XMLExportDDELinks.hxx2
-rw-r--r--sc/source/filter/xml/XMLExportDataPilot.cxx3
-rw-r--r--sc/source/filter/xml/XMLExportDataPilot.hxx2
-rw-r--r--sc/source/filter/xml/XMLExportDatabaseRanges.cxx3
-rw-r--r--sc/source/filter/xml/XMLExportDatabaseRanges.hxx2
-rw-r--r--sc/source/filter/xml/XMLExportIterator.cxx2
-rw-r--r--sc/source/filter/xml/XMLExportIterator.hxx2
-rw-r--r--sc/source/filter/xml/XMLExportSharedData.cxx3
-rw-r--r--sc/source/filter/xml/XMLExportSharedData.hxx2
-rw-r--r--sc/source/filter/xml/XMLStylesExportHelper.cxx3
-rw-r--r--sc/source/filter/xml/XMLStylesExportHelper.hxx2
-rw-r--r--sc/source/filter/xml/XMLStylesImportHelper.cxx10
-rw-r--r--sc/source/filter/xml/XMLStylesImportHelper.hxx2
-rw-r--r--sc/source/filter/xml/XMLTableHeaderFooterContext.cxx4
-rw-r--r--sc/source/filter/xml/XMLTableHeaderFooterContext.hxx3
-rw-r--r--sc/source/filter/xml/XMLTableMasterPageExport.cxx2
-rw-r--r--sc/source/filter/xml/XMLTableMasterPageExport.hxx2
-rw-r--r--sc/source/filter/xml/XMLTableShapeImportHelper.cxx5
-rw-r--r--sc/source/filter/xml/XMLTableShapeImportHelper.hxx3
-rw-r--r--sc/source/filter/xml/XMLTableShapeResizer.cxx3
-rw-r--r--sc/source/filter/xml/XMLTableShapeResizer.hxx3
-rw-r--r--sc/source/filter/xml/XMLTableShapesContext.cxx2
-rw-r--r--sc/source/filter/xml/XMLTableShapesContext.hxx3
-rw-r--r--sc/source/filter/xml/XMLTableSourceContext.cxx2
-rw-r--r--sc/source/filter/xml/XMLTableSourceContext.hxx3
-rw-r--r--sc/source/filter/xml/XMLTextPContext.cxx2
-rw-r--r--sc/source/filter/xml/XMLTextPContext.hxx3
-rw-r--r--sc/source/filter/xml/XMLTrackedChangesContext.cxx4
-rw-r--r--sc/source/filter/xml/XMLTrackedChangesContext.hxx2
-rw-r--r--sc/source/filter/xml/makefile.mk2
-rw-r--r--sc/source/filter/xml/sheetdata.cxx4
-rw-r--r--sc/source/filter/xml/xmlannoi.cxx2
-rw-r--r--sc/source/filter/xml/xmlannoi.hxx2
-rw-r--r--sc/source/filter/xml/xmlbodyi.cxx38
-rw-r--r--sc/source/filter/xml/xmlbodyi.hxx2
-rw-r--r--sc/source/filter/xml/xmlcelli.cxx5
-rw-r--r--sc/source/filter/xml/xmlcelli.hxx2
-rw-r--r--sc/source/filter/xml/xmlcoli.cxx3
-rw-r--r--sc/source/filter/xml/xmlcoli.hxx3
-rw-r--r--sc/source/filter/xml/xmlconti.cxx3
-rw-r--r--sc/source/filter/xml/xmlconti.hxx3
-rw-r--r--sc/source/filter/xml/xmlcvali.cxx3
-rw-r--r--sc/source/filter/xml/xmlcvali.hxx3
-rw-r--r--sc/source/filter/xml/xmldpimp.cxx5
-rw-r--r--sc/source/filter/xml/xmldpimp.hxx2
-rw-r--r--sc/source/filter/xml/xmldrani.cxx2
-rw-r--r--sc/source/filter/xml/xmldrani.hxx3
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx46
-rw-r--r--sc/source/filter/xml/xmlexprt.hxx2
-rw-r--r--sc/source/filter/xml/xmlexternaltabi.cxx3
-rw-r--r--sc/source/filter/xml/xmlexternaltabi.hxx3
-rw-r--r--sc/source/filter/xml/xmlfilti.cxx2
-rw-r--r--sc/source/filter/xml/xmlfilti.hxx3
-rw-r--r--sc/source/filter/xml/xmlfonte.cxx3
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx26
-rw-r--r--sc/source/filter/xml/xmlimprt.hxx6
-rw-r--r--sc/source/filter/xml/xmllabri.cxx2
-rw-r--r--sc/source/filter/xml/xmllabri.hxx3
-rw-r--r--sc/source/filter/xml/xmlnexpi.cxx2
-rw-r--r--sc/source/filter/xml/xmlnexpi.hxx3
-rw-r--r--sc/source/filter/xml/xmlrowi.cxx3
-rw-r--r--sc/source/filter/xml/xmlrowi.hxx3
-rw-r--r--sc/source/filter/xml/xmlsceni.cxx4
-rw-r--r--sc/source/filter/xml/xmlsceni.hxx3
-rw-r--r--sc/source/filter/xml/xmlsorti.cxx2
-rw-r--r--sc/source/filter/xml/xmlsorti.hxx3
-rw-r--r--sc/source/filter/xml/xmlstyle.cxx3
-rw-r--r--sc/source/filter/xml/xmlstyle.hxx3
-rw-r--r--sc/source/filter/xml/xmlstyli.cxx5
-rw-r--r--sc/source/filter/xml/xmlstyli.hxx2
-rw-r--r--sc/source/filter/xml/xmlsubti.cxx3
-rw-r--r--sc/source/filter/xml/xmlsubti.hxx3
-rw-r--r--sc/source/filter/xml/xmltabi.cxx3
-rw-r--r--sc/source/filter/xml/xmltabi.hxx3
-rw-r--r--sc/source/filter/xml/xmlwrap.cxx5
-rw-r--r--sc/source/ui/Accessibility/AccessibilityHints.cxx3
-rw-r--r--sc/source/ui/Accessibility/AccessibleCell.cxx13
-rw-r--r--sc/source/ui/Accessibility/AccessibleCellBase.cxx19
-rw-r--r--sc/source/ui/Accessibility/AccessibleContextBase.cxx34
-rw-r--r--sc/source/ui/Accessibility/AccessibleCsvControl.cxx116
-rw-r--r--sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx43
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocument.cxx47
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocumentBase.cxx3
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx31
-rw-r--r--sc/source/ui/Accessibility/AccessibleEditObject.cxx16
-rw-r--r--sc/source/ui/Accessibility/AccessibleFilterMenu.cxx4
-rw-r--r--sc/source/ui/Accessibility/AccessibleFilterMenuItem.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleFilterTopWindow.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleGlobal.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessiblePageHeader.cxx17
-rw-r--r--sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx17
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewCell.cxx18
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx23
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewTable.cxx46
-rw-r--r--sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx45
-rw-r--r--sc/source/ui/Accessibility/AccessibleTableBase.cxx29
-rw-r--r--sc/source/ui/Accessibility/AccessibleText.cxx9
-rw-r--r--sc/source/ui/Accessibility/DrawModelBroadcaster.cxx3
-rw-r--r--sc/source/ui/Accessibility/makefile.mk2
-rw-r--r--sc/source/ui/app/client.cxx2
-rw-r--r--sc/source/ui/app/drwtrans.cxx8
-rw-r--r--sc/source/ui/app/inputhdl.cxx292
-rw-r--r--sc/source/ui/app/inputwin.cxx6
-rw-r--r--sc/source/ui/app/lnktrans.cxx2
-rw-r--r--sc/source/ui/app/makefile.mk2
-rw-r--r--sc/source/ui/app/msgpool.cxx2
-rw-r--r--sc/source/ui/app/rfindlst.cxx2
-rw-r--r--sc/source/ui/app/scdll.cxx3
-rw-r--r--sc/source/ui/app/scmod.cxx13
-rw-r--r--sc/source/ui/app/scmod2.cxx2
-rw-r--r--sc/source/ui/app/seltrans.cxx2
-rw-r--r--sc/source/ui/app/template.cxx2
-rw-r--r--sc/source/ui/app/transobj.cxx7
-rw-r--r--sc/source/ui/app/typemap.cxx3
-rw-r--r--sc/source/ui/app/uiitems.cxx3
-rw-r--r--sc/source/ui/app/wtcdummy.cxx3
-rw-r--r--sc/source/ui/attrdlg/attrdlg.cxx4
-rw-r--r--sc/source/ui/attrdlg/condfrmt.cxx2
-rw-r--r--sc/source/ui/attrdlg/makefile.mk2
-rw-r--r--sc/source/ui/attrdlg/scabstdlg.cxx5
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.cxx28
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.hxx12
-rw-r--r--sc/source/ui/attrdlg/scuiexp.cxx3
-rw-r--r--sc/source/ui/attrdlg/tabpages.cxx3
-rw-r--r--sc/source/ui/cctrl/cbuttonw.cxx2
-rw-r--r--sc/source/ui/cctrl/dpcontrol.cxx28
-rw-r--r--sc/source/ui/cctrl/editfield.cxx2
-rw-r--r--sc/source/ui/cctrl/makefile.mk2
-rw-r--r--sc/source/ui/cctrl/popmenu.cxx2
-rw-r--r--sc/source/ui/cctrl/tbinsert.cxx2
-rw-r--r--sc/source/ui/cctrl/tbzoomsliderctrl.cxx3
-rw-r--r--sc/source/ui/dbgui/asciiopt.cxx78
-rw-r--r--sc/source/ui/dbgui/consdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/csvcontrol.cxx2
-rw-r--r--sc/source/ui/dbgui/csvgrid.cxx2
-rw-r--r--sc/source/ui/dbgui/csvruler.cxx2
-rw-r--r--sc/source/ui/dbgui/csvsplits.cxx2
-rw-r--r--sc/source/ui/dbgui/csvtablebox.cxx2
-rw-r--r--sc/source/ui/dbgui/dapidata.cxx2
-rw-r--r--sc/source/ui/dbgui/dapitype.cxx2
-rw-r--r--sc/source/ui/dbgui/dbnamdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/dpgroupdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/expftext.cxx2
-rw-r--r--sc/source/ui/dbgui/fieldwnd.cxx2
-rw-r--r--sc/source/ui/dbgui/filtdlg.cxx3
-rw-r--r--sc/source/ui/dbgui/foptmgr.cxx3
-rw-r--r--sc/source/ui/dbgui/imoptdlg.cxx3
-rw-r--r--sc/source/ui/dbgui/makefile.mk2
-rw-r--r--sc/source/ui/dbgui/pfiltdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/pvfundlg.cxx2
-rw-r--r--sc/source/ui/dbgui/pvglob.hxx3
-rw-r--r--sc/source/ui/dbgui/pvlaydlg.cxx2
-rw-r--r--sc/source/ui/dbgui/scendlg.cxx2
-rw-r--r--sc/source/ui/dbgui/scuiasciiopt.cxx3
-rw-r--r--sc/source/ui/dbgui/scuiimoptdlg.cxx3
-rw-r--r--sc/source/ui/dbgui/sfiltdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/sortdlg.cxx3
-rw-r--r--sc/source/ui/dbgui/subtdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/textimportoptions.cxx2
-rw-r--r--sc/source/ui/dbgui/tpsort.cxx2
-rw-r--r--sc/source/ui/dbgui/tpsubt.cxx2
-rw-r--r--sc/source/ui/dbgui/validate.cxx3
-rw-r--r--sc/source/ui/docshell/arealink.cxx2
-rw-r--r--sc/source/ui/docshell/autostyl.cxx2
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx2
-rw-r--r--sc/source/ui/docshell/dbdocimp.cxx2
-rw-r--r--sc/source/ui/docshell/docfunc.cxx25
-rw-r--r--sc/source/ui/docshell/docsh.cxx119
-rw-r--r--sc/source/ui/docshell/docsh2.cxx9
-rw-r--r--sc/source/ui/docshell/docsh3.cxx3
-rw-r--r--sc/source/ui/docshell/docsh4.cxx7
-rw-r--r--sc/source/ui/docshell/docsh5.cxx43
-rw-r--r--sc/source/ui/docshell/docsh6.cxx2
-rw-r--r--sc/source/ui/docshell/docsh7.cxx2
-rw-r--r--sc/source/ui/docshell/docsh8.cxx2
-rw-r--r--sc/source/ui/docshell/docshimp.hxx2
-rw-r--r--sc/source/ui/docshell/editable.cxx2
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx2
-rw-r--r--sc/source/ui/docshell/hiranges.cxx2
-rw-r--r--sc/source/ui/docshell/impex.cxx48
-rw-r--r--sc/source/ui/docshell/macromgr.cxx219
-rw-r--r--sc/source/ui/docshell/makefile.mk11
-rw-r--r--sc/source/ui/docshell/olinefun.cxx2
-rw-r--r--sc/source/ui/docshell/pagedata.cxx2
-rw-r--r--sc/source/ui/docshell/pntlock.cxx2
-rw-r--r--sc/source/ui/docshell/servobj.cxx2
-rw-r--r--sc/source/ui/docshell/sizedev.cxx2
-rw-r--r--sc/source/ui/docshell/tablink.cxx2
-rw-r--r--sc/source/ui/docshell/tpstat.cxx2
-rw-r--r--sc/source/ui/drawfunc/chartsh.cxx2
-rw-r--r--sc/source/ui/drawfunc/drawsh.cxx6
-rw-r--r--sc/source/ui/drawfunc/drawsh2.cxx6
-rw-r--r--sc/source/ui/drawfunc/drawsh4.cxx2
-rw-r--r--sc/source/ui/drawfunc/drawsh5.cxx6
-rw-r--r--sc/source/ui/drawfunc/drformsh.cxx2
-rw-r--r--sc/source/ui/drawfunc/drtxtob.cxx29
-rw-r--r--sc/source/ui/drawfunc/drtxtob1.cxx2
-rw-r--r--sc/source/ui/drawfunc/drtxtob2.cxx2
-rw-r--r--sc/source/ui/drawfunc/fuconarc.cxx2
-rw-r--r--sc/source/ui/drawfunc/fuconcustomshape.cxx3
-rw-r--r--sc/source/ui/drawfunc/fuconpol.cxx3
-rw-r--r--sc/source/ui/drawfunc/fuconrec.cxx2
-rw-r--r--sc/source/ui/drawfunc/fuconstr.cxx2
-rw-r--r--sc/source/ui/drawfunc/fuconuno.cxx2
-rw-r--r--sc/source/ui/drawfunc/fudraw.cxx9
-rw-r--r--sc/source/ui/drawfunc/fuins1.cxx27
-rw-r--r--sc/source/ui/drawfunc/fuins2.cxx2
-rw-r--r--sc/source/ui/drawfunc/fumark.cxx2
-rw-r--r--sc/source/ui/drawfunc/fupoor.cxx3
-rw-r--r--sc/source/ui/drawfunc/fusel.cxx18
-rw-r--r--sc/source/ui/drawfunc/fusel2.cxx2
-rw-r--r--sc/source/ui/drawfunc/futext.cxx2
-rw-r--r--sc/source/ui/drawfunc/futext2.cxx2
-rw-r--r--sc/source/ui/drawfunc/futext3.cxx53
-rw-r--r--sc/source/ui/drawfunc/graphsh.cxx2
-rw-r--r--sc/source/ui/drawfunc/makefile.mk3
-rw-r--r--sc/source/ui/drawfunc/mediash.cxx3
-rw-r--r--sc/source/ui/drawfunc/objdraw.src6
-rw-r--r--sc/source/ui/drawfunc/oleobjsh.cxx2
-rw-r--r--sc/source/ui/formdlg/dwfunctr.cxx2
-rw-r--r--sc/source/ui/formdlg/formdata.cxx2
-rw-r--r--sc/source/ui/formdlg/formula.cxx14
-rw-r--r--sc/source/ui/formdlg/makefile.mk2
-rw-r--r--sc/source/ui/formdlg/privsplt.cxx2
-rw-r--r--sc/source/ui/inc/AccessibilityHints.hxx3
-rw-r--r--sc/source/ui/inc/AccessibleCell.hxx3
-rw-r--r--sc/source/ui/inc/AccessibleCellBase.hxx3
-rw-r--r--sc/source/ui/inc/AccessibleContextBase.hxx5
-rw-r--r--sc/source/ui/inc/AccessibleCsvControl.hxx2
-rw-r--r--sc/source/ui/inc/AccessibleDataPilotControl.hxx3
-rw-r--r--sc/source/ui/inc/AccessibleDocument.hxx3
-rw-r--r--sc/source/ui/inc/AccessibleDocumentBase.hxx2
-rw-r--r--sc/source/ui/inc/AccessibleDocumentPagePreview.hxx3
-rw-r--r--sc/source/ui/inc/AccessibleEditObject.hxx3
-rw-r--r--sc/source/ui/inc/AccessiblePageHeader.hxx3
-rw-r--r--sc/source/ui/inc/AccessiblePageHeaderArea.hxx2
-rw-r--r--sc/source/ui/inc/AccessiblePreviewCell.hxx2
-rw-r--r--sc/source/ui/inc/AccessiblePreviewHeaderCell.hxx3
-rw-r--r--sc/source/ui/inc/AccessiblePreviewTable.hxx3
-rw-r--r--sc/source/ui/inc/AccessibleSpreadsheet.hxx3
-rw-r--r--sc/source/ui/inc/AccessibleTableBase.hxx3
-rw-r--r--sc/source/ui/inc/AccessibleText.hxx3
-rw-r--r--sc/source/ui/inc/ChartRangeSelectionListener.hxx3
-rw-r--r--sc/source/ui/inc/DrawModelBroadcaster.hxx3
-rw-r--r--sc/source/ui/inc/IAnyRefDialog.hxx3
-rw-r--r--sc/source/ui/inc/ScDevChart.hxx3
-rw-r--r--sc/source/ui/inc/acredlin.hxx2
-rw-r--r--sc/source/ui/inc/anyrefdg.hxx2
-rw-r--r--sc/source/ui/inc/areasave.hxx2
-rw-r--r--sc/source/ui/inc/areasdlg.hxx2
-rw-r--r--sc/source/ui/inc/asciiopt.hxx4
-rw-r--r--sc/source/ui/inc/attrdlg.hxx2
-rw-r--r--sc/source/ui/inc/auditsh.hxx2
-rw-r--r--sc/source/ui/inc/autofmt.hxx2
-rw-r--r--sc/source/ui/inc/autostyl.hxx2
-rw-r--r--sc/source/ui/inc/cbutton.hxx2
-rw-r--r--sc/source/ui/inc/cellmergeoption.hxx3
-rw-r--r--sc/source/ui/inc/cellsh.hxx3
-rw-r--r--sc/source/ui/inc/chartsh.hxx3
-rw-r--r--sc/source/ui/inc/client.hxx2
-rw-r--r--sc/source/ui/inc/colrowba.hxx2
-rw-r--r--sc/source/ui/inc/condfrmt.hxx2
-rw-r--r--sc/source/ui/inc/conflictsdlg.hxx3
-rw-r--r--sc/source/ui/inc/consdlg.hxx2
-rw-r--r--sc/source/ui/inc/content.hxx2
-rw-r--r--sc/source/ui/inc/corodlg.hxx2
-rw-r--r--sc/source/ui/inc/crdlg.hxx2
-rw-r--r--sc/source/ui/inc/crnrdlg.hxx2
-rw-r--r--sc/source/ui/inc/csvcontrol.hxx2
-rw-r--r--sc/source/ui/inc/csvgrid.hxx2
-rw-r--r--sc/source/ui/inc/csvruler.hxx2
-rw-r--r--sc/source/ui/inc/csvsplits.hxx2
-rw-r--r--sc/source/ui/inc/csvtablebox.hxx2
-rw-r--r--sc/source/ui/inc/dapidata.hxx2
-rw-r--r--sc/source/ui/inc/dapitype.hxx2
-rw-r--r--sc/source/ui/inc/datafdlg.hrc40
-rw-r--r--sc/source/ui/inc/datafdlg.hxx114
-rw-r--r--sc/source/ui/inc/dbdocfun.hxx3
-rw-r--r--sc/source/ui/inc/dbfunc.hxx2
-rw-r--r--sc/source/ui/inc/dbnamdlg.hxx2
-rw-r--r--sc/source/ui/inc/delcldlg.hxx2
-rw-r--r--sc/source/ui/inc/delcodlg.hxx2
-rw-r--r--sc/source/ui/inc/docfunc.hxx4
-rw-r--r--sc/source/ui/inc/docsh.hxx10
-rw-r--r--sc/source/ui/inc/dpcontrol.hxx7
-rw-r--r--sc/source/ui/inc/dpgroupdlg.hxx2
-rw-r--r--sc/source/ui/inc/drawsh.hxx4
-rw-r--r--sc/source/ui/inc/drawutil.hxx2
-rw-r--r--sc/source/ui/inc/drawview.hxx4
-rw-r--r--sc/source/ui/inc/drformsh.hxx3
-rw-r--r--sc/source/ui/inc/drtxtob.hxx2
-rw-r--r--sc/source/ui/inc/drwtrans.hxx2
-rw-r--r--sc/source/ui/inc/dwfunctr.hxx2
-rw-r--r--sc/source/ui/inc/editable.hxx2
-rw-r--r--sc/source/ui/inc/editfield.hxx2
-rw-r--r--sc/source/ui/inc/editsh.hxx2
-rw-r--r--sc/source/ui/inc/expftext.hxx3
-rw-r--r--sc/source/ui/inc/fieldwnd.hxx3
-rw-r--r--sc/source/ui/inc/filldlg.hxx2
-rw-r--r--sc/source/ui/inc/filtdlg.hxx2
-rw-r--r--sc/source/ui/inc/foptmgr.hxx3
-rw-r--r--sc/source/ui/inc/formatsh.hxx3
-rw-r--r--sc/source/ui/inc/formdata.hxx2
-rw-r--r--sc/source/ui/inc/formula.hxx2
-rw-r--r--sc/source/ui/inc/fuconarc.hxx2
-rw-r--r--sc/source/ui/inc/fuconcustomshape.hxx2
-rw-r--r--sc/source/ui/inc/fuconpol.hxx2
-rw-r--r--sc/source/ui/inc/fuconrec.hxx2
-rw-r--r--sc/source/ui/inc/fuconstr.hxx3
-rw-r--r--sc/source/ui/inc/fuconuno.hxx2
-rw-r--r--sc/source/ui/inc/fudraw.hxx3
-rw-r--r--sc/source/ui/inc/fuedipo.hxx2
-rw-r--r--sc/source/ui/inc/fuinsert.hxx2
-rw-r--r--sc/source/ui/inc/fumark.hxx2
-rw-r--r--sc/source/ui/inc/funcpage.hxx2
-rw-r--r--sc/source/ui/inc/funcutl.hxx3
-rw-r--r--sc/source/ui/inc/fupoor.hxx2
-rw-r--r--sc/source/ui/inc/fusel.hxx2
-rw-r--r--sc/source/ui/inc/futext.hxx2
-rw-r--r--sc/source/ui/inc/graphsh.hxx3
-rw-r--r--sc/source/ui/inc/gridmerg.hxx2
-rw-r--r--sc/source/ui/inc/gridwin.hxx2
-rw-r--r--sc/source/ui/inc/groupdlg.hxx2
-rw-r--r--sc/source/ui/inc/hdrcont.hxx2
-rw-r--r--sc/source/ui/inc/hfedtdlg.hxx3
-rw-r--r--sc/source/ui/inc/highred.hxx2
-rw-r--r--sc/source/ui/inc/hintwin.hxx2
-rw-r--r--sc/source/ui/inc/hiranges.hxx2
-rw-r--r--sc/source/ui/inc/imoptdlg.hxx2
-rw-r--r--sc/source/ui/inc/impex.hxx4
-rw-r--r--sc/source/ui/inc/inputhdl.hxx14
-rw-r--r--sc/source/ui/inc/inputwin.hxx2
-rw-r--r--sc/source/ui/inc/inscldlg.hxx2
-rw-r--r--sc/source/ui/inc/inscodlg.hxx2
-rw-r--r--sc/source/ui/inc/instbdlg.hxx2
-rw-r--r--sc/source/ui/inc/invmerge.hxx2
-rw-r--r--sc/source/ui/inc/lbseldlg.hxx2
-rw-r--r--sc/source/ui/inc/linkarea.hxx2
-rw-r--r--sc/source/ui/inc/lnktrans.hxx2
-rw-r--r--sc/source/ui/inc/mediash.hxx3
-rw-r--r--sc/source/ui/inc/msgpool.hxx2
-rw-r--r--sc/source/ui/inc/mtrindlg.hxx2
-rw-r--r--sc/source/ui/inc/mvtabdlg.hxx2
-rw-r--r--sc/source/ui/inc/namecrea.hxx3
-rw-r--r--sc/source/ui/inc/namedlg.hxx2
-rw-r--r--sc/source/ui/inc/namepast.hxx3
-rw-r--r--sc/source/ui/inc/navcitem.hxx2
-rw-r--r--sc/source/ui/inc/navipi.hxx2
-rw-r--r--sc/source/ui/inc/navsett.hxx2
-rw-r--r--sc/source/ui/inc/notemark.hxx2
-rw-r--r--sc/source/ui/inc/oleobjsh.hxx3
-rw-r--r--sc/source/ui/inc/olinefun.hxx2
-rw-r--r--sc/source/ui/inc/olinewin.hxx2
-rw-r--r--sc/source/ui/inc/opredlin.hxx2
-rw-r--r--sc/source/ui/inc/optdlg.hrc20
-rw-r--r--sc/source/ui/inc/optload.hxx2
-rw-r--r--sc/source/ui/inc/optsolver.hxx2
-rw-r--r--sc/source/ui/inc/output.hxx2
-rw-r--r--sc/source/ui/inc/overlayobject.hxx3
-rw-r--r--sc/source/ui/inc/pagedata.hxx2
-rw-r--r--sc/source/ui/inc/parawin.hxx2
-rw-r--r--sc/source/ui/inc/pfiltdlg.hxx2
-rw-r--r--sc/source/ui/inc/pfuncache.hxx2
-rw-r--r--sc/source/ui/inc/pgbrksh.hxx2
-rw-r--r--sc/source/ui/inc/pivotsh.hxx2
-rw-r--r--sc/source/ui/inc/pntlock.hxx2
-rw-r--r--sc/source/ui/inc/popmenu.hxx2
-rw-r--r--sc/source/ui/inc/preview.hxx3
-rw-r--r--sc/source/ui/inc/prevloc.hxx3
-rw-r--r--sc/source/ui/inc/prevwsh.hxx3
-rw-r--r--sc/source/ui/inc/printfun.hxx2
-rw-r--r--sc/source/ui/inc/privsplt.hxx3
-rw-r--r--sc/source/ui/inc/protectiondlg.hxx3
-rw-r--r--sc/source/ui/inc/pvfundlg.hxx2
-rw-r--r--sc/source/ui/inc/pvlaydlg.hxx2
-rw-r--r--sc/source/ui/inc/redcom.hxx2
-rw-r--r--sc/source/ui/inc/reffact.hxx3
-rw-r--r--sc/source/ui/inc/refundo.hxx2
-rw-r--r--sc/source/ui/inc/retypepassdlg.hxx3
-rw-r--r--sc/source/ui/inc/rfindlst.hxx2
-rw-r--r--sc/source/ui/inc/scendlg.hxx2
-rw-r--r--sc/source/ui/inc/scui_def.hxx2
-rw-r--r--sc/source/ui/inc/scuiasciiopt.hxx2
-rw-r--r--sc/source/ui/inc/scuiautofmt.hxx2
-rw-r--r--sc/source/ui/inc/scuiimoptdlg.hxx2
-rw-r--r--sc/source/ui/inc/scuitphfedit.hxx2
-rw-r--r--sc/source/ui/inc/select.hxx3
-rw-r--r--sc/source/ui/inc/selectionstate.hxx2
-rw-r--r--sc/source/ui/inc/seltrans.hxx2
-rw-r--r--sc/source/ui/inc/servobj.hxx3
-rw-r--r--sc/source/ui/inc/sharedocdlg.hxx3
-rw-r--r--sc/source/ui/inc/shtabdlg.hxx2
-rw-r--r--sc/source/ui/inc/simpref.hxx2
-rw-r--r--sc/source/ui/inc/sizedev.hxx2
-rw-r--r--sc/source/ui/inc/solveroptions.hxx2
-rw-r--r--sc/source/ui/inc/solverutil.hxx2
-rw-r--r--sc/source/ui/inc/solvrdlg.hxx2
-rw-r--r--sc/source/ui/inc/sortdlg.hxx3
-rw-r--r--sc/source/ui/inc/spelldialog.hxx2
-rw-r--r--sc/source/ui/inc/spelleng.hxx2
-rw-r--r--sc/source/ui/inc/spellparam.hxx2
-rw-r--r--sc/source/ui/inc/strindlg.hxx2
-rw-r--r--sc/source/ui/inc/styledlg.hxx2
-rw-r--r--sc/source/ui/inc/subtdlg.hxx2
-rw-r--r--sc/source/ui/inc/tabbgcolordlg.hxx3
-rw-r--r--sc/source/ui/inc/tabcont.hxx4
-rw-r--r--sc/source/ui/inc/tabopdlg.hxx2
-rw-r--r--sc/source/ui/inc/tabpages.hxx3
-rw-r--r--sc/source/ui/inc/tabpopsh.hxx2
-rw-r--r--sc/source/ui/inc/tabsplit.hxx2
-rw-r--r--sc/source/ui/inc/tabview.hxx2
-rw-r--r--sc/source/ui/inc/tabvwsh.hxx10
-rw-r--r--sc/source/ui/inc/target.hxx2
-rw-r--r--sc/source/ui/inc/tbinsert.hxx2
-rw-r--r--sc/source/ui/inc/tbzoomsliderctrl.hxx3
-rw-r--r--sc/source/ui/inc/textdlgs.hxx2
-rw-r--r--sc/source/ui/inc/textimportoptions.hxx3
-rw-r--r--sc/source/ui/inc/tpcalc.hxx2
-rw-r--r--sc/source/ui/inc/tpcompatibility.hxx64
-rw-r--r--sc/source/ui/inc/tpformula.hxx3
-rw-r--r--sc/source/ui/inc/tphf.hxx2
-rw-r--r--sc/source/ui/inc/tphfedit.hxx2
-rw-r--r--sc/source/ui/inc/tpprint.hxx2
-rw-r--r--sc/source/ui/inc/tpsort.hxx2
-rw-r--r--sc/source/ui/inc/tpstat.hxx3
-rw-r--r--sc/source/ui/inc/tpsubt.hxx2
-rw-r--r--sc/source/ui/inc/tptable.hxx3
-rw-r--r--sc/source/ui/inc/tpusrlst.hxx2
-rw-r--r--sc/source/ui/inc/tpview.hxx2
-rw-r--r--sc/source/ui/inc/transobj.hxx2
-rw-r--r--sc/source/ui/inc/ui_pch.hxx2
-rw-r--r--sc/source/ui/inc/uiitems.hxx2
-rw-r--r--sc/source/ui/inc/undobase.hxx2
-rw-r--r--sc/source/ui/inc/undoblk.hxx2
-rw-r--r--sc/source/ui/inc/undocell.hxx2
-rw-r--r--sc/source/ui/inc/undodat.hxx38
-rw-r--r--sc/source/ui/inc/undodraw.hxx2
-rw-r--r--sc/source/ui/inc/undoolk.hxx3
-rw-r--r--sc/source/ui/inc/undostyl.hxx2
-rw-r--r--sc/source/ui/inc/undotab.hxx2
-rw-r--r--sc/source/ui/inc/undoutil.hxx3
-rw-r--r--sc/source/ui/inc/validate.hxx2
-rw-r--r--sc/source/ui/inc/viewdata.hxx2
-rw-r--r--sc/source/ui/inc/viewfunc.hxx11
-rw-r--r--sc/source/ui/inc/viewutil.hxx2
-rw-r--r--sc/source/ui/inc/warnbox.hxx2
-rw-r--r--sc/source/ui/miscdlgs/acredlin.cxx2
-rw-r--r--sc/source/ui/miscdlgs/anyrefdg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/autofmt.cxx2
-rw-r--r--sc/source/ui/miscdlgs/conflictsdlg.cxx7
-rw-r--r--sc/source/ui/miscdlgs/crdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/crnrdlg.cxx3
-rw-r--r--sc/source/ui/miscdlgs/datafdlg.cxx415
-rw-r--r--sc/source/ui/miscdlgs/delcldlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/delcodlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/filldlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/groupdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/highred.cxx2
-rw-r--r--sc/source/ui/miscdlgs/inscldlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/inscodlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/instbdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/lbseldlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/linkarea.cxx2
-rw-r--r--sc/source/ui/miscdlgs/makefile.mk3
-rw-r--r--sc/source/ui/miscdlgs/mtrindlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/mvtabdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/namecrea.cxx2
-rw-r--r--sc/source/ui/miscdlgs/namepast.cxx2
-rw-r--r--sc/source/ui/miscdlgs/optsolver.cxx2
-rw-r--r--sc/source/ui/miscdlgs/protectiondlg.cxx6
-rw-r--r--sc/source/ui/miscdlgs/redcom.cxx2
-rw-r--r--sc/source/ui/miscdlgs/retypepassdlg.cxx3
-rw-r--r--sc/source/ui/miscdlgs/scuiautofmt.cxx3
-rw-r--r--sc/source/ui/miscdlgs/sharedocdlg.cxx3
-rw-r--r--sc/source/ui/miscdlgs/shtabdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/simpref.cxx2
-rw-r--r--sc/source/ui/miscdlgs/solveroptions.cxx2
-rw-r--r--sc/source/ui/miscdlgs/solverutil.cxx10
-rw-r--r--sc/source/ui/miscdlgs/solvrdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/strindlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/tabbgcolordlg.cxx3
-rw-r--r--sc/source/ui/miscdlgs/tabopdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/textdlgs.cxx2
-rw-r--r--sc/source/ui/miscdlgs/warnbox.cxx2
-rw-r--r--sc/source/ui/namedlg/makefile.mk2
-rw-r--r--sc/source/ui/namedlg/namedlg.cxx2
-rw-r--r--sc/source/ui/navipi/content.cxx2
-rw-r--r--sc/source/ui/navipi/makefile.mk2
-rw-r--r--sc/source/ui/navipi/navcitem.cxx2
-rw-r--r--sc/source/ui/navipi/navipi.cxx60
-rw-r--r--sc/source/ui/navipi/scenwnd.cxx2
-rw-r--r--sc/source/ui/optdlg/makefile.mk10
-rw-r--r--sc/source/ui/optdlg/opredlin.cxx2
-rw-r--r--sc/source/ui/optdlg/tpcalc.cxx2
-rw-r--r--sc/source/ui/optdlg/tpcompatibility.cxx108
-rw-r--r--sc/source/ui/optdlg/tpformula.cxx3
-rw-r--r--sc/source/ui/optdlg/tpprint.cxx2
-rw-r--r--sc/source/ui/optdlg/tpusrlst.cxx2
-rw-r--r--sc/source/ui/optdlg/tpview.cxx2
-rw-r--r--sc/source/ui/pagedlg/areasdlg.cxx3
-rw-r--r--sc/source/ui/pagedlg/hfedtdlg.cxx2
-rw-r--r--sc/source/ui/pagedlg/makefile.mk2
-rw-r--r--sc/source/ui/pagedlg/scuitphfedit.cxx3
-rw-r--r--sc/source/ui/pagedlg/tphf.cxx2
-rw-r--r--sc/source/ui/pagedlg/tphfedit.cxx2
-rw-r--r--sc/source/ui/pagedlg/tptable.cxx2
-rw-r--r--sc/source/ui/src/datafdlg.src95
-rw-r--r--sc/source/ui/src/globstr.src75
-rw-r--r--sc/source/ui/src/makefile.mk3
-rw-r--r--sc/source/ui/src/optdlg.src37
-rw-r--r--sc/source/ui/styleui/makefile.mk2
-rw-r--r--sc/source/ui/styleui/styledlg.cxx2
-rw-r--r--sc/source/ui/undo/areasave.cxx2
-rw-r--r--sc/source/ui/undo/makefile.mk2
-rw-r--r--sc/source/ui/undo/refundo.cxx2
-rw-r--r--sc/source/ui/undo/target.cxx3
-rw-r--r--sc/source/ui/undo/undobase.cxx2
-rw-r--r--sc/source/ui/undo/undoblk.cxx2
-rw-r--r--sc/source/ui/undo/undoblk2.cxx2
-rw-r--r--sc/source/ui/undo/undoblk3.cxx2
-rw-r--r--sc/source/ui/undo/undocell.cxx2
-rw-r--r--sc/source/ui/undo/undodat.cxx207
-rw-r--r--sc/source/ui/undo/undodraw.cxx2
-rw-r--r--sc/source/ui/undo/undoolk.cxx2
-rw-r--r--sc/source/ui/undo/undostyl.cxx2
-rw-r--r--sc/source/ui/undo/undotab.cxx2
-rw-r--r--sc/source/ui/undo/undoutil.cxx3
-rw-r--r--sc/source/ui/unoobj/ChartRangeSelectionListener.cxx3
-rw-r--r--sc/source/ui/unoobj/addruno.cxx34
-rw-r--r--sc/source/ui/unoobj/afmtuno.cxx54
-rw-r--r--sc/source/ui/unoobj/appluno.cxx37
-rw-r--r--sc/source/ui/unoobj/celllistsource.cxx3
-rw-r--r--sc/source/ui/unoobj/celllistsource.hxx3
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx434
-rw-r--r--sc/source/ui/unoobj/cellvaluebinding.cxx3
-rw-r--r--sc/source/ui/unoobj/cellvaluebinding.hxx3
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx124
-rw-r--r--sc/source/ui/unoobj/chartuno.cxx41
-rw-r--r--sc/source/ui/unoobj/confuno.cxx10
-rw-r--r--sc/source/ui/unoobj/convuno.cxx2
-rw-r--r--sc/source/ui/unoobj/cursuno.cxx38
-rw-r--r--sc/source/ui/unoobj/dapiuno.cxx242
-rw-r--r--sc/source/ui/unoobj/datauno.cxx120
-rw-r--r--sc/source/ui/unoobj/defltuno.cxx18
-rw-r--r--sc/source/ui/unoobj/detreg.cxx2
-rw-r--r--sc/source/ui/unoobj/dispuno.cxx24
-rw-r--r--sc/source/ui/unoobj/docuno.cxx308
-rw-r--r--sc/source/ui/unoobj/drdefuno.cxx2
-rw-r--r--sc/source/ui/unoobj/editsrc.cxx6
-rw-r--r--sc/source/ui/unoobj/eventuno.cxx16
-rw-r--r--sc/source/ui/unoobj/fielduno.cxx56
-rw-r--r--sc/source/ui/unoobj/filtuno.cxx6
-rw-r--r--sc/source/ui/unoobj/fmtuno.cxx72
-rw-r--r--sc/source/ui/unoobj/forbiuno.cxx8
-rw-r--r--sc/source/ui/unoobj/funcuno.cxx13
-rw-r--r--sc/source/ui/unoobj/linkuno.cxx182
-rw-r--r--sc/source/ui/unoobj/listenercalls.cxx2
-rw-r--r--sc/source/ui/unoobj/makefile.mk3
-rw-r--r--sc/source/ui/unoobj/miscuno.cxx8
-rw-r--r--sc/source/ui/unoobj/nameuno.cxx88
-rw-r--r--sc/source/ui/unoobj/notesuno.cxx122
-rw-r--r--sc/source/ui/unoobj/optuno.cxx7
-rw-r--r--sc/source/ui/unoobj/pageuno.cxx3
-rw-r--r--sc/source/ui/unoobj/scdetect.cxx105
-rw-r--r--sc/source/ui/unoobj/scdetect.hxx3
-rw-r--r--sc/source/ui/unoobj/servuno.cxx43
-rw-r--r--sc/source/ui/unoobj/shapeuno.cxx142
-rw-r--r--sc/source/ui/unoobj/srchuno.cxx18
-rw-r--r--sc/source/ui/unoobj/styleuno.cxx74
-rw-r--r--sc/source/ui/unoobj/targuno.cxx5
-rw-r--r--sc/source/ui/unoobj/textuno.cxx73
-rw-r--r--sc/source/ui/unoobj/tokenuno.cxx18
-rw-r--r--sc/source/ui/unoobj/unodoc.cxx6
-rw-r--r--sc/source/ui/unoobj/unoreflist.cxx2
-rw-r--r--sc/source/ui/unoobj/viewuno.cxx317
-rw-r--r--sc/source/ui/unoobj/warnpassword.cxx2
-rw-r--r--sc/source/ui/vba/excelvbahelper.cxx169
-rw-r--r--sc/source/ui/vba/excelvbahelper.hxx42
-rw-r--r--sc/source/ui/vba/helperdecl.hxx2
-rw-r--r--sc/source/ui/vba/makefile.mk14
-rw-r--r--sc/source/ui/vba/service.cxx3
-rw-r--r--sc/source/ui/vba/testvba/testvba.cxx9
-rw-r--r--sc/source/ui/vba/vbaapplication.cxx661
-rw-r--r--sc/source/ui/vba/vbaapplication.hxx26
-rw-r--r--sc/source/ui/vba/vbaassistant.cxx3
-rw-r--r--sc/source/ui/vba/vbaassistant.hxx3
-rw-r--r--sc/source/ui/vba/vbaaxes.cxx2
-rw-r--r--sc/source/ui/vba/vbaaxes.hxx3
-rw-r--r--sc/source/ui/vba/vbaaxis.cxx2
-rw-r--r--sc/source/ui/vba/vbaaxis.hxx3
-rw-r--r--sc/source/ui/vba/vbaaxistitle.cxx2
-rw-r--r--sc/source/ui/vba/vbaaxistitle.hxx3
-rw-r--r--sc/source/ui/vba/vbaborders.cxx7
-rw-r--r--sc/source/ui/vba/vbaborders.hxx2
-rw-r--r--sc/source/ui/vba/vbacharacters.cxx2
-rw-r--r--sc/source/ui/vba/vbacharacters.hxx2
-rw-r--r--sc/source/ui/vba/vbachart.cxx2
-rw-r--r--sc/source/ui/vba/vbachart.hxx3
-rw-r--r--sc/source/ui/vba/vbachartobject.cxx3
-rw-r--r--sc/source/ui/vba/vbachartobject.hxx3
-rw-r--r--sc/source/ui/vba/vbachartobjects.cxx2
-rw-r--r--sc/source/ui/vba/vbachartobjects.hxx3
-rw-r--r--sc/source/ui/vba/vbacharts.cxx2
-rw-r--r--sc/source/ui/vba/vbacharts.hxx3
-rw-r--r--sc/source/ui/vba/vbacharttitle.cxx2
-rw-r--r--sc/source/ui/vba/vbacharttitle.hxx3
-rw-r--r--sc/source/ui/vba/vbacomment.cxx21
-rw-r--r--sc/source/ui/vba/vbacomment.hxx2
-rw-r--r--sc/source/ui/vba/vbacomments.cxx3
-rw-r--r--sc/source/ui/vba/vbacomments.hxx2
-rw-r--r--sc/source/ui/vba/vbacommentshape.cxx (renamed from sc/source/ui/unoobj/unoguard.cxx)30
-rw-r--r--sc/source/ui/vba/vbacommentshape.hxx (renamed from sc/inc/unoguard.hxx)25
-rw-r--r--sc/source/ui/vba/vbacondition.cxx2
-rw-r--r--sc/source/ui/vba/vbacondition.hxx3
-rw-r--r--sc/source/ui/vba/vbadialog.cxx84
-rw-r--r--sc/source/ui/vba/vbadialog.hxx6
-rw-r--r--sc/source/ui/vba/vbadialogs.cxx10
-rw-r--r--sc/source/ui/vba/vbadialogs.hxx4
-rw-r--r--sc/source/ui/vba/vbaeventshelper.cxx13
-rw-r--r--sc/source/ui/vba/vbaeventshelper.hxx3
-rw-r--r--sc/source/ui/vba/vbafiledialog.cxx186
-rw-r--r--sc/source/ui/vba/vbafiledialog.hxx63
-rw-r--r--sc/source/ui/vba/vbafiledialogselecteditems.cxx157
-rw-r--r--sc/source/ui/vba/vbafiledialogselecteditems.hxx90
-rw-r--r--sc/source/ui/vba/vbafilesearch.cxx245
-rw-r--r--sc/source/ui/vba/vbafilesearch.hxx80
-rw-r--r--sc/source/ui/vba/vbafont.cxx3
-rw-r--r--sc/source/ui/vba/vbafont.hxx2
-rw-r--r--sc/source/ui/vba/vbaformat.cxx4
-rw-r--r--sc/source/ui/vba/vbaformat.hxx3
-rw-r--r--sc/source/ui/vba/vbaformatcondition.cxx3
-rw-r--r--sc/source/ui/vba/vbaformatcondition.hxx3
-rw-r--r--sc/source/ui/vba/vbaformatconditions.cxx2
-rw-r--r--sc/source/ui/vba/vbaformatconditions.hxx3
-rw-r--r--sc/source/ui/vba/vbafoundfiles.cxx146
-rw-r--r--sc/source/ui/vba/vbafoundfiles.hxx91
-rw-r--r--sc/source/ui/vba/vbaglobals.cxx13
-rw-r--r--sc/source/ui/vba/vbaglobals.hxx4
-rw-r--r--sc/source/ui/vba/vbahelper.cxx3
-rw-r--r--sc/source/ui/vba/vbahyperlink.cxx3
-rw-r--r--sc/source/ui/vba/vbahyperlink.hxx2
-rw-r--r--sc/source/ui/vba/vbahyperlinks.cxx3
-rw-r--r--sc/source/ui/vba/vbahyperlinks.hxx3
-rw-r--r--sc/source/ui/vba/vbainterior.cxx2
-rw-r--r--sc/source/ui/vba/vbainterior.hxx2
-rw-r--r--sc/source/ui/vba/vbamenu.cxx87
-rw-r--r--sc/source/ui/vba/vbamenu.hxx57
-rw-r--r--sc/source/ui/vba/vbamenubar.cxx69
-rw-r--r--sc/source/ui/vba/vbamenubar.hxx53
-rw-r--r--sc/source/ui/vba/vbamenubars.cxx140
-rw-r--r--sc/source/ui/vba/vbamenubars.hxx64
-rw-r--r--sc/source/ui/vba/vbamenuitem.cxx85
-rw-r--r--sc/source/ui/vba/vbamenuitem.hxx58
-rw-r--r--sc/source/ui/vba/vbamenuitems.cxx153
-rw-r--r--sc/source/ui/vba/vbamenuitems.hxx63
-rw-r--r--sc/source/ui/vba/vbamenus.cxx139
-rw-r--r--sc/source/ui/vba/vbamenus.hxx63
-rw-r--r--sc/source/ui/vba/vbaname.cxx93
-rw-r--r--sc/source/ui/vba/vbaname.hxx6
-rw-r--r--sc/source/ui/vba/vbanames.cxx88
-rw-r--r--sc/source/ui/vba/vbanames.hxx2
-rw-r--r--sc/source/ui/vba/vbaoleobject.cxx5
-rw-r--r--sc/source/ui/vba/vbaoleobject.hxx2
-rw-r--r--sc/source/ui/vba/vbaoleobjects.cxx3
-rw-r--r--sc/source/ui/vba/vbaoleobjects.hxx2
-rw-r--r--sc/source/ui/vba/vbaoutline.cxx3
-rw-r--r--sc/source/ui/vba/vbaoutline.hxx3
-rw-r--r--sc/source/ui/vba/vbapagebreak.cxx2
-rw-r--r--sc/source/ui/vba/vbapagebreak.hxx3
-rw-r--r--sc/source/ui/vba/vbapagebreaks.cxx28
-rw-r--r--sc/source/ui/vba/vbapagebreaks.hxx3
-rw-r--r--sc/source/ui/vba/vbapagesetup.cxx108
-rw-r--r--sc/source/ui/vba/vbapagesetup.hxx5
-rw-r--r--sc/source/ui/vba/vbapalette.cxx7
-rw-r--r--sc/source/ui/vba/vbapalette.hxx2
-rw-r--r--sc/source/ui/vba/vbapane.cxx3
-rw-r--r--sc/source/ui/vba/vbapane.hxx3
-rw-r--r--sc/source/ui/vba/vbapivotcache.cxx13
-rw-r--r--sc/source/ui/vba/vbapivotcache.hxx7
-rw-r--r--sc/source/ui/vba/vbapivottable.cxx3
-rw-r--r--sc/source/ui/vba/vbapivottable.hxx3
-rw-r--r--sc/source/ui/vba/vbapivottables.cxx3
-rw-r--r--sc/source/ui/vba/vbapivottables.hxx3
-rw-r--r--sc/source/ui/vba/vbapropvalue.cxx3
-rw-r--r--sc/source/ui/vba/vbapropvalue.hxx3
-rw-r--r--sc/source/ui/vba/vbaquerytable.cxx90
-rw-r--r--sc/source/ui/vba/vbaquerytable.hxx62
-rw-r--r--sc/source/ui/vba/vbarange.cxx1044
-rw-r--r--sc/source/ui/vba/vbarange.hxx18
-rw-r--r--sc/source/ui/vba/vbaseriescollection.cxx2
-rw-r--r--sc/source/ui/vba/vbaseriescollection.hxx3
-rw-r--r--sc/source/ui/vba/vbasheetobject.cxx3
-rw-r--r--sc/source/ui/vba/vbasheetobject.hxx3
-rw-r--r--sc/source/ui/vba/vbasheetobjects.cxx3
-rw-r--r--sc/source/ui/vba/vbasheetobjects.hxx3
-rw-r--r--sc/source/ui/vba/vbastyle.cxx3
-rw-r--r--sc/source/ui/vba/vbastyle.hxx3
-rw-r--r--sc/source/ui/vba/vbastyles.cxx3
-rw-r--r--sc/source/ui/vba/vbastyles.hxx3
-rw-r--r--sc/source/ui/vba/vbatextboxshape.cxx3
-rw-r--r--sc/source/ui/vba/vbatextboxshape.hxx3
-rw-r--r--sc/source/ui/vba/vbatextframe.cxx3
-rw-r--r--sc/source/ui/vba/vbatextframe.hxx3
-rw-r--r--sc/source/ui/vba/vbatitle.hxx3
-rw-r--r--sc/source/ui/vba/vbavalidation.cxx15
-rw-r--r--sc/source/ui/vba/vbavalidation.hxx3
-rw-r--r--sc/source/ui/vba/vbawindow.cxx3
-rw-r--r--sc/source/ui/vba/vbawindow.hxx3
-rw-r--r--sc/source/ui/vba/vbawindows.cxx3
-rw-r--r--sc/source/ui/vba/vbawindows.hxx2
-rw-r--r--sc/source/ui/vba/vbaworkbook.cxx74
-rw-r--r--sc/source/ui/vba/vbaworkbook.hxx12
-rw-r--r--sc/source/ui/vba/vbaworkbooks.cxx3
-rw-r--r--sc/source/ui/vba/vbaworkbooks.hxx3
-rw-r--r--sc/source/ui/vba/vbaworksheet.cxx123
-rw-r--r--sc/source/ui/vba/vbaworksheet.hxx9
-rw-r--r--sc/source/ui/vba/vbaworksheets.cxx3
-rw-r--r--sc/source/ui/vba/vbaworksheets.hxx3
-rw-r--r--sc/source/ui/vba/vbawsfunction.cxx69
-rw-r--r--sc/source/ui/vba/vbawsfunction.hxx2
-rw-r--r--sc/source/ui/view/auditsh.cxx2
-rw-r--r--sc/source/ui/view/cellmergeoption.cxx3
-rw-r--r--sc/source/ui/view/cellsh.cxx2
-rw-r--r--sc/source/ui/view/cellsh1.cxx3
-rw-r--r--sc/source/ui/view/cellsh2.cxx43
-rw-r--r--sc/source/ui/view/cellsh3.cxx2
-rw-r--r--sc/source/ui/view/cellsh4.cxx2
-rw-r--r--sc/source/ui/view/colrowba.cxx2
-rw-r--r--sc/source/ui/view/dbfunc.cxx4
-rw-r--r--sc/source/ui/view/dbfunc2.cxx2
-rw-r--r--sc/source/ui/view/dbfunc3.cxx3
-rw-r--r--sc/source/ui/view/dbfunc4.cxx2
-rw-r--r--sc/source/ui/view/drawattr.cxx2
-rw-r--r--sc/source/ui/view/drawutil.cxx2
-rw-r--r--sc/source/ui/view/drawvie2.cxx2
-rw-r--r--sc/source/ui/view/drawvie3.cxx2
-rw-r--r--sc/source/ui/view/drawvie4.cxx40
-rw-r--r--sc/source/ui/view/drawview.cxx5
-rw-r--r--sc/source/ui/view/editsh.cxx2
-rw-r--r--sc/source/ui/view/formatsh.cxx3
-rw-r--r--sc/source/ui/view/galwrap.cxx2
-rw-r--r--sc/source/ui/view/gridmerg.cxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx29
-rw-r--r--sc/source/ui/view/gridwin2.cxx19
-rw-r--r--sc/source/ui/view/gridwin3.cxx2
-rw-r--r--sc/source/ui/view/gridwin4.cxx55
-rw-r--r--sc/source/ui/view/gridwin5.cxx5
-rw-r--r--sc/source/ui/view/hdrcont.cxx11
-rw-r--r--sc/source/ui/view/hintwin.cxx3
-rw-r--r--sc/source/ui/view/imapwrap.cxx2
-rw-r--r--sc/source/ui/view/invmerge.cxx2
-rw-r--r--sc/source/ui/view/makefile.mk2
-rw-r--r--sc/source/ui/view/notemark.cxx2
-rw-r--r--sc/source/ui/view/olinewin.cxx2
-rw-r--r--sc/source/ui/view/olkact.cxx2
-rw-r--r--sc/source/ui/view/output.cxx42
-rw-r--r--sc/source/ui/view/output2.cxx59
-rw-r--r--sc/source/ui/view/output3.cxx2
-rw-r--r--sc/source/ui/view/overlayobject.cxx3
-rw-r--r--sc/source/ui/view/pfuncache.cxx4
-rw-r--r--sc/source/ui/view/pgbrksh.cxx2
-rw-r--r--sc/source/ui/view/pivotsh.cxx2
-rw-r--r--sc/source/ui/view/preview.cxx10
-rw-r--r--sc/source/ui/view/prevloc.cxx2
-rw-r--r--sc/source/ui/view/prevwsh.cxx2
-rw-r--r--sc/source/ui/view/prevwsh2.cxx2
-rw-r--r--sc/source/ui/view/printfun.cxx8
-rw-r--r--sc/source/ui/view/reffact.cxx3
-rw-r--r--sc/source/ui/view/scextopt.cxx2
-rw-r--r--sc/source/ui/view/select.cxx29
-rw-r--r--sc/source/ui/view/selectionstate.cxx2
-rw-r--r--sc/source/ui/view/spelldialog.cxx2
-rw-r--r--sc/source/ui/view/spelleng.cxx2
-rw-r--r--sc/source/ui/view/tabcont.cxx19
-rw-r--r--sc/source/ui/view/tabpopsh.cxx3
-rw-r--r--sc/source/ui/view/tabsplit.cxx2
-rw-r--r--sc/source/ui/view/tabview.cxx50
-rw-r--r--sc/source/ui/view/tabview2.cxx2
-rw-r--r--sc/source/ui/view/tabview3.cxx12
-rw-r--r--sc/source/ui/view/tabview4.cxx2
-rw-r--r--sc/source/ui/view/tabview5.cxx28
-rw-r--r--sc/source/ui/view/tabvwsh.cxx3
-rw-r--r--sc/source/ui/view/tabvwsh2.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh3.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx45
-rw-r--r--sc/source/ui/view/tabvwsh5.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh8.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh9.cxx2
-rw-r--r--sc/source/ui/view/tabvwsha.cxx2
-rw-r--r--sc/source/ui/view/tabvwshb.cxx2
-rw-r--r--sc/source/ui/view/tabvwshc.cxx2
-rw-r--r--sc/source/ui/view/tabvwshd.cxx2
-rw-r--r--sc/source/ui/view/tabvwshe.cxx2
-rw-r--r--sc/source/ui/view/tabvwshf.cxx16
-rw-r--r--sc/source/ui/view/tabvwshg.cxx2
-rw-r--r--sc/source/ui/view/tabvwshh.cxx2
-rw-r--r--sc/source/ui/view/viewdata.cxx3
-rw-r--r--sc/source/ui/view/viewfun2.cxx61
-rw-r--r--sc/source/ui/view/viewfun3.cxx151
-rw-r--r--sc/source/ui/view/viewfun4.cxx2
-rw-r--r--sc/source/ui/view/viewfun5.cxx21
-rw-r--r--sc/source/ui/view/viewfun6.cxx3
-rw-r--r--sc/source/ui/view/viewfun7.cxx2
-rw-r--r--sc/source/ui/view/viewfunc.cxx2
-rw-r--r--sc/source/ui/view/viewutil.cxx2
-rw-r--r--sc/source/ui/view/waitoff.cxx2
-rw-r--r--sc/uiconfig/scalc/menubar/menubar.xml1
-rw-r--r--sc/util/makefile.mk13
-rw-r--r--sc/util/scfilt.map3
-rw-r--r--sc/workben/addin.cxx4
-rw-r--r--sc/workben/addin.hxx2
-rw-r--r--sc/workben/makefile.mk2
-rw-r--r--sc/workben/result.cxx2
-rw-r--r--sc/workben/result.hxx2
-rw-r--r--sc/workben/test.cxx106
-rw-r--r--sc/xml/AccessibleEditableTextPara_HeaderFooter.xml1
-rw-r--r--sc/xml/AccessibleEditableTextPara_PreviewCell.xml1
-rw-r--r--sc/xml/AccessibleEditableTextPara_PreviewNote.xml1
-rw-r--r--sc/xml/ScAccessibleCell.xml1
-rw-r--r--sc/xml/ScAccessibleCsvCell.xml1
-rw-r--r--sc/xml/ScAccessibleCsvGrid.xml1
-rw-r--r--sc/xml/ScAccessibleCsvRuler.xml1
-rw-r--r--sc/xml/ScAccessibleDocument.xml1
-rw-r--r--sc/xml/ScAccessibleDocumentPagePreview.xml1
-rw-r--r--sc/xml/ScAccessiblePageHeader.xml1
-rw-r--r--sc/xml/ScAccessiblePageHeaderArea.xml1
-rw-r--r--sc/xml/ScAccessiblePreviewCell.xml1
-rw-r--r--sc/xml/ScAccessiblePreviewHeaderCell.xml1
-rw-r--r--sc/xml/ScAccessiblePreviewTable.xml1
-rw-r--r--sc/xml/ScAccessibleSpreadsheet.xml1
-rw-r--r--sc/xml/ScAnnotationObj.xml1
-rw-r--r--sc/xml/ScAnnotationShapeObj.xml1
-rw-r--r--sc/xml/ScAnnotationsObj.xml1
-rw-r--r--sc/xml/ScAreaLinkObj.xml1
-rw-r--r--sc/xml/ScAreaLinksObj.xml1
-rw-r--r--sc/xml/ScAutoFormatFieldObj.xml1
-rw-r--r--sc/xml/ScAutoFormatObj.xml1
-rw-r--r--sc/xml/ScAutoFormatsObj.xml1
-rw-r--r--sc/xml/ScCellCursorObj.xml1
-rw-r--r--sc/xml/ScCellFieldObj.xml1
-rw-r--r--sc/xml/ScCellFieldsObj.xml1
-rw-r--r--sc/xml/ScCellFormatsEnumeration.xml1
-rw-r--r--sc/xml/ScCellFormatsObj.xml1
-rw-r--r--sc/xml/ScCellObj.xml1
-rw-r--r--sc/xml/ScCellRangeObj.xml1
-rw-r--r--sc/xml/ScCellRangesObj.xml1
-rw-r--r--sc/xml/ScCellSearchObj.xml1
-rw-r--r--sc/xml/ScCellTextCursor.xml1
-rw-r--r--sc/xml/ScCellsEnumeration.xml1
-rw-r--r--sc/xml/ScCellsObj.xml1
-rw-r--r--sc/xml/ScChartObj.xml1
-rw-r--r--sc/xml/ScChartsObj.xml1
-rw-r--r--sc/xml/ScConsolidationDescriptor.xml1
-rw-r--r--sc/xml/ScDDELinkObj.xml1
-rw-r--r--sc/xml/ScDDELinksObj.xml1
-rw-r--r--sc/xml/ScDataPilotFieldGroupItemObj.xml1
-rw-r--r--sc/xml/ScDataPilotFieldGroupObj.xml1
-rw-r--r--sc/xml/ScDataPilotFieldGroupsObj.xml1
-rw-r--r--sc/xml/ScDataPilotFieldObj.xml1
-rw-r--r--sc/xml/ScDataPilotFieldsObj.xml1
-rw-r--r--sc/xml/ScDataPilotItemObj.xml1
-rw-r--r--sc/xml/ScDataPilotItemsObj.xml1
-rw-r--r--sc/xml/ScDataPilotTableObj.xml1
-rw-r--r--sc/xml/ScDataPilotTablesObj.xml1
-rw-r--r--sc/xml/ScDatabaseRangeObj.xml1
-rw-r--r--sc/xml/ScDatabaseRangesObj.xml1
-rw-r--r--sc/xml/ScDocumentConfiguration.xml1
-rw-r--r--sc/xml/ScDrawPageObj.xml1
-rw-r--r--sc/xml/ScDrawPagesObj.xml1
-rw-r--r--sc/xml/ScFilterDescriptorBase.xml1
-rw-r--r--sc/xml/ScFunctionListObj.xml1
-rw-r--r--sc/xml/ScHeaderFieldObj.xml1
-rw-r--r--sc/xml/ScHeaderFieldsObj.xml1
-rw-r--r--sc/xml/ScHeaderFooterContentObj.xml1
-rw-r--r--sc/xml/ScHeaderFooterTextCursor.xml1
-rw-r--r--sc/xml/ScHeaderFooterTextObj.xml1
-rw-r--r--sc/xml/ScIndexEnumeration_CellAnnotationsEnumeration.xml1
-rw-r--r--sc/xml/ScIndexEnumeration_CellAreaLinksEnumeration.xml1
-rw-r--r--sc/xml/ScIndexEnumeration_DDELinksEnumeration.xml1
-rw-r--r--sc/xml/ScIndexEnumeration_DataPilotFieldsEnumeration.xml1
-rw-r--r--sc/xml/ScIndexEnumeration_DataPilotItemsEnumeration.xml1
-rw-r--r--sc/xml/ScIndexEnumeration_DataPilotTablesEnumeration.xml1
-rw-r--r--sc/xml/ScIndexEnumeration_DatabaseRangesEnumeration.xml1
-rw-r--r--sc/xml/ScIndexEnumeration_FunctionDescriptionEnumeration.xml1
-rw-r--r--sc/xml/ScIndexEnumeration_LabelRangesEnumeration.xml1
-rw-r--r--sc/xml/ScIndexEnumeration_NamedRangesEnumeration.xml1
-rw-r--r--sc/xml/ScIndexEnumeration_ScenariosEnumeration.xml1
-rw-r--r--sc/xml/ScIndexEnumeration_SheetCellRangesEnumeration.xml1
-rw-r--r--sc/xml/ScIndexEnumeration_SheetLinksEnumeration.xml1
-rw-r--r--sc/xml/ScIndexEnumeration_SpreadsheetViewPanesEnumeration.xml1
-rw-r--r--sc/xml/ScIndexEnumeration_SpreadsheetsEnumeration.xml1
-rw-r--r--sc/xml/ScIndexEnumeration_SubTotalFieldsEnumeration.xml1
-rw-r--r--sc/xml/ScIndexEnumeration_TableAutoFormatEnumeration.xml1
-rw-r--r--sc/xml/ScIndexEnumeration_TableChartsEnumeration.xml1
-rw-r--r--sc/xml/ScIndexEnumeration_TableColumnsEnumeration.xml1
-rw-r--r--sc/xml/ScIndexEnumeration_TableConditionalEntryEnumeration.xml1
-rw-r--r--sc/xml/ScIndexEnumeration_TableRowsEnumeration.xml1
-rw-r--r--sc/xml/ScIndexEnumeration_TextFieldEnumeration.xml1
-rw-r--r--sc/xml/ScLabelRangeObj.xml1
-rw-r--r--sc/xml/ScLabelRangesObj.xml1
-rw-r--r--sc/xml/ScModelObj.xml1
-rw-r--r--sc/xml/ScNamedRangeObj.xml1
-rw-r--r--sc/xml/ScNamedRangesObj.xml1
-rw-r--r--sc/xml/ScPageObj.xml1
-rw-r--r--sc/xml/ScRecentFunctionsObj.xml1
-rw-r--r--sc/xml/ScScenariosObj.xml1
-rw-r--r--sc/xml/ScShapeObj.xml1
-rw-r--r--sc/xml/ScSheetLinkObj.xml1
-rw-r--r--sc/xml/ScSheetLinksObj.xml1
-rw-r--r--sc/xml/ScSpreadsheetSettings.xml1
-rw-r--r--sc/xml/ScSpreadsheetSettingsObj.xml1
-rw-r--r--sc/xml/ScStyleFamiliesObj.xml1
-rw-r--r--sc/xml/ScStyleFamilyObj.xml1
-rw-r--r--sc/xml/ScStyleObj.xml1
-rw-r--r--sc/xml/ScSubTotalDescriptorBase.xml1
-rw-r--r--sc/xml/ScSubTotalFieldObj.xml1
-rw-r--r--sc/xml/ScTabViewObj.xml1
-rw-r--r--sc/xml/ScTableColumnObj.xml1
-rw-r--r--sc/xml/ScTableColumnsObj.xml1
-rw-r--r--sc/xml/ScTableConditionalEntry.xml1
-rw-r--r--sc/xml/ScTableConditionalFormat.xml1
-rw-r--r--sc/xml/ScTableRowObj.xml1
-rw-r--r--sc/xml/ScTableRowsObj.xml1
-rw-r--r--sc/xml/ScTableSheetObj.xml1
-rw-r--r--sc/xml/ScTableSheetsObj.xml1
-rw-r--r--sc/xml/ScTableValidationObj.xml1
-rw-r--r--sc/xml/ScUniqueCellFormatsEnumeration.xml1
-rw-r--r--sc/xml/ScUniqueCellFormatsObj.xml1
-rw-r--r--sc/xml/ScViewPaneObj.xml1
-rw-r--r--sc/xml/ScXMLExport.xml1
-rw-r--r--sc/xml/ScXMLImport.xml1
1499 files changed, 15604 insertions, 5087 deletions
diff --git a/sc/addin/inc/addin.h b/sc/addin/inc/addin.h
index 419d0e3a59db..63f2ef06d28d 100644
--- a/sc/addin/inc/addin.h
+++ b/sc/addin/inc/addin.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -145,3 +146,5 @@ extern void CALLTYPE SetLanguage( USHORT* nLanguage );
#endif
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/AccessibleFilterMenu.hxx b/sc/inc/AccessibleFilterMenu.hxx
index df72fec64f57..25405a58a369 100644
--- a/sc/inc/AccessibleFilterMenu.hxx
+++ b/sc/inc/AccessibleFilterMenu.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -189,3 +190,5 @@ private:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/AccessibleFilterMenuItem.hxx b/sc/inc/AccessibleFilterMenuItem.hxx
index ecf5bdc5ad87..fbdcfbb6b36e 100644
--- a/sc/inc/AccessibleFilterMenuItem.hxx
+++ b/sc/inc/AccessibleFilterMenuItem.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -119,3 +120,5 @@ private:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/AccessibleFilterTopWindow.hxx b/sc/inc/AccessibleFilterTopWindow.hxx
index 0a8c0dfbe005..d45a90a2cd0c 100644
--- a/sc/inc/AccessibleFilterTopWindow.hxx
+++ b/sc/inc/AccessibleFilterTopWindow.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -95,3 +96,5 @@ private:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/AccessibleGlobal.hxx b/sc/inc/AccessibleGlobal.hxx
index a30ebf7ee18c..5c06ed29edaf 100644
--- a/sc/inc/AccessibleGlobal.hxx
+++ b/sc/inc/AccessibleGlobal.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,3 +68,5 @@ private:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/ViewSettingsSequenceDefines.hxx b/sc/inc/ViewSettingsSequenceDefines.hxx
index 7437ba698f8a..a0167898607d 100644
--- a/sc/inc/ViewSettingsSequenceDefines.hxx
+++ b/sc/inc/ViewSettingsSequenceDefines.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -107,3 +108,5 @@
#define SC_VIEW "view"
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/addincfg.hxx b/sc/inc/addincfg.hxx
index 193da4095977..02756974c17d 100644
--- a/sc/inc/addincfg.hxx
+++ b/sc/inc/addincfg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,3 +54,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/addincol.hxx b/sc/inc/addincol.hxx
index f66a498e8292..e59d076a7c10 100644
--- a/sc/inc/addincol.hxx
+++ b/sc/inc/addincol.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -242,3 +243,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx
index 15084565dfe0..c5bf78960c65 100644
--- a/sc/inc/address.hxx
+++ b/sc/inc/address.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -232,6 +233,9 @@ inline SCTAB SanitizeTab( SCTAB nTab, SCTAB nMaxTab )
#define SCA_VALID_ROW 0x0100
#define SCA_VALID_COL 0x0200
#define SCA_VALID_TAB 0x0400
+// SCA_BITS is a convience for
+// (SCA_VALID_TAB | SCA_VALID_COL | SCA_VALID_ROW | SCA_TAB_3D | SCA_TAB_ABSOLUTE | SCA_ROW_ABSOLUTE | SCA_COL_ABSOLUTE)
+#define SCA_BITS 0x070F
// somewhat cheesy kludge to force the display of the document name even for
// local references. Requires TAB_3D to be valid
#define SCA_FORCE_DOC 0x0800
@@ -823,3 +827,4 @@ bool AlphaToCol( SCCOL& rCol, const String& rStr);
#endif // SC_ADDRESS_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/addruno.hxx b/sc/inc/addruno.hxx
index d6df571a29aa..ee059463e807 100644
--- a/sc/inc/addruno.hxx
+++ b/sc/inc/addruno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,7 +48,7 @@ private:
sal_Int32 nRefSheet;
sal_Bool bIsRange;
- sal_Bool ParseUIString( const String& rUIString );
+ sal_Bool ParseUIString( const String& rUIString, ::formula::FormulaGrammar::AddressConvention eConv = ::formula::FormulaGrammar::CONV_OOO );
public:
@@ -108,3 +109,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/afmtuno.hxx b/sc/inc/afmtuno.hxx
index 9cb402a03764..983f3cf130d9 100644
--- a/sc/inc/afmtuno.hxx
+++ b/sc/inc/afmtuno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -308,3 +309,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/appluno.hxx b/sc/inc/appluno.hxx
index 050611eeeb9e..e7c017f0785d 100644
--- a/sc/inc/appluno.hxx
+++ b/sc/inc/appluno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -209,3 +210,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/appoptio.hxx b/sc/inc/appoptio.hxx
index 91fc43fc249a..673e332a5b96 100644
--- a/sc/inc/appoptio.hxx
+++ b/sc/inc/appoptio.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,6 +45,10 @@ public:
void SetDefaults();
+ // Set or get the initial tab count for new spreadsheet, it is used by VBA API currently.
+ void SetTabCountInNewSpreadsheet( sal_Int16 nCount ) { nTabCountInNewSpreadsheet = nCount; }
+ sal_Int16 GetTabCountInNewSpreadsheet() const { return nTabCountInNewSpreadsheet; }
+
void SetAppMetric( FieldUnit eUnit ) { eMetric = eUnit; }
FieldUnit GetAppMetric() const { return eMetric; }
void SetZoom( USHORT nNew ) { nZoom = nNew; }
@@ -87,6 +92,7 @@ public:
const ScAppOptions& operator= ( const ScAppOptions& rOpt );
private:
+ sal_Int16 nTabCountInNewSpreadsheet;
FieldUnit eMetric;
USHORT nLRUFuncCount;
USHORT* pLRUList;
@@ -147,3 +153,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/arealink.hxx b/sc/inc/arealink.hxx
index 46ce98709df1..832bc61cb332 100644
--- a/sc/inc/arealink.hxx
+++ b/sc/inc/arealink.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -91,3 +92,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/attarray.hxx b/sc/inc/attarray.hxx
index ea578627fe25..3ea416fabada 100644
--- a/sc/inc/attarray.hxx
+++ b/sc/inc/attarray.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -242,3 +243,4 @@ inline const ScPatternAttr* ScAttrIterator::Next( SCROW& rTop, SCROW& rBottom )
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/attrib.hxx b/sc/inc/attrib.hxx
index 52f713f8ae8c..784638e64956 100644
--- a/sc/inc/attrib.hxx
+++ b/sc/inc/attrib.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -396,3 +397,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/autoform.hxx b/sc/inc/autoform.hxx
index 28af989ccaf0..3fb6d197717f 100644
--- a/sc/inc/autoform.hxx
+++ b/sc/inc/autoform.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -281,3 +282,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/autonamecache.hxx b/sc/inc/autonamecache.hxx
index 0eb1b51efe29..3fbbe8d3fe78 100644
--- a/sc/inc/autonamecache.hxx
+++ b/sc/inc/autonamecache.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56,3 +57,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/bigrange.hxx b/sc/inc/bigrange.hxx
index d5a066d522cc..ac92d30a27cf 100644
--- a/sc/inc/bigrange.hxx
+++ b/sc/inc/bigrange.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -271,3 +272,5 @@ inline SvStream& operator>> ( SvStream& rStream, ScBigRange& rRange )
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/brdcst.hxx b/sc/inc/brdcst.hxx
index cdba4e3a78bb..a050a935b31c 100644
--- a/sc/inc/brdcst.hxx
+++ b/sc/inc/brdcst.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -68,3 +69,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/callform.hxx b/sc/inc/callform.hxx
index 58962ea18c03..dd6f13057d76 100644
--- a/sc/inc/callform.hxx
+++ b/sc/inc/callform.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -122,3 +123,5 @@ BOOL InitExternalFunc(const rtl::OUString& rModuleName);
void ExitExternalFunc();
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/cell.hxx b/sc/inc/cell.hxx
index f9cce9e94ed2..ba480b83cf58 100644
--- a/sc/inc/cell.hxx
+++ b/sc/inc/cell.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -406,7 +407,7 @@ public:
const formula::FormulaGrammar::Grammar = formula::FormulaGrammar::GRAM_DEFAULT ) const;
void SetDirty();
- inline void SetDirtyVar() { bDirty = TRUE; }
+ void SetDirtyVar();
// If setting entire document dirty after load, no broadcasts but still append to FormulaTree.
void SetDirtyAfterLoad();
inline void ResetTableOpDirtyVar() { bTableOpDirty = FALSE; }
@@ -558,3 +559,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/cellform.hxx b/sc/inc/cellform.hxx
index b0b445a5993d..9b7bc5236ae0 100644
--- a/sc/inc/cellform.hxx
+++ b/sc/inc/cellform.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,3 +64,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/cellsuno.hxx b/sc/inc/cellsuno.hxx
index a53f167b164a..10bc1b4bddcc 100644
--- a/sc/inc/cellsuno.hxx
+++ b/sc/inc/cellsuno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1567,3 +1568,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/cfgids.hxx b/sc/inc/cfgids.hxx
index 4b07ddd0682f..d428f03f456e 100644
--- a/sc/inc/cfgids.hxx
+++ b/sc/inc/cfgids.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,3 +40,4 @@
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/chart2uno.hxx b/sc/inc/chart2uno.hxx
index 5b398f7afb57..c2a54bdfa745 100644
--- a/sc/inc/chart2uno.hxx
+++ b/sc/inc/chart2uno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -693,3 +694,5 @@ private:
#endif
#endif // SC_CHART2UNO_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/chartarr.hxx b/sc/inc/chartarr.hxx
index 62f30a17c62e..f3604756eab8 100644
--- a/sc/inc/chartarr.hxx
+++ b/sc/inc/chartarr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -125,3 +126,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/charthelper.hxx b/sc/inc/charthelper.hxx
index 50b8586bdace..97dcb197dc6a 100644
--- a/sc/inc/charthelper.hxx
+++ b/sc/inc/charthelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,3 +53,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/chartlis.hxx b/sc/inc/chartlis.hxx
index 26831970d5b7..c2b86a7b29f7 100644
--- a/sc/inc/chartlis.hxx
+++ b/sc/inc/chartlis.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -216,3 +217,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/chartlock.hxx b/sc/inc/chartlock.hxx
index 16f0fdd2cf4c..16afcc78ced0 100644
--- a/sc/inc/chartlock.hxx
+++ b/sc/inc/chartlock.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -84,3 +85,5 @@ private:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/chartpos.hxx b/sc/inc/chartpos.hxx
index 196d2a8eae39..9542ef104e50 100644
--- a/sc/inc/chartpos.hxx
+++ b/sc/inc/chartpos.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -166,3 +167,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/chartuno.hxx b/sc/inc/chartuno.hxx
index fe261f26e517..ce778ad62423 100644
--- a/sc/inc/chartuno.hxx
+++ b/sc/inc/chartuno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -202,3 +203,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/chgtrack.hxx b/sc/inc/chgtrack.hxx
index 6cf3d59314ef..f3142969d97a 100644
--- a/sc/inc/chgtrack.hxx
+++ b/sc/inc/chgtrack.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1368,3 +1369,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/chgviset.hxx b/sc/inc/chgviset.hxx
index ddc0dcc14243..b4ad990afbaf 100644
--- a/sc/inc/chgviset.hxx
+++ b/sc/inc/chgviset.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -147,3 +148,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/clipparam.hxx b/sc/inc/clipparam.hxx
index 78b5474229d1..915a4fb7333a 100644
--- a/sc/inc/clipparam.hxx
+++ b/sc/inc/clipparam.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -86,3 +87,5 @@ struct ScClipRangeNameData
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/collect.hxx b/sc/inc/collect.hxx
index f2305ed9c7cd..9e0b1a66c1bd 100644
--- a/sc/inc/collect.hxx
+++ b/sc/inc/collect.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -199,3 +200,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 18ba05b47046..2600ee149d3f 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -449,3 +450,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx
index d2fa4dddfcf6..1229042f5ff0 100644
--- a/sc/inc/compiler.hxx
+++ b/sc/inc/compiler.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -100,14 +101,12 @@ class ScTokenArray;
// constants and data types internal to compiler
-#if 0
/*
OpCode eOp; // OpCode
formula::StackVar eType; // type of data
USHORT nRefCnt; // reference count
BOOL bRaw; // not cloned yet and trimmed to real size
*/
-#endif
#define SC_TOKEN_FIX_MEMBERS \
OpCode eOp; \
@@ -537,3 +536,5 @@ private:
SC_DLLPUBLIC String GetScCompilerNativeSymbol( OpCode eOp ); //CHINA001
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/compressedarray.hxx b/sc/inc/compressedarray.hxx
index 3b6f35366976..61d331e21210 100644
--- a/sc/inc/compressedarray.hxx
+++ b/sc/inc/compressedarray.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -667,3 +668,5 @@ A ScCoupledCompressedArrayIterator<A,D,S>::GetRangeEnd() const
#endif // SC_COMPRESSEDARRAY_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/conditio.hxx b/sc/inc/conditio.hxx
index 75758841af7a..99f2025be6a5 100644
--- a/sc/inc/conditio.hxx
+++ b/sc/inc/conditio.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -299,3 +300,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/confuno.hxx b/sc/inc/confuno.hxx
index bd74406eb37a..2fa22ad4dcf2 100644
--- a/sc/inc/confuno.hxx
+++ b/sc/inc/confuno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -105,3 +106,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/consoli.hxx b/sc/inc/consoli.hxx
index 4eb30b12c432..70de0f8f3dd8 100644
--- a/sc/inc/consoli.hxx
+++ b/sc/inc/consoli.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -132,3 +133,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/convuno.hxx b/sc/inc/convuno.hxx
index 0f93d6d6de0d..87c36aa95c82 100644
--- a/sc/inc/convuno.hxx
+++ b/sc/inc/convuno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -216,3 +217,4 @@ inline sal_Bool operator!=(
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/cursuno.hxx b/sc/inc/cursuno.hxx
index 470f4e3c6f5c..e4602a1da4f9 100644
--- a/sc/inc/cursuno.hxx
+++ b/sc/inc/cursuno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -108,3 +109,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/dapiuno.hxx b/sc/inc/dapiuno.hxx
index c9a5305a05ca..c4612f6a571c 100644
--- a/sc/inc/dapiuno.hxx
+++ b/sc/inc/dapiuno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -989,3 +990,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/datauno.hxx b/sc/inc/datauno.hxx
index 79902b367ac7..6dd25b6ce0d1 100644
--- a/sc/inc/datauno.hxx
+++ b/sc/inc/datauno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -663,3 +664,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/dbcolect.hxx b/sc/inc/dbcolect.hxx
index 6b57a422c140..4a94ee81fdf6 100644
--- a/sc/inc/dbcolect.hxx
+++ b/sc/inc/dbcolect.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -241,3 +242,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/dbdocutl.hxx b/sc/inc/dbdocutl.hxx
index 384375152954..bb08c56d0f67 100644
--- a/sc/inc/dbdocutl.hxx
+++ b/sc/inc/dbdocutl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,3 +61,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/dbtoken.hxx b/sc/inc/dbtoken.hxx
index 1cdacfd97323..7650813452d9 100644
--- a/sc/inc/dbtoken.hxx
+++ b/sc/inc/dbtoken.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,3 +53,4 @@ formula::StackVar DbgInterpret( ScDocument* pDok, const ScTokenArray* pToken,
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/defltuno.hxx b/sc/inc/defltuno.hxx
index 5ef4f501061a..697180bbfaa1 100644
--- a/sc/inc/defltuno.hxx
+++ b/sc/inc/defltuno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -128,3 +129,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/detdata.hxx b/sc/inc/detdata.hxx
index 31055c270fbf..cc8b52afbb4e 100644
--- a/sc/inc/detdata.hxx
+++ b/sc/inc/detdata.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -104,3 +105,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/detfunc.hxx b/sc/inc/detfunc.hxx
index fb9d0ac9569e..f99601e69180 100644
--- a/sc/inc/detfunc.hxx
+++ b/sc/inc/detfunc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -171,3 +172,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/dispuno.hxx b/sc/inc/dispuno.hxx
index 9526ed8ae3db..4b29605cfc3f 100644
--- a/sc/inc/dispuno.hxx
+++ b/sc/inc/dispuno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -149,3 +150,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/dociter.hxx b/sc/inc/dociter.hxx
index 928c5ab1f390..ac382889fb71 100644
--- a/sc/inc/dociter.hxx
+++ b/sc/inc/dociter.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -568,3 +569,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/docoptio.hxx b/sc/inc/docoptio.hxx
index 46845df55434..2733e968bbd4 100644
--- a/sc/inc/docoptio.hxx
+++ b/sc/inc/docoptio.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,6 +42,7 @@ class SC_DLLPUBLIC ScDocOptions
double fIterEps; // Epsilon-Wert dazu
USHORT nIterCount; // Anzahl
sal_uInt16 nPrecStandardFormat; // precision for standard format
+ ScOptionsUtil::KeyBindingType eKeyBindingType;
USHORT nDay; // Nulldatum:
USHORT nMonth;
USHORT nYear;
@@ -88,7 +90,6 @@ public:
void SetTabDistance( USHORT nTabDist ) {nTabDistance = nTabDist;}
void ResetDocOptions();
- inline void CopyTo(ScDocOptions& rOpt);
inline const ScDocOptions& operator=( const ScDocOptions& rOpt );
inline int operator==( const ScDocOptions& rOpt ) const;
@@ -97,6 +98,9 @@ public:
sal_uInt16 GetStdPrecision() const { return nPrecStandardFormat; }
void SetStdPrecision( sal_uInt16 n ) { nPrecStandardFormat = n; }
+ ScOptionsUtil::KeyBindingType GetKeyBindingType() const { return eKeyBindingType; }
+ void SetKeyBindingType( ScOptionsUtil::KeyBindingType e ) { eKeyBindingType = e; }
+
BOOL IsCalcAsShown() const { return bCalcAsShown; }
void SetCalcAsShown( BOOL bVal ) { bCalcAsShown = bVal; }
@@ -125,31 +129,6 @@ public:
static const LocaleDataWrapper& GetLocaleDataWrapper();
};
-
-inline void ScDocOptions::CopyTo(ScDocOptions& rOpt)
-{
- rOpt.bIsIgnoreCase = bIsIgnoreCase;
- rOpt.bIsIter = bIsIter;
- rOpt.nIterCount = nIterCount;
- rOpt.fIterEps = fIterEps;
- rOpt.nPrecStandardFormat = nPrecStandardFormat;
- rOpt.nDay = nDay;
- rOpt.nMonth = nMonth;
- rOpt.nYear2000 = nYear2000;
- rOpt.nYear = nYear;
- rOpt.nTabDistance = nTabDistance;
- rOpt.bCalcAsShown = bCalcAsShown;
- rOpt.bMatchWholeCell = bMatchWholeCell;
- rOpt.bDoAutoSpell = bDoAutoSpell;
- rOpt.bLookUpColRowNames = bLookUpColRowNames;
- rOpt.bFormulaRegexEnabled = bFormulaRegexEnabled;
- rOpt.bUseEnglishFuncName = bUseEnglishFuncName;
- rOpt.eFormulaGrammar = eFormulaGrammar;
- rOpt.aFormulaSepArg = aFormulaSepArg;
- rOpt.aFormulaSepArrayRow = aFormulaSepArrayRow;
- rOpt.aFormulaSepArrayCol = aFormulaSepArrayCol;
-}
-
inline const ScDocOptions& ScDocOptions::operator=( const ScDocOptions& rCpy )
{
bIsIgnoreCase = rCpy.bIsIgnoreCase;
@@ -157,6 +136,7 @@ inline const ScDocOptions& ScDocOptions::operator=( const ScDocOptions& rCpy )
nIterCount = rCpy.nIterCount;
fIterEps = rCpy.fIterEps;
nPrecStandardFormat = rCpy.nPrecStandardFormat;
+ eKeyBindingType = rCpy.eKeyBindingType;
nDay = rCpy.nDay;
nMonth = rCpy.nMonth;
nYear = rCpy.nYear;
@@ -184,6 +164,7 @@ inline int ScDocOptions::operator==( const ScDocOptions& rOpt ) const
&& rOpt.nIterCount == nIterCount
&& rOpt.fIterEps == fIterEps
&& rOpt.nPrecStandardFormat == nPrecStandardFormat
+ && rOpt.eKeyBindingType == eKeyBindingType
&& rOpt.nDay == nDay
&& rOpt.nMonth == nMonth
&& rOpt.nYear == nYear
@@ -239,14 +220,17 @@ class ScDocCfg : public ScDocOptions
ScLinkConfigItem aCalcItem;
ScLinkConfigItem aFormulaItem;
ScLinkConfigItem aLayoutItem;
+ ScLinkConfigItem aCompatItem;
DECL_LINK( CalcCommitHdl, void* );
DECL_LINK( FormulaCommitHdl, void* );
DECL_LINK( LayoutCommitHdl, void* );
+ DECL_LINK( CompatCommitHdl, void* );
com::sun::star::uno::Sequence<rtl::OUString> GetCalcPropertyNames();
com::sun::star::uno::Sequence<rtl::OUString> GetFormulaPropertyNames();
com::sun::star::uno::Sequence<rtl::OUString> GetLayoutPropertyNames();
+ com::sun::star::uno::Sequence<rtl::OUString> GetCompatPropertyNames();
public:
ScDocCfg();
@@ -257,3 +241,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/docparam.hxx b/sc/inc/docparam.hxx
index e273c01a3524..2511f26679a4 100644
--- a/sc/inc/docparam.hxx
+++ b/sc/inc/docparam.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45,3 +46,5 @@ struct ScColWidthParam
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/docpool.hxx b/sc/inc/docpool.hxx
index 59bd70592725..7d6be24c425c 100644
--- a/sc/inc/docpool.hxx
+++ b/sc/inc/docpool.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -81,3 +82,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 8964f756f07e..117ae0be99ca 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,7 +33,7 @@
#include <vcl/prntypes.hxx>
#include <vcl/timer.hxx>
#include <com/sun/star/uno/Reference.hxx>
-#include <vos/ref.hxx>
+#include <rtl/ref.hxx>
#include "scdllapi.h"
#include "table.hxx" // FastGetRowHeight (inline)
#include "rangelst.hxx"
@@ -104,6 +105,7 @@ class ScDrawLayer;
class ScExtDocOptions;
class ScExternalRefManager;
class ScFormulaCell;
+class ScMacroManager;
class ScMarkData;
class ScOutlineTable;
class ScPatternAttr;
@@ -258,7 +260,7 @@ friend class ScDocRowHeightUpdater;
private:
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceManager;
- vos::ORef<ScPoolHelper> xPoolHelper;
+ rtl::Reference<ScPoolHelper> xPoolHelper;
SfxUndoManager* mpUndoManager;
ScFieldEditEngine* pEditEngine; // uses pEditPool from xPoolHelper
@@ -301,7 +303,7 @@ private:
ScChangeViewSettings* pChangeViewSettings;
ScScriptTypeData* pScriptTypeData;
ScRefreshTimerControl* pRefreshTimerControl;
- vos::ORef<SvxForbiddenCharactersTable> xForbiddenCharacters;
+ rtl::Reference<SvxForbiddenCharactersTable> xForbiddenCharacters;
ScFieldEditEngine* pCacheFieldEditEngine;
@@ -309,6 +311,8 @@ private:
::std::auto_ptr<ScClipParam> mpClipParam;
::std::auto_ptr<ScExternalRefManager> pExternalRefMgr;
+ ::std::auto_ptr<ScMacroManager> mpMacroMgr;
+
// mutable for lazy construction
mutable ::std::auto_ptr< ScFormulaParserPool >
@@ -467,6 +471,8 @@ public:
const String& GetCodeName() const { return aDocCodeName; }
void SetCodeName( const String& r ) { aDocCodeName = r; }
+ SC_DLLPUBLIC NameToNameMap* GetLocalNameMap( SCTAB& rTab );
+
void GetDocStat( ScDocStat& rDocStat );
SC_DLLPUBLIC void InitDrawLayer( SfxObjectShell* pDocShell = NULL );
@@ -586,6 +592,7 @@ public:
BOOL HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow,
const ScMarkData& rMark ) const;
+ BOOL HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTAB ) const;
BOOL GetMatrixFormulaRange( const ScAddress& rCellPos, ScRange& rMatrix );
@@ -958,7 +965,7 @@ public:
SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab,
ScDirection eDir );
- void FindAreaPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, SCsCOL nMovX, SCsROW nMovY );
+ SC_DLLPUBLIC void FindAreaPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, SCsCOL nMovX, SCsROW nMovY );
SC_DLLPUBLIC void GetNextPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, SCsCOL nMovX, SCsROW nMovY,
BOOL bMarked, BOOL bUnprotected, const ScMarkData& rMark );
@@ -979,7 +986,7 @@ public:
SCROW nStartRow, SCSIZE nSize,
ScDocument* pRefUndoDoc = NULL, BOOL* pUndoOutline = NULL,
const ScMarkData* pTabMark = NULL );
- void DeleteRow( const ScRange& rRange,
+ SC_DLLPUBLIC void DeleteRow( const ScRange& rRange,
ScDocument* pRefUndoDoc = NULL, BOOL* pUndoOutline = NULL );
BOOL InsertCol( SCROW nStartRow, SCTAB nStartTab,
SCROW nEndRow, SCTAB nEndTab,
@@ -1017,7 +1024,7 @@ public:
SC_DLLPUBLIC void ResetClip( ScDocument* pSourceDoc, const ScMarkData* pMarks );
SC_DLLPUBLIC void ResetClip( ScDocument* pSourceDoc, SCTAB nTab );
void SetCutMode( BOOL bCut );
- BOOL IsCutMode();
+ SC_DLLPUBLIC BOOL IsCutMode();
void SetClipArea( const ScRange& rArea, BOOL bCut = FALSE );
SC_DLLPUBLIC BOOL IsDocVisible() const { return bIsVisible; }
@@ -1039,6 +1046,9 @@ public:
const ScMarkData* pMarks = NULL, bool bAllTabs = false, bool bKeepScenarioFlags = false,
bool bIncludeObjects = false, bool bCloneNoteCaptions = true);
+ void CopyToClip4VBA(const ScClipParam& rClipParam, ScDocument* pClipDoc, bool bKeepScenarioFlags = false,
+ bool bIncludeObjects = false, bool bCloneNoteCaptions = true);
+
void CopyTabToClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
SCTAB nTab, ScDocument* pClipDoc = NULL);
void CopyBlockFromClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
@@ -1578,8 +1588,8 @@ public:
ScChangeViewSettings* GetChangeViewSettings() const { return pChangeViewSettings; }
SC_DLLPUBLIC void SetChangeViewSettings(const ScChangeViewSettings& rNew);
- vos::ORef<SvxForbiddenCharactersTable> GetForbiddenCharacters();
- void SetForbiddenCharacters( const vos::ORef<SvxForbiddenCharactersTable> xNew );
+ rtl::Reference<SvxForbiddenCharactersTable> GetForbiddenCharacters();
+ void SetForbiddenCharacters( const rtl::Reference<SvxForbiddenCharactersTable> xNew );
BYTE GetAsianCompression() const; // CharacterCompressionType values
BOOL IsValidAsianCompression() const;
@@ -1594,6 +1604,7 @@ public:
SC_DLLPUBLIC ScLkUpdMode GetLinkMode() const { return eLinkMode ;}
void SetLinkMode( ScLkUpdMode nSet ) { eLinkMode = nSet;}
+ SC_DLLPUBLIC ScMacroManager* GetMacroManager();
private:
ScDocument(const ScDocument& r); // disabled with no definition
@@ -1861,6 +1872,7 @@ private: // CLOOK-Impl-Methoden
const ScRange& r, SCsCOL nDx, SCsROW nDy, SCsTAB nDz );
void CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClipRange, const ScMarkData* pMarks, bool bAllTabs);
+ void CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClipRange, SCTAB nTab);
void CopyRangeNamesFromClip(ScDocument* pClipDoc, ScClipRangeNameData& rRangeNames);
void UpdateRangeNamesInFormulas(
ScClipRangeNameData& rRangeNames, const ScRangeList& rDestRanges, const ScMarkData& rMark,
@@ -1884,3 +1896,4 @@ inline void ScDocument::SetSortParam( ScSortParam& rParam, SCTAB nTab )
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx
index c29c551ea3cd..421c40a53256 100644
--- a/sc/inc/docuno.hxx
+++ b/sc/inc/docuno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -857,3 +858,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/dpcachetable.hxx b/sc/inc/dpcachetable.hxx
index eab01d078081..98ead38d114d 100644
--- a/sc/inc/dpcachetable.hxx
+++ b/sc/inc/dpcachetable.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -247,3 +248,5 @@ private:
// End Comments
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/dpdimsave.hxx b/sc/inc/dpdimsave.hxx
index f887ed91ea32..382c72b7a189 100644
--- a/sc/inc/dpdimsave.hxx
+++ b/sc/inc/dpdimsave.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -200,3 +201,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/dpglobal.hxx b/sc/inc/dpglobal.hxx
index 7de5947cc969..73da14d17642 100644
--- a/sc/inc/dpglobal.hxx
+++ b/sc/inc/dpglobal.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -207,3 +208,5 @@ namespace ScDPGlobal
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/dpgroup.hxx b/sc/inc/dpgroup.hxx
index a22b6fd6a2eb..a47b78719531 100644
--- a/sc/inc/dpgroup.hxx
+++ b/sc/inc/dpgroup.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -263,3 +264,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx
index e1b88919dad6..8fa972f1f01e 100644
--- a/sc/inc/dpobject.hxx
+++ b/sc/inc/dpobject.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -298,3 +299,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/dpoutput.hxx b/sc/inc/dpoutput.hxx
index e97a56a9ecf2..77c552ec7026 100644
--- a/sc/inc/dpoutput.hxx
+++ b/sc/inc/dpoutput.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -172,3 +173,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/dpoutputgeometry.hxx b/sc/inc/dpoutputgeometry.hxx
index 7069787e803d..c5c65195eff0 100644
--- a/sc/inc/dpoutputgeometry.hxx
+++ b/sc/inc/dpoutputgeometry.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -75,3 +76,5 @@ private:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/dpsave.hxx b/sc/inc/dpsave.hxx
index 8272b850b27e..9ecb1c598bba 100644
--- a/sc/inc/dpsave.hxx
+++ b/sc/inc/dpsave.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -284,3 +285,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/dpsdbtab.hxx b/sc/inc/dpsdbtab.hxx
index 732e3d30e8df..9863e332058e 100644
--- a/sc/inc/dpsdbtab.hxx
+++ b/sc/inc/dpsdbtab.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -95,3 +96,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/dpshttab.hxx b/sc/inc/dpshttab.hxx
index a8d80072c68a..13a201c0020e 100644
--- a/sc/inc/dpshttab.hxx
+++ b/sc/inc/dpshttab.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -108,3 +109,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/dptabdat.hxx b/sc/inc/dptabdat.hxx
index 6323434ca4ad..89a9deb8efd3 100644
--- a/sc/inc/dptabdat.hxx
+++ b/sc/inc/dptabdat.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -209,3 +210,4 @@ private:
};
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/dptablecache.hxx b/sc/inc/dptablecache.hxx
index 55fee3c4f6f9..a662795809f4 100644
--- a/sc/inc/dptablecache.hxx
+++ b/sc/inc/dptablecache.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -118,3 +119,5 @@ private:
};
#endif //DPTABLECACHE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/dptabres.hxx b/sc/inc/dptabres.hxx
index 7f9720a4b143..f92725371353 100644
--- a/sc/inc/dptabres.hxx
+++ b/sc/inc/dptabres.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -736,3 +737,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/dptabsrc.hxx b/sc/inc/dptabsrc.hxx
index 05252c9f1ef7..34c51469caad 100644
--- a/sc/inc/dptabsrc.hxx
+++ b/sc/inc/dptabsrc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -870,3 +871,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/drawattr.hxx b/sc/inc/drawattr.hxx
index ee4f48ad9cf5..4fd444c7c531 100644
--- a/sc/inc/drawattr.hxx
+++ b/sc/inc/drawattr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,3 +64,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/drawpage.hxx b/sc/inc/drawpage.hxx
index 14691c6632cd..68365e9847f4 100644
--- a/sc/inc/drawpage.hxx
+++ b/sc/inc/drawpage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -48,3 +49,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/drdefuno.hxx b/sc/inc/drdefuno.hxx
index 09fd3368271e..dd79fbbf2b1b 100644
--- a/sc/inc/drdefuno.hxx
+++ b/sc/inc/drdefuno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,3 +51,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/drwlayer.hxx b/sc/inc/drwlayer.hxx
index 7dd9903f82a1..d84044a5da32 100644
--- a/sc/inc/drwlayer.hxx
+++ b/sc/inc/drwlayer.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -118,7 +119,7 @@ public:
ScDrawLayer( ScDocument* pDocument, const String& rName );
virtual ~ScDrawLayer();
- virtual SdrPage* AllocPage(FASTBOOL bMasterPage);
+ virtual SdrPage* AllocPage(bool bMasterPage);
virtual SdrModel* AllocModel() const;
virtual void SetChanged( sal_Bool bFlg = sal_True );
@@ -164,9 +165,6 @@ public:
void DeleteObjectsInArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1,
SCCOL nCol2,SCROW nRow2 );
void DeleteObjectsInSelection( const ScMarkData& rMark );
-#if 0
- void DeleteObjects( SCTAB nTab );
-#endif
void CopyToClip( ScDocument* pClipDoc, SCTAB nTab, const Rectangle& rRange );
void CopyFromClip( ScDrawLayer* pClipModel,
@@ -231,3 +229,4 @@ protected:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/editsrc.hxx b/sc/inc/editsrc.hxx
index ed4423d629a8..1e94cf2679dc 100644
--- a/sc/inc/editsrc.hxx
+++ b/sc/inc/editsrc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -191,3 +192,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/editutil.hxx b/sc/inc/editutil.hxx
index aefa789d2587..52f42d0f2670 100644
--- a/sc/inc/editutil.hxx
+++ b/sc/inc/editutil.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -262,3 +263,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/eventuno.hxx b/sc/inc/eventuno.hxx
index f3ae72f0f1bf..602b650d8f06 100644
--- a/sc/inc/eventuno.hxx
+++ b/sc/inc/eventuno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -89,3 +90,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx
index e0988f98632b..a8833c36b992 100644
--- a/sc/inc/externalrefmgr.hxx
+++ b/sc/inc/externalrefmgr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -796,3 +797,5 @@ private:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/fielduno.hxx b/sc/inc/fielduno.hxx
index 584d62451cc6..ae4aec33979d 100644
--- a/sc/inc/fielduno.hxx
+++ b/sc/inc/fielduno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -452,3 +453,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/fillinfo.hxx b/sc/inc/fillinfo.hxx
index 8dead5b4fb05..ead88f29053c 100644
--- a/sc/inc/fillinfo.hxx
+++ b/sc/inc/fillinfo.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -151,3 +152,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/filter.hxx b/sc/inc/filter.hxx
index ae0fd92f6858..2f00b29e7651 100644
--- a/sc/inc/filter.hxx
+++ b/sc/inc/filter.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -143,3 +144,4 @@ class ScFormatFilter {
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/filtopt.hxx b/sc/inc/filtopt.hxx
index 0efdfeeb5a30..62ac5a893cc7 100644
--- a/sc/inc/filtopt.hxx
+++ b/sc/inc/filtopt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,3 +61,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/filtuno.hxx b/sc/inc/filtuno.hxx
index 2bddb7fdd02c..e42bfc19b386 100644
--- a/sc/inc/filtuno.hxx
+++ b/sc/inc/filtuno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -109,3 +110,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/fmtuno.hxx b/sc/inc/fmtuno.hxx
index eebd808c30a4..cded07b92349 100644
--- a/sc/inc/fmtuno.hxx
+++ b/sc/inc/fmtuno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -330,3 +331,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/forbiuno.hxx b/sc/inc/forbiuno.hxx
index 05e23cf96506..f092401801e9 100644
--- a/sc/inc/forbiuno.hxx
+++ b/sc/inc/forbiuno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,3 +54,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/formulaparserpool.hxx b/sc/inc/formulaparserpool.hxx
index c65f7f9428ce..3d5b96fbecaf 100644
--- a/sc/inc/formulaparserpool.hxx
+++ b/sc/inc/formulaparserpool.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,3 +66,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/formularesult.hxx b/sc/inc/formularesult.hxx
index bd99cca8f5d9..c490b69ec949 100644
--- a/sc/inc/formularesult.hxx
+++ b/sc/inc/formularesult.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -613,3 +614,5 @@ inline ScMatrixFormulaCellToken* ScFormulaResult::GetMatrixFormulaCellTokenNonCo
#endif // SC_FORMULARESULT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/funcdesc.hxx b/sc/inc/funcdesc.hxx
index a8f495440554..9f5e4d08c341 100644
--- a/sc/inc/funcdesc.hxx
+++ b/sc/inc/funcdesc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -178,3 +179,5 @@ private:
//============================================================================
#endif // SC_FUNCDESC_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/funcuno.hxx b/sc/inc/funcuno.hxx
index 4413782a0e2f..53510f55d600 100644
--- a/sc/inc/funcuno.hxx
+++ b/sc/inc/funcuno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -146,3 +147,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index db87877df738..49ab758b7d0b 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -225,6 +226,7 @@ const USHORT IDF_HARDATTR = 0x0020; /// Hard cell attributes.
const USHORT IDF_STYLES = 0x0040; /// Cell styles.
const USHORT IDF_OBJECTS = 0x0080; /// Drawing objects.
const USHORT IDF_EDITATTR = 0x0100; /// Rich-text attributes.
+const USHORT IDF_SPECIAL_BOOLEAN = 0x1000;
const USHORT IDF_ATTRIB = IDF_HARDATTR | IDF_STYLES;
const USHORT IDF_CONTENTS = IDF_VALUE | IDF_DATETIME | IDF_STRING | IDF_NOTE | IDF_FORMULA;
const USHORT IDF_ALL = IDF_CONTENTS | IDF_ATTRIB | IDF_OBJECTS;
@@ -890,3 +892,5 @@ extern ::utl::TransliterationWrapper* GetScGlobalpTransliteration();//CHINA001
extern const LocaleDataWrapper* GetScGlobalpLocaleData();
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index bc3094424d69..3182be9d4e21 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -579,8 +579,24 @@
#define STR_UNDO_INSERT_CURRENT_TIME 441
#define STR_OPTIONS_WARN_SEPARATORS 442
-
-#define STR_COUNT 443
+#define STR_SHAPE_AUTOSHAPE 443
+#define STR_SHAPE_RECTANGLE 444
+#define STR_SHAPE_LINE 445
+#define STR_SHAPE_OVAL 446
+#define STR_SHAPE_TEXTBOX 447
+
+#define STR_FORM_BUTTON 448
+#define STR_FORM_CHECKBOX 449
+#define STR_FORM_OPTIONBUTTON 450
+#define STR_FORM_LABEL 451
+#define STR_FORM_LISTBOX 452
+#define STR_FORM_GROUPBOX 453
+#define STR_FORM_DROPDOWN 454
+#define STR_FORM_SPINNER 455
+#define STR_FORM_SCROLLBAR 456
+
+#define STR_PGNUM 457
+
+#define STR_COUNT 458
#endif
-
diff --git a/sc/inc/hints.hxx b/sc/inc/hints.hxx
index 6a55cc4225bb..708d37a9b4bd 100644
--- a/sc/inc/hints.hxx
+++ b/sc/inc/hints.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -182,3 +183,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/inputopt.hxx b/sc/inc/inputopt.hxx
index 62e258b76500..0b1b922fc1c7 100644
--- a/sc/inc/inputopt.hxx
+++ b/sc/inc/inputopt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -103,3 +104,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/linkuno.hxx b/sc/inc/linkuno.hxx
index 284d851a45da..a64d64b48c5e 100644
--- a/sc/inc/linkuno.hxx
+++ b/sc/inc/linkuno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -632,3 +633,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/listenercalls.hxx b/sc/inc/listenercalls.hxx
index 988cd2a24dd7..d5167c96e174 100644
--- a/sc/inc/listenercalls.hxx
+++ b/sc/inc/listenercalls.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -77,3 +78,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/lookupcache.hxx b/sc/inc/lookupcache.hxx
index 431f995d27c2..1cf5bc2797b1 100644
--- a/sc/inc/lookupcache.hxx
+++ b/sc/inc/lookupcache.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -255,3 +256,5 @@ private:
typedef ::std::hash_map< ScRange, ScLookupCache*, ScLookupCache::Hash, ::std::equal_to< ScRange > > ScLookupCacheMap;
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/macromgr.hxx b/sc/inc/macromgr.hxx
new file mode 100644
index 000000000000..e667ab65f0b0
--- /dev/null
+++ b/sc/inc/macromgr.hxx
@@ -0,0 +1,72 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: document.hxx,v $
+ * $Revision: 1.115.36.9 $
+ *
+ * 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 SC_MACROMGR_HXX
+#define SC_MACROMGR_HXX
+
+#include <com/sun/star/container/XContainerListener.hpp>
+
+#include "rtl/ustring.hxx"
+#include "scdllapi.h"
+
+#include <hash_map>
+#include <memory>
+
+class ScDocument;
+class ScFormulaCell;
+class ScUserMacroDepTracker;
+
+class ScMacroManager
+{
+public:
+ explicit ScMacroManager(ScDocument* pDoc);
+ ~ScMacroManager();
+
+ SC_DLLPUBLIC void InitUserFuncData();
+ SC_DLLPUBLIC void SetUserFuncVolatile( const rtl::OUString& sName, bool isVolatile );
+ SC_DLLPUBLIC bool GetUserFuncVolatile( const rtl::OUString& sName );
+
+ void AddDependentCell(const ::rtl::OUString& aModuleName, ScFormulaCell* pCell);
+ void RemoveDependentCell(ScFormulaCell* pCell);
+ void BroadcastModuleUpdate(const ::rtl::OUString& aModuleName);
+
+private:
+ typedef std::hash_map< ::rtl::OUString, bool, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > NameBoolMap;
+ NameBoolMap mhFuncToVolatile;
+ com::sun::star::uno::Reference< com::sun::star::container::XContainerListener > mxContainerListener;
+
+ ::std::auto_ptr<ScUserMacroDepTracker> mpDepTracker;
+ ScDocument* mpDoc;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/markarr.hxx b/sc/inc/markarr.hxx
index 4fd6a835b61a..a41197a49d68 100644
--- a/sc/inc/markarr.hxx
+++ b/sc/inc/markarr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -84,3 +85,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/markdata.hxx b/sc/inc/markdata.hxx
index a982c8db47dd..abab6086f99f 100644
--- a/sc/inc/markdata.hxx
+++ b/sc/inc/markdata.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -119,3 +120,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/miscuno.hxx b/sc/inc/miscuno.hxx
index eeceae4ee829..e845e3c466ff 100644
--- a/sc/inc/miscuno.hxx
+++ b/sc/inc/miscuno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -202,3 +203,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/mutexhlp.hxx b/sc/inc/mutexhlp.hxx
index bd45332b9817..ebe9176799c4 100644
--- a/sc/inc/mutexhlp.hxx
+++ b/sc/inc/mutexhlp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,3 +45,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/nameuno.hxx b/sc/inc/nameuno.hxx
index b8cb1ad91754..27d149b3d816 100644
--- a/sc/inc/nameuno.hxx
+++ b/sc/inc/nameuno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -349,3 +350,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/navicfg.hxx b/sc/inc/navicfg.hxx
index 23cd38e1f10a..939ddff5d778 100644
--- a/sc/inc/navicfg.hxx
+++ b/sc/inc/navicfg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56,3 +57,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/notesuno.hxx b/sc/inc/notesuno.hxx
index a1648132f8e1..42e79d5bcee7 100644
--- a/sc/inc/notesuno.hxx
+++ b/sc/inc/notesuno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -319,3 +320,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/olinetab.hxx b/sc/inc/olinetab.hxx
index 82a49b3ba025..dca32db3932f 100644
--- a/sc/inc/olinetab.hxx
+++ b/sc/inc/olinetab.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -177,3 +178,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/optuno.hxx b/sc/inc/optuno.hxx
index 094ff1cfea32..53dae3500fe8 100644
--- a/sc/inc/optuno.hxx
+++ b/sc/inc/optuno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -91,3 +92,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/optutil.hxx b/sc/inc/optutil.hxx
index 83b23a3c9ef9..7526d91b57d5 100644
--- a/sc/inc/optutil.hxx
+++ b/sc/inc/optutil.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,6 +37,9 @@
class ScOptionsUtil
{
public:
+ // values must correspond with integer values stored in the configuration
+ enum KeyBindingType { KEY_DEFAULT = 0, KEY_OOO_LEGACY = 1 };
+
static BOOL IsMetricSystem();
};
@@ -75,3 +79,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/pagepar.hxx b/sc/inc/pagepar.hxx
index 935046e81a48..a3c2c4f3b77b 100644
--- a/sc/inc/pagepar.hxx
+++ b/sc/inc/pagepar.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -84,3 +85,4 @@ struct ScPageAreaParam
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/pageuno.hxx b/sc/inc/pageuno.hxx
index 4b897748db1e..778986101d27 100644
--- a/sc/inc/pageuno.hxx
+++ b/sc/inc/pageuno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -54,3 +55,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/paramisc.hxx b/sc/inc/paramisc.hxx
index 896fec2e88d9..549328e24b67 100644
--- a/sc/inc/paramisc.hxx
+++ b/sc/inc/paramisc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -75,3 +76,4 @@ struct ScTabOpParam
#endif // SC_PARAMISC_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/patattr.hxx b/sc/inc/patattr.hxx
index 7ebcf066481e..6368eaa9b7f1 100644
--- a/sc/inc/patattr.hxx
+++ b/sc/inc/patattr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -178,3 +179,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/pch/precompiled_sc.cxx b/sc/inc/pch/precompiled_sc.cxx
index 6d7b708ffd69..705088caeddb 100644
--- a/sc/inc/pch/precompiled_sc.cxx
+++ b/sc/inc/pch/precompiled_sc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,3 +27,5 @@
************************************************************************/
#include "precompiled_sc.hxx"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/pch/precompiled_sc.hxx b/sc/inc/pch/precompiled_sc.hxx
index 048d7b638d57..e915273ce098 100644
--- a/sc/inc/pch/precompiled_sc.hxx
+++ b/sc/inc/pch/precompiled_sc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -236,10 +237,8 @@
#include <vcl/vclevent.hxx>
#include <vcl/window.hxx>
#include <vcl/wintypes.hxx>
-#include <vos/macros.hxx>
-#include <vos/object.hxx>
-#include <vos/types.hxx>
#include <wchar.h>
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/pivot.hxx b/sc/inc/pivot.hxx
index 3a0a776205c8..a844b3d3ecbe 100644
--- a/sc/inc/pivot.hxx
+++ b/sc/inc/pivot.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -206,3 +207,5 @@ typedef std::vector<ScDPName> ScDPNameVec;
// ============================================================================
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/postit.hxx b/sc/inc/postit.hxx
index a4363e3adfbc..444f672ddcfe 100644
--- a/sc/inc/postit.hxx
+++ b/sc/inc/postit.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -261,3 +262,5 @@ public:
// ============================================================================
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/printopt.hxx b/sc/inc/printopt.hxx
index ede04ea809ce..cf9e55e50c26 100644
--- a/sc/inc/printopt.hxx
+++ b/sc/inc/printopt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -96,3 +97,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/prnsave.hxx b/sc/inc/prnsave.hxx
index b28d04cf48bf..7dacefdd943a 100644
--- a/sc/inc/prnsave.hxx
+++ b/sc/inc/prnsave.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -79,3 +80,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/progress.hxx b/sc/inc/progress.hxx
index a9cd3d2544bd..d6c2bd3f4529 100644
--- a/sc/inc/progress.hxx
+++ b/sc/inc/progress.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -157,3 +158,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/queryparam.hxx b/sc/inc/queryparam.hxx
index 12f3842bc26b..93302bd3c284 100644
--- a/sc/inc/queryparam.hxx
+++ b/sc/inc/queryparam.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -142,3 +143,5 @@ struct ScDBQueryParamMatrix : public ScDBQueryParamBase
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/rangelst.hxx b/sc/inc/rangelst.hxx
index e00fce10da1c..3584a9d2b2a7 100644
--- a/sc/inc/rangelst.hxx
+++ b/sc/inc/rangelst.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -115,3 +116,5 @@ ScRangePairList_QsortNameCompare( const void*, const void* );
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/rangenam.hxx b/sc/inc/rangenam.hxx
index 889efcf164d7..5d9256becab2 100644
--- a/sc/inc/rangenam.hxx
+++ b/sc/inc/rangenam.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -142,7 +143,7 @@ public:
SC_DLLPUBLIC BOOL IsReference( ScRange& rRef ) const;
BOOL IsReference( ScRange& rRef, const ScAddress& rPos ) const;
- BOOL IsValidReference( ScRange& rRef ) const;
+ SC_DLLPUBLIC BOOL IsValidReference( ScRange& rRef ) const;
BOOL IsRangeAtBlock( const ScRange& ) const;
void UpdateTabRef(SCTAB nOldTable, USHORT nFlag, SCTAB nNewTable);
@@ -219,3 +220,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/rangeseq.hxx b/sc/inc/rangeseq.hxx
index 6238ea5f8050..3923958b969d 100644
--- a/sc/inc/rangeseq.hxx
+++ b/sc/inc/rangeseq.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -112,3 +113,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/rangeutl.hxx b/sc/inc/rangeutl.hxx
index b5c5ac166852..f9695f9dfe21 100644
--- a/sc/inc/rangeutl.hxx
+++ b/sc/inc/rangeutl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -324,3 +325,4 @@ public:
#endif // SC_RANGEUTL_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/rechead.hxx b/sc/inc/rechead.hxx
index 348159c12ce1..06503f892fce 100644
--- a/sc/inc/rechead.hxx
+++ b/sc/inc/rechead.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -168,3 +169,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/recursionhelper.hxx b/sc/inc/recursionhelper.hxx
index 7b24e1a409b4..7881addf248f 100644
--- a/sc/inc/recursionhelper.hxx
+++ b/sc/inc/recursionhelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -157,3 +158,5 @@ class ScRecursionHelper
};
#endif // INCLUDED_RECURSIONHELPER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/refdata.hxx b/sc/inc/refdata.hxx
index f42f930084be..ed0a34982416 100644
--- a/sc/inc/refdata.hxx
+++ b/sc/inc/refdata.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -211,3 +212,5 @@ inline bool ScComplexRefData::ValidExternal() const
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/reffind.hxx b/sc/inc/reffind.hxx
index 775571adeab7..7c638b27a33b 100644
--- a/sc/inc/reffind.hxx
+++ b/sc/inc/reffind.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -66,3 +67,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/refreshtimer.hxx b/sc/inc/refreshtimer.hxx
index 2a8512848ef0..b9964300ab85 100644
--- a/sc/inc/refreshtimer.hxx
+++ b/sc/inc/refreshtimer.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,7 @@
#include <tools/list.hxx>
#include <vcl/timer.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <scdllapi.h>
#define SC_REFRESHTIMER_CONTROL_LIST 0
@@ -42,8 +43,8 @@ DECLARE_LIST( ScRefreshTimerList, ScRefreshTimer* )
class ScRefreshTimerControl
{
private:
- ::vos::OMutex aMutex;
- USHORT nBlockRefresh;
+ ::osl::Mutex aMutex;
+ USHORT nBlockRefresh;
public:
#if SC_REFRESHTIMER_CONTROL_LIST
@@ -60,7 +61,7 @@ public:
++nBlockRefresh;
}
BOOL IsRefreshAllowed() const { return !nBlockRefresh; }
- ::vos::OMutex& GetMutex() { return aMutex; }
+ ::osl::Mutex& GetMutex() { return aMutex; }
};
@@ -156,3 +157,4 @@ public:
#endif // SC_REFRESHTIMER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/reftokenhelper.hxx b/sc/inc/reftokenhelper.hxx
index 5bf6b25d019f..90c7fb695ca1 100644
--- a/sc/inc/reftokenhelper.hxx
+++ b/sc/inc/reftokenhelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -81,3 +82,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 5264651b3859..0720ca056309 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -592,11 +592,9 @@
// #i59082# assign macro to shape
#define SID_ASSIGNMACRO (SC_VIEW_START + 95)
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
// #i66550# hyperlinks in shapes
#define SID_DRAW_HLINK_EDIT (SC_VIEW_START + 96)
#define SID_DRAW_HLINK_DELETE (SC_VIEW_START + 97)
-#endif
// "Zoom / Synchronize sheets" in options dialog
#define SID_SC_OPT_SYNCZOOM (SC_VIEW_START + 98)
@@ -1673,6 +1671,15 @@
#define SID_INSERT_CURRENT_DATE (SC_OOO_BUILD_START + 4)
#define SID_INSERT_CURRENT_TIME (SC_OOO_BUILD_START + 5)
+// Data Form
+#define SID_DATAFORM_NEW (SC_OOO_BUILD_START + 6) // message
+#define SID_DATA_FORM (SC_OOO_BUILD_START + 7) // menu (in Data menu)
+#define RID_SCDLG_DATAFORM (SC_OOO_BUILD_START + 8) // dialog
+
+// Compatibility options page
+#define RID_SCPAGE_COMPATIBILITY (SC_OOO_BUILD_START + 9)
+#define HID_SCPAGE_COMPATIBILITY (SC_OOO_BUILD_START + 10)
+
#endif
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index 442e62bdd9cb..57d0fd43f179 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,6 +41,8 @@
#include "pivot.hxx"
#include "i18npool/lang.h"
+#include <tabvwsh.hxx>
+
class ScAsciiOptions;
class ScAutoFormat;
class ScAutoFormatData;
@@ -113,6 +116,12 @@ public:
virtual DelCellCmd GetDelCellCmd() const = 0;
};
+//for dataform
+class AbstractScDataFormDlg : public VclAbstractDialog //add for ScDeleteCellDlg
+{
+
+};
+
class AbstractScDeleteContentsDlg: public VclAbstractDialog //add for ScDeleteContentsDlg
{
public:
@@ -309,7 +318,7 @@ public:
class ScAbstractDialogFactory
{
public:
- static ScAbstractDialogFactory* Create();
+ SC_DLLPUBLIC static ScAbstractDialogFactory* Create();
virtual AbstractScImportAsciiDlg * CreateScImportAsciiDlg( Window* pParent, String aDatName, //add for ScImportAsciiDlg
SvStream* pInStream, int nId,
@@ -343,6 +352,9 @@ public:
virtual AbstractScDeleteCellDlg * CreateScDeleteCellDlg( Window* pParent, int nId, BOOL bDisallowCellMove = FALSE ) = 0 ; //add for ScDeleteCellDlg
+ //for dataform
+ virtual AbstractScDataFormDlg * CreateScDataFormDlg( Window* pParent, int nId, ScTabViewShell* pTabViewShell ) = 0 ; //add for ScDataFormDlg
+
virtual AbstractScDeleteContentsDlg * CreateScDeleteContentsDlg(Window* pParent,int nId, //add for ScDeleteContentsDlg
USHORT nCheckDefaults = 0 ) = 0;
virtual AbstractScFillSeriesDlg * CreateScFillSeriesDlg( Window* pParent, //add for ScFillSeriesDlg
@@ -500,3 +512,4 @@ public:
};
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/scdll.hxx b/sc/inc/scdll.hxx
index a10c794b9c43..5691dc0b8fb9 100644
--- a/sc/inc/scdll.hxx
+++ b/sc/inc/scdll.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -76,3 +77,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/scdllapi.h b/sc/inc/scdllapi.h
index c2d1b16ea588..d38db27f78ec 100644
--- a/sc/inc/scdllapi.h
+++ b/sc/inc/scdllapi.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#ifndef INCLUDED_SCDLLAPI_H
#define INCLUDED_SCDLLAPI_H
@@ -11,3 +12,5 @@
#define SC_DLLPRIVATE SAL_DLLPRIVATE
#endif /* INCLUDED_SCDLLAPI_H */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/scerrors.hxx b/sc/inc/scerrors.hxx
index 4f128ed57604..735f7ba12970 100644
--- a/sc/inc/scerrors.hxx
+++ b/sc/inc/scerrors.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -74,3 +75,4 @@
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/scextopt.hxx b/sc/inc/scextopt.hxx
index 4b3c86e14b18..9319b7da71fc 100644
--- a/sc/inc/scextopt.hxx
+++ b/sc/inc/scextopt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -130,3 +131,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/scitems.hxx b/sc/inc/scitems.hxx
index 18c96dfe7df3..aad354ac3475 100644
--- a/sc/inc/scitems.hxx
+++ b/sc/inc/scitems.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -193,3 +194,4 @@
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/scmatrix.hxx b/sc/inc/scmatrix.hxx
index da4fa757b171..aed97c697cf8 100644
--- a/sc/inc/scmatrix.hxx
+++ b/sc/inc/scmatrix.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -435,3 +436,5 @@ typedef formula::SimpleIntrusiveReference< const class ScMatrix > ScConstMatrixR
#endif // SC_MATRIX_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx
index bd5d40709cd4..e8f9f2b27bda 100644
--- a/sc/inc/scmod.hxx
+++ b/sc/inc/scmod.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -201,12 +202,12 @@ public:
// Options:
const ScViewOptions& GetViewOptions ();
- const ScDocOptions& GetDocOptions ();
+SC_DLLPUBLIC const ScDocOptions& GetDocOptions ();
SC_DLLPUBLIC const ScAppOptions& GetAppOptions ();
const ScInputOptions& GetInputOptions ();
SC_DLLPUBLIC const ScPrintOptions& GetPrintOptions ();
void SetViewOptions ( const ScViewOptions& rOpt );
- void SetDocOptions ( const ScDocOptions& rOpt );
+SC_DLLPUBLIC void SetDocOptions ( const ScDocOptions& rOpt );
SC_DLLPUBLIC void SetAppOptions ( const ScAppOptions& rOpt );
void SetInputOptions ( const ScInputOptions& rOpt );
void SetPrintOptions ( const ScPrintOptions& rOpt );
@@ -294,3 +295,4 @@ SC_DLLPUBLIC void SetAppOptions ( const ScAppOptions& rO
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/scresid.hxx b/sc/inc/scresid.hxx
index 067e5f03e307..4468d0c07654 100644
--- a/sc/inc/scresid.hxx
+++ b/sc/inc/scresid.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,3 +44,4 @@ class SC_DLLPUBLIC ScResId : public ResId
#endif // SC_SCRESMGR_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/scwarngs.hxx b/sc/inc/scwarngs.hxx
index e823a66f7a80..e8c6ff568830 100644
--- a/sc/inc/scwarngs.hxx
+++ b/sc/inc/scwarngs.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,3 +35,4 @@
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/segmenttree.hxx b/sc/inc/segmenttree.hxx
index 195331c750ad..ef694b83a86b 100644
--- a/sc/inc/segmenttree.hxx
+++ b/sc/inc/segmenttree.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -170,3 +171,5 @@ private:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/servuno.hxx b/sc/inc/servuno.hxx
index 9a404b943313..eac87f4cc914 100644
--- a/sc/inc/servuno.hxx
+++ b/sc/inc/servuno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -115,3 +116,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/shapeuno.hxx b/sc/inc/shapeuno.hxx
index ddbbf3108daf..e3acc30ceaef 100644
--- a/sc/inc/shapeuno.hxx
+++ b/sc/inc/shapeuno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,6 +53,7 @@ namespace com { namespace sun { namespace star {
class SdrObject;
struct SvEventDescription;
class ShapeUnoEventAccessImpl;
+class ScMacroInfo;
//------------------------------------------------------------------------
@@ -70,6 +72,7 @@ class ScShapeObj :public ScShapeObj_Base
,public ScShapeObj_TextBase
{
private:
+friend ScMacroInfo* lcl_getShapeHyperMacroInfo( ScShapeObj* pShape, BOOL bCreate );
::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation > mxShapeAgg;
// cached pointers to avoid repeated queryAggregation calls:
::com::sun::star::beans::XPropertySet* pShapePropertySet;
@@ -240,3 +243,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/sheetdata.hxx b/sc/inc/sheetdata.hxx
index de67786ff9fe..5d305462146e 100644
--- a/sc/inc/sheetdata.hxx
+++ b/sc/inc/sheetdata.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -183,3 +184,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/sheetevents.hxx b/sc/inc/sheetevents.hxx
index bb27f5cf2068..0e0901e8b360 100644
--- a/sc/inc/sheetevents.hxx
+++ b/sc/inc/sheetevents.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,3 +66,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/shellids.hxx b/sc/inc/shellids.hxx
index 7f4ccb60259f..b479d4960e9d 100644
--- a/sc/inc/shellids.hxx
+++ b/sc/inc/shellids.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,3 +54,4 @@
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/simplerangelist.hxx b/sc/inc/simplerangelist.hxx
index 4a0c257c28f4..971834b3073c 100644
--- a/sc/inc/simplerangelist.hxx
+++ b/sc/inc/simplerangelist.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -80,3 +81,5 @@ private:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/sortparam.hxx b/sc/inc/sortparam.hxx
index 9791939cde35..fc18a1fb2c37 100644
--- a/sc/inc/sortparam.hxx
+++ b/sc/inc/sortparam.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -80,3 +81,5 @@ struct SC_DLLPUBLIC ScSortParam
#endif // SC_SORTPARAM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/srchuno.hxx b/sc/inc/srchuno.hxx
index f8f82ed25aff..9c306f29a0cc 100644
--- a/sc/inc/srchuno.hxx
+++ b/sc/inc/srchuno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -127,3 +128,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/stlpool.hxx b/sc/inc/stlpool.hxx
index e98a33f08065..3da0a25351ce 100644
--- a/sc/inc/stlpool.hxx
+++ b/sc/inc/stlpool.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -82,3 +83,4 @@ private:
#endif // SC_STLPOOL_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/stlsheet.hxx b/sc/inc/stlsheet.hxx
index 4e42be6e2563..6ae79cf89d4e 100644
--- a/sc/inc/stlsheet.hxx
+++ b/sc/inc/stlsheet.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -89,3 +90,4 @@ protected:
#endif // SC_STLSHEET_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/stringutil.hxx b/sc/inc/stringutil.hxx
index c6433ebb1d04..8c156f1ede05 100644
--- a/sc/inc/stringutil.hxx
+++ b/sc/inc/stringutil.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -89,3 +90,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/strload.hxx b/sc/inc/strload.hxx
index 6b44d8e4e3ef..20367fc5c5e0 100644
--- a/sc/inc/strload.hxx
+++ b/sc/inc/strload.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -49,3 +50,4 @@ private:
#endif // SC_STRLOAD_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/styleuno.hxx b/sc/inc/styleuno.hxx
index 3a363ee0d1c5..a4735d596422 100644
--- a/sc/inc/styleuno.hxx
+++ b/sc/inc/styleuno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -375,3 +376,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/subtotal.hxx b/sc/inc/subtotal.hxx
index 4349c2759ae9..9ff089270fde 100644
--- a/sc/inc/subtotal.hxx
+++ b/sc/inc/subtotal.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,3 +56,4 @@ struct ScFunctionData // zum Berechnen von einzelnen Funktione
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/tabbgcolor.hxx b/sc/inc/tabbgcolor.hxx
index c2b2a63baf65..0522a35ba47f 100644
--- a/sc/inc/tabbgcolor.hxx
+++ b/sc/inc/tabbgcolor.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,3 +53,5 @@ struct ScUndoTabColorInfo
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 21b6107bd535..36ddd81d98cb 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -89,6 +90,8 @@ struct ScSetStringParam;
struct ScColWidthParam;
struct ScColWidthParam;
+typedef std::hash_map< ::rtl::OUString, rtl::OUString, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > NameToNameMap;
+
class ScTable
{
private:
@@ -183,6 +186,7 @@ private:
Color aTabBgColor;
USHORT nScenarioFlags;
BOOL bActiveScenario;
+ NameToNameMap localNameToGlobalName;
bool mbPageBreaksValid;
friend class ScDocument; // fuer FillInfo
@@ -946,3 +950,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/tablink.hxx b/sc/inc/tablink.hxx
index 72b4de611c2e..2e27e604f68e 100644
--- a/sc/inc/tablink.hxx
+++ b/sc/inc/tablink.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -119,3 +120,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/tabopparams.hxx b/sc/inc/tabopparams.hxx
index 7baa461061fd..04824571105d 100644
--- a/sc/inc/tabopparams.hxx
+++ b/sc/inc/tabopparams.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -102,3 +103,4 @@ DECLARE_LIST( ScTabOpList, ScInterpreterTableOpParams* )
#endif // SC_TABOPPARAMS_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/tabprotection.hxx b/sc/inc/tabprotection.hxx
index 537a245d827b..2d75aa79857f 100644
--- a/sc/inc/tabprotection.hxx
+++ b/sc/inc/tabprotection.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -185,3 +186,5 @@ private:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/targuno.hxx b/sc/inc/targuno.hxx
index 857f4c0c25e2..15cbb57e0a40 100644
--- a/sc/inc/targuno.hxx
+++ b/sc/inc/targuno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -204,3 +205,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/textuno.hxx b/sc/inc/textuno.hxx
index e8ff73bf7d85..2c59406a3955 100644
--- a/sc/inc/textuno.hxx
+++ b/sc/inc/textuno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -416,3 +417,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/token.hxx b/sc/inc/token.hxx
index e4659921e7be..1f62b51fce50 100644
--- a/sc/inc/token.hxx
+++ b/sc/inc/token.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -505,3 +506,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/tokenarray.hxx b/sc/inc/tokenarray.hxx
index 5ded8f4410d3..6dc8191b4e82 100644
--- a/sc/inc/tokenarray.hxx
+++ b/sc/inc/tokenarray.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -95,3 +96,4 @@ public:
#endif // SC_TOKENARRAY_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/tokenuno.hxx b/sc/inc/tokenuno.hxx
index c727063281e6..e213e797a76f 100644
--- a/sc/inc/tokenuno.hxx
+++ b/sc/inc/tokenuno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -156,3 +157,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/unitconv.hxx b/sc/inc/unitconv.hxx
index e21140699e4c..5211439fd372 100644
--- a/sc/inc/unitconv.hxx
+++ b/sc/inc/unitconv.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -71,3 +72,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/unonames.hxx b/sc/inc/unonames.hxx
index f66f6c8cf6eb..556c62416b62 100644
--- a/sc/inc/unonames.hxx
+++ b/sc/inc/unonames.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -186,6 +187,10 @@
#define SC_UNONAME_ANCHOR "Anchor"
#define SC_UNONAME_HORIPOS "HoriOrientPosition"
#define SC_UNONAME_VERTPOS "VertOrientPosition"
+// #i66550 HLINK_FOR_SHAPES
+#define SC_UNONAME_HYPERLINK "Hyperlink"
+#define SC_UNONAME_MOVEPROTECT "MoveProtect"
+#define SC_UNONAME_SIZEPROTECT "SizeProtect"
// other cell properties
#define SC_UNONAME_CHCOLHDR "ChartColumnAsLabel"
@@ -531,6 +536,7 @@
#define SC_UNO_ZOOMTYPE "ZoomType"
#define SC_UNO_ZOOMVALUE "ZoomValue"
#define SC_UNO_UPDTEMPL "UpdateFromTemplate"
+#define SC_UNO_FILTERED_RANGE_SELECTION "FilteredRangeSelection"
/*Stampit enable/disable print cancel */
#define SC_UNO_ALLOWPRINTJOBCANCEL "AllowPrintJobCancel"
@@ -613,6 +619,7 @@
#define SC_UNONAME_ADDRESS "Address"
#define SC_UNONAME_UIREPR "UserInterfaceRepresentation"
#define SC_UNONAME_PERSREPR "PersistentRepresentation"
+#define SC_UNONAME_XL_A1_REPR "XL_A1_Representation"
#define SC_UNONAME_REFSHEET "ReferenceSheet"
// --> PB 2004-08-23 #i33095# Security Options
@@ -646,3 +653,4 @@
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/unoreflist.hxx b/sc/inc/unoreflist.hxx
index 3947f28cfb12..ad64f943c47d 100644
--- a/sc/inc/unoreflist.hxx
+++ b/sc/inc/unoreflist.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -82,3 +83,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/unowids.hxx b/sc/inc/unowids.hxx
index 175022a0ba14..ab7f68509e86 100644
--- a/sc/inc/unowids.hxx
+++ b/sc/inc/unowids.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -94,3 +95,4 @@ inline BOOL IsScItemWid( USHORT nWid )
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/userdat.hxx b/sc/inc/userdat.hxx
index 88dea98ec22a..d3f22abae0d9 100644
--- a/sc/inc/userdat.hxx
+++ b/sc/inc/userdat.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -99,16 +100,12 @@ public:
void SetMacro( const rtl::OUString& rMacro ) { maMacro = rMacro; }
const rtl::OUString& GetMacro() const { return maMacro; }
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
void SetHlink( const rtl::OUString& rHlink ) { maHlink = rHlink; }
const rtl::OUString& GetHlink() const { return maHlink; }
-#endif
private:
rtl::OUString maMacro;
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
rtl::OUString maHlink;
-#endif
};
//-------------------------------------------------------------------------
@@ -116,3 +113,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/userlist.hxx b/sc/inc/userlist.hxx
index 7190cd189156..1b8d728c1f42 100644
--- a/sc/inc/userlist.hxx
+++ b/sc/inc/userlist.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -89,3 +90,4 @@ inline BOOL ScUserList::operator!=( const ScUserList& r ) const
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/validat.hxx b/sc/inc/validat.hxx
index 1bff57055f82..c56264a36a58 100644
--- a/sc/inc/validat.hxx
+++ b/sc/inc/validat.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -211,3 +212,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/viewopti.hxx b/sc/inc/viewopti.hxx
index 985fdb803f2e..38e254f29fbd 100644
--- a/sc/inc/viewopti.hxx
+++ b/sc/inc/viewopti.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -174,3 +175,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/viewuno.hxx b/sc/inc/viewuno.hxx
index 19b5c60fd070..8961a3e913f2 100644
--- a/sc/inc/viewuno.hxx
+++ b/sc/inc/viewuno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -199,6 +200,7 @@ private:
XActivationEventListenerArr_Impl aActivationListeners;
SCTAB nPreviousTab;
sal_Bool bDrawSelModeSet;
+ sal_Bool bFilteredRangeSelection;
ScViewPaneObj* GetObjectByIndex_Impl(USHORT nIndex) const;
INT16 GetZoom(void) const;
@@ -313,6 +315,13 @@ public:
::com::sun::star::sheet::XSpreadsheet >& xActiveSheet )
throw(::com::sun::star::uno::RuntimeException);
+ //liuchen 2009-9-2 support expand (but not replace) the active sheet
+ virtual void SAL_CALL selectSheet( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::sheet::XSpreadsheet >& xActiveSheet,
+ sal_Bool bExpand)
+ throw(::com::sun::star::uno::RuntimeException);
+ //liuchen 2009-9-2
+
//XEnhancedMouseClickBroadcaster
virtual void SAL_CALL addEnhancedMouseClickHandler( const ::com::sun::star::uno::Reference<
@@ -394,3 +403,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/waitoff.hxx b/sc/inc/waitoff.hxx
index b17435f23d7f..9ff3cfd8a2a6 100644
--- a/sc/inc/waitoff.hxx
+++ b/sc/inc/waitoff.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,3 +45,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/warnpassword.hxx b/sc/inc/warnpassword.hxx
index 15d35a70d8a2..4e3f2d53f499 100644
--- a/sc/inc/warnpassword.hxx
+++ b/sc/inc/warnpassword.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,3 +47,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/xmlwrap.hxx b/sc/inc/xmlwrap.hxx
index 3cdd9f61a966..6ec51fa308db 100644
--- a/sc/inc/xmlwrap.hxx
+++ b/sc/inc/xmlwrap.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -81,3 +82,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/zforauto.hxx b/sc/inc/zforauto.hxx
index 7c5e9a2f07cb..2c695ae5b0e0 100644
--- a/sc/inc/zforauto.hxx
+++ b/sc/inc/zforauto.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -70,3 +71,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/prj/build.lst b/sc/prj/build.lst
index afdd953d2274..a78f523cd295 100755
--- a/sc/prj/build.lst
+++ b/sc/prj/build.lst
@@ -48,3 +48,4 @@ sc sc\addin\datefunc nmake - all sc_addfu sc_add sc_sdi sc_inc NULL
sc sc\addin\rot13 nmake - all sc_adrot sc_add sc_sdi sc_inc NULL
sc sc\addin\util nmake - all sc_adutil sc_addfu sc_adrot sc_sdi sc_inc NULL
sc sc\util nmake - all sc_util sc_addfu sc_adrot sc_adutil sc_app sc_attr sc_cctrl sc_cosrc sc_data sc_dbgui sc_dif sc_docsh sc_drfnc sc_excel sc_form sc_html sc_lotus sc_qpro sc_misc sc_name sc_nvipi sc_opt sc_page sc_rtf sc_scalc sc_style sc_tool sc_uisrc sc_undo sc_unobj sc_view sc_xcl97 sc_xml sc_acc sc_ftools sc_inc sc_vba NULL
+sc sc\qa\unit nmake - all sc_qa_cppunit sc_util NULL
diff --git a/sc/qa/unit/export.map b/sc/qa/unit/export.map
new file mode 100644
index 000000000000..4ca70fa85463
--- /dev/null
+++ b/sc/qa/unit/export.map
@@ -0,0 +1,7 @@
+UDK_3.0 {
+ global:
+ registerAllTestFunction;
+
+ local:
+ *;
+};
diff --git a/sc/qa/unit/makefile.mk b/sc/qa/unit/makefile.mk
new file mode 100644
index 000000000000..169620b2c7d8
--- /dev/null
+++ b/sc/qa/unit/makefile.mk
@@ -0,0 +1,137 @@
+#*************************************************************************
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.2 $
+#
+# last change: $Author: ihi $ $Date: 2007/11/23 13:58:12 $
+#
+# The Contents of this file are made available subject to
+# the terms of GNU Lesser General Public License Version 2.1.
+#
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2007 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library 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 for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#*************************************************************************
+
+PRJ=..$/..
+PRJNAME=sc
+TARGET=qa_unit
+
+ENABLE_EXCEPTIONS=TRUE
+
+.INCLUDE : settings.mk
+
+#building with stlport, but cppunit was not built with stlport
+.IF "$(USE_SYSTEM_STL)"!="YES"
+.IF "$(SYSTEM_CPPUNIT)"=="YES"
+CFLAGSCXX+=-DADAPT_EXT_STL
+.ENDIF
+.ENDIF
+
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+
+SHL1TARGET = $(TARGET)
+SHL1OBJS = $(SLO)$/ucalc.obj
+SHL1STDLIBS= \
+ $(BASICLIB) \
+ $(SFXLIB) \
+ $(SVTOOLLIB) \
+ $(SVLLIB) \
+ $(SVXCORELIB) \
+ $(EDITENGLIB) \
+ $(SVXLIB) \
+ $(BASEGFXLIB) \
+ $(DRAWINGLAYERLIB) \
+ $(VCLLIB) \
+ $(CPPULIB) \
+ $(CPPUHELPERLIB) \
+ $(COMPHELPERLIB) \
+ $(UCBHELPERLIB) \
+ $(TKLIB) \
+ $(VOSLIB) \
+ $(SALLIB) \
+ $(SALHELPERLIB) \
+ $(TOOLSLIB) \
+ $(I18NISOLANGLIB) \
+ $(UNOTOOLSLIB) \
+ $(SOTLIB) \
+ $(XMLOFFLIB) \
+ $(AVMEDIALIB) \
+ $(FORLIB) \
+ $(FORUILIB) \
+ $(CPPUNITLIB)
+SHL1IMPLIB = i$(SHL1TARGET)
+SHL1LIBS=$(SLB)$/scalc3.lib $(SLB)$/scalc3c.lib
+DEF1NAME = $(SHL1TARGET)
+
+.INCLUDE: target.mk
+
+.IF "$(OS)" == "WNT"
+my_file = file:///
+.ELSE
+my_file = file://
+.END
+
+ALLTAR: test
+
+$(MISC)$/$(TARGET)$/types.rdb .ERRREMOVE : $(SOLARBINDIR)$/types.rdb
+ $(MKDIRHIER) $(@:d)
+ $(GNUCOPY) $? $@
+
+$(MISC)/$(TARGET)/udkapi.rdb .ERRREMOVE : $(SOLARBINDIR)$/udkapi.rdb
+ $(MKDIRHIER) $(@:d)
+ $(GNUCOPY) $? $@
+
+#Make a services.rdb with the services we know we need to get up and running
+$(MISC)/$(TARGET)/services.rdb .ERRREMOVE : $(MISC)/$(TARGET)/udkapi.rdb
+ $(MKDIRHIER) $(@:d)
+ $(REGCOMP) -register -br $(MISC)/$(TARGET)/udkapi.rdb -r $@ -wop \
+ -c configmgr.uno$(DLLPOST) \
+ -c $(DLLPRE)fwk$(DLLPOSTFIX)$(DLLPOST)
+
+#Tweak things to that we use the .res files in the solver
+STAR_RESOURCEPATH:=$(PWD)/$(BIN):$(SOLARBINDIR)
+.EXPORT : STAR_RESOURCEPATH
+
+#.IF "$(OS)" == "LINUX"
+#
+#test .PHONY: $(SHL1TARGETN) $(MISC)/$(TARGET)/services.rdb $(MISC)$/$(TARGET)$/types.rdb $(MISC)/$(TARGET)/udkapi.rdb
+# @echo ----------------------------------------------------------
+# @echo - start unit test \#1 on library $(SHL1TARGETN)
+# @echo ----------------------------------------------------------
+# $(CPPUNITTESTER) $(SHL1TARGETN) -headless -invisible \
+# -env:UNO_SERVICES=$(my_file)$(PWD)/$(MISC)/$(TARGET)/services.rdb \
+# -env:UNO_TYPES="$(my_file)$(PWD)/$(MISC)/$(TARGET)/types.rdb $(my_file)$(PWD)/$(MISC)/$(TARGET)/udkapi.rdb" \
+# -env:OOO_BASE_DIR="$(my_file)$(PWD)/$(MISC)/$(TARGET)" \
+# -env:BRAND_BASE_DIR="$(my_file)$(PWD)/$(MISC)/$(TARGET)" \
+# -env:UNO_USER_PACKAGES_CACHE="$(my_file)$(PWD)/$(MISC)/$(TARGET)"
+#
+#.ELSE
+#
+test .PHONY: $(SHL1TARGETN)
+ @echo ----------------------------------------------------------
+ @echo - WARNING!!, test disabled due to regcomp failure on SUSE
+ @echo - boxes on configmgr.uno.so
+ @echo ----------------------------------------------------------
+
+#.ENDIF
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
new file mode 100644
index 000000000000..307b9745be2b
--- /dev/null
+++ b/sc/qa/unit/ucalc.cxx
@@ -0,0 +1,104 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Known problems:
+ * + We need to re-enable the exports.map with the right symbol
+ */
+
+// TODO ...
+// officecfg: can we move this into our skeleton ?
+// Solve the Setup.xcu problem pleasantly [ custom version ? ]
+// deliver.pl
+// don't call regcomp if we don't have it.
+// In an ideal world
+// a) scp2 goes away and logic moved into the deliver d.lst
+// b) install set gets built incrementally as the build progresses
+// c) the new .xml component registration stuff then removes
+// the need for manually calling regcomp and knowing what
+// services we need, and in what .so they are implemented
+
+#include "sal/config.h"
+
+#include <cppuhelper/bootstrap.hxx>
+#include <comphelper/processfactory.hxx>
+
+#include <vcl/svapp.hxx>
+#include <scdll.hxx>
+#include <document.hxx>
+
+#include "preextstl.h"
+#include <cppunit/TestSuite.h>
+#include <cppunit/TestFixture.h>
+#include <cppunit/TestCase.h>
+#include <cppunit/plugin/TestPlugIn.h>
+#include <cppunit/extensions/HelperMacros.h>
+#include "postextstl.h"
+
+using namespace ::com::sun::star;
+
+namespace {
+
+class Test : public CppUnit::TestFixture {
+public:
+ // init
+ virtual void setUp();
+ virtual void tearDown();
+
+ // tests
+ void createDocument();
+
+ CPPUNIT_TEST_SUITE(Test);
+ CPPUNIT_TEST(createDocument);
+ CPPUNIT_TEST_SUITE_END();
+
+private:
+ uno::Reference< uno::XComponentContext > m_context;
+};
+
+void Test::setUp()
+{
+ m_context = cppu::defaultBootstrap_InitialComponentContext();
+
+ uno::Reference<lang::XMultiComponentFactory> xFactory(m_context->getServiceManager());
+ uno::Reference<lang::XMultiServiceFactory> xSM(xFactory, uno::UNO_QUERY_THROW);
+
+ //Without this we're crashing because callees are using
+ //getProcessServiceFactory. In general those should be removed in favour
+ //of retaining references to the root ServiceFactory as its passed around
+ comphelper::setProcessServiceFactory(xSM);
+
+ InitVCL(xSM);
+
+ ScDLL::Init();
+}
+
+void Test::tearDown()
+{
+ uno::Reference< lang::XComponent >(m_context, uno::UNO_QUERY_THROW)->dispose();
+}
+
+void Test::createDocument()
+{
+ ScDocument *doc = new ScDocument();
+
+ rtl::OUString aTabName = rtl::OUString::createFromAscii ("foo");
+ CPPUNIT_ASSERT_MESSAGE ("failed to insert sheet",
+ doc->InsertTab (0, aTabName));
+ double val = 1;
+ doc->SetValue (0, 0, 0, val);
+ doc->SetValue (0, 1, 0, val);
+ doc->SetString (0, 2, 0, rtl::OUString::createFromAscii ("=SUM(A1:A2)"));
+ doc->CalcAll();
+ double result;
+ doc->GetValue (0, 2, 0, result);
+ CPPUNIT_ASSERT_MESSAGE ("calculation failed", result == 2.0);
+
+ delete doc;
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(Test);
+
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/sdi/cellsh.sdi b/sc/sdi/cellsh.sdi
index 3e35a77d9723..a50f2e963713 100644
--- a/sc/sdi/cellsh.sdi
+++ b/sc/sdi/cellsh.sdi
@@ -60,6 +60,7 @@ interface CellSelection
SID_SBA_BRW_INSERT [ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
SID_SELECT_DB [ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
SID_SORT [ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
+ SID_DATA_FORM [ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
FID_FILTER_OK [ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
SID_AUTO_FILTER [ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
SID_AUTOFILTER_HIDE [ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
diff --git a/sc/sdi/drawsh.sdi b/sc/sdi/drawsh.sdi
index 98c7bf3a009d..8ba2a6759b15 100644
--- a/sc/sdi/drawsh.sdi
+++ b/sc/sdi/drawsh.sdi
@@ -226,9 +226,9 @@ interface TableDraw
SID_FONTWORK_CHARACTER_SPACING_DIALOG [ ExecMethod = ExecDrawFunc ; StateMethod = GetDrawFuncState ; ]
// ISSUE66550_HLINK_FOR_SHAPES
-// SID_DRAW_HLINK_EDIT [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; Export = FALSE; ]
-// SID_DRAW_HLINK_DELETE [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; Export = FALSE; ]
-// SID_OPEN_HYPERLINK [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; Export = FALSE; ]
+ SID_DRAW_HLINK_EDIT [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; Export = FALSE; ]
+ SID_DRAW_HLINK_DELETE [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; Export = FALSE; ]
+ SID_OPEN_HYPERLINK [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; Export = FALSE; ]
}
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index d2d425c7b646..a1ea25518037 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -1598,6 +1598,31 @@ SfxVoidItem DataSort SID_SORT
]
//--------------------------------------------------------------------------
+SfxVoidItem DataForm SID_DATA_FORM
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DATA;
+]
+
+//--------------------------------------------------------------------------
SfxVoidItem DataSubTotals SID_SUBTOTALS
()
[
@@ -6271,55 +6296,55 @@ SfxVoidItem StandardFonts SID_STANDARD_FONTS
//--------------------------------------------------------------------------
// ISSUE66550_HLINK_FOR_SHAPES
-//SfxVoidItem EditShapeHyperlink SID_DRAW_HLINK_EDIT
-//()
-//[
-// /* flags: */
-// AutoUpdate = FALSE,
-// Cachable = Cachable,
-// FastCall = TRUE,
-// HasCoreId = FALSE,
-// HasDialog = TRUE,
-// ReadOnlyDoc = TRUE,
-// Toggle = FALSE,
-// Container = FALSE,
-// RecordAbsolute = FALSE,
-// RecordPerSet;
-// Synchron;
-//
+SfxVoidItem EditShapeHyperlink SID_DRAW_HLINK_EDIT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
// /* config: */
-// AccelConfig = TRUE,
-// MenuConfig = FALSE,
-// StatusBarConfig = FALSE,
-// ToolBoxConfig = FALSE,
-// GroupId = GID_DRAWING;
-//]
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DRAWING;
+]
//--------------------------------------------------------------------------
// ISSUE66550_HLINK_FOR_SHAPES
-//SfxVoidItem DeleteShapeHyperlink SID_DRAW_HLINK_DELETE
-//()
-//[
-// /* flags: */
-// AutoUpdate = TRUE,
-// Cachable = Cachable,
-// FastCall = TRUE,
-// HasCoreId = FALSE,
-// HasDialog = FALSE,
-// ReadOnlyDoc = TRUE,
-// Toggle = FALSE,
-// Container = FALSE,
-// RecordAbsolute = FALSE,
-// RecordPerSet;
-// Synchron;
-//
-// /* config: */
-// AccelConfig = TRUE,
-// MenuConfig = FALSE,
-// StatusBarConfig = FALSE,
-// ToolBoxConfig = FALSE,
-// GroupId = GID_DRAWING;
-//]
+SfxVoidItem DeleteShapeHyperlink SID_DRAW_HLINK_DELETE
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DRAWING;
+]
//--------------------------------------------------------------------------
SfxVoidItem StandardTextAttributes SID_TEXT_STANDARD
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index fbb07705c0b1..e9793ae4d722 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -80,7 +81,7 @@ ScAttrArray::ScAttrArray( SCCOL nNewCol, SCTAB nNewTab, ScDocument* pDoc ) :
if (pData)
{
pData[0].nRow = MAXROW;
- pData[0].pPattern = pDocument->GetDefPattern(); // ohne Put !!!
+ pData[0].pPattern = pDocument->GetDefPattern(); // no put
}
}
@@ -145,7 +146,7 @@ void ScAttrArray::Reset( const ScPatternAttr* pPattern, BOOL bAlloc )
for (SCSIZE i=0; i<nCount; i++)
{
- // ueberpruefen, ob Attributierung die Textbreite der Zelle aendert
+ // ensure that attributing changes text width of cell
pOldPattern = pData[i].pPattern;
BOOL bNumFormatChanged;
if ( ScGlobal::CheckWidthInvalidate( bNumFormatChanged,
@@ -158,7 +159,7 @@ void ScAttrArray::Reset( const ScPatternAttr* pPattern, BOOL bAlloc )
DBGOUTPUT("Reset");
#endif
}
- // bedingtes Format gesetzt oder geloescht?
+ // conditional format or deleted?
if ( &pPattern->GetItem(ATTR_CONDITIONAL) != &pOldPattern->GetItem(ATTR_CONDITIONAL) )
{
pDocument->ConditionalChanged( ((const SfxUInt32Item&)
@@ -187,7 +188,7 @@ void ScAttrArray::Reset( const ScPatternAttr* pPattern, BOOL bAlloc )
else
{
nCount = nLimit = 0;
- pData = NULL; // muss sofort wieder belegt werden !
+ pData = NULL; // should be immediately occupied again
}
}
}
@@ -369,8 +370,8 @@ void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPattern
}
}
- // ueberpruefen, ob Attributierung die Textbreite der Zelle aendert
- // oder bedingte Formate neu gesetzt oder geloescht werden
+ // ensure that attributing changes text width of cell
+ // otherwise, conditional formats need to be reset or deleted
while ( ns <= nEndRow )
{
const SfxItemSet& rNewSet = pPattern->GetItemSet();
@@ -509,7 +510,6 @@ void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPattern
pDocument->SetStreamValid(nTab, FALSE);
}
}
-// InfoBox(0, String(nCount) + String(" Eintraege") ).Execute();
#ifdef DBG_UTIL
TestData();
@@ -525,7 +525,7 @@ void ScAttrArray::ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, ScStyleSheet*
SCROW nStart=0;
if (!Search( nStartRow, nPos ))
{
- DBG_ERROR("Search-Fehler");
+ DBG_ERROR("Search Failure");
return;
}
@@ -556,9 +556,8 @@ void ScAttrArray::ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, ScStyleSheet*
}
else
{
- // ueberpruefen, ob Attributierung die Textbreite der Zelle aendert
- // bedingte Formate in Vorlagen gibt es (noch) nicht
-
+ // ensure attributing changes text width of cell; otherwise
+ // there aren't (yet) template format changes
const SfxItemSet& rNewSet = pNewPattern->GetItemSet();
const SfxItemSet& rOldSet = pOldPattern->GetItemSet();
@@ -596,21 +595,20 @@ void ScAttrArray::ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, ScStyleSheet*
}
- // const wird weggecastet, weil es sonst
- // zu ineffizient/kompliziert wird!
-#define SET_LINECOLOR(dest,c) \
- if ((dest)) \
- { \
- ((SvxBorderLine*)(dest))->SetColor((c)); \
+ // const cast, otherwise it will be too inefficient/complicated
+#define SET_LINECOLOR(dest,c) \
+ if ((dest)) \
+ { \
+ ((SvxBorderLine*)(dest))->SetColor((c)); \
}
-#define SET_LINE(dest,src) \
- if ((dest)) \
- { \
- SvxBorderLine* pCast = (SvxBorderLine*)(dest); \
- pCast->SetOutWidth((src)->GetOutWidth()); \
- pCast->SetInWidth ((src)->GetInWidth()); \
- pCast->SetDistance((src)->GetDistance()); \
+#define SET_LINE(dest,src) \
+ if ((dest)) \
+ { \
+ SvxBorderLine* pCast = (SvxBorderLine*)(dest); \
+ pCast->SetOutWidth((src)->GetOutWidth()); \
+ pCast->SetInWidth( (src)->GetInWidth() ); \
+ pCast->SetDistance((src)->GetDistance()); \
}
void ScAttrArray::ApplyLineStyleArea( SCROW nStartRow, SCROW nEndRow,
@@ -625,7 +623,7 @@ void ScAttrArray::ApplyLineStyleArea( SCROW nStartRow, SCROW nEndRow,
SCROW nStart=0;
if (!Search( nStartRow, nPos ))
{
- DBG_ERROR("Search-Fehler");
+ DBG_ERROR("Search failure");
return;
}
@@ -651,7 +649,7 @@ void ScAttrArray::ApplyLineStyleArea( SCROW nStartRow, SCROW nEndRow,
SvxLineItem* pNewTLBRItem = pTLBRItem ? (SvxLineItem*)pTLBRItem->Clone() : 0;
SvxLineItem* pNewBLTRItem = pBLTRItem ? (SvxLineItem*)pBLTRItem->Clone() : 0;
- // Linienattribute holen und mit Parametern aktualisieren
+ // fetch line and update attributes with parameters
if ( !pLine )
{
@@ -714,7 +712,7 @@ void ScAttrArray::ApplyLineStyleArea( SCROW nStartRow, SCROW nEndRow,
}
else
{
- //! aus Pool loeschen?
+ // remove from pool ?
pDocument->GetPool()->Remove(*pData[nPos].pPattern);
pData[nPos].pPattern = (const ScPatternAttr*)
&pDocument->GetPool()->Put(*pNewPattern);
@@ -755,7 +753,7 @@ void ScAttrArray::ApplyCacheArea( SCROW nStartRow, SCROW nEndRow, SfxItemPoolCac
SCROW nStart=0;
if (!Search( nStartRow, nPos ))
{
- DBG_ERROR("Search-Fehler");
+ DBG_ERROR("Search Failure");
return;
}
@@ -783,7 +781,7 @@ void ScAttrArray::ApplyCacheArea( SCROW nStartRow, SCROW nEndRow, SfxItemPoolCac
}
else
{
- // ueberpruefen, ob Attributierung die Textbreite der Zelle aendert
+ // ensure attributing changes text-width of cell
const SfxItemSet& rNewSet = pNewPattern->GetItemSet();
const SfxItemSet& rOldSet = pOldPattern->GetItemSet();
@@ -800,7 +798,7 @@ void ScAttrArray::ApplyCacheArea( SCROW nStartRow, SCROW nEndRow, SfxItemPoolCac
#endif
}
- // bedingte Formate neu gesetzt oder geloescht ?
+ // Reset conditional formats or delete ?
if ( &rNewSet.Get(ATTR_CONDITIONAL) != &rOldSet.Get(ATTR_CONDITIONAL) )
{
@@ -859,10 +857,10 @@ void lcl_MergeDeep( SfxItemSet& rMergeSet, const SfxItemSet& rSource )
const SfxPoolItem* pOldItem;
for (USHORT nId=ATTR_PATTERN_START; nId<=ATTR_PATTERN_END; nId++)
{
- // pMergeSet hat keinen Parent
+ // pMergeSet has no parent
SfxItemState eOldState = rMergeSet.GetItemState( nId, FALSE, &pOldItem );
- if ( eOldState == SFX_ITEM_DEFAULT ) // Default
+ if ( eOldState == SFX_ITEM_DEFAULT )
{
SfxItemState eNewState = rSource.GetItemState( nId, TRUE, &pNewItem );
if ( eNewState == SFX_ITEM_SET )
@@ -885,7 +883,7 @@ void lcl_MergeDeep( SfxItemSet& rMergeSet, const SfxItemSet& rSource )
rMergeSet.InvalidateItem( nId );
}
}
- // Dontcare bleibt Dontcare
+ // Dontcare remains Dontcare
}
}
@@ -899,13 +897,13 @@ void ScAttrArray::MergePatternArea( SCROW nStartRow, SCROW nEndRow,
SCROW nStart=0;
if (!Search( nStartRow, nPos ))
{
- DBG_ERROR("Search-Fehler");
+ DBG_ERROR("Search failure");
return;
}
do
{
- // gleiche Patterns muessen nicht mehrfach angesehen werden
+ // similar patterns must not be repeated
const ScPatternAttr* pPattern = pData[nPos].pPattern;
if ( pPattern != rState.pOld1 && pPattern != rState.pOld2 )
@@ -913,9 +911,6 @@ void ScAttrArray::MergePatternArea( SCROW nStartRow, SCROW nEndRow,
const SfxItemSet& rThisSet = pPattern->GetItemSet();
if (rState.pItemSet)
{
- // (*ppSet)->MergeValues( rThisSet, FALSE );
- // geht nicht, weil die Vorlagen nicht beruecksichtigt werden
-
if (bDeep)
lcl_MergeDeep( *rState.pItemSet, rThisSet );
else
@@ -923,7 +918,7 @@ void ScAttrArray::MergePatternArea( SCROW nStartRow, SCROW nEndRow,
}
else
{
- // erstes Pattern - in Set ohne Parent kopieren
+ // first pattern - copied from parent
rState.pItemSet = new SfxItemSet( *rThisSet.GetPool(), rThisSet.GetRanges() );
rState.pItemSet->Set( rThisSet, bDeep );
}
@@ -941,19 +936,19 @@ void ScAttrArray::MergePatternArea( SCROW nStartRow, SCROW nEndRow,
-// Umrandung zusammenbauen
+// assemble border
BOOL lcl_TestAttr( const SvxBorderLine* pOldLine, const SvxBorderLine* pNewLine,
BYTE& rModified, const SvxBorderLine*& rpNew )
{
if (rModified == SC_LINE_DONTCARE)
- return FALSE; // weiter geht's nicht
+ return FALSE; // don't go again
if (rModified == SC_LINE_EMPTY)
{
rModified = SC_LINE_SET;
rpNew = pNewLine;
- return TRUE; // zum ersten mal gesetzt
+ return TRUE; // initial value
}
if (pOldLine == pNewLine)
@@ -971,7 +966,7 @@ BOOL lcl_TestAttr( const SvxBorderLine* pOldLine, const SvxBorderLine* pNewLine,
rModified = SC_LINE_DONTCARE;
rpNew = NULL;
- return TRUE; // andere Linie -> dontcare
+ return TRUE; // another line -> don't care
}
@@ -979,7 +974,7 @@ void lcl_MergeToFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLineInner,
ScLineFlags& rFlags, const ScPatternAttr* pPattern,
BOOL bLeft, SCCOL nDistRight, BOOL bTop, SCROW nDistBottom )
{
- // rechten/unteren Rahmen setzen, wenn Zelle bis zum Ende zusammengefasst:
+ // right/bottom border set when connected together
const ScMergeAttr& rMerge = (const ScMergeAttr&)pPattern->GetItem(ATTR_MERGE);
if ( rMerge.GetColMerge() == nDistRight + 1 )
nDistRight = 0;
@@ -1065,7 +1060,7 @@ void ScAttrArray::MergeBlockFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLine
pPattern = (ScPatternAttr*) pData[i].pPattern;
lcl_MergeToFrame( pLineOuter, pLineInner, rFlags, pPattern, bLeft, nDistRight, FALSE,
nEndRow - Min( pData[i].nRow, (SCROW)(nEndRow-1) ) );
- // nDistBottom hier immer > 0
+ // nDistBottom here always > 0
}
pPattern = GetPattern( nEndRow );
@@ -1074,11 +1069,10 @@ void ScAttrArray::MergeBlockFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLine
}
//
-// Rahmen anwenden
+// apply border
//
-// ApplyFrame - auf einen Eintrag im Array
-
+// ApplyFrame - on an entry into the array
BOOL ScAttrArray::ApplyFrame( const SvxBoxItem* pBoxItem,
const SvxBoxInfoItem* pBoxInfoItem,
@@ -1091,7 +1085,7 @@ BOOL ScAttrArray::ApplyFrame( const SvxBoxItem* pBoxItem,
const SvxBoxItem* pOldFrame = (const SvxBoxItem*)
&pPattern->GetItemSet().Get( ATTR_BORDER );
- // rechten/unteren Rahmen setzen, wenn Zelle bis zum Ende zusammengefasst:
+ // right/bottom border set when connected together
const ScMergeAttr& rMerge = (const ScMergeAttr&)pPattern->GetItem(ATTR_MERGE);
if ( rMerge.GetColMerge() == nDistRight + 1 )
nDistRight = 0;
@@ -1123,10 +1117,6 @@ BOOL ScAttrArray::ApplyFrame( const SvxBoxItem* pBoxItem,
SfxItemPoolCache aCache( pDocument->GetPool(), &aNewFrame );
ApplyCacheArea( nStartRow, nEndRow, &aCache );
-/* ScPatternAttr* pNewPattern = (ScPatternAttr*) pPattern->Clone();
- pNewPattern->GetItemSet().Put( aNewFrame );
- SetPatternArea( nStartRow, nEndRow, pNewPattern, TRUE );
-*/
return TRUE;
}
}
@@ -1142,7 +1132,7 @@ void ScAttrArray::ApplyBlockFrame( const SvxBoxItem* pLineOuter, const SvxBoxInf
ApplyFrame( pLineOuter, pLineInner, nStartRow, nStartRow, bLeft, nDistRight,
TRUE, nEndRow-nStartRow );
- if ( nEndRow > nStartRow+1 ) // innerer Teil vorhanden?
+ if ( nEndRow > nStartRow+1 ) // inner part available?
{
SCSIZE nStartIndex;
SCSIZE nEndIndex;
@@ -1173,8 +1163,8 @@ void ScAttrArray::ApplyBlockFrame( const SvxBoxItem* pLineOuter, const SvxBoxInf
long lcl_LineSize( const SvxBorderLine& rLine )
{
- // nur eine Linie -> halbe Breite, min. 20
- // doppelte Linie -> halber Abstand + eine Linie (je min. 20)
+ // only one line -> half width, min. 20
+ // double line -> half line spacing + (per min. 20)
long nTotal = 0;
USHORT nWidth = Max( rLine.GetOutWidth(), rLine.GetInWidth() );
@@ -1182,17 +1172,15 @@ long lcl_LineSize( const SvxBorderLine& rLine )
if (nDist)
{
DBG_ASSERT( rLine.GetOutWidth() && rLine.GetInWidth(),
- "Linie hat Abstand, aber nur eine Breite ???" );
+ "Line has a distance, but only a width?" );
-// nTotal += ( nDist > 40 ) ? ( nDist / 2 ) : 20;
nTotal += ( nDist > 20 ) ? nDist : 20;
nTotal += ( nWidth > 20 ) ? nWidth : 20;
}
else if (nWidth)
-// nTotal += ( nWidth > 40 ) ? ( nWidth / 2 ) : 20;
nTotal += ( nWidth > 20 ) ? nWidth : 20;
- //! auch halbieren ???
+ // also halved ?
return nTotal;
}
@@ -1211,7 +1199,7 @@ BOOL ScAttrArray::HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
const SvxBorderLine* pLine = 0;
long nCmp;
- // oben
+ // top
pItem = (const SvxBoxItem*) &pData[nStartIndex].pPattern->GetItem(ATTR_BORDER);
pLine = pItem->GetTop();
@@ -1223,7 +1211,7 @@ BOOL ScAttrArray::HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
bFound = TRUE;
}
- // unten
+ // down
if ( nEndIndex != nStartIndex )
pItem = (const SvxBoxItem*) &pData[nEndIndex].pPattern->GetItem(ATTR_BORDER);
@@ -1241,8 +1229,6 @@ BOOL ScAttrArray::HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
{
pItem = (const SvxBoxItem*) &pData[i].pPattern->GetItem(ATTR_BORDER);
- // links
-
if (bLeft)
{
pLine = pItem->GetLeft();
@@ -1255,8 +1241,6 @@ BOOL ScAttrArray::HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
}
}
- // rechts
-
if (bRight)
{
pLine = pItem->GetRight();
@@ -1273,7 +1257,7 @@ BOOL ScAttrArray::HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
return bFound;
}
-// Testen, ob Bereich bestimmtes Attribut enthaelt
+// Test if field contains specific attribute
bool ScAttrArray::HasAttrib( SCROW nRow1, SCROW nRow2, USHORT nMask ) const
{
@@ -1388,9 +1372,7 @@ bool ScAttrArray::HasAttrib( SCROW nRow1, SCROW nRow2, USHORT nMask ) const
return bFound;
}
-// Bereich um evtl. enthaltene Zusammenfassungen erweitern
-// und evtl. MergeFlag anpassen (bRefresh)
-
+// Area around any given summaries expand and adapt any MergeFlag (bRefresh)
BOOL ScAttrArray::ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow,
SCCOL& rPaintCol, SCROW& rPaintRow,
BOOL bRefresh, BOOL bAttrs )
@@ -1445,7 +1427,7 @@ BOOL ScAttrArray::ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow,
pDocument->ApplyFlagsTab( nThisCol+1, nThisRow+1, nMergeEndCol, nMergeEndRow,
nTab, SC_MF_HOR | SC_MF_VER );
- Search( nThisRow, i ); // Daten wurden veraendert
+ Search( nThisRow, i ); // Data changed
Search( nStartRow, nStartIndex );
Search( nEndRow, nEndIndex );
}
@@ -1485,13 +1467,13 @@ BOOL ScAttrArray::RemoveAreaMerge(SCROW nStartRow, SCROW nEndRow)
const ScMergeFlagAttr* pFlagAttr = (const ScMergeFlagAttr*)
&pDocument->GetPool()->GetDefaultItem( ATTR_MERGE_FLAG );
- DBG_ASSERT( nCountY==1 || nThisStart==nThisEnd, "was'n hier los?" );
+ DBG_ASSERT( nCountY==1 || nThisStart==nThisEnd, "What's up?" );
SCCOL nThisCol = nCol;
SCCOL nMergeEndCol = nThisCol + nCountX - 1;
SCROW nMergeEndRow = nThisEnd + nCountY - 1;
- //! ApplyAttr fuer Bereiche !!!
+ // ApplyAttr for areas
for (SCROW nThisRow = nThisStart; nThisRow <= nThisEnd; nThisRow++)
pDocument->ApplyAttr( nThisCol, nThisRow, nTab, *pAttr );
@@ -1503,20 +1485,20 @@ BOOL ScAttrArray::RemoveAreaMerge(SCROW nStartRow, SCROW nEndRow)
nTab, *pNewPattern );
delete pNewPattern;
- Search( nThisEnd, nIndex ); // Daten wurden veraendert !!!
+ Search( nThisEnd, nIndex ); // data changed
}
++nIndex;
if ( nIndex < nCount )
nThisStart = pData[nIndex-1].nRow+1;
else
- nThisStart = MAXROW+1; // Ende
+ nThisStart = MAXROW+1; // End
}
return bFound;
}
- // Bereich loeschen, aber Merge-Flags stehenlassen
+// Remove field, but leave MergeFlags
void ScAttrArray::DeleteAreaSafe(SCROW nStartRow, SCROW nEndRow)
{
@@ -1566,12 +1548,13 @@ void ScAttrArray::SetPatternAreaSafe( SCROW nStartRow, SCROW nEndRow,
if (bFirstUse)
bFirstUse = FALSE;
else
- pDocument->GetPool()->Put( *pWantedPattern ); // im Pool ist es schon!
+ // it's in the pool
+ pDocument->GetPool()->Put( *pWantedPattern );
}
SetPatternArea( nThisRow, nAttrRow, pWantedPattern );
}
- Search( nThisRow, nIndex ); // Daten wurden veraendert !!!
+ Search( nThisRow, nIndex ); // data changed
}
++nIndex;
@@ -1605,7 +1588,7 @@ BOOL ScAttrArray::ApplyFlags( SCROW nStartRow, SCROW nEndRow, INT16 nFlags )
ScPatternAttr aNewPattern(*pOldPattern);
aNewPattern.GetItemSet().Put( ScMergeFlagAttr( nOldValue | nFlags ) );
SetPatternArea( nThisRow, nAttrRow, &aNewPattern, TRUE );
- Search( nThisRow, nIndex ); // Daten wurden veraendert !!!
+ Search( nThisRow, nIndex ); // data changed
bChanged = TRUE;
}
@@ -1642,7 +1625,7 @@ BOOL ScAttrArray::RemoveFlags( SCROW nStartRow, SCROW nEndRow, INT16 nFlags )
ScPatternAttr aNewPattern(*pOldPattern);
aNewPattern.GetItemSet().Put( ScMergeFlagAttr( nOldValue & ~nFlags ) );
SetPatternArea( nThisRow, nAttrRow, &aNewPattern, TRUE );
- Search( nThisRow, nIndex ); // Daten wurden veraendert !!!
+ Search( nThisRow, nIndex ); // data changed
bChanged = TRUE;
}
@@ -1677,7 +1660,7 @@ void ScAttrArray::ClearItems( SCROW nStartRow, SCROW nEndRow, const USHORT* pWhi
nRow = pData[nIndex].nRow;
SCROW nAttrRow = Min( (SCROW)nRow, (SCROW)nEndRow );
SetPatternArea( nThisRow, nAttrRow, &aNewPattern, TRUE );
- Search( nThisRow, nIndex ); // Daten wurden veraendert !!!
+ Search( nThisRow, nIndex ); // data changed
}
++nIndex;
@@ -1734,11 +1717,11 @@ void ScAttrArray::ChangeIndent( SCROW nStartRow, SCROW nEndRow, BOOL bIncrement
SetPatternArea( nThisStart, nAttrRow, &aNewPattern, TRUE );
nThisStart = nThisEnd + 1;
- Search( nThisStart, nIndex ); // Daten wurden veraendert !!!
+ Search( nThisStart, nIndex ); // data changed
}
else
{
- nThisStart = pData[nIndex].nRow + 1; // weiterzaehlen...
+ nThisStart = pData[nIndex].nRow + 1;
++nIndex;
}
}
@@ -1758,7 +1741,7 @@ SCsROW ScAttrArray::GetNextUnprotected( SCsROW nRow, BOOL bUp ) const
if (bUp)
{
if (nIndex==0)
- return -1; // nichts gefunden
+ return -1; // not found
--nIndex;
nRet = pData[nIndex].nRow;
}
@@ -1767,7 +1750,7 @@ SCsROW ScAttrArray::GetNextUnprotected( SCsROW nRow, BOOL bUp ) const
nRet = pData[nIndex].nRow+1;
++nIndex;
if (nIndex>=nCount)
- return MAXROW+1; // nichts gefunden
+ return MAXROW+1; // not found
}
}
}
@@ -1783,9 +1766,6 @@ void ScAttrArray::FindStyleSheet( const SfxStyleSheetBase* pStyleSheet, ScFlatBo
SCROW nEnd = pData[nPos].nRow;
if (pData[nPos].pPattern->GetStyleSheet() == pStyleSheet)
{
-// for (SCROW nRow = nStart; nRow <= nEnd; nRow++)
-// pUsed[nRow] = TRUE;
-
rUsedRows.setTrue(nStart, nEnd);
if (bReset)
@@ -1804,7 +1784,7 @@ void ScAttrArray::FindStyleSheet( const SfxStyleSheetBase* pStyleSheet, ScFlatBo
if (Concat(nPos))
{
Search(nStart, nPos);
- --nPos; // wegen ++ am Ende
+ --nPos; // because ++ at end
}
}
}
@@ -1995,7 +1975,7 @@ BOOL ScAttrArray::IsVisibleEqual( const ScAttrArray& rOther,
BOOL ScAttrArray::IsAllEqual( const ScAttrArray& rOther, SCROW nStartRow, SCROW nEndRow ) const
{
- //! mit IsVisibleEqual zusammenfassen?
+ // summarised with IsVisibleEqual
BOOL bEqual = TRUE;
SCSIZE nThisPos = 0;
@@ -2032,8 +2012,8 @@ BOOL ScAttrArray::IsAllEqual( const ScAttrArray& rOther, SCROW nStartRow, SCROW
BOOL ScAttrArray::TestInsertCol( SCROW nStartRow, SCROW nEndRow) const
{
- // horizontal zusammengefasste duerfen nicht herausgeschoben werden
- // (ob die ganze Zusammenfassung betroffen ist, ist hier nicht zu erkennen)
+ // Horizontal aggregate are not allowed to be moved out; if whole summary,
+ // here is not recognized
BOOL bTest = TRUE;
if (!IsEmpty())
@@ -2047,10 +2027,10 @@ BOOL ScAttrArray::TestInsertCol( SCROW nStartRow, SCROW nEndRow) const
if ( ((const ScMergeFlagAttr&)pData[nIndex].pPattern->
GetItem(ATTR_MERGE_FLAG)).IsHorOverlapped() )
{
- bTest = FALSE; // darf nicht herausgeschoben werden
+ bTest = FALSE; // may not be pushed out
break;
}
- if ( pData[nIndex].nRow >= nEndRow ) // Ende des Bereichs
+ if ( pData[nIndex].nRow >= nEndRow ) // end of range
break;
}
}
@@ -2060,12 +2040,11 @@ BOOL ScAttrArray::TestInsertCol( SCROW nStartRow, SCROW nEndRow) const
BOOL ScAttrArray::TestInsertRow( SCSIZE nSize ) const
{
- // wenn die erste herausgeschobene Zeile vertikal ueberlappt ist,
- // wuerde eine kaputte Zusammenfassung uebrigbleiben
+ // if 1st row pushed out is vertically overlapped, summary would be broken
if (pData)
{
- // MAXROW + 1 - nSize = erste herausgeschobene Zeile
+ // MAXROW + 1 - nSize = 1st row pushed out
SCSIZE nFirstLost = nCount-1;
while ( nFirstLost && pData[nFirstLost-1].nRow >= sal::static_int_cast<SCROW>(MAXROW + 1 - nSize) )
@@ -2085,12 +2064,11 @@ void ScAttrArray::InsertRow( SCROW nStartRow, SCSIZE nSize )
if (!pData)
return;
- SCROW nSearch = nStartRow > 0 ? nStartRow - 1 : 0; // Vorgaenger erweitern
+ SCROW nSearch = nStartRow > 0 ? nStartRow - 1 : 0; // expand predecessor
SCSIZE nIndex;
Search( nSearch, nIndex );
- // ein gesetztes ScMergeAttr darf nicht ausgedehnt werden
- // (darum hinterher wieder loeschen)
+ // set ScMergeAttr may not be extended (so behind delete again)
BOOL bDoMerge = ((const ScMergeAttr&) pData[nIndex].pPattern->GetItem(ATTR_MERGE)).IsMerged();
@@ -2099,29 +2077,29 @@ void ScAttrArray::InsertRow( SCROW nStartRow, SCSIZE nSize )
for (i = nIndex; i < nCount-1; i++)
{
SCROW nNew = pData[i].nRow + nSize;
- if ( nNew >= MAXROW ) // Ende erreicht ?
+ if ( nNew >= MAXROW ) // at end?
{
nNew = MAXROW;
if (!nRemove)
- nRemove = i+1; // folgende loeschen
+ nRemove = i+1; // remove the following?
}
pData[i].nRow = nNew;
}
- // muessen Eintraege am Ende geloescht werden?
+ // Remove entries at end ?
if (nRemove && nRemove < nCount)
DeleteRange( nRemove, nCount-1 );
- if (bDoMerge) // ausgedehntes ScMergeAttr wieder reparieren
+ if (bDoMerge) // extensively repair (again) ScMergeAttr
{
- //! ApplyAttr fuer Bereiche !!!
+ // ApplyAttr for areas
const SfxPoolItem& rDef = pDocument->GetPool()->GetDefaultItem( ATTR_MERGE );
for (SCSIZE nAdd=0; nAdd<nSize; nAdd++)
pDocument->ApplyAttr( nCol, nStartRow+nAdd, nTab, rDef );
- // im eingefuegten Bereich ist nichts zusammengefasst
+ // reply inserts in this area not summarized
}
// Don't duplicate the merge flags in the inserted row.
@@ -2174,9 +2152,8 @@ void ScAttrArray::DeleteRow( SCROW nStartRow, SCSIZE nSize )
if (pData[i].nRow >= nStartRow)
pData[i].nRow -= nSize;
-// unten nicht Default-Pattern nachschieben, um Druckbereiche erkennen zu koennen
-// stattdessen nur Merge-Flags loeschen
-
+ // Below does not follow the pattern to detect pressure ranges;
+ // instead, only remove merge flags.
RemoveFlags( MAXROW-nSize+1, MAXROW, SC_MF_HOR | SC_MF_VER | SC_MF_AUTO );
}
}
@@ -2195,12 +2172,12 @@ void ScAttrArray::DeleteRange( SCSIZE nStartIndex, SCSIZE nEndIndex )
void ScAttrArray::DeleteArea(SCROW nStartRow, SCROW nEndRow)
{
- RemoveAreaMerge( nStartRow, nEndRow ); // von zusammengefassten auch die Flags loeschen
+ RemoveAreaMerge( nStartRow, nEndRow ); // remove from combined flags
if ( !HasAttrib( nStartRow, nEndRow, HASATTR_OVERLAPPED | HASATTR_AUTOFILTER) )
SetPatternArea( nStartRow, nEndRow, pDocument->GetDefPattern() );
else
- DeleteAreaSafe( nStartRow, nEndRow ); // Merge-Flags stehenlassen
+ DeleteAreaSafe( nStartRow, nEndRow ); // leave merge flags
}
@@ -2221,7 +2198,7 @@ void ScAttrArray::DeleteHardAttr(SCROW nStartRow, SCROW nEndRow)
{
pOldPattern = pData[nIndex].pPattern;
- if ( pOldPattern->GetItemSet().Count() ) // harte Attribute ?
+ if ( pOldPattern->GetItemSet().Count() ) // hard attributes ?
{
nRow = pData[nIndex].nRow;
SCROW nAttrRow = Min( (SCROW)nRow, (SCROW)nEndRow );
@@ -2237,7 +2214,7 @@ void ScAttrArray::DeleteHardAttr(SCROW nStartRow, SCROW nEndRow)
else
SetPatternArea( nThisRow, nAttrRow, &aNewPattern, TRUE );
- Search( nThisRow, nIndex ); // Daten wurden veraendert !!!
+ Search( nThisRow, nIndex ); // data changed
}
++nIndex;
@@ -2245,7 +2222,8 @@ void ScAttrArray::DeleteHardAttr(SCROW nStartRow, SCROW nEndRow)
}
}
- // Verschieben innerhalb eines Dokuments
+
+// move within a document
void ScAttrArray::MoveTo(SCROW nStartRow, SCROW nEndRow, ScAttrArray& rAttrArray)
{
@@ -2254,7 +2232,7 @@ void ScAttrArray::MoveTo(SCROW nStartRow, SCROW nEndRow, ScAttrArray& rAttrArray
{
if ((pData[i].nRow >= nStartRow) && ((i==0) ? TRUE : pData[i-1].nRow < nEndRow))
{
- // Kopieren (bPutToPool=TRUE)
+ // copy (bPutToPool=TRUE)
rAttrArray.SetPatternArea( nStart, Min( (SCROW)pData[i].nRow, (SCROW)nEndRow ),
pData[i].pPattern, TRUE );
}
@@ -2264,12 +2242,12 @@ void ScAttrArray::MoveTo(SCROW nStartRow, SCROW nEndRow, ScAttrArray& rAttrArray
}
- // Kopieren zwischen Dokumenten (Clipboard)
+// copy between documents (Clipboard)
void ScAttrArray::CopyArea( SCROW nStartRow, SCROW nEndRow, long nDy, ScAttrArray& rAttrArray,
INT16 nStripFlags )
{
- nStartRow -= nDy; // Source
+ nStartRow -= nDy; // Source
nEndRow -= nDy;
SCROW nDestStart = Max((long)((long)nStartRow + nDy), (long) 0);
@@ -2288,7 +2266,7 @@ void ScAttrArray::CopyArea( SCROW nStartRow, SCROW nEndRow, long nDy, ScAttrArra
if (IsDefaultItem( pOldPattern ))
{
- // am Default muss nichts veraendert werden
+ // default: nothing changed
pNewPattern = (const ScPatternAttr*)
&pDestDocPool->GetDefaultItem( ATTR_PATTERN );
@@ -2324,18 +2302,19 @@ void ScAttrArray::CopyArea( SCROW nStartRow, SCROW nEndRow, long nDy, ScAttrArra
Min((SCROW)(pData[i].nRow + nDy), nDestEnd), pNewPattern);
}
- // when pasting from clipboard and skipping filtered rows, the adjusted end position
- // can be negative
+ // when pasting from clipboard and skipping filtered rows, the adjusted
+ // end position can be negative
nDestStart = Max((long)nDestStart, (long)(pData[i].nRow + nDy + 1));
}
}
- // Flags stehenlassen
- //! mit CopyArea zusammenfassen !!!
+
+// leave flags
+// summarized with CopyArea
void ScAttrArray::CopyAreaSafe( SCROW nStartRow, SCROW nEndRow, long nDy, ScAttrArray& rAttrArray )
{
- nStartRow -= nDy; // Source
+ nStartRow -= nDy; // Source
nEndRow -= nDy;
SCROW nDestStart = Max((long)((long)nStartRow + nDy), (long) 0);
@@ -2367,8 +2346,8 @@ void ScAttrArray::CopyAreaSafe( SCROW nStartRow, SCROW nEndRow, long nDy, ScAttr
Min((SCROW)(pData[i].nRow + nDy), nDestEnd), pNewPattern, FALSE);
}
- // when pasting from clipboard and skipping filtered rows, the adjusted end position
- // can be negative
+ // when pasting from clipboard and skipping filtered rows, the adjusted
+ // end position can be negative
nDestStart = Max((long)nDestStart, (long)(pData[i].nRow + nDy + 1));
}
}
@@ -2431,7 +2410,7 @@ SCsROW ScAttrArray::SearchStyle( SCsROW nRow, const ScStyleSheet* pSearchStyle,
}
}
- DBG_ASSERT( bFound || !ValidRow(nRow), "interner Fehler in ScAttrArray::SearchStyle" );
+ DBG_ASSERT( bFound || !ValidRow(nRow), "Internal failure in in ScAttrArray::SearchStyle" );
return nRow;
}
@@ -2477,109 +2456,4 @@ BOOL ScAttrArray::SearchStyleRange( SCsROW& rRow, SCsROW& rEndRow,
return FALSE;
}
-//------------------------------------------------------------------------
-//
-// Laden / Speichern
-//
-
-
-#if 0
-void ScAttrArray::Save( SvStream& /* rStream */ ) const
-{
-#if SC_ROWLIMIT_STREAM_ACCESS
-#error address types changed!
- ScWriteHeader aHdr( rStream, 8 );
-
- ScDocumentPool* pDocPool = pDocument->GetPool();
-
- USHORT nSaveCount = nCount;
- SCROW nSaveMaxRow = pDocument->GetSrcMaxRow();
- if ( nSaveMaxRow != MAXROW )
- {
- if ( nSaveCount > 1 && pData[nSaveCount-2].nRow >= nSaveMaxRow )
- {
- pDocument->SetLostData(); // Warnung ausgeben
- do
- --nSaveCount;
- while ( nSaveCount > 1 && pData[nSaveCount-2].nRow >= nSaveMaxRow );
- }
- }
-
- rStream << nSaveCount;
-
- const SfxPoolItem* pItem;
- for (SCSIZE i=0; i<nSaveCount; i++)
- {
- rStream << Min( pData[i].nRow, nSaveMaxRow );
-
- const ScPatternAttr* pPattern = pData[i].pPattern;
- pDocPool->StoreSurrogate( rStream, pPattern );
-
- // FALSE, weil ATTR_CONDITIONAL (noch) nicht in Vorlagen:
- if (pPattern->GetItemSet().GetItemState(ATTR_CONDITIONAL,FALSE,&pItem) == SFX_ITEM_SET)
- pDocument->SetConditionalUsed( ((const SfxUInt32Item*)pItem)->GetValue() );
-
- if (pPattern->GetItemSet().GetItemState(ATTR_VALIDDATA,FALSE,&pItem) == SFX_ITEM_SET)
- pDocument->SetValidationUsed( ((const SfxUInt32Item*)pItem)->GetValue() );
- }
-#endif // SC_ROWLIMIT_STREAM_ACCESS
-}
-
-
-void ScAttrArray::Load( SvStream& /* rStream */ )
-{
-#if SC_ROWLIMIT_STREAM_ACCESS
-#error address types changed!
- ScDocumentPool* pDocPool = pDocument->GetPool();
-
- ScReadHeader aHdr( rStream );
-
- USHORT nNewCount;
- rStream >> nNewCount;
- if ( nNewCount > MAXROW+1 ) // wuerde das Array zu gross?
- {
- pDocument->SetLostData();
- rStream.SetError( SVSTREAM_FILEFORMAT_ERROR );
- return;
- }
-
- Reset( pDocument->GetDefPattern(), FALSE ); // loeschen
- pData = new ScAttrEntry[nNewCount]; // neu anlegen
- for (SCSIZE i=0; i<nNewCount; i++)
- {
- rStream >> pData[i].nRow;
-
- USHORT nWhich = ATTR_PATTERN;
- const ScPatternAttr* pNewPattern = (const ScPatternAttr*)
- pDocPool->LoadSurrogate( rStream, nWhich, ATTR_PATTERN );
- if (!pNewPattern)
- {
- // da is was schiefgelaufen
- DBG_ERROR("ScAttrArray::Load: Surrogat nicht im Pool");
- pNewPattern = pDocument->GetDefPattern();
- }
- ScDocumentPool::CheckRef( *pNewPattern );
- pData[i].pPattern = pNewPattern;
-
- // LoadSurrogate erhoeht auch die Ref
- }
- nCount = nLimit = nNewCount;
-
- if ( nCount > 1 && pData[nCount-2].nRow >= MAXROW ) // faengt ein Attribut hinter MAXROW an?
- {
- pDocument->SetLostData();
- rStream.SetError( SVSTREAM_FILEFORMAT_ERROR );
- return;
- }
-
- if ( pDocument->GetSrcMaxRow() != MAXROW ) // Ende anpassen?
- {
- // Ende immer auf MAXROW umsetzen (nur auf 32 Bit)
-
- DBG_ASSERT( pData[nCount-1].nRow == pDocument->GetSrcMaxRow(), "Attribut-Ende ?!?" );
- pData[nCount-1].nRow = MAXROW;
- }
-#endif // SC_ROWLIMIT_STREAM_ACCESS
-}
-#endif
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx
index 26c5c91104da..7924b4e2612f 100644
--- a/sc/source/core/data/attrib.cxx
+++ b/sc/source/core/data/attrib.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1231,3 +1232,4 @@ bool ScPageScaleToItem::PutValue( const uno::Any& rAny, BYTE nMemberId )
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/autonamecache.cxx b/sc/source/core/data/autonamecache.cxx
index c9abd4aa90b8..0b97623b7efb 100644
--- a/sc/source/core/data/autonamecache.cxx
+++ b/sc/source/core/data/autonamecache.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -107,3 +108,4 @@ const ScAutoNameAddresses& ScAutoNameCache::GetNameOccurences( const String& rNa
return rAddresses;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx
index 540fb577a79b..abd6f055b716 100644
--- a/sc/source/core/data/bcaslot.cxx
+++ b/sc/source/core/data/bcaslot.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -935,3 +936,5 @@ size_t ScBroadcastAreaSlotMachine::RemoveBulkArea( const ScBroadcastArea* pArea
{
return aBulkBroadcastAreas.erase( pArea );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx
index 8b1e66de6c55..49676e29525d 100644
--- a/sc/source/core/data/cell.cxx
+++ b/sc/source/core/data/cell.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,6 +52,7 @@
#include "recursionhelper.hxx"
#include "postit.hxx"
#include "externalrefmgr.hxx"
+#include "macromgr.hxx"
#include <editeng/editobj.hxx>
#include <svl/intitem.hxx>
#include <editeng/flditem.hxx>
@@ -826,6 +828,8 @@ ScFormulaCell::~ScFormulaCell()
{
pDocument->RemoveFromFormulaTree( this );
pDocument->RemoveSubTotalCell(this);
+ if (pCode->HasOpCode(ocMacro))
+ pDocument->GetMacroManager()->RemoveDependentCell(this);
if (pDocument->HasExternalRefManager())
pDocument->GetExternalRefManager()->removeRefCell(this);
@@ -1757,6 +1761,36 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
// Reschedule verlangsamt das ganze erheblich, nur bei Prozentaenderung ausfuehren
ScProgress::GetInterpretProgress()->SetStateCountDownOnPercent(
pDocument->GetFormulaCodeInTree()/MIN_NO_CODES_PER_PROGRESS_UPDATE );
+
+ switch (p->GetVolatileType())
+ {
+ case ScInterpreter::VOLATILE:
+ // Volatile via built-in volatile functions. No actions needed.
+ break;
+ case ScInterpreter::VOLATILE_MACRO:
+ // The formula contains a volatile macro.
+ pCode->SetRecalcModeAlways();
+ pDocument->PutInFormulaTree(this);
+ StartListeningTo(pDocument);
+ break;
+ case ScInterpreter::NOT_VOLATILE:
+ if (pCode->IsRecalcModeAlways())
+ {
+ // The formula was previously volatile, but no more.
+ EndListeningTo(pDocument);
+ pCode->SetRecalcModeNormal();
+ }
+ else
+ {
+ // non-volatile formula. End listening to the area in case
+ // it's listening due to macro module change.
+ pDocument->EndListeningArea(BCA_LISTEN_ALWAYS, this);
+ }
+ pDocument->RemoveFromFormulaTree(this);
+ break;
+ default:
+ ;
+ }
}
else
{
@@ -1824,7 +1858,7 @@ void __EXPORT ScFormulaCell::Notify( SvtBroadcaster&, const SfxHint& rHint)
else
{
bForceTrack = !bDirty;
- bDirty = TRUE;
+ SetDirtyVar();
}
// #35962# Don't remove from FormulaTree to put in FormulaTrack to
// put in FormulaTree again and again, only if necessary.
@@ -1847,7 +1881,7 @@ void ScFormulaCell::SetDirty()
if ( !IsInChangeTrack() )
{
if ( pDocument->GetHardRecalcState() )
- bDirty = TRUE;
+ SetDirtyVar();
else
{
// Mehrfach-FormulaTracking in Load und in CompileAll
@@ -1856,7 +1890,7 @@ void ScFormulaCell::SetDirty()
// setzen, z.B. in CompileTokenArray
if ( !bDirty || !pDocument->IsInFormulaTree( this ) )
{
- bDirty = TRUE;
+ SetDirtyVar();
pDocument->AppendToFormulaTrack( this );
pDocument->TrackFormulas();
}
@@ -1867,6 +1901,13 @@ void ScFormulaCell::SetDirty()
}
}
+void ScFormulaCell::SetDirtyVar()
+{
+ bDirty = TRUE;
+ // mark the sheet of this cell to be calculated
+ //#FIXME do we need to revert this remnant of old fake vba events? pDocument->AddCalculateTable( aPos.Tab() );
+}
+
void ScFormulaCell::SetDirtyAfterLoad()
{
bDirty = TRUE;
@@ -2063,3 +2104,5 @@ ScToken* ScDetectiveRefIter::GetNextRefToken()
}
// ============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/cell2.cxx b/sc/source/core/data/cell2.cxx
index 76149992f1b4..4e1823b97b6a 100644
--- a/sc/source/core/data/cell2.cxx
+++ b/sc/source/core/data/cell2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,7 +36,7 @@
#include <deque>
#include <boost/bind.hpp>
-
+#include <sal/macros.h>
#include <vcl/mapmod.hxx>
#include <editeng/editobj.hxx>
#include <editeng/editstat.hxx>
@@ -152,7 +153,7 @@ void ScEditCell::RemoveCharAttribs( const ScPatternAttr& rAttr )
{ ATTR_FONT_WEIGHT, EE_CHAR_WEIGHT },
{ ATTR_FONT_COLOR, EE_CHAR_COLOR }
};
- USHORT nMapCount = sizeof(AttrTypeMap) / sizeof(AttrTypeMap[0]);
+ USHORT nMapCount = SAL_N_ELEMENTS(AttrTypeMap);
const SfxItemSet& rSet = rAttr.GetItemSet();
const SfxPoolItem* pItem;
@@ -1712,3 +1713,4 @@ void ScFormulaCell::CompileColRowNameFormula()
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/clipparam.cxx b/sc/source/core/data/clipparam.cxx
index 9ab5995ca26c..6cae3916fc47 100644
--- a/sc/source/core/data/clipparam.cxx
+++ b/sc/source/core/data/clipparam.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -198,3 +199,5 @@ void ScClipRangeNameData::insert(sal_uInt16 nOldIndex, sal_uInt16 nNewIndex)
maRangeMap.insert(
ScRangeData::IndexMap::value_type(nOldIndex, nNewIndex));
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 53463a0242db..27dce7c8f414 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -688,20 +689,6 @@ void ScColumn::ApplyAttr( SCROW nRow, const SfxPoolItem& rAttr )
delete pTemp;
// alte Version mit SfxItemPoolCache:
-#if 0
- SfxItemPoolCache aCache( pDocument->GetPool(), &rAttr );
-
- const ScPatternAttr* pPattern = pAttrArray->GetPattern( nRow );
-
- // TRUE = alten Eintrag behalten
-
- ScPatternAttr* pNewPattern = (ScPatternAttr*) &aCache.ApplyTo( *pPattern, TRUE );
- ScDocumentPool::CheckRef( *pPattern );
- ScDocumentPool::CheckRef( *pNewPattern );
-
- if (pNewPattern != pPattern)
- pAttrArray->SetPattern( nRow, pNewPattern );
-#endif
}
#ifdef _MSC_VER
@@ -1122,22 +1109,6 @@ BOOL ScColumn::TestInsertRow( SCSIZE nSize ) const
pItems[nCount-1].nRow <= MAXROW-(SCROW)nSize && pAttrArray->TestInsertRow( nSize ) );
else
return pAttrArray->TestInsertRow( nSize );
-
-#if 0
- //! rausgeschobene Attribute bei Undo beruecksichtigen
-
- if ( nSize > static_cast<SCSIZE>(MAXROW) )
- return FALSE;
-
- SCSIZE nVis = nCount;
- while ( nVis && pItems[nVis-1].pCell->IsBlank() )
- --nVis;
-
- if ( nVis )
- return ( pItems[nVis-1].nRow <= MAXROW-nSize );
- else
- return TRUE;
-#endif
}
@@ -2201,3 +2172,4 @@ BOOL ScColumn::SearchStyleRange( SCsROW& rRow, SCsROW& rEndRow, const ScStyleShe
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index b9fb3f9a7a1d..9fc09c2addc6 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1788,3 +1789,4 @@ ULONG ScColumn::GetCodeCount() const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 642d5bdcf3f0..b34e764a11a7 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -829,8 +830,10 @@ ScBaseCell* ScColumn::CloneCell(SCSIZE nIndex, USHORT nFlags, ScDocument& rDestD
bool bCloneValue = (nFlags & IDF_VALUE) != 0;
bool bCloneDateTime = (nFlags & IDF_DATETIME) != 0;
bool bCloneString = (nFlags & IDF_STRING) != 0;
+ bool bCloneSpecialBoolean = (nFlags & IDF_SPECIAL_BOOLEAN) != 0;
bool bCloneFormula = (nFlags & IDF_FORMULA) != 0;
bool bCloneNote = (nFlags & IDF_NOTE) != 0;
+ bool bForceFormula = false;
ScBaseCell* pNew = 0;
ScBaseCell& rSource = *pItems[nIndex].pCell;
@@ -854,7 +857,18 @@ ScBaseCell* ScColumn::CloneCell(SCSIZE nIndex, USHORT nFlags, ScDocument& rDestD
break;
case CELLTYPE_FORMULA:
- if (bCloneFormula)
+ if ( bCloneSpecialBoolean )
+ {
+ ScFormulaCell& rForm = (ScFormulaCell&)rSource;
+ rtl::OUStringBuffer aBuf;
+ // #TODO #FIXME do we have a localisation issue here?
+ rForm.GetFormula( aBuf );
+ rtl::OUString aVal( aBuf.makeStringAndClear() );
+ if ( aVal.equalsAscii( "=TRUE()" )
+ || aVal.equalsAscii( "=FALSE()" ) )
+ bForceFormula = true;
+ }
+ if (bForceFormula || bCloneFormula)
{
// note will be cloned below
pNew = rSource.CloneWithoutNote( rDestDoc, rDestPos );
@@ -1544,16 +1558,6 @@ void ScColumn::GetFilterEntries(SCROW nStartRow, SCROW nEndRow, TypedScStrCollec
pData = new TypedStrData( aString, nValue, SC_STRTYPE_VALUE );
}
-#if 0 // DR
- ScPostIt aCellNote( ScPostIt::UNINITIALIZED );
- // Hide visible notes during Filtering.
- if(pCell->GetNote(aCellNote) && aCellNote.IsCaptionShown())
- {
- ScDetectiveFunc( pDocument, nTab ).HideComment( nCol, nRow );
- aCellNote.SetShown( false );
- pCell->SetNote(aCellNote);
- }
-#endif
if ( !rStrings.Insert( pData ) )
delete pData; // doppelt
@@ -2016,3 +2020,4 @@ xub_StrLen ScColumn::GetMaxNumberStringLen(
return nStringLen;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/compressedarray.cxx b/sc/source/core/data/compressedarray.cxx
index 95da04fef0e0..be541decc632 100644
--- a/sc/source/core/data/compressedarray.cxx
+++ b/sc/source/core/data/compressedarray.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -904,3 +905,5 @@ template void ScCompressedArrayIterator< SCROW, USHORT>::Follow(
template class ScCoupledCompressedArrayIterator< SCROW, BYTE, USHORT>;
// === EOF ===================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index b08838198477..b3852e705e17 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1601,3 +1602,5 @@ bool ScConditionalFormatList::MarkUsedExternalReferences() const
bAllMarked = (*this)[i]->MarkUsedExternalReferences();
return bAllMarked;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/dbdocutl.cxx b/sc/source/core/data/dbdocutl.cxx
index 7a56f90bbffa..2bd9b6755776 100644
--- a/sc/source/core/data/dbdocutl.cxx
+++ b/sc/source/core/data/dbdocutl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -205,3 +206,4 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 280cd340e59f..c9df5606f20f 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -542,6 +543,10 @@ bool ScDBQueryDataIterator::DataAccessInternal::getCurrent(Value& rValue)
}
SCSIZE nCellCount = mpDoc->GetCellCount(nTab, nCol);
+ if (!nCellCount)
+ // No cells found in this column. Bail out.
+ return false;
+
SCROW nThisRow = ScDBQueryDataIterator::GetRowByColEntryIndex(*mpDoc, nTab, nCol, nColRow);
while ( (nColRow < nCellCount) && (nThisRow < nRow) )
nThisRow = ScDBQueryDataIterator::GetRowByColEntryIndex(*mpDoc, nTab, nCol, ++nColRow);
@@ -2213,3 +2218,5 @@ SCROW ScRowBreakIterator::next()
++maItr;
return maItr == maEnd ? NOT_FOUND : *maItr;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/docparam.cxx b/sc/source/core/data/docparam.cxx
index bb2e073f0af5..c6d47fc5615f 100644
--- a/sc/source/core/data/docparam.cxx
+++ b/sc/source/core/data/docparam.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,3 +38,5 @@
ScColWidthParam::ScColWidthParam() :
mnMaxTextRow(-1), mnMaxTextLen(0), mbSimpleText(true) {}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index ae7adbcaed39..08e275f46833 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1065,3 +1066,4 @@ SfxMapUnit __EXPORT ScDocumentPool::GetMetric( USHORT nWhich ) const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 8c695c7ee467..adb9cf49ed0a 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -94,6 +95,7 @@
#include "tabprotection.hxx"
#include "formulaparserpool.hxx"
#include "clipparam.hxx"
+#include "macromgr.hxx"
using namespace com::sun::star;
@@ -157,6 +159,7 @@ ScDocument::ScDocument( ScDocumentMode eMode,
pDocProtection( NULL ),
mpClipParam( NULL),
pExternalRefMgr( NULL ),
+ mpMacroMgr( NULL ),
pViewOptions( NULL ),
pDocOptions( NULL ),
pExtDocOptions( NULL ),
@@ -452,9 +455,9 @@ ScDocument::~ScDocument()
// delete the EditEngine before destroying the xPoolHelper
delete pCacheFieldEditEngine;
- if ( xPoolHelper.isValid() && !bIsClip )
+ if ( xPoolHelper.is() && !bIsClip )
xPoolHelper->SourceDocumentGone();
- xPoolHelper.unbind();
+ xPoolHelper.clear();
DeleteColorTable();
delete pScriptTypeData;
@@ -1276,3 +1279,5 @@ void ScDocument::ClearLookupCaches()
if( pLookupCacheMapImpl )
pLookupCacheMapImpl->clear();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 1fc9db02b3d1..cb022714fe93 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -73,7 +74,6 @@
#include "sc.hrc" // SID_LINK
#include "hints.hxx"
#include "dpobject.hxx"
-#include "unoguard.hxx"
#include "drwlayer.hxx"
#include "unoreflist.hxx"
#include "listenercalls.hxx"
@@ -770,7 +770,7 @@ void ScDocument::RemoveUnoObject( SfxListener& rObject )
// This check is done after calling EndListening, so a later BroadcastUno call
// won't touch this object.
- vos::IMutex& rSolarMutex = Application::GetSolarMutex();
+ osl::SolarMutex& rSolarMutex = Application::GetSolarMutex();
if ( rSolarMutex.tryToAcquire() )
{
// BroadcastUno is always called with the SolarMutex locked, so if it
@@ -783,7 +783,7 @@ void ScDocument::RemoveUnoObject( SfxListener& rObject )
// let the thread that called BroadcastUno continue
while ( bInUnoBroadcast )
{
- vos::OThread::yield();
+ osl::Thread::yield();
}
}
}
@@ -1904,7 +1904,7 @@ void ScDocument::SetLanguage( LanguageType eLatin, LanguageType eCjk, LanguageTy
eLanguage = eLatin;
eCjkLanguage = eCjk;
eCtlLanguage = eCtl;
- if ( xPoolHelper.isValid() )
+ if ( xPoolHelper.is() )
{
ScDocumentPool* pPool = xPoolHelper->GetDocPool();
pPool->SetPoolDefaultItem( SvxLanguageItem( eLanguage, ATTR_FONT_LANGUAGE ) );
@@ -2160,3 +2160,5 @@ void ScDocument::GetUsedDPObjectCache( std::list<ScDPTableDataCache*>& usedlist
}
}
// End Comments
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index a296ab068804..a803ba81e40f 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1196,3 +1197,4 @@ void ScDocument::CompareDocument( ScDocument& rOtherDoc )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/documen5.cxx b/sc/source/core/data/documen5.cxx
index d86d174ab414..2732a6e3251f 100644
--- a/sc/source/core/data/documen5.cxx
+++ b/sc/source/core/data/documen5.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -558,15 +559,6 @@ void ScDocument::UpdateChartRef( UpdateRefMode eUpdateRefMode,
}
if ( bChanged )
{
-#if 0
- if ( nDz != 0 )
- { // #81844# sheet to be deleted or inserted or moved
- // => no valid sheet names for references right now
- pChartListener->ChangeListening( aNewRLR, bDataChanged );
- pChartListener->ScheduleSeriesRanges();
- }
- else
-#endif
{
// SetChartRangeList( pChartListener->GetString(), aNewRLR );
// pChartListener->ChangeListening( aNewRLR, bDataChanged );
@@ -792,3 +784,4 @@ void ScDocument::AddOLEObjectToCollection(const String& rName)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/documen6.cxx b/sc/source/core/data/documen6.cxx
index 8706c49320d1..de0105cb63af 100644
--- a/sc/source/core/data/documen6.cxx
+++ b/sc/source/core/data/documen6.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -182,3 +183,4 @@ BYTE ScDocument::GetScriptType( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell*
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/documen7.cxx b/sc/source/core/data/documen7.cxx
index d77dc1041d9c..fba5fa0a1b82 100644
--- a/sc/source/core/data/documen7.cxx
+++ b/sc/source/core/data/documen7.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -532,3 +533,4 @@ void ScDocument::SetAutoCalc( BOOL bNewAutoCalc )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index f2c2f4925859..8b9d6714246b 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -93,6 +94,7 @@
#include "globstr.hrc"
#include "sc.hrc"
#include "charthelper.hxx"
+#include "macromgr.hxx"
#include "dpobject.hxx"
#define GET_SCALEVALUE(set,id) ((const SfxUInt16Item&)(set.Get( id ))).GetValue()
@@ -412,6 +414,13 @@ BYTE ScDocument::GetEditTextDirection(SCTAB nTab) const
return sal::static_int_cast<BYTE>(eRet);
}
+ScMacroManager* ScDocument::GetMacroManager()
+{
+ if (!mpMacroMgr.get())
+ mpMacroMgr.reset(new ScMacroManager(this));
+ return mpMacroMgr.get();
+}
+
//------------------------------------------------------------------------
void ScDocument::InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress* pAdrTo,
@@ -1625,3 +1634,4 @@ void ScDocument::TransliterateText( const ScMarkData& rMultiMark, sal_Int32 nTyp
delete pEngine;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index 08e1c28599b7..039103e189f0 100644
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -169,11 +170,6 @@ void ScDocument::InitDrawLayer( SfxObjectShell* pDocShell )
pDrawLayer->ScRenamePage( nTab, aTabName );
pTab[nTab]->SetDrawPageSize(false,false); // #54782# set the right size immediately
-#if 0
- ULONG nx = (ULONG) ((double) (MAXCOL+1) * STD_COL_WIDTH * HMM_PER_TWIPS );
- ULONG ny = (ULONG) ((double) (MAXROW+1) * ScGlobal::nStdRowHeight * HMM_PER_TWIPS );
- pDrawLayer->SetPageSize( nTab, Size( nx, ny ) );
-#endif
}
}
@@ -717,12 +713,12 @@ void ScDocument::SetXMLFromWrapper( BOOL bVal )
bXMLFromWrapper = bVal;
}
-vos::ORef<SvxForbiddenCharactersTable> ScDocument::GetForbiddenCharacters()
+rtl::Reference<SvxForbiddenCharactersTable> ScDocument::GetForbiddenCharacters()
{
return xForbiddenCharacters;
}
-void ScDocument::SetForbiddenCharacters( const vos::ORef<SvxForbiddenCharactersTable> xNew )
+void ScDocument::SetForbiddenCharacters( const rtl::Reference<SvxForbiddenCharactersTable> xNew )
{
xForbiddenCharacters = xNew;
if ( pEditEngine )
@@ -775,3 +771,4 @@ void ScDocument::SetAsianKerning(BOOL bNew)
pDrawLayer->SetKernAsianPunctuation( (BOOL)nAsianKerning );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 0bd50b75f04d..e9363978b1cb 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -97,6 +98,8 @@
#include <map>
#include <limits>
+using namespace ::com::sun::star;
+
namespace WritingMode2 = ::com::sun::star::text::WritingMode2;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::sheet::TablePageBreakData;
@@ -124,10 +127,10 @@ void ScDocument::MakeTable( SCTAB nTab,bool _bNeedsNameCheck )
{
if ( ValidTab(nTab) && !pTab[nTab] )
{
- String aString = ScGlobal::GetRscString(STR_TABLE_DEF); //"Tabelle"
+ String aString = ScGlobal::GetRscString(STR_TABLE_DEF); //"Table"
aString += String::CreateFromInt32(nTab+1);
if ( _bNeedsNameCheck )
- CreateValidTabName( aString ); // keine doppelten
+ CreateValidTabName( aString ); // no doubles
pTab[nTab] = new ScTable(this, nTab, aString);
pTab[nTab]->SetLoadingMedium(bLoadingMedium);
@@ -184,6 +187,13 @@ BOOL ScDocument::GetCodeName( SCTAB nTab, String& rName ) const
return FALSE;
}
+NameToNameMap*
+ScDocument::GetLocalNameMap( SCTAB& rTab )
+{
+ if ( !HasTable( rTab ) )
+ return NULL;
+ return &pTab[rTab]->localNameToGlobalName;
+}
BOOL ScDocument::GetTable( const String& rName, SCTAB& rTab ) const
{
@@ -262,18 +272,17 @@ void ScDocument::CreateValidTabName(String& rName) const
{
if ( !ValidTabName(rName) )
{
- // neu erzeugen
+ // Find new one
const String aStrTable( ScResId(SCSTR_TABLE) );
BOOL bOk = FALSE;
- // vorneweg testen, ob der Prefix als gueltig erkannt wird
- // wenn nicht, nur doppelte vermeiden
+ // First test if the prefix is valid, if so only avoid doubles
BOOL bPrefix = ValidTabName( aStrTable );
- DBG_ASSERT(bPrefix, "ungueltiger Tabellenname");
+ OSL_ENSURE(bPrefix, "Invalid Table Name");
SCTAB nDummy;
- SCTAB nLoops = 0; // "zur Sicherheit"
+ SCTAB nLoops = 0; // "for safety messures"
for ( SCTAB i = nMaxTableNumber+1; !bOk && nLoops <= MAXTAB; i++ )
{
rName = aStrTable;
@@ -285,13 +294,13 @@ void ScDocument::CreateValidTabName(String& rName) const
++nLoops;
}
- DBG_ASSERT(bOk, "kein gueltiger Tabellenname gefunden");
+ OSL_ENSURE(bOk, "No Valid Table name found.");
if ( !bOk )
rName = aStrTable;
}
else
{
- // uebergebenen Namen ueberpruefen
+ // testing the supplied Name
if ( !ValidNewTabName(rName) )
{
@@ -316,7 +325,7 @@ BOOL ScDocument::InsertTab( SCTAB nPos, const String& rName,
{
SCTAB nTabCount = GetTableCount();
BOOL bValid = ValidTab(nTabCount);
- if ( !bExternalDocument ) // sonst rName == "'Doc'!Tab", vorher pruefen
+ if ( !bExternalDocument ) // else test rName == "'Doc'!Tab" first
bValid = (bValid && ValidNewTabName(rName));
if (bValid)
{
@@ -403,7 +412,7 @@ BOOL ScDocument::DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc )
if (nTabCount > 1)
{
BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ SetAutoCalc( FALSE ); // avoid multiple calculations
ScRange aRange( 0, 0, nTab, MAXCOL, MAXROW, nTab );
DelBroadcastAreasInRange( aRange );
@@ -448,6 +457,7 @@ BOOL ScDocument::DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc )
delete pTab[nTab];
for (i=nTab + 1; i < nTabCount; i++)
pTab[i - 1] = pTab[i];
+
pTab[nTabCount - 1] = NULL;
--nMaxTableNumber;
// UpdateBroadcastAreas must be called between UpdateDeleteTab,
@@ -457,8 +467,8 @@ BOOL ScDocument::DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc )
for (i = 0; i <= MAXTAB; i++)
if (pTab[i])
pTab[i]->UpdateCompile();
- // Excel-Filter loescht einige Tables waehrend des Ladens,
- // Listener werden erst nach dem Laden aufgesetzt
+ // Excel-Filter deletes some Tables while loading, Listeners will
+ // only be triggered after the loading is done.
if ( !bInsertingFromOtherDoc )
{
for (i = 0; i <= MAXTAB; i++)
@@ -487,7 +497,7 @@ BOOL ScDocument::RenameTab( SCTAB nTab, const String& rName, BOOL /* bUpdateRef
if (pTab[nTab])
{
if ( bExternalDocument )
- bValid = TRUE; // zusammengesetzter Name
+ bValid = TRUE; // composed name
else
bValid = ValidTabName(rName);
for (i=0; (i<=MAXTAB) && bValid; i++)
@@ -594,7 +604,7 @@ void ScDocument::SetLayoutRTL( SCTAB nTab, BOOL bRTL )
if (pDrawLayer)
{
SdrPage* pPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
- DBG_ASSERT(pPage,"Page ?");
+ OSL_ENSURE(pPage,"Page ?");
if (pPage)
{
SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS );
@@ -635,12 +645,12 @@ BOOL ScDocument::IsNegativePage( SCTAB nTab ) const
/* ----------------------------------------------------------------------------
- benutzten Bereich suchen:
+ used search area:
- GetCellArea - nur Daten
- GetTableArea - Daten / Attribute
- GetPrintArea - beruecksichtigt auch Zeichenobjekte,
- streicht Attribute bis ganz rechts / unten
+ GetCellArea - Only Data
+ GetTableArea - Data / Attributes
+ GetPrintArea - intended for character objects,
+ sweeps attributes all the way to bottom / right
---------------------------------------------------------------------------- */
@@ -706,7 +716,7 @@ bool ScDocument::ShrinkToUsedDataArea( SCTAB nTab, SCCOL& rStartCol,
return pTab[nTab]->ShrinkToUsedDataArea( rStartCol, rStartRow, rEndCol, rEndRow, bColumnsOnly);
}
-// zusammenhaengender Bereich
+// connected area
void ScDocument::GetDataArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow,
SCCOL& rEndCol, SCROW& rEndRow, BOOL bIncludeOld, bool bOnlyDown ) const
@@ -837,14 +847,14 @@ BOOL ScDocument::InsertRow( SCCOL nStartCol, SCTAB nStartTab,
BOOL bTest = TRUE;
BOOL bRet = FALSE;
BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ SetAutoCalc( FALSE ); // avoid mulitple calculations
for ( i = nStartTab; i <= nEndTab && bTest; i++)
if (pTab[i] && (!pTabMark || pTabMark->GetTableSelect(i)))
bTest &= pTab[i]->TestInsertRow( nStartCol, nEndCol, nSize );
if (bTest)
{
- // UpdateBroadcastAreas muss vor UpdateReference gerufen werden, damit nicht
- // Eintraege verschoben werden, die erst bei UpdateReference neu erzeugt werden
+ // UpdateBroadcastAreas have to be called before UpdateReference, so that entries
+ // aren't shifted that would be rebuild at UpdateReference
// handle chunks of consecutive selected sheets together
SCTAB nTabRangeStart = nStartTab;
@@ -931,7 +941,7 @@ void ScDocument::DeleteRow( SCCOL nStartCol, SCTAB nStartTab,
}
BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ SetAutoCalc( FALSE ); // avoid multiple calculations
// handle chunks of consecutive selected sheets together
SCTAB nTabRangeStart = nStartTab;
@@ -1040,7 +1050,7 @@ BOOL ScDocument::InsertCol( SCROW nStartRow, SCTAB nStartTab,
BOOL bTest = TRUE;
BOOL bRet = FALSE;
BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ SetAutoCalc( FALSE ); // avoid multiple calculations
for ( i = nStartTab; i <= nEndTab && bTest; i++)
if (pTab[i] && (!pTabMark || pTabMark->GetTableSelect(i)))
bTest &= pTab[i]->TestInsertCol( nStartRow, nEndRow, nSize );
@@ -1121,7 +1131,7 @@ void ScDocument::DeleteCol(SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTA
}
BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ SetAutoCalc( FALSE ); // avoid multiple calculations
// handle chunks of consecutive selected sheets together
SCTAB nTabRangeStart = nStartTab;
@@ -1198,7 +1208,7 @@ void lcl_GetInsDelRanges( const ScRange& rOld, const ScRange& rNew,
ScRange& rColRange, BOOL& rInsCol, BOOL& rDelCol,
ScRange& rRowRange, BOOL& rInsRow, BOOL& rDelRow )
{
- DBG_ASSERT( rOld.aStart == rNew.aStart, "FitBlock: Anfang unterschiedlich" );
+ OSL_ENSURE( rOld.aStart == rNew.aStart, "FitBlock: Beginning is different" );
rInsCol = rDelCol = rInsRow = rDelRow = FALSE;
@@ -1338,7 +1348,7 @@ void ScDocument::DeleteArea(SCCOL nCol1, SCROW nRow1,
PutInOrder( nCol1, nCol2 );
PutInOrder( nRow1, nRow2 );
BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ SetAutoCalc( FALSE ); // avoid multiple calculations
for (SCTAB i = 0; i <= MAXTAB; i++)
if (pTab[i])
if ( rMark.GetTableSelect(i) || bIsUndo )
@@ -1356,7 +1366,7 @@ void ScDocument::DeleteAreaTab(SCCOL nCol1, SCROW nRow1,
if ( VALIDTAB(nTab) && pTab[nTab] )
{
BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ SetAutoCalc( FALSE ); // avoid multiple calculations
pTab[nTab]->DeleteArea(nCol1, nRow1, nCol2, nRow2, nDelFlag);
SetAutoCalc( bOldAutoCalc );
}
@@ -1473,7 +1483,7 @@ void ScDocument::CopyToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
if (VALIDTAB(nTab1) && VALIDTAB(nTab2))
{
BOOL bOldAutoCalc = pDestDoc->GetAutoCalc();
- pDestDoc->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ pDestDoc->SetAutoCalc( FALSE ); // avoid multiple calculations
for (SCTAB i = nTab1; i <= nTab2; i++)
{
if (pTab[i] && pDestDoc->pTab[i])
@@ -1497,7 +1507,7 @@ void ScDocument::UndoToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
if (VALIDTAB(nTab1) && VALIDTAB(nTab2))
{
BOOL bOldAutoCalc = pDestDoc->GetAutoCalc();
- pDestDoc->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ pDestDoc->SetAutoCalc( FALSE ); // avoid multiple calculations
if (nTab1 > 0)
CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTab1-1, IDF_FORMULA, FALSE, pDestDoc, pMarks );
@@ -1525,7 +1535,7 @@ void ScDocument::CopyToDocument(const ScRange& rRange,
if( !pDestDoc->aDocName.Len() )
pDestDoc->aDocName = aDocName;
BOOL bOldAutoCalc = pDestDoc->GetAutoCalc();
- pDestDoc->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ pDestDoc->SetAutoCalc( FALSE ); // avoid multiple calculations
for (SCTAB i = aNewRange.aStart.Tab(); i <= aNewRange.aEnd.Tab(); i++)
if (pTab[i] && pDestDoc->pTab[i])
pTab[i]->CopyToTable(aNewRange.aStart.Col(), aNewRange.aStart.Row(),
@@ -1546,7 +1556,7 @@ void ScDocument::UndoToDocument(const ScRange& rRange,
SCTAB nTab2 = aNewRange.aEnd.Tab();
BOOL bOldAutoCalc = pDestDoc->GetAutoCalc();
- pDestDoc->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ pDestDoc->SetAutoCalc( FALSE ); // avoid multiple calculations
if (nTab1 > 0)
CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTab1-1, IDF_FORMULA, FALSE, pDestDoc, pMarks );
@@ -1567,14 +1577,14 @@ void ScDocument::CopyToClip(const ScClipParam& rClipParam,
ScDocument* pClipDoc, const ScMarkData* pMarks,
bool bAllTabs, bool bKeepScenarioFlags, bool bIncludeObjects, bool bCloneNoteCaptions)
{
- DBG_ASSERT( bAllTabs || pMarks, "CopyToClip: ScMarkData fehlt" );
+ OSL_ENSURE( bAllTabs || pMarks, "CopyToClip: ScMarkData fails" );
if (bIsClip)
return;
if (!pClipDoc)
{
- DBG_ERROR("CopyToClip: no ClipDoc");
+ OSL_TRACE("CopyToClip: no ClipDoc");
pClipDoc = SC_MOD()->GetClipDoc();
}
@@ -1608,6 +1618,40 @@ void ScDocument::CopyToClip(const ScClipParam& rClipParam,
pClipDoc->ExtendMerge(aClipRange, true);
}
+// Copy the content of the Range into clipboard. Adding this method for VBA API: Range.Copy().
+void ScDocument::CopyToClip4VBA(const ScClipParam& rClipParam, ScDocument* pClipDoc, bool bKeepScenarioFlags, bool bIncludeObjects, bool bCloneNoteCaptions)
+{
+ if ( !bIsClip )
+ {
+ pClipDoc = pClipDoc ? pClipDoc : SC_MOD()->GetClipDoc();
+ if ( !pClipDoc )
+ {
+ return;
+ }
+ ScRange aClipRange = rClipParam.getWholeRange();
+ SCTAB nTab = aClipRange.aStart.Tab();
+ pClipDoc->aDocName = aDocName;
+ pClipDoc->SetClipParam( rClipParam );
+ pClipDoc->ResetClip( this, nTab );
+
+ CopyRangeNamesToClip( pClipDoc, aClipRange, nTab );
+
+ if ( pTab[nTab] && pClipDoc->pTab[nTab] )
+ {
+ pTab[nTab]->CopyToClip( rClipParam.maRanges, pClipDoc->pTab[nTab], bKeepScenarioFlags, bCloneNoteCaptions );
+ if ( pDrawLayer && bIncludeObjects )
+ {
+ // Also copy drawing objects.
+ Rectangle aObjRect = GetMMRect( aClipRange.aStart.Col(), aClipRange.aStart.Row(), aClipRange.aEnd.Col(), aClipRange.aEnd.Row(), nTab );
+ pDrawLayer->CopyToClip( pClipDoc, nTab, aObjRect );
+ }
+ }
+
+ // Make sure to mark overlapped cells.
+ pClipDoc->ExtendMerge( aClipRange, true );
+ }
+}
+
void ScDocument::CopyTabToClip(SCCOL nCol1, SCROW nRow1,
SCCOL nCol2, SCROW nRow2,
SCTAB nTab, ScDocument* pClipDoc)
@@ -1618,7 +1662,7 @@ void ScDocument::CopyTabToClip(SCCOL nCol1, SCROW nRow1,
PutInOrder( nRow1, nRow2 );
if (!pClipDoc)
{
- DBG_ERROR("CopyTabToClip: no ClipDoc");
+ OSL_TRACE("CopyTabToClip: no ClipDoc");
pClipDoc = SC_MOD()->GetClipDoc();
}
@@ -1638,8 +1682,8 @@ void ScDocument::CopyTabToClip(SCCOL nCol1, SCROW nRow1,
void ScDocument::TransposeClip( ScDocument* pTransClip, USHORT nFlags, BOOL bAsLink )
{
- DBG_ASSERT( bIsClip && pTransClip && pTransClip->bIsClip,
- "TransposeClip mit falschem Dokument" );
+ OSL_ENSURE( bIsClip && pTransClip && pTransClip->bIsClip,
+ "TransposeClip with wrong Document" );
// initialisieren
// -> pTransClip muss vor dem Original-Dokument geloescht werden!
@@ -1659,7 +1703,7 @@ void ScDocument::TransposeClip( ScDocument* pTransClip, USHORT nFlags, BOOL bAsL
pData->SetIndex(nIndex);
}
- // Daten
+ // The data
ScRange aClipRange = GetClipParam().getWholeRange();
if ( ValidRow(aClipRange.aEnd.Row()-aClipRange.aStart.Row()) )
@@ -1667,7 +1711,7 @@ void ScDocument::TransposeClip( ScDocument* pTransClip, USHORT nFlags, BOOL bAsL
for (SCTAB i=0; i<=MAXTAB; i++)
if (pTab[i])
{
- DBG_ASSERT( pTransClip->pTab[i], "TransposeClip: Tabelle nicht da" );
+ OSL_ENSURE( pTransClip->pTab[i], "TransposeClip: Table not there" );
pTab[i]->TransposeClip( aClipRange.aStart.Col(), aClipRange.aStart.Row(),
aClipRange.aEnd.Col(), aClipRange.aEnd.Row(),
pTransClip->pTab[i], nFlags, bAsLink );
@@ -1695,7 +1739,7 @@ void ScDocument::TransposeClip( ScDocument* pTransClip, USHORT nFlags, BOOL bAsL
}
else
{
- DBG_ERROR("TransposeClip: zu gross");
+ OSL_TRACE("TransposeClip: Too big");
}
// Dies passiert erst beim Einfuegen...
@@ -1729,6 +1773,31 @@ void ScDocument::CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClip
}
}
+void ScDocument::CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClipRange, SCTAB nTab)
+{
+ // Indexes of named ranges that are used in the copied cells
+ std::set<USHORT> aUsedNames;
+ if ( pTab[nTab] && pClipDoc->pTab[nTab] )
+ {
+ pTab[nTab]->FindRangeNamesInUse( rClipRange.aStart.Col(), rClipRange.aStart.Row(), rClipRange.aEnd.Col(), rClipRange.aEnd.Row(), aUsedNames );
+ }
+
+ pClipDoc->pRangeName->FreeAll();
+ for ( USHORT i = 0; i < pRangeName->GetCount(); i++ )
+ {
+ USHORT nIndex = ((ScRangeData*)((*pRangeName)[i]))->GetIndex();
+ bool bInUse = ( aUsedNames.find(nIndex) != aUsedNames.end() );
+ if ( bInUse )
+ {
+ ScRangeData* pData = new ScRangeData(*((*pRangeName)[i]));
+ if ( !pClipDoc->pRangeName->Insert(pData) )
+ delete pData;
+ else
+ pData->SetIndex(nIndex);
+ }
+ }
+}
+
ScDocument::NumFmtMergeHandler::NumFmtMergeHandler(ScDocument* pDoc, ScDocument* pSrcDoc) :
mpDoc(pDoc)
{
@@ -1882,7 +1951,7 @@ void ScDocument::SetClipParam(const ScClipParam& rParam)
BOOL ScDocument::IsClipboardSource() const
{
ScDocument* pClipDoc = SC_MOD()->GetClipDoc();
- return pClipDoc && pClipDoc->xPoolHelper.isValid() &&
+ return pClipDoc && pClipDoc->xPoolHelper.is() &&
xPoolHelper->GetDocPool() == pClipDoc->xPoolHelper->GetDocPool();
}
@@ -1940,7 +2009,7 @@ void ScDocument::CopyBlockFromClip( SCCOL nCol1, SCROW nRow1,
// drawing layer must be created before calling CopyFromClip
// (ScDocShell::MakeDrawLayer also does InitItems etc.)
- DBG_ASSERT( pDrawLayer, "CopyBlockFromClip: No drawing layer" );
+ OSL_ENSURE( pDrawLayer, "CopyBlockFromClip: No drawing layer" );
if ( pDrawLayer )
{
// For GetMMRect, the row heights in the target document must already be valid
@@ -2522,7 +2591,7 @@ void ScDocument::FillTab( const ScRange& rSrcArea, const ScMarkData& rMark,
BOOL bDoMix = ( bSkipEmpty || nFunction ) && ( nFlags & IDF_CONTENTS );
BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ SetAutoCalc( FALSE ); // avoid multiple calculations
SCTAB nCount = GetTableCount();
for (SCTAB i=0; i<nCount; i++)
@@ -2574,7 +2643,7 @@ void ScDocument::FillTabMarked( SCTAB nSrcTab, const ScMarkData& rMark,
BOOL bDoMix = ( bSkipEmpty || nFunction ) && ( nFlags & IDF_CONTENTS );
BOOL bOldAutoCalc = GetAutoCalc();
- SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ SetAutoCalc( FALSE ); // avoid multiple calculations
ScRange aArea;
rMark.GetMultiMarkArea( aArea );
@@ -4502,6 +4571,15 @@ BOOL ScDocument::HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRo
return !bOk;
}
+BOOL ScDocument::HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ) const
+{
+ BOOL bOk = TRUE;
+ if ( pTab[nTab] && pTab[nTab]->HasBlockMatrixFragment( nStartCol, nStartRow, nEndCol, nEndRow ) )
+ {
+ bOk = FALSE;
+ }
+ return !bOk;
+}
BOOL ScDocument::GetMatrixFormulaRange( const ScAddress& rCellPos, ScRange& rMatrix )
{
@@ -5354,3 +5432,5 @@ bool ScDocument::IsInVBAMode() const
}
return bResult;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/dpcachetable.cxx b/sc/source/core/data/dpcachetable.cxx
index d97900e6b904..b371a30b7542 100644
--- a/sc/source/core/data/dpcachetable.cxx
+++ b/sc/source/core/data/dpcachetable.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -466,3 +467,5 @@ ScDPTableDataCache* ScDPCacheTable::GetCache() const
return mpNoneCache;
}
// End Comments
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/dpdimsave.cxx b/sc/source/core/data/dpdimsave.cxx
index 21669eb7a435..f8b06fbb0dd1 100644
--- a/sc/source/core/data/dpdimsave.cxx
+++ b/sc/source/core/data/dpdimsave.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -582,3 +583,4 @@ String ScDPDimensionSaveData::CreateDateGroupDimName( sal_Int32 nDatePart, const
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/dpglobal.cxx b/sc/source/core/data/dpglobal.cxx
index 6b84d37d8d0f..4ce715600a9c 100644
--- a/sc/source/core/data/dpglobal.cxx
+++ b/sc/source/core/data/dpglobal.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -148,3 +149,4 @@ sal_Int32 ScDPItemDataPool::insertData( const ScDPItemData& aData )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx
index edb3b787b9b2..216d90352c9d 100644
--- a/sc/source/core/data/dpgroup.cxx
+++ b/sc/source/core/data/dpgroup.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1587,3 +1588,4 @@ long ScDPGroupTableData::GetSourceDim( long nDim )
}
// -----------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 29ba9f15dc92..d8abd8d7dee3 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -74,6 +75,7 @@
#include <com/sun/star/sheet/XDrillDownDataSupplier.hpp>
#include <comphelper/processfactory.hxx>
+#include <sal/macros.h>
#include <tools/debug.hxx>
#include <tools/diagnose_ex.h>
#include <svl/zforlist.hxx> // IsNumberFormat
@@ -1184,7 +1186,7 @@ bool lcl_ParseFunction( const String& rList, xub_StrLen nStartPos, xub_StrLen& r
{
aFuncStr.EraseLeadingAndTrailingChars( ' ' );
- const sal_Int32 nFuncCount = sizeof(aFunctions) / sizeof(aFunctions[0]);
+ const sal_Int32 nFuncCount = SAL_N_ELEMENTS(aFunctions);
for ( sal_Int32 nFunc=0; nFunc<nFuncCount && !bFound; nFunc++ )
{
if ( aFuncStr.EqualsIgnoreCaseAscii( aFunctions[nFunc].pName ) )
@@ -2640,3 +2642,4 @@ bool ScDPCollection::HasDPTable(SCCOL nCol, SCROW nRow, SCTAB nTab) const
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index ac3ca76a7b2f..43b2e91ff18f 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -2059,3 +2060,4 @@ BOOL ScDPOutput::GetHeaderDrag( const ScAddress& rPos, BOOL bMouseLeft, BOOL bMo
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/dpoutputgeometry.cxx b/sc/source/core/data/dpoutputgeometry.cxx
index fd9bee0ed572..99a465188105 100644
--- a/sc/source/core/data/dpoutputgeometry.cxx
+++ b/sc/source/core/data/dpoutputgeometry.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -212,3 +213,5 @@ ScDPOutputGeometry::FieldType ScDPOutputGeometry::getFieldButtonType(const ScAdd
return None;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index 2b51ca68d170..f6f6cf216c76 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1474,3 +1475,4 @@ bool operator == (const ::com::sun::star::sheet::DataPilotFieldReference &l, con
l.ReferenceItemName == r.ReferenceItemName;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/dpsdbtab.cxx b/sc/source/core/data/dpsdbtab.cxx
index b966d9d458ea..6847b3aace87 100644
--- a/sc/source/core/data/dpsdbtab.cxx
+++ b/sc/source/core/data/dpsdbtab.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -310,3 +311,4 @@ const ScDPCacheTable& ScDatabaseDPData::GetCacheTable() const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/dpshttab.cxx b/sc/source/core/data/dpshttab.cxx
index a1fa9d2d60a6..7da7c956d26f 100644
--- a/sc/source/core/data/dpshttab.cxx
+++ b/sc/source/core/data/dpshttab.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -313,3 +314,4 @@ ULONG ScSheetSourceDesc::CheckValidate( ScDocument* pDoc ) const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/dptabdat.cxx b/sc/source/core/data/dptabdat.cxx
index cb68732a237f..c0c2d6d33122 100644
--- a/sc/source/core/data/dptabdat.cxx
+++ b/sc/source/core/data/dptabdat.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -327,3 +328,5 @@ long ScDPTableData::GetSourceDim( long nDim )
}
// End Comments
// -----------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/dptablecache.cxx b/sc/source/core/data/dptablecache.cxx
index 8f25b70e41b6..3cf660b609e7 100644
--- a/sc/source/core/data/dptablecache.cxx
+++ b/sc/source/core/data/dptablecache.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1123,3 +1124,5 @@ long ScDPTableDataCache::GetId() const
return mnID;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index c79f7c1b17a6..cc7b986eeb16 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -4107,3 +4108,5 @@ void ScDPResultMember::CheckShowEmpty( BOOL bShow )
}
}
}// End Comments
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index c971302b1b1e..4b9adca7e9c3 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,6 +44,7 @@
#include <rtl/math.hxx>
#include <svl/itemprop.hxx>
#include <svl/intitem.hxx>
+#include <vcl/svapp.hxx>
#include "scitems.hxx"
#include "document.hxx"
@@ -56,7 +58,6 @@
#include "global.hxx"
#include "collect.hxx"
#include "datauno.hxx" // ScDataUnoConversion
-#include "unoguard.hxx"
#include "miscuno.hxx"
#include "unonames.hxx"
@@ -1140,7 +1141,7 @@ const uno::Sequence<sheet::MemberResult>* ScDPSource::GetMemberResults( ScDPLeve
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScDPSource::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
using beans::PropertyAttribute::READONLY;
static SfxItemPropertyMapEntry aDPSourceMap_Impl[] =
@@ -1553,7 +1554,7 @@ BOOL ScDPDimension::IsVisible( const ScDPItemData& rData )
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScDPDimension::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static SfxItemPropertyMapEntry aDPDimensionMap_Impl[] =
{
@@ -2288,7 +2289,7 @@ void ScDPLevel::setShowEmpty(BOOL bSet)
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScDPLevel::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static SfxItemPropertyMapEntry aDPLevelMap_Impl[] =
{
@@ -2793,7 +2794,7 @@ void ScDPMember::setPosition(sal_Int32 nNew)
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScDPMember::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static SfxItemPropertyMapEntry aDPMemberMap_Impl[] =
{
@@ -2907,3 +2908,4 @@ const ScDPItemData* ScDPMembers::GetSrcItemDataByIndex( SCROW nIndex)
}
// End Comments
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/drawpage.cxx b/sc/source/core/data/drawpage.cxx
index 715b99f362a1..541318df0c8c 100644
--- a/sc/source/core/data/drawpage.cxx
+++ b/sc/source/core/data/drawpage.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,3 +64,4 @@ __EXPORT ScDrawPage::~ScDrawPage()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index ffe012b23c57..31b2291c1ef8 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -334,11 +335,11 @@ void ScDrawLayer::UseHyphenator()
}
}
-SdrPage* __EXPORT ScDrawLayer::AllocPage(FASTBOOL bMasterPage)
+SdrPage* __EXPORT ScDrawLayer::AllocPage(bool bMasterPage)
{
// don't create basic until it is needed
StarBASIC* pBasic = NULL;
- ScDrawPage* pPage = new ScDrawPage( *this, pBasic, sal::static_int_cast<BOOL>(bMasterPage) );
+ ScDrawPage* pPage = new ScDrawPage( *this, pBasic, bMasterPage);
return pPage;
}
@@ -1199,44 +1200,6 @@ BOOL ScDrawLayer::HasObjectsInRows( SCTAB nTab, SCROW nStartRow, SCROW nEndRow )
return bFound;
}
-#if 0
-void ScDrawLayer::DeleteObjects( SCTAB nTab )
-{
- SdrPage* pPage = GetPage(static_cast<sal_uInt16>(nTab));
- DBG_ASSERT(pPage,"Page ?");
- if (!pPage)
- return;
-
- pPage->RecalcObjOrdNums();
-
- long nDelCount = 0;
- ULONG nObjCount = pPage->GetObjCount();
- if (nObjCount)
- {
- SdrObject** ppObj = new SdrObject*[nObjCount];
-
- SdrObjListIter aIter( *pPage, IM_FLAT );
- SdrObject* pObject = aIter.Next();
- while (pObject)
- {
- // alle loeschen
- ppObj[nDelCount++] = pObject;
- pObject = aIter.Next();
- }
-
- long i;
- if (bRecording)
- for (i=1; i<=nDelCount; i++)
- AddCalcUndo( new SdrUndoRemoveObj( *ppObj[nDelCount-i] ) );
-
- for (i=1; i<=nDelCount; i++)
- pPage->RemoveObject( ppObj[nDelCount-i]->GetOrdNum() );
-
- delete[] ppObj;
- }
-}
-#endif
-
void ScDrawLayer::DeleteObjectsInArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1,
SCCOL nCol2,SCROW nRow2 )
{
@@ -2117,3 +2080,5 @@ SdrLayerID __EXPORT ScDrawLayer::GetControlExportLayerId( const SdrObject & ) co
return xRet;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx
index 99da4979a1b6..9715c7f69833 100644
--- a/sc/source/core/data/fillinfo.cxx
+++ b/sc/source/core/data/fillinfo.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1077,3 +1078,4 @@ ScTableInfo::~ScTableInfo()
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index a8fba9574049..0ceb96f85c4d 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1990,3 +1991,4 @@ IntlWrapper* ScGlobal::GetScIntlWrapper()
return pLocale;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/global2.cxx b/sc/source/core/data/global2.cxx
index 9aa5851dfca0..c9aaff566b15 100644
--- a/sc/source/core/data/global2.cxx
+++ b/sc/source/core/data/global2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -892,3 +893,4 @@ String ScGlobal::GetDocTabName( const String& rFileName,
return aDocTab;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/globalx.cxx b/sc/source/core/data/globalx.cxx
index 2accdadeb781..be5cf810a967 100644
--- a/sc/source/core/data/globalx.cxx
+++ b/sc/source/core/data/globalx.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -169,3 +170,5 @@ String ScGlobal::GetOrdinalSuffix( sal_Int32 nNumber)
}
return String();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/makefile.mk b/sc/source/core/data/makefile.mk
index 9041e1c3696d..f3b3a357ade3 100644
--- a/sc/source/core/data/makefile.mk
+++ b/sc/source/core/data/makefile.mk
@@ -38,9 +38,7 @@ AUTOSEG=true
# --- Settings -----------------------------------------------------
-.INCLUDE : scpre.mk
.INCLUDE : settings.mk
-.INCLUDE : sc.mk
.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files --------------------------------------------------------
diff --git a/sc/source/core/data/markarr.cxx b/sc/source/core/data/markarr.cxx
index 0550309f4eb1..b5b20084fc6d 100644
--- a/sc/source/core/data/markarr.cxx
+++ b/sc/source/core/data/markarr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -403,3 +404,4 @@ BOOL ScMarkArrayIter::Next( SCROW& rTop, SCROW& rBottom )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/markdata.cxx b/sc/source/core/data/markdata.cxx
index 4401ac19d199..e9486e7705b0 100644
--- a/sc/source/core/data/markdata.cxx
+++ b/sc/source/core/data/markdata.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -606,3 +607,4 @@ void ScMarkData::DeleteTab( SCTAB nTab )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/olinetab.cxx b/sc/source/core/data/olinetab.cxx
index af444c4b2123..19706ce86c0f 100644
--- a/sc/source/core/data/olinetab.cxx
+++ b/sc/source/core/data/olinetab.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -804,3 +805,4 @@ void ScSubOutlineIterator::DeleteLast()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/pagepar.cxx b/sc/source/core/data/pagepar.cxx
index 318f5c19501b..03ca4060d49b 100644
--- a/sc/source/core/data/pagepar.cxx
+++ b/sc/source/core/data/pagepar.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -120,3 +121,5 @@ BOOL ScPageAreaParam::operator==( const ScPageAreaParam& r ) const
return bEqual;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index 2d8c2f6bf8d3..eef90c7df8df 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1336,3 +1337,4 @@ BYTE ScPatternAttr::GetRotateDir( const SfxItemSet* pCondSet ) const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/pivot2.cxx b/sc/source/core/data/pivot2.cxx
index 8bb32a4c8386..dd9980340cda 100644
--- a/sc/source/core/data/pivot2.cxx
+++ b/sc/source/core/data/pivot2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -118,3 +119,4 @@ ScDPFuncData::ScDPFuncData( short nCol, USHORT nFuncMask, const DataPilotFieldRe
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/poolhelp.cxx b/sc/source/core/data/poolhelp.cxx
index 010cc502798b..99e22727bd89 100644
--- a/sc/source/core/data/poolhelp.cxx
+++ b/sc/source/core/data/poolhelp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -126,3 +127,4 @@ void ScPoolHelper::SourceDocumentGone()
// -----------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index a4bc9a473768..a80567b3c302 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -918,3 +919,5 @@ ScPostIt* ScNoteUtil::CreateNoteFromString(
}
// ============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/scdpoutputimpl.cxx b/sc/source/core/data/scdpoutputimpl.cxx
index 6a667806e097..0ca69195dd63 100644
--- a/sc/source/core/data/scdpoutputimpl.cxx
+++ b/sc/source/core/data/scdpoutputimpl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -185,3 +186,5 @@ void OutputImpl::OutputBlockFrame ( SCCOL nStartCol, SCROW nStartRow, SCCOL nEnd
mpDoc->ApplyFrameAreaTab( ScRange( nStartCol, nStartRow, mnTab, nEndCol, nEndRow , mnTab ), &aBox, &aBoxInfo );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/scdpoutputimpl.hxx b/sc/source/core/data/scdpoutputimpl.hxx
index 9148fe91ba02..1ccf002efa58 100644
--- a/sc/source/core/data/scdpoutputimpl.hxx
+++ b/sc/source/core/data/scdpoutputimpl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -77,3 +78,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/segmenttree.cxx b/sc/source/core/data/segmenttree.cxx
index 86b53582d1d4..dd40e726fd9e 100644
--- a/sc/source/core/data/segmenttree.cxx
+++ b/sc/source/core/data/segmenttree.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -580,3 +581,4 @@ void ScFlatUInt16RowSegments::setInsertFromBack(bool bInsertFromBack)
mpImpl->setInsertFromBack(bInsertFromBack);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/sheetevents.cxx b/sc/source/core/data/sheetevents.cxx
index e1875b5db15b..d1df2bb04df6 100644
--- a/sc/source/core/data/sheetevents.cxx
+++ b/sc/source/core/data/sheetevents.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -170,3 +171,4 @@ void ScSheetEvents::SetScript(sal_Int32 nEvent, const rtl::OUString* pNew)
mpScriptNames[nEvent] = NULL;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/sortparam.cxx b/sc/source/core/data/sortparam.cxx
index a3f6fe91133a..00f9bc6386a0 100644
--- a/sc/source/core/data/sortparam.cxx
+++ b/sc/source/core/data/sortparam.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,7 +53,8 @@ ScSortParam::ScSortParam( const ScSortParam& r ) :
bUserDef(r.bUserDef),nUserIndex(r.nUserIndex),bIncludePattern(r.bIncludePattern),
bInplace(r.bInplace),
nDestTab(r.nDestTab),nDestCol(r.nDestCol),nDestRow(r.nDestRow),
- aCollatorLocale( r.aCollatorLocale ), aCollatorAlgorithm( r.aCollatorAlgorithm )
+ aCollatorLocale( r.aCollatorLocale ), aCollatorAlgorithm( r.aCollatorAlgorithm ),
+ nCompatHeader( r.nCompatHeader )
{
for (USHORT i=0; i<MAXSORT; i++)
{
@@ -93,9 +95,9 @@ ScSortParam& ScSortParam::operator=( const ScSortParam& r )
nCol2 = r.nCol2;
nRow2 = r.nRow2;
bHasHeader = r.bHasHeader;
+ bByRow = r.bByRow;
bCaseSens = r.bCaseSens;
bNaturalSort = r.bNaturalSort;
- bByRow = r.bByRow;
bUserDef = r.bUserDef;
nUserIndex = r.nUserIndex;
bIncludePattern = r.bIncludePattern;
@@ -105,6 +107,7 @@ ScSortParam& ScSortParam::operator=( const ScSortParam& r )
nDestRow = r.nDestRow;
aCollatorLocale = r.aCollatorLocale;
aCollatorAlgorithm = r.aCollatorAlgorithm;
+ nCompatHeader = r.nCompatHeader;
for (USHORT i=0; i<MAXSORT; i++)
{
@@ -163,11 +166,12 @@ BOOL ScSortParam::operator==( const ScSortParam& rOther ) const
ScSortParam::ScSortParam( const ScSubTotalParam& rSub, const ScSortParam& rOld ) :
nCol1(rSub.nCol1),nRow1(rSub.nRow1),nCol2(rSub.nCol2),nRow2(rSub.nRow2),
- bHasHeader(TRUE),bByRow(TRUE),bCaseSens(rSub.bCaseSens),
+ bHasHeader(TRUE),bByRow(TRUE),bCaseSens(rSub.bCaseSens),bNaturalSort(rOld.bNaturalSort),
bUserDef(rSub.bUserDef),nUserIndex(rSub.nUserIndex),bIncludePattern(rSub.bIncludePattern),
bInplace(TRUE),
nDestTab(0),nDestCol(0),nDestRow(0),
- aCollatorLocale( rOld.aCollatorLocale ), aCollatorAlgorithm( rOld.aCollatorAlgorithm )
+ aCollatorLocale( rOld.aCollatorLocale ), aCollatorAlgorithm( rOld.aCollatorAlgorithm ),
+ nCompatHeader( rOld.nCompatHeader )
{
USHORT nNewCount = 0;
USHORT i;
@@ -220,10 +224,11 @@ ScSortParam::ScSortParam( const ScSubTotalParam& rSub, const ScSortParam& rOld )
ScSortParam::ScSortParam( const ScQueryParam& rParam, SCCOL nCol ) :
nCol1(nCol),nRow1(rParam.nRow1),nCol2(nCol),nRow2(rParam.nRow2),
bHasHeader(rParam.bHasHeader),bByRow(TRUE),bCaseSens(rParam.bCaseSens),
+ bNaturalSort(FALSE),
//! TODO: what about Locale and Algorithm?
bUserDef(FALSE),nUserIndex(0),bIncludePattern(FALSE),
bInplace(TRUE),
- nDestTab(0),nDestCol(0),nDestRow(0)
+ nDestTab(0),nDestCol(0),nDestRow(0), nCompatHeader(2)
{
bDoSort[0] = TRUE;
nField[0] = nCol;
@@ -263,3 +268,4 @@ void ScSortParam::MoveToDest()
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx
index f8ef7ec8de65..c391f09b1380 100644
--- a/sc/source/core/data/stlpool.cxx
+++ b/sc/source/core/data/stlpool.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -525,3 +526,4 @@ ScStyleSheet* ScStyleSheetPool::FindCaseIns( const String& rName, SfxStyleFamily
return NULL;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/stlsheet.cxx b/sc/source/core/data/stlsheet.cxx
index a3319eafd3fd..c77fc710b325 100644
--- a/sc/source/core/data/stlsheet.cxx
+++ b/sc/source/core/data/stlsheet.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -344,3 +345,4 @@ BOOL ScStyleSheet::SetName( const String& rNew )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/tabbgcolor.cxx b/sc/source/core/data/tabbgcolor.cxx
index a3d9eec16d99..5e8479d4bdd6 100644
--- a/sc/source/core/data/tabbgcolor.cxx
+++ b/sc/source/core/data/tabbgcolor.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,3 +61,5 @@ ScUndoTabColorInfo::ScUndoTabColorInfo(const ScUndoTabColorInfo& r) :
maNewTabBgColor(r.maNewTabBgColor)
{
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 010f344df3ca..d4dd2026a019 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1811,3 +1812,4 @@ SCROW ScTable::VisibleDataCellIterator::getRow() const
return mnCurRow;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 598be4ee92fc..bb4fbb0f4d85 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -2248,7 +2249,9 @@ BOOL ScTable::SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, USHORT nNewHeig
{
if (pDrawLayer)
{
- unsigned long nOldHeights = GetRowHeight(nStartRow, nEndRow);
+ // #i115025# When comparing to nNewHeight for the whole range, the height
+ // including hidden rows has to be used (same behavior as 3.2).
+ unsigned long nOldHeights = mpRowHeights->getSumValue(nStartRow, nEndRow);
// FIXME: should we test for overflows?
long nHeightDif = (long) (unsigned long) nNewHeight *
(nEndRow - nStartRow + 1) - nOldHeights;
@@ -3173,3 +3176,4 @@ ULONG ScTable::GetColOffset( SCCOL nCol ) const
return n;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 449edcd1c61f..48035ec5b655 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -2109,3 +2110,4 @@ void ScTable::FindConditionalFormat( ULONG nKey, ScRangeList& rList )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index 9cbcb3970196..42b655532757 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -460,13 +461,7 @@ void ScTable::FillFormula(ULONG& /* nFormulaCounter */, BOOL /* bFirst */, ScFor
ScAddress aAddr( nDestCol, nDestRow, nTab );
ScFormulaCell* pDestCell = new ScFormulaCell( *pSrcCell, *pDocument, aAddr );
aCol[nDestCol].Insert(nDestRow, pDestCell);
-#if 0
-// mit RelRefs unnoetig
- pDestCell->UpdateReference(URM_COPY,
- ScRange( aAddr, aAddr ),
- nDestCol - pSrcCell->aPos.Col(),
- nDestRow - pSrcCell->aPos.Row(), 0);
-#endif
+
if ( bLast && pDestCell->GetMatrixFlag() )
{
ScAddress aOrg;
@@ -1984,3 +1979,4 @@ void ScTable::CompileColRowNameFormula()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx
index fc4f55e7d681..04c43a2eaf27 100644
--- a/sc/source/core/data/table5.cxx
+++ b/sc/source/core/data/table5.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1203,3 +1204,4 @@ void ScTable::InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress* p
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx
index 277dd99af763..b71d55aeebb6 100644
--- a/sc/source/core/data/table6.cxx
+++ b/sc/source/core/data/table6.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1042,3 +1043,5 @@ bool ScTable::SearchRangeForAllEmptyCells(
}
return bFound;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/tabprotection.cxx b/sc/source/core/data/tabprotection.cxx
index 44fde303ab62..c53c74b6fa2d 100644
--- a/sc/source/core/data/tabprotection.cxx
+++ b/sc/source/core/data/tabprotection.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -522,3 +523,4 @@ void ScTableProtection::setOption(Option eOption, bool bEnabled)
mpImpl->setOption(eOption, bEnabled);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/userdat.cxx b/sc/source/core/data/userdat.cxx
index 466e83b15fad..443d056a77f7 100644
--- a/sc/source/core/data/userdat.cxx
+++ b/sc/source/core/data/userdat.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -125,3 +126,4 @@ SdrObjUserData* ScMacroInfo::Clone( SdrObject* /*pObj*/ ) const
return new ScMacroInfo( *this );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index 2239b1d0f773..1891c3a92b23 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -297,16 +298,6 @@ BOOL ScValidationData::DoMacro( const ScAddress& rPos, const String& rInput,
// keine Sicherheitsabfrage mehr vorneweg (nur CheckMacroWarn), das passiert im CallBasic
-#if 0
- // Makro-Name liegt in folgender Form vor:
- // "Macroname.Modulname.Libname.Dokumentname" oder
- // "Macroname.Modulname.Libname.Applikationsname"
- String aMacroName = aErrorTitle.GetToken(0, '.');
- String aModulName = aErrorTitle.GetToken(1, '.');
- String aLibName = aErrorTitle.GetToken(2, '.');
- String aDocName = aErrorTitle.GetToken(3, '.');
-#endif
-
// Funktion ueber den einfachen Namen suchen,
// dann aBasicStr, aMacroStr fuer SfxObjectShell::CallBasic zusammenbauen
@@ -994,3 +985,4 @@ BOOL ScValidationDataList::operator==( const ScValidationDataList& r ) const
return bEqual;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/inc/addinhelpid.hxx b/sc/source/core/inc/addinhelpid.hxx
index b2f085ed64e5..6618c97b6dc9 100644
--- a/sc/source/core/inc/addinhelpid.hxx
+++ b/sc/source/core/inc/addinhelpid.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -58,3 +59,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/inc/addinlis.hxx b/sc/source/core/inc/addinlis.hxx
index 6c0f98386920..122d347fa98f 100644
--- a/sc/source/core/inc/addinlis.hxx
+++ b/sc/source/core/inc/addinlis.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -96,3 +97,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/inc/adiasync.hxx b/sc/source/core/inc/adiasync.hxx
index 4d0997fce63d..69896c08160a 100644
--- a/sc/source/core/inc/adiasync.hxx
+++ b/sc/source/core/inc/adiasync.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -90,3 +91,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/inc/bcaslot.hxx b/sc/source/core/inc/bcaslot.hxx
index 13384b033628..41d21243f237 100644
--- a/sc/source/core/inc/bcaslot.hxx
+++ b/sc/source/core/inc/bcaslot.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -304,3 +305,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/inc/cellkeytranslator.hxx b/sc/source/core/inc/cellkeytranslator.hxx
index 536e521a78da..cc496845020c 100644
--- a/sc/source/core/inc/cellkeytranslator.hxx
+++ b/sc/source/core/inc/cellkeytranslator.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -89,3 +90,5 @@ private:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/inc/core_pch.hxx b/sc/source/core/inc/core_pch.hxx
index dea401d7e167..1bf84a913c30 100644
--- a/sc/source/core/inc/core_pch.hxx
+++ b/sc/source/core/inc/core_pch.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -241,3 +242,4 @@
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/inc/ddelink.hxx b/sc/source/core/inc/ddelink.hxx
index 4f0652753e65..89127e4dfba0 100644
--- a/sc/source/core/inc/ddelink.hxx
+++ b/sc/source/core/inc/ddelink.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -97,3 +98,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/inc/doubleref.hxx b/sc/source/core/inc/doubleref.hxx
index 10221d942c9c..74094240d218 100644
--- a/sc/source/core/inc/doubleref.hxx
+++ b/sc/source/core/inc/doubleref.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -191,3 +192,5 @@ private:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index 98c6afbe466c..f356dbeeec71 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -92,12 +93,12 @@ public:
};
enum ScIterFunc {
- ifSUM, // Aufsummieren
- ifSUMSQ, // Quadratsummen
- ifPRODUCT, // Multiplizieren
- ifAVERAGE, // Durchschnitt
- ifCOUNT, // Anzahl Werte
- ifCOUNT2, // Anzahl Werte (nichtleer)
+ ifSUM, // Add up
+ ifSUMSQ, // Sums of squares
+ ifPRODUCT, // Product
+ ifAVERAGE, // Average
+ ifCOUNT, // Count Values
+ ifCOUNT2, // Count Values (not empty)
ifMIN, // Minimum
ifMAX // Maximum
};
@@ -135,6 +136,15 @@ public:
static inline double div( const double& fNumerator, const double& fDenominator );
ScMatrixRef GetNewMat(SCSIZE nC, SCSIZE nR);
+
+ enum VolatileType {
+ VOLATILE,
+ VOLATILE_MACRO,
+ NOT_VOLATILE
+ };
+
+ VolatileType GetVolatileType() const;
+
private:
static ScTokenStack* pGlobalStack;
static BOOL bGlobalStackInUse;
@@ -169,6 +179,8 @@ private:
BOOL bCalcAsShown; // precision as shown
BOOL bMatrixFormula; // formula cell is a matrix formula
+ VolatileType meVolaileType;
+
//---------------------------------Funktionen in interpre.cxx---------
// nMust <= nAct <= nMax ? ok : PushError
inline BOOL MustHaveParamCount( short nAct, short nMust );
@@ -314,6 +326,7 @@ inline void MatrixDoubleRefToMatrix(); // if MatrixFormula: PopDoubleRefPus
// If MatrixFormula or ForceArray: ConvertMatrixParameters()
inline bool MatrixParameterConversion();
ScMatrixRef PopMatrix();
+void QueryMatrixType(ScMatrixRef& xMat, short& rRetTypeExpr, ULONG& rRetIndexExpr);
//void PushByte(BYTE nVal);
void PushDouble(double nVal);
void PushInt( int nVal );
@@ -915,3 +928,5 @@ inline double ScInterpreter::div( const double& fNumerator, const double& fDenom
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/inc/jumpmatrix.hxx b/sc/source/core/inc/jumpmatrix.hxx
index 8089d6653730..d5e3703227fe 100644
--- a/sc/source/core/inc/jumpmatrix.hxx
+++ b/sc/source/core/inc/jumpmatrix.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -220,3 +221,4 @@ public:
#endif // SC_JUMPMATRIX_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/inc/parclass.hxx b/sc/source/core/inc/parclass.hxx
index 39844de7ae22..de2fba3fb694 100644
--- a/sc/source/core/inc/parclass.hxx
+++ b/sc/source/core/inc/parclass.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -178,3 +179,4 @@ private:
#endif // SC_PARCLASS_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/inc/poolhelp.hxx b/sc/source/core/inc/poolhelp.hxx
index f98963513c59..2b3946f8ddcf 100644
--- a/sc/source/core/inc/poolhelp.hxx
+++ b/sc/source/core/inc/poolhelp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,7 @@
#define SC_POOLHELP_HXX
#include <rtl/ref.hxx>
-#include <vos/refernce.hxx>
+#include <salhelper/simplereferenceobject.hxx>
#include <tools/link.hxx>
#include "docoptio.hxx"
@@ -40,7 +41,7 @@ class SvNumberFormatter;
class SfxItemPool;
-class ScPoolHelper : public vos::OReference
+class ScPoolHelper : public salhelper::SimpleReferenceObject
{
private:
ScDocOptions aOpt;
@@ -72,3 +73,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/inc/refupdat.hxx b/sc/source/core/inc/refupdat.hxx
index 17da3bf5e635..1ecae5f11d1f 100644
--- a/sc/source/core/inc/refupdat.hxx
+++ b/sc/source/core/inc/refupdat.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -98,3 +99,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/inc/scrdata.hxx b/sc/source/core/inc/scrdata.hxx
index b569bddddd6b..7a10045fda26 100644
--- a/sc/source/core/inc/scrdata.hxx
+++ b/sc/source/core/inc/scrdata.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,3 +48,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/src/makefile.mk b/sc/source/core/src/makefile.mk
index 13d0c2127c6d..10da79821c74 100644
--- a/sc/source/core/src/makefile.mk
+++ b/sc/source/core/src/makefile.mk
@@ -33,9 +33,7 @@ TARGET=core
# --- Settings -----------------------------------------------------
-.INCLUDE : scpre.mk
.INCLUDE : settings.mk
-.INCLUDE : sc.mk
# --- Files --------------------------------------------------------
diff --git a/sc/source/core/tool/addincfg.cxx b/sc/source/core/tool/addincfg.cxx
index c76b60eae077..92017aad9f82 100644
--- a/sc/source/core/tool/addincfg.cxx
+++ b/sc/source/core/tool/addincfg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -70,3 +71,4 @@ void ScAddInCfg::Notify( const uno::Sequence<rtl::OUString>& )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx
index 07b79c11b373..f7e39adfd72a 100644
--- a/sc/source/core/tool/addincol.cxx
+++ b/sc/source/core/tool/addincol.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,7 +35,6 @@
#include <tools/debug.hxx>
#include <i18npool/mslangid.hxx>
#include <vcl/svapp.hxx>
-#include <vos/xception.hxx>
#include <sfx2/objsh.hxx>
#include <unotools/charclass.hxx>
@@ -1227,14 +1227,6 @@ String ScUnoAddInCollection::FindFunction( const String& rUpperName, BOOL bLocal
ScAddInHashMap::const_iterator iLook( pLocalHashMap->find( rUpperName ) );
if ( iLook != pLocalHashMap->end() )
return iLook->second->GetOriginalName();
-
-#if 0
- // after that, scan international names (really?)
-
- iLook = pNameHashMap->find( rUpperName );
- if ( iLook != pNameHashMap->end() )
- return iLook->second->GetOriginalName();
-#endif
}
else
{
@@ -1572,12 +1564,7 @@ void ScUnoAddInCall::ExecuteCallWithArgs(uno::Sequence<uno::Any>& rCallArgs)
{
nErrCode = errIllegalArgument;
}
-#if 0
- catch(FloatingPointException&)
- {
- nErrCode = errIllegalFPOperation;
- }
-#endif
+
catch(reflection::InvocationTargetException& rWrapped)
{
if ( rWrapped.TargetException.getValueType().equals(
@@ -1800,3 +1787,4 @@ void ScUnoAddInCall::SetResult( const uno::Any& rNewRes )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/addinhelpid.cxx b/sc/source/core/tool/addinhelpid.cxx
index bb51fb174fc2..9ed593f58cde 100644
--- a/sc/source/core/tool/addinhelpid.cxx
+++ b/sc/source/core/tool/addinhelpid.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -210,3 +211,4 @@ sal_uInt16 ScUnoAddInHelpIdGenerator::GetHelpId( const ::rtl::OUString& rFuncNam
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/addinlis.cxx b/sc/source/core/tool/addinlis.cxx
index ad6b60073ccb..4133e1f4dd9e 100644
--- a/sc/source/core/tool/addinlis.cxx
+++ b/sc/source/core/tool/addinlis.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,13 +33,13 @@
#include <tools/debug.hxx>
#include <sfx2/objsh.hxx>
+#include <vcl/svapp.hxx>
#include "addinlis.hxx"
#include "miscuno.hxx" // SC_IMPL_SERVICE_INFO
#include "document.hxx"
#include "brdcst.hxx"
-#include "unoguard.hxx"
#include "sc.hrc"
using namespace com::sun::star;
@@ -135,24 +136,10 @@ void ScAddInListener::RemoveDocument( ScDocument* pDocumentP )
void SAL_CALL ScAddInListener::modified( const ::com::sun::star::sheet::ResultEvent& aEvent )
throw(::com::sun::star::uno::RuntimeException)
{
- ScUnoGuard aGuard; //! or generate a UserEvent
+ SolarMutexGuard aGuard; //! or generate a UserEvent
aResult = aEvent.Value; // store result
- if ( !HasListeners() )
- {
- //! remove from list and removeListener, as in RemoveDocument ???
-
-#if 0
- //! this will crash if called before first StartListening !!!
- aAllListeners.Remove( this );
- if ( xVolRes.is() )
- xVolRes->removeResultListener( this );
- release(); // Ref for aAllListeners - this may be deleted here
- return;
-#endif
- }
-
// notify document of changes
Broadcast( ScHint( SC_HINT_DATACHANGED, ScAddress(), NULL ) );
@@ -188,3 +175,4 @@ void SAL_CALL ScAddInListener::disposing( const ::com::sun::star::lang::EventObj
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index 5e0327e06c91..f09812526a0c 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -631,13 +632,6 @@ lcl_ScRange_Parse_XL_R1C1( ScRange& r,
// Keep in mind that nFlags2 gets left-shifted by 4 bits before being merged.
USHORT nFlags2 = SCA_VALID_TAB;
-#if 0
- {
- ByteString aStr(p, RTL_TEXTENCODING_UTF8);
- aStr.Append(static_cast< char >(0));
- std::cerr << "parse::XL::R1C1 \'" << aStr.GetBuffer() << '\'' << std::endl;
- }
-#endif
p = r.Parse_XL_Header( p, pDoc, aExternDocName, aStartTabName,
aEndTabName, nFlags, bOnlyAcceptSingle, NULL );
@@ -813,13 +807,6 @@ lcl_ScRange_Parse_XL_A1( ScRange& r,
String aExternDocName, aStartTabName, aEndTabName; // for external link table
USHORT nFlags = SCA_VALID | SCA_VALID_TAB, nFlags2 = SCA_VALID_TAB;
-#if 0
- {
- ByteString aStr(p, RTL_TEXTENCODING_UTF8);
- aStr.Append(static_cast< char >(0));
- std::cerr << "parse::XL::A1 \'" << aStr.GetBuffer() << '\'' << std::endl;
- }
-#endif
p = r.Parse_XL_Header( p, pDoc, aExternDocName, aStartTabName,
aEndTabName, nFlags, bOnlyAcceptSingle, pExternalLinks );
@@ -1378,7 +1365,7 @@ lcl_ScRange_Parse_OOo( ScRange &aRange, const String& r, ScDocument* pDoc, ScAdd
}
nRes1 = ( ( nRes1 | nRes2 ) & SCA_VALID )
| nRes1
- | ( ( nRes2 & 0x070F ) << 4 );
+ | ( ( nRes2 & SCA_BITS ) << 4 );
return nRes1;
}
@@ -1621,13 +1608,6 @@ getFileNameFromDoc( const ScDocument* pDoc )
sFileName = pShell->GetTitle();
}
}
-#if 0
- {
- ByteString aStr( sFileName, RTL_TEXTENCODING_UTF8 );
- aStr.Append(static_cast< char >(0));
- std::cerr << "docname \'" << aStr.GetBuffer() << '\'' << std::endl;
- }
-#endif
return sFileName;
}
@@ -1725,13 +1705,6 @@ lcl_Split_DocTab( const ScDocument* pDoc, SCTAB nTab,
{
pDoc->GetName( nTab, rTabName );
rDocName.Erase();
-#if 0
- {
- ByteString aStr(rTabName, RTL_TEXTENCODING_UTF8);
- aStr.Append(static_cast< char >(0));
- std::cerr << "tabname \'" << aStr.GetBuffer() << '\'' << std::endl;
- }
-#endif
// External reference, same as in ScCompiler::MakeTabStr()
if ( rTabName.GetChar(0) == '\'' )
{ // "'Doc'#Tab"
@@ -2031,3 +2004,5 @@ bool AlphaToCol( SCCOL& rCol, const String& rStr)
rCol = nResult;
return bOk;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/adiasync.cxx b/sc/source/core/tool/adiasync.cxx
index 4f19a043a34d..823dcb597b7f 100644
--- a/sc/source/core/tool/adiasync.cxx
+++ b/sc/source/core/tool/adiasync.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -185,3 +186,4 @@ void ScAddInAsync::RemoveDocument( ScDocument* pDocumentP )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/appoptio.cxx b/sc/source/core/tool/appoptio.cxx
index 857efd972886..be483c8bf574 100644
--- a/sc/source/core/tool/appoptio.cxx
+++ b/sc/source/core/tool/appoptio.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -82,6 +83,9 @@ ScAppOptions::~ScAppOptions()
void ScAppOptions::SetDefaults()
{
+ // Set default tab count for new spreadsheet.
+ nTabCountInNewSpreadsheet = 3;
+
if ( ScOptionsUtil::IsMetricSystem() )
eMetric = FUNIT_CM; // default for countries with metric system
else
@@ -119,6 +123,7 @@ void ScAppOptions::SetDefaults()
const ScAppOptions& ScAppOptions::operator=( const ScAppOptions& rCpy )
{
+ nTabCountInNewSpreadsheet = rCpy.nTabCountInNewSpreadsheet;
eMetric = rCpy.eMetric;
eZoomType = rCpy.eZoomType;
bSynchronizeZoom = rCpy.bSynchronizeZoom;
@@ -743,3 +748,4 @@ void ScAppCfg::OptionsChanged()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index 5a7f117e75d9..bf89efebeaa5 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -869,31 +870,6 @@ BOOL ScAutoFormatData::Save(SvStream& rStream)
// --- from 680/dr25 on: #21549# store strings as UTF-8
rStream.WriteByteString( aName, RTL_TEXTENCODING_UTF8 );
-#if 0
- // This was an internal flag to allow creating AutoFormats with localized names
-
- if ( USHRT_MAX == nStrResId )
- {
- String aIniVal( SFX_APP()->GetIniManager()->Get(
- SFX_GROUP_WORKINGSET_IMPL,
- String( RTL_CONSTASCII_USTRINGPARAM( "SaveTableAutoFmtNameId" ))));
- if( 0 != aIniVal.ToInt32() )
- {
- // check Name for ResId
- for( USHORT nId = RID_SVXSTR_TBLAFMT_BEGIN;
- RID_SVXSTR_TBLAFMT_END > nId; ++nId )
- {
- String s( SVX_RES( nId ) );
- if( s == aName )
- {
- nStrResId = nId - RID_SVXSTR_TBLAFMT_BEGIN;
- break;
- }
- }
- }
- }
-#endif
-
rStream << nStrResId;
rStream << ( b = bIncludeFont );
rStream << ( b = bIncludeJustify );
@@ -1198,3 +1174,4 @@ USHORT ScAutoFormat::FindIndexPerName( const String& rName ) const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/callform.cxx b/sc/source/core/tool/callform.cxx
index e8e2b28f3f8e..0c3c7e8b20b3 100644
--- a/sc/source/core/tool/callform.cxx
+++ b/sc/source/core/tool/callform.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -467,3 +468,4 @@ BOOL FuncData::GetParamDesc( String& aName, String& aDesc, USHORT nParam )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/cellform.cxx b/sc/source/core/tool/cellform.cxx
index 45d2c4a890bb..62e00a15d9d6 100644
--- a/sc/source/core/tool/cellform.cxx
+++ b/sc/source/core/tool/cellform.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -106,12 +107,12 @@ void ScCellFormat::GetString( ScBaseCell* pCell, ULONG nFormat, String& rString,
pFCell->GetFormula( rString );
else
{
- // #62160# Ein via Interpreter gestartetes Makro, das hart
- // auf Formelzellen zugreift, bekommt einen CellText, auch
- // wenn dadurch ein weiterer Interpreter gestartet wird,
- // aber nicht wenn diese Zelle gerade interpretiert wird.
- // IdleCalc startet generell keine weiteren Interpreter,
- // um keine Err522 (zirkulaer) zu bekommen.
+ // #62160# A macro started from the interpreter, which has
+ // access to Formular Cells, becomes a CellText, even if
+ // that triggers further interpretation, except if those
+ // cells are already being interpreted.
+ // IdleCalc generally doesn't trigger futher interpretation,
+ // as not to get Err522 (circular).
if ( pFCell->GetDocument()->IsInInterpreter() &&
(!pFCell->GetDocument()->GetMacroInterpretLevel()
|| pFCell->IsRunning()) )
@@ -122,7 +123,7 @@ void ScCellFormat::GetString( ScBaseCell* pCell, ULONG nFormat, String& rString,
{
USHORT nErrCode = pFCell->GetErrCode();
- // erst nach dem Interpretieren (GetErrCode) das Zahlformat holen:
+ // get the number format only after interpretation (GetErrCode):
if ( (nFormat % SV_COUNTRY_LANGUAGE_OFFSET) == 0 )
nFormat = pFCell->GetStandardFormat( rFormatter,
nFormat );
@@ -214,3 +215,4 @@ void ScCellFormat::GetInputString( ScBaseCell* pCell, ULONG nFormat, String& rSt
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/cellkeytranslator.cxx b/sc/source/core/tool/cellkeytranslator.cxx
index 4db8c22d19d8..466457cf5651 100644
--- a/sc/source/core/tool/cellkeytranslator.cxx
+++ b/sc/source/core/tool/cellkeytranslator.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -230,3 +231,5 @@ void ScCellKeywordTranslator::addToMap(const TransItem* pItems, const Locale& rL
for (sal_uInt16 i = 0; pItems[i].from != NULL; ++i)
addToMap(String(pItems[i].from), pItems[i].to, rLocale, pItems[i].func);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/chartarr.cxx b/sc/source/core/tool/chartarr.cxx
index 573763141b18..691e05d6d0e1 100644
--- a/sc/source/core/tool/chartarr.cxx
+++ b/sc/source/core/tool/chartarr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -613,3 +614,4 @@ BOOL ScChartCollection::operator==(const ScChartCollection& rCmp) const
return TRUE;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/charthelper.cxx b/sc/source/core/tool/charthelper.cxx
index 4c314ee37ff4..19b9e4099be3 100644
--- a/sc/source/core/tool/charthelper.cxx
+++ b/sc/source/core/tool/charthelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -294,3 +295,5 @@ void ScChartHelper::SetChartRanges( const uno::Reference< chart2::XChartDocument
if( xModel.is() )
xModel->unlockControllers();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/chartlis.cxx b/sc/source/core/tool/chartlis.cxx
index b729ce0b30b5..15489babda4f 100644
--- a/sc/source/core/tool/chartlis.cxx
+++ b/sc/source/core/tool/chartlis.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -734,3 +735,4 @@ void ScChartListenerCollection::EndListeningHiddenRange( ScChartHiddenRangeListe
maHiddenListeners.remove_if(MatchListener(pListener));
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/chartlock.cxx b/sc/source/core/tool/chartlock.cxx
index 54a49fb4b4aa..f73b74ff778c 100644
--- a/sc/source/core/tool/chartlock.cxx
+++ b/sc/source/core/tool/chartlock.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -193,3 +194,5 @@ IMPL_LINK( ScTemporaryChartLock, TimeoutHdl, Timer*, EMPTYARG )
mapScChartLockGuard.reset();
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/chartpos.cxx b/sc/source/core/tool/chartpos.cxx
index e36786955755..f8630df4a836 100644
--- a/sc/source/core/tool/chartpos.cxx
+++ b/sc/source/core/tool/chartpos.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -611,3 +612,5 @@ ScChartPositionMap::~ScChartPositionMap()
}
delete [] ppRowHeader;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index ba3f3e47bfb7..7ff7e4c17b49 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -4867,3 +4868,5 @@ String ScChangeTrack::ToString() const
return aReturn;
}
#endif // DEBUG_CHANGETRACK
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/chgviset.cxx b/sc/source/core/tool/chgviset.cxx
index ac587db2bd12..514336368797 100644
--- a/sc/source/core/tool/chgviset.cxx
+++ b/sc/source/core/tool/chgviset.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -142,22 +143,13 @@ void ScChangeViewSettings::AdjustDateMode( const ScDocument& rDoc )
if ( pLast )
{
aFirstDateTime = pLast->GetDateTime();
-#if 0
-// This would be the proper handling. But since the SvxTPFilter dialog uses
-// DateField/TimeField, and the filter dialog is used in ScAcceptChgDlg as the
-// controlling instance, and the TimeFields are used there without seconds or
-// 100ths, we'd display some extra entries between the floor of the minute and
-// the start of the next minute.
- // add one 100th second to point past last saved
- aFirstDateTime += Time( 0, 0, 0, 1 );
-#else
+
// Set the next minute as the start time and assume that
// the document isn't saved, reloaded, edited and filter set
// all together during the gap between those two times.
aFirstDateTime += Time( 0, 1 );
aFirstDateTime.SetSec(0);
aFirstDateTime.Set100Sec(0);
-#endif
}
}
if ( !pLast )
@@ -176,3 +168,4 @@ void ScChangeViewSettings::AdjustDateMode( const ScDocument& rDoc )
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/collect.cxx b/sc/source/core/tool/collect.cxx
index d1726d031e7d..1b929892bd1e 100644
--- a/sc/source/core/tool/collect.cxx
+++ b/sc/source/core/tool/collect.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -502,3 +503,4 @@ BOOL TypedScStrCollection::GetExactMatch( String& rString ) const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index c1d0b004bfc2..ee578a82a32a 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,6 +36,7 @@
#include <basic/sbmeth.hxx>
#include <basic/sbstar.hxx>
#include <svl/zforlist.hxx>
+#include <sal/macros.h>
#include <tools/rcid.h>
#include <tools/rc.hxx>
#include <tools/solar.h>
@@ -2538,7 +2540,7 @@ BOOL ScCompiler::IsOpCode( const String& rName, bool bInArray )
{ "LEGACY.TDIST", ocTDist }, // TDIST -> LEGACY.TDIST
{ "ORG.OPENOFFICE.EASTERSUNDAY", ocEasterSunday } // EASTERSUNDAY -> ORG.OPENOFFICE.EASTERSUNDAY
};
- static const size_t nOdffAliases = sizeof(aOdffAliases) / sizeof(aOdffAliases[0]);
+ static const size_t nOdffAliases = SAL_N_ELEMENTS(aOdffAliases);
for (size_t i=0; i<nOdffAliases; ++i)
{
if (rName.EqualsIgnoreCaseAscii( aOdffAliases[i].pName))
@@ -3566,11 +3568,6 @@ BOOL ScCompiler::NextNewToken( bool bInArray )
bool bAllowBooleans = bInArray;
xub_StrLen nSpaces = NextSymbol(bInArray);
-#if 0
- fprintf( stderr, "NextNewToken '%s' (spaces = %d)\n",
- rtl::OUStringToOString( cSymbol, RTL_TEXTENCODING_UTF8 ).getStr(), nSpaces );
-#endif
-
if (!cSymbol[0])
return false;
@@ -3644,11 +3641,6 @@ BOOL ScCompiler::NextNewToken( bool bInArray )
bMayBeFuncName = ( *p == '(' );
}
-#if 0
- fprintf( stderr, "Token '%s'\n",
- rtl::OUStringToOString( aUpper, RTL_TEXTENCODING_UTF8 ).getStr() );
-#endif
-
// #42016# Italian ARCTAN.2 resulted in #REF! => IsOpcode() before
// IsReference().
@@ -3749,11 +3741,6 @@ void ScCompiler::CreateStringFromXMLTokenArray( String& rFormula, String& rFormu
ScTokenArray* ScCompiler::CompileString( const String& rFormula )
{
-#if 0
- fprintf( stderr, "CompileString '%s'\n",
- rtl::OUStringToOString( rFormula, RTL_TEXTENCODING_UTF8 ).getStr() );
-#endif
-
OSL_ENSURE( meGrammar != FormulaGrammar::GRAM_EXTERNAL, "ScCompiler::CompileString - unexpected grammar GRAM_EXTERNAL" );
if( meGrammar == FormulaGrammar::GRAM_EXTERNAL )
SetGrammar( FormulaGrammar::GRAM_PODF );
@@ -5497,3 +5484,5 @@ FormulaTokenRef ScCompiler::ExtendRangeReference( FormulaToken & rTok1, FormulaT
{
return ScToken::ExtendRangeReference( rTok1, rTok2, aPos,bReuseDoubleRef );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/consoli.cxx b/sc/source/core/tool/consoli.cxx
index 916511414e94..006d1746501b 100644
--- a/sc/source/core/tool/consoli.cxx
+++ b/sc/source/core/tool/consoli.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -858,3 +859,4 @@ void ScConsData::OutputToDocument( ScDocument* pDestDoc, SCCOL nCol, SCROW nRow,
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/dbcolect.cxx b/sc/source/core/tool/dbcolect.cxx
index c9e926252be8..3bd737b2c572 100644
--- a/sc/source/core/tool/dbcolect.cxx
+++ b/sc/source/core/tool/dbcolect.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -895,3 +896,4 @@ BOOL ScDBCollection::Insert(ScDataObject* pScDataObject)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/ddelink.cxx b/sc/source/core/tool/ddelink.cxx
index 977161760eb0..00b97d430f0c 100644
--- a/sc/source/core/tool/ddelink.cxx
+++ b/sc/source/core/tool/ddelink.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -277,3 +278,4 @@ void ScDdeLink::TryUpdate()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/detdata.cxx b/sc/source/core/tool/detdata.cxx
index a1add9ca6939..075187105461 100644
--- a/sc/source/core/tool/detdata.cxx
+++ b/sc/source/core/tool/detdata.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -116,3 +117,4 @@ BOOL ScDetOpList::operator==( const ScDetOpList& r ) const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index 3774cbee7d06..3916e2e27de3 100644
--- a/sc/source/core/tool/detfunc.cxx
+++ b/sc/source/core/tool/detfunc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1762,3 +1763,4 @@ BOOL ScDetectiveFunc::IsColorsInitialized()
return bColorsInitialized;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/docoptio.cxx b/sc/source/core/tool/docoptio.cxx
index 23e193c556ad..e905cbe7f24d 100644
--- a/sc/source/core/tool/docoptio.cxx
+++ b/sc/source/core/tool/docoptio.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -91,6 +92,7 @@ ScDocOptions::ScDocOptions( const ScDocOptions& rCpy )
: fIterEps( rCpy.fIterEps ),
nIterCount( rCpy.nIterCount ),
nPrecStandardFormat( rCpy.nPrecStandardFormat ),
+ eKeyBindingType( rCpy.eKeyBindingType ),
nDay( rCpy.nDay ),
nMonth( rCpy.nMonth ),
nYear( rCpy.nYear ),
@@ -126,6 +128,7 @@ void ScDocOptions::ResetDocOptions()
nIterCount = 100;
fIterEps = 1.0E-3;
nPrecStandardFormat = SvNumberFormatter::UNLIMITED_PRECISION;
+ eKeyBindingType = ScOptionsUtil::KEY_DEFAULT;
nDay = 30;
nMonth = 12;
nYear = 1899;
@@ -283,6 +286,9 @@ SfxPoolItem* __EXPORT ScTpCalcItem::Clone( SfxItemPool * ) const
#define SCDOCLAYOUTOPT_TABSTOP 0
#define SCDOCLAYOUTOPT_COUNT 1
+#define CFGPATH_COMPAT "Office.Calc/Compatibility"
+#define SCCOMPATOPT_KEY_BINDING 0
+#define SCCOMPATOPT_COUNT 1
Sequence<OUString> ScDocCfg::GetCalcPropertyNames()
{
@@ -345,10 +351,25 @@ Sequence<OUString> ScDocCfg::GetLayoutPropertyNames()
return aNames;
}
+Sequence<OUString> ScDocCfg::GetCompatPropertyNames()
+{
+ static const char* aPropNames[] =
+ {
+ "KeyBindings/BaseGroup" // SCCOMPATOPT_KEY_BINDING
+ };
+ Sequence<OUString> aNames(SCCOMPATOPT_COUNT);
+ OUString* pNames = aNames.getArray();
+ for (int i = 0; i < SCCOMPATOPT_COUNT; ++i)
+ pNames[i] = OUString::createFromAscii(aPropNames[i]);
+
+ return aNames;
+}
+
ScDocCfg::ScDocCfg() :
aCalcItem( OUString::createFromAscii( CFGPATH_CALC ) ),
aFormulaItem(OUString::createFromAscii(CFGPATH_FORMULA)),
- aLayoutItem( OUString::createFromAscii( CFGPATH_DOCLAYOUT ) )
+ aLayoutItem(OUString::createFromAscii(CFGPATH_DOCLAYOUT)),
+ aCompatItem(OUString::createFromAscii(CFGPATH_COMPAT))
{
sal_Int32 nIntVal = 0;
double fDoubleVal = 0;
@@ -513,6 +534,28 @@ ScDocCfg::ScDocCfg() :
}
}
aLayoutItem.SetCommitLink( LINK( this, ScDocCfg, LayoutCommitHdl ) );
+
+ aNames = GetCompatPropertyNames();
+ aValues = aCompatItem.GetProperties(aNames);
+ aCompatItem.EnableNotification(aNames);
+ pValues = aValues.getConstArray();
+ if (aValues.getLength() == aNames.getLength())
+ {
+ for (int nProp = 0; nProp < aNames.getLength(); ++nProp)
+ {
+ switch (nProp)
+ {
+ case SCCOMPATOPT_KEY_BINDING:
+ {
+ nIntVal = 0; // 0 = 'Default'
+ pValues[nProp] >>= nIntVal;
+ SetKeyBindingType(static_cast<ScOptionsUtil::KeyBindingType>(nIntVal));
+ }
+ break;
+ }
+ }
+ }
+ aCompatItem.SetCommitLink( LINK(this, ScDocCfg, CompatCommitHdl) );
}
IMPL_LINK( ScDocCfg, CalcCommitHdl, void *, EMPTYARG )
@@ -637,6 +680,24 @@ IMPL_LINK( ScDocCfg, LayoutCommitHdl, void *, EMPTYARG )
return 0;
}
+IMPL_LINK( ScDocCfg, CompatCommitHdl, void *, EMPTYARG )
+{
+ Sequence<OUString> aNames = GetCompatPropertyNames();
+ Sequence<Any> aValues(aNames.getLength());
+ Any* pValues = aValues.getArray();
+
+ for (int nProp = 0; nProp < aNames.getLength(); ++nProp)
+ {
+ switch(nProp)
+ {
+ case SCCOMPATOPT_KEY_BINDING:
+ pValues[nProp] <<= static_cast<sal_Int32>(GetKeyBindingType());
+ break;
+ }
+ }
+ aCompatItem.PutProperties(aNames, aValues);
+ return 0;
+}
void ScDocCfg::SetOptions( const ScDocOptions& rNew )
{
@@ -645,6 +706,8 @@ void ScDocCfg::SetOptions( const ScDocOptions& rNew )
aCalcItem.SetModified();
aFormulaItem.SetModified();
aLayoutItem.SetModified();
+ aCompatItem.SetModified();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/doubleref.cxx b/sc/source/core/tool/doubleref.cxx
index 740413ea8533..a547041b4ce2 100644
--- a/sc/source/core/tool/doubleref.cxx
+++ b/sc/source/core/tool/doubleref.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -563,3 +564,4 @@ bool ScDBExternalRange::isRangeEqual(const ScRange& /*rRange*/) const
return false;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index 335f8c0d925b..a8a5e2cda967 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -777,3 +778,5 @@ ScNoteEditEngine::ScNoteEditEngine( SfxItemPool* pEnginePoolP,
SetEditTextObjectPool( pTextObjectPool );
SetControlWord( (GetControlWord() | EE_CNTRL_MARKFIELDS) & ~EE_CNTRL_RTFSTYLESHEETS );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/filtopt.cxx b/sc/source/core/tool/filtopt.cxx
index 7ac3d710b420..b5c109b6602f 100644
--- a/sc/source/core/tool/filtopt.cxx
+++ b/sc/source/core/tool/filtopt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -118,3 +119,4 @@ void ScFilterOptions::Notify( const Sequence<rtl::OUString>& /* aPropertyNames *
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/formulaparserpool.cxx b/sc/source/core/tool/formulaparserpool.cxx
index 75d1c874eba8..1270bf185ff4 100644
--- a/sc/source/core/tool/formulaparserpool.cxx
+++ b/sc/source/core/tool/formulaparserpool.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -166,3 +167,4 @@ Reference< XFormulaParser > ScFormulaParserPool::getFormulaParser( const OUStrin
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/hints.cxx b/sc/source/core/tool/hints.cxx
index e9225b39c29f..7597070fbe18 100644
--- a/sc/source/core/tool/hints.cxx
+++ b/sc/source/core/tool/hints.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -156,3 +157,4 @@ ScDataPilotModifiedHint::~ScDataPilotModifiedHint()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/inputopt.cxx b/sc/source/core/tool/inputopt.cxx
index ed5a74582348..449ec8355dc1 100644
--- a/sc/source/core/tool/inputopt.cxx
+++ b/sc/source/core/tool/inputopt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -272,3 +273,4 @@ void ScInputCfg::OptionsChanged()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index fec208671760..ee317f246466 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -70,6 +71,7 @@
#include "rangenam.hxx"
#include "compiler.hxx"
#include "externalrefmgr.hxx"
+#include <basic/sbstar.hxx>
#include "doubleref.hxx"
#include "queryparam.hxx"
@@ -85,7 +87,7 @@ using namespace formula;
using ::std::auto_ptr;
//-----------------------------------------------------------------------------
-// Funktionen
+// Functions
//-----------------------------------------------------------------------------
@@ -1154,7 +1156,7 @@ void ScInterpreter::ScAnd()
bHaveValue = TRUE;
nRes &= ( GetCellValue( aAdr, pCell ) != 0.0 );
}
- // else: Xcl setzt hier keinen Fehler
+ // else: Xcl raises no error here
}
}
break;
@@ -1252,7 +1254,7 @@ void ScInterpreter::ScOr()
bHaveValue = TRUE;
nRes |= ( GetCellValue( aAdr, pCell ) != 0.0 );
}
- // else: Xcl setzt hier keinen Fehler
+ // else: Xcl raises no error here
}
}
break;
@@ -2495,7 +2497,7 @@ void ScInterpreter::ScN()
void ScInterpreter::ScTrim()
-{ // trimmt nicht nur sondern schnibbelt auch doppelte raus!
+{ // Doesn't only trim but writes out twice!
String aVal( GetString() );
aVal.EraseLeadingChars();
aVal.EraseTrailingChars();
@@ -2504,7 +2506,7 @@ void ScInterpreter::ScTrim()
register const sal_Unicode* const pEnd = p + aVal.Len();
while ( p < pEnd )
{
- if ( *p != ' ' || p[-1] != ' ' ) // erster kann kein ' ' sein, -1 ist also ok
+ if ( *p != ' ' || p[-1] != ' ' ) // ' ' can't be first, -1 is fine too
aStr += *p;
p++;
}
@@ -2605,7 +2607,7 @@ void ScInterpreter::ScT()
PushString( EMPTY_STRING );
else
{
- // wie GetString()
+ // like GetString()
GetCellString( aTempStr, pCell );
PushString( aTempStr );
}
@@ -3386,7 +3388,7 @@ double ScInterpreter::IterateParameters( ScIterFunc eFunc, BOOL bTextAsZero )
ScValueIterator aValIter( pDok, aRange, glSubTotal, bTextAsZero );
if (aValIter.GetFirst(fVal, nErr))
{
- // Schleife aus Performance-Gruenden nach innen verlegt:
+ // placed the loop on the inside for performance reasons:
aValIter.GetCurNumFmtInfo( nFuncFmtType, nFuncFmtIndex );
switch( eFunc )
{
@@ -4297,7 +4299,17 @@ void ScInterpreter::ScMatch()
}
}
if ( rEntry.bQueryByString )
- rParam.bRegExp = MayBeRegExp( *rEntry.pStr, pDok );
+ {
+ BOOL bIsVBAMode = FALSE;
+ if ( pDok )
+ bIsVBAMode = pDok->IsInVBAMode();
+
+ // #TODO handle MSO wildcards
+ if ( bIsVBAMode )
+ rParam.bRegExp = FALSE;
+ else
+ rParam.bRegExp = MayBeRegExp( *rEntry.pStr, pDok );
+ }
if (pMatSrc) // The source data is matrix array.
{
@@ -4666,7 +4678,7 @@ void ScInterpreter::ScCountIf()
else
{
ScQueryCellIterator aCellIter(pDok, nTab1, rParam, FALSE);
- // Entry.nField im Iterator bei Spaltenwechsel weiterschalten
+ // Keep Entry.nField in iterator on column change
aCellIter.SetAdvanceQueryParamEntryField( TRUE );
if ( aCellIter.GetFirst() )
{
@@ -6447,17 +6459,11 @@ void ScInterpreter::ScIndirect()
rData->ValidateTabRefs();
ScRange aRange;
-#if 0
- // This is some really odd Excel behavior and renders named
- // ranges containing relative references totally useless.
- if (!rData->IsReference(aRange, ScAddress( aPos.Tab(), 0, 0)))
- break;
-#else
+
// This is the usual way to treat named ranges containing
// relative references.
if (!rData->IsReference( aRange, aPos))
break;
-#endif
if (aRange.aStart == aRange.aEnd)
PushSingleRef( aRange.aStart.Col(), aRange.aStart.Row(),
@@ -7631,3 +7637,5 @@ bool ScInterpreter::LookupQueryWithCache( ScAddress & o_rResultPos,
}
return bFound;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index e5cf9a0ed665..599d2ba08e3b 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,6 +37,7 @@
#include <svl/stritem.hxx>
#include <svl/zforlist.hxx>
#include <rtl/logfile.hxx>
+#include <sal/macros.h>
#include "interpre.hxx"
#include "attrib.hxx"
@@ -2442,7 +2444,7 @@ void ScInterpreter::ScRoman()
{
static const sal_Unicode pChars[] = { 'M', 'D', 'C', 'L', 'X', 'V', 'I' };
static const USHORT pValues[] = { 1000, 500, 100, 50, 10, 5, 1 };
- static const USHORT nMaxIndex = (USHORT)(sizeof(pValues) / sizeof(pValues[0]) - 1);
+ static const USHORT nMaxIndex = (USHORT)(SAL_N_ELEMENTS(pValues) - 1);
String aRoman;
USHORT nVal = (USHORT) fVal;
@@ -2675,7 +2677,7 @@ BOOL lclConvertMoney( const String& aSearchUnit, double& rfRate, int& rnDec )
{ "SKK", 30.1260, 2 }
};
- const size_t nConversionCount = sizeof( aConvertTable ) / sizeof( aConvertTable[0] );
+ const size_t nConversionCount = SAL_N_ELEMENTS(aConvertTable);
for ( size_t i = 0; i < nConversionCount; i++ )
if ( aSearchUnit.EqualsIgnoreCaseAscii( aConvertTable[i].pCurrText ) )
{
@@ -3031,3 +3033,4 @@ failed :
PushError( errNoRef );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx
index bcea57703d78..0b702777d8e8 100644
--- a/sc/source/core/tool/interpr3.cxx
+++ b/sc/source/core/tool/interpr3.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -3338,22 +3339,7 @@ void ScInterpreter::ScPercentrank()
BYTE nParamCount = GetByte();
if ( !MustHaveParamCount( nParamCount, 2 ) )
return;
-#if 0
-/* wird nicht unterstuetzt
- double fPrec;
- if (nParamCount == 3)
- {
- fPrec = ::rtl::math::approxFloor(GetDouble());
- if (fPrec < 1.0)
- {
- PushIllegalArgument();
- return;
- }
- }
- else
- fPrec = 3.0;
-*/
-#endif
+
double fNum = GetDouble();
vector<double> aSortArray;
GetSortArray(1, aSortArray);
@@ -4242,3 +4228,4 @@ void ScInterpreter::ScForecast()
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 2edd18a369f0..a1be4455d31b 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,10 +34,14 @@
#include <sfx2/app.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/objsh.hxx>
+#include <sfx2/docfilt.hxx>
#include <basic/sbmeth.hxx>
#include <basic/sbmod.hxx>
#include <basic/sbstar.hxx>
#include <basic/sbx.hxx>
+#include <basic/sbxobj.hxx>
+#include <basic/sbuno.hxx>
+#include <svl/zforlist.hxx>
#include <svl/zforlist.hxx>
#include <tools/urlobj.hxx>
#include <rtl/logfile.hxx>
@@ -45,6 +50,8 @@
#include <signal.h>
#include <com/sun/star/table/XCellRange.hpp>
+#include <com/sun/star/sheet/XSheetCellRange.hpp>
+#include <comphelper/processfactory.hxx>
#include "interpre.hxx"
#include "global.hxx"
@@ -65,6 +72,8 @@
#include "jumpmatrix.hxx"
#include "parclass.hxx"
#include "externalrefmgr.hxx"
+#include "formula/FormulaCompiler.hxx"
+#include "macromgr.hxx"
#include "doubleref.hxx"
#include <math.h>
@@ -72,6 +81,8 @@
#include <map>
#include <algorithm>
#include <functional>
+#include <basic/basmgr.hxx>
+#include <vbahelper/vbaaccesshelper.hxx>
#include <memory>
using namespace com::sun::star;
@@ -1765,6 +1776,52 @@ ScMatrixRef ScInterpreter::PopMatrix()
return NULL;
}
+void ScInterpreter::QueryMatrixType(ScMatrixRef& xMat, short& rRetTypeExpr, ULONG& rRetIndexExpr)
+{
+ if (xMat)
+ {
+ ScMatValType nMatValType;
+ const ScMatrixValue* pMatVal = xMat->Get(0, 0, nMatValType);
+ if ( pMatVal )
+ {
+ if (ScMatrix::IsNonValueType( nMatValType))
+ {
+ if ( xMat->IsEmptyPath( 0, 0))
+ { // result of empty FALSE jump path
+ FormulaTokenRef xRes = new FormulaDoubleToken( 0.0);
+ PushTempToken( new ScMatrixCellResultToken( xMat, xRes));
+ rRetTypeExpr = NUMBERFORMAT_LOGICAL;
+ }
+ else
+ {
+ String aStr( pMatVal->GetString());
+ FormulaTokenRef xRes = new FormulaStringToken( aStr);
+ PushTempToken( new ScMatrixCellResultToken( xMat, xRes));
+ rRetTypeExpr = NUMBERFORMAT_TEXT;
+ }
+ }
+ else
+ {
+ USHORT nErr = GetDoubleErrorValue( pMatVal->fVal);
+ FormulaTokenRef xRes;
+ if (nErr)
+ xRes = new FormulaErrorToken( nErr);
+ else
+ xRes = new FormulaDoubleToken( pMatVal->fVal);
+ PushTempToken( new ScMatrixCellResultToken( xMat, xRes));
+ if ( rRetTypeExpr != NUMBERFORMAT_LOGICAL )
+ rRetTypeExpr = NUMBERFORMAT_NUMBER;
+ }
+ rRetIndexExpr = 0;
+ }
+ else
+ SetError( errUnknownStackVariable);
+ xMat->SetErrorInterpreter( NULL);
+ }
+ else
+ SetError( errUnknownStackVariable);
+}
+
void ScInterpreter::PushDouble(double nVal)
{
@@ -2092,7 +2149,7 @@ double ScInterpreter::GetDoubleFromMatrix(const ScMatrixRef& pMat)
double ScInterpreter::GetDouble()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::GetDouble" );
- double nVal;
+ double nVal(0.0);
switch( GetRawStackType() )
{
case svDouble:
@@ -2925,6 +2982,61 @@ void ScInterpreter::ScMissing()
PushTempToken( new FormulaMissingToken );
}
+uno::Any lcl_getSheetModule( const uno::Reference<table::XCellRange>& xCellRange, ScDocument* pDok )
+{
+ uno::Reference< sheet::XSheetCellRange > xSheetRange( xCellRange, uno::UNO_QUERY_THROW );
+ uno::Reference< beans::XPropertySet > xProps( xSheetRange->getSpreadsheet(), uno::UNO_QUERY_THROW );
+ rtl::OUString sCodeName;
+ xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CodeName") ) ) >>= sCodeName;
+ // #TODO #FIXME ideally we should 'throw' here if we don't get a valid parent, but... it is possible
+ // to create a module ( and use 'Option VBASupport 1' ) for a calc document, in this scenario there
+ // are *NO* special document module objects ( of course being able to switch between vba/non vba mode at
+ // the document in the future could fix this, especially IF the switching of the vba mode takes care to
+ // create the special document module objects if they don't exist.
+ BasicManager* pBasMgr = pDok->GetDocumentShell()->GetBasicManager();
+
+ uno::Reference< uno::XInterface > xIf;
+ if ( pBasMgr && pBasMgr->GetName().Len() )
+ {
+ String sProj = String( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) );
+ if ( pDok->GetDocumentShell()->GetBasicManager()->GetName().Len() )
+ sProj = pDok->GetDocumentShell()->GetBasicManager()->GetName();
+ StarBASIC* pBasic = pDok->GetDocumentShell()->GetBasicManager()->GetLib( sProj );
+ if ( pBasic )
+ {
+ SbModule* pMod = pBasic->FindModule( sCodeName );
+ if ( pMod )
+ xIf = pMod->GetUnoModule();
+ }
+ }
+ return uno::makeAny( xIf );
+}
+
+bool
+lcl_setVBARange( ScRange& aRange, ScDocument* pDok, SbxVariable* pPar )
+{
+ bool bOk = false;
+ try
+ {
+ uno::Reference< uno::XInterface > xVBARange;
+ uno::Reference<table::XCellRange> xCellRange = ScCellRangeObj::CreateRangeFromDoc( pDok, aRange );
+ uno::Sequence< uno::Any > aArgs(2);
+ aArgs[0] = lcl_getSheetModule( xCellRange, pDok );
+ aArgs[1] = uno::Any( xCellRange );
+ xVBARange = ooo::vba::createVBAUnoAPIServiceWithArgs( pDok->GetDocumentShell(), "ooo.vba.excel.Range", aArgs );
+ if ( xVBARange.is() )
+ {
+ String sDummy(RTL_CONSTASCII_USTRINGPARAM("A-Range") );
+ SbxObjectRef aObj = GetSbUnoObject( sDummy, uno::Any( xVBARange ) );
+ SetSbUnoObjectDfltPropName( aObj );
+ bOk = pPar->PutObject( aObj );
+ }
+ }
+ catch( uno::Exception& )
+ {
+ }
+ return bOk;
+}
void ScInterpreter::ScMacro()
{
@@ -2962,8 +3074,11 @@ void ScInterpreter::ScMacro()
return;
}
+ bool bVolatileMacro = false;
SbMethod* pMethod = (SbMethod*)pVar;
+
SbModule* pModule = pMethod->GetModule();
+ bool bUseVBAObjects = pModule->IsVBACompat();
SbxObject* pObject = pModule->GetParent();
DBG_ASSERT(pObject->IsA(TYPE(StarBASIC)), "Kein Basic gefunden!");
String aMacroStr = pObject->GetName();
@@ -2973,7 +3088,13 @@ void ScInterpreter::ScMacro()
aMacroStr += pMethod->GetName();
String aBasicStr;
if (pObject->GetParent())
+ {
aBasicStr = pObject->GetParent()->GetName(); // Dokumentenbasic
+ const SfxFilter* pFilter = NULL;
+ SfxMedium* pMedium = pDok->GetDocumentShell()->GetMedium();
+ if ( pMedium )
+ pFilter = pMedium->GetFilter();
+ }
else
aBasicStr = SFX_APP()->GetName(); // Applikationsbasic
@@ -2997,7 +3118,13 @@ void ScInterpreter::ScMacro()
{
ScAddress aAdr;
PopSingleRef( aAdr );
- bOk = SetSbxVariable( pPar, aAdr );
+ if ( bUseVBAObjects )
+ {
+ ScRange aRange( aAdr );
+ bOk = lcl_setVBARange( aRange, pDok, pPar );
+ }
+ else
+ bOk = SetSbxVariable( pPar, aAdr );
}
break;
case svDoubleRef:
@@ -3016,24 +3143,32 @@ void ScInterpreter::ScMacro()
}
else
{
- SbxDimArrayRef refArray = new SbxDimArray;
- refArray->AddDim32( 1, nRow2 - nRow1 + 1 );
- refArray->AddDim32( 1, nCol2 - nCol1 + 1 );
- ScAddress aAdr( nCol1, nRow1, nTab1 );
- for( SCROW nRow = nRow1; bOk && nRow <= nRow2; nRow++ )
+ if ( bUseVBAObjects )
{
- aAdr.SetRow( nRow );
- INT32 nIdx[ 2 ];
- nIdx[ 0 ] = nRow-nRow1+1;
- for( SCCOL nCol = nCol1; bOk && nCol <= nCol2; nCol++ )
+ ScRange aRange( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
+ bOk = lcl_setVBARange( aRange, pDok, pPar );
+ }
+ else
+ {
+ SbxDimArrayRef refArray = new SbxDimArray;
+ refArray->AddDim32( 1, nRow2 - nRow1 + 1 );
+ refArray->AddDim32( 1, nCol2 - nCol1 + 1 );
+ ScAddress aAdr( nCol1, nRow1, nTab1 );
+ for( SCROW nRow = nRow1; bOk && nRow <= nRow2; nRow++ )
{
- aAdr.SetCol( nCol );
- nIdx[ 1 ] = nCol-nCol1+1;
- SbxVariable* p = refArray->Get32( nIdx );
- bOk = SetSbxVariable( p, aAdr );
+ aAdr.SetRow( nRow );
+ INT32 nIdx[ 2 ];
+ nIdx[ 0 ] = nRow-nRow1+1;
+ for( SCCOL nCol = nCol1; bOk && nCol <= nCol2; nCol++ )
+ {
+ aAdr.SetCol( nCol );
+ nIdx[ 1 ] = nCol-nCol1+1;
+ SbxVariable* p = refArray->Get32( nIdx );
+ bOk = SetSbxVariable( p, aAdr );
+ }
}
+ pPar->PutObject( refArray );
}
- pPar->PutObject( refArray );
}
}
break;
@@ -3081,6 +3216,13 @@ void ScInterpreter::ScMacro()
pDok->DecMacroInterpretLevel();
pDok->UnlockTable( aPos.Tab() );
+ ScMacroManager* pMacroMgr = pDok->GetMacroManager();
+ if (pMacroMgr)
+ {
+ bVolatileMacro = pMacroMgr->GetUserFuncVolatile( pMethod->GetName() );
+ pMacroMgr->AddDependentCell(pModule->GetName(), pMyFormulaCell);
+ }
+
SbxDataType eResType = refRes->GetType();
if( pVar->GetError() )
SetError( errNoValue);
@@ -3152,6 +3294,9 @@ void ScInterpreter::ScMacro()
}
pSfxApp->LeaveBasicCall();
+
+ if (bVolatileMacro && meVolaileType == NOT_VOLATILE)
+ meVolaileType = VOLATILE_MACRO;
}
@@ -3448,7 +3593,8 @@ ScInterpreter::ScInterpreter( ScFormulaCell* pCell, ScDocument* pDoc,
pMyFormulaCell( pCell ),
pFormatter( pDoc->GetFormatTable() ),
mnStringNoValueError( errNoValue),
- bCalcAsShown( pDoc->GetDocOptions().IsCalcAsShown() )
+ bCalcAsShown( pDoc->GetDocOptions().IsCalcAsShown() ),
+ meVolaileType(NOT_VOLATILE)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScTTT" );
// pStack = new ScToken*[ MAXSTACK ];
@@ -3895,6 +4041,9 @@ StackVar ScInterpreter::Interpret()
continue; // while( ( pCur = aCode.Next() ) != NULL ...
}
+ if (FormulaCompiler::IsOpCodeVolatile(eOp))
+ meVolaileType = VOLATILE;
+
// Remember result matrix in case it could be reused.
if (pTokenMatrixMap && sp && GetStackType() == svMatrix)
pTokenMatrixMap->insert( ScTokenMatrixMap::value_type( pCur,
@@ -4030,7 +4179,8 @@ StackVar ScInterpreter::Interpret()
if ( bMatrixFormula )
{ // create matrix for {=A1:A5}
PopDoubleRefPushMatrix();
- // no break, continue with svMatrix
+ ScMatrixRef xMat = PopMatrix();
+ QueryMatrixType(xMat, nRetTypeExpr, nRetIndexExpr);
}
else
{
@@ -4040,10 +4190,9 @@ StackVar ScInterpreter::Interpret()
if ( !nGlobalError && DoubleRefToPosSingleRef( aRange, aAdr))
PushCellResultToken( false, aAdr,
&nRetTypeExpr, &nRetIndexExpr);
- break;
}
}
- // no break
+ break;
case svExternalDoubleRef:
case svMatrix :
{
@@ -4053,48 +4202,7 @@ StackVar ScInterpreter::Interpret()
else
PopExternalDoubleRef(xMat);
- if (xMat)
- {
- ScMatValType nMatValType;
- const ScMatrixValue* pMatVal = xMat->Get(0, 0, nMatValType);
- if ( pMatVal )
- {
- if (ScMatrix::IsNonValueType( nMatValType))
- {
- if ( xMat->IsEmptyPath( 0, 0))
- { // result of empty FALSE jump path
- FormulaTokenRef xRes = new FormulaDoubleToken( 0.0);
- PushTempToken( new ScMatrixCellResultToken( xMat, xRes));
- nRetTypeExpr = NUMBERFORMAT_LOGICAL;
- }
- else
- {
- String aStr( pMatVal->GetString());
- FormulaTokenRef xRes = new FormulaStringToken( aStr);
- PushTempToken( new ScMatrixCellResultToken( xMat, xRes));
- nRetTypeExpr = NUMBERFORMAT_TEXT;
- }
- }
- else
- {
- USHORT nErr = GetDoubleErrorValue( pMatVal->fVal);
- FormulaTokenRef xRes;
- if (nErr)
- xRes = new FormulaErrorToken( nErr);
- else
- xRes = new FormulaDoubleToken( pMatVal->fVal);
- PushTempToken( new ScMatrixCellResultToken( xMat, xRes));
- if ( nRetTypeExpr != NUMBERFORMAT_LOGICAL )
- nRetTypeExpr = NUMBERFORMAT_NUMBER;
- }
- nRetIndexExpr = 0;
- }
- else
- SetError( errUnknownStackVariable);
- xMat->SetErrorInterpreter( NULL);
- }
- else
- SetError( errUnknownStackVariable);
+ QueryMatrixType(xMat, nRetTypeExpr, nRetIndexExpr);
}
break;
case svExternalSingleRef:
@@ -4160,3 +4268,5 @@ StackVar ScInterpreter::Interpret()
static_cast<ScToken*>(xResult.operator->())->GetMatrix()->SetImmutable( true);
return eType;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index 82830796ec09..049e7a235870 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -322,6 +323,11 @@ ScMatrixRef ScInterpreter::GetNewMat(SCSIZE nC, SCSIZE nR)
return pMat;
}
+ScInterpreter::VolatileType ScInterpreter::GetVolatileType() const
+{
+ return meVolaileType;
+}
+
ScMatrixRef ScInterpreter::CreateMatrixFromDoubleRef( const FormulaToken* pToken,
SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2 )
@@ -2811,3 +2817,5 @@ void ScInterpreter::ScInfo()
PushIllegalArgument();
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/interpr6.cxx b/sc/source/core/tool/interpr6.cxx
index c514f15043a9..109495ddb6d2 100644
--- a/sc/source/core/tool/interpr6.cxx
+++ b/sc/source/core/tool/interpr6.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -195,3 +196,5 @@ double ScInterpreter::GetGammaDist( double fX, double fAlpha, double fLambda )
else
return GetLowRegIGamma( fAlpha, fX / fLambda);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/lookupcache.cxx b/sc/source/core/tool/lookupcache.cxx
index 3ba66011d0e4..75f45261e471 100644
--- a/sc/source/core/tool/lookupcache.cxx
+++ b/sc/source/core/tool/lookupcache.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -124,3 +125,5 @@ void ScLookupCache::Notify( SvtBroadcaster & /* rBC */ , const SfxHint & rHint
}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/makefile.mk b/sc/source/core/tool/makefile.mk
index 9819cf20c2a9..b1cad5831a28 100644
--- a/sc/source/core/tool/makefile.mk
+++ b/sc/source/core/tool/makefile.mk
@@ -38,9 +38,7 @@ AUTOSEG=true
# --- Settings -----------------------------------------------------
-.INCLUDE : scpre.mk
.INCLUDE : settings.mk
-.INCLUDE : sc.mk
.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files --------------------------------------------------------
diff --git a/sc/source/core/tool/navicfg.cxx b/sc/source/core/tool/navicfg.cxx
index 0991071774ed..a0b9b629bc34 100644
--- a/sc/source/core/tool/navicfg.cxx
+++ b/sc/source/core/tool/navicfg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -78,3 +79,4 @@ void ScNavipiCfg::SetRootType(USHORT nNew)
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/odffmap.cxx b/sc/source/core/tool/odffmap.cxx
index 0ffaa4aae025..28b13e249a07 100644
--- a/sc/source/core/tool/odffmap.cxx
+++ b/sc/source/core/tool/odffmap.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,6 +30,7 @@
#include "precompiled_sc.hxx"
#include "compiler.hxx"
+#include <sal/macros.h>
// ODFF, English, Programmatical, ODF_11
ScCompiler::AddInMap ScCompiler::maAddInMap[] =
@@ -145,5 +147,7 @@ const ScCompiler::AddInMap* ScCompiler::GetAddInMap()
// static
size_t ScCompiler::GetAddInMapCount()
{
- return sizeof(maAddInMap)/sizeof(maAddInMap[0]);
+ return SAL_N_ELEMENTS(maAddInMap);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/optutil.cxx b/sc/source/core/tool/optutil.cxx
index dc63c7819eff..03f4174c8613 100644
--- a/sc/source/core/tool/optutil.cxx
+++ b/sc/source/core/tool/optutil.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -77,3 +78,4 @@ void ScLinkConfigItem::Commit()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/parclass.cxx b/sc/source/core/tool/parclass.cxx
index a863bc0a68c2..9af15044f69a 100644
--- a/sc/source/core/tool/parclass.cxx
+++ b/sc/source/core/tool/parclass.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -576,3 +577,4 @@ void ScParameterClassification::GenerateDocumentation()
#endif // OSL_DEBUG_LEVEL
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/printopt.cxx b/sc/source/core/tool/printopt.cxx
index 28b9c45d1235..f895bbc0a6ca 100644
--- a/sc/source/core/tool/printopt.cxx
+++ b/sc/source/core/tool/printopt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -206,3 +207,4 @@ void ScPrintCfg::SetOptions( const ScPrintOptions& rNew )
void ScPrintCfg::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/prnsave.cxx b/sc/source/core/tool/prnsave.cxx
index b432f585e854..35200d6b4ff9 100644
--- a/sc/source/core/tool/prnsave.cxx
+++ b/sc/source/core/tool/prnsave.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -133,3 +134,4 @@ BOOL ScPrintRangeSaver::operator==( const ScPrintRangeSaver& rCmp ) const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/progress.cxx b/sc/source/core/tool/progress.cxx
index a2fa45764bcc..0a26b968f112 100644
--- a/sc/source/core/tool/progress.cxx
+++ b/sc/source/core/tool/progress.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -196,3 +197,4 @@ void ScProgress::DeleteInterpretProgress()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/queryparam.cxx b/sc/source/core/tool/queryparam.cxx
index 20c4b975c0c0..ca87b1503b0b 100644
--- a/sc/source/core/tool/queryparam.cxx
+++ b/sc/source/core/tool/queryparam.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -377,3 +378,4 @@ ScDBQueryParamMatrix::~ScDBQueryParamMatrix()
{
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx
index 1ab978866c67..ed93713eb65f 100644
--- a/sc/source/core/tool/rangelst.cxx
+++ b/sc/source/core/tool/rangelst.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -83,15 +84,18 @@ USHORT ScRangeList::Parse( const String& rStr, ScDocument* pDoc, USHORT nMask,
for ( USHORT i=0; i<nTCount; i++ )
{
aOne = rStr.GetToken( i, cDelimiter );
- // FIXME : broken for Lotus
- if ( aOne.Search( ':' ) == STRING_NOTFOUND )
- { // Range muss es sein
- String aStrTmp( aOne );
- aOne += ':';
- aOne += aStrTmp;
- }
aRange.aStart.SetTab( nTab ); // Default Tab wenn nicht angegeben
- USHORT nRes = aRange.Parse( aOne, pDoc, eConv );
+ USHORT nRes = aRange.ParseAny( aOne, pDoc, eConv );
+ USHORT nEndRangeBits = SCA_VALID_COL2 | SCA_VALID_ROW2 |
+SCA_VALID_TAB2;
+ USHORT nTmp1 = ( nRes & SCA_BITS );
+ USHORT nTmp2 = ( nRes & nEndRangeBits );
+ // If we have a valid single range with
+ // any of the address bits we are interested in
+ // set - set the equiv end range bits
+ if ( (nRes & SCA_VALID ) && nTmp1 && ( nTmp2 != nEndRangeBits ) )
+ nRes |= ( nTmp1 << 4 );
+
if ( (nRes & nMask) == nMask )
Append( aRange );
nResult &= nRes; // alle gemeinsamen Bits bleiben erhalten
@@ -701,3 +705,4 @@ ScRangePair** ScRangePairList::CreateNameSortedArray( ULONG& nListCount,
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx
index de90239c7123..f115f4a4bf62 100644
--- a/sc/source/core/tool/rangenam.cxx
+++ b/sc/source/core/tool/rangenam.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -799,3 +800,4 @@ void ScRangeName::UpdateTabRef(SCTAB nOldTable, USHORT nFlag, SCTAB nNewTable)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/rangeseq.cxx b/sc/source/core/tool/rangeseq.cxx
index 5584fb1c37e2..d7b86780e562 100644
--- a/sc/source/core/tool/rangeseq.cxx
+++ b/sc/source/core/tool/rangeseq.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -474,3 +475,4 @@ BOOL ScByteSequenceToString::GetString( String& rString, const uno::Any& rAny,
//------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx
index a2d624d935f7..6cae0b6d2f24 100644
--- a/sc/source/core/tool/rangeutl.cxx
+++ b/sc/source/core/tool/rangeutl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1105,3 +1106,4 @@ BOOL ScAreaNameIterator::Next( String& rName, ScRange& rRange )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/rechead.cxx b/sc/source/core/tool/rechead.cxx
index 6da946463697..90818b37cd60 100644
--- a/sc/source/core/tool/rechead.cxx
+++ b/sc/source/core/tool/rechead.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -171,3 +172,4 @@ void ScMultipleWriteHeader::StartEntry()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/refdata.cxx b/sc/source/core/tool/refdata.cxx
index c6373426bbd1..07c8442f6bd7 100644
--- a/sc/source/core/tool/refdata.cxx
+++ b/sc/source/core/tool/refdata.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -266,3 +267,5 @@ ScComplexRefData& ScComplexRefData::Extend( const ScComplexRefData & rRef, const
{
return Extend( rRef.Ref1, rPos).Extend( rRef.Ref2, rPos);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/reffind.cxx b/sc/source/core/tool/reffind.cxx
index e406ebccf916..49c91cfa42e8 100644
--- a/sc/source/core/tool/reffind.cxx
+++ b/sc/source/core/tool/reffind.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -173,3 +174,4 @@ void ScRefFinder::ToggleRel( xub_StrLen nStartPos, xub_StrLen nEndPos )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/refreshtimer.cxx b/sc/source/core/tool/refreshtimer.cxx
index 5520aac6d6eb..e12916a9f907 100644
--- a/sc/source/core/tool/refreshtimer.cxx
+++ b/sc/source/core/tool/refreshtimer.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,7 +42,7 @@ ScRefreshTimerProtector::ScRefreshTimerProtector( ScRefreshTimerControl * const
{
(*ppControl)->SetAllowRefresh( FALSE );
// wait for any running refresh in another thread to finnish
- ::vos::OGuard aGuard( (*ppControl)->GetMutex() );
+ ::osl::MutexGuard aGuard( (*ppControl)->GetMutex() );
}
}
@@ -70,7 +71,7 @@ void ScRefreshTimer::Timeout()
if ( ppControl && *ppControl && (*ppControl)->IsRefreshAllowed() )
{
// now we COULD make the call in another thread ...
- ::vos::OGuard aGuard( (*ppControl)->GetMutex() );
+ ::osl::MutexGuard aGuard( (*ppControl)->GetMutex() );
maTimeoutHdl.Call( this );
// restart from now on, don't execute immediately again if timed out
// a second time during refresh
@@ -79,3 +80,4 @@ void ScRefreshTimer::Timeout()
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/reftokenhelper.cxx b/sc/source/core/tool/reftokenhelper.cxx
index 660bdffc2cec..eaf4b8134490 100644
--- a/sc/source/core/tool/reftokenhelper.cxx
+++ b/sc/source/core/tool/reftokenhelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -112,26 +113,6 @@ void ScRefTokenHelper::compileRangeRepresentation(
}
}
-#if 0
- switch (p->GetType())
- {
- case svSingleRef:
- fprintf(stdout, "ScChart2DataProvider::compileRangeRepresentation: single ref\n");
- break;
- case svDoubleRef:
- fprintf(stdout, "ScChart2DataProvider::compileRangeRepresentation: double ref\n");
- break;
- case svExternalSingleRef:
- fprintf(stdout, "ScChart2DataProvider::compileRangeRepresentation: external single ref\n");
- break;
- case svExternalDoubleRef:
- fprintf(stdout, "ScChart2DataProvider::compileRangeRepresentation: external double ref\n");
- break;
- default:
- ;
- }
-#endif
-
}
if (bFailure)
rRefTokens.clear();
@@ -493,3 +474,5 @@ ScSharedTokenRef ScRefTokenHelper::createRefToken(const ScRange& rRange)
ScSharedTokenRef pRef(new ScDoubleRefToken(aRefData));
return pRef;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/refupdat.cxx b/sc/source/core/tool/refupdat.cxx
index ad11190be75d..970a85d3392a 100644
--- a/sc/source/core/tool/refupdat.cxx
+++ b/sc/source/core/tool/refupdat.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -937,3 +938,4 @@ ScRefUpdateRes ScRefUpdate::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCRO
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index 67e94823b71c..c7232c3adebc 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -814,3 +815,4 @@ double ScMatrix::Or()
return bOr;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/simplerangelist.cxx b/sc/source/core/tool/simplerangelist.cxx
index ca86775b1487..278fd74c832a 100644
--- a/sc/source/core/tool/simplerangelist.cxx
+++ b/sc/source/core/tool/simplerangelist.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -241,3 +242,5 @@ ScSimpleRangeList::RangeListRef ScSimpleRangeList::findTab(SCTAB nTab)
return itr->second;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/stringutil.cxx b/sc/source/core/tool/stringutil.cxx
index f8be97e22449..fd20988e688c 100644
--- a/sc/source/core/tool/stringutil.cxx
+++ b/sc/source/core/tool/stringutil.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -138,3 +139,5 @@ bool ScStringUtil::parseSimpleNumber(
return true;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/subtotal.cxx b/sc/source/core/tool/subtotal.cxx
index 077b5a9d9751..7f211cef4033 100644
--- a/sc/source/core/tool/subtotal.cxx
+++ b/sc/source/core/tool/subtotal.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -79,3 +80,5 @@ BOOL SubTotal::SafeDiv(double& fVal1, double fVal2)
}
return bOk;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 2dd6dc1ff7ea..7c972250c7d2 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1795,3 +1796,4 @@ void ScTokenArray::ReadjustRelative3DReferences( const ScAddress& rOldPos,
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/unitconv.cxx b/sc/source/core/tool/unitconv.cxx
index 21f80cb1c628..918060b12751 100644
--- a/sc/source/core/tool/unitconv.cxx
+++ b/sc/source/core/tool/unitconv.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -176,3 +177,4 @@ BOOL ScUnitConverter::GetValue( double& fValue, const String& rFromUnit,
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/userlist.cxx b/sc/source/core/tool/userlist.cxx
index 08609eeff940..deb070005653 100644
--- a/sc/source/core/tool/userlist.cxx
+++ b/sc/source/core/tool/userlist.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -295,3 +296,4 @@ BOOL ScUserList::HasEntry( const String& rStr ) const
return FALSE;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/viewopti.cxx b/sc/source/core/tool/viewopti.cxx
index 3b85e4977510..4c01f443d0db 100644
--- a/sc/source/core/tool/viewopti.cxx
+++ b/sc/source/core/tool/viewopti.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -748,3 +749,4 @@ void ScViewCfg::SetOptions( const ScViewOptions& rNew )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/zforauto.cxx b/sc/source/core/tool/zforauto.cxx
index b505e5a5051c..0b9f116aa153 100644
--- a/sc/source/core/tool/zforauto.cxx
+++ b/sc/source/core/tool/zforauto.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -104,3 +105,5 @@ ULONG ScNumFormatAbbrev::GetFormatIndex( SvNumberFormatter& rFormatter)
return rFormatter.GetIndexPuttingAndConverting( sFormatstring, eLnge,
eSysLnge, nType, bNewInserted, nCheckPos);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/dif/difexp.cxx b/sc/source/filter/dif/difexp.cxx
index 69421879983e..0a04d2ca7d6f 100644
--- a/sc/source/filter/dif/difexp.cxx
+++ b/sc/source/filter/dif/difexp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -315,3 +316,4 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/dif/difimp.cxx b/sc/source/filter/dif/difimp.cxx
index 2088cc84a791..3165ca2b5f4c 100644
--- a/sc/source/filter/dif/difimp.cxx
+++ b/sc/source/filter/dif/difimp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1006,3 +1007,4 @@ void DifAttrCache::Apply( ScDocument& rDoc, SCTAB nTab )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/dif/makefile.mk b/sc/source/filter/dif/makefile.mk
index c24de4cb4164..70944b9f9536 100644
--- a/sc/source/filter/dif/makefile.mk
+++ b/sc/source/filter/dif/makefile.mk
@@ -38,9 +38,7 @@ PROJECTPCHSOURCE=..\pch\filt_pch
# --- Settings -----------------------------------------------------
-.INCLUDE : scpre.mk
.INCLUDE : settings.mk
-.INCLUDE : sc.mk
# --- Files --------------------------------------------------------
diff --git a/sc/source/filter/excel/colrowst.cxx b/sc/source/filter/excel/colrowst.cxx
index 417f7aa525d3..6905d295009d 100644
--- a/sc/source/filter/excel/colrowst.cxx
+++ b/sc/source/filter/excel/colrowst.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -363,3 +364,4 @@ void XclImpColRowSettings::ConvertHiddenFlags( SCTAB nScTab )
rDoc.ShowRows( mnLastScRow + 1, MAXROW, nScTab, FALSE );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx
index 458629979172..085f38129c33 100644
--- a/sc/source/filter/excel/excdoc.cxx
+++ b/sc/source/filter/excel/excdoc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -84,6 +85,8 @@
#include <math.h>
+#include <com/sun/star/document/XDocumentProperties.hpp>
+#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <oox/core/tokens.hxx>
using ::rtl::OString;
@@ -119,27 +122,22 @@ static void lcl_AddCalcPr( XclExpRecordList<>& aRecList, ExcTable& self )
aRecList.AppendNewRecord( new XclExpXmlEndSingleElementRecord() ); // XML_calcPr
}
-#if 0
-// removed during rebase, because scsheetprotection02 is not yet up-stream :-(
static void lcl_AddWorkbookProtection( XclExpRecordList<>& aRecList, ExcTable& self )
{
aRecList.AppendNewRecord( new XclExpXmlStartSingleElementRecord( XML_workbookProtection ) );
+
const ScDocProtection* pProtect = self.GetDoc().GetDocProtection();
if (pProtect && pProtect->isProtected())
{
aRecList.AppendNewRecord( new XclExpWindowProtection(pProtect->isOptionEnabled(ScDocProtection::WINDOWS)) );
aRecList.AppendNewRecord( new XclExpProtection(pProtect->isOptionEnabled(ScDocProtection::STRUCTURE)) );
+#if ENABLE_SHEET_PROTECTION
aRecList.AppendNewRecord( new XclExpPassHash(pProtect->getPasswordHash(PASSHASH_XL)) );
+#endif
}
- if( self.GetBiff() == EXC_BIFF8 )
- {
- aRecList.AppendNewRecord( new XclExpProt4Rev );
- aRecList.AppendNewRecord( new XclExpProt4RevPass );
- }
aRecList.AppendNewRecord( new XclExpXmlEndSingleElementRecord() ); // XML_workbookProtection
}
-#endif
static void lcl_AddScenariosAndFilters( XclExpRecordList<>& aRecList, const XclExpRoot& rRoot, SCTAB nScTab )
{
@@ -267,30 +265,25 @@ void ExcTable::FillAsHeader( ExcBoundsheetList& rBoundsheetList )
}
// document protection options
- const ScDocProtection* pProtect = GetDoc().GetDocProtection();
- if (pProtect && pProtect->isProtected())
+ if( GetOutput() == EXC_OUTPUT_BINARY )
{
- Add( new XclExpWindowProtection(pProtect->isOptionEnabled(ScDocProtection::WINDOWS)) );
- Add( new XclExpProtection(pProtect->isOptionEnabled(ScDocProtection::STRUCTURE)) );
-#if ENABLE_SHEET_PROTECTION
- Add( new XclExpPassHash(pProtect->getPasswordHash(PASSHASH_XL)) );
-#endif
- }
+ lcl_AddWorkbookProtection( aRecList, *this );
- if( GetBiff() == EXC_BIFF8 )
- {
- Add( new XclExpProt4Rev );
- Add( new XclExpProt4RevPass );
- }
+ if( GetBiff() == EXC_BIFF8 )
+ {
+ Add( new XclExpProt4Rev );
+ Add( new XclExpProt4RevPass );
+ }
- // document protection options
- if( GetOutput() == EXC_OUTPUT_BINARY )
- {
- //lcl_AddWorkbookProtection( aRecList, *this );
lcl_AddBookviews( aRecList, *this );
}
Add( new XclExpXmlStartSingleElementRecord( XML_workbookPr ) );
+ if ( GetBiff() == EXC_BIFF8 && GetOutput() != EXC_OUTPUT_BINARY )
+ {
+ Add( new XclExpBoolRecord(0x0040, false, XML_backupFile ) ); // BACKUP
+ Add( new XclExpBoolRecord(0x008D, false, XML_showObjects ) ); // HIDEOBJ
+ }
if ( GetBiff() == EXC_BIFF8 )
{
@@ -374,7 +367,7 @@ void ExcTable::FillAsHeader( ExcBoundsheetList& rBoundsheetList )
if( GetOutput() != EXC_OUTPUT_BINARY )
{
- //lcl_AddWorkbookProtection( aRecList, *this );
+ lcl_AddWorkbookProtection( aRecList, *this );
lcl_AddBookviews( aRecList, *this );
}
@@ -635,6 +628,9 @@ void ExcTable::FillAsXmlTable( SCTAB nCodeNameIdx )
}
}
+ // all MSODRAWING and OBJ stuff of this sheet goes here
+ aRecList.AppendRecord( GetObjectManager().ProcessDrawing( GetSdrPage( mnScTab ) ) );
+
// EOF
Add( new ExcEof );
}
@@ -785,48 +781,49 @@ void ExcDocument::Write( SvStream& rSvStrm )
pExpChangeTrack->Write();
}
-void ExcDocument::WriteXml( SvStream& rStrm )
+void ExcDocument::WriteXml( XclExpXmlStream& rStrm )
{
+ SfxObjectShell* pDocShell = GetDocShell();
+
+ using namespace ::com::sun::star;
+ uno::Reference<document::XDocumentPropertiesSupplier> xDPS( pDocShell->GetModel(), uno::UNO_QUERY_THROW );
+ uno::Reference<document::XDocumentProperties> xDocProps = xDPS->getDocumentProperties();
+
+ rStrm.exportDocumentProperties( xDocProps );
+
+ sax_fastparser::FSHelperPtr& rWorkbook = rStrm.GetCurrentStream();
+ rWorkbook->startElement( XML_workbook,
+ XML_xmlns, "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
+ FSNS(XML_xmlns, XML_r), "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
+ FSEND );
+ rWorkbook->singleElement( XML_fileVersion,
+ XML_appName, "Calc",
+ // OOXTODO: XML_codeName
+ // OOXTODO: XML_lastEdited
+ // OOXTODO: XML_lowestEdited
+ // OOXTODO: XML_rupBuild
+ FSEND );
+
if( !maTableList.IsEmpty() )
{
InitializeSave();
- XclExpXmlStream aStrm( ::comphelper::getProcessServiceFactory(), rStrm, GetRoot() );
-
- sax_fastparser::FSHelperPtr& rWorkbook = aStrm.GetCurrentStream();
- rWorkbook->startElement( XML_workbook,
- XML_xmlns, "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
- FSNS(XML_xmlns, XML_r), "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
- FSEND );
- rWorkbook->singleElement( XML_fileVersion,
- XML_appName, "Calc",
- // OOXTODO: XML_codeName
- // OOXTODO: XML_lastEdited
- // OOXTODO: XML_lowestEdited
- // OOXTODO: XML_rupBuild
- FSEND );
-
- aHeader.WriteXml( aStrm );
+ aHeader.WriteXml( rStrm );
for( size_t nTab = 0, nTabCount = maTableList.GetSize(); nTab < nTabCount; ++nTab )
{
- // set current stream position in BOUNDSHEET record
-#if 0
- ExcBoundsheetRef xBoundsheet = maBoundsheetList.GetRecord( nTab );
- if( xBoundsheet.get() )
- xBoundsheet->SetStreamPos( aXclStrm.GetSvStreamPos() );
-#endif
// write the table
- maTableList.GetRecord( nTab )->WriteXml( aStrm );
+ maTableList.GetRecord( nTab )->WriteXml( rStrm );
}
-
- rWorkbook->endElement( XML_workbook );
- rWorkbook.reset();
- aStrm.commitStorage();
}
-#if 0
+
if( pExpChangeTrack )
- pExpChangeTrack->WriteXml();
-#endif
+ pExpChangeTrack->WriteXml( rStrm );
+
+ rWorkbook->endElement( XML_workbook );
+ rWorkbook.reset();
+
+ rStrm.commitStorage();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/excel.cxx b/sc/source/filter/excel/excel.cxx
index 3a43a23cd624..c0012c5519f7 100644
--- a/sc/source/filter/excel/excel.cxx
+++ b/sc/source/filter/excel/excel.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -261,25 +262,10 @@ static FltError lcl_ExportExcelBiff( SfxMedium& rMedium, ScDocument *pDocument,
return eRet;
}
-static FltError lcl_ExportExcel2007Xml( SfxMedium& rMedium, ScDocument *pDocument,
- SvStream* pMedStrm, CharSet eNach )
-{
- SotStorageRef xRootStrg = (SotStorage*) 0;
-
- XclExpRootData aExpData( EXC_BIFF8, rMedium, xRootStrg, *pDocument, eNach );
- aExpData.meOutput = EXC_OUTPUT_XML_2007;
-
- ExportXml2007 aFilter( aExpData, *pMedStrm );
-
- FltError eRet = aFilter.Write();
-
- return eRet;
-}
-
FltError ScFormatFilterPluginImpl::ScExportExcel5( SfxMedium& rMedium, ScDocument *pDocument,
ExportFormatExcel eFormat, CharSet eNach )
{
- if( eFormat != ExpBiff5 && eFormat != ExpBiff8 && eFormat != Exp2007Xml )
+ if( eFormat != ExpBiff5 && eFormat != ExpBiff8 )
return eERR_NI;
// check the passed Calc document
@@ -294,11 +280,10 @@ FltError ScFormatFilterPluginImpl::ScExportExcel5( SfxMedium& rMedium, ScDocumen
FltError eRet = eERR_UNKN_BIFF;
if( eFormat == ExpBiff5 || eFormat == ExpBiff8 )
eRet = lcl_ExportExcelBiff( rMedium, pDocument, pMedStrm, eFormat == ExpBiff8, eNach );
- else if( eFormat == Exp2007Xml )
- eRet = lcl_ExportExcel2007Xml( rMedium, pDocument, pMedStrm, eNach );
return eRet;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/excform.cxx b/sc/source/filter/excel/excform.cxx
index 1157a9cc2cf6..16807b7bf4ad 100644
--- a/sc/source/filter/excel/excform.cxx
+++ b/sc/source/filter/excel/excform.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -160,12 +161,7 @@ void ImportExcel::Formula( const XclAddress& rXclPos,
{
if( eErr != ConvOK )
ExcelToSc::SetError( *pZelle, eErr );
-#if 0
- else
- ExcelToSc::SetCurVal( *pZelle, rCurVal );
-#else
(void)rCurVal;
-#endif
}
GetXFRangeBuffer().SetXF( aScPos, nXF );
@@ -426,9 +422,6 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s
case 0x1C: // Error Value [314 266]
{
aIn >> nByte;
-#if 0 // erAck
- aPool.StoreError( XclTools::GetScErrorCode( nByte ) );
-#else
DefTokenId eOc;
switch( nByte )
{
@@ -444,7 +437,6 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s
aPool << eOc;
if( eOc != ocStop )
aPool << ocOpen << ocClose;
-#endif
aPool >> aStack;
}
break;
@@ -1776,54 +1768,6 @@ BOOL ExcelToSc::GetShrFmla( const ScTokenArray*& rpErgebnis, XclImpStream& aIn,
}
-#if 0
-BOOL ExcelToSc::SetCurVal( ScFormulaCell &rCell, double &rfCurVal )
-{
- UINT16 nInd;
- BYTE nType;
- BYTE nVal;
- BOOL bString = FALSE;
-
-#ifdef OSL_BIGENDIAN
- // Code fuer alle anstaendigen Prozessoren
- nType = *( ( ( BYTE * ) &rfCurVal ) + 7 );
- nVal = *( ( ( BYTE * ) &rfCurVal ) + 5 );
- nInd = *( ( UINT16 * ) &rfCurVal );
-#else
- // fuer Schund-Prozessoren
- nType = *( ( BYTE * ) &rfCurVal );
- nVal = *( ( ( BYTE * ) &rfCurVal ) + 2 );
- nInd = *( ( ( UINT16 * ) &rfCurVal ) + 3 );
-#endif
-
- if( ( UINT16 ) ~nInd )
- // Wert ist Float
- rCell.SetHybridDouble( rfCurVal );
- else
- {
- switch( nType )
- {
- case 0: // String
- bString = TRUE;
- break;
- case 1: // Bool
- if( nVal )
- rfCurVal = 1.0;
- else
- rfCurVal = 0.0;
- rCell.SetHybridDouble( rfCurVal );
- break;
- case 2: // Error
- rCell.SetErrCode( XclTools::GetScErrorCode( nVal ) );
- break;
- }
- }
-
- return bString;
-}
-#endif
-
-
void ExcelToSc::SetError( ScFormulaCell &rCell, const ConvErr eErr )
{
UINT16 nInd;
@@ -2012,3 +1956,4 @@ void ExcelToSc::ReadExtensions( const ExtensionTypeVec& rExtensions,
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/excform8.cxx b/sc/source/filter/excel/excform8.cxx
index c444de3c8eeb..b542a9bdd580 100644
--- a/sc/source/filter/excel/excform8.cxx
+++ b/sc/source/filter/excel/excform8.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -347,9 +348,7 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
case 0x1C: // Error Value [314 266]
{
aIn >> nByte;
-#if 0 // erAck
- aPool.StoreError( XclTools::GetScErrorCode( nByte ) );
-#else
+
DefTokenId eOc;
switch( nByte )
{
@@ -365,7 +364,6 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
aPool << eOc;
if( eOc != ocStop )
aPool << ocOpen << ocClose;
-#endif
aPool >> aStack;
}
break;
@@ -1595,3 +1593,4 @@ BOOL ExcelToSc8::GetAbsRefs( ScRangeList& r, XclImpStream& aIn, sal_Size nLen )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx
index f9d1b5b34f99..92eb3b565666 100644
--- a/sc/source/filter/excel/excimp8.cxx
+++ b/sc/source/filter/excel/excimp8.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -99,15 +100,20 @@
#include "stlpool.hxx"
#include "stlsheet.hxx"
#include "detfunc.hxx"
+#include "macromgr.hxx"
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
+#include <com/sun/star/script/ModuleInfo.hpp>
#include <cppuhelper/component_context.hxx>
#include <sfx2/app.hxx>
+#include "xltoolbar.hxx"
using namespace com::sun::star;
using ::rtl::OUString;
+// defined in docfunc.cxx ( really this needs a new name )
+script::ModuleInfo lcl_InitModuleInfo( SfxObjectShell& rDocSh, String& sModule );
ImportExcel8::ImportExcel8( XclImpRootData& rImpData, SvStream& rStrm ) :
ImportExcel( rImpData, rStrm )
@@ -242,7 +248,29 @@ void ImportExcel8::ReadBasic( void )
{
SvxImportMSVBasic aBasicImport( *pShell, *xRootStrg, bLoadCode, bLoadStrg );
bool bAsComment = !bLoadExecutable;
+
+ if ( !bAsComment )
+ {
+#if 1
+ // see if we have the XCB stream
+ SvStorageStreamRef xXCB = xRootStrg->OpenSotStream( String( RTL_CONSTASCII_USTRINGPARAM( "XCB" ) ), STREAM_STD_READ | STREAM_NOCREATE );
+ if ( xXCB.Is()|| SVSTREAM_OK == xXCB->GetError() )
+ {
+ CTBWrapper wrapper;
+ if ( wrapper.Read( xXCB ) )
+ {
+#if DEBUG
+ wrapper.Print( stderr );
+#endif
+ wrapper.ImportCustomToolBar( *pShell );
+ }
+ }
+#endif
+
+ }
aBasicImport.Import( EXC_STORAGE_VBA_PROJECT, EXC_STORAGE_VBA, bAsComment );
+ if ( !bAsComment )
+ GetObjectManager().SetOleNameOverrideInfo( aBasicImport.ControlNameForObjectId() );
}
}
}
@@ -726,3 +754,4 @@ XclImpAutoFilterData* XclImpAutoFilterBuffer::GetByTab( SCTAB nTab )
return NULL;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx
index 9a66325db419..04ce6cd050cf 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -154,6 +155,10 @@ void ExcRecord::WriteBody( XclExpStream& rStrm )
SaveCont( rStrm );
}
+void ExcRecord::SaveXml( XclExpXmlStream& /*rStrm*/ )
+{
+}
+
//--------------------------------------------------------- class ExcEmptyRec -
@@ -356,6 +361,7 @@ Exc1904::Exc1904( ScDocument& rDoc )
{
Date* pDate = rDoc.GetFormatTable()->GetNullDate();
bVal = pDate ? (*pDate == Date( 1, 1, 1904 )) : FALSE;
+ bDateCompatibility = pDate ? !( *pDate == Date( 30, 12, 1899 )) : FALSE;
}
@@ -367,9 +373,21 @@ UINT16 Exc1904::GetNum( void ) const
void Exc1904::SaveXml( XclExpXmlStream& rStrm )
{
- rStrm.WriteAttributes(
+ bool bISOIEC = ( rStrm.getVersion() == oox::core::ISOIEC_29500_2008 );
+
+ if( bISOIEC )
+ {
+ rStrm.WriteAttributes(
+ XML_dateCompatibility, XclXmlUtils::ToPsz( bDateCompatibility ),
+ FSEND );
+ }
+
+ if( !bISOIEC || bDateCompatibility )
+ {
+ rStrm.WriteAttributes(
XML_date1904, XclXmlUtils::ToPsz( bVal ),
FSEND );
+ }
}
@@ -838,6 +856,7 @@ ExcAutoFilterRecs::ExcAutoFilterRecs( const XclExpRoot& rRoot, SCTAB nTab ) :
XclExpRoot( rRoot ),
pFilterMode( NULL ),
pFilterInfo( NULL )
+ , mbAutoFilter (false)
{
ScDBCollection& rDBColl = GetDatabaseRanges();
XclExpNameManager& rNameMgr = GetNameManager();
@@ -938,6 +957,9 @@ ExcAutoFilterRecs::ExcAutoFilterRecs( const XclExpRoot& rRoot, SCTAB nTab ) :
if( !maFilterList.IsEmpty() )
pFilterMode = new XclExpFiltermode;
pFilterInfo = new XclExpAutofilterinfo( aRange.aStart, nColCnt );
+
+ if (maFilterList.IsEmpty () && !bConflict)
+ mbAutoFilter = true;
}
}
}
@@ -995,7 +1017,7 @@ void ExcAutoFilterRecs::Save( XclExpStream& rStrm )
void ExcAutoFilterRecs::SaveXml( XclExpXmlStream& rStrm )
{
- if( maFilterList.IsEmpty() )
+ if( maFilterList.IsEmpty() && !mbAutoFilter )
return;
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
@@ -1003,7 +1025,8 @@ void ExcAutoFilterRecs::SaveXml( XclExpXmlStream& rStrm )
XML_ref, XclXmlUtils::ToOString( maRef ).getStr(),
FSEND );
// OOXTODO: XML_extLst, XML_sortState
- maFilterList.SaveXml( rStrm );
+ if( !maFilterList.IsEmpty() )
+ maFilterList.SaveXml( rStrm );
rWorksheet->endElement( XML_autoFilter );
}
@@ -1049,3 +1072,4 @@ bool XclExpFilterManager::HasFilterMode( SCTAB nScTab )
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/exctools.cxx b/sc/source/filter/excel/exctools.cxx
index 6dd853ef17df..e638236e34c8 100644
--- a/sc/source/filter/excel/exctools.cxx
+++ b/sc/source/filter/excel/exctools.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -334,3 +335,4 @@ void ExcScenarioList::Apply( const XclImpRoot& rRoot )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/expop2.cxx b/sc/source/filter/excel/expop2.cxx
index dbe70ae6a0ee..643b557300c6 100644
--- a/sc/source/filter/excel/expop2.cxx
+++ b/sc/source/filter/excel/expop2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -147,73 +148,4 @@ ExportBiff8::ExportBiff8( XclExpRootData& rExpData, SvStream& rStrm ) :
ExportBiff8::~ExportBiff8()
{
}
-
-
-ExportXml2007::ExportXml2007( XclExpRootData& rExpData, SvStream& rStrm )
- : ExportTyp( rStrm, &rExpData.mrDoc, rExpData.meTextEnc )
- , XclExpRoot( rExpData )
-{
- pExcRoot = &GetOldRoot();
- pExcRoot->pER = this;
- pExcRoot->eDateiTyp = Biff8;
- pExcDoc = new ExcDocument( *this );
-}
-
-
-ExportXml2007::~ExportXml2007()
-{
- delete pExcDoc;
-}
-
-
-FltError ExportXml2007::Write()
-{
- SfxObjectShell* pDocShell = GetDocShell();
- DBG_ASSERT( pDocShell, "ExportXml2007::Write - no document shell" );
-
- SotStorageRef xRootStrg = GetRootStorage();
- DBG_ASSERT( xRootStrg.Is(), "ExportXml2007::Write - no root storage" );
-
- bool bWriteBasicCode = false;
- bool bWriteBasicStrg = false;
-
- if( SvtFilterOptions* pFilterOpt = SvtFilterOptions::Get() )
- {
- bWriteBasicCode = pFilterOpt->IsLoadExcelBasicCode();
- bWriteBasicStrg = pFilterOpt->IsLoadExcelBasicStorage();
- }
-
- if( pDocShell && xRootStrg.Is() && bWriteBasicStrg )
- {
- SvxImportMSVBasic aBasicImport( *pDocShell, *xRootStrg, bWriteBasicCode, bWriteBasicStrg );
- ULONG nErr = aBasicImport.SaveOrDelMSVBAStorage( TRUE, EXC_STORAGE_VBA_PROJECT );
- if( nErr != ERRCODE_NONE )
- pDocShell->SetError( nErr, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
- }
-
- pExcDoc->ReadDoc(); // ScDoc -> ExcDoc
- pExcDoc->WriteXml( aOut ); // wechstreamen
-
- if( pDocShell && xRootStrg.Is() )
- {
- using namespace ::com::sun::star;
- uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
- pDocShell->GetModel(), uno::UNO_QUERY_THROW);
- uno::Reference<document::XDocumentProperties> xDocProps
- = xDPS->getDocumentProperties();
- ::boost::shared_ptr<GDIMetaFile> pMetaFile =
- pDocShell->GetPreviewMetaFile (sal_False);
- uno::Sequence<sal_uInt8> metaFile(
- sfx2::convertMetaFile(pMetaFile.get()));
- sfx2::SaveOlePropertySet(xDocProps, xRootStrg, &metaFile);
- }
-
- //! TODO: separate warnings for columns and sheets
- const XclExpAddressConverter& rAddrConv = GetAddressConverter();
- if( rAddrConv.IsColTruncated() || rAddrConv.IsRowTruncated() || rAddrConv.IsTabTruncated() )
- return SCWARN_EXPORT_MAXROW;
-
- return eERR_OK;
-}
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/fontbuff.cxx b/sc/source/filter/excel/fontbuff.cxx
index dca6723181ae..21f99163f52a 100644
--- a/sc/source/filter/excel/fontbuff.cxx
+++ b/sc/source/filter/excel/fontbuff.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -161,3 +162,4 @@ void LotusFontBuffer::MakeFont( ENTRY* pEntry )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/frmbase.cxx b/sc/source/filter/excel/frmbase.cxx
index eb3ddd541725..721ebb72f1b4 100644
--- a/sc/source/filter/excel/frmbase.cxx
+++ b/sc/source/filter/excel/frmbase.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -276,3 +277,4 @@ void LotusConverterBase::Reset( const ScAddress& rEingPos )
aEingPos = rEingPos;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx
index 16307e6b7116..0ca50c16a52c 100644
--- a/sc/source/filter/excel/impop.cxx
+++ b/sc/source/filter/excel/impop.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1337,3 +1338,5 @@ void XclImpOutlineDataBuffer::Convert()
mxColRowBuff->ConvertHiddenFlags( mnScTab );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/makefile.mk b/sc/source/filter/excel/makefile.mk
index 04ba76d4a68a..c9618737a516 100644
--- a/sc/source/filter/excel/makefile.mk
+++ b/sc/source/filter/excel/makefile.mk
@@ -40,9 +40,7 @@ VISIBILITY_HIDDEN=TRUE
# --- Settings -----------------------------------------------------
-.INCLUDE : scpre.mk
.INCLUDE : settings.mk
-.INCLUDE : sc.mk
# --- Files --------------------------------------------------------
@@ -102,7 +100,8 @@ SLOFILES = \
$(SLO)$/xlstyle.obj \
$(SLO)$/xltools.obj \
$(SLO)$/xltracer.obj \
- $(SLO)$/xlview.obj
+ $(SLO)$/xlview.obj \
+ $(SLO)$/xltoolbar.obj \
.IF "$(OS)$(COM)$(CPUNAME)"=="LINUXGCCSPARC"
NOOPTFILES = \
@@ -151,6 +150,7 @@ EXCEPTIONSFILES = \
$(SLO)$/xlpivot.obj \
$(SLO)$/xlroot.obj \
$(SLO)$/xlstyle.obj \
+ $(SLO)$/xltoolbar.obj \
$(SLO)$/xltools.obj \
$(SLO)$/xlview.obj
diff --git a/sc/source/filter/excel/namebuff.cxx b/sc/source/filter/excel/namebuff.cxx
index 7db7d17ed307..098dd370092d 100644
--- a/sc/source/filter/excel/namebuff.cxx
+++ b/sc/source/filter/excel/namebuff.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -342,3 +343,4 @@ void ExtNameBuff::Reset( void )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/read.cxx b/sc/source/filter/excel/read.cxx
index e3e46add1c73..706aa9318622 100644
--- a/sc/source/filter/excel/read.cxx
+++ b/sc/source/filter/excel/read.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -832,6 +833,12 @@ FltError ImportExcel8::Read( void )
sal_Size nProgressBasePos = 0;
sal_Size nProgressBaseSize = 0;
+ bool bSheetHasCodeName = false;
+
+ std::vector< String > CodeNames;
+
+ std::vector < SCTAB > nTabsWithNoCodeName;
+
while( eAkt != EXC_STATE_END )
{
if( eAkt == EXC_STATE_BEFORE_SHEET )
@@ -913,6 +920,7 @@ FltError ImportExcel8::Read( void )
// #i62752# possible to have BIFF8 sheet without globals
NeueTabelle();
eAkt = EXC_STATE_SHEET_PRE; // Shrfmla Prefetch, Row-Prefetch
+ bSheetHasCodeName = false; // reset
aIn.StoreGlobalPosition();
}
}
@@ -1083,12 +1091,32 @@ FltError ImportExcel8::Read( void )
case EXC_ID2_DIMENSIONS:
case EXC_ID3_DIMENSIONS: ReadDimensions(); break;
- case EXC_ID_CODENAME: ReadCodeName( aIn, false ); break;
+ case EXC_ID_CODENAME: ReadCodeName( aIn, false ); bSheetHasCodeName = true; break;
case 0x0A: // EOF [ 2345 ]
+ {
eAkt = EXC_STATE_SHEET;
+ String sName;
+ GetDoc().GetName( GetCurrScTab(), sName );
+ if ( !bSheetHasCodeName )
+ {
+ nTabsWithNoCodeName.push_back( GetCurrScTab() );
+ OSL_TRACE("No Codename for %d", GetCurrScTab() );
+ }
+ else
+ {
+ String sCodeName;
+ GetDoc().GetCodeName( GetCurrScTab(), sCodeName );
+ OSL_TRACE("Have CodeName %s for SheetName %s",
+ rtl::OUStringToOString( sCodeName, RTL_TEXTENCODING_UTF8 ).getStr(), rtl::OUStringToOString( sName, RTL_TEXTENCODING_UTF8 ).getStr() );
+ CodeNames.push_back( sCodeName );
+ }
+
+ bSheetHasCodeName = false; // reset
+
aIn.SeekGlobalPosition(); // und zurueck an alte Position
break;
+ }
case 0x12: SheetProtect(); break;
case 0x13: SheetPassword(); break;
case 0x42: Codepage(); break; // CODEPAGE [ 2345 ]
@@ -1207,6 +1235,41 @@ FltError ImportExcel8::Read( void )
if( eLastErr == eERR_OK )
{
+ // In some strange circumstances a the codename might be missing
+ // # Create any missing Sheet CodeNames
+ std::vector < SCTAB >::iterator it_end = nTabsWithNoCodeName.end();
+ for ( std::vector < SCTAB >::iterator it = nTabsWithNoCodeName.begin(); it != it_end; ++it )
+ {
+ SCTAB nTab = 1;
+ OSL_TRACE("Trying to find suitable codename for %d", *it );
+ while ( true )
+ {
+ String sTmpName( RTL_CONSTASCII_USTRINGPARAM("Sheet" ) );
+ sTmpName += String::CreateFromInt32( sal_Int32(nTab++) );
+ std::vector< String >::iterator codeName_It = CodeNames.begin();
+ std::vector< String >::iterator codeName_It_end = CodeNames.end();
+ // search for codename
+ for ( ; codeName_It != codeName_It_end; ++codeName_It )
+ {
+ if ( *codeName_It == sTmpName )
+ break;
+ }
+
+ if ( codeName_It == codeName_It_end ) // generated codename not found
+ {
+ OSL_TRACE("Using generated codename %s", rtl::OUStringToOString( sTmpName, RTL_TEXTENCODING_UTF8 ).getStr() );
+ // Set new codename
+ GetDoc().SetCodeName( *it, sTmpName );
+ // Record newly used codename
+ CodeNames.push_back( sTmpName );
+ // Record those we have created so they can be created in
+ // basic
+ AutoGeneratedCodeNames.push_back( sTmpName );
+ break;
+ }
+ }
+
+ }
// #i45843# Convert pivot tables before calculation, so they are available
// for the GETPIVOTDATA function.
if( GetBiff() == EXC_BIFF8 )
@@ -1245,3 +1308,4 @@ FltError ImportExcel8::Read( void )
//___________________________________________________________________
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/tokstack.cxx b/sc/source/filter/excel/tokstack.cxx
index b1f7dfe12db6..785162d7ab53 100644
--- a/sc/source/filter/excel/tokstack.cxx
+++ b/sc/source/filter/excel/tokstack.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -331,9 +332,6 @@ void TokenPool::GetElement( const UINT16 nId )
pScToken->AddDouble( pP_Dbl[ pElement[ nId ] ] );
break;
case T_Err:
-#if 0 // erAck
- pScToken->AddError( pP_Err[ pElement[ nId ] ] );
-#endif
break;
case T_RefC:
pScToken->AddSingleReference( *ppP_RefTr[ pElement[ (UINT16) nId ] ] );
@@ -446,9 +444,6 @@ void TokenPool::GetElementRek( const UINT16 nId )
pScToken->AddDouble( pP_Dbl[ pElement[ *pAkt ] ] );
break;
case T_Err:
-#if 0 // erAck
- pScToken->AddError( pP_Err[ pElement[ *pAkt ] ] );
-#endif
break;
case T_RefC:
pScToken->AddSingleReference( *ppP_RefTr[ pElement[ *pAkt ] ] );
@@ -853,3 +848,4 @@ ScMatrix* TokenPool::GetMatrix( unsigned int n ) const
return NULL;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx
index 7ca4bb724477..26d42d6c353b 100644
--- a/sc/source/filter/excel/xechart.cxx
+++ b/sc/source/filter/excel/xechart.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -3338,3 +3339,4 @@ XclExpChart::XclExpChart( const XclExpRoot& rRoot, Reference< XModel > xModel, c
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 7bfd57be7290..139f9c4e4af7 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -455,7 +456,16 @@ XclExpHyperlink::XclExpHyperlink( const XclExpRoot& rRoot, const SvxURLField& rU
else if( rUrl.GetChar( 0 ) == '#' ) // hack for #89066#
{
String aTextMark( rUrl.Copy( 1 ) );
- aTextMark.SearchAndReplace( '.', '!' );
+
+ xub_StrLen nSepPos = aTextMark.SearchAndReplace( '.', '!' );
+ String aSheetName( aTextMark.Copy(0, nSepPos));
+
+ if ( aSheetName.Search(' ') != STRING_NOTFOUND && aSheetName.GetChar(0) != '\'')
+ {
+ aTextMark.Insert('\'', nSepPos);
+ aTextMark.Insert('\'', 0);
+ }
+
mxTextMark.reset( new XclExpString( aTextMark, EXC_STR_FORCEUNICODE, 255 ) );
}
@@ -516,24 +526,31 @@ void XclExpHyperlink::WriteBody( XclExpStream& rStrm )
{
sal_uInt16 nXclCol = static_cast< sal_uInt16 >( maScPos.Col() );
sal_uInt16 nXclRow = static_cast< sal_uInt16 >( maScPos.Row() );
- mxVarData->Seek( STREAM_SEEK_TO_BEGIN );
+ rStrm << nXclRow << nXclRow << nXclCol << nXclCol;
+ WriteEmbeddedData( rStrm );
+}
- rStrm << nXclRow << nXclRow << nXclCol << nXclCol
- << XclTools::maGuidStdLink
+void XclExpHyperlink::WriteEmbeddedData( XclExpStream& rStrm )
+{
+ rStrm << XclTools::maGuidStdLink
<< sal_uInt32( 2 )
<< mnFlags;
+
+ mxVarData->Seek( STREAM_SEEK_TO_BEGIN );
rStrm.CopyFromStream( *mxVarData );
}
void XclExpHyperlink::SaveXml( XclExpXmlStream& rStrm )
{
- OUString sId = rStrm.addRelation( rStrm.GetCurrentStream()->getOutputStream(),
+ OUString sId = msTarget.getLength() ? rStrm.addRelation( rStrm.GetCurrentStream()->getOutputStream(),
XclXmlUtils::ToOUString( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" ),
msTarget,
- XclXmlUtils::ToOUString( "External" ) );
+ XclXmlUtils::ToOUString( "External" ) ) : OUString();
rStrm.GetCurrentStream()->singleElement( XML_hyperlink,
XML_ref, XclXmlUtils::ToOString( maScPos ).getStr(),
- FSNS( XML_r, XML_id ), XclXmlUtils::ToOString( sId ).getStr(),
+ FSNS( XML_r, XML_id ), sId.getLength()
+ ? XclXmlUtils::ToOString( sId ).getStr()
+ : NULL,
XML_location, mxTextMark.get() != NULL
? XclXmlUtils::ToOString( *mxTextMark ).getStr()
: NULL,
@@ -1156,7 +1173,8 @@ void XclExpDV::SaveXml( XclExpXmlStream& rStrm )
XML_operator, lcl_GetOperatorType( mnFlags ),
XML_prompt, XESTRING_TO_PSZ( maPromptText ),
XML_promptTitle, XESTRING_TO_PSZ( maPromptTitle ),
- XML_showDropDown, XclXmlUtils::ToPsz( ! ::get_flag( mnFlags, EXC_DV_SUPPRESSDROPDOWN ) ),
+ // showDropDown should have been showNoDropDown - check oox/xlsx import for details
+ XML_showDropDown, XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_DV_SUPPRESSDROPDOWN ) ),
XML_showErrorMessage, XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_DV_SHOWERROR ) ),
XML_showInputMessage, XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_DV_SHOWPROMPT ) ),
XML_sqref, XclXmlUtils::ToOString( maScRanges ).getStr(),
@@ -1460,3 +1478,4 @@ XclExpWebQueryBuffer::XclExpWebQueryBuffer( const XclExpRoot& rRoot )
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index 0509f2afa5fa..43abdbec64b8 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,6 +42,10 @@
#include <com/sun/star/form/binding/XListEntrySink.hpp>
#include <com/sun/star/form/binding/XListEntrySource.hpp>
#include <com/sun/star/script/ScriptEventDescriptor.hpp>
+#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <com/sun/star/awt/Point.hpp>
+#include <com/sun/star/awt/Size.hpp>
+#include <com/sun/star/container/XNamed.hpp>
#include <set>
#include <rtl/ustrbuf.h>
@@ -63,8 +68,27 @@
#include "xelink.hxx"
#include "xename.hxx"
#include "xestyle.hxx"
+#include "userdat.hxx"
+#include "drwlayer.hxx"
+#include "svx/unoapi.hxx"
+#include "svx/algitem.hxx"
+#include "scitems.hxx"
+#include <editeng/justifyitem.hxx>
+#include "svx/sdtaitm.hxx"
+#include "attrib.hxx"
+#include "document.hxx"
+#include <svx/svdattr.hxx>
+#include "svx/sdr/properties/properties.hxx"
+#include "detfunc.hxx"
+#include "svx/xflclit.hxx"
+#include "svx/xlnstwit.hxx"
+#include "svx/xlnstit.hxx"
+#include "svx/sxmspitm.hxx"
#include <oox/core/tokens.hxx>
+#include <oox/export/drawingml.hxx>
+#include <oox/export/chartexport.hxx>
+#include <oox/export/utils.hxx>
using ::rtl::OString;
using ::rtl::OUString;
@@ -86,6 +110,108 @@ using ::com::sun::star::form::binding::XListEntrySource;
using ::com::sun::star::script::ScriptEventDescriptor;
using ::com::sun::star::table::CellAddress;
using ::com::sun::star::table::CellRangeAddress;
+using ::com::sun::star::chart2::XChartDocument;
+using ::com::sun::star::container::XNamed;
+using ::oox::drawingml::DrawingML;
+using ::oox::drawingml::ChartExport;
+
+#define HMM2XL(x) ((x)/26.5)+0.5
+
+// Static Function Helpers
+static const char *ToHorizAlign( SdrTextHorzAdjust eAdjust )
+{
+ switch( eAdjust )
+ {
+ case SDRTEXTHORZADJUST_CENTER:
+ return "center";
+ case SDRTEXTHORZADJUST_RIGHT:
+ return "right";
+ case SDRTEXTHORZADJUST_BLOCK:
+ return "justify";
+ case SDRTEXTHORZADJUST_LEFT:
+ default:
+ return "left";
+ }
+ return "unknown";
+}
+
+static const char *ToVertAlign( SdrTextVertAdjust eAdjust )
+{
+ switch( eAdjust )
+ {
+ case SDRTEXTVERTADJUST_CENTER:
+ return "center";
+ case SDRTEXTVERTADJUST_BOTTOM:
+ return "bottom";
+ case SDRTEXTVERTADJUST_BLOCK:
+ return "justify";
+ case SDRTEXTVERTADJUST_TOP:
+ default:
+ return "top";
+ }
+ return "unknown";
+}
+
+static void lcl_WriteAnchorVertex( sax_fastparser::FSHelperPtr rComments, Rectangle &aRect )
+{
+ rComments->startElement( FSNS( XML_xdr, XML_col ), FSEND );
+ rComments->writeEscaped( OUString::valueOf( aRect.Left() ) );
+ rComments->endElement( FSNS( XML_xdr, XML_col ) );
+ rComments->startElement( FSNS( XML_xdr, XML_colOff ), FSEND );
+ rComments->writeEscaped( OUString::valueOf( aRect.Top() ) );
+ rComments->endElement( FSNS( XML_xdr, XML_colOff ) );
+ rComments->startElement( FSNS( XML_xdr, XML_row ), FSEND );
+ rComments->writeEscaped( OUString::valueOf( aRect.Right() ) );
+ rComments->endElement( FSNS( XML_xdr, XML_row ) );
+ rComments->startElement( FSNS( XML_xdr, XML_rowOff ), FSEND );
+ rComments->writeEscaped( OUString::valueOf( aRect.Bottom() ) );
+ rComments->endElement( FSNS( XML_xdr, XML_rowOff ) );
+}
+
+static void lcl_GetFromTo( const XclExpRoot& rRoot, const Rectangle &aRect, INT32 nTab, Rectangle &aFrom, Rectangle &aTo )
+{
+ bool bTo = false;
+ INT32 nCol = 0, nRow = 0;
+ INT32 nColOff = 0, nRowOff= 0;
+
+ while(1)
+ {
+ Rectangle r = rRoot.GetDocPtr()->GetMMRect( nCol,nRow,nCol,nRow,nTab );
+ if( !bTo )
+ {
+ if( r.Left() <= aRect.Left() )
+ {
+ nCol++;
+ nColOff = aRect.Left() - r.Left();
+ }
+ if( r.Top() <= aRect.Top() )
+ {
+ nRow++;
+ nRowOff = aRect.Top() - r.Top();
+ }
+ if( r.Left() > aRect.Left() && r.Top() > aRect.Top() )
+ {
+ aFrom = Rectangle( nCol-1, HMM2XL( nColOff ),
+ nRow-1, HMM2XL( nRowOff ) );
+ bTo=true;
+ }
+ }
+ if( bTo )
+ {
+ if( r.Right() < aRect.Right() )
+ nCol++;
+ if( r.Bottom() < aRect.Bottom() )
+ nRow++;
+ if( r.Right() >= aRect.Right() && r.Bottom() >= aRect.Bottom() )
+ {
+ aTo = Rectangle( nCol, HMM2XL( aRect.Right() - r.Left() ),
+ nRow, HMM2XL( aRect.Bottom() - r.Top() ));
+ break;
+ }
+ }
+ }
+ return;
+}
// Escher client anchor =======================================================
@@ -294,6 +420,17 @@ void XclExpImgData::Save( XclExpStream& rStrm )
}
}
+void XclExpImgData::SaveXml( XclExpXmlStream& rStrm )
+{
+ sax_fastparser::FSHelperPtr pWorksheet = rStrm.GetCurrentStream();
+
+ DrawingML aDML( pWorksheet, &rStrm, DrawingML::DOCUMENT_XLSX );
+ OUString rId = aDML.WriteImage( maGraphic );
+ pWorksheet->singleElement( XML_picture,
+ FSNS( XML_r, XML_id ), XclXmlUtils::ToOString( rId ).getStr(),
+ FSEND );
+}
+
// ============================================================================
XclExpControlHelper::XclExpControlHelper( const XclExpRoot& rRoot ) :
@@ -484,9 +621,9 @@ void XclExpOcxControlObj::WriteSubRecs( XclExpStream& rStrm )
#else
-XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rObjMgr, Reference< XShape > xShape, const Rectangle* pChildAnchor ) :
- XclObj( rObjMgr, EXC_OBJTYPE_UNKNOWN, true ),
- XclExpControlHelper( rObjMgr.GetRoot() ),
+XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference< XShape > xShape , const Rectangle* pChildAnchor ) :
+ XclObj( rRoot, EXC_OBJTYPE_UNKNOWN, true ),
+ XclMacroHelper( rRoot ),
mnHeight( 0 ),
mnState( 0 ),
mnLineCount( 0 ),
@@ -735,6 +872,8 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rObjMgr, Referenc
bool XclExpTbxControlObj::SetMacroLink( const ScriptEventDescriptor& rEvent )
{
+ return XclMacroHelper::SetMacroLink( rEvent, meEventType );
+/*
String aMacroName = XclControlHelper::ExtractFromMacroDescriptor( rEvent, meEventType );
if( aMacroName.Len() )
{
@@ -744,6 +883,7 @@ bool XclExpTbxControlObj::SetMacroLink( const ScriptEventDescriptor& rEvent )
return true;
}
return false;
+*/
}
void XclExpTbxControlObj::WriteSubRecs( XclExpStream& rStrm )
@@ -841,7 +981,7 @@ void XclExpTbxControlObj::WriteSubRecs( XclExpStream& rStrm )
}
else if( mnObjType == EXC_OBJTYPE_DROPDOWN )
{
- rStrm << sal_uInt16( 0 ) << mnLineCount;
+ rStrm << sal_uInt16( 0 ) << mnLineCount << sal_uInt16( 0 ) << sal_uInt16( 0 );
}
rStrm.EndRecord();
@@ -882,12 +1022,6 @@ void XclExpTbxControlObj::WriteSubRecs( XclExpStream& rStrm )
}
}
-void XclExpTbxControlObj::WriteMacroSubRec( XclExpStream& rStrm )
-{
- if( mxMacroLink.is() )
- WriteFormulaSubRec( rStrm, EXC_ID_OBJMACRO, *mxMacroLink );
-}
-
void XclExpTbxControlObj::WriteCellLinkSubRec( XclExpStream& rStrm, sal_uInt16 nSubRecId )
{
if( const XclTokenArray* pCellLink = GetCellLinkTokArr() )
@@ -920,7 +1054,7 @@ void XclExpTbxControlObj::WriteSbs( XclExpStream& rStrm )
XclExpChartObj::XclExpChartObj( XclExpObjectManager& rObjMgr, Reference< XShape > xShape, const Rectangle* pChildAnchor ) :
XclObj( rObjMgr, EXC_OBJTYPE_CHART ),
- XclExpRoot( rObjMgr.GetRoot() )
+ XclExpRoot( rObjMgr.GetRoot() ), mxShape( xShape )
{
// create the MSODRAWING record contents for the chart object
mrEscherEx.OpenContainer( ESCHER_SpContainer );
@@ -954,6 +1088,7 @@ XclExpChartObj::XclExpChartObj( XclExpObjectManager& rObjMgr, Reference< XShape
ScfPropertySet aShapeProp( xShape );
Reference< XModel > xModel;
aShapeProp.GetProperty( xModel, CREATE_OUSTRING( "Model" ) );
+ mxChartDoc.set( xModel,UNO_QUERY );
::com::sun::star::awt::Rectangle aBoundRect;
aShapeProp.GetProperty( aBoundRect, CREATE_OUSTRING( "BoundRect" ) );
Rectangle aChartRect( Point( aBoundRect.X, aBoundRect.Y ), Size( aBoundRect.Width, aBoundRect.Height ) );
@@ -972,6 +1107,118 @@ void XclExpChartObj::Save( XclExpStream& rStrm )
mxChart->Save( rStrm );
}
+void XclExpChartObj::SaveXml( XclExpXmlStream& rStrm )
+{
+ OSL_TRACE("XclExpChartObj::SaveXml -- Entry point to export chart");
+ sax_fastparser::FSHelperPtr pDrawing = rStrm.GetCurrentStream();
+
+ // FIXME: two cell? it seems the two cell anchor is incorrect.
+ pDrawing->startElement( FSNS( XML_xdr, XML_twoCellAnchor ), // OOXTODO: oneCellAnchor, absoluteAnchor
+ XML_editAs, "oneCell",
+ FSEND );
+ Reference< XPropertySet > xPropSet( mxShape, UNO_QUERY );
+ if (xPropSet.is())
+ {
+ XclObjAny::WriteFromTo( rStrm, mxShape, GetTab() );
+ Reference< XModel > xModel( mxChartDoc, UNO_QUERY );
+ ChartExport aChartExport( XML_xdr, pDrawing, xModel, &rStrm, DrawingML::DOCUMENT_XLSX );
+ static sal_Int32 nChartCount = 0;
+ nChartCount++;
+ aChartExport.WriteChartObj( mxShape, nChartCount );
+ // TODO: get the correcto chart number
+ //WriteChartObj( pDrawing, rStrm );
+ }
+
+ pDrawing->singleElement( FSNS( XML_xdr, XML_clientData),
+ // OOXTODO: XML_fLocksWithSheet
+ // OOXTODO: XML_fPrintsWithSheet
+ FSEND );
+ pDrawing->endElement( FSNS( XML_xdr, XML_twoCellAnchor ) );
+}
+
+void XclExpChartObj::WriteChartObj( sax_fastparser::FSHelperPtr pDrawing, XclExpXmlStream& rStrm )
+{
+ pDrawing->startElement( FSNS( XML_xdr, XML_graphicFrame ), FSEND );
+
+ pDrawing->startElement( FSNS( XML_xdr, XML_nvGraphicFramePr ), FSEND );
+
+ // TODO: get the correct chart name chart id
+ OUString sName = CREATE_OUSTRING("Object 1");
+ Reference< XNamed > xNamed( mxShape, UNO_QUERY );
+ if (xNamed.is())
+ {
+ sName = xNamed->getName();
+ }
+ sal_Int32 nID = rStrm.GetUniqueId();
+
+ pDrawing->singleElement( FSNS( XML_xdr, XML_cNvPr ),
+ XML_id, I32S( nID ),
+ XML_name, USS( sName ),
+ FSEND );
+
+ pDrawing->singleElement( FSNS( XML_xdr, XML_cNvGraphicFramePr ),
+ FSEND );
+
+ pDrawing->endElement( FSNS( XML_xdr, XML_nvGraphicFramePr ) );
+
+ // visual chart properties
+ //pDrawing->startElement( FSNS( XML_xdr, XML_xfrm ), FSEND );
+ WriteShapeTransformation( pDrawing, mxShape );
+ //pDrawing->endElement( FSNS( XML_xdr, XML_xfrm ) );
+
+ // writer chart object
+ pDrawing->startElement( FSNS( XML_a, XML_graphic ), FSEND );
+ pDrawing->startElement( FSNS( XML_a, XML_graphicData ),
+ XML_uri, "http://schemas.openxmlformats.org/drawingml/2006/chart",
+ FSEND );
+ OUString sId;
+ // TODO:
+ static sal_Int32 nChartCount = 0;
+ nChartCount++;
+ sax_fastparser::FSHelperPtr pChart = rStrm.CreateOutputStream(
+ XclXmlUtils::GetStreamName( "xl/", "charts/chart", nChartCount ),
+ XclXmlUtils::GetStreamName( "../", "charts/chart", nChartCount ),
+ rStrm.GetCurrentStream()->getOutputStream(),
+ "application/vnd.openxmlformats-officedocument.drawingml.chart+xml",
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",
+ &sId );
+
+ pDrawing->singleElement( FSNS( XML_c, XML_chart ),
+ FSNS( XML_xmlns, XML_c ), "http://schemas.openxmlformats.org/drawingml/2006/chart",
+ FSNS( XML_xmlns, XML_r ), "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
+ FSNS( XML_r, XML_id ), XclXmlUtils::ToOString( sId ).getStr(),
+ FSEND );
+
+ rStrm.PushStream( pChart );
+ Reference< XModel > xModel( mxChartDoc, UNO_QUERY );
+ ChartExport aChartExport( XML_xdr, pChart, xModel, &rStrm, DrawingML::DOCUMENT_XLSX );
+ aChartExport.ExportContent();
+
+ rStrm.PopStream();
+
+ pDrawing->endElement( FSNS( XML_a, XML_graphicData ) );
+ pDrawing->endElement( FSNS( XML_a, XML_graphic ) );
+ pDrawing->endElement( FSNS( XML_xdr, XML_graphicFrame ) );
+
+}
+
+void XclExpChartObj::WriteShapeTransformation( sax_fastparser::FSHelperPtr pFS, const XShapeRef& rXShape, sal_Bool bFlipH, sal_Bool bFlipV, sal_Int32 nRotation )
+{
+ ::com::sun::star::awt::Point aPos = rXShape->getPosition();
+ ::com::sun::star::awt::Size aSize = rXShape->getSize();
+
+ pFS->startElementNS( XML_xdr, XML_xfrm,
+ XML_flipH, bFlipH ? "1" : NULL,
+ XML_flipV, bFlipV ? "1" : NULL,
+ XML_rot, nRotation ? I32S( nRotation ) : NULL,
+ FSEND );
+
+ pFS->singleElementNS( XML_a, XML_off, XML_x, IS( MM100toEMU( aPos.X ) ), XML_y, IS( MM100toEMU( aPos.Y ) ), FSEND );
+ pFS->singleElementNS( XML_a, XML_ext, XML_cx, IS( MM100toEMU( aSize.Width ) ), XML_cy, IS( MM100toEMU( aSize.Height ) ), FSEND );
+
+ pFS->endElementNS( XML_xdr, XML_xfrm );
+}
+
// ============================================================================
XclExpNote::XclExpNote( const XclExpRoot& rRoot, const ScAddress& rScPos,
@@ -984,7 +1231,12 @@ XclExpNote::XclExpNote( const XclExpRoot& rRoot, const ScAddress& rScPos,
// get the main note text
String aNoteText;
if( pScNote )
+ {
aNoteText = pScNote->GetText();
+ const EditTextObject *pEditObj = pScNote->GetEditTextObject();
+ if( pEditObj )
+ mpNoteContents = XclExpStringHelper::CreateString( rRoot, *pEditObj );
+ }
// append additional text
ScGlobal::AddToken( aNoteText, rAddText, '\n', 2 );
maOrigNoteText = aNoteText;
@@ -1001,8 +1253,31 @@ XclExpNote::XclExpNote( const XclExpRoot& rRoot, const ScAddress& rScPos,
// TODO: additional text
if( pScNote )
if( SdrCaptionObj* pCaption = pScNote->GetOrCreateCaption( maScPos ) )
+ {
+ lcl_GetFromTo( rRoot, pCaption->GetLogicRect(), maScPos.Tab(), maCommentFrom, maCommentTo );
if( const OutlinerParaObject* pOPO = pCaption->GetOutlinerParaObject() )
- mnObjId = rRoot.GetObjectManager().AddObj( new XclObjComment( rRoot.GetObjectManager(), pCaption->GetLogicRect(), pOPO->GetTextObject(), pCaption, mbVisible ) );
+ mnObjId = rRoot.GetObjectManager().AddObj( new XclObjComment( rRoot.GetObjectManager(), pCaption->GetLogicRect(), pOPO->GetTextObject(), pCaption, mbVisible, maScPos, maCommentFrom, maCommentTo ) );
+
+ SfxItemSet aItemSet = pCaption->GetMergedItemSet();
+ meTVA = pCaption->GetTextVerticalAdjust();
+ meTHA = pCaption->GetTextHorizontalAdjust();
+ mbAutoScale = pCaption->GetFitToSize()?true:false;
+ mbLocked = pCaption->IsMoveProtect() | pCaption->IsResizeProtect();
+
+ // AutoFill style would change if Postit.cxx object creation values are changed
+ OUString aCol(((XFillColorItem &)GETITEM(aItemSet, XFillColorItem , XATTR_FILLCOLOR)).GetValue());
+ mbAutoFill = !aCol.getLength() && (GETITEMVALUE(aItemSet, XFillStyleItem, XATTR_FILLSTYLE, ULONG) == XFILL_SOLID);
+#if 0
+ // TODO: Get AutoLine bool
+ aCol = OUString(((XLineStartItem &)GETITEM(aItemSet, XLineStartItem, XATTR_LINESTART)).GetValue());
+ mbAutoLine = !aCol.getLength() &&
+ (GETITEMVALUE(aItemSet, XLineStartWidthItem, XATTR_LINESTARTWIDTH, ULONG) == 200) &&
+ (GETITEMBOOL(aItemSet, XATTR_LINESTARTCENTER) == FALSE);
+#endif
+ mbAutoLine = true;
+ mbRowHidden = (rRoot.GetDoc().RowHidden(maScPos.Row(),maScPos.Tab()));
+ mbColHidden = (rRoot.GetDoc().ColHidden(maScPos.Col(),maScPos.Tab()));
+ }
SetRecSize( 9 + maAuthor.GetSize() );
}
@@ -1086,15 +1361,119 @@ void XclExpNote::WriteXml( sal_Int32 nAuthorId, XclExpXmlStream& rStrm )
FSEND );
rComments->startElement( XML_text, FSEND );
// OOXTODO: phoneticPr, rPh, r
+#if 0
rComments->startElement( XML_t, FSEND );
rComments->writeEscaped( XclXmlUtils::ToOUString( maOrigNoteText ) );
rComments->endElement ( XML_t );
+#else
+ if( mpNoteContents.is() )
+ mpNoteContents->WriteXml( rStrm );
+#endif
rComments->endElement( XML_text );
+
+/*
+ Export of commentPr is disabled, since the current (Oct 2010)
+ version of MSO 2010 doesn't yet support commentPr
+ */
+#ifdef XLSX_OOXML_FUTURE
+ if( rStrm.getVersion() == oox::core::ISOIEC_29500_2008 )
+ {
+ rComments->startElement( XML_commentPr,
+ XML_autoFill, XclXmlUtils::ToPsz( mbAutoFill ),
+ XML_autoScale, XclXmlUtils::ToPsz( mbAutoScale ),
+ // XML_autoLine, XclXmlUtils::ToPsz( mbAutoLine ),
+ XML_colHidden, XclXmlUtils::ToPsz( mbColHidden ),
+ // XML_defaultSize, "true",
+ XML_locked, XclXmlUtils::ToPsz( mbLocked ),
+ XML_rowHidden, XclXmlUtils::ToPsz( mbRowHidden ),
+ XML_textHAlign, ToHorizAlign( meTHA ),
+ XML_textVAlign, ToVertAlign( meTVA ) ,
+ FSEND );
+ rComments->startElement( XML_anchor,
+ XML_moveWithCells, "false",
+ XML_sizeWithCells, "false",
+ FSEND );
+ rComments->startElement( FSNS( XML_xdr, XML_from ), FSEND );
+ lcl_WriteAnchorVertex( rComments, maCommentFrom );
+ rComments->endElement( FSNS( XML_xdr, XML_from ) );
+ rComments->startElement( FSNS( XML_xdr, XML_to ), FSEND );
+ lcl_WriteAnchorVertex( rComments, maCommentTo );
+ rComments->endElement( FSNS( XML_xdr, XML_to ) );
+ rComments->endElement( XML_anchor );
+ rComments->endElement( XML_commentPr );
+ }
+#endif
rComments->endElement( XML_comment );
}
// ============================================================================
+XclMacroHelper::XclMacroHelper( const XclExpRoot& rRoot ) :
+ XclExpControlHelper( rRoot )
+{
+}
+
+XclMacroHelper::~XclMacroHelper()
+{
+}
+
+void XclMacroHelper::WriteMacroSubRec( XclExpStream& rStrm )
+{
+ if( mxMacroLink.is() )
+ WriteFormulaSubRec( rStrm, EXC_ID_OBJMACRO, *mxMacroLink );
+}
+
+bool
+XclMacroHelper::SetMacroLink( const ScriptEventDescriptor& rEvent, const XclTbxEventType& nEventType )
+{
+ String aMacroName = XclControlHelper::ExtractFromMacroDescriptor( rEvent, nEventType, GetDocShell() );
+ if( aMacroName.Len() )
+ {
+ return SetMacroLink( aMacroName );
+ }
+ return false;
+}
+
+bool
+XclMacroHelper::SetMacroLink( const String& rMacroName )
+{
+ OSL_TRACE("SetMacroLink( macroname:=%s )", rtl::OUStringToOString( rMacroName, RTL_TEXTENCODING_UTF8 ).getStr() );
+ if( rMacroName.Len() )
+ {
+ sal_uInt16 nExtSheet = GetLocalLinkManager().FindExtSheet( EXC_EXTSH_OWNDOC );
+ sal_uInt16 nNameIdx = GetNameManager().InsertMacroCall( rMacroName, true, false );
+ mxMacroLink = GetFormulaCompiler().CreateNameXFormula( nExtSheet, nNameIdx );
+ return true;
+ }
+ return false;
+}
+
+XclExpShapeObj::XclExpShapeObj( XclExpObjectManager& rRoot, ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape ) :
+ XclObjAny( rRoot, xShape ),
+ XclMacroHelper( rRoot )
+{
+ if( SdrObject* pSdrObj = ::GetSdrObjectFromXShape( xShape ) )
+ {
+ ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pSdrObj );
+ if ( pInfo && pInfo->GetMacro().getLength() )
+// FIXME ooo330-m2: XclControlHelper::GetXclMacroName was removed in upstream sources; they started to call XclTools::GetXclMacroName instead; is this enough? it has only one parameter
+// SetMacroLink( XclControlHelper::GetXclMacroName( pInfo->GetMacro(), rRoot.GetDocShell() ) );
+ SetMacroLink( XclTools::GetXclMacroName( pInfo->GetMacro() ) );
+ }
+}
+
+XclExpShapeObj::~XclExpShapeObj()
+{
+}
+
+void XclExpShapeObj::WriteSubRecs( XclExpStream& rStrm )
+{
+ XclObjAny::WriteSubRecs( rStrm );
+ WriteMacroSubRec( rStrm );
+}
+
+// ============================================================================
+
XclExpComments::XclExpComments( SCTAB nTab, XclExpRecordList< XclExpNote >& rNotes )
: mnTab( nTab ), mrNotes( rNotes )
{
@@ -1104,7 +1483,7 @@ struct OUStringLess : public std::binary_function<OUString, OUString, bool>
{
bool operator()(const OUString& x, const OUString& y) const
{
- return x.compareTo( y ) <= 0;
+ return x.compareTo( y ) < 0;
}
};
@@ -1123,6 +1502,7 @@ void XclExpComments::SaveXml( XclExpXmlStream& rStrm )
rComments->startElement( XML_comments,
XML_xmlns, "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
+ FSNS( XML_xmlns, XML_xdr ), "http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing",
FSEND );
rComments->startElement( XML_authors, FSEND );
@@ -1282,3 +1662,4 @@ XclExpDffAnchorBase* XclExpEmbeddedObjectManager::CreateDffAnchor() const
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xeformula.cxx b/sc/source/filter/excel/xeformula.cxx
index 2b5d534c6d1e..9e2b69f33bb0 100644
--- a/sc/source/filter/excel/xeformula.cxx
+++ b/sc/source/filter/excel/xeformula.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1170,9 +1171,6 @@ XclExpScToken XclExpFmlaCompImpl::Factor( XclExpScToken aTokData )
case svUnknown: mxData->mbOk = false; break;
case svDouble: ProcessDouble( aTokData ); break;
case svString: ProcessString( aTokData ); break;
-#if 0 // erAck
- case svError: ProcessError( aTokData ); break;
-#endif
case svSingleRef: ProcessCellRef( aTokData ); break;
case svDoubleRef: ProcessRangeRef( aTokData ); break;
case svExternalSingleRef: ProcessExternalCellRef( aTokData ); break;
@@ -1220,11 +1218,7 @@ void XclExpFmlaCompImpl::ProcessString( const XclExpScToken& rTokData )
void XclExpFmlaCompImpl::ProcessError( const XclExpScToken& rTokData )
{
-#if 0 // erAck
- AppendErrorToken( XclTools::GetXclErrorCode( rTokData.mpScToken->GetError() ), rTokData.mnSpaces );
-#else
(void)rTokData; // compiler warning
-#endif
}
void XclExpFmlaCompImpl::ProcessMissing( const XclExpScToken& rTokData )
@@ -2644,3 +2638,4 @@ XclTokenArrayRef XclExpFormulaCompiler::CreateNameXFormula(
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index 5393e229e5c4..f715b781fa4a 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1126,3 +1127,4 @@ void XclExpCachedMatrix::Save( XclExpStream& rStrm ) const
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx
index c6570c2736b8..49520c08e0de 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -2363,3 +2364,4 @@ void XclExpLinkManager::Save( XclExpStream& rStrm )
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xename.cxx b/sc/source/filter/excel/xename.cxx
index 66e79aa4072b..0a244a2109a6 100644
--- a/sc/source/filter/excel/xename.cxx
+++ b/sc/source/filter/excel/xename.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -562,7 +563,7 @@ sal_uInt16 XclExpNameManagerImpl::CreateName( const ScRangeData& rRangeData )
xName->SetTokenArray( xTokArr );
String sSymbol;
- rRangeData.GetSymbol( sSymbol, formula::FormulaGrammar::GRAM_NATIVE_XL_A1 );
+ rRangeData.GetSymbol( sSymbol, formula::FormulaGrammar::GRAM_ENGLISH_XL_A1 );
xName->SetSymbol( sSymbol );
/* Try to replace by existing built-in name - complete token array is
@@ -784,3 +785,4 @@ void XclExpNameManager::SaveXml( XclExpXmlStream& rStrm )
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xepage.cxx b/sc/source/filter/excel/xepage.cxx
index 6194a04c27f6..4d3f3dae9d9e 100644
--- a/sc/source/filter/excel/xepage.cxx
+++ b/sc/source/filter/excel/xepage.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -96,25 +97,37 @@ XclExpSetup::XclExpSetup( const XclPageData& rPageData ) :
void XclExpSetup::SaveXml( XclExpXmlStream& rStrm )
{
- rStrm.GetCurrentStream()->singleElement( XML_pageSetup,
- XML_paperSize, OString::valueOf( (sal_Int32) mrData.mnPaperSize ).getStr(),
- XML_scale, OString::valueOf( (sal_Int32) mrData.mnScaling ).getStr(),
- XML_firstPageNumber, OString::valueOf( (sal_Int32) mrData.mnStartPage ).getStr(),
- XML_fitToWidth, OString::valueOf( (sal_Int32) mrData.mnFitToWidth ).getStr(),
- XML_fitToHeight, OString::valueOf( (sal_Int32) mrData.mnFitToHeight ).getStr(),
- XML_pageOrder, mrData.mbPrintInRows ? "overThenDown" : "downThenOver",
- XML_orientation, mrData.mbPortrait ? "portrait" : "landscape", // OOXTODO: "default"?
- XML_usePrinterDefaults, XclXmlUtils::ToPsz( !mrData.mbValid ),
- XML_blackAndWhite, XclXmlUtils::ToPsz( mrData.mbBlackWhite ),
- XML_draft, XclXmlUtils::ToPsz( mrData.mbDraftQuality ),
- XML_cellComments, mrData.mbPrintNotes ? "atEnd" : "none", // OOXTODO: "asDisplayed"?
- XML_useFirstPageNumber, XclXmlUtils::ToPsz( mrData.mbManualStart ),
- // OOXTODO: XML_errors, // == displayed|blank|dash|NA
- XML_horizontalDpi, OString::valueOf( (sal_Int32) mrData.mnHorPrintRes ).getStr(),
- XML_verticalDpi, OString::valueOf( (sal_Int32) mrData.mnVerPrintRes ).getStr(),
- XML_copies, OString::valueOf( (sal_Int32) mrData.mnCopies ).getStr(),
- // OOXTODO: devMode settings part RelationshipId: FSNS( XML_r, XML_id ),
- FSEND );
+ sax_fastparser::FastAttributeList* pAttrList=rStrm.GetCurrentStream()->createAttrList();
+ if( rStrm.getVersion() != oox::core::ISOIEC_29500_2008 ||
+ mrData.mnStrictPaperSize != EXC_PAPERSIZE_USER )
+ {
+ pAttrList->add( XML_paperSize, OString::valueOf( (sal_Int32) mrData.mnPaperSize ).getStr() );
+ }
+ else
+ {
+ pAttrList->add( XML_paperWidth, OString::valueOf( (sal_Int32) mrData.mnPaperWidth ).concat(OString("mm")).getStr() );
+ pAttrList->add( XML_paperHeight, OString::valueOf( (sal_Int32) mrData.mnPaperHeight ).concat(OString("mm")).getStr() );
+ // pAttrList->add( XML_paperUnits, "mm" );
+ }
+ pAttrList->add( XML_scale, OString::valueOf( (sal_Int32) mrData.mnScaling ).getStr() );
+ pAttrList->add( XML_firstPageNumber, OString::valueOf( (sal_Int32) mrData.mnStartPage ).getStr() );
+ pAttrList->add( XML_fitToWidth, OString::valueOf( (sal_Int32) mrData.mnFitToWidth ).getStr() );
+ pAttrList->add( XML_fitToHeight, OString::valueOf( (sal_Int32) mrData.mnFitToHeight ).getStr() );
+ pAttrList->add( XML_pageOrder, mrData.mbPrintInRows ? "overThenDown" : "downThenOver" );
+ pAttrList->add( XML_orientation, mrData.mbPortrait ? "portrait" : "landscape" ); // OOXTODO: "default"?
+ pAttrList->add( XML_usePrinterDefaults, XclXmlUtils::ToPsz( !mrData.mbValid ) );
+ pAttrList->add( XML_blackAndWhite, XclXmlUtils::ToPsz( mrData.mbBlackWhite ) );
+ pAttrList->add( XML_draft, XclXmlUtils::ToPsz( mrData.mbDraftQuality ) );
+ pAttrList->add( XML_cellComments, mrData.mbPrintNotes ? "atEnd" : "none" ); // OOXTODO: "asDisplayed"?
+ pAttrList->add( XML_useFirstPageNumber, XclXmlUtils::ToPsz( mrData.mbManualStart ) );
+ // OOXTODO: XML_errors, // == displayed|blank|dash|NA
+ pAttrList->add( XML_horizontalDpi, OString::valueOf( (sal_Int32) mrData.mnHorPrintRes ).getStr() );
+ pAttrList->add( XML_verticalDpi, OString::valueOf( (sal_Int32) mrData.mnVerPrintRes ).getStr() );
+ pAttrList->add( XML_copies, OString::valueOf( (sal_Int32) mrData.mnCopies ).getStr() );
+ // OOXTODO: devMode settings part RelationshipId: FSNS( XML_r, XML_id ),
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList > aAttrs(pAttrList);
+ rStrm.GetCurrentStream()->singleElement( XML_pageSetup, aAttrs );
}
void XclExpSetup::WriteBody( XclExpStream& rStrm )
@@ -412,3 +425,4 @@ void XclExpChartPageSettings::Save( XclExpStream& rStrm )
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index 1f3a263238a2..6a37382d70fe 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -736,9 +737,15 @@ void XclExpPivotCache::Save( XclExpStream& rStrm )
WriteCacheStream();
}
-void XclExpPivotCache::SaveXml( XclExpXmlStream& rStrm )
+void XclExpPivotCache::SaveXml( XclExpXmlStream&
+#ifdef XLSX_PIVOT_CACHE
+ rStrm
+#endif
+)
{
DBG_ASSERT( mbValid, "XclExpPivotCache::Save - invalid pivot cache" );
+#ifdef XLSX_PIVOT_CACHE /* <pivotCache> without xl/pivotCaches/ cacheStream
+ results in a broken .xlsx */
sax_fastparser::FSHelperPtr& rWorkbook = rStrm.GetCurrentStream();
OUString sId = OUStringBuffer()
.appendAscii("rId")
@@ -757,6 +764,7 @@ void XclExpPivotCache::SaveXml( XclExpXmlStream& rStrm )
// create the pivot cache storage stream
// OOXTODO: WriteCacheStream();
rWorkbook->endElement( XML_pivotCache );
+#endif /* XLSX_PIVOT_CACHE */
}
// private --------------------------------------------------------------------
@@ -1345,6 +1353,146 @@ void XclExpPivotTable::Save( XclExpStream& rStrm )
}
}
+void XclExpPivotTable::SaveXml( XclExpXmlStream& rStrm )
+{
+ if( !mbValid )
+ return;
+ sax_fastparser::FSHelperPtr aPivotTableDefinition = rStrm.CreateOutputStream(
+ XclXmlUtils::GetStreamName( "xl/", "pivotTables/pivotTable", mnOutScTab+1),
+ XclXmlUtils::GetStreamName( "../", "pivotTables/pivotTable", mnOutScTab+1),
+ rStrm.GetCurrentStream()->getOutputStream(),
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml",
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable");
+ rStrm.PushStream( aPivotTableDefinition );
+
+ aPivotTableDefinition->startElement( XML_pivotTableDefinition,
+ XML_xmlns, "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
+ XML_name, XclXmlUtils::ToOString( maPTInfo.maTableName ).getStr(),
+ XML_cacheId, OString::valueOf( (sal_Int32) maPTInfo.mnCacheIdx ).getStr(),
+ XML_dataOnRows, XclXmlUtils::ToPsz( maPTInfo.mnDataAxis == EXC_SXVD_AXIS_COL ),
+ XML_dataPosition, OString::valueOf( (sal_Int32) maPTInfo.mnDataPos ).getStr(),
+ XML_autoFormatId, OString::valueOf( (sal_Int32) maPTInfo.mnAutoFmtIdx ).getStr(),
+ // OOXTODO: XML_applyNumberFormats, [ SXVIEW fAtrNum (maPTInfo.mnFlags) ]
+ // OOXTODO: XML_applyBorderFormats, [ SXVIEW fAtrBdr (maPTInfo.mnFlags) ]
+ // OOXTODO: XML_applyFontFormats, [ SXVIEW fAtrFnt (maPTInfo.mnFlags) ]
+ // OOXTODO: XML_applyPatternFormats, [ SXVIEW fAtrPat (maPTInfo.mnFlags) ]
+ // OOXTODO: XML_applyAlignmentFormats, [ SXVIEW fAtrAlc (maPTInfo.mnFlags) ]
+ // OOXTODO: XML_applyWidthHeightFormats, [ SXVIEW fAtrProc (maPTInfo.mnFlags) ]
+ XML_dataCaption, XclXmlUtils::ToOString( maPTInfo.maDataName ).getStr(),
+ // OOXTODO: XML_grandTotalCaption, [ SxViewEx9 chGrand ]
+ // OOXTODO: XML_errorCaption, [ SXEx stError ]
+ // OOXTODO: XML_showError, [ SXEx fDisplayErrorString ]
+ // OOXTODO: XML_missingCaption, [ SXEx stDisplayNull ]
+ // OOXTODO: XML_showMissing, [ SXEx fDisplayNullString ]
+ // OOXTODO: XML_pageStyle, [ SXEx stPageFieldStyle ]
+ // OOXTODO: XML_pivotTableStyle, [ SXEx stTableStyle ]
+ // OOXTODO: XML_vacatedStyle, [ SXEx stVacateStyle ]
+ // OOXTODO: XML_tag, [ SXEx stTag ]
+ // OOXTODO: XML_updatedVersion, [ app-dependent ]
+ // OOXTODO: XML_minRefreshableVersion, [ app-dependent ]
+ // OOXTODO: XML_asteriskTotals, [ QsiSXTag/SXView9Save fHideTotAnnotation ]
+ // OOXTODO: XML_showItems, [ ??? ]
+ // OOXTODO: XML_editData, [ ??? ]
+ // OOXTODO: XML_disableFieldList, [ SXEx fEnableFieldDialog? ]
+ // OOXTODO: XML_showCalcMbrs, [ ??? ]
+ // OOXTODO: XML_visualTotals, [ ??? ]
+ // OOXTODO: XML_showMultipleLabel, [ SXEx fMergeLabels? ]
+ // OOXTODO: XML_showDataDropDown, [ SXEx fEnableDrillDown? ]
+ // OOXTODO: XML_showDrill, [ ??? ]
+ // OOXTODO: XML_printDrill, [ ??? ]
+ // OOXTODO: XML_showMemberPropertyTips,
+ // OOXTODO: XML_showDataTips,
+ // OOXTODO: XML_enableWizard,
+ XML_enableDrill, XclXmlUtils::ToPsz( maPTExtInfo.mnFlags & EXC_SXEX_DRILLDOWN ), // ???
+ // OOXTODO: XML_enableFieldProperties, [ SXEx fEnableFieldDialog (maPTExtInfo.mnFlags) ]
+ // OOXTODO: XML_preserveFormatting, [ SXEx fPreserveFormatting (maPTExtInfo.mnFlags) ]
+ // OOXTODO: XML_pageWrap, [ SXEx cWrapPage (maPTExtInfo.mnFlags) ]
+ // OOXTODO: XML_pageOverThenDown, [ SXEx fAcrossPageLay (maPTExtInfo.mnFlags) ]
+ // OOXTODO: XML_subtotalHiddenItems, [ SXEx fSubtotalHiddenPageItems (maPTExtInfo.mnFlags) ]
+ XML_rowGrandTotals, XclXmlUtils::ToPsz( maPTInfo.mnFlags & EXC_SXVIEW_ROWGRAND ),
+ XML_colGrandTotals, XclXmlUtils::ToPsz( maPTInfo.mnFlags & EXC_SXVIEW_COLGRAND ),
+ // OOXTODO: XML_fieldPrintTitles,
+ // OOXTODO: XML_itemPrintTitles,
+ // OOXTODO: XML_mergeItem,
+ // OOXTODO: XML_showDropZones,
+ // OOXTODO: XML_createdVersion,
+ // OOXTODO: XML_indent,
+ // OOXTODO: XML_showEmptyRow,
+ // OOXTODO: XML_showEmptyCol,
+ // OOXTODO: XML_showHeaders,
+ // OOXTODO: XML_compact,
+ // OOXTODO: XML_outline,
+ // OOXTODO: XML_outlineData,
+ // OOXTODO: XML_compactData,
+ // OOXTODO: XML_published,
+ // OOXTODO: XML_gridDropZones,
+ // OOXTODO: XML_immersive,
+ // OOXTODO: XML_multipleFieldFilters,
+ // OOXTODO: XML_chartFormat,
+ // OOXTODO: XML_rowHeaderCaption,
+ // OOXTODO: XML_colHeaderCaption,
+ // OOXTODO: XML_fieldListSortAscending,
+ // OOXTODO: XML_mdxSubqueries,
+ // OOXTODO: XML_customListSort,
+ FSEND );
+
+ aPivotTableDefinition->singleElement( XML_location,
+ XML_ref, XclXmlUtils::ToOString( maPTInfo.maOutXclRange ).getStr(),
+ XML_firstHeaderRow, OString::valueOf( (sal_Int32) maPTInfo.mnFirstHeadRow ).getStr(),
+ XML_firstDataRow, OString::valueOf( (sal_Int32) maPTInfo.maDataXclPos.mnRow ).getStr(),
+ XML_firstDataCol, OString::valueOf( (sal_Int32) maPTInfo.maDataXclPos.mnCol ).getStr(),
+ XML_rowPageCount, OString::valueOf( (sal_Int32) maPTInfo.mnDataRows ).getStr(), // OOXTODO?
+ XML_colPageCount, OString::valueOf( (sal_Int32) maPTInfo.mnDataCols ).getStr(), // OOXTODO?
+ FSEND );
+
+ // OOXTODO: XML_pivotFields
+
+ // maPTInfo.mnFields?
+ if( maPTInfo.mnRowFields )
+ {
+ aPivotTableDefinition->startElement( XML_rowFields,
+ XML_count, OString::valueOf( (sal_Int32) maPTInfo.mnRowFields ).getStr(),
+ FSEND );
+ aPivotTableDefinition->endElement( XML_rowFields );
+ }
+
+ // OOXTODO: XML_rowItems
+
+ if( maPTInfo.mnColFields )
+ {
+ aPivotTableDefinition->startElement( XML_colFields,
+ XML_count, OString::valueOf( (sal_Int32) maPTInfo.mnColFields ).getStr(),
+ FSEND );
+ aPivotTableDefinition->endElement( XML_colFields );
+ }
+
+ // OOXTODO: XML_colItems
+
+ if( maPTInfo.mnPageFields )
+ {
+ aPivotTableDefinition->startElement( XML_pageFields,
+ XML_count, OString::valueOf( (sal_Int32) maPTInfo.mnPageFields ).getStr(),
+ FSEND );
+ aPivotTableDefinition->endElement( XML_pageFields );
+ }
+
+ if( maPTInfo.mnDataFields )
+ {
+ aPivotTableDefinition->startElement( XML_dataFields,
+ XML_count, OString::valueOf( (sal_Int32) maPTInfo.mnDataFields ).getStr(),
+ FSEND );
+ aPivotTableDefinition->endElement( XML_dataFields );
+ }
+
+ // OOXTODO: XML_formats, XML_conditionalFormats, XML_chartFormats,
+ // XML_pivotHierarchies, XML_pivotTableStyleInfo, XML_filters,
+ // XML_rowHierarchiesUsage, XML_colHierarchiesUsage, XML_ext
+
+ aPivotTableDefinition->endElement( XML_pivotTableDefinition );
+
+ rStrm.PopStream();
+}
+
// private --------------------------------------------------------------------
XclExpPTField* XclExpPivotTable::GetFieldAcc( const String& rName )
@@ -1725,14 +1873,21 @@ void XclExpPivotTableManager::WritePivotCaches( XclExpStream& rStrm )
maPCacheList.Save( rStrm );
}
-void XclExpPivotTableManager::WritePivotCachesXml( XclExpXmlStream& rStrm )
+void XclExpPivotTableManager::WritePivotCachesXml( XclExpXmlStream&
+#ifdef XLSX_PIVOT_CACHE
+ rStrm
+#endif
+)
{
+#ifdef XLSX_PIVOT_CACHE /* <pivotCache> without xl/pivotCaches/ cacheStream
+ results in a broken .xlsx */
if( maPCacheList.IsEmpty() )
return;
sax_fastparser::FSHelperPtr& rWorkbook = rStrm.GetCurrentStream();
rWorkbook->startElement( XML_pivotCaches, FSEND );
maPCacheList.SaveXml( rStrm );
rWorkbook->endElement( XML_pivotCaches );
+#endif /* XLSX_PIVOT_CACHE */
}
void XclExpPivotTableManager::WritePivotTables( XclExpStream& rStrm, SCTAB nScTab )
@@ -1798,3 +1953,4 @@ const XclExpPivotCache* XclExpPivotTableManager::CreatePivotCache( const ScDPObj
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xerecord.cxx b/sc/source/filter/excel/xerecord.cxx
index fed58411aa5c..f02e2db82fc1 100644
--- a/sc/source/filter/excel/xerecord.cxx
+++ b/sc/source/filter/excel/xerecord.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -300,3 +301,4 @@ void XclExpSubStream::Save( XclExpStream& rStrm )
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xeroot.cxx b/sc/source/filter/excel/xeroot.cxx
index 50e07ae1f2ed..27c844360f49 100644
--- a/sc/source/filter/excel/xeroot.cxx
+++ b/sc/source/filter/excel/xeroot.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -267,3 +268,4 @@ XclExpRootData::XclExpLinkMgrRef XclExpRoot::GetLocalLinkMgrRef() const
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index 60bde56e827d..660ddd48c014 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,23 +43,39 @@
#include "xlstring.hxx"
#include "xeroot.hxx"
#include "xestyle.hxx"
+#include "xcl97rec.hxx"
#include "rangelst.hxx"
#include "compiler.hxx"
+#include <../../ui/inc/docsh.hxx>
+#include <../../ui/inc/viewdata.hxx>
+#include <excdoc.hxx>
+
#include <oox/core/tokens.hxx>
#include <formula/grammar.hxx>
+#include <oox/export/drawingml.hxx>
+
+#include <sfx2/docfile.hxx>
+#include <sfx2/objsh.hxx>
+#include <sfx2/app.hxx>
#define DEBUG_XL_ENCRYPTION 0
using ::com::sun::star::beans::PropertyValue;
+using ::com::sun::star::embed::XStorage;
using ::com::sun::star::io::XOutputStream;
using ::com::sun::star::io::XStream;
using ::com::sun::star::lang::XComponent;
using ::com::sun::star::lang::XMultiServiceFactory;
using ::com::sun::star::lang::XServiceInfo;
+using ::com::sun::star::lang::XSingleServiceFactory;
+using ::com::sun::star::registry::InvalidRegistryException;
+using ::com::sun::star::registry::XRegistryKey;
+using ::com::sun::star::uno::Exception;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::UNO_QUERY;
+using ::com::sun::star::uno::XInterface;
using ::rtl::OString;
using ::rtl::OUString;
using ::utl::OStreamWrapper;
@@ -643,6 +660,70 @@ void XclExpBiff8Encrypter::EncryptBytes( SvStream& rStrm, vector<sal_uInt8>& aBy
mnOldPos = nStrmPos;
}
+static const char* lcl_GetErrorString( USHORT nScErrCode )
+{
+ sal_uInt8 nXclErrCode = XclTools::GetXclErrorCode( nScErrCode );
+ switch( nXclErrCode )
+ {
+ case EXC_ERR_NULL: return "#NULL!";
+ case EXC_ERR_DIV0: return "#DIV/0!";
+ case EXC_ERR_VALUE: return "#VALUE!";
+ case EXC_ERR_REF: return "#REF!";
+ case EXC_ERR_NAME: return "#NAME?";
+ case EXC_ERR_NUM: return "#NUM!";
+ case EXC_ERR_NA:
+ default: return "#N/A";
+ }
+}
+
+void XclXmlUtils::GetFormulaTypeAndValue( ScFormulaCell& rCell, const char*& rsType, OUString& rsValue )
+{
+ switch( rCell.GetFormatType() )
+ {
+ case NUMBERFORMAT_NUMBER:
+ {
+ // either value or error code
+ USHORT nScErrCode = rCell.GetErrCode();
+ if( nScErrCode )
+ {
+ rsType = "e";
+ rsValue = ToOUString( lcl_GetErrorString( nScErrCode ) );
+ }
+ else
+ {
+ rsType = "n";
+ rsValue = OUString::valueOf( rCell.GetValue() );
+ }
+ }
+ break;
+
+ case NUMBERFORMAT_TEXT:
+ {
+ rsType = "str";
+ String aResult;
+ rCell.GetString( aResult );
+ rsValue = ToOUString( aResult );
+ }
+ break;
+
+ case NUMBERFORMAT_LOGICAL:
+ {
+ rsType = "b";
+ rsValue = ToOUString( rCell.GetValue() == 0.0 ? "0" : "1" );
+ }
+ break;
+
+ default:
+ {
+ rsType = "inlineStr";
+ String aResult;
+ rCell.GetString( aResult );
+ rsValue = ToOUString( aResult );
+ }
+ break;
+ }
+}
+
rtl::OUString XclXmlUtils::GetStreamName( const char* sStreamDir, const char* sStream, sal_Int32 nId )
{
rtl::OUStringBuffer sBuf;
@@ -734,6 +815,11 @@ static ScRange lcl_ToRange( const XclRange& rRange )
return aRange;
}
+rtl::OString XclXmlUtils::ToOString( const XclRange& rRange )
+{
+ return ToOString( lcl_ToRange( rRange ) );
+}
+
rtl::OString XclXmlUtils::ToOString( const XclRangeList& rRanges )
{
ScRangeList aRanges;
@@ -766,7 +852,7 @@ OUString XclXmlUtils::ToOUString( const String& s )
rtl::OUString XclXmlUtils::ToOUString( ScDocument& rDocument, const ScAddress& rAddress, ScTokenArray* pTokenArray )
{
ScCompiler aCompiler( &rDocument, rAddress, *pTokenArray);
- aCompiler.SetGrammar(FormulaGrammar::GRAM_NATIVE_XL_A1);
+ aCompiler.SetGrammar(FormulaGrammar::GRAM_ENGLISH_XL_A1);
String s;
aCompiler.CreateStringFromTokenArray( s );
return ToOUString( s );
@@ -783,28 +869,106 @@ const char* XclXmlUtils::ToPsz( bool b )
return b ? "true" : "false";
}
-// ============================================================================
+sax_fastparser::FSHelperPtr XclXmlUtils::WriteElement( sax_fastparser::FSHelperPtr pStream, sal_Int32 nElement, sal_Int32 nValue )
+{
+ pStream->startElement( nElement, FSEND );
+ pStream->write( nValue );
+ pStream->endElement( nElement );
-XclExpXmlStream::XclExpXmlStream( const Reference< XMultiServiceFactory >& rSMgr, SvStream& rStrm, const XclExpRoot& rRoot )
- : XmlFilterBase( rSMgr )
- , mrRoot( rRoot )
+ return pStream;
+}
+
+sax_fastparser::FSHelperPtr XclXmlUtils::WriteElement( sax_fastparser::FSHelperPtr pStream, sal_Int32 nElement, sal_Int64 nValue )
{
- Sequence< PropertyValue > aArgs( 1 );
- const OUString sStream( RTL_CONSTASCII_USTRINGPARAM( "StreamForOutput" ) );
- aArgs[0].Name = sStream;
- aArgs[0].Value <<= Reference< XStream > ( new OStreamWrapper( rStrm ) );
+ pStream->startElement( nElement, FSEND );
+ pStream->write( nValue );
+ pStream->endElement( nElement );
+
+ return pStream;
+}
- XServiceInfo* pInfo = rRoot.GetDocModelObj();
- Reference< XComponent > aComponent( pInfo, UNO_QUERY );
- setSourceDocument( aComponent );
- filter( aArgs );
+sax_fastparser::FSHelperPtr XclXmlUtils::WriteElement( sax_fastparser::FSHelperPtr pStream, sal_Int32 nElement, const char* sValue )
+{
+ pStream->startElement( nElement, FSEND );
+ pStream->write( sValue );
+ pStream->endElement( nElement );
- PushStream( CreateOutputStream(
- OUString::createFromAscii( "xl/workbook.xml" ),
- OUString::createFromAscii( "xl/workbook.xml" ),
- Reference< XOutputStream >(),
- "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",
- "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" ) );
+ return pStream;
+}
+
+static void lcl_WriteValue( sax_fastparser::FSHelperPtr& rStream, sal_Int32 nElement, const char* pValue )
+{
+ if( !pValue )
+ return;
+ rStream->singleElement( nElement,
+ XML_val, pValue,
+ FSEND );
+}
+
+static const char* lcl_GetUnderlineStyle( FontUnderline eUnderline, bool& bHaveUnderline )
+{
+ bHaveUnderline = true;
+ switch( eUnderline )
+ {
+ // OOXTODO: doubleAccounting, singleAccounting
+ // OOXTODO: what should be done with the other FontUnderline values?
+ case UNDERLINE_SINGLE: return "single";
+ case UNDERLINE_DOUBLE: return "double";
+ case UNDERLINE_NONE:
+ default: bHaveUnderline = false; return "none";
+ }
+}
+
+static const char* lcl_ToVerticalAlignmentRun( SvxEscapement eEscapement, bool& bHaveAlignment )
+{
+ bHaveAlignment = true;
+ switch( eEscapement )
+ {
+ case SVX_ESCAPEMENT_SUPERSCRIPT: return "superscript";
+ case SVX_ESCAPEMENT_SUBSCRIPT: return "subscript";
+ case SVX_ESCAPEMENT_OFF:
+ default: bHaveAlignment = false; return "baseline";
+ }
+}
+
+sax_fastparser::FSHelperPtr XclXmlUtils::WriteFontData( sax_fastparser::FSHelperPtr pStream, const XclFontData& rFontData, sal_Int32 nFontId )
+{
+ bool bHaveUnderline, bHaveVertAlign;
+ const char* pUnderline = lcl_GetUnderlineStyle( rFontData.GetScUnderline(), bHaveUnderline );
+ const char* pVertAlign = lcl_ToVerticalAlignmentRun( rFontData.GetScEscapement(), bHaveVertAlign );
+
+ lcl_WriteValue( pStream, nFontId, XclXmlUtils::ToOString( rFontData.maName ).getStr() );
+ lcl_WriteValue( pStream, XML_charset, rFontData.mnCharSet != 0 ? OString::valueOf( (sal_Int32) rFontData.mnCharSet ).getStr() : NULL );
+ lcl_WriteValue( pStream, XML_family, OString::valueOf( (sal_Int32) rFontData.mnFamily ).getStr() );
+ lcl_WriteValue( pStream, XML_b, rFontData.mnWeight > 400 ? XclXmlUtils::ToPsz( rFontData.mnWeight > 400 ) : NULL );
+ lcl_WriteValue( pStream, XML_i, rFontData.mbItalic ? XclXmlUtils::ToPsz( rFontData.mbItalic ) : NULL );
+ lcl_WriteValue( pStream, XML_strike, rFontData.mbStrikeout ? XclXmlUtils::ToPsz( rFontData.mbStrikeout ) : NULL );
+ lcl_WriteValue( pStream, XML_outline, rFontData.mbOutline ? XclXmlUtils::ToPsz( rFontData.mbOutline ) : NULL );
+ lcl_WriteValue( pStream, XML_shadow, rFontData.mbShadow ? XclXmlUtils::ToPsz( rFontData.mbShadow ) : NULL );
+ // OOXTODO: lcl_WriteValue( rStream, XML_condense, ); // mac compatibility setting
+ // OOXTODO: lcl_WriteValue( rStream, XML_extend, ); // compatibility setting
+ if( rFontData.maColor != Color( 0xFF, 0xFF, 0xFF, 0xFF ) )
+ pStream->singleElement( XML_color,
+ // OOXTODO: XML_auto, bool
+ // OOXTODO: XML_indexed, uint
+ XML_rgb, XclXmlUtils::ToOString( rFontData.maColor ).getStr(),
+ // OOXTODO: XML_theme, index into <clrScheme/>
+ // OOXTODO: XML_tint, double
+ FSEND );
+ lcl_WriteValue( pStream, XML_sz, OString::valueOf( (double) (rFontData.mnHeight / 20.0) ) ); // Twips->Pt
+ lcl_WriteValue( pStream, XML_u, bHaveUnderline ? pUnderline : NULL );
+ lcl_WriteValue( pStream, XML_vertAlign, bHaveVertAlign ? pVertAlign : NULL );
+
+ return pStream;
+}
+
+
+// ============================================================================
+
+XclExpXmlStream::XclExpXmlStream( const Reference< XMultiServiceFactory >& rSMgr )
+ : XmlFilterBase( rSMgr ),
+ mpRoot( NULL )
+{
}
XclExpXmlStream::~XclExpXmlStream()
@@ -867,75 +1031,6 @@ sax_fastparser::FSHelperPtr& XclExpXmlStream::WriteAttributes( sal_Int32 nAttrib
return rStream;
}
-
-static void lcl_WriteValue( sax_fastparser::FSHelperPtr& rStream, sal_Int32 nElement, const char* pValue )
-{
- if( !pValue )
- return;
- rStream->singleElement( nElement,
- XML_val, pValue,
- FSEND );
-}
-
-static const char* lcl_GetUnderlineStyle( FontUnderline eUnderline, bool& bHaveUnderline )
-{
- bHaveUnderline = true;
- switch( eUnderline )
- {
- // OOXTODO: doubleAccounting, singleAccounting
- // OOXTODO: what should be done with the other FontUnderline values?
- case UNDERLINE_SINGLE: return "single";
- case UNDERLINE_DOUBLE: return "double";
- case UNDERLINE_NONE:
- default: bHaveUnderline = false; return "none";
- }
-}
-
-static const char* lcl_ToVerticalAlignmentRun( SvxEscapement eEscapement, bool& bHaveAlignment )
-{
- bHaveAlignment = true;
- switch( eEscapement )
- {
- case SVX_ESCAPEMENT_SUPERSCRIPT: return "superscript";
- case SVX_ESCAPEMENT_SUBSCRIPT: return "subscript";
- case SVX_ESCAPEMENT_OFF:
- default: bHaveAlignment = false; return "baseline";
- }
-}
-
-sax_fastparser::FSHelperPtr& XclExpXmlStream::WriteFontData( const XclFontData& rFontData, sal_Int32 nFontId )
-{
- bool bHaveUnderline, bHaveVertAlign;
- const char* pUnderline = lcl_GetUnderlineStyle( rFontData.GetScUnderline(), bHaveUnderline );
- const char* pVertAlign = lcl_ToVerticalAlignmentRun( rFontData.GetScEscapement(), bHaveVertAlign );
-
- sax_fastparser::FSHelperPtr& rStream = GetCurrentStream();
-
- lcl_WriteValue( rStream, nFontId, XclXmlUtils::ToOString( rFontData.maName ).getStr() );
- lcl_WriteValue( rStream, XML_charset, rFontData.mnCharSet != 0 ? OString::valueOf( (sal_Int32) rFontData.mnCharSet ).getStr() : NULL );
- lcl_WriteValue( rStream, XML_family, OString::valueOf( (sal_Int32) rFontData.mnFamily ).getStr() );
- lcl_WriteValue( rStream, XML_b, rFontData.mnWeight > 400 ? XclXmlUtils::ToPsz( rFontData.mnWeight > 400 ) : NULL );
- lcl_WriteValue( rStream, XML_i, rFontData.mbItalic ? XclXmlUtils::ToPsz( rFontData.mbItalic ) : NULL );
- lcl_WriteValue( rStream, XML_strike, rFontData.mbStrikeout ? XclXmlUtils::ToPsz( rFontData.mbStrikeout ) : NULL );
- lcl_WriteValue( rStream, XML_outline, rFontData.mbOutline ? XclXmlUtils::ToPsz( rFontData.mbOutline ) : NULL );
- lcl_WriteValue( rStream, XML_shadow, rFontData.mbShadow ? XclXmlUtils::ToPsz( rFontData.mbShadow ) : NULL );
- // OOXTODO: lcl_WriteValue( rStream, XML_condense, ); // mac compatibility setting
- // OOXTODO: lcl_WriteValue( rStream, XML_extend, ); // compatibility setting
- if( rFontData.maColor != Color( 0xFF, 0xFF, 0xFF, 0xFF ) )
- rStream->singleElement( XML_color,
- // OOXTODO: XML_auto, bool
- // OOXTODO: XML_indexed, uint
- XML_rgb, XclXmlUtils::ToOString( rFontData.maColor ).getStr(),
- // OOXTODO: XML_theme, index into <clrScheme/>
- // OOXTODO: XML_tint, double
- FSEND );
- lcl_WriteValue( rStream, XML_sz, OString::valueOf( (double) (rFontData.mnHeight / 20.0) ) ); // Twips->Pt
- lcl_WriteValue( rStream, XML_u, bHaveUnderline ? pUnderline : NULL );
- lcl_WriteValue( rStream, XML_vertAlign, bHaveVertAlign ? pVertAlign : NULL );
-
- return rStream;
-}
-
sax_fastparser::FSHelperPtr XclExpXmlStream::CreateOutputStream (
const OUString& sFullStream,
const OUString& sRelativeStream,
@@ -986,14 +1081,66 @@ oox::drawingml::chart::ChartConverter& XclExpXmlStream::getChartConverter()
return * (oox::drawingml::chart::ChartConverter*) NULL;
}
-bool XclExpXmlStream::exportDocument() throw()
+ScDocShell* XclExpXmlStream::getDocShell()
{
- return false;
+ Reference< XInterface > xModel( getModel(), UNO_QUERY );
+
+ ScModelObj *pObj = dynamic_cast < ScModelObj* >( xModel.get() );
+
+ if ( pObj )
+ return reinterpret_cast < ScDocShell* >( pObj->GetEmbeddedObject() );
+
+ return 0;
}
-::rtl::OUString XclExpXmlStream::implGetImplementationName() const
+bool XclExpXmlStream::exportDocument() throw()
{
- return CREATE_OUSTRING( "TODO" );
+ ScDocShell* pShell = getDocShell();
+ ScDocument* pDoc = pShell->GetDocument();
+ // NOTE: Don't use SotStorage or SvStream any more, and never call
+ // SfxMedium::GetOutStream() anywhere in the xlsx export filter code!
+ // Instead, write via XOutputStream instance.
+ SotStorageRef rStorage = static_cast<SotStorage*>(NULL);
+ XclExpObjList::ResetCounters();
+
+ XclExpRootData aData( EXC_BIFF8, *pShell->GetMedium (), rStorage, *pDoc, RTL_TEXTENCODING_DONTKNOW );
+ aData.meOutput = EXC_OUTPUT_XML_2007;
+ XclExpRoot aRoot( aData );
+
+ mpRoot = &aRoot;
+ aRoot.GetOldRoot().pER = &aRoot;
+ aRoot.GetOldRoot().eDateiTyp = Biff8;
+#if 0 // FIXME: Re-write this block without using SotStorage.
+ if ( SvtFilterOptions* pOptions = SvtFilterOptions::Get() )
+ if ( pShell && pOptions->IsLoadExcelBasicStorage() )
+ if ( sal_uInt32 nError
+ = SvxImportMSVBasic( *pShell, *rStorage,
+ pOptions->IsLoadExcelBasicCode(),
+ pOptions->IsLoadExcelBasicStorage() )
+ .SaveOrDelMSVBAStorage( true, EXC_STORAGE_VBA_PROJECT) )
+ {
+ pShell->SetError( nError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
+ }
+#endif
+ // Get the viewsettings before processing
+ if( pShell->GetViewData() )
+ pShell->GetViewData()->WriteExtOptions( mpRoot->GetExtDocOptions() );
+
+ OUString const workbook = CREATE_OUSTRING( "xl/workbook.xml" );
+ PushStream( CreateOutputStream( workbook, workbook,
+ Reference <XOutputStream>(),
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" ) );
+
+ // destruct at the end of the block
+ {
+ ExcDocument aDocRoot( aRoot );
+ aDocRoot.ReadDoc();
+ aDocRoot.WriteXml( *this );
+ }
+
+ mpRoot = NULL;
+ return true;
}
void XclExpXmlStream::Trace( const char* format, ...)
@@ -1004,3 +1151,99 @@ void XclExpXmlStream::Trace( const char* format, ...)
va_end( ap );
}
+//////////////////////////////////////////////////////////////////////////
+// UNO stuff so that the filter is registered
+//////////////////////////////////////////////////////////////////////////
+
+#define IMPL_NAME "com.sun.star.comp.oox.ExcelFilterExport"
+
+OUString XlsxExport_getImplementationName()
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM( IMPL_NAME ) );
+}
+
+::rtl::OUString XclExpXmlStream::implGetImplementationName() const
+{
+ return CREATE_OUSTRING( "TODO" );
+}
+
+
+Sequence< OUString > SAL_CALL XlsxExport_getSupportedServiceNames() throw()
+{
+ const OUString aServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.ExportFilter" ) );
+ const Sequence< OUString > aSeq( &aServiceName, 1 );
+ return aSeq;
+}
+
+Reference< XInterface > SAL_CALL XlsxExport_createInstance(const Reference< XMultiServiceFactory > & rSMgr ) throw( Exception )
+{
+ return (cppu::OWeakObject*) new XclExpXmlStream( rSMgr );
+}
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /* ppEnv */ )
+{
+ *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
+}
+
+SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /* pServiceManager */, void* pRegistryKey )
+{
+ sal_Bool bRet = sal_False;
+
+ if( pRegistryKey )
+ {
+ try
+ {
+ Reference< XRegistryKey > xNewKey1(
+ static_cast< XRegistryKey* >( pRegistryKey )->createKey(
+ OUString::createFromAscii( IMPL_NAME "/UNO/SERVICES/" ) ) );
+ xNewKey1->createKey( XlsxExport_getSupportedServiceNames().getConstArray()[0] );
+
+ bRet = sal_True;
+ }
+ catch( InvalidRegistryException& )
+ {
+ OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
+ }
+ }
+
+ return bRet;
+}
+
+// ------------------------
+// - component_getFactory -
+// ------------------------
+
+SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /* pRegistryKey */ )
+{
+ Reference< XSingleServiceFactory > xFactory;
+ void* pRet = 0;
+
+ if ( rtl_str_compare( pImplName, IMPL_NAME ) == 0 )
+ {
+ const OUString aServiceName( OUString::createFromAscii( IMPL_NAME ) );
+
+ xFactory = Reference< XSingleServiceFactory >( ::cppu::createSingleFactory(
+ reinterpret_cast< XMultiServiceFactory* >( pServiceManager ),
+ XlsxExport_getImplementationName(),
+ XlsxExport_createInstance,
+ XlsxExport_getSupportedServiceNames() ) );
+ }
+
+ if ( xFactory.is() )
+ {
+ xFactory->acquire();
+ pRet = xFactory.get();
+ }
+
+ return pRet;
+}
+
+#ifdef __cplusplus
+}
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xestring.cxx b/sc/source/filter/excel/xestring.cxx
index 6279ec4cd0fd..0247d765966a 100644
--- a/sc/source/filter/excel/xestring.cxx
+++ b/sc/source/filter/excel/xestring.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,6 +31,8 @@
#include <algorithm>
#include <stdio.h>
+#include "xlstyle.hxx"
+#include "xestyle.hxx"
#include "xestream.hxx"
#include "xlstyle.hxx"
#include "xestyle.hxx"
@@ -452,7 +455,7 @@ static sal_uInt16 lcl_WriteRun( XclExpXmlStream& rStrm, const ScfUInt16Vec& rBuf
{
const XclFontData& rFontData = pFont->GetFontData();
rWorksheet->startElement( XML_rPr, FSEND );
- rStrm.WriteFontData( rFontData, XML_rFont );
+ XclXmlUtils::WriteFontData( rWorksheet, rFontData, XML_rFont );
rWorksheet->endElement( XML_rPr );
}
rWorksheet->startElement( XML_t,
@@ -461,7 +464,7 @@ static sal_uInt16 lcl_WriteRun( XclExpXmlStream& rStrm, const ScfUInt16Vec& rBuf
rWorksheet->writeEscaped( XclXmlUtils::ToOUString( rBuffer, nStart, nLength ) );
rWorksheet->endElement( XML_t );
rWorksheet->endElement( XML_r );
- return static_cast<sal_uInt16>(nStart + nLength);
+ return nStart + nLength;
}
void XclExpString::WriteXml( XclExpXmlStream& rStrm ) const
@@ -616,3 +619,4 @@ void XclExpString::PrepareWrite( XclExpStream& rStrm, sal_uInt16 nBytes ) const
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index d3cabd1e66f9..e4ec2131ba6e 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -981,7 +982,7 @@ void XclExpFont::SaveXml( XclExpXmlStream& rStrm )
{
sax_fastparser::FSHelperPtr& rStyleSheet = rStrm.GetCurrentStream();
rStyleSheet->startElement( XML_font, FSEND );
- rStrm.WriteFontData( maData, XML_name );
+ XclXmlUtils::WriteFontData( rStyleSheet, maData, XML_name );
// OOXTODO: XML_scheme; //scheme/@val values: "major", "minor", "none"
rStyleSheet->endElement( XML_font );
}
@@ -1352,14 +1353,6 @@ bool XclExpCellProt::FillFromItemSet( const SfxItemSet& rItemSet, bool bStyle )
return ScfTools::CheckItem( rItemSet, ATTR_PROTECTION, bStyle );
}
-#if 0
-void XclExpCellProt::FillToXF2( sal_uInt8& rnNumFmt ) const
-{
- ::set_flag( rnNumFmt, EXC_XF2_LOCKED, mbLocked );
- ::set_flag( rnNumFmt, EXC_XF2_HIDDEN, mbHidden );
-}
-#endif
-
void XclExpCellProt::FillToXF3( sal_uInt16& rnProt ) const
{
::set_flag( rnProt, EXC_XF_LOCKED, mbLocked );
@@ -1469,26 +1462,6 @@ bool XclExpCellAlign::FillFromItemSet(
return bUsed;
}
-#if 0
-void XclExpCellAlign::FillToXF2( sal_uInt8& rnFlags ) const
-{
- ::insert_value( rnFlags, mnHorAlign, 0, 3 );
-}
-
-void XclExpCellAlign::FillToXF3( sal_uInt16& rnAlign ) const
-{
- ::insert_value( rnAlign, mnHorAlign, 0, 3 );
- ::set_flag( rnAlign, EXC_XF_LINEBREAK, mbLineBreak );
-}
-
-void XclExpCellAlign::FillToXF4( sal_uInt16& rnAlign ) const
-{
- FillToXF3( rnAlign );
- ::insert_value( rnAlign, mnVerAlign, 4, 2 );
- ::insert_value( rnAlign, mnOrient, 6, 2 );
-}
-#endif
-
void XclExpCellAlign::FillToXF5( sal_uInt16& rnAlign ) const
{
::insert_value( rnAlign, mnHorAlign, 0, 3 );
@@ -1683,27 +1656,6 @@ void XclExpCellBorder::SetFinalColors( const XclExpPalette& rPalette )
mnDiagColor = rPalette.GetColorIndex( mnDiagColorId );
}
-#if 0
-void XclExpCellBorder::FillToXF2( sal_uInt8& rnFlags ) const
-{
- ::set_flag( rnFlags, EXC_XF2_LEFTLINE, mnLeftLine != EXC_LINE_NONE );
- ::set_flag( rnFlags, EXC_XF2_RIGHTLINE, mnRightLine != EXC_LINE_NONE );
- ::set_flag( rnFlags, EXC_XF2_TOPLINE, mnTopLine != EXC_LINE_NONE );
- ::set_flag( rnFlags, EXC_XF2_BOTTOMLINE, mnBottomLine != EXC_LINE_NONE );
-}
-
-void XclExpCellBorder::FillToXF3( sal_uInt32& rnBorder ) const
-{
- ::insert_value( rnBorder, mnTopLine, 0, 3 );
- ::insert_value( rnBorder, mnLeftLine, 8, 3 );
- ::insert_value( rnBorder, mnBottomLine, 16, 3 );
- ::insert_value( rnBorder, mnRightLine, 24, 3 );
- ::insert_value( rnBorder, mnTopColor, 3, 5 );
- ::insert_value( rnBorder, mnLeftColor, 11, 5 );
- ::insert_value( rnBorder, mnBottomColor, 19, 5 );
- ::insert_value( rnBorder, mnRightColor, 27, 5 );
-}
-#endif
void XclExpCellBorder::FillToXF5( sal_uInt32& rnBorder, sal_uInt32& rnArea ) const
{
@@ -1834,20 +1786,6 @@ void XclExpCellArea::SetFinalColors( const XclExpPalette& rPalette )
rPalette.GetMixedColors( mnForeColor, mnBackColor, mnPattern, mnForeColorId, mnBackColorId );
}
-#if 0
-void XclExpCellArea::FillToXF2( sal_uInt8& rnFlags ) const
-{
- ::set_flag( rnFlags, EXC_XF2_BACKGROUND, mnPattern != EXC_PATT_NONE );
-}
-
-void XclExpCellArea::FillToXF3( sal_uInt16& rnArea ) const
-{
- ::insert_value( rnArea, mnPattern, 0, 6 );
- ::insert_value( rnArea, mnForeColor, 6, 5 );
- ::insert_value( rnArea, mnBackColor, 11, 5 );
-}
-#endif
-
void XclExpCellArea::FillToXF5( sal_uInt32& rnArea ) const
{
::insert_value( rnArea, mnPattern, 16, 6 );
@@ -2241,7 +2179,10 @@ void XclExpStyle::SaveXml( XclExpXmlStream& rStrm )
rStrm.GetCurrentStream()->singleElement( XML_cellStyle,
XML_name, sName.getStr(),
XML_xfId, OString::valueOf( nXFId ).getStr(),
- XML_builtinId, OString::valueOf( (sal_Int32) mnStyleId ).getStr(),
+/* mso-excel 2007 complains when it finds builtinId >= 55, it is not
+ * bothered by multiple 54 values. */
+#define CELL_STYLE_MAX_BUILTIN_ID 55
+ XML_builtinId, OString::valueOf( std::min( static_cast<sal_Int32>( CELL_STYLE_MAX_BUILTIN_ID - 1 ), static_cast <sal_Int32>( mnStyleId ) ) ).getStr(),
// OOXTODO: XML_iLevel,
// OOXTODO: XML_hidden,
XML_customBuiltin, XclXmlUtils::ToPsz( ! IsBuiltIn() ),
@@ -2901,3 +2842,4 @@ void XclExpXmlStyleSheet::SaveXml( XclExpXmlStream& rStrm )
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx
index 0bfb2d7904b3..05dbb579f385 100644
--- a/sc/source/filter/excel/xetable.cxx
+++ b/sc/source/filter/excel/xetable.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -882,76 +883,12 @@ void XclExpFormulaCell::Save( XclExpStream& rStrm )
mxStringRec->Save( rStrm );
}
-static const char* lcl_GetErrorString( USHORT nScErrCode )
-{
- sal_uInt8 nXclErrCode = XclTools::GetXclErrorCode( nScErrCode );
- switch( nXclErrCode )
- {
- case EXC_ERR_NULL: return "#NULL!";
- case EXC_ERR_DIV0: return "#DIV/0!";
- case EXC_ERR_VALUE: return "#VALUE!";
- case EXC_ERR_REF: return "#REF!";
- case EXC_ERR_NAME: return "#NAME?";
- case EXC_ERR_NUM: return "#NUM!";
- case EXC_ERR_NA:
- default: return "#N/A";
- }
-}
-
-static void lcl_GetFormulaInfo( ScFormulaCell& rCell, const char** pType, OUString& rValue)
-{
- switch( rCell.GetFormatType() )
- {
- case NUMBERFORMAT_NUMBER:
- {
- // either value or error code
- USHORT nScErrCode = rCell.GetErrCode();
- if( nScErrCode )
- {
- *pType = "e";
- rValue = XclXmlUtils::ToOUString( lcl_GetErrorString( nScErrCode ) );
- }
- else
- {
- *pType = "n";
- rValue = OUString::valueOf( rCell.GetValue() );
- }
- }
- break;
-
- case NUMBERFORMAT_TEXT:
- {
- *pType = "str";
- String aResult;
- rCell.GetString( aResult );
- rValue = XclXmlUtils::ToOUString( aResult );
- }
- break;
-
- case NUMBERFORMAT_LOGICAL:
- {
- *pType = "b";
- rValue = XclXmlUtils::ToOUString( rCell.GetValue() == 0.0 ? "0" : "1" );
- }
- break;
-
- default:
- {
- *pType = "inlineStr";
- String aResult;
- rCell.GetString( aResult );
- rValue = XclXmlUtils::ToOUString( aResult );
- }
- break;
- }
-}
-
void XclExpFormulaCell::SaveXml( XclExpXmlStream& rStrm )
{
const char* sType = NULL;
OUString sValue;
- lcl_GetFormulaInfo( mrScFmlaCell, &sType, sValue );
+ XclXmlUtils::GetFormulaTypeAndValue( mrScFmlaCell, sType, sValue );
sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
rWorksheet->startElement( XML_c,
XML_r, XclXmlUtils::ToOString( GetXclPos() ).getStr(),
@@ -962,7 +899,7 @@ void XclExpFormulaCell::SaveXml( XclExpXmlStream& rStrm )
rWorksheet->startElement( XML_f,
// OOXTODO: XML_t, ST_CellFormulaType
- XML_aca, XclXmlUtils::ToPsz( mxTokArr->IsVolatile() || (mxAddRec.is() && mxAddRec->IsVolatile()) ),
+ XML_aca, XclXmlUtils::ToPsz( (mxTokArr.is() && mxTokArr->IsVolatile()) || (mxAddRec.is() && mxAddRec->IsVolatile()) ),
// OOXTODO: XML_ref, ST_Ref
// OOXTODO: XML_dt2D, bool
// OOXTODO: XML_dtr, bool
@@ -2062,9 +1999,7 @@ void XclExpRow::SaveXml( XclExpXmlStream& rStrm )
XclExpRowBuffer::XclExpRowBuffer( const XclExpRoot& rRoot ) :
XclExpRoot( rRoot ),
maOutlineBfr( rRoot ),
- maDimensions( rRoot ),
- mpLastUsedRow( 0 ),
- mnLastUsedXclRow( 0 )
+ maDimensions( rRoot )
{
}
@@ -2082,63 +2017,34 @@ void XclExpRowBuffer::CreateRows( SCROW nFirstFreeScRow )
void XclExpRowBuffer::Finalize( XclExpDefaultRowData& rDefRowData, const ScfUInt16Vec& rColXFIndexes )
{
- size_t nPos, nSize;
-
// *** Finalize all rows *** ----------------------------------------------
GetProgressBar().ActivateFinalRowsSegment();
- // unused blank cell records will be removed
- for( nPos = 0, nSize = maRowList.GetSize(); nPos < nSize; ++nPos )
- maRowList.GetRecord( nPos )->Finalize( rColXFIndexes );
+ RowMap::iterator itr, itrBeg = maRowMap.begin(), itrEnd = maRowMap.end();
+ for (itr = itrBeg; itr != itrEnd; ++itr)
+ itr->second->Finalize(rColXFIndexes);
// *** Default row format *** ---------------------------------------------
typedef ::std::map< XclExpDefaultRowData, size_t > XclExpDefRowDataMap;
XclExpDefRowDataMap aDefRowMap;
- // find default row format for rows beyond used area
- sal_uInt32 nDefaultXclRow = maRowList.IsEmpty() ? 0 : (maRowList.GetLastRecord()->GetXclRow() + 1);
XclExpDefaultRowData aMaxDefData;
size_t nMaxDefCount = 0;
- /* #i30411# Files saved with SO7/OOo1.x with nonstandard default column
- formatting cause big Excel files, because all rows from row 1 to row
- 32000 are exported. Now, if the used area goes exactly to row 32000,
- ignore all rows >32000.
- #i59220# Tolerance of +-128 rows for inserted/removed rows. */
- if( (nDefaultXclRow < 31872) || (nDefaultXclRow > 32128) )
- {
- sal_uInt16 nLastXclRow = static_cast< sal_uInt16 >( GetMaxPos().Row() );
- if( nDefaultXclRow <= nLastXclRow )
- {
- // create a dummy ROW record and fill aMaxDefData
- XclExpRowOutlineBuffer aOutlineBfr( GetRoot() );
- XclExpRow aRow( GetRoot(), nLastXclRow, aOutlineBfr, true );
- aMaxDefData = XclExpDefaultRowData( aRow );
- aDefRowMap[ aMaxDefData ] = nMaxDefCount =
- static_cast< size_t >( nLastXclRow - nDefaultXclRow + 1 );
- }
- }
-
// only look for default format in existing rows, if there are more than unused
- nSize = maRowList.GetSize();
- if( nMaxDefCount < nSize )
+ for (itr = itrBeg; itr != itrEnd; ++itr)
{
- for( nPos = 0; nPos < nSize; ++nPos )
+ const RowRef& rRow = itr->second;
+ if (rRow->IsDefaultable())
{
- XclExpRowRef xRow = maRowList.GetRecord( nPos );
- /* Collect formats of unused rows (rows without cells), which are able
- to be defaulted (i.e. no explicit format or outline level). */
- if( xRow->IsDefaultable() )
+ XclExpDefaultRowData aDefData( *rRow );
+ size_t& rnDefCount = aDefRowMap[ aDefData ];
+ ++rnDefCount;
+ if( rnDefCount > nMaxDefCount )
{
- XclExpDefaultRowData aDefData( *xRow );
- size_t& rnDefCount = aDefRowMap[ aDefData ];
- ++rnDefCount;
- if( rnDefCount > nMaxDefCount )
- {
- nMaxDefCount = rnDefCount;
- aMaxDefData = aDefData;
- }
+ nMaxDefCount = rnDefCount;
+ aMaxDefData = aDefData;
}
}
}
@@ -2153,24 +2059,23 @@ void XclExpRowBuffer::Finalize( XclExpDefaultRowData& rDefRowData, const ScfUInt
sal_uInt32 nFirstUsedXclRow = SAL_MAX_UINT32;
sal_uInt32 nFirstFreeXclRow = 0;
- for( nPos = 0, nSize = maRowList.GetSize(); nPos < nSize; ++nPos )
+ for (itr = itrBeg; itr != itrEnd; ++itr)
{
- XclExpRowRef xRow = maRowList.GetRecord( nPos );
-
+ const RowRef& rRow = itr->second;
// disable unused rows
- xRow->DisableIfDefault( aMaxDefData );
+ rRow->DisableIfDefault( aMaxDefData );
// find used column range
- if( !xRow->IsEmpty() ) // empty rows return (0...0) as used range
+ if( !rRow->IsEmpty() ) // empty rows return (0...0) as used range
{
- nFirstUsedXclCol = ::std::min( nFirstUsedXclCol, xRow->GetFirstUsedXclCol() );
- nFirstFreeXclCol = ::std::max( nFirstFreeXclCol, xRow->GetFirstFreeXclCol() );
+ nFirstUsedXclCol = ::std::min( nFirstUsedXclCol, rRow->GetFirstUsedXclCol() );
+ nFirstFreeXclCol = ::std::max( nFirstFreeXclCol, rRow->GetFirstFreeXclCol() );
}
// find used row range
- if( xRow->IsEnabled() )
+ if( rRow->IsEnabled() )
{
- sal_uInt16 nXclRow = xRow->GetXclRow();
+ sal_uInt16 nXclRow = rRow->GetXclRow();
nFirstUsedXclRow = ::std::min< sal_uInt32 >( nFirstUsedXclRow, nXclRow );
nFirstFreeXclRow = ::std::max< sal_uInt32 >( nFirstFreeXclRow, nXclRow + 1 );
}
@@ -2191,27 +2096,29 @@ void XclExpRowBuffer::Save( XclExpStream& rStrm )
maDimensions.Save( rStrm );
// save in blocks of 32 rows, each block contains first all ROWs, then all cells
- size_t nSize = maRowList.GetSize();
- size_t nBlockStart = 0;
- sal_uInt16 nStartXclRow = (nSize == 0) ? 0 : maRowList.GetRecord( 0 )->GetXclRow();
+ size_t nSize = maRowMap.size();
+ RowMap::iterator itr, itrBeg = maRowMap.begin(), itrEnd = maRowMap.end();
+ RowMap::iterator itrBlkStart = maRowMap.begin(), itrBlkEnd = maRowMap.begin();
+ sal_uInt16 nStartXclRow = (nSize == 0) ? 0 : itrBeg->second->GetXclRow();
+
- while( nBlockStart < nSize )
+ for (itr = itrBeg; itr != itrEnd; ++itr)
{
// find end of row block
- size_t nBlockEnd = nBlockStart + 1;
- while( (nBlockEnd < nSize) && (maRowList.GetRecord( nBlockEnd )->GetXclRow() - nStartXclRow < EXC_ROW_ROWBLOCKSIZE) )
- ++nBlockEnd;
+ ++itrBlkEnd;
+ while( (itrBlkEnd != itrEnd) && (itrBlkEnd->second->GetXclRow() - nStartXclRow < EXC_ROW_ROWBLOCKSIZE) )
+ ++itrBlkEnd;
// write the ROW records
- size_t nPos;
- for( nPos = nBlockStart; nPos < nBlockEnd; ++nPos )
- maRowList.GetRecord( nPos )->Save( rStrm );
+ RowMap::iterator itRow;
+ for( itRow = itrBlkStart; itRow != itrBlkEnd; ++itRow )
+ itRow->second->Save( rStrm );
// write the cell records
- for( nPos = nBlockStart; nPos < nBlockEnd; ++nPos )
- maRowList.GetRecord( nPos )->WriteCellList( rStrm );
+ for( itRow = itrBlkStart; itRow != itrBlkEnd; ++itRow )
+ itRow->second->WriteCellList( rStrm );
- nBlockStart = nBlockEnd;
+ itrBlkStart = itrBlkEnd;
nStartXclRow += EXC_ROW_ROWBLOCKSIZE;
}
}
@@ -2219,23 +2126,22 @@ void XclExpRowBuffer::Save( XclExpStream& rStrm )
void XclExpRowBuffer::SaveXml( XclExpXmlStream& rStrm )
{
sal_Int32 nNonEmpty = 0;
-
- size_t nRows = maRowList.GetSize();
- for( size_t i = 0; i < nRows; ++i)
- if( maRowList.GetRecord( i )->IsEnabled() )
+ RowMap::iterator itr = maRowMap.begin(), itrEnd = maRowMap.end();
+ for (; itr != itrEnd; ++itr)
+ if (itr->second->IsEnabled())
++nNonEmpty;
- if( nNonEmpty == 0 )
+ if (nNonEmpty == 0)
{
rStrm.GetCurrentStream()->singleElement( XML_sheetData, FSEND );
+ return;
}
- else
- {
- sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
- rWorksheet->startElement( XML_sheetData, FSEND );
- maRowList.SaveXml( rStrm );
- rWorksheet->endElement( XML_sheetData );
- }
+
+ sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
+ rWorksheet->startElement( XML_sheetData, FSEND );
+ for (itr = maRowMap.begin(); itr != itrEnd; ++itr)
+ itr->second->SaveXml(rStrm);
+ rWorksheet->endElement( XML_sheetData );
}
XclExpDimensions* XclExpRowBuffer::GetDimensions()
@@ -2245,18 +2151,14 @@ XclExpDimensions* XclExpRowBuffer::GetDimensions()
XclExpRow& XclExpRowBuffer::GetOrCreateRow( sal_uInt16 nXclRow, bool bRowAlwaysEmpty )
{
- if( !mpLastUsedRow || (mnLastUsedXclRow != nXclRow) )
+ RowMap::iterator itr = maRowMap.find(nXclRow);
+ if (itr == maRowMap.end())
{
- // fill up missing ROW records
- // do not use sal_uInt16 for nFirstFreeXclRow, would cause loop in full sheets
- for( size_t nFirstFreeXclRow = maRowList.GetSize(); nFirstFreeXclRow <= nXclRow; ++nFirstFreeXclRow )
- maRowList.AppendNewRecord( new XclExpRow(
- GetRoot(), static_cast< sal_uInt16 >( nFirstFreeXclRow ), maOutlineBfr, bRowAlwaysEmpty ) );
-
- mpLastUsedRow = maRowList.GetRecord( nXclRow ).get();
- mnLastUsedXclRow = nXclRow;
+ RowRef p(new XclExpRow(GetRoot(), nXclRow, maOutlineBfr, bRowAlwaysEmpty));
+ ::std::pair<RowMap::iterator, bool> r = maRowMap.insert(RowMap::value_type(nXclRow, p));
+ itr = r.first;
}
- return *mpLastUsedRow;
+ return *itr->second;
}
// ============================================================================
@@ -2323,7 +2225,7 @@ XclExpCellTable::XclExpCellTable( const XclExpRoot& rRoot ) :
// range for cell iterator
SCCOL nLastIterScCol = nMaxScCol;
- SCROW nLastIterScRow = ulimit_cast< SCROW >( nLastUsedScRow + 128, nMaxScRow );
+ SCROW nLastIterScRow = ulimit_cast< SCROW >( nLastUsedScRow, nMaxScRow );
ScUsedAreaIterator aIt( &rDoc, nScTab, 0, 0, nLastIterScCol, nLastIterScRow );
// activate the correct segment and sub segment at the progress bar
@@ -2539,3 +2441,4 @@ void XclExpCellTable::SaveXml( XclExpXmlStream& rStrm )
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xeview.cxx b/sc/source/filter/excel/xeview.cxx
index 9cc691db940d..85cd24ece0a5 100644
--- a/sc/source/filter/excel/xeview.cxx
+++ b/sc/source/filter/excel/xeview.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -536,3 +537,4 @@ void XclExpTabViewSettings::WriteTabBgColor( XclExpStream& rStrm ) const
}
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx
index 7cbd74a836d2..41565381e137 100644
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -4145,3 +4146,4 @@ void XclImpChart::ReadChChart( XclImpStream& rStrm )
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx
index e55889ed84bd..3b7f3e0f29fd 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -212,23 +213,6 @@ void lclInsertUrl( const XclImpRoot& rRoot, const String& rUrl, SCCOL nScCol, SC
}
break;
- // fix for #i31050# disabled, HYPERLINK is not able to return numeric value (#i91351#)
-#if 0
- case CELLTYPE_VALUE:
- {
- // #i31050# replace number with HYPERLINK function
- ScTokenArray aTokenArray;
- aTokenArray.AddOpCode( ocHyperLink );
- aTokenArray.AddOpCode( ocOpen );
- aTokenArray.AddString( rUrl );
- aTokenArray.AddOpCode( ocSep );
- aTokenArray.AddDouble( rDoc.GetValue( aScPos ) );
- aTokenArray.AddOpCode( ocClose );
- rDoc.PutCell( aScPos, new ScFormulaCell( &rDoc, aScPos, &aTokenArray ) );
- }
- break;
-#endif
-
default:;
}
}
@@ -1340,3 +1324,4 @@ XclImpSheetProtectBuffer::Sheet* XclImpSheetProtectBuffer::GetSheetItem( SCTAB n
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index 557f59654f92..b96b8d6b5e87 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -109,6 +110,8 @@
#include "xipage.hxx"
#include "xichart.hxx"
#include "xicontent.hxx"
+#include "scextopt.hxx"
+
#include "namebuff.hxx"
using ::rtl::OUString;
@@ -236,6 +239,7 @@ XclImpDrawObjBase::~XclImpDrawObjBase()
}
}
+ xDrawObj->mnTab = rRoot.GetCurrScTab();
xDrawObj->ImplReadObj3( rStrm );
return xDrawObj;
}
@@ -268,6 +272,7 @@ XclImpDrawObjBase::~XclImpDrawObjBase()
}
}
+ xDrawObj->mnTab = rRoot.GetCurrScTab();
xDrawObj->ImplReadObj4( rStrm );
return xDrawObj;
}
@@ -310,6 +315,7 @@ XclImpDrawObjBase::~XclImpDrawObjBase()
}
}
+ xDrawObj->mnTab = rRoot.GetCurrScTab();
xDrawObj->ImplReadObj5( rStrm );
return xDrawObj;
}
@@ -368,6 +374,7 @@ XclImpDrawObjBase::~XclImpDrawObjBase()
}
}
+ xDrawObj->mnTab = rRoot.GetCurrScTab();
xDrawObj->ImplReadObj8( rStrm );
return xDrawObj;
}
@@ -468,8 +475,9 @@ void XclImpDrawObjBase::PreProcessSdrObject( XclImpDffConverter& rDffConv, SdrOb
}
// macro and hyperlink
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
- if( mbSimpleMacro && ((maMacroName.Len() > 0) || (maHyperlink.getLength() > 0)) )
+ // removed oracle/sun check for mbSimpleMacro ( no idea what its for )
+ if( (maMacroName.Len() > 0 ) ||
+ (maHyperlink.Len() > 0) )
{
if( ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( &rSdrObj, TRUE ) )
{
@@ -477,11 +485,6 @@ void XclImpDrawObjBase::PreProcessSdrObject( XclImpDffConverter& rDffConv, SdrOb
pInfo->SetHlink( maHyperlink );
}
}
-#else
- if( mbSimpleMacro && (maMacroName.Len() > 0) )
- if( ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( &rSdrObj, TRUE ) )
- pInfo->SetMacro( XclTools::GetSbMacroUrl( maMacroName, GetDocShell() ) );
-#endif
// call virtual function for object type specific processing
DoPreProcessSdrObj( rDffConv, rSdrObj );
@@ -1565,9 +1568,6 @@ void XclImpChartObj::DoReadObj3( XclImpStream& rStrm, sal_uInt16 nMacroSize )
ReadFrameData( rStrm );
rStrm.Ignore( 18 );
ReadMacro3( rStrm, nMacroSize );
-#if 0
- ReadChartSubStream( rStrm );
-#endif
// set frame format from OBJ record, it is used if chart itself is transparent
if( mxChart.is() )
mxChart->UpdateObjFrame( maLineData, maFillData );
@@ -1579,9 +1579,6 @@ void XclImpChartObj::DoReadObj4( XclImpStream& rStrm, sal_uInt16 nMacroSize )
ReadFrameData( rStrm );
rStrm.Ignore( 18 );
ReadMacro4( rStrm, nMacroSize );
-#if 0
- ReadChartSubStream( rStrm );
-#endif
// set frame format from OBJ record, it is used if chart itself is transparent
if( mxChart.is() )
mxChart->UpdateObjFrame( maLineData, maFillData );
@@ -1761,22 +1758,15 @@ SdrObject* XclImpControlHelper::CreateSdrObjectFromShape(
return xSdrObj.release();
}
-void XclImpControlHelper::ProcessControl( const XclImpDrawObjBase& rDrawObj ) const
+void XclImpControlHelper::ApplySheetLinkProps() const
{
+
Reference< XControlModel > xCtrlModel = XclControlHelper::GetControlModel( mxShape );
if( !xCtrlModel.is() )
return;
-
ScfPropertySet aPropSet( xCtrlModel );
- // #118053# #i51348# set object name at control model
- aPropSet.SetStringProperty( CREATE_OUSTRING( "Name" ), rDrawObj.GetObjName() );
-
- // control visible and printable?
- aPropSet.SetBoolProperty( CREATE_OUSTRING( "EnableVisible" ), rDrawObj.IsVisible() );
- aPropSet.SetBoolProperty( CREATE_OUSTRING( "Printable" ), rDrawObj.IsPrintable() );
-
- // sheet links
+ // sheet links
if( SfxObjectShell* pDocShell = mrRoot.GetDocShell() )
{
Reference< XMultiServiceFactory > xFactory( pDocShell->GetModel(), UNO_QUERY );
@@ -1839,6 +1829,25 @@ void XclImpControlHelper::ProcessControl( const XclImpDrawObjBase& rDrawObj ) co
}
}
}
+}
+
+void XclImpControlHelper::ProcessControl( const XclImpDrawObjBase& rDrawObj ) const
+{
+ Reference< XControlModel > xCtrlModel = XclControlHelper::GetControlModel( mxShape );
+ if( !xCtrlModel.is() )
+ return;
+
+ ApplySheetLinkProps();
+
+ ScfPropertySet aPropSet( xCtrlModel );
+
+ // #118053# #i51348# set object name at control model
+ aPropSet.SetStringProperty( CREATE_OUSTRING( "Name" ), rDrawObj.GetObjName() );
+
+ // control visible and printable?
+ aPropSet.SetBoolProperty( CREATE_OUSTRING( "EnableVisible" ), rDrawObj.IsVisible() );
+ aPropSet.SetBoolProperty( CREATE_OUSTRING( "Printable" ), rDrawObj.IsPrintable() );
+
// virtual call for type specific processing
DoProcessControl( aPropSet );
@@ -2170,6 +2179,45 @@ void XclImpOptionButtonObj::DoProcessControl( ScfPropertySet& rPropSet ) const
{
XclImpCheckBoxObj::DoProcessControl( rPropSet );
// TODO: grouping
+ XclImpOptionButtonObj* pTbxObj = dynamic_cast< XclImpOptionButtonObj* >( GetObjectManager().GetSheetDrawing( GetTab() ).FindDrawObj( mnNextInGroup ).get() );
+ if ( ( pTbxObj && pTbxObj->mnFirstInGroup ) )
+ {
+ // Group has terminated
+ // traverse each RadioButton in group and
+ // a) apply the groupname
+ // b) propagate the linked cell from the lead radiobutton
+ // c) apply the correct Ref value
+ XclImpOptionButtonObj* pLeader = pTbxObj;
+ ;
+ sal_Int32 nRefVal = 1;
+ OSL_TRACE( "0x%x start group ", pLeader->GetObjId()/*.mnObjId */);
+ do
+ {
+
+ Reference< XControlModel > xCtrlModel = XclControlHelper::GetControlModel( pTbxObj->mxShape );
+ if ( xCtrlModel.is() )
+ {
+ ScfPropertySet aProps( xCtrlModel );
+ rtl::OUString sGroupName = rtl::OUString::valueOf( static_cast< sal_Int32 >( pLeader->GetDffShapeId() ) );
+
+ aProps.SetStringProperty( CREATE_OUSTRING( "GroupName" ), sGroupName );
+ aProps.SetStringProperty( CREATE_OUSTRING( "RefValue" ), rtl::OUString::valueOf( nRefVal++ ) );
+ if ( pLeader->HasCellLink() && !pTbxObj->HasCellLink() )
+ {
+ // propagate cell link info
+ pTbxObj->mxCellLink.reset( new ScAddress( *pLeader->mxCellLink.get() ) );
+ pTbxObj->ApplySheetLinkProps();
+ }
+ pTbxObj = dynamic_cast< XclImpOptionButtonObj* >( GetObjectManager().GetSheetDrawing( GetTab() ).FindDrawObj( pTbxObj->mnNextInGroup ).get() );
+ }
+ else
+ pTbxObj = NULL;
+ } while ( pTbxObj && !( pTbxObj->mnFirstInGroup == 1 ) );
+ }
+ else
+ {
+ // not the leader? try and find it
+ }
}
OUString XclImpOptionButtonObj::DoGetServiceName() const
@@ -2806,6 +2854,17 @@ SdrObject* XclImpPictureObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const
return xSdrObj.release();
}
+String XclImpPictureObj::GetObjName() const
+{
+ if( IsOcxControl() )
+ {
+ String sName( GetObjectManager().GetOleNameOverride( GetTab(), GetObjId() ) );
+ if ( sName.Len() > 0 )
+ return sName;
+ }
+ return XclImpDrawObjBase::GetObjName();
+}
+
void XclImpPictureObj::DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject& rSdrObj ) const
{
if( IsOcxControl() )
@@ -3062,15 +3121,15 @@ XclImpSimpleDffConverter::~XclImpSimpleDffConverter()
{
}
-FASTBOOL XclImpSimpleDffConverter::GetColorFromPalette( USHORT nIndex, Color& rColor ) const
+int XclImpSimpleDffConverter::GetColorFromPalette( USHORT nIndex, Color& rColor ) const
{
ColorData nColor = GetPalette().GetColorData( static_cast< sal_uInt16 >( nIndex ) );
if( nColor == COL_AUTO )
- return FALSE;
+ return 0;
rColor.SetColor( nColor );
- return TRUE;
+ return 1;
}
// ----------------------------------------------------------------------------
@@ -3115,6 +3174,27 @@ XclImpDffConverter::~XclImpDffConverter()
{
}
+String XclImpObjectManager::GetOleNameOverride( SCTAB nTab, sal_uInt16 nObjId )
+{
+ String sOleName;
+ String sCodeName = GetExtDocOptions().GetCodeName( nTab );
+
+ CodeNameToCntrlObjIdInfo::iterator it = maOleCtrlNameOverride.find( sCodeName );
+ if ( it != maOleCtrlNameOverride.end() )
+ {
+ CntrlObjIdToName::iterator it_id = it->second.find( nObjId );
+ if ( it_id != it->second.end() )
+ {
+ sOleName = it_id->second;
+ }
+ }
+ OSL_TRACE("XclImpObjectManager::GetOleNameOverride tab %d, ( module %s ) object id ( %d ) is %s", nTab,
+ rtl::OUStringToOString( sCodeName, RTL_TEXTENCODING_UTF8 ).getStr(), nObjId,
+ rtl::OUStringToOString( sOleName, RTL_TEXTENCODING_UTF8 ).getStr() );
+
+ return sOleName;
+}
+
void XclImpDffConverter::StartProgressBar( sal_Size nProgressSize )
{
mxProgress.reset( new ScfProgressBar( GetDocShell(), STR_PROGRESS_CALCULATING ) );
@@ -3757,6 +3837,10 @@ sal_Size XclImpDrawing::GetProgressSize() const
void XclImpDrawing::ImplConvertObjects( XclImpDffConverter& rDffConv, SdrModel& rSdrModel, SdrPage& rSdrPage )
{
+ //rhbz#636521, disable undo during conversion. faster, smaller and stops
+ //temp objects being inserted into the undo list
+ bool bOrigUndoStatus = rSdrModel.IsUndoEnabled();
+ rSdrModel.EnableUndo(false);
// register this drawing manager at the passed (global) DFF manager
rDffConv.InitializeDrawing( *this, rSdrModel, rSdrPage );
// process list of objects to be skipped
@@ -3769,6 +3853,7 @@ void XclImpDrawing::ImplConvertObjects( XclImpDffConverter& rDffConv, SdrModel&
rDffConv.ProcessDrawing( maDffStrm );
// unregister this drawing manager at the passed (global) DFF manager
rDffConv.FinalizeDrawing();
+ rSdrModel.EnableUndo(bOrigUndoStatus);
}
// protected ------------------------------------------------------------------
@@ -3985,27 +4070,27 @@ XclImpObjectManager::XclImpObjectManager( const XclImpRoot& rRoot ) :
XclImpRoot( rRoot )
{
maDefObjNames[ EXC_OBJTYPE_GROUP ] = CREATE_STRING( "Group" );
- maDefObjNames[ EXC_OBJTYPE_LINE ] = CREATE_STRING( "Line" );
- maDefObjNames[ EXC_OBJTYPE_RECTANGLE ] = CREATE_STRING( "Rectangle" );
- maDefObjNames[ EXC_OBJTYPE_OVAL ] = CREATE_STRING( "Oval" );
+ maDefObjNames[ EXC_OBJTYPE_LINE ] = ScGlobal::GetRscString( STR_SHAPE_LINE );
+ maDefObjNames[ EXC_OBJTYPE_RECTANGLE ] = ScGlobal::GetRscString( STR_SHAPE_RECTANGLE );
+ maDefObjNames[ EXC_OBJTYPE_OVAL ] = ScGlobal::GetRscString( STR_SHAPE_OVAL );
maDefObjNames[ EXC_OBJTYPE_ARC ] = CREATE_STRING( "Arc" );
maDefObjNames[ EXC_OBJTYPE_CHART ] = CREATE_STRING( "Chart" );
maDefObjNames[ EXC_OBJTYPE_TEXT ] = CREATE_STRING( "Text" );
- maDefObjNames[ EXC_OBJTYPE_BUTTON ] = CREATE_STRING( "Button" );
+ maDefObjNames[ EXC_OBJTYPE_BUTTON ] = ScGlobal::GetRscString( STR_FORM_BUTTON );
maDefObjNames[ EXC_OBJTYPE_PICTURE ] = CREATE_STRING( "Picture" );
maDefObjNames[ EXC_OBJTYPE_POLYGON ] = CREATE_STRING( "Freeform" );
- maDefObjNames[ EXC_OBJTYPE_CHECKBOX ] = CREATE_STRING( "Check Box" );
- maDefObjNames[ EXC_OBJTYPE_OPTIONBUTTON ] = CREATE_STRING( "Option Button" );
+ maDefObjNames[ EXC_OBJTYPE_CHECKBOX ] = ScGlobal::GetRscString( STR_FORM_CHECKBOX );
+ maDefObjNames[ EXC_OBJTYPE_OPTIONBUTTON ] = ScGlobal::GetRscString( STR_FORM_OPTIONBUTTON );
maDefObjNames[ EXC_OBJTYPE_EDIT ] = CREATE_STRING( "Edit Box" );
- maDefObjNames[ EXC_OBJTYPE_LABEL ] = CREATE_STRING( "Label" );
+ maDefObjNames[ EXC_OBJTYPE_LABEL ] = ScGlobal::GetRscString( STR_FORM_LABEL );
maDefObjNames[ EXC_OBJTYPE_DIALOG ] = CREATE_STRING( "Dialog Frame" );
- maDefObjNames[ EXC_OBJTYPE_SPIN ] = CREATE_STRING( "Spinner" );
- maDefObjNames[ EXC_OBJTYPE_SCROLLBAR ] = CREATE_STRING( "Scroll Bar" );
- maDefObjNames[ EXC_OBJTYPE_LISTBOX ] = CREATE_STRING( "List Box" );
- maDefObjNames[ EXC_OBJTYPE_GROUPBOX ] = CREATE_STRING( "Group Box" );
- maDefObjNames[ EXC_OBJTYPE_DROPDOWN ] = CREATE_STRING( "Drop Down" );
+ maDefObjNames[ EXC_OBJTYPE_SPIN ] = ScGlobal::GetRscString( STR_FORM_SPINNER );
+ maDefObjNames[ EXC_OBJTYPE_SCROLLBAR ] = ScGlobal::GetRscString( STR_FORM_SCROLLBAR );
+ maDefObjNames[ EXC_OBJTYPE_LISTBOX ] = ScGlobal::GetRscString( STR_FORM_LISTBOX );
+ maDefObjNames[ EXC_OBJTYPE_GROUPBOX ] = ScGlobal::GetRscString( STR_FORM_GROUPBOX );
+ maDefObjNames[ EXC_OBJTYPE_DROPDOWN ] = ScGlobal::GetRscString( STR_FORM_DROPDOWN );
maDefObjNames[ EXC_OBJTYPE_NOTE ] = CREATE_STRING( "Comment" );
- maDefObjNames[ EXC_OBJTYPE_DRAWING ] = CREATE_STRING( "AutoShape" );
+ maDefObjNames[ EXC_OBJTYPE_DRAWING ] = ScGlobal::GetRscString( STR_SHAPE_AUTOSHAPE );
}
XclImpObjectManager::~XclImpObjectManager()
@@ -4113,3 +4198,4 @@ XclImpStream& operator>>( XclImpStream& rStrm, XclImpDffPropSet& rPropSet )
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xiformula.cxx b/sc/source/filter/excel/xiformula.cxx
index 40c6ef9be374..c9927ff570fd 100644
--- a/sc/source/filter/excel/xiformula.cxx
+++ b/sc/source/filter/excel/xiformula.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -125,3 +126,4 @@ const ScTokenArray* XclImpFormulaCompiler::CreateFormula(
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xihelper.cxx b/sc/source/filter/excel/xihelper.cxx
index d8b353179cd6..bb17cc656add 100644
--- a/sc/source/filter/excel/xihelper.cxx
+++ b/sc/source/filter/excel/xihelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -894,3 +895,4 @@ ScMatrixRef XclImpCachedMatrix::CreateScMatrix() const
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xilink.cxx b/sc/source/filter/excel/xilink.cxx
index aba90eceee94..ff45306b1c55 100644
--- a/sc/source/filter/excel/xilink.cxx
+++ b/sc/source/filter/excel/xilink.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -769,3 +770,4 @@ const String& XclImpLinkManager::GetMacroName( sal_uInt16 nExtSheet, sal_uInt16
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xiname.cxx b/sc/source/filter/excel/xiname.cxx
index 5c0eac63de92..e94832e99597 100644
--- a/sc/source/filter/excel/xiname.cxx
+++ b/sc/source/filter/excel/xiname.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,7 +36,8 @@
#include "excform.hxx"
// for filter manager
#include "excimp8.hxx"
-
+#include "scextopt.hxx"
+#include "document.hxx"
// ============================================================================
// *** Implementation ***
// ============================================================================
@@ -45,6 +47,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 +96,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
@@ -127,6 +131,7 @@ XclImpName::XclImpName( XclImpStream& rStrm, sal_uInt16 nXclNameIdx ) :
maScName = maXclName;
ScfTools::ConvertToScDefinedName( maScName );
}
+ rtl::OUString aRealOrigName = maScName;
// add index for local names
if( nXclTab != EXC_NAME_GLOBAL )
@@ -212,13 +217,32 @@ 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 );
pData->GuessPosition(); // calculate base position for relative refs
pData->SetIndex( nXclNameIdx ); // used as unique identifier in formulas
rRangeNames.Insert( pData ); // takes ownership of pData
+ if( nXclTab != EXC_NAME_GLOBAL )
+ {
+ if (GetBiff() == EXC_BIFF8)
+ {
+ ScRange aRange;
+ // discard deleted ranges ( for the moment at least )
+ if ( pData->IsValidReference( aRange ) )
+ {
+ ScExtTabSettings& rTabSett = GetExtDocOptions().GetOrCreateTabSettings( nXclTab );
+ // create a mapping between the unmodified localname to
+ // the name in the global name container for named ranges
+ OSL_TRACE(" mapping local name to global name for tab %d which exists? %s", nXclTab, GetDoc().HasTable( mnScTab ) ? "true" : "false" );
+ SCTAB nTab( static_cast< SCTAB >( mnScTab ) );
+ NameToNameMap* pMap = GetDoc().GetLocalNameMap( nTab );
+ if ( pMap )
+ (*pMap)[ aRealOrigName ] = maScName;
+ }
+ }
+ }
mpScData = pData; // cache for later use
}
}
@@ -262,3 +286,4 @@ const XclImpName* XclImpNameManager::GetName( sal_uInt16 nXclNameIdx ) const
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xipage.cxx b/sc/source/filter/excel/xipage.cxx
index 38cebc2e6ca8..f40743c52146 100644
--- a/sc/source/filter/excel/xipage.cxx
+++ b/sc/source/filter/excel/xipage.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -388,3 +389,4 @@ void XclImpPageSettings::Finalize()
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx
index 29e27a698a42..3b30c7f84998 100644
--- a/sc/source/filter/excel/xipivot.cxx
+++ b/sc/source/filter/excel/xipivot.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1636,3 +1637,4 @@ void XclImpPivotTableManager::MaybeRefreshPivotTables()
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xiroot.cxx b/sc/source/filter/excel/xiroot.cxx
index 4bbb64a099f8..9a0b50e3a999 100644
--- a/sc/source/filter/excel/xiroot.cxx
+++ b/sc/source/filter/excel/xiroot.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -304,3 +305,5 @@ void XclImpRoot::ReadCodeName( XclImpStream& rStrm, bool bGlobals )
}
// ============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xistream.cxx b/sc/source/filter/excel/xistream.cxx
index a7e2af0c52f4..86dec6126200 100644
--- a/sc/source/filter/excel/xistream.cxx
+++ b/sc/source/filter/excel/xistream.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1093,3 +1094,4 @@ sal_uInt16 XclImpStream::ReadRawData( void* pData, sal_uInt16 nBytes )
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xistring.cxx b/sc/source/filter/excel/xistring.cxx
index cb2645bec538..9afc0f0d2f22 100644
--- a/sc/source/filter/excel/xistring.cxx
+++ b/sc/source/filter/excel/xistring.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -211,3 +212,4 @@ XclImpStringIterator& XclImpStringIterator::operator++()
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx
index b9b68a91d05f..6693d6fe3936 100644
--- a/sc/source/filter/excel/xistyle.cxx
+++ b/sc/source/filter/excel/xistyle.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -72,10 +73,70 @@
using ::std::list;
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+using namespace ::com::sun::star;
+
+typedef ::cppu::WeakImplHelper1< container::XIndexAccess > XIndexAccess_BASE;
+typedef ::std::vector< ColorData > ColorDataVec;
+
+class PaletteIndex : public XIndexAccess_BASE
+{
+public:
+ PaletteIndex( const ColorDataVec& rColorDataTable ) : maColorData( rColorDataTable ) {}
+
+ // Methods XIndexAccess
+ virtual ::sal_Int32 SAL_CALL getCount() throw (uno::RuntimeException)
+ {
+ return maColorData.size();
+ }
+
+ virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
+ {
+ //--Index; // apparently the palette is already 1 based
+ return uno::makeAny( sal_Int32( maColorData[ Index ] ) );
+ }
+
+ // Methods XElementAcess
+ virtual uno::Type SAL_CALL getElementType() throw (uno::RuntimeException)
+ {
+ return ::getCppuType( (sal_Int32*)0 );
+ }
+ virtual ::sal_Bool SAL_CALL hasElements() throw (uno::RuntimeException)
+ {
+ return (maColorData.size() > 0);
+ }
+
+private:
+ ColorDataVec maColorData;
+};
+
+void
+XclImpPalette::ExportPalette()
+{
+ if( SfxObjectShell* pDocShell = mrRoot.GetDocShell() )
+ {
+ // copy values in color palette
+ sal_Int16 nColors = maColorTable.size();
+ ColorDataVec aColors;
+ aColors.resize( nColors );
+ for( sal_uInt16 nIndex = 0; nIndex < nColors; ++nIndex )
+ aColors[ nIndex ] = GetColorData( nIndex );
+
+ uno::Reference< beans::XPropertySet > xProps( pDocShell->GetModel(), uno::UNO_QUERY );
+ if ( xProps.is() )
+ {
+ uno::Reference< container::XIndexAccess > xIndex( new PaletteIndex( aColors ) );
+ xProps->setPropertyValue( CREATE_OUSTRING("ColorPalette"), uno::makeAny( xIndex ) );
+ }
+ }
+
+}
// PALETTE record - color information =========================================
XclImpPalette::XclImpPalette( const XclImpRoot& rRoot ) :
- XclDefaultPalette( rRoot )
+ XclDefaultPalette( rRoot ), mrRoot( rRoot )
{
}
@@ -109,6 +170,7 @@ void XclImpPalette::ReadPalette( XclImpStream& rStrm )
rStrm >> aColor;
maColorTable[ nIndex ] = aColor.GetColor();
}
+ ExportPalette();
}
// FONT record - font information =============================================
@@ -1880,3 +1942,4 @@ void XclImpXFRangeBuffer::Finalize()
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xiview.cxx b/sc/source/filter/excel/xiview.cxx
index 1b047de977ab..5dbb119d3eab 100644
--- a/sc/source/filter/excel/xiview.cxx
+++ b/sc/source/filter/excel/xiview.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -304,3 +305,4 @@ void XclImpTabViewSettings::Finalize()
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xladdress.cxx b/sc/source/filter/excel/xladdress.cxx
index d0c1a925f8ab..64cd88908f22 100644
--- a/sc/source/filter/excel/xladdress.cxx
+++ b/sc/source/filter/excel/xladdress.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -159,3 +160,4 @@ bool XclAddressConverterBase::CheckScTab( SCTAB nScTab, bool bWarn )
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xlchart.cxx b/sc/source/filter/excel/xlchart.cxx
index 10a0657c7899..34d011ed3d6a 100644
--- a/sc/source/filter/excel/xlchart.cxx
+++ b/sc/source/filter/excel/xlchart.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1326,3 +1327,5 @@ Reference< XShape > XclChRootData::GetTitleShape( const XclChTextKey& rTitleKey
}
// ============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xlescher.cxx b/sc/source/filter/excel/xlescher.cxx
index 153a5d5ed3cc..5f9bf4ddb061 100644
--- a/sc/source/filter/excel/xlescher.cxx
+++ b/sc/source/filter/excel/xlescher.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -366,7 +367,7 @@ bool XclControlHelper::FillMacroDescriptor( ScriptEventDescriptor& rDescriptor,
}
String XclControlHelper::ExtractFromMacroDescriptor(
- const ScriptEventDescriptor& rDescriptor, XclTbxEventType eEventType )
+ const ScriptEventDescriptor& rDescriptor, XclTbxEventType eEventType, SfxObjectShell* /*pShell*/ )
{
if( (rDescriptor.ScriptCode.getLength() > 0) &&
rDescriptor.ScriptType.equalsIgnoreAsciiCaseAscii( "Script" ) &&
@@ -377,3 +378,5 @@ String XclControlHelper::ExtractFromMacroDescriptor(
}
// ============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xlformula.cxx b/sc/source/filter/excel/xlformula.cxx
index d613f1279242..04e428c3de7d 100644
--- a/sc/source/filter/excel/xlformula.cxx
+++ b/sc/source/filter/excel/xlformula.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -784,3 +785,4 @@ bool XclTokenArrayHelper::GetMultipleOpRefs( XclMultipleOpRefs& rRefs, const ScT
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xlpage.cxx b/sc/source/filter/excel/xlpage.cxx
index a59c6f761667..53cdd0550081 100644
--- a/sc/source/filter/excel/xlpage.cxx
+++ b/sc/source/filter/excel/xlpage.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,6 +37,7 @@
#include <editeng/brshitem.hxx>
#include "global.hxx"
#include "xlconst.hxx"
+#include <oox/core/xmlfilterbase.hxx>
// Paper size =================================================================
@@ -48,6 +50,8 @@ struct XclPaperSize
#define IN2TWIPS( v ) ((long)((v) * EXC_TWIPS_PER_INCH + 0.5))
#define MM2TWIPS( v ) ((long)((v) * EXC_TWIPS_PER_INCH / CM_PER_INCH / 10.0 + 0.5))
+#define TWIPS2MM( v ) ((long)((v - 0.5) / EXC_TWIPS_PER_INCH * CM_PER_INCH * 10.0))
+
static const XclPaperSize pPaperSizeTable[] =
{
@@ -189,6 +193,8 @@ void XclPageData::SetDefaults()
mfHdrLeftMargin = mfHdrRightMargin = XclTools::GetInchFromHmm( EXC_MARGIN_DEFAULT_HLR );
mfFtrLeftMargin = mfFtrRightMargin = XclTools::GetInchFromHmm( EXC_MARGIN_DEFAULT_FLR );
mnPaperSize = EXC_PAPERSIZE_DEFAULT;
+ mnPaperWidth = 0;
+ mnPaperHeight = 0;
mnCopies = 1;
mnStartPage = 0;
mnScaling = 100;
@@ -222,7 +228,7 @@ Size XclPageData::GetScPaperSize() const
return aSize;
}
-void XclPageData::SetScPaperSize( const Size& rSize, bool bPortrait )
+void XclPageData::SetScPaperSize( const Size& rSize, bool bPortrait, bool bStrictSize )
{
mbPortrait = bPortrait;
mnPaperSize = 0;
@@ -230,6 +236,20 @@ void XclPageData::SetScPaperSize( const Size& rSize, bool bPortrait )
long nHeight = bPortrait ? rSize.Height() : rSize.Width();
long nMaxWDiff = 80;
long nMaxHDiff = 50;
+
+ mnPaperWidth = TWIPS2MM( nWidth );
+ mnPaperHeight = TWIPS2MM( nHeight );
+ if( bStrictSize )
+ {
+ nMaxWDiff = 5;
+ nMaxHDiff = 5;
+ mnStrictPaperSize = EXC_PAPERSIZE_USER;
+ }
+ else
+ {
+ mnPaperSize = 0;
+ }
+
for( const XclPaperSize* pEntry = pPaperSizeTable; pEntry != STATIC_TABLE_END( pPaperSizeTable ); ++pEntry )
{
long nWDiff = Abs( pEntry->mnWidth - nWidth );
@@ -237,12 +257,20 @@ void XclPageData::SetScPaperSize( const Size& rSize, bool bPortrait )
if( ((nWDiff <= nMaxWDiff) && (nHDiff < nMaxHDiff)) ||
((nWDiff < nMaxWDiff) && (nHDiff <= nMaxHDiff)) )
{
- mnPaperSize = static_cast< sal_uInt16 >( pEntry - pPaperSizeTable );
+ sal_uInt16 nIndex = static_cast< sal_uInt16 >( pEntry - pPaperSizeTable );
+ if( !bStrictSize )
+ mnPaperSize = nIndex;
+ else
+ mnStrictPaperSize = mnPaperSize = nIndex;
+
nMaxWDiff = nWDiff;
nMaxHDiff = nHDiff;
}
}
+ if( !bStrictSize )
+ SetScPaperSize( rSize, bPortrait, sal_True );
}
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xlpivot.cxx b/sc/source/filter/excel/xlpivot.cxx
index ca16b2f525e8..68854d39a5c2 100644
--- a/sc/source/filter/excel/xlpivot.cxx
+++ b/sc/source/filter/excel/xlpivot.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1024,3 +1025,4 @@ XclExpStream& operator<<( XclExpStream& rStrm, const XclPTViewEx9Info& rInfo )
<< XclExpString(rInfo.maGrandTotalName, EXC_STR_DEFAULT, EXC_PT_MAXSTRLEN);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx
index 2b2180db5e6a..fbca2c85918a 100644
--- a/sc/source/filter/excel/xlroot.cxx
+++ b/sc/source/filter/excel/xlroot.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -240,6 +241,17 @@ sal_Int32 XclRoot::GetHmmFromPixelY( double fPixelY ) const
return static_cast< sal_Int32 >( fPixelY * mrData.mfScreenPixelY + 0.5 );
}
+double XclRoot::GetPixelXFromHmm( sal_Int32 nX ) const
+{
+ return static_cast< double >( (nX - 0.5) / mrData.mfScreenPixelX );
+}
+
+double XclRoot::GetPixelYFromHmm( sal_Int32 nY ) const
+{
+ return static_cast< double >( (nY - 0.5) / mrData.mfScreenPixelY );
+}
+
+
String XclRoot::RequestPassword( ::comphelper::IDocPasswordVerifier& rVerifier ) const
{
::std::vector< OUString > aDefaultPasswords;
@@ -417,3 +429,4 @@ XclTracer& XclRoot::GetTracer() const
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xlstyle.cxx b/sc/source/filter/excel/xlstyle.cxx
index 6382adf1bdb9..cb95fd1658ed 100644
--- a/sc/source/filter/excel/xlstyle.cxx
+++ b/sc/source/filter/excel/xlstyle.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1767,3 +1768,4 @@ bool XclXFBase::Equals( const XclXFBase& rCmp ) const
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xltoolbar.cxx b/sc/source/filter/excel/xltoolbar.cxx
new file mode 100644
index 000000000000..0f0d985a3cf6
--- /dev/null
+++ b/sc/source/filter/excel/xltoolbar.cxx
@@ -0,0 +1,434 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+#include "xltoolbar.hxx"
+#include <rtl/ustrbuf.hxx>
+#include <stdarg.h>
+#include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
+#include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
+#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XSingleComponentFactory.hpp>
+#include <com/sun/star/lang/XMultiComponentFactory.hpp>
+#include <com/sun/star/ui/XImageManager.hpp>
+#include <com/sun/star/ui/ItemType.hpp>
+#include <fstream>
+#include <comphelper/processfactory.hxx>
+#include <vcl/graph.hxx>
+#include <map>
+using namespace com::sun::star;
+
+typedef std::map< sal_Int16, rtl::OUString > IdToString;
+
+class MSOExcelCommandConvertor : public MSOCommandConvertor
+{
+ IdToString msoToOOcmd;
+ IdToString tcidToOOcmd;
+public:
+ MSOExcelCommandConvertor();
+ virtual rtl::OUString MSOCommandToOOCommand( sal_Int16 msoCmd );
+ virtual rtl::OUString MSOTCIDToOOCommand( sal_Int16 key );
+};
+
+MSOExcelCommandConvertor::MSOExcelCommandConvertor()
+{
+/*
+ // mso command id to ooo command string
+ // #FIXME and *HUNDREDS* of id's to added here
+ msoToOOcmd[ 0x20b ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(".uno:CloseDoc") );
+ msoToOOcmd[ 0x50 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(".uno:Open") );
+
+ // mso tcid to ooo command string
+ // #FIXME and *HUNDREDS* of id's to added here
+ tcidToOOcmd[ 0x9d9 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(".uno:Print") );
+*/
+}
+
+rtl::OUString MSOExcelCommandConvertor::MSOCommandToOOCommand( sal_Int16 key )
+{
+ rtl::OUString sResult;
+ IdToString::iterator it = msoToOOcmd.find( key );
+ if ( it != msoToOOcmd.end() )
+ sResult = it->second;
+ return sResult;
+}
+
+rtl::OUString MSOExcelCommandConvertor::MSOTCIDToOOCommand( sal_Int16 key )
+{
+ rtl::OUString sResult;
+ IdToString::iterator it = tcidToOOcmd.find( key );
+ if ( it != tcidToOOcmd.end() )
+ sResult = it->second;
+ return sResult;
+}
+
+
+
+CTBS::CTBS() : bSignature(0), bVersion(0), reserved1(0), reserved2(0), reserved3(0), ctb(0), ctbViews(0), ictbView(0)
+{
+}
+
+CTB::CTB() : nViews( 0 ), ectbid(0)
+{
+}
+
+CTB::CTB(sal_uInt16 nNum ) : nViews( nNum ), ectbid(0)
+{
+}
+
+bool CTB::Read( SvStream *pS )
+{
+ OSL_TRACE("CTB::Read() stream pos 0x%x", pS->Tell() );
+ nOffSet = pS->Tell();
+ tb.Read( pS );
+ for ( sal_uInt16 index = 0; index < nViews; ++index )
+ {
+ TBVisualData aVisData;
+ aVisData.Read( pS );
+ rVisualData.push_back( aVisData );
+ }
+ *pS >> ectbid;
+
+ for ( sal_Int16 index = 0; index < tb.getcCL(); ++index )
+ {
+ TBC aTBC;
+ aTBC.Read( pS );
+ rTBC.push_back( aTBC );
+ }
+ return true;
+}
+
+void CTB::Print( FILE* fp )
+{
+ Indent a;
+ indent_printf( fp, "[ 0x%x ] CTB -- dump\n", nOffSet );
+ indent_printf( fp, " nViews 0x%x\n", nViews);
+ tb.Print( fp );
+
+ std::vector<TBVisualData>::iterator visData_end = rVisualData.end();
+ sal_Int32 counter = 0;
+ for ( std::vector<TBVisualData>::iterator it = rVisualData.begin(); it != visData_end; ++it )
+ {
+
+ indent_printf( fp, " TBVisualData [%d]\n", counter++ );
+ Indent b;
+ it->Print( fp );
+ }
+ indent_printf( fp, " ectbid 0x%x\n", ectbid);
+ std::vector<TBC>::iterator it_end = rTBC.end();
+ counter = 0;
+ for ( std::vector<TBC>::iterator it = rTBC.begin(); it != it_end; ++it )
+ {
+ indent_printf( fp, " TBC [%d]\n", counter++);
+ Indent c;
+ it->Print( fp );
+ }
+}
+
+bool CTB::IsMenuToolbar()
+{
+ return tb.IsMenuToolbar();
+}
+
+bool CTB::ImportMenuTB( CTBWrapper& rWrapper, const css::uno::Reference< css::container::XIndexContainer >& xMenuDesc, CustomToolBarImportHelper& helper )
+{
+ sal_Int32 index = 0;
+ for ( std::vector< TBC >::iterator it = rTBC.begin(); it != rTBC.end(); ++it, ++index )
+ {
+ if ( !it->ImportToolBarControl( rWrapper, xMenuDesc, helper, IsMenuToolbar() ) )
+ return false;
+ }
+ return true;
+}
+
+bool CTB::ImportCustomToolBar( CTBWrapper& rWrapper, CustomToolBarImportHelper& helper )
+{
+
+ static rtl::OUString sToolbarPrefix( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/custom_" ) );
+ bool bRes = false;
+ try
+ {
+ if ( !tb.IsEnabled() )
+ return true; // didn't fail, just ignoring
+
+ // Create default setting
+ uno::Reference< container::XIndexContainer > xIndexContainer( helper.getCfgManager()->createSettings(), uno::UNO_QUERY_THROW );
+ uno::Reference< container::XIndexAccess > xIndexAccess( xIndexContainer, uno::UNO_QUERY_THROW );
+ uno::Reference< beans::XPropertySet > xProps( xIndexContainer, uno::UNO_QUERY_THROW );
+ WString& name = tb.getName();
+ // set UI name for toolbar
+ xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("UIName") ), uno::makeAny( name.getString() ) );
+
+ rtl::OUString sToolBarName = sToolbarPrefix.concat( name.getString() );
+ for ( std::vector< TBC >::iterator it = rTBC.begin(); it != rTBC.end(); ++it )
+ {
+ if ( !it->ImportToolBarControl( rWrapper, xIndexContainer, helper, IsMenuToolbar() ) )
+ return false;
+ }
+
+ OSL_TRACE("Name of toolbar :-/ %s", rtl::OUStringToOString( sToolBarName, RTL_TEXTENCODING_UTF8 ).getStr() );
+
+ helper.getCfgManager()->insertSettings( sToolBarName, xIndexAccess );
+ helper.applyIcons();
+#if 1
+ uno::Reference< ui::XUIConfigurationPersistence > xPersistence( helper.getCfgManager()->getImageManager(), uno::UNO_QUERY_THROW );
+ xPersistence->store();
+
+ xPersistence.set( helper.getCfgManager(), uno::UNO_QUERY_THROW );
+ xPersistence->store();
+#endif
+
+ bRes = true;
+ }
+ catch( uno::Exception& )
+ {
+ bRes = false;
+ }
+ return bRes;
+}
+bool CTBS::Read( SvStream *pS )
+{
+ OSL_TRACE("CTBS::Read() stream pos 0x%x", pS->Tell() );
+ nOffSet = pS->Tell();
+ *pS >> bSignature >> bVersion >> reserved1 >> reserved2 >> reserved3 >> ctb >> ctbViews >> ictbView;
+ return true;
+}
+
+void CTBS::Print( FILE* fp )
+{
+ Indent a;
+ indent_printf( fp, "[ 0x%x ] CTBS -- dump\n", nOffSet );
+
+ indent_printf( fp, " bSignature 0x%x\n", bSignature);
+ indent_printf( fp, " bVersion 0x%x\n", bVersion);
+
+ indent_printf( fp, " reserved1 0x%x\n", reserved1 );
+ indent_printf( fp, " reserved2 0x%x\n", reserved2 );
+ indent_printf( fp, " reserved3 0x%x\n", reserved3 );
+
+ indent_printf( fp, " ctb 0x%x\n", ctb );
+ indent_printf( fp, " ctbViews 0x%x\n", ctbViews );
+ indent_printf( fp, " ictbView 0x%x\n", ictbView );
+}
+
+TBC::TBC()
+{
+}
+
+bool
+TBC::Read(SvStream *pS)
+{
+ OSL_TRACE("TBC::Read() stream pos 0x%x", pS->Tell() );
+ nOffSet = pS->Tell();
+ if ( !tbch.Read( pS ) )
+ return false;
+ sal_uInt16 tcid = tbch.getTcID();
+ sal_uInt8 tct = tbch.getTct();
+ if ( ( tcid != 0x0001 && tcid != 0x06CC && tcid != 0x03D8 && tcid != 0x03EC && tcid != 0x1051 ) && ( ( tct > 0 && tct < 0x0B ) || ( ( tct > 0x0B && tct < 0x10 ) || tct == 0x15 ) ) )
+ {
+ tbcCmd.reset( new TBCCmd );
+ if ( ! tbcCmd->Read( pS ) )
+ return false;
+ }
+ if ( tct != 0x16 )
+ {
+ tbcd.reset( new TBCData( tbch ) );
+ if ( !tbcd->Read( pS ) )
+ return false;
+ }
+ return true;
+}
+
+
+void
+TBC::Print(FILE* fp)
+{
+ Indent a;
+ indent_printf( fp, "[ 0x%x ] TBC -- dump\n", nOffSet );
+ tbch.Print( fp );
+ if ( tbcCmd.get() )
+ tbcCmd->Print( fp );
+ if ( tbcd.get() )
+ tbcd->Print( fp );
+}
+
+bool TBC::ImportToolBarControl( CTBWrapper& rWrapper, const css::uno::Reference< css::container::XIndexContainer >& toolbarcontainer, CustomToolBarImportHelper& helper, bool bIsMenuToolbar )
+{
+ // how to identify built-in-command ?
+// bool bBuiltin = false;
+ if ( tbcd.get() )
+ {
+ std::vector< css::beans::PropertyValue > props;
+/*
+ if ( bBuiltin )
+ {
+ rtl::OUString sCommand = helper.MSOCommandToOOCommand( cmdId );
+ if ( sCommand.getLength() > 0 )
+ {
+ beans::PropertyValue aProp;
+
+ aProp.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CommandURL") );
+ aProp.Value <<= sCommand;
+ props.push_back( aProp );
+ }
+
+ }
+*/
+ bool bBeginGroup = false;
+ if ( ! tbcd->ImportToolBarControl( helper, props, bBeginGroup, bIsMenuToolbar ) )
+ return false;
+ TBCMenuSpecific* pMenu = tbcd->getMenuSpecific();
+ if ( pMenu )
+ {
+ // search for CTB with the appropriate name ( it contains the
+ // menu items, although we cannot import ( or create ) a menu on
+ // a custom toolbar we can import the menu items in a separate
+ // toolbar ( better than nothing )
+ CTB* pCustTB = rWrapper.GetCustomizationData( pMenu->Name() );
+ if ( pCustTB )
+ {
+ uno::Reference< container::XIndexContainer > xMenuDesc;
+ uno::Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
+ xMenuDesc.set( xMSF->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.IndexedPropertyValues" ) ) ), uno::UNO_QUERY_THROW );
+ if ( !pCustTB->ImportMenuTB( rWrapper, xMenuDesc, helper ) )
+ return false;
+ if ( !bIsMenuToolbar )
+ {
+ if ( !helper.createMenu( pMenu->Name(), uno::Reference< container::XIndexAccess >( xMenuDesc, uno::UNO_QUERY ), true ) )
+ return false;
+ }
+ else
+ {
+ beans::PropertyValue aProp;
+ aProp.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ItemDescriptorContainer") );
+ aProp.Value <<= xMenuDesc;
+ props.push_back( aProp );
+ }
+ }
+ }
+
+ if ( bBeginGroup )
+ {
+ // insert spacer
+ uno::Sequence< beans::PropertyValue > sProps( 1 );
+ sProps[ 0 ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Type") );
+ sProps[ 0 ].Value = uno::makeAny( ui::ItemType::SEPARATOR_LINE );
+ toolbarcontainer->insertByIndex( toolbarcontainer->getCount(), uno::makeAny( sProps ) );
+ }
+ uno::Sequence< beans::PropertyValue > sProps( props.size() );
+ beans::PropertyValue* pProp = sProps.getArray();
+
+ for ( std::vector< css::beans::PropertyValue >::iterator it = props.begin(); it != props.end(); ++it, ++pProp )
+ *pProp = *it;
+
+ toolbarcontainer->insertByIndex( toolbarcontainer->getCount(), uno::makeAny( sProps ) );
+ }
+ return true;
+}
+
+void
+TBCCmd::Print(FILE* fp)
+{
+ Indent a;
+ indent_printf( fp, " TBCCmd -- dump\n" );
+ indent_printf( fp, " cmdID 0x%x\n", cmdID );
+ indent_printf( fp, " A ( fHideDrawing ) %s\n", A ? "true" : "false" );
+ indent_printf( fp, " B ( reserved - ignored ) %s\n", A ? "true" : "false" );
+ indent_printf( fp, " cmdType 0x%x\n", cmdType );
+ indent_printf( fp, " C ( reserved - ignored ) %s\n", A ? "true" : "false" );
+ indent_printf( fp, " reserved3 0x%x\n", reserved3 );
+}
+
+bool TBCCmd::Read( SvStream *pS )
+{
+ OSL_TRACE("TBCCmd::Read() stream pos 0x%x", pS->Tell() );
+ nOffSet = pS->Tell();
+ *pS >> cmdID;
+ sal_uInt16 temp;
+ *pS >> temp;
+ OSL_TRACE("TBCmd temp = 0x%x", temp );
+ A = (temp & 0x8000 ) == 0x8000;
+ B = (temp & 0x4000) == 0x4000;
+ cmdType = ( temp & 0x3E00 ) >> 9;
+ C = ( temp & 0x100 ) == 0x100;
+ reserved3 = ( temp & 0xFF );
+ return true;
+}
+
+CTBWrapper::CTBWrapper()
+{
+}
+
+CTBWrapper::~CTBWrapper()
+{
+}
+
+bool
+CTBWrapper::Read( SvStream *pS)
+{
+ OSL_TRACE("CTBWrapper::Read() stream pos 0x%x", pS->Tell() );
+ nOffSet = pS->Tell();
+ if ( !ctbSet.Read( pS ) )
+ return false;
+ for ( sal_uInt16 index = 0; index < ctbSet.ctb; ++index )
+ {
+ CTB aCTB( ctbSet.ctbViews );
+ if ( !aCTB.Read( pS ) )
+ return false;
+ rCTB.push_back( aCTB );
+ }
+ return true;
+}
+
+void
+CTBWrapper::Print( FILE* fp )
+{
+ Indent a;
+ indent_printf( fp, "[ 0x%x ] CTBWrapper -- dump\n", nOffSet );
+ ctbSet.Print( fp );
+ std::vector<CTB>::iterator it_end = rCTB.end();
+ for ( std::vector<CTB>::iterator it = rCTB.begin(); it != it_end; ++it )
+ {
+ Indent b;
+ it->Print( fp );
+ }
+}
+
+CTB* CTBWrapper::GetCustomizationData( const rtl::OUString& sTBName )
+{
+ CTB* pCTB = NULL;
+ for ( std::vector< CTB >::iterator it = rCTB.begin(); it != rCTB.end(); ++it )
+ {
+ if ( it->GetName().equals( sTBName ) )
+ {
+ pCTB = &(*it);
+ break;
+ }
+ }
+ return pCTB;
+}
+
+bool CTBWrapper::ImportCustomToolBar( SfxObjectShell& rDocSh )
+{
+ std::vector<CTB>::iterator it_end = rCTB.end();
+ for ( std::vector<CTB>::iterator it = rCTB.begin(); it != it_end; ++it )
+ {
+ // for each customtoolbar
+ uno::Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
+ uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xAppCfgSupp( xMSF->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.ModuleUIConfigurationManagerSupplier" ) ) ), uno::UNO_QUERY_THROW );
+ CustomToolBarImportHelper helper( rDocSh, xAppCfgSupp->getUIConfigurationManager( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.SpreadsheetDocument" ) ) ) );
+ helper.setMSOCommandMap( new MSOExcelCommandConvertor() );
+ // Ignore menu toolbars, excel doesn't ( afaics ) store
+ // menu customizations ( but you can have menus in a customtoolbar
+ // such menus will be dealt with when they are encountered
+ // as part of importing the appropriate MenuSpecific toolbar control )
+
+
+ if ( !(*it).IsMenuToolbar() )
+ {
+ if ( !(*it).ImportCustomToolBar( *this, helper ) )
+ return false;
+ }
+ }
+ return true;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xltoolbar.hxx b/sc/source/filter/excel/xltoolbar.hxx
new file mode 100644
index 000000000000..3166c6f0969c
--- /dev/null
+++ b/sc/source/filter/excel/xltoolbar.hxx
@@ -0,0 +1,98 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+#ifndef _XLTOOLBAR_HXX
+#define _XLTOOLBAR_HXX
+
+#include <filter/msfilter/mstoolbar.hxx>
+
+namespace css = ::com::sun::star;
+
+class CTBWrapper;
+// hmm I don't normally use these packed structures
+// but.. hey always good to do something different
+class TBCCmd : public TBBase
+{
+public:
+ TBCCmd() : cmdID(0), A(0), B(0), cmdType(0), C(0), reserved3(0) {}
+ sal_uInt16 cmdID;
+ sal_uInt16 A:1;
+ sal_uInt16 B:1;
+ sal_uInt16 cmdType:5;
+ sal_uInt16 C:1;
+ sal_uInt16 reserved3:8;
+ bool Read( SvStream* pS );
+ void Print(FILE* fp);
+};
+
+class TBC : public TBBase
+{
+ TBCHeader tbch;
+ boost::shared_ptr<TBCCmd> tbcCmd; // optional
+ boost::shared_ptr<TBCData> tbcd;
+public:
+ TBC();
+ ~TBC(){}
+ void Print( FILE* );
+ bool Read(SvStream *pS);
+ bool ImportToolBarControl( CTBWrapper&, const com::sun::star::uno::Reference< com::sun::star::container::XIndexContainer >& toolbarcontainer, CustomToolBarImportHelper& helper, bool bIsMenuBar );
+};
+
+class CTB : public TBBase
+{
+ sal_uInt16 nViews;
+ TB tb;
+ std::vector<TBVisualData> rVisualData;
+ sal_uInt32 ectbid;
+ std::vector< TBC > rTBC;
+ bool ImportCustomToolBar_Impl( CTBWrapper&, CustomToolBarImportHelper& );
+public:
+ CTB();
+ CTB(sal_uInt16);
+ ~CTB(){}
+ void Print( FILE* );
+ bool Read(SvStream *pS);
+ bool IsMenuToolbar();
+ bool ImportCustomToolBar( CTBWrapper&, CustomToolBarImportHelper& );
+ bool ImportMenuTB( CTBWrapper&, const css::uno::Reference< css::container::XIndexContainer >&, CustomToolBarImportHelper& );
+ rtl::OUString GetName() { return tb.getName().getString(); }
+
+
+};
+
+class CTBS : public TBBase
+{
+public:
+ sal_uInt8 bSignature;
+ sal_uInt8 bVersion;
+ sal_uInt16 reserved1;
+ sal_uInt16 reserved2;
+ sal_uInt16 reserved3;
+ sal_uInt16 ctb;
+ sal_uInt16 ctbViews;
+ sal_uInt16 ictbView;
+ CTBS(const CTBS&);
+ CTBS& operator = ( const CTBS&);
+ CTBS();
+ ~CTBS(){}
+ void Print( FILE* );
+ bool Read(SvStream *pS);
+};
+
+class CTBWrapper : public TBBase
+{
+ CTBS ctbSet;
+
+ std::vector< CTB > rCTB;
+
+public:
+ CTBWrapper();
+ ~CTBWrapper();
+ bool Read(SvStream *pS);
+ void Print( FILE* );
+ bool ImportCustomToolBar( SfxObjectShell& rDocSh );
+ CTB* GetCustomizationData( const rtl::OUString& name );
+};
+
+
+#endif //_XLTOOLBAR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xltools.cxx b/sc/source/filter/excel/xltools.cxx
index 0dd988d67586..5ee9429ebac7 100644
--- a/sc/source/filter/excel/xltools.cxx
+++ b/sc/source/filter/excel/xltools.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -689,7 +690,7 @@ void XclTools::SkipSubStream( XclImpStream& rStrm )
// Basic macro names ----------------------------------------------------------
-const OUString XclTools::maSbMacroPrefix( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.script:Standard." ) );
+const OUString XclTools::maSbMacroPrefix( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.script:" ) );
const OUString XclTools::maSbMacroSuffix( RTL_CONSTASCII_USTRINGPARAM( "?language=Basic&location=document" ) );
OUString XclTools::GetSbMacroUrl( const String& rMacroName, SfxObjectShell* pDocShell )
@@ -714,7 +715,10 @@ String XclTools::GetXclMacroName( const OUString& rSbMacroUrl )
sal_Int32 nMacroNameLen = nSbMacroUrlLen - maSbMacroPrefix.getLength() - maSbMacroSuffix.getLength();
if( (nMacroNameLen > 0) && rSbMacroUrl.matchIgnoreAsciiCase( maSbMacroPrefix, 0 ) &&
rSbMacroUrl.matchIgnoreAsciiCase( maSbMacroSuffix, nSbMacroUrlLen - maSbMacroSuffix.getLength() ) )
- return rSbMacroUrl.copy( maSbMacroPrefix.getLength(), nMacroNameLen );
+ {
+ sal_Int32 nPrjDot = rSbMacroUrl.indexOf( '.', maSbMacroPrefix.getLength() ) + 1;
+ return rSbMacroUrl.copy( nPrjDot, nSbMacroUrlLen - nPrjDot - maSbMacroSuffix.getLength() );
+ }
return String::EmptyString();
}
@@ -734,3 +738,5 @@ XclExpStream& operator<<( XclExpStream& rStrm, const Color& rColor )
}
// ============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xltracer.cxx b/sc/source/filter/excel/xltracer.cxx
index 7dadbde8198a..948fa41efbdf 100644
--- a/sc/source/filter/excel/xltracer.cxx
+++ b/sc/source/filter/excel/xltracer.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -268,3 +269,4 @@ void XclTracer::TraceDVType( bool bType)
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xlview.cxx b/sc/source/filter/excel/xlview.cxx
index 8e9df7e0ac1f..63512e4ec2d5 100644
--- a/sc/source/filter/excel/xlview.cxx
+++ b/sc/source/filter/excel/xlview.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -113,3 +114,4 @@ XclSelectionData& XclTabViewData::CreateSelectionData( sal_uInt8 nPane )
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/ftools/fapihelper.cxx b/sc/source/filter/ftools/fapihelper.cxx
index bb97119a1338..ac41cc47b224 100644
--- a/sc/source/filter/ftools/fapihelper.cxx
+++ b/sc/source/filter/ftools/fapihelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -404,3 +405,4 @@ Any* ScfPropSetHelper::GetNextAny()
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/ftools/fprogressbar.cxx b/sc/source/filter/ftools/fprogressbar.cxx
index 176ff16ba5db..533891b0d6fc 100644
--- a/sc/source/filter/ftools/fprogressbar.cxx
+++ b/sc/source/filter/ftools/fprogressbar.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -250,3 +251,4 @@ void ScfStreamProgressBar::Init( SfxObjectShell* pDocShell, const String& rText
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx
index 72e5f115fed0..ce6264b50828 100644
--- a/sc/source/filter/ftools/ftools.cxx
+++ b/sc/source/filter/ftools/ftools.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -404,3 +405,4 @@ ScFormatFilterPlugin * SAL_CALL ScFilterCreate(void)
// implementation class inside the filters
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/ftools/makefile.mk b/sc/source/filter/ftools/makefile.mk
index 27a960efc6b0..d37e74a133a0 100644
--- a/sc/source/filter/ftools/makefile.mk
+++ b/sc/source/filter/ftools/makefile.mk
@@ -38,9 +38,7 @@ PROJECTPCHSOURCE=..\pch\filt_pch
# --- Settings -----------------------------------------------------
-.INCLUDE : scpre.mk
.INCLUDE : settings.mk
-.INCLUDE : sc.mk
# --- Files --------------------------------------------------------
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index 05de5963b88b..3b656448af39 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -972,11 +973,6 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
BOOL bItalic = ( ITALIC_NONE != rPostureItem.GetPosture() );
BOOL bUnderline = ( UNDERLINE_NONE != rUnderlineItem.GetLineStyle() );
BOOL bSetFontColor = ( COL_AUTO != rColorItem.GetValue().GetColor() ); // #97650# default is AUTO now
-#if 0
-// keine StyleSheet-Fontangaben: hart fuer jede Zelle
- BOOL bSetFontName = TRUE;
- USHORT nSetFontSizeNumber = GetFontSizeNumber( (USHORT)rFontHeightItem.GetHeight() );
-#else
BOOL bSetFontName = ( aHTMLStyle.aFontFamilyName != rFontItem.GetFamilyName() );
USHORT nSetFontSizeNumber = 0;
UINT32 nFontHeight = rFontHeightItem.GetHeight();
@@ -986,7 +982,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
if ( nSetFontSizeNumber == aHTMLStyle.nFontSizeNumber )
nSetFontSizeNumber = 0; // no difference, don't set
}
-#endif
+
BOOL bSetFont = (bSetFontColor || bSetFontName || nSetFontSizeNumber);
//! TODO: we could entirely use CSS1 here instead, but that would exclude
@@ -1347,3 +1343,4 @@ void ScHTMLExport::IncIndent( short nVal )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/html/htmlexp2.cxx b/sc/source/filter/html/htmlexp2.cxx
index 341f9afbc739..c6299bda127a 100644
--- a/sc/source/filter/html/htmlexp2.cxx
+++ b/sc/source/filter/html/htmlexp2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -247,3 +248,4 @@ void ScHTMLExport::WriteImage( String& rLinkName, const Graphic& rGrf,
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/html/htmlimp.cxx b/sc/source/filter/html/htmlimp.cxx
index 1c0b9fc8ec33..0c5e0ffd0b4c 100644
--- a/sc/source/filter/html/htmlimp.cxx
+++ b/sc/source/filter/html/htmlimp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -258,3 +259,4 @@ String ScHTMLImport::GetHTMLRangeNameList( ScDocument* pDoc, const String& rOrig
return aNewName;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index 5fea4b9687ae..e7caef029ed1 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -3068,3 +3069,4 @@ IMPL_LINK( ScHTMLQueryParser, HTMLImportHdl, const ImportInfo*, pInfo )
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/html/makefile.mk b/sc/source/filter/html/makefile.mk
index 93e992c67e31..41db4de9780f 100644
--- a/sc/source/filter/html/makefile.mk
+++ b/sc/source/filter/html/makefile.mk
@@ -40,9 +40,7 @@ VISIBILITY_HIDDEN=TRUE
# --- Settings -----------------------------------------------------
-.INCLUDE : scpre.mk
.INCLUDE : settings.mk
-.INCLUDE : sc.mk
# --- Files --------------------------------------------------------
diff --git a/sc/source/filter/inc/XclExpChangeTrack.hxx b/sc/source/filter/inc/XclExpChangeTrack.hxx
index 01eb076f6b3d..f908fb1d9668 100644
--- a/sc/source/filter/inc/XclExpChangeTrack.hxx
+++ b/sc/source/filter/inc/XclExpChangeTrack.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -238,6 +239,8 @@ public:
virtual UINT16 GetNum() const;
virtual sal_Size GetLen() const;
+
+ virtual void SaveXml( XclExpXmlStream& rStrm );
};
//___________________________________________________________________
@@ -247,6 +250,7 @@ class XclExpChTrInfo : public ExcRecord
{
private:
XclExpString sUsername;
+ sal_Int32 mnLogNumber;
DateTime aDateTime;
sal_uInt8 aGUID[ 16 ];
@@ -256,15 +260,19 @@ public:
inline XclExpChTrInfo(
const String& rUsername,
const DateTime& rDateTime,
- const sal_uInt8* pGUID );
+ const sal_uInt8* pGUID,
+ sal_Int32 nLogNumber );
virtual ~XclExpChTrInfo();
virtual UINT16 GetNum() const;
virtual sal_Size GetLen() const;
+
+ virtual void SaveXml( XclExpXmlStream& rStrm );
};
-inline XclExpChTrInfo::XclExpChTrInfo( const String& rUsername, const DateTime& rDateTime, const sal_uInt8* pGUID ) :
+inline XclExpChTrInfo::XclExpChTrInfo( const String& rUsername, const DateTime& rDateTime, const sal_uInt8* pGUID, sal_Int32 nLogNumber ) :
sUsername( rUsername ),
+ mnLogNumber( nLogNumber ),
aDateTime( rDateTime )
{
memcpy( aGUID, pGUID, 16 );
@@ -322,6 +330,7 @@ class XclExpChTrTabId : public ExcRecord
private:
sal_uInt16* pBuffer;
sal_uInt16 nTabCount;
+ bool mbInRevisionHeaders;
inline void Clear() { if( pBuffer ) delete[] pBuffer; pBuffer = NULL; }
@@ -329,14 +338,16 @@ private:
public:
inline XclExpChTrTabId( sal_uInt16 nCount ) :
- pBuffer( NULL ), nTabCount( nCount ) {}
- XclExpChTrTabId( const XclExpChTrTabIdBuffer& rBuffer );
+ pBuffer( NULL ), nTabCount( nCount ), mbInRevisionHeaders( false ) {}
+ XclExpChTrTabId( const XclExpChTrTabIdBuffer& rBuffer, bool bInRevisionHeaders = false );
virtual ~XclExpChTrTabId();
void Copy( const XclExpChTrTabIdBuffer& rBuffer );
virtual UINT16 GetNum() const;
virtual sal_Size GetLen() const;
+
+ virtual void SaveXml( XclExpXmlStream& rStrm );
};
//___________________________________________________________________
@@ -368,6 +379,7 @@ protected:
inline void Write2DAddress( XclExpStream& rStrm, const ScAddress& rAddress ) const;
inline void Write2DRange( XclExpStream& rStrm, const ScRange& rRange ) const;
+ inline sal_uInt16 GetTabId( SCTAB nTabId ) const;
inline void WriteTabId( XclExpStream& rStrm, SCTAB nTabId ) const;
// save header data, call SaveActionData()
@@ -384,6 +396,9 @@ protected:
// do something after writing the record
virtual void CompleteSaveAction( XclExpStream& rStrm ) const;
+ inline sal_uInt32 GetActionNumber() const { return nIndex; }
+ inline sal_Bool GetAccepted() const { return bAccepted; }
+
public:
XclExpChTrAction(
const ScChangeAction& rAction,
@@ -403,6 +418,8 @@ public:
virtual void Save( XclExpStream& rStrm );
virtual sal_Size GetLen() const;
+
+ inline XclExpChTrAction* GetAddAction() { return pAddAction; }
};
inline void XclExpChTrAction::Write2DAddress( XclExpStream& rStrm, const ScAddress& rAddress ) const
@@ -419,9 +436,14 @@ inline void XclExpChTrAction::Write2DRange( XclExpStream& rStrm, const ScRange&
<< (sal_uInt16) rRange.aEnd.Col();
}
+inline sal_uInt16 XclExpChTrAction::GetTabId( SCTAB nTab ) const
+{
+ return rIdBuffer.GetId( rTabInfo.GetXclTab( nTab ) );
+}
+
inline void XclExpChTrAction::WriteTabId( XclExpStream& rStrm, SCTAB nTab ) const
{
- rStrm << rIdBuffer.GetId( rTabInfo.GetXclTab( nTab ) );
+ rStrm << GetTabId( nTab );
}
//___________________________________________________________________
@@ -430,6 +452,8 @@ inline void XclExpChTrAction::WriteTabId( XclExpStream& rStrm, SCTAB nTab ) cons
struct XclExpChTrData
{
XclExpString* pString;
+ XclExpStringRef mpFormattedString;
+ const ScFormulaCell* mpFormulaCell;
XclTokenArrayRef mxTokArr;
XclExpRefLog maRefLog;
double fValue;
@@ -465,6 +489,7 @@ protected:
ScAddress aPosition;
void GetCellData(
+ const XclExpRoot& rRoot,
const ScBaseCell* pScCell,
XclExpChTrData*& rpData,
sal_uInt32& rXclLength1,
@@ -481,6 +506,8 @@ public:
virtual UINT16 GetNum() const;
virtual sal_Size GetActionByteCount() const;
+
+ virtual void SaveXml( XclExpXmlStream& rStrm );
};
//___________________________________________________________________
@@ -508,6 +535,8 @@ public:
virtual UINT16 GetNum() const;
virtual sal_Size GetActionByteCount() const;
+
+ virtual void SaveXml( XclExpXmlStream& rStrm );
};
//___________________________________________________________________
@@ -530,6 +559,8 @@ public:
virtual UINT16 GetNum() const;
virtual sal_Size GetActionByteCount() const;
+
+ virtual void SaveXml( XclExpXmlStream& rStrm );
};
//___________________________________________________________________
@@ -555,6 +586,8 @@ public:
virtual UINT16 GetNum() const;
virtual sal_Size GetActionByteCount() const;
+
+ virtual void SaveXml( XclExpXmlStream& rStrm );
};
//___________________________________________________________________
@@ -571,6 +604,8 @@ public:
virtual UINT16 GetNum() const;
virtual sal_Size GetActionByteCount() const;
+
+ virtual void SaveXml( XclExpXmlStream& rStrm );
};
//___________________________________________________________________
@@ -603,6 +638,7 @@ public:
using List::Count;
void Append( ExcRecord* pNewRec );
void Save( XclExpStream& rStrm );
+ void SaveXml( XclExpXmlStream& rStrm );
};
//___________________________________________________________________
@@ -633,9 +669,11 @@ public:
~XclExpChangeTrack();
void Write();
+ void WriteXml( XclExpXmlStream& rStrm );
};
//___________________________________________________________________
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/XclImpChangeTrack.hxx b/sc/source/filter/inc/XclImpChangeTrack.hxx
index c850d6681235..0bed2ca49c2f 100644
--- a/sc/source/filter/inc/XclImpChangeTrack.hxx
+++ b/sc/source/filter/inc/XclImpChangeTrack.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -200,3 +201,4 @@ inline XclImpChTrFmlConverter::XclImpChTrFmlConverter(
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/biff.hxx b/sc/source/filter/inc/biff.hxx
index 479dc0f577f5..d2cba2e8d06a 100644
--- a/sc/source/filter/inc/biff.hxx
+++ b/sc/source/filter/inc/biff.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -62,3 +63,4 @@ class ScBiffReader
};
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/colrowst.hxx b/sc/source/filter/inc/colrowst.hxx
index a82cf138d07d..525db195bac1 100644
--- a/sc/source/filter/inc/colrowst.hxx
+++ b/sc/source/filter/inc/colrowst.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -87,3 +88,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/decl.h b/sc/source/filter/inc/decl.h
index e888b7dca5fe..c57446c8299d 100644
--- a/sc/source/filter/inc/decl.h
+++ b/sc/source/filter/inc/decl.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,3 +43,4 @@ typedef USHORT USHORT4[ 4 ];
//typedef unsigned short USHORT4[ 4 ];
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/dif.hxx b/sc/source/filter/inc/dif.hxx
index 20b2400cf5a2..20d7d8e79926 100644
--- a/sc/source/filter/inc/dif.hxx
+++ b/sc/source/filter/inc/dif.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -225,3 +226,4 @@ inline void DifAttrCache::SetLogical( const SCCOL nCol, const SCROW nRow )
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/eeimport.hxx b/sc/source/filter/inc/eeimport.hxx
index 634dfd1b4a33..2d1081c3debc 100644
--- a/sc/source/filter/inc/eeimport.hxx
+++ b/sc/source/filter/inc/eeimport.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -66,3 +67,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/eeparser.hxx b/sc/source/filter/inc/eeparser.hxx
index afc8c959392b..b0d7a20e7743 100644
--- a/sc/source/filter/inc/eeparser.hxx
+++ b/sc/source/filter/inc/eeparser.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -151,3 +152,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/excdefs.hxx b/sc/source/filter/inc/excdefs.hxx
index 2d489af7e427..ae8a1cd4c861 100644
--- a/sc/source/filter/inc/excdefs.hxx
+++ b/sc/source/filter/inc/excdefs.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -104,3 +105,4 @@ const sal_uInt8 EXC_AFOPER_GREATEREQUAL = 0x06;
#endif // _EXCDEFS_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/excdoc.hxx b/sc/source/filter/inc/excdoc.hxx
index 5da6a5d38d83..26b9a64ef89a 100644
--- a/sc/source/filter/inc/excdoc.hxx
+++ b/sc/source/filter/inc/excdoc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -110,7 +111,7 @@ public:
void ReadDoc( void );
void Write( SvStream& rSvStrm );
- void WriteXml( SvStream& rSvStrm );
+ void WriteXml( XclExpXmlStream& );
};
@@ -118,3 +119,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/excform.hxx b/sc/source/filter/inc/excform.hxx
index 5d6041923a37..9332f1ad502d 100644
--- a/sc/source/filter/inc/excform.hxx
+++ b/sc/source/filter/inc/excform.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -72,10 +73,6 @@ public:
const ScTokenArray* GetBoolErr( XclBoolError );
BOOL GetShrFmla( const ScTokenArray*&, XclImpStream& rStrm, sal_Size nFormulaLen );
-#if 0
- // return = TRUE -> String-Record folgt!
- static BOOL SetCurVal( ScFormulaCell& rCell, double& rCurVal );
-#endif
static void SetError( ScFormulaCell& rCell, const ConvErr eErr );
static inline BOOL IsComplColRange( const UINT16 nCol1, const UINT16 nCol2 );
@@ -158,3 +155,5 @@ inline BOOL ExcelToSc8::IsComplRowRange( const UINT16 nRow1, const UINT16 nRow2
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/excimp8.hxx b/sc/source/filter/inc/excimp8.hxx
index 7e4cca15dfe1..5d3679a73256 100644
--- a/sc/source/filter/inc/excimp8.hxx
+++ b/sc/source/filter/inc/excimp8.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,6 +58,9 @@ public:
virtual FltError Read( void );
protected:
+ // represents codename ( and associated modules )
+ // not speficied directly in the binary format
+ std::vector< String > AutoGeneratedCodeNames;
ExcScenarioList aScenList;
void Calccount( void ); // 0x0C
@@ -163,3 +167,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/excrecds.hxx b/sc/source/filter/inc/excrecds.hxx
index bc960f05b3a5..a450fb00f368 100644
--- a/sc/source/filter/inc/excrecds.hxx
+++ b/sc/source/filter/inc/excrecds.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -72,6 +73,7 @@ class ExcRecord : public XclExpRecord
{
public:
virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
virtual UINT16 GetNum() const = 0;
virtual sal_Size GetLen() const = 0;
@@ -285,6 +287,8 @@ public:
virtual UINT16 GetNum( void ) const;
virtual void SaveXml( XclExpXmlStream& rStrm );
+private:
+ BOOL bDateCompatibility;
};
@@ -471,6 +475,7 @@ private:
XclExpFiltermode* pFilterMode;
XclExpAutofilterinfo* pFilterInfo;
ScRange maRef;
+ bool mbAutoFilter;
};
// ----------------------------------------------------------------------------
@@ -504,3 +509,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/excscen.hxx b/sc/source/filter/inc/excscen.hxx
index 125f74e9fa54..2d0d0c8246d3 100644
--- a/sc/source/filter/inc/excscen.hxx
+++ b/sc/source/filter/inc/excscen.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -145,3 +146,4 @@ inline void ExcScenarioList::SetLast( const UINT16 n )
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/exp_op.hxx b/sc/source/filter/inc/exp_op.hxx
index 79fff8675d84..ff1f1f11bcb5 100644
--- a/sc/source/filter/inc/exp_op.hxx
+++ b/sc/source/filter/inc/exp_op.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -127,21 +128,7 @@ public:
};
-class ExportXml2007 : public ExportTyp, protected XclExpRoot
-{
-private:
- ExcDocument* pExcDoc;
-
-protected:
- RootData* pExcRoot;
-
-public:
- ExportXml2007( XclExpRootData& rExpData, SvStream& rStrm );
- virtual ~ExportXml2007();
- FltError Write();
-};
-
-
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/expbase.hxx b/sc/source/filter/inc/expbase.hxx
index 3744bf497927..1500e7d634f5 100644
--- a/sc/source/filter/inc/expbase.hxx
+++ b/sc/source/filter/inc/expbase.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -80,3 +81,4 @@ public:
#endif // SC_EXPBASE_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/fapihelper.hxx b/sc/source/filter/inc/fapihelper.hxx
index 64a190025714..babf2cc575d7 100644
--- a/sc/source/filter/inc/fapihelper.hxx
+++ b/sc/source/filter/inc/fapihelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -344,3 +345,4 @@ ScfPropSetHelper& operator<<( ScfPropSetHelper& rPropSetHelper, const Type& rVal
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/filt_pch.hxx b/sc/source/filter/inc/filt_pch.hxx
index 7ed39760f600..3b9ebde307e8 100644
--- a/sc/source/filter/inc/filt_pch.hxx
+++ b/sc/source/filter/inc/filt_pch.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -155,9 +156,6 @@
#include <tools/shl.hxx>
#include <tools/pstm.hxx>
#include <editeng/fhgtitem.hxx>
-#include <vos/types.hxx>
-#include <vos/object.hxx>
-#include <vos/macros.hxx>
#include <tools/unqid.hxx>
#include <com/sun/star/uno/Sequence.h>
#include <uno/sequence2.h>
@@ -220,9 +218,8 @@
#include <com/sun/star/container/NoSuchElementException.hdl>
#include <com/sun/star/container/NoSuchElementException.hpp>
#include <vcl/svapp.hxx>
-#include <vos/thread.hxx>
-#include <vos/runnable.hxx>
-#include <vos/refernce.hxx>
+#include <osl/thread.hxx>
+#include <salhelper/simplereferenceobject.hxx>
#include <vcl/apptypes.hxx>
#include <editeng/editdata.hxx>
#include <editeng/editeng.hxx>
@@ -315,3 +312,4 @@
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/fkttab.h b/sc/source/filter/inc/fkttab.h
index 3d834c5cf04d..5604fff3ac7d 100644
--- a/sc/source/filter/inc/fkttab.h
+++ b/sc/source/filter/inc/fkttab.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,3 +45,4 @@ extern BEARBFKT *pFkt[ 256 ];
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/flttypes.hxx b/sc/source/filter/inc/flttypes.hxx
index 0a78889feb8c..c34fff6c2299 100644
--- a/sc/source/filter/inc/flttypes.hxx
+++ b/sc/source/filter/inc/flttypes.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -49,3 +50,4 @@ enum Lotus123Typ
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/formel.hxx b/sc/source/filter/inc/formel.hxx
index 133b0e64aff0..7abed0dade97 100644
--- a/sc/source/filter/inc/formel.hxx
+++ b/sc/source/filter/inc/formel.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -292,3 +293,4 @@ inline void LotusConverterBase::Read( UINT32& nUINT32 )
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/fprogressbar.hxx b/sc/source/filter/inc/fprogressbar.hxx
index 07f61b463140..b65b12d981f0 100644
--- a/sc/source/filter/inc/fprogressbar.hxx
+++ b/sc/source/filter/inc/fprogressbar.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -240,3 +241,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/ftools.hxx b/sc/source/filter/inc/ftools.hxx
index c17aaa70445c..d02cba498fcf 100644
--- a/sc/source/filter/inc/ftools.hxx
+++ b/sc/source/filter/inc/ftools.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -542,3 +543,5 @@ class ScFormatFilterPluginImpl : public ScFormatFilterPlugin {
// ============================================================================
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/funktion.h b/sc/source/filter/inc/funktion.h
index ef8ecabc256a..2377fbe16bf1 100644
--- a/sc/source/filter/inc/funktion.h
+++ b/sc/source/filter/inc/funktion.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -48,3 +49,4 @@ void ConstString( void ); // 6
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/htmlexp.hxx b/sc/source/filter/inc/htmlexp.hxx
index 4cdf71b8610d..4a7e8f3f32b9 100644
--- a/sc/source/filter/inc/htmlexp.hxx
+++ b/sc/source/filter/inc/htmlexp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -172,3 +173,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/htmlimp.hxx b/sc/source/filter/inc/htmlimp.hxx
index 0376b3cd72f5..31c2dd0dbd2b 100644
--- a/sc/source/filter/inc/htmlimp.hxx
+++ b/sc/source/filter/inc/htmlimp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,3 +51,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/htmlpars.hxx b/sc/source/filter/inc/htmlpars.hxx
index f053a1088ff1..ffad22b23828 100644
--- a/sc/source/filter/inc/htmlpars.hxx
+++ b/sc/source/filter/inc/htmlpars.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -636,3 +637,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/imp_op.hxx b/sc/source/filter/inc/imp_op.hxx
index 2df58173a63a..f5d85328afdf 100644
--- a/sc/source/filter/inc/imp_op.hxx
+++ b/sc/source/filter/inc/imp_op.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -203,3 +204,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/lotattr.hxx b/sc/source/filter/inc/lotattr.hxx
index 7015136f1be1..f9c8c88fb222 100644
--- a/sc/source/filter/inc/lotattr.hxx
+++ b/sc/source/filter/inc/lotattr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -151,3 +152,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/lotfntbf.hxx b/sc/source/filter/inc/lotfntbf.hxx
index 5c8771814206..0cbdda762bc4 100644
--- a/sc/source/filter/inc/lotfntbf.hxx
+++ b/sc/source/filter/inc/lotfntbf.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -109,3 +110,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/lotform.hxx b/sc/source/filter/inc/lotform.hxx
index 0a341e29ae51..b9fac939192e 100644
--- a/sc/source/filter/inc/lotform.hxx
+++ b/sc/source/filter/inc/lotform.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -130,3 +131,4 @@ inline void LotusToSc::SetWK3( void )
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/lotimpop.hxx b/sc/source/filter/inc/lotimpop.hxx
index 15c0a2931dc4..09efab80320a 100644
--- a/sc/source/filter/inc/lotimpop.hxx
+++ b/sc/source/filter/inc/lotimpop.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -167,3 +168,5 @@ inline void ImportLotus::Skip( const UINT16 n )
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/lotrange.hxx b/sc/source/filter/inc/lotrange.hxx
index ab9acf9f476e..2f520deff2c9 100644
--- a/sc/source/filter/inc/lotrange.hxx
+++ b/sc/source/filter/inc/lotrange.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -165,3 +166,4 @@ inline void LotusRangeList::SetEing( const SCCOL nCol, const SCROW nRow )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/namebuff.hxx b/sc/source/filter/inc/namebuff.hxx
index c8182e8c0c17..d0eac381722c 100644
--- a/sc/source/filter/inc/namebuff.hxx
+++ b/sc/source/filter/inc/namebuff.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -354,3 +355,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/op.h b/sc/source/filter/inc/op.h
index 9cfd3d1aecc8..d44053de2a44 100644
--- a/sc/source/filter/inc/op.h
+++ b/sc/source/filter/inc/op.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,3 +68,5 @@ void OP_VerAlign123(BYTE nAlignPattern, SfxItemSet& rPattern /* const ScPattern
void OP_ApplyPatternArea123(SvStream& r);
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/optab.h b/sc/source/filter/inc/optab.h
index d70eb1f29bb0..f4fb22af08c1 100644
--- a/sc/source/filter/inc/optab.h
+++ b/sc/source/filter/inc/optab.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,3 +51,4 @@ typedef void ( *OPCODE_FKT )( SvStream &aStream, USHORT nLaenge );
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/otlnbuff.hxx b/sc/source/filter/inc/otlnbuff.hxx
index e72f01051e38..71e94d9985a9 100644
--- a/sc/source/filter/inc/otlnbuff.hxx
+++ b/sc/source/filter/inc/otlnbuff.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,3 +58,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/qpro.hxx b/sc/source/filter/inc/qpro.hxx
index f631da120373..460e0a83ba8c 100644
--- a/sc/source/filter/inc/qpro.hxx
+++ b/sc/source/filter/inc/qpro.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,3 +58,4 @@ class ScQProReader : public ScBiffReader
};
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/qproform.hxx b/sc/source/filter/inc/qproform.hxx
index 18327cd141df..6e06827ad958 100644
--- a/sc/source/filter/inc/qproform.hxx
+++ b/sc/source/filter/inc/qproform.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -84,3 +85,5 @@ class QProToSc : public ConverterBase
const sal_Char* getString( sal_uInt8 nIndex );
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/qprostyle.hxx b/sc/source/filter/inc/qprostyle.hxx
index ffce2630b310..f52ce655d4bf 100644
--- a/sc/source/filter/inc/qprostyle.hxx
+++ b/sc/source/filter/inc/qprostyle.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,3 +68,5 @@ class ScQProStyle
{ if (nIndex < maxsize) maFont[ nIndex ] = nData; }
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/root.hxx b/sc/source/filter/inc/root.hxx
index facc8b1b2fa0..4c9800216a0f 100644
--- a/sc/source/filter/inc/root.hxx
+++ b/sc/source/filter/inc/root.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -117,3 +118,4 @@ extern LOTUS_ROOT* pLotusRoot; // -> Inkarn. in filter.cxx
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/rtfexp.hxx b/sc/source/filter/inc/rtfexp.hxx
index 4733d243d1a5..c37e647f5ec5 100644
--- a/sc/source/filter/inc/rtfexp.hxx
+++ b/sc/source/filter/inc/rtfexp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,3 +51,4 @@ public:
#endif // SC_RTFEXP_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/rtfimp.hxx b/sc/source/filter/inc/rtfimp.hxx
index 13ade86b7cd5..8278c497f6af 100644
--- a/sc/source/filter/inc/rtfimp.hxx
+++ b/sc/source/filter/inc/rtfimp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,3 +40,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/rtfparse.hxx b/sc/source/filter/inc/rtfparse.hxx
index 135e11e572ae..e2011e8206de 100644
--- a/sc/source/filter/inc/rtfparse.hxx
+++ b/sc/source/filter/inc/rtfparse.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -87,3 +88,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/scflt.hxx b/sc/source/filter/inc/scflt.hxx
index 995de274b28b..de8e342ac28d 100644
--- a/sc/source/filter/inc/scflt.hxx
+++ b/sc/source/filter/inc/scflt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -762,3 +763,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/scfobj.hxx b/sc/source/filter/inc/scfobj.hxx
index 4ed1784f4354..a83c2ea0a1d5 100644
--- a/sc/source/filter/inc/scfobj.hxx
+++ b/sc/source/filter/inc/scfobj.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,3 +44,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/scmem.h b/sc/source/filter/inc/scmem.h
index 03e30c1e9fc6..029351639f72 100644
--- a/sc/source/filter/inc/scmem.h
+++ b/sc/source/filter/inc/scmem.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,3 +36,4 @@ void MemDelete( void );
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/tokstack.hxx b/sc/source/filter/inc/tokstack.hxx
index fa1be6dcb912..0fc780bab344 100644
--- a/sc/source/filter/inc/tokstack.hxx
+++ b/sc/source/filter/inc/tokstack.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -403,3 +404,4 @@ inline E_TYPE TokenPool::GetType( const TokenId& rId ) const
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/tool.h b/sc/source/filter/inc/tool.h
index 93cc074d89f6..c0c936798fa3 100644
--- a/sc/source/filter/inc/tool.h
+++ b/sc/source/filter/inc/tool.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -162,3 +163,4 @@ inline const SfxUInt32Item* FormCache::GetAttr( BYTE nFormat, BYTE nSt )
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xcl97dum.hxx b/sc/source/filter/inc/xcl97dum.hxx
index a76a93321557..771a3edadfed 100644
--- a/sc/source/filter/inc/xcl97dum.hxx
+++ b/sc/source/filter/inc/xcl97dum.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -88,3 +89,5 @@ public:
#endif // _XCL97DUM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xcl97esc.hxx b/sc/source/filter/inc/xcl97esc.hxx
index fde03337cc0f..d48933bdbb62 100644
--- a/sc/source/filter/inc/xcl97esc.hxx
+++ b/sc/source/filter/inc/xcl97esc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,6 +35,7 @@
#include <filter/msfilter/escherex.hxx>
#include "xlescher.hxx"
#include "xeroot.hxx"
+#include <vector>
// 0 = Export TBX form controls, 1 = Export OCX form controls.
#define EXC_EXP_OCX_CTRL 0
@@ -70,6 +72,15 @@ class XclExpOcxControlObj;
#else
class XclExpTbxControlObj;
#endif
+class XclExpShapeObj;
+class EscherExHostAppData;
+class ShapeInteractionHelper
+{
+public:
+ static XclExpShapeObj* CreateShapeObj( XclExpObjectManager& rObjMgr, const ::com::sun::star::uno::Reference<
+ ::com::sun::star::drawing::XShape >& xShape );
+ static void PopulateShapeInteractionInfo( XclExpObjectManager& rObjMgr, const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape, EscherExHostAppData& rHostAppData );
+};
class XclEscherEx : public EscherEx, protected XclExpRoot
{
@@ -199,3 +210,5 @@ public:
#endif // _XCL97ESC_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xcl97rec.hxx b/sc/source/filter/inc/xcl97rec.hxx
index 201562fa752c..f15ed6b635bb 100644
--- a/sc/source/filter/inc/xcl97rec.hxx
+++ b/sc/source/filter/inc/xcl97rec.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,6 +37,7 @@
class XclObj;
class XclExpMsoDrawing;
+class SdrCaptionObj;
class XclExpObjList : public List, public ExcEmptyRec, protected XclExpRoot
{
@@ -56,8 +58,14 @@ public:
void EndSheet();
virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
+
+ static void ResetCounters();
private:
+ static sal_Int32 mnDrawingMLCount, mnVmlCount;
+ SCTAB mnScTab;
+
XclEscherEx& mrEscherEx;
XclExpMsoDrawing* pMsodrawingPerSheet;
XclExpMsoDrawing* pSolverContainer;
@@ -79,6 +87,7 @@ protected:
sal_uInt16 mnObjType;
UINT16 nObjId;
UINT16 nGrbit;
+ SCTAB mnScTab;
BOOL bFirstOnSheet;
bool mbOwnEscher; /// true = Escher part created on the fly.
@@ -100,6 +109,10 @@ public:
inline sal_uInt16 GetObjType() const { return mnObjType; }
inline void SetId( UINT16 nId ) { nObjId = nId; }
+ inline sal_uInt16 GetId() const { return nObjId; }
+
+ inline void SetTab( SCTAB nScTab ) { mnScTab = nScTab; }
+ inline SCTAB GetTab() const { return mnScTab; }
inline void SetLocked( BOOL b )
{ b ? nGrbit |= 0x0001 : nGrbit &= ~0x0001; }
@@ -136,9 +149,16 @@ public:
class XclObjComment : public XclObj
{
+ ScAddress maScPos;
+ std::auto_ptr< SdrCaptionObj >
+ mpCaption;
+ bool mbVisible;
+ Rectangle maFrom;
+ Rectangle maTo;
+
public:
XclObjComment( XclExpObjectManager& rObjMgr,
- const Rectangle& rRect, const EditTextObject& rEditObj, SdrObject* pCaption, bool bVisible );
+ const Rectangle& rRect, const EditTextObject& rEditObj, SdrCaptionObj* pCaption, bool bVisible, const ScAddress& rAddress, Rectangle &rFrom, Rectangle &To );
virtual ~XclObjComment();
/** c'tor process for formatted text objects above .
@@ -148,6 +168,7 @@ public:
virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
};
@@ -220,14 +241,26 @@ public:
class XclObjAny : public XclObj
{
-private:
+protected:
virtual void WriteSubRecs( XclExpStream& rStrm );
public:
- XclObjAny( XclExpObjectManager& rObjMgr );
+ XclObjAny( XclExpObjectManager& rObjMgr,
+ const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& rShape );
virtual ~XclObjAny();
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShape >
+ GetShape() const { return mxShape; }
+
+
virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
+ static void WriteFromTo( XclExpXmlStream& rStrm, const XclObjAny& rObj );
+ static void WriteFromTo( XclExpXmlStream& rStrm, const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& rShape, SCTAB nTab );
+
+private:
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShape >
+ mxShape;
};
@@ -590,3 +623,5 @@ public:
#endif // _XCL97REC_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xechart.hxx b/sc/source/filter/inc/xechart.hxx
index 8e81ae8278f6..bbf9c764539e 100644
--- a/sc/source/filter/inc/xechart.hxx
+++ b/sc/source/filter/inc/xechart.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1275,3 +1276,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xecontent.hxx b/sc/source/filter/inc/xecontent.hxx
index 50c9466d2801..41ceb8410b02 100644
--- a/sc/source/filter/inc/xecontent.hxx
+++ b/sc/source/filter/inc/xecontent.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -113,6 +114,8 @@ public:
inline const String* GetRepr() const { return mxRepr.get(); }
virtual void SaveXml( XclExpXmlStream& rStrm );
+
+ virtual void WriteEmbeddedData( XclExpStream& rStrm );
private:
/** Builds file name from the passed file URL. Tries to convert to relative file name.
@param rnLevel (out-param) The parent directory level.
@@ -350,3 +353,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xeescher.hxx b/sc/source/filter/inc/xeescher.hxx
index d227db184f1a..1e6178ef6c62 100644
--- a/sc/source/filter/inc/xeescher.hxx
+++ b/sc/source/filter/inc/xeescher.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,6 +33,9 @@
#include <filter/msfilter/escherex.hxx>
#include "xcl97rec.hxx"
#include "xlescher.hxx"
+#include <com/sun/star/chart/XChartDocument.hpp>
+#include "svx/sdtaitm.hxx"
+
namespace com { namespace sun { namespace star {
namespace script { struct ScriptEventDescriptor; }
@@ -168,6 +172,7 @@ public:
/** Writes the BITMAP record. */
virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
private:
Graphic maGraphic; /// The VCL graphic.
@@ -207,6 +212,34 @@ private:
sal_uInt16 mnEntryCount; /// Number of entries in source range.
};
+class XclMacroHelper : public XclExpControlHelper
+{
+protected:
+ XclTokenArrayRef mxMacroLink; /// Token array containing a link to an attached macro.
+
+public:
+ explicit XclMacroHelper( const XclExpRoot& rRoot );
+ virtual ~XclMacroHelper();
+ /** Writes an ftMacro subrecord containing a macro link, or nothing, if no macro present. */
+ void WriteMacroSubRec( XclExpStream& rStrm );
+ /** Sets the name of a macro for object of passed type
+ @return true = The passed event descriptor was valid, macro name has been found. */
+ bool SetMacroLink( const ::com::sun::star::script::ScriptEventDescriptor& rEvent, const XclTbxEventType& nEventType );
+
+ /** Sets the name of a macro
+ @return true = The passed macro name has been found. */
+ bool SetMacroLink( const String& rMacro );
+};
+
+class XclExpShapeObj : public XclObjAny, public XclMacroHelper
+{
+public:
+ explicit XclExpShapeObj( XclExpObjectManager& rRoot, ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape );
+ virtual ~XclExpShapeObj();
+private:
+ virtual void WriteSubRecs( XclExpStream& rStrm );
+};
+
// ----------------------------------------------------------------------------
#if EXC_EXP_OCX_CTRL
@@ -234,7 +267,7 @@ private:
#else
/** Represents an OBJ record for an TBX form control. */
-class XclExpTbxControlObj : public XclObj, public XclExpControlHelper
+class XclExpTbxControlObj : public XclObj, public XclMacroHelper
{
public:
explicit XclExpTbxControlObj(
@@ -249,8 +282,6 @@ public:
private:
virtual void WriteSubRecs( XclExpStream& rStrm );
- /** Writes an ftMacro subrecord containing a macro link, or nothing, if no macro present. */
- void WriteMacroSubRec( XclExpStream& rStrm );
/** Writes a subrecord containing a cell link, or nothing, if no link present. */
void WriteCellLinkSubRec( XclExpStream& rStrm, sal_uInt16 nSubRecId );
/** Writes the ftSbs sub structure containing scrollbar data. */
@@ -258,7 +289,6 @@ private:
private:
ScfInt16Vec maMultiSel; /// Indexes of all selected entries in a multi selection.
- XclTokenArrayRef mxMacroLink; /// Token array containing a link to an attached macro.
XclTbxEventType meEventType; /// Type of supported macro event.
sal_Int32 mnHeight; /// Height of the control.
sal_uInt16 mnState; /// Checked/unchecked state.
@@ -285,6 +315,8 @@ class XclExpChart;
class XclExpChartObj : public XclObj, protected XclExpRoot
{
public:
+ typedef ::com::sun::star::uno::Reference< ::com::sun::star::chart::XChartDocument > XChartDocRef;
+ typedef ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > XShapeRef;
explicit XclExpChartObj(
XclExpObjectManager& rObjMgr,
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape,
@@ -293,10 +325,15 @@ public:
/** Writes the OBJ record and the entire chart substream. */
virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
+ virtual void WriteChartObj( sax_fastparser::FSHelperPtr pDrawing, XclExpXmlStream& rStrm );
+ void WriteShapeTransformation( sax_fastparser::FSHelperPtr pFS, const XShapeRef& rXShape, sal_Bool bFlipH = false, sal_Bool bFlipV = false, sal_Int32 nRotation = 0 );
private:
typedef ScfRef< XclExpChart > XclExpChartRef;
XclExpChartRef mxChart; /// The chart itself (BOF/EOF substream data).
+ XShapeRef mxShape;
+ XChartDocRef mxChartDoc;
};
// ============================================================================
@@ -339,9 +376,20 @@ private:
XclExpString maAuthor; /// Name of the author.
String maOrigNoteText; /// Original main text of the note.
ByteString maNoteText; /// Main text of the note (<=BIFF7).
+ XclExpStringRef mpNoteContents; /// Text and formatting data (OOXML)
ScAddress maScPos; /// Calc cell address of the note.
sal_uInt16 mnObjId; /// Escher object ID (BIFF8).
bool mbVisible; /// true = permanently visible.
+ SdrTextHorzAdjust meTHA; /// text horizontal adjust
+ SdrTextVertAdjust meTVA; /// text vertical adjust
+ bool mbAutoScale; /// Auto scale text
+ bool mbLocked; /// Position & Size locked
+ bool mbAutoFill; /// Auto Fill Style
+ bool mbAutoLine; /// Auto Line Style
+ bool mbColHidden; /// Column containing the comment is hidden
+ bool mbRowHidden; /// Row containing the comment is hidden
+ Rectangle maCommentFrom; /// From and From Offset
+ Rectangle maCommentTo; /// To and To Offsets
};
// ============================================================================
@@ -433,3 +481,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xeformula.hxx b/sc/source/filter/inc/xeformula.hxx
index 258070f0791e..5cc3107bd25d 100644
--- a/sc/source/filter/inc/xeformula.hxx
+++ b/sc/source/filter/inc/xeformula.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -95,3 +96,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xehelper.hxx b/sc/source/filter/inc/xehelper.hxx
index b87c488ecbac..00d758dd1991 100644
--- a/sc/source/filter/inc/xehelper.hxx
+++ b/sc/source/filter/inc/xehelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -433,3 +434,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xelink.hxx b/sc/source/filter/inc/xelink.hxx
index 8fdcfa88193f..ecdccae3172b 100644
--- a/sc/source/filter/inc/xelink.hxx
+++ b/sc/source/filter/inc/xelink.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -217,3 +218,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xename.hxx b/sc/source/filter/inc/xename.hxx
index a8dd76b7bff3..66e903553da8 100644
--- a/sc/source/filter/inc/xename.hxx
+++ b/sc/source/filter/inc/xename.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -87,3 +88,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xepage.hxx b/sc/source/filter/inc/xepage.hxx
index b9454a3cdb3c..be8d1a1ac08c 100644
--- a/sc/source/filter/inc/xepage.hxx
+++ b/sc/source/filter/inc/xepage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -135,3 +136,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xepivot.hxx b/sc/source/filter/inc/xepivot.hxx
index 17d81bb3fceb..c2e226a75b39 100644
--- a/sc/source/filter/inc/xepivot.hxx
+++ b/sc/source/filter/inc/xepivot.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -371,6 +372,7 @@ public:
/** Writes the entire pivot table. */
virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm );
// ------------------------------------------------------------------------
private:
@@ -480,3 +482,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xerecord.hxx b/sc/source/filter/inc/xerecord.hxx
index a191cd9b1c20..712da2b89d6e 100644
--- a/sc/source/filter/inc/xerecord.hxx
+++ b/sc/source/filter/inc/xerecord.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -417,3 +418,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xeroot.hxx b/sc/source/filter/inc/xeroot.hxx
index 980590f9d4ff..0f8774489954 100644
--- a/sc/source/filter/inc/xeroot.hxx
+++ b/sc/source/filter/inc/xeroot.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -173,3 +174,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xestream.hxx b/sc/source/filter/inc/xestream.hxx
index 0e80b28eb939..d0e56961e812 100644
--- a/sc/source/filter/inc/xestream.hxx
+++ b/sc/source/filter/inc/xestream.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -257,12 +258,15 @@ private:
(s.Len() && s.GetChar( 0 ) != 0 ? XclXmlUtils::ToOString( s ).getStr() : NULL)
class ScAddress;
+class ScDocShell;
class ScDocument;
+class ScFormulaCell;
class ScRange;
class ScRangeList;
class ScTokenArray;
struct XclAddress;
struct XclFontData;
+class XclRange;
class XclRangeList;
class XclXmlUtils
@@ -272,6 +276,7 @@ class XclXmlUtils
XclXmlUtils(const XclXmlUtils&);
XclXmlUtils& operator=(const XclXmlUtils&);
public:
+ static void GetFormulaTypeAndValue( ScFormulaCell& rCell, const char*& sType, ::rtl::OUString& rValue);
static ::rtl::OUString GetStreamName( const char* sStreamDir, const char* sStream, sal_Int32 nId );
static ::rtl::OString ToOString( const Color& rColor );
@@ -283,6 +288,7 @@ public:
static ::rtl::OString ToOString( const ScRangeList& rRangeList );
static ::rtl::OString ToOString( const XclAddress& rAddress );
static ::rtl::OString ToOString( const XclExpString& s );
+ static ::rtl::OString ToOString( const XclRange& rRange );
static ::rtl::OString ToOString( const XclRangeList& rRangeList );
static ::rtl::OUString ToOUString( const char* s );
@@ -291,16 +297,21 @@ public:
static ::rtl::OUString ToOUString( ScDocument& rDocument, const ScAddress& rAddress, ScTokenArray* pTokenArray );
static ::rtl::OUString ToOUString( const XclExpString& s );
static const char* ToPsz( bool b );
+
+ static sax_fastparser::FSHelperPtr WriteElement( sax_fastparser::FSHelperPtr pStream, sal_Int32 nElement, sal_Int32 nValue );
+ static sax_fastparser::FSHelperPtr WriteElement( sax_fastparser::FSHelperPtr pStream, sal_Int32 nElement, sal_Int64 nValue );
+ static sax_fastparser::FSHelperPtr WriteElement( sax_fastparser::FSHelperPtr pStream, sal_Int32 nElement, const char* sValue );
+ static sax_fastparser::FSHelperPtr WriteFontData( sax_fastparser::FSHelperPtr pStream, const XclFontData& rFontData, sal_Int32 nNameId );
};
class XclExpXmlStream : public oox::core::XmlFilterBase
{
public:
- XclExpXmlStream( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rSMgr, SvStream& rStrm, const XclExpRoot& rRoot );
+ XclExpXmlStream( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rSMgr );
virtual ~XclExpXmlStream();
/** Returns the filter root data. */
- inline const XclExpRoot& GetRoot() const { return mrRoot; }
+ inline const XclExpRoot& GetRoot() const { return *mpRoot; }
sax_fastparser::FSHelperPtr& GetCurrentStream();
void PushStream( sax_fastparser::FSHelperPtr aStream );
@@ -310,7 +321,6 @@ public:
sax_fastparser::FSHelperPtr GetStreamForPath( const ::rtl::OUString& rPath );
sax_fastparser::FSHelperPtr& WriteAttributes( sal_Int32 nAttribute, ... );
- sax_fastparser::FSHelperPtr& WriteFontData( const XclFontData& rFontData, sal_Int32 nNameId );
sax_fastparser::FSHelperPtr CreateOutputStream (
const ::rtl::OUString& sFullStream,
@@ -333,15 +343,17 @@ public:
void Trace( const char* format, ...);
private:
virtual ::rtl::OUString implGetImplementationName() const;
+ ScDocShell *getDocShell();
typedef std::map< ::rtl::OUString,
std::pair< ::rtl::OUString,
sax_fastparser::FSHelperPtr > > XclExpXmlPathToStateMap;
- const XclExpRoot& mrRoot; /// Filter root data.
+ const XclExpRoot* mpRoot;
std::stack< sax_fastparser::FSHelperPtr > maStreams;
XclExpXmlPathToStateMap maOpenedStreamMap;
};
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xestring.hxx b/sc/source/filter/inc/xestring.hxx
index f5c54659ea6e..6b1c12474dd0 100644
--- a/sc/source/filter/inc/xestring.hxx
+++ b/sc/source/filter/inc/xestring.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -313,3 +314,4 @@ inline XclExpStream& operator<<( XclExpStream& rStrm, const XclExpString& rStrin
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xestyle.hxx b/sc/source/filter/inc/xestyle.hxx
index 2a17d09a57fc..fa2d3e8eb782 100644
--- a/sc/source/filter/inc/xestyle.hxx
+++ b/sc/source/filter/inc/xestyle.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -335,10 +336,6 @@ struct XclExpCellProt : public XclCellProt
@return true = At least one protection item is set. */
bool FillFromItemSet( const SfxItemSet& rItemSet, bool bStyle = false );
-#if 0
- /** Fills the data to the passed fields of a BIFF2 XF record. */
- void FillToXF2( sal_uInt8& rnNumFmt ) const;
-#endif
/** Fills the data to the passed fields of a BIFF3-BIFF8 XF record. */
void FillToXF3( sal_uInt16& rnProt ) const;
@@ -358,14 +355,6 @@ struct XclExpCellAlign : public XclCellAlign
bool FillFromItemSet( const SfxItemSet& rItemSet,
bool bForceLineBreak, XclBiff eBiff, bool bStyle = false );
-#if 0
- /** Fills the data to the passed fields of a BIFF2 XF record. */
- void FillToXF2( sal_uInt8& rnFlags ) const;
- /** Fills the data to the passed fields of a BIFF3 XF record. */
- void FillToXF3( sal_uInt16& rnAlign ) const;
- /** Fills the data to the passed fields of a BIFF4 XF record. */
- void FillToXF4( sal_uInt16& rnAlign ) const;
-#endif
/** Fills the data to the passed fields of a BIFF5/BIFF7 XF record. */
void FillToXF5( sal_uInt16& rnAlign ) const;
/** Fills the data to the passed fields of a BIFF8 XF record. */
@@ -396,12 +385,6 @@ struct XclExpCellBorder : public XclCellBorder
/** Fills the mn***Color base members from the mn***ColorId members. */
void SetFinalColors( const XclExpPalette& rPalette );
-#if 0
- /** Fills the data to the passed fields of a BIFF2 XF record. */
- void FillToXF2( sal_uInt8& rnFlags ) const;
- /** Fills the data to the passed fields of a BIFF3/BIFF4 XF record. */
- void FillToXF3( sal_uInt32& rnBorder ) const;
-#endif
/** Fills the data to the passed fields of a BIFF5/BIFF7 XF record. */
void FillToXF5( sal_uInt32& rnBorder, sal_uInt32& rnArea ) const;
/** Fills the data to the passed fields of a BIFF8 XF record. */
@@ -432,12 +415,6 @@ struct XclExpCellArea : public XclCellArea
/** Fills the mn***Color base members from the mn***ColorId members. */
void SetFinalColors( const XclExpPalette& rPalette );
-#if 0
- /** Fills the data to the passed fields of a BIFF2 XF record. */
- void FillToXF2( sal_uInt8& rnFlags ) const;
- /** Fills the data to the passed fields of a BIFF3/BIFF4 XF record. */
- void FillToXF3( sal_uInt16& rnArea ) const;
-#endif
/** Fills the data to the passed fields of a BIFF5/BIFF7 XF record. */
void FillToXF5( sal_uInt32& rnArea ) const;
/** Fills the data to the passed fields of a BIFF8 XF record. */
@@ -762,3 +739,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xetable.hxx b/sc/source/filter/inc/xetable.hxx
index 51187a9b0178..2c18f14d91f0 100644
--- a/sc/source/filter/inc/xetable.hxx
+++ b/sc/source/filter/inc/xetable.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,6 +39,9 @@
#include "xeformula.hxx"
#include "xestyle.hxx"
+#include <boost/shared_ptr.hpp>
+#include <map>
+
/* ============================================================================
Export of cell tables including row and column description.
- Managing all used and formatted cells in a sheet.
@@ -980,14 +984,12 @@ private:
XclExpRow& GetOrCreateRow( sal_uInt16 nXclRow, bool bRowAlwaysEmpty );
private:
- typedef XclExpRecordList< XclExpRow > XclExpRowList;
- typedef XclExpRowList::RecordRefType XclExpRowRef;
+ typedef ::boost::shared_ptr<XclExpRow> RowRef;
+ typedef ::std::map<sal_uInt32, RowRef> RowMap;
- XclExpRowList maRowList; /// List of all ROW records.
+ RowMap maRowMap;
XclExpRowOutlineBuffer maOutlineBfr; /// Buffer for row outline groups.
XclExpDimensions maDimensions; /// DIMENSIONS record for used area.
- XclExpRow* mpLastUsedRow; /// Last used row for faster access.
- sal_uInt16 mnLastUsedXclRow; /// Last used row for faster access.
};
// ============================================================================
@@ -1065,3 +1067,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xeview.hxx b/sc/source/filter/inc/xeview.hxx
index 61e349ab1e86..eb1bf5c403f8 100644
--- a/sc/source/filter/inc/xeview.hxx
+++ b/sc/source/filter/inc/xeview.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -178,3 +179,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xichart.hxx b/sc/source/filter/inc/xichart.hxx
index d8289b3b671b..12b2e2d473b2 100644
--- a/sc/source/filter/inc/xichart.hxx
+++ b/sc/source/filter/inc/xichart.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1512,3 +1513,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xicontent.hxx b/sc/source/filter/inc/xicontent.hxx
index ea5777ef81e7..6bd2e38355f6 100644
--- a/sc/source/filter/inc/xicontent.hxx
+++ b/sc/source/filter/inc/xicontent.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -326,3 +327,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xiescher.hxx b/sc/source/filter/inc/xiescher.hxx
index 5f482909f982..bf623b4a2da5 100644
--- a/sc/source/filter/inc/xiescher.hxx
+++ b/sc/source/filter/inc/xiescher.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,6 +31,7 @@
#include <vector>
#include <map>
+#include <hash_map>
#include <filter/msfilter/msdffimp.hxx>
#include <filter/msfilter/msocximex.hxx>
#include <vcl/graph.hxx>
@@ -92,7 +94,7 @@ public:
/** Returns the Excel object type from OBJ record. */
inline sal_uInt16 GetObjType() const { return mnObjType; }
/** Returns the name of this object, may generate a default name. */
- String GetObjName() const;
+ virtual String GetObjName() const;
/** Returns associated macro name, if set, otherwise zero length string. */
inline const String& GetMacroName() const { return maMacroName; }
@@ -172,7 +174,7 @@ protected:
virtual void DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject& rSdrObj ) const;
/** Derived classes may perform additional processing for the passed SdrObject after insertion. */
virtual void DoPostProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject& rSdrObj ) const;
-
+ SCTAB GetTab() const { return mnTab; }
private:
/** Reads the contents of a BIFF3 OBJ record. */
void ImplReadObj3( XclImpStream& rStrm );
@@ -186,6 +188,7 @@ private:
private:
XclObjAnchor maAnchor; /// The position of the object in its parent.
sal_uInt16 mnObjId; /// The object identifier (unique per drawing).
+ SCTAB mnTab; /// Location of object
sal_uInt16 mnObjType; /// The Excel object type from OBJ record.
sal_uInt32 mnDffShapeId; /// Shape ID from DFF stream.
sal_uInt32 mnDffFlags; /// Shape flags from DFF stream.
@@ -502,6 +505,10 @@ protected:
/** Derived classes will set additional properties for the current form control. */
virtual void DoProcessControl( ScfPropertySet& rPropSet ) const;
+ void ApplySheetLinkProps() const;
+ mutable ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
+ mxShape; /// The UNO wrapper of the control shape.
+ ScfRef< ScAddress > mxCellLink; /// Linked cell in the Calc document.
private:
/** Reads a list of cell ranges from a formula at the current stream position. */
void ReadRangeList( ScRangeList& rScRanges, XclImpStream& rStrm );
@@ -510,9 +517,6 @@ private:
private:
const XclImpRoot& mrRoot; /// Not derived from XclImpRoot to allow multiple inheritance.
- mutable ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
- mxShape; /// The UNO wrapper of the control shape.
- ScfRef< ScAddress > mxCellLink; /// Linked cell in the Calc document.
ScfRef< ScRange > mxSrcRange; /// Source data range in the Calc document.
XclCtrlBindMode meBindMode; /// Value binding mode.
};
@@ -614,6 +618,7 @@ protected:
virtual XclTbxEventType DoGetEventType() const;
protected:
+ void ApplyGrouping( XclImpOptionButtonObj& rLeader, sal_Int32 nRefVal );
sal_uInt16 mnNextInGroup; /// Next option button in a group.
sal_uInt16 mnFirstInGroup; /// 1 = Button is the first in a group.
};
@@ -862,7 +867,8 @@ class XclImpPictureObj : public XclImpRectObj, public XclImpControlHelper
{
public:
explicit XclImpPictureObj( const XclImpRoot& rRoot );
-
+ /** Returns the ObjectName - can use non-obvious lookup for override in the associated vba document module stream**/
+ virtual String GetObjName() const;
/** Returns the graphic imported from the IMGDATA record. */
inline const Graphic& GetGraphic() const { return maGraphic; }
/** Returns the visible area of the imported graphic. */
@@ -971,7 +977,7 @@ public:
protected:
/** Returns a color from the Excel color palette. */
- virtual FASTBOOL GetColorFromPalette( USHORT nIndex, Color& rColor ) const;
+ virtual int GetColorFromPalette( USHORT nIndex, Color& rColor ) const;
};
// ----------------------------------------------------------------------------
@@ -1207,6 +1213,8 @@ private:
/** Stores all drawing and OLE objects and additional data related to these objects. */
class XclImpObjectManager : protected XclImpRoot
{
+typedef std::hash_map< sal_Int32, String > CntrlObjIdToName;
+typedef std::map< String, CntrlObjIdToName > CodeNameToCntrlObjIdInfo;
public:
explicit XclImpObjectManager( const XclImpRoot& rRoot );
virtual ~XclImpObjectManager();
@@ -1223,9 +1231,41 @@ public:
String GetDefaultObjName( const XclImpDrawObjBase& rDrawObj ) const;
/** Returns the used area in the sheet with the passed index. */
ScRange GetUsedArea( SCTAB nScTab ) const;
+ void SetOleNameOverrideInfo( const CodeNameToCntrlObjIdInfo& rOverrideInfo ) { maOleCtrlNameOverride = rOverrideInfo; }
+ String GetOleNameOverride( SCTAB nTab, sal_uInt16 nObjId );
+ // ------------------------------------------------------------------------
+private:
+
+ CodeNameToCntrlObjIdInfo maOleCtrlNameOverride;
+
+ /** Reads and returns a bitmap from WMF/PICT format. */
+ static void ReadWmf( Graphic& rGraphic, XclImpStream& rStrm );
+ /** Reads and returns a bitmap from BMP format. */
+ static void ReadBmp( Graphic& rGraphic, XclImpStream& rStrm );
+
+ /** Reads contents of an DFF record and append data to internal DFF stream. */
+ void ReadDffRecord( XclImpStream& rStrm );
+ /** Reads a BIFF8 OBJ record following an MSODRAWING record. */
+ void ReadObj8( XclImpStream& rStrm );
+ /** Reads the TXO record and following CONTINUE records containing string and formatting. */
+ void ReadTxo( XclImpStream& rStrm );
+
+ /** Reads a BIFF3-BIFF5 NOTE record. */
+ void ReadNote3( XclImpStream& rStrm );
+ /** Reads a BIFF8 NOTE record. */
+ void ReadNote8( XclImpStream& rStrm );
+
+ /** Returns the size of the progress bar shown while processing all objects. */
+ sal_Size GetProgressSize() const;
// ------------------------------------------------------------------------
private:
+ typedef ::std::map< sal_Size, XclImpDrawObjRef > XclImpObjMap;
+ typedef ::std::map< XclObjId, XclImpDrawObjRef > XclImpObjMapById;
+ typedef ScfRef< XclImpObjTextData > XclImpObjTextRef;
+ typedef ::std::map< sal_Size, XclImpObjTextRef > XclImpObjTextMap;
+ typedef ::std::vector< XclObjId > XclObjIdVec;
+
typedef ::std::map< sal_uInt16, String > DefObjNameMap;
typedef ScfRef< XclImpSheetDrawing > XclImpSheetDrawingRef;
typedef ::std::map< SCTAB, XclImpSheetDrawingRef > XclImpSheetDrawingMap;
@@ -1271,3 +1311,4 @@ XclImpStream& operator>>( XclImpStream& rStrm, XclImpDffPropSet& rPropSet );
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xiformula.hxx b/sc/source/filter/inc/xiformula.hxx
index 6151222746cd..5ed9d04b0ea9 100644
--- a/sc/source/filter/inc/xiformula.hxx
+++ b/sc/source/filter/inc/xiformula.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -66,3 +67,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xihelper.hxx b/sc/source/filter/inc/xihelper.hxx
index e1e01f2e7ed0..6ee969c6b0a0 100644
--- a/sc/source/filter/inc/xihelper.hxx
+++ b/sc/source/filter/inc/xihelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -344,3 +345,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xilink.hxx b/sc/source/filter/inc/xilink.hxx
index dbbb4606114e..2f06ddb2f7b0 100644
--- a/sc/source/filter/inc/xilink.hxx
+++ b/sc/source/filter/inc/xilink.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -208,3 +209,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xiname.hxx b/sc/source/filter/inc/xiname.hxx
index ccf1b88af947..bf260a76548e 100644
--- a/sc/source/filter/inc/xiname.hxx
+++ b/sc/source/filter/inc/xiname.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,6 +51,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 +60,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.
};
// ----------------------------------------------------------------------------
@@ -96,3 +99,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xipage.hxx b/sc/source/filter/inc/xipage.hxx
index 0571e10e7046..5f8e7c6b3f70 100644
--- a/sc/source/filter/inc/xipage.hxx
+++ b/sc/source/filter/inc/xipage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -80,3 +81,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xipivot.hxx b/sc/source/filter/inc/xipivot.hxx
index edac8a0fd99f..72bb174b8d62 100644
--- a/sc/source/filter/inc/xipivot.hxx
+++ b/sc/source/filter/inc/xipivot.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -455,3 +456,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xiroot.hxx b/sc/source/filter/inc/xiroot.hxx
index 74d635cc24c3..c53c09029bdc 100644
--- a/sc/source/filter/inc/xiroot.hxx
+++ b/sc/source/filter/inc/xiroot.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -222,3 +223,5 @@ private:
// ============================================================================
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xistream.hxx b/sc/source/filter/inc/xistream.hxx
index e0de7eae1192..6dff1a867f2e 100644
--- a/sc/source/filter/inc/xistream.hxx
+++ b/sc/source/filter/inc/xistream.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -525,3 +526,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xistring.hxx b/sc/source/filter/inc/xistring.hxx
index a6f00d26d2e2..f76e3af4321c 100644
--- a/sc/source/filter/inc/xistring.hxx
+++ b/sc/source/filter/inc/xistring.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -119,3 +120,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xistyle.hxx b/sc/source/filter/inc/xistyle.hxx
index a89122a7618a..b4aa9e96d384 100644
--- a/sc/source/filter/inc/xistyle.hxx
+++ b/sc/source/filter/inc/xistyle.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -70,8 +71,10 @@ public:
void ReadPalette( XclImpStream& rStrm );
private:
+ void ExportPalette();
typedef ::std::vector< ColorData > ColorDataVec;
ColorDataVec maColorTable; /// Colors read from file.
+ const XclImpRoot& mrRoot;
};
// FONT record - font information =============================================
@@ -665,3 +668,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xiview.hxx b/sc/source/filter/inc/xiview.hxx
index 2451d69ee01c..29c3f98bbb04 100644
--- a/sc/source/filter/inc/xiview.hxx
+++ b/sc/source/filter/inc/xiview.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -93,3 +94,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xladdress.hxx b/sc/source/filter/inc/xladdress.hxx
index 0ac5ca3031a4..2152c19913c2 100644
--- a/sc/source/filter/inc/xladdress.hxx
+++ b/sc/source/filter/inc/xladdress.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -195,3 +196,4 @@ protected:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xlchart.hxx b/sc/source/filter/inc/xlchart.hxx
index 13eda8619cc0..c6ebe7382c7b 100644
--- a/sc/source/filter/inc/xlchart.hxx
+++ b/sc/source/filter/inc/xlchart.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1484,3 +1485,4 @@ struct XclChRootData
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xlconst.hxx b/sc/source/filter/inc/xlconst.hxx
index 42160aae7529..0ce2025d3d0c 100644
--- a/sc/source/filter/inc/xlconst.hxx
+++ b/sc/source/filter/inc/xlconst.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -275,3 +276,4 @@ const sal_uInt16 EXC_FUTUREREC_ALERT = 0x0002;
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xlcontent.hxx b/sc/source/filter/inc/xlcontent.hxx
index 41e916472e70..ae8f5c7dc7fd 100644
--- a/sc/source/filter/inc/xlcontent.hxx
+++ b/sc/source/filter/inc/xlcontent.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -192,3 +193,4 @@ const sal_uInt16 EXC_ID_WQTABLES = 0x0804;
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xlescher.hxx b/sc/source/filter/inc/xlescher.hxx
index 921da6b8741b..c81df26fa0c1 100644
--- a/sc/source/filter/inc/xlescher.hxx
+++ b/sc/source/filter/inc/xlescher.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -441,10 +442,11 @@ public:
/** Tries to extract an Excel macro name from the passed macro descriptor. */
static String ExtractFromMacroDescriptor(
const ::com::sun::star::script::ScriptEventDescriptor& rDescriptor,
- XclTbxEventType eEventType );
+ XclTbxEventType eEventType, SfxObjectShell* pShell = NULL );
};
// ============================================================================
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xlformula.hxx b/sc/source/filter/inc/xlformula.hxx
index 83bab2acd24a..5dfdb3ca1c12 100644
--- a/sc/source/filter/inc/xlformula.hxx
+++ b/sc/source/filter/inc/xlformula.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -567,3 +568,4 @@ inline void XclTokenArrayHelper::ChangeTokenClass( sal_uInt8& rnTokenId, sal_uIn
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xllink.hxx b/sc/source/filter/inc/xllink.hxx
index 3e41fb350acb..760df8173055 100644
--- a/sc/source/filter/inc/xllink.hxx
+++ b/sc/source/filter/inc/xllink.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -91,3 +92,4 @@ enum XclSupbookType
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xlname.hxx b/sc/source/filter/inc/xlname.hxx
index 5bfcf9164892..4fbafb280f03 100644
--- a/sc/source/filter/inc/xlname.hxx
+++ b/sc/source/filter/inc/xlname.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -73,3 +74,4 @@ const sal_Unicode EXC_BUILTIN_UNKNOWN = '\x0E';
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xlpage.hxx b/sc/source/filter/inc/xlpage.hxx
index f6860595cd20..dfed44b91afd 100644
--- a/sc/source/filter/inc/xlpage.hxx
+++ b/sc/source/filter/inc/xlpage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -89,6 +90,7 @@ const sal_uInt16 EXC_SETUP_STARTPAGE = 0x0080;
const sal_uInt16 EXC_SETUP_NOTES_END = 0x0200;
const sal_uInt16 EXC_PAPERSIZE_DEFAULT = 0;
+const sal_uInt16 EXC_PAPERSIZE_USER = 0xFFFF;
// ============================================================================
@@ -118,6 +120,9 @@ struct XclPageData : ScfNoCopy
double mfFtrLeftMargin; /// Left margin to footer.
double mfFtrRightMargin; /// Right margin to footer.
sal_uInt16 mnPaperSize; /// Index into paper size table.
+ sal_uInt16 mnStrictPaperSize; /// Same as papersize - but for ooxml (considering stricter dimensions)
+ sal_uInt16 mnPaperWidth; /// Paper Width in mm
+ sal_uInt16 mnPaperHeight; /// Paper Height in mm
sal_uInt16 mnCopies; /// Number of copies.
sal_uInt16 mnStartPage; /// Start page number.
sal_uInt16 mnScaling; /// Scaling in percent.
@@ -147,10 +152,11 @@ struct XclPageData : ScfNoCopy
/** Returns the real paper size (twips) from the paper size index and paper orientation. */
Size GetScPaperSize() const;
/** Sets the Excel paper size index and paper orientation from Calc paper size (twips). */
- void SetScPaperSize( const Size& rSize, bool bPortrait );
+ void SetScPaperSize( const Size& rSize, bool bPortrait, bool bStrict = sal_False );
};
// ============================================================================
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xlpivot.hxx b/sc/source/filter/inc/xlpivot.hxx
index 0afd920a3546..e46bf30dd398 100644
--- a/sc/source/filter/inc/xlpivot.hxx
+++ b/sc/source/filter/inc/xlpivot.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -812,3 +813,4 @@ XclExpStream& operator<<( XclExpStream& rStrm, const XclPTViewEx9Info& rInfo );
// ============================================================================
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xlroot.hxx b/sc/source/filter/inc/xlroot.hxx
index 2f029c74baa9..e1261be05be0 100644
--- a/sc/source/filter/inc/xlroot.hxx
+++ b/sc/source/filter/inc/xlroot.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -184,6 +185,9 @@ public:
/** Calculates the height of the passed number of pixels in 1/100 mm. */
sal_Int32 GetHmmFromPixelY( double fPixelY ) const;
+ double GetPixelXFromHmm( sal_Int32 nX ) const;
+ double GetPixelYFromHmm( sal_Int32 nY ) const;
+
/** Returns the medium to import from. */
inline SfxMedium& GetMedium() const { return mrData.mrMedium; }
/** Returns the document URL of the imported/exported file. */
@@ -287,3 +291,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xlstream.hxx b/sc/source/filter/inc/xlstream.hxx
index 0a9074371c33..e83b1068fc09 100644
--- a/sc/source/filter/inc/xlstream.hxx
+++ b/sc/source/filter/inc/xlstream.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,3 +52,4 @@ const sal_uInt16 EXC_ID_CONT = 0x003C;
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xlstring.hxx b/sc/source/filter/inc/xlstring.hxx
index 5ee505e25024..15adf3f919d9 100644
--- a/sc/source/filter/inc/xlstring.hxx
+++ b/sc/source/filter/inc/xlstring.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -95,3 +96,4 @@ typedef ::std::vector< XclFormatRun > XclFormatRunVec;
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xlstyle.hxx b/sc/source/filter/inc/xlstyle.hxx
index c282527b3c79..b9b1f1902b9e 100644
--- a/sc/source/filter/inc/xlstyle.hxx
+++ b/sc/source/filter/inc/xlstyle.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -619,3 +620,4 @@ protected:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xltable.hxx b/sc/source/filter/inc/xltable.hxx
index 6b8f650568a9..7c276ea477e2 100644
--- a/sc/source/filter/inc/xltable.hxx
+++ b/sc/source/filter/inc/xltable.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -200,3 +201,4 @@ const sal_uInt16 EXC_ID_SHRFMLA = 0x04BC;
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xltools.hxx b/sc/source/filter/inc/xltools.hxx
index efe20a583104..7ae02d758151 100644
--- a/sc/source/filter/inc/xltools.hxx
+++ b/sc/source/filter/inc/xltools.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -265,3 +266,4 @@ XclExpStream& operator<<( XclExpStream& rStrm, const Color& rColor );
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xltracer.hxx b/sc/source/filter/inc/xltracer.hxx
index 73ed3d0502c3..3e4c6e87c9d4 100644
--- a/sc/source/filter/inc/xltracer.hxx
+++ b/sc/source/filter/inc/xltracer.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -146,3 +147,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/xlview.hxx b/sc/source/filter/inc/xlview.hxx
index c0c9d4b3d6e1..0b2f91ad6e21 100644
--- a/sc/source/filter/inc/xlview.hxx
+++ b/sc/source/filter/inc/xlview.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -176,3 +177,4 @@ struct XclTabViewData
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/lotus/expop.cxx b/sc/source/filter/lotus/expop.cxx
index 7ecc9127b49d..33ecf7d87d07 100644
--- a/sc/source/filter/lotus/expop.cxx
+++ b/sc/source/filter/lotus/expop.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -410,3 +411,4 @@ FltError ExportWK1::Write()
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/lotus/export.cxx b/sc/source/filter/lotus/export.cxx
index a9be45e24f23..5ca8cc7c6f49 100644
--- a/sc/source/filter/lotus/export.cxx
+++ b/sc/source/filter/lotus/export.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56,3 +57,4 @@ FltError ScFormatFilterPluginImpl::ScExportLotus123( SvStream& aStream, ScDocume
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/lotus/filter.cxx b/sc/source/filter/lotus/filter.cxx
index 3a6e39b7d818..d521aec97315 100644
--- a/sc/source/filter/lotus/filter.cxx
+++ b/sc/source/filter/lotus/filter.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -246,3 +247,4 @@ FltError ScImportLotus123old( SvStream& aStream, ScDocument* pDocument, CharSet
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/lotus/lotattr.cxx b/sc/source/filter/lotus/lotattr.cxx
index c425760675f8..1644ee51856a 100644
--- a/sc/source/filter/lotus/lotattr.cxx
+++ b/sc/source/filter/lotus/lotattr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -298,3 +299,4 @@ void LotAttrTable::Apply( const SCTAB nTabNum )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/lotus/lotform.cxx b/sc/source/filter/lotus/lotform.cxx
index e39891568e33..c307af332680 100644
--- a/sc/source/filter/lotus/lotform.cxx
+++ b/sc/source/filter/lotus/lotform.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -2072,3 +2073,4 @@ DefTokenId lcl_KnownAddIn( const ByteString& sTest )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/lotus/lotimpop.cxx b/sc/source/filter/lotus/lotimpop.cxx
index 2f6f81b7279c..d5aad61a6054 100644
--- a/sc/source/filter/lotus/lotimpop.cxx
+++ b/sc/source/filter/lotus/lotimpop.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,7 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
#include "lotimpop.hxx"
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include "attrib.hxx"
#include "document.hxx"
@@ -48,7 +49,7 @@
#include "lotattr.hxx"
-static NAMESPACE_VOS( OMutex ) aLotImpSemaphore;
+static osl::Mutex aLotImpSemaphore;
ImportLotus::ImportLotus( SvStream& aStream, ScDocument* pDoc, CharSet eQ ) :
@@ -471,3 +472,4 @@ void ImportLotus::_Row( const UINT16 nRecLen )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/lotus/lotread.cxx b/sc/source/filter/lotus/lotread.cxx
index 917337fa91d5..ebd9f968686f 100644
--- a/sc/source/filter/lotus/lotread.cxx
+++ b/sc/source/filter/lotus/lotread.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -322,3 +323,4 @@ FltError ImportLotus::Read( SvStream& rIn )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/lotus/lotus.cxx b/sc/source/filter/lotus/lotus.cxx
index a1a428c5dbeb..8a9623057788 100644
--- a/sc/source/filter/lotus/lotus.cxx
+++ b/sc/source/filter/lotus/lotus.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -100,3 +101,4 @@ FltError ScFormatFilterPluginImpl::ScImportLotus123( SfxMedium& rMedium, ScDocum
return eRet;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/lotus/makefile.mk b/sc/source/filter/lotus/makefile.mk
index 8fb2360ea2ca..e4d18f8f9a7d 100644
--- a/sc/source/filter/lotus/makefile.mk
+++ b/sc/source/filter/lotus/makefile.mk
@@ -40,9 +40,7 @@ VISIBILITY_HIDDEN=TRUE
# --- Settings -----------------------------------------------------
-.INCLUDE : scpre.mk
.INCLUDE : settings.mk
-.INCLUDE : sc.mk
# --- Files --------------------------------------------------------
diff --git a/sc/source/filter/lotus/memory.cxx b/sc/source/filter/lotus/memory.cxx
index 5731063e4cff..68b26befa1aa 100644
--- a/sc/source/filter/lotus/memory.cxx
+++ b/sc/source/filter/lotus/memory.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -138,3 +139,4 @@ void MemDelete( void )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx
index ce4d08b1b3ea..5d38852c2170 100644
--- a/sc/source/filter/lotus/op.cxx
+++ b/sc/source/filter/lotus/op.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -665,3 +666,5 @@ void OP_ApplyPatternArea123( SvStream& rStream )
aLotusPatternPool.clear();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/lotus/optab.cxx b/sc/source/filter/lotus/optab.cxx
index 503d271a5b74..bf880614d48d 100644
--- a/sc/source/filter/lotus/optab.cxx
+++ b/sc/source/filter/lotus/optab.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -246,3 +247,5 @@ OPCODE_FKT pOpFkt123[ FKT_LIMIT123 ] =
NI // 100
};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/lotus/tool.cxx b/sc/source/filter/lotus/tool.cxx
index a375e60ea975..688334f5ec14 100644
--- a/sc/source/filter/lotus/tool.cxx
+++ b/sc/source/filter/lotus/tool.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -650,3 +651,4 @@ BOOL RangeNameBufferWK3::FindAbs( const String& rRef, UINT16& rIndex )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/qpro/biff.cxx b/sc/source/filter/qpro/biff.cxx
index 1d490358d315..b5bb830906bd 100644
--- a/sc/source/filter/qpro/biff.cxx
+++ b/sc/source/filter/qpro/biff.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -102,3 +103,4 @@ bool ScBiffReader::nextRecord()
return true;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/qpro/makefile.mk b/sc/source/filter/qpro/makefile.mk
index fa8b018f23b7..7406f05e3308 100644
--- a/sc/source/filter/qpro/makefile.mk
+++ b/sc/source/filter/qpro/makefile.mk
@@ -39,9 +39,7 @@ AUTOSEG=true
# --- Settings -----------------------------------------------------
-.INCLUDE : scpre.mk
.INCLUDE : settings.mk
-.INCLUDE : sc.mk
# --- Files --------------------------------------------------------
diff --git a/sc/source/filter/qpro/qpro.cxx b/sc/source/filter/qpro/qpro.cxx
index 084aab135f70..320cf4bd819c 100644
--- a/sc/source/filter/qpro/qpro.cxx
+++ b/sc/source/filter/qpro/qpro.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -228,3 +229,5 @@ void ScQProReader::readString( String &rString, sal_uInt16 nLength )
rString = String( pText, mpStream->GetStreamCharSet() );
delete [] pText;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/qpro/qproform.cxx b/sc/source/filter/qpro/qproform.cxx
index 9cb4a2d7b245..b579dade9331 100644
--- a/sc/source/filter/qpro/qproform.cxx
+++ b/sc/source/filter/qpro/qproform.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,6 +30,7 @@
#include "precompiled_sc.hxx"
#include <sal/config.h>
+#include <sal/macros.h>
#include "qpro.hxx"
#include "qproform.hxx"
@@ -556,7 +558,7 @@ static const struct
{ ocNoName, FT_NotImpl } // gives properties of DOS menus
};
-const int nIndexCount = sizeof( aFuncMap ) / sizeof( aFuncMap[ 0 ] );
+const int nIndexCount = SAL_N_ELEMENTS(aFuncMap);
DefTokenId QProToSc::IndexToToken( sal_uInt16 nIndex )
{
@@ -743,3 +745,5 @@ const sal_Char* QProToSc::getString( sal_uInt8 nIndex )
}
return pExtString;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/qpro/qprostyle.cxx b/sc/source/filter/qpro/qprostyle.cxx
index 31003e1d6be8..5333c086c1a7 100644
--- a/sc/source/filter/qpro/qprostyle.cxx
+++ b/sc/source/filter/qpro/qprostyle.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -166,3 +167,5 @@ void ScQProStyle::SetFormat( ScDocument *pDoc, sal_uInt8 nCol, sal_uInt16 nRow,
pDoc->ApplyPattern( nCol, nRow, nTab, aPattern );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx
index 05fdc294fc37..126ce0ef6865 100644
--- a/sc/source/filter/rtf/eeimpars.cxx
+++ b/sc/source/filter/rtf/eeimpars.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -643,3 +644,4 @@ void ScEEParser::NewActEntry( ScEEParseEntry* pE )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/rtf/expbase.cxx b/sc/source/filter/rtf/expbase.cxx
index cd3f30ef9c9f..4c0aa3a1619c 100644
--- a/sc/source/filter/rtf/expbase.cxx
+++ b/sc/source/filter/rtf/expbase.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -105,3 +106,4 @@ ScFieldEditEngine& ScExportBase::GetEditEngine() const
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/rtf/makefile.mk b/sc/source/filter/rtf/makefile.mk
index a680751de620..651309fb454d 100644
--- a/sc/source/filter/rtf/makefile.mk
+++ b/sc/source/filter/rtf/makefile.mk
@@ -40,9 +40,7 @@ VISIBILITY_HIDDEN=TRUE
# --- Settings -----------------------------------------------------
-.INCLUDE : scpre.mk
.INCLUDE : settings.mk
-.INCLUDE : sc.mk
# --- Files --------------------------------------------------------
diff --git a/sc/source/filter/rtf/rtfexp.cxx b/sc/source/filter/rtf/rtfexp.cxx
index ef05ebed0238..f03a37ecdf5b 100644
--- a/sc/source/filter/rtf/rtfexp.cxx
+++ b/sc/source/filter/rtf/rtfexp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -85,37 +86,6 @@ ULONG ScRTFExport::Write()
rStrm << '{' << OOO_STRING_SVTOOLS_RTF_RTF;
rStrm << OOO_STRING_SVTOOLS_RTF_ANSI << sNewLine;
-#if 0
-// das ist noch nicht ausgegoren
-/*
- SfxStyleSheetBasePool* pStylePool = pDoc->GetStyleSheetPool();
- SfxStyleSheetBase* pStyleSheet = NULL;
- DBG_ASSERT( pStylePool, "StylePool not found! :-(" );
- pStylePool->SetSearchMask( SFX_STYLE_FAMILY_PARA, SFXSTYLEBIT_ALL );
- pStyleSheet = pStylePool->Find( STRING_STANDARD, SFX_STYLE_FAMILY_PARA );
- DBG_ASSERT( pStyleSheet, "ParaStyle not found! :-(" );
- const SfxItemSet& rSetPara = pStyleSheet->GetItemSet();
-
- // fonttbl
- String aFontFamilyName(
- ((const SvxFontItem&)(rSetPara.Get( ATTR_FONT ))).GetFamilyName() );
- rStrm << OOO_STRING_SVTOOLS_RTF_DEFF << '0'
- << '{' << OOO_STRING_SVTOOLS_RTF_FONTTBL
- << '{' << OOO_STRING_SVTOOLS_RTF_F << '0' << OOO_STRING_SVTOOLS_RTF_FNIL << ' ' << aFontFamilyName.GetStr() << ";}"
- << '}' << sNewLine;
-
- // hier kaeme die colortbl
-
- // stylesheet
- UINT32 nFontHeight =
- ((const SvxFontHeightItem&)(rSetPara.Get( ATTR_FONT_HEIGHT ))).GetHeight();
- rStrm << '{' << OOO_STRING_SVTOOLS_RTF_STYLESHEET
- << '{' << OOO_STRING_SVTOOLS_RTF_FS << String( UINT32(nFontHeight / TWIPS_PER_POINT) ).GetStr()
- << ' ' << pStyleSheet->GetName().GetStr() << ";}"
- << '}' << sNewLine;
-*/
-#endif
-
// Daten
for ( SCTAB nTab = aRange.aStart.Tab(); nTab <= aRange.aEnd.Tab(); nTab++ )
{
@@ -304,3 +274,4 @@ void ScRTFExport::WriteCell( SCTAB nTab, SCROW nRow, SCCOL nCol )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/rtf/rtfimp.cxx b/sc/source/filter/rtf/rtfimp.cxx
index 83b48b1fa2b1..acf14f5620cc 100644
--- a/sc/source/filter/rtf/rtfimp.cxx
+++ b/sc/source/filter/rtf/rtfimp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -73,3 +74,4 @@ ScRTFImport::~ScRTFImport()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/rtf/rtfparse.cxx b/sc/source/filter/rtf/rtfparse.cxx
index b3373bbf4596..b9db5db760f8 100644
--- a/sc/source/filter/rtf/rtfparse.cxx
+++ b/sc/source/filter/rtf/rtfparse.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -418,3 +419,4 @@ void ScRTFParser::ProcToken( ImportInfo* pInfo )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/starcalc/makefile.mk b/sc/source/filter/starcalc/makefile.mk
index 836f6b0d3621..157059d433ec 100644
--- a/sc/source/filter/starcalc/makefile.mk
+++ b/sc/source/filter/starcalc/makefile.mk
@@ -40,9 +40,7 @@ VISIBILITY_HIDDEN=TRUE
# --- Settings -----------------------------------------------------
-.INCLUDE : scpre.mk
.INCLUDE : settings.mk
-.INCLUDE : sc.mk
# --- Files --------------------------------------------------------
diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx
index 017c32c68745..4c7a019fd6a8 100644
--- a/sc/source/filter/starcalc/scflt.cxx
+++ b/sc/source/filter/starcalc/scflt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -2510,3 +2511,4 @@ FltError ScFormatFilterPluginImpl::ScImportStarCalc10( SvStream& rStream, ScDocu
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/starcalc/scfobj.cxx b/sc/source/filter/starcalc/scfobj.cxx
index c0f575313459..536f0fd5b816 100644
--- a/sc/source/filter/starcalc/scfobj.cxx
+++ b/sc/source/filter/starcalc/scfobj.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -102,3 +103,4 @@ void Sc10InsertObject::InsertChart( ScDocument* pDoc, SCTAB nDestTab, const Rect
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xcl97/XclExpChangeTrack.cxx b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
index 42cb37250c5c..daab6245d730 100644
--- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx
+++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,12 +32,41 @@
//___________________________________________________________________
+#include <stdio.h>
#include <sot/storage.hxx>
#include "XclExpChangeTrack.hxx"
#include "xeformula.hxx"
#include "cell.hxx"
#include "xcl97rec.hxx"
+#include <oox/core/tokens.hxx>
+#include <rtl/strbuf.hxx>
+
+using ::rtl::OUString;
+using ::rtl::OString;
+using ::rtl::OStringBuffer;
+
+static OString lcl_GuidToOString( sal_uInt8 aGuid[ 16 ] )
+{
+ char sBuf[ 40 ];
+ snprintf( sBuf, sizeof( sBuf ),
+ "{%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
+ aGuid[ 0 ], aGuid[ 1 ], aGuid[ 2 ], aGuid[ 3 ], aGuid[ 4 ], aGuid[ 5 ], aGuid[ 6 ], aGuid[ 7 ],
+ aGuid[ 8 ], aGuid[ 9 ], aGuid[ 10 ], aGuid[ 11 ], aGuid[ 12 ], aGuid[ 13 ], aGuid[ 14 ], aGuid[ 15 ] );
+ return OString( sBuf );
+}
+
+static OString lcl_DateTimeToOString( const DateTime& rDateTime )
+{
+ char sBuf[ 200 ];
+ snprintf( sBuf, sizeof( sBuf ),
+ "%d-%02d-%02dT%02d:%02d:%02d.%02dZ",
+ rDateTime.GetYear(), rDateTime.GetMonth(), rDateTime.GetDay(),
+ rDateTime.GetHour(), rDateTime.GetMin(), rDateTime.GetSec(),
+ rDateTime.Get100Sec() );
+ return OString( sBuf );
+}
+
//___________________________________________________________________
// local functions
@@ -354,6 +384,26 @@ sal_Size XclExpChTrHeader::GetLen() const
return 50;
}
+void XclExpChTrHeader::SaveXml( XclExpXmlStream& rRevisionHeadersStrm )
+{
+ sax_fastparser::FSHelperPtr pHeaders = rRevisionHeadersStrm.GetCurrentStream();
+ rRevisionHeadersStrm.WriteAttributes(
+ XML_guid, lcl_GuidToOString( aGUID ).getStr(),
+ XML_lastGuid, NULL, // OOXTODO
+ XML_shared, NULL, // OOXTODO
+ XML_diskRevisions, NULL, // OOXTODO
+ XML_history, NULL, // OOXTODO
+ XML_trackRevisions, NULL, // OOXTODO
+ XML_exclusive, NULL, // OOXTODO
+ XML_revisionId, NULL, // OOXTODO
+ XML_version, NULL, // OOXTODO
+ XML_keepChangeHistory, NULL, // OOXTODO
+ XML_protected, NULL, // OOXTODO
+ XML_preserveHistory, NULL, // OOXTODO
+ FSEND );
+ pHeaders->write( ">" );
+}
+
//___________________________________________________________________
XclExpChTrInfo::~XclExpChTrInfo()
@@ -384,6 +434,33 @@ sal_Size XclExpChTrInfo::GetLen() const
return 158;
}
+void XclExpChTrInfo::SaveXml( XclExpXmlStream& rRevisionHeadersStrm )
+{
+ sax_fastparser::FSHelperPtr pHeader = rRevisionHeadersStrm.GetCurrentStream();
+
+ OUString sRelationshipId;
+ sax_fastparser::FSHelperPtr pRevisionLog = rRevisionHeadersStrm.CreateOutputStream(
+ XclXmlUtils::GetStreamName( "xl/revisions/", "revisionLog", mnLogNumber ),
+ XclXmlUtils::GetStreamName( NULL, "revisionLog", mnLogNumber ),
+ rRevisionHeadersStrm.GetCurrentStream()->getOutputStream(),
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml",
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/revisionLog",
+ &sRelationshipId );
+
+ rRevisionHeadersStrm.WriteAttributes(
+ XML_guid, lcl_GuidToOString( aGUID ).getStr(),
+ XML_dateTime, lcl_DateTimeToOString( aDateTime ).getStr(),
+ XML_maxSheetId, NULL, // OOXTODO
+ XML_userName, XclXmlUtils::ToOString( sUsername ).getStr(),
+ FSNS( XML_r, XML_id ), XclXmlUtils::ToOString( sRelationshipId ).getStr(),
+ XML_minRId, NULL, // OOXTODO
+ XML_maxRId, NULL, // OOXTODO
+ FSEND );
+ pHeader->write( ">" );
+
+ rRevisionHeadersStrm.PushStream( pRevisionLog );
+}
+
//___________________________________________________________________
XclExpChTrTabIdBuffer::XclExpChTrTabIdBuffer( sal_uInt16 nCount ) :
@@ -466,8 +543,9 @@ XclExpChTrTabIdBufferList::~XclExpChTrTabIdBufferList()
//___________________________________________________________________
-XclExpChTrTabId::XclExpChTrTabId( const XclExpChTrTabIdBuffer& rBuffer ) :
- nTabCount( rBuffer.GetBufferCount() )
+XclExpChTrTabId::XclExpChTrTabId( const XclExpChTrTabIdBuffer& rBuffer, bool bInRevisionHeaders )
+ : nTabCount( rBuffer.GetBufferCount() )
+ , mbInRevisionHeaders( bInRevisionHeaders )
{
pBuffer = new sal_uInt16[ nTabCount ];
rBuffer.GetBufferCopy( pBuffer );
@@ -507,6 +585,29 @@ sal_Size XclExpChTrTabId::GetLen() const
return nTabCount << 1;
}
+void XclExpChTrTabId::SaveXml( XclExpXmlStream& rRevisionLogStrm )
+{
+ if( !mbInRevisionHeaders )
+ return;
+
+ sax_fastparser::FSHelperPtr pRevisionLog = rRevisionLogStrm.GetCurrentStream();
+ rRevisionLogStrm.PopStream();
+
+ sax_fastparser::FSHelperPtr pHeader = rRevisionLogStrm.GetCurrentStream();
+ pHeader->startElement( XML_sheetIdMap,
+ XML_count, OString::valueOf( sal_Int32( nTabCount ) ).getStr(),
+ FSEND );
+ for( int i = 0; i < nTabCount; ++i )
+ {
+ pHeader->singleElement( XML_sheetId,
+ XML_val, OString::valueOf( sal_Int32( pBuffer[ i ] ) ).getStr(),
+ FSEND );
+ }
+ pHeader->endElement( XML_sheetIdMap );
+
+ rRevisionLogStrm.PushStream( pRevisionLog );
+}
+
//___________________________________________________________________
// ! does not copy additional actions
@@ -613,6 +714,7 @@ sal_Size XclExpChTrAction::GetLen() const
XclExpChTrData::XclExpChTrData() :
pString( NULL ),
+ mpFormulaCell( NULL ),
fValue( 0.0 ),
nRKValue( 0 ),
nType( EXC_CHTR_TYPE_EMPTY ),
@@ -628,6 +730,7 @@ XclExpChTrData::~XclExpChTrData()
void XclExpChTrData::Clear()
{
DELETEZ( pString );
+ mpFormulaCell = NULL;
mxTokArr.reset();
maRefLog.clear();
fValue = 0.0;
@@ -697,8 +800,8 @@ XclExpChTrCellContent::XclExpChTrCellContent(
{
sal_uInt32 nDummy32;
sal_uInt16 nDummy16;
- GetCellData( rAction.GetOldCell(), pOldData, nDummy32, nOldLength );
- GetCellData( rAction.GetNewCell(), pNewData, nLength, nDummy16 );
+ GetCellData( rRoot, rAction.GetOldCell(), pOldData, nDummy32, nOldLength );
+ GetCellData( rRoot, rAction.GetNewCell(), pNewData, nLength, nDummy16 );
}
XclExpChTrCellContent::~XclExpChTrCellContent()
@@ -718,6 +821,7 @@ void XclExpChTrCellContent::MakeEmptyChTrData( XclExpChTrData*& rpData )
}
void XclExpChTrCellContent::GetCellData(
+ const XclExpRoot& rRoot,
const ScBaseCell* pScCell,
XclExpChTrData*& rpData,
sal_uInt32& rXclLength1,
@@ -760,9 +864,20 @@ void XclExpChTrCellContent::GetCellData(
{
String sCellStr;
if( pScCell->GetCellType() == CELLTYPE_STRING )
- ((const ScStringCell*) pScCell)->GetString( sCellStr );
+ {
+ const ScStringCell* pStrCell = static_cast< const ScStringCell* >( pScCell );
+ pStrCell->GetString( sCellStr );
+ rpData->mpFormattedString = XclExpStringHelper::CreateCellString( rRoot,
+ *pStrCell, NULL );
+ }
else
- ((const ScEditCell*) pScCell)->GetString( sCellStr );
+ {
+ const ScEditCell* pEditCell = static_cast< const ScEditCell* >( pScCell );
+ pEditCell->GetString( sCellStr );
+ XclExpHyperlinkHelper aLinkHelper( rRoot, aPosition );
+ rpData->mpFormattedString = XclExpStringHelper::CreateCellString( rRoot,
+ *pEditCell, NULL, aLinkHelper );
+ }
rpData->pString = new XclExpString( sCellStr, EXC_STR_DEFAULT, 32766 );
rpData->nType = EXC_CHTR_TYPE_STRING;
rpData->nSize = 3 + rpData->pString->GetSize();
@@ -773,6 +888,8 @@ void XclExpChTrCellContent::GetCellData(
case CELLTYPE_FORMULA:
{
const ScFormulaCell* pFmlCell = (const ScFormulaCell*) pScCell;
+ rpData->mpFormulaCell = pFmlCell;
+
const ScTokenArray* pTokenArray = pFmlCell->GetCode();
if( pTokenArray )
{
@@ -828,6 +945,105 @@ sal_Size XclExpChTrCellContent::GetActionByteCount() const
return nLen;
}
+static const char* lcl_GetType( XclExpChTrData* pData )
+{
+ switch( pData->nType )
+ {
+ case EXC_CHTR_TYPE_RK:
+ case EXC_CHTR_TYPE_DOUBLE:
+ return "n";
+ break;
+ case EXC_CHTR_TYPE_FORMULA:
+ {
+ ScFormulaCell* pFormulaCell = const_cast< ScFormulaCell* >( pData->mpFormulaCell );
+ const char* sType;
+ OUString sValue;
+ XclXmlUtils::GetFormulaTypeAndValue( *pFormulaCell, sType, sValue );
+ return sType;
+ }
+ break;
+ case EXC_CHTR_TYPE_STRING:
+ return "inlineStr";
+ default:
+ return "*unknown*";
+ }
+}
+
+static void lcl_WriteCell( XclExpXmlStream& rStrm, sal_Int32 nElement, const ScAddress& rPosition, XclExpChTrData* pData )
+{
+ sax_fastparser::FSHelperPtr pStream = rStrm.GetCurrentStream();
+
+ pStream->startElement( nElement,
+ XML_r, XclXmlUtils::ToOString( rPosition ).getStr(),
+ XML_s, NULL, // OOXTODO: not supported
+ XML_t, lcl_GetType( pData ),
+ XML_cm, NULL, // OOXTODO: not supported
+ XML_vm, NULL, // OOXTODO: not supported
+ XML_ph, NULL, // OOXTODO: not supported
+ FSEND );
+ switch( pData->nType )
+ {
+ case EXC_CHTR_TYPE_RK:
+ case EXC_CHTR_TYPE_DOUBLE:
+ pStream->startElement( XML_v, FSEND );
+ pStream->write( pData->fValue );
+ pStream->endElement( XML_v );
+ break;
+ case EXC_CHTR_TYPE_FORMULA:
+ pStream->startElement( XML_f,
+ // OOXTODO: other attributes? see XclExpFormulaCell::SaveXml()
+ FSEND );
+ pStream->writeEscaped( XclXmlUtils::ToOUString(
+ *pData->mpFormulaCell->GetDocument(),
+ pData->mpFormulaCell->aPos, pData->mpFormulaCell->GetCode() ) );
+ pStream->endElement( XML_f );
+ break;
+ case EXC_CHTR_TYPE_STRING:
+ pStream->startElement( XML_is, FSEND );
+ if( pData->mpFormattedString.is() )
+ pData->mpFormattedString->WriteXml( rStrm );
+ else
+ pData->pString->WriteXml( rStrm );
+ pStream->endElement( XML_is );
+ break;
+ default:
+ // ignore
+ break;
+ }
+ pStream->endElement( nElement );
+}
+
+void XclExpChTrCellContent::SaveXml( XclExpXmlStream& rRevisionLogStrm )
+{
+ sax_fastparser::FSHelperPtr pStream = rRevisionLogStrm.GetCurrentStream();
+ pStream->startElement( XML_rcc,
+ XML_rId, OString::valueOf( (sal_Int32) GetActionNumber() ).getStr(),
+ XML_ua, XclXmlUtils::ToPsz( GetAccepted () ), // OOXTODO? bAccepted == ua or ra; not sure.
+ XML_ra, NULL, // OOXTODO: RRD.fUndoAction? Or RRD.fAccepted?
+ XML_sId, OString::valueOf( (sal_Int32) GetTabId( aPosition.Tab() ) ).getStr(),
+ XML_odxf, NULL, // OOXTODO: not supported
+ XML_xfDxf, NULL, // OOXTODO: not supported
+ XML_s, NULL, // OOXTODO: not supported
+ XML_dxf, NULL, // OOXTODO: not supported
+ XML_numFmtId, NULL, // OOXTODO: not supported
+ XML_quotePrefix, NULL, // OOXTODO: not supported
+ XML_oldQuotePrefix, NULL, // OOXTODO: not supported
+ XML_ph, NULL, // OOXTODO: not supported
+ XML_oldPh, NULL, // OOXTODO: not supported
+ XML_endOfListFormulaUpdate, NULL, // OOXTODO: not supported
+ FSEND );
+ if( pOldData )
+ {
+ lcl_WriteCell( rRevisionLogStrm, XML_oc, aPosition, pOldData );
+ }
+ if( pNewData )
+ {
+ lcl_WriteCell( rRevisionLogStrm, XML_nc, aPosition, pNewData );
+ }
+ // OOXTODO: XML_odxf, XML_ndxf, XML_extLst elements
+ pStream->endElement( XML_rcc );
+}
+
//___________________________________________________________________
XclExpChTrInsert::XclExpChTrInsert(
@@ -901,6 +1117,41 @@ sal_Size XclExpChTrInsert::GetActionByteCount() const
return 16;
}
+static const char* lcl_GetAction( sal_uInt16 nOpCode )
+{
+ switch( nOpCode )
+ {
+ case EXC_CHTR_OP_INSCOL: return "insertCol";
+ case EXC_CHTR_OP_INSROW: return "insertRow";
+ case EXC_CHTR_OP_DELCOL: return "deleteCol";
+ case EXC_CHTR_OP_DELROW: return "deleteRow";
+ default: return "*unknown*";
+ }
+}
+
+void XclExpChTrInsert::SaveXml( XclExpXmlStream& rRevisionLogStrm )
+{
+ sax_fastparser::FSHelperPtr pStream = rRevisionLogStrm.GetCurrentStream();
+ pStream->startElement( XML_rrc,
+ XML_rId, OString::valueOf( (sal_Int32) GetActionNumber() ).getStr(),
+ XML_ua, XclXmlUtils::ToPsz( GetAccepted () ), // OOXTODO? bAccepted == ua or ra; not sure.
+ XML_ra, NULL, // OOXTODO: RRD.fUndoAction? Or RRD.fAccepted?
+ XML_sId, OString::valueOf( (sal_Int32) GetTabId( aRange.aStart.Tab() ) ).getStr(),
+ XML_eol, NULL, // OOXTODO: not supported?
+ XML_ref, XclXmlUtils::ToOString( aRange ).getStr(),
+ XML_action, lcl_GetAction( nOpCode ),
+ XML_edge, NULL, // OOXTODO: ???
+ FSEND );
+ // OOXTODO: does this handle XML_rfmt, XML_undo?
+ XclExpChTrAction* pAction = GetAddAction();
+ while( pAction != NULL )
+ {
+ pAction->SaveXml( rRevisionLogStrm );
+ pAction = pAction->GetAddAction();
+ }
+ pStream->endElement( XML_rrc );
+}
+
//___________________________________________________________________
XclExpChTrInsertTab::XclExpChTrInsertTab(
@@ -938,6 +1189,19 @@ sal_Size XclExpChTrInsertTab::GetActionByteCount() const
return 276;
}
+void XclExpChTrInsertTab::SaveXml( XclExpXmlStream& rStrm )
+{
+ sax_fastparser::FSHelperPtr pStream = rStrm.GetCurrentStream();
+ pStream->singleElement( XML_ris,
+ XML_rId, OString::valueOf( (sal_Int32) GetActionNumber() ).getStr(),
+ XML_ua, XclXmlUtils::ToPsz( GetAccepted () ), // OOXTODO? bAccepted == ua or ra; not sure.
+ XML_ra, NULL, // OOXTODO: RRD.fUndoAction? Or RRD.fAccepted?
+ XML_sheetId, OString::valueOf( (sal_Int32) GetTabId( nTab ) ).getStr(),
+ XML_name, XclXmlUtils::ToOString( GetTabInfo().GetScTabName( nTab ) ).getStr(),
+ XML_sheetPosition, OString::valueOf( (sal_Int32) nTab ).getStr(),
+ FSEND );
+}
+
//___________________________________________________________________
XclExpChTrMoveRange::XclExpChTrMoveRange(
@@ -994,6 +1258,29 @@ sal_Size XclExpChTrMoveRange::GetActionByteCount() const
return 24;
}
+void XclExpChTrMoveRange::SaveXml( XclExpXmlStream& rRevisionLogStrm )
+{
+ sax_fastparser::FSHelperPtr pStream = rRevisionLogStrm.GetCurrentStream();
+
+ pStream->startElement( XML_rm,
+ XML_rId, OString::valueOf( (sal_Int32) GetActionNumber() ).getStr(),
+ XML_ua, XclXmlUtils::ToPsz( GetAccepted () ), // OOXTODO? bAccepted == ua or ra; not sure.
+ XML_ra, NULL, // OOXTODO: RRD.fUndoAction? Or RRD.fAccepted?
+ XML_sheetId, OString::valueOf( (sal_Int32) GetTabId( aDestRange.aStart.Tab() ) ).getStr(),
+ XML_source, XclXmlUtils::ToOString( aSourceRange ).getStr(),
+ XML_destination, XclXmlUtils::ToOString( aDestRange ).getStr(),
+ XML_sourceSheetId, OString::valueOf( (sal_Int32) GetTabId( aSourceRange.aStart.Tab() ) ).getStr(),
+ FSEND );
+ // OOXTODO: does this handle XML_rfmt, XML_undo?
+ XclExpChTrAction* pAction = GetAddAction();
+ while( pAction != NULL )
+ {
+ pAction->SaveXml( rRevisionLogStrm );
+ pAction = pAction->GetAddAction();
+ }
+ pStream->endElement( XML_rm );
+}
+
//___________________________________________________________________
XclExpChTr0x014A::XclExpChTr0x014A( const XclExpChTrInsert& rAction ) :
@@ -1025,6 +1312,23 @@ sal_Size XclExpChTr0x014A::GetActionByteCount() const
return 14;
}
+void XclExpChTr0x014A::SaveXml( XclExpXmlStream& rStrm )
+{
+ sax_fastparser::FSHelperPtr pStream = rStrm.GetCurrentStream();
+
+ pStream->startElement( XML_rfmt,
+ XML_sheetId, OString::valueOf( (sal_Int32) GetTabId( aRange.aStart.Tab() ) ).getStr(),
+ XML_xfDxf, NULL, // OOXTODO: not supported
+ XML_s, NULL, // OOXTODO: style
+ XML_sqref, XclXmlUtils::ToOString( aRange ).getStr(),
+ XML_start, NULL, // OOXTODO: for string changes
+ XML_length, NULL, // OOXTODO: for string changes
+ FSEND );
+ // OOXTODO: XML_dxf, XML_extLst
+
+ pStream->endElement( XML_rfmt );
+}
+
//___________________________________________________________________
XclExpChTrActionStack::~XclExpChTrActionStack()
@@ -1061,8 +1365,99 @@ void XclExpChTrRecordList::Save( XclExpStream& rStrm )
pRec->Save( rStrm );
}
+void XclExpChTrRecordList::SaveXml( XclExpXmlStream& rStrm )
+{
+ for( ExcRecord* pRec = First(); pRec; pRec = Next() )
+ pRec->SaveXml( rStrm );
+}
+
//___________________________________________________________________
+class ExcXmlRecord : public ExcRecord
+{
+public:
+ virtual sal_Size GetLen() const;
+ virtual UINT16 GetNum() const;
+ virtual void Save( XclExpStream& rStrm );
+ virtual void SaveXml( XclExpXmlStream& rStrm ) = 0;
+};
+
+sal_Size ExcXmlRecord::GetLen() const
+{
+ return 0;
+}
+
+UINT16 ExcXmlRecord::GetNum() const
+{
+ return 0;
+}
+
+void ExcXmlRecord::Save( XclExpStream& )
+{
+ // Do nothing; ignored for BIFF output.
+}
+
+class StartXmlElement : public ExcXmlRecord
+{
+public:
+ enum Behavior {
+ CLOSE_ELEMENT = 0x1,
+ WRITE_NAMESPACES = 0x2,
+ };
+ StartXmlElement( sal_Int32 nElement, sal_Int32 eBehavior )
+ : mnElement( nElement ), meBehavior( (Behavior) eBehavior ) {}
+ virtual void SaveXml( XclExpXmlStream& rStrm );
+private:
+ sal_Int32 mnElement;
+ Behavior meBehavior;
+};
+
+void StartXmlElement::SaveXml( XclExpXmlStream& rStrm )
+{
+ sax_fastparser::FSHelperPtr pStream = rStrm.GetCurrentStream();
+ pStream->write( "<" )
+ ->writeId( mnElement );
+ if( meBehavior & WRITE_NAMESPACES )
+ {
+ rStrm.WriteAttributes(
+ XML_xmlns, "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
+ FSNS( XML_xmlns, XML_r ), "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
+ FSEND );
+ }
+ if( meBehavior & CLOSE_ELEMENT )
+ {
+ pStream->write( ">" );
+ }
+}
+
+class EndXmlElement : public ExcXmlRecord
+{
+ sal_Int32 mnElement;
+public:
+ EndXmlElement( sal_Int32 nElement ) : mnElement( nElement) {}
+ virtual void SaveXml( XclExpXmlStream& rStrm );
+};
+
+void EndXmlElement::SaveXml( XclExpXmlStream& rStrm )
+{
+ rStrm.GetCurrentStream()->endElement( mnElement );
+}
+
+class EndHeaderElement : public EndXmlElement
+{
+public:
+ EndHeaderElement() : EndXmlElement( XML_header ) {}
+ virtual void SaveXml( XclExpXmlStream& rStrm );
+};
+
+void EndHeaderElement::SaveXml( XclExpXmlStream& rStrm )
+{
+ // Remove the `xl/revisions/revisionLogX.xml' file from the stack
+ rStrm.PopStream();
+
+ EndXmlElement::SaveXml( rStrm );
+}
+
XclExpChangeTrack::XclExpChangeTrack( const XclExpRoot& rRoot ) :
XclExpRoot( rRoot ),
aRecList(),
@@ -1110,6 +1505,7 @@ XclExpChangeTrack::XclExpChangeTrack( const XclExpRoot& rRoot ) :
// build record list
pHeader = new XclExpChTrHeader;
+ aRecList.Append( new StartXmlElement( XML_headers, StartXmlElement::WRITE_NAMESPACES ) );
aRecList.Append( pHeader );
aRecList.Append( new XclExpChTr0x0195 );
aRecList.Append( new XclExpChTr0x0194( *pTempChangeTrack ) );
@@ -1117,17 +1513,27 @@ XclExpChangeTrack::XclExpChangeTrack( const XclExpRoot& rRoot ) :
String sLastUsername;
DateTime aLastDateTime;
sal_uInt32 nIndex = 1;
+ sal_Int32 nLogNumber = 1;
while( XclExpChTrAction* pAction = aActionStack.Pop() )
{
if( (nIndex == 1) || pAction->ForceInfoRecord() ||
(pAction->GetUsername() != sLastUsername) ||
(pAction->GetDateTime() != aLastDateTime) )
{
+ if( nIndex != 1 )
+ {
+ aRecList.Append( new EndXmlElement( XML_revisions ) );
+ aRecList.Append( new EndHeaderElement() );
+ }
+
lcl_GenerateGUID( aGUID, bValidGUID );
sLastUsername = pAction->GetUsername();
aLastDateTime = pAction->GetDateTime();
- aRecList.Append( new XclExpChTrInfo( sLastUsername, aLastDateTime, aGUID ) );
- aRecList.Append( new XclExpChTrTabId( pAction->GetTabIdBuffer() ) );
+
+ aRecList.Append( new StartXmlElement( XML_header, 0 ) );
+ aRecList.Append( new XclExpChTrInfo( sLastUsername, aLastDateTime, aGUID, nLogNumber++ ) );
+ aRecList.Append( new XclExpChTrTabId( pAction->GetTabIdBuffer(), true ) );
+ aRecList.Append( new StartXmlElement( XML_revisions, StartXmlElement::WRITE_NAMESPACES | StartXmlElement::CLOSE_ELEMENT ) );
pHeader->SetGUID( aGUID );
}
pAction->SetIndex( nIndex );
@@ -1136,6 +1542,12 @@ XclExpChangeTrack::XclExpChangeTrack( const XclExpRoot& rRoot ) :
pHeader->SetGUID( aGUID );
pHeader->SetCount( nIndex - 1 );
+ if( nLogNumber > 1 )
+ {
+ aRecList.Append( new EndXmlElement( XML_revisions ) );
+ aRecList.Append( new EndHeaderElement() );
+ }
+ aRecList.Append( new EndXmlElement( XML_headers ) );
aRecList.Append( new ExcEof );
}
@@ -1246,3 +1658,46 @@ void XclExpChangeTrack::Write()
}
}
+static void lcl_WriteUserNamesXml( XclExpXmlStream& rWorkbookStrm )
+{
+ sax_fastparser::FSHelperPtr pUserNames = rWorkbookStrm.CreateOutputStream(
+ OUString::createFromAscii( "xl/revisions/userNames.xml" ),
+ OUString::createFromAscii( "revisions/userNames.xml" ),
+ rWorkbookStrm.GetCurrentStream()->getOutputStream(),
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml",
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/usernames" );
+ pUserNames->startElement( XML_users,
+ XML_xmlns, "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
+ FSNS( XML_xmlns, XML_r ), "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
+ XML_count, "0",
+ FSEND );
+ // OOXTODO: XML_userinfo elements for each user editing the file
+ // Doesn't seem to be supported by .xls output either (based on
+ // contents of XclExpChangeTrack::WriteUserNamesStream()).
+ pUserNames->endElement( XML_users );
+}
+
+void XclExpChangeTrack::WriteXml( XclExpXmlStream& rWorkbookStrm )
+{
+ if( !aRecList.Count() )
+ return;
+
+ lcl_WriteUserNamesXml( rWorkbookStrm );
+
+ sax_fastparser::FSHelperPtr pRevisionHeaders = rWorkbookStrm.CreateOutputStream(
+ OUString::createFromAscii( "xl/revisions/revisionHeaders.xml" ),
+ OUString::createFromAscii( "revisions/revisionHeaders.xml" ),
+ rWorkbookStrm.GetCurrentStream()->getOutputStream(),
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml",
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/revisionHeaders" );
+ // OOXTODO: XML_userinfo elements for each user editing the file
+ // Doesn't seem to be supported by .xls output either (based on
+ // contents of XclExpChangeTrack::WriteUserNamesStream()).
+ rWorkbookStrm.PushStream( pRevisionHeaders );
+
+ aRecList.SaveXml( rWorkbookStrm );
+
+ rWorkbookStrm.PopStream();
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xcl97/XclImpChangeTrack.cxx b/sc/source/filter/xcl97/XclImpChangeTrack.cxx
index 96a301e1bef5..c20fba217513 100644
--- a/sc/source/filter/xcl97/XclImpChangeTrack.cxx
+++ b/sc/source/filter/xcl97/XclImpChangeTrack.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -500,3 +501,4 @@ bool XclImpChTrFmlConverter::Read3DTabReference( UINT16 /*nIxti*/, SCTAB& rFirst
return rChangeTrack.Read3DTabRefInfo( rFirstTab, rLastTab, rExtInfo );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xcl97/makefile.mk b/sc/source/filter/xcl97/makefile.mk
index 3ce71ba142df..04a028e04af3 100644
--- a/sc/source/filter/xcl97/makefile.mk
+++ b/sc/source/filter/xcl97/makefile.mk
@@ -40,9 +40,7 @@ VISIBILITY_HIDDEN=TRUE
# --- Settings -----------------------------------------------------
-.INCLUDE : scpre.mk
.INCLUDE : settings.mk
-.INCLUDE : sc.mk
# --- Files --------------------------------------------------------
diff --git a/sc/source/filter/xcl97/xcl97dum.cxx b/sc/source/filter/xcl97/xcl97dum.cxx
index 1550fa97ed40..8340ce397ffa 100644
--- a/sc/source/filter/xcl97/xcl97dum.cxx
+++ b/sc/source/filter/xcl97/xcl97dum.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -161,3 +162,4 @@ const BYTE* ExcDummy8_02::GetData() const
return pMyData;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xcl97/xcl97esc.cxx b/sc/source/filter/xcl97/xcl97esc.cxx
index a7c6dee67dc5..8f4674cb7e44 100644
--- a/sc/source/filter/xcl97/xcl97esc.cxx
+++ b/sc/source/filter/xcl97/xcl97esc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -54,6 +55,9 @@
#include "global.hxx"
#include "document.hxx"
#include "drwlayer.hxx"
+#include "xecontent.hxx"
+#include <editeng/flditem.hxx>
+#include "userdat.hxx"
#include "xcl97rec.hxx"
#include "xehelper.hxx"
#include "xechart.hxx"
@@ -210,7 +214,7 @@ EscherExHostAppData* XclEscherEx::StartShape( const Reference< XShape >& rxShape
pCurrAppData = new XclEscherHostAppData;
SdrObject* pObj = GetSdrObjectFromXShape( rxShape );
if ( !pObj )
- pCurrXclObj = new XclObjAny( mrObjMgr ); // just what is it?!?
+ pCurrXclObj = new XclObjAny( mrObjMgr, rxShape ); // just what is it?!?
else
{
pCurrXclObj = NULL;
@@ -235,10 +239,10 @@ EscherExHostAppData* XclEscherEx::StartShape( const Reference< XShape >& rxShape
pCurrXclObj = new XclObjOle( mrObjMgr, *pObj );
}
else // just a metafile
- pCurrXclObj = new XclObjAny( mrObjMgr );
+ pCurrXclObj = new XclObjAny( mrObjMgr, rxShape );
}
else
- pCurrXclObj = new XclObjAny( mrObjMgr );
+ pCurrXclObj = new XclObjAny( mrObjMgr, rxShape );
}
else if( nObjType == OBJ_UNO )
{
@@ -250,13 +254,14 @@ EscherExHostAppData* XclEscherEx::StartShape( const Reference< XShape >& rxShape
pCurrXclObj = CreateCtrlObj( rxShape, pChildAnchor );
#endif
if( !pCurrXclObj )
- pCurrXclObj = new XclObjAny( mrObjMgr ); // just a metafile
+ pCurrXclObj = new XclObjAny( mrObjMgr, rxShape ); // just a metafile
}
else if( !ScDrawLayer::IsNoteCaption( pObj ) )
{
// #107540# ignore permanent note shapes
// #i12190# do not ignore callouts (do not filter by object type ID)
- pCurrXclObj = new XclObjAny( mrObjMgr ); // just a metafile
+ pCurrXclObj = ShapeInteractionHelper::CreateShapeObj( mrObjMgr, rxShape );
+ ShapeInteractionHelper::PopulateShapeInteractionInfo( mrObjMgr, rxShape, *pCurrAppData );
}
}
if ( pCurrXclObj )
@@ -359,7 +364,6 @@ EscherExHostAppData* XclEscherEx::EnterAdditionalTextGroup()
return pCurrAppData;
}
-
void XclEscherEx::EndDocument()
{
if( mbIsRootDff )
@@ -478,6 +482,7 @@ void XclEscherEx::DeleteCurrAppData()
delete pCurrAppData->GetClientAnchor();
// delete pCurrAppData->GetClientData();
delete pCurrAppData->GetClientTextbox();
+ delete pCurrAppData->GetInteractionInfo();
delete pCurrAppData;
}
}
@@ -509,4 +514,41 @@ void XclEscherClientTextbox::WriteData( EscherEx& /*rEx*/ ) const
pXclObj->SetText( GetRoot(), rTextObj );
}
+XclExpShapeObj*
+ShapeInteractionHelper::CreateShapeObj( XclExpObjectManager& rObjMgr, const Reference< XShape >& xShape )
+{
+ return new XclExpShapeObj( rObjMgr, xShape );
+}
+
+void
+ShapeInteractionHelper::PopulateShapeInteractionInfo( XclExpObjectManager& rObjMgr, const Reference< XShape >& xShape, EscherExHostAppData& rHostAppData )
+{
+ try
+ {
+ SvMemoryStream* pMemStrm = NULL;
+ rtl::OUString sHyperLink;
+ rtl::OUString sMacro;
+ if ( ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( ::GetSdrObjectFromXShape( xShape ) ) )
+ {
+ sHyperLink = pInfo->GetHlink();
+ sMacro = pInfo->GetMacro();
+ }
+ if ( sHyperLink.getLength() > 0 )
+ {
+ pMemStrm = new SvMemoryStream();
+ XclExpStream tmpStream( *pMemStrm, rObjMgr.GetRoot() );
+ ScAddress dummyAddress;
+ SvxURLField aUrlField;
+ aUrlField.SetURL( sHyperLink );
+ XclExpHyperlink hExpHlink( rObjMgr.GetRoot(), aUrlField, dummyAddress );
+ hExpHlink.WriteEmbeddedData( tmpStream );
+ }
+ if ( ( sHyperLink.getLength() > 0 ) || ( sMacro.getLength() > 0 ) )
+ rHostAppData.SetInteractionInfo( new InteractionInfo( pMemStrm, true ) );
+ }
+ catch( Exception& )
+ {
+ }
+}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index df6bdcbbe671..e369d8948be7 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -77,22 +78,34 @@
#include "patattr.hxx"
#include "tabprotection.hxx"
+#include <com/sun/star/sheet/XCellAddressable.hpp>
+#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
#include <oox/core/tokens.hxx>
+#include <oox/export/shapes.hxx>
+#include <oox/export/utils.hxx>
+#include <oox/export/vmlexport.hxx>
using ::rtl::OString;
using ::rtl::OUString;
using namespace ::com::sun::star;
using ::com::sun::star::uno::Reference;
+using ::oox::drawingml::DrawingML;
using ::com::sun::star::uno::UNO_QUERY;
using ::com::sun::star::beans::XPropertySet;
using ::com::sun::star::drawing::XShape;
+using ::oox::drawingml::ShapeExport;
+using ::oox::vml::VMLExport;
// ============================================================================
+sal_Int32 XclExpObjList::mnDrawingMLCount;
+sal_Int32 XclExpObjList::mnVmlCount;
+
XclExpObjList::XclExpObjList( const XclExpRoot& rRoot, XclEscherEx& rEscherEx ) :
XclExpRoot( rRoot ),
mrEscherEx( rEscherEx ),
- pSolverContainer( 0 )
+ pSolverContainer( 0 ),
+ mnScTab( rRoot.GetCurrScTab() )
{
pMsodrawingPerSheet = new XclExpMsoDrawing( rEscherEx );
// open the DGCONTAINER and the patriarch group shape
@@ -118,6 +131,7 @@ UINT16 XclExpObjList::Add( XclObj* pObj )
Insert( pObj, LIST_APPEND );
UINT16 nCnt = (UINT16) Count();
pObj->SetId( nCnt );
+ pObj->SetTab( mnScTab );
return nCnt;
}
else
@@ -149,6 +163,128 @@ void XclExpObjList::Save( XclExpStream& rStrm )
pSolverContainer->Save( rStrm );
}
+static bool IsVmlObject( const XclObj& rObj )
+{
+ switch( rObj.GetObjType() )
+ {
+ case EXC_OBJTYPE_NOTE:
+ return true;
+ default:
+ return false;
+ }
+}
+
+
+static sal_Int32 GetVmlObjectCount( XclExpObjList& rList )
+{
+ sal_Int32 nNumVml = 0;
+
+ for ( XclObj* p = rList.First(); p; p = rList.Next() )
+ if( IsVmlObject( *p ) )
+ ++nNumVml;
+
+ return nNumVml;
+}
+
+
+static void SaveDrawingMLObjects( XclExpObjList& rList, XclExpXmlStream& rStrm, sal_Int32& nDrawingMLCount )
+{
+ sal_Int32 nVmlObjects = GetVmlObjectCount( rList );
+ if( (rList.Count() - nVmlObjects) == 0 )
+ return;
+
+ sal_Int32 nDrawing = ++nDrawingMLCount;
+ OUString sId;
+ sax_fastparser::FSHelperPtr pDrawing = rStrm.CreateOutputStream(
+ XclXmlUtils::GetStreamName( "xl/", "drawings/drawing", nDrawing ),
+ XclXmlUtils::GetStreamName( "../", "drawings/drawing", nDrawing ),
+ rStrm.GetCurrentStream()->getOutputStream(),
+ "application/vnd.openxmlformats-officedocument.drawing+xml",
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",
+ &sId );
+
+ rStrm.GetCurrentStream()->singleElement( XML_drawing,
+ FSNS( XML_r, XML_id ), XclXmlUtils::ToOString( sId ).getStr(),
+ FSEND );
+
+ rStrm.PushStream( pDrawing );
+ pDrawing->startElement( FSNS( XML_xdr, XML_wsDr ),
+ FSNS( XML_xmlns, XML_xdr ), "http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing",
+ FSNS( XML_xmlns, XML_a ), "http://schemas.openxmlformats.org/drawingml/2006/main",
+ FSNS( XML_xmlns, XML_r ), "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
+ FSEND );
+
+ for ( XclObj* p = rList.First(); p; p = rList.Next() )
+ {
+ if( IsVmlObject( *p ) )
+ continue;
+ p->SaveXml( rStrm );
+ }
+
+ pDrawing->endElement( FSNS( XML_xdr, XML_wsDr ) );
+
+ rStrm.PopStream();
+}
+
+
+static void SaveVmlObjects( XclExpObjList& rList, XclExpXmlStream& rStrm, sal_Int32& nVmlCount )
+{
+ if( GetVmlObjectCount( rList ) == 0 )
+ return;
+
+ sal_Int32 nDrawing = ++nVmlCount;
+ OUString sId;
+ sax_fastparser::FSHelperPtr pVmlDrawing = rStrm.CreateOutputStream(
+ XclXmlUtils::GetStreamName( "xl/", "drawings/vmlDrawing", nDrawing ),
+ XclXmlUtils::GetStreamName( "../", "drawings/vmlDrawing", nDrawing ),
+ rStrm.GetCurrentStream()->getOutputStream(),
+ "application/vnd.openxmlformats-officedocument.vmlDrawing",
+ "http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",
+ &sId );
+
+ rStrm.GetCurrentStream()->singleElement( XML_legacyDrawing,
+ FSNS( XML_r, XML_id ), XclXmlUtils::ToOString( sId ).getStr(),
+ FSEND );
+
+ rStrm.PushStream( pVmlDrawing );
+ pVmlDrawing->startElement( XML_xml,
+ FSNS( XML_xmlns, XML_v ), "urn:schemas-microsoft-com:vml",
+ FSNS( XML_xmlns, XML_o ), "urn:schemas-microsoft-com:office:office",
+ FSNS( XML_xmlns, XML_x ), "urn:schemas-microsoft-com:office:excel",
+ FSEND );
+
+ for ( XclObj* p = rList.First(); p; p = rList.Next() )
+ {
+ if( !IsVmlObject( *p ) )
+ continue;
+ p->SaveXml( rStrm );
+ }
+
+ pVmlDrawing->endElement( XML_xml );
+
+ rStrm.PopStream();
+}
+
+
+void XclExpObjList::SaveXml( XclExpXmlStream& rStrm )
+{
+ if( pSolverContainer )
+ pSolverContainer->SaveXml( rStrm );
+
+ if( Count() == 0 )
+ return;
+
+ SaveDrawingMLObjects( *this, rStrm, mnDrawingMLCount );
+ SaveVmlObjects( *this, rStrm, mnVmlCount );
+}
+
+
+void XclExpObjList::ResetCounters()
+{
+ mnDrawingMLCount = 0;
+ mnVmlCount = 0;
+}
+
// --- class XclObj --------------------------------------------------
XclObj::XclObj( XclExpObjectManager& rObjMgr, sal_uInt16 nObjType, bool bOwnEscher ) :
@@ -286,69 +422,80 @@ void XclObj::SaveTextRecs( XclExpStream& rStrm )
pTxo->Save( rStrm );
}
-// --- class XclObjComment -------------------------------------------
+ // --- class XclObjComment ------------------------------------------
-XclObjComment::XclObjComment( XclExpObjectManager& rObjMgr, const Rectangle& rRect, const EditTextObject& rEditObj, SdrObject* pCaption, bool bVisible ) :
+XclObjComment::XclObjComment( XclExpObjectManager& rObjMgr, const Rectangle& rRect, const EditTextObject& rEditObj, SdrCaptionObj* pCaption, bool bVisible, const ScAddress& rAddress, Rectangle &rFrom, Rectangle &rTo ) :
XclObj( rObjMgr, EXC_OBJTYPE_NOTE, true )
+ , maScPos( rAddress )
+ , mpCaption( static_cast< SdrCaptionObj* >( pCaption->Clone() ) )
+ , mbVisible( bVisible )
+ , maFrom ( rFrom )
+ , maTo ( rTo )
{
ProcessEscherObj( rObjMgr.GetRoot(), rRect, pCaption, bVisible);
// TXO
pTxo = new XclTxo( rObjMgr.GetRoot(), rEditObj, pCaption );
}
-void XclObjComment::ProcessEscherObj( const XclExpRoot& rRoot, const Rectangle& rRect, SdrObject* pCaption, const bool bVisible )
+static void lcl_FillProps( EscherPropertyContainer& rPropOpt, SdrObject* pCaption, bool bVisible )
{
- Reference<XShape> aXShape;
- EscherPropertyContainer aPropOpt;
-
- if(pCaption)
+ if( pCaption )
{
- aXShape = GetXShapeForSdrObject(pCaption);
+ Reference< XShape > aXShape = GetXShapeForSdrObject( pCaption );
Reference< XPropertySet > aXPropSet( aXShape, UNO_QUERY );
if( aXPropSet.is() )
{
- aPropOpt.CreateFillProperties( aXPropSet, sal_True);
+ rPropOpt.CreateFillProperties( aXPropSet, sal_True);
- aPropOpt.AddOpt( ESCHER_Prop_lTxid, 0 ); // undocumented
- aPropOpt.AddOpt( 0x0158, 0x00000000 ); // undocumented
+ rPropOpt.AddOpt( ESCHER_Prop_lTxid, 0 ); // undocumented
+ rPropOpt.AddOpt( 0x0158, 0x00000000 ); // undocumented
sal_uInt32 nValue = 0;
- if(!aPropOpt.GetOpt( ESCHER_Prop_FitTextToShape, nValue ))
- aPropOpt.AddOpt( ESCHER_Prop_FitTextToShape, 0x00080008 ); // bool field
+ if( !rPropOpt.GetOpt( ESCHER_Prop_FitTextToShape, nValue ) )
+ rPropOpt.AddOpt( ESCHER_Prop_FitTextToShape, 0x00080008 ); // bool field
- if(aPropOpt.GetOpt( ESCHER_Prop_fillColor, nValue ))
+ if( rPropOpt.GetOpt( ESCHER_Prop_fillColor, nValue ) )
{
// If the Colour is the same as the 'ToolTip' System colour then
// use the default rather than the explicit colour value. This will
// be incorrect where user has chosen to use this colour explicity.
Color aColor = Color( (BYTE)nValue, (BYTE)( nValue >> 8 ), (BYTE)( nValue >> 16 ) );
const StyleSettings& rSett = Application::GetSettings().GetStyleSettings();
- if(aColor == rSett.GetHelpColor().GetColor())
+ if( aColor == rSett.GetHelpColor().GetColor() )
{
- aPropOpt.AddOpt( ESCHER_Prop_fillColor, 0x08000050 );
- aPropOpt.AddOpt( ESCHER_Prop_fillBackColor, 0x08000050 );
+ rPropOpt.AddOpt( ESCHER_Prop_fillColor, 0x08000050 );
+ rPropOpt.AddOpt( ESCHER_Prop_fillBackColor, 0x08000050 );
}
}
else
- aPropOpt.AddOpt( ESCHER_Prop_fillColor, 0x08000050 );
-
- if(!aPropOpt.GetOpt( ESCHER_Prop_fillBackColor, nValue ))
- aPropOpt.AddOpt( ESCHER_Prop_fillBackColor, 0x08000050 );
- if(!aPropOpt.GetOpt( ESCHER_Prop_fNoFillHitTest, nValue ))
- aPropOpt.AddOpt( ESCHER_Prop_fNoFillHitTest, 0x00110010 ); // bool field
- if(!aPropOpt.GetOpt( ESCHER_Prop_shadowColor, nValue ))
- aPropOpt.AddOpt( ESCHER_Prop_shadowColor, 0x00000000 );
- if(!aPropOpt.GetOpt( ESCHER_Prop_fshadowObscured, nValue )) // bool field
- aPropOpt.AddOpt( ESCHER_Prop_fshadowObscured, 0x00030003 ); // bool field
+ rPropOpt.AddOpt( ESCHER_Prop_fillColor, 0x08000050 );
+
+ if( !rPropOpt.GetOpt( ESCHER_Prop_fillBackColor, nValue ) )
+ rPropOpt.AddOpt( ESCHER_Prop_fillBackColor, 0x08000050 );
+ if( !rPropOpt.GetOpt( ESCHER_Prop_fNoFillHitTest, nValue ) )
+ rPropOpt.AddOpt( ESCHER_Prop_fNoFillHitTest, 0x00110010 ); // bool field
+ if( !rPropOpt.GetOpt( ESCHER_Prop_shadowColor, nValue ) )
+ rPropOpt.AddOpt( ESCHER_Prop_shadowColor, 0x00000000 );
+ if( !rPropOpt.GetOpt( ESCHER_Prop_fshadowObscured, nValue ) ) // bool field
+ rPropOpt.AddOpt( ESCHER_Prop_fshadowObscured, 0x00030003 ); // bool field
}
}
+ sal_uInt32 nFlags = 0x000A0000;
+ ::set_flag( nFlags, sal_uInt32(2), !bVisible );
+ rPropOpt.AddOpt( ESCHER_Prop_fPrint, nFlags ); // bool field
+}
+
+void XclObjComment::ProcessEscherObj( const XclExpRoot& rRoot, const Rectangle& rRect, SdrObject* pCaption, const bool bVisible )
+{
+ EscherPropertyContainer aPropOpt;
+
+
+ lcl_FillProps( aPropOpt, pCaption, bVisible );
+
nGrbit = 0; // all off: AutoLine, AutoFill, Printable, Locked
mrEscherEx.OpenContainer( ESCHER_SpContainer );
mrEscherEx.AddShape( ESCHER_ShpInst_TextBox, SHAPEFLAG_HAVEANCHOR | SHAPEFLAG_HAVESPT );
- sal_uInt32 nFlags = 0x000A0000;
- ::set_flag( nFlags, sal_uInt32(2), !bVisible );
- aPropOpt.AddOpt( ESCHER_Prop_fPrint, nFlags ); // bool field
aPropOpt.Commit( mrEscherEx.GetStream() );
XclExpDffNoteAnchor( rRoot, rRect ).WriteDffData( mrEscherEx );
@@ -374,6 +521,82 @@ void XclObjComment::Save( XclExpStream& rStrm )
XclObj::Save( rStrm );
}
+class VmlCommentExporter : public VMLExport
+{
+ ScAddress maScPos;
+ SdrCaptionObj* mpCaption;
+ bool mbVisible;
+ Rectangle maFrom;
+ Rectangle maTo;
+
+public:
+ VmlCommentExporter ( sax_fastparser::FSHelperPtr p, ScAddress aScPos, SdrCaptionObj* pCaption, bool bVisible, Rectangle &aFrom, Rectangle &aTo );
+protected:
+ virtual void Commit( EscherPropertyContainer& rProps, const Rectangle& rRect );
+ virtual sal_Int32 StartShape();
+ virtual void EndShape( sal_Int32 nShapeElement );
+};
+
+
+VmlCommentExporter::VmlCommentExporter( sax_fastparser::FSHelperPtr p, ScAddress aScPos, SdrCaptionObj* pCaption,
+ bool bVisible, Rectangle &aFrom, Rectangle &aTo )
+ : VMLExport( p )
+ , maScPos( aScPos )
+ , mpCaption( pCaption )
+ , mbVisible( bVisible )
+ , maFrom ( aFrom )
+ , maTo ( aTo )
+{
+}
+
+void VmlCommentExporter::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect )
+{
+ lcl_FillProps( rProps, mpCaption, mbVisible );
+ rProps.AddOpt( ESCHER_Prop_fHidden, 1 ); // bool field
+
+ VMLExport::Commit( rProps, rRect );
+}
+
+sal_Int32 VmlCommentExporter::StartShape()
+{
+ AddShapeAttribute( XML_type, OString( "#_x0000_t202") );
+
+ sal_Int32 nId = VMLExport::StartShape();
+
+ return nId;
+}
+
+void VmlCommentExporter::EndShape( sal_Int32 nShapeElement )
+{
+ char pAnchor[100];
+ sax_fastparser::FSHelperPtr pVmlDrawing = GetFS();
+ snprintf( pAnchor, 100, "%ld, %ld, %ld, %ld, %ld, %ld, %ld, %ld",
+ maFrom.Left(), maFrom.Top(), maFrom.Right(), maFrom.Bottom(),
+ maTo.Left(), maTo.Top(), maTo.Right(), maTo.Bottom() );
+
+ pVmlDrawing->startElement( FSNS( XML_x, XML_ClientData ),
+ XML_ObjectType, "Note",
+ FSEND );
+ pVmlDrawing->singleElement( FSNS( XML_x, XML_MoveWithCells ),
+ FSEND );
+ pVmlDrawing->singleElement( FSNS( XML_x, XML_SizeWithCells ),
+ FSEND );
+ XclXmlUtils::WriteElement( pVmlDrawing, FSNS( XML_x, XML_Anchor ), pAnchor );
+ XclXmlUtils::WriteElement( pVmlDrawing, FSNS( XML_x, XML_AutoFill ), "False" );
+ XclXmlUtils::WriteElement( pVmlDrawing, FSNS( XML_x, XML_Row ), maScPos.Row() );
+ XclXmlUtils::WriteElement( pVmlDrawing, FSNS( XML_x, XML_Column ), sal_Int32( maScPos.Col() ) );
+ pVmlDrawing->endElement( FSNS( XML_x, XML_ClientData ) );
+
+ VMLExport::EndShape( nShapeElement );
+}
+
+void XclObjComment::SaveXml( XclExpXmlStream& rStrm )
+{
+ VmlCommentExporter aCommentExporter( rStrm.GetCurrentStream(), maScPos, mpCaption.get(), mbVisible, maFrom, maTo );
+ aCommentExporter.AddSdrObject( *mpCaption );
+}
+
+
// --- class XclObjDropDown ------------------------------------------
XclObjDropDown::XclObjDropDown( XclExpObjectManager& rObjMgr, const ScAddress& rPos, BOOL bFilt ) :
@@ -672,8 +895,9 @@ void XclObjOle::Save( XclExpStream& rStrm )
// --- class XclObjAny -------------------------------------------
-XclObjAny::XclObjAny( XclExpObjectManager& rObjMgr ) :
- XclObj( rObjMgr, EXC_OBJTYPE_UNKNOWN )
+XclObjAny::XclObjAny( XclExpObjectManager& rObjMgr, const Reference< XShape >& rShape )
+ : XclObj( rObjMgr, EXC_OBJTYPE_UNKNOWN )
+ , mxShape( rShape )
{
}
@@ -709,6 +933,123 @@ ExcBof8_Base::ExcBof8_Base()
nFileHistory = 0x00000000;
nLowestBiffVer = 0x00000006; // Biff8
}
+void XclObjAny::WriteFromTo( XclExpXmlStream& rStrm, const Reference< XShape >& rShape, SCTAB nTab )
+{
+ sax_fastparser::FSHelperPtr pDrawing = rStrm.GetCurrentStream();
+
+ awt::Point aTopLeft = rShape->getPosition();
+ awt::Size aSize = rShape->getSize();
+ Rectangle aLocation( aTopLeft.X, aTopLeft.Y, aTopLeft.X + aSize.Width, aTopLeft.Y + aSize.Height );
+ ScRange aRange = rStrm.GetRoot().GetDoc().GetRange( nTab, aLocation );
+ Rectangle aRangeRect = rStrm.GetRoot().GetDoc().GetMMRect( aRange.aStart.Col(), aRange.aStart.Row(),
+ aRange.aEnd.Col()-1, aRange.aEnd.Row()-1,
+ nTab );
+
+
+ pDrawing->startElement( FSNS( XML_xdr, XML_from ),
+ FSEND );
+ XclXmlUtils::WriteElement( pDrawing, FSNS( XML_xdr, XML_col ), (sal_Int32) aRange.aStart.Col() );
+ XclXmlUtils::WriteElement( pDrawing, FSNS( XML_xdr, XML_colOff ),
+ MM100toEMU( aLocation.Left() - aRangeRect.Left() ) );
+ XclXmlUtils::WriteElement( pDrawing, FSNS( XML_xdr, XML_row ), (sal_Int32) aRange.aStart.Row() );
+ XclXmlUtils::WriteElement( pDrawing, FSNS( XML_xdr, XML_rowOff ),
+ MM100toEMU( aLocation.Top() - aRangeRect.Top() ) );
+ pDrawing->endElement( FSNS( XML_xdr, XML_from ) );
+
+ pDrawing->startElement( FSNS( XML_xdr, XML_to ),
+ FSEND );
+ XclXmlUtils::WriteElement( pDrawing, FSNS( XML_xdr, XML_col ), (sal_Int32) aRange.aEnd.Col() );
+ XclXmlUtils::WriteElement( pDrawing, FSNS( XML_xdr, XML_colOff ),
+ MM100toEMU( aLocation.Right() - aRangeRect.Right() ) );
+ XclXmlUtils::WriteElement( pDrawing, FSNS( XML_xdr, XML_row ), (sal_Int32) aRange.aEnd.Row() );
+ XclXmlUtils::WriteElement( pDrawing, FSNS( XML_xdr, XML_rowOff ),
+ MM100toEMU( aLocation.Bottom() - aRangeRect.Bottom() ) );
+ pDrawing->endElement( FSNS( XML_xdr, XML_to ) );
+}
+
+void XclObjAny::WriteFromTo( XclExpXmlStream& rStrm, const XclObjAny& rObj )
+{
+ WriteFromTo( rStrm, rObj.GetShape(), rObj.GetTab() );
+}
+
+static void
+WritePicPr( sax_fastparser::FSHelperPtr pDrawing, sal_Int32 nId, Reference< XPropertySet > xPropSet )
+{
+ pDrawing->startElement( FSNS( XML_xdr, XML_nvPicPr ),
+ FSEND );
+ OUString sName, sDescr;
+ xPropSet->getPropertyValue( XclXmlUtils::ToOUString( "Name" ) ) >>= sName;
+ xPropSet->getPropertyValue( XclXmlUtils::ToOUString( "Description" ) ) >>= sDescr;
+ pDrawing->singleElement( FSNS( XML_xdr, XML_cNvPr ),
+ XML_id, OString::valueOf( nId ).getStr(),
+ XML_name, XclXmlUtils::ToOString( sName ).getStr(),
+ XML_descr, XclXmlUtils::ToOString( sDescr ).getStr(),
+ FSEND );
+ // OOXTODO: //xdr:cNvPr children: XML_extLst, XML_hlinkClick, XML_hlinkHover
+ pDrawing->startElement( FSNS( XML_xdr, XML_cNvPicPr ),
+ // OOXTODO: FSNS( XML_xdr, XML_preferRelativeSize )
+ FSEND );
+ // OOXTODO: XML_extLst
+ pDrawing->singleElement( FSNS( XML_a, XML_picLocks ),
+ // OOXTODO: XML_noGrp,
+ // OOXTODO: XML_noSelect,
+ // OOXTODO: XML_noRot,
+ // OOXTODO: XML_noChangeAspect,
+ // OOXTODO: XML_noMove,
+ // OOXTODO: XML_noResize,
+ // OOXTODO: XML_noEditPoints,
+ // OOXTODO: XML_noAdjustHandles,
+ // OOXTODO: XML_noChangeArrowheads,
+ // OOXTODO: XML_noChangeShapeType,
+ // OOXTODO: XML_noCrop,
+ FSEND );
+ pDrawing->endElement( FSNS( XML_xdr, XML_cNvPicPr ) );
+ pDrawing->endElement( FSNS( XML_xdr, XML_nvPicPr ) );
+}
+
+
+static const char*
+GetEditAs( XclObjAny& rObj )
+{
+ if( const SdrObject* pShape = EscherEx::GetSdrObject( rObj.GetShape() ) )
+ {
+ // OOXTODO: returning "twoCell"
+ switch( ScDrawLayer::GetAnchor( pShape ) )
+ {
+ case SCA_CELL: return "oneCell";
+ default: break;
+ }
+ }
+ return "absolute";
+}
+
+
+void XclObjAny::SaveXml( XclExpXmlStream& rStrm )
+{
+ if( !mxShape.is() )
+ return;
+
+ sax_fastparser::FSHelperPtr pDrawing = rStrm.GetCurrentStream();
+
+ ShapeExport aDML( XML_xdr, pDrawing, &rStrm, DrawingML::DOCUMENT_XLSX );
+
+ pDrawing->startElement( FSNS( XML_xdr, XML_twoCellAnchor ), // OOXTODO: oneCellAnchor, absoluteAnchor
+ XML_editAs, GetEditAs( *this ),
+ FSEND );
+ Reference< XPropertySet > xPropSet( mxShape, UNO_QUERY );
+ if (xPropSet.is())
+ {
+ WriteFromTo( rStrm, *this );
+ aDML.WriteShape( mxShape );
+ }
+
+ pDrawing->singleElement( FSNS( XML_xdr, XML_clientData),
+ // OOXTODO: XML_fLocksWithSheet
+ // OOXTODO: XML_fPrintsWithSheet
+ FSEND );
+ pDrawing->endElement( FSNS( XML_xdr, XML_twoCellAnchor ) );
+}
+
void ExcBof8_Base::SaveCont( XclExpStream& rStrm )
@@ -1446,3 +1787,4 @@ void XclRefmode::SaveXml( XclExpXmlStream& rStrm )
FSEND );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLCalculationSettingsContext.cxx b/sc/source/filter/xml/XMLCalculationSettingsContext.cxx
index b124e77ac745..98d7a41da7c7 100644
--- a/sc/source/filter/xml/XMLCalculationSettingsContext.cxx
+++ b/sc/source/filter/xml/XMLCalculationSettingsContext.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -271,3 +272,5 @@ SvXMLImportContext *ScXMLIterationContext::CreateChildContext( USHORT nPrefix,
void ScXMLIterationContext::EndElement()
{
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLCalculationSettingsContext.hxx b/sc/source/filter/xml/XMLCalculationSettingsContext.hxx
index 8fe5a7f1db1c..867c01a5d923 100644
--- a/sc/source/filter/xml/XMLCalculationSettingsContext.hxx
+++ b/sc/source/filter/xml/XMLCalculationSettingsContext.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -109,3 +110,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLCellRangeSourceContext.cxx b/sc/source/filter/xml/XMLCellRangeSourceContext.cxx
index 9826e8385075..6b9bed748fb6 100644
--- a/sc/source/filter/xml/XMLCellRangeSourceContext.cxx
+++ b/sc/source/filter/xml/XMLCellRangeSourceContext.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -131,3 +132,4 @@ void ScXMLCellRangeSourceContext::EndElement()
{
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLCellRangeSourceContext.hxx b/sc/source/filter/xml/XMLCellRangeSourceContext.hxx
index fde1b5534134..711e83c7ea55 100644
--- a/sc/source/filter/xml/XMLCellRangeSourceContext.hxx
+++ b/sc/source/filter/xml/XMLCellRangeSourceContext.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -78,3 +79,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
index 5cd97e0714a9..9f129bd160dd 100644
--- a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
+++ b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -815,3 +816,5 @@ void ScChangeTrackingExportHelper::CollectAndWriteChanges()
}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx b/sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx
index f07f0ed905a0..cfb518e58b29 100644
--- a/sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx
+++ b/sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -96,3 +97,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
index d928444dd8ce..65294d496d87 100644
--- a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
+++ b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -933,3 +934,5 @@ void ScXMLChangeTrackingImportHelper::CreateChangeTrack(ScDocument* pTempDoc)
pDoc->SetChangeTrack(pTrack);
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx b/sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx
index 9857683b13ac..5a98df08a2c7 100644
--- a/sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx
+++ b/sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -247,3 +248,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLCodeNameProvider.cxx b/sc/source/filter/xml/XMLCodeNameProvider.cxx
index ca4bac7eb511..2f971e547abf 100644
--- a/sc/source/filter/xml/XMLCodeNameProvider.cxx
+++ b/sc/source/filter/xml/XMLCodeNameProvider.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -156,7 +157,7 @@ uno::Sequence< OUString > SAL_CALL XMLCodeNameProvider::getElementNames( )
uno::Type SAL_CALL XMLCodeNameProvider::getElementType( )
throw (uno::RuntimeException)
{
- return uno::Type();
+ return getCppuType(static_cast<uno::Sequence<beans::PropertyValue>*>(0));
}
::sal_Bool SAL_CALL XMLCodeNameProvider::hasElements()
@@ -202,3 +203,5 @@ void XMLCodeNameProvider::set( const uno::Reference< container::XNameAccess>& xN
}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLCodeNameProvider.hxx b/sc/source/filter/xml/XMLCodeNameProvider.hxx
index 39d84409c555..81a5b5e3ebdc 100644
--- a/sc/source/filter/xml/XMLCodeNameProvider.hxx
+++ b/sc/source/filter/xml/XMLCodeNameProvider.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -68,3 +69,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLColumnRowGroupExport.cxx b/sc/source/filter/xml/XMLColumnRowGroupExport.cxx
index 4c2929de02e3..bc53d9a373b2 100644
--- a/sc/source/filter/xml/XMLColumnRowGroupExport.cxx
+++ b/sc/source/filter/xml/XMLColumnRowGroupExport.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -185,3 +186,4 @@ void ScMyOpenCloseColumnRowGroup::Sort()
aTableEnd.sort();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLColumnRowGroupExport.hxx b/sc/source/filter/xml/XMLColumnRowGroupExport.hxx
index 51a93445ccfb..37608b737f5e 100644
--- a/sc/source/filter/xml/XMLColumnRowGroupExport.hxx
+++ b/sc/source/filter/xml/XMLColumnRowGroupExport.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -71,3 +72,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLConsolidationContext.cxx b/sc/source/filter/xml/XMLConsolidationContext.cxx
index 0ca5fc360533..f075dfc68129 100644
--- a/sc/source/filter/xml/XMLConsolidationContext.cxx
+++ b/sc/source/filter/xml/XMLConsolidationContext.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -158,3 +159,4 @@ void ScXMLConsolidationContext::EndElement()
GetScImport().UnlockSolarMutex();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLConsolidationContext.hxx b/sc/source/filter/xml/XMLConsolidationContext.hxx
index 52061c715ae7..a059c1309f04 100644
--- a/sc/source/filter/xml/XMLConsolidationContext.hxx
+++ b/sc/source/filter/xml/XMLConsolidationContext.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -71,3 +72,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLConverter.cxx b/sc/source/filter/xml/XMLConverter.cxx
index bceb030957ee..ee6a345fdc11 100644
--- a/sc/source/filter/xml/XMLConverter.cxx
+++ b/sc/source/filter/xml/XMLConverter.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -661,3 +662,4 @@ bool lclSkipEmptyParentheses( const sal_Unicode*& rpcString, const sal_Unicode*
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLConverter.hxx b/sc/source/filter/xml/XMLConverter.hxx
index 493ccb720b46..f8d6f40ef6d0 100644
--- a/sc/source/filter/xml/XMLConverter.hxx
+++ b/sc/source/filter/xml/XMLConverter.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -172,3 +173,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLDDELinksContext.cxx b/sc/source/filter/xml/XMLDDELinksContext.cxx
index d7fafe1d9423..792c19b5e30a 100644
--- a/sc/source/filter/xml/XMLDDELinksContext.cxx
+++ b/sc/source/filter/xml/XMLDDELinksContext.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45,6 +46,8 @@ using namespace com::sun::star;
using namespace xmloff::token;
using ::rtl::OUString;
+using rtl::OUString;
+
//------------------------------------------------------------------
ScXMLDDELinksContext::ScXMLDDELinksContext( ScXMLImport& rImport,
@@ -488,3 +491,5 @@ void ScXMLDDECellContext::EndElement()
for(sal_Int32 i = 0; i < nCells; ++i)
pDDELink->AddCellToRow(aCell);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLDDELinksContext.hxx b/sc/source/filter/xml/XMLDDELinksContext.hxx
index e9c1db58548f..d296df83be2c 100644
--- a/sc/source/filter/xml/XMLDDELinksContext.hxx
+++ b/sc/source/filter/xml/XMLDDELinksContext.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -228,3 +229,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLDetectiveContext.cxx b/sc/source/filter/xml/XMLDetectiveContext.cxx
index c127ca518266..131dea72379d 100644
--- a/sc/source/filter/xml/XMLDetectiveContext.cxx
+++ b/sc/source/filter/xml/XMLDetectiveContext.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -263,3 +264,4 @@ void ScXMLDetectiveOperationContext::EndElement()
GetScImport().GetDetectiveOpArray()->AddDetectiveOp( aDetectiveOp );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLDetectiveContext.hxx b/sc/source/filter/xml/XMLDetectiveContext.hxx
index 30a8bc600bb0..4e2d6b402574 100644
--- a/sc/source/filter/xml/XMLDetectiveContext.hxx
+++ b/sc/source/filter/xml/XMLDetectiveContext.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -173,3 +174,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLEmptyContext.cxx b/sc/source/filter/xml/XMLEmptyContext.cxx
index dbba2732ecee..20bec1f097b2 100644
--- a/sc/source/filter/xml/XMLEmptyContext.cxx
+++ b/sc/source/filter/xml/XMLEmptyContext.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -61,3 +62,5 @@ SvXMLImportContext *ScXMLEmptyContext::CreateChildContext( USHORT nPrefix,
void ScXMLEmptyContext::EndElement()
{
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLEmptyContext.hxx b/sc/source/filter/xml/XMLEmptyContext.hxx
index ab8b69ad8403..1b090c719281 100644
--- a/sc/source/filter/xml/XMLEmptyContext.hxx
+++ b/sc/source/filter/xml/XMLEmptyContext.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,3 +56,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLExportDDELinks.cxx b/sc/source/filter/xml/XMLExportDDELinks.cxx
index a29394bf850b..f0b80840098c 100644
--- a/sc/source/filter/xml/XMLExportDDELinks.cxx
+++ b/sc/source/filter/xml/XMLExportDDELinks.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -219,3 +220,5 @@ void ScXMLExportDDELinks::WriteDDELinks(uno::Reference<sheet::XSpreadsheetDocume
}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLExportDDELinks.hxx b/sc/source/filter/xml/XMLExportDDELinks.hxx
index 245a95934449..f7fd55574cf9 100644
--- a/sc/source/filter/xml/XMLExportDDELinks.hxx
+++ b/sc/source/filter/xml/XMLExportDDELinks.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,3 +51,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx
index de39b168524a..0bfdafc4d566 100644
--- a/sc/source/filter/xml/XMLExportDataPilot.cxx
+++ b/sc/source/filter/xml/XMLExportDataPilot.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -899,3 +900,5 @@ void ScXMLExportDataPilot::WriteDataPilots(const uno::Reference <sheet::XSpreads
}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLExportDataPilot.hxx b/sc/source/filter/xml/XMLExportDataPilot.hxx
index 600d96aa1d73..c1b9426f552d 100644
--- a/sc/source/filter/xml/XMLExportDataPilot.hxx
+++ b/sc/source/filter/xml/XMLExportDataPilot.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -78,3 +79,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
index 3c7ee76c41e8..530ea31e47c7 100644
--- a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
+++ b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -697,3 +698,5 @@ void ScXMLExportDatabaseRanges::WriteDatabaseRanges(const com::sun::star::uno::R
}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.hxx b/sc/source/filter/xml/XMLExportDatabaseRanges.hxx
index a581eb1271f1..31b27c4c87d2 100644
--- a/sc/source/filter/xml/XMLExportDatabaseRanges.hxx
+++ b/sc/source/filter/xml/XMLExportDatabaseRanges.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,3 +61,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLExportIterator.cxx b/sc/source/filter/xml/XMLExportIterator.cxx
index 154fdebed95e..57b2534ed6ad 100644
--- a/sc/source/filter/xml/XMLExportIterator.cxx
+++ b/sc/source/filter/xml/XMLExportIterator.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -890,3 +891,4 @@ sal_Bool ScMyNotEmptyCellsIterator::GetNext(ScMyCell& aCell, ScFormatRangeStyles
return bFoundCell;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLExportIterator.hxx b/sc/source/filter/xml/XMLExportIterator.hxx
index dfd3a4d59ac1..1334e42c3e5c 100644
--- a/sc/source/filter/xml/XMLExportIterator.hxx
+++ b/sc/source/filter/xml/XMLExportIterator.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -411,3 +412,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLExportSharedData.cxx b/sc/source/filter/xml/XMLExportSharedData.cxx
index eede3aa73499..a3e4d3ae80b5 100644
--- a/sc/source/filter/xml/XMLExportSharedData.cxx
+++ b/sc/source/filter/xml/XMLExportSharedData.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -161,3 +162,5 @@ void ScMySharedData::SortNoteShapes()
if (pNoteShapes)
pNoteShapes->Sort();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLExportSharedData.hxx b/sc/source/filter/xml/XMLExportSharedData.hxx
index e808101805fd..7337cbbc27e7 100644
--- a/sc/source/filter/xml/XMLExportSharedData.hxx
+++ b/sc/source/filter/xml/XMLExportSharedData.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -88,3 +89,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index 66f3ea613a3a..79c0d24eb1f8 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1265,3 +1266,5 @@ rtl::OUString* ScRowStyles::GetStyleName(const sal_Int32 nTable, const sal_Int32
{
return GetStyleNameByIndex(GetStyleNameIndex(nTable, nField));
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.hxx b/sc/source/filter/xml/XMLStylesExportHelper.hxx
index 79b19b7ce9ab..405dedf9f26b 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.hxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -292,3 +293,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLStylesImportHelper.cxx b/sc/source/filter/xml/XMLStylesImportHelper.cxx
index 3bbff0c320c2..3a4ea8384539 100644
--- a/sc/source/filter/xml/XMLStylesImportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesImportHelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -176,8 +177,8 @@ void ScMyStyleRanges::AddRange(const ScRange& rRange,
}
void ScMyStyleRanges::AddCurrencyRange(const ScRange& rRange,
- const rtl::OUString* pStyleName, const rtl::OUString* pCurrency,
- ScXMLImport& rImport, const sal_uInt32 nMaxRanges)
+ const rtl::OUString* /*pStyleName*/, const rtl::OUString* pCurrency,
+ ScXMLImport& /*rImport*/, const sal_uInt32 /*nMaxRanges*/)
{
if (!pCurrencyList)
pCurrencyList = new ScMyCurrencyStylesSet();
@@ -198,7 +199,7 @@ void ScMyStyleRanges::AddCurrencyRange(const ScRange& rRange,
aItr->mpRanges->addRange(rRange);
}
-void ScMyStyleRanges::InsertRow(const sal_Int32 nRow, const sal_Int32 nTab, ScDocument* pDoc)
+void ScMyStyleRanges::InsertRow(const sal_Int32 nRow, const sal_Int32 nTab, ScDocument* /*pDoc*/)
{
if (mpTextList)
mpTextList->insertRow(static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab));
@@ -227,7 +228,7 @@ void ScMyStyleRanges::InsertRow(const sal_Int32 nRow, const sal_Int32 nTab, ScDo
}
}
-void ScMyStyleRanges::InsertCol(const sal_Int32 nCol, const sal_Int32 nTab, ScDocument* pDoc)
+void ScMyStyleRanges::InsertCol(const sal_Int32 nCol, const sal_Int32 nTab, ScDocument* /*pDoc*/)
{
if (mpTextList)
mpTextList->insertCol(static_cast<SCCOL>(nCol), static_cast<SCTAB>(nTab));
@@ -625,3 +626,4 @@ void ScMyStylesImportHelper::SetStylesToRanges()
nMaxRanges = 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLStylesImportHelper.hxx b/sc/source/filter/xml/XMLStylesImportHelper.hxx
index a53fa46d768a..2c39d4eacf12 100644
--- a/sc/source/filter/xml/XMLStylesImportHelper.hxx
+++ b/sc/source/filter/xml/XMLStylesImportHelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -199,3 +200,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx b/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx
index fb0b1235007e..ec79d21aba40 100644
--- a/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx
+++ b/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,6 +45,7 @@ using namespace ::com::sun::star::text;
using namespace ::com::sun::star::beans;
using namespace xmloff::token;
+using rtl::OUString;
TYPEINIT1( XMLTableHeaderFooterContext, SvXMLImportContext );
@@ -266,3 +268,5 @@ void XMLHeaderFooterRegionContext::EndElement()
if (xOldTextCursor.is())
GetImport().GetTextImport()->SetCursor(xOldTextCursor);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLTableHeaderFooterContext.hxx b/sc/source/filter/xml/XMLTableHeaderFooterContext.hxx
index a3ce9c4c970d..eecedc746b3e 100644
--- a/sc/source/filter/xml/XMLTableHeaderFooterContext.hxx
+++ b/sc/source/filter/xml/XMLTableHeaderFooterContext.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -112,3 +113,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLTableMasterPageExport.cxx b/sc/source/filter/xml/XMLTableMasterPageExport.cxx
index 91f27ab646a7..aeb0444ae2a5 100644
--- a/sc/source/filter/xml/XMLTableMasterPageExport.cxx
+++ b/sc/source/filter/xml/XMLTableMasterPageExport.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -176,3 +177,4 @@ void XMLTableMasterPageExport::exportMasterPageContent(
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLTableMasterPageExport.hxx b/sc/source/filter/xml/XMLTableMasterPageExport.hxx
index 0a277bec0bb9..33327ee3b90d 100644
--- a/sc/source/filter/xml/XMLTableMasterPageExport.hxx
+++ b/sc/source/filter/xml/XMLTableMasterPageExport.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -64,3 +65,4 @@ public:
#endif // _XMLOFF_XMLTABLEMASTERPAGEEXPORT_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
index cc425e0f4d65..9ddc5ede06a5 100644
--- a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
+++ b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,6 +51,8 @@ using namespace ::com::sun::star;
using namespace xmloff::token;
using ::rtl::OUString;
+using rtl::OUString;
+
XMLTableShapeImportHelper::XMLTableShapeImportHelper(
ScXMLImport& rImp, SvXMLImportPropertyMapper *pImpMapper ) :
XMLShapeImportHelper(rImp, rImp.GetModel(), pImpMapper ),
@@ -213,3 +216,5 @@ void XMLTableShapeImportHelper::finishShape(
static_cast<ScXMLImport&>(mrImporter).UnlockSolarMutex();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLTableShapeImportHelper.hxx b/sc/source/filter/xml/XMLTableShapeImportHelper.hxx
index 94a64312c8ed..fb40daa82756 100644
--- a/sc/source/filter/xml/XMLTableShapeImportHelper.hxx
+++ b/sc/source/filter/xml/XMLTableShapeImportHelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,3 +61,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLTableShapeResizer.cxx b/sc/source/filter/xml/XMLTableShapeResizer.cxx
index 415057c219f2..23e72c369267 100644
--- a/sc/source/filter/xml/XMLTableShapeResizer.cxx
+++ b/sc/source/filter/xml/XMLTableShapeResizer.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -383,3 +384,5 @@ void ScMyShapeResizer::ResizeShapes()
}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLTableShapeResizer.hxx b/sc/source/filter/xml/XMLTableShapeResizer.hxx
index 9ece92995101..6372f50be673 100644
--- a/sc/source/filter/xml/XMLTableShapeResizer.hxx
+++ b/sc/source/filter/xml/XMLTableShapeResizer.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -79,3 +80,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLTableShapesContext.cxx b/sc/source/filter/xml/XMLTableShapesContext.cxx
index d841e1c4c748..2421bb785870 100644
--- a/sc/source/filter/xml/XMLTableShapesContext.cxx
+++ b/sc/source/filter/xml/XMLTableShapesContext.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -85,3 +86,4 @@ void ScXMLTableShapesContext::EndElement()
{
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLTableShapesContext.hxx b/sc/source/filter/xml/XMLTableShapesContext.hxx
index f12cb56d30da..168e7538ed0f 100644
--- a/sc/source/filter/xml/XMLTableShapesContext.hxx
+++ b/sc/source/filter/xml/XMLTableShapesContext.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,3 +54,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLTableSourceContext.cxx b/sc/source/filter/xml/XMLTableSourceContext.cxx
index 00f5c9184a53..9cc6d9a7090a 100644
--- a/sc/source/filter/xml/XMLTableSourceContext.cxx
+++ b/sc/source/filter/xml/XMLTableSourceContext.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -144,3 +145,4 @@ void ScXMLTableSourceContext::EndElement()
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLTableSourceContext.hxx b/sc/source/filter/xml/XMLTableSourceContext.hxx
index 2d72a4a3364c..00985a721bb1 100644
--- a/sc/source/filter/xml/XMLTableSourceContext.hxx
+++ b/sc/source/filter/xml/XMLTableSourceContext.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -61,3 +62,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLTextPContext.cxx b/sc/source/filter/xml/XMLTextPContext.cxx
index d6d02567b9bd..724a87a65626 100644
--- a/sc/source/filter/xml/XMLTextPContext.cxx
+++ b/sc/source/filter/xml/XMLTextPContext.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -222,3 +223,4 @@ void ScXMLTextPContext::EndElement()
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLTextPContext.hxx b/sc/source/filter/xml/XMLTextPContext.hxx
index a920e13f84a3..e2f3e9446b2e 100644
--- a/sc/source/filter/xml/XMLTextPContext.hxx
+++ b/sc/source/filter/xml/XMLTextPContext.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -70,3 +71,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLTrackedChangesContext.cxx b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
index cf415142213a..86a5f4a88a81 100644
--- a/sc/source/filter/xml/XMLTrackedChangesContext.cxx
+++ b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,6 +48,8 @@ using rtl::OUString;
using namespace com::sun::star;
using namespace xmloff::token;
+using rtl::OUString;
+
//-----------------------------------------------------------------------------
class ScXMLChangeInfoContext : public SvXMLImportContext
@@ -2023,3 +2026,4 @@ void ScXMLRejectionContext::EndElement()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/XMLTrackedChangesContext.hxx b/sc/source/filter/xml/XMLTrackedChangesContext.hxx
index ec66fe7f22e7..82753f25e5c0 100644
--- a/sc/source/filter/xml/XMLTrackedChangesContext.hxx
+++ b/sc/source/filter/xml/XMLTrackedChangesContext.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,3 +61,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/makefile.mk b/sc/source/filter/xml/makefile.mk
index 7f9f2d529a90..47d428157993 100644
--- a/sc/source/filter/xml/makefile.mk
+++ b/sc/source/filter/xml/makefile.mk
@@ -40,9 +40,7 @@ PROJECTPCHSOURCE=..\pch\filt_pch
# --- Settings -----------------------------------------------------
-.INCLUDE : scpre.mk
.INCLUDE : settings.mk
-.INCLUDE : sc.mk
.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files --------------------------------------------------------
diff --git a/sc/source/filter/xml/sheetdata.cxx b/sc/source/filter/xml/sheetdata.cxx
index 947c1370fa4b..9f35e99f5326 100644
--- a/sc/source/filter/xml/sheetdata.cxx
+++ b/sc/source/filter/xml/sheetdata.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -208,7 +209,7 @@ void ScSheetSaveData::StoreLoadedNamespaces( const SvXMLNamespaceMap& rNamespace
// ignore the initial namespaces
if ( maInitialPrefixes.find( aIter->first ) == maInitialPrefixes.end() )
{
- const NameSpaceEntry& rEntry = aIter->second.getBody();
+ const NameSpaceEntry& rEntry = *(aIter->second);
maLoadedNamespaces.push_back( ScLoadedNamespaceEntry( rEntry.sPrefix, rEntry.sName, rEntry.nKey ) );
}
++aIter;
@@ -281,3 +282,4 @@ void ScSheetSaveData::SetInSupportedSave( bool bSet )
mbInSupportedSave = bSet;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlannoi.cxx b/sc/source/filter/xml/xmlannoi.cxx
index 8db7a554256c..6fcb70393eec 100644
--- a/sc/source/filter/xml/xmlannoi.cxx
+++ b/sc/source/filter/xml/xmlannoi.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -219,3 +220,4 @@ void ScXMLAnnotationContext::AddContentStyle( sal_uInt16 nFamily, const rtl::OUS
mrAnnotationData.maContentStyles.push_back( ScXMLAnnotationStyleEntry( nFamily, rName, rSelection ) );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlannoi.hxx b/sc/source/filter/xml/xmlannoi.hxx
index ad2eed21b23a..de0f61e9820e 100644
--- a/sc/source/filter/xml/xmlannoi.hxx
+++ b/sc/source/filter/xml/xmlannoi.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -120,3 +121,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlbodyi.cxx b/sc/source/filter/xml/xmlbodyi.cxx
index a00f56e7d718..7f92f82aa1a6 100644
--- a/sc/source/filter/xml/xmlbodyi.cxx
+++ b/sc/source/filter/xml/xmlbodyi.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -287,42 +288,6 @@ void ScXMLBodyContext::EndElement()
if (pChangeTrackingImportHelper)
pChangeTrackingImportHelper->CreateChangeTrack(GetScImport().GetDocument());
-#if 0
- // #i57869# table styles are applied before the contents now
-
- std::vector<rtl::OUString> aTableStyleNames(GetScImport().GetTableStyle());
- uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( GetScImport().GetModel(), uno::UNO_QUERY );
- if ( xSpreadDoc.is() && !aTableStyleNames.empty())
- {
- uno::Reference <container::XIndexAccess> xIndex( xSpreadDoc->getSheets(), uno::UNO_QUERY );
- if ( xIndex.is() )
- {
- sal_Int32 nTableCount = xIndex->getCount();
- sal_Int32 nSize(aTableStyleNames.size());
- DBG_ASSERT(nTableCount == nSize, "every table should have a style name");
- for(sal_uInt32 i = 0; i < nTableCount; i++)
- {
- if (i < nSize)
- {
- uno::Reference <beans::XPropertySet> xProperties(xIndex->getByIndex(i), uno::UNO_QUERY);
- if (xProperties.is())
- {
- rtl::OUString sTableStyleName(aTableStyleNames[i]);
- XMLTableStylesContext *pStyles = (XMLTableStylesContext *)GetScImport().GetAutoStyles();
- if ( pStyles && sTableStyleName.getLength() )
- {
- XMLTableStyleContext* pStyle = (XMLTableStyleContext *)pStyles->FindStyleChildContext(
- XML_STYLE_FAMILY_TABLE_TABLE, sTableStyleName, sal_True);
- if (pStyle)
- pStyle->FillPropertySet(xProperties);
- }
- }
- }
- }
- }
- }
-#endif
-
// #i37959# handle document protection after the sheet settings
if (bProtected)
{
@@ -342,3 +307,4 @@ void ScXMLBodyContext::EndElement()
GetScImport().UnlockSolarMutex();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlbodyi.hxx b/sc/source/filter/xml/xmlbodyi.hxx
index 33cd0f3e7add..7e643221b934 100644
--- a/sc/source/filter/xml/xmlbodyi.hxx
+++ b/sc/source/filter/xml/xmlbodyi.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,3 +64,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index ae5a7bcebe66..cc3588a3c249 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -96,6 +97,8 @@
using namespace com::sun::star;
using namespace xmloff::token;
+using rtl::OUString;
+
//------------------------------------------------------------------
ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport,
@@ -1125,3 +1128,5 @@ void ScXMLTableRowCellContext::EndElement()
nMergedRows = 1;
nCellsRepeated = 1;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlcelli.hxx b/sc/source/filter/xml/xmlcelli.hxx
index 6a63e785f959..7bfe5c932796 100644
--- a/sc/source/filter/xml/xmlcelli.hxx
+++ b/sc/source/filter/xml/xmlcelli.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -128,3 +129,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlcoli.cxx b/sc/source/filter/xml/xmlcoli.cxx
index 6ea5b0192ab2..4b05c89dc4e2 100644
--- a/sc/source/filter/xml/xmlcoli.cxx
+++ b/sc/source/filter/xml/xmlcoli.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -331,3 +332,5 @@ void ScXMLTableColsContext::EndElement()
}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlcoli.hxx b/sc/source/filter/xml/xmlcoli.hxx
index 2edb496b4b28..295f1ba41278 100644
--- a/sc/source/filter/xml/xmlcoli.hxx
+++ b/sc/source/filter/xml/xmlcoli.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -91,3 +92,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlconti.cxx b/sc/source/filter/xml/xmlconti.cxx
index 3a0f5ef3126e..dfb34beab24c 100644
--- a/sc/source/filter/xml/xmlconti.cxx
+++ b/sc/source/filter/xml/xmlconti.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -105,3 +106,5 @@ void ScXMLContentContext::EndElement()
{
sValue.append(sOUText);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlconti.hxx b/sc/source/filter/xml/xmlconti.hxx
index 83151a934d48..ffde3d98e51a 100644
--- a/sc/source/filter/xml/xmlconti.hxx
+++ b/sc/source/filter/xml/xmlconti.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -61,3 +62,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlcvali.cxx b/sc/source/filter/xml/xmlcvali.cxx
index 451b085afe9e..40f1a00000a0 100644
--- a/sc/source/filter/xml/xmlcvali.cxx
+++ b/sc/source/filter/xml/xmlcvali.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -694,3 +695,5 @@ void ScXMLErrorMacroContext::EndElement()
{
pValidationContext->SetErrorMacro( bExecute );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlcvali.hxx b/sc/source/filter/xml/xmlcvali.hxx
index 226d2e2d91b5..2328a0ff7844 100644
--- a/sc/source/filter/xml/xmlcvali.hxx
+++ b/sc/source/filter/xml/xmlcvali.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,3 +60,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmldpimp.cxx b/sc/source/filter/xml/xmldpimp.cxx
index 855fbcfefdf1..3f1af06fd309 100644
--- a/sc/source/filter/xml/xmldpimp.cxx
+++ b/sc/source/filter/xml/xmldpimp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,6 +66,8 @@ using ::com::sun::star::uno::Reference;
using ::com::sun::star::xml::sax::XAttributeList;
using ::rtl::OUString;
+using rtl::OUString;
+
//------------------------------------------------------------------
ScXMLDataPilotTablesContext::ScXMLDataPilotTablesContext( ScXMLImport& rImport,
@@ -1838,3 +1841,5 @@ void ScXMLDataPilotGroupMemberContext::EndElement()
if (sName.getLength())
pDataPilotGroup->AddMember(sName);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmldpimp.hxx b/sc/source/filter/xml/xmldpimp.hxx
index 27643c9e596a..554853ff78ff 100644
--- a/sc/source/filter/xml/xmldpimp.hxx
+++ b/sc/source/filter/xml/xmldpimp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -692,3 +693,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmldrani.cxx b/sc/source/filter/xml/xmldrani.cxx
index c5731dfc28fb..33c19be9a824 100644
--- a/sc/source/filter/xml/xmldrani.cxx
+++ b/sc/source/filter/xml/xmldrani.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -989,3 +990,4 @@ void ScXMLSubTotalFieldContext::EndElement()
pSubTotalRuleContext->AddSubTotalColumn(aSubTotalColumn);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmldrani.hxx b/sc/source/filter/xml/xmldrani.hxx
index e170c9eb84c0..7d2d5b2292eb 100644
--- a/sc/source/filter/xml/xmldrani.hxx
+++ b/sc/source/filter/xml/xmldrani.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -360,3 +361,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 6a72dfbc60fb..2f31b209d375 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,7 +58,6 @@
#include "docuno.hxx"
#include "textuno.hxx"
#include "chartlis.hxx"
-#include "unoguard.hxx"
#include "scitems.hxx"
#include "docpool.hxx"
#include "userdat.hxx"
@@ -3204,7 +3204,34 @@ void ScXMLExport::ExportShape(const uno::Reference < drawing::XShape >& xShape,
}
}
if (!bIsChart)
+ {
+ // #i66550 HLINK_FOR_SHAPES
+ rtl::OUString sHlink;
+ uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY );
+ if ( xProps.is() )
+ xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_HYPERLINK ) ) ) >>= sHlink;
+
+ std::auto_ptr< SvXMLElementExport > pDrawA;
+ // enlose shapes with <draw:a> element only if sHlink contains something
+ if ( sHlink.getLength() > 0 )
+ {
+ // need to get delete the attributes that are pre-loaded
+ // for the shape export ( otherwise they will become
+ // attributes of the draw:a element ) This *shouldn't*
+ // affect performance adversely as there are only a
+ // couple of attributes involved
+ uno::Reference< xml::sax::XAttributeList > xSaveAttribs( new SvXMLAttributeList( GetAttrList() ) );
+ ClearAttrList();
+ // Add Hlink
+ AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
+ AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, sHlink);
+ pDrawA.reset( new SvXMLElementExport( *this, XML_NAMESPACE_DRAW, XML_A, sal_False, sal_False ) );
+ // Attribute list has been cleared by previous operation
+ // re-add pre-loaded attributes
+ AddAttributeList( xSaveAttribs );
+ }
GetShapeExport()->exportShape(xShape, SEF_DEFAULT, pPoint);
+ }
IncrementProgressBar(sal_False);
}
@@ -4431,7 +4458,7 @@ sal_uInt32 ScXMLExport::exportDoc( enum XMLTokenEnum eClass )
void SAL_CALL ScXMLExport::setSourceDocument( const uno::Reference<lang::XComponent>& xComponent )
throw(lang::IllegalArgumentException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
SvXMLExport::setSourceDocument( xComponent );
pDoc = ScXMLConverter::GetScDocument( GetModel() );
@@ -4461,7 +4488,7 @@ void SAL_CALL ScXMLExport::setSourceDocument( const uno::Reference<lang::XCompon
sal_Bool SAL_CALL ScXMLExport::filter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
throw(::com::sun::star::uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDoc)
pDoc->DisableIdle(TRUE);
sal_Bool bReturn(SvXMLExport::filter(aDescriptor));
@@ -4473,7 +4500,7 @@ sal_Bool SAL_CALL ScXMLExport::filter( const ::com::sun::star::uno::Sequence< ::
void SAL_CALL ScXMLExport::cancel()
throw(::com::sun::star::uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDoc)
pDoc->DisableIdle(FALSE);
SvXMLExport::cancel();
@@ -4483,7 +4510,7 @@ void SAL_CALL ScXMLExport::cancel()
void SAL_CALL ScXMLExport::initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
SvXMLExport::initialize(aArguments);
}
@@ -4491,7 +4518,7 @@ void SAL_CALL ScXMLExport::initialize( const ::com::sun::star::uno::Sequence< ::
::rtl::OUString SAL_CALL ScXMLExport::getImplementationName( )
throw(::com::sun::star::uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
sal_uInt16 nFlags = getExportFlags();
if (nFlags & EXPORT_OASIS)
@@ -4539,14 +4566,14 @@ void SAL_CALL ScXMLExport::initialize( const ::com::sun::star::uno::Sequence< ::
sal_Bool SAL_CALL ScXMLExport::supportsService( const ::rtl::OUString& ServiceName )
throw(::com::sun::star::uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return SvXMLExport::supportsService( ServiceName );
}
::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL ScXMLExport::getSupportedServiceNames( )
throw(::com::sun::star::uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return SvXMLExport::getSupportedServiceNames();
}
@@ -4554,7 +4581,7 @@ sal_Bool SAL_CALL ScXMLExport::supportsService( const ::rtl::OUString& ServiceNa
sal_Int64 SAL_CALL ScXMLExport::getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier )
throw(::com::sun::star::uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return SvXMLExport::getSomething(aIdentifier);
}
@@ -4565,3 +4592,4 @@ void ScXMLExport::DisposingModel()
xCurrentTable = 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlexprt.hxx b/sc/source/filter/xml/xmlexprt.hxx
index ed9ce4d2fe78..07b494dce2af 100644
--- a/sc/source/filter/xml/xmlexprt.hxx
+++ b/sc/source/filter/xml/xmlexprt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -280,3 +281,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlexternaltabi.cxx b/sc/source/filter/xml/xmlexternaltabi.cxx
index 083a73d81872..73c00cdc136b 100644
--- a/sc/source/filter/xml/xmlexternaltabi.cxx
+++ b/sc/source/filter/xml/xmlexternaltabi.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -435,3 +436,5 @@ void ScXMLExternalRefCellTextContext::EndElement()
{
mrParent.SetCellString(maCellStrBuf.makeStringAndClear());
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlexternaltabi.hxx b/sc/source/filter/xml/xmlexternaltabi.hxx
index 6aaff181315e..065933ce8108 100644
--- a/sc/source/filter/xml/xmlexternaltabi.hxx
+++ b/sc/source/filter/xml/xmlexternaltabi.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -174,3 +175,5 @@ private:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlfilti.cxx b/sc/source/filter/xml/xmlfilti.cxx
index 55670d97637d..f30c4a87c5e7 100644
--- a/sc/source/filter/xml/xmlfilti.cxx
+++ b/sc/source/filter/xml/xmlfilti.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -783,3 +784,4 @@ void ScXMLDPConditionContext::EndElement()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlfilti.hxx b/sc/source/filter/xml/xmlfilti.hxx
index df222eeb23c2..7bd5c1f331d3 100644
--- a/sc/source/filter/xml/xmlfilti.hxx
+++ b/sc/source/filter/xml/xmlfilti.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -308,3 +309,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlfonte.cxx b/sc/source/filter/xml/xmlfonte.cxx
index 5cbb2604581f..ec9715c7131a 100644
--- a/sc/source/filter/xml/xmlfonte.cxx
+++ b/sc/source/filter/xml/xmlfonte.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -150,3 +151,5 @@ XMLFontAutoStylePool* ScXMLExport::CreateFontAutoStylePool()
{
return new ScXMLFontAutoStylePool_Impl( *this );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index fa1a99cb78b6..c1a984dbf080 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,6 +32,7 @@
// INCLUDE ---------------------------------------------------------------
#include <svl/zforlist.hxx>
+#include <sal/macros.h>
#include <xmloff/nmspmap.hxx>
#include <xmloff/xmlnmspe.hxx>
@@ -58,7 +60,6 @@
#include "nameuno.hxx"
#include "xmlbodyi.hxx"
#include "xmlstyli.hxx"
-#include "unoguard.hxx"
#include "ViewSettingsSequenceDefines.hxx"
#include "patattr.hxx"
@@ -107,6 +108,8 @@ using namespace ::xmloff::token;
using namespace ::formula;
using ::rtl::OUString;
+using rtl::OUString;
+
OUString SAL_CALL ScXMLImport_getImplementationName() throw()
{
return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Calc.XMLOasisImporter" ) );
@@ -1740,7 +1743,7 @@ ScXMLImport::ScXMLImport(
pMyLabelRanges(NULL),
pValidations(NULL),
pDetectiveOpArray(NULL),
- pScUnoGuard(NULL),
+ pSolarMutexGuard(NULL),
pNumberFormatAttributesExportHelper(NULL),
pStyleNumberFormats(NULL),
sPrevStyleName(),
@@ -1781,7 +1784,7 @@ ScXMLImport::ScXMLImport(
{ XML_CURRENCY, util::NumberFormat::CURRENCY },
{ XML_BOOLEAN, util::NumberFormat::LOGICAL }
};
- size_t n = sizeof(aCellTypePairs)/sizeof(aCellTypePairs[0]);
+ size_t n = SAL_N_ELEMENTS(aCellTypePairs);
for (size_t i = 0; i < n; ++i)
{
aCellTypeMap.insert(
@@ -1871,8 +1874,8 @@ ScXMLImport::~ScXMLImport() throw()
if (pStylesImportHelper)
delete pStylesImportHelper;
- if (pScUnoGuard)
- delete pScUnoGuard;
+ if (pSolarMutexGuard)
+ delete pSolarMutexGuard;
if (pMyNamedExpressions)
delete pMyNamedExpressions;
@@ -2912,7 +2915,7 @@ void ScXMLImport::DisposingModel()
void ScXMLImport::LockSolarMutex()
{
// #i62677# When called from DocShell/Wrapper, the SolarMutex is already locked,
- // so there's no need to allocate (and later delete) the ScUnoGuard.
+ // so there's no need to allocate (and later delete) the SolarMutexGuard.
if (bFromWrapper)
{
DBG_TESTSOLARMUTEX();
@@ -2921,8 +2924,8 @@ void ScXMLImport::LockSolarMutex()
if (nSolarMutexLocked == 0)
{
- DBG_ASSERT(!pScUnoGuard, "Solar Mutex is locked");
- pScUnoGuard = new ScUnoGuard();
+ DBG_ASSERT(!pSolarMutexGuard, "Solar Mutex is locked");
+ pSolarMutexGuard = new SolarMutexGuard();
}
++nSolarMutexLocked;
}
@@ -2935,9 +2938,9 @@ void ScXMLImport::UnlockSolarMutex()
nSolarMutexLocked--;
if (nSolarMutexLocked == 0)
{
- DBG_ASSERT(pScUnoGuard, "Solar Mutex is always unlocked");
- delete pScUnoGuard;
- pScUnoGuard = NULL;
+ DBG_ASSERT(pSolarMutexGuard, "Solar Mutex is always unlocked");
+ delete pSolarMutexGuard;
+ pSolarMutexGuard = NULL;
}
}
}
@@ -3068,3 +3071,4 @@ void ScXMLImport::ExtractFormulaNamespaceGrammar(
reGrammar = eDefaultGrammar;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlimprt.hxx b/sc/source/filter/xml/xmlimprt.hxx
index e3d9d9378213..49e89406d8eb 100644
--- a/sc/source/filter/xml/xmlimprt.hxx
+++ b/sc/source/filter/xml/xmlimprt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -609,7 +610,7 @@ class SfxItemSet;
class SvXMLNumFmtHelper;
class XMLShapeImportHelper;
class ScXMLChangeTrackingImportHelper;
-class ScUnoGuard;
+class SolarMutexGuard;
struct tScMyCellRange
{
@@ -767,7 +768,7 @@ class ScXMLImport: public SvXMLImport
ScMyLabelRanges* pMyLabelRanges;
ScMyImportValidations* pValidations;
ScMyImpDetectiveOpArray* pDetectiveOpArray;
- ScUnoGuard* pScUnoGuard;
+ SolarMutexGuard* pSolarMutexGuard;
std::vector<rtl::OUString> aTableStyles;
XMLNumberFormatAttributesExportHelper* pNumberFormatAttributesExportHelper;
@@ -1055,3 +1056,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmllabri.cxx b/sc/source/filter/xml/xmllabri.cxx
index 70ec803cc46f..777190445f6e 100644
--- a/sc/source/filter/xml/xmllabri.cxx
+++ b/sc/source/filter/xml/xmllabri.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -143,3 +144,4 @@ void ScXMLLabelRangeContext::EndElement()
GetScImport().AddLabelRange(pLabelRange);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmllabri.hxx b/sc/source/filter/xml/xmllabri.hxx
index c3cbd6532c90..2876da98b871 100644
--- a/sc/source/filter/xml/xmllabri.hxx
+++ b/sc/source/filter/xml/xmllabri.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -88,3 +89,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlnexpi.cxx b/sc/source/filter/xml/xmlnexpi.cxx
index 3ef17c321f23..4d81085bcdfd 100644
--- a/sc/source/filter/xml/xmlnexpi.cxx
+++ b/sc/source/filter/xml/xmlnexpi.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -248,3 +249,4 @@ void ScXMLNamedExpressionContext::EndElement()
{
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlnexpi.hxx b/sc/source/filter/xml/xmlnexpi.hxx
index 94d0b2738d52..2e66030d44c5 100644
--- a/sc/source/filter/xml/xmlnexpi.hxx
+++ b/sc/source/filter/xml/xmlnexpi.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -99,3 +100,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlrowi.cxx b/sc/source/filter/xml/xmlrowi.cxx
index 341445431cc8..b1daf5d18575 100644
--- a/sc/source/filter/xml/xmlrowi.cxx
+++ b/sc/source/filter/xml/xmlrowi.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -358,3 +359,5 @@ void ScXMLTableRowsContext::EndElement()
}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlrowi.hxx b/sc/source/filter/xml/xmlrowi.hxx
index 558555b233e3..f72618d0e9ef 100644
--- a/sc/source/filter/xml/xmlrowi.hxx
+++ b/sc/source/filter/xml/xmlrowi.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -91,3 +92,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlsceni.cxx b/sc/source/filter/xml/xmlsceni.cxx
index 652dd0a1dd43..3235941af5b2 100644
--- a/sc/source/filter/xml/xmlsceni.cxx
+++ b/sc/source/filter/xml/xmlsceni.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -49,6 +50,8 @@ using namespace com::sun::star;
using namespace xmloff::token;
using ::rtl::OUString;
+using rtl::OUString;
+
//------------------------------------------------------------------
ScXMLTableScenarioContext::ScXMLTableScenarioContext(
@@ -171,3 +174,4 @@ void ScXMLTableScenarioContext::EndElement()
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlsceni.hxx b/sc/source/filter/xml/xmlsceni.hxx
index f3a5a75fa563..bec95988d72d 100644
--- a/sc/source/filter/xml/xmlsceni.hxx
+++ b/sc/source/filter/xml/xmlsceni.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -68,3 +69,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlsorti.cxx b/sc/source/filter/xml/xmlsorti.cxx
index ff007240b12b..bf1f0427854d 100644
--- a/sc/source/filter/xml/xmlsorti.cxx
+++ b/sc/source/filter/xml/xmlsorti.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -277,3 +278,4 @@ void ScXMLSortByContext::EndElement()
pSortContext->AddSortField(sFieldNumber, sDataType, sOrder);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlsorti.hxx b/sc/source/filter/xml/xmlsorti.hxx
index 30ac31e0dd22..27ec77c89226 100644
--- a/sc/source/filter/xml/xmlsorti.hxx
+++ b/sc/source/filter/xml/xmlsorti.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -104,3 +105,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlstyle.cxx b/sc/source/filter/xml/xmlstyle.cxx
index bd48092f33f5..f686ed36bf9b 100644
--- a/sc/source/filter/xml/xmlstyle.cxx
+++ b/sc/source/filter/xml/xmlstyle.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1975,3 +1976,5 @@ sal_Bool XmlScPropHdl_Vertical::exportXML(
return bRetval;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlstyle.hxx b/sc/source/filter/xml/xmlstyle.hxx
index 8909ccb14bf7..07a4d307a2c3 100644
--- a/sc/source/filter/xml/xmlstyle.hxx
+++ b/sc/source/filter/xml/xmlstyle.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -358,3 +359,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx
index 9114c3c5707b..ffecefb2d653 100644
--- a/sc/source/filter/xml/xmlstyli.cxx
+++ b/sc/source/filter/xml/xmlstyli.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -77,6 +78,9 @@ using namespace xmloff::token;
//using namespace ::com::sun::star::text;
using namespace ::formula;
+using rtl::OUString;
+using com::sun::star::uno::Reference;
+
ScXMLCellImportPropertyMapper::ScXMLCellImportPropertyMapper(
const UniReference< XMLPropertySetMapper >& rMapper,
SvXMLImport& rImportP) :
@@ -1087,3 +1091,4 @@ void ScCellTextStyleContext::FillPropertySet( const uno::Reference<beans::XPrope
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlstyli.hxx b/sc/source/filter/xml/xmlstyli.hxx
index b2a8589f5524..f483e7734f25 100644
--- a/sc/source/filter/xml/xmlstyli.hxx
+++ b/sc/source/filter/xml/xmlstyli.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -327,3 +328,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlsubti.cxx b/sc/source/filter/xml/xmlsubti.cxx
index 7a6bf5a411af..d3e949acabd0 100644
--- a/sc/source/filter/xml/xmlsubti.cxx
+++ b/sc/source/filter/xml/xmlsubti.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -842,3 +843,5 @@ void ScMyTables::SetMatrix(const table::CellRangeAddress& rRange, const rtl::OUS
}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlsubti.hxx b/sc/source/filter/xml/xmlsubti.hxx
index 98ef9ce4330a..6268a874d357 100644
--- a/sc/source/filter/xml/xmlsubti.hxx
+++ b/sc/source/filter/xml/xmlsubti.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -204,3 +205,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmltabi.cxx b/sc/source/filter/xml/xmltabi.cxx
index c3a766419152..01e613b1ea74 100644
--- a/sc/source/filter/xml/xmltabi.cxx
+++ b/sc/source/filter/xml/xmltabi.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -489,3 +490,5 @@ SvXMLImportContext* ScXMLTableProtectionContext::CreateChildContext(
void ScXMLTableProtectionContext::EndElement()
{
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmltabi.hxx b/sc/source/filter/xml/xmltabi.hxx
index d35cf22af14d..db60f90c0c33 100644
--- a/sc/source/filter/xml/xmltabi.hxx
+++ b/sc/source/filter/xml/xmltabi.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -98,3 +99,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index 0d7e5bcc7d11..e61cdb4927ef 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,7 +37,6 @@
#include <sfx2/docfile.hxx>
#include <sfx2/objsh.hxx>
#include <tools/debug.hxx>
-#include <vos/xception.hxx>
#include <comphelper/processfactory.hxx>
#include <unotools/streamwrap.hxx>
#include <svx/xmlgrhlp.hxx>
@@ -87,6 +87,8 @@
using namespace com::sun::star;
using ::rtl::OUString;
+using rtl::OUString;
+
// -----------------------------------------------------------------------
ScXMLImportWrapper::ScXMLImportWrapper(ScDocument& rD, SfxMedium* pM, const uno::Reference < embed::XStorage >& xStor ) :
@@ -993,3 +995,4 @@ sal_Bool ScXMLImportWrapper::Export(sal_Bool bStylesOnly)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/Accessibility/AccessibilityHints.cxx b/sc/source/ui/Accessibility/AccessibilityHints.cxx
index 6c276b806e88..d0b9d3192da6 100644
--- a/sc/source/ui/Accessibility/AccessibilityHints.cxx
+++ b/sc/source/ui/Accessibility/AccessibilityHints.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -110,3 +111,5 @@ ScAccGridWinFocusGotHint::ScAccGridWinFocusGotHint(ScSplitPos eNew,
ScAccGridWinFocusGotHint::~ScAccGridWinFocusGotHint()
{
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx
index a49ae24a970a..aaf38396ac42 100644
--- a/sc/source/ui/Accessibility/AccessibleCell.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCell.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,7 +41,6 @@
#include "document.hxx"
#include "attrib.hxx"
#include "miscuno.hxx"
-#include "unoguard.hxx"
#include "editsrc.hxx"
#include "dociter.hxx"
#include "cell.hxx"
@@ -55,6 +55,7 @@
#include <editeng/brshitem.hxx>
#include <comphelper/sequence.hxx>
#include <float.h>
+#include <vcl/svapp.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
@@ -99,7 +100,7 @@ void ScAccessibleCell::Init()
void SAL_CALL ScAccessibleCell::disposing()
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
// #100593# dispose in AccessibleStaticTextBase
Dispose();
@@ -133,7 +134,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleCell::getAccessibleAtPoint(
void SAL_CALL ScAccessibleCell::grabFocus( )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (getAccessibleParent().is() && mpViewShell)
{
@@ -226,7 +227,7 @@ uno::Reference<XAccessibleStateSet> SAL_CALL
ScAccessibleCell::getAccessibleStateSet(void)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<XAccessibleStateSet> xParentStates;
if (getAccessibleParent().is())
{
@@ -264,7 +265,7 @@ uno::Reference<XAccessibleRelationSet> SAL_CALL
ScAccessibleCell::getAccessibleRelationSet(void)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
utl::AccessibleRelationSetHelper* pRelationSet = NULL;
if (mpAccDoc)
@@ -451,3 +452,5 @@ void ScAccessibleCell::AddRelation(const ScRange& rRange,
pRelationSet->AddRelation(aRelation);
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/Accessibility/AccessibleCellBase.cxx b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
index 800b398710ae..5e59d9b09eee 100644
--- a/sc/source/ui/Accessibility/AccessibleCellBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,7 +37,6 @@
#include "document.hxx"
#include "docfunc.hxx"
#include "cell.hxx"
-#include "unoguard.hxx"
#include "scresid.hxx"
#include "sc.hrc"
#include "unonames.hxx"
@@ -50,6 +50,7 @@
#include <rtl/uuid.h>
#include <comphelper/sequence.hxx>
#include <sfx2/objsh.hxx>
+#include <vcl/svapp.hxx>
#include <float.h>
@@ -80,7 +81,7 @@ ScAccessibleCellBase::~ScAccessibleCellBase()
sal_Bool SAL_CALL ScAccessibleCellBase::isVisible( )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
// test whether the cell is hidden (column/row - hidden/filtered)
sal_Bool bVisible(sal_True);
@@ -100,7 +101,7 @@ sal_Bool SAL_CALL ScAccessibleCellBase::isVisible( )
sal_Int32 SAL_CALL ScAccessibleCellBase::getForeground()
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
sal_Int32 nColor(0);
if (mpDoc)
@@ -140,7 +141,7 @@ sal_Int32 SAL_CALL ScAccessibleCellBase::getForeground()
sal_Int32 SAL_CALL ScAccessibleCellBase::getBackground()
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
sal_Int32 nColor(0);
@@ -206,7 +207,7 @@ sal_Int32
ScAccessibleCellBase::getAccessibleIndexInParent(void)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
return mnIndex;
}
@@ -243,7 +244,7 @@ uno::Any SAL_CALL
ScAccessibleCellBase::getCurrentValue( )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
uno::Any aAny;
if (mpDoc)
@@ -256,7 +257,7 @@ sal_Bool SAL_CALL
ScAccessibleCellBase::setCurrentValue( const uno::Any& aNumber )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
double fValue = 0;
sal_Bool bResult(sal_False);
@@ -318,7 +319,7 @@ uno::Sequence<sal_Int8> SAL_CALL
ScAccessibleCellBase::getImplementationId(void)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
static uno::Sequence<sal_Int8> aId;
if (aId.getLength() == 0)
@@ -337,3 +338,5 @@ sal_Bool ScAccessibleCellBase::IsEditable(
bEditable = sal_True;
return bEditable;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/Accessibility/AccessibleContextBase.cxx b/sc/source/ui/Accessibility/AccessibleContextBase.cxx
index 1d1ad0a50550..621a55ae0c18 100644
--- a/sc/source/ui/Accessibility/AccessibleContextBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleContextBase.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,6 @@
#include "AccessibleContextBase.hxx"
-#include "unoguard.hxx"
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
@@ -46,6 +46,7 @@
#include <vcl/unohelp.hxx>
#include <tools/color.hxx>
#include <comphelper/accessibleeventnotifier.hxx>
+#include <vcl/svapp.hxx>
using namespace ::rtl;
using namespace ::com::sun::star;
@@ -98,7 +99,7 @@ void ScAccessibleContextBase::Init()
void SAL_CALL ScAccessibleContextBase::disposing()
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
// CommitDefunc(); not necessary and should not be send, because it cost a lot of time
// hold reference to make sure that the destructor is not called
@@ -172,7 +173,7 @@ uno::Reference< XAccessibleContext> SAL_CALL
sal_Bool SAL_CALL ScAccessibleContextBase::containsPoint(const awt::Point& rPoint )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
return Rectangle (Point(), GetBoundingBox().GetSize()).IsInside(VCLPoint(rPoint));
}
@@ -188,7 +189,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleContextBase::getAccessibleAtP
awt::Rectangle SAL_CALL ScAccessibleContextBase::getBounds( )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
return AWTRectangle(GetBoundingBox());
}
@@ -196,7 +197,7 @@ awt::Rectangle SAL_CALL ScAccessibleContextBase::getBounds( )
awt::Point SAL_CALL ScAccessibleContextBase::getLocation( )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
return AWTPoint(GetBoundingBox().TopLeft());
}
@@ -204,7 +205,7 @@ awt::Point SAL_CALL ScAccessibleContextBase::getLocation( )
awt::Point SAL_CALL ScAccessibleContextBase::getLocationOnScreen( )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
return AWTPoint(GetBoundingBoxOnScreen().TopLeft());
}
@@ -212,7 +213,7 @@ awt::Point SAL_CALL ScAccessibleContextBase::getLocationOnScreen( )
awt::Size SAL_CALL ScAccessibleContextBase::getSize( )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
return AWTSize(GetBoundingBox().GetSize());
}
@@ -220,7 +221,7 @@ awt::Size SAL_CALL ScAccessibleContextBase::getSize( )
sal_Bool SAL_CALL ScAccessibleContextBase::isShowing( )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
sal_Bool bShowing(sal_False);
if (mxParent.is())
@@ -289,7 +290,7 @@ sal_Int32 SAL_CALL
ScAccessibleContextBase::getAccessibleIndexInParent(void)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
// Use a simple but slow solution for now. Optimize later.
// Return -1 to indicate that this object's parent does not know about the
@@ -330,7 +331,7 @@ sal_Int16 SAL_CALL
ScAccessibleContextBase::getAccessibleDescription(void)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (!msDescription.getLength())
{
@@ -357,7 +358,7 @@ OUString SAL_CALL
ScAccessibleContextBase::getAccessibleName(void)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (!msName.getLength())
{
@@ -399,7 +400,7 @@ lang::Locale SAL_CALL
throw (IllegalAccessibleComponentStateException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (mxParent.is())
{
@@ -423,7 +424,7 @@ void SAL_CALL
{
if (xListener.is())
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (!IsDefunc())
{
@@ -441,7 +442,7 @@ void SAL_CALL
{
if (xListener.is())
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (!IsDefunc() && mnClientId)
{
sal_Int32 nListenerCount = comphelper::AccessibleEventNotifier::removeEventListener( mnClientId, xListener );
@@ -464,7 +465,7 @@ void SAL_CALL ScAccessibleContextBase::disposing(
const lang::EventObject& rSource )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (rSource.Source == mxParent)
dispose();
}
@@ -527,7 +528,7 @@ uno::Sequence<sal_Int8> SAL_CALL
ScAccessibleContextBase::getImplementationId(void)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
static uno::Sequence<sal_Int8> aId;
if (aId.getLength() == 0)
@@ -622,3 +623,4 @@ void ScAccessibleContextBase::IsObjectValid() const
throw lang::DisposedException();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
index b6a48ca53316..c70aa3a5e56e 100644
--- a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,11 +53,11 @@
#include "csvgrid.hxx"
#include "AccessibleText.hxx"
#include "editsrc.hxx"
-#include "unoguard.hxx"
#include "scresid.hxx"
#include "sc.hrc"
#include "scmod.hxx"
#include <svtools/colorcfg.hxx>
+#include <vcl/svapp.hxx>
// ause
#include "editutil.hxx"
@@ -118,7 +119,7 @@ ScAccessibleCsvControl::~ScAccessibleCsvControl()
void SAL_CALL ScAccessibleCsvControl::disposing()
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
mpControl = NULL;
ScAccessibleContextBase::disposing();
}
@@ -135,14 +136,14 @@ Reference< XAccessible > SAL_CALL ScAccessibleCsvControl::getAccessibleAtPoint(
sal_Bool SAL_CALL ScAccessibleCsvControl::isVisible() throw( RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
return implGetControl().IsVisible();
}
void SAL_CALL ScAccessibleCsvControl::grabFocus() throw( RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
implGetControl().GrabFocus();
}
@@ -199,21 +200,21 @@ void ScAccessibleCsvControl::SendRemoveColumnEvent( sal_uInt32 /* nFirstColumn *
Rectangle ScAccessibleCsvControl::GetBoundingBoxOnScreen() const throw( RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
return implGetControl().GetWindowExtentsRelative( NULL );
}
Rectangle ScAccessibleCsvControl::GetBoundingBox() const throw( RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
return implGetControl().GetWindowExtentsRelative( implGetControl().GetAccessibleParentWindow() );
}
void ScAccessibleCsvControl::getUuid( Sequence< sal_Int8 >& rSeq )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
if( !rSeq.hasElements() )
{
@@ -263,7 +264,7 @@ Reference< XAccessible > ScAccessibleCsvControl::implGetChildByRole(
AccessibleStateSetHelper* ScAccessibleCsvControl::implCreateStateSet()
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
AccessibleStateSetHelper* pStateSet = new AccessibleStateSetHelper();
if( implIsAlive() )
{
@@ -389,7 +390,7 @@ ScAccessibleCsvRuler::~ScAccessibleCsvRuler()
sal_Int32 SAL_CALL ScAccessibleCsvRuler::getForeground( )
throw (RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
return implGetRuler().GetSettings().GetStyleSettings().GetLabelTextColor().GetColor();
}
@@ -397,7 +398,7 @@ sal_Int32 SAL_CALL ScAccessibleCsvRuler::getForeground( )
sal_Int32 SAL_CALL ScAccessibleCsvRuler::getBackground( )
throw (RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
return implGetRuler().GetSettings().GetStyleSettings().GetFaceColor().GetColor();
}
@@ -420,7 +421,7 @@ Reference< XAccessible > SAL_CALL ScAccessibleCsvRuler::getAccessibleChild( sal_
Reference< XAccessibleRelationSet > SAL_CALL ScAccessibleCsvRuler::getAccessibleRelationSet()
throw( RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
AccessibleRelationSetHelper* pRelationSet = new AccessibleRelationSetHelper();
Reference< XAccessible > xAccObj = implGetChildByRole( getAccessibleParent(), nGridRole );
@@ -436,7 +437,7 @@ Reference< XAccessibleRelationSet > SAL_CALL ScAccessibleCsvRuler::getAccessible
Reference< XAccessibleStateSet > SAL_CALL ScAccessibleCsvRuler::getAccessibleStateSet()
throw( RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
AccessibleStateSetHelper* pStateSet = implCreateStateSet();
if( implIsAlive() )
{
@@ -453,7 +454,7 @@ Reference< XAccessibleStateSet > SAL_CALL ScAccessibleCsvRuler::getAccessibleSta
sal_Int32 SAL_CALL ScAccessibleCsvRuler::getCaretPosition() throw( RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
return lcl_GetApiPos( implGetRuler().GetRulerCursorPos() );
}
@@ -461,7 +462,7 @@ sal_Int32 SAL_CALL ScAccessibleCsvRuler::getCaretPosition() throw( RuntimeExcept
sal_Bool SAL_CALL ScAccessibleCsvRuler::setCaretPosition( sal_Int32 nIndex )
throw( IndexOutOfBoundsException, RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
ensureValidIndex( nIndex );
ScCsvRuler& rRuler = implGetRuler();
@@ -473,7 +474,7 @@ sal_Bool SAL_CALL ScAccessibleCsvRuler::setCaretPosition( sal_Int32 nIndex )
sal_Unicode SAL_CALL ScAccessibleCsvRuler::getCharacter( sal_Int32 nIndex )
throw( IndexOutOfBoundsException, RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
ensureValidIndex( nIndex );
return maBuffer.charAt( nIndex );
@@ -483,7 +484,7 @@ Sequence< PropertyValue > SAL_CALL ScAccessibleCsvRuler::getCharacterAttributes(
const ::com::sun::star::uno::Sequence< ::rtl::OUString >& /* aRequestedAttributes */ )
throw( IndexOutOfBoundsException, RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
ensureValidIndexWithEnd( nIndex );
Sequence< PropertyValue > aSeq;
@@ -501,7 +502,7 @@ Sequence< PropertyValue > SAL_CALL ScAccessibleCsvRuler::getCharacterAttributes(
ScAccessibleCsvRuler::AwtRectangle SAL_CALL ScAccessibleCsvRuler::getCharacterBounds( sal_Int32 nIndex )
throw( IndexOutOfBoundsException, RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
ensureValidIndexWithEnd( nIndex );
ScCsvRuler& rRuler = implGetRuler();
@@ -518,7 +519,7 @@ ScAccessibleCsvRuler::AwtRectangle SAL_CALL ScAccessibleCsvRuler::getCharacterBo
sal_Int32 SAL_CALL ScAccessibleCsvRuler::getCharacterCount() throw( RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
return implGetTextLength();
}
@@ -526,7 +527,7 @@ sal_Int32 SAL_CALL ScAccessibleCsvRuler::getCharacterCount() throw( RuntimeExcep
sal_Int32 SAL_CALL ScAccessibleCsvRuler::getIndexAtPoint( const AwtPoint& rPoint )
throw( RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
ScCsvRuler& rRuler = implGetRuler();
// #107054# use object's coordinate system, convert to API position
@@ -560,7 +561,7 @@ sal_Bool SAL_CALL ScAccessibleCsvRuler::setSelection( sal_Int32 /* nStartIndex *
OUString SAL_CALL ScAccessibleCsvRuler::getText() throw( RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
return OUString( maBuffer.getStr(), implGetTextLength() );
}
@@ -568,7 +569,7 @@ OUString SAL_CALL ScAccessibleCsvRuler::getText() throw( RuntimeException )
OUString SAL_CALL ScAccessibleCsvRuler::getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex )
throw( IndexOutOfBoundsException, RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
ensureValidRange( nStartIndex, nEndIndex );
return OUString( maBuffer.getStr() + nStartIndex, nEndIndex - nStartIndex );
@@ -577,7 +578,7 @@ OUString SAL_CALL ScAccessibleCsvRuler::getTextRange( sal_Int32 nStartIndex, sal
TextSegment SAL_CALL ScAccessibleCsvRuler::getTextAtIndex( sal_Int32 nIndex, sal_Int16 nTextType )
throw( IndexOutOfBoundsException, IllegalArgumentException, RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
TextSegment aResult;
@@ -642,7 +643,7 @@ TextSegment SAL_CALL ScAccessibleCsvRuler::getTextAtIndex( sal_Int32 nIndex, sal
TextSegment SAL_CALL ScAccessibleCsvRuler::getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 nTextType )
throw( IndexOutOfBoundsException, IllegalArgumentException, RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
ensureValidIndexWithEnd( nIndex );
@@ -695,7 +696,7 @@ TextSegment SAL_CALL ScAccessibleCsvRuler::getTextBeforeIndex( sal_Int32 nIndex,
TextSegment SAL_CALL ScAccessibleCsvRuler::getTextBehindIndex( sal_Int32 nIndex, sal_Int16 nTextType )
throw( IndexOutOfBoundsException, IllegalArgumentException, RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
ensureValidIndexWithEnd( nIndex );
@@ -857,7 +858,7 @@ ScCsvRuler& ScAccessibleCsvRuler::implGetRuler() const
void ScAccessibleCsvRuler::constructStringBuffer() throw( RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
// extend existing string buffer to new ruler size
sal_Int32 nRulerCount = implGetRuler().GetPosCount();
@@ -942,7 +943,7 @@ Reference< XAccessible > SAL_CALL ScAccessibleCsvGrid::getAccessibleAtPoint( con
Reference< XAccessible > xRet;
if( containsPoint( rPoint ) )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
const ScCsvGrid& rGrid = implGetGrid();
@@ -959,7 +960,7 @@ Reference< XAccessible > SAL_CALL ScAccessibleCsvGrid::getAccessibleAtPoint( con
sal_Int32 SAL_CALL ScAccessibleCsvGrid::getForeground( )
throw (RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
return implGetGrid().GetSettings().GetStyleSettings().GetButtonTextColor().GetColor();
}
@@ -967,7 +968,7 @@ throw (RuntimeException)
sal_Int32 SAL_CALL ScAccessibleCsvGrid::getBackground( )
throw (RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
return SC_MOD()->GetColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor;
}
@@ -976,7 +977,7 @@ throw (RuntimeException)
sal_Int32 SAL_CALL ScAccessibleCsvGrid::getAccessibleChildCount() throw( RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
return implGetCellCount();
}
@@ -984,7 +985,7 @@ sal_Int32 SAL_CALL ScAccessibleCsvGrid::getAccessibleChildCount() throw( Runtime
Reference< XAccessible > SAL_CALL ScAccessibleCsvGrid::getAccessibleChild( sal_Int32 nIndex )
throw( IndexOutOfBoundsException, RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
ensureValidIndex( nIndex );
return implCreateCellObj( implGetRow( nIndex ), implGetColumn( nIndex ) );
@@ -993,7 +994,7 @@ Reference< XAccessible > SAL_CALL ScAccessibleCsvGrid::getAccessibleChild( sal_I
Reference< XAccessibleRelationSet > SAL_CALL ScAccessibleCsvGrid::getAccessibleRelationSet()
throw( RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
AccessibleRelationSetHelper* pRelationSet = new AccessibleRelationSetHelper();
Reference< XAccessible > xAccObj = implGetChildByRole( getAccessibleParent(), nRulerRole );
@@ -1009,7 +1010,7 @@ Reference< XAccessibleRelationSet > SAL_CALL ScAccessibleCsvGrid::getAccessibleR
Reference< XAccessibleStateSet > SAL_CALL ScAccessibleCsvGrid::getAccessibleStateSet()
throw( RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
AccessibleStateSetHelper* pStateSet = implCreateStateSet();
if( implIsAlive() )
{
@@ -1029,14 +1030,14 @@ Reference< XAccessibleStateSet > SAL_CALL ScAccessibleCsvGrid::getAccessibleStat
sal_Int32 SAL_CALL ScAccessibleCsvGrid::getAccessibleRowCount() throw( RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
return implGetRowCount();
}
sal_Int32 SAL_CALL ScAccessibleCsvGrid::getAccessibleColumnCount() throw( RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
return implGetColumnCount();
}
@@ -1044,7 +1045,7 @@ sal_Int32 SAL_CALL ScAccessibleCsvGrid::getAccessibleColumnCount() throw( Runtim
OUString SAL_CALL ScAccessibleCsvGrid::getAccessibleRowDescription( sal_Int32 nRow )
throw( IndexOutOfBoundsException, RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
ensureValidPosition( nRow, 0 );
return implGetCellText( nRow, 0 );
@@ -1053,7 +1054,7 @@ OUString SAL_CALL ScAccessibleCsvGrid::getAccessibleRowDescription( sal_Int32 nR
OUString SAL_CALL ScAccessibleCsvGrid::getAccessibleColumnDescription( sal_Int32 nColumn )
throw( IndexOutOfBoundsException, RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
ensureValidPosition( 0, nColumn );
return implGetCellText( 0, nColumn );
@@ -1099,7 +1100,7 @@ Sequence< sal_Int32 > SAL_CALL ScAccessibleCsvGrid::getSelectedAccessibleRows()
Sequence< sal_Int32 > SAL_CALL ScAccessibleCsvGrid::getSelectedAccessibleColumns()
throw( RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
ScCsvGrid& rGrid = implGetGrid();
@@ -1124,7 +1125,7 @@ sal_Bool SAL_CALL ScAccessibleCsvGrid::isAccessibleRowSelected( sal_Int32 /* nRo
sal_Bool SAL_CALL ScAccessibleCsvGrid::isAccessibleColumnSelected( sal_Int32 nColumn )
throw( IndexOutOfBoundsException, RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
ensureValidIndex( nColumn );
return implIsColumnSelected( nColumn );
@@ -1133,7 +1134,7 @@ sal_Bool SAL_CALL ScAccessibleCsvGrid::isAccessibleColumnSelected( sal_Int32 nCo
Reference< XAccessible > SAL_CALL ScAccessibleCsvGrid::getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn )
throw( IndexOutOfBoundsException, RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
ensureValidPosition( nRow, nColumn );
return implCreateCellObj( nRow, nColumn );
@@ -1162,7 +1163,7 @@ sal_Bool SAL_CALL ScAccessibleCsvGrid::isAccessibleSelected( sal_Int32 /* nRow *
sal_Int32 SAL_CALL ScAccessibleCsvGrid::getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn )
throw( IndexOutOfBoundsException, RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
ensureValidPosition( nRow, nColumn );
return implGetIndex( nRow, nColumn );
@@ -1171,7 +1172,7 @@ sal_Int32 SAL_CALL ScAccessibleCsvGrid::getAccessibleIndex( sal_Int32 nRow, sal_
sal_Int32 SAL_CALL ScAccessibleCsvGrid::getAccessibleRow( sal_Int32 nChildIndex )
throw( IndexOutOfBoundsException, RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
ensureValidIndex( nChildIndex );
return implGetRow( nChildIndex );
@@ -1180,7 +1181,7 @@ sal_Int32 SAL_CALL ScAccessibleCsvGrid::getAccessibleRow( sal_Int32 nChildIndex
sal_Int32 SAL_CALL ScAccessibleCsvGrid::getAccessibleColumn( sal_Int32 nChildIndex )
throw( IndexOutOfBoundsException, RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
ensureValidIndex( nChildIndex );
return implGetColumn( nChildIndex );
@@ -1192,7 +1193,7 @@ sal_Int32 SAL_CALL ScAccessibleCsvGrid::getAccessibleColumn( sal_Int32 nChildInd
void SAL_CALL ScAccessibleCsvGrid::selectAccessibleChild( sal_Int32 nChildIndex )
throw( IndexOutOfBoundsException, RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
ensureValidIndex( nChildIndex );
sal_Int32 nColumn = implGetColumn( nChildIndex );
@@ -1205,7 +1206,7 @@ void SAL_CALL ScAccessibleCsvGrid::selectAccessibleChild( sal_Int32 nChildIndex
sal_Bool SAL_CALL ScAccessibleCsvGrid::isAccessibleChildSelected( sal_Int32 nChildIndex )
throw( IndexOutOfBoundsException, RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
ensureValidIndex( nChildIndex );
sal_Int32 nColumn = implGetColumn( nChildIndex );
@@ -1214,7 +1215,7 @@ sal_Bool SAL_CALL ScAccessibleCsvGrid::isAccessibleChildSelected( sal_Int32 nChi
void SAL_CALL ScAccessibleCsvGrid::clearAccessibleSelection() throw( RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
implGetGrid().SelectAll( false );
}
@@ -1226,7 +1227,7 @@ void SAL_CALL ScAccessibleCsvGrid::selectAllAccessibleChildren() throw( RuntimeE
sal_Int32 SAL_CALL ScAccessibleCsvGrid::getSelectedAccessibleChildCount() throw( RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
return implGetRowCount() * implGetSelColumnCount();
}
@@ -1234,7 +1235,7 @@ sal_Int32 SAL_CALL ScAccessibleCsvGrid::getSelectedAccessibleChildCount() throw(
Reference< XAccessible > SAL_CALL ScAccessibleCsvGrid::getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex )
throw( IndexOutOfBoundsException, RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
sal_Int32 nColumns = implGetSelColumnCount();
if( nColumns == 0 )
@@ -1248,7 +1249,7 @@ Reference< XAccessible > SAL_CALL ScAccessibleCsvGrid::getSelectedAccessibleChil
void SAL_CALL ScAccessibleCsvGrid::deselectAccessibleChild( sal_Int32 nSelectedChildIndex )
throw( IndexOutOfBoundsException, RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
sal_Int32 nColumns = implGetSelColumnCount();
if( nColumns == 0 )
@@ -1488,7 +1489,7 @@ ScAccessibleCsvCell::~ScAccessibleCsvCell()
void SAL_CALL ScAccessibleCsvCell::disposing()
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
SetEditSource( SvxEditSourcePtr( NULL ) );
ScAccessibleCsvControl::disposing();
}
@@ -1498,7 +1499,7 @@ void SAL_CALL ScAccessibleCsvCell::disposing()
void SAL_CALL ScAccessibleCsvCell::grabFocus() throw( RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
ScCsvGrid& rGrid = implGetGrid();
rGrid.Execute( CSVCMD_MOVEGRIDCURSOR, rGrid.GetColumnPos( mnColumn ) );
@@ -1507,7 +1508,7 @@ void SAL_CALL ScAccessibleCsvCell::grabFocus() throw( RuntimeException )
sal_Int32 SAL_CALL ScAccessibleCsvCell::getForeground( )
throw (RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
return implGetGrid().GetSettings().GetStyleSettings().GetButtonTextColor().GetColor();
}
@@ -1515,7 +1516,7 @@ throw (RuntimeException)
sal_Int32 SAL_CALL ScAccessibleCsvCell::getBackground( )
throw (RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
return SC_MOD()->GetColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor;
}
@@ -1535,7 +1536,7 @@ Reference< XAccessible > SAL_CALL ScAccessibleCsvCell::getAccessibleChild( sal_I
sal_Int32 SAL_CALL ScAccessibleCsvCell::getAccessibleIndexInParent() throw( RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
return mnIndex;
}
@@ -1543,7 +1544,7 @@ sal_Int32 SAL_CALL ScAccessibleCsvCell::getAccessibleIndexInParent() throw( Runt
Reference< XAccessibleRelationSet > SAL_CALL ScAccessibleCsvCell::getAccessibleRelationSet()
throw( RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
return new AccessibleRelationSetHelper();
}
@@ -1551,7 +1552,7 @@ Reference< XAccessibleRelationSet > SAL_CALL ScAccessibleCsvCell::getAccessibleR
Reference< XAccessibleStateSet > SAL_CALL ScAccessibleCsvCell::getAccessibleStateSet()
throw( RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
AccessibleStateSetHelper* pStateSet = implCreateStateSet();
if( implIsAlive() )
{
@@ -1586,7 +1587,7 @@ OUString SAL_CALL ScAccessibleCsvCell::getImplementationName() throw( RuntimeExc
Rectangle ScAccessibleCsvCell::GetBoundingBoxOnScreen() const throw( RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
Rectangle aRect( implGetBoundingBox() );
aRect.SetPos( implGetAbsPos( aRect.TopLeft() ) );
@@ -1595,7 +1596,7 @@ Rectangle ScAccessibleCsvCell::GetBoundingBoxOnScreen() const throw( RuntimeExce
Rectangle ScAccessibleCsvCell::GetBoundingBox() const throw( RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ensureAlive();
return implGetBoundingBox();
}
@@ -1672,3 +1673,4 @@ Rectangle ScAccessibleCsvCell::implGetBoundingBox() const
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx b/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx
index 2063eac08663..ea4865c91724 100644
--- a/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
#include "AccessibleDataPilotControl.hxx"
-#include "unoguard.hxx"
#include "fieldwnd.hxx"
#include <com/sun/star/accessibility/AccessibleRole.hpp>
@@ -40,6 +40,7 @@
#include <tools/gen.hxx>
#include <toolkit/helper/convert.hxx>
#include <tools/debug.hxx>
+#include <vcl/svapp.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
@@ -178,7 +179,7 @@ void ScAccessibleDataPilotControl::Init()
void SAL_CALL ScAccessibleDataPilotControl::disposing()
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
mpDPFieldWindow = NULL;
ScAccessibleContextBase::disposing();
@@ -329,7 +330,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleDataPilotControl::getAccessib
uno::Reference<XAccessible> xAcc;
if (containsPoint(rPoint))
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (mpDPFieldWindow)
{
@@ -353,7 +354,7 @@ sal_Bool SAL_CALL ScAccessibleDataPilotControl::isVisible( )
void SAL_CALL ScAccessibleDataPilotControl::grabFocus( )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (mpDPFieldWindow)
mpDPFieldWindow->GrabFocus();
@@ -362,7 +363,7 @@ void SAL_CALL ScAccessibleDataPilotControl::grabFocus( )
sal_Int32 SAL_CALL ScAccessibleDataPilotControl::getForeground( )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
sal_Int32 nColor(0);
if (mpDPFieldWindow)
@@ -375,7 +376,7 @@ sal_Int32 SAL_CALL ScAccessibleDataPilotControl::getForeground( )
sal_Int32 SAL_CALL ScAccessibleDataPilotControl::getBackground( )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
sal_Int32 nColor(0);
if (mpDPFieldWindow)
@@ -397,7 +398,7 @@ sal_Int32 SAL_CALL ScAccessibleDataPilotControl::getBackground( )
sal_Int32 SAL_CALL ScAccessibleDataPilotControl::getAccessibleChildCount(void)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (mpDPFieldWindow)
return mpDPFieldWindow->GetFieldCount();
@@ -408,7 +409,7 @@ sal_Int32 SAL_CALL ScAccessibleDataPilotControl::getAccessibleChildCount(void)
uno::Reference< XAccessible> SAL_CALL ScAccessibleDataPilotControl::getAccessibleChild(sal_Int32 nIndex)
throw (uno::RuntimeException, lang::IndexOutOfBoundsException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
uno::Reference<XAccessible> xAcc;
if (mpDPFieldWindow)
@@ -434,7 +435,7 @@ uno::Reference< XAccessible> SAL_CALL ScAccessibleDataPilotControl::getAccessibl
uno::Reference<XAccessibleStateSet> SAL_CALL ScAccessibleDataPilotControl::getAccessibleStateSet(void)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
utl::AccessibleStateSetHelper* pStateSet = new utl::AccessibleStateSetHelper();
@@ -467,7 +468,7 @@ uno::Reference<XAccessibleStateSet> SAL_CALL ScAccessibleDataPilotControl::getAc
uno::Sequence<sal_Int8> SAL_CALL ScAccessibleDataPilotControl::getImplementationId(void)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
static uno::Sequence<sal_Int8> aId;
if (aId.getLength() == 0)
@@ -483,7 +484,7 @@ uno::Sequence<sal_Int8> SAL_CALL ScAccessibleDataPilotControl::getImplementation
::rtl::OUString SAL_CALL ScAccessibleDataPilotControl::createAccessibleDescription(void)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (mpDPFieldWindow)
return mpDPFieldWindow->GetDescription();
@@ -494,7 +495,7 @@ uno::Sequence<sal_Int8> SAL_CALL ScAccessibleDataPilotControl::getImplementation
::rtl::OUString SAL_CALL ScAccessibleDataPilotControl::createAccessibleName(void)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (mpDPFieldWindow)
return mpDPFieldWindow->GetName();
@@ -551,7 +552,7 @@ void ScAccessibleDataPilotButton::Init()
void SAL_CALL ScAccessibleDataPilotButton::disposing()
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
mpDPFieldWindow = NULL;
ScAccessibleContextBase::disposing();
@@ -585,7 +586,7 @@ sal_Bool SAL_CALL ScAccessibleDataPilotButton::isVisible( )
void SAL_CALL ScAccessibleDataPilotButton::grabFocus( )
throw (::com::sun::star::uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (mpDPFieldWindow)
{
@@ -596,7 +597,7 @@ void SAL_CALL ScAccessibleDataPilotButton::grabFocus( )
sal_Int32 SAL_CALL ScAccessibleDataPilotButton::getForeground( )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
sal_Int32 nColor(0);
if (mpDPFieldWindow)
@@ -609,7 +610,7 @@ throw (uno::RuntimeException)
sal_Int32 SAL_CALL ScAccessibleDataPilotButton::getBackground( )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
sal_Int32 nColor(0);
if (mpDPFieldWindow)
@@ -637,7 +638,7 @@ uno::Reference< XAccessible> SAL_CALL ScAccessibleDataPilotButton::getAccessible
sal_Int32 SAL_CALL ScAccessibleDataPilotButton::getAccessibleIndexInParent(void)
throw (::com::sun::star::uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
return mnIndex;
}
@@ -645,7 +646,7 @@ sal_Int32 SAL_CALL ScAccessibleDataPilotButton::getAccessibleIndexInParent(void)
uno::Reference<XAccessibleStateSet> SAL_CALL ScAccessibleDataPilotButton::getAccessibleStateSet(void)
throw (::com::sun::star::uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
utl::AccessibleStateSetHelper* pStateSet = new utl::AccessibleStateSetHelper();
@@ -681,7 +682,7 @@ uno::Reference<XAccessibleStateSet> SAL_CALL ScAccessibleDataPilotButton::getAcc
uno::Sequence<sal_Int8> SAL_CALL ScAccessibleDataPilotButton::getImplementationId(void)
throw (::com::sun::star::uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
static uno::Sequence<sal_Int8> aId;
if (aId.getLength() == 0)
@@ -701,7 +702,7 @@ uno::Sequence<sal_Int8> SAL_CALL ScAccessibleDataPilotButton::getImplementationI
::rtl::OUString SAL_CALL ScAccessibleDataPilotButton::createAccessibleName(void)
throw (::com::sun::star::uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (mpDPFieldWindow)
return mpDPFieldWindow->GetFieldText(getAccessibleIndexInParent());
@@ -731,3 +732,5 @@ Rectangle ScAccessibleDataPilotButton::GetBoundingBox(void) const
else
return Rectangle();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index b2772cfbb92a..ae1d1b590350 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,7 +36,6 @@
#include "AccessibilityHints.hxx"
#include "document.hxx"
#include "drwlayer.hxx"
-#include "unoguard.hxx"
#include "shapeuno.hxx"
#include "DrawModelBroadcaster.hxx"
#include "drawview.hxx"
@@ -65,6 +65,7 @@
#include <svx/unoshape.hxx>
#include <unotools/accessiblerelationsethelper.hxx>
#include <toolkit/helper/convert.hxx>
+#include <vcl/svapp.hxx>
#include <list>
#include <algorithm>
@@ -1276,7 +1277,7 @@ ScAccessibleDocument::~ScAccessibleDocument(void)
void SAL_CALL ScAccessibleDocument::disposing()
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
FreeAccessibleSpreadsheet();
if (mpViewShell)
{
@@ -1512,7 +1513,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleDocument::getAccessibleAtPoin
uno::Reference<XAccessible> xAccessible = NULL;
if (containsPoint(rPoint))
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (mpChildrenShapes)
xAccessible = mpChildrenShapes->GetAt(rPoint);
@@ -1539,7 +1540,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleDocument::getAccessibleAtPoin
void SAL_CALL ScAccessibleDocument::grabFocus( )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (getAccessibleParent().is())
{
@@ -1565,7 +1566,7 @@ sal_Int32 SAL_CALL
ScAccessibleDocument::getAccessibleChildCount(void)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
sal_Int32 nCount(1);
if (mpChildrenShapes)
@@ -1583,7 +1584,7 @@ uno::Reference<XAccessible> SAL_CALL
throw (uno::RuntimeException,
lang::IndexOutOfBoundsException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
uno::Reference<XAccessible> xAccessible;
if (nIndex >= 0)
@@ -1614,7 +1615,7 @@ uno::Reference<XAccessibleStateSet> SAL_CALL
ScAccessibleDocument::getAccessibleStateSet(void)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<XAccessibleStateSet> xParentStates;
if (getAccessibleParent().is())
{
@@ -1644,7 +1645,7 @@ void SAL_CALL
ScAccessibleDocument::selectAccessibleChild( sal_Int32 nChildIndex )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (mpChildrenShapes)
@@ -1678,7 +1679,7 @@ sal_Bool SAL_CALL
ScAccessibleDocument::isAccessibleChildSelected( sal_Int32 nChildIndex )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
sal_Bool bResult(sal_False);
@@ -1711,7 +1712,7 @@ void SAL_CALL
ScAccessibleDocument::clearAccessibleSelection( )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (mpChildrenShapes)
@@ -1722,7 +1723,7 @@ void SAL_CALL
ScAccessibleDocument::selectAllAccessibleChildren( )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (mpChildrenShapes)
@@ -1739,7 +1740,7 @@ sal_Int32 SAL_CALL
ScAccessibleDocument::getSelectedAccessibleChildCount( )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
sal_Int32 nCount(0);
@@ -1759,7 +1760,7 @@ uno::Reference<XAccessible > SAL_CALL
ScAccessibleDocument::getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
uno::Reference<XAccessible> xAccessible;
if (mpChildrenShapes)
@@ -1787,7 +1788,7 @@ void SAL_CALL
ScAccessibleDocument::deselectAccessibleChild( sal_Int32 nChildIndex )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (mpChildrenShapes)
@@ -1849,7 +1850,7 @@ uno::Sequence<sal_Int8> SAL_CALL
ScAccessibleDocument::getImplementationId(void)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
static uno::Sequence<sal_Int8> aId;
if (aId.getLength() == 0)
@@ -1864,7 +1865,7 @@ uno::Sequence<sal_Int8> SAL_CALL
sal_Bool ScAccessibleDocument::IsValid (void) const
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
return (!ScAccessibleContextBase::IsDefunc() && !rBHelper.bInDispose);
}
@@ -1887,14 +1888,14 @@ Rectangle ScAccessibleDocument::GetVisibleArea_Impl() const
Rectangle ScAccessibleDocument::GetVisibleArea() const
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
return maVisArea;
}
Point ScAccessibleDocument::LogicToPixel (const Point& rPoint) const
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
Point aPoint;
ScGridWindow* pWin = static_cast<ScGridWindow*>(mpViewShell->GetWindowByPos(meSplitPos));
@@ -1908,7 +1909,7 @@ Point ScAccessibleDocument::LogicToPixel (const Point& rPoint) const
Size ScAccessibleDocument::LogicToPixel (const Size& rSize) const
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
Size aSize;
ScGridWindow* pWin = static_cast<ScGridWindow*>(mpViewShell->GetWindowByPos(meSplitPos));
@@ -1919,7 +1920,7 @@ Size ScAccessibleDocument::LogicToPixel (const Size& rSize) const
Point ScAccessibleDocument::PixelToLogic (const Point& rPoint) const
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
Point aPoint;
ScGridWindow* pWin = static_cast<ScGridWindow*>(mpViewShell->GetWindowByPos(meSplitPos));
@@ -1933,7 +1934,7 @@ Point ScAccessibleDocument::PixelToLogic (const Point& rPoint) const
Size ScAccessibleDocument::PixelToLogic (const Size& rSize) const
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
Size aSize;
ScGridWindow* pWin = static_cast<ScGridWindow*>(mpViewShell->GetWindowByPos(meSplitPos));
@@ -1964,7 +1965,7 @@ utl::AccessibleRelationSetHelper* ScAccessibleDocument::GetRelationSet(const ScA
ScAccessibleDocument::createAccessibleName(void)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
rtl::OUString sName = String(ScResId(STR_ACC_DOC_NAME));
sal_Int32 nNumber(sal_Int32(meSplitPos) + 1);
@@ -2110,3 +2111,5 @@ rtl::OUString ScAccessibleDocument::GetCurrentCellDescription() const
{
return rtl::OUString();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentBase.cxx b/sc/source/ui/Accessibility/AccessibleDocumentBase.cxx
index 179e8ab2278a..6c48fbffb388 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentBase.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,3 +48,5 @@ ScAccessibleDocumentBase::ScAccessibleDocumentBase(
ScAccessibleDocumentBase::~ScAccessibleDocumentBase(void)
{
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index c3caf93b007d..f1ffe5dbd580 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,7 +37,6 @@
#include "document.hxx"
#include "prevwsh.hxx"
#include "prevloc.hxx"
-#include "unoguard.hxx"
#include "drwlayer.hxx"
#include "editsrc.hxx"
#include "scresid.hxx"
@@ -62,6 +62,7 @@
#include <toolkit/helper/convert.hxx>
#include <svx/unoshape.hxx>
#include <unotools/accessiblerelationsethelper.hxx>
+#include <vcl/svapp.hxx>
#include <vector>
#include <list>
@@ -567,13 +568,13 @@ ScIAccessibleViewForwarder::~ScIAccessibleViewForwarder()
sal_Bool ScIAccessibleViewForwarder::IsValid (void) const
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return mbValid;
}
Rectangle ScIAccessibleViewForwarder::GetVisibleArea() const
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
Rectangle aVisRect;
Window* pWin = mpViewShell->GetWindow();
if (pWin)
@@ -589,7 +590,7 @@ Rectangle ScIAccessibleViewForwarder::GetVisibleArea() const
Point ScIAccessibleViewForwarder::LogicToPixel (const Point& rPoint) const
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
Point aPoint;
Window* pWin = mpViewShell->GetWindow();
if (pWin && mpAccDoc)
@@ -603,7 +604,7 @@ Point ScIAccessibleViewForwarder::LogicToPixel (const Point& rPoint) const
Size ScIAccessibleViewForwarder::LogicToPixel (const Size& rSize) const
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
Size aSize;
Window* pWin = mpViewShell->GetWindow();
if (pWin)
@@ -613,7 +614,7 @@ Size ScIAccessibleViewForwarder::LogicToPixel (const Size& rSize) const
Point ScIAccessibleViewForwarder::PixelToLogic (const Point& rPoint) const
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
Point aPoint;
Window* pWin = mpViewShell->GetWindow();
if (pWin && mpAccDoc)
@@ -626,7 +627,7 @@ Point ScIAccessibleViewForwarder::PixelToLogic (const Point& rPoint) const
Size ScIAccessibleViewForwarder::PixelToLogic (const Size& rSize) const
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
Size aSize;
Window* pWin = mpViewShell->GetWindow();
if (pWin)
@@ -1447,7 +1448,7 @@ ScAccessibleDocumentPagePreview::~ScAccessibleDocumentPagePreview(void)
void SAL_CALL ScAccessibleDocumentPagePreview::disposing()
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (mpTable)
{
mpTable->release();
@@ -1580,7 +1581,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleDocumentPagePreview::getAcces
uno::Reference<XAccessible> xAccessible;
if (containsPoint(rPoint))
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if ( mpViewShell )
@@ -1654,7 +1655,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleDocumentPagePreview::getAcces
void SAL_CALL ScAccessibleDocumentPagePreview::grabFocus() throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (getAccessibleParent().is())
{
@@ -1671,7 +1672,7 @@ void SAL_CALL ScAccessibleDocumentPagePreview::grabFocus() throw (uno::RuntimeEx
sal_Int32 SAL_CALL ScAccessibleDocumentPagePreview::getAccessibleChildCount(void) throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
long nRet = 0;
@@ -1687,7 +1688,7 @@ sal_Int32 SAL_CALL ScAccessibleDocumentPagePreview::getAccessibleChildCount(void
uno::Reference<XAccessible> SAL_CALL ScAccessibleDocumentPagePreview::getAccessibleChild(sal_Int32 nIndex)
throw (uno::RuntimeException, lang::IndexOutOfBoundsException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
uno::Reference<XAccessible> xAccessible;
@@ -1753,7 +1754,7 @@ uno::Reference<XAccessible> SAL_CALL ScAccessibleDocumentPagePreview::getAccessi
uno::Reference<XAccessibleStateSet> SAL_CALL ScAccessibleDocumentPagePreview::getAccessibleStateSet(void)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<XAccessibleStateSet> xParentStates;
if (getAccessibleParent().is())
{
@@ -1803,7 +1804,7 @@ uno::Sequence<sal_Int8> SAL_CALL
ScAccessibleDocumentPagePreview::getImplementationId(void)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
static uno::Sequence<sal_Int8> aId;
if (aId.getLength() == 0)
@@ -1886,3 +1887,5 @@ ScShapeChilds* ScAccessibleDocumentPagePreview::GetShapeChilds()
return mpShapeChilds;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/Accessibility/AccessibleEditObject.cxx b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
index 04df409a76bb..6df608748c3a 100644
--- a/sc/source/ui/Accessibility/AccessibleEditObject.cxx
+++ b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,6 @@
#include "AccessibleEditObject.hxx"
#include "scitems.hxx"
#include <editeng/eeitem.hxx>
-#include "unoguard.hxx"
#include "AccessibleText.hxx"
#include "editsrc.hxx"
#include "scmod.hxx"
@@ -45,6 +45,7 @@
#include <editeng/editview.hxx>
#include <editeng/editeng.hxx>
#include <svx/svdmodel.hxx>
+#include <vcl/svapp.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
@@ -81,7 +82,7 @@ ScAccessibleEditObject::~ScAccessibleEditObject()
void SAL_CALL ScAccessibleEditObject::disposing()
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (mpTextHelper)
DELETEZ(mpTextHelper);
@@ -113,7 +114,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleEditObject::getAccessibleAtPo
uno::Reference<XAccessible> xRet;
if (containsPoint(rPoint))
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if(!mpTextHelper)
@@ -192,7 +193,7 @@ sal_Int32 SAL_CALL
ScAccessibleEditObject::getAccessibleChildCount(void)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (!mpTextHelper)
CreateTextHelper();
@@ -204,7 +205,7 @@ uno::Reference< XAccessible > SAL_CALL
throw (uno::RuntimeException,
lang::IndexOutOfBoundsException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (!mpTextHelper)
CreateTextHelper();
@@ -215,7 +216,7 @@ uno::Reference<XAccessibleStateSet> SAL_CALL
ScAccessibleEditObject::getAccessibleStateSet(void)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<XAccessibleStateSet> xParentStates;
if (getAccessibleParent().is())
{
@@ -295,7 +296,7 @@ uno::Sequence<sal_Int8> SAL_CALL
ScAccessibleEditObject::getImplementationId(void)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
static uno::Sequence<sal_Int8> aId;
if (aId.getLength() == 0)
@@ -350,3 +351,4 @@ void ScAccessibleEditObject::CreateTextHelper()
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx b/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx
index 02fb5c12463e..b4948460be42 100644
--- a/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx
+++ b/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,7 +32,6 @@
#include "AccessibleGlobal.hxx"
#include "AccessibleFilterMenu.hxx"
#include "AccessibleFilterMenuItem.hxx"
-#include "unoguard.hxx"
#include "global.hxx"
#include "document.hxx"
#include "docpool.hxx"
@@ -396,3 +396,5 @@ void ScAccessibleFilterMenu::updateStates()
if (isSelected())
p->insert(SELECTED);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/Accessibility/AccessibleFilterMenuItem.cxx b/sc/source/ui/Accessibility/AccessibleFilterMenuItem.cxx
index 0da1e6858a75..1c70ee6ba5c5 100644
--- a/sc/source/ui/Accessibility/AccessibleFilterMenuItem.cxx
+++ b/sc/source/ui/Accessibility/AccessibleFilterMenuItem.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -203,3 +204,4 @@ void ScAccessibleFilterMenuItem::updateStateSet()
p->insert(SELECTED);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/Accessibility/AccessibleFilterTopWindow.cxx b/sc/source/ui/Accessibility/AccessibleFilterTopWindow.cxx
index 2af69faa33c8..fb649eba5f4f 100644
--- a/sc/source/ui/Accessibility/AccessibleFilterTopWindow.cxx
+++ b/sc/source/ui/Accessibility/AccessibleFilterTopWindow.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -125,3 +126,4 @@ void ScAccessibleFilterTopWindow::setAccessibleChild(
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/Accessibility/AccessibleGlobal.cxx b/sc/source/ui/Accessibility/AccessibleGlobal.cxx
index ac2562fa9bd5..2ddc53694c89 100644
--- a/sc/source/ui/Accessibility/AccessibleGlobal.cxx
+++ b/sc/source/ui/Accessibility/AccessibleGlobal.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -93,3 +94,4 @@ void ScAccessibleStateSet::clear()
maStates.clear();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
index 51b8688e1a34..20e50119d680 100644
--- a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,7 +33,6 @@
#include "AccessiblePageHeaderArea.hxx"
#include "AccessibilityHints.hxx"
#include "prevwsh.hxx"
-#include "unoguard.hxx"
#include "miscuno.hxx"
#include "prevloc.hxx"
#include "document.hxx"
@@ -48,6 +48,7 @@
#include <vcl/window.hxx>
#include <svl/smplhint.hxx>
+#include <vcl/svapp.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <svl/style.hxx>
#include <svl/itempool.hxx>
@@ -119,7 +120,7 @@ ScAccessiblePageHeader::~ScAccessiblePageHeader()
void SAL_CALL ScAccessiblePageHeader::disposing()
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (mpViewShell)
{
mpViewShell->RemoveAccessibilityObject(*this);
@@ -193,7 +194,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePageHeader::getAccessibleAtPo
if (containsPoint(aPoint))
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
sal_Int32 nCount(getAccessibleChildCount()); // fill the areas
@@ -217,7 +218,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePageHeader::getAccessibleAtPo
void SAL_CALL ScAccessiblePageHeader::grabFocus() throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (getAccessibleParent().is())
{
@@ -231,7 +232,7 @@ void SAL_CALL ScAccessiblePageHeader::grabFocus() throw (uno::RuntimeException)
sal_Int32 SAL_CALL ScAccessiblePageHeader::getAccessibleChildCount() throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if((mnChildCount < 0) && mpViewShell)
@@ -265,7 +266,7 @@ sal_Int32 SAL_CALL ScAccessiblePageHeader::getAccessibleChildCount() throw (uno:
uno::Reference< XAccessible > SAL_CALL ScAccessiblePageHeader::getAccessibleChild( sal_Int32 nIndex )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
uno::Reference<XAccessible> xRet;
@@ -302,7 +303,7 @@ sal_Int32 SAL_CALL ScAccessiblePageHeader::getAccessibleIndexInParent() throw (u
uno::Reference< XAccessibleStateSet > SAL_CALL ScAccessiblePageHeader::getAccessibleStateSet()
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<XAccessibleStateSet> xParentStates;
if (getAccessibleParent().is())
{
@@ -437,3 +438,5 @@ void ScAccessiblePageHeader::AddChild(const EditTextObject* pArea, sal_uInt32 nI
}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
index a0e3b8af102a..37eac80cec14 100644
--- a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,7 +32,6 @@
#include "AccessiblePageHeaderArea.hxx"
#include "AccessibleText.hxx"
#include "AccessibilityHints.hxx"
-#include "unoguard.hxx"
#include "editsrc.hxx"
#include "prevwsh.hxx"
#include "prevloc.hxx"
@@ -47,6 +47,7 @@
#include <unotools/accessiblestatesethelper.hxx>
#include <rtl/ustrbuf.hxx>
#include <toolkit/helper/convert.hxx>
+#include <vcl/svapp.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
@@ -82,7 +83,7 @@ ScAccessiblePageHeaderArea::~ScAccessiblePageHeaderArea(void)
void SAL_CALL ScAccessiblePageHeaderArea::disposing()
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (mpViewShell)
{
mpViewShell->RemoveAccessibilityObject(*this);
@@ -126,7 +127,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePageHeaderArea::getAccessible
uno::Reference<XAccessible> xRet;
if (containsPoint(rPoint))
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if(!mpTextHelper)
@@ -144,7 +145,7 @@ sal_Int32 SAL_CALL
ScAccessiblePageHeaderArea::getAccessibleChildCount(void)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (!mpTextHelper)
CreateTextHelper();
@@ -156,7 +157,7 @@ uno::Reference< XAccessible > SAL_CALL
throw (uno::RuntimeException,
lang::IndexOutOfBoundsException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (!mpTextHelper)
CreateTextHelper();
@@ -167,7 +168,7 @@ uno::Reference<XAccessibleStateSet> SAL_CALL
ScAccessiblePageHeaderArea::getAccessibleStateSet(void)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<XAccessibleStateSet> xParentStates;
if (getAccessibleParent().is())
{
@@ -218,7 +219,7 @@ uno::Sequence<sal_Int8> SAL_CALL
ScAccessiblePageHeaderArea::getImplementationId(void)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
static uno::Sequence<sal_Int8> aId;
if (aId.getLength() == 0)
@@ -322,3 +323,5 @@ void ScAccessiblePageHeaderArea::CreateTextHelper()
mpTextHelper->SetEventSource(this);
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
index c07eb0844b7f..bf99d3d26951 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,13 +36,13 @@
#include "AccessiblePreviewCell.hxx"
#include "AccessibilityHints.hxx"
#include "prevwsh.hxx"
-#include "unoguard.hxx"
#include "prevloc.hxx"
#include "document.hxx"
#include <svx/AccessibleTextHelper.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <editeng/brshitem.hxx>
#include <vcl/window.hxx>
+#include <vcl/svapp.hxx>
#include <toolkit/helper/convert.hxx>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
@@ -76,7 +77,7 @@ ScAccessiblePreviewCell::~ScAccessiblePreviewCell()
void SAL_CALL ScAccessiblePreviewCell::disposing()
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (mpViewShell)
{
mpViewShell->RemoveAccessibilityObject(*this);
@@ -112,7 +113,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewCell::getAccessibleAtP
uno::Reference<XAccessible> xRet;
if (containsPoint(rPoint))
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if(!mpTextHelper)
@@ -126,7 +127,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewCell::getAccessibleAtP
void SAL_CALL ScAccessiblePreviewCell::grabFocus() throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (getAccessibleParent().is())
{
@@ -140,7 +141,7 @@ void SAL_CALL ScAccessiblePreviewCell::grabFocus() throw (uno::RuntimeException)
sal_Int32 SAL_CALL ScAccessiblePreviewCell::getAccessibleChildCount() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (!mpTextHelper)
CreateTextHelper();
@@ -150,7 +151,7 @@ sal_Int32 SAL_CALL ScAccessiblePreviewCell::getAccessibleChildCount() throw(uno:
uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewCell::getAccessibleChild(sal_Int32 nIndex)
throw (uno::RuntimeException, lang::IndexOutOfBoundsException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (!mpTextHelper)
CreateTextHelper();
@@ -160,7 +161,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewCell::getAccessibleChi
uno::Reference<XAccessibleStateSet> SAL_CALL ScAccessiblePreviewCell::getAccessibleStateSet()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<XAccessibleStateSet> xParentStates;
if (getAccessibleParent().is())
@@ -214,7 +215,7 @@ uno::Sequence<sal_Int8> SAL_CALL
ScAccessiblePreviewCell::getImplementationId(void)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
static uno::Sequence<sal_Int8> aId;
if (aId.getLength() == 0)
@@ -314,3 +315,4 @@ void ScAccessiblePreviewCell::CreateTextHelper()
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
index 1d91b7ebb2ae..d55fcdd3aac3 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,7 +37,6 @@
#include "AccessiblePreviewHeaderCell.hxx"
#include "AccessibilityHints.hxx"
#include "prevwsh.hxx"
-#include "unoguard.hxx"
#include "miscuno.hxx"
#include "prevloc.hxx"
#include "scresid.hxx"
@@ -46,6 +46,7 @@
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <vcl/window.hxx>
+#include <vcl/svapp.hxx>
#include <svl/smplhint.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <comphelper/sequence.hxx>
@@ -82,7 +83,7 @@ ScAccessiblePreviewHeaderCell::~ScAccessiblePreviewHeaderCell()
void SAL_CALL ScAccessiblePreviewHeaderCell::disposing()
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (mpViewShell)
{
mpViewShell->RemoveAccessibilityObject(*this);
@@ -144,7 +145,7 @@ void SAL_CALL ScAccessiblePreviewHeaderCell::release()
uno::Any SAL_CALL ScAccessiblePreviewHeaderCell::getCurrentValue() throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
double fValue(0.0);
@@ -167,7 +168,7 @@ sal_Bool SAL_CALL ScAccessiblePreviewHeaderCell::setCurrentValue( const uno::Any
uno::Any SAL_CALL ScAccessiblePreviewHeaderCell::getMaximumValue() throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
double fValue(0.0);
@@ -196,7 +197,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewHeaderCell::getAccessi
uno::Reference<XAccessible> xRet;
if (containsPoint(rPoint))
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if(!mpTextHelper)
@@ -210,7 +211,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewHeaderCell::getAccessi
void SAL_CALL ScAccessiblePreviewHeaderCell::grabFocus() throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (getAccessibleParent().is())
{
@@ -224,7 +225,7 @@ void SAL_CALL ScAccessiblePreviewHeaderCell::grabFocus() throw (uno::RuntimeExce
sal_Int32 SAL_CALL ScAccessiblePreviewHeaderCell::getAccessibleChildCount() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (!mpTextHelper)
CreateTextHelper();
@@ -234,7 +235,7 @@ sal_Int32 SAL_CALL ScAccessiblePreviewHeaderCell::getAccessibleChildCount() thro
uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewHeaderCell::getAccessibleChild(sal_Int32 nIndex)
throw (uno::RuntimeException, lang::IndexOutOfBoundsException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (!mpTextHelper)
CreateTextHelper();
@@ -249,7 +250,7 @@ sal_Int32 SAL_CALL ScAccessiblePreviewHeaderCell::getAccessibleIndexInParent() t
uno::Reference<XAccessibleStateSet> SAL_CALL ScAccessiblePreviewHeaderCell::getAccessibleStateSet()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<XAccessibleStateSet> xParentStates;
if (getAccessibleParent().is())
@@ -305,7 +306,7 @@ uno::Sequence<sal_Int8> SAL_CALL
ScAccessiblePreviewHeaderCell::getImplementationId(void)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
static uno::Sequence<sal_Int8> aId;
if (aId.getLength() == 0)
@@ -439,3 +440,5 @@ void ScAccessiblePreviewHeaderCell::FillTableInfo() const
mpViewShell->GetLocationData().GetTableInfo( aVisRect, *mpTableInfo );
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
index a720085f8d93..fd98a67dbd7e 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,7 +35,6 @@
#include "AccessiblePreviewHeaderCell.hxx"
#include "AccessibilityHints.hxx"
#include "prevwsh.hxx"
-#include "unoguard.hxx"
#include "miscuno.hxx"
#include "prevloc.hxx"
#include "attrib.hxx"
@@ -47,6 +47,7 @@
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <vcl/window.hxx>
+#include <vcl/svapp.hxx>
#include <svl/smplhint.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <comphelper/sequence.hxx>
@@ -80,7 +81,7 @@ ScAccessiblePreviewTable::~ScAccessiblePreviewTable()
void SAL_CALL ScAccessiblePreviewTable::disposing()
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (mpViewShell)
{
mpViewShell->RemoveAccessibilityObject(*this);
@@ -144,7 +145,7 @@ void SAL_CALL ScAccessiblePreviewTable::release()
sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleRowCount() throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
FillTableInfo();
@@ -157,7 +158,7 @@ sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleRowCount() throw (uno:
sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleColumnCount() throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
FillTableInfo();
@@ -172,7 +173,7 @@ rtl::OUString SAL_CALL ScAccessiblePreviewTable::getAccessibleRowDescription( sa
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
// is not supported or specified so not implemented
-/* ScUnoGuard aGuard;
+/* SolarMutexGuard aGuard;
IsObjectValid();
FillTableInfo();
@@ -196,7 +197,7 @@ rtl::OUString SAL_CALL ScAccessiblePreviewTable::getAccessibleRowDescription( sa
else
throw lang::IndexOutOfBoundsException();*/
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
FillTableInfo();
if ( nRow < 0 || (mpTableInfo && nRow >= mpTableInfo->GetRows()) )
throw lang::IndexOutOfBoundsException();
@@ -208,7 +209,7 @@ rtl::OUString SAL_CALL ScAccessiblePreviewTable::getAccessibleColumnDescription(
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
// is not supported or specified so not implemented
-/* ScUnoGuard aGuard;
+/* SolarMutexGuard aGuard;
IsObjectValid();
FillTableInfo();
@@ -232,7 +233,7 @@ rtl::OUString SAL_CALL ScAccessiblePreviewTable::getAccessibleColumnDescription(
else
throw lang::IndexOutOfBoundsException();*/
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
FillTableInfo();
if ( nColumn < 0 || (mpTableInfo && nColumn >= mpTableInfo->GetCols()) )
throw lang::IndexOutOfBoundsException();
@@ -243,7 +244,7 @@ rtl::OUString SAL_CALL ScAccessiblePreviewTable::getAccessibleColumnDescription(
sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
FillTableInfo();
@@ -277,7 +278,7 @@ sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleRowExtentAt( sal_Int32
sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
FillTableInfo();
@@ -337,7 +338,7 @@ sal_Bool SAL_CALL ScAccessiblePreviewTable::isAccessibleRowSelected( sal_Int32 n
{
// in the page preview, there is no selection
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
FillTableInfo();
if ( nRow < 0 || (mpTableInfo && nRow >= mpTableInfo->GetRows()) )
throw lang::IndexOutOfBoundsException();
@@ -350,7 +351,7 @@ sal_Bool SAL_CALL ScAccessiblePreviewTable::isAccessibleColumnSelected( sal_Int3
{
// in the page preview, there is no selection
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
FillTableInfo();
if ( nColumn < 0 || (mpTableInfo && nColumn >= mpTableInfo->GetCols()) )
throw lang::IndexOutOfBoundsException();
@@ -361,7 +362,7 @@ sal_Bool SAL_CALL ScAccessiblePreviewTable::isAccessibleColumnSelected( sal_Int3
uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewTable::getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
FillTableInfo();
@@ -413,7 +414,7 @@ sal_Bool SAL_CALL ScAccessiblePreviewTable::isAccessibleSelected( sal_Int32 nRow
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
// in the page preview, there is no selection
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
FillTableInfo();
@@ -431,7 +432,7 @@ sal_Bool SAL_CALL ScAccessiblePreviewTable::isAccessibleSelected( sal_Int32 nRow
sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
FillTableInfo();
@@ -451,7 +452,7 @@ sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleIndex( sal_Int32 nRow,
sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleRow( sal_Int32 nChildIndex )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
FillTableInfo();
@@ -470,7 +471,7 @@ sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleRow( sal_Int32 nChildI
sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleColumn( sal_Int32 nChildIndex )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
FillTableInfo();
@@ -494,7 +495,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewTable::getAccessibleAt
uno::Reference<XAccessible> xRet;
if (containsPoint(aPoint))
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
FillTableInfo();
@@ -539,7 +540,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewTable::getAccessibleAt
void SAL_CALL ScAccessiblePreviewTable::grabFocus() throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (getAccessibleParent().is())
{
@@ -553,7 +554,7 @@ void SAL_CALL ScAccessiblePreviewTable::grabFocus() throw (uno::RuntimeException
sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleChildCount() throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
FillTableInfo();
@@ -567,7 +568,7 @@ sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleChildCount() throw (un
uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewTable::getAccessibleChild( sal_Int32 nIndex )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
FillTableInfo();
@@ -600,7 +601,7 @@ sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleIndexInParent() throw
uno::Reference< XAccessibleStateSet > SAL_CALL ScAccessiblePreviewTable::getAccessibleStateSet()
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<XAccessibleStateSet> xParentStates;
if (getAccessibleParent().is())
{
@@ -765,3 +766,4 @@ void ScAccessiblePreviewTable::FillTableInfo() const
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
index b10cfa1de06f..5d18beb574b4 100644
--- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
+++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,7 +36,6 @@
#include "AccessibleDocument.hxx"
#include "tabvwsh.hxx"
#include "document.hxx"
-#include "unoguard.hxx"
#include "hints.hxx"
#include "scmod.hxx"
@@ -48,6 +48,7 @@
#include <tools/debug.hxx>
#include <tools/gen.hxx>
#include <svtools/colorcfg.hxx>
+#include <vcl/svapp.hxx>
#include <algorithm>
@@ -121,7 +122,7 @@ void ScAccessibleSpreadsheet::ConstructScAccessibleSpreadsheet(
void SAL_CALL ScAccessibleSpreadsheet::disposing()
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (mpViewShell)
{
mpViewShell->RemoveAccessibilityObject(*this);
@@ -375,7 +376,7 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
uno::Reference< XAccessibleTable > SAL_CALL ScAccessibleSpreadsheet::getAccessibleRowHeaders( )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
uno::Reference< XAccessibleTable > xAccessibleTable;
if( mpDoc && mbIsSpreadsheet )
@@ -394,7 +395,7 @@ uno::Reference< XAccessibleTable > SAL_CALL ScAccessibleSpreadsheet::getAccessib
uno::Reference< XAccessibleTable > SAL_CALL ScAccessibleSpreadsheet::getAccessibleColumnHeaders( )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
uno::Reference< XAccessibleTable > xAccessibleTable;
if( mpDoc && mbIsSpreadsheet )
@@ -413,7 +414,7 @@ uno::Reference< XAccessibleTable > SAL_CALL ScAccessibleSpreadsheet::getAccessib
uno::Sequence< sal_Int32 > SAL_CALL ScAccessibleSpreadsheet::getSelectedAccessibleRows( )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
uno::Sequence<sal_Int32> aSequence;
if (mpViewShell && mpViewShell->GetViewData())
@@ -440,7 +441,7 @@ uno::Sequence< sal_Int32 > SAL_CALL ScAccessibleSpreadsheet::getSelectedAccessib
uno::Sequence< sal_Int32 > SAL_CALL ScAccessibleSpreadsheet::getSelectedAccessibleColumns( )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
uno::Sequence<sal_Int32> aSequence;
if (mpViewShell && mpViewShell->GetViewData())
@@ -467,7 +468,7 @@ uno::Sequence< sal_Int32 > SAL_CALL ScAccessibleSpreadsheet::getSelectedAccessib
sal_Bool SAL_CALL ScAccessibleSpreadsheet::isAccessibleRowSelected( sal_Int32 nRow )
throw (uno::RuntimeException, lang::IndexOutOfBoundsException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if ((nRow > (maRange.aEnd.Row() - maRange.aStart.Row())) || (nRow < 0))
@@ -485,7 +486,7 @@ sal_Bool SAL_CALL ScAccessibleSpreadsheet::isAccessibleRowSelected( sal_Int32 nR
sal_Bool SAL_CALL ScAccessibleSpreadsheet::isAccessibleColumnSelected( sal_Int32 nColumn )
throw (uno::RuntimeException, lang::IndexOutOfBoundsException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if ((nColumn > (maRange.aEnd.Col() - maRange.aStart.Col())) || (nColumn < 0))
@@ -518,7 +519,7 @@ ScAccessibleCell* ScAccessibleSpreadsheet::GetAccessibleCellAt(sal_Int32 nRow, s
uno::Reference< XAccessible > SAL_CALL ScAccessibleSpreadsheet::getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn )
throw (uno::RuntimeException, lang::IndexOutOfBoundsException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (nRow > (maRange.aEnd.Row() - maRange.aStart.Row()) ||
nRow < 0 ||
@@ -536,7 +537,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleSpreadsheet::getAccessibleCel
sal_Bool SAL_CALL ScAccessibleSpreadsheet::isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn )
throw (uno::RuntimeException, lang::IndexOutOfBoundsException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if ((nColumn > (maRange.aEnd.Col() - maRange.aStart.Col())) || (nColumn < 0) ||
@@ -561,7 +562,7 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleSpreadsheet::getAccessibleAtP
uno::Reference< XAccessible > xAccessible;
if (containsPoint(rPoint))
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (mpViewShell)
{
@@ -594,7 +595,7 @@ sal_Int32 SAL_CALL ScAccessibleSpreadsheet::getForeground( )
sal_Int32 SAL_CALL ScAccessibleSpreadsheet::getBackground( )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
return SC_MOD()->GetColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor;
}
@@ -616,7 +617,7 @@ uno::Reference<XAccessibleStateSet> SAL_CALL
ScAccessibleSpreadsheet::getAccessibleStateSet(void)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<XAccessibleStateSet> xParentStates;
if (getAccessibleParent().is())
{
@@ -654,7 +655,7 @@ void SAL_CALL
ScAccessibleSpreadsheet::selectAccessibleChild( sal_Int32 nChildIndex )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (nChildIndex < 0 || nChildIndex >= getAccessibleChildCount())
throw lang::IndexOutOfBoundsException();
@@ -672,7 +673,7 @@ void SAL_CALL
ScAccessibleSpreadsheet::clearAccessibleSelection( )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (mpViewShell)
{
@@ -684,7 +685,7 @@ void SAL_CALL
ScAccessibleSpreadsheet::selectAllAccessibleChildren( )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (mpViewShell)
{
@@ -696,7 +697,7 @@ sal_Int32 SAL_CALL
ScAccessibleSpreadsheet::getSelectedAccessibleChildCount( )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
sal_Int32 nResult(0);
if (mpViewShell)
@@ -719,7 +720,7 @@ uno::Reference<XAccessible > SAL_CALL
ScAccessibleSpreadsheet::getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
uno::Reference < XAccessible > xAccessible;
if (mpViewShell)
@@ -750,7 +751,7 @@ void SAL_CALL
ScAccessibleSpreadsheet::deselectAccessibleChild( sal_Int32 nChildIndex )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (nChildIndex < 0 || nChildIndex >= getAccessibleChildCount())
@@ -849,7 +850,7 @@ uno::Sequence<sal_Int8> SAL_CALL
ScAccessibleSpreadsheet::getImplementationId(void)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
static uno::Sequence<sal_Int8> aId;
if (aId.getLength() == 0)
@@ -865,7 +866,7 @@ uno::Sequence<sal_Int8> SAL_CALL
void SAL_CALL ScAccessibleSpreadsheet::addEventListener(const uno::Reference<XAccessibleEventListener>& xListener)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
ScAccessibleTableBase::addEventListener(xListener);
@@ -991,3 +992,5 @@ Rectangle ScAccessibleSpreadsheet::GetVisCells(const Rectangle& rVisArea)
else
return Rectangle();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/Accessibility/AccessibleTableBase.cxx b/sc/source/ui/Accessibility/AccessibleTableBase.cxx
index 4f4b2b7304bd..e998fd7fd4fa 100644
--- a/sc/source/ui/Accessibility/AccessibleTableBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleTableBase.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,7 +33,6 @@
#include "AccessibleTableBase.hxx"
#include "miscuno.hxx"
#include "document.hxx"
-#include "unoguard.hxx"
#include "scresid.hxx"
#include "sc.hrc"
@@ -42,6 +42,7 @@
#include <rtl/uuid.h>
#include <tools/debug.hxx>
#include <comphelper/sequence.hxx>
+#include <vcl/svapp.hxx>
using namespace ::com::sun::star;
@@ -66,7 +67,7 @@ ScAccessibleTableBase::~ScAccessibleTableBase()
void SAL_CALL ScAccessibleTableBase::disposing()
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
mpDoc = NULL;
ScAccessibleContextBase::disposing();
@@ -98,7 +99,7 @@ void SAL_CALL ScAccessibleTableBase::release()
sal_Int32 SAL_CALL ScAccessibleTableBase::getAccessibleRowCount( )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
return maRange.aEnd.Row() - maRange.aStart.Row() + 1;
}
@@ -106,7 +107,7 @@ sal_Int32 SAL_CALL ScAccessibleTableBase::getAccessibleRowCount( )
sal_Int32 SAL_CALL ScAccessibleTableBase::getAccessibleColumnCount( )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
return maRange.aEnd.Col() - maRange.aStart.Col() + 1;
}
@@ -138,7 +139,7 @@ sal_Int32 SAL_CALL ScAccessibleTableBase::getAccessibleColumnCount( )
sal_Int32 SAL_CALL ScAccessibleTableBase::getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn )
throw (uno::RuntimeException, lang::IndexOutOfBoundsException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if ((nColumn > (maRange.aEnd.Col() - maRange.aStart.Col())) || (nColumn < 0) ||
@@ -167,7 +168,7 @@ sal_Int32 SAL_CALL ScAccessibleTableBase::getAccessibleRowExtentAt( sal_Int32 nR
sal_Int32 SAL_CALL ScAccessibleTableBase::getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn )
throw (uno::RuntimeException, lang::IndexOutOfBoundsException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if ((nColumn > (maRange.aEnd.Col() - maRange.aStart.Col())) || (nColumn < 0) ||
@@ -279,7 +280,7 @@ sal_Bool SAL_CALL ScAccessibleTableBase::isAccessibleSelected( sal_Int32 /* nRow
sal_Int32 SAL_CALL ScAccessibleTableBase::getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn )
throw (uno::RuntimeException, lang::IndexOutOfBoundsException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (nRow > (maRange.aEnd.Row() - maRange.aStart.Row()) ||
@@ -296,7 +297,7 @@ sal_Int32 SAL_CALL ScAccessibleTableBase::getAccessibleIndex( sal_Int32 nRow, sa
sal_Int32 SAL_CALL ScAccessibleTableBase::getAccessibleRow( sal_Int32 nChildIndex )
throw (uno::RuntimeException, lang::IndexOutOfBoundsException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (nChildIndex >= getAccessibleChildCount() || nChildIndex < 0)
@@ -308,7 +309,7 @@ sal_Int32 SAL_CALL ScAccessibleTableBase::getAccessibleRow( sal_Int32 nChildInde
sal_Int32 SAL_CALL ScAccessibleTableBase::getAccessibleColumn( sal_Int32 nChildIndex )
throw (uno::RuntimeException, lang::IndexOutOfBoundsException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (nChildIndex >= getAccessibleChildCount() || nChildIndex < 0)
@@ -323,7 +324,7 @@ sal_Int32 SAL_CALL
ScAccessibleTableBase::getAccessibleChildCount(void)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
return static_cast<sal_Int32>(maRange.aEnd.Row() - maRange.aStart.Row() + 1) *
(maRange.aEnd.Col() - maRange.aStart.Col() + 1);
@@ -335,7 +336,7 @@ uno::Reference< XAccessible > SAL_CALL
throw (uno::RuntimeException,
lang::IndexOutOfBoundsException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
if (nIndex >= getAccessibleChildCount() || nIndex < 0)
@@ -402,7 +403,7 @@ sal_Bool SAL_CALL
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
// I don't need to guard, because the called funtions have a guard
-// ScUnoGuard aGuard;
+// SolarMutexGuard aGuard;
if (nChildIndex < 0 || nChildIndex >= getAccessibleChildCount())
throw lang::IndexOutOfBoundsException();
return isAccessibleSelected(getAccessibleRow(nChildIndex), getAccessibleColumn(nChildIndex));
@@ -462,7 +463,7 @@ uno::Sequence<sal_Int8> SAL_CALL
ScAccessibleTableBase::getImplementationId(void)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
IsObjectValid();
static uno::Sequence<sal_Int8> aId;
if (aId.getLength() == 0)
@@ -489,3 +490,5 @@ void ScAccessibleTableBase::CommitTableModelChange(sal_Int32 nStartRow, sal_Int3
CommitChange(aEvent);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx
index 26a98b6cdacc..a4c470093398 100644
--- a/sc/source/ui/Accessibility/AccessibleText.cxx
+++ b/sc/source/ui/Accessibility/AccessibleText.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,7 +43,6 @@
#include "prevwsh.hxx"
#include "docsh.hxx"
#include "prevloc.hxx"
-#include "unoguard.hxx"
#include "patattr.hxx"
#include "inputwin.hxx"
#include <editeng/unofored.hxx>
@@ -54,6 +54,7 @@
#include <editeng/justifyitem.hxx>
#include <svx/svdmodel.hxx>
#include <svx/algitem.hxx>
+#include <vcl/svapp.hxx>
// ============================================================================
@@ -1521,7 +1522,7 @@ ScAccessibleHeaderTextData::ScAccessibleHeaderTextData(ScPreviewShell* pViewShel
ScAccessibleHeaderTextData::~ScAccessibleHeaderTextData()
{
- ScUnoGuard aGuard; // needed for EditEngine dtor
+ SolarMutexGuard aGuard; // needed for EditEngine dtor
if (mpDocSh)
mpDocSh->GetDocument()->RemoveUnoObject(*this);
@@ -1635,7 +1636,7 @@ ScAccessibleNoteTextData::ScAccessibleNoteTextData(ScPreviewShell* pViewShell,
ScAccessibleNoteTextData::~ScAccessibleNoteTextData()
{
- ScUnoGuard aGuard; // needed for EditEngine dtor
+ SolarMutexGuard aGuard; // needed for EditEngine dtor
if (mpDocSh)
mpDocSh->GetDocument()->RemoveUnoObject(*this);
@@ -1841,3 +1842,5 @@ SvxEditViewForwarder* ScAccessibleCsvTextData::GetEditViewForwarder( sal_Bool /*
{
return NULL;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx b/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx
index 31bf438772d0..053d0c11dd94 100644
--- a/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx
+++ b/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -90,3 +91,5 @@ void ScDrawModelBroadcaster::Notify( SfxBroadcaster&,
}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/Accessibility/makefile.mk b/sc/source/ui/Accessibility/makefile.mk
index 32df95750f85..f041ca095bdd 100644
--- a/sc/source/ui/Accessibility/makefile.mk
+++ b/sc/source/ui/Accessibility/makefile.mk
@@ -32,9 +32,7 @@ TARGET=accessibility
# --- Settings -----------------------------------------------------
-.INCLUDE : scpre.mk
.INCLUDE : settings.mk
-.INCLUDE : sc.mk
.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files --------------------------------------------------------
diff --git a/sc/source/ui/app/client.cxx b/sc/source/ui/app/client.cxx
index b1cb325ceb69..1553f37cc05c 100644
--- a/sc/source/ui/app/client.cxx
+++ b/sc/source/ui/app/client.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -254,3 +255,4 @@ void __EXPORT ScClient::MakeVisible()
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx
index b256233d7394..cba682688f1f 100644
--- a/sc/source/ui/app/drwtrans.cxx
+++ b/sc/source/ui/app/drwtrans.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,7 +61,7 @@
#include <svl/itempool.hxx>
#include <svl/urlbmk.hxx>
#include <tools/urlobj.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include "drwtrans.hxx"
#include "docsh.hxx"
@@ -243,7 +244,7 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain
ScDrawTransferObj::~ScDrawTransferObj()
{
- Application::GetSolarMutex().acquire(); //! ???
+ SolarMutexGuard aSolarGuard;
ScModule* pScMod = SC_MOD();
if ( pScMod->GetClipData().pDrawClipboard == this )
@@ -265,8 +266,6 @@ ScDrawTransferObj::~ScDrawTransferObj()
delete pBookmark;
delete pDragSourceView;
-
- Application::GetSolarMutex().release(); //! ???
}
// static
@@ -802,3 +801,4 @@ sal_Int64 SAL_CALL ScDrawTransferObj::getSomething( const com::sun::star::uno::S
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 8e4bf74976a3..697f573cf630 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1805,23 +1806,6 @@ void ScInputHandler::RemoveAdjust()
if ( bUndo )
pEngine->EnableUndo( FALSE );
- // RemoveParaAttribs removes all paragraph attributes, including EE_PARA_JUST
-#if 0
- BOOL bChange = FALSE;
- USHORT nCount = pEngine->GetParagraphCount();
- for (USHORT i=0; i<nCount; i++)
- {
- const SfxItemSet& rOld = pEngine->GetParaAttribs( i );
- if ( rOld.GetItemState( EE_PARA_JUST ) == SFX_ITEM_SET )
- {
- SfxItemSet aNew( rOld );
- aNew.ClearItem( EE_PARA_JUST );
- pEngine->SetParaAttribs( i, aNew );
- bChange = TRUE;
- }
- }
-#endif
-
// #89403# non-default paragraph attributes (e.g. from clipboard)
// must be turned into character attributes
pEngine->RemoveParaAttribs();
@@ -1829,14 +1813,6 @@ void ScInputHandler::RemoveAdjust()
if ( bUndo )
pEngine->EnableUndo( TRUE );
- // ER 31.08.00 Only called in EnterHandler, don't change view anymore.
-#if 0
- if (bChange)
- {
- EditView* pActiveView = pTopView ? pTopView : pTableView;
- pActiveView->ShowCursor( FALSE, TRUE );
- }
-#endif
}
void ScInputHandler::RemoveRangeFinder()
@@ -1855,167 +1831,177 @@ void ScInputHandler::RemoveRangeFinder()
DeleteRangeFinder(); // loescht die Liste und die Markierungen auf der Tabelle
}
-BOOL ScInputHandler::StartTable( sal_Unicode cTyped, BOOL bFromCommand )
+bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bInputActivated )
{
- // returns TRUE if a new edit mode was started
+ bool bNewTable = false;
- BOOL bNewTable = FALSE;
+ if (bModified || !ValidCol(aCursorPos.Col()))
+ return false;
- if (!bModified && ValidCol(aCursorPos.Col()))
+ if (pActiveViewSh)
{
- if (pActiveViewSh)
- {
- ImplCreateEditEngine();
- UpdateActiveView();
- SyncViews();
+ ImplCreateEditEngine();
+ UpdateActiveView();
+ SyncViews();
- ScDocument* pDoc = pActiveViewSh->GetViewData()->GetDocShell()->GetDocument();
+ ScDocument* pDoc = pActiveViewSh->GetViewData()->GetDocShell()->GetDocument();
- const ScMarkData& rMark = pActiveViewSh->GetViewData()->GetMarkData();
- ScEditableTester aTester;
- if ( rMark.IsMarked() || rMark.IsMultiMarked() )
- aTester.TestSelection( pDoc, rMark );
- else
- aTester.TestSelectedBlock( pDoc, aCursorPos.Col(),aCursorPos.Row(),
- aCursorPos.Col(),aCursorPos.Row(), rMark );
- if ( aTester.IsEditable() )
- {
- // UpdateMode is enabled again in ScViewData::SetEditEngine (and not needed otherwise)
- pEngine->SetUpdateMode( FALSE );
+ const ScMarkData& rMark = pActiveViewSh->GetViewData()->GetMarkData();
+ ScEditableTester aTester;
+ if ( rMark.IsMarked() || rMark.IsMultiMarked() )
+ aTester.TestSelection( pDoc, rMark );
+ else
+ aTester.TestSelectedBlock(
+ pDoc, aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Col(), aCursorPos.Row(), rMark );
- // Attribute in EditEngine uebernehmen
+ bool bStartInputMode = true;
- const ScPatternAttr* pPattern = pDoc->GetPattern( aCursorPos.Col(),
- aCursorPos.Row(),
- aCursorPos.Tab() );
- if (pPattern != pLastPattern)
+ if (!aTester.IsEditable())
+ {
+ bProtected = TRUE;
+ // We allow read-only input mode activation when explicit cell
+ // activation is requested (double-click or F2) and if it's not
+ // part of an array.
+ bool bShowError = !bInputActivated || aTester.GetMessageId() != STR_PROTECTIONERR;
+ if (bShowError)
+ {
+ eMode = SC_INPUT_NONE;
+ StopInputWinEngine( TRUE );
+ UpdateFormulaMode();
+ if ( pActiveViewSh && ( !bFromCommand || !bCommandErrorShown ) )
{
- // Prozent-Format?
-
- const SfxItemSet& rAttrSet = pPattern->GetItemSet();
- const SfxPoolItem* pItem;
+ // #97673# Prevent repeated error messages for the same cell from command events
+ // (for keyboard events, multiple messages are wanted).
+ // Set the flag before showing the error message because the command handler
+ // for the next IME command may be called when showing the dialog.
+ if ( bFromCommand )
+ bCommandErrorShown = TRUE;
- if ( SFX_ITEM_SET == rAttrSet.GetItemState( ATTR_VALUE_FORMAT, TRUE, &pItem ) )
- {
- ULONG nFormat = ((const SfxUInt32Item*)pItem)->GetValue();
- bCellHasPercentFormat = ( NUMBERFORMAT_PERCENT ==
- pDoc->GetFormatTable()->GetType( nFormat ) );
- }
- else
- bCellHasPercentFormat = FALSE; // Default: kein Prozent
+ pActiveViewSh->GetActiveWin()->GrabFocus();
+ pActiveViewSh->ErrorMessage(aTester.GetMessageId());
+ }
+ bStartInputMode = false;
+ }
+ }
- // Gueltigkeit angegeben?
+ if (bStartInputMode)
+ {
+ // UpdateMode is enabled again in ScViewData::SetEditEngine (and not needed otherwise)
+ pEngine->SetUpdateMode( FALSE );
- if ( SFX_ITEM_SET == rAttrSet.GetItemState( ATTR_VALIDDATA, TRUE, &pItem ) )
- nValidation = ((const SfxUInt32Item*)pItem)->GetValue();
- else
- nValidation = 0;
+ // Attribute in EditEngine uebernehmen
- // EditEngine Defaults
+ const ScPatternAttr* pPattern = pDoc->GetPattern( aCursorPos.Col(),
+ aCursorPos.Row(),
+ aCursorPos.Tab() );
+ if (pPattern != pLastPattern)
+ {
+ // Prozent-Format?
- // Hier auf keinen Fall SetParaAttribs, weil die EditEngine evtl.
- // schon gefuellt ist (bei Edit-Zellen).
- // SetParaAttribs wuerde dann den Inhalt aendern
+ const SfxItemSet& rAttrSet = pPattern->GetItemSet();
+ const SfxPoolItem* pItem;
- //! ER 30.08.00 The SetDefaults is now (since MUST/src602
- //! EditEngine changes) implemented as a SetParaAttribs.
- //! Any problems?
+ if ( SFX_ITEM_SET == rAttrSet.GetItemState( ATTR_VALUE_FORMAT, TRUE, &pItem ) )
+ {
+ ULONG nFormat = ((const SfxUInt32Item*)pItem)->GetValue();
+ bCellHasPercentFormat = ( NUMBERFORMAT_PERCENT ==
+ pDoc->GetFormatTable()->GetType( nFormat ) );
+ }
+ else
+ bCellHasPercentFormat = FALSE; // Default: kein Prozent
- pPattern->FillEditItemSet( pEditDefaults );
- pEngine->SetDefaults( *pEditDefaults );
- pLastPattern = pPattern;
- bLastIsSymbol = pPattern->IsSymbolFont();
+ // Gueltigkeit angegeben?
- // Background color must be known for automatic font color.
- // For transparent cell background, the document background color must be used.
+ if ( SFX_ITEM_SET == rAttrSet.GetItemState( ATTR_VALIDDATA, TRUE, &pItem ) )
+ nValidation = ((const SfxUInt32Item*)pItem)->GetValue();
+ else
+ nValidation = 0;
- Color aBackCol = ((const SvxBrushItem&)
- pPattern->GetItem( ATTR_BACKGROUND )).GetColor();
- ScModule* pScMod = SC_MOD();
- // #105733# SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
- if ( aBackCol.GetTransparency() > 0 ||
- Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
- aBackCol.SetColor( pScMod->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor );
- pEngine->SetBackgroundColor( aBackCol );
+ // EditEngine Defaults
- // Ausrichtung
+ // Hier auf keinen Fall SetParaAttribs, weil die EditEngine evtl.
+ // schon gefuellt ist (bei Edit-Zellen).
+ // SetParaAttribs wuerde dann den Inhalt aendern
- eAttrAdjust = (SvxCellHorJustify)((const SvxHorJustifyItem&)pPattern->
- GetItem(ATTR_HOR_JUSTIFY)).GetValue();
- if ( eAttrAdjust == SVX_HOR_JUSTIFY_REPEAT &&
- static_cast<const SfxBoolItem&>(pPattern->GetItem(ATTR_LINEBREAK)).GetValue() )
- {
- // #i31843# "repeat" with "line breaks" is treated as default alignment
- eAttrAdjust = SVX_HOR_JUSTIFY_STANDARD;
- }
- }
+ //! ER 30.08.00 The SetDefaults is now (since MUST/src602
+ //! EditEngine changes) implemented as a SetParaAttribs.
+ //! Any problems?
- // UpdateSpellSettings enables online spelling if needed
- // -> also call if attributes are unchanged
+ pPattern->FillEditItemSet( pEditDefaults );
+ pEngine->SetDefaults( *pEditDefaults );
+ pLastPattern = pPattern;
+ bLastIsSymbol = pPattern->IsSymbolFont();
- UpdateSpellSettings( TRUE ); // uses pLastPattern
+ // Background color must be known for automatic font color.
+ // For transparent cell background, the document background color must be used.
- // Edit-Engine fuellen
+ Color aBackCol = ((const SvxBrushItem&)
+ pPattern->GetItem( ATTR_BACKGROUND )).GetColor();
+ ScModule* pScMod = SC_MOD();
+ // #105733# SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
+ if ( aBackCol.GetTransparency() > 0 ||
+ Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
+ aBackCol.SetColor( pScMod->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor );
+ pEngine->SetBackgroundColor( aBackCol );
- String aStr;
- if (bTextValid)
- {
- pEngine->SetText(aCurrentText);
- aStr = aCurrentText;
- bTextValid = FALSE;
- aCurrentText.Erase();
- }
- else
- aStr = GetEditText(pEngine);
+ // Ausrichtung
- if (aStr.Len() > 3 && // Matrix-Formel ?
- aStr.GetChar(0) == '{' &&
- aStr.GetChar(1) == '=' &&
- aStr.GetChar(aStr.Len()-1) == '}')
+ eAttrAdjust = (SvxCellHorJustify)((const SvxHorJustifyItem&)pPattern->
+ GetItem(ATTR_HOR_JUSTIFY)).GetValue();
+ if ( eAttrAdjust == SVX_HOR_JUSTIFY_REPEAT &&
+ static_cast<const SfxBoolItem&>(pPattern->GetItem(ATTR_LINEBREAK)).GetValue() )
{
- aStr.Erase(0,1);
- aStr.Erase(aStr.Len()-1,1);
- pEngine->SetText(aStr);
- if ( pInputWin )
- pInputWin->SetTextString(aStr);
+ // #i31843# "repeat" with "line breaks" is treated as default alignment
+ eAttrAdjust = SVX_HOR_JUSTIFY_STANDARD;
}
+ }
- UpdateAdjust( cTyped );
+ // UpdateSpellSettings enables online spelling if needed
+ // -> also call if attributes are unchanged
- if ( bAutoComplete )
- GetColData();
+ UpdateSpellSettings( TRUE ); // uses pLastPattern
- if ( ( aStr.GetChar(0) == '=' || aStr.GetChar(0) == '+' || aStr.GetChar(0) == '-' ) &&
- !cTyped && !bCreatingFuncView )
- InitRangeFinder(aStr); // Formel wird editiert -> RangeFinder
+ // Edit-Engine fuellen
- bNewTable = TRUE; // -> PostEditView-Aufruf
+ String aStr;
+ if (bTextValid)
+ {
+ pEngine->SetText(aCurrentText);
+ aStr = aCurrentText;
+ bTextValid = FALSE;
+ aCurrentText.Erase();
}
else
- {
- bProtected = TRUE;
- eMode = SC_INPUT_NONE;
- StopInputWinEngine( TRUE );
- UpdateFormulaMode();
- if ( pActiveViewSh && ( !bFromCommand || !bCommandErrorShown ) )
- {
- // #97673# Prevent repeated error messages for the same cell from command events
- // (for keyboard events, multiple messages are wanted).
- // Set the flag before showing the error message because the command handler
- // for the next IME command may be called when showing the dialog.
- if ( bFromCommand )
- bCommandErrorShown = TRUE;
+ aStr = GetEditText(pEngine);
- pActiveViewSh->GetActiveWin()->GrabFocus();
- pActiveViewSh->ErrorMessage(aTester.GetMessageId());
- }
+ if (aStr.Len() > 3 && // Matrix-Formel ?
+ aStr.GetChar(0) == '{' &&
+ aStr.GetChar(1) == '=' &&
+ aStr.GetChar(aStr.Len()-1) == '}')
+ {
+ aStr.Erase(0,1);
+ aStr.Erase(aStr.Len()-1,1);
+ pEngine->SetText(aStr);
+ if ( pInputWin )
+ pInputWin->SetTextString(aStr);
}
- }
- if (!bProtected && pInputWin)
- pInputWin->SetOkCancelMode();
+ UpdateAdjust( cTyped );
+
+ if ( bAutoComplete )
+ GetColData();
+
+ if ( ( aStr.GetChar(0) == '=' || aStr.GetChar(0) == '+' || aStr.GetChar(0) == '-' ) &&
+ !cTyped && !bCreatingFuncView )
+ InitRangeFinder(aStr); // Formel wird editiert -> RangeFinder
+
+ bNewTable = true; // -> PostEditView-Aufruf
+ }
}
+ if (!bProtected && pInputWin)
+ pInputWin->SetOkCancelMode();
+
return bNewTable;
}
@@ -2089,7 +2075,7 @@ BOOL ScInputHandler::DataChanging( sal_Unicode cTyped, BOOL bFromCommand )
bInOwnChange = TRUE; // disable ModifyHdl (reset in DataChanged)
if ( eMode == SC_INPUT_NONE )
- return StartTable( cTyped, bFromCommand );
+ return StartTable( cTyped, bFromCommand, false );
else
return FALSE;
}
@@ -2285,7 +2271,6 @@ void ScInputHandler::InvalidateAttribs()
}
}
-
//
// --------------- public Methoden --------------------------------------------
//
@@ -2321,7 +2306,7 @@ void ScInputHandler::SetMode( ScInputMode eNewMode )
{
if (eOldMode == SC_INPUT_NONE) // not when switching between modes
{
- if (StartTable(0, FALSE)) // 0 = look at existing document content for text or number
+ if (StartTable(0, false, eMode == SC_INPUT_TABLE))
{
if (pActiveViewSh)
pActiveViewSh->GetViewData()->GetDocShell()->PostEditView( pEngine, aCursorPos );
@@ -3685,7 +3670,6 @@ BOOL ScInputHandler::GetTextAndFields( ScEditEngineDefaulter& rDestEngine )
return bRet;
}
-
//------------------------------------------------------------------------
// Methoden fuer FunktionsAutopiloten:
// InputGetSelection, InputSetSelection, InputReplaceSelection, InputGetFormulaStr
@@ -3841,6 +3825,4 @@ ScInputHdlState& ScInputHdlState::operator=( const ScInputHdlState& r )
return *this;
}
-
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index eef17b11bd5b..e2c865e7d5b9 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -757,11 +758,11 @@ ScTextWnd::ScTextWnd( Window* pParent )
__EXPORT ScTextWnd::~ScTextWnd()
{
- delete pEditView;
- delete pEditEngine;
while (!maAccTextDatas.empty()) {
maAccTextDatas.back()->Dispose();
}
+ delete pEditView;
+ delete pEditEngine;
}
void __EXPORT ScTextWnd::Paint( const Rectangle& rRec )
@@ -1808,3 +1809,4 @@ void ScPosWnd::ReleaseFocus_Impl()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/app/lnktrans.cxx b/sc/source/ui/app/lnktrans.cxx
index 2e0f5d276a97..055f8da1a828 100644
--- a/sc/source/ui/app/lnktrans.cxx
+++ b/sc/source/ui/app/lnktrans.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -95,3 +96,4 @@ void ScLinkTransferObj::DragFinished( sal_Int8 nDropAction )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/app/makefile.mk b/sc/source/ui/app/makefile.mk
index a7ff3fe86d7d..9d487ba207fc 100644
--- a/sc/source/ui/app/makefile.mk
+++ b/sc/source/ui/app/makefile.mk
@@ -32,9 +32,7 @@ TARGET=app
# --- Settings -----------------------------------------------------
-.INCLUDE : scpre.mk
.INCLUDE : settings.mk
-.INCLUDE : sc.mk
.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files --------------------------------------------------------
diff --git a/sc/source/ui/app/msgpool.cxx b/sc/source/ui/app/msgpool.cxx
index 78cb70fa64f0..0de23989202f 100644
--- a/sc/source/ui/app/msgpool.cxx
+++ b/sc/source/ui/app/msgpool.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -121,3 +122,4 @@ SfxMapUnit __EXPORT ScMessagePool::GetMetric( USHORT nWhich ) const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/app/rfindlst.cxx b/sc/source/ui/app/rfindlst.cxx
index 3d62c0396b51..8f2526197787 100644
--- a/sc/source/ui/app/rfindlst.cxx
+++ b/sc/source/ui/app/rfindlst.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,3 +66,4 @@ ColorData ScRangeFindList::GetColorName( USHORT nIndex ) // static
//==================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx
index ebc5a14687a7..8cd7a4e74686 100644
--- a/sc/source/ui/app/scdll.cxx
+++ b/sc/source/ui/app/scdll.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -344,3 +345,5 @@ void ScDLL::Exit()
// DetectFilter functionality has moved - please update your bookmarks
// see sc/source/ui/unoobj/scdetect.cxx, have a nice day.
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 19ecdcb728df..66b9fade4d8f 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1152,6 +1153,10 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
if ( pDoc )
{
const ScDocOptions& rOldOpt = pDoc->GetDocOptions();
+ ScOptionsUtil::KeyBindingType eKeyOld = rOldOpt.GetKeyBindingType();
+ ScOptionsUtil::KeyBindingType eKeyNew = rNewOpt.GetKeyBindingType();
+ if (eKeyOld != eKeyNew)
+ pDocSh->ResetKeyBindings(eKeyNew);
bRepaint = ( bRepaint || ( rOldOpt != rNewOpt ) );
bCalcAll = bRepaint &&
@@ -2109,6 +2114,13 @@ SfxTabPage* ScModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItem
pRet = (*ScTpFormulaOptionsCreate)(pParent, rSet);
}
break;
+ case SID_SC_TP_COMPATIBILITY:
+ {
+ ::CreateTabPage ScTpCompatOptionsCreate = pFact->GetTabPageCreatorFunc (RID_SCPAGE_COMPATIBILITY);
+ if (ScTpCompatOptionsCreate)
+ pRet = (*ScTpCompatOptionsCreate)(pParent, rSet);
+ }
+ break;
case SID_SC_TP_CHANGES:
{
::CreateTabPage ScRedlineOptionsTabPageCreate = pFact->GetTabPageCreatorFunc( RID_SCPAGE_OPREDLINE );
@@ -2274,3 +2286,4 @@ Window * ScModule::Find1RefWindow( Window *pWndAncestor )
return NULL;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/app/scmod2.cxx b/sc/source/ui/app/scmod2.cxx
index c92f0bf5d206..246d204038ae 100644
--- a/sc/source/ui/app/scmod2.cxx
+++ b/sc/source/ui/app/scmod2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -105,3 +106,4 @@ BOOL ScModule::HasThesaurusLanguage( USHORT nLang )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/app/seltrans.cxx b/sc/source/ui/app/seltrans.cxx
index 0b213709863d..1866008f6782 100644
--- a/sc/source/ui/app/seltrans.cxx
+++ b/sc/source/ui/app/seltrans.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -447,3 +448,4 @@ void ScSelectionTransferObj::ObjectReleased()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/app/template.cxx b/sc/source/ui/app/template.cxx
index 80dc667c5de6..edb30ff6468d 100644
--- a/sc/source/ui/app/template.cxx
+++ b/sc/source/ui/app/template.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -77,3 +78,4 @@ void ScTemplateDlg::ToggleApplyTemplate()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index 537f464ed045..906a0f3e150a 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,7 +47,7 @@
#include <sot/storage.hxx>
#include <vcl/svapp.hxx>
#include <vcl/virdev.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <sfx2/app.hxx>
#include <sfx2/docfile.hxx>
@@ -193,7 +194,7 @@ ScTransferObj::ScTransferObj( ScDocument* pClipDoc, const TransferableObjectDesc
ScTransferObj::~ScTransferObj()
{
- Application::GetSolarMutex().acquire();
+ SolarMutexGuard aSolarGuard;
ScModule* pScMod = SC_MOD();
if ( pScMod->GetClipData().pCellClipboard == this )
@@ -213,7 +214,6 @@ ScTransferObj::~ScTransferObj()
aDrawPersistRef.Clear(); // after the model
- Application::GetSolarMutex().release();
}
// static
@@ -866,3 +866,4 @@ sal_Int64 SAL_CALL ScTransferObj::getSomething( const com::sun::star::uno::Seque
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/app/typemap.cxx b/sc/source/ui/app/typemap.cxx
index 253560ca010c..10c35fde833f 100644
--- a/sc/source/ui/app/typemap.cxx
+++ b/sc/source/ui/app/typemap.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -134,3 +135,5 @@
#define SFX_TYPEMAP
#include "scslots.hxx"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/app/uiitems.cxx b/sc/source/ui/app/uiitems.cxx
index 3cd83ed42c03..4148b96675c6 100644
--- a/sc/source/ui/app/uiitems.cxx
+++ b/sc/source/ui/app/uiitems.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -719,3 +720,5 @@ SfxPoolItem* __EXPORT ScCondFrmtItem::Clone( SfxItemPool * ) const
{
return new ScCondFrmtItem( *this );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/app/wtcdummy.cxx b/sc/source/ui/app/wtcdummy.cxx
index a755830cbd71..055a37a644f4 100644
--- a/sc/source/ui/app/wtcdummy.cxx
+++ b/sc/source/ui/app/wtcdummy.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,3 +64,5 @@ SdbRow::~SdbRow()
{
DBG_ERROR("WATCOM Hack failed !");
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/attrdlg/attrdlg.cxx b/sc/source/ui/attrdlg/attrdlg.cxx
index c9f70fb91285..6c33476e9d89 100644
--- a/sc/source/ui/attrdlg/attrdlg.cxx
+++ b/sc/source/ui/attrdlg/attrdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -71,7 +72,7 @@ ScAttrDlg::ScAttrDlg( SfxViewFrame* pFrameP,
#if LAYOUT_SFX_TABDIALOG_BROKEN
AddTabPage( TP_NUMBER, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT ), 0 );
#else
- String number = rtl::OUString::createFromAscii ("Numbers");
+ String number(RTL_CONSTASCII_USTRINGPARAM("Numbers"));
AddTabPage( TP_NUMBER, number, pFact->GetTabPageCreatorFunc (RID_SVXPAGE_NUMBERFORMAT), 0, FALSE, TAB_APPEND);
#endif
DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), "GetTabPageCreatorFunc fail!");
@@ -143,3 +144,4 @@ IMPL_LINK( ScAttrDlg, OkHandler, void*, EMPTYARG )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/attrdlg/condfrmt.cxx b/sc/source/ui/attrdlg/condfrmt.cxx
index 5e3b23af8afa..dbdad9aace69 100644
--- a/sc/source/ui/attrdlg/condfrmt.cxx
+++ b/sc/source/ui/attrdlg/condfrmt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -827,3 +828,4 @@ IMPL_LINK( ScConditionalFormatDlg, NewBtnHdl, PushButton*, pBtn )
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/attrdlg/makefile.mk b/sc/source/ui/attrdlg/makefile.mk
index 378fd1052ff7..9b4dc49dec57 100644
--- a/sc/source/ui/attrdlg/makefile.mk
+++ b/sc/source/ui/attrdlg/makefile.mk
@@ -33,9 +33,7 @@ LIBTARGET=no
# --- Settings -----------------------------------------------------
-.INCLUDE : scpre.mk
.INCLUDE : settings.mk
-.INCLUDE : sc.mk
.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files --------------------------------------------------------
diff --git a/sc/source/ui/attrdlg/scabstdlg.cxx b/sc/source/ui/attrdlg/scabstdlg.cxx
index b50435041409..7ab625e03f61 100644
--- a/sc/source/ui/attrdlg/scabstdlg.cxx
+++ b/sc/source/ui/attrdlg/scabstdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -49,8 +50,10 @@ ScAbstractDialogFactory* ScAbstractDialogFactory::Create()
if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, aStrBuf.makeStringAndClear() ) )
fp = ( ScAbstractDialogFactory* (__LOADONCALLAPI*)() )
- aDialogLibrary.getFunctionSymbol( ::rtl::OUString::createFromAscii("CreateDialogFactory") );
+ aDialogLibrary.getFunctionSymbol( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CreateDialogFactory")) );
if ( fp )
return fp();
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index e9141f40a871..b4035b187197 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -80,6 +81,8 @@
#include "tpusrlst.hxx" //add for ScTpUserLists
#include "tpview.hxx" //add for ScTpContentOptions
#include "tpformula.hxx"
+#include "datafdlg.hxx" //add for ScDataFormDlg
+#include "tpcompatibility.hxx"
// ause
#include "editutil.hxx"
@@ -93,6 +96,8 @@ IMPL_ABSTDLG_BASE(AbstractScDataPilotDatabaseDlg_Impl); //add for ScDataPilotDat
IMPL_ABSTDLG_BASE(AbstractScDataPilotSourceTypeDlg_Impl); //add for ScDataPilotSourceTypeDlg
IMPL_ABSTDLG_BASE(AbstractScDataPilotServiceDlg_Impl); //add for ScDataPilotServiceDlg
IMPL_ABSTDLG_BASE(AbstractScDeleteCellDlg_Impl); //add for ScDeleteCellDlg
+//for dataform
+IMPL_ABSTDLG_BASE(AbstractScDataFormDlg_Impl); //add for ScDataFormDlg
IMPL_ABSTDLG_BASE(AbstractScDeleteContentsDlg_Impl); //add for ScDeleteContentsDlg
IMPL_ABSTDLG_BASE(AbstractScFillSeriesDlg_Impl); //add for ScFillSeriesDlg
IMPL_ABSTDLG_BASE(AbstractScGroupDlg_Impl); //add for ScGroupDlg
@@ -864,6 +869,26 @@ AbstractScDeleteCellDlg* ScAbstractDialogFactory_Impl::CreateScDeleteCellDlg( Wi
//add for ScDeleteCellDlg end
+//add for ScDataFormDlg begin
+AbstractScDataFormDlg* ScAbstractDialogFactory_Impl::CreateScDataFormDlg( Window* pParent, int nId, ScTabViewShell* pTabViewShell )
+{
+ ScDataFormDlg * pDlg=NULL;
+ switch ( nId )
+ {
+ case RID_SCDLG_DATAFORM :
+ pDlg = new ScDataFormDlg( pParent, pTabViewShell);
+ break;
+ default:
+ break;
+ }
+
+ if ( pDlg )
+ return new AbstractScDataFormDlg_Impl( pDlg );
+ return 0;
+}
+
+//add for ScDataFormDlg end
+
//add for ScDeleteContentsDlg begin
AbstractScDeleteContentsDlg* ScAbstractDialogFactory_Impl::CreateScDeleteContentsDlg(Window* pParent,int nId, //add for ScDeleteContentsDlg
USHORT nCheckDefaults )
@@ -1557,6 +1582,8 @@ CreateTabPage ScAbstractDialogFactory_Impl::GetTabPageCreatorFunc( USHORT nId )
//break;
case RID_SCPAGE_FORMULA:
return ScTpFormulaOptions::Create;
+ case RID_SCPAGE_COMPATIBILITY:
+ return ScTpCompatOptions::Create;
case RID_SCPAGE_PRINT :
return ScTpPrintOptions::Create;
//break;
@@ -1601,3 +1628,4 @@ void ScDPFunctionDlg_Dummy()
ScDPListBoxWrapper aWrapper( *pListBox );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index d0d3d0879e5f..9815fd22d51e 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,6 +38,7 @@ class ScDataPilotDatabaseDlg;
class ScDataPilotSourceTypeDlg;
class ScDataPilotServiceDlg;
class ScDeleteCellDlg;
+class ScDataFormDlg;
class ScDeleteContentsDlg;
class ScFillSeriesDlg;
class ScGroupDlg;
@@ -163,6 +165,12 @@ class AbstractScDeleteCellDlg_Impl : public AbstractScDeleteCellDlg //add for S
virtual DelCellCmd GetDelCellCmd() const;
};
+//for dataform
+class AbstractScDataFormDlg_Impl : public AbstractScDataFormDlg //add for ScDataFormDlg
+{
+ DECL_ABSTDLG_BASE(AbstractScDataFormDlg_Impl,ScDataFormDlg);
+};
+
class AbstractScDeleteContentsDlg_Impl : public AbstractScDeleteContentsDlg //add for ScDeleteContentsDlg
{
DECL_ABSTDLG_BASE( AbstractScDeleteContentsDlg_Impl,ScDeleteContentsDlg)
@@ -424,6 +432,9 @@ public:
virtual AbstractScDeleteCellDlg * CreateScDeleteCellDlg( Window* pParent, int nId,
BOOL bDisallowCellMove = FALSE ); //add for ScDeleteCellDlg
+ //for dataform
+ virtual AbstractScDataFormDlg * CreateScDataFormDlg( Window* pParent, int nId, ScTabViewShell* pTabViewShell); //add for ScDeleteCellDlg
+
virtual AbstractScDeleteContentsDlg * CreateScDeleteContentsDlg(Window* pParent,int nId, //add for ScDeleteContentsDlg
USHORT nCheckDefaults = 0 );
@@ -580,3 +591,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/attrdlg/scuiexp.cxx b/sc/source/ui/attrdlg/scuiexp.cxx
index 35a0a3a1fb35..41ed3cdf9502 100644
--- a/sc/source/ui/attrdlg/scuiexp.cxx
+++ b/sc/source/ui/attrdlg/scuiexp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,3 +54,5 @@ extern "C"
return ::scui::GetFactory();
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/attrdlg/tabpages.cxx b/sc/source/ui/attrdlg/tabpages.cxx
index 21c769cf0603..84298f174211 100644
--- a/sc/source/ui/attrdlg/tabpages.cxx
+++ b/sc/source/ui/attrdlg/tabpages.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -248,3 +249,5 @@ void ScTabPageProtection::UpdateButtons()
aBtnHideFormula.Enable( bEnable );
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/cctrl/cbuttonw.cxx b/sc/source/ui/cctrl/cbuttonw.cxx
index 6004fdfcfc51..4634b179664a 100644
--- a/sc/source/ui/cctrl/cbuttonw.cxx
+++ b/sc/source/ui/cctrl/cbuttonw.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -176,3 +177,4 @@ void ScDDComboBoxButton::ImpDrawArrow( const Rectangle& rRect,
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx
index 82c276d98f2c..78c1871c1e1e 100644
--- a/sc/source/ui/cctrl/dpcontrol.cxx
+++ b/sc/source/ui/cctrl/dpcontrol.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -66,7 +67,8 @@ ScDPFieldButton::ScDPFieldButton(OutputDevice* pOutDev, const StyleSettings* pSt
mbBaseButton(true),
mbPopupButton(false),
mbHasHiddenMember(false),
- mbPopupPressed(false)
+ mbPopupPressed(false),
+ mbPopupLeft(false)
{
if (pZoomX)
maZoomX = *pZoomX;
@@ -88,10 +90,15 @@ void ScDPFieldButton::setText(const OUString& rText)
maText = rText;
}
-void ScDPFieldButton::setBoundingBox(const Point& rPos, const Size& rSize)
+void ScDPFieldButton::setBoundingBox(const Point& rPos, const Size& rSize, bool bLayoutRTL)
{
maPos = rPos;
maSize = rSize;
+ if (bLayoutRTL)
+ {
+ // rPos is the logical-left position, adjust maPos to visual-left (inside the cell border)
+ maPos.X() -= maSize.Width() - 1;
+ }
}
void ScDPFieldButton::setDrawBaseButton(bool b)
@@ -114,6 +121,11 @@ void ScDPFieldButton::setPopupPressed(bool b)
mbPopupPressed = b;
}
+void ScDPFieldButton::setPopupLeft(bool b)
+{
+ mbPopupLeft = b;
+}
+
void ScDPFieldButton::draw()
{
const long nMargin = 2;
@@ -179,7 +191,12 @@ void ScDPFieldButton::getPopupBoundingBox(Point& rPos, Size& rSize) const
if (nH > 18)
nH = 18;
- rPos.setX(maPos.getX() + maSize.getWidth() - nW);
+ // #i114944# AutoFilter button is left-aligned in RTL.
+ // DataPilot button is always right-aligned for now, so text output isn't affected.
+ if (mbPopupLeft)
+ rPos.setX(maPos.getX());
+ else
+ rPos.setX(maPos.getX() + maSize.getWidth() - nW);
rPos.setY(maPos.getY() + maSize.getHeight() - nH);
rSize.setWidth(nW);
rSize.setHeight(nH);
@@ -294,7 +311,7 @@ ScMenuFloatingWindow::ScMenuFloatingWindow(Window* pParent, ScDocument* pDoc, US
PopupMenuFloatingWindow(pParent),
maOpenTimer(this),
maCloseTimer(this),
- maName(OUString::createFromAscii("ScMenuFloatingWindow")),
+ maName(RTL_CONSTASCII_USTRINGPARAM("ScMenuFloatingWindow")),
mnSelectedMenu(MENU_NOT_SELECTED),
mnClickedMenu(MENU_NOT_SELECTED),
mpDoc(pDoc),
@@ -310,7 +327,7 @@ ScMenuFloatingWindow::ScMenuFloatingWindow(Window* pParent, ScDocument* pDoc, US
maLabelFont.SetHeight(nPopupFontHeight);
SetFont(maLabelFont);
- SetText(OUString::createFromAscii("ScMenuFloatingWindow"));
+ SetText( OUString(RTL_CONSTASCII_USTRINGPARAM("ScMenuFloatingWindow")) );
SetPopupModeEndHdl( LINK(this, ScMenuFloatingWindow, PopupEndHdl) );
}
@@ -1404,3 +1421,4 @@ void ScDPFieldPopupWindow::setOKAction(Action* p)
mpOKAction.reset(p);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/cctrl/editfield.cxx b/sc/source/ui/cctrl/editfield.cxx
index 4358694f6b04..d52ccefea685 100644
--- a/sc/source/ui/cctrl/editfield.cxx
+++ b/sc/source/ui/cctrl/editfield.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -82,3 +83,4 @@ void ScDoubleField::SetValue( double fValue, sal_Int32 nDecPlaces, bool bEraseTr
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/cctrl/makefile.mk b/sc/source/ui/cctrl/makefile.mk
index 531013ea1c2e..70b5490a9626 100644
--- a/sc/source/ui/cctrl/makefile.mk
+++ b/sc/source/ui/cctrl/makefile.mk
@@ -33,9 +33,7 @@ LIBTARGET=NO
# --- Settings -----------------------------------------------------
-.INCLUDE : scpre.mk
.INCLUDE : settings.mk
-.INCLUDE : sc.mk
.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files --------------------------------------------------------
diff --git a/sc/source/ui/cctrl/popmenu.cxx b/sc/source/ui/cctrl/popmenu.cxx
index 6510fff87ead..742104ea517f 100644
--- a/sc/source/ui/cctrl/popmenu.cxx
+++ b/sc/source/ui/cctrl/popmenu.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,3 +47,4 @@ void __EXPORT ScPopupMenu::Select()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/cctrl/tbinsert.cxx b/sc/source/ui/cctrl/tbinsert.cxx
index e27baecec115..6c439fd94693 100644
--- a/sc/source/ui/cctrl/tbinsert.cxx
+++ b/sc/source/ui/cctrl/tbinsert.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -230,3 +231,4 @@ void __EXPORT ScTbxInsertPopup::PopupModeEnd()
*/
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
index 220a135d9a2e..9fe3acc0af73 100644
--- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
+++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -528,3 +529,5 @@ void ScZoomSliderWnd::DoPaint( const Rectangle& /*rRect*/ )
}
// -----------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dbgui/asciiopt.cxx b/sc/source/ui/dbgui/asciiopt.cxx
index a22953ade25b..f101809552c9 100644
--- a/sc/source/ui/dbgui/asciiopt.cxx
+++ b/sc/source/ui/dbgui/asciiopt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -402,79 +403,4 @@ String ScAsciiOptions::WriteToString() const
return aOutStr;
}
-#if 0
-// Code, um die Spalten-Liste aus einem Excel-kompatiblen String zu erzeugen:
-// (im Moment nicht benutzt)
-
-void ScAsciiOptions::InterpretColumnList( const String& rString )
-{
- // Eingabe ist 1-basiert, pColStart fuer FixedLen ist 0-basiert
-
- // Kommas durch Semikolon ersetzen
-
- String aSemiStr = rString;
- USHORT nPos = 0;
- do
- nPos = aSemiStr.SearchAndReplace( ',', ';', nPos );
- while ( nPos != STRING_NOTFOUND );
-
- // Eintraege sortieren
-
- USHORT nCount = aSemiStr.GetTokenCount();
- USHORT* pTemp = new USHORT[nCount+1];
- pTemp[0] = 1; // erste Spalte faengt immer bei 1 an
- USHORT nFound = 1;
- USHORT i,j;
- for (i=0; i<nCount; i++)
- {
- USHORT nVal = (USHORT) aSemiStr.GetToken(i);
- if (nVal)
- {
- BOOL bThere = FALSE;
- nPos = 0;
- for (j=0; j<nFound; j++)
- {
- if ( pTemp[j] == nVal )
- bThere = TRUE;
- else if ( pTemp[j] < nVal )
- nPos = j+1;
- }
- if ( !bThere )
- {
- if ( nPos < nFound )
- memmove( &pTemp[nPos+1], &pTemp[nPos], (nFound-nPos)*sizeof(USHORT) );
- pTemp[nPos] = nVal;
- ++nFound;
- }
- }
- }
-
- // Eintraege uebernehmen
-
- delete[] pColStart;
- delete[] pColFormat;
- nInfoCount = nFound;
- if (nInfoCount)
- {
- pColStart = new USHORT[nInfoCount];
- pColFormat = new BYTE[nInfoCount];
- for (i=0; i<nInfoCount; i++)
- {
- pColStart[i] = pTemp[i] - 1;
- pColFormat[i] = SC_COL_STANDARD;
- }
- }
- else
- {
- pColStart = NULL;
- pColFormat = NULL;
- }
-
- bFixedLen = TRUE; // sonst macht's keinen Sinn
-
- // aufraeumen
-
- delete[] pTemp;
-}
-#endif
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx
index e094149ab99b..7e2bafd2c42b 100644
--- a/sc/source/ui/dbgui/consdlg.cxx
+++ b/sc/source/ui/dbgui/consdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -653,3 +654,4 @@ USHORT ScConsolidateDlg::FuncToLbPos( ScSubTotalFunc eFunc )
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dbgui/csvcontrol.cxx b/sc/source/ui/dbgui/csvcontrol.cxx
index 0dbc4e7dab39..3455fa72c1fd 100644
--- a/sc/source/ui/dbgui/csvcontrol.cxx
+++ b/sc/source/ui/dbgui/csvcontrol.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -335,3 +336,4 @@ ScCsvControl::XAccessibleRef ScCsvControl::CreateAccessible()
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index d271022a987c..a18bbb7e2607 100644
--- a/sc/source/ui/dbgui/csvgrid.cxx
+++ b/sc/source/ui/dbgui/csvgrid.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1353,3 +1354,4 @@ ScAccessibleCsvControl* ScCsvGrid::ImplCreateAccessible()
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dbgui/csvruler.cxx b/sc/source/ui/dbgui/csvruler.cxx
index 56aa2a50a835..84d5ad6bee1b 100644
--- a/sc/source/ui/dbgui/csvruler.cxx
+++ b/sc/source/ui/dbgui/csvruler.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -680,3 +681,4 @@ ScAccessibleCsvControl* ScCsvRuler::ImplCreateAccessible()
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dbgui/csvsplits.cxx b/sc/source/ui/dbgui/csvsplits.cxx
index b93bb09b5151..5215f3f9a799 100644
--- a/sc/source/ui/dbgui/csvsplits.cxx
+++ b/sc/source/ui/dbgui/csvsplits.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -118,3 +119,4 @@ sal_uInt32 ScCsvSplits::GetIterIndex( const_iterator aIter ) const
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dbgui/csvtablebox.cxx b/sc/source/ui/dbgui/csvtablebox.cxx
index e6a900845eef..e7d3071da1f3 100644
--- a/sc/source/ui/dbgui/csvtablebox.cxx
+++ b/sc/source/ui/dbgui/csvtablebox.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -432,3 +433,4 @@ ScAccessibleCsvControl* ScCsvTableBox::ImplCreateAccessible()
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dbgui/dapidata.cxx b/sc/source/ui/dbgui/dapidata.cxx
index 976e0ae23039..ab2159af2f93 100644
--- a/sc/source/ui/dbgui/dapidata.cxx
+++ b/sc/source/ui/dbgui/dapidata.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -227,3 +228,4 @@ void ScDataPilotDatabaseDlg::FillObjects()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dbgui/dapitype.cxx b/sc/source/ui/dbgui/dapitype.cxx
index 31aafbcb13da..b9ca10fef09e 100644
--- a/sc/source/ui/dbgui/dapitype.cxx
+++ b/sc/source/ui/dbgui/dapitype.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -140,3 +141,4 @@ String ScDataPilotServiceDlg::GetParPass() const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx
index a2f4d61af537..1782e4245b1d 100644
--- a/sc/source/ui/dbgui/dbnamdlg.cxx
+++ b/sc/source/ui/dbgui/dbnamdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -719,3 +720,4 @@ IMPL_LINK( ScDbNameDlg, AssModifyHdl, void *, EMPTYARG )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dbgui/dpgroupdlg.cxx b/sc/source/ui/dbgui/dpgroupdlg.cxx
index 2e3da92fbd05..e665b215c0e9 100644
--- a/sc/source/ui/dbgui/dpgroupdlg.cxx
+++ b/sc/source/ui/dbgui/dpgroupdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -354,3 +355,4 @@ IMPL_LINK( ScDPDateGroupDlg, CheckHdl, SvxCheckListBox*, pListBox )
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dbgui/expftext.cxx b/sc/source/ui/dbgui/expftext.cxx
index 405a18fcc004..b05d9c193638 100644
--- a/sc/source/ui/dbgui/expftext.cxx
+++ b/sc/source/ui/dbgui/expftext.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -93,3 +94,4 @@ void ScExpandedFixedText::RequestHelp(const HelpEvent& rEvt)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dbgui/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx
index d4b477cd4b33..8c181959f049 100644
--- a/sc/source/ui/dbgui/fieldwnd.cxx
+++ b/sc/source/ui/dbgui/fieldwnd.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -774,3 +775,4 @@ String ScDPFieldWindow::GetDescription() const
//===================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index 8ca95f70441e..02188e367f0c 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1184,3 +1185,5 @@ void ScFilterDlg::RefreshEditRow( USHORT nOffset )
UpdateValueList( static_cast<USHORT>(i+1) );
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dbgui/foptmgr.cxx b/sc/source/ui/dbgui/foptmgr.cxx
index 1e274690c31c..d6b331494667 100644
--- a/sc/source/ui/dbgui/foptmgr.cxx
+++ b/sc/source/ui/dbgui/foptmgr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -335,3 +336,5 @@ IMPL_LINK( ScFilterOptionsMgr, BtnCopyResultHdl, CheckBox*, pBox )
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dbgui/imoptdlg.cxx b/sc/source/ui/dbgui/imoptdlg.cxx
index bd18008afd47..641ce7dc6374 100644
--- a/sc/source/ui/dbgui/imoptdlg.cxx
+++ b/sc/source/ui/dbgui/imoptdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -88,3 +89,5 @@ void ScImportOptions::SetTextEncoding( rtl_TextEncoding nEnc )
gsl_getSystemTextEncoding() : nEnc);
aStrFont = ScGlobal::GetCharsetString( nEnc );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dbgui/makefile.mk b/sc/source/ui/dbgui/makefile.mk
index 1e7000d0cb07..ab632bf1b1e7 100644
--- a/sc/source/ui/dbgui/makefile.mk
+++ b/sc/source/ui/dbgui/makefile.mk
@@ -33,9 +33,7 @@ LIBTARGET=no
# --- Settings -----------------------------------------------------
-.INCLUDE : scpre.mk
.INCLUDE : settings.mk
-.INCLUDE : sc.mk
.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files --------------------------------------------------------
diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx
index d590ffb83457..dfbf7e8989fa 100644
--- a/sc/source/ui/dbgui/pfiltdlg.cxx
+++ b/sc/source/ui/dbgui/pfiltdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -618,3 +619,4 @@ IMPL_LINK( ScPivotFilterDlg, ValModifyHdl, ComboBox*, pEd )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx
index daa549688f21..4e834fb95935 100644
--- a/sc/source/ui/dbgui/pvfundlg.cxx
+++ b/sc/source/ui/dbgui/pvfundlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -854,3 +855,4 @@ IMPL_LINK( ScDPShowDetailDlg, DblClickHdl, ListBox*, pLBox )
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dbgui/pvglob.hxx b/sc/source/ui/dbgui/pvglob.hxx
index 6b6526266035..2ad61405aae8 100644
--- a/sc/source/ui/dbgui/pvglob.hxx
+++ b/sc/source/ui/dbgui/pvglob.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,3 +41,5 @@ public:
#endif // SC_PVGLOB_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx
index 2d3ae285c45f..3b26d1c836f6 100644
--- a/sc/source/ui/dbgui/pvlaydlg.cxx
+++ b/sc/source/ui/dbgui/pvlaydlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1867,3 +1868,4 @@ IMPL_LINK( ScDPLayoutDlg, GetFocusHdl, Control*, pCtrl )
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dbgui/scendlg.cxx b/sc/source/ui/dbgui/scendlg.cxx
index 58e153387e09..916bb0db8a34 100644
--- a/sc/source/ui/dbgui/scendlg.cxx
+++ b/sc/source/ui/dbgui/scendlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -241,3 +242,4 @@ IMPL_LINK( ScNewScenarioDlg, EnableHdl, CheckBox *, pBox )
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx
index e29e33e8fd64..67817a140af2 100644
--- a/sc/source/ui/dbgui/scuiasciiopt.cxx
+++ b/sc/source/ui/dbgui/scuiasciiopt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -721,3 +722,5 @@ IMPL_LINK( ScImportAsciiDlg, ColTypeHdl, ScCsvTableBox*, pTableBox )
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dbgui/scuiimoptdlg.cxx b/sc/source/ui/dbgui/scuiimoptdlg.cxx
index 5440f515c86a..547983af83fe 100644
--- a/sc/source/ui/dbgui/scuiimoptdlg.cxx
+++ b/sc/source/ui/dbgui/scuiimoptdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -314,3 +315,5 @@ IMPL_LINK( ScImportOptionsDlg, FixedWidthHdl, CheckBox*, pCheckBox )
}
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx
index f70fbb094c92..d66ff75d7530 100644
--- a/sc/source/ui/dbgui/sfiltdlg.cxx
+++ b/sc/source/ui/dbgui/sfiltdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -528,3 +529,4 @@ IMPL_LINK( ScSpecialFilterDlg, FilterAreaModHdl, formula::RefEdit*, pEd )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dbgui/sortdlg.cxx b/sc/source/ui/dbgui/sortdlg.cxx
index f2a733af3aa8..0fbbe991e327 100644
--- a/sc/source/ui/dbgui/sortdlg.cxx
+++ b/sc/source/ui/dbgui/sortdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -105,3 +106,5 @@ IMPL_LINK( ScSortWarningDlg, BtnHdl, PushButton*, pBtn )
return 0;
}
//========================================================================//
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dbgui/subtdlg.cxx b/sc/source/ui/dbgui/subtdlg.cxx
index 2c9cba31cd13..172e887cf51e 100644
--- a/sc/source/ui/dbgui/subtdlg.cxx
+++ b/sc/source/ui/dbgui/subtdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,3 +68,4 @@ IMPL_LINK_INLINE_START( ScSubTotalDlg, RemoveHdl, PushButton *, pBtn )
}
IMPL_LINK_INLINE_END( ScSubTotalDlg, RemoveHdl, PushButton *, pBtn )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dbgui/textimportoptions.cxx b/sc/source/ui/dbgui/textimportoptions.cxx
index be918d2a0fbd..99253d6cc5a1 100644
--- a/sc/source/ui/dbgui/textimportoptions.cxx
+++ b/sc/source/ui/dbgui/textimportoptions.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -119,3 +120,4 @@ IMPL_LINK( ScTextImportOptionsDlg, RadioHdl, RadioButton*, pBtn )
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 37a7dab398a4..7a54da38da03 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1081,3 +1082,4 @@ IMPL_LINK( ScTabPageSortOptions, FillAlgorHdl, void *, EMPTYARG )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx
index fbada165b55d..b4d6519d3388 100644
--- a/sc/source/ui/dbgui/tpsubt.cxx
+++ b/sc/source/ui/dbgui/tpsubt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -684,3 +685,4 @@ __EXPORT ScTpSubTotalGroup3::~ScTpSubTotalGroup3()
{
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index 7626a95971ca..6eed9ab7fee0 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -993,3 +994,5 @@ bool ScValidationDlg::IsAlive()
{
return SC_MOD()->IsAliveRefDlg( SLOTID, this );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx
index bed1622b0a2a..69a62985e02f 100644
--- a/sc/source/ui/docshell/arealink.cxx
+++ b/sc/source/ui/docshell/arealink.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -527,3 +528,4 @@ IMPL_LINK( ScAreaLink, AreaEndEditHdl, void*, EMPTYARG )
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/autostyl.cxx b/sc/source/ui/docshell/autostyl.cxx
index 61683e169f02..511d7695c471 100644
--- a/sc/source/ui/docshell/autostyl.cxx
+++ b/sc/source/ui/docshell/autostyl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -242,3 +243,4 @@ IMPL_LINK( ScAutoStyleList, TimerHdl, Timer*, EMPTYARG )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index c7a2f838e087..4a5f68b3e658 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1500,3 +1501,4 @@ void ScDBDocFunc::UpdateImport( const String& rTarget, const String& rDBName,
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx
index dee7438bc07f..8400f1ad8b6f 100644
--- a/sc/source/ui/docshell/dbdocimp.cxx
+++ b/sc/source/ui/docshell/dbdocimp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -721,3 +722,4 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 57b2245ad9ce..d4cff7090706 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -109,6 +110,7 @@ using namespace com::sun::star;
using ::com::sun::star::uno::Sequence;
using ::std::vector;
+
// STATIC DATA -----------------------------------------------------------
//========================================================================
@@ -703,17 +705,6 @@ BOOL ScDocFunc::DeleteContents( const ScMarkData& rMark, USHORT nFlags,
//! CellContentChanged();
//! ShowAllCursors();
-#if 0
- //! muss an der View bleiben !!!!
- if ( nFlags & IDF_ATTRIB )
- {
- if ( nFlags & IDF_CONTENTS )
- ForgetFormatArea();
- else
- StartFormatArea(); // Attribute loeschen ist auch Attributierung
- }
-#endif
-
return TRUE;
}
@@ -4188,6 +4179,13 @@ BOOL ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark,
FillDir eDir, ULONG nCount, BOOL bRecord, BOOL bApi )
{
+ double fStep = 1.0;
+ double fMax = MAXDOUBLE;
+ return FillAuto( rRange, pTabMark, eDir, FILL_AUTO, FILL_DAY, nCount, fStep, fMax, bRecord, bApi );
+}
+
+BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd, ULONG nCount, double fStep, double fMax, BOOL bRecord, BOOL bApi )
+{
ScDocShellModificator aModificator( rDocShell );
ScDocument* pDoc = rDocShell.GetDocument();
@@ -4213,10 +4211,6 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark,
ScRange aSourceArea = rRange;
ScRange aDestArea = rRange;
- FillCmd eCmd = FILL_AUTO;
- FillDateCmd eDateCmd = FILL_DAY;
- double fStep = 1.0;
- double fMax = MAXDOUBLE;
switch (eDir)
{
@@ -4948,3 +4942,4 @@ BOOL ScDocFunc::InsertAreaLink( const String& rFile, const String& rFilter,
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 3eb7f7cd6b7d..902a1994f3b4 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,12 +66,16 @@
#include "chgtrack.hxx"
#include "chgviset.hxx"
#include <sfx2/request.hxx>
+#include <com/sun/star/awt/Key.hpp>
+#include <com/sun/star/awt/KeyModifier.hpp>
#include <com/sun/star/container/XContentEnumerationAccess.hpp>
#include <com/sun/star/document/UpdateDocMode.hpp>
#include <com/sun/star/script/vba/VBAEventId.hpp>
#include <com/sun/star/script/vba/XVBAEventProcessor.hpp>
#include <com/sun/star/sheet/XSpreadsheetView.hpp>
#include <com/sun/star/task/XJob.hpp>
+#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/XAcceleratorConfiguration.hpp>
#include <basic/sbstar.hxx>
#include <basic/basmgr.hxx>
#include <vbahelper/vbaaccesshelper.hxx>
@@ -138,6 +143,9 @@
#include <boost/shared_ptr.hpp>
using namespace com::sun::star;
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::UNO_QUERY;
+using ::com::sun::star::lang::XMultiServiceFactory;
using ::rtl::OUString;
using ::rtl::OUStringBuffer;
using ::boost::shared_ptr;
@@ -171,7 +179,6 @@ static const sal_Char __FAR_DATA pFilterExcel95[] = "MS Excel 95";
static const sal_Char __FAR_DATA pFilterEx95Temp[] = "MS Excel 95 Vorlage/Template";
static const sal_Char __FAR_DATA pFilterExcel97[] = "MS Excel 97";
static const sal_Char __FAR_DATA pFilterEx97Temp[] = "MS Excel 97 Vorlage/Template";
-static const sal_Char __FAR_DATA pFilterEx07Xml[] = "MS Excel 2007 XML";
static const sal_Char __FAR_DATA pFilterDBase[] = "dBase";
static const sal_Char __FAR_DATA pFilterDif[] = "DIF";
static const sal_Char __FAR_DATA pFilterSylk[] = "SYLK";
@@ -2090,8 +2097,7 @@ BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed )
}
else if (aFltName.EqualsAscii(pFilterExcel5) || aFltName.EqualsAscii(pFilterExcel95) ||
aFltName.EqualsAscii(pFilterExcel97) || aFltName.EqualsAscii(pFilterEx5Temp) ||
- aFltName.EqualsAscii(pFilterEx95Temp) || aFltName.EqualsAscii(pFilterEx97Temp) ||
- aFltName.EqualsAscii(pFilterEx07Xml))
+ aFltName.EqualsAscii(pFilterEx95Temp) || aFltName.EqualsAscii(pFilterEx97Temp))
{
WaitObject aWait( GetActiveDialogParent() );
@@ -2133,8 +2139,6 @@ BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed )
ExportFormatExcel eFormat = ExpBiff5;
if( aFltName.EqualsAscii( pFilterExcel97 ) || aFltName.EqualsAscii( pFilterEx97Temp ) )
eFormat = ExpBiff8;
- if( aFltName.EqualsAscii( pFilterEx07Xml ) )
- eFormat = Exp2007Xml;
FltError eError = ScFormatFilter::Get().ScExportExcel5( rMed, &aDocument, eFormat, RTL_TEXTENCODING_MS_1252 );
if( eError && !GetError() )
@@ -2795,6 +2799,109 @@ ScSheetSaveData* ScDocShell::GetSheetSaveData()
return pSheetSaveData;
}
+namespace {
+
+void removeKeysIfExists(Reference<ui::XAcceleratorConfiguration>& xScAccel, const vector<const awt::KeyEvent*>& rKeys)
+{
+ vector<const awt::KeyEvent*>::const_iterator itr = rKeys.begin(), itrEnd = rKeys.end();
+ for (; itr != itrEnd; ++itr)
+ {
+ const awt::KeyEvent* p = *itr;
+ if (!p)
+ continue;
+
+ try
+ {
+ xScAccel->removeKeyEvent(*p);
+ }
+ catch (const container::NoSuchElementException&) {}
+ }
+}
+
+}
+
+void ScDocShell::ResetKeyBindings( ScOptionsUtil::KeyBindingType eType )
+{
+ using namespace ::com::sun::star::ui;
+
+ Reference<XMultiServiceFactory> xServiceManager = ::comphelper::getProcessServiceFactory();
+ if (!xServiceManager.is())
+ return;
+
+ Reference<XModuleUIConfigurationManagerSupplier> xModuleCfgSupplier(
+ xServiceManager->createInstance(
+ OUString::createFromAscii("com.sun.star.ui.ModuleUIConfigurationManagerSupplier")), UNO_QUERY);
+
+ if (!xModuleCfgSupplier.is())
+ return;
+
+ // Grab the Calc configuration.
+ Reference<XUIConfigurationManager> xConfigMgr =
+ xModuleCfgSupplier->getUIConfigurationManager(
+ OUString::createFromAscii("com.sun.star.sheet.SpreadsheetDocument"));
+
+ if (!xConfigMgr.is())
+ return;
+
+ // shortcut manager
+ Reference<XAcceleratorConfiguration> xScAccel(
+ xConfigMgr->getShortCutManager(), UNO_QUERY);
+
+ if (!xScAccel.is())
+ return;
+
+ vector<const awt::KeyEvent*> aKeys;
+ aKeys.reserve(4);
+
+ // Backsapce key
+ awt::KeyEvent aBackspace;
+ aBackspace.KeyCode = awt::Key::BACKSPACE;
+ aBackspace.Modifiers = 0;
+ aKeys.push_back(&aBackspace);
+
+ // Delete key
+ awt::KeyEvent aDelete;
+ aDelete.KeyCode = awt::Key::DELETE;
+ aDelete.Modifiers = 0;
+ aKeys.push_back(&aDelete);
+
+ // Ctrl-D
+ awt::KeyEvent aCtrlD;
+ aCtrlD.KeyCode = awt::Key::D;
+ aCtrlD.Modifiers = awt::KeyModifier::MOD1;
+ aKeys.push_back(&aCtrlD);
+
+ // Ctrl-Shift-D
+ awt::KeyEvent aCtrlShiftD;
+ aCtrlShiftD.KeyCode = awt::Key::D;
+ aCtrlShiftD.Modifiers = awt::KeyModifier::MOD1 | awt::KeyModifier::SHIFT;
+ aKeys.push_back(&aCtrlShiftD);
+
+ // Remove all involved keys first, because swapping commands don't work
+ // well without doing this.
+ removeKeysIfExists(xScAccel, aKeys);
+ xScAccel->store();
+
+ switch (eType)
+ {
+ case ScOptionsUtil::KEY_DEFAULT:
+ xScAccel->setKeyEvent(aDelete, OUString::createFromAscii(".uno:ClearContents"));
+ xScAccel->setKeyEvent(aBackspace, OUString::createFromAscii(".uno:Delete"));
+ xScAccel->setKeyEvent(aCtrlD, OUString::createFromAscii(".uno:FillDown"));
+ xScAccel->setKeyEvent(aCtrlShiftD, OUString::createFromAscii(".uno:DataSelect"));
+ break;
+ case ScOptionsUtil::KEY_OOO_LEGACY:
+ xScAccel->setKeyEvent(aDelete, OUString::createFromAscii(".uno:Delete"));
+ xScAccel->setKeyEvent(aBackspace, OUString::createFromAscii(".uno:ClearContents"));
+ xScAccel->setKeyEvent(aCtrlD, OUString::createFromAscii(".uno:DataSelect"));
+ break;
+ default:
+ ;
+ }
+
+ xScAccel->store();
+}
+
void ScDocShell::UseSheetSaveEntries()
{
if (pSheetSaveData)
@@ -2970,3 +3077,5 @@ bool ScDocShell::GetProtectionHash( /*out*/ ::com::sun::star::uno::Sequence< sal
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/docsh2.cxx b/sc/source/ui/docshell/docsh2.cxx
index 14ff7622818c..ab567f7d23df 100644
--- a/sc/source/ui/docshell/docsh2.cxx
+++ b/sc/source/ui/docshell/docsh2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -178,19 +179,19 @@ void ScDocShell::InitItems()
PutItem( SvxColorTableItem( XColorTable::GetStdColorTable(), SID_COLOR_TABLE ) );
}
- if ( !aDocument.GetForbiddenCharacters().isValid() ||
+ if ( !aDocument.GetForbiddenCharacters().is() ||
!aDocument.IsValidAsianCompression() || !aDocument.IsValidAsianKerning() )
{
// get settings from SvxAsianConfig
SvxAsianConfig aAsian( sal_False );
- if ( !aDocument.GetForbiddenCharacters().isValid() )
+ if ( !aDocument.GetForbiddenCharacters().is() )
{
// set forbidden characters if necessary
uno::Sequence<lang::Locale> aLocales = aAsian.GetStartEndCharLocales();
if (aLocales.getLength())
{
- vos::ORef<SvxForbiddenCharactersTable> xForbiddenTable =
+ rtl::Reference<SvxForbiddenCharactersTable> xForbiddenTable =
new SvxForbiddenCharactersTable( aDocument.GetServiceManager() );
const lang::Locale* pLocales = aLocales.getConstArray();
@@ -261,3 +262,5 @@ ScDrawLayer* ScDocShell::MakeDrawLayer()
}
return pDrawLayer;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index 233843935bbd..8e0719ad328b 100644
--- a/sc/source/ui/docshell/docsh3.cxx
+++ b/sc/source/ui/docshell/docsh3.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1407,3 +1408,5 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell )
return ( pThisAction != NULL );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index ba4553fd8826..6abc194aa105 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -2127,6 +2128,7 @@ void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog,
}
}
+#if 0
if ( n+1 < nCollateCopies &&
(pPrinter->GetDuplexMode() == DUPLEX_SHORTEDGE || pPrinter->GetDuplexMode() == DUPLEX_LONGEDGE) &&
( nPrinted % 2 ) == 1 )
@@ -2137,11 +2139,10 @@ void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog,
// (same as in Writer ViewShell::Prt)
// FIXME: needs to be adapted to XRenderable interface
- #if 0
pPrinter->StartPage();
pPrinter->EndPage();
- #endif
}
+#endif
}
}
@@ -2713,3 +2714,5 @@ uno::Reference< frame::XModel > ScDocShell::LoadSharedDocument()
}
return xModel;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index 9510c91e3290..e852ca29a948 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -853,6 +854,47 @@ SCTAB ScDocShell::MakeScenario( SCTAB nTab, const String& rName, const String& r
return nTab;
}
+ULONG ScDocShell::TransferTab( ScDocShell& rSrcDocShell, SCTAB nSrcPos,
+ SCTAB nDestPos, BOOL bInsertNew,
+ BOOL bNotifyAndPaint )
+{
+ ScDocument* pSrcDoc = rSrcDocShell.GetDocument();
+
+ ULONG nErrVal = aDocument.TransferTab( pSrcDoc, nSrcPos, nDestPos,
+ bInsertNew ); // no insert
+
+ // TransferTab doesn't copy drawing objects with bInsertNew=FALSE
+ if ( nErrVal > 0 && !bInsertNew)
+ aDocument.TransferDrawPage( pSrcDoc, nSrcPos, nDestPos );
+
+ if(nErrVal>0 && pSrcDoc->IsScenario( nSrcPos ))
+ {
+ String aComment;
+ Color aColor;
+ USHORT nFlags;
+
+ pSrcDoc->GetScenarioData( nSrcPos, aComment,aColor, nFlags);
+ aDocument.SetScenario(nDestPos,TRUE);
+ aDocument.SetScenarioData(nDestPos,aComment,aColor,nFlags);
+ BOOL bActive = pSrcDoc->IsActiveScenario(nSrcPos);
+ aDocument.SetActiveScenario(nDestPos, bActive );
+
+ BOOL bVisible=pSrcDoc->IsVisible(nSrcPos);
+ aDocument.SetVisible(nDestPos,bVisible );
+
+ }
+
+ if ( nErrVal > 0 && pSrcDoc->IsTabProtected( nSrcPos ) )
+ aDocument.SetTabProtection(nDestPos, pSrcDoc->GetTabProtection(nSrcPos));
+ if ( bNotifyAndPaint )
+ {
+ Broadcast( ScTablesHint( SC_TAB_INSERTED, nDestPos ) );
+ PostPaintExtras();
+ PostPaintGridAll();
+ }
+ return nErrVal;
+}
+
BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRecord )
{
ScDocShellModificator aModificator( *this );
@@ -989,3 +1031,4 @@ IMPL_LINK( ScDocShell, RefreshDBDataHdl, ScRefreshTimer*, pRefreshTimer )
return bContinue != 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx
index d735a359f0a2..60f75c885a83 100644
--- a/sc/source/ui/docshell/docsh6.cxx
+++ b/sc/source/ui/docshell/docsh6.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -538,3 +539,4 @@ void ScDocShell::CheckConfigOptions()
SetConfigOptionsChecked(true);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/docsh7.cxx b/sc/source/ui/docshell/docsh7.cxx
index 89f082672b29..85ca951be483 100644
--- a/sc/source/ui/docshell/docsh7.cxx
+++ b/sc/source/ui/docshell/docsh7.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,3 +44,4 @@ void ScDocShell::GetDrawObjState( SfxItemSet & /* rSet */ )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index 8ef15badde9c..1e94a7f3b2e4 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1180,3 +1181,4 @@ ULONG ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet, BO
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/docshimp.hxx b/sc/source/ui/docshell/docshimp.hxx
index 6532c46d0835..37f6d6bb1387 100644
--- a/sc/source/ui/docshell/docshimp.hxx
+++ b/sc/source/ui/docshell/docshimp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,3 +56,4 @@ struct DocShell_Impl
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/editable.cxx b/sc/source/ui/docshell/editable.cxx
index d381ff067a99..24cae921fddf 100644
--- a/sc/source/ui/docshell/editable.cxx
+++ b/sc/source/ui/docshell/editable.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -160,3 +161,4 @@ USHORT ScEditableTester::GetMessageId() const
return STR_PROTECTIONERR;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index 68f0b277717a..c0fc2fbfa215 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -2551,3 +2552,4 @@ IMPL_LINK(ScExternalRefManager, TimeOutHdl, AutoTimer*, pTimer)
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/hiranges.cxx b/sc/source/ui/docshell/hiranges.cxx
index af1226216a06..0ad4c4e3e5d8 100644
--- a/sc/source/ui/docshell/hiranges.cxx
+++ b/sc/source/ui/docshell/hiranges.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,3 +52,4 @@ ScHighlightRanges::~ScHighlightRanges()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 9d57734dd2fb..1e85d17bd741 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -294,51 +295,6 @@ void ScImportExport::EndPaste()
/////////////////////////////////////////////////////////////////////////////
-
-#if 0
-BOOL ScImportExport::ImportData( SvData& rData )
-{
- ULONG nFmt = rData.GetFormat();
- if ( nFmt == SOT_FORMATSTR_ID_HTML_SIMPLE )
- {
- MSE40HTMLClipFormatObj aMSE40ClpObj;
- if ( aMSE40ClpObj.GetData( rData ) )
- {
- SvStream* pStream = aMSE40ClpObj.GetStream();
- return ImportStream( *pStream, nFmt );
- }
- return FALSE;
- }
- else
- {
- void* pMem;
- ULONG nSize = rData.GetMinMemorySize();
- rData.GetData( &pMem, TRANSFER_REFERENCE );
- if( nFmt == FORMAT_STRING
- || nFmt == FORMAT_RTF
- || nFmt == SOT_FORMATSTR_ID_SYLK
- || nFmt == SOT_FORMATSTR_ID_HTML
- || nFmt == SOT_FORMATSTR_ID_DIF )
- {
- //! String? Unicode??
-
- // Stringende ermitteln!
- sal_Char* pBegin = (sal_Char*) pMem;
- sal_Char* pEnd = (sal_Char*) pMem + nSize;
-
- nSize = 0;
- while( pBegin != pEnd && *pBegin != '\0' )
- pBegin++, nSize++;
- // #72909# MT says only STRING has to be zero-terminated
- DBG_ASSERT( pBegin != pEnd || nFmt != FORMAT_STRING, "non zero-terminated String" )
- }
- SvMemoryStream aStrm( pMem, nSize, STREAM_READ );
- return ImportStream( aStrm, nFmt );
- }
-}
-
-#endif
-
BOOL ScImportExport::ImportData( const String& /* rMimeType */,
const ::com::sun::star::uno::Any & /* rValue */ )
{
@@ -2111,3 +2067,5 @@ ScFormatFilterPlugin &ScFormatFilter::Get()
return *plugin;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/macromgr.cxx b/sc/source/ui/docshell/macromgr.cxx
new file mode 100644
index 000000000000..f8c4102f98c9
--- /dev/null
+++ b/sc/source/ui/docshell/macromgr.cxx
@@ -0,0 +1,219 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: document.hxx,v $
+ * $Revision: 1.115.36.9 $
+ *
+ * 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_sc.hxx"
+
+// INCLUDE ---------------------------------------------------------------
+
+#include "macromgr.hxx"
+#include "document.hxx"
+
+#include "basic/basmgr.hxx"
+#include "cppuhelper/implbase1.hxx"
+#include "sfx2/objsh.hxx"
+#include "cell.hxx"
+#include <com/sun/star/container/XContainer.hpp>
+
+#include <list>
+
+using namespace ::com::sun::star;
+using ::com::sun::star::uno::RuntimeException;
+using ::com::sun::star::uno::Reference;
+using ::rtl::OUString;
+using ::rtl::OUStringHash;
+using ::std::hash_map;
+using ::std::list;
+using ::std::for_each;
+using ::std::pair;
+
+// ============================================================================
+
+/**
+ * A simple container to keep track of cells that depend on basic modules
+ * changes. We don't check for duplicates at insertion time; instead, we
+ * remove duplicates at query time.
+ */
+class ScUserMacroDepTracker
+{
+public:
+ void addCell(const OUString& rModuleName, ScFormulaCell* pCell)
+ {
+ ModuleCellMap::iterator itr = maCells.find(rModuleName);
+ if (itr == maCells.end())
+ {
+ pair<ModuleCellMap::iterator, bool> r = maCells.insert(
+ ModuleCellMap::value_type(rModuleName, list<ScFormulaCell*>()));
+
+ if (!r.second)
+ // insertion failed.
+ return;
+
+ itr = r.first;
+ }
+ itr->second.push_back(pCell);
+ }
+
+ void removeCell(ScFormulaCell* pCell)
+ {
+ ModuleCellMap::iterator itr = maCells.begin(), itrEnd = maCells.end();
+ for (; itr != itrEnd; ++itr)
+ itr->second.remove(pCell);
+ }
+
+ void getCellsByModule(const OUString& rModuleName, list<ScFormulaCell*>& rCells)
+ {
+ ModuleCellMap::iterator itr = maCells.find(rModuleName);
+ if (itr == maCells.end())
+ return;
+
+ list<ScFormulaCell*>& rCellList = itr->second;
+
+ // Remove duplicates.
+ rCellList.sort();
+ rCellList.unique();
+ // exception safe copy
+ list<ScFormulaCell*> temp(rCellList);
+ rCells.swap(temp);
+ }
+
+private:
+ typedef hash_map<OUString, list<ScFormulaCell*>, OUStringHash> ModuleCellMap;
+ ModuleCellMap maCells;
+};
+
+
+// ============================================================================
+
+ScMacroManager::ScMacroManager(ScDocument* pDoc) :
+ mpDepTracker(new ScUserMacroDepTracker),
+ mpDoc(pDoc)
+{
+}
+
+ScMacroManager::~ScMacroManager()
+{
+}
+
+typedef ::cppu::WeakImplHelper1< ::com::sun::star::container::XContainerListener > ContainerListenerHelper;
+
+class VBAProjectListener : public ContainerListenerHelper
+{
+ ScMacroManager* mpMacroMgr;
+public:
+ VBAProjectListener( ScMacroManager* pMacroMgr ) : mpMacroMgr( pMacroMgr ) {}
+ // XEventListener
+ virtual void SAL_CALL disposing( const lang::EventObject& /*Source*/ ) throw(RuntimeException) {}
+
+ // XContainerListener
+ virtual void SAL_CALL elementInserted( const container::ContainerEvent& /*Event*/ ) throw(RuntimeException){}
+ virtual void SAL_CALL elementReplaced( const container::ContainerEvent& Event ) throw(RuntimeException)
+ {
+ rtl::OUString sModuleName;
+ Event.Accessor >>= sModuleName;
+ OSL_TRACE("VBAProjectListener::elementReplaced(%s)", rtl::OUStringToOString( sModuleName, RTL_TEXTENCODING_UTF8 ).getStr() );
+ mpMacroMgr->InitUserFuncData();
+ mpMacroMgr->BroadcastModuleUpdate(sModuleName);
+ }
+ virtual void SAL_CALL elementRemoved( const container::ContainerEvent& /*Event*/ ) throw(RuntimeException){}
+
+};
+
+void ScMacroManager::InitUserFuncData()
+{
+ // Clear hash_map
+ mhFuncToVolatile.clear();
+ String sProjectName( RTL_CONSTASCII_USTRINGPARAM("Standard") );
+
+ Reference< container::XContainer > xModuleContainer;
+ SfxObjectShell* pShell = mpDoc->GetDocumentShell();
+ if ( pShell && pShell->GetBasicManager()->GetName().Len() > 0 )
+ sProjectName = pShell->GetBasicManager()->GetName();
+ try
+ {
+ Reference< script::XLibraryContainer > xLibraries( pShell->GetBasicContainer(), uno::UNO_QUERY_THROW );
+ xModuleContainer.set( xLibraries->getByName( sProjectName ), uno::UNO_QUERY_THROW );
+
+ if ( xModuleContainer.is() )
+ {
+ // remove old listener ( if there was one )
+ if ( mxContainerListener.is() )
+ xModuleContainer->removeContainerListener( mxContainerListener );
+ // Create listener
+ mxContainerListener = new VBAProjectListener( this );
+ xModuleContainer->addContainerListener( mxContainerListener );
+ }
+ }
+ catch( uno::Exception& )
+ {
+ }
+}
+
+void ScMacroManager::SetUserFuncVolatile( const OUString& sName, bool isVolatile )
+{
+ mhFuncToVolatile[ sName ] = isVolatile;
+}
+
+bool ScMacroManager::GetUserFuncVolatile( const OUString& sName )
+{
+ NameBoolMap::iterator it = mhFuncToVolatile.find( sName );
+ if ( it == mhFuncToVolatile.end() )
+ return false;
+ return it->second;
+}
+
+void ScMacroManager::AddDependentCell(const OUString& aModuleName, ScFormulaCell* pCell)
+{
+ mpDepTracker->addCell(aModuleName, pCell);
+}
+
+void ScMacroManager::RemoveDependentCell(ScFormulaCell* pCell)
+{
+ mpDepTracker->removeCell(pCell);
+}
+
+void ScMacroManager::BroadcastModuleUpdate(const OUString& aModuleName)
+{
+ list<ScFormulaCell*> aCells;
+ mpDepTracker->getCellsByModule(aModuleName, aCells);
+ list<ScFormulaCell*>::iterator itr = aCells.begin(), itrEnd = aCells.end();
+ for (; itr != itrEnd; ++itr)
+ {
+ ScFormulaCell* pCell = *itr;
+ mpDoc->PutInFormulaTree(pCell); // for F9 recalc
+
+ // for recalc on cell value change. If the cell is not volatile, the
+ // cell stops listening right away after it gets re-interpreted.
+ mpDoc->StartListeningArea(BCA_LISTEN_ALWAYS, pCell);
+ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/makefile.mk b/sc/source/ui/docshell/makefile.mk
index dcfd0429bd50..6776a0b7efdd 100644
--- a/sc/source/ui/docshell/makefile.mk
+++ b/sc/source/ui/docshell/makefile.mk
@@ -33,9 +33,7 @@ LIBTARGET=no
# --- Settings -----------------------------------------------------
-.INCLUDE : scpre.mk
.INCLUDE : settings.mk
-.INCLUDE : sc.mk
.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files --------------------------------------------------------
@@ -91,7 +89,8 @@ SLOFILES = \
$(SLO)$/hiranges.obj \
$(SLO)$/pntlock.obj \
$(SLO)$/sizedev.obj \
- $(SLO)$/editable.obj
+ $(SLO)$/editable.obj \
+ $(SLO)$/macromgr.obj
EXCEPTIONSFILES= \
@@ -102,7 +101,8 @@ EXCEPTIONSFILES= \
$(SLO)$/docsh8.obj \
$(SLO)$/externalrefmgr.obj \
$(SLO)$/dbdocimp.obj \
- $(SLO)$/docfunc.obj
+ $(SLO)$/docfunc.obj \
+ $(SLO)$/macromgr.obj
SRS1NAME=$(TARGET)
SRC1FILES = tpstat.src
@@ -132,7 +132,8 @@ LIB1OBJFILES = \
$(SLO)$/hiranges.obj \
$(SLO)$/pntlock.obj \
$(SLO)$/sizedev.obj \
- $(SLO)$/editable.obj
+ $(SLO)$/editable.obj \
+ $(SLO)$/macromgr.obj
# --- Tagets -------------------------------------------------------
diff --git a/sc/source/ui/docshell/olinefun.cxx b/sc/source/ui/docshell/olinefun.cxx
index 32f803e75509..dfbe7ed24fe0 100644
--- a/sc/source/ui/docshell/olinefun.cxx
+++ b/sc/source/ui/docshell/olinefun.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -795,3 +796,4 @@ BOOL ScOutlineDocFunc::HideOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, US
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/pagedata.cxx b/sc/source/ui/docshell/pagedata.cxx
index db55c2364305..e87c2322a228 100644
--- a/sc/source/ui/docshell/pagedata.cxx
+++ b/sc/source/ui/docshell/pagedata.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -137,3 +138,4 @@ void ScPageBreakData::AddPages()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/pntlock.cxx b/sc/source/ui/docshell/pntlock.cxx
index 764d431f3af0..0450f7c67a0d 100644
--- a/sc/source/ui/docshell/pntlock.cxx
+++ b/sc/source/ui/docshell/pntlock.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,3 +60,4 @@ void ScPaintLockData::AddRange( const ScRange& rRange, USHORT nP )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/servobj.cxx b/sc/source/ui/docshell/servobj.cxx
index a30e60607b49..186b94f3bf83 100644
--- a/sc/source/ui/docshell/servobj.cxx
+++ b/sc/source/ui/docshell/servobj.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -275,3 +276,4 @@ void __EXPORT ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/sizedev.cxx b/sc/source/ui/docshell/sizedev.cxx
index d89009540156..3171fa8164ae 100644
--- a/sc/source/ui/docshell/sizedev.cxx
+++ b/sc/source/ui/docshell/sizedev.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -75,3 +76,4 @@ ScSizeDeviceProvider::~ScSizeDeviceProvider()
pDevice->SetMapMode( aOldMapMode );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx
index 697b39052b9f..f949b3ffb45c 100644
--- a/sc/source/ui/docshell/tablink.cxx
+++ b/sc/source/ui/docshell/tablink.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -619,3 +620,4 @@ String ScDocumentLoader::GetTitle() const
return EMPTY_STRING;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/docshell/tpstat.cxx b/sc/source/ui/docshell/tpstat.cxx
index 1072af30c7a1..b5ced9d105a8 100644
--- a/sc/source/ui/docshell/tpstat.cxx
+++ b/sc/source/ui/docshell/tpstat.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -99,3 +100,4 @@ void __EXPORT ScDocStatPage::Reset( const SfxItemSet& /* rSet */ )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/drawfunc/chartsh.cxx b/sc/source/ui/drawfunc/chartsh.cxx
index 4099d599c29c..77823a9b37d3 100644
--- a/sc/source/ui/drawfunc/chartsh.cxx
+++ b/sc/source/ui/drawfunc/chartsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -79,3 +80,4 @@ ScChartShell::~ScChartShell()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 5199b721352a..5da044f24d89 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -205,7 +206,6 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
ExecuteTextAttrDlg( rReq );
break;
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
case SID_DRAW_HLINK_EDIT:
if ( pSingleSelectedObj )
pViewData->GetDispatcher().Execute( SID_HYPERLINK_DIALOG );
@@ -233,7 +233,6 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
ScGlobal::OpenURL( pInfo->GetHlink(), String::EmptyString() );
}
break;
-#endif
case SID_ATTR_TRANSFORM:
{
@@ -473,7 +472,6 @@ void ScDrawShell::ExecuteTextAttrDlg( SfxRequest& rReq, USHORT /* nTabPage */ )
delete( pDlg );
}
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
void ScDrawShell::SetHlinkForObject( SdrObject* pObj, const rtl::OUString& rHlnk )
{
if ( pObj )
@@ -483,5 +481,5 @@ void ScDrawShell::SetHlinkForObject( SdrObject* pObj, const rtl::OUString& rHlnk
lcl_setModified( GetObjectShell() );
}
}
-#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx
index 7da571fc05a7..0a5b5ad7c21f 100644
--- a/sc/source/ui/drawfunc/drawsh2.cxx
+++ b/sc/source/ui/drawfunc/drawsh2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -197,24 +198,20 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // Funktionen disabl
BOOL bCanRename = FALSE;
if ( nMarkCount > 1 )
{
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
// no hypelink options for a selected group
rSet.DisableItem( SID_DRAW_HLINK_EDIT );
rSet.DisableItem( SID_DRAW_HLINK_DELETE );
rSet.DisableItem( SID_OPEN_HYPERLINK );
-#endif
}
else if ( nMarkCount == 1 )
{
SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj );
if ( !pInfo || (pInfo->GetHlink().getLength() == 0) )
{
rSet.DisableItem( SID_DRAW_HLINK_DELETE );
rSet.DisableItem( SID_OPEN_HYPERLINK );
}
-#endif
SdrLayerID nLayerID = pObj->GetLayer();
if ( nLayerID != SC_LAYER_INTERN )
bCanRename = TRUE; // #i51351# anything except internal objects can be renamed
@@ -397,3 +394,4 @@ BOOL ScDrawShell::AreAllObjectsOnLayer(USHORT nLayerNo,const SdrMarkList& rMark)
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/drawfunc/drawsh4.cxx b/sc/source/ui/drawfunc/drawsh4.cxx
index 45b26584f29a..fe432103a912 100644
--- a/sc/source/ui/drawfunc/drawsh4.cxx
+++ b/sc/source/ui/drawfunc/drawsh4.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -113,3 +114,4 @@ void ScDrawShell::GetFormTextState(SfxItemSet& rSet)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/drawfunc/drawsh5.cxx b/sc/source/ui/drawfunc/drawsh5.cxx
index a05083eeadcc..23270038e419 100644
--- a/sc/source/ui/drawfunc/drawsh5.cxx
+++ b/sc/source/ui/drawfunc/drawsh5.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -90,14 +91,12 @@ void ScDrawShell::GetHLinkState( SfxItemSet& rSet ) // Hyperlink
if ( nMarkCount == 1 ) // URL-Button markiert ?
{
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj );
if ( pInfo && (pInfo->GetHlink().getLength() > 0) )
{
aHLinkItem.SetURL( pInfo->GetHlink() );
aHLinkItem.SetInsertMode(HLINK_FIELD);
}
-#endif
SdrUnoObj* pUnoCtrl = PTR_CAST(SdrUnoObj, pObj);
if (pUnoCtrl && FmFormInventor == pUnoCtrl->GetObjInventor())
{
@@ -240,13 +239,11 @@ void ScDrawShell::ExecuteHLink( SfxRequest& rReq )
bDone = TRUE;
}
}
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
else
{
SetHlinkForObject( pObj, rURL );
bDone = TRUE;
}
-#endif
}
}
@@ -756,3 +753,4 @@ ScDrawView* ScDrawShell::GetDrawView()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/drawfunc/drformsh.cxx b/sc/source/ui/drawfunc/drformsh.cxx
index a2531c208f18..e9a986cac5f9 100644
--- a/sc/source/ui/drawfunc/drformsh.cxx
+++ b/sc/source/ui/drawfunc/drformsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -79,3 +80,4 @@ ScDrawFormShell::~ScDrawFormShell()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index a5159d8a8043..aba4cfa8eabe 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -346,32 +347,11 @@ void __EXPORT ScDrawTextObjectBar::Execute( SfxRequest &rReq )
case SID_ENABLE_HYPHENATION:
case SID_TEXTDIRECTION_LEFT_TO_RIGHT:
case SID_TEXTDIRECTION_TOP_TO_BOTTOM:
-#if 0 // DR
- if (IsNoteEdit())
- {
- pView->CaptionTextDirection( rReq.GetSlot()); // process Notes before we end the text edit.
- ExecuteGlobal( rReq );
- pViewData->GetDispatcher().Execute(pViewData->GetView()->GetDrawFuncPtr()->GetSlotID(), SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
- }
- else
-#endif
- {
- pView->ScEndTextEdit(); // end text edit before switching direction
- ExecuteGlobal( rReq );
- // restore consistent state between shells and functions:
- pViewData->GetDispatcher().Execute(SID_OBJECT_SELECT, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
- }
- break;
-
-#if 0
- // Hyphenation is handled above - text edit is ended
- case SID_ENABLE_HYPHENATION:
- // force loading of hyphenator (object is skipped in repaint)
- ((ScDrawLayer*)pView->GetModel())->UseHyphenator();
- pOutliner->SetHyphenator( LinguMgr::GetHyphenator() );
+ pView->ScEndTextEdit(); // end text edit before switching direction
ExecuteGlobal( rReq );
+ // restore consistent state between shells and functions:
+ pViewData->GetDispatcher().Execute(SID_OBJECT_SELECT, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
break;
-#endif
case SID_THES:
{
@@ -1093,3 +1073,4 @@ void ScDrawTextObjectBar::ExecuteTrans( SfxRequest& rReq )
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/drawfunc/drtxtob1.cxx b/sc/source/ui/drawfunc/drtxtob1.cxx
index 0ed0853bcd73..e3ab9efcd409 100644
--- a/sc/source/ui/drawfunc/drtxtob1.cxx
+++ b/sc/source/ui/drawfunc/drtxtob1.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -146,3 +147,4 @@ void ScDrawTextObjectBar::ExecutePasteContents( SfxRequest & /* rReq */ )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/drawfunc/drtxtob2.cxx b/sc/source/ui/drawfunc/drtxtob2.cxx
index 27f1a3dbb77f..aef408544aa4 100644
--- a/sc/source/ui/drawfunc/drtxtob2.cxx
+++ b/sc/source/ui/drawfunc/drtxtob2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -297,3 +298,4 @@ void ScDrawTextObjectBar::GetFormTextState(SfxItemSet& rSet)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/drawfunc/fuconarc.cxx b/sc/source/ui/drawfunc/fuconarc.cxx
index 20daacffac0e..48c529d923e6 100644
--- a/sc/source/ui/drawfunc/fuconarc.cxx
+++ b/sc/source/ui/drawfunc/fuconarc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -232,3 +233,4 @@ SdrObject* FuConstArc::CreateDefaultObject(const sal_uInt16 nID, const Rectangle
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/drawfunc/fuconcustomshape.cxx b/sc/source/ui/drawfunc/fuconcustomshape.cxx
index 69a47f0584d0..dfcbdb2f5d49 100644
--- a/sc/source/ui/drawfunc/fuconcustomshape.cxx
+++ b/sc/source/ui/drawfunc/fuconcustomshape.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -286,3 +287,5 @@ bool FuConstCustomShape::doConstructOrthogonal() const
}
// eof
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/drawfunc/fuconpol.cxx b/sc/source/ui/drawfunc/fuconpol.cxx
index 440f49f41326..d10259e3456e 100644
--- a/sc/source/ui/drawfunc/fuconpol.cxx
+++ b/sc/source/ui/drawfunc/fuconpol.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -353,3 +354,5 @@ SdrObject* FuConstPolygon::CreateDefaultObject(const sal_uInt16 nID, const Recta
}
// eof
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/drawfunc/fuconrec.cxx b/sc/source/ui/drawfunc/fuconrec.cxx
index 733c6fe08b45..71d46ea98b7c 100644
--- a/sc/source/ui/drawfunc/fuconrec.cxx
+++ b/sc/source/ui/drawfunc/fuconrec.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -313,3 +314,4 @@ SdrObject* FuConstRectangle::CreateDefaultObject(const sal_uInt16 nID, const Rec
return pObj;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/drawfunc/fuconstr.cxx b/sc/source/ui/drawfunc/fuconstr.cxx
index bb918e9005ae..63b1a34ac221 100644
--- a/sc/source/ui/drawfunc/fuconstr.cxx
+++ b/sc/source/ui/drawfunc/fuconstr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -333,3 +334,4 @@ void FuConstruct::Deactivate()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/drawfunc/fuconuno.cxx b/sc/source/ui/drawfunc/fuconuno.cxx
index c1212d4d9699..45df699b3e75 100644
--- a/sc/source/ui/drawfunc/fuconuno.cxx
+++ b/sc/source/ui/drawfunc/fuconuno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -188,3 +189,4 @@ SdrObject* FuConstUnoControl::CreateDefaultObject(const sal_uInt16 /* nID */, co
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx
index bad23bf26ed1..70342cc10e24 100644
--- a/sc/source/ui/drawfunc/fudraw.cxx
+++ b/sc/source/ui/drawfunc/fudraw.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -583,7 +584,7 @@ BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt)
if(pView->IsDragObj())
{
- FASTBOOL bWasNoSnap = rDragStat.IsNoSnap();
+ bool bWasNoSnap = rDragStat.IsNoSnap();
BOOL bWasSnapEnabled = pView->IsSnapEnabled();
// switch snapping off
@@ -828,11 +829,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
SdrObjMacroHitRec aHitRec; //! muss da noch irgendwas gesetzt werden ????
pViewShell->SetActivePointer( pObj->GetMacroPointer(aHitRec) );
}
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
else if ( !bAlt && pInfo && ((pInfo->GetMacro().getLength() > 0) || (pInfo->GetHlink().getLength() > 0)) )
-#else
- else if ( !bAlt && pInfo && (pInfo->GetMacro().getLength() > 0) )
-#endif
pWindow->SetPointer( Pointer( POINTER_REFHAND ) );
else if ( IsDetectiveHit( aPnt ) )
pViewShell->SetActivePointer( Pointer( POINTER_DETECTIVE ) );
@@ -861,3 +858,5 @@ BOOL FuDraw::IsSizingOrMovingNote( const MouseEvent& rMEvt ) const
}
return bIsSizingOrMoving;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx
index ead135751cce..41501905fe61 100644
--- a/sc/source/ui/drawfunc/fuins1.cxx
+++ b/sc/source/ui/drawfunc/fuins1.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -310,30 +311,6 @@ FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh,
else
{
// error is handled in SvxOpenGraphicDialog::GetGraphic
-
-#if 0
- USHORT nRes = 0;
- switch ( nError )
- {
- case GRFILTER_OPENERROR: nRes = SCSTR_GRFILTER_OPENERROR; break;
- case GRFILTER_IOERROR: nRes = SCSTR_GRFILTER_IOERROR; break;
- case GRFILTER_FORMATERROR: nRes = SCSTR_GRFILTER_FORMATERROR; break;
- case GRFILTER_VERSIONERROR: nRes = SCSTR_GRFILTER_VERSIONERROR; break;
- case GRFILTER_FILTERERROR: nRes = SCSTR_GRFILTER_FILTERERROR; break;
- case GRFILTER_TOOBIG: nRes = SCSTR_GRFILTER_TOOBIG; break;
- }
- if ( nRes )
- {
- InfoBox aInfoBox( pWindow, String(ScResId(nRes)) );
- aInfoBox.Execute();
- }
- else
- {
- ULONG nStreamError = GetGrfFilter()->GetLastError().nStreamError;
- if( ERRCODE_NONE != nStreamError )
- ErrorHandler::HandleError( nStreamError );
- }
-#endif
}
}
}
@@ -455,3 +432,5 @@ void FuInsertMedia::Deactivate()
{
FuPoor::Deactivate();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx
index f648a1484e8e..89a483d736d5 100644
--- a/sc/source/ui/drawfunc/fuins2.cxx
+++ b/sc/source/ui/drawfunc/fuins2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -847,3 +848,4 @@ void FuInsertChart::Deactivate()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/drawfunc/fumark.cxx b/sc/source/ui/drawfunc/fumark.cxx
index 02554c495729..dfbf584bc8bd 100644
--- a/sc/source/ui/drawfunc/fumark.cxx
+++ b/sc/source/ui/drawfunc/fumark.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -288,3 +289,4 @@ void FuMarkRect::ForcePointer(const MouseEvent* /* pMEvt */)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/drawfunc/fupoor.cxx b/sc/source/ui/drawfunc/fupoor.cxx
index 0bffdfe7ef84..370385aace20 100644
--- a/sc/source/ui/drawfunc/fupoor.cxx
+++ b/sc/source/ui/drawfunc/fupoor.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -383,3 +384,5 @@ bool FuPoor::doConstructOrthogonal() const
}
// eof
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx
index 4a456522003c..1fdf75eabc2f 100644
--- a/sc/source/ui/drawfunc/fusel.cxx
+++ b/sc/source/ui/drawfunc/fusel.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -202,7 +203,6 @@ BOOL __EXPORT FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
}
ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, TRUE );
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
// For interoperability favour links over macros if both are defined
if ( pInfo->GetHlink().getLength() > 0 )
{
@@ -210,20 +210,27 @@ BOOL __EXPORT FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
sURL = pInfo->GetHlink();
}
else if ( pInfo->GetMacro().getLength() > 0 )
-#else
- if ( pInfo->GetMacro().getLength() > 0 )
-#endif
{
SfxObjectShell* pObjSh = SfxObjectShell::Current();
if ( pObjSh && SfxApplication::IsXScriptURL( pInfo->GetMacro() ) )
{
+ uno::Reference< beans::XPropertySet > xProps( pObj->getUnoShape(), uno::UNO_QUERY );
+ uno::Any aCaller;
+ if ( xProps.is() )
+ {
+ try
+ {
+ aCaller = xProps->getPropertyValue( rtl::OUString::createFromAscii("Name") );
+ }
+ catch( uno::Exception& ) {}
+ }
uno::Any aRet;
uno::Sequence< sal_Int16 > aOutArgsIndex;
uno::Sequence< uno::Any > aOutArgs;
uno::Sequence< uno::Any >* pInArgs =
new uno::Sequence< uno::Any >(0);
pObjSh->CallXScript( pInfo->GetMacro(),
- *pInArgs, aRet, aOutArgsIndex, aOutArgs);
+ *pInArgs, aRet, aOutArgsIndex, aOutArgs, true, &aCaller );
pViewShell->FakeButtonUp( pViewShell->GetViewData()->GetActivePart() );
return TRUE; // kein CaptureMouse etc.
}
@@ -647,3 +654,4 @@ void FuSelection::Deactivate()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/drawfunc/fusel2.cxx b/sc/source/ui/drawfunc/fusel2.cxx
index 402143ac0a8c..8e884ee45a61 100644
--- a/sc/source/ui/drawfunc/fusel2.cxx
+++ b/sc/source/ui/drawfunc/fusel2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -183,3 +184,4 @@ void FuSelection::ActivateNoteHandles(SdrObject* pObject)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx
index a13cfc61d1c6..6742ea4c8186 100644
--- a/sc/source/ui/drawfunc/futext.cxx
+++ b/sc/source/ui/drawfunc/futext.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -880,3 +881,4 @@ SdrObject* FuText::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rR
return pObj;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/drawfunc/futext2.cxx b/sc/source/ui/drawfunc/futext2.cxx
index 340e71faa71c..354339dd0d75 100644
--- a/sc/source/ui/drawfunc/futext2.cxx
+++ b/sc/source/ui/drawfunc/futext2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -305,3 +306,4 @@ SdrOutliner* FuText::MakeOutliner()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/drawfunc/futext3.cxx b/sc/source/ui/drawfunc/futext3.cxx
index 534e68705fa8..09a4240c0678 100644
--- a/sc/source/ui/drawfunc/futext3.cxx
+++ b/sc/source/ui/drawfunc/futext3.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -194,56 +195,6 @@ void FuText::StopEditMode(BOOL /*bTextDirection*/)
// Called following an EndDragObj() to update the new note rectangle position
void FuText::StopDragMode(SdrObject* /*pObject*/)
{
-#if 0 // DR
- ScViewData& rViewData = *pViewShell->GetViewData();
- if( ScDrawObjData* pData = ScDrawLayer::GetNoteCaptionData( pObject, rViewData.GetTabNo() ) )
- {
- ScDocument& rDoc = *rViewData.GetDocument();
- const ScAddress& rPos = pData->maStart;
- ScPostIt* pNote = rDoc.GetNote( rPos );
- DBG_ASSERT( pNote && (pNote->GetCaption() == pObject), "FuText::StopDragMode - missing or invalid cell note" );
- if( pNote )
- {
- Rectangle aOldRect = pNote->CalcRectangle( rDoc, rPos );
- Rectangle aNewRect = pObject->GetLogicRect();
- if( aOldRect != aNewRect )
- {
- pNote->UpdateFromRectangle( rDoc, rPos, aNewRect );
- OutlinerParaObject* pPObj = pCaption->GetOutlinerParaObject();
- bool bVertical = (pPObj && pPObj->IsVertical());
- // The new height/width is honoured if property item is reset.
- if(!bVertical && aNewRect.Bottom() - aNewRect.Top() > aOldRect.Bottom() - aOldRect.Top())
- {
- if(pCaption->IsAutoGrowHeight() && !bVertical)
- {
- pCaption->SetMergedItem( SdrTextAutoGrowHeightItem( false ) );
- aNote.SetItemSet( *pDoc, pCaption->GetMergedItemSet() );
- }
- }
- else if(bVertical && aNewRect.Right() - aNewRect.Left() > aOldRect.Right() - aOldRect.Left())
- {
- if(pCaption->IsAutoGrowWidth() && bVertical)
- {
- pCaption->SetMergedItem( SdrTextAutoGrowWidthItem( false ) );
- aNote.SetItemSet( *pDoc, pCaption->GetMergedItemSet() );
- }
- }
- pViewShell->SetNote( aTabPos.Col(), aTabPos.Row(), aTabPos.Tab(), aNote );
-
- // This repaint should not be necessary but it cleans
- // up the 'marks' left behind by the note handles
- // now that notes can simultaineously have handles and edit active.
- ScRange aDrawRange = rDoc.GetRange( rPos.Tab(), aOldRect );
- // Set Start/End Row to previous/next row to allow for handles.
- if( aDrawRange.aStart.Row() > 0 )
- aDrawRange.aStart.IncRow( -1 );
- if( aDrawRange.aEnd.Row() < MAXROW )
- aDrawRange.aEnd.IncRow( 1 );
- ScDocShell* pDocSh = rViewData.GetDocShell();
- pDocSh->PostPaint( aDrawRange, PAINT_GRID| PAINT_EXTRAS);
- }
- }
- }
-#endif
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/drawfunc/graphsh.cxx b/sc/source/ui/drawfunc/graphsh.cxx
index 25cda28aaa9d..101ce8578f05 100644
--- a/sc/source/ui/drawfunc/graphsh.cxx
+++ b/sc/source/ui/drawfunc/graphsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -146,3 +147,4 @@ void ScGraphicShell::ExecuteFilter( SfxRequest& rReq )
Invalidate();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/drawfunc/makefile.mk b/sc/source/ui/drawfunc/makefile.mk
index a50c450ab373..cf69944d3a1a 100644
--- a/sc/source/ui/drawfunc/makefile.mk
+++ b/sc/source/ui/drawfunc/makefile.mk
@@ -32,9 +32,7 @@ TARGET=drawfunc
# --- Settings -----------------------------------------------------
-.INCLUDE : scpre.mk
.INCLUDE : settings.mk
-.INCLUDE : sc.mk
.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files --------------------------------------------------------
@@ -75,6 +73,7 @@ SLOFILES = \
$(SLO)$/mediash.obj
EXCEPTIONSFILES= \
+ $(SLO)$/fusel.obj \
$(SLO)$/fuins2.obj \
$(SLO)$/graphsh.obj \
$(SLO)$/mediash.obj
diff --git a/sc/source/ui/drawfunc/mediash.cxx b/sc/source/ui/drawfunc/mediash.cxx
index 78948550aea6..542573e39fa9 100644
--- a/sc/source/ui/drawfunc/mediash.cxx
+++ b/sc/source/ui/drawfunc/mediash.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -141,3 +142,5 @@ void ScMediaShell::ExecuteMedia( SfxRequest& rReq )
Invalidate();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/drawfunc/objdraw.src b/sc/source/ui/drawfunc/objdraw.src
index 82649044b38c..c221567f3671 100644
--- a/sc/source/ui/drawfunc/objdraw.src
+++ b/sc/source/ui/drawfunc/objdraw.src
@@ -186,7 +186,6 @@
ITEM_FORMAT_PARA_DLG\
};
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
#define MN_EDITLNK \
MenuItem\
{\
@@ -202,7 +201,6 @@
HelpID = SID_DRAW_HLINK_DELETE ; \
Text [ en-US ] = "~Remove Hyperlink" ; \
};
-#endif
#define MN_DRWTXTATTR \
MenuItem\
@@ -1297,14 +1295,12 @@ Menu RID_POPUP_DRAW
MenuItem { Separator = TRUE ; };
//------------------------------
ITEM_GROUP_MENU
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
//------------------------------
MenuItem { Separator = TRUE ; };
//------------------------------
MN_EDITLNK
MN_DELLNK
MenuItem { ITEM_OPEN_HYPERLINK };
-#endif
};
};
@@ -1374,14 +1370,12 @@ Menu RID_POPUP_GRAPHIC
MenuItem { Separator = TRUE ; };
//------------------------------
ITEM_GROUP_MENU
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
//------------------------------
MenuItem { Separator = TRUE ; };
//------------------------------
MN_EDITLNK
MN_DELLNK
MenuItem { ITEM_OPEN_HYPERLINK };
-#endif
};
};
diff --git a/sc/source/ui/drawfunc/oleobjsh.cxx b/sc/source/ui/drawfunc/oleobjsh.cxx
index 5f6a3a6c2f5e..d8a0b8c052ac 100644
--- a/sc/source/ui/drawfunc/oleobjsh.cxx
+++ b/sc/source/ui/drawfunc/oleobjsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -79,3 +80,4 @@ ScOleObjectShell::~ScOleObjectShell()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx
index 1d522fb3211e..d22531e76f59 100644
--- a/sc/source/ui/formdlg/dwfunctr.cxx
+++ b/sc/source/ui/formdlg/dwfunctr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1180,3 +1181,4 @@ void ScFunctionDockWin::StateChanged( StateChangedType nStateChange )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/formdlg/formdata.cxx b/sc/source/ui/formdlg/formdata.cxx
index e493e3f7b00f..d11ad33a6a45 100644
--- a/sc/source/ui/formdlg/formdata.cxx
+++ b/sc/source/ui/formdlg/formdata.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,3 +60,4 @@ void ScFormEditData::SaveValues()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx
index 25971594f116..0510d503762b 100644
--- a/sc/source/ui/formdlg/formula.cxx
+++ b/sc/source/ui/formdlg/formula.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -405,6 +406,7 @@ bool ScFormulaDlg::calculateValue( const String& rStrExp, String& rStrResult )
// virtuelle Methoden von ScAnyRefDlg:
void ScFormulaDlg::RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton )
{
+ pEdit->SetSelection(Selection(0, SELECTION_MAX));
::std::pair<formula::RefButton*,formula::RefEdit*> aPair = RefInputStartBefore( pEdit, pButton );
m_aHelper.RefInputStart( aPair.second, aPair.first);
RefInputStartAfter( aPair.second, aPair.first );
@@ -452,10 +454,19 @@ void ScFormulaDlg::SetReference( const ScRange& rRef, ScDocument* pRefDoc )
}
else
{
+ // We can't use ScRange::Format here because in R1C1 mode we need
+ // to display the reference position relative to the cursor
+ // position.
ScTokenArray aArray;
ScComplexRefData aRefData;
aRefData.InitRangeRel(rRef, aCursorPos);
- aArray.AddDoubleReference(aRefData);
+ bool bSingle = aRefData.Ref1 == aRefData.Ref2;
+ if (aCursorPos.Tab() != rRef.aStart.Tab())
+ aRefData.Ref1.SetFlag3D(true);
+ if (bSingle)
+ aArray.AddSingleReference(aRefData.Ref1);
+ else
+ aArray.AddDoubleReference(aRefData);
ScCompiler aComp(pDoc, aCursorPos, aArray);
aComp.SetGrammar(pDoc->GetGrammar());
::rtl::OUStringBuffer aBuf;
@@ -670,3 +681,4 @@ table::CellAddress ScFormulaDlg::getReferencePosition() const
return pArray;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/formdlg/makefile.mk b/sc/source/ui/formdlg/makefile.mk
index 339e8fa4d581..2574ca48f348 100644
--- a/sc/source/ui/formdlg/makefile.mk
+++ b/sc/source/ui/formdlg/makefile.mk
@@ -32,9 +32,7 @@ TARGET=formdlgs
# --- Settings -----------------------------------------------------
-.INCLUDE : scpre.mk
.INCLUDE : settings.mk
-.INCLUDE : sc.mk
.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files --------------------------------------------------------
diff --git a/sc/source/ui/formdlg/privsplt.cxx b/sc/source/ui/formdlg/privsplt.cxx
index a3b27ba21b1d..2497a86707d6 100644
--- a/sc/source/ui/formdlg/privsplt.cxx
+++ b/sc/source/ui/formdlg/privsplt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -420,3 +421,4 @@ void ScPrivatSplit::DataChanged( const DataChangedEvent& rDCEvt )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/AccessibilityHints.hxx b/sc/source/ui/inc/AccessibilityHints.hxx
index 8d966a78fa7f..dee0c99d4861 100644
--- a/sc/source/ui/inc/AccessibilityHints.hxx
+++ b/sc/source/ui/inc/AccessibilityHints.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -95,3 +96,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/AccessibleCell.hxx b/sc/source/ui/inc/AccessibleCell.hxx
index 38dfdc483886..6d0c1dfb524b 100644
--- a/sc/source/ui/inc/AccessibleCell.hxx
+++ b/sc/source/ui/inc/AccessibleCell.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -171,3 +172,5 @@ private:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/AccessibleCellBase.hxx b/sc/source/ui/inc/AccessibleCellBase.hxx
index 2bcef463480d..fb79d76c91a1 100644
--- a/sc/source/ui/inc/AccessibleCellBase.hxx
+++ b/sc/source/ui/inc/AccessibleCellBase.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -151,3 +152,5 @@ private:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/AccessibleContextBase.hxx b/sc/source/ui/inc/AccessibleContextBase.hxx
index 0085d01435a8..245122f5b73a 100644
--- a/sc/source/ui/inc/AccessibleContextBase.hxx
+++ b/sc/source/ui/inc/AccessibleContextBase.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,7 +42,7 @@
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XServiceName.hpp>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <cppuhelper/interfacecontainer.h>
@@ -340,3 +341,5 @@ private:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/AccessibleCsvControl.hxx b/sc/source/ui/inc/AccessibleCsvControl.hxx
index 14f48b51efc1..87cd4f8d7d26 100644
--- a/sc/source/ui/inc/AccessibleCsvControl.hxx
+++ b/sc/source/ui/inc/AccessibleCsvControl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -664,3 +665,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/AccessibleDataPilotControl.hxx b/sc/source/ui/inc/AccessibleDataPilotControl.hxx
index c86d598b6e9c..7d9c3f470bb8 100644
--- a/sc/source/ui/inc/AccessibleDataPilotControl.hxx
+++ b/sc/source/ui/inc/AccessibleDataPilotControl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -143,3 +144,5 @@ private:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/AccessibleDocument.hxx b/sc/source/ui/inc/AccessibleDocument.hxx
index 2ec612e0865b..fbfa0667f68f 100644
--- a/sc/source/ui/inc/AccessibleDocument.hxx
+++ b/sc/source/ui/inc/AccessibleDocument.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -326,3 +327,5 @@ private:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/AccessibleDocumentBase.hxx b/sc/source/ui/inc/AccessibleDocumentBase.hxx
index 1220fe3bd54d..eeab25f7af1c 100644
--- a/sc/source/ui/inc/AccessibleDocumentBase.hxx
+++ b/sc/source/ui/inc/AccessibleDocumentBase.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,3 +47,4 @@ protected:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/AccessibleDocumentPagePreview.hxx b/sc/source/ui/inc/AccessibleDocumentPagePreview.hxx
index 91fe3dc5077f..b524c6f5ffa3 100644
--- a/sc/source/ui/inc/AccessibleDocumentPagePreview.hxx
+++ b/sc/source/ui/inc/AccessibleDocumentPagePreview.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -152,3 +153,5 @@ private:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/AccessibleEditObject.hxx b/sc/source/ui/inc/AccessibleEditObject.hxx
index 55bb92f13424..5dd40f7c0d62 100644
--- a/sc/source/ui/inc/AccessibleEditObject.hxx
+++ b/sc/source/ui/inc/AccessibleEditObject.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -176,3 +177,5 @@ private:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/AccessiblePageHeader.hxx b/sc/source/ui/inc/AccessiblePageHeader.hxx
index 1e28670419a4..b3598adf7469 100644
--- a/sc/source/ui/inc/AccessiblePageHeader.hxx
+++ b/sc/source/ui/inc/AccessiblePageHeader.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -109,3 +110,5 @@ private:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/AccessiblePageHeaderArea.hxx b/sc/source/ui/inc/AccessiblePageHeaderArea.hxx
index 7c2345b5fa2c..3f907e5609ed 100644
--- a/sc/source/ui/inc/AccessiblePageHeaderArea.hxx
+++ b/sc/source/ui/inc/AccessiblePageHeaderArea.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -134,3 +135,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/AccessiblePreviewCell.hxx b/sc/source/ui/inc/AccessiblePreviewCell.hxx
index 47a2be3b6713..02090ad207f9 100644
--- a/sc/source/ui/inc/AccessiblePreviewCell.hxx
+++ b/sc/source/ui/inc/AccessiblePreviewCell.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -119,3 +120,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/AccessiblePreviewHeaderCell.hxx b/sc/source/ui/inc/AccessiblePreviewHeaderCell.hxx
index 520abe7c53c3..f3e8d7b29ea3 100644
--- a/sc/source/ui/inc/AccessiblePreviewHeaderCell.hxx
+++ b/sc/source/ui/inc/AccessiblePreviewHeaderCell.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -150,3 +151,5 @@ private:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/AccessiblePreviewTable.hxx b/sc/source/ui/inc/AccessiblePreviewTable.hxx
index 6d9ae3c3025f..9dfbcfbd6662 100644
--- a/sc/source/ui/inc/AccessiblePreviewTable.hxx
+++ b/sc/source/ui/inc/AccessiblePreviewTable.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -180,3 +181,5 @@ private:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/AccessibleSpreadsheet.hxx b/sc/source/ui/inc/AccessibleSpreadsheet.hxx
index 87447285dea2..77fae44a37d1 100644
--- a/sc/source/ui/inc/AccessibleSpreadsheet.hxx
+++ b/sc/source/ui/inc/AccessibleSpreadsheet.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -287,3 +288,5 @@ private:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/AccessibleTableBase.hxx b/sc/source/ui/inc/AccessibleTableBase.hxx
index 017ef4dfca3f..e436b623397e 100644
--- a/sc/source/ui/inc/AccessibleTableBase.hxx
+++ b/sc/source/ui/inc/AccessibleTableBase.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -296,3 +297,5 @@ protected:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/AccessibleText.hxx b/sc/source/ui/inc/AccessibleText.hxx
index 6265a1e4c1e5..eaa68f0e6aa2 100644
--- a/sc/source/ui/inc/AccessibleText.hxx
+++ b/sc/source/ui/inc/AccessibleText.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -355,3 +356,5 @@ public:
// ============================================================================
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/ChartRangeSelectionListener.hxx b/sc/source/ui/inc/ChartRangeSelectionListener.hxx
index 65c725da5675..45127b333983 100644
--- a/sc/source/ui/inc/ChartRangeSelectionListener.hxx
+++ b/sc/source/ui/inc/ChartRangeSelectionListener.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -77,3 +78,5 @@ private:
// SC_CHARTRANGESELECTIONLISTENER_HXX
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/DrawModelBroadcaster.hxx b/sc/source/ui/inc/DrawModelBroadcaster.hxx
index 045e9bc86f41..a3c56b722d58 100644
--- a/sc/source/ui/inc/DrawModelBroadcaster.hxx
+++ b/sc/source/ui/inc/DrawModelBroadcaster.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,3 +58,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/IAnyRefDialog.hxx b/sc/source/ui/inc/IAnyRefDialog.hxx
index 70731ac8a1f7..97212be8552e 100644
--- a/sc/source/ui/inc/IAnyRefDialog.hxx
+++ b/sc/source/ui/inc/IAnyRefDialog.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -62,3 +63,5 @@ public:
};
#endif // SC_IANYREFDIALOG_HXX_INCLUDED
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/ScDevChart.hxx b/sc/source/ui/inc/ScDevChart.hxx
index a08a89da0570..5f60bcec9a3e 100644
--- a/sc/source/ui/inc/ScDevChart.hxx
+++ b/sc/source/ui/inc/ScDevChart.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -82,3 +83,5 @@ bool UseDevChart()
// INCLUDED_DEVCHARTCONFIG_HXX
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/acredlin.hxx b/sc/source/ui/inc/acredlin.hxx
index 4fde0c20a70d..aeff805d72ca 100644
--- a/sc/source/ui/inc/acredlin.hxx
+++ b/sc/source/ui/inc/acredlin.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -253,3 +254,4 @@ public:
#endif // SC_NAMEDLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx
index 656ea3fc5cad..b10ccf083756 100644
--- a/sc/source/ui/inc/anyrefdg.hxx
+++ b/sc/source/ui/inc/anyrefdg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -273,3 +274,4 @@ template <> SC_DLLPUBLIC long ScRefHdlrImplBase<SfxTabDialog,false>::PreNotify(
//<!--Added by PengYunQuan for Validity Cell Range Picker
#endif // SC_ANYREFDG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/areasave.hxx b/sc/source/ui/inc/areasave.hxx
index 608f95a3bb51..c1ba5b4726a0 100644
--- a/sc/source/ui/inc/areasave.hxx
+++ b/sc/source/ui/inc/areasave.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -82,3 +83,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/areasdlg.hxx b/sc/source/ui/inc/areasdlg.hxx
index 0628281a377a..ed579ea065b7 100644
--- a/sc/source/ui/inc/areasdlg.hxx
+++ b/sc/source/ui/inc/areasdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -102,3 +103,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/asciiopt.hxx b/sc/source/ui/inc/asciiopt.hxx
index 9d798083a155..7581f7f8d072 100644
--- a/sc/source/ui/inc/asciiopt.hxx
+++ b/sc/source/ui/inc/asciiopt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,7 +45,7 @@
// ============================================================================
-class ScAsciiOptions
+class SC_DLLPUBLIC ScAsciiOptions
{
private:
BOOL bFixedLen;
@@ -108,3 +109,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/attrdlg.hxx b/sc/source/ui/inc/attrdlg.hxx
index 752ee01ddd62..07a2ed16726e 100644
--- a/sc/source/ui/inc/attrdlg.hxx
+++ b/sc/source/ui/inc/attrdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,3 +68,4 @@ private:
#endif // SC_ATTRDLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/auditsh.hxx b/sc/source/ui/inc/auditsh.hxx
index 75059f4f88cc..20d9702aeefa 100644
--- a/sc/source/ui/inc/auditsh.hxx
+++ b/sc/source/ui/inc/auditsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,3 +58,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/autofmt.hxx b/sc/source/ui/inc/autofmt.hxx
index 8fdea5310e6f..d8952ee2cbf6 100644
--- a/sc/source/ui/inc/autofmt.hxx
+++ b/sc/source/ui/inc/autofmt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -137,3 +138,4 @@ private:
#endif // SC_AUTOFMT_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/autostyl.hxx b/sc/source/ui/inc/autostyl.hxx
index 5540ecf87aac..859db2129a27 100644
--- a/sc/source/ui/inc/autostyl.hxx
+++ b/sc/source/ui/inc/autostyl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -66,3 +67,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/cbutton.hxx b/sc/source/ui/inc/cbutton.hxx
index 8de5dafe7768..b74fec6276ae 100644
--- a/sc/source/ui/inc/cbutton.hxx
+++ b/sc/source/ui/inc/cbutton.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -82,3 +83,4 @@ protected:
#endif // SC_CBUTTON_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/cellmergeoption.hxx b/sc/source/ui/inc/cellmergeoption.hxx
index 37b5b0b3e697..86e24167e9f1 100644
--- a/sc/source/ui/inc/cellmergeoption.hxx
+++ b/sc/source/ui/inc/cellmergeoption.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -58,3 +59,5 @@ struct ScCellMergeOption
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/cellsh.hxx b/sc/source/ui/inc/cellsh.hxx
index e24f30284ece..b5ab5d9abe06 100644
--- a/sc/source/ui/inc/cellsh.hxx
+++ b/sc/source/ui/inc/cellsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -105,3 +106,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/chartsh.hxx b/sc/source/ui/inc/chartsh.hxx
index 95efd03f3b76..0e09211ce346 100644
--- a/sc/source/ui/inc/chartsh.hxx
+++ b/sc/source/ui/inc/chartsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,3 +51,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/client.hxx b/sc/source/ui/inc/client.hxx
index b063ad63c9ba..ac39d6d386b5 100644
--- a/sc/source/ui/inc/client.hxx
+++ b/sc/source/ui/inc/client.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,3 +61,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/colrowba.hxx b/sc/source/ui/inc/colrowba.hxx
index 587412defea2..b4e1ba481ca0 100644
--- a/sc/source/ui/inc/colrowba.hxx
+++ b/sc/source/ui/inc/colrowba.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -108,3 +109,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/condfrmt.hxx b/sc/source/ui/inc/condfrmt.hxx
index ecd4c529d57a..1cb7b8cc83b0 100644
--- a/sc/source/ui/inc/condfrmt.hxx
+++ b/sc/source/ui/inc/condfrmt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -153,3 +154,4 @@ private:
#endif // SC_CONDFRMT_HXX_
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/conflictsdlg.hxx b/sc/source/ui/inc/conflictsdlg.hxx
index 6e8d1374570f..d7ba96ab526a 100644
--- a/sc/source/ui/inc/conflictsdlg.hxx
+++ b/sc/source/ui/inc/conflictsdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -210,3 +211,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/consdlg.hxx b/sc/source/ui/inc/consdlg.hxx
index 2004d907137d..d90a871e8c36 100644
--- a/sc/source/ui/inc/consdlg.hxx
+++ b/sc/source/ui/inc/consdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -126,3 +127,4 @@ private:
#endif // SC_CONSDLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/content.hxx b/sc/source/ui/inc/content.hxx
index 658378387416..952215ffbdd6 100644
--- a/sc/source/ui/inc/content.hxx
+++ b/sc/source/ui/inc/content.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -166,3 +167,4 @@ public:
#endif // SC_NAVIPI_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/corodlg.hxx b/sc/source/ui/inc/corodlg.hxx
index 0465ae7fbb04..fcf692500351 100644
--- a/sc/source/ui/inc/corodlg.hxx
+++ b/sc/source/ui/inc/corodlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -73,3 +74,4 @@ private:
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/crdlg.hxx b/sc/source/ui/inc/crdlg.hxx
index cc963ea2795e..544926756286 100644
--- a/sc/source/ui/inc/crdlg.hxx
+++ b/sc/source/ui/inc/crdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -61,3 +62,4 @@ private:
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/crnrdlg.hxx b/sc/source/ui/inc/crnrdlg.hxx
index e45ff4403633..bd0d974cd764 100644
--- a/sc/source/ui/inc/crnrdlg.hxx
+++ b/sc/source/ui/inc/crnrdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -110,3 +111,4 @@ private:
#endif // SC_CRNRDLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/csvcontrol.hxx b/sc/source/ui/inc/csvcontrol.hxx
index c38abfb83598..68a97150e8e4 100644
--- a/sc/source/ui/inc/csvcontrol.hxx
+++ b/sc/source/ui/inc/csvcontrol.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -430,3 +431,4 @@ protected:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/csvgrid.hxx b/sc/source/ui/inc/csvgrid.hxx
index fb6d687533e6..c5d5eb58649f 100644
--- a/sc/source/ui/inc/csvgrid.hxx
+++ b/sc/source/ui/inc/csvgrid.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -356,3 +357,4 @@ protected:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/csvruler.hxx b/sc/source/ui/inc/csvruler.hxx
index 52be4b4ebd8c..3d2d01da8b0f 100644
--- a/sc/source/ui/inc/csvruler.hxx
+++ b/sc/source/ui/inc/csvruler.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -198,3 +199,4 @@ protected:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/csvsplits.hxx b/sc/source/ui/inc/csvsplits.hxx
index 4685269936d5..42d38bcca803 100644
--- a/sc/source/ui/inc/csvsplits.hxx
+++ b/sc/source/ui/inc/csvsplits.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -101,3 +102,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/csvtablebox.hxx b/sc/source/ui/inc/csvtablebox.hxx
index f30c81f84b33..7837c4519da2 100644
--- a/sc/source/ui/inc/csvtablebox.hxx
+++ b/sc/source/ui/inc/csvtablebox.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -154,3 +155,4 @@ protected:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/dapidata.hxx b/sc/source/ui/inc/dapidata.hxx
index 5c57493208b3..588ef43cf72a 100644
--- a/sc/source/ui/inc/dapidata.hxx
+++ b/sc/source/ui/inc/dapidata.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -68,3 +69,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/dapitype.hxx b/sc/source/ui/inc/dapitype.hxx
index b2a81fa87086..25b3453822e0 100644
--- a/sc/source/ui/inc/dapitype.hxx
+++ b/sc/source/ui/inc/dapitype.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -91,3 +92,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/datafdlg.hrc b/sc/source/ui/inc/datafdlg.hrc
new file mode 100644
index 000000000000..edc14778ff8d
--- /dev/null
+++ b/sc/source/ui/inc/datafdlg.hrc
@@ -0,0 +1,40 @@
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Novell Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Amelia Wang <amwang@novell.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#include "sc.hrc" // -> RID_SCDLG_DATAFORM
+
+//dataform
+#define BTN_DATAFORM_NEW 1001
+#define BTN_DATAFORM_DELETE 1002
+#define BTN_DATAFORM_RESTORE 1003
+#define BTN_DATAFORM_LAST 1004
+#define BTN_DATAFORM_NEXT 1005
+#define BTN_DATAFORM_CLOSE 1007
+#define WND_DATAFORM_SCROLLBAR 1008
+#define LAB_DATAFORM_RECORDNO 1009
+
+#define FT_DATAFORM_FIXEDTEXT1 2001
+#define ED_DATAFORM_EDIT1 2002
diff --git a/sc/source/ui/inc/datafdlg.hxx b/sc/source/ui/inc/datafdlg.hxx
new file mode 100644
index 000000000000..46cdd9a3e2c5
--- /dev/null
+++ b/sc/source/ui/inc/datafdlg.hxx
@@ -0,0 +1,114 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Novell Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Amelia Wang <amwang@novell.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+#ifndef SC_DATAFDLG_HXX
+#define SC_DATAFDLG_HXX
+
+
+#ifndef _SV_DIALOG_HXX //autogen
+#include <vcl/dialog.hxx>
+#endif
+
+#ifndef _SV_BUTTON_HXX //autogen
+#include <vcl/imagebtn.hxx>
+#endif
+
+#ifndef _SV_FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+
+
+#include "global.hxx"
+
+#include <tabvwsh.hxx>
+#include <sfx2/bindings.hxx>
+#include <sfx2/dispatch.hxx>
+
+#define MAX_DATAFORM_COLS 256
+#define MAX_DATAFORM_ROWS 32000
+#define CTRL_HEIGHT 22
+#define FIXED_WIDTH 60
+#define EDIT_WIDTH 140
+#define FIXED_LEFT 12
+#define EDIT_LEFT 78
+#define LINE_HEIGHT 30
+
+//zhangyun
+class ScDataFormDlg : public ModalDialog
+{
+private:
+
+ PushButton aBtnNew;
+ PushButton aBtnDelete;
+ PushButton aBtnRestore;
+ PushButton aBtnLast;
+ PushButton aBtnNext;
+ PushButton aBtnClose;
+ ScrollBar aSlider;
+ FixedText aFixedText;
+ //FixedText aFixedText1;
+ //Edit aEdit1;
+
+ ScTabViewShell* pTabViewShell;
+ ScDocument* pDoc;
+ sal_uInt16 aColLength;
+ SCROW aCurrentRow;
+ SCCOL nStartCol;
+ SCCOL nEndCol;
+ SCROW nStartRow;
+ SCROW nEndRow;
+ SCTAB nTab;
+ BOOL bNoSelection;
+
+ FixedText** pFixedTexts;
+ Edit** pEdits;
+
+public:
+ ScDataFormDlg( Window* pParent, ScTabViewShell* pTabViewShell);
+ ~ScDataFormDlg();
+
+ void FillCtrls(SCROW nCurrentRow);
+private:
+
+ void SetButtonState();
+
+ // Handler:
+ DECL_LINK( Impl_NewHdl, PushButton* );
+ DECL_LINK( Impl_LastHdl, PushButton* );
+ DECL_LINK( Impl_NextHdl, PushButton* );
+
+ DECL_LINK( Impl_RestoreHdl, PushButton* );
+ DECL_LINK( Impl_DeleteHdl, PushButton* );
+ DECL_LINK( Impl_CloseHdl, PushButton* );
+
+ DECL_LINK( Impl_ScrollHdl, ScrollBar* );
+ DECL_LINK( Impl_DataModifyHdl, Edit* );
+};
+#endif // SC_DATAFDLG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/dbdocfun.hxx b/sc/source/ui/inc/dbdocfun.hxx
index efdd29b44738..aad57b0502f1 100644
--- a/sc/source/ui/inc/dbdocfun.hxx
+++ b/sc/source/ui/inc/dbdocfun.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -122,3 +123,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/dbfunc.hxx b/sc/source/ui/inc/dbfunc.hxx
index 3c24a8b11c21..9f01774f24b7 100644
--- a/sc/source/ui/inc/dbfunc.hxx
+++ b/sc/source/ui/inc/dbfunc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -133,3 +134,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/dbnamdlg.hxx b/sc/source/ui/inc/dbnamdlg.hxx
index 65f1b45873b0..8c6e61f60943 100644
--- a/sc/source/ui/inc/dbnamdlg.hxx
+++ b/sc/source/ui/inc/dbnamdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -119,3 +120,4 @@ private:
#endif // SC_DBNAMDLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/delcldlg.hxx b/sc/source/ui/inc/delcldlg.hxx
index e1a816e78c0f..e1bbcc0f9b59 100644
--- a/sc/source/ui/inc/delcldlg.hxx
+++ b/sc/source/ui/inc/delcldlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -62,3 +63,4 @@ public:
#endif // SC_DELCLDLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/delcodlg.hxx b/sc/source/ui/inc/delcodlg.hxx
index 8773b9c78f3a..15050229b507 100644
--- a/sc/source/ui/inc/delcodlg.hxx
+++ b/sc/source/ui/inc/delcodlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -72,3 +73,4 @@ public:
#endif // SC_DELCODLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/docfunc.hxx b/sc/source/ui/inc/docfunc.hxx
index 6c61364c5228..e36c521ee5b5 100644
--- a/sc/source/ui/inc/docfunc.hxx
+++ b/sc/source/ui/inc/docfunc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -167,6 +168,8 @@ public:
double fStart, double fStep, double fMax,
BOOL bRecord, BOOL bApi );
// FillAuto: rRange wird von Source-Range auf Dest-Range angepasst
+ SC_DLLPUBLIC BOOL FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd, ULONG nCount, double fStep, double fMax, BOOL bRecord, BOOL bApi );
+
BOOL FillAuto( ScRange& rRange, const ScMarkData* pTabMark,
FillDir eDir, ULONG nCount, BOOL bRecord, BOOL bApi );
@@ -193,3 +196,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 057e2af4d676..6a1fa0ff5098 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,8 +41,10 @@
#include "document.hxx"
#include "shellids.hxx"
#include "refreshtimer.hxx"
+#include "optutil.hxx"
#include <hash_map>
+#include <cppuhelper/implbase1.hxx>
class ScEditEngineDefaulter;
class FontList;
@@ -300,6 +303,10 @@ public:
ScMarkData& rMark, BOOL bRecord = TRUE );
void ModifyScenario( SCTAB nTab, const String& rName, const String& rComment,
const Color& rColor, USHORT nFlags );
+ ULONG TransferTab( ScDocShell& rSrcDocShell, SCTAB nSrcPos,
+ SCTAB nDestPos, BOOL bInsertNew,
+ BOOL bNotifyAndPaint );
+
BOOL MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRecord );
void DoRecalc( BOOL bApi );
@@ -425,6 +432,8 @@ public:
//-->Added by PengYunQuan for Validity Cell Range Picker
ScSheetSaveData* GetSheetSaveData();
+ void ResetKeyBindings( ScOptionsUtil::KeyBindingType eType );
+
// passwword protection for Calc (derived from SfxObjectShell)
// see also: FID_CHG_RECORD, SID_CHG_PROTECT
virtual bool IsChangeRecording() const;
@@ -471,3 +480,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/dpcontrol.hxx b/sc/source/ui/inc/dpcontrol.hxx
index 45badf0c88fd..5c5bcc49982e 100644
--- a/sc/source/ui/inc/dpcontrol.hxx
+++ b/sc/source/ui/inc/dpcontrol.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -69,11 +70,12 @@ public:
~ScDPFieldButton();
void setText(const ::rtl::OUString& rText);
- void setBoundingBox(const Point& rPos, const Size& rSize);
+ void setBoundingBox(const Point& rPos, const Size& rSize, bool bLayoutRTL);
void setDrawBaseButton(bool b);
void setDrawPopupButton(bool b);
void setHasHiddenMember(bool b);
void setPopupPressed(bool b);
+ void setPopupLeft(bool b);
void draw();
void getPopupBoundingBox(Point& rPos, Size& rSize) const;
@@ -94,6 +96,7 @@ private:
bool mbPopupButton;
bool mbHasHiddenMember;
bool mbPopupPressed;
+ bool mbPopupLeft;
};
// ============================================================================
@@ -359,3 +362,5 @@ private:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/dpgroupdlg.hxx b/sc/source/ui/inc/dpgroupdlg.hxx
index bf3308958c04..7a1770ab6844 100644
--- a/sc/source/ui/inc/dpgroupdlg.hxx
+++ b/sc/source/ui/inc/dpgroupdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -164,3 +165,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/drawsh.hxx b/sc/source/ui/inc/drawsh.hxx
index e633ab00e277..e0a9ee9674eb 100644
--- a/sc/source/ui/inc/drawsh.hxx
+++ b/sc/source/ui/inc/drawsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,9 +45,7 @@ class ScDrawShell : public SfxShell
DECL_LINK( NameObjectHdl, AbstractSvxNameDialog* );
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
void SetHlinkForObject( SdrObject* pObj, const rtl::OUString& rHlnk );
-#endif
protected:
ScViewData* GetViewData() { return pViewData; }
@@ -92,3 +91,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/drawutil.hxx b/sc/source/ui/inc/drawutil.hxx
index 67e1c0ba836f..d6bd314e4ef7 100644
--- a/sc/source/ui/inc/drawutil.hxx
+++ b/sc/source/ui/inc/drawutil.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -49,3 +50,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/drawview.hxx b/sc/source/ui/inc/drawview.hxx
index 62a291966fa8..408cbe4668b2 100644
--- a/sc/source/ui/inc/drawview.hxx
+++ b/sc/source/ui/inc/drawview.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -114,7 +115,7 @@ public:
bool HasMarkedControl() const;
bool HasMarkedInternal() const;
- FASTBOOL InsertObjectSafe(SdrObject* pObj, SdrPageView& rPV, ULONG nOptions=0);
+ bool InsertObjectSafe(SdrObject* pObj, SdrPageView& rPV, ULONG nOptions=0);
/** Returns the selected object, if it is the caption object of a cell note.
@param ppCaptData (out-param) If not null, returns the pointer to the caption object data. */
@@ -147,3 +148,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/drformsh.hxx b/sc/source/ui/inc/drformsh.hxx
index 7f7473eb7519..ec32afef4d62 100644
--- a/sc/source/ui/inc/drformsh.hxx
+++ b/sc/source/ui/inc/drformsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,3 +54,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/drtxtob.hxx b/sc/source/ui/inc/drtxtob.hxx
index 5c493df2f769..d159ab0ad669 100644
--- a/sc/source/ui/inc/drtxtob.hxx
+++ b/sc/source/ui/inc/drtxtob.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -87,3 +88,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/drwtrans.hxx b/sc/source/ui/inc/drwtrans.hxx
index 9a1175d3310d..de256909fcf7 100644
--- a/sc/source/ui/inc/drwtrans.hxx
+++ b/sc/source/ui/inc/drwtrans.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -108,3 +109,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/dwfunctr.hxx b/sc/source/ui/inc/dwfunctr.hxx
index 584daa904c1e..097a67dd02b4 100644
--- a/sc/source/ui/inc/dwfunctr.hxx
+++ b/sc/source/ui/inc/dwfunctr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -150,3 +151,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/editable.hxx b/sc/source/ui/inc/editable.hxx
index 4b6e8d0596bc..a0519be1b788 100644
--- a/sc/source/ui/inc/editable.hxx
+++ b/sc/source/ui/inc/editable.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -84,3 +85,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/editfield.hxx b/sc/source/ui/inc/editfield.hxx
index 9836e94aa215..bfae24f4fd9f 100644
--- a/sc/source/ui/inc/editfield.hxx
+++ b/sc/source/ui/inc/editfield.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -48,3 +49,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/editsh.hxx b/sc/source/ui/inc/editsh.hxx
index ebada82a32fb..5e915aa2a89e 100644
--- a/sc/source/ui/inc/editsh.hxx
+++ b/sc/source/ui/inc/editsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -84,3 +85,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/expftext.hxx b/sc/source/ui/inc/expftext.hxx
index 170deba5b403..e0d7717037fe 100644
--- a/sc/source/ui/inc/expftext.hxx
+++ b/sc/source/ui/inc/expftext.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,3 +44,5 @@ class SC_DLLPUBLIC ScExpandedFixedText: public FixedText
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/fieldwnd.hxx b/sc/source/ui/inc/fieldwnd.hxx
index 539dbe54e275..bc7ccfe135cc 100644
--- a/sc/source/ui/inc/fieldwnd.hxx
+++ b/sc/source/ui/inc/fieldwnd.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -218,3 +219,5 @@ public:
//===================================================================
#endif // SC_FIELDWND_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/filldlg.hxx b/sc/source/ui/inc/filldlg.hxx
index 26dab9f928d9..ddd5621c558f 100644
--- a/sc/source/ui/inc/filldlg.hxx
+++ b/sc/source/ui/inc/filldlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -130,3 +131,4 @@ private:
#endif // SC_FILLDLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/filtdlg.hxx b/sc/source/ui/inc/filtdlg.hxx
index 095ebc1345c8..44ea68f8e9c9 100644
--- a/sc/source/ui/inc/filtdlg.hxx
+++ b/sc/source/ui/inc/filtdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -259,3 +260,4 @@ private:
#endif // SC_FILTDLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/foptmgr.hxx b/sc/source/ui/inc/foptmgr.hxx
index 26ce85f8876d..18164f1b7d35 100644
--- a/sc/source/ui/inc/foptmgr.hxx
+++ b/sc/source/ui/inc/foptmgr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -111,3 +112,5 @@ private:
#endif // SC_FOPTMGR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/formatsh.hxx b/sc/source/ui/inc/formatsh.hxx
index 689e6da6e22f..7dc1919ea30e 100644
--- a/sc/source/ui/inc/formatsh.hxx
+++ b/sc/source/ui/inc/formatsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -80,3 +81,5 @@ private:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/formdata.hxx b/sc/source/ui/inc/formdata.hxx
index 72c7862a007b..395809357763 100644
--- a/sc/source/ui/inc/formdata.hxx
+++ b/sc/source/ui/inc/formdata.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -64,3 +65,4 @@ private:
#endif // SC_CRNRDLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/formula.hxx b/sc/source/ui/inc/formula.hxx
index 65d9cd475fb7..ea8298bea0ef 100644
--- a/sc/source/ui/inc/formula.hxx
+++ b/sc/source/ui/inc/formula.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -134,3 +135,4 @@ protected:
#endif // SC_CRNRDLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/fuconarc.hxx b/sc/source/ui/inc/fuconarc.hxx
index 686f2a00ae5b..29a058d5196b 100644
--- a/sc/source/ui/inc/fuconarc.hxx
+++ b/sc/source/ui/inc/fuconarc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,3 +61,4 @@ class FuConstArc : public FuConstruct
#endif // _SD_FUCONARC_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/fuconcustomshape.hxx b/sc/source/ui/inc/fuconcustomshape.hxx
index e6ecbfb2e2c3..0a64a8a91aab 100644
--- a/sc/source/ui/inc/fuconcustomshape.hxx
+++ b/sc/source/ui/inc/fuconcustomshape.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,3 +60,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/fuconpol.hxx b/sc/source/ui/inc/fuconpol.hxx
index 3a27ffcc2f69..caf92263c394 100644
--- a/sc/source/ui/inc/fuconpol.hxx
+++ b/sc/source/ui/inc/fuconpol.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -61,3 +62,4 @@ class FuConstPolygon : public FuConstruct
#endif // _FUCONPOL_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/fuconrec.hxx b/sc/source/ui/inc/fuconrec.hxx
index fb609e4a7681..b447bc846c0a 100644
--- a/sc/source/ui/inc/fuconrec.hxx
+++ b/sc/source/ui/inc/fuconrec.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,3 +61,4 @@ class FuConstRectangle : public FuConstruct
#endif // _SD_FUCONREC_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/fuconstr.hxx b/sc/source/ui/inc/fuconstr.hxx
index 28b20c7a94df..66c55a981caf 100644
--- a/sc/source/ui/inc/fuconstr.hxx
+++ b/sc/source/ui/inc/fuconstr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,3 +66,5 @@ class FuConstruct : public FuDraw
#endif // _SD_FUCONSTR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/fuconuno.hxx b/sc/source/ui/inc/fuconuno.hxx
index ffe2c1e9722b..3e1c90924e16 100644
--- a/sc/source/ui/inc/fuconuno.hxx
+++ b/sc/source/ui/inc/fuconuno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,3 +66,4 @@ public:
#endif // _SD_FUCONCTL_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/fudraw.hxx b/sc/source/ui/inc/fudraw.hxx
index 2344ca629c2f..5c0ac0c204c4 100644
--- a/sc/source/ui/inc/fudraw.hxx
+++ b/sc/source/ui/inc/fudraw.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -75,3 +76,5 @@ class FuDraw : public FuPoor
#endif // _SD_FUDRAW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/fuedipo.hxx b/sc/source/ui/inc/fuedipo.hxx
index 5138a134cc2e..3b27834f7a56 100644
--- a/sc/source/ui/inc/fuedipo.hxx
+++ b/sc/source/ui/inc/fuedipo.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -58,3 +59,4 @@ class FuEditPoints : public FuDraw
#endif // _SD_FUEDIPO_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/fuinsert.hxx b/sc/source/ui/inc/fuinsert.hxx
index 4dda7cb2b5ba..2964971244d6 100644
--- a/sc/source/ui/inc/fuinsert.hxx
+++ b/sc/source/ui/inc/fuinsert.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -83,3 +84,4 @@ class FuInsertMedia : public FuPoor
#endif // _SD_FUINSERT_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/fumark.hxx b/sc/source/ui/inc/fumark.hxx
index fcadc54768e8..61d287ea30f4 100644
--- a/sc/source/ui/inc/fumark.hxx
+++ b/sc/source/ui/inc/fumark.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -72,3 +73,4 @@ class FuMarkRect : public FuPoor
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/funcpage.hxx b/sc/source/ui/inc/funcpage.hxx
index 25527d4c432c..799f5e260645 100644
--- a/sc/source/ui/inc/funcpage.hxx
+++ b/sc/source/ui/inc/funcpage.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -124,3 +125,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/funcutl.hxx b/sc/source/ui/inc/funcutl.hxx
index 0b3740ef5712..afa8e1f5c853 100644
--- a/sc/source/ui/inc/funcutl.hxx
+++ b/sc/source/ui/inc/funcutl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -192,3 +193,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/fupoor.hxx b/sc/source/ui/inc/fupoor.hxx
index 6d9b7ae2af5a..279d6e1873cf 100644
--- a/sc/source/ui/inc/fupoor.hxx
+++ b/sc/source/ui/inc/fupoor.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -134,3 +135,4 @@ public:
#endif // _SD_FUPOOR_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/fusel.hxx b/sc/source/ui/inc/fusel.hxx
index c12b5739d61c..20887a6d151a 100644
--- a/sc/source/ui/inc/fusel.hxx
+++ b/sc/source/ui/inc/fusel.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -79,3 +80,4 @@ private:
#endif // _SD_FUSEL_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/futext.hxx b/sc/source/ui/inc/futext.hxx
index 41a41b054554..aa1290ae28e1 100644
--- a/sc/source/ui/inc/futext.hxx
+++ b/sc/source/ui/inc/futext.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -79,3 +80,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/graphsh.hxx b/sc/source/ui/inc/graphsh.hxx
index db9d04096142..64c3e053368b 100644
--- a/sc/source/ui/inc/graphsh.hxx
+++ b/sc/source/ui/inc/graphsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,3 +56,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/gridmerg.hxx b/sc/source/ui/inc/gridmerg.hxx
index dd656b948a6b..d8cd2d16b7b4 100644
--- a/sc/source/ui/inc/gridmerg.hxx
+++ b/sc/source/ui/inc/gridmerg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -62,3 +63,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index b079789071a0..f847dd919791 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -425,3 +426,4 @@ protected:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/groupdlg.hxx b/sc/source/ui/inc/groupdlg.hxx
index 38b96f21e90e..557044f16a3e 100644
--- a/sc/source/ui/inc/groupdlg.hxx
+++ b/sc/source/ui/inc/groupdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,3 +60,4 @@ private:
#endif // SC_STRINDLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/hdrcont.hxx b/sc/source/ui/inc/hdrcont.hxx
index c764e87fb453..c4cc590fc7ed 100644
--- a/sc/source/ui/inc/hdrcont.hxx
+++ b/sc/source/ui/inc/hdrcont.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -137,3 +138,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/hfedtdlg.hxx b/sc/source/ui/inc/hfedtdlg.hxx
index 1f1ea7242b17..335fe9618b50 100644
--- a/sc/source/ui/inc/hfedtdlg.hxx
+++ b/sc/source/ui/inc/hfedtdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -54,3 +55,5 @@ public:
#endif // SC_HFEDTDLG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/highred.hxx b/sc/source/ui/inc/highred.hxx
index 59b05cd7a62d..090905c481e8 100644
--- a/sc/source/ui/inc/highred.hxx
+++ b/sc/source/ui/inc/highred.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -112,3 +113,4 @@ public:
#endif // SC_NAMEDLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/hintwin.hxx b/sc/source/ui/inc/hintwin.hxx
index 2fd9e7897ab6..f199698178bc 100644
--- a/sc/source/ui/inc/hintwin.hxx
+++ b/sc/source/ui/inc/hintwin.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,3 +53,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/hiranges.hxx b/sc/source/ui/inc/hiranges.hxx
index 6182d30dc96e..a79bfad079c4 100644
--- a/sc/source/ui/inc/hiranges.hxx
+++ b/sc/source/ui/inc/hiranges.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -62,3 +63,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/imoptdlg.hxx b/sc/source/ui/inc/imoptdlg.hxx
index 01e10f9a3983..49f574bbf055 100644
--- a/sc/source/ui/inc/imoptdlg.hxx
+++ b/sc/source/ui/inc/imoptdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -106,3 +107,4 @@ public:
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/impex.hxx b/sc/source/ui/inc/impex.hxx
index 86a91216edcc..31ffe717817b 100644
--- a/sc/source/ui/inc/impex.hxx
+++ b/sc/source/ui/inc/impex.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,7 +51,7 @@ struct ScExportTextOptions
bool mbAddQuotes;
};
-class ScImportExport
+class SC_DLLPUBLIC ScImportExport
{
ScDocShell* pDocSh;
ScDocument* pDoc;
@@ -189,3 +190,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx
index 61974cf7464d..b6fb5eead65a 100644
--- a/sc/source/ui/inc/inputhdl.hxx
+++ b/sc/source/ui/inc/inputhdl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -125,7 +126,14 @@ private:
private:
void UpdateActiveView();
void SyncViews( EditView* pSourceView = NULL );
- BOOL StartTable( sal_Unicode cTyped, BOOL bFromCommand );
+ /**
+ * @param cTyped typed character. If 0, look at existing document content
+ * for text or number.
+ * @param bInputActivated true if the cell input mode is activated (via
+ * F2), false otherwise.
+ * @return true if the new edit mode has been started.
+ */
+ bool StartTable( sal_Unicode cTyped, bool bFromCommand, bool bInputActivated );
void RemoveSelection();
void UpdateFormulaMode();
void InvalidateAttribs();
@@ -187,7 +195,6 @@ public:
void ViewShellGone(ScTabViewShell* pViewSh);
void SetRefViewShell(ScTabViewShell* pRefVsh) {pRefViewSh=pRefVsh;}
-
void NotifyChange( const ScInputHdlState* pState, BOOL bForce = FALSE,
ScTabViewShell* pSourceSh = NULL,
BOOL bStopEditing = TRUE);
@@ -289,8 +296,7 @@ private:
EditTextObject* pEditData;
};
-
-
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index fec3d072adc1..46dbe9eb920a 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -224,3 +225,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/inscldlg.hxx b/sc/source/ui/inc/inscldlg.hxx
index fd8c090cfd33..7c3965ef981c 100644
--- a/sc/source/ui/inc/inscldlg.hxx
+++ b/sc/source/ui/inc/inscldlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,3 +61,4 @@ public:
#endif // SC_INSCLDLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/inscodlg.hxx b/sc/source/ui/inc/inscodlg.hxx
index 75b788277eea..5888c1e72209 100644
--- a/sc/source/ui/inc/inscodlg.hxx
+++ b/sc/source/ui/inc/inscodlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -114,3 +115,4 @@ private:
#endif // SC_INSCODLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/instbdlg.hxx b/sc/source/ui/inc/instbdlg.hxx
index 3a7d54b11677..d0ae51329feb 100644
--- a/sc/source/ui/inc/instbdlg.hxx
+++ b/sc/source/ui/inc/instbdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -122,3 +123,4 @@ private:
#endif // SC_INSTBDLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/invmerge.hxx b/sc/source/ui/inc/invmerge.hxx
index 49dfbc730fee..ebe03a91988f 100644
--- a/sc/source/ui/inc/invmerge.hxx
+++ b/sc/source/ui/inc/invmerge.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,3 +60,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/lbseldlg.hxx b/sc/source/ui/inc/lbseldlg.hxx
index 3119e3676850..f6e8946737d8 100644
--- a/sc/source/ui/inc/lbseldlg.hxx
+++ b/sc/source/ui/inc/lbseldlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,3 +66,4 @@ public:
#endif // SC_LBSELDLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/linkarea.hxx b/sc/source/ui/inc/linkarea.hxx
index 735b260b6334..513cd6d19175 100644
--- a/sc/source/ui/inc/linkarea.hxx
+++ b/sc/source/ui/inc/linkarea.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -102,3 +103,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/lnktrans.hxx b/sc/source/ui/inc/lnktrans.hxx
index 7e37c6cce554..23b89f0d2d41 100644
--- a/sc/source/ui/inc/lnktrans.hxx
+++ b/sc/source/ui/inc/lnktrans.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,3 +52,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/mediash.hxx b/sc/source/ui/inc/mediash.hxx
index e297dc11777a..58fccaae74f2 100644
--- a/sc/source/ui/inc/mediash.hxx
+++ b/sc/source/ui/inc/mediash.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,3 +53,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/msgpool.hxx b/sc/source/ui/inc/msgpool.hxx
index 948da8c9d735..76b5036b4000 100644
--- a/sc/source/ui/inc/msgpool.hxx
+++ b/sc/source/ui/inc/msgpool.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -75,3 +76,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/mtrindlg.hxx b/sc/source/ui/inc/mtrindlg.hxx
index f88f57a74e58..1dedf6ae258d 100644
--- a/sc/source/ui/inc/mtrindlg.hxx
+++ b/sc/source/ui/inc/mtrindlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -74,3 +75,4 @@ private:
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/mvtabdlg.hxx b/sc/source/ui/inc/mvtabdlg.hxx
index d5ce7726243f..27963f335bcb 100644
--- a/sc/source/ui/inc/mvtabdlg.hxx
+++ b/sc/source/ui/inc/mvtabdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -77,3 +78,4 @@ private:
#endif // SC_MVTABDLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/namecrea.hxx b/sc/source/ui/inc/namecrea.hxx
index 37c0f1b61a11..852a3ce9c85c 100644
--- a/sc/source/ui/inc/namecrea.hxx
+++ b/sc/source/ui/inc/namecrea.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,3 +53,5 @@ public:
#endif //SC_NAMECREA_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/namedlg.hxx b/sc/source/ui/inc/namedlg.hxx
index 3496fd98edba..627fc8d3fee0 100644
--- a/sc/source/ui/inc/namedlg.hxx
+++ b/sc/source/ui/inc/namedlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -115,3 +116,4 @@ public:
#endif // SC_NAMEDLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/namepast.hxx b/sc/source/ui/inc/namepast.hxx
index e053faf22a3c..3c3547666f8f 100644
--- a/sc/source/ui/inc/namepast.hxx
+++ b/sc/source/ui/inc/namepast.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,3 +58,5 @@ public:
#endif //SC_NAMEPAST_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/navcitem.hxx b/sc/source/ui/inc/navcitem.hxx
index b464bd6cc9ad..90bef19cc410 100644
--- a/sc/source/ui/inc/navcitem.hxx
+++ b/sc/source/ui/inc/navcitem.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,3 +54,4 @@ private:
#endif // SC_NAVCITEM_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/navipi.hxx b/sc/source/ui/inc/navipi.hxx
index 8d53742b6f1e..6b804589e145 100644
--- a/sc/source/ui/inc/navipi.hxx
+++ b/sc/source/ui/inc/navipi.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -364,3 +365,4 @@ private:
#endif // SC_NAVIPI_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/navsett.hxx b/sc/source/ui/inc/navsett.hxx
index 896c64606646..3666a6be981a 100644
--- a/sc/source/ui/inc/navsett.hxx
+++ b/sc/source/ui/inc/navsett.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,3 +58,4 @@ public:
#endif // SC_NAVSETT_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/notemark.hxx b/sc/source/ui/inc/notemark.hxx
index 9a881d822895..03626bfeafb7 100644
--- a/sc/source/ui/inc/notemark.hxx
+++ b/sc/source/ui/inc/notemark.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -76,3 +77,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/oleobjsh.hxx b/sc/source/ui/inc/oleobjsh.hxx
index fa4f71729c97..0d3e5c8d86a8 100644
--- a/sc/source/ui/inc/oleobjsh.hxx
+++ b/sc/source/ui/inc/oleobjsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,3 +51,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/olinefun.hxx b/sc/source/ui/inc/olinefun.hxx
index 444774ed2068..809db33df06d 100644
--- a/sc/source/ui/inc/olinefun.hxx
+++ b/sc/source/ui/inc/olinefun.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -66,3 +67,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/olinewin.hxx b/sc/source/ui/inc/olinewin.hxx
index 104f9e8f11da..266e67dd0999 100644
--- a/sc/source/ui/inc/olinewin.hxx
+++ b/sc/source/ui/inc/olinewin.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -242,3 +243,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/opredlin.hxx b/sc/source/ui/inc/opredlin.hxx
index 500f6903a812..f6c3a2212ca9 100644
--- a/sc/source/ui/inc/opredlin.hxx
+++ b/sc/source/ui/inc/opredlin.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -74,3 +75,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/optdlg.hrc b/sc/source/ui/inc/optdlg.hrc
index afe113177afd..e03f3e807037 100644
--- a/sc/source/ui/inc/optdlg.hrc
+++ b/sc/source/ui/inc/optdlg.hrc
@@ -27,13 +27,6 @@
#include "sc.hrc"
-/*
-#define RID_SCDLG_OPTIONS 256
-#define RID_SCPAGE_VIEW 256
-#define RID_SCPAGE_USERLISTS 257
-#define RID_SCPAGE_CALC 258
-#define RID_SCPAGE_PRINT 259
-*/
#define TP_GENERAL 1
#define TP_SAVE 2
@@ -90,14 +83,6 @@
#define BTN_NOTES 22
#define GB_CONTENTS 23
-//#define FT_OLE 31
-//#define FT_CHARTS 32
-//#define FT_DRAWINGS 33
-//#define LB_OLE 34
-//#define LB_CHARTS 35
-//#define LB_DRAWINGS 36
-//#define GB_OBJECTS 37
-
// TP_USERLISTS:
#define FT_LISTS 1
@@ -205,3 +190,8 @@
#define FT_FORMULA_SEP_ARRAY_C 89
#define ED_FORMULA_SEP_ARRAY_C 90
#define BTN_FORMULA_SEP_RESET 91
+
+// TP_COMPATIBILITY
+#define FL_KEY_BINDINGS 1
+#define FT_KEY_BINDINGS 2
+#define LB_KEY_BINDINGS 3
diff --git a/sc/source/ui/inc/optload.hxx b/sc/source/ui/inc/optload.hxx
index cd4cf83a6efe..26ffb04cb3be 100644
--- a/sc/source/ui/inc/optload.hxx
+++ b/sc/source/ui/inc/optload.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -64,3 +65,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/optsolver.hxx b/sc/source/ui/inc/optsolver.hxx
index bbd98f1d1818..f81fbf05cd1f 100644
--- a/sc/source/ui/inc/optsolver.hxx
+++ b/sc/source/ui/inc/optsolver.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -262,3 +263,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx
index 6812d9a5181e..bf4440e04d7b 100644
--- a/sc/source/ui/inc/output.hxx
+++ b/sc/source/ui/inc/output.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -271,3 +272,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/overlayobject.hxx b/sc/source/ui/inc/overlayobject.hxx
index 3d10407f72e8..175fcd16dafb 100644
--- a/sc/source/ui/inc/overlayobject.hxx
+++ b/sc/source/ui/inc/overlayobject.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56,3 +57,5 @@ private:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/pagedata.hxx b/sc/source/ui/inc/pagedata.hxx
index bcd85c8f5a96..31ce7a5db38c 100644
--- a/sc/source/ui/inc/pagedata.hxx
+++ b/sc/source/ui/inc/pagedata.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -93,3 +94,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/parawin.hxx b/sc/source/ui/inc/parawin.hxx
index f9836e33d493..36fac42a01ca 100644
--- a/sc/source/ui/inc/parawin.hxx
+++ b/sc/source/ui/inc/parawin.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -167,3 +168,4 @@ public:
#endif // SC_PARAWIN_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/pfiltdlg.hxx b/sc/source/ui/inc/pfiltdlg.hxx
index ad880e9943ab..64df881086db 100644
--- a/sc/source/ui/inc/pfiltdlg.hxx
+++ b/sc/source/ui/inc/pfiltdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -131,3 +132,4 @@ private:
#endif // SC_PFILTDLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/pfuncache.hxx b/sc/source/ui/inc/pfuncache.hxx
index 365df0acc38b..9ab60717c635 100644
--- a/sc/source/ui/inc/pfuncache.hxx
+++ b/sc/source/ui/inc/pfuncache.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -123,3 +124,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/pgbrksh.hxx b/sc/source/ui/inc/pgbrksh.hxx
index f367b4cc4f1f..bca834c27eb0 100644
--- a/sc/source/ui/inc/pgbrksh.hxx
+++ b/sc/source/ui/inc/pgbrksh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,3 +52,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/pivotsh.hxx b/sc/source/ui/inc/pivotsh.hxx
index 2d3a21fa9756..fff0f99ad388 100644
--- a/sc/source/ui/inc/pivotsh.hxx
+++ b/sc/source/ui/inc/pivotsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,3 +60,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/pntlock.hxx b/sc/source/ui/inc/pntlock.hxx
index 60a7502c9734..1633a160632d 100644
--- a/sc/source/ui/inc/pntlock.hxx
+++ b/sc/source/ui/inc/pntlock.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,3 +66,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/popmenu.hxx b/sc/source/ui/inc/popmenu.hxx
index 6e7569dea9a9..ee5bb314f213 100644
--- a/sc/source/ui/inc/popmenu.hxx
+++ b/sc/source/ui/inc/popmenu.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -49,3 +50,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/preview.hxx b/sc/source/ui/inc/preview.hxx
index 41f62c2ce9fc..870441a574c0 100644
--- a/sc/source/ui/inc/preview.hxx
+++ b/sc/source/ui/inc/preview.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -168,3 +169,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/prevloc.hxx b/sc/source/ui/inc/prevloc.hxx
index 02102fbc3ead..fdba3a6f66ab 100644
--- a/sc/source/ui/inc/prevloc.hxx
+++ b/sc/source/ui/inc/prevloc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -154,3 +155,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/prevwsh.hxx b/sc/source/ui/inc/prevwsh.hxx
index 7ff97f8d0152..861fba46d892 100644
--- a/sc/source/ui/inc/prevwsh.hxx
+++ b/sc/source/ui/inc/prevwsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -135,3 +136,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/printfun.hxx b/sc/source/ui/inc/printfun.hxx
index 32e5123fc166..41d33d693607 100644
--- a/sc/source/ui/inc/printfun.hxx
+++ b/sc/source/ui/inc/printfun.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -364,3 +365,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/privsplt.hxx b/sc/source/ui/inc/privsplt.hxx
index 6194a4342849..f7c9f325c06b 100644
--- a/sc/source/ui/inc/privsplt.hxx
+++ b/sc/source/ui/inc/privsplt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -84,3 +85,5 @@ class ScPrivatSplit : public Control
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/protectiondlg.hxx b/sc/source/ui/inc/protectiondlg.hxx
index d7d555ff5ac5..9fbedaffad07 100644
--- a/sc/source/ui/inc/protectiondlg.hxx
+++ b/sc/source/ui/inc/protectiondlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -80,3 +81,5 @@ private:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/pvfundlg.hxx b/sc/source/ui/inc/pvfundlg.hxx
index 20ea3602e638..773f73679235 100644
--- a/sc/source/ui/inc/pvfundlg.hxx
+++ b/sc/source/ui/inc/pvfundlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -250,3 +251,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/pvlaydlg.hxx b/sc/source/ui/inc/pvlaydlg.hxx
index 0b1be1300040..d9ae44cca438 100644
--- a/sc/source/ui/inc/pvlaydlg.hxx
+++ b/sc/source/ui/inc/pvlaydlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -232,3 +233,4 @@ private:
#endif // SC_PVLAYDLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/redcom.hxx b/sc/source/ui/inc/redcom.hxx
index 5c4908d8c7d9..f24478b96c35 100644
--- a/sc/source/ui/inc/redcom.hxx
+++ b/sc/source/ui/inc/redcom.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -64,3 +65,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/reffact.hxx b/sc/source/ui/inc/reffact.hxx
index 617d7c0a669a..0be78421455b 100644
--- a/sc/source/ui/inc/reffact.hxx
+++ b/sc/source/ui/inc/reffact.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -120,3 +121,5 @@ public:
#endif // SC_REFFACT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/refundo.hxx b/sc/source/ui/inc/refundo.hxx
index 87b5330e0f96..8abbd5155342 100644
--- a/sc/source/ui/inc/refundo.hxx
+++ b/sc/source/ui/inc/refundo.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,3 +68,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/retypepassdlg.hxx b/sc/source/ui/inc/retypepassdlg.hxx
index 59753d8d386b..92a41599821f 100644
--- a/sc/source/ui/inc/retypepassdlg.hxx
+++ b/sc/source/ui/inc/retypepassdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -172,3 +173,5 @@ private:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/rfindlst.hxx b/sc/source/ui/inc/rfindlst.hxx
index 225fd01451df..03867631aa24 100644
--- a/sc/source/ui/inc/rfindlst.hxx
+++ b/sc/source/ui/inc/rfindlst.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -73,3 +74,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/scendlg.hxx b/sc/source/ui/inc/scendlg.hxx
index 6281bb58b02c..fac5b33220e7 100644
--- a/sc/source/ui/inc/scendlg.hxx
+++ b/sc/source/ui/inc/scendlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -78,3 +79,4 @@ private:
#endif // SC_SCENDLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/scui_def.hxx b/sc/source/ui/inc/scui_def.hxx
index ca34ab0775b2..564b9f6eb362 100644
--- a/sc/source/ui/inc/scui_def.hxx
+++ b/sc/source/ui/inc/scui_def.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,3 +56,4 @@
#define SCRET_REMOVE 0x42 //from subtdlg.hxx
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/scuiasciiopt.hxx b/sc/source/ui/inc/scuiasciiopt.hxx
index 3e1a7db38fb2..5e512e3f8763 100644
--- a/sc/source/ui/inc/scuiasciiopt.hxx
+++ b/sc/source/ui/inc/scuiasciiopt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -145,3 +146,4 @@ inline bool ScImportAsciiDlg::Seek(ULONG nPos)
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/scuiautofmt.hxx b/sc/source/ui/inc/scuiautofmt.hxx
index 84a408267b20..69c5f5cb6bd8 100644
--- a/sc/source/ui/inc/scuiautofmt.hxx
+++ b/sc/source/ui/inc/scuiautofmt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -86,3 +87,4 @@ private:
};
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/scuiimoptdlg.hxx b/sc/source/ui/inc/scuiimoptdlg.hxx
index 957d174a3deb..605dec3cd7f6 100644
--- a/sc/source/ui/inc/scuiimoptdlg.hxx
+++ b/sc/source/ui/inc/scuiimoptdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -76,3 +77,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/scuitphfedit.hxx b/sc/source/ui/inc/scuitphfedit.hxx
index 99bd6c2a805a..6c0d3768d7c3 100644
--- a/sc/source/ui/inc/scuitphfedit.hxx
+++ b/sc/source/ui/inc/scuitphfedit.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -163,3 +164,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/select.hxx b/sc/source/ui/inc/select.hxx
index 815c2dbe53c2..7fdd0e780e54 100644
--- a/sc/source/ui/inc/select.hxx
+++ b/sc/source/ui/inc/select.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -123,3 +124,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/selectionstate.hxx b/sc/source/ui/inc/selectionstate.hxx
index cbdc6b1faff7..f60b334bfed5 100644
--- a/sc/source/ui/inc/selectionstate.hxx
+++ b/sc/source/ui/inc/selectionstate.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -77,3 +78,4 @@ inline bool operator!=( const ScSelectionState& rL, const ScSelectionState& rR )
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/seltrans.hxx b/sc/source/ui/inc/seltrans.hxx
index c695c918dad0..4fda9372a05e 100644
--- a/sc/source/ui/inc/seltrans.hxx
+++ b/sc/source/ui/inc/seltrans.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -79,3 +80,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/servobj.hxx b/sc/source/ui/inc/servobj.hxx
index 68e807461cad..975781f05169 100644
--- a/sc/source/ui/inc/servobj.hxx
+++ b/sc/source/ui/inc/servobj.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -74,3 +75,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/sharedocdlg.hxx b/sc/source/ui/inc/sharedocdlg.hxx
index 52c2f393b19a..e15fde82102b 100644
--- a/sc/source/ui/inc/sharedocdlg.hxx
+++ b/sc/source/ui/inc/sharedocdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -74,3 +75,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/shtabdlg.hxx b/sc/source/ui/inc/shtabdlg.hxx
index 43845fe6f2d3..b4e2c1037509 100644
--- a/sc/source/ui/inc/shtabdlg.hxx
+++ b/sc/source/ui/inc/shtabdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,3 +68,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/simpref.hxx b/sc/source/ui/inc/simpref.hxx
index f0c0d52ac402..eadc59d90470 100644
--- a/sc/source/ui/inc/simpref.hxx
+++ b/sc/source/ui/inc/simpref.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -112,3 +113,4 @@ public:
#endif // SC_DBNAMDLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/sizedev.hxx b/sc/source/ui/inc/sizedev.hxx
index 615755be0240..eb7a251fdd86 100644
--- a/sc/source/ui/inc/sizedev.hxx
+++ b/sc/source/ui/inc/sizedev.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,3 +54,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/solveroptions.hxx b/sc/source/ui/inc/solveroptions.hxx
index b0cf447be9a2..0d28b9e6f5ea 100644
--- a/sc/source/ui/inc/solveroptions.hxx
+++ b/sc/source/ui/inc/solveroptions.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -119,3 +120,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/solverutil.hxx b/sc/source/ui/inc/solverutil.hxx
index 89997e03c1a3..a447cec257fd 100644
--- a/sc/source/ui/inc/solverutil.hxx
+++ b/sc/source/ui/inc/solverutil.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -48,3 +49,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/solvrdlg.hxx b/sc/source/ui/inc/solvrdlg.hxx
index fa1b9eb6341c..a7f4cf8cec0d 100644
--- a/sc/source/ui/inc/solvrdlg.hxx
+++ b/sc/source/ui/inc/solvrdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -107,3 +108,4 @@ private:
#endif // SC_SOLVRDLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/sortdlg.hxx b/sc/source/ui/inc/sortdlg.hxx
index d528ddcadac2..7812b2a24499 100644
--- a/sc/source/ui/inc/sortdlg.hxx
+++ b/sc/source/ui/inc/sortdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -85,3 +86,5 @@ private:
#endif
#endif // SC_SORTDLG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/spelldialog.hxx b/sc/source/ui/inc/spelldialog.hxx
index eef0d170c2c8..d525c62597f1 100644
--- a/sc/source/ui/inc/spelldialog.hxx
+++ b/sc/source/ui/inc/spelldialog.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -101,3 +102,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/spelleng.hxx b/sc/source/ui/inc/spelleng.hxx
index f44d4a8f7094..e351c8ff2212 100644
--- a/sc/source/ui/inc/spelleng.hxx
+++ b/sc/source/ui/inc/spelleng.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -167,3 +168,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/spellparam.hxx b/sc/source/ui/inc/spellparam.hxx
index ecc66d7ccdcb..77ebb2476091 100644
--- a/sc/source/ui/inc/spellparam.hxx
+++ b/sc/source/ui/inc/spellparam.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -85,3 +86,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/strindlg.hxx b/sc/source/ui/inc/strindlg.hxx
index f84d8e4e2b51..af022443a80a 100644
--- a/sc/source/ui/inc/strindlg.hxx
+++ b/sc/source/ui/inc/strindlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -64,3 +65,4 @@ private:
#endif // SC_STRINDLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/styledlg.hxx b/sc/source/ui/inc/styledlg.hxx
index 63e37becf188..ed39fbf51b2b 100644
--- a/sc/source/ui/inc/styledlg.hxx
+++ b/sc/source/ui/inc/styledlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,3 +58,4 @@ private:
#endif // SC_STYLEDLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/subtdlg.hxx b/sc/source/ui/inc/subtdlg.hxx
index 0939ce8dc3ad..8cff085ae0f0 100644
--- a/sc/source/ui/inc/subtdlg.hxx
+++ b/sc/source/ui/inc/subtdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,3 +52,4 @@ private:
#endif // SC_SUBTDLG_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/tabbgcolordlg.hxx b/sc/source/ui/inc/tabbgcolordlg.hxx
index 338609ae0e4d..e46c1e83f7e8 100644
--- a/sc/source/ui/inc/tabbgcolordlg.hxx
+++ b/sc/source/ui/inc/tabbgcolordlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -76,3 +77,5 @@ private:
};
#endif // SC_TABBGCOLORDLG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/tabcont.hxx b/sc/source/ui/inc/tabcont.hxx
index d77ee812fdb3..c9892ecbceec 100644
--- a/sc/source/ui/inc/tabcont.hxx
+++ b/sc/source/ui/inc/tabcont.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -76,6 +77,7 @@ public:
using TabBar::StartDrag;
+ void UpdateInputContext();
void UpdateStatus();
void ActivateView(BOOL bActivate);
@@ -85,3 +87,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/tabopdlg.hxx b/sc/source/ui/inc/tabopdlg.hxx
index e9286ca5ee96..c0f06f060184 100644
--- a/sc/source/ui/inc/tabopdlg.hxx
+++ b/sc/source/ui/inc/tabopdlg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -112,3 +113,4 @@ private:
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/tabpages.hxx b/sc/source/ui/inc/tabpages.hxx
index e6d3aace22c8..22ddc43e52c2 100644
--- a/sc/source/ui/inc/tabpages.hxx
+++ b/sc/source/ui/inc/tabpages.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -79,3 +80,5 @@ private:
#endif // SC_TABPAGES_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/tabpopsh.hxx b/sc/source/ui/inc/tabpopsh.hxx
index 177e3d75136f..b9db71011897 100644
--- a/sc/source/ui/inc/tabpopsh.hxx
+++ b/sc/source/ui/inc/tabpopsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,3 +52,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/tabsplit.hxx b/sc/source/ui/inc/tabsplit.hxx
index a06664c7c4ee..9a369a0dd36f 100644
--- a/sc/source/ui/inc/tabsplit.hxx
+++ b/sc/source/ui/inc/tabsplit.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -58,3 +59,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index 50d04fb6f62a..3bfc8096c3a5 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -521,3 +522,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index efb000579fdf..b4685657f577 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -201,7 +202,7 @@ protected:
virtual void Deactivate(BOOL bMDI);
virtual USHORT PrepareClose( BOOL bUI = TRUE, BOOL bForBrowsing = FALSE );
- virtual void ShowCursor(FASTBOOL bOn);
+ virtual void ShowCursor(bool bOn);
virtual void Move(); // Benachrichtigung
@@ -226,7 +227,7 @@ protected:
virtual void UIDeactivated( SfxInPlaceClient* pClient );
- virtual FASTBOOL KeyInput( const KeyEvent &rKeyEvent );
+ virtual bool KeyInput( const KeyEvent &rKeyEvent );
virtual SdrView* GetDrawView() const;
public:
@@ -246,7 +247,7 @@ public:
virtual ~ScTabViewShell();
- Window* GetDialogParent();
+ SC_DLLPUBLIC Window* GetDialogParent();
bool IsRefInputMode() const;
void ExecuteInputDirect();
@@ -289,7 +290,7 @@ public:
void GetSaveState( SfxItemSet& rSet );
void ExecSearch( SfxRequest& rReq );
- void ExecuteUndo(SfxRequest& rReq);
+ SC_DLLPUBLIC void ExecuteUndo(SfxRequest& rReq);
void GetUndoState(SfxItemSet &rSet);
void ExecuteSbx( SfxRequest& rReq );
@@ -427,3 +428,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/target.hxx b/sc/source/ui/inc/target.hxx
index 6fc62ffaa8cf..f01793b80206 100644
--- a/sc/source/ui/inc/target.hxx
+++ b/sc/source/ui/inc/target.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,3 +51,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/tbinsert.hxx b/sc/source/ui/inc/tbinsert.hxx
index a056da0a982c..605710063872 100644
--- a/sc/source/ui/inc/tbinsert.hxx
+++ b/sc/source/ui/inc/tbinsert.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -86,3 +87,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/tbzoomsliderctrl.hxx b/sc/source/ui/inc/tbzoomsliderctrl.hxx
index 89731bbe0c9e..32581f1dc792 100644
--- a/sc/source/ui/inc/tbzoomsliderctrl.hxx
+++ b/sc/source/ui/inc/tbzoomsliderctrl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -75,3 +76,5 @@ protected:
virtual void Paint( const Rectangle& rRect );
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/textdlgs.hxx b/sc/source/ui/inc/textdlgs.hxx
index 302b5de5ffd2..24b68650ce16 100644
--- a/sc/source/ui/inc/textdlgs.hxx
+++ b/sc/source/ui/inc/textdlgs.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -70,3 +71,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/textimportoptions.hxx b/sc/source/ui/inc/textimportoptions.hxx
index bbb2bf6ebf09..c36c8fa5096d 100644
--- a/sc/source/ui/inc/textimportoptions.hxx
+++ b/sc/source/ui/inc/textimportoptions.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -74,3 +75,5 @@ private:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/tpcalc.hxx b/sc/source/ui/inc/tpcalc.hxx
index 31f2c9458c83..12e12c8750b8 100644
--- a/sc/source/ui/inc/tpcalc.hxx
+++ b/sc/source/ui/inc/tpcalc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -100,3 +101,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/tpcompatibility.hxx b/sc/source/ui/inc/tpcompatibility.hxx
new file mode 100644
index 000000000000..b7f25a3d36c7
--- /dev/null
+++ b/sc/source/ui/inc/tpcompatibility.hxx
@@ -0,0 +1,64 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyrigt 2010 Novell, Inc.
+ *
+ * LibreOffice - a multi-platform office productivity suite
+ *
+ * This file is part of LibreOffice.
+ *
+ * LibreOffice 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.
+ *
+ * LibreOffice 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 LibreOffice. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __SC_TPCOMPATIBILITY_HXX__
+#define __SC_TPCOMPATIBILITY_HXX__
+
+#include <sfx2/tabdlg.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/lstbox.hxx>
+
+#include <boost/shared_ptr.hpp>
+
+class ScDocOptions;
+
+class ScTpCompatOptions : public SfxTabPage
+{
+public:
+ static SfxTabPage* Create (Window* pParent, const SfxItemSet& rCoreAttrs);
+
+ virtual BOOL FillItemSet(SfxItemSet& rCoreAttrs);
+ virtual void Reset(const SfxItemSet& rCoreAttrs);
+ virtual int DeactivatePage(SfxItemSet* pSet = NULL);
+
+private:
+ explicit ScTpCompatOptions(Window* pParent, const SfxItemSet& rCoreAttrs);
+ virtual ~ScTpCompatOptions();
+
+private:
+ FixedLine maFlKeyBindings;
+ FixedText maFtKeyBindings;
+ ListBox maLbKeyBindings;
+
+ ::boost::shared_ptr<ScDocOptions> mpOldOptions;
+ ::boost::shared_ptr<ScDocOptions> mpNewOptions;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/tpformula.hxx b/sc/source/ui/inc/tpformula.hxx
index 62cc4a7eb943..b7553c0dc051 100644
--- a/sc/source/ui/inc/tpformula.hxx
+++ b/sc/source/ui/inc/tpformula.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -95,3 +96,5 @@ private:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/tphf.hxx b/sc/source/ui/inc/tphf.hxx
index dcf730712a40..5b7576320b13 100644
--- a/sc/source/ui/inc/tphf.hxx
+++ b/sc/source/ui/inc/tphf.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -101,3 +102,4 @@ private:
#endif // SC_TPHF_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/tphfedit.hxx b/sc/source/ui/inc/tphfedit.hxx
index 7051fc995299..c9dfa06cc3b6 100644
--- a/sc/source/ui/inc/tphfedit.hxx
+++ b/sc/source/ui/inc/tphfedit.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -136,3 +137,4 @@ public:
#endif // SC_TPHFEDIT_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/tpprint.hxx b/sc/source/ui/inc/tpprint.hxx
index 358c29f83d97..bbd2f471c1e9 100644
--- a/sc/source/ui/inc/tpprint.hxx
+++ b/sc/source/ui/inc/tpprint.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -54,3 +55,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/tpsort.hxx b/sc/source/ui/inc/tpsort.hxx
index 6b7a11f10802..f34d1236210a 100644
--- a/sc/source/ui/inc/tpsort.hxx
+++ b/sc/source/ui/inc/tpsort.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -221,3 +222,4 @@ private:
#endif // SC_TPSORT_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/tpstat.hxx b/sc/source/ui/inc/tpstat.hxx
index 1c928ff2ef13..4016e682176b 100644
--- a/sc/source/ui/inc/tpstat.hxx
+++ b/sc/source/ui/inc/tpstat.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,3 +64,5 @@ private:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/tpsubt.hxx b/sc/source/ui/inc/tpsubt.hxx
index 6dd640e7925e..1a2bd22c4a5b 100644
--- a/sc/source/ui/inc/tpsubt.hxx
+++ b/sc/source/ui/inc/tpsubt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -186,3 +187,4 @@ private:
#endif // SC_TPSORT_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/tptable.hxx b/sc/source/ui/inc/tptable.hxx
index 980a574dc61d..007fb3f795c1 100644
--- a/sc/source/ui/inc/tptable.hxx
+++ b/sc/source/ui/inc/tptable.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -113,3 +114,5 @@ private:
};
#endif // SC_TPTABLE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/tpusrlst.hxx b/sc/source/ui/inc/tpusrlst.hxx
index f26e48889f1d..2e277a14af8d 100644
--- a/sc/source/ui/inc/tpusrlst.hxx
+++ b/sc/source/ui/inc/tpusrlst.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -115,3 +116,4 @@ private:
#endif // SC_TPUSRLST_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/tpview.hxx b/sc/source/ui/inc/tpview.hxx
index 81760eb66c67..43a75433adda 100644
--- a/sc/source/ui/inc/tpview.hxx
+++ b/sc/source/ui/inc/tpview.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -169,3 +170,4 @@ public:
#endif // SC_TPUSRLST_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/transobj.hxx b/sc/source/ui/inc/transobj.hxx
index e2dbad485812..04a2eac1df29 100644
--- a/sc/source/ui/inc/transobj.hxx
+++ b/sc/source/ui/inc/transobj.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -113,3 +114,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/ui_pch.hxx b/sc/source/ui/inc/ui_pch.hxx
index c61fea95c67a..2e5f418ea5bd 100644
--- a/sc/source/ui/inc/ui_pch.hxx
+++ b/sc/source/ui/inc/ui_pch.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -325,3 +326,4 @@
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/uiitems.hxx b/sc/source/ui/inc/uiitems.hxx
index 2a66078599a3..4c6ae0914780 100644
--- a/sc/source/ui/inc/uiitems.hxx
+++ b/sc/source/ui/inc/uiitems.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -369,3 +370,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/undobase.hxx b/sc/source/ui/inc/undobase.hxx
index 6f2bb3572832..385f0892f5c3 100644
--- a/sc/source/ui/inc/undobase.hxx
+++ b/sc/source/ui/inc/undobase.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -169,3 +170,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/undoblk.hxx b/sc/source/ui/inc/undoblk.hxx
index 6b8ed3c3b539..a6eb727a7554 100644
--- a/sc/source/ui/inc/undoblk.hxx
+++ b/sc/source/ui/inc/undoblk.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -995,3 +996,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/undocell.hxx b/sc/source/ui/inc/undocell.hxx
index 8d7f17f81a85..0def8a3d67ba 100644
--- a/sc/source/ui/inc/undocell.hxx
+++ b/sc/source/ui/inc/undocell.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -373,3 +374,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/undodat.hxx b/sc/source/ui/inc/undodat.hxx
index 76f3d42a8475..05e4b9eff433 100644
--- a/sc/source/ui/inc/undodat.hxx
+++ b/sc/source/ui/inc/undodat.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -495,8 +496,45 @@ private:
void Init();
};
+// amelia
+class ScUndoDataForm: public ScBlockUndo
+{
+public:
+ TYPEINFO();
+ ScUndoDataForm( ScDocShell* pNewDocShell,
+ SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
+ SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
+ const ScMarkData& rMark,
+ ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc,
+ USHORT nNewFlags,
+ ScRefUndoData* pRefData, void* pFill1, void* pFill2, void* pFill3,
+ BOOL bRedoIsFilled = TRUE
+ );
+ virtual ~ScUndoDataForm();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual String GetComment() const;
+
+private:
+ ScMarkData aMarkData;
+ ScDocument* pUndoDoc;
+ ScDocument* pRedoDoc;
+ USHORT nFlags;
+ ScRefUndoData* pRefUndoData;
+ ScRefUndoData* pRefRedoData;
+ ULONG nStartChangeAction;
+ ULONG nEndChangeAction;
+ BOOL bRedoFilled;
+
+ void DoChange( const BOOL bUndo );
+ void SetChangeTrack();
+};
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/undodraw.hxx b/sc/source/ui/inc/undodraw.hxx
index a2647985af9f..565766e3bccb 100644
--- a/sc/source/ui/inc/undodraw.hxx
+++ b/sc/source/ui/inc/undodraw.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -61,3 +62,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/undoolk.hxx b/sc/source/ui/inc/undoolk.hxx
index 527c973b6705..132c0c1ac70c 100644
--- a/sc/source/ui/inc/undoolk.hxx
+++ b/sc/source/ui/inc/undoolk.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,3 +43,5 @@ void EnableDrawAdjust ( ScDocument* pDoc, BOOL bEnable );
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/undostyl.hxx b/sc/source/ui/inc/undostyl.hxx
index 5e7b86449722..9e3b3ed9f87e 100644
--- a/sc/source/ui/inc/undostyl.hxx
+++ b/sc/source/ui/inc/undostyl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -115,3 +116,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/undotab.hxx b/sc/source/ui/inc/undotab.hxx
index da130e4c0db8..029754663b72 100644
--- a/sc/source/ui/inc/undotab.hxx
+++ b/sc/source/ui/inc/undotab.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -519,3 +520,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/undoutil.hxx b/sc/source/ui/inc/undoutil.hxx
index 38302096b1fa..48985a132fe3 100644
--- a/sc/source/ui/inc/undoutil.hxx
+++ b/sc/source/ui/inc/undoutil.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -64,3 +65,5 @@ public:
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx
index f7cb9af23b63..1f7e714bb6e0 100644
--- a/sc/source/ui/inc/validate.hxx
+++ b/sc/source/ui/inc/validate.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -345,3 +346,4 @@ inline ScValidationDlg * ScValidationDlg::Find1AliveObject( Window *pAncestor )
//-->Added by PengYunQuan for Validity Cell Range Picker
#endif // SC_VALIDATE_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
index 3c5928b3ecc4..e754c8346294 100644
--- a/sc/source/ui/inc/viewdata.hxx
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -566,3 +567,4 @@ inline ScSplitPos Which( ScVSplitPos eVPos )
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
index 301c3e5663f7..f231e91d3dd6 100644
--- a/sc/source/ui/inc/viewfunc.hxx
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -110,6 +111,8 @@ public:
SC_DLLPUBLIC void CutToClip( ScDocument* pClipDoc = NULL, BOOL bIncludeObjects = FALSE );
SC_DLLPUBLIC BOOL CopyToClip( ScDocument* pClipDoc = NULL, BOOL bCut = FALSE, BOOL bApi = FALSE,
BOOL bIncludeObjects = FALSE, BOOL bStopEdit = TRUE );
+ SC_DLLPUBLIC BOOL CopyToClip( ScDocument* pClipDoc, const ScRange& rRange, BOOL bCut = FALSE,
+ BOOL bApi = FALSE, BOOL bIncludeObjects = FALSE, BOOL bStopEdit = TRUE );
ScTransferObj* CopyToTransferable();
SC_DLLPUBLIC BOOL PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
USHORT nFunction = PASTE_NOFUNC, BOOL bSkipEmpty = FALSE,
@@ -337,6 +340,13 @@ public:
void ForgetFormatArea() { bFormatValid = FALSE; }
BOOL SelectionEditable( BOOL* pOnlyNotBecauseOfMatrix = NULL );
+ // Amelia Wang
+ SC_DLLPUBLIC void DataFormPutData( SCROW nCurrentRow ,
+ SCROW nStartRow , SCCOL nStartCol ,
+ SCROW nEndRow , SCCOL nEndCol ,
+ Edit** pEdits ,
+ sal_uInt16 aColLength );
+
// interne Hilfsfunktionen
protected:
void UpdateLineAttrs( SvxBorderLine& rLine,
@@ -368,3 +378,4 @@ private:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/viewutil.hxx b/sc/source/ui/inc/viewutil.hxx
index eb1c6df2f902..37290323b920 100644
--- a/sc/source/ui/inc/viewutil.hxx
+++ b/sc/source/ui/inc/viewutil.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -114,3 +115,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/warnbox.hxx b/sc/source/ui/inc/warnbox.hxx
index 3b06c98c9e3e..e8f548f606fe 100644
--- a/sc/source/ui/inc/warnbox.hxx
+++ b/sc/source/ui/inc/warnbox.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -72,3 +73,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index 626f48254f37..ce6473c2b068 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -2133,3 +2134,4 @@ IMPL_LINK( ScAcceptChgDlg, ColCompareHdl, SvSortData*, pSortData )
return eCompare;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx
index 32b3376da9a7..0c46284c77d7 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1009,3 +1010,4 @@ void ScRefHandler::RefInputDone( BOOL bForced )
m_aHelper.RefInputDone( bForced );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx
index ce981a6e5793..18013a089306 100644
--- a/sc/source/ui/miscdlgs/autofmt.cxx
+++ b/sc/source/ui/miscdlgs/autofmt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -565,3 +566,4 @@ void ScAutoFmtPreview::Paint( const Rectangle& rRect )
DoPaint( rRect );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx
index 213c0b6a16a3..de40dd9d1868 100644
--- a/sc/source/ui/miscdlgs/conflictsdlg.cxx
+++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,7 +37,7 @@
#include "conflictsdlg.hrc"
#include "scresid.hxx"
#include "viewdata.hxx"
-#include "tabview.hxx"
+#include "dbfunc.hxx"
//=============================================================================
@@ -624,7 +625,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();
@@ -856,3 +857,5 @@ void ScConflictsDlg::UpdateView()
}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/crdlg.cxx b/sc/source/ui/miscdlgs/crdlg.cxx
index 074d54a5c912..5100474274df 100644
--- a/sc/source/ui/miscdlgs/crdlg.cxx
+++ b/sc/source/ui/miscdlgs/crdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -85,3 +86,4 @@ IMPL_LINK_INLINE_END( ScColOrRowDlg, OkHdl, OKButton *, EMPTYARG )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx
index 0ad2a2e80ca4..7afec7c603b4 100644
--- a/sc/source/ui/miscdlgs/crnrdlg.cxx
+++ b/sc/source/ui/miscdlgs/crnrdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1170,3 +1171,5 @@ IMPL_LINK( ScColRowNameRangesDlg, LoseFocusHdl, Control*, EMPTYARG )
bDlgLostFocus = !IsActive();
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/datafdlg.cxx b/sc/source/ui/miscdlgs/datafdlg.cxx
new file mode 100644
index 000000000000..377213fc0e10
--- /dev/null
+++ b/sc/source/ui/miscdlgs/datafdlg.cxx
@@ -0,0 +1,415 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Novell Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Amelia Wang <amwang@novell.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sc.hxx"
+
+#undef SC_DLLIMPLEMENTATION
+
+//------------------------------------------------------------------
+
+#include "datafdlg.hxx"
+#include "scresid.hxx"
+#include "datafdlg.hrc"
+#include "viewdata.hxx"
+//#include "document.hxx"
+#include "docsh.hxx"
+#include "refundo.hxx"
+#include "undodat.hxx"
+
+#define HDL(hdl) LINK( this, ScDataFormDlg, hdl )
+
+//zhangyun
+ScDataFormDlg::ScDataFormDlg( Window* pParent, ScTabViewShell* pTabViewShellOri) :
+ ModalDialog ( pParent, ScResId( RID_SCDLG_DATAFORM ) ),
+ //
+ aBtnNew ( this, ScResId( BTN_DATAFORM_NEW ) ),
+ aBtnDelete ( this, ScResId( BTN_DATAFORM_DELETE ) ),
+ aBtnRestore ( this, ScResId( BTN_DATAFORM_RESTORE ) ),
+ aBtnLast ( this, ScResId( BTN_DATAFORM_LAST ) ),
+ aBtnNext ( this, ScResId( BTN_DATAFORM_NEXT ) ),
+ aBtnClose ( this, ScResId( BTN_DATAFORM_CLOSE ) ),
+ aSlider ( this, ScResId( WND_DATAFORM_SCROLLBAR ) ),
+ aFixedText ( this, ScResId( LAB_DATAFORM_RECORDNO ) )
+{
+ pTabViewShell = pTabViewShellOri;
+ FreeResource();
+ //read header form current document, and add new controls
+ DBG_ASSERT( pTabViewShell, "pTabViewShell is NULL! :-/" );
+ ScViewData* pViewData = pTabViewShell->GetViewData();
+
+ pDoc = pViewData->GetDocument();
+ if (pDoc)
+ {
+ ScRange aRange;
+ pViewData->GetSimpleArea( aRange );
+ ScAddress aStart = aRange.aStart;
+ ScAddress aEnd = aRange.aEnd;
+
+ nStartCol = aStart.Col();
+ nEndCol = aEnd.Col();
+ nStartRow = aStart.Row();
+ nEndRow = aEnd.Row();
+
+ nTab = pViewData->GetTabNo();
+ //if there is no selection
+ if ((nStartCol == nEndCol) && (nStartRow == nEndRow))
+ bNoSelection = TRUE;
+
+ if (bNoSelection)
+ {
+ //find last not blank cell in row
+ for (int i=1;i<=MAX_DATAFORM_COLS;i++)
+ {
+ String aColName;
+ nEndCol++;
+ pDoc->GetString( nEndCol, nStartRow, nTab, aColName );
+ int nColWidth = pDoc->GetColWidth( nEndCol, nTab );
+ if ( aColName.Len() == 0 && nColWidth)
+ {
+ nEndCol--;
+ break;
+ }
+ }
+
+ //find first not blank cell in row
+ for (int i=1;i<=MAX_DATAFORM_COLS;i++)
+ {
+ String aColName;
+ if (nStartCol <= 0)
+ break;
+ nStartCol--;
+
+ pDoc->GetString( nStartCol, nStartRow, nTab, aColName );
+ int nColWidth = pDoc->GetColWidth( nEndCol, nTab );
+ if ( aColName.Len() == 0 && nColWidth)
+ {
+ nStartCol++;
+ break;
+ }
+ }
+
+ //skip leading hide column
+ for (int i=1;i<=MAX_DATAFORM_COLS;i++)
+ {
+ String aColName;
+ int nColWidth = pDoc->GetColWidth( nStartCol, nTab );
+ if (nColWidth)
+ break;
+ nStartCol++;
+ }
+
+ if (nEndCol < nStartCol)
+ nEndCol = nStartCol;
+
+ //find last not blank cell in row
+ for (int i=1;i<=MAX_DATAFORM_ROWS;i++)
+ {
+ String aColName;
+ nEndRow++;
+ pDoc->GetString( nStartCol, nEndRow, nTab, aColName );
+ if ( aColName.Len() == 0 )
+ {
+ nEndRow--;
+ break;
+ }
+ }
+
+ //find first not blank cell in row
+ for (int i=1;i<=MAX_DATAFORM_ROWS;i++)
+ {
+ String aColName;
+ if (nStartRow <= 0)
+ break;
+ nStartRow--;
+
+ pDoc->GetString( nStartCol, nStartRow, nTab, aColName );
+ if ( aColName.Len() == 0 )
+ {
+ nStartRow++;
+ break;
+ }
+ }
+
+ if (nEndRow < nStartRow)
+ nEndRow = nStartRow;
+ }
+
+ aCurrentRow = nStartRow + 1;
+
+ String aFieldName;
+
+ int nTop = 12;
+
+ Size nFixedSize(FIXED_WIDTH, CTRL_HEIGHT );
+ Size nEditSize(EDIT_WIDTH, CTRL_HEIGHT );
+
+ //pFtArray = new FixedText(this);
+ aColLength = nEndCol - nStartCol + 1;
+
+ //new the controls
+ pFixedTexts = new FixedText*[aColLength];
+ pEdits = new Edit*[aColLength];
+
+ for(sal_uInt16 nIndex = 0; nIndex < aColLength; nIndex++)
+ {
+ pDoc->GetString( nIndex + nStartCol, nStartRow, nTab, aFieldName );
+ int nColWidth = pDoc->GetColWidth( nIndex + nStartCol, nTab );
+ if (nColWidth)
+ {
+ pFixedTexts[nIndex] = new FixedText(this);
+ pEdits[nIndex] = new Edit(this, WB_BORDER);
+
+ pFixedTexts[nIndex]->SetSizePixel(nFixedSize);
+ pEdits[nIndex]->SetSizePixel(nEditSize);
+ pFixedTexts[nIndex]->SetPosPixel(Point(FIXED_LEFT, nTop));
+ pEdits[nIndex]->SetPosPixel(Point(EDIT_LEFT, nTop));
+ //pFixedTexts[nIndex]->SetText(String::CreateFromAscii("W4W-Filter Nr. "));
+ pFixedTexts[nIndex]->SetText(aFieldName);
+ pFixedTexts[nIndex]->Show();
+ pEdits[nIndex]->Show();
+
+ nTop += LINE_HEIGHT;
+ }
+ else
+ {
+ pFixedTexts[nIndex] = NULL;
+ pEdits[nIndex] = NULL;
+ }
+ pEdits[nIndex]->SetModifyHdl( HDL(Impl_DataModifyHdl) );
+ }
+
+ Size nDialogSize = this->GetSizePixel();
+ if (nTop > nDialogSize.Height())
+ {
+ nDialogSize.setHeight(nTop);
+ this->SetSizePixel(nDialogSize);
+ }
+ Size nScrollSize = aSlider.GetSizePixel();
+ nScrollSize.setHeight(nDialogSize.Height()-20);
+ aSlider.SetSizePixel(nScrollSize);
+ }
+
+ FillCtrls(aCurrentRow);
+
+ aSlider.SetPageSize( 10 );
+ aSlider.SetVisibleSize( 1 );
+ aSlider.SetLineSize( 1 );
+ aSlider.SetRange( Range( 0, nEndRow - nStartRow + 1) );
+ aSlider.Show();
+
+ aBtnNew.SetClickHdl ( HDL(Impl_NewHdl) );
+ aBtnLast.SetClickHdl ( HDL(Impl_LastHdl) );
+ aBtnNext.SetClickHdl ( HDL(Impl_NextHdl) );
+
+ aBtnRestore.SetClickHdl ( HDL(Impl_RestoreHdl) );
+ aBtnDelete.SetClickHdl ( HDL(Impl_DeleteHdl) );
+ aBtnClose.SetClickHdl ( HDL(Impl_CloseHdl) );
+
+ aSlider.SetEndScrollHdl( HDL( Impl_ScrollHdl ) );
+
+ SetButtonState();
+
+ //end
+ //FreeResource();
+}
+
+ScDataFormDlg::~ScDataFormDlg()
+{
+ for(sal_uInt16 i = 0; i < aColLength; i++)
+ {
+ if (pEdits[i])
+ delete pEdits[i];
+ if (pFixedTexts[i])
+ delete pFixedTexts[i];
+ }
+ if (pEdits)
+ delete pEdits;
+ if (pFixedTexts)
+ delete pFixedTexts;
+}
+
+void ScDataFormDlg::FillCtrls(SCROW /*nCurrentRow*/)
+{
+ //ScViewData* pViewData = pTabViewShell->GetViewData();
+
+ String aFieldName;
+ for (sal_uInt16 i = 0; i < aColLength; ++i)
+ {
+ if (pEdits[i])
+ {
+ if (aCurrentRow<=nEndRow)
+ {
+ pDoc->GetString( i + nStartCol, aCurrentRow, nTab, aFieldName );
+ pEdits[i]->SetText(aFieldName);
+ }
+ else
+ pEdits[i]->SetText(String());
+ }
+ }
+ char sRecordStr[256];
+ if (aCurrentRow<=nEndRow)
+ aFixedText.SetText(String::CreateFromAscii(sRecordStr));
+ else
+ aFixedText.SetText(String::CreateFromAscii("New Record"));
+
+ aSlider.SetThumbPos(aCurrentRow-nStartRow-1);
+}
+
+IMPL_LINK( ScDataFormDlg, Impl_DataModifyHdl, Edit*, pEdit)
+{
+ if ( pEdit->IsModified() )
+ aBtnRestore.Enable( TRUE );
+ return 0;
+}
+
+IMPL_LINK( ScDataFormDlg, Impl_NewHdl, PushButton*, EMPTYARG )
+{
+ ScViewData* pViewData = pTabViewShell->GetViewData();
+ ScDocShell* pDocSh = pViewData->GetDocShell();
+ if ( pDoc )
+ {
+ sal_Bool bHasData = sal_False;
+ for(sal_uInt16 i = 0; i < aColLength; i++)
+ if (pEdits[i])
+ if ( pEdits[i]->GetText().Len() != 0 )
+ {
+ bHasData = sal_True;
+ break;
+ }
+
+ if ( bHasData )
+ {
+ pTabViewShell->DataFormPutData( aCurrentRow , nStartRow , nStartCol , nEndRow , nEndCol , pEdits , aColLength );
+ aCurrentRow++;
+ if (aCurrentRow >= nEndRow + 2)
+ {
+ nEndRow ++ ;
+ aSlider.SetRange( Range( 0, nEndRow - nStartRow + 1) );
+ }
+ SetButtonState();
+ FillCtrls(aCurrentRow);
+ pDocSh->SetDocumentModified();
+ pDocSh->PostPaintGridAll();
+ }
+ }
+ return 0;
+}
+
+IMPL_LINK( ScDataFormDlg, Impl_LastHdl, PushButton*, EMPTYARG )
+{
+ if (pDoc)
+ {
+ if ( aCurrentRow > nStartRow +1 )
+ aCurrentRow--;
+
+ SetButtonState();
+ FillCtrls(aCurrentRow);
+ }
+ return 0;
+}
+
+IMPL_LINK( ScDataFormDlg, Impl_NextHdl, PushButton*, EMPTYARG )
+{
+ if (pDoc)
+ {
+ if ( aCurrentRow <= nEndRow)
+ aCurrentRow++;
+
+ SetButtonState();
+ FillCtrls(aCurrentRow);
+ }
+ return 0;
+}
+
+IMPL_LINK( ScDataFormDlg, Impl_RestoreHdl, PushButton*, EMPTYARG )
+{
+ if (pDoc)
+ {
+ FillCtrls(aCurrentRow);
+ }
+ return 0;
+}
+
+IMPL_LINK( ScDataFormDlg, Impl_DeleteHdl, PushButton*, EMPTYARG )
+{
+ ScViewData* pViewData = pTabViewShell->GetViewData();
+ ScDocShell* pDocSh = pViewData->GetDocShell();
+ if (pDoc)
+ {
+ ScRange aRange(nStartCol, aCurrentRow, nTab, nEndCol, aCurrentRow, nTab);
+ pDoc->DeleteRow(aRange);
+ nEndRow--;
+
+ SetButtonState();
+ pDocSh->GetUndoManager()->Clear();
+
+ FillCtrls(aCurrentRow);
+ pDocSh->SetDocumentModified();
+ pDocSh->PostPaintGridAll();
+ }
+ return 0;
+}
+
+IMPL_LINK( ScDataFormDlg, Impl_CloseHdl, PushButton*, EMPTYARG )
+{
+ EndDialog( );
+ return 0;
+}
+
+IMPL_LINK( ScDataFormDlg, Impl_ScrollHdl, ScrollBar*, EMPTYARG )
+{
+ long nOffset = aSlider.GetThumbPos();
+ aCurrentRow = nStartRow + nOffset + 1;
+ SetButtonState();
+ FillCtrls(aCurrentRow);
+ return 0;
+}
+
+void ScDataFormDlg::SetButtonState()
+{
+ if ( aCurrentRow > nEndRow )
+ {
+ aBtnDelete.Enable( FALSE );
+ aBtnLast.Enable( TRUE );
+ aBtnNext.Enable( FALSE );
+ }
+ else
+ {
+ aBtnDelete.Enable( TRUE );
+ aBtnNext.Enable( TRUE );
+ }
+ if ( 1 == aCurrentRow )
+ aBtnLast.Enable( FALSE );
+
+ aBtnRestore.Enable( FALSE );
+ if ( pEdits )
+ pEdits[0]->GrabFocus();
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/delcldlg.cxx b/sc/source/ui/miscdlgs/delcldlg.cxx
index fd206ac537ba..8d20d2ee50e6 100644
--- a/sc/source/ui/miscdlgs/delcldlg.cxx
+++ b/sc/source/ui/miscdlgs/delcldlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -118,3 +119,4 @@ __EXPORT ScDeleteCellDlg::~ScDeleteCellDlg()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/delcodlg.cxx b/sc/source/ui/miscdlgs/delcodlg.cxx
index 7be4c7a0bf3f..e8c7dde31443 100644
--- a/sc/source/ui/miscdlgs/delcodlg.cxx
+++ b/sc/source/ui/miscdlgs/delcodlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -178,3 +179,4 @@ __EXPORT ScDeleteContentsDlg::~ScDeleteContentsDlg()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/filldlg.cxx b/sc/source/ui/miscdlgs/filldlg.cxx
index 2b247f0f9a07..46af2992e4a5 100644
--- a/sc/source/ui/miscdlgs/filldlg.cxx
+++ b/sc/source/ui/miscdlgs/filldlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -373,3 +374,4 @@ IMPL_LINK( ScFillSeriesDlg, OKHdl, void *, EMPTYARG )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/groupdlg.cxx b/sc/source/ui/miscdlgs/groupdlg.cxx
index d6eb1865b184..d771e225ffdb 100644
--- a/sc/source/ui/miscdlgs/groupdlg.cxx
+++ b/sc/source/ui/miscdlgs/groupdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -81,3 +82,4 @@ __EXPORT ScGroupDlg::~ScGroupDlg()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/highred.cxx b/sc/source/ui/miscdlgs/highred.cxx
index dce755c10db3..d2c2f2c7cf84 100644
--- a/sc/source/ui/miscdlgs/highred.cxx
+++ b/sc/source/ui/miscdlgs/highred.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -299,3 +300,4 @@ IMPL_LINK( ScHighlightChgDlg, OKBtnHdl, PushButton*, pOKBtn )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/inscldlg.cxx b/sc/source/ui/miscdlgs/inscldlg.cxx
index 2a3489088489..f09513960ae4 100644
--- a/sc/source/ui/miscdlgs/inscldlg.cxx
+++ b/sc/source/ui/miscdlgs/inscldlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -118,3 +119,4 @@ __EXPORT ScInsertCellDlg::~ScInsertCellDlg()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/inscodlg.cxx b/sc/source/ui/miscdlgs/inscodlg.cxx
index b1c8e31ef373..63d55ac6f41e 100644
--- a/sc/source/ui/miscdlgs/inscodlg.cxx
+++ b/sc/source/ui/miscdlgs/inscodlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -370,3 +371,4 @@ USHORT ScInsertContentsDlg::GetFormulaCmdBits() const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/instbdlg.cxx b/sc/source/ui/miscdlgs/instbdlg.cxx
index 06d4f23389c0..d3a5cbe4f0dd 100644
--- a/sc/source/ui/miscdlgs/instbdlg.cxx
+++ b/sc/source/ui/miscdlgs/instbdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -431,3 +432,4 @@ IMPL_LINK( ScInsertTableDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/lbseldlg.cxx b/sc/source/ui/miscdlgs/lbseldlg.cxx
index afdb2b70da8a..f340cab4127c 100644
--- a/sc/source/ui/miscdlgs/lbseldlg.cxx
+++ b/sc/source/ui/miscdlgs/lbseldlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -99,3 +100,4 @@ __EXPORT ScSelEntryDlg::~ScSelEntryDlg()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx
index 48e33622e99f..26bc8cc56dad 100644
--- a/sc/source/ui/miscdlgs/linkarea.cxx
+++ b/sc/source/ui/miscdlgs/linkarea.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -364,3 +365,4 @@ ULONG ScLinkedAreaDlg::GetRefresh()
return 0; // disabled
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/makefile.mk b/sc/source/ui/miscdlgs/makefile.mk
index d34994341ade..115fc3aebe57 100644
--- a/sc/source/ui/miscdlgs/makefile.mk
+++ b/sc/source/ui/miscdlgs/makefile.mk
@@ -33,14 +33,13 @@ LIBTARGET=no
# --- Settings -----------------------------------------------------
-.INCLUDE : scpre.mk
.INCLUDE : settings.mk
-.INCLUDE : sc.mk
.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files --------------------------------------------------------
SLOFILES = \
+ $(SLO)$/datafdlg.obj \
$(SLO)$/delcldlg.obj \
$(SLO)$/inscldlg.obj \
$(SLO)$/delcodlg.obj \
diff --git a/sc/source/ui/miscdlgs/mtrindlg.cxx b/sc/source/ui/miscdlgs/mtrindlg.cxx
index 02bc77f8f89e..7bc19c14fa27 100644
--- a/sc/source/ui/miscdlgs/mtrindlg.cxx
+++ b/sc/source/ui/miscdlgs/mtrindlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -184,3 +185,4 @@ IMPL_LINK_INLINE_END( ScMetricInputDlg, ModifyHdl, MetricField *, EMPTYARG )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index 296cf8a8637f..b3505aa005ff 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -203,3 +204,4 @@ IMPL_LINK( ScMoveTableDlg, SelHdl, ListBox *, pLb )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/namecrea.cxx b/sc/source/ui/miscdlgs/namecrea.cxx
index 1714fddd3b3d..269ae78ad21f 100644
--- a/sc/source/ui/miscdlgs/namecrea.cxx
+++ b/sc/source/ui/miscdlgs/namecrea.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -77,3 +78,4 @@ USHORT ScNameCreateDlg::GetFlags() const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/namepast.cxx b/sc/source/ui/miscdlgs/namepast.cxx
index c621f14b431c..6e5baea3ed42 100644
--- a/sc/source/ui/miscdlgs/namepast.cxx
+++ b/sc/source/ui/miscdlgs/namepast.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -131,3 +132,4 @@ String ScNamePasteDlg::GetSelectedName() const
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx
index 37759aef81b5..4f70376455b5 100644
--- a/sc/source/ui/miscdlgs/optsolver.cxx
+++ b/sc/source/ui/miscdlgs/optsolver.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1064,3 +1065,4 @@ bool ScOptSolverDlg::CallSolver() // return true -> close dialog after cal
return bClose;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/protectiondlg.cxx b/sc/source/ui/miscdlgs/protectiondlg.cxx
index c10620bc8c4a..d66bd541a174 100644
--- a/sc/source/ui/miscdlgs/protectiondlg.cxx
+++ b/sc/source/ui/miscdlgs/protectiondlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,6 +34,7 @@
#include "scresid.hxx"
#include "tabprotection.hxx"
+#include <sal/macros.h>
#include <vcl/msgbox.hxx>
@@ -41,7 +43,7 @@ static const ScTableProtection::Option aOptions[] = {
ScTableProtection::SELECT_LOCKED_CELLS,
ScTableProtection::SELECT_UNLOCKED_CELLS,
};
-static const USHORT nOptionCount = sizeof(aOptions)/sizeof(aOptions[0]);
+static const USHORT nOptionCount = SAL_N_ELEMENTS(aOptions);
ScTableProtectionDlg::ScTableProtectionDlg(Window* pParent) :
@@ -159,3 +161,5 @@ IMPL_LINK( ScTableProtectionDlg, PasswordModifyHdl, Edit*, EMPTYARG )
maBtnOk.Enable(aPass1.Equals(aPass2));
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/redcom.cxx b/sc/source/ui/miscdlgs/redcom.cxx
index 518c6515580b..cae6a64ce233 100644
--- a/sc/source/ui/miscdlgs/redcom.cxx
+++ b/sc/source/ui/miscdlgs/redcom.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -183,3 +184,4 @@ IMPL_LINK(ScRedComDialog, NextHdl, AbstractSvxPostItDialog*, pDlgP )
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/retypepassdlg.cxx b/sc/source/ui/miscdlgs/retypepassdlg.cxx
index ef60b357489e..2a844c784888 100644
--- a/sc/source/ui/miscdlgs/retypepassdlg.cxx
+++ b/sc/source/ui/miscdlgs/retypepassdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -542,3 +543,5 @@ IMPL_LINK( ScRetypePassInputDlg, PasswordModifyHdl, Edit*, EMPTYARG )
CheckPasswordInput();
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx
index b2f837db4cb4..a7637afc5381 100644
--- a/sc/source/ui/miscdlgs/scuiautofmt.cxx
+++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -474,3 +475,5 @@ String __EXPORT ScAutoFormatDlg::GetCurrFormatName()
return aResult;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/sharedocdlg.cxx b/sc/source/ui/miscdlgs/sharedocdlg.cxx
index 4a5b7cc2149b..797f29612fe6 100644
--- a/sc/source/ui/miscdlgs/sharedocdlg.cxx
+++ b/sc/source/ui/miscdlgs/sharedocdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -233,3 +234,5 @@ void ScShareDocumentDlg::UpdateView()
maLbUsers.InsertEntry( aString, NULL );
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/shtabdlg.cxx b/sc/source/ui/miscdlgs/shtabdlg.cxx
index 7e57ebbe5d60..66cf2c8034e7 100644
--- a/sc/source/ui/miscdlgs/shtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/shtabdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -109,3 +110,4 @@ __EXPORT ScShowTabDlg::~ScShowTabDlg()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/simpref.cxx b/sc/source/ui/miscdlgs/simpref.cxx
index 097016836ee5..732543394634 100644
--- a/sc/source/ui/miscdlgs/simpref.cxx
+++ b/sc/source/ui/miscdlgs/simpref.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -255,3 +256,4 @@ IMPL_LINK( ScSimpleRefDlg, CancelBtnHdl, void *, EMPTYARG )
//------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx b/sc/source/ui/miscdlgs/solveroptions.cxx
index 418a88b3cbea..4ed6eebb07cb 100644
--- a/sc/source/ui/miscdlgs/solveroptions.cxx
+++ b/sc/source/ui/miscdlgs/solveroptions.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -490,3 +491,4 @@ double ScSolverValueDialog::GetValue() const
return fValue;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/solverutil.cxx b/sc/source/ui/miscdlgs/solverutil.cxx
index ae080f2525c7..fbe2cccfc0ba 100644
--- a/sc/source/ui/miscdlgs/solverutil.cxx
+++ b/sc/source/ui/miscdlgs/solverutil.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -95,7 +96,7 @@ void ScSolverUtil::GetImplementations( uno::Sequence<rtl::OUString>& rImplNames,
uno::Reference<beans::XPropertySet> xPropset(xMSF, uno::UNO_QUERY);
try
{
- xPropset->getPropertyValue(rtl::OUString::createFromAscii("DefaultContext")) >>= xCtx;
+ xPropset->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xCtx;
}
catch ( uno::Exception & )
{
@@ -105,7 +106,7 @@ void ScSolverUtil::GetImplementations( uno::Sequence<rtl::OUString>& rImplNames,
if ( xCtx.is() && xEnAc.is() )
{
uno::Reference<container::XEnumeration> xEnum =
- xEnAc->createContentEnumeration( rtl::OUString::createFromAscii(SCSOLVER_SERVICE) );
+ xEnAc->createContentEnumeration( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SCSOLVER_SERVICE)) );
if ( xEnum.is() )
{
while ( xEnum->hasMoreElements() )
@@ -151,7 +152,7 @@ uno::Reference<sheet::XSolver> ScSolverUtil::GetSolver( const rtl::OUString& rIm
uno::Reference<beans::XPropertySet> xPropset(xMSF, uno::UNO_QUERY);
try
{
- xPropset->getPropertyValue(rtl::OUString::createFromAscii("DefaultContext")) >>= xCtx;
+ xPropset->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xCtx;
}
catch ( uno::Exception & )
{
@@ -161,7 +162,7 @@ uno::Reference<sheet::XSolver> ScSolverUtil::GetSolver( const rtl::OUString& rIm
if ( xCtx.is() && xEnAc.is() )
{
uno::Reference<container::XEnumeration> xEnum =
- xEnAc->createContentEnumeration( rtl::OUString::createFromAscii(SCSOLVER_SERVICE) );
+ xEnAc->createContentEnumeration( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SCSOLVER_SERVICE)) );
if ( xEnum.is() )
{
while ( xEnum->hasMoreElements() && !xSolver.is() )
@@ -227,3 +228,4 @@ uno::Sequence<beans::PropertyValue> ScSolverUtil::GetDefaults( const rtl::OUStri
return aDefaults;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/solvrdlg.cxx b/sc/source/ui/miscdlgs/solvrdlg.cxx
index 5b41592e8457..524fcb8420ed 100644
--- a/sc/source/ui/miscdlgs/solvrdlg.cxx
+++ b/sc/source/ui/miscdlgs/solvrdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -311,3 +312,4 @@ IMPL_LINK( ScSolverDlg, LoseFocusHdl, Control*, EMPTYARG )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/strindlg.cxx b/sc/source/ui/miscdlgs/strindlg.cxx
index b8dc2e13538e..f2bcd660bae6 100644
--- a/sc/source/ui/miscdlgs/strindlg.cxx
+++ b/sc/source/ui/miscdlgs/strindlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -105,3 +106,4 @@ __EXPORT ScStringInputDlg::~ScStringInputDlg()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
index 463c06d76712..6154749f16aa 100644
--- a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
+++ b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -196,3 +197,5 @@ void ScTabBgColorDlg::ScTabBgColorValueSet::KeyInput( const KeyEvent& rKEvt )
}
ValueSet::KeyInput(rKEvt);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/tabopdlg.cxx b/sc/source/ui/miscdlgs/tabopdlg.cxx
index 38ae6bddaebd..2dce5792232d 100644
--- a/sc/source/ui/miscdlgs/tabopdlg.cxx
+++ b/sc/source/ui/miscdlgs/tabopdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -369,3 +370,4 @@ IMPL_LINK( ScTabOpDlg, LoseFocusHdl, Control*, EMPTYARG )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/textdlgs.cxx b/sc/source/ui/miscdlgs/textdlgs.cxx
index dcbb32bfa3e6..5af55079dda6 100644
--- a/sc/source/ui/miscdlgs/textdlgs.cxx
+++ b/sc/source/ui/miscdlgs/textdlgs.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -128,3 +129,4 @@ void __EXPORT ScParagraphDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/warnbox.cxx b/sc/source/ui/miscdlgs/warnbox.cxx
index 24b2e62a1c78..acf12cf263b0 100644
--- a/sc/source/ui/miscdlgs/warnbox.cxx
+++ b/sc/source/ui/miscdlgs/warnbox.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -89,3 +90,4 @@ void ScReplaceWarnBox::DisableDialog()
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/namedlg/makefile.mk b/sc/source/ui/namedlg/makefile.mk
index 7c1151b8340b..7bc7b2653b6a 100644
--- a/sc/source/ui/namedlg/makefile.mk
+++ b/sc/source/ui/namedlg/makefile.mk
@@ -32,9 +32,7 @@ TARGET=namedlg
# --- Settings -----------------------------------------------------
-.INCLUDE : scpre.mk
.INCLUDE : settings.mk
-.INCLUDE : sc.mk
.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files --------------------------------------------------------
diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx
index bc79fa7c65e7..728fefae1443 100644
--- a/sc/source/ui/namedlg/namedlg.cxx
+++ b/sc/source/ui/namedlg/namedlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -647,3 +648,4 @@ IMPL_LINK_INLINE_START( ScNameDlg, AssignGetFocusHdl, void *, EMPTYARG )
IMPL_LINK_INLINE_END( ScNameDlg, AssignGetFocusHdl, void *, EMPTYARG )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 5da1e4c273f7..5b55d47b70cd 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1513,3 +1514,4 @@ void ScContentTree::StoreSettings() const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/navipi/makefile.mk b/sc/source/ui/navipi/makefile.mk
index 9c0de073dd8c..992aefcd4f45 100644
--- a/sc/source/ui/navipi/makefile.mk
+++ b/sc/source/ui/navipi/makefile.mk
@@ -32,9 +32,7 @@ TARGET=navipi
# --- Settings -----------------------------------------------------
-.INCLUDE : scpre.mk
.INCLUDE : settings.mk
-.INCLUDE : sc.mk
.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files --------------------------------------------------------
diff --git a/sc/source/ui/navipi/navcitem.cxx b/sc/source/ui/navipi/navcitem.cxx
index e5002c44c60e..c6346ccc32c7 100644
--- a/sc/source/ui/navipi/navcitem.cxx
+++ b/sc/source/ui/navipi/navcitem.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -125,3 +126,4 @@ void __EXPORT ScNavigatorControllerItem::StateChanged( USHORT /* nSID */, SfxIte
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index e5f459d5b335..f3b53f5818a6 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1504,61 +1505,4 @@ SfxChildAlignment __EXPORT ScNavigatorDlg::CheckAlignment(
return eRetAlign;
}
-//------------------------------------------------------------------------
-//
-// Drop auf den Navigator - andere Datei laden (File oder Bookmark)
-//
-//------------------------------------------------------------------------
-
-#if 0
-BOOL __EXPORT ScNavigatorDlg::Drop( const DropEvent& rEvt )
-{
- BOOL bReturn = FALSE;
-
- if ( !aLbEntries.IsInDrag() ) // kein Verschieben innerhalb der TreeListBox
- {
- String aFileName;
-
- SvScDataObjectRef pObject = SvScDataObject::PasteDragServer(rEvt);
-
- ULONG nFormat = INetBookmark::HasFormat(*pObject);
- INetBookmark aBookmark;
- if (aBookmark.Paste(*pObject,nFormat))
- aFileName = aBookmark.GetURL();
- else
- {
- // FORMAT_FILE direkt aus DragServer
-
- USHORT nCount = DragServer::GetItemCount();
- for ( USHORT i = 0; i < nCount && !aFileName.Len(); ++i )
- if (DragServer::HasFormat( i, FORMAT_FILE ))
- aFileName = DragServer::PasteFile( i );
- }
-
- if ( aFileName.Len() )
- bReturn = aLbEntries.LoadFile( aFileName );
- }
- return bReturn;
-}
-
-BOOL __EXPORT ScNavigatorDlg::QueryDrop( DropEvent& rEvt )
-{
- BOOL bReturn = FALSE;
-
- if ( !aLbEntries.IsInDrag() ) // kein Verschieben innerhalb der TreeListBox
- {
- SvScDataObjectRef pObject = SvScDataObject::PasteDragServer(rEvt);
- if ( pObject->HasFormat(FORMAT_FILE)
- || INetBookmark::HasFormat(*pObject) )
- {
- rEvt.SetAction(DROP_COPY); // Kopier-Cursor anzeigen
- bReturn = TRUE;
- }
- }
-
- return bReturn;
-}
-#endif
-
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/navipi/scenwnd.cxx b/sc/source/ui/navipi/scenwnd.cxx
index e7dff0bf37c7..d8733a2cfef2 100644
--- a/sc/source/ui/navipi/scenwnd.cxx
+++ b/sc/source/ui/navipi/scenwnd.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -307,3 +308,4 @@ void ScScenarioWindow::SetSizePixel( const Size& rNewSize )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/optdlg/makefile.mk b/sc/source/ui/optdlg/makefile.mk
index f09eb9238f8c..9c816f56f7b8 100644
--- a/sc/source/ui/optdlg/makefile.mk
+++ b/sc/source/ui/optdlg/makefile.mk
@@ -32,9 +32,7 @@ TARGET=optdlg
# --- Settings -----------------------------------------------------
-.INCLUDE : scpre.mk
.INCLUDE : settings.mk
-.INCLUDE : sc.mk
.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files --------------------------------------------------------
@@ -47,14 +45,22 @@ CXXFILES = \
tpprint.cxx \
opredlin.cxx
+EXCEPTIONSFILES= \
+ $(SLO)$/tpcompatibility.obj
+
SLOFILES = \
$(SLO)$/tpusrlst.obj \
$(SLO)$/tpview.obj \
$(SLO)$/tpcalc.obj \
$(SLO)$/tpformula.obj \
+ $(SLO)$/tpcompatibility.obj \
$(SLO)$/tpprint.obj \
$(SLO)$/opredlin.obj
+EXCEPTIONSFILES= \
+ $(SLO)$/tpcompatibility.obj \
+
+
# --- Tagets -------------------------------------------------------
.INCLUDE : target.mk
diff --git a/sc/source/ui/optdlg/opredlin.cxx b/sc/source/ui/optdlg/opredlin.cxx
index 1a45ab715dee..f438b3cdfcbc 100644
--- a/sc/source/ui/optdlg/opredlin.cxx
+++ b/sc/source/ui/optdlg/opredlin.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -287,3 +288,4 @@ IMPL_LINK( ScRedlineOptionsTabPage, ColorHdl, ColorListBox *, EMPTYARG )
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/optdlg/tpcalc.cxx b/sc/source/ui/optdlg/tpcalc.cxx
index 5b5920e904fc..7d56184d014e 100644
--- a/sc/source/ui/optdlg/tpcalc.cxx
+++ b/sc/source/ui/optdlg/tpcalc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -303,3 +304,4 @@ IMPL_LINK( ScTpCalcOptions, CheckClickHdl, CheckBox*, pBtn )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/optdlg/tpcompatibility.cxx b/sc/source/ui/optdlg/tpcompatibility.cxx
new file mode 100644
index 000000000000..7b69ecf744ee
--- /dev/null
+++ b/sc/source/ui/optdlg/tpcompatibility.cxx
@@ -0,0 +1,108 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyrigt 2010 Novell, Inc.
+ *
+ * LibreOffice - a multi-platform office productivity suite
+ *
+ * This file is part of LibreOffice.
+ *
+ * LibreOffice 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.
+ *
+ * LibreOffice 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 LibreOffice. 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_sc.hxx"
+
+#undef SC_DLLIMPLEMENTATION
+
+#include "tpcompatibility.hxx"
+#include "optdlg.hrc"
+#include "scresid.hxx"
+#include "docoptio.hxx"
+
+ScTpCompatOptions::ScTpCompatOptions(Window *pParent, const SfxItemSet &rCoreAttrs) :
+ SfxTabPage(pParent, ScResId(RID_SCPAGE_COMPATIBILITY), rCoreAttrs),
+ maFlKeyBindings(this, ScResId(FL_KEY_BINDINGS)),
+ maFtKeyBindings(this, ScResId(FT_KEY_BINDINGS)),
+ maLbKeyBindings(this, ScResId(LB_KEY_BINDINGS))
+{
+ FreeResource();
+
+ const ScTpCalcItem& rItem = static_cast<const ScTpCalcItem&>(
+ rCoreAttrs.Get(GetWhich(SID_SCDOCOPTIONS)));
+ mpOldOptions.reset(new ScDocOptions(rItem.GetDocOptions()));
+ mpNewOptions.reset(new ScDocOptions(rItem.GetDocOptions()));
+}
+
+ScTpCompatOptions::~ScTpCompatOptions()
+{
+}
+
+SfxTabPage* ScTpCompatOptions::Create(Window *pParent, const SfxItemSet &rCoreAttrs)
+{
+ return new ScTpCompatOptions(pParent, rCoreAttrs);
+}
+
+BOOL ScTpCompatOptions::FillItemSet(SfxItemSet &rCoreAttrs)
+{
+ ScOptionsUtil::KeyBindingType eKeyB = ScOptionsUtil::KEY_DEFAULT;
+ switch (maLbKeyBindings.GetSelectEntryPos())
+ {
+ case 0:
+ eKeyB = ScOptionsUtil::KEY_DEFAULT;
+ break;
+ case 1:
+ eKeyB = ScOptionsUtil::KEY_OOO_LEGACY;
+ break;
+ default:
+ ;
+ }
+ mpNewOptions->SetKeyBindingType(eKeyB);
+
+ if (*mpNewOptions != *mpOldOptions)
+ {
+ rCoreAttrs.Put(ScTpCalcItem(GetWhich(SID_SCDOCOPTIONS), *mpNewOptions));
+ return true;
+ }
+ else
+ return false;
+}
+
+void ScTpCompatOptions::Reset(const SfxItemSet &/*rCoreAttrs*/)
+{
+ ScOptionsUtil::KeyBindingType eKeyB = mpOldOptions->GetKeyBindingType();
+ switch (eKeyB)
+ {
+ case ScOptionsUtil::KEY_DEFAULT:
+ maLbKeyBindings.SelectEntryPos(0);
+ break;
+ case ScOptionsUtil::KEY_OOO_LEGACY:
+ maLbKeyBindings.SelectEntryPos(1);
+ break;
+ default:
+ ;
+ }
+}
+
+int ScTpCompatOptions::DeactivatePage(SfxItemSet* /*pSet*/)
+{
+ return KEEP_PAGE;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/optdlg/tpformula.cxx b/sc/source/ui/optdlg/tpformula.cxx
index f793a058312d..8d7dd7daff95 100644
--- a/sc/source/ui/optdlg/tpformula.cxx
+++ b/sc/source/ui/optdlg/tpformula.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -289,3 +290,5 @@ int ScTpFormulaOptions::DeactivatePage(SfxItemSet* /*pSet*/)
// What's this method for ?
return KEEP_PAGE;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/optdlg/tpprint.cxx b/sc/source/ui/optdlg/tpprint.cxx
index d14b79bd739a..31f913e23061 100644
--- a/sc/source/ui/optdlg/tpprint.cxx
+++ b/sc/source/ui/optdlg/tpprint.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -142,3 +143,4 @@ BOOL ScTpPrintOptions::FillItemSet( SfxItemSet& rCoreAttrs )
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx
index e3f6e488c310..da188c65470b 100644
--- a/sc/source/ui/optdlg/tpusrlst.cxx
+++ b/sc/source/ui/optdlg/tpusrlst.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -825,3 +826,4 @@ IMPL_LINK( ScTpUserLists, EdEntriesModHdl, MultiLineEdit*, pEd )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx
index 5c2e8dd52c9f..7c49d6d2d54c 100644
--- a/sc/source/ui/optdlg/tpview.cxx
+++ b/sc/source/ui/optdlg/tpview.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -743,3 +744,4 @@ IMPL_LINK( ScTpLayoutOptions, AlignHdl, CheckBox*, pBox )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index 915355d5d0f2..d80e5062f2e9 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -79,6 +80,7 @@ bool lcl_CheckRepeatString( const String& rStr, ScDocument* pDoc, bool bIsRow
void lcl_GetRepeatRangeString( const ScRange* pRange, ScDocument* pDoc, bool bIsRow, String& rStr );
#if 0
+// this method is useful when debugging address flags.
static void printAddressFlags(USHORT nFlag)
{
if ((nFlag & SCA_COL_ABSOLUTE ) == SCA_COL_ABSOLUTE ) printf("SCA_COL_ABSOLUTE \n");
@@ -904,3 +906,4 @@ void lcl_GetRepeatRangeString( const ScRange* pRange, ScDocument* pDoc, bool bIs
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/pagedlg/hfedtdlg.cxx b/sc/source/ui/pagedlg/hfedtdlg.cxx
index 263b4c0bae30..3fa032989dfc 100644
--- a/sc/source/ui/pagedlg/hfedtdlg.cxx
+++ b/sc/source/ui/pagedlg/hfedtdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -183,3 +184,4 @@ void __EXPORT ScHFEditDlg::PageCreated( USHORT /* nId */, SfxTabPage& rPage )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/pagedlg/makefile.mk b/sc/source/ui/pagedlg/makefile.mk
index 500e642e79eb..93224ec7cb58 100644
--- a/sc/source/ui/pagedlg/makefile.mk
+++ b/sc/source/ui/pagedlg/makefile.mk
@@ -33,9 +33,7 @@ LIBTARGET=no
# --- Settings -----------------------------------------------------
-.INCLUDE : scpre.mk
.INCLUDE : settings.mk
-.INCLUDE : sc.mk
.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files --------------------------------------------------------
diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx
index 15d1b646b73f..5ea90ef0d77d 100644
--- a/sc/source/ui/pagedlg/scuitphfedit.cxx
+++ b/sc/source/ui/pagedlg/scuitphfedit.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -997,3 +998,5 @@ USHORT* __EXPORT ScLeftFooterEditPage::GetRanges()
SfxTabPage* __EXPORT ScLeftFooterEditPage::Create( Window* pParent, const SfxItemSet& rCoreSet )
{ return ( new ScLeftFooterEditPage( pParent, rCoreSet ) ); };
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/pagedlg/tphf.cxx b/sc/source/ui/pagedlg/tphf.cxx
index 7c1c3046f743..96150acf4960 100644
--- a/sc/source/ui/pagedlg/tphf.cxx
+++ b/sc/source/ui/pagedlg/tphf.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -328,3 +329,4 @@ USHORT* __EXPORT ScFooterPage::GetRanges()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx
index fef6778d184f..52d8d7cad040 100644
--- a/sc/source/ui/pagedlg/tphfedit.cxx
+++ b/sc/source/ui/pagedlg/tphfedit.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -563,3 +564,4 @@ Timer
*/
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/pagedlg/tptable.cxx b/sc/source/ui/pagedlg/tptable.cxx
index a2b732464e12..a85ef657a3e1 100644
--- a/sc/source/ui/pagedlg/tptable.cxx
+++ b/sc/source/ui/pagedlg/tptable.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -568,3 +569,4 @@ BOOL lcl_PutScaleItem2( USHORT nWhich,
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/src/datafdlg.src b/sc/source/ui/src/datafdlg.src
new file mode 100644
index 000000000000..2c07a704d1c0
--- /dev/null
+++ b/sc/source/ui/src/datafdlg.src
@@ -0,0 +1,95 @@
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Novell Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Amelia Wang <amwang@novell.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#include "datafdlg.hrc"
+
+//zhangyun, dataform
+ModalDialog RID_SCDLG_DATAFORM
+{
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 191 , 180 ) ;
+ Text [ en-US ] = "Data Form" ;
+ Moveable = TRUE ;
+ Closeable = TRUE ;
+ FixedText LAB_DATAFORM_RECORDNO
+ {
+ Pos = MAP_APPFONT ( 136 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 12 ) ;
+ Text [ en-US ] = "/" ;
+ };
+ PushButton BTN_DATAFORM_NEW
+ {
+ Pos = MAP_APPFONT ( 135 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ DefButton = TRUE ;
+ Text [ en-US ] = "New" ;
+ };
+ PushButton BTN_DATAFORM_DELETE
+ {
+ Pos = MAP_APPFONT ( 135 , 40 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ Text [ en-US ] = "Delete" ;
+ };
+ PushButton BTN_DATAFORM_RESTORE
+ {
+ Pos = MAP_APPFONT ( 135 , 57 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ Text [ en-US ] = "Restore" ;
+ };
+ PushButton BTN_DATAFORM_LAST
+ {
+ Pos = MAP_APPFONT ( 135 , 82 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ Text [ en-US ] = "Last Record" ;
+ };
+ PushButton BTN_DATAFORM_NEXT
+ {
+ Pos = MAP_APPFONT ( 135 , 99 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ Text [ en-US ] = "Next Record" ;
+ };
+ PushButton BTN_DATAFORM_CLOSE
+ {
+ Pos = MAP_APPFONT ( 135 , 116 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ Text [ en-US ] = "Close" ;
+ };
+ ScrollBar WND_DATAFORM_SCROLLBAR
+ {
+ Pos = MAP_APPFONT ( 124 , 6 ) ;
+ Size = MAP_APPFONT ( 8 , 135 ) ;
+ HScroll = FALSE ;
+ TabStop = FALSE ;
+ };
+};
+//end
diff --git a/sc/source/ui/src/globstr.src b/sc/source/ui/src/globstr.src
index 6f0b1f1fd789..a3fd6d5b7116 100644
--- a/sc/source/ui/src/globstr.src
+++ b/sc/source/ui/src/globstr.src
@@ -619,6 +619,10 @@ Resource RID_GLOBSTR
{
Text [ en-US ] = "Page" ;
};
+ String STR_PGNUM
+ {
+ Text [ en-US ] = "Page %1" ;
+ };
String STR_LOAD_DOC
{
Text [ en-US ] = "Load document" ;
@@ -1718,6 +1722,77 @@ Resource RID_GLOBSTR
{
Text [ en-US ] = "Unknown User";
};
+
+ String STR_SHAPE_AUTOSHAPE
+ {
+ Text [ en-US ] = "AutoShape";
+ };
+
+ String STR_SHAPE_RECTANGLE
+ {
+ Text [ en-US ] = "Rectangle";
+ };
+
+ String STR_SHAPE_LINE
+ {
+ Text [ en-US ] = "Line";
+ };
+
+ String STR_SHAPE_OVAL
+ {
+ Text [ en-US ] = "Oval";
+ };
+
+ String STR_SHAPE_TEXTBOX
+ {
+ Text [ en-US ] = "Text Box";
+ };
+
+ String STR_FORM_BUTTON
+ {
+ Text [ en-US ] = "Button";
+ };
+
+ String STR_FORM_CHECKBOX
+ {
+ Text [ en-US ] = "Check Box";
+ };
+
+ String STR_FORM_OPTIONBUTTON
+ {
+ Text [ en-US ] = "Option Button";
+ };
+
+ String STR_FORM_LABEL
+ {
+ Text [ en-US ] = "Label";
+ };
+
+ String STR_FORM_LISTBOX
+ {
+ Text [ en-US ] = "List Box";
+ };
+
+ String STR_FORM_GROUPBOX
+ {
+ Text [ en-US ] = "Group Box";
+ };
+
+ String STR_FORM_DROPDOWN
+ {
+ Text [ en-US ] = "Drop Down";
+ };
+
+ String STR_FORM_SPINNER
+ {
+ Text [ en-US ] = "Spinner";
+ };
+
+ String STR_FORM_SCROLLBAR
+ {
+ Text [ en-US ] = "Scroll Bar";
+ };
+
String STR_STYLE_FAMILY_CELL
{
Text [ en-US ] = "Cell Styles";
diff --git a/sc/source/ui/src/makefile.mk b/sc/source/ui/src/makefile.mk
index 96bb78e2902c..e1974edab4c1 100644
--- a/sc/source/ui/src/makefile.mk
+++ b/sc/source/ui/src/makefile.mk
@@ -33,9 +33,7 @@ TARGET=ui
# --- Settings -----------------------------------------------------
-.INCLUDE : scpre.mk
.INCLUDE : settings.mk
-.INCLUDE : sc.mk
# --- Files --------------------------------------------------------
@@ -53,6 +51,7 @@ SRC1FILES = \
dbnamdlg.src \
subtdlg.src \
miscdlgs.src \
+ datafdlg.src \
autofmt.src \
solvrdlg.src \
optsolver.src \
diff --git a/sc/source/ui/src/optdlg.src b/sc/source/ui/src/optdlg.src
index db65aa7e7b09..33aefbc2f5ba 100644
--- a/sc/source/ui/src/optdlg.src
+++ b/sc/source/ui/src/optdlg.src
@@ -279,6 +279,43 @@ TabPage RID_SCPAGE_FORMULA
};
};
+TabPage RID_SCPAGE_COMPATIBILITY
+{
+ HelpId = HID_SCPAGE_COMPATIBILITY ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 0 , 0 ) ;
+ Size = MAP_APPFONT ( 260 , 185 ) ;
+
+ FixedLine FL_KEY_BINDINGS
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 248 , 8 ) ;
+ Text [ en-US ] = "Key bindings";
+ };
+
+ FixedText FT_KEY_BINDINGS
+ {
+ Pos = MAP_APPFONT ( 12, 16 ) ;
+ Size = MAP_APPFONT ( 165, 24 ) ;
+ Wordbreak = TRUE;
+ Text [ en-US ] = "Select desired ~key binding type. Changing the key binding type may overwrite some of the existing key bindings." ;
+ };
+
+ ListBox LB_KEY_BINDINGS
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 179, 20 ) ;
+ Size = MAP_APPFONT ( 75, 46 ) ;
+ DropDown = TRUE ;
+ StringList [ en-US ] =
+ {
+ < "Default" ; Default ; > ;
+ < "OpenOffice.org legacy" ; Default ; > ;
+ };
+ };
+};
+
/**************************************************************************/
/* */
/* */
diff --git a/sc/source/ui/styleui/makefile.mk b/sc/source/ui/styleui/makefile.mk
index 9361033a34a4..ccbd2e14f34c 100644
--- a/sc/source/ui/styleui/makefile.mk
+++ b/sc/source/ui/styleui/makefile.mk
@@ -32,9 +32,7 @@ TARGET=styleui
# --- Settings -----------------------------------------------------
-.INCLUDE : scpre.mk
.INCLUDE : settings.mk
-.INCLUDE : sc.mk
.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files --------------------------------------------------------
diff --git a/sc/source/ui/styleui/styledlg.cxx b/sc/source/ui/styleui/styledlg.cxx
index 2452f338b8e7..bc2d2f2dfdf0 100644
--- a/sc/source/ui/styleui/styledlg.cxx
+++ b/sc/source/ui/styleui/styledlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -215,3 +216,4 @@ const SfxItemSet* __EXPORT ScStyleDlg::GetRefreshedSet()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/undo/areasave.cxx b/sc/source/ui/undo/areasave.cxx
index 8f5ce350b887..9f2b4eb7f03c 100644
--- a/sc/source/ui/undo/areasave.cxx
+++ b/sc/source/ui/undo/areasave.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -228,3 +229,4 @@ ScAreaLinkSaveCollection* ScAreaLinkSaveCollection::CreateFromDoc( const ScDocum
return pColl;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/undo/makefile.mk b/sc/source/ui/undo/makefile.mk
index 50fab82972ca..2b8dd60df32d 100644
--- a/sc/source/ui/undo/makefile.mk
+++ b/sc/source/ui/undo/makefile.mk
@@ -32,9 +32,7 @@ TARGET=undo
# --- Settings -----------------------------------------------------
-.INCLUDE : scpre.mk
.INCLUDE : settings.mk
-.INCLUDE : sc.mk
.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files --------------------------------------------------------
diff --git a/sc/source/ui/undo/refundo.cxx b/sc/source/ui/undo/refundo.cxx
index c863259ddf94..e4ca41b3ed30 100644
--- a/sc/source/ui/undo/refundo.cxx
+++ b/sc/source/ui/undo/refundo.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -212,3 +213,4 @@ void ScRefUndoData::DoUndo( ScDocument* pDoc, BOOL bUndoRefFirst )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/undo/target.cxx b/sc/source/ui/undo/target.cxx
index 1c2e4a925378..492c18bebc9a 100644
--- a/sc/source/ui/undo/target.cxx
+++ b/sc/source/ui/undo/target.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,3 +44,5 @@ TYPEINIT1(ScTabViewTarget, SfxRepeatTarget);
__EXPORT ScTabViewTarget::~ScTabViewTarget()
{
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/undo/undobase.cxx b/sc/source/ui/undo/undobase.cxx
index fffb76ebd061..e1d7c65c5072 100644
--- a/sc/source/ui/undo/undobase.cxx
+++ b/sc/source/ui/undo/undobase.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -537,3 +538,4 @@ BOOL ScUndoWrapper::CanRepeat(SfxRepeatTarget& rTarget) const
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index 6a12201d9b41..eda49aa114c5 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -2273,3 +2274,4 @@ BOOL __EXPORT ScUndoBorder::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/undo/undoblk2.cxx b/sc/source/ui/undo/undoblk2.cxx
index 2ab03eb71923..4a46c61683c5 100644
--- a/sc/source/ui/undo/undoblk2.cxx
+++ b/sc/source/ui/undo/undoblk2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -213,3 +214,4 @@ BOOL __EXPORT ScUndoWidthOrHeight::CanRepeat(SfxRepeatTarget& rTarget) const
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index f5c05178ac8a..f73e664a5bcd 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -2177,3 +2178,4 @@ BOOL __EXPORT ScUndoUpdateAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) co
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx
index a9376e5e9b1d..65e903c42990 100644
--- a/sc/source/ui/undo/undocell.cxx
+++ b/sc/source/ui/undo/undocell.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1143,3 +1144,4 @@ BOOL __EXPORT ScUndoRangeNames::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx
index 36b192abce24..308a3e7b2ef7 100644
--- a/sc/source/ui/undo/undodat.cxx
+++ b/sc/source/ui/undo/undodat.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,6 +53,8 @@
#include "attrib.hxx"
#include "hints.hxx"
#include "sc.hrc"
+#include "chgtrack.hxx" // Amelia Wang
+#include "refundo.hxx" // Amelia Wang
// -----------------------------------------------------------------------
@@ -71,6 +74,7 @@ TYPEINIT1(ScUndoRepeatDB, ScSimpleUndo);
TYPEINIT1(ScUndoDataPilot, ScSimpleUndo);
TYPEINIT1(ScUndoConsolidate, ScSimpleUndo);
TYPEINIT1(ScUndoChartData, ScSimpleUndo);
+TYPEINIT1(ScUndoDataForm, SfxUndoAction); // amelia
// -----------------------------------------------------------------------
@@ -2027,8 +2031,211 @@ BOOL __EXPORT ScUndoChartData::CanRepeat(SfxRepeatTarget& /* rTarget */) const
return FALSE;
}
+// Amelia Wang
+ScUndoDataForm::ScUndoDataForm( ScDocShell* pNewDocShell,
+ SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
+ SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
+ const ScMarkData& rMark,
+ ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc,
+ USHORT nNewFlags,
+ ScRefUndoData* pRefData,
+ void* /*pFill1*/, void* /*pFill2*/, void* /*pFill3*/,
+ BOOL bRedoIsFilled ) :
+ ScBlockUndo( pNewDocShell, ScRange( nStartX, nStartY, nStartZ, nEndX, nEndY, nEndZ ), SC_UNDO_SIMPLE ),
+ aMarkData( rMark ),
+ pUndoDoc( pNewUndoDoc ),
+ pRedoDoc( pNewRedoDoc ),
+ nFlags( nNewFlags ),
+ pRefUndoData( pRefData ),
+ pRefRedoData( NULL ),
+ bRedoFilled( bRedoIsFilled )
+{
+ // pFill1,pFill2,pFill3 are there so the ctor calls for simple paste (without cutting)
+ // don't have to be changed and branched for 641.
+ // They can be removed later.
+
+ if ( !aMarkData.IsMarked() ) // no cell marked:
+ aMarkData.SetMarkArea( aBlockRange ); // mark paste block
+
+ if ( pRefUndoData )
+ pRefUndoData->DeleteUnchanged( pDocShell->GetDocument() );
+
+ SetChangeTrack();
+}
+
+ScUndoDataForm::~ScUndoDataForm()
+{
+ delete pUndoDoc;
+ delete pRedoDoc;
+ delete pRefUndoData;
+ delete pRefRedoData;
+}
+
+String ScUndoDataForm::GetComment() const
+{
+ return ScGlobal::GetRscString( STR_UNDO_PASTE );
+}
+
+void ScUndoDataForm::SetChangeTrack()
+{
+ ScChangeTrack* pChangeTrack = pDocShell->GetDocument()->GetChangeTrack();
+ if ( pChangeTrack && (nFlags & IDF_CONTENTS) )
+ pChangeTrack->AppendContentRange( aBlockRange, pUndoDoc,
+ nStartChangeAction, nEndChangeAction, SC_CACM_PASTE );
+ else
+ nStartChangeAction = nEndChangeAction = 0;
+}
+
+
+void ScUndoDataForm::Undo()
+{
+ BeginUndo();
+ DoChange( TRUE );
+ ShowTable( aBlockRange );
+ EndUndo();
+ SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
+}
+
+void ScUndoDataForm::Redo()
+{
+ BeginRedo();
+ ScDocument* pDoc = pDocShell->GetDocument();
+ EnableDrawAdjust( pDoc, FALSE ); //! include in ScBlockUndo?
+ DoChange( FALSE );
+ EnableDrawAdjust( pDoc, TRUE ); //! include in ScBlockUndo?
+ EndRedo();
+ SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
+}
+
+void ScUndoDataForm::Repeat(SfxRepeatTarget& /*rTarget*/)
+{
+}
+
+BOOL ScUndoDataForm::CanRepeat(SfxRepeatTarget& rTarget) const
+{
+ return (rTarget.ISA(ScTabViewTarget));
+}
+
+void ScUndoDataForm::DoChange( const BOOL bUndo )
+{
+ ScDocument* pDoc = pDocShell->GetDocument();
+
+ // RefUndoData for redo is created before first undo
+ // (with DeleteUnchanged after the DoUndo call)
+ BOOL bCreateRedoData = ( bUndo && pRefUndoData && !pRefRedoData );
+ if ( bCreateRedoData )
+ pRefRedoData = new ScRefUndoData( pDoc );
+
+ ScRefUndoData* pWorkRefData = bUndo ? pRefUndoData : pRefRedoData;
+
+ // fuer Undo immer alle oder keine Inhalte sichern
+ USHORT nUndoFlags = IDF_NONE;
+ if (nFlags & IDF_CONTENTS)
+ nUndoFlags |= IDF_CONTENTS;
+ if (nFlags & IDF_ATTRIB)
+ nUndoFlags |= IDF_ATTRIB;
+ BOOL bPaintAll = FALSE;
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
+
+ // marking is in ScBlockUndo...
+ //ScUndoUtil::MarkSimpleBlock( pDocShell, aBlockRange );
+
+ SCTAB nTabCount = pDoc->GetTableCount();
+ if ( bUndo && !bRedoFilled )
+ {
+ if (!pRedoDoc)
+ {
+ BOOL bColInfo = ( aBlockRange.aStart.Row()==0 && aBlockRange.aEnd.Row()==MAXROW );
+ BOOL bRowInfo = ( aBlockRange.aStart.Col()==0 && aBlockRange.aEnd.Col()==MAXCOL );
+
+ pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
+ pRedoDoc->InitUndoSelected( pDoc, aMarkData, bColInfo, bRowInfo );
+ }
+ // read "redo" data from the document in the first undo
+ // all sheets - CopyToDocument skips those that don't exist in pRedoDoc
+ ScRange aCopyRange = aBlockRange;
+ aCopyRange.aStart.SetTab(0);
+ aCopyRange.aEnd.SetTab(nTabCount-1);
+ pDoc->CopyToDocument( aCopyRange, 1, FALSE, pRedoDoc );
+ bRedoFilled = TRUE;
+ }
+
+ USHORT nExtFlags = 0;
+ pDocShell->UpdatePaintExt( nExtFlags, aBlockRange );
+
+ for ( sal_uInt16 i=0; i <= ( aBlockRange.aEnd.Col() - aBlockRange.aStart.Col() ); i++ )
+ {
+ String aOldString;
+ pUndoDoc->GetString( aBlockRange.aStart.Col()+i , aBlockRange.aStart.Row() , aBlockRange.aStart.Tab() , aOldString );
+ pDoc->SetString( aBlockRange.aStart.Col()+i , aBlockRange.aStart.Row() , aBlockRange.aStart.Tab() , aOldString );
+ }
+
+ //ScRange aTabSelectRange = aBlockRange;
+
+ if (pWorkRefData)
+ {
+ pWorkRefData->DoUndo( pDoc, TRUE ); // TRUE = bSetChartRangeLists for SetChartListenerCollection
+ if ( pDoc->RefreshAutoFilter( 0,0, MAXCOL,MAXROW, aBlockRange.aStart.Tab() ) )
+ bPaintAll = TRUE;
+ }
+
+ if ( bCreateRedoData && pRefRedoData )
+ pRefRedoData->DeleteUnchanged( pDoc );
+
+ if ( bUndo )
+ {
+ ScChangeTrack* pChangeTrack = pDoc->GetChangeTrack();
+ if ( pChangeTrack )
+ pChangeTrack->Undo( nStartChangeAction, nEndChangeAction );
+ }
+ else
+ SetChangeTrack();
+
+ ScRange aDrawRange( aBlockRange );
+ pDoc->ExtendMerge( aDrawRange, TRUE ); // only needed for single sheet (text/rtf etc.)
+ USHORT nPaint = PAINT_GRID;
+ if (bPaintAll)
+ {
+ aDrawRange.aStart.SetCol(0);
+ aDrawRange.aStart.SetRow(0);
+ aDrawRange.aEnd.SetCol(MAXCOL);
+ aDrawRange.aEnd.SetRow(MAXROW);
+ nPaint |= PAINT_TOP | PAINT_LEFT;
+/*A*/ if (pViewShell)
+ pViewShell->AdjustBlockHeight(FALSE);
+ }
+ else
+ {
+ if ( aBlockRange.aStart.Row() == 0 && aBlockRange.aEnd.Row() == MAXROW ) // ganze Spalte
+ {
+ nPaint |= PAINT_TOP;
+ aDrawRange.aEnd.SetCol(MAXCOL);
+ }
+ if ( aBlockRange.aStart.Col() == 0 && aBlockRange.aEnd.Col() == MAXCOL ) // ganze Zeile
+ {
+ nPaint |= PAINT_LEFT;
+ aDrawRange.aEnd.SetRow(MAXROW);
+ }
+/*A*/ if ((pViewShell) && pViewShell->AdjustBlockHeight(FALSE))
+ {
+ aDrawRange.aStart.SetCol(0);
+ aDrawRange.aStart.SetRow(0);
+ aDrawRange.aEnd.SetCol(MAXCOL);
+ aDrawRange.aEnd.SetRow(MAXROW);
+ nPaint |= PAINT_LEFT;
+ }
+ pDocShell->UpdatePaintExt( nExtFlags, aDrawRange );
+ }
+ if ( !bUndo ) // draw redo after updating row heights
+ RedoSdrUndoAction( pDrawUndo ); //! include in ScBlockUndo?
+ pDocShell->PostPaint( aDrawRange, nPaint, nExtFlags );
+ pDocShell->PostDataChanged();
+ if (pViewShell)
+ pViewShell->CellContentChanged();
+}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/undo/undodraw.cxx b/sc/source/ui/undo/undodraw.cxx
index a10a7381d808..e1bfb468fb4e 100644
--- a/sc/source/ui/undo/undodraw.cxx
+++ b/sc/source/ui/undo/undodraw.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -267,3 +268,4 @@ BOOL __EXPORT ScUndoDraw::CanRepeat(SfxRepeatTarget& rTarget) const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/undo/undoolk.cxx b/sc/source/ui/undo/undoolk.cxx
index 183b9d1cd7b4..bfb1e0a27cc6 100644
--- a/sc/source/ui/undo/undoolk.cxx
+++ b/sc/source/ui/undo/undoolk.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -100,3 +101,4 @@ void EnableDrawAdjust( ScDocument* pDoc, BOOL bEnable )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/undo/undostyl.cxx b/sc/source/ui/undo/undostyl.cxx
index b4ea7f35448c..5d4af591a2bc 100644
--- a/sc/source/ui/undo/undostyl.cxx
+++ b/sc/source/ui/undo/undostyl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -309,3 +310,4 @@ BOOL ScUndoApplyPageStyle::CanRepeat(SfxRepeatTarget& /* rTarget */) const
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 8d852ce0cda5..c3fdfc156528 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1664,3 +1665,4 @@ String ScUndoLayoutRTL::GetComment() const
return ScGlobal::GetRscString( STR_UNDO_TAB_RTL );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/undo/undoutil.cxx b/sc/source/ui/undo/undoutil.cxx
index 168975cdda3a..0be0a7f4f363 100644
--- a/sc/source/ui/undo/undoutil.cxx
+++ b/sc/source/ui/undo/undoutil.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -131,3 +132,5 @@ void ScUndoUtil::PaintMore( ScDocShell* pDocShell,
pDocShell->PostPaint( nCol1,nRow1,rRange.aStart.Tab(),
nCol2,nRow2,rRange.aEnd.Tab(), PAINT_GRID );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/ChartRangeSelectionListener.cxx b/sc/source/ui/unoobj/ChartRangeSelectionListener.cxx
index e8000d71518b..ac4b8550c292 100644
--- a/sc/source/ui/unoobj/ChartRangeSelectionListener.cxx
+++ b/sc/source/ui/unoobj/ChartRangeSelectionListener.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -93,3 +94,5 @@ void SAL_CALL ScChartRangeSelectionListener::disposing()
{
m_pViewShell = 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/addruno.cxx b/sc/source/ui/unoobj/addruno.cxx
index 10627222be80..e9618d43210c 100644
--- a/sc/source/ui/unoobj/addruno.cxx
+++ b/sc/source/ui/unoobj/addruno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,10 +35,10 @@
#include <com/sun/star/table/CellRangeAddress.hpp>
#include <svl/itemprop.hxx>
+#include <vcl/svapp.hxx>
#include "docsh.hxx"
#include "unonames.hxx"
-#include "unoguard.hxx"
#include "miscuno.hxx"
#include "convuno.hxx"
#include "addruno.hxx"
@@ -69,7 +70,7 @@ void ScAddressConversionObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
}
-sal_Bool ScAddressConversionObj::ParseUIString( const String& rUIString )
+sal_Bool ScAddressConversionObj::ParseUIString( const String& rUIString, ::formula::FormulaGrammar::AddressConvention eConv )
{
if (!pDocShell)
return sal_False;
@@ -78,7 +79,7 @@ sal_Bool ScAddressConversionObj::ParseUIString( const String& rUIString )
sal_Bool bSuccess = sal_False;
if ( bIsRange )
{
- USHORT nResult = aRange.ParseAny( rUIString, pDoc );
+ USHORT nResult = aRange.ParseAny( rUIString, pDoc, eConv );
if ( nResult & SCA_VALID )
{
if ( ( nResult & SCA_TAB_3D ) == 0 )
@@ -92,7 +93,7 @@ sal_Bool ScAddressConversionObj::ParseUIString( const String& rUIString )
}
else
{
- USHORT nResult = aRange.aStart.Parse( rUIString, pDoc );
+ USHORT nResult = aRange.aStart.Parse( rUIString, pDoc, eConv );
if ( nResult & SCA_VALID )
{
if ( ( nResult & SCA_TAB_3D ) == 0 )
@@ -108,7 +109,7 @@ sal_Bool ScAddressConversionObj::ParseUIString( const String& rUIString )
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScAddressConversionObj::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( bIsRange )
{
@@ -116,6 +117,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScAddressConversionObj::getProp
{
{MAP_CHAR_LEN(SC_UNONAME_ADDRESS), 0, &getCppuType((table::CellRangeAddress*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_PERSREPR), 0, &getCppuType((rtl::OUString*)0), 0, 0 },
+ {MAP_CHAR_LEN(SC_UNONAME_XL_A1_REPR), 0, &getCppuType((rtl::OUString*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_REFSHEET), 0, &getCppuType((sal_Int32*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_UIREPR), 0, &getCppuType((rtl::OUString*)0), 0, 0 },
{0,0,0,0,0,0}
@@ -129,6 +131,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScAddressConversionObj::getProp
{
{MAP_CHAR_LEN(SC_UNONAME_ADDRESS), 0, &getCppuType((table::CellAddress*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_PERSREPR), 0, &getCppuType((rtl::OUString*)0), 0, 0 },
+ {MAP_CHAR_LEN(SC_UNONAME_XL_A1_REPR), 0, &getCppuType((rtl::OUString*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_REFSHEET), 0, &getCppuType((sal_Int32*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_UIREPR), 0, &getCppuType((rtl::OUString*)0), 0, 0 },
{0,0,0,0,0,0}
@@ -190,8 +193,11 @@ void SAL_CALL ScAddressConversionObj::setPropertyValue( const rtl::OUString& aPr
bSuccess = ParseUIString( aUIString );
}
}
- else if ( aNameStr.EqualsAscii( SC_UNONAME_PERSREPR ) )
+ else if ( aNameStr.EqualsAscii( SC_UNONAME_PERSREPR ) || aNameStr.EqualsAscii( SC_UNONAME_XL_A1_REPR ) )
{
+ ::formula::FormulaGrammar::AddressConvention aConv = ::formula::FormulaGrammar::CONV_OOO;
+ if ( aNameStr.EqualsAscii( SC_UNONAME_XL_A1_REPR ) )
+ aConv = ::formula::FormulaGrammar::CONV_XL_A1;
// parse the file format string
rtl::OUString sRepresentation;
if (aValue >>= sRepresentation)
@@ -212,7 +218,7 @@ void SAL_CALL ScAddressConversionObj::setPropertyValue( const rtl::OUString& aPr
}
// parse the rest like a UI string
- bSuccess = ParseUIString( aUIString );
+ bSuccess = ParseUIString( aUIString, aConv );
}
}
else
@@ -265,17 +271,24 @@ uno::Any SAL_CALL ScAddressConversionObj::getPropertyValue( const rtl::OUString&
aRange.aStart.Format( aFormatStr, nFlags, pDoc );
aRet <<= rtl::OUString( aFormatStr );
}
- else if ( aNameStr.EqualsAscii( SC_UNONAME_PERSREPR ) )
+ else if ( aNameStr.EqualsAscii( SC_UNONAME_PERSREPR ) || aNameStr.EqualsAscii( SC_UNONAME_XL_A1_REPR ) )
{
+ ::formula::FormulaGrammar::AddressConvention aConv = ::formula::FormulaGrammar::CONV_OOO;
+ if ( aNameStr.EqualsAscii( SC_UNONAME_XL_A1_REPR ) )
+ aConv = ::formula::FormulaGrammar::CONV_XL_A1;
+
// generate file format string - always include sheet
String aFormatStr;
- aRange.aStart.Format( aFormatStr, SCA_VALID | SCA_TAB_3D, pDoc );
+ aRange.aStart.Format( aFormatStr, SCA_VALID | SCA_TAB_3D, pDoc, aConv );
if ( bIsRange )
{
// manually concatenate range so both parts always have the sheet name
aFormatStr.Append( (sal_Unicode) ':' );
String aSecond;
- aRange.aEnd.Format( aSecond, SCA_VALID | SCA_TAB_3D, pDoc );
+ USHORT nFlags = SCA_VALID;
+ if( aConv != ::formula::FormulaGrammar::CONV_XL_A1 )
+ nFlags |= SCA_TAB_3D;
+ aRange.aEnd.Format( aSecond, SCA_VALID | SCA_TAB_3D, pDoc, aConv );
aFormatStr.Append( aSecond );
}
aRet <<= rtl::OUString( aFormatStr );
@@ -313,3 +326,4 @@ uno::Sequence<rtl::OUString> SAL_CALL ScAddressConversionObj::getSupportedServic
return aRet;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/afmtuno.cxx b/sc/source/ui/unoobj/afmtuno.cxx
index e3fc18d8a926..bd1991203887 100644
--- a/sc/source/ui/unoobj/afmtuno.cxx
+++ b/sc/source/ui/unoobj/afmtuno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,6 +36,7 @@
#include <tools/debug.hxx>
#include <tools/shl.hxx>
#include <svl/poolitem.hxx>
+#include <vcl/svapp.hxx>
#include <svx/unomid.hxx>
#include "unowids.hxx"
#include <rtl/uuid.h>
@@ -67,7 +69,6 @@
#include "afmtuno.hxx"
#include "miscuno.hxx"
#include "autoform.hxx"
-#include "unoguard.hxx"
#include "scdll.hxx"
#include "unonames.hxx"
#include "cellsuno.hxx"
@@ -200,7 +201,7 @@ ScAutoFormatsObj::~ScAutoFormatsObj()
uno::Reference<uno::XInterface> SAL_CALL ScAutoFormatsObj_CreateInstance(
const uno::Reference<lang::XMultiServiceFactory>& )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDLL::Init();
static uno::Reference< uno::XInterface > xInst((::cppu::OWeakObject*) new ScAutoFormatsObj);
return xInst;
@@ -249,7 +250,7 @@ void SAL_CALL ScAutoFormatsObj::insertByName( const rtl::OUString& aName, const
throw(lang::IllegalArgumentException, container::ElementExistException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
sal_Bool bDone = sal_False;
// Reflection muss nicht uno::XInterface sein, kann auch irgendein Interface sein...
uno::Reference< uno::XInterface > xInterface(aElement, uno::UNO_QUERY);
@@ -304,7 +305,7 @@ void SAL_CALL ScAutoFormatsObj::replaceByName( const rtl::OUString& aName, const
throw(lang::IllegalArgumentException, container::NoSuchElementException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
//! zusammenfassen?
removeByName( aName );
insertByName( aName, aElement );
@@ -314,7 +315,7 @@ void SAL_CALL ScAutoFormatsObj::removeByName( const rtl::OUString& aName )
throw(container::NoSuchElementException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aNameStr(aName);
ScAutoFormat* pFormats = ScGlobal::GetAutoFormat();
@@ -337,7 +338,7 @@ void SAL_CALL ScAutoFormatsObj::removeByName( const rtl::OUString& aName )
uno::Reference<container::XEnumeration> SAL_CALL ScAutoFormatsObj::createEnumeration()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScIndexEnumeration(this, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.TableAutoFormatEnumeration")));
}
@@ -345,7 +346,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScAutoFormatsObj::createEnumera
sal_Int32 SAL_CALL ScAutoFormatsObj::getCount() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScAutoFormat* pFormats = ScGlobal::GetAutoFormat();
if (pFormats)
return pFormats->GetCount();
@@ -357,7 +358,7 @@ uno::Any SAL_CALL ScAutoFormatsObj::getByIndex( sal_Int32 nIndex )
throw(lang::IndexOutOfBoundsException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference< container::XNamed > xFormat(GetObjectByIndex_Impl((sal_uInt16)nIndex));
if (!xFormat.is())
throw lang::IndexOutOfBoundsException();
@@ -366,13 +367,13 @@ uno::Any SAL_CALL ScAutoFormatsObj::getByIndex( sal_Int32 nIndex )
uno::Type SAL_CALL ScAutoFormatsObj::getElementType() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ::getCppuType((const uno::Reference< container::XNamed >*)0); // muss zu getByIndex passen
}
sal_Bool SAL_CALL ScAutoFormatsObj::hasElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ( getCount() != 0 );
}
@@ -382,7 +383,7 @@ uno::Any SAL_CALL ScAutoFormatsObj::getByName( const rtl::OUString& aName )
throw(container::NoSuchElementException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference< container::XNamed > xFormat(GetObjectByName_Impl(aName));
if (!xFormat.is())
throw container::NoSuchElementException();
@@ -392,7 +393,7 @@ uno::Any SAL_CALL ScAutoFormatsObj::getByName( const rtl::OUString& aName )
uno::Sequence<rtl::OUString> SAL_CALL ScAutoFormatsObj::getElementNames()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScAutoFormat* pFormats = ScGlobal::GetAutoFormat();
if (pFormats)
{
@@ -413,7 +414,7 @@ uno::Sequence<rtl::OUString> SAL_CALL ScAutoFormatsObj::getElementNames()
sal_Bool SAL_CALL ScAutoFormatsObj::hasByName( const rtl::OUString& aName )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScAutoFormat* pFormats = ScGlobal::GetAutoFormat();
if (pFormats)
{
@@ -517,7 +518,7 @@ ScAutoFormatFieldObj* ScAutoFormatObj::GetObjectByIndex_Impl(sal_uInt16 nIndex)
uno::Reference<container::XEnumeration> SAL_CALL ScAutoFormatObj::createEnumeration()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScIndexEnumeration(this, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.TableAutoFormatEnumeration")));
}
@@ -525,7 +526,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScAutoFormatObj::createEnumerat
sal_Int32 SAL_CALL ScAutoFormatObj::getCount() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (IsInserted())
return SC_AF_FIELD_COUNT; // immer 16 Elemente
else
@@ -536,7 +537,7 @@ uno::Any SAL_CALL ScAutoFormatObj::getByIndex( sal_Int32 nIndex )
throw(lang::IndexOutOfBoundsException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( nIndex < 0 || nIndex >= getCount() )
throw lang::IndexOutOfBoundsException();
@@ -548,13 +549,13 @@ uno::Any SAL_CALL ScAutoFormatObj::getByIndex( sal_Int32 nIndex )
uno::Type SAL_CALL ScAutoFormatObj::getElementType() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ::getCppuType((const uno::Reference< beans::XPropertySet >*)0); // muss zu getByIndex passen
}
sal_Bool SAL_CALL ScAutoFormatObj::hasElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ( getCount() != 0 );
}
@@ -562,7 +563,7 @@ sal_Bool SAL_CALL ScAutoFormatObj::hasElements() throw(uno::RuntimeException)
rtl::OUString SAL_CALL ScAutoFormatObj::getName() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScAutoFormat* pFormats = ScGlobal::GetAutoFormat();
if (pFormats && IsInserted() && nFormatIndex < pFormats->GetCount())
{
@@ -576,7 +577,7 @@ rtl::OUString SAL_CALL ScAutoFormatObj::getName() throw(uno::RuntimeException)
void SAL_CALL ScAutoFormatObj::setName( const rtl::OUString& aNewName )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aNewString(aNewName);
ScAutoFormat* pFormats = ScGlobal::GetAutoFormat();
@@ -617,7 +618,7 @@ void SAL_CALL ScAutoFormatObj::setName( const rtl::OUString& aNewName )
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScAutoFormatObj::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static uno::Reference< beans::XPropertySetInfo > aRef(new SfxItemPropertySetInfo( aPropSet.getPropertyMap() ));
return aRef;
}
@@ -628,7 +629,7 @@ void SAL_CALL ScAutoFormatObj::setPropertyValue(
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScAutoFormat* pFormats = ScGlobal::GetAutoFormat();
if (pFormats && IsInserted() && nFormatIndex < pFormats->GetCount())
{
@@ -661,7 +662,7 @@ uno::Any SAL_CALL ScAutoFormatObj::getPropertyValue( const rtl::OUString& aPrope
throw(beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Any aAny;
ScAutoFormat* pFormats = ScGlobal::GetAutoFormat();
@@ -722,7 +723,7 @@ void ScAutoFormatFieldObj::Notify( SfxBroadcaster& /* rBC */, const SfxHint& /*
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScAutoFormatFieldObj::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static uno::Reference< beans::XPropertySetInfo > aRef(new SfxItemPropertySetInfo( aPropSet.getPropertyMap() ));
return aRef;
}
@@ -733,7 +734,7 @@ void SAL_CALL ScAutoFormatFieldObj::setPropertyValue(
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScAutoFormat* pFormats = ScGlobal::GetAutoFormat();
const SfxItemPropertySimpleEntry* pEntry =
aPropSet.getPropertyMap()->getByName( aPropertyName );
@@ -821,7 +822,7 @@ uno::Any SAL_CALL ScAutoFormatFieldObj::getPropertyValue( const rtl::OUString& a
throw(beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Any aVal;
ScAutoFormat* pFormats = ScGlobal::GetAutoFormat();
@@ -882,3 +883,4 @@ SC_IMPL_DUMMY_PROPERTY_LISTENER( ScAutoFormatFieldObj )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx
index 8b20d9849f47..6db804e0bb9f 100644
--- a/sc/source/ui/unoobj/appluno.cxx
+++ b/sc/source/ui/unoobj/appluno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45,7 +46,6 @@
#include "printopt.hxx"
#include "userlist.hxx"
#include "sc.hrc" // VAR_ARGS
-#include "unoguard.hxx"
#include "unonames.hxx"
#include "funcdesc.hxx"
#include <com/sun/star/sheet/FunctionArgument.hpp>
@@ -496,7 +496,7 @@ ScSpreadsheetSettings::~ScSpreadsheetSettings()
uno::Reference<uno::XInterface> SAL_CALL ScSpreadsheetSettings_CreateInstance(
const uno::Reference<lang::XMultiServiceFactory>& /* rSMgr */ )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDLL::Init();
static uno::Reference<uno::XInterface> xInst((cppu::OWeakObject*)new ScSpreadsheetSettings());
return xInst;
@@ -520,7 +520,7 @@ uno::Sequence<rtl::OUString> ScSpreadsheetSettings::getSupportedServiceNames_Sta
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScSpreadsheetSettings::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static uno::Reference<beans::XPropertySetInfo> aRef(
new SfxItemPropertySetInfo( aPropSet.getPropertyMap() ));
return aRef;
@@ -532,7 +532,7 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue(
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aString(aPropertyName);
ScModule* pScMod = SC_MOD();
@@ -679,7 +679,7 @@ uno::Any SAL_CALL ScSpreadsheetSettings::getPropertyValue( const rtl::OUString&
throw(beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aString = aPropertyName;
uno::Any aRet;
@@ -759,7 +759,7 @@ ScRecentFunctionsObj::~ScRecentFunctionsObj()
uno::Reference<uno::XInterface> SAL_CALL ScRecentFunctionsObj_CreateInstance(
const uno::Reference<lang::XMultiServiceFactory>& /* rSMgr */ )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDLL::Init();
static uno::Reference<uno::XInterface> xInst((cppu::OWeakObject*)new ScRecentFunctionsObj());
return xInst;
@@ -783,7 +783,7 @@ uno::Sequence<rtl::OUString> ScRecentFunctionsObj::getSupportedServiceNames_Stat
uno::Sequence<sal_Int32> SAL_CALL ScRecentFunctionsObj::getRecentFunctionIds()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
const ScAppOptions& rOpt = SC_MOD()->GetAppOptions();
USHORT nCount = rOpt.GetLRUFuncListCount();
const USHORT* pFuncs = rOpt.GetLRUFuncList();
@@ -802,7 +802,7 @@ void SAL_CALL ScRecentFunctionsObj::setRecentFunctionIds(
const uno::Sequence<sal_Int32>& aRecentFunctionIds )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
USHORT nCount = (USHORT) Min( aRecentFunctionIds.getLength(), (INT32) LRU_MAX );
const INT32* pAry = aRecentFunctionIds.getConstArray();
@@ -840,7 +840,7 @@ ScFunctionListObj::~ScFunctionListObj()
uno::Reference<uno::XInterface> SAL_CALL ScFunctionListObj_CreateInstance(
const uno::Reference<lang::XMultiServiceFactory>& /* rSMgr */ )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDLL::Init();
static uno::Reference<uno::XInterface> xInst((cppu::OWeakObject*)new ScFunctionListObj());
return xInst;
@@ -921,7 +921,7 @@ static void lcl_FillSequence( uno::Sequence<beans::PropertyValue>& rSequence, co
uno::Sequence<beans::PropertyValue> SAL_CALL ScFunctionListObj::getById( sal_Int32 nId )
throw(lang::IllegalArgumentException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList();
if ( pFuncList )
{
@@ -951,7 +951,7 @@ uno::Any SAL_CALL ScFunctionListObj::getByName( const rtl::OUString& aName )
throw(container::NoSuchElementException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aNameStr(aName);
const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList();
if ( pFuncList )
@@ -981,7 +981,7 @@ uno::Any SAL_CALL ScFunctionListObj::getByName( const rtl::OUString& aName )
sal_Int32 SAL_CALL ScFunctionListObj::getCount() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
USHORT nCount = 0;
const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList();
if ( pFuncList )
@@ -993,7 +993,7 @@ uno::Any SAL_CALL ScFunctionListObj::getByIndex( sal_Int32 nIndex )
throw(lang::IndexOutOfBoundsException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList();
if ( pFuncList )
{
@@ -1021,7 +1021,7 @@ uno::Any SAL_CALL ScFunctionListObj::getByIndex( sal_Int32 nIndex )
uno::Reference<container::XEnumeration> SAL_CALL ScFunctionListObj::createEnumeration()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScIndexEnumeration(this, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.FunctionDescriptionEnumeration")));
}
@@ -1029,19 +1029,19 @@ uno::Reference<container::XEnumeration> SAL_CALL ScFunctionListObj::createEnumer
uno::Type SAL_CALL ScFunctionListObj::getElementType() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return getCppuType((uno::Sequence<beans::PropertyValue>*)0);
}
sal_Bool SAL_CALL ScFunctionListObj::hasElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ( getCount() > 0 );
}
uno::Sequence<rtl::OUString> SAL_CALL ScFunctionListObj::getElementNames() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList();
if ( pFuncList )
{
@@ -1062,7 +1062,7 @@ uno::Sequence<rtl::OUString> SAL_CALL ScFunctionListObj::getElementNames() throw
sal_Bool SAL_CALL ScFunctionListObj::hasByName( const rtl::OUString& aName )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aNameStr(aName);
const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList();
if ( pFuncList )
@@ -1084,3 +1084,4 @@ sal_Bool SAL_CALL ScFunctionListObj::hasByName( const rtl::OUString& aName )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/celllistsource.cxx b/sc/source/ui/unoobj/celllistsource.cxx
index 246555d06f25..c10fadccea7c 100644
--- a/sc/source/ui/unoobj/celllistsource.cxx
+++ b/sc/source/ui/unoobj/celllistsource.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -447,3 +448,5 @@ namespace calc
//.........................................................................
} // namespace calc
//.........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/celllistsource.hxx b/sc/source/ui/unoobj/celllistsource.hxx
index f6b52f0b50f8..e13ab33488ab 100644
--- a/sc/source/ui/unoobj/celllistsource.hxx
+++ b/sc/source/ui/unoobj/celllistsource.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -173,3 +174,5 @@ namespace calc
//.........................................................................
#endif // SC_CELLLISTSOURCE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 12ecf80b9e3f..8514810406df 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -115,7 +116,6 @@
#include "validat.hxx"
#include "sc.hrc"
#include "brdcst.hxx"
-#include "unoguard.hxx"
#include "cellform.hxx"
#include "globstr.hrc"
#include "unonames.hxx"
@@ -1771,7 +1771,7 @@ void ScCellRangesBase::PaintRanges_Impl( USHORT nPart )
double SAL_CALL ScCellRangesBase::computeFunction( sheet::GeneralFunction nFunction )
throw(uno::Exception, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScMarkData aMark(*GetMarkData());
aMark.MarkToSimple();
if (!aMark.IsMarked())
@@ -1791,7 +1791,7 @@ double SAL_CALL ScCellRangesBase::computeFunction( sheet::GeneralFunction nFunct
void SAL_CALL ScCellRangesBase::clearContents( sal_Int32 nContentFlags ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( aRanges.Count() )
{
// only for clearContents: EDITATTR is only used if no contents are deleted
@@ -1898,7 +1898,7 @@ beans::PropertyState ScCellRangesBase::GetOnePropertyState( USHORT nItemWhich, c
beans::PropertyState SAL_CALL ScCellRangesBase::getPropertyState( const rtl::OUString& aPropertyName )
throw(beans::UnknownPropertyException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( aRanges.Count() == 0 )
throw uno::RuntimeException();
@@ -1913,7 +1913,7 @@ uno::Sequence<beans::PropertyState> SAL_CALL ScCellRangesBase::getPropertyStates
const uno::Sequence<rtl::OUString>& aPropertyNames )
throw(beans::UnknownPropertyException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
const SfxItemPropertyMap* pPropertyMap = GetItemPropertyMap(); // from derived class
@@ -1932,7 +1932,7 @@ uno::Sequence<beans::PropertyState> SAL_CALL ScCellRangesBase::getPropertyStates
void SAL_CALL ScCellRangesBase::setPropertyToDefault( const rtl::OUString& aPropertyName )
throw(beans::UnknownPropertyException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( pDocShell )
{
const SfxItemPropertyMap* pPropertyMap = GetItemPropertyMap(); // from derived class
@@ -1983,7 +1983,7 @@ uno::Any SAL_CALL ScCellRangesBase::getPropertyDefault( const rtl::OUString& aPr
{
//! mit getPropertyValue zusammenfassen
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Any aAny;
if ( pDocShell )
@@ -2084,7 +2084,7 @@ uno::Any SAL_CALL ScCellRangesBase::getPropertyDefault( const rtl::OUString& aPr
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScCellRangesBase::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static uno::Reference<beans::XPropertySetInfo> aRef(
new SfxItemPropertySetInfo( pPropSet->getPropertyMap() ));
return aRef;
@@ -2207,7 +2207,7 @@ void SAL_CALL ScCellRangesBase::setPropertyValue(
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( !pDocShell || aRanges.Count() == 0 )
throw uno::RuntimeException();
@@ -2358,7 +2358,7 @@ uno::Any SAL_CALL ScCellRangesBase::getPropertyValue( const rtl::OUString& aProp
throw(beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( !pDocShell || aRanges.Count() == 0 )
throw uno::RuntimeException();
@@ -2516,7 +2516,7 @@ void SAL_CALL ScCellRangesBase::addPropertyChangeListener( const rtl::OUString&
throw(beans::UnknownPropertyException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( aRanges.Count() == 0 )
throw uno::RuntimeException();
@@ -2528,7 +2528,7 @@ void SAL_CALL ScCellRangesBase::removePropertyChangeListener( const rtl::OUStrin
throw(beans::UnknownPropertyException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( aRanges.Count() == 0 )
throw uno::RuntimeException();
@@ -2560,7 +2560,7 @@ void SAL_CALL ScCellRangesBase::setPropertyValues( const uno::Sequence< rtl::OUS
lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
sal_Int32 nCount(aPropertyNames.getLength());
sal_Int32 nValues(aValues.getLength());
@@ -2654,7 +2654,7 @@ uno::Sequence<uno::Any> SAL_CALL ScCellRangesBase::getPropertyValues(
const uno::Sequence< rtl::OUString >& aPropertyNames )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
const SfxItemPropertyMap* pPropertyMap = GetItemPropertyMap(); // from derived class
@@ -2707,7 +2707,7 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL ScCellRangesBase::set
const uno::Sequence< uno::Any >& aValues )
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
sal_Int32 nCount(aPropertyNames.getLength());
sal_Int32 nValues(aValues.getLength());
@@ -2833,7 +2833,7 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL ScCellRangesBase::set
uno::Sequence< beans::GetPropertyTolerantResult > SAL_CALL ScCellRangesBase::getPropertyValuesTolerant( const uno::Sequence< ::rtl::OUString >& aPropertyNames )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
sal_Int32 nCount(aPropertyNames.getLength());
uno::Sequence < beans::GetPropertyTolerantResult > aReturns(nCount);
@@ -2863,7 +2863,7 @@ uno::Sequence< beans::GetPropertyTolerantResult > SAL_CALL ScCellRangesBase::get
uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL ScCellRangesBase::getDirectPropertyValuesTolerant( const uno::Sequence< ::rtl::OUString >& aPropertyNames )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
sal_Int32 nCount(aPropertyNames.getLength());
uno::Sequence < beans::GetDirectPropertyTolerantResult > aReturns(nCount);
@@ -2902,7 +2902,7 @@ uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL ScCellRangesBas
void SAL_CALL ScCellRangesBase::decrementIndent() throw(::com::sun::star::uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( pDocShell && aRanges.Count() ) // leer = nichts zu tun
{
ScDocFunc aFunc(*pDocShell);
@@ -2915,7 +2915,7 @@ void SAL_CALL ScCellRangesBase::decrementIndent() throw(::com::sun::star::uno::R
void SAL_CALL ScCellRangesBase::incrementIndent() throw(::com::sun::star::uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( pDocShell && aRanges.Count() ) // leer = nichts zu tun
{
ScDocFunc aFunc(*pDocShell);
@@ -2980,7 +2980,7 @@ ScMemChart* ScCellRangesBase::CreateMemChart_Impl() const
uno::Sequence< uno::Sequence<double> > SAL_CALL ScCellRangesBase::getData()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScMemChart* pMemChart = CreateMemChart_Impl();
if ( pMemChart )
{
@@ -3042,7 +3042,7 @@ ScRangeListRef ScCellRangesBase::GetLimitedChartRanges_Impl( long nDataColumns,
void SAL_CALL ScCellRangesBase::setData( const uno::Sequence< uno::Sequence<double> >& aData )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
BOOL bDone = FALSE;
long nRowCount = aData.getLength();
long nColCount = nRowCount ? aData[0].getLength() : 0;
@@ -3095,7 +3095,7 @@ void SAL_CALL ScCellRangesBase::setData( const uno::Sequence< uno::Sequence<doub
uno::Sequence<rtl::OUString> SAL_CALL ScCellRangesBase::getRowDescriptions()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScMemChart* pMemChart = CreateMemChart_Impl();
if ( pMemChart )
{
@@ -3115,7 +3115,7 @@ void SAL_CALL ScCellRangesBase::setRowDescriptions(
const uno::Sequence<rtl::OUString>& aRowDescriptions )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
BOOL bDone = FALSE;
if ( bChartColAsHdr )
{
@@ -3163,7 +3163,7 @@ void SAL_CALL ScCellRangesBase::setRowDescriptions(
uno::Sequence<rtl::OUString> SAL_CALL ScCellRangesBase::getColumnDescriptions()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScMemChart* pMemChart = CreateMemChart_Impl();
if ( pMemChart )
{
@@ -3183,7 +3183,7 @@ void SAL_CALL ScCellRangesBase::setColumnDescriptions(
const uno::Sequence<rtl::OUString>& aColumnDescriptions )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
BOOL bDone = FALSE;
if ( bChartRowAsHdr )
{
@@ -3276,7 +3276,7 @@ void SAL_CALL ScCellRangesBase::addChartDataChangeEventListener( const uno::Refe
chart::XChartDataChangeEventListener >& aListener )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( pDocShell && aRanges.Count() )
{
//! auf doppelte testen?
@@ -3297,7 +3297,7 @@ void SAL_CALL ScCellRangesBase::removeChartDataChangeEventListener( const uno::R
chart::XChartDataChangeEventListener >& aListener )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( pDocShell && aRanges.Count() )
{
ScDocument* pDoc = pDocShell->GetDocument();
@@ -3323,7 +3323,7 @@ sal_Bool SAL_CALL ScCellRangesBase::isNotANumber( double nNumber ) throw(uno::Ru
void SAL_CALL ScCellRangesBase::addModifyListener( const uno::Reference<util::XModifyListener>& aListener )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( aRanges.Count() == 0 )
throw uno::RuntimeException();
@@ -3349,7 +3349,7 @@ void SAL_CALL ScCellRangesBase::removeModifyListener( const uno::Reference<util:
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( aRanges.Count() == 0 )
throw uno::RuntimeException();
@@ -3383,7 +3383,7 @@ void SAL_CALL ScCellRangesBase::removeModifyListener( const uno::Reference<util:
uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryVisibleCells()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
{
//! fuer alle Tabellen getrennt, wenn Markierungen pro Tabelle getrennt sind!
@@ -3423,7 +3423,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryVisibleC
uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryEmptyCells()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
{
ScDocument* pDoc = pDocShell->GetDocument();
@@ -3465,7 +3465,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryContentC
sal_Int16 nContentFlags )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
{
ScDocument* pDoc = pDocShell->GetDocument();
@@ -3554,7 +3554,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryFormulaC
sal_Int32 nResultFlags )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
{
ScDocument* pDoc = pDocShell->GetDocument();
@@ -3707,21 +3707,21 @@ uno::Reference<sheet::XSheetCellRanges> ScCellRangesBase::QueryDifferences_Impl(
uno::Reference<sheet::XSheetCellRanges > SAL_CALL ScCellRangesBase::queryColumnDifferences(
const table::CellAddress& aCompare ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return QueryDifferences_Impl( aCompare, TRUE );
}
uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryRowDifferences(
const table::CellAddress& aCompare ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return QueryDifferences_Impl( aCompare, FALSE );
}
uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryIntersection(
const table::CellRangeAddress& aRange ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScRange aMask( (SCCOL)aRange.StartColumn, (SCROW)aRange.StartRow, aRange.Sheet,
(SCCOL)aRange.EndColumn, (SCROW)aRange.EndRow, aRange.Sheet );
@@ -3747,7 +3747,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryIntersec
uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryPrecedents(
sal_Bool bRecursive ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( pDocShell )
{
ScDocument* pDoc = pDocShell->GetDocument();
@@ -3801,7 +3801,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryPreceden
uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryDependents(
sal_Bool bRecursive ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( pDocShell )
{
ScDocument* pDoc = pDocShell->GetDocument();
@@ -3866,7 +3866,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryDependen
uno::Reference<util::XSearchDescriptor> SAL_CALL ScCellRangesBase::createSearchDescriptor()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScCellSearchObj;
}
@@ -3959,7 +3959,7 @@ uno::Reference<uno::XInterface> SAL_CALL ScCellRangesBase::findFirst(
const uno::Reference<util::XSearchDescriptor>& xDesc )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return Find_Impl( xDesc, NULL );
}
@@ -3968,7 +3968,7 @@ uno::Reference<uno::XInterface> SAL_CALL ScCellRangesBase::findNext(
const uno::Reference<util::XSearchDescriptor >& xDesc )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( xStartAt.is() )
{
ScCellRangesBase* pRangesImp = ScCellRangesBase::getImplementation( xStartAt );
@@ -3990,14 +3990,14 @@ uno::Reference<uno::XInterface> SAL_CALL ScCellRangesBase::findNext(
uno::Reference<util::XReplaceDescriptor> SAL_CALL ScCellRangesBase::createReplaceDescriptor()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScCellSearchObj;
}
sal_Int32 SAL_CALL ScCellRangesBase::replaceAll( const uno::Reference<util::XSearchDescriptor>& xDesc )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
INT32 nReplaced = 0;
if ( pDocShell && xDesc.is() )
{
@@ -4210,7 +4210,7 @@ ScCellRangeObj* ScCellRangesObj::GetObjectByIndex_Impl(sal_Int32 nIndex) const
uno::Sequence<table::CellRangeAddress> SAL_CALL ScCellRangesObj::getRangeAddresses()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
const ScRangeList& rRanges = GetRangeList();
ULONG nCount = rRanges.Count();
@@ -4233,7 +4233,7 @@ uno::Sequence<table::CellRangeAddress> SAL_CALL ScCellRangesObj::getRangeAddress
uno::Reference<container::XEnumerationAccess> SAL_CALL ScCellRangesObj::getCells()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
// getCells with empty range list is possible (no exception),
// the resulting enumeration just has no elements
@@ -4250,7 +4250,7 @@ uno::Reference<container::XEnumerationAccess> SAL_CALL ScCellRangesObj::getCells
rtl::OUString SAL_CALL ScCellRangesObj::getRangeAddressesAsString()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aString;
ScDocShell* pDocSh = GetDocShell();
const ScRangeList& rRanges = GetRangeList();
@@ -4265,7 +4265,7 @@ void SAL_CALL ScCellRangesObj::addRangeAddress( const table::CellRangeAddress& r
sal_Bool bMergeRanges )
throw(::com::sun::star::uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScRange aRange(static_cast<SCCOL>(rRange.StartColumn),
static_cast<SCROW>(rRange.StartRow),
static_cast<SCTAB>(rRange.Sheet),
@@ -4287,7 +4287,7 @@ void SAL_CALL ScCellRangesObj::removeRangeAddress( const table::CellRangeAddress
throw(::com::sun::star::container::NoSuchElementException,
::com::sun::star::uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
const ScRangeList& rRanges = GetRangeList();
ScRangeList aSheetRanges;
@@ -4335,7 +4335,7 @@ void SAL_CALL ScCellRangesObj::addRangeAddresses( const uno::Sequence<table::Cel
sal_Bool bMergeRanges )
throw(::com::sun::star::uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
sal_Int32 nCount(rRanges.getLength());
if (nCount)
{
@@ -4358,7 +4358,7 @@ void SAL_CALL ScCellRangesObj::removeRangeAddresses( const uno::Sequence<table::
::com::sun::star::uno::RuntimeException)
{
// with this implementation not needed
-// ScUnoGuard aGuard;
+// SolarMutexGuard aGuard;
// use sometimes a better/faster implementation
@@ -4387,7 +4387,7 @@ void SAL_CALL ScCellRangesObj::insertByName( const rtl::OUString& aName, const u
throw(lang::IllegalArgumentException, container::ElementExistException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
BOOL bDone = FALSE;
@@ -4515,7 +4515,7 @@ void SAL_CALL ScCellRangesObj::removeByName( const rtl::OUString& aName )
throw(container::NoSuchElementException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
BOOL bDone = FALSE;
String aNameStr(aName);
ScDocShell* pDocSh = GetDocShell();
@@ -4582,7 +4582,7 @@ void SAL_CALL ScCellRangesObj::replaceByName( const rtl::OUString& aName, const
throw(lang::IllegalArgumentException, container::NoSuchElementException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
//! zusammenfassen?
removeByName( aName );
insertByName( aName, aElement );
@@ -4594,7 +4594,7 @@ uno::Any SAL_CALL ScCellRangesObj::getByName( const rtl::OUString& aName )
throw(container::NoSuchElementException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Any aRet;
String aNameStr(aName);
@@ -4631,7 +4631,7 @@ BOOL lcl_FindEntryName( const ScNamedEntryArr_Impl& rNamedEntries,
uno::Sequence<rtl::OUString> SAL_CALL ScCellRangesObj::getElementNames()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
const ScRangeList& rRanges = GetRangeList();
@@ -4659,7 +4659,7 @@ uno::Sequence<rtl::OUString> SAL_CALL ScCellRangesObj::getElementNames()
sal_Bool SAL_CALL ScCellRangesObj::hasByName( const rtl::OUString& aName )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aNameStr(aName);
ScDocShell* pDocSh = GetDocShell();
const ScRangeList& rRanges = GetRangeList();
@@ -4672,7 +4672,7 @@ sal_Bool SAL_CALL ScCellRangesObj::hasByName( const rtl::OUString& aName )
uno::Reference<container::XEnumeration> SAL_CALL ScCellRangesObj::createEnumeration()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScIndexEnumeration(this, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.SheetCellRangesEnumeration")));
}
@@ -4680,7 +4680,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScCellRangesObj::createEnumerat
sal_Int32 SAL_CALL ScCellRangesObj::getCount() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
const ScRangeList& rRanges = GetRangeList();
return rRanges.Count();
}
@@ -4689,7 +4689,7 @@ uno::Any SAL_CALL ScCellRangesObj::getByIndex( sal_Int32 nIndex )
throw(lang::IndexOutOfBoundsException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<table::XCellRange> xRange(GetObjectByIndex_Impl(nIndex));
if (xRange.is())
return uno::makeAny(xRange);
@@ -4700,13 +4700,13 @@ uno::Any SAL_CALL ScCellRangesObj::getByIndex( sal_Int32 nIndex )
uno::Type SAL_CALL ScCellRangesObj::getElementType() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return getCppuType((uno::Reference<table::XCellRange>*)0);
}
sal_Bool SAL_CALL ScCellRangesObj::hasElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
const ScRangeList& rRanges = GetRangeList();
return rRanges.Count() != 0;
}
@@ -4895,7 +4895,7 @@ uno::Reference<table::XCell> SAL_CALL ScCellRangeObj::getCellByPosition(
sal_Int32 nColumn, sal_Int32 nRow )
throw(lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return GetCellByPosition_Impl(nColumn, nRow);
}
@@ -4904,7 +4904,7 @@ uno::Reference<table::XCellRange> SAL_CALL ScCellRangeObj::getCellRangeByPositio
sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom )
throw(lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if (!pDocSh)
@@ -4943,7 +4943,7 @@ uno::Reference<table::XCellRange> ScCellRangeObj::getCellRangeByName(
// name refers to the whole document (with the range's table as default),
// valid only if the range is within this range
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -4994,7 +4994,7 @@ uno::Reference<table::XCellRange> ScCellRangeObj::getCellRangeByName(
uno::Reference<table::XTableColumns> SAL_CALL ScCellRangeObj::getColumns() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if (pDocSh)
return new ScTableColumnsObj( pDocSh, aRange.aStart.Tab(),
@@ -5006,7 +5006,7 @@ uno::Reference<table::XTableColumns> SAL_CALL ScCellRangeObj::getColumns() throw
uno::Reference<table::XTableRows> SAL_CALL ScCellRangeObj::getRows() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if (pDocSh)
return new ScTableRowsObj( pDocSh, aRange.aStart.Tab(),
@@ -5020,7 +5020,7 @@ uno::Reference<table::XTableRows> SAL_CALL ScCellRangeObj::getRows() throw(uno::
table::CellRangeAddress SAL_CALL ScCellRangeObj::getRangeAddress() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
table::CellRangeAddress aRet;
ScUnoConversion::FillApiRange( aRet, aRange );
return aRet;
@@ -5031,7 +5031,7 @@ table::CellRangeAddress SAL_CALL ScCellRangeObj::getRangeAddress() throw(uno::Ru
uno::Reference<sheet::XSpreadsheet> SAL_CALL ScCellRangeObj::getSpreadsheet()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if (pDocSh)
return new ScTableSheetObj( pDocSh, aRange.aStart.Tab() );
@@ -5044,7 +5044,7 @@ uno::Reference<sheet::XSpreadsheet> SAL_CALL ScCellRangeObj::getSpreadsheet()
rtl::OUString SAL_CALL ScCellRangeObj::getArrayFormula() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
// Matrix-Formel, wenn eindeutig Teil einer Matrix,
// also wenn Anfang und Ende des Blocks zur selben Matrix gehoeren.
@@ -5105,7 +5105,7 @@ void ScCellRangeObj::SetArrayFormula_Impl( const rtl::OUString& rFormula,
void SAL_CALL ScCellRangeObj::setArrayFormula( const rtl::OUString& aFormula )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
// GRAM_PODF_A1 for API compatibility.
SetArrayFormula_Impl( aFormula, ::rtl::OUString(), formula::FormulaGrammar::GRAM_PODF_A1);
}
@@ -5113,7 +5113,7 @@ void SAL_CALL ScCellRangeObj::setArrayFormula( const rtl::OUString& aFormula )
void ScCellRangeObj::SetArrayFormulaWithGrammar( const rtl::OUString& rFormula,
const rtl::OUString& rFormulaNmsp, const formula::FormulaGrammar::Grammar eGrammar ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
SetArrayFormula_Impl( rFormula, rFormulaNmsp, eGrammar);
}
@@ -5121,7 +5121,7 @@ void ScCellRangeObj::SetArrayFormulaWithGrammar( const rtl::OUString& rFormula,
uno::Sequence<sheet::FormulaToken> SAL_CALL ScCellRangeObj::getArrayTokens() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
// same cell logic as in getArrayFormula
@@ -5155,7 +5155,7 @@ uno::Sequence<sheet::FormulaToken> SAL_CALL ScCellRangeObj::getArrayTokens() thr
void SAL_CALL ScCellRangeObj::setArrayTokens( const uno::Sequence<sheet::FormulaToken>& rTokens ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -5192,7 +5192,7 @@ void SAL_CALL ScCellRangeObj::setArrayTokens( const uno::Sequence<sheet::Formula
uno::Sequence< uno::Sequence<uno::Any> > SAL_CALL ScCellRangeObj::getDataArray()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( ScTableSheetObj::getImplementation( (cppu::OWeakObject*)this ) )
{
@@ -5221,7 +5221,7 @@ void SAL_CALL ScCellRangeObj::setDataArray(
const uno::Sequence< uno::Sequence<uno::Any> >& aArray )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
BOOL bDone = FALSE;
ScDocShell* pDocSh = GetDocShell();
@@ -5240,7 +5240,7 @@ void SAL_CALL ScCellRangeObj::setDataArray(
uno::Sequence< uno::Sequence<rtl::OUString> > SAL_CALL ScCellRangeObj::getFormulaArray()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( ScTableSheetObj::getImplementation( (cppu::OWeakObject*)this ) )
{
@@ -5283,7 +5283,7 @@ void SAL_CALL ScCellRangeObj::setFormulaArray(
const uno::Sequence< uno::Sequence<rtl::OUString> >& aArray )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
BOOL bDone = FALSE;
ScDocShell* pDocSh = GetDocShell();
@@ -5307,7 +5307,7 @@ void SAL_CALL ScCellRangeObj::setTableOperation( const table::CellRangeAddress&
const table::CellAddress& aRowCell )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if (pDocSh)
{
@@ -5352,7 +5352,7 @@ void SAL_CALL ScCellRangeObj::setTableOperation( const table::CellRangeAddress&
void SAL_CALL ScCellRangeObj::merge( sal_Bool bMerge ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -5372,7 +5372,7 @@ void SAL_CALL ScCellRangeObj::merge( sal_Bool bMerge ) throw(uno::RuntimeExcepti
sal_Bool SAL_CALL ScCellRangeObj::getIsMerged() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
return pDocSh && pDocSh->GetDocument()->HasAttrib( aRange, HASATTR_MERGED );
}
@@ -5383,7 +5383,7 @@ void SAL_CALL ScCellRangeObj::fillSeries( sheet::FillDirection nFillDirection,
sheet::FillMode nFillMode, sheet::FillDateMode nFillDateMode,
double fStep, double fEndValue ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -5461,7 +5461,7 @@ void SAL_CALL ScCellRangeObj::fillSeries( sheet::FillDirection nFillDirection,
void SAL_CALL ScCellRangeObj::fillAuto( sheet::FillDirection nFillDirection,
sal_Int32 nSourceCount ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh && nSourceCount )
{
@@ -5510,7 +5510,7 @@ void SAL_CALL ScCellRangeObj::fillAuto( sheet::FillDirection nFillDirection,
void SAL_CALL ScCellRangeObj::autoFormat( const rtl::OUString& aName )
throw(lang::IllegalArgumentException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScAutoFormat* pAutoFormat = ScGlobal::GetAutoFormat();
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh && pAutoFormat )
@@ -5540,7 +5540,7 @@ void SAL_CALL ScCellRangeObj::autoFormat( const rtl::OUString& aName )
uno::Sequence<beans::PropertyValue> SAL_CALL ScCellRangeObj::createSortDescriptor()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScSortParam aParam;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
@@ -5571,7 +5571,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScCellRangeObj::createSortDescripto
void SAL_CALL ScCellRangeObj::sort( const uno::Sequence<beans::PropertyValue>& aDescriptor )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if (pDocSh)
{
@@ -5618,7 +5618,7 @@ void SAL_CALL ScCellRangeObj::sort( const uno::Sequence<beans::PropertyValue>& a
uno::Reference<sheet::XSheetFilterDescriptor> SAL_CALL ScCellRangeObj::createFilterDescriptor(
sal_Bool bEmpty ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
ScFilterDescriptor* pNew = new ScFilterDescriptor(pDocSh);
if ( !bEmpty && pDocSh )
@@ -5651,7 +5651,7 @@ uno::Reference<sheet::XSheetFilterDescriptor> SAL_CALL ScCellRangeObj::createFil
void SAL_CALL ScCellRangeObj::filter( const uno::Reference<sheet::XSheetFilterDescriptor>& xDescriptor )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
// das koennte theoretisch ein fremdes Objekt sein, also nur das
// oeffentliche XSheetFilterDescriptor Interface benutzen, um
@@ -5724,7 +5724,7 @@ uno::Reference<sheet::XSheetFilterDescriptor> SAL_CALL ScCellRangeObj::createFil
const uno::Reference<sheet::XSheetFilterable>& xObject )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
// this ist hier nicht der Bereich, der gefiltert wird, sondern der
// Bereich mit der Abfrage...
@@ -5787,7 +5787,7 @@ uno::Reference<sheet::XSheetFilterDescriptor> SAL_CALL ScCellRangeObj::createFil
uno::Reference<sheet::XSubTotalDescriptor> SAL_CALL ScCellRangeObj::createSubTotalDescriptor(
sal_Bool bEmpty ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScSubTotalDescriptor* pNew = new ScSubTotalDescriptor;
ScDocShell* pDocSh = GetDocShell();
if ( !bEmpty && pDocSh )
@@ -5823,7 +5823,7 @@ void SAL_CALL ScCellRangeObj::applySubTotals(
const uno::Reference<sheet::XSubTotalDescriptor>& xDescriptor,
sal_Bool bReplace ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (!xDescriptor.is()) return;
@@ -5865,7 +5865,7 @@ void SAL_CALL ScCellRangeObj::applySubTotals(
void SAL_CALL ScCellRangeObj::removeSubTotals() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if (pDocSh)
@@ -5893,7 +5893,7 @@ void SAL_CALL ScCellRangeObj::removeSubTotals() throw(uno::RuntimeException)
uno::Sequence<beans::PropertyValue> SAL_CALL ScCellRangeObj::createImportDescriptor( sal_Bool bEmpty )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScImportParam aParam;
ScDocShell* pDocSh = GetDocShell();
if ( !bEmpty && pDocSh )
@@ -5912,7 +5912,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScCellRangeObj::createImportDescrip
void SAL_CALL ScCellRangeObj::doImport( const uno::Sequence<beans::PropertyValue>& aDescriptor )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if (pDocSh)
{
@@ -5940,7 +5940,7 @@ void SAL_CALL ScCellRangeObj::doImport( const uno::Sequence<beans::PropertyValue
uno::Reference<container::XIndexAccess> SAL_CALL ScCellRangeObj::getCellFormatRanges()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
return new ScCellFormatsObj( pDocSh, aRange );
@@ -5952,7 +5952,7 @@ uno::Reference<container::XIndexAccess> SAL_CALL ScCellRangeObj::getCellFormatRa
uno::Reference<container::XIndexAccess> SAL_CALL ScCellRangeObj::getUniqueCellFormatRanges()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
return new ScUniqueCellFormatsObj( pDocSh, aRange );
@@ -5964,7 +5964,7 @@ uno::Reference<container::XIndexAccess> SAL_CALL ScCellRangeObj::getUniqueCellFo
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScCellRangeObj::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static uno::Reference<beans::XPropertySetInfo> aRef(
new SfxItemPropertySetInfo( pRangePropSet->getPropertyMap() ));
return aRef;
@@ -6296,7 +6296,7 @@ void ScCellObj::SetFormulaWithGrammar( const ::rtl::OUString& rFormula,
uno::Reference<text::XTextCursor> SAL_CALL ScCellObj::createTextCursor()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScCellTextCursor( *this );
}
@@ -6304,7 +6304,7 @@ uno::Reference<text::XTextCursor> SAL_CALL ScCellObj::createTextCursorByRange(
const uno::Reference<text::XTextRange>& aTextPosition )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
SvxUnoTextCursor* pCursor = new ScCellTextCursor( *this );
uno::Reference<text::XTextCursor> xCursor(pCursor);
@@ -6325,13 +6325,13 @@ uno::Reference<text::XTextCursor> SAL_CALL ScCellObj::createTextCursorByRange(
rtl::OUString SAL_CALL ScCellObj::getString() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return GetOutputString_Impl();
}
void SAL_CALL ScCellObj::setString( const rtl::OUString& aText ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aString(aText);
SetString_Impl(aString, FALSE, FALSE); // immer Text
@@ -6347,7 +6347,7 @@ void SAL_CALL ScCellObj::insertString( const uno::Reference<text::XTextRange>& x
// special handling for ScCellTextCursor is no longer needed,
// SvxUnoText::insertString checks for SvxUnoTextRangeBase instead of SvxUnoTextRange
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
GetUnoText().insertString(xRange, aString, bAbsorb);
}
@@ -6355,7 +6355,7 @@ void SAL_CALL ScCellObj::insertControlCharacter( const uno::Reference<text::XTex
sal_Int16 nControlCharacter, sal_Bool bAbsorb )
throw(lang::IllegalArgumentException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
GetUnoText().insertControlCharacter(xRange, nControlCharacter, bAbsorb);
}
@@ -6364,20 +6364,13 @@ void SAL_CALL ScCellObj::insertTextContent( const uno::Reference<text::XTextRang
sal_Bool bAbsorb )
throw(lang::IllegalArgumentException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh && xContent.is() )
{
ScCellFieldObj* pCellField = ScCellFieldObj::getImplementation( xContent );
SvxUnoTextRangeBase* pTextRange = ScCellTextCursor::getImplementation( xRange );
-#if 0
- if (!pTextRange)
- pTextRange = SvxUnoTextRangeBase::getImplementation( xRange );
-
- //! bei SvxUnoTextRange testen, ob in passendem Objekt !!!
-#endif
-
if ( pCellField && !pCellField->IsInserted() && pTextRange )
{
SvxEditSource* pEditSource = pTextRange->GetEditSource();
@@ -6419,7 +6412,7 @@ void SAL_CALL ScCellObj::insertTextContent( const uno::Reference<text::XTextRang
void SAL_CALL ScCellObj::removeTextContent( const uno::Reference<text::XTextContent>& xContent )
throw(container::NoSuchElementException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( xContent.is() )
{
ScCellFieldObj* pCellField = ScCellFieldObj::getImplementation( xContent );
@@ -6435,38 +6428,38 @@ void SAL_CALL ScCellObj::removeTextContent( const uno::Reference<text::XTextCont
uno::Reference<text::XText> SAL_CALL ScCellObj::getText() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return this;
}
uno::Reference<text::XTextRange> SAL_CALL ScCellObj::getStart() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return GetUnoText().getStart();
}
uno::Reference<text::XTextRange> SAL_CALL ScCellObj::getEnd() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return GetUnoText().getEnd();
}
uno::Reference<container::XEnumeration> SAL_CALL ScCellObj::createEnumeration()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return GetUnoText().createEnumeration();
}
uno::Type SAL_CALL ScCellObj::getElementType() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return GetUnoText().getElementType();
}
sal_Bool SAL_CALL ScCellObj::hasElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return GetUnoText().hasElements();
}
@@ -6474,33 +6467,33 @@ sal_Bool SAL_CALL ScCellObj::hasElements() throw(uno::RuntimeException)
rtl::OUString SAL_CALL ScCellObj::getFormula() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
// TRUE = englisch
return GetInputString_Impl(TRUE);
}
void SAL_CALL ScCellObj::setFormula( const rtl::OUString& aFormula ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aString(aFormula);
SetString_Impl(aString, TRUE, TRUE); // englisch interpretieren
}
double SAL_CALL ScCellObj::getValue() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return GetValue_Impl();
}
void SAL_CALL ScCellObj::setValue( double nValue ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
SetValue_Impl(nValue);
}
table::CellContentType SAL_CALL ScCellObj::getType() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
table::CellContentType eRet = table::CellContentType_EMPTY;
ScDocShell* pDocSh = GetDocShell();
if (pDocSh)
@@ -6547,7 +6540,7 @@ table::CellContentType ScCellObj::GetResultType_Impl()
sal_Int32 SAL_CALL ScCellObj::getError() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
USHORT nError = 0;
ScDocShell* pDocSh = GetDocShell();
if (pDocSh)
@@ -6569,7 +6562,7 @@ sal_Int32 SAL_CALL ScCellObj::getError() throw(uno::RuntimeException)
uno::Sequence<sheet::FormulaToken> SAL_CALL ScCellObj::getTokens() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Sequence<sheet::FormulaToken> aSequence;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
@@ -6588,7 +6581,7 @@ uno::Sequence<sheet::FormulaToken> SAL_CALL ScCellObj::getTokens() throw(uno::Ru
void SAL_CALL ScCellObj::setTokens( const uno::Sequence<sheet::FormulaToken>& rTokens ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -6606,7 +6599,7 @@ void SAL_CALL ScCellObj::setTokens( const uno::Sequence<sheet::FormulaToken>& rT
table::CellAddress SAL_CALL ScCellObj::getCellAddress() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
table::CellAddress aAdr;
aAdr.Sheet = aCellPos.Tab();
aAdr.Column = aCellPos.Col();
@@ -6619,7 +6612,7 @@ table::CellAddress SAL_CALL ScCellObj::getCellAddress() throw(uno::RuntimeExcept
uno::Reference<sheet::XSheetAnnotation> SAL_CALL ScCellObj::getAnnotation()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
return new ScAnnotationObj( pDocSh, aCellPos );
@@ -6633,7 +6626,7 @@ uno::Reference<sheet::XSheetAnnotation> SAL_CALL ScCellObj::getAnnotation()
uno::Reference<container::XEnumerationAccess> SAL_CALL ScCellObj::getTextFields()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
return new ScCellFieldsObj( pDocSh, aCellPos );
@@ -6653,7 +6646,7 @@ uno::Reference<container::XNameAccess> SAL_CALL ScCellObj::getTextFieldMasters()
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScCellObj::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static uno::Reference<beans::XPropertySetInfo> aRef(
new SfxItemPropertySetInfo( pCellPropSet->getPropertyMap() ));
return aRef;
@@ -6750,13 +6743,13 @@ uno::Sequence<rtl::OUString> SAL_CALL ScCellObj::getSupportedServiceNames()
sal_Bool SAL_CALL ScCellObj::isActionLocked() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return nActionLockCount != 0;
}
void SAL_CALL ScCellObj::addActionLock() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (!nActionLockCount)
{
if (pUnoText)
@@ -6772,7 +6765,7 @@ void SAL_CALL ScCellObj::addActionLock() throw(uno::RuntimeException)
void SAL_CALL ScCellObj::removeActionLock() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (nActionLockCount > 0)
{
nActionLockCount--;
@@ -6795,7 +6788,7 @@ void SAL_CALL ScCellObj::removeActionLock() throw(uno::RuntimeException)
void SAL_CALL ScCellObj::setActionLocks( sal_Int16 nLock ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pUnoText)
{
ScSharedCellEditSource* pEditSource =
@@ -6812,7 +6805,7 @@ void SAL_CALL ScCellObj::setActionLocks( sal_Int16 nLock ) throw(uno::RuntimeExc
sal_Int16 SAL_CALL ScCellObj::resetActionLocks() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
USHORT nRet(nActionLockCount);
if (pUnoText)
{
@@ -6944,7 +6937,7 @@ SCTAB ScTableSheetObj::GetTab_Impl() const
uno::Reference<table::XTableCharts> SAL_CALL ScTableSheetObj::getCharts() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
return new ScChartsObj( pDocSh, GetTab_Impl() );
@@ -6956,7 +6949,7 @@ uno::Reference<table::XTableCharts> SAL_CALL ScTableSheetObj::getCharts() throw(
uno::Reference<sheet::XDataPilotTables> SAL_CALL ScTableSheetObj::getDataPilotTables()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
return new ScDataPilotTablesObj( pDocSh, GetTab_Impl() );
@@ -6967,7 +6960,7 @@ uno::Reference<sheet::XDataPilotTables> SAL_CALL ScTableSheetObj::getDataPilotTa
uno::Reference<sheet::XScenarios> SAL_CALL ScTableSheetObj::getScenarios() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
@@ -6980,7 +6973,7 @@ uno::Reference<sheet::XScenarios> SAL_CALL ScTableSheetObj::getScenarios() throw
uno::Reference<sheet::XSheetAnnotations> SAL_CALL ScTableSheetObj::getAnnotations()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
@@ -6993,14 +6986,14 @@ uno::Reference<sheet::XSheetAnnotations> SAL_CALL ScTableSheetObj::getAnnotation
uno::Reference<table::XCellRange> SAL_CALL ScTableSheetObj::getCellRangeByName(
const rtl::OUString& rRange ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ScCellRangeObj::getCellRangeByName( rRange );
}
uno::Reference<sheet::XSheetCellCursor> SAL_CALL ScTableSheetObj::createCursor()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7015,7 +7008,7 @@ uno::Reference<sheet::XSheetCellCursor> SAL_CALL ScTableSheetObj::createCursorBy
const uno::Reference<sheet::XSheetCellRange>& xCellRange )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh && xCellRange.is() )
{
@@ -7035,7 +7028,7 @@ uno::Reference<sheet::XSheetCellCursor> SAL_CALL ScTableSheetObj::createCursorBy
uno::Reference<sheet::XSpreadsheet> SAL_CALL ScTableSheetObj::getSpreadsheet()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return this; //!???
}
@@ -7045,7 +7038,7 @@ uno::Reference<table::XCell> SAL_CALL ScTableSheetObj::getCellByPosition(
sal_Int32 nColumn, sal_Int32 nRow )
throw(lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ScCellRangeObj::GetCellByPosition_Impl(nColumn, nRow);
}
@@ -7053,14 +7046,14 @@ uno::Reference<table::XCellRange> SAL_CALL ScTableSheetObj::getCellRangeByPositi
sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom )
throw(lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ScCellRangeObj::getCellRangeByPosition(nLeft,nTop,nRight,nBottom);
}
uno::Sequence<sheet::TablePageBreakData> SAL_CALL ScTableSheetObj::getColumnPageBreaks()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7106,7 +7099,7 @@ uno::Sequence<sheet::TablePageBreakData> SAL_CALL ScTableSheetObj::getColumnPage
uno::Sequence<sheet::TablePageBreakData> SAL_CALL ScTableSheetObj::getRowPageBreaks()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7129,7 +7122,7 @@ uno::Sequence<sheet::TablePageBreakData> SAL_CALL ScTableSheetObj::getRowPageBre
void SAL_CALL ScTableSheetObj::removeAllManualPageBreaks() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7161,7 +7154,7 @@ void SAL_CALL ScTableSheetObj::removeAllManualPageBreaks() throw(uno::RuntimeExc
rtl::OUString SAL_CALL ScTableSheetObj::getName() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aName;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
@@ -7172,7 +7165,7 @@ rtl::OUString SAL_CALL ScTableSheetObj::getName() throw(uno::RuntimeException)
void SAL_CALL ScTableSheetObj::setName( const rtl::OUString& aNewName )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7187,7 +7180,7 @@ void SAL_CALL ScTableSheetObj::setName( const rtl::OUString& aNewName )
uno::Reference<drawing::XDrawPage> SAL_CALL ScTableSheetObj::getDrawPage()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7211,7 +7204,7 @@ uno::Reference<drawing::XDrawPage> SAL_CALL ScTableSheetObj::getDrawPage()
void SAL_CALL ScTableSheetObj::insertCells( const table::CellRangeAddress& rRangeAddress,
sheet::CellInsertMode nMode ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7243,7 +7236,7 @@ void SAL_CALL ScTableSheetObj::insertCells( const table::CellRangeAddress& rRang
void SAL_CALL ScTableSheetObj::removeRange( const table::CellRangeAddress& rRangeAddress,
sheet::CellDeleteMode nMode ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7276,7 +7269,7 @@ void SAL_CALL ScTableSheetObj::moveRange( const table::CellAddress& aDestination
const table::CellRangeAddress& aSource )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7293,7 +7286,7 @@ void SAL_CALL ScTableSheetObj::copyRange( const table::CellAddress& aDestination
const table::CellRangeAddress& aSource )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7341,7 +7334,7 @@ void ScTableSheetObj::PrintAreaUndo_Impl( ScPrintRangeSaver* pOldRanges )
uno::Sequence<table::CellRangeAddress> SAL_CALL ScTableSheetObj::getPrintAreas()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7372,7 +7365,7 @@ void SAL_CALL ScTableSheetObj::setPrintAreas(
const uno::Sequence<table::CellRangeAddress>& aPrintAreas )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7400,7 +7393,7 @@ void SAL_CALL ScTableSheetObj::setPrintAreas(
sal_Bool SAL_CALL ScTableSheetObj::getPrintTitleColumns() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7414,7 +7407,7 @@ sal_Bool SAL_CALL ScTableSheetObj::getPrintTitleColumns() throw(uno::RuntimeExce
void SAL_CALL ScTableSheetObj::setPrintTitleColumns( sal_Bool bPrintTitleColumns )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7442,7 +7435,7 @@ void SAL_CALL ScTableSheetObj::setPrintTitleColumns( sal_Bool bPrintTitleColumns
table::CellRangeAddress SAL_CALL ScTableSheetObj::getTitleColumns() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
table::CellRangeAddress aRet;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
@@ -7462,7 +7455,7 @@ table::CellRangeAddress SAL_CALL ScTableSheetObj::getTitleColumns() throw(uno::R
void SAL_CALL ScTableSheetObj::setTitleColumns( const table::CellRangeAddress& aTitleColumns )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7481,7 +7474,7 @@ void SAL_CALL ScTableSheetObj::setTitleColumns( const table::CellRangeAddress& a
sal_Bool SAL_CALL ScTableSheetObj::getPrintTitleRows() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7495,7 +7488,7 @@ sal_Bool SAL_CALL ScTableSheetObj::getPrintTitleRows() throw(uno::RuntimeExcepti
void SAL_CALL ScTableSheetObj::setPrintTitleRows( sal_Bool bPrintTitleRows )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7523,7 +7516,7 @@ void SAL_CALL ScTableSheetObj::setPrintTitleRows( sal_Bool bPrintTitleRows )
table::CellRangeAddress SAL_CALL ScTableSheetObj::getTitleRows() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
table::CellRangeAddress aRet;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
@@ -7543,7 +7536,7 @@ table::CellRangeAddress SAL_CALL ScTableSheetObj::getTitleRows() throw(uno::Runt
void SAL_CALL ScTableSheetObj::setTitleRows( const table::CellRangeAddress& aTitleRows )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7564,7 +7557,7 @@ void SAL_CALL ScTableSheetObj::setTitleRows( const table::CellRangeAddress& aTit
sheet::SheetLinkMode SAL_CALL ScTableSheetObj::getLinkMode() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
sheet::SheetLinkMode eRet = sheet::SheetLinkMode_NONE;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
@@ -7581,7 +7574,7 @@ sheet::SheetLinkMode SAL_CALL ScTableSheetObj::getLinkMode() throw(uno::RuntimeE
void SAL_CALL ScTableSheetObj::setLinkMode( sheet::SheetLinkMode nLinkMode )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
//! Filter und Options aus altem Link suchen
@@ -7594,7 +7587,7 @@ void SAL_CALL ScTableSheetObj::setLinkMode( sheet::SheetLinkMode nLinkMode )
rtl::OUString SAL_CALL ScTableSheetObj::getLinkUrl() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aFile;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
@@ -7605,7 +7598,7 @@ rtl::OUString SAL_CALL ScTableSheetObj::getLinkUrl() throw(uno::RuntimeException
void SAL_CALL ScTableSheetObj::setLinkUrl( const rtl::OUString& aLinkUrl )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
//! Filter und Options aus altem Link suchen
@@ -7618,7 +7611,7 @@ void SAL_CALL ScTableSheetObj::setLinkUrl( const rtl::OUString& aLinkUrl )
rtl::OUString SAL_CALL ScTableSheetObj::getLinkSheetName() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aSheet;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
@@ -7629,7 +7622,7 @@ rtl::OUString SAL_CALL ScTableSheetObj::getLinkSheetName() throw(uno::RuntimeExc
void SAL_CALL ScTableSheetObj::setLinkSheetName( const rtl::OUString& aLinkSheetName )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
//! Filter und Options aus altem Link suchen
@@ -7644,7 +7637,7 @@ void SAL_CALL ScTableSheetObj::link( const rtl::OUString& aUrl, const rtl::OUStr
const rtl::OUString& aFilterName, const rtl::OUString& aFilterOptions,
sheet::SheetLinkMode nMode ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7710,7 +7703,7 @@ void SAL_CALL ScTableSheetObj::link( const rtl::OUString& aUrl, const rtl::OUStr
sal_Bool SAL_CALL ScTableSheetObj::hideDependents( const table::CellAddress& aPosition )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7726,7 +7719,7 @@ sal_Bool SAL_CALL ScTableSheetObj::hideDependents( const table::CellAddress& aPo
sal_Bool SAL_CALL ScTableSheetObj::hidePrecedents( const table::CellAddress& aPosition )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7742,7 +7735,7 @@ sal_Bool SAL_CALL ScTableSheetObj::hidePrecedents( const table::CellAddress& aPo
sal_Bool SAL_CALL ScTableSheetObj::showDependents( const table::CellAddress& aPosition )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7758,7 +7751,7 @@ sal_Bool SAL_CALL ScTableSheetObj::showDependents( const table::CellAddress& aPo
sal_Bool SAL_CALL ScTableSheetObj::showPrecedents( const table::CellAddress& aPosition )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7774,7 +7767,7 @@ sal_Bool SAL_CALL ScTableSheetObj::showPrecedents( const table::CellAddress& aPo
sal_Bool SAL_CALL ScTableSheetObj::showErrors( const table::CellAddress& aPosition )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7789,7 +7782,7 @@ sal_Bool SAL_CALL ScTableSheetObj::showErrors( const table::CellAddress& aPositi
sal_Bool SAL_CALL ScTableSheetObj::showInvalid() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7801,7 +7794,7 @@ sal_Bool SAL_CALL ScTableSheetObj::showInvalid() throw(uno::RuntimeException)
void SAL_CALL ScTableSheetObj::clearArrows() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7816,7 +7809,7 @@ void SAL_CALL ScTableSheetObj::group( const table::CellRangeAddress& rGroupRange
table::TableOrientation nOrientation )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7832,7 +7825,7 @@ void SAL_CALL ScTableSheetObj::ungroup( const table::CellRangeAddress& rGroupRan
table::TableOrientation nOrientation )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7847,7 +7840,7 @@ void SAL_CALL ScTableSheetObj::ungroup( const table::CellRangeAddress& rGroupRan
void SAL_CALL ScTableSheetObj::autoOutline( const table::CellRangeAddress& rCellRange )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7860,7 +7853,7 @@ void SAL_CALL ScTableSheetObj::autoOutline( const table::CellRangeAddress& rCell
void SAL_CALL ScTableSheetObj::clearOutline() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7873,7 +7866,7 @@ void SAL_CALL ScTableSheetObj::clearOutline() throw(uno::RuntimeException)
void SAL_CALL ScTableSheetObj::hideDetail( const table::CellRangeAddress& rCellRange )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7887,7 +7880,7 @@ void SAL_CALL ScTableSheetObj::hideDetail( const table::CellRangeAddress& rCellR
void SAL_CALL ScTableSheetObj::showDetail( const table::CellRangeAddress& rCellRange )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7901,7 +7894,7 @@ void SAL_CALL ScTableSheetObj::showDetail( const table::CellRangeAddress& rCellR
void SAL_CALL ScTableSheetObj::showLevel( sal_Int16 nLevel, table::TableOrientation nOrientation )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7917,7 +7910,7 @@ void SAL_CALL ScTableSheetObj::showLevel( sal_Int16 nLevel, table::TableOrientat
void SAL_CALL ScTableSheetObj::protect( const rtl::OUString& aPassword )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
// #i108245# if already protected, don't change anything
if ( pDocSh && !pDocSh->GetDocument()->IsTabProtected( GetTab_Impl() ) )
@@ -7931,7 +7924,7 @@ void SAL_CALL ScTableSheetObj::protect( const rtl::OUString& aPassword )
void SAL_CALL ScTableSheetObj::unprotect( const rtl::OUString& aPassword )
throw(lang::IllegalArgumentException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7945,7 +7938,7 @@ void SAL_CALL ScTableSheetObj::unprotect( const rtl::OUString& aPassword )
sal_Bool SAL_CALL ScTableSheetObj::isProtected() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
return pDocSh->GetDocument()->IsTabProtected( GetTab_Impl() );
@@ -7958,7 +7951,7 @@ sal_Bool SAL_CALL ScTableSheetObj::isProtected() throw(uno::RuntimeException)
sal_Bool SAL_CALL ScTableSheetObj::getIsScenario() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
return pDocSh->GetDocument()->IsScenario( GetTab_Impl() );
@@ -7968,7 +7961,7 @@ sal_Bool SAL_CALL ScTableSheetObj::getIsScenario() throw(uno::RuntimeException)
rtl::OUString SAL_CALL ScTableSheetObj::getScenarioComment() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -7984,7 +7977,7 @@ rtl::OUString SAL_CALL ScTableSheetObj::getScenarioComment() throw(uno::RuntimeE
void SAL_CALL ScTableSheetObj::setScenarioComment( const rtl::OUString& aScenarioComment )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -8007,7 +8000,7 @@ void SAL_CALL ScTableSheetObj::setScenarioComment( const rtl::OUString& aScenari
void SAL_CALL ScTableSheetObj::addRanges( const uno::Sequence<table::CellRangeAddress>& rScenRanges )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -8088,7 +8081,7 @@ void SAL_CALL ScTableSheetObj::addRanges( const uno::Sequence<table::CellRangeAd
void SAL_CALL ScTableSheetObj::apply() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -8113,7 +8106,7 @@ void SAL_CALL ScTableSheetObj::apply() throw(uno::RuntimeException)
uno::Sequence< table::CellRangeAddress > SAL_CALL ScTableSheetObj::getRanges( )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -8146,7 +8139,7 @@ uno::Sequence< table::CellRangeAddress > SAL_CALL ScTableSheetObj::getRanges( )
void ScTableSheetObj::setExternalName( const ::rtl::OUString& aUrl, const ::rtl::OUString& aSheetName )
throw (container::ElementExistException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -8168,7 +8161,7 @@ void ScTableSheetObj::setExternalName( const ::rtl::OUString& aUrl, const ::rtl:
uno::Reference<container::XNameReplace> SAL_CALL ScTableSheetObj::getEvents() throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
return new ScSheetEventsObj( pDocSh, GetTab_Impl() );
@@ -8181,7 +8174,7 @@ uno::Reference<container::XNameReplace> SAL_CALL ScTableSheetObj::getEvents() th
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScTableSheetObj::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static uno::Reference<beans::XPropertySetInfo> aRef(
new SfxItemPropertySetInfo( pSheetPropSet->getPropertyMap() ));
return aRef;
@@ -8804,7 +8797,7 @@ uno::Sequence<sal_Int8> SAL_CALL ScTableColumnObj::getImplementationId() throw(u
rtl::OUString SAL_CALL ScTableColumnObj::getName() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
const ScRange& rRange = GetRange();
DBG_ASSERT(rRange.aStart.Col() == rRange.aEnd.Col(), "too many columns");
@@ -8816,7 +8809,7 @@ rtl::OUString SAL_CALL ScTableColumnObj::getName() throw(uno::RuntimeException)
void SAL_CALL ScTableColumnObj::setName( const rtl::OUString& /* aNewName */ )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
throw uno::RuntimeException(); // read-only
}
@@ -8825,7 +8818,7 @@ void SAL_CALL ScTableColumnObj::setName( const rtl::OUString& /* aNewName */ )
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScTableColumnObj::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static uno::Reference<beans::XPropertySetInfo> aRef(
new SfxItemPropertySetInfo( pColPropSet->getPropertyMap() ));
return aRef;
@@ -8969,7 +8962,7 @@ ScTableRowObj::~ScTableRowObj()
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScTableRowObj::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static uno::Reference<beans::XPropertySetInfo> aRef(
new SfxItemPropertySetInfo( pRowPropSet->getPropertyMap() ));
return aRef;
@@ -9147,7 +9140,7 @@ void ScCellsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
uno::Reference<container::XEnumeration> SAL_CALL ScCellsObj::createEnumeration()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
return new ScCellsEnumeration( pDocShell, aRanges );
return NULL;
@@ -9155,13 +9148,13 @@ uno::Reference<container::XEnumeration> SAL_CALL ScCellsObj::createEnumeration()
uno::Type SAL_CALL ScCellsObj::getElementType() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return getCppuType((uno::Reference<table::XCell>*)0);
}
sal_Bool SAL_CALL ScCellsObj::hasElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
BOOL bHas = FALSE;
if ( pDocShell )
{
@@ -9284,14 +9277,14 @@ void ScCellsEnumeration::Notify( SfxBroadcaster&, const SfxHint& rHint )
sal_Bool SAL_CALL ScCellsEnumeration::hasMoreElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return !bAtEnd;
}
uno::Any SAL_CALL ScCellsEnumeration::nextElement() throw(container::NoSuchElementException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell && !bAtEnd)
{
// Interface-Typ muss zu ScCellsObj::getElementType passen
@@ -9372,7 +9365,7 @@ ScCellRangeObj* ScCellFormatsObj::GetObjectByIndex_Impl(long nIndex) const
sal_Int32 SAL_CALL ScCellFormatsObj::getCount() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
//! direkt auf die AttrArrays zugreifen !!!!
@@ -9395,7 +9388,7 @@ uno::Any SAL_CALL ScCellFormatsObj::getByIndex( sal_Int32 nIndex )
throw(lang::IndexOutOfBoundsException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<table::XCellRange> xRange(GetObjectByIndex_Impl(nIndex));
if (xRange.is())
@@ -9407,13 +9400,13 @@ uno::Any SAL_CALL ScCellFormatsObj::getByIndex( sal_Int32 nIndex )
uno::Type SAL_CALL ScCellFormatsObj::getElementType() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return getCppuType((uno::Reference<table::XCellRange>*)0);
}
sal_Bool SAL_CALL ScCellFormatsObj::hasElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ( getCount() != 0 ); //! immer groesser 0 ??
}
@@ -9422,7 +9415,7 @@ sal_Bool SAL_CALL ScCellFormatsObj::hasElements() throw(uno::RuntimeException)
uno::Reference<container::XEnumeration> SAL_CALL ScCellFormatsObj::createEnumeration()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
return new ScCellFormatsEnumeration( pDocShell, aTotalRange );
return NULL;
@@ -9519,14 +9512,14 @@ void ScCellFormatsEnumeration::Notify( SfxBroadcaster&, const SfxHint& rHint )
sal_Bool SAL_CALL ScCellFormatsEnumeration::hasMoreElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return !bAtEnd;
}
uno::Any SAL_CALL ScCellFormatsEnumeration::nextElement() throw(container::NoSuchElementException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( bAtEnd || !pDocShell )
throw container::NoSuchElementException(); // no more elements
@@ -9766,7 +9759,7 @@ void ScUniqueCellFormatsObj::GetObjects_Impl()
sal_Int32 SAL_CALL ScUniqueCellFormatsObj::getCount() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return aRangeLists.size();
}
@@ -9775,7 +9768,7 @@ uno::Any SAL_CALL ScUniqueCellFormatsObj::getByIndex( sal_Int32 nIndex )
throw(lang::IndexOutOfBoundsException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if(static_cast<sal_uInt32>(nIndex) < aRangeLists.size())
return uno::makeAny(uno::Reference<sheet::XSheetCellRangeContainer>(new ScCellRangesObj(pDocShell, aRangeLists[nIndex])));
@@ -9786,13 +9779,13 @@ uno::Any SAL_CALL ScUniqueCellFormatsObj::getByIndex( sal_Int32 nIndex )
uno::Type SAL_CALL ScUniqueCellFormatsObj::getElementType() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return getCppuType((uno::Reference<sheet::XSheetCellRangeContainer>*)0);
}
sal_Bool SAL_CALL ScUniqueCellFormatsObj::hasElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ( aRangeLists.size() != 0 );
}
@@ -9801,7 +9794,7 @@ sal_Bool SAL_CALL ScUniqueCellFormatsObj::hasElements() throw(uno::RuntimeExcept
uno::Reference<container::XEnumeration> SAL_CALL ScUniqueCellFormatsObj::createEnumeration()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
return new ScUniqueCellFormatsEnumeration( pDocShell, aRangeLists );
return NULL;
@@ -9841,14 +9834,14 @@ void ScUniqueCellFormatsEnumeration::Notify( SfxBroadcaster&, const SfxHint& rHi
sal_Bool SAL_CALL ScUniqueCellFormatsEnumeration::hasMoreElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return static_cast<sal_uInt32>(nCurrentPosition) < aRangeLists.size();
}
uno::Any SAL_CALL ScUniqueCellFormatsEnumeration::nextElement() throw(container::NoSuchElementException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( !hasMoreElements() || !pDocShell )
throw container::NoSuchElementException(); // no more elements
@@ -9859,3 +9852,4 @@ uno::Any SAL_CALL ScUniqueCellFormatsEnumeration::nextElement() throw(container:
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/cellvaluebinding.cxx b/sc/source/ui/unoobj/cellvaluebinding.cxx
index 3b806ccf80b7..9e3cae0756c1 100644
--- a/sc/source/ui/unoobj/cellvaluebinding.cxx
+++ b/sc/source/ui/unoobj/cellvaluebinding.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -661,3 +662,5 @@ namespace calc
//.........................................................................
} // namespace calc
//.........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/cellvaluebinding.hxx b/sc/source/ui/unoobj/cellvaluebinding.hxx
index c9537d546f7b..85334cd33c3b 100644
--- a/sc/source/ui/unoobj/cellvaluebinding.hxx
+++ b/sc/source/ui/unoobj/cellvaluebinding.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -169,3 +170,5 @@ namespace calc
//.........................................................................
#endif // SC_CELLVALUEBINDING_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index f87818553ee1..227869efe48e 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,7 +32,6 @@
#include "chart2uno.hxx"
#include "miscuno.hxx"
#include "document.hxx"
-#include "unoguard.hxx"
#include "cell.hxx"
#include "chartpos.hxx"
#include "unonames.hxx"
@@ -46,6 +46,7 @@
#include <sfx2/objsh.hxx>
#include <tools/table.hxx>
+#include <vcl/svapp.hxx>
#include <com/sun/star/beans/UnknownPropertyException.hpp>
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
@@ -185,7 +186,7 @@ struct TokenTable
}
void clear()
{
- for_each(maTokens.begin(), maTokens.end(), DeleteInstance());
+ ::std::for_each(maTokens.begin(), maTokens.end(), DeleteInstance());
}
void push_back( FormulaToken* pToken )
@@ -993,7 +994,7 @@ void lcl_convertTokensToString(OUString& rStr, const vector<ScSharedTokenRef>& r
const sal_Unicode cRangeSep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0);
FormulaGrammar::Grammar eGrammar = pDoc->GetGrammar();
Tokens2RangeString func(pDoc, eGrammar, cRangeSep);
- func = for_each(rTokens.begin(), rTokens.end(), func);
+ func = ::std::for_each(rTokens.begin(), rTokens.end(), func);
func.getString(rStr);
}
@@ -1029,7 +1030,7 @@ void ScChart2DataProvider::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint
::sal_Bool SAL_CALL ScChart2DataProvider::createDataSourcePossible( const uno::Sequence< beans::PropertyValue >& aArguments )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if( ! m_pDocument )
return false;
@@ -1309,53 +1310,6 @@ bool lcl_addUpperLeftCornerIfMissing(vector<ScSharedTokenRef>& rRefTokens,
// Not all the adjacent cells are included. Bail out.
return false;
-#if 0 // Do we really need to do this ???
- if (rRefTokens.size() == 2)
- {
- // Make a simple rectangular range if possible.
- ScRange aRightPart(ScAddress(nMinCol+1, nMinRow, nTab), ScAddress(nMaxCol, nMaxRow, nTab));
- ScRange aBottomPart(ScAddress(nMinCol, nMinRow+1, nTab), ScAddress(nMaxCol, nMaxRow, nTab));
- vector<ScRange> aRanges;
- aRanges.reserve(2);
- aRanges.push_back(aRightPart);
- aRanges.push_back(aBottomPart);
- if (lcl_isRangeContained(rRefTokens, aRanges))
- {
- // Consolidate them into a single rectangle.
- ScComplexRefData aData;
- aData.InitFlags();
- aData.Ref1.SetFlag3D(true);
- aData.Ref1.SetColRel(false);
- aData.Ref1.SetRowRel(false);
- aData.Ref1.SetTabRel(false);
- aData.Ref2.SetColRel(false);
- aData.Ref2.SetRowRel(false);
- aData.Ref2.SetTabRel(false);
- aData.Ref1.nCol = nMinCol;
- aData.Ref1.nRow = nMinRow;
- aData.Ref1.nTab = nTab;
- aData.Ref2.nCol = nMaxCol;
- aData.Ref2.nRow = nMaxRow;
- aData.Ref2.nTab = nTab;
- vector<ScSharedTokenRef> aNewTokens;
- aNewTokens.reserve(1);
- if (bExternal)
- {
- ScSharedTokenRef p(
- new ScExternalDoubleRefToken(nFileId, aExtTabName, aData));
- aNewTokens.push_back(p);
- }
- else
- {
- ScSharedTokenRef p(new ScDoubleRefToken(aData));
- aNewTokens.push_back(p);
- }
- rRefTokens.swap(aNewTokens);
- return true;
- }
- }
-#endif
-
ScSingleRefData aData;
aData.InitFlags();
aData.SetFlag3D(true);
@@ -1411,7 +1365,7 @@ ScChart2DataProvider::createDataSource(
const uno::Sequence< beans::PropertyValue >& aArguments )
throw( lang::IllegalArgumentException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( ! m_pDocument )
throw uno::RuntimeException();
@@ -1736,7 +1690,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ScChart2DataProvider::detectArgum
// parse given data source and collect infos
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
DBG_ASSERT( m_pDocument, "No Document -> no detectArguments" );
if(!m_pDocument ||!xDataSource.is())
return lcl_VectorToSequence( aResult );
@@ -1853,7 +1807,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ScChart2DataProvider::detectArgum
{
list<SCTAB> aTableNumList;
InsertTabNumber func;
- func = for_each(aAllTokens.begin(), aAllTokens.end(), func);
+ func = ::std::for_each(aAllTokens.begin(), aAllTokens.end(), func);
func.getList(aTableNumList);
aResult.push_back(
beans::PropertyValue( ::rtl::OUString::createFromAscii("TableNumberList"), -1,
@@ -1989,7 +1943,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ScChart2DataProvider::detectArgum
::sal_Bool SAL_CALL ScChart2DataProvider::createDataSequenceByRangeRepresentationPossible( const ::rtl::OUString& aRangeRepresentation )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if( ! m_pDocument )
return false;
@@ -2004,7 +1958,7 @@ uno::Reference< chart2::data::XDataSequence > SAL_CALL
throw (lang::IllegalArgumentException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference< chart2::data::XDataSequence > xResult;
DBG_ASSERT( m_pDocument, "No Document -> no createDataSequenceByRangeRepresentation" );
@@ -2067,7 +2021,7 @@ rtl::OUString SAL_CALL ScChart2DataProvider::convertRangeToXML( const rtl::OUStr
throw lang::IllegalArgumentException();
Tokens2RangeStringXML converter(m_pDocument);
- converter = for_each(aRefTokens.begin(), aRefTokens.end(), converter);
+ converter = ::std::for_each(aRefTokens.begin(), aRefTokens.end(), converter);
converter.getString(aRet);
return aRet;
@@ -2123,7 +2077,7 @@ rtl::OUString SAL_CALL ScChart2DataProvider::convertRangeFromXML( const rtl::OUS
uno::Reference< beans::XPropertySetInfo> SAL_CALL
ScChart2DataProvider::getPropertySetInfo() throw( uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static uno::Reference<beans::XPropertySetInfo> aRef =
new SfxItemPropertySetInfo( m_aPropSet.getPropertyMap() );
return aRef;
@@ -2230,7 +2184,7 @@ void ScChart2DataSource::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint)
uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence> > SAL_CALL
ScChart2DataSource::getDataSequences() throw ( uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
LabeledList::const_iterator aItr(m_aLabeledSequences.begin());
LabeledList::const_iterator aEndItr(m_aLabeledSequences.end());
@@ -2344,7 +2298,7 @@ void ScChart2LabeledDataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint
if ( rHint.ISA( SfxSimpleHint ) &&
((const SfxSimpleHint&)rHint).GetId() == SFX_HINT_DYING )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
m_pDocument = NULL;
}
}
@@ -2354,7 +2308,7 @@ void ScChart2LabeledDataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint
uno::Reference< chart2::data::XDataSequence > SAL_CALL ScChart2LabeledDataSequence::getValues()
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return m_aData;
}
@@ -2362,14 +2316,14 @@ void SAL_CALL ScChart2LabeledDataSequence::setValues(
const uno::Reference< chart2::data::XDataSequence >& xSequence )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
m_aData = xSequence;
}
uno::Reference< chart2::data::XDataSequence > SAL_CALL ScChart2LabeledDataSequence::getLabel()
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return m_aLabel;
}
@@ -2377,7 +2331,7 @@ void SAL_CALL ScChart2LabeledDataSequence::setLabel(
const uno::Reference< chart2::data::XDataSequence >& xSequence )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
m_aLabel = xSequence;
}
@@ -2386,7 +2340,7 @@ void SAL_CALL ScChart2LabeledDataSequence::setLabel(
uno::Reference< util::XCloneable > SAL_CALL ScChart2LabeledDataSequence::createClone()
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference< util::XCloneable > xToClone(m_aData, uno::UNO_QUERY);
if (xToClone.is())
{
@@ -3015,7 +2969,7 @@ const hash_set<sal_uInt16>& ScChart2DataSequence::ExternalRefListener::getAllFil
uno::Sequence< uno::Any> SAL_CALL ScChart2DataSequence::getData()
throw ( uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( !m_pDocument)
throw uno::RuntimeException();
@@ -3045,7 +2999,7 @@ uno::Sequence< uno::Any> SAL_CALL ScChart2DataSequence::getData()
uno::Sequence< double > SAL_CALL ScChart2DataSequence::getNumericalData()
throw ( uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( !m_pDocument)
throw uno::RuntimeException();
@@ -3068,7 +3022,7 @@ uno::Sequence< double > SAL_CALL ScChart2DataSequence::getNumericalData()
uno::Sequence< rtl::OUString > SAL_CALL ScChart2DataSequence::getTextualData( ) throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( !m_pDocument)
throw uno::RuntimeException();
@@ -3087,7 +3041,7 @@ uno::Sequence< rtl::OUString > SAL_CALL ScChart2DataSequence::getTextualData( )
::rtl::OUString SAL_CALL ScChart2DataSequence::getSourceRangeRepresentation()
throw ( uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
OUString aStr;
DBG_ASSERT( m_pDocument, "No Document -> no SourceRangeRepresentation" );
if (m_pDocument && m_pTokens.get())
@@ -3206,7 +3160,7 @@ private:
uno::Sequence< ::rtl::OUString > SAL_CALL ScChart2DataSequence::generateLabel(chart2::data::LabelOrigin eOrigin)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( !m_pDocument)
throw uno::RuntimeException();
@@ -3215,7 +3169,7 @@ uno::Sequence< ::rtl::OUString > SAL_CALL ScChart2DataSequence::generateLabel(ch
// Determine the total size of all ranges.
AccumulateRangeSize func;
- func = for_each(m_pTokens->begin(), m_pTokens->end(), func);
+ func = ::std::for_each(m_pTokens->begin(), m_pTokens->end(), func);
SCCOL nCols = func.getCols();
SCROW nRows = func.getRows();
@@ -3245,7 +3199,7 @@ uno::Sequence< ::rtl::OUString > SAL_CALL ScChart2DataSequence::generateLabel(ch
// Generate label strings based on the info so far.
sal_Int32 nCount = bColumn ? nCols : nRows;
GenerateLabelStrings genLabels(nCount, eOrigin, bColumn);
- genLabels = for_each(m_pTokens->begin(), m_pTokens->end(), genLabels);
+ genLabels = ::std::for_each(m_pTokens->begin(), m_pTokens->end(), genLabels);
Sequence<OUString> aSeq = genLabels.getLabels();
return aSeq;
@@ -3259,7 +3213,7 @@ uno::Sequence< ::rtl::OUString > SAL_CALL ScChart2DataSequence::generateLabel(ch
bool bGetSeriesFormat = (nIndex == -1);
sal_Int32 nResult = 0;
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( !m_pDocument || !m_pTokens.get())
return nResult;
@@ -3331,7 +3285,7 @@ uno::Sequence< ::rtl::OUString > SAL_CALL ScChart2DataSequence::generateLabel(ch
uno::Reference< util::XCloneable > SAL_CALL ScChart2DataSequence::createClone()
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
auto_ptr< vector<ScSharedTokenRef> > pTokensNew;
if (m_pTokens.get())
@@ -3360,7 +3314,7 @@ void SAL_CALL ScChart2DataSequence::addModifyListener( const uno::Reference< uti
throw (uno::RuntimeException)
{
// like ScCellRangesBase::addModifyListener
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (!m_pTokens.get() || m_pTokens->empty())
return;
@@ -3403,7 +3357,7 @@ void SAL_CALL ScChart2DataSequence::removeModifyListener( const uno::Reference<
{
// like ScCellRangesBase::removeModifyListener
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (!m_pTokens.get() || m_pTokens->empty())
return;
@@ -3444,7 +3398,7 @@ void SAL_CALL ScChart2DataSequence::removeModifyListener( const uno::Reference<
uno::Reference< beans::XPropertySetInfo> SAL_CALL
ScChart2DataSequence::getPropertySetInfo() throw( uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static uno::Reference<beans::XPropertySetInfo> aRef =
new SfxItemPropertySetInfo( m_aPropSet.getPropertyMap() );
return aRef;
@@ -3644,7 +3598,7 @@ void ScChart2EmptyDataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint&
uno::Sequence< uno::Any> SAL_CALL ScChart2EmptyDataSequence::getData()
throw ( uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( !m_pDocument)
throw uno::RuntimeException();
return uno::Sequence< uno::Any>();
@@ -3654,7 +3608,7 @@ uno::Sequence< uno::Any> SAL_CALL ScChart2EmptyDataSequence::getData()
uno::Sequence< rtl::OUString > SAL_CALL ScChart2EmptyDataSequence::getTextualData( ) throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( !m_pDocument)
throw uno::RuntimeException();
@@ -3701,7 +3655,7 @@ uno::Sequence< rtl::OUString > SAL_CALL ScChart2EmptyDataSequence::getTextualDat
::rtl::OUString SAL_CALL ScChart2EmptyDataSequence::getSourceRangeRepresentation()
throw ( uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aStr;
DBG_ASSERT( m_pDocument, "No Document -> no SourceRangeRepresentation" );
if( m_pDocument )
@@ -3712,7 +3666,7 @@ uno::Sequence< rtl::OUString > SAL_CALL ScChart2EmptyDataSequence::getTextualDat
uno::Sequence< ::rtl::OUString > SAL_CALL ScChart2EmptyDataSequence::generateLabel(chart2::data::LabelOrigin /*nOrigin*/)
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Sequence< ::rtl::OUString > aRet;
return aRet;
}
@@ -3723,7 +3677,7 @@ uno::Sequence< ::rtl::OUString > SAL_CALL ScChart2EmptyDataSequence::generateLab
{
sal_Int32 nResult = 0;
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( !m_pDocument)
return nResult;
@@ -3735,7 +3689,7 @@ uno::Sequence< ::rtl::OUString > SAL_CALL ScChart2EmptyDataSequence::generateLab
uno::Reference< util::XCloneable > SAL_CALL ScChart2EmptyDataSequence::createClone()
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (m_xDataProvider.is())
{
// copy properties
@@ -3772,7 +3726,7 @@ void SAL_CALL ScChart2EmptyDataSequence::removeModifyListener( const uno::Refere
uno::Reference< beans::XPropertySetInfo> SAL_CALL
ScChart2EmptyDataSequence::getPropertySetInfo() throw( uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static uno::Reference<beans::XPropertySetInfo> aRef =
new SfxItemPropertySetInfo( m_aPropSet.getPropertyMap() );
return aRef;
@@ -3907,3 +3861,5 @@ void SAL_CALL ScChart2EmptyDataSequence::removeVetoableChangeListener(
// return pRet;
// }
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx
index 86f59d66a7a4..0212ea15dff3 100644
--- a/sc/source/ui/unoobj/chartuno.cxx
+++ b/sc/source/ui/unoobj/chartuno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -54,7 +55,6 @@
#include "undodat.hxx"
#include "chartarr.hxx"
#include "chartlis.hxx"
-#include "unoguard.hxx"
#include "chart2uno.hxx"
#include "convuno.hxx"
@@ -185,7 +185,7 @@ void SAL_CALL ScChartsObj::addNewByName( const rtl::OUString& aName,
sal_Bool bColumnHeaders, sal_Bool bRowHeaders )
throw(::com::sun::star::uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (!pDocShell)
return;
@@ -309,7 +309,7 @@ void SAL_CALL ScChartsObj::addNewByName( const rtl::OUString& aName,
void SAL_CALL ScChartsObj::removeByName( const rtl::OUString& aName )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aNameString(aName);
SdrOle2Obj* pObj = lcl_FindChartObj( pDocShell, nTab, aNameString );
if (pObj)
@@ -330,7 +330,7 @@ void SAL_CALL ScChartsObj::removeByName( const rtl::OUString& aName )
uno::Reference<container::XEnumeration> SAL_CALL ScChartsObj::createEnumeration()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScIndexEnumeration(this, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.table.TableChartsEnumeration")));
}
@@ -338,7 +338,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScChartsObj::createEnumeration(
sal_Int32 SAL_CALL ScChartsObj::getCount() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
INT32 nCount = 0;
if ( pDocShell )
{
@@ -368,7 +368,7 @@ uno::Any SAL_CALL ScChartsObj::getByIndex( sal_Int32 nIndex )
throw(lang::IndexOutOfBoundsException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<table::XTableChart> xChart(GetObjectByIndex_Impl(nIndex));
if (xChart.is())
return uno::makeAny(xChart);
@@ -379,13 +379,13 @@ uno::Any SAL_CALL ScChartsObj::getByIndex( sal_Int32 nIndex )
uno::Type SAL_CALL ScChartsObj::getElementType() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return getCppuType((uno::Reference<table::XTableChart>*)0);
}
sal_Bool SAL_CALL ScChartsObj::hasElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return getCount() != 0;
}
@@ -393,7 +393,7 @@ uno::Any SAL_CALL ScChartsObj::getByName( const rtl::OUString& aName )
throw(container::NoSuchElementException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<table::XTableChart> xChart(GetObjectByName_Impl(aName));
if (xChart.is())
return uno::makeAny(xChart);
@@ -404,7 +404,7 @@ uno::Any SAL_CALL ScChartsObj::getByName( const rtl::OUString& aName )
uno::Sequence<rtl::OUString> SAL_CALL ScChartsObj::getElementNames() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
{
ScDocument* pDoc = pDocShell->GetDocument();
@@ -449,7 +449,7 @@ uno::Sequence<rtl::OUString> SAL_CALL ScChartsObj::getElementNames() throw(uno::
sal_Bool SAL_CALL ScChartsObj::hasByName( const rtl::OUString& aName )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aNameString(aName);
return ( lcl_FindChartObj( pDocShell, nTab, aNameString ) != NULL );
}
@@ -679,7 +679,7 @@ void ScChartObj::disposing()
sal_Bool SAL_CALL ScChartObj::getHasColumnHeaders() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScRangeListRef xRanges = new ScRangeList;
bool bColHeaders, bRowHeaders;
GetData_Impl( xRanges, bColHeaders, bRowHeaders );
@@ -689,7 +689,7 @@ sal_Bool SAL_CALL ScChartObj::getHasColumnHeaders() throw(uno::RuntimeException)
void SAL_CALL ScChartObj::setHasColumnHeaders( sal_Bool bHasColumnHeaders )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScRangeListRef xRanges = new ScRangeList;
bool bOldColHeaders, bOldRowHeaders;
GetData_Impl( xRanges, bOldColHeaders, bOldRowHeaders );
@@ -699,7 +699,7 @@ void SAL_CALL ScChartObj::setHasColumnHeaders( sal_Bool bHasColumnHeaders )
sal_Bool SAL_CALL ScChartObj::getHasRowHeaders() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScRangeListRef xRanges = new ScRangeList;
bool bColHeaders, bRowHeaders;
GetData_Impl( xRanges, bColHeaders, bRowHeaders );
@@ -709,7 +709,7 @@ sal_Bool SAL_CALL ScChartObj::getHasRowHeaders() throw(uno::RuntimeException)
void SAL_CALL ScChartObj::setHasRowHeaders( sal_Bool bHasRowHeaders )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScRangeListRef xRanges = new ScRangeList;
bool bOldColHeaders, bOldRowHeaders;
GetData_Impl( xRanges, bOldColHeaders, bOldRowHeaders );
@@ -719,7 +719,7 @@ void SAL_CALL ScChartObj::setHasRowHeaders( sal_Bool bHasRowHeaders )
uno::Sequence<table::CellRangeAddress> SAL_CALL ScChartObj::getRanges() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScRangeListRef xRanges = new ScRangeList;
bool bColHeaders, bRowHeaders;
GetData_Impl( xRanges, bColHeaders, bRowHeaders );
@@ -752,7 +752,7 @@ uno::Sequence<table::CellRangeAddress> SAL_CALL ScChartObj::getRanges() throw(un
void SAL_CALL ScChartObj::setRanges( const uno::Sequence<table::CellRangeAddress>& aRanges )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScRangeListRef xOldRanges = new ScRangeList;
bool bColHeaders, bRowHeaders;
GetData_Impl( xOldRanges, bColHeaders, bRowHeaders );
@@ -779,7 +779,7 @@ void SAL_CALL ScChartObj::setRanges( const uno::Sequence<table::CellRangeAddress
uno::Reference<lang::XComponent> SAL_CALL ScChartObj::getEmbeddedObject() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
SdrOle2Obj* pObject = lcl_FindChartObj( pDocShell, nTab, aChartName );
if ( pObject && svt::EmbeddedObjectRef::TryRunningState( pObject->GetObjRef() ) )
{
@@ -794,13 +794,13 @@ uno::Reference<lang::XComponent> SAL_CALL ScChartObj::getEmbeddedObject() throw(
rtl::OUString SAL_CALL ScChartObj::getName() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return aChartName;
}
void SAL_CALL ScChartObj::setName( const rtl::OUString& /* aName */ ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
throw uno::RuntimeException(); // name cannot be changed
}
@@ -815,3 +815,4 @@ uno::Reference< beans::XPropertySetInfo > ScChartObj::getPropertySetInfo() throw
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index a680185a1d1c..a00d65061007 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,7 +33,6 @@
#include "confuno.hxx"
#include "unonames.hxx"
-#include "unoguard.hxx"
#include "scdll.hxx"
#include "docsh.hxx"
#include "miscuno.hxx"
@@ -45,6 +45,7 @@
#include <sfx2/printer.hxx>
#include <xmloff/xmluconv.hxx>
#include <rtl/ustrbuf.hxx>
+#include <vcl/svapp.hxx>
using namespace com::sun::star;
@@ -125,7 +126,7 @@ void ScDocumentConfiguration::Notify( SfxBroadcaster&, const SfxHint& rHint )
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScDocumentConfiguration::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static uno::Reference<beans::XPropertySetInfo> aRef(
new SfxItemPropertySetInfo( aPropSet.getPropertyMap() ));
return aRef;
@@ -137,7 +138,7 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if(pDocShell)
{
@@ -336,7 +337,7 @@ uno::Any SAL_CALL ScDocumentConfiguration::getPropertyValue( const rtl::OUString
throw(beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Any aRet;
if(pDocShell)
@@ -486,3 +487,4 @@ uno::Sequence<rtl::OUString> SAL_CALL ScDocumentConfiguration::getSupportedServi
//-------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/convuno.cxx b/sc/source/ui/unoobj/convuno.cxx
index e3b0c09b25c2..7781ecf6ac4a 100644
--- a/sc/source/ui/unoobj/convuno.cxx
+++ b/sc/source/ui/unoobj/convuno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -62,3 +63,4 @@ void ScUnoConversion::FillLocale( lang::Locale& rLocale, LanguageType eLang )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/cursuno.cxx b/sc/source/ui/unoobj/cursuno.cxx
index daf075964a3a..4685a4137c15 100644
--- a/sc/source/ui/unoobj/cursuno.cxx
+++ b/sc/source/ui/unoobj/cursuno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,6 +34,7 @@
#include "scitems.hxx"
#include <svl/intitem.hxx>
#include <svl/zforlist.hxx>
+#include <vcl/svapp.hxx>
#include <rtl/uuid.h>
#include "cursuno.hxx"
@@ -41,7 +43,6 @@
#include "hints.hxx"
#include "markdata.hxx"
#include "dociter.hxx"
-#include "unoguard.hxx"
#include "miscuno.hxx"
using namespace com::sun::star;
@@ -117,7 +118,7 @@ uno::Sequence<sal_Int8> SAL_CALL ScCellCursorObj::getImplementationId() throw(un
void SAL_CALL ScCellCursorObj::collapseToCurrentRegion() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
const ScRangeList& rRanges = GetRangeList();
DBG_ASSERT( rRanges.Count() == 1, "Range? Ranges?" );
ScRange aOneRange(*rRanges.GetObject(0));
@@ -142,7 +143,7 @@ void SAL_CALL ScCellCursorObj::collapseToCurrentRegion() throw(uno::RuntimeExcep
void SAL_CALL ScCellCursorObj::collapseToCurrentArray() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
const ScRangeList& rRanges = GetRangeList();
DBG_ASSERT( rRanges.Count() == 1, "Range? Ranges?" );
ScRange aOneRange(*rRanges.GetObject(0));
@@ -174,7 +175,7 @@ void SAL_CALL ScCellCursorObj::collapseToCurrentArray() throw(uno::RuntimeExcept
void SAL_CALL ScCellCursorObj::collapseToMergedArea() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -192,7 +193,7 @@ void SAL_CALL ScCellCursorObj::collapseToMergedArea() throw(uno::RuntimeExceptio
void SAL_CALL ScCellCursorObj::expandToEntireColumns() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
const ScRangeList& rRanges = GetRangeList();
DBG_ASSERT( rRanges.Count() == 1, "Range? Ranges?" );
ScRange aNewRange(*rRanges.GetObject(0));
@@ -205,7 +206,7 @@ void SAL_CALL ScCellCursorObj::expandToEntireColumns() throw(uno::RuntimeExcepti
void SAL_CALL ScCellCursorObj::expandToEntireRows() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
const ScRangeList& rRanges = GetRangeList();
DBG_ASSERT( rRanges.Count() == 1, "Range? Ranges?" );
ScRange aNewRange(*rRanges.GetObject(0));
@@ -219,7 +220,7 @@ void SAL_CALL ScCellCursorObj::expandToEntireRows() throw(uno::RuntimeException)
void SAL_CALL ScCellCursorObj::collapseToSize( sal_Int32 nColumns, sal_Int32 nRows )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( nColumns <= 0 || nRows <= 0 )
{
DBG_ERROR("leerer Range geht nicht");
@@ -255,7 +256,7 @@ void SAL_CALL ScCellCursorObj::collapseToSize( sal_Int32 nColumns, sal_Int32 nRo
void SAL_CALL ScCellCursorObj::gotoStartOfUsedArea( sal_Bool bExpand )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -283,7 +284,7 @@ void SAL_CALL ScCellCursorObj::gotoStartOfUsedArea( sal_Bool bExpand )
void SAL_CALL ScCellCursorObj::gotoEndOfUsedArea( sal_Bool bExpand )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
@@ -315,7 +316,7 @@ void SAL_CALL ScCellCursorObj::gotoStart() throw(uno::RuntimeException)
// this is similar to collapseToCurrentRegion
//! something like gotoEdge with 4 possible directions is needed
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
const ScRangeList& rRanges = GetRangeList();
DBG_ASSERT( rRanges.Count() == 1, "Range? Ranges?" );
ScRange aOneRange(*rRanges.GetObject(0));
@@ -343,7 +344,7 @@ void SAL_CALL ScCellCursorObj::gotoEnd() throw(uno::RuntimeException)
// this is similar to collapseToCurrentRegion
//! something like gotoEdge with 4 possible directions is needed
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
const ScRangeList& rRanges = GetRangeList();
DBG_ASSERT( rRanges.Count() == 1, "Range? Ranges?" );
ScRange aOneRange(*rRanges.GetObject(0));
@@ -368,7 +369,7 @@ void SAL_CALL ScCellCursorObj::gotoEnd() throw(uno::RuntimeException)
void SAL_CALL ScCellCursorObj::gotoNext() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
const ScRangeList& rRanges = GetRangeList();
DBG_ASSERT( rRanges.Count() == 1, "Range? Ranges?" );
ScRange aOneRange(*rRanges.GetObject(0));
@@ -390,7 +391,7 @@ void SAL_CALL ScCellCursorObj::gotoNext() throw(uno::RuntimeException)
void SAL_CALL ScCellCursorObj::gotoPrevious() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
const ScRangeList& rRanges = GetRangeList();
DBG_ASSERT( rRanges.Count() == 1, "Range? Ranges?" );
ScRange aOneRange(*rRanges.GetObject(0));
@@ -413,7 +414,7 @@ void SAL_CALL ScCellCursorObj::gotoPrevious() throw(uno::RuntimeException)
void SAL_CALL ScCellCursorObj::gotoOffset( sal_Int32 nColumnOffset, sal_Int32 nRowOffset )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
const ScRangeList& rRanges = GetRangeList();
DBG_ASSERT( rRanges.Count() == 1, "Range? Ranges?" );
ScRange aOneRange(*rRanges.GetObject(0));
@@ -439,7 +440,7 @@ void SAL_CALL ScCellCursorObj::gotoOffset( sal_Int32 nColumnOffset, sal_Int32 nR
uno::Reference<sheet::XSpreadsheet> SAL_CALL ScCellCursorObj::getSpreadsheet()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ScCellRangeObj::getSpreadsheet();
}
@@ -449,7 +450,7 @@ uno::Reference<table::XCell> SAL_CALL ScCellCursorObj::getCellByPosition(
sal_Int32 nColumn, sal_Int32 nRow )
throw(lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ScCellRangeObj::getCellByPosition(nColumn,nRow);
}
@@ -457,14 +458,14 @@ uno::Reference<table::XCellRange> SAL_CALL ScCellCursorObj::getCellRangeByPositi
sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom )
throw(lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ScCellRangeObj::getCellRangeByPosition(nLeft,nTop,nRight,nBottom);
}
uno::Reference<table::XCellRange> SAL_CALL ScCellCursorObj::getCellRangeByName(
const rtl::OUString& rRange ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ScCellRangeObj::getCellRangeByName(rRange);
}
@@ -508,3 +509,4 @@ uno::Sequence<rtl::OUString> SAL_CALL ScCellCursorObj::getSupportedServiceNames(
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index c7bf89671161..fc3aa7583552 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,6 +31,7 @@
#include <algorithm>
#include <svl/smplhint.hxx>
+#include <vcl/svapp.hxx>
#include <rtl/uuid.h>
#include "dapiuno.hxx"
@@ -40,7 +42,6 @@
#include "tabvwsh.hxx"
#include "pivot.hxx"
#include "rangeutl.hxx"
-#include "unoguard.hxx"
#include "dpobject.hxx"
#include "dpshttab.hxx"
#include "dpsdbtab.hxx"
@@ -375,7 +376,7 @@ ScDataPilotTableObj* ScDataPilotTablesObj::GetObjectByName_Impl(const OUString&
Reference<XDataPilotDescriptor> SAL_CALL ScDataPilotTablesObj::createDataPilotDescriptor()
throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
return new ScDataPilotDescriptor(pDocShell);
return NULL;
@@ -423,7 +424,7 @@ void SAL_CALL ScDataPilotTablesObj::insertNewByName( const OUString& aNewName,
const Reference<XDataPilotDescriptor>& xDescriptor )
throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (!xDescriptor.is()) return;
// inserting with already existing name?
@@ -462,7 +463,7 @@ void SAL_CALL ScDataPilotTablesObj::insertNewByName( const OUString& aNewName,
void SAL_CALL ScDataPilotTablesObj::removeByName( const OUString& aName )
throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aNameStr(aName);
ScDPObject* pDPObj = lcl_GetDPObject( pDocShell, nTab, aNameStr );
if (pDPObj && pDocShell)
@@ -478,7 +479,7 @@ void SAL_CALL ScDataPilotTablesObj::removeByName( const OUString& aName )
Reference< XEnumeration > SAL_CALL ScDataPilotTablesObj::createEnumeration() throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScIndexEnumeration(this, OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.DataPilotTablesEnumeration")));
}
@@ -486,7 +487,7 @@ Reference< XEnumeration > SAL_CALL ScDataPilotTablesObj::createEnumeration() thr
sal_Int32 SAL_CALL ScDataPilotTablesObj::getCount() throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( pDocShell )
{
ScDocument* pDoc = pDocShell->GetDocument();
@@ -515,7 +516,7 @@ sal_Int32 SAL_CALL ScDataPilotTablesObj::getCount() throw(RuntimeException)
Any SAL_CALL ScDataPilotTablesObj::getByIndex( sal_Int32 nIndex )
throw(IndexOutOfBoundsException, WrappedTargetException, RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
Reference<XDataPilotTable2> xTable(GetObjectByIndex_Impl(nIndex));
if (!xTable.is())
throw IndexOutOfBoundsException();
@@ -524,13 +525,13 @@ Any SAL_CALL ScDataPilotTablesObj::getByIndex( sal_Int32 nIndex )
uno::Type SAL_CALL ScDataPilotTablesObj::getElementType() throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return getCppuType((Reference<XDataPilotTable2>*)0);
}
sal_Bool SAL_CALL ScDataPilotTablesObj::hasElements() throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ( getCount() != 0 );
}
@@ -539,7 +540,7 @@ sal_Bool SAL_CALL ScDataPilotTablesObj::hasElements() throw(RuntimeException)
Any SAL_CALL ScDataPilotTablesObj::getByName( const OUString& aName )
throw(NoSuchElementException, WrappedTargetException, RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
Reference<XDataPilotTable2> xTable(GetObjectByName_Impl(aName));
if (!xTable.is())
throw NoSuchElementException();
@@ -549,7 +550,7 @@ Any SAL_CALL ScDataPilotTablesObj::getByName( const OUString& aName )
Sequence<OUString> SAL_CALL ScDataPilotTablesObj::getElementNames()
throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
{
ScDocument* pDoc = pDocShell->GetDocument();
@@ -589,7 +590,7 @@ Sequence<OUString> SAL_CALL ScDataPilotTablesObj::getElementNames()
sal_Bool SAL_CALL ScDataPilotTablesObj::hasByName( const OUString& aName )
throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
{
ScDocument* pDoc = pDocShell->GetDocument();
@@ -698,7 +699,7 @@ void ScDataPilotDescriptorBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
CellRangeAddress SAL_CALL ScDataPilotDescriptorBase::getSourceRange()
throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDPObject* pDPObject(GetDPObject());
if (!pDPObject)
@@ -712,7 +713,7 @@ CellRangeAddress SAL_CALL ScDataPilotDescriptorBase::getSourceRange()
void SAL_CALL ScDataPilotDescriptorBase::setSourceRange( const CellRangeAddress& aSourceRange ) throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDPObject* pDPObject = GetDPObject();
if (!pDPObject)
@@ -729,49 +730,49 @@ void SAL_CALL ScDataPilotDescriptorBase::setSourceRange( const CellRangeAddress&
Reference<XSheetFilterDescriptor> SAL_CALL ScDataPilotDescriptorBase::getFilterDescriptor()
throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScDataPilotFilterDescriptor( pDocShell, this );
}
Reference<XIndexAccess> SAL_CALL ScDataPilotDescriptorBase::getDataPilotFields()
throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScDataPilotFieldsObj( *this );
}
Reference<XIndexAccess> SAL_CALL ScDataPilotDescriptorBase::getColumnFields()
throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScDataPilotFieldsObj( *this, DataPilotFieldOrientation_COLUMN );
}
Reference<XIndexAccess> SAL_CALL ScDataPilotDescriptorBase::getRowFields()
throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScDataPilotFieldsObj( *this, DataPilotFieldOrientation_ROW );
}
Reference<XIndexAccess> SAL_CALL ScDataPilotDescriptorBase::getPageFields()
throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScDataPilotFieldsObj( *this, DataPilotFieldOrientation_PAGE );
}
Reference<XIndexAccess> SAL_CALL ScDataPilotDescriptorBase::getDataFields()
throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScDataPilotFieldsObj( *this, DataPilotFieldOrientation_DATA );
}
Reference<XIndexAccess> SAL_CALL ScDataPilotDescriptorBase::getHiddenFields()
throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScDataPilotFieldsObj( *this, DataPilotFieldOrientation_HIDDEN );
}
@@ -779,7 +780,7 @@ Reference<XIndexAccess> SAL_CALL ScDataPilotDescriptorBase::getHiddenFields()
Reference< XPropertySetInfo > SAL_CALL ScDataPilotDescriptorBase::getPropertySetInfo( )
throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static Reference<XPropertySetInfo> aRef =
new SfxItemPropertySetInfo( maPropSet.getPropertyMap() );
return aRef;
@@ -789,7 +790,7 @@ void SAL_CALL ScDataPilotDescriptorBase::setPropertyValue( const OUString& aProp
throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException,
WrappedTargetException, RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDPObject* pDPObject = GetDPObject();
if (pDPObject)
{
@@ -930,7 +931,7 @@ void SAL_CALL ScDataPilotDescriptorBase::setPropertyValue( const OUString& aProp
Any SAL_CALL ScDataPilotDescriptorBase::getPropertyValue( const OUString& aPropertyName )
throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
Any aRet;
ScDPObject* pDPObject(GetDPObject());
@@ -1060,7 +1061,7 @@ void SAL_CALL ScDataPilotDescriptorBase::removeVetoableChangeListener(
Reference< XDataPilotField > SAL_CALL ScDataPilotDescriptorBase::getDataLayoutField() throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if( ScDPObject* pDPObject = GetDPObject() )
{
if( ScDPSaveData* pSaveData = pDPObject->GetSaveData() )
@@ -1206,7 +1207,7 @@ void ScDataPilotTableObj::SetDPObject( ScDPObject* pDPObject )
OUString SAL_CALL ScDataPilotTableObj::getName() throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDPObject* pDPObj = lcl_GetDPObject(GetDocShell(), nTab, aName);
if (pDPObj)
return pDPObj->GetName();
@@ -1216,7 +1217,7 @@ OUString SAL_CALL ScDataPilotTableObj::getName() throw(RuntimeException)
void SAL_CALL ScDataPilotTableObj::setName( const OUString& aNewName )
throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDPObject* pDPObj = lcl_GetDPObject(GetDocShell(), nTab, aName);
if (pDPObj)
{
@@ -1233,7 +1234,7 @@ void SAL_CALL ScDataPilotTableObj::setName( const OUString& aNewName )
OUString SAL_CALL ScDataPilotTableObj::getTag() throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDPObject* pDPObj = lcl_GetDPObject(GetDocShell(), nTab, aName);
if (pDPObj)
return pDPObj->GetTag();
@@ -1243,7 +1244,7 @@ OUString SAL_CALL ScDataPilotTableObj::getTag() throw(RuntimeException)
void SAL_CALL ScDataPilotTableObj::setTag( const OUString& aNewTag )
throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDPObject* pDPObj = lcl_GetDPObject(GetDocShell(), nTab, aName);
if (pDPObj)
{
@@ -1259,7 +1260,7 @@ void SAL_CALL ScDataPilotTableObj::setTag( const OUString& aNewTag )
CellRangeAddress SAL_CALL ScDataPilotTableObj::getOutputRange() throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
CellRangeAddress aRet;
ScDPObject* pDPObj = lcl_GetDPObject(GetDocShell(), nTab, aName);
if (pDPObj)
@@ -1278,7 +1279,7 @@ ULONG RefreshDPObject( ScDPObject *pDPObj, ScDocument *pDoc, ScDocShell *pDocSh,
void SAL_CALL ScDataPilotTableObj::refresh() throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if( ScDPObject* pDPObj = lcl_GetDPObject(GetDocShell(), nTab, aName) )
RefreshDPObject( pDPObj, NULL, GetDocShell(), TRUE, TRUE );
//if (pDPObj)
@@ -1294,7 +1295,7 @@ void SAL_CALL ScDataPilotTableObj::refresh() throw(RuntimeException)
Sequence< Sequence<Any> > SAL_CALL ScDataPilotTableObj::getDrillDownData(const CellAddress& aAddr)
throw (RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
Sequence< Sequence<Any> > aTabData;
ScAddress aAddr2(static_cast<SCCOL>(aAddr.Column), static_cast<SCROW>(aAddr.Row), aAddr.Sheet);
ScDPObject* pObj = GetDPObject();
@@ -1308,7 +1309,7 @@ Sequence< Sequence<Any> > SAL_CALL ScDataPilotTableObj::getDrillDownData(const C
DataPilotTablePositionData SAL_CALL ScDataPilotTableObj::getPositionData(const CellAddress& aAddr)
throw (RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
DataPilotTablePositionData aPosData;
ScAddress aAddr2(static_cast<SCCOL>(aAddr.Column), static_cast<SCROW>(aAddr.Row), aAddr.Sheet);
ScDPObject* pObj = GetDPObject();
@@ -1322,7 +1323,7 @@ DataPilotTablePositionData SAL_CALL ScDataPilotTableObj::getPositionData(const C
void SAL_CALL ScDataPilotTableObj::insertDrillDownSheet(const CellAddress& aAddr)
throw (RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDPObject* pDPObj = GetDPObject();
if (!pDPObj)
throw RuntimeException();
@@ -1336,7 +1337,7 @@ void SAL_CALL ScDataPilotTableObj::insertDrillDownSheet(const CellAddress& aAddr
CellRangeAddress SAL_CALL ScDataPilotTableObj::getOutputRangeByType( sal_Int32 nType )
throw (IllegalArgumentException, RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (nType < 0 || nType > DataPilotOutputRangeType::RESULT)
throw IllegalArgumentException();
@@ -1349,7 +1350,7 @@ CellRangeAddress SAL_CALL ScDataPilotTableObj::getOutputRangeByType( sal_Int32 n
void SAL_CALL ScDataPilotTableObj::addModifyListener( const uno::Reference<util::XModifyListener>& aListener )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<util::XModifyListener> *pObj = new uno::Reference<util::XModifyListener>( aListener );
aModifyListeners.Insert( pObj, aModifyListeners.Count() );
@@ -1363,7 +1364,7 @@ void SAL_CALL ScDataPilotTableObj::addModifyListener( const uno::Reference<util:
void SAL_CALL ScDataPilotTableObj::removeModifyListener( const uno::Reference<util::XModifyListener>& aListener )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
acquire(); // in case the listeners have the last ref - released below
@@ -1453,27 +1454,27 @@ void ScDataPilotDescriptor::SetDPObject( ScDPObject* pDPObject )
OUString SAL_CALL ScDataPilotDescriptor::getName() throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return mpDPObject->GetName();
}
void SAL_CALL ScDataPilotDescriptor::setName( const OUString& aNewName )
throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
mpDPObject->SetName( aNewName );
}
OUString SAL_CALL ScDataPilotDescriptor::getTag() throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return mpDPObject->GetTag();
}
void SAL_CALL ScDataPilotDescriptor::setTag( const OUString& aNewTag )
throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
mpDPObject->SetTag( aNewTag );
}
@@ -1739,7 +1740,7 @@ ScDataPilotFieldObj* ScDataPilotFieldsObj::GetObjectByName_Impl(const OUString&
Reference<XEnumeration> SAL_CALL ScDataPilotFieldsObj::createEnumeration()
throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScIndexEnumeration(this, OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.DataPilotFieldsEnumeration")));
}
@@ -1747,7 +1748,7 @@ Reference<XEnumeration> SAL_CALL ScDataPilotFieldsObj::createEnumeration()
sal_Int32 SAL_CALL ScDataPilotFieldsObj::getCount() throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
// TODO
ScDPObject* pDPObj = GetDPObject();
return pDPObj ? lcl_GetFieldCount( pDPObj->GetSource(), maOrient ) : 0;
@@ -1756,7 +1757,7 @@ sal_Int32 SAL_CALL ScDataPilotFieldsObj::getCount() throw(RuntimeException)
Any SAL_CALL ScDataPilotFieldsObj::getByIndex( sal_Int32 nIndex )
throw(IndexOutOfBoundsException, WrappedTargetException, RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
Reference< XPropertySet > xField( GetObjectByIndex_Impl( nIndex ) );
if (!xField.is())
throw IndexOutOfBoundsException();
@@ -1765,20 +1766,20 @@ Any SAL_CALL ScDataPilotFieldsObj::getByIndex( sal_Int32 nIndex )
uno::Type SAL_CALL ScDataPilotFieldsObj::getElementType() throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return getCppuType((Reference<XPropertySet>*)0);
}
sal_Bool SAL_CALL ScDataPilotFieldsObj::hasElements() throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ( getCount() != 0 );
}
Any SAL_CALL ScDataPilotFieldsObj::getByName( const OUString& aName )
throw(NoSuchElementException, WrappedTargetException, RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
Reference<XPropertySet> xField(GetObjectByName_Impl(aName));
if (!xField.is())
throw NoSuchElementException();
@@ -1788,7 +1789,7 @@ Any SAL_CALL ScDataPilotFieldsObj::getByName( const OUString& aName )
Sequence<OUString> SAL_CALL ScDataPilotFieldsObj::getElementNames()
throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
// TODO
if (ScDPObject* pDPObj = GetDPObject())
{
@@ -1813,7 +1814,7 @@ Sequence<OUString> SAL_CALL ScDataPilotFieldsObj::getElementNames()
sal_Bool SAL_CALL ScDataPilotFieldsObj::hasByName( const OUString& aName )
throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return GetObjectByName_Impl(aName) != NULL;
}
@@ -1843,7 +1844,7 @@ ScDataPilotFieldObj::~ScDataPilotFieldObj()
OUString SAL_CALL ScDataPilotFieldObj::getName() throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
OUString aName;
if( ScDPSaveDimension* pDim = GetDPDimension() )
{
@@ -1862,7 +1863,7 @@ OUString SAL_CALL ScDataPilotFieldObj::getName() throw(RuntimeException)
void SAL_CALL ScDataPilotFieldObj::setName( const OUString& rName ) throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDPObject* pDPObj = 0;
ScDPSaveDimension* pDim = GetDPDimension( &pDPObj );
if( pDim && !pDim->IsDataLayout() )
@@ -1878,7 +1879,7 @@ void SAL_CALL ScDataPilotFieldObj::setName( const OUString& rName ) throw(Runtim
Reference<XPropertySetInfo> SAL_CALL ScDataPilotFieldObj::getPropertySetInfo()
throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static Reference<XPropertySetInfo> aRef(
new SfxItemPropertySetInfo( maPropSet.getPropertyMap() ));
return aRef;
@@ -1887,7 +1888,7 @@ Reference<XPropertySetInfo> SAL_CALL ScDataPilotFieldObj::getPropertySetInfo()
void SAL_CALL ScDataPilotFieldObj::setPropertyValue( const OUString& aPropertyName, const Any& aValue )
throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aNameString(aPropertyName);
if ( aNameString.EqualsAscii( SC_UNONAME_FUNCTION ) )
{
@@ -1983,7 +1984,7 @@ void SAL_CALL ScDataPilotFieldObj::setPropertyValue( const OUString& aPropertyNa
Any SAL_CALL ScDataPilotFieldObj::getPropertyValue( const OUString& aPropertyName )
throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aNameString(aPropertyName);
Any aRet;
@@ -2046,7 +2047,7 @@ Any SAL_CALL ScDataPilotFieldObj::getPropertyValue( const OUString& aPropertyNam
Reference<XIndexAccess> SAL_CALL ScDataPilotFieldObj::getItems()
throw (RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (!mxItems.is())
mxItems.set( new ScDataPilotItemsObj( mrParent, maFieldId ) );
return mxItems;
@@ -2056,14 +2057,14 @@ SC_IMPL_DUMMY_PROPERTY_LISTENER( ScDataPilotFieldObj )
DataPilotFieldOrientation ScDataPilotFieldObj::getOrientation() const
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDPSaveDimension* pDim = GetDPDimension();
return pDim ? static_cast< DataPilotFieldOrientation >( pDim->GetOrientation() ) : DataPilotFieldOrientation_HIDDEN;
}
void ScDataPilotFieldObj::setOrientation(DataPilotFieldOrientation eNew)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (maOrient.hasValue() && (eNew == maOrient.get< DataPilotFieldOrientation >()))
return;
@@ -2120,7 +2121,7 @@ void ScDataPilotFieldObj::setOrientation(DataPilotFieldOrientation eNew)
GeneralFunction ScDataPilotFieldObj::getFunction() const
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
GeneralFunction eRet = GeneralFunction_NONE;
if( ScDPSaveDimension* pDim = GetDPDimension() )
{
@@ -2140,7 +2141,7 @@ GeneralFunction ScDataPilotFieldObj::getFunction() const
void ScDataPilotFieldObj::setFunction(GeneralFunction eNewFunc)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDPObject* pDPObj = 0;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
@@ -2163,7 +2164,7 @@ void ScDataPilotFieldObj::setFunction(GeneralFunction eNewFunc)
Sequence< GeneralFunction > ScDataPilotFieldObj::getSubtotals() const
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
Sequence< GeneralFunction > aRet;
if( ScDPSaveDimension* pDim = GetDPDimension() )
{
@@ -2184,7 +2185,7 @@ Sequence< GeneralFunction > ScDataPilotFieldObj::getSubtotals() const
void ScDataPilotFieldObj::setSubtotals( const Sequence< GeneralFunction >& rSubtotals )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDPObject* pDPObj = 0;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
@@ -2230,7 +2231,7 @@ void ScDataPilotFieldObj::setSubtotals( const Sequence< GeneralFunction >& rSubt
OUString ScDataPilotFieldObj::getCurrentPage() const
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDPSaveDimension* pDim = GetDPDimension();
if( pDim && pDim->HasCurrentPage() )
return pDim->GetCurrentPage();
@@ -2239,7 +2240,7 @@ OUString ScDataPilotFieldObj::getCurrentPage() const
void ScDataPilotFieldObj::setCurrentPage( const OUString& rPage )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDPObject* pDPObj = 0;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
@@ -2251,14 +2252,14 @@ void ScDataPilotFieldObj::setCurrentPage( const OUString& rPage )
sal_Bool ScDataPilotFieldObj::getUseCurrentPage() const
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDPSaveDimension* pDim = GetDPDimension();
return pDim && pDim->HasCurrentPage();
}
void ScDataPilotFieldObj::setUseCurrentPage( sal_Bool bUse )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDPObject* pDPObj = 0;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
@@ -2280,14 +2281,14 @@ void ScDataPilotFieldObj::setUseCurrentPage( sal_Bool bUse )
const DataPilotFieldAutoShowInfo* ScDataPilotFieldObj::getAutoShowInfo()
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDPSaveDimension* pDim = GetDPDimension();
return pDim ? pDim->GetAutoShowInfo() : 0;
}
void ScDataPilotFieldObj::setAutoShowInfo( const DataPilotFieldAutoShowInfo* pInfo )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDPObject* pDPObj = 0;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
@@ -2298,14 +2299,14 @@ void ScDataPilotFieldObj::setAutoShowInfo( const DataPilotFieldAutoShowInfo* pIn
const DataPilotFieldLayoutInfo* ScDataPilotFieldObj::getLayoutInfo()
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDPSaveDimension* pDim = GetDPDimension();
return pDim ? pDim->GetLayoutInfo() : 0;
}
void ScDataPilotFieldObj::setLayoutInfo( const DataPilotFieldLayoutInfo* pInfo )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDPObject* pDPObj = 0;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
@@ -2316,14 +2317,14 @@ void ScDataPilotFieldObj::setLayoutInfo( const DataPilotFieldLayoutInfo* pInfo )
const DataPilotFieldReference* ScDataPilotFieldObj::getReference()
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDPSaveDimension* pDim = GetDPDimension();
return pDim ? pDim->GetReferenceValue() : 0;
}
void ScDataPilotFieldObj::setReference( const DataPilotFieldReference* pInfo )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDPObject* pDPObj = 0;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
@@ -2334,14 +2335,14 @@ void ScDataPilotFieldObj::setReference( const DataPilotFieldReference* pInfo )
const DataPilotFieldSortInfo* ScDataPilotFieldObj::getSortInfo()
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDPSaveDimension* pDim = GetDPDimension();
return pDim ? pDim->GetSortInfo() : 0;
}
void ScDataPilotFieldObj::setSortInfo( const DataPilotFieldSortInfo* pInfo )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDPObject* pDPObj = 0;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
@@ -2352,14 +2353,14 @@ void ScDataPilotFieldObj::setSortInfo( const DataPilotFieldSortInfo* pInfo )
sal_Bool ScDataPilotFieldObj::getShowEmpty() const
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDPSaveDimension* pDim = GetDPDimension();
return pDim && pDim->GetShowEmpty();
}
void ScDataPilotFieldObj::setShowEmpty( sal_Bool bShow )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDPObject* pDPObj = 0;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
@@ -2370,7 +2371,7 @@ void ScDataPilotFieldObj::setShowEmpty( sal_Bool bShow )
sal_Bool ScDataPilotFieldObj::hasGroupInfo()
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDPObject* pDPObj = 0;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
if( const ScDPDimensionSaveData* pDimData = pDPObj->GetSaveData()->GetExistingDimensionData() )
@@ -2380,7 +2381,7 @@ sal_Bool ScDataPilotFieldObj::hasGroupInfo()
DataPilotFieldGroupInfo ScDataPilotFieldObj::getGroupInfo()
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
DataPilotFieldGroupInfo aInfo;
ScDPObject* pDPObj = 0;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
@@ -2441,7 +2442,7 @@ DataPilotFieldGroupInfo ScDataPilotFieldObj::getGroupInfo()
void ScDataPilotFieldObj::setGroupInfo( const DataPilotFieldGroupInfo* pInfo )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDPObject* pDPObj = 0;
if( /*ScDPSaveDimension* pDim =*/ GetDPDimension( &pDPObj ) )
{
@@ -2550,7 +2551,7 @@ sal_Bool ScDataPilotFieldObj::HasString(const Sequence< OUString >& rItems, cons
Reference< XDataPilotField > SAL_CALL ScDataPilotFieldObj::createNameGroup( const Sequence< OUString >& rItems )
throw (RuntimeException, IllegalArgumentException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
Reference< XDataPilotField > xRet;
OUString sNewDim;
@@ -2714,7 +2715,7 @@ Reference< XDataPilotField > SAL_CALL ScDataPilotFieldObj::createNameGroup( cons
Reference < XDataPilotField > SAL_CALL ScDataPilotFieldObj::createDateGroup( const DataPilotFieldGroupInfo& rInfo )
throw (RuntimeException, IllegalArgumentException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
using namespace ::com::sun::star::sheet::DataPilotFieldGroupBy;
// check min/max/step, HasDateValues must be set always
@@ -2883,7 +2884,7 @@ ScDataPilotFieldGroupsObj::~ScDataPilotFieldGroupsObj()
Any SAL_CALL ScDataPilotFieldGroupsObj::getByName( const OUString& rName )
throw(NoSuchElementException, WrappedTargetException, RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if( implFindByName( rName ) == maGroups.end() )
throw NoSuchElementException();
return Any( Reference< XNameAccess >( new ScDataPilotFieldGroupObj( *this, rName ) ) );
@@ -2891,7 +2892,7 @@ Any SAL_CALL ScDataPilotFieldGroupsObj::getByName( const OUString& rName )
Sequence< OUString > SAL_CALL ScDataPilotFieldGroupsObj::getElementNames() throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
Sequence< OUString > aSeq;
if( !maGroups.empty() )
{
@@ -2905,7 +2906,7 @@ Sequence< OUString > SAL_CALL ScDataPilotFieldGroupsObj::getElementNames() throw
sal_Bool SAL_CALL ScDataPilotFieldGroupsObj::hasByName( const OUString& rName ) throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return implFindByName( rName ) != maGroups.end();
}
@@ -2914,7 +2915,7 @@ sal_Bool SAL_CALL ScDataPilotFieldGroupsObj::hasByName( const OUString& rName )
void SAL_CALL ScDataPilotFieldGroupsObj::replaceByName( const OUString& rName, const Any& rElement )
throw (IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if( rName.getLength() == 0 )
throw IllegalArgumentException();
@@ -2937,7 +2938,7 @@ void SAL_CALL ScDataPilotFieldGroupsObj::replaceByName( const OUString& rName, c
void SAL_CALL ScDataPilotFieldGroupsObj::insertByName( const OUString& rName, const Any& rElement )
throw (IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if( rName.getLength() == 0 )
throw IllegalArgumentException();
@@ -2961,7 +2962,7 @@ void SAL_CALL ScDataPilotFieldGroupsObj::insertByName( const OUString& rName, co
void SAL_CALL ScDataPilotFieldGroupsObj::removeByName( const OUString& rName )
throw (NoSuchElementException, WrappedTargetException, RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if( rName.getLength() == 0 )
throw IllegalArgumentException();
@@ -2977,14 +2978,14 @@ void SAL_CALL ScDataPilotFieldGroupsObj::removeByName( const OUString& rName )
sal_Int32 SAL_CALL ScDataPilotFieldGroupsObj::getCount() throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return static_cast< sal_Int32 >( maGroups.size() );
}
Any SAL_CALL ScDataPilotFieldGroupsObj::getByIndex( sal_Int32 nIndex )
throw(IndexOutOfBoundsException, WrappedTargetException, RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ((nIndex < 0) || (nIndex >= static_cast< sal_Int32 >( maGroups.size() )))
throw IndexOutOfBoundsException();
return Any( Reference< XNameAccess >( new ScDataPilotFieldGroupObj( *this, maGroups[ nIndex ].maName ) ) );
@@ -2994,7 +2995,7 @@ Any SAL_CALL ScDataPilotFieldGroupsObj::getByIndex( sal_Int32 nIndex )
Reference<XEnumeration> SAL_CALL ScDataPilotFieldGroupsObj::createEnumeration() throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScIndexEnumeration( this, OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sheet.DataPilotFieldGroupsEnumeration" ) ) );
}
@@ -3002,13 +3003,13 @@ Reference<XEnumeration> SAL_CALL ScDataPilotFieldGroupsObj::createEnumeration()
uno::Type SAL_CALL ScDataPilotFieldGroupsObj::getElementType() throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return getCppuType( (Reference< XNameAccess >*)0 );
}
sal_Bool SAL_CALL ScDataPilotFieldGroupsObj::hasElements() throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return !maGroups.empty();
}
@@ -3016,7 +3017,7 @@ sal_Bool SAL_CALL ScDataPilotFieldGroupsObj::hasElements() throw(RuntimeExceptio
ScFieldGroup& ScDataPilotFieldGroupsObj::getFieldGroup( const OUString& rName ) throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScFieldGroups::iterator aIt = implFindByName( rName );
if( aIt == maGroups.end() )
throw RuntimeException();
@@ -3025,7 +3026,7 @@ ScFieldGroup& ScDataPilotFieldGroupsObj::getFieldGroup( const OUString& rName )
void ScDataPilotFieldGroupsObj::renameFieldGroup( const OUString& rOldName, const OUString& rNewName ) throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScFieldGroups::iterator aOldIt = implFindByName( rOldName );
ScFieldGroups::iterator aNewIt = implFindByName( rNewName );
// new name must not exist yet
@@ -3081,7 +3082,7 @@ ScDataPilotFieldGroupObj::~ScDataPilotFieldGroupObj()
Any SAL_CALL ScDataPilotFieldGroupObj::getByName( const OUString& rName )
throw(NoSuchElementException, WrappedTargetException, RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScFieldGroupMembers& rMembers = mrParent.getFieldGroup( maGroupName ).maMembers;
ScFieldGroupMembers::iterator aIt = ::std::find( rMembers.begin(), rMembers.end(), rName );
if( aIt == rMembers.end() )
@@ -3091,13 +3092,13 @@ Any SAL_CALL ScDataPilotFieldGroupObj::getByName( const OUString& rName )
Sequence< OUString > SAL_CALL ScDataPilotFieldGroupObj::getElementNames() throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ::comphelper::containerToSequence( mrParent.getFieldGroup( maGroupName ).maMembers );
}
sal_Bool SAL_CALL ScDataPilotFieldGroupObj::hasByName( const OUString& rName ) throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScFieldGroupMembers& rMembers = mrParent.getFieldGroup( maGroupName ).maMembers;
return ::std::find( rMembers.begin(), rMembers.end(), rName ) != rMembers.end();
}
@@ -3107,7 +3108,7 @@ sal_Bool SAL_CALL ScDataPilotFieldGroupObj::hasByName( const OUString& rName ) t
void SAL_CALL ScDataPilotFieldGroupObj::replaceByName( const OUString& rName, const Any& rElement )
throw (IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
// it should be possible to quickly rename an item -> accept string or XNamed
OUString aNewName = lclExtractMember( rElement );
@@ -3133,7 +3134,7 @@ void SAL_CALL ScDataPilotFieldGroupObj::replaceByName( const OUString& rName, co
void SAL_CALL ScDataPilotFieldGroupObj::insertByName( const OUString& rName, const Any& /*rElement*/ )
throw (IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
// we will ignore the passed element and just try to insert the name
if( rName.getLength() == 0 )
@@ -3150,7 +3151,7 @@ void SAL_CALL ScDataPilotFieldGroupObj::insertByName( const OUString& rName, con
void SAL_CALL ScDataPilotFieldGroupObj::removeByName( const OUString& rName )
throw (NoSuchElementException, WrappedTargetException, RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if( rName.getLength() == 0 )
throw IllegalArgumentException();
@@ -3166,14 +3167,14 @@ void SAL_CALL ScDataPilotFieldGroupObj::removeByName( const OUString& rName )
sal_Int32 SAL_CALL ScDataPilotFieldGroupObj::getCount() throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return static_cast< sal_Int32 >( mrParent.getFieldGroup( maGroupName ).maMembers.size() );
}
Any SAL_CALL ScDataPilotFieldGroupObj::getByIndex( sal_Int32 nIndex )
throw(IndexOutOfBoundsException, WrappedTargetException, RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScFieldGroupMembers& rMembers = mrParent.getFieldGroup( maGroupName ).maMembers;
if ((nIndex < 0) || (nIndex >= static_cast< sal_Int32 >( rMembers.size() )))
throw IndexOutOfBoundsException();
@@ -3184,7 +3185,7 @@ Any SAL_CALL ScDataPilotFieldGroupObj::getByIndex( sal_Int32 nIndex )
Reference< XEnumeration > SAL_CALL ScDataPilotFieldGroupObj::createEnumeration() throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScIndexEnumeration( this, OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sheet.DataPilotFieldGroupEnumeration" ) ) );
}
@@ -3192,13 +3193,13 @@ Reference< XEnumeration > SAL_CALL ScDataPilotFieldGroupObj::createEnumeration()
uno::Type SAL_CALL ScDataPilotFieldGroupObj::getElementType() throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return getCppuType( (Reference< XNamed >*)0 );
}
sal_Bool SAL_CALL ScDataPilotFieldGroupObj::hasElements() throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return !mrParent.getFieldGroup( maGroupName ).maMembers.empty();
}
@@ -3206,13 +3207,13 @@ sal_Bool SAL_CALL ScDataPilotFieldGroupObj::hasElements() throw(RuntimeException
OUString SAL_CALL ScDataPilotFieldGroupObj::getName() throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return maGroupName;
}
void SAL_CALL ScDataPilotFieldGroupObj::setName( const OUString& rName ) throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
mrParent.renameFieldGroup( maGroupName, rName );
// if call to renameFieldGroup() did not throw, remember the new name
maGroupName = rName;
@@ -3236,13 +3237,13 @@ ScDataPilotFieldGroupItemObj::~ScDataPilotFieldGroupItemObj()
OUString SAL_CALL ScDataPilotFieldGroupItemObj::getName() throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return maName;
}
void SAL_CALL ScDataPilotFieldGroupItemObj::setName( const OUString& rName ) throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
mrParent.replaceByName( maName, Any( rName ) );
// if call to replaceByName() did not throw, remember the new name
maName = rName;
@@ -3272,7 +3273,7 @@ ScDataPilotItemObj* ScDataPilotItemsObj::GetObjectByIndex_Impl( sal_Int32 nIndex
Any SAL_CALL ScDataPilotItemsObj::getByName( const OUString& aName )
throw(NoSuchElementException, WrappedTargetException, RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
Reference<XNameAccess> xMembers = GetMembers();
if (xMembers.is())
{
@@ -3296,7 +3297,7 @@ Any SAL_CALL ScDataPilotItemsObj::getByName( const OUString& aName )
Sequence<OUString> SAL_CALL ScDataPilotItemsObj::getElementNames()
throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
Sequence< OUString > aSeq;
if( ScDPObject* pDPObj = GetDPObject() )
pDPObj->GetMemberNames( lcl_GetObjectIndex( pDPObj, maFieldId ), aSeq );
@@ -3306,7 +3307,7 @@ Sequence<OUString> SAL_CALL ScDataPilotItemsObj::getElementNames()
sal_Bool SAL_CALL ScDataPilotItemsObj::hasByName( const OUString& aName )
throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
sal_Bool bFound = sal_False;
Reference<XNameAccess> xMembers = GetMembers();
if (xMembers.is())
@@ -3331,7 +3332,7 @@ sal_Bool SAL_CALL ScDataPilotItemsObj::hasByName( const OUString& aName )
Reference<XEnumeration> SAL_CALL ScDataPilotItemsObj::createEnumeration()
throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScIndexEnumeration(this, OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.DataPilotItemsEnumeration")));
}
@@ -3339,14 +3340,14 @@ Reference<XEnumeration> SAL_CALL ScDataPilotItemsObj::createEnumeration()
sal_Int32 SAL_CALL ScDataPilotItemsObj::getCount() throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return GetMemberCount();
}
Any SAL_CALL ScDataPilotItemsObj::getByIndex( sal_Int32 nIndex )
throw(IndexOutOfBoundsException, WrappedTargetException, RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
Reference< XPropertySet > xItem( GetObjectByIndex_Impl( nIndex ) );
if (!xItem.is())
throw IndexOutOfBoundsException();
@@ -3355,13 +3356,13 @@ Any SAL_CALL ScDataPilotItemsObj::getByIndex( sal_Int32 nIndex )
uno::Type SAL_CALL ScDataPilotItemsObj::getElementType() throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return getCppuType((Reference<XPropertySet>*)0);
}
sal_Bool SAL_CALL ScDataPilotItemsObj::hasElements() throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ( getCount() != 0 );
}
@@ -3381,7 +3382,7 @@ ScDataPilotItemObj::~ScDataPilotItemObj()
// XNamed
OUString SAL_CALL ScDataPilotItemObj::getName() throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
OUString sRet;
Reference<XNameAccess> xMembers = GetMembers();
if (xMembers.is())
@@ -3407,7 +3408,7 @@ Reference< XPropertySetInfo >
SAL_CALL ScDataPilotItemObj::getPropertySetInfo( )
throw(RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static Reference<XPropertySetInfo> aRef =
new SfxItemPropertySetInfo( maPropSet.getPropertyMap() );
return aRef;
@@ -3416,7 +3417,7 @@ Reference< XPropertySetInfo >
void SAL_CALL ScDataPilotItemObj::setPropertyValue( const OUString& aPropertyName, const Any& aValue )
throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDPObject* pDPObj = 0;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
@@ -3469,7 +3470,7 @@ void SAL_CALL ScDataPilotItemObj::setPropertyValue( const OUString& aPropertyNam
Any SAL_CALL ScDataPilotItemObj::getPropertyValue( const OUString& aPropertyName )
throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
Any aRet;
if( ScDPSaveDimension* pDim = GetDPDimension() )
{
@@ -3552,3 +3553,4 @@ void SAL_CALL ScDataPilotItemObj::removeVetoableChangeListener(
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx
index 6e416764eb76..8cc00f714eab 100644
--- a/sc/source/ui/unoobj/datauno.cxx
+++ b/sc/source/ui/unoobj/datauno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,6 +35,7 @@
#include <svl/smplhint.hxx>
#include <svl/zforlist.hxx>
#include <rtl/uuid.h>
+#include <vcl/svapp.hxx>
#include <com/sun/star/awt/XBitmap.hpp>
#include <com/sun/star/util/SortField.hpp>
@@ -54,7 +56,6 @@
#include "dbcolect.hxx"
#include "docsh.hxx"
#include "dbdocfun.hxx"
-#include "unoguard.hxx"
#include "unonames.hxx"
#include "globstr.hrc"
#ifndef SC_CONVUNO_HXX
@@ -532,7 +533,7 @@ ScSubTotalFieldObj::~ScSubTotalFieldObj()
sal_Int32 SAL_CALL ScSubTotalFieldObj::getGroupColumn() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScSubTotalParam aParam;
rParent.GetData(aParam);
@@ -541,7 +542,7 @@ sal_Int32 SAL_CALL ScSubTotalFieldObj::getGroupColumn() throw(uno::RuntimeExcept
void SAL_CALL ScSubTotalFieldObj::setGroupColumn( sal_Int32 nGroupColumn ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScSubTotalParam aParam;
rParent.GetData(aParam);
@@ -553,7 +554,7 @@ void SAL_CALL ScSubTotalFieldObj::setGroupColumn( sal_Int32 nGroupColumn ) throw
uno::Sequence<sheet::SubTotalColumn> SAL_CALL ScSubTotalFieldObj::getSubTotalColumns()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScSubTotalParam aParam;
rParent.GetData(aParam);
@@ -573,7 +574,7 @@ void SAL_CALL ScSubTotalFieldObj::setSubTotalColumns(
const uno::Sequence<sheet::SubTotalColumn>& aSubTotalColumns )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScSubTotalParam aParam;
rParent.GetData(aParam);
@@ -640,7 +641,7 @@ ScSubTotalFieldObj* ScSubTotalDescriptorBase::GetObjectByIndex_Impl(USHORT nInde
void SAL_CALL ScSubTotalDescriptorBase::clear() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScSubTotalParam aParam;
GetData(aParam);
@@ -656,7 +657,7 @@ void SAL_CALL ScSubTotalDescriptorBase::addNew(
const uno::Sequence<sheet::SubTotalColumn>& aSubTotalColumns,
sal_Int32 nGroupColumn ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScSubTotalParam aParam;
GetData(aParam);
@@ -708,7 +709,7 @@ void SAL_CALL ScSubTotalDescriptorBase::addNew(
uno::Reference<container::XEnumeration> SAL_CALL ScSubTotalDescriptorBase::createEnumeration()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScIndexEnumeration(this, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.SubTotalFieldsEnumeration")));
}
@@ -716,7 +717,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScSubTotalDescriptorBase::creat
sal_Int32 SAL_CALL ScSubTotalDescriptorBase::getCount() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScSubTotalParam aParam;
GetData(aParam);
@@ -730,7 +731,7 @@ uno::Any SAL_CALL ScSubTotalDescriptorBase::getByIndex( sal_Int32 nIndex )
throw(lang::IndexOutOfBoundsException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<sheet::XSubTotalField> xField(GetObjectByIndex_Impl((USHORT)nIndex));
if (xField.is())
return uno::makeAny(xField);
@@ -741,13 +742,13 @@ uno::Any SAL_CALL ScSubTotalDescriptorBase::getByIndex( sal_Int32 nIndex )
uno::Type SAL_CALL ScSubTotalDescriptorBase::getElementType() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return getCppuType((uno::Reference<sheet::XSubTotalField>*)0);
}
sal_Bool SAL_CALL ScSubTotalDescriptorBase::hasElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ( getCount() != 0 );
}
@@ -756,7 +757,7 @@ sal_Bool SAL_CALL ScSubTotalDescriptorBase::hasElements() throw(uno::RuntimeExce
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScSubTotalDescriptorBase::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static uno::Reference<beans::XPropertySetInfo> aRef(
new SfxItemPropertySetInfo( aPropSet.getPropertyMap() ));
return aRef;
@@ -768,7 +769,7 @@ void SAL_CALL ScSubTotalDescriptorBase::setPropertyValue(
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScSubTotalParam aParam;
GetData(aParam);
@@ -810,7 +811,7 @@ uno::Any SAL_CALL ScSubTotalDescriptorBase::getPropertyValue( const rtl::OUStrin
throw(beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScSubTotalParam aParam;
GetData(aParam);
@@ -954,21 +955,21 @@ void ScConsolidationDescriptor::SetParam( const ScConsolidateParam& rNew )
sheet::GeneralFunction SAL_CALL ScConsolidationDescriptor::getFunction() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ScDataUnoConversion::SubTotalToGeneral(aParam.eFunction);
}
void SAL_CALL ScConsolidationDescriptor::setFunction( sheet::GeneralFunction nFunction )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
aParam.eFunction = ScDataUnoConversion::GeneralToSubTotal(nFunction);
}
uno::Sequence<table::CellRangeAddress> SAL_CALL ScConsolidationDescriptor::getSources()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
USHORT nCount = aParam.nDataAreaCount;
if (!aParam.ppDataAreas)
nCount = 0;
@@ -995,7 +996,7 @@ void SAL_CALL ScConsolidationDescriptor::setSources(
const uno::Sequence<table::CellRangeAddress>& aSources )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
USHORT nCount = (USHORT)aSources.getLength();
if (nCount)
{
@@ -1020,7 +1021,7 @@ void SAL_CALL ScConsolidationDescriptor::setSources(
table::CellAddress SAL_CALL ScConsolidationDescriptor::getStartOutputPosition()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
table::CellAddress aPos;
aPos.Column = aParam.nCol;
aPos.Row = aParam.nRow;
@@ -1032,7 +1033,7 @@ void SAL_CALL ScConsolidationDescriptor::setStartOutputPosition(
const table::CellAddress& aStartOutputPosition )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
aParam.nCol = (SCCOL)aStartOutputPosition.Column;
aParam.nRow = (SCROW)aStartOutputPosition.Row;
aParam.nTab = aStartOutputPosition.Sheet;
@@ -1040,40 +1041,40 @@ void SAL_CALL ScConsolidationDescriptor::setStartOutputPosition(
sal_Bool SAL_CALL ScConsolidationDescriptor::getUseColumnHeaders() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return aParam.bByCol;
}
void SAL_CALL ScConsolidationDescriptor::setUseColumnHeaders( sal_Bool bUseColumnHeaders )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
aParam.bByCol = bUseColumnHeaders;
}
sal_Bool SAL_CALL ScConsolidationDescriptor::getUseRowHeaders() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return aParam.bByRow;
}
void SAL_CALL ScConsolidationDescriptor::setUseRowHeaders( sal_Bool bUseRowHeaders )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
aParam.bByRow = bUseRowHeaders;
}
sal_Bool SAL_CALL ScConsolidationDescriptor::getInsertLinks() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return aParam.bReferenceData;
}
void SAL_CALL ScConsolidationDescriptor::setInsertLinks( sal_Bool bInsertLinks )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
aParam.bReferenceData = bInsertLinks;
}
@@ -1110,7 +1111,7 @@ void ScFilterDescriptorBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
uno::Sequence<sheet::TableFilterField> SAL_CALL ScFilterDescriptorBase::getFilterFields()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScQueryParam aParam;
GetData(aParam);
@@ -1179,7 +1180,7 @@ uno::Sequence<sheet::TableFilterField> SAL_CALL ScFilterDescriptorBase::getFilte
uno::Sequence<sheet::TableFilterField2> SAL_CALL ScFilterDescriptorBase::getFilterFields2()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScQueryParam aParam;
GetData(aParam);
@@ -1254,7 +1255,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields(
const uno::Sequence<sheet::TableFilterField>& aFilterFields )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScQueryParam aParam;
GetData(aParam);
@@ -1328,7 +1329,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields2(
const uno::Sequence<sheet::TableFilterField2>& aFilterFields )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScQueryParam aParam;
GetData(aParam);
@@ -1411,7 +1412,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields2(
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScFilterDescriptorBase::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static uno::Reference<beans::XPropertySetInfo> aRef(
new SfxItemPropertySetInfo( aPropSet.getPropertyMap() ));
return aRef;
@@ -1423,7 +1424,7 @@ void SAL_CALL ScFilterDescriptorBase::setPropertyValue(
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScQueryParam aParam;
GetData(aParam);
@@ -1473,7 +1474,7 @@ uno::Any SAL_CALL ScFilterDescriptorBase::getPropertyValue( const rtl::OUString&
throw(beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScQueryParam aParam;
GetData(aParam);
@@ -1666,14 +1667,14 @@ ScDBData* ScDatabaseRangeObj::GetDBData_Impl() const
rtl::OUString SAL_CALL ScDatabaseRangeObj::getName() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return aName;
}
void SAL_CALL ScDatabaseRangeObj::setName( const rtl::OUString& aNewName )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
{
ScDBDocFunc aFunc(*pDocShell);
@@ -1688,7 +1689,7 @@ void SAL_CALL ScDatabaseRangeObj::setName( const rtl::OUString& aNewName )
table::CellRangeAddress SAL_CALL ScDatabaseRangeObj::getDataArea() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
table::CellRangeAddress aAddress;
ScDBData* pData = GetDBData_Impl();
if (pData)
@@ -1707,7 +1708,7 @@ table::CellRangeAddress SAL_CALL ScDatabaseRangeObj::getDataArea() throw(uno::Ru
void SAL_CALL ScDatabaseRangeObj::setDataArea( const table::CellRangeAddress& aDataArea )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDBData* pData = GetDBData_Impl();
if ( pDocShell && pData )
{
@@ -1723,7 +1724,7 @@ void SAL_CALL ScDatabaseRangeObj::setDataArea( const table::CellRangeAddress& aD
uno::Sequence<beans::PropertyValue> SAL_CALL ScDatabaseRangeObj::getSortDescriptor()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScSortParam aParam;
const ScDBData* pData = GetDBData_Impl();
if (pData)
@@ -1795,7 +1796,7 @@ void ScDatabaseRangeObj::SetQueryParam(const ScQueryParam& rQueryParam)
uno::Reference<sheet::XSheetFilterDescriptor> SAL_CALL ScDatabaseRangeObj::getFilterDescriptor()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScRangeFilterDescriptor(pDocShell, this);
}
@@ -1855,14 +1856,14 @@ void ScDatabaseRangeObj::SetSubTotalParam(const ScSubTotalParam& rSubTotalParam)
uno::Reference<sheet::XSubTotalDescriptor> SAL_CALL ScDatabaseRangeObj::getSubTotalDescriptor()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScRangeSubTotalDescriptor(this);
}
uno::Sequence<beans::PropertyValue> SAL_CALL ScDatabaseRangeObj::getImportDescriptor()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScImportParam aParam;
const ScDBData* pData = GetDBData_Impl();
if (pData)
@@ -1877,7 +1878,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScDatabaseRangeObj::getImportDescri
void SAL_CALL ScDatabaseRangeObj::refresh() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDBData* pData = GetDBData_Impl();
if ( pDocShell && pData )
{
@@ -1907,7 +1908,7 @@ void SAL_CALL ScDatabaseRangeObj::addRefreshListener(
const uno::Reference<util::XRefreshListener >& xListener )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<util::XRefreshListener>* pObj =
new uno::Reference<util::XRefreshListener>( xListener );
aRefreshListeners.Insert( pObj, aRefreshListeners.Count() );
@@ -1921,7 +1922,7 @@ void SAL_CALL ScDatabaseRangeObj::removeRefreshListener(
const uno::Reference<util::XRefreshListener >& xListener )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
USHORT nCount = aRefreshListeners.Count();
for ( USHORT n=nCount; n--; )
{
@@ -1949,7 +1950,7 @@ void ScDatabaseRangeObj::Refreshed_Impl()
uno::Reference<table::XCellRange> SAL_CALL ScDatabaseRangeObj::getReferredCells()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScRange aRange;
ScDBData* pData = GetDBData_Impl();
if ( pData )
@@ -1970,7 +1971,7 @@ uno::Reference<table::XCellRange> SAL_CALL ScDatabaseRangeObj::getReferredCells(
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScDatabaseRangeObj::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static uno::Reference<beans::XPropertySetInfo> aRef(
new SfxItemPropertySetInfo( aPropSet.getPropertyMap() ));
return aRef;
@@ -1982,7 +1983,7 @@ void SAL_CALL ScDatabaseRangeObj::setPropertyValue(
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDBData* pData = GetDBData_Impl();
if ( pDocShell && pData )
{
@@ -2073,7 +2074,7 @@ uno::Any SAL_CALL ScDatabaseRangeObj::getPropertyValue( const rtl::OUString& aPr
throw(beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Any aRet;
ScDBData* pData = GetDBData_Impl();
if ( pData )
@@ -2221,7 +2222,7 @@ void SAL_CALL ScDatabaseRangesObj::addNewByName( const rtl::OUString& aName,
const table::CellRangeAddress& aRange )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
BOOL bDone = FALSE;
if (pDocShell)
{
@@ -2239,7 +2240,7 @@ void SAL_CALL ScDatabaseRangesObj::addNewByName( const rtl::OUString& aName,
void SAL_CALL ScDatabaseRangesObj::removeByName( const rtl::OUString& aName )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
BOOL bDone = FALSE;
if (pDocShell)
{
@@ -2256,7 +2257,7 @@ void SAL_CALL ScDatabaseRangesObj::removeByName( const rtl::OUString& aName )
uno::Reference<container::XEnumeration> SAL_CALL ScDatabaseRangesObj::createEnumeration()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScIndexEnumeration(this, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.DatabaseRangesEnumeration")));
}
@@ -2264,7 +2265,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScDatabaseRangesObj::createEnum
sal_Int32 SAL_CALL ScDatabaseRangesObj::getCount() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
//! "unbenannt" weglassen ?
@@ -2281,7 +2282,7 @@ uno::Any SAL_CALL ScDatabaseRangesObj::getByIndex( sal_Int32 nIndex )
throw(lang::IndexOutOfBoundsException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<sheet::XDatabaseRange> xRange(GetObjectByIndex_Impl((USHORT)nIndex));
if (xRange.is())
return uno::makeAny(xRange);
@@ -2292,13 +2293,13 @@ uno::Any SAL_CALL ScDatabaseRangesObj::getByIndex( sal_Int32 nIndex )
uno::Type SAL_CALL ScDatabaseRangesObj::getElementType() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return getCppuType((uno::Reference<sheet::XDatabaseRange>*)0);
}
sal_Bool SAL_CALL ScDatabaseRangesObj::hasElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ( getCount() != 0 );
}
@@ -2308,7 +2309,7 @@ uno::Any SAL_CALL ScDatabaseRangesObj::getByName( const rtl::OUString& aName )
throw(container::NoSuchElementException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<sheet::XDatabaseRange> xRange(GetObjectByName_Impl(aName));
if (xRange.is())
return uno::makeAny(xRange);
@@ -2320,7 +2321,7 @@ uno::Any SAL_CALL ScDatabaseRangesObj::getByName( const rtl::OUString& aName )
uno::Sequence<rtl::OUString> SAL_CALL ScDatabaseRangesObj::getElementNames()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
//! "unbenannt" weglassen ?
@@ -2345,7 +2346,7 @@ uno::Sequence<rtl::OUString> SAL_CALL ScDatabaseRangesObj::getElementNames()
sal_Bool SAL_CALL ScDatabaseRangesObj::hasByName( const rtl::OUString& aName )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
//! "unbenannt" weglassen ?
@@ -2369,3 +2370,4 @@ sal_Bool SAL_CALL ScDatabaseRangesObj::hasByName( const rtl::OUString& aName )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/defltuno.cxx b/sc/source/ui/unoobj/defltuno.cxx
index f3f76685e5cb..68ad542e3ec0 100644
--- a/sc/source/ui/unoobj/defltuno.cxx
+++ b/sc/source/ui/unoobj/defltuno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,6 +34,7 @@
#include <svl/smplhint.hxx>
#include <svl/itemprop.hxx>
#include <svx/unomid.hxx>
+#include <vcl/svapp.hxx>
#include <i18npool/mslangid.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
@@ -42,7 +44,6 @@
#include "miscuno.hxx"
#include "docsh.hxx"
#include "docpool.hxx"
-#include "unoguard.hxx"
#include "unonames.hxx"
#include "docoptio.hxx"
@@ -128,7 +129,7 @@ void ScDocDefaultsObj::ItemsChanged()
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScDocDefaultsObj::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static uno::Reference<beans::XPropertySetInfo> aRef = new SfxItemPropertySetInfo(
&aPropertyMap );
return aRef;
@@ -140,7 +141,7 @@ void SAL_CALL ScDocDefaultsObj::setPropertyValue(
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( !pDocShell )
throw uno::RuntimeException();
@@ -234,7 +235,7 @@ uno::Any SAL_CALL ScDocDefaultsObj::getPropertyValue( const rtl::OUString& aProp
{
// use pool default if set
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( !pDocShell )
throw uno::RuntimeException();
@@ -291,7 +292,7 @@ SC_IMPL_DUMMY_PROPERTY_LISTENER( ScDocDefaultsObj )
beans::PropertyState SAL_CALL ScDocDefaultsObj::getPropertyState( const rtl::OUString& aPropertyName )
throw(beans::UnknownPropertyException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( !pDocShell )
throw uno::RuntimeException();
@@ -328,7 +329,7 @@ uno::Sequence<beans::PropertyState> SAL_CALL ScDocDefaultsObj::getPropertyStates
{
// the simple way: call getPropertyState
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
const rtl::OUString* pNames = aPropertyNames.getConstArray();
uno::Sequence<beans::PropertyState> aRet(aPropertyNames.getLength());
beans::PropertyState* pStates = aRet.getArray();
@@ -340,7 +341,7 @@ uno::Sequence<beans::PropertyState> SAL_CALL ScDocDefaultsObj::getPropertyStates
void SAL_CALL ScDocDefaultsObj::setPropertyToDefault( const rtl::OUString& aPropertyName )
throw(beans::UnknownPropertyException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( !pDocShell )
throw uno::RuntimeException();
@@ -364,7 +365,7 @@ uno::Any SAL_CALL ScDocDefaultsObj::getPropertyDefault( const rtl::OUString& aPr
{
// always use static default
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( !pDocShell )
throw uno::RuntimeException();
@@ -385,3 +386,4 @@ uno::Any SAL_CALL ScDocDefaultsObj::getPropertyDefault( const rtl::OUString& aPr
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/detreg.cxx b/sc/source/ui/unoobj/detreg.cxx
index 498d0fc886ec..da87ca9e3644 100644
--- a/sc/source/ui/unoobj/detreg.cxx
+++ b/sc/source/ui/unoobj/detreg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -109,3 +110,4 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImple
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/dispuno.cxx b/sc/source/ui/unoobj/dispuno.cxx
index 6c82871d02da..3420281600aa 100644
--- a/sc/source/ui/unoobj/dispuno.cxx
+++ b/sc/source/ui/unoobj/dispuno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,13 +35,13 @@
#include <comphelper/uno3.hxx>
#include <svx/dataaccessdescriptor.hxx>
#include <svl/smplhint.hxx>
+#include <vcl/svapp.hxx>
#include <com/sun/star/frame/XDispatchProviderInterception.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <com/sun/star/sdb/CommandType.hpp>
#include "dispuno.hxx"
-#include "unoguard.hxx"
#include "tabvwsh.hxx"
#include "dbdocfun.hxx"
#include "dbcolect.hxx"
@@ -119,7 +120,7 @@ uno::Reference<frame::XDispatch> SAL_CALL ScDispatchProviderInterceptor::queryDi
sal_Int32 nSearchFlags )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<frame::XDispatch> xResult;
// create some dispatch ...
@@ -144,7 +145,7 @@ uno::Sequence< uno::Reference<frame::XDispatch> > SAL_CALL
const uno::Sequence<frame::DispatchDescriptor>& aDescripts )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Sequence< uno::Reference< frame::XDispatch> > aReturn(aDescripts.getLength());
uno::Reference< frame::XDispatch>* pReturn = aReturn.getArray();
@@ -163,7 +164,7 @@ uno::Reference<frame::XDispatchProvider> SAL_CALL
ScDispatchProviderInterceptor::getSlaveDispatchProvider()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return m_xSlaveDispatcher;
}
@@ -171,7 +172,7 @@ void SAL_CALL ScDispatchProviderInterceptor::setSlaveDispatchProvider(
const uno::Reference<frame::XDispatchProvider>& xNewDispatchProvider )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
m_xSlaveDispatcher.set(xNewDispatchProvider);
}
@@ -179,7 +180,7 @@ uno::Reference<frame::XDispatchProvider> SAL_CALL
ScDispatchProviderInterceptor::getMasterDispatchProvider()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return m_xMasterDispatcher;
}
@@ -187,7 +188,7 @@ void SAL_CALL ScDispatchProviderInterceptor::setMasterDispatchProvider(
const uno::Reference<frame::XDispatchProvider>& xNewSupplier )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
m_xMasterDispatcher.set(xNewSupplier);
}
@@ -196,7 +197,7 @@ void SAL_CALL ScDispatchProviderInterceptor::setMasterDispatchProvider(
void SAL_CALL ScDispatchProviderInterceptor::disposing( const lang::EventObject& /* Source */ )
throw(::com::sun::star::uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (m_xIntercepted.is())
{
@@ -247,7 +248,7 @@ void SAL_CALL ScDispatch::dispatch( const util::URL& aURL,
const uno::Sequence<beans::PropertyValue>& aArgs )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
BOOL bDone = FALSE;
if ( pViewShell && !aURL.Complete.compareToAscii(cURLInsertColumns) )
@@ -296,7 +297,7 @@ void SAL_CALL ScDispatch::addStatusListener(
const util::URL& aURL )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (!pViewShell)
throw uno::RuntimeException();
@@ -336,7 +337,7 @@ void SAL_CALL ScDispatch::removeStatusListener(
const util::URL& aURL )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( !aURL.Complete.compareToAscii(cURLDocDataSource) )
{
@@ -413,3 +414,4 @@ void SAL_CALL ScDispatch::disposing( const ::com::sun::star::lang::EventObject&
pViewShell = NULL;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 83c9441d8fc7..41bf1a16859f 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -87,7 +88,6 @@
#include "rangeutl.hxx"
#include "markdata.hxx"
#include "docoptio.hxx"
-#include "unoguard.hxx"
#include "unonames.hxx"
#include "shapeuno.hxx"
#include "viewuno.hxx"
@@ -102,6 +102,7 @@
#include "scresid.hxx"
using namespace com::sun::star;
+#define SC_UNO_VBADOCOBJ "ThisVBADocObj" // perhaps we want to actually make this ThisWorkbook ?
//------------------------------------------------------------------------
@@ -117,6 +118,7 @@ const SfxItemPropertyMapEntry* lcl_GetDocOptPropertyMap()
{MAP_CHAR_LEN(SC_UNO_AUTOCONTFOC), 0, &getBooleanCppuType(), 0, 0},
{MAP_CHAR_LEN(SC_UNO_BASICLIBRARIES), 0, &getCppuType((uno::Reference< script::XLibraryContainer >*)0), beans::PropertyAttribute::READONLY, 0},
{MAP_CHAR_LEN(SC_UNO_DIALOGLIBRARIES), 0, &getCppuType((uno::Reference< script::XLibraryContainer >*)0), beans::PropertyAttribute::READONLY, 0},
+ {MAP_CHAR_LEN(SC_UNO_VBADOCOBJ), 0, &getCppuType((beans::PropertyValue*)0), beans::PropertyAttribute::READONLY, 0},
{MAP_CHAR_LEN(SC_UNO_CALCASSHOWN), PROP_UNO_CALCASSHOWN, &getBooleanCppuType(), 0, 0},
{MAP_CHAR_LEN(SC_UNONAME_CLOCAL), 0, &getCppuType((lang::Locale*)0), 0, 0},
{MAP_CHAR_LEN(SC_UNO_CJK_CLOCAL), 0, &getCppuType((lang::Locale*)0), 0, 0},
@@ -298,19 +300,6 @@ ScPrintUIOptions::ScPrintUIOptions()
rtl::OUString(),
aPageRangeOpt
);
-
- // "Print only selected sheets" isn't needed because of the "Selected Sheets" choice in "Print content"
-#if 0
- // create subgroup for sheets
- m_aUIProperties[8].Value = getSubgroupControlOpt( rtl::OUString( aStrings.GetString( 3 ) ), rtl::OUString() );
-
- // create a bool option for selected pages only
- m_aUIProperties[9].Value = getBoolControlOpt( rtl::OUString( aStrings.GetString( 4 ) ),
- rtl::OUString( aStrings.GetString( 5 ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsOnlySelectedSheets" ) ),
- i_bSelectedOnly
- );
-#endif
}
void ScPrintUIOptions::SetDefaults()
@@ -620,7 +609,7 @@ void ScModelObj::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
uno::Reference<sheet::XSpreadsheets> SAL_CALL ScModelObj::getSheets() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
return new ScTableSheetsObj(pDocShell);
return NULL;
@@ -631,7 +620,7 @@ uno::Reference<sheet::XSpreadsheets> SAL_CALL ScModelObj::getSheets() throw(uno:
uno::Reference<container::XNameAccess> SAL_CALL ScModelObj::getStyleFamilies()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
return new ScStyleFamiliesObj(pDocShell);
return NULL;
@@ -815,6 +804,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
@@ -915,7 +914,7 @@ sal_Int32 SAL_CALL ScModelObj::getRendererCount( const uno::Any& aSelection,
const uno::Sequence<beans::PropertyValue>& rOptions )
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (!pDocShell)
throw uno::RuntimeException();
@@ -967,22 +966,24 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32
const uno::Any& aSelection, const uno::Sequence<beans::PropertyValue>& rOptions )
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (!pDocShell)
throw uno::RuntimeException();
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 )
{
@@ -1058,9 +1059,6 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32
pArray[2].Value <<= aRangeAddress;
}
- #if 0
- const ScPrintOptions& rPrintOpt =
- #endif
// FIXME: is this for side effects ?
SC_MOD()->GetPrintOptions();
if( ! pPrinterOptions )
@@ -1075,7 +1073,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
const uno::Sequence<beans::PropertyValue>& rOptions )
throw(lang::IllegalArgumentException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (!pDocShell)
throw uno::RuntimeException();
@@ -1270,7 +1268,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
uno::Reference<container::XNameAccess> SAL_CALL ScModelObj::getLinks() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
return new ScLinkTargetTypesObj(pDocShell);
return NULL;
@@ -1280,7 +1278,7 @@ uno::Reference<container::XNameAccess> SAL_CALL ScModelObj::getLinks() throw(uno
sal_Bool SAL_CALL ScModelObj::isActionLocked() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
BOOL bLocked = FALSE;
if (pDocShell)
bLocked = ( pDocShell->GetLockCount() != 0 );
@@ -1289,28 +1287,28 @@ sal_Bool SAL_CALL ScModelObj::isActionLocked() throw(uno::RuntimeException)
void SAL_CALL ScModelObj::addActionLock() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
pDocShell->LockDocument();
}
void SAL_CALL ScModelObj::removeActionLock() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
pDocShell->UnlockDocument();
}
void SAL_CALL ScModelObj::setActionLocks( sal_Int16 nLock ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
pDocShell->SetLockCount(nLock);
}
sal_Int16 SAL_CALL ScModelObj::resetActionLocks() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
USHORT nRet = 0;
if (pDocShell)
{
@@ -1322,7 +1320,7 @@ sal_Int16 SAL_CALL ScModelObj::resetActionLocks() throw(uno::RuntimeException)
void SAL_CALL ScModelObj::lockControllers() throw (::com::sun::star::uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
SfxBaseModel::lockControllers();
if (pDocShell)
pDocShell->LockPaint();
@@ -1330,7 +1328,7 @@ void SAL_CALL ScModelObj::lockControllers() throw (::com::sun::star::uno::Runtim
void SAL_CALL ScModelObj::unlockControllers() throw (::com::sun::star::uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (hasControllersLocked())
{
SfxBaseModel::unlockControllers();
@@ -1343,7 +1341,7 @@ void SAL_CALL ScModelObj::unlockControllers() throw (::com::sun::star::uno::Runt
void SAL_CALL ScModelObj::calculate() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
pDocShell->DoRecalc(TRUE);
else
@@ -1354,7 +1352,7 @@ void SAL_CALL ScModelObj::calculate() throw(uno::RuntimeException)
void SAL_CALL ScModelObj::calculateAll() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
pDocShell->DoHardRecalc(TRUE);
else
@@ -1365,7 +1363,7 @@ void SAL_CALL ScModelObj::calculateAll() throw(uno::RuntimeException)
sal_Bool SAL_CALL ScModelObj::isAutomaticCalculationEnabled() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
return pDocShell->GetDocument()->GetAutoCalc();
@@ -1376,7 +1374,7 @@ sal_Bool SAL_CALL ScModelObj::isAutomaticCalculationEnabled() throw(uno::Runtime
void SAL_CALL ScModelObj::enableAutomaticCalculation( sal_Bool bEnabled )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
{
ScDocument* pDoc = pDocShell->GetDocument();
@@ -1396,7 +1394,7 @@ void SAL_CALL ScModelObj::enableAutomaticCalculation( sal_Bool bEnabled )
void SAL_CALL ScModelObj::protect( const rtl::OUString& aPassword ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
// #i108245# if already protected, don't change anything
if ( pDocShell && !pDocShell->GetDocument()->IsDocProtected() )
{
@@ -1410,7 +1408,7 @@ void SAL_CALL ScModelObj::protect( const rtl::OUString& aPassword ) throw(uno::R
void SAL_CALL ScModelObj::unprotect( const rtl::OUString& aPassword )
throw(lang::IllegalArgumentException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
{
String aString(aPassword);
@@ -1424,7 +1422,7 @@ void SAL_CALL ScModelObj::unprotect( const rtl::OUString& aPassword )
sal_Bool SAL_CALL ScModelObj::isProtected() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
return pDocShell->GetDocument()->IsDocProtected();
@@ -1436,7 +1434,7 @@ sal_Bool SAL_CALL ScModelObj::isProtected() throw(uno::RuntimeException)
uno::Reference<drawing::XDrawPages> SAL_CALL ScModelObj::getDrawPages() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
return new ScDrawPagesObj(pDocShell);
@@ -1444,61 +1442,6 @@ uno::Reference<drawing::XDrawPages> SAL_CALL ScModelObj::getDrawPages() throw(un
return NULL;
}
-#if 0
-// XPrintable
-
-rtl::OUString ScModelObj::getPrinterName(void) const
-{
- ScUnoGuard aGuard;
- if (pDocShell)
- {
- SfxPrinter* pPrinter = pDocShell->GetPrinter();
- if (pPrinter)
- return pPrinter->GetName();
- }
-
- DBG_ERROR("getPrinterName: keine DocShell oder kein Printer");
- return rtl::OUString();
-}
-
-void ScModelObj::setPrinterName(const rtl::OUString& PrinterName)
-{
- ScUnoGuard aGuard;
- // Drucker setzen - wie in SfxViewShell::ExecPrint_Impl
-
- if (pDocShell)
- {
- SfxPrinter* pPrinter = pDocShell->GetPrinter();
- if (pPrinter)
- {
- String aString(PrinterName);
- SfxPrinter* pNewPrinter = new SfxPrinter( pPrinter->GetOptions().Clone(), aString );
- if (pNewPrinter->IsKnown())
- pDocShell->SetPrinter( pNewPrinter, SFX_PRINTER_PRINTER );
- else
- delete pNewPrinter;
- }
- }
-}
-
-XPropertySetRef ScModelObj::createPrintOptions(void)
-{
- ScUnoGuard aGuard;
- return new ScPrintSettingsObj; //! ScPrintSettingsObj implementieren!
-}
-
-void ScModelObj::print(const XPropertySetRef& xOptions)
-{
- ScUnoGuard aGuard;
- if (pDocShell)
- {
- //! xOptions auswerten (wie denn?)
-
- //! muss noch
- }
-}
-#endif
-
// XGoalSeek
sheet::GoalResult SAL_CALL ScModelObj::seekGoal(
@@ -1507,7 +1450,7 @@ sheet::GoalResult SAL_CALL ScModelObj::seekGoal(
const ::rtl::OUString& aGoalValue )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
sheet::GoalResult aResult;
aResult.Divergence = DBL_MAX; // nichts gefunden
if (pDocShell)
@@ -1532,7 +1475,7 @@ sheet::GoalResult SAL_CALL ScModelObj::seekGoal(
uno::Reference<sheet::XConsolidationDescriptor> SAL_CALL ScModelObj::createConsolidationDescriptor(
sal_Bool bEmpty ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScConsolidationDescriptor* pNew = new ScConsolidationDescriptor;
if ( pDocShell && !bEmpty )
{
@@ -1548,7 +1491,7 @@ void SAL_CALL ScModelObj::consolidate(
const uno::Reference<sheet::XConsolidationDescriptor>& xDescriptor )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
// das koennte theoretisch ein fremdes Objekt sein, also nur das
// oeffentliche XConsolidationDescriptor Interface benutzen, um
// die Daten in ein ScConsolidationDescriptor Objekt zu kopieren:
@@ -1574,7 +1517,7 @@ void SAL_CALL ScModelObj::consolidate(
void SAL_CALL ScModelObj::refreshArrows() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
{
ScDocFunc aFunc(*pDocShell);
@@ -1590,7 +1533,7 @@ uno::Reference< container::XIndexAccess > SAL_CALL ScModelObj::getViewData( )
if( !xRet.is() )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell && pDocShell->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED)
{
xRet.set(uno::Reference < container::XIndexAccess >::query(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.IndexedPropertyValues")))));
@@ -1620,7 +1563,7 @@ uno::Reference< container::XIndexAccess > SAL_CALL ScModelObj::getViewData( )
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScModelObj::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static uno::Reference<beans::XPropertySetInfo> aRef(
new SfxItemPropertySetInfo( aPropSet.getPropertyMap() ));
return aRef;
@@ -1632,7 +1575,7 @@ void SAL_CALL ScModelObj::setPropertyValue(
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aString(aPropertyName);
if (pDocShell)
@@ -1765,7 +1708,7 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const rtl::OUString& aPropertyNa
throw(beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aString(aPropertyName);
uno::Any aRet;
@@ -1873,6 +1816,18 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const rtl::OUString& aPropertyNa
{
aRet <<= pDocShell->GetDialogContainer();
}
+ else if ( aString.EqualsAscii( SC_UNO_VBADOCOBJ ) )
+ {
+ // PropertyValue seems extreme because we store
+ // the model ( as the value member ) of the PropertyValue that is
+ // itself a property of the model ( the intention however is to
+ // store something like a Workbook object... but we don't do that )
+ // yet
+ beans::PropertyValue aProp;
+ aProp.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ThisExcelDoc") );
+ aProp.Value <<= pDocShell->GetModel();
+ aRet <<= aProp;
+ }
else if ( aString.EqualsAscii( SC_UNO_RUNTIMEUID ) )
{
aRet <<= getRuntimeUID();
@@ -1928,7 +1883,7 @@ uno::Reference<uno::XInterface> SAL_CALL ScModelObj::createInstance(
const rtl::OUString& aServiceSpecifier )
throw(uno::Exception, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<uno::XInterface> xRet;
String aNameStr(aServiceSpecifier);
USHORT nType = ScServiceProvider::GetProviderType(aNameStr);
@@ -2008,7 +1963,7 @@ uno::Reference<uno::XInterface> SAL_CALL ScModelObj::createInstanceWithArguments
{
//! unterscheiden zwischen eigenen Services und denen vom Drawing-Layer?
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<uno::XInterface> xInt(createInstance(ServiceSpecifier));
if ( aArgs.getLength() )
@@ -2026,7 +1981,7 @@ uno::Reference<uno::XInterface> SAL_CALL ScModelObj::createInstanceWithArguments
uno::Sequence<rtl::OUString> SAL_CALL ScModelObj::getAvailableServiceNames()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
//! warum sind die Parameter bei concatServiceNames nicht const ???
//! return concatServiceNames( ScServiceProvider::GetAllServiceNames(),
@@ -2137,14 +2092,14 @@ ScModelObj* ScModelObj::getImplementation( const uno::Reference<uno::XInterface>
void ScModelObj::addChangesListener( const uno::Reference< util::XChangesListener >& aListener )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
maChangesListeners.addInterface( aListener );
}
void ScModelObj::removeChangesListener( const uno::Reference< util::XChangesListener >& aListener )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
maChangesListeners.removeInterface( aListener );
}
@@ -2348,7 +2303,7 @@ uno::Reference<drawing::XDrawPage> ScDrawPagesObj::GetObjectByIndex_Impl(INT32 n
uno::Reference<drawing::XDrawPage> SAL_CALL ScDrawPagesObj::insertNewByIndex( sal_Int32 nPos )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<drawing::XDrawPage> xRet;
if (pDocShell)
{
@@ -2364,7 +2319,7 @@ uno::Reference<drawing::XDrawPage> SAL_CALL ScDrawPagesObj::insertNewByIndex( sa
void SAL_CALL ScDrawPagesObj::remove( const uno::Reference<drawing::XDrawPage>& xPage )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
SvxDrawPage* pImp = SvxDrawPage::getImplementation( xPage );
if ( pDocShell && pImp )
{
@@ -2382,7 +2337,7 @@ void SAL_CALL ScDrawPagesObj::remove( const uno::Reference<drawing::XDrawPage>&
sal_Int32 SAL_CALL ScDrawPagesObj::getCount() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
return pDocShell->GetDocument()->GetTableCount();
return 0;
@@ -2392,7 +2347,7 @@ uno::Any SAL_CALL ScDrawPagesObj::getByIndex( sal_Int32 nIndex )
throw(lang::IndexOutOfBoundsException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<drawing::XDrawPage> xPage(GetObjectByIndex_Impl(nIndex));
if (xPage.is())
return uno::makeAny(xPage);
@@ -2403,13 +2358,13 @@ uno::Any SAL_CALL ScDrawPagesObj::getByIndex( sal_Int32 nIndex )
uno::Type SAL_CALL ScDrawPagesObj::getElementType() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return getCppuType((uno::Reference<drawing::XDrawPage>*)0);
}
sal_Bool SAL_CALL ScDrawPagesObj::hasElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ( getCount() != 0 );
}
@@ -2463,7 +2418,7 @@ ScTableSheetObj* ScTableSheetsObj::GetObjectByName_Impl(const rtl::OUString& aNa
void SAL_CALL ScTableSheetsObj::insertNewByName( const rtl::OUString& aName, sal_Int16 nPosition )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
BOOL bDone = FALSE;
if (pDocShell)
{
@@ -2478,7 +2433,7 @@ void SAL_CALL ScTableSheetsObj::insertNewByName( const rtl::OUString& aName, sal
void SAL_CALL ScTableSheetsObj::moveByName( const rtl::OUString& aName, sal_Int16 nDestination )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
BOOL bDone = FALSE;
if (pDocShell)
{
@@ -2495,7 +2450,7 @@ void SAL_CALL ScTableSheetsObj::copyByName( const rtl::OUString& aName,
const rtl::OUString& aCopy, sal_Int16 nDestination )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
BOOL bDone = FALSE;
if (pDocShell)
{
@@ -2526,7 +2481,7 @@ void SAL_CALL ScTableSheetsObj::insertByName( const rtl::OUString& aName, const
throw(lang::IllegalArgumentException, container::ElementExistException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
BOOL bDone = FALSE;
BOOL bIllArg = FALSE;
@@ -2578,7 +2533,7 @@ void SAL_CALL ScTableSheetsObj::replaceByName( const rtl::OUString& aName, const
throw(lang::IllegalArgumentException, container::NoSuchElementException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
BOOL bDone = FALSE;
BOOL bIllArg = FALSE;
@@ -2631,7 +2586,7 @@ void SAL_CALL ScTableSheetsObj::removeByName( const rtl::OUString& aName )
throw(container::NoSuchElementException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
BOOL bDone = FALSE;
if (pDocShell)
{
@@ -2658,7 +2613,7 @@ void SAL_CALL ScTableSheetsObj::removeByName( const rtl::OUString& aName )
uno::Reference< table::XCell > SAL_CALL ScTableSheetsObj::getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow, sal_Int32 nSheet )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<table::XCellRange> xSheet(static_cast<ScCellRangeObj*>(GetObjectByIndex_Impl((USHORT)nSheet)));
if (! xSheet.is())
throw lang::IndexOutOfBoundsException();
@@ -2669,7 +2624,7 @@ uno::Reference< table::XCell > SAL_CALL ScTableSheetsObj::getCellByPosition( sal
uno::Reference< table::XCellRange > SAL_CALL ScTableSheetsObj::getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom, sal_Int32 nSheet )
throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<table::XCellRange> xSheet(static_cast<ScCellRangeObj*>(GetObjectByIndex_Impl((USHORT)nSheet)));
if (! xSheet.is())
throw lang::IndexOutOfBoundsException();
@@ -2680,7 +2635,7 @@ uno::Reference< table::XCellRange > SAL_CALL ScTableSheetsObj::getCellRangeByPos
uno::Sequence < uno::Reference< table::XCellRange > > SAL_CALL ScTableSheetsObj::getCellRangesByName( const rtl::OUString& aRange )
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Sequence < uno::Reference < table::XCellRange > > xRet;
ScRangeList aRangeList;
@@ -2711,7 +2666,7 @@ uno::Sequence < uno::Reference< table::XCellRange > > SAL_CALL ScTableSheetsObj:
uno::Reference<container::XEnumeration> SAL_CALL ScTableSheetsObj::createEnumeration()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScIndexEnumeration(this, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.SpreadsheetsEnumeration")));
}
@@ -2719,7 +2674,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScTableSheetsObj::createEnumera
sal_Int32 SAL_CALL ScTableSheetsObj::getCount() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
return pDocShell->GetDocument()->GetTableCount();
return 0;
@@ -2729,7 +2684,7 @@ uno::Any SAL_CALL ScTableSheetsObj::getByIndex( sal_Int32 nIndex )
throw(lang::IndexOutOfBoundsException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<sheet::XSpreadsheet> xSheet(GetObjectByIndex_Impl(nIndex));
if (xSheet.is())
return uno::makeAny(xSheet);
@@ -2740,13 +2695,13 @@ uno::Any SAL_CALL ScTableSheetsObj::getByIndex( sal_Int32 nIndex )
uno::Type SAL_CALL ScTableSheetsObj::getElementType() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return getCppuType((uno::Reference<sheet::XSpreadsheet>*)0);
}
sal_Bool SAL_CALL ScTableSheetsObj::hasElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ( getCount() != 0 );
}
@@ -2756,7 +2711,7 @@ uno::Any SAL_CALL ScTableSheetsObj::getByName( const rtl::OUString& aName )
throw(container::NoSuchElementException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<sheet::XSpreadsheet> xSheet(GetObjectByName_Impl(aName));
if (xSheet.is())
return uno::makeAny(xSheet);
@@ -2768,7 +2723,7 @@ uno::Any SAL_CALL ScTableSheetsObj::getByName( const rtl::OUString& aName )
uno::Sequence<rtl::OUString> SAL_CALL ScTableSheetsObj::getElementNames()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
{
ScDocument* pDoc = pDocShell->GetDocument();
@@ -2789,7 +2744,7 @@ uno::Sequence<rtl::OUString> SAL_CALL ScTableSheetsObj::getElementNames()
sal_Bool SAL_CALL ScTableSheetsObj::hasByName( const rtl::OUString& aName )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
{
SCTAB nIndex;
@@ -2856,7 +2811,7 @@ ScTableColumnObj* ScTableColumnsObj::GetObjectByName_Impl(const rtl::OUString& a
void SAL_CALL ScTableColumnsObj::insertByIndex( sal_Int32 nPosition, sal_Int32 nCount )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
BOOL bDone = FALSE;
if ( pDocShell && nCount > 0 && nPosition >= 0 && nStartCol+nPosition <= nEndCol &&
nStartCol+nPosition+nCount-1 <= MAXCOL )
@@ -2873,7 +2828,7 @@ void SAL_CALL ScTableColumnsObj::insertByIndex( sal_Int32 nPosition, sal_Int32 n
void SAL_CALL ScTableColumnsObj::removeByIndex( sal_Int32 nIndex, sal_Int32 nCount )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
BOOL bDone = FALSE;
// Der zu loeschende Bereich muss innerhalb des Objekts liegen
if ( pDocShell && nCount > 0 && nIndex >= 0 && nStartCol+nIndex+nCount-1 <= nEndCol )
@@ -2892,7 +2847,7 @@ void SAL_CALL ScTableColumnsObj::removeByIndex( sal_Int32 nIndex, sal_Int32 nCou
uno::Reference<container::XEnumeration> SAL_CALL ScTableColumnsObj::createEnumeration()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScIndexEnumeration(this, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.table.TableColumnsEnumeration")));
}
@@ -2900,7 +2855,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScTableColumnsObj::createEnumer
sal_Int32 SAL_CALL ScTableColumnsObj::getCount() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return nEndCol - nStartCol + 1;
}
@@ -2908,7 +2863,7 @@ uno::Any SAL_CALL ScTableColumnsObj::getByIndex( sal_Int32 nIndex )
throw(lang::IndexOutOfBoundsException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<table::XCellRange> xColumn(GetObjectByIndex_Impl(nIndex));
if (xColumn.is())
return uno::makeAny(xColumn);
@@ -2919,13 +2874,13 @@ uno::Any SAL_CALL ScTableColumnsObj::getByIndex( sal_Int32 nIndex )
uno::Type SAL_CALL ScTableColumnsObj::getElementType() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return getCppuType((uno::Reference<table::XCellRange>*)0);
}
sal_Bool SAL_CALL ScTableColumnsObj::hasElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ( getCount() != 0 );
}
@@ -2933,7 +2888,7 @@ uno::Any SAL_CALL ScTableColumnsObj::getByName( const rtl::OUString& aName )
throw(container::NoSuchElementException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<table::XCellRange> xColumn(GetObjectByName_Impl(aName));
if (xColumn.is())
return uno::makeAny(xColumn);
@@ -2945,7 +2900,7 @@ uno::Any SAL_CALL ScTableColumnsObj::getByName( const rtl::OUString& aName )
uno::Sequence<rtl::OUString> SAL_CALL ScTableColumnsObj::getElementNames()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
SCCOL nCount = nEndCol - nStartCol + 1;
uno::Sequence<rtl::OUString> aSeq(nCount);
rtl::OUString* pAry = aSeq.getArray();
@@ -2958,7 +2913,7 @@ uno::Sequence<rtl::OUString> SAL_CALL ScTableColumnsObj::getElementNames()
sal_Bool SAL_CALL ScTableColumnsObj::hasByName( const rtl::OUString& aName )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
SCCOL nCol = 0;
String aString(aName);
if ( ::AlphaToCol( nCol, aString) )
@@ -2973,7 +2928,7 @@ sal_Bool SAL_CALL ScTableColumnsObj::hasByName( const rtl::OUString& aName )
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScTableColumnsObj::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static uno::Reference<beans::XPropertySetInfo> aRef(
new SfxItemPropertySetInfo( lcl_GetColumnsPropertyMap() ));
return aRef;
@@ -2985,7 +2940,7 @@ void SAL_CALL ScTableColumnsObj::setPropertyValue(
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (!pDocShell)
throw uno::RuntimeException();
@@ -3033,7 +2988,7 @@ uno::Any SAL_CALL ScTableColumnsObj::getPropertyValue( const rtl::OUString& aPro
throw(beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (!pDocShell)
throw uno::RuntimeException();
@@ -3122,7 +3077,7 @@ ScTableRowObj* ScTableRowsObj::GetObjectByIndex_Impl(sal_Int32 nIndex) const
void SAL_CALL ScTableRowsObj::insertByIndex( sal_Int32 nPosition, sal_Int32 nCount )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
BOOL bDone = FALSE;
if ( pDocShell && nCount > 0 && nPosition >= 0 && nStartRow+nPosition <= nEndRow &&
nStartRow+nPosition+nCount-1 <= MAXROW )
@@ -3139,7 +3094,7 @@ void SAL_CALL ScTableRowsObj::insertByIndex( sal_Int32 nPosition, sal_Int32 nCou
void SAL_CALL ScTableRowsObj::removeByIndex( sal_Int32 nIndex, sal_Int32 nCount )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
BOOL bDone = FALSE;
// Der zu loeschende Bereich muss innerhalb des Objekts liegen
if ( pDocShell && nCount > 0 && nIndex >= 0 && nStartRow+nIndex+nCount-1 <= nEndRow )
@@ -3158,7 +3113,7 @@ void SAL_CALL ScTableRowsObj::removeByIndex( sal_Int32 nIndex, sal_Int32 nCount
uno::Reference<container::XEnumeration> SAL_CALL ScTableRowsObj::createEnumeration()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScIndexEnumeration(this, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.table.TableRowsEnumeration")));
}
@@ -3166,7 +3121,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScTableRowsObj::createEnumerati
sal_Int32 SAL_CALL ScTableRowsObj::getCount() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return nEndRow - nStartRow + 1;
}
@@ -3174,7 +3129,7 @@ uno::Any SAL_CALL ScTableRowsObj::getByIndex( sal_Int32 nIndex )
throw(lang::IndexOutOfBoundsException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<table::XCellRange> xRow(GetObjectByIndex_Impl(nIndex));
if (xRow.is())
return uno::makeAny(xRow);
@@ -3185,13 +3140,13 @@ uno::Any SAL_CALL ScTableRowsObj::getByIndex( sal_Int32 nIndex )
uno::Type SAL_CALL ScTableRowsObj::getElementType() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return getCppuType((uno::Reference<table::XCellRange>*)0);
}
sal_Bool SAL_CALL ScTableRowsObj::hasElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ( getCount() != 0 );
}
@@ -3200,7 +3155,7 @@ sal_Bool SAL_CALL ScTableRowsObj::hasElements() throw(uno::RuntimeException)
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScTableRowsObj::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static uno::Reference<beans::XPropertySetInfo> aRef(
new SfxItemPropertySetInfo( lcl_GetRowsPropertyMap() ));
return aRef;
@@ -3212,7 +3167,7 @@ void SAL_CALL ScTableRowsObj::setPropertyValue(
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (!pDocShell)
throw uno::RuntimeException();
@@ -3295,7 +3250,7 @@ uno::Any SAL_CALL ScTableRowsObj::getPropertyValue( const rtl::OUString& aProper
throw(beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (!pDocShell)
throw uno::RuntimeException();
@@ -3465,7 +3420,7 @@ void SAL_CALL ScAnnotationsObj::insertNew(
const table::CellAddress& aPosition, const ::rtl::OUString& rText )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
{
DBG_ASSERT( aPosition.Sheet == nTab, "addAnnotation mit falschem Sheet" );
@@ -3478,7 +3433,7 @@ void SAL_CALL ScAnnotationsObj::insertNew(
void SAL_CALL ScAnnotationsObj::removeByIndex( sal_Int32 nIndex ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
{
ScAddress aPos;
@@ -3501,7 +3456,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScAnnotationsObj::createEnumera
{
//! iterate directly (more efficiently)?
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScIndexEnumeration(this, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.CellAnnotationsEnumeration")));
}
@@ -3509,7 +3464,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScAnnotationsObj::createEnumera
sal_Int32 SAL_CALL ScAnnotationsObj::getCount() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ULONG nCount = 0;
if (pDocShell)
{
@@ -3525,7 +3480,7 @@ uno::Any SAL_CALL ScAnnotationsObj::getByIndex( sal_Int32 nIndex )
throw(lang::IndexOutOfBoundsException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<sheet::XSheetAnnotation> xAnnotation(GetObjectByIndex_Impl(nIndex));
if (xAnnotation.is())
return uno::makeAny(xAnnotation);
@@ -3536,13 +3491,13 @@ uno::Any SAL_CALL ScAnnotationsObj::getByIndex( sal_Int32 nIndex )
uno::Type SAL_CALL ScAnnotationsObj::getElementType() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return getCppuType((uno::Reference<sheet::XSheetAnnotation>*)0);
}
sal_Bool SAL_CALL ScAnnotationsObj::hasElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ( getCount() != 0 );
}
@@ -3624,7 +3579,7 @@ void SAL_CALL ScScenariosObj::addNewByName( const rtl::OUString& aName,
const rtl::OUString& aComment )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( pDocShell )
{
ScMarkData aMarkData;
@@ -3657,7 +3612,7 @@ void SAL_CALL ScScenariosObj::addNewByName( const rtl::OUString& aName,
void SAL_CALL ScScenariosObj::removeByName( const rtl::OUString& aName )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
SCTAB nIndex;
if ( pDocShell && GetScenarioIndex_Impl( aName, nIndex ) )
{
@@ -3671,7 +3626,7 @@ void SAL_CALL ScScenariosObj::removeByName( const rtl::OUString& aName )
uno::Reference<container::XEnumeration> SAL_CALL ScScenariosObj::createEnumeration()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScIndexEnumeration(this, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.ScenariosEnumeration")));
}
@@ -3679,7 +3634,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScScenariosObj::createEnumerati
sal_Int32 SAL_CALL ScScenariosObj::getCount() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
SCTAB nCount = 0;
if ( pDocShell )
{
@@ -3702,7 +3657,7 @@ uno::Any SAL_CALL ScScenariosObj::getByIndex( sal_Int32 nIndex )
throw(lang::IndexOutOfBoundsException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<sheet::XScenario> xScen(GetObjectByIndex_Impl(nIndex));
if (xScen.is())
return uno::makeAny(xScen);
@@ -3713,13 +3668,13 @@ uno::Any SAL_CALL ScScenariosObj::getByIndex( sal_Int32 nIndex )
uno::Type SAL_CALL ScScenariosObj::getElementType() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return getCppuType((uno::Reference<sheet::XScenario>*)0);
}
sal_Bool SAL_CALL ScScenariosObj::hasElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ( getCount() != 0 );
}
@@ -3727,7 +3682,7 @@ uno::Any SAL_CALL ScScenariosObj::getByName( const rtl::OUString& aName )
throw(container::NoSuchElementException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<sheet::XScenario> xScen(GetObjectByName_Impl(aName));
if (xScen.is())
return uno::makeAny(xScen);
@@ -3739,7 +3694,7 @@ uno::Any SAL_CALL ScScenariosObj::getByName( const rtl::OUString& aName )
uno::Sequence<rtl::OUString> SAL_CALL ScScenariosObj::getElementNames()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
SCTAB nCount = (SCTAB)getCount();
uno::Sequence<rtl::OUString> aSeq(nCount);
@@ -3759,7 +3714,7 @@ uno::Sequence<rtl::OUString> SAL_CALL ScScenariosObj::getElementNames()
sal_Bool SAL_CALL ScScenariosObj::hasByName( const rtl::OUString& aName )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
SCTAB nIndex;
return GetScenarioIndex_Impl( aName, nIndex );
}
@@ -3768,3 +3723,4 @@ sal_Bool SAL_CALL ScScenariosObj::hasByName( const rtl::OUString& aName )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/drdefuno.cxx b/sc/source/ui/unoobj/drdefuno.cxx
index 52fce55dfc58..ee4a89baf76b 100644
--- a/sc/source/ui/unoobj/drdefuno.cxx
+++ b/sc/source/ui/unoobj/drdefuno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -81,3 +82,4 @@ SfxItemPool* ScDrawDefaultsObj::getModelPool( sal_Bool bReadOnly ) throw()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/editsrc.cxx b/sc/source/ui/unoobj/editsrc.cxx
index 7febe374d0d9..5e891ea37174 100644
--- a/sc/source/ui/unoobj/editsrc.cxx
+++ b/sc/source/ui/unoobj/editsrc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,6 +34,7 @@
#include "scitems.hxx"
#include <editeng/eeitem.hxx>
#include <editeng/unofored.hxx>
+#include <vcl/svapp.hxx>
#include <svx/svdpage.hxx>
#include <svx/svditer.hxx>
#include <svx/svdocapt.hxx>
@@ -45,7 +47,6 @@
#include "docfunc.hxx"
#include "hints.hxx"
#include "patattr.hxx"
-#include "unoguard.hxx"
#include "drwlayer.hxx"
#include "userdat.hxx"
#include "postit.hxx"
@@ -204,7 +205,7 @@ ScAnnotationEditSource::ScAnnotationEditSource(ScDocShell* pDocSh, const ScAddre
ScAnnotationEditSource::~ScAnnotationEditSource()
{
- ScUnoGuard aGuard; // needed for EditEngine dtor
+ SolarMutexGuard aGuard; // needed for EditEngine dtor
if (pDocShell)
pDocShell->GetDocument()->RemoveUnoObject(*this);
@@ -371,3 +372,4 @@ SfxBroadcaster& ScAccessibilityEditSource::GetBroadcaster() const
return mpAccessibleTextData->GetBroadcaster();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/eventuno.cxx b/sc/source/ui/unoobj/eventuno.cxx
index d7de00f4cc56..8f0b38c0eed9 100644
--- a/sc/source/ui/unoobj/eventuno.cxx
+++ b/sc/source/ui/unoobj/eventuno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,10 +34,10 @@
#include "eventuno.hxx"
#include "miscuno.hxx"
-#include "unoguard.hxx"
#include "docsh.hxx"
#include "sheetevents.hxx"
#include "unonames.hxx"
+#include <vcl/svapp.hxx>
using namespace ::com::sun::star;
@@ -84,7 +85,7 @@ void SAL_CALL ScSheetEventsObj::replaceByName( const rtl::OUString& aName, const
throw(lang::IllegalArgumentException, container::NoSuchElementException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (!mpDocShell)
throw uno::RuntimeException();
@@ -136,7 +137,7 @@ void SAL_CALL ScSheetEventsObj::replaceByName( const rtl::OUString& aName, const
uno::Any SAL_CALL ScSheetEventsObj::getByName( const rtl::OUString& aName )
throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
sal_Int32 nEvent = lcl_GetEventFromName(aName);
if (nEvent < 0)
throw container::NoSuchElementException();
@@ -167,7 +168,7 @@ uno::Any SAL_CALL ScSheetEventsObj::getByName( const rtl::OUString& aName )
uno::Sequence<rtl::OUString> SAL_CALL ScSheetEventsObj::getElementNames() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Sequence<rtl::OUString> aNames(SC_SHEETEVENT_COUNT);
for (sal_Int32 nEvent=0; nEvent<SC_SHEETEVENT_COUNT; ++nEvent)
aNames[nEvent] = ScSheetEvents::GetEventName(nEvent);
@@ -176,7 +177,7 @@ uno::Sequence<rtl::OUString> SAL_CALL ScSheetEventsObj::getElementNames() throw(
sal_Bool SAL_CALL ScSheetEventsObj::hasByName( const ::rtl::OUString& aName ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
sal_Int32 nEvent = lcl_GetEventFromName(aName);
return (nEvent >= 0);
}
@@ -185,13 +186,13 @@ sal_Bool SAL_CALL ScSheetEventsObj::hasByName( const ::rtl::OUString& aName ) th
uno::Type SAL_CALL ScSheetEventsObj::getElementType() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return getCppuType((uno::Sequence<beans::PropertyValue>*)0);
}
sal_Bool SAL_CALL ScSheetEventsObj::hasElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (mpDocShell)
return sal_True;
return sal_False;
@@ -199,3 +200,4 @@ sal_Bool SAL_CALL ScSheetEventsObj::hasElements() throw(uno::RuntimeException)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx
index 07a4cbda0230..3af71007dfcf 100644
--- a/sc/source/ui/unoobj/fielduno.cxx
+++ b/sc/source/ui/unoobj/fielduno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,6 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
#include <svl/smplhint.hxx>
+#include <vcl/svapp.hxx>
#include <editeng/eeitem.hxx>
@@ -50,7 +52,6 @@
#include "editsrc.hxx"
#include "cellsuno.hxx"
#include "servuno.hxx" // fuer IDs
-#include "unoguard.hxx"
#include "unonames.hxx"
#include "editutil.hxx"
@@ -309,7 +310,7 @@ ScCellFieldObj* ScCellFieldsObj::GetObjectByIndex_Impl(INT32 Index) const
sal_Int32 SAL_CALL ScCellFieldsObj::getCount() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
//! Feld-Funktionen muessen an den Forwarder !!!
ScEditEngineDefaulter* pEditEngine = ((ScCellEditSource*)pEditSource)->GetEditEngine();
@@ -322,7 +323,7 @@ uno::Any SAL_CALL ScCellFieldsObj::getByIndex( sal_Int32 nIndex )
throw(lang::IndexOutOfBoundsException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<text::XTextField> xField(GetObjectByIndex_Impl(nIndex));
if (xField.is())
return uno::makeAny(xField);
@@ -333,20 +334,20 @@ uno::Any SAL_CALL ScCellFieldsObj::getByIndex( sal_Int32 nIndex )
uno::Type SAL_CALL ScCellFieldsObj::getElementType() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return getCppuType((uno::Reference<text::XTextField>*)0);
}
sal_Bool SAL_CALL ScCellFieldsObj::hasElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ( getCount() != 0 );
}
uno::Reference<container::XEnumeration> SAL_CALL ScCellFieldsObj::createEnumeration()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScIndexEnumeration(this, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextFieldEnumeration")));
}
@@ -409,7 +410,7 @@ void SAL_CALL ScCellFieldsObj::addRefreshListener( const uno::Reference< util::X
{
if (xListener.is())
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (!mpRefreshListeners)
mpRefreshListeners = new cppu::OInterfaceContainerHelper(aMutex);
mpRefreshListeners->addInterface(xListener);
@@ -421,7 +422,7 @@ void SAL_CALL ScCellFieldsObj::removeRefreshListener( const uno::Reference<util:
{
if (xListener.is())
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (mpRefreshListeners)
mpRefreshListeners->removeInterface(xListener);
}
@@ -590,7 +591,7 @@ void ScCellFieldObj::DeleteField()
rtl::OUString SAL_CALL ScCellFieldObj::getPresentation( sal_Bool bShowCommand )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aRet;
if (pEditSource)
@@ -620,7 +621,7 @@ rtl::OUString SAL_CALL ScCellFieldObj::getPresentation( sal_Bool bShowCommand )
void SAL_CALL ScCellFieldObj::attach( const uno::Reference<text::XTextRange>& xTextRange )
throw(lang::IllegalArgumentException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (xTextRange.is())
{
uno::Reference<text::XText> xText(xTextRange->getText());
@@ -633,7 +634,7 @@ void SAL_CALL ScCellFieldObj::attach( const uno::Reference<text::XTextRange>& xT
uno::Reference<text::XTextRange> SAL_CALL ScCellFieldObj::getAnchor() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
return new ScCellObj( pDocShell, aCellPos );
return NULL;
@@ -665,7 +666,7 @@ void SAL_CALL ScCellFieldObj::removeEventListener(
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScCellFieldObj::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static uno::Reference<beans::XPropertySetInfo> aRef = pPropSet->getPropertySetInfo();
return aRef;
}
@@ -676,7 +677,7 @@ void SAL_CALL ScCellFieldObj::setPropertyValue(
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aNameString(aPropertyName);
rtl::OUString aStrVal;
if (pEditSource)
@@ -742,7 +743,7 @@ uno::Any SAL_CALL ScCellFieldObj::getPropertyValue( const rtl::OUString& aProper
throw(beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Any aRet;
String aNameString(aPropertyName);
@@ -947,7 +948,7 @@ ScHeaderFieldObj* ScHeaderFieldsObj::GetObjectByIndex_Impl(INT32 Index) const
sal_Int32 SAL_CALL ScHeaderFieldsObj::getCount() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
//! Feld-Funktionen muessen an den Forwarder !!!
ScEditEngineDefaulter* pEditEngine = ((ScHeaderFooterEditSource*)pEditSource)->GetEditEngine();
@@ -971,7 +972,7 @@ uno::Any SAL_CALL ScHeaderFieldsObj::getByIndex( sal_Int32 nIndex )
throw(lang::IndexOutOfBoundsException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<text::XTextField> xField(GetObjectByIndex_Impl(nIndex));
if (xField.is())
return uno::makeAny(xField);
@@ -982,20 +983,20 @@ uno::Any SAL_CALL ScHeaderFieldsObj::getByIndex( sal_Int32 nIndex )
uno::Type SAL_CALL ScHeaderFieldsObj::getElementType() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return getCppuType((uno::Reference<text::XTextField>*)0);
}
sal_Bool SAL_CALL ScHeaderFieldsObj::hasElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ( getCount() != 0 );
}
uno::Reference<container::XEnumeration> SAL_CALL ScHeaderFieldsObj::createEnumeration()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScIndexEnumeration(this, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextFieldEnumeration")));
}
@@ -1058,7 +1059,7 @@ void SAL_CALL ScHeaderFieldsObj::addRefreshListener( const uno::Reference< util:
{
if (xListener.is())
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (!mpRefreshListeners)
mpRefreshListeners = new cppu::OInterfaceContainerHelper(aMutex);
mpRefreshListeners->addInterface(xListener);
@@ -1070,7 +1071,7 @@ void SAL_CALL ScHeaderFieldsObj::removeRefreshListener( const uno::Reference<uti
{
if (xListener.is())
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (mpRefreshListeners)
mpRefreshListeners->removeInterface(xListener);
}
@@ -1282,7 +1283,7 @@ void ScHeaderFieldObj::DeleteField()
rtl::OUString SAL_CALL ScHeaderFieldObj::getPresentation( sal_Bool /* bShowCommand */ )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aRet;
if (pEditSource)
@@ -1301,7 +1302,7 @@ rtl::OUString SAL_CALL ScHeaderFieldObj::getPresentation( sal_Bool /* bShowComma
void SAL_CALL ScHeaderFieldObj::attach( const uno::Reference<text::XTextRange>& xTextRange )
throw(lang::IllegalArgumentException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (xTextRange.is())
{
uno::Reference<text::XText> xText(xTextRange->getText());
@@ -1314,7 +1315,7 @@ void SAL_CALL ScHeaderFieldObj::attach( const uno::Reference<text::XTextRange>&
uno::Reference<text::XTextRange> SAL_CALL ScHeaderFieldObj::getAnchor() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pContentObj)
{
uno::Reference<text::XText> xText;
@@ -1355,7 +1356,7 @@ void SAL_CALL ScHeaderFieldObj::removeEventListener(
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScHeaderFieldObj::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (nType == SC_SERVICE_FILEFIELD)
{
// file field has different properties
@@ -1375,7 +1376,7 @@ void SAL_CALL ScHeaderFieldObj::setPropertyValue(
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aNameString(aPropertyName);
if ( nType == SC_SERVICE_FILEFIELD && aNameString.EqualsAscii( SC_UNONAME_FILEFORM ) )
{
@@ -1408,7 +1409,7 @@ uno::Any SAL_CALL ScHeaderFieldObj::getPropertyValue( const rtl::OUString& aProp
throw(beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
//! Properties?
uno::Any aRet;
@@ -1526,3 +1527,4 @@ uno::Sequence<rtl::OUString> SAL_CALL ScHeaderFieldObj::getSupportedServiceNames
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/filtuno.cxx b/sc/source/ui/unoobj/filtuno.cxx
index 8c7402de370b..ed1880380089 100644
--- a/sc/source/ui/unoobj/filtuno.cxx
+++ b/sc/source/ui/unoobj/filtuno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,12 +34,12 @@
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
#include <tools/urlobj.hxx>
#include <vcl/msgbox.hxx>
+#include <vcl/svapp.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include "editutil.hxx"
#include "filtuno.hxx"
#include "miscuno.hxx"
-#include "unoguard.hxx"
#include "scdll.hxx"
#include "imoptdlg.hxx"
#include "asciiopt.hxx"
@@ -83,7 +84,7 @@ ScFilterOptionsObj::~ScFilterOptionsObj()
uno::Reference<uno::XInterface> SAL_CALL ScFilterOptionsObj_CreateInstance(
const uno::Reference<lang::XMultiServiceFactory>& )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDLL::Init();
return (::cppu::OWeakObject*) new ScFilterOptionsObj;
}
@@ -310,3 +311,4 @@ void SAL_CALL ScFilterOptionsObj::setSourceDocument( const uno::Reference<lang::
bExport = sal_True;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx
index ee828136cf14..72c10ee29c62 100644
--- a/sc/source/ui/unoobj/fmtuno.cxx
+++ b/sc/source/ui/unoobj/fmtuno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,6 +33,7 @@
#include <tools/debug.hxx>
#include <rtl/uuid.h>
+#include <vcl/svapp.hxx>
#include <com/sun/star/sheet/ValidationAlertStyle.hpp>
#include <com/sun/star/sheet/ValidationType.hpp>
@@ -41,7 +43,6 @@
#include "miscuno.hxx"
#include "validat.hxx"
#include "document.hxx"
-#include "unoguard.hxx"
#include "unonames.hxx"
#include "styleuno.hxx" // ScStyleNameConversion
#include "tokenarray.hxx"
@@ -257,7 +258,7 @@ void SAL_CALL ScTableConditionalFormat::addNew(
const uno::Sequence<beans::PropertyValue >& aConditionalEntry )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScCondFormatEntryItem aEntry;
aEntry.meMode = SC_COND_NONE;
@@ -354,7 +355,7 @@ void SAL_CALL ScTableConditionalFormat::addNew(
void SAL_CALL ScTableConditionalFormat::removeByIndex( sal_Int32 nIndex )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScTableConditionalEntry* pEntry = (ScTableConditionalEntry*)aEntries.GetObject(nIndex);
if (pEntry)
{
@@ -366,7 +367,7 @@ void SAL_CALL ScTableConditionalFormat::removeByIndex( sal_Int32 nIndex )
void SAL_CALL ScTableConditionalFormat::clear() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScTableConditionalEntry* pEntry;
aEntries.First();
while ( ( pEntry = (ScTableConditionalEntry*)aEntries.Remove() ) != NULL )
@@ -380,7 +381,7 @@ void SAL_CALL ScTableConditionalFormat::clear() throw(uno::RuntimeException)
uno::Reference<container::XEnumeration> SAL_CALL ScTableConditionalFormat::createEnumeration()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScIndexEnumeration(this, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.TableConditionalEntryEnumeration")));
}
@@ -388,7 +389,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScTableConditionalFormat::creat
sal_Int32 SAL_CALL ScTableConditionalFormat::getCount() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return aEntries.Count();
}
@@ -396,7 +397,7 @@ uno::Any SAL_CALL ScTableConditionalFormat::getByIndex( sal_Int32 nIndex )
throw(lang::IndexOutOfBoundsException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<sheet::XSheetConditionalEntry> xEntry(GetObjectByIndex_Impl((USHORT)nIndex));
if (xEntry.is())
return uno::makeAny(xEntry);
@@ -407,13 +408,13 @@ uno::Any SAL_CALL ScTableConditionalFormat::getByIndex( sal_Int32 nIndex )
uno::Type SAL_CALL ScTableConditionalFormat::getElementType() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return getCppuType((uno::Reference<sheet::XSheetConditionalEntry>*)0);
}
sal_Bool SAL_CALL ScTableConditionalFormat::hasElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ( getCount() != 0 );
}
@@ -431,7 +432,7 @@ uno::Any SAL_CALL ScTableConditionalFormat::getByName( const rtl::OUString& aNam
throw(container::NoSuchElementException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<sheet::XSheetConditionalEntry> xEntry;
long nCount = aEntries.Count();
@@ -452,7 +453,7 @@ uno::Any SAL_CALL ScTableConditionalFormat::getByName( const rtl::OUString& aNam
uno::Sequence<rtl::OUString> SAL_CALL ScTableConditionalFormat::getElementNames()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
long nCount = aEntries.Count();
uno::Sequence<rtl::OUString> aNames(nCount);
@@ -466,7 +467,7 @@ uno::Sequence<rtl::OUString> SAL_CALL ScTableConditionalFormat::getElementNames(
sal_Bool SAL_CALL ScTableConditionalFormat::hasByName( const rtl::OUString& aName )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
long nCount = aEntries.Count();
for (long i=0; i<nCount; i++)
@@ -545,14 +546,14 @@ void ScTableConditionalEntry::GetData(ScCondFormatEntryItem& rData) const
sheet::ConditionOperator SAL_CALL ScTableConditionalEntry::getOperator()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return lcl_ConditionModeToOperator( aData.meMode );
}
void SAL_CALL ScTableConditionalEntry::setOperator( sheet::ConditionOperator nOperator )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
aData.meMode = lcl_ConditionOperatorToMode( nOperator );
if (pParent)
pParent->DataChanged();
@@ -560,14 +561,14 @@ void SAL_CALL ScTableConditionalEntry::setOperator( sheet::ConditionOperator nOp
rtl::OUString SAL_CALL ScTableConditionalEntry::getFormula1() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return aData.maExpr1;
}
void SAL_CALL ScTableConditionalEntry::setFormula1( const rtl::OUString& aFormula1 )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
aData.maExpr1 = String( aFormula1 );
if (pParent)
pParent->DataChanged();
@@ -575,14 +576,14 @@ void SAL_CALL ScTableConditionalEntry::setFormula1( const rtl::OUString& aFormul
rtl::OUString SAL_CALL ScTableConditionalEntry::getFormula2() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return aData.maExpr2;
}
void SAL_CALL ScTableConditionalEntry::setFormula2( const rtl::OUString& aFormula2 )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
aData.maExpr2 = String( aFormula2 );
if (pParent)
pParent->DataChanged();
@@ -590,7 +591,7 @@ void SAL_CALL ScTableConditionalEntry::setFormula2( const rtl::OUString& aFormul
table::CellAddress SAL_CALL ScTableConditionalEntry::getSourcePosition() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
table::CellAddress aRet;
aRet.Column = aData.maPos.Col();
aRet.Row = aData.maPos.Row();
@@ -601,7 +602,7 @@ table::CellAddress SAL_CALL ScTableConditionalEntry::getSourcePosition() throw(u
void SAL_CALL ScTableConditionalEntry::setSourcePosition( const table::CellAddress& aSourcePosition )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
aData.maPos.Set( (SCCOL)aSourcePosition.Column, (SCROW)aSourcePosition.Row, aSourcePosition.Sheet );
if (pParent)
pParent->DataChanged();
@@ -611,14 +612,14 @@ void SAL_CALL ScTableConditionalEntry::setSourcePosition( const table::CellAddre
rtl::OUString SAL_CALL ScTableConditionalEntry::getStyleName() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ScStyleNameConversion::DisplayToProgrammaticName( aData.maStyle, SFX_STYLE_FAMILY_PARA );
}
void SAL_CALL ScTableConditionalEntry::setStyleName( const rtl::OUString& aStyleName )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
aData.maStyle = ScStyleNameConversion::ProgrammaticToDisplayName( aStyleName, SFX_STYLE_FAMILY_PARA );
if (pParent)
pParent->DataChanged();
@@ -744,49 +745,49 @@ void ScTableValidationObj::DataChanged()
sheet::ConditionOperator SAL_CALL ScTableValidationObj::getOperator()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return lcl_ConditionModeToOperator( (ScConditionMode)nMode );
}
void SAL_CALL ScTableValidationObj::setOperator( sheet::ConditionOperator nOperator )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
nMode = sal::static_int_cast<USHORT>( lcl_ConditionOperatorToMode( nOperator ) );
DataChanged();
}
rtl::OUString SAL_CALL ScTableValidationObj::getFormula1() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return aExpr1;
}
void SAL_CALL ScTableValidationObj::setFormula1( const rtl::OUString& aFormula1 )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
aExpr1 = String( aFormula1 );
DataChanged();
}
rtl::OUString SAL_CALL ScTableValidationObj::getFormula2() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return aExpr2;
}
void SAL_CALL ScTableValidationObj::setFormula2( const rtl::OUString& aFormula2 )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
aExpr2 = String( aFormula2 );
DataChanged();
}
table::CellAddress SAL_CALL ScTableValidationObj::getSourcePosition() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
table::CellAddress aRet;
aRet.Column = aSrcPos.Col();
aRet.Row = aSrcPos.Row();
@@ -797,7 +798,7 @@ table::CellAddress SAL_CALL ScTableValidationObj::getSourcePosition() throw(uno:
void SAL_CALL ScTableValidationObj::setSourcePosition( const table::CellAddress& aSourcePosition )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
aSrcPos.Set( (SCCOL)aSourcePosition.Column, (SCROW)aSourcePosition.Row, aSourcePosition.Sheet );
DataChanged();
}
@@ -805,7 +806,7 @@ void SAL_CALL ScTableValidationObj::setSourcePosition( const table::CellAddress&
uno::Sequence<sheet::FormulaToken> SAL_CALL ScTableValidationObj::getTokens( sal_Int32 nIndex )
throw(uno::RuntimeException,lang::IndexOutOfBoundsException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (nIndex >= 2 || nIndex < 0)
throw lang::IndexOutOfBoundsException();
@@ -815,7 +816,7 @@ uno::Sequence<sheet::FormulaToken> SAL_CALL ScTableValidationObj::getTokens( sal
void SAL_CALL ScTableValidationObj::setTokens( sal_Int32 nIndex, const uno::Sequence<sheet::FormulaToken>& aTokens )
throw(uno::RuntimeException,lang::IndexOutOfBoundsException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (nIndex >= 2 || nIndex < 0)
throw lang::IndexOutOfBoundsException();
@@ -839,7 +840,7 @@ sal_Int32 SAL_CALL ScTableValidationObj::getCount() throw(uno::RuntimeException)
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScTableValidationObj::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static uno::Reference<beans::XPropertySetInfo> aRef(
new SfxItemPropertySetInfo( aPropSet.getPropertyMap() ));
return aRef;
@@ -851,7 +852,7 @@ void SAL_CALL ScTableValidationObj::setPropertyValue(
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aString(aPropertyName);
if ( aString.EqualsAscii( SC_UNONAME_SHOWINP ) ) bShowInput = ScUnoHelpFunctions::GetBoolFromAny( aValue );
@@ -966,7 +967,7 @@ uno::Any SAL_CALL ScTableValidationObj::getPropertyValue( const rtl::OUString& a
throw(beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aString(aPropertyName);
uno::Any aRet;
@@ -1059,3 +1060,4 @@ ScTableValidationObj* ScTableValidationObj::getImplementation(
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/forbiuno.cxx b/sc/source/ui/unoobj/forbiuno.cxx
index 2807a12f7dac..1a03a0d57acb 100644
--- a/sc/source/ui/unoobj/forbiuno.cxx
+++ b/sc/source/ui/unoobj/forbiuno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,14 +40,14 @@ using namespace ::com::sun::star;
//------------------------------------------------------------------------
-vos::ORef<SvxForbiddenCharactersTable> lcl_GetForbidden( ScDocShell* pDocSh )
+rtl::Reference<SvxForbiddenCharactersTable> lcl_GetForbidden( ScDocShell* pDocSh )
{
- vos::ORef<SvxForbiddenCharactersTable> xRet;
+ rtl::Reference<SvxForbiddenCharactersTable> xRet;
if ( pDocSh )
{
ScDocument* pDoc = pDocSh->GetDocument();
xRet = pDoc->GetForbiddenCharacters();
- if ( !xRet.isValid() )
+ if ( !xRet.is() )
{
// create an empty SvxForbiddenCharactersTable for SvxUnoForbiddenCharsTable,
// so changes can be stored.
@@ -91,3 +92,4 @@ void ScForbiddenCharsObj::onChange()
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx
index 7012b477050c..7b1efbd8e20f 100644
--- a/sc/source/ui/unoobj/funcuno.cxx
+++ b/sc/source/ui/unoobj/funcuno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,7 +39,6 @@
#include "funcuno.hxx"
#include "miscuno.hxx"
#include "cellsuno.hxx"
-#include "unoguard.hxx"
#include "scdll.hxx"
#include "document.hxx"
#include "compiler.hxx"
@@ -254,7 +254,7 @@ void ScFunctionAccess::Notify( SfxBroadcaster&, const SfxHint& rHint )
uno::Reference<uno::XInterface> SAL_CALL ScFunctionAccess_CreateInstance(
const uno::Reference<lang::XMultiServiceFactory>& )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDLL::Init();
static uno::Reference< uno::XInterface > xInst((::cppu::OWeakObject*) new ScFunctionAccess);
return xInst;
@@ -303,7 +303,7 @@ uno::Sequence<rtl::OUString> SAL_CALL ScFunctionAccess::getSupportedServiceNames
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScFunctionAccess::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static uno::Reference<beans::XPropertySetInfo> aRef(
new SfxItemPropertySetInfo( &aPropertyMap ));
return aRef;
@@ -315,7 +315,7 @@ void SAL_CALL ScFunctionAccess::setPropertyValue(
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsArrayFunction" ) ) )
{
@@ -339,7 +339,7 @@ uno::Any SAL_CALL ScFunctionAccess::getPropertyValue( const rtl::OUString& aProp
throw(beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsArrayFunction" ) ) )
return uno::Any( mbArray );
@@ -535,7 +535,7 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const rtl::OUString& aName,
throw(container::NoSuchElementException, lang::IllegalArgumentException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (!mbValid)
throw uno::RuntimeException();
@@ -743,3 +743,4 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const rtl::OUString& aName,
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx
index a119eda13a32..9f5d7a5dd1c2 100644
--- a/sc/source/ui/unoobj/linkuno.cxx
+++ b/sc/source/ui/unoobj/linkuno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,6 +33,7 @@
#include <svl/smplhint.hxx>
#include <sfx2/linkmgr.hxx>
+#include <vcl/svapp.hxx>
#include "linkuno.hxx"
#include "miscuno.hxx"
@@ -41,7 +43,6 @@
#include "collect.hxx"
#include "tablink.hxx"
#include "arealink.hxx"
-#include "unoguard.hxx"
#include "hints.hxx"
#include "unonames.hxx"
#include "rangeseq.hxx"
@@ -148,13 +149,13 @@ ScTableLink* ScSheetLinkObj::GetLink_Impl() const
rtl::OUString SAL_CALL ScSheetLinkObj::getName() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return getFileName(); // Name ist der Dateiname (URL)
}
void SAL_CALL ScSheetLinkObj::setName( const rtl::OUString& aName ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
setFileName(aName); // Name ist der Dateiname (URL)
}
@@ -162,7 +163,7 @@ void SAL_CALL ScSheetLinkObj::setName( const rtl::OUString& aName ) throw(uno::R
void SAL_CALL ScSheetLinkObj::refresh() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScTableLink* pLink = GetLink_Impl();
if (pLink)
pLink->Refresh( pLink->GetFileName(), pLink->GetFilterName(), NULL, pLink->GetRefreshDelay() );
@@ -172,7 +173,7 @@ void SAL_CALL ScSheetLinkObj::addRefreshListener(
const uno::Reference<util::XRefreshListener >& xListener )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<util::XRefreshListener>* pObj =
new uno::Reference<util::XRefreshListener>( xListener );
aRefreshListeners.Insert( pObj, aRefreshListeners.Count() );
@@ -186,7 +187,7 @@ void SAL_CALL ScSheetLinkObj::removeRefreshListener(
const uno::Reference<util::XRefreshListener >& xListener )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
USHORT nCount = aRefreshListeners.Count();
for ( USHORT n=nCount; n--; )
{
@@ -221,7 +222,7 @@ void ScSheetLinkObj::ModifyRefreshDelay_Impl( sal_Int32 nRefresh )
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScSheetLinkObj::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static uno::Reference<beans::XPropertySetInfo> aRef(
new SfxItemPropertySetInfo( aPropSet.getPropertyMap() ));
return aRef;
@@ -233,7 +234,7 @@ void SAL_CALL ScSheetLinkObj::setPropertyValue(
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aNameString(aPropertyName);
rtl::OUString aValStr;
if ( aNameString.EqualsAscii( SC_UNONAME_LINKURL ) )
@@ -269,7 +270,7 @@ uno::Any SAL_CALL ScSheetLinkObj::getPropertyValue( const rtl::OUString& aProper
throw(beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aNameString(aPropertyName);
uno::Any aRet;
if ( aNameString.EqualsAscii( SC_UNONAME_LINKURL ) )
@@ -291,13 +292,13 @@ SC_IMPL_DUMMY_PROPERTY_LISTENER( ScSheetLinkObj )
rtl::OUString ScSheetLinkObj::getFileName(void) const
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return aFileName;
}
void ScSheetLinkObj::setFileName(const rtl::OUString& rNewName)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScTableLink* pLink = GetLink_Impl();
if (pLink)
{
@@ -334,7 +335,7 @@ void ScSheetLinkObj::setFileName(const rtl::OUString& rNewName)
rtl::OUString ScSheetLinkObj::getFilter(void) const
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
rtl::OUString aRet;
ScTableLink* pLink = GetLink_Impl();
if (pLink)
@@ -344,7 +345,7 @@ rtl::OUString ScSheetLinkObj::getFilter(void) const
void ScSheetLinkObj::setFilter(const rtl::OUString& Filter)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScTableLink* pLink = GetLink_Impl();
if (pLink)
{
@@ -355,7 +356,7 @@ void ScSheetLinkObj::setFilter(const rtl::OUString& Filter)
rtl::OUString ScSheetLinkObj::getFilterOptions(void) const
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
rtl::OUString aRet;
ScTableLink* pLink = GetLink_Impl();
if (pLink)
@@ -365,7 +366,7 @@ rtl::OUString ScSheetLinkObj::getFilterOptions(void) const
void ScSheetLinkObj::setFilterOptions(const rtl::OUString& FilterOptions)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScTableLink* pLink = GetLink_Impl();
if (pLink)
{
@@ -376,7 +377,7 @@ void ScSheetLinkObj::setFilterOptions(const rtl::OUString& FilterOptions)
sal_Int32 ScSheetLinkObj::getRefreshDelay(void) const
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
sal_Int32 nRet = 0;
ScTableLink* pLink = GetLink_Impl();
if (pLink)
@@ -386,7 +387,7 @@ sal_Int32 ScSheetLinkObj::getRefreshDelay(void) const
void ScSheetLinkObj::setRefreshDelay(sal_Int32 nRefreshDelay)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ModifyRefreshDelay_Impl( nRefreshDelay );
}
@@ -471,7 +472,7 @@ ScSheetLinkObj* ScSheetLinksObj::GetObjectByName_Impl(const rtl::OUString& aName
uno::Reference<container::XEnumeration> SAL_CALL ScSheetLinksObj::createEnumeration()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScIndexEnumeration(this, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.SheetLinksEnumeration")));
}
@@ -479,7 +480,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScSheetLinksObj::createEnumerat
sal_Int32 SAL_CALL ScSheetLinksObj::getCount() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
INT32 nCount = 0;
if (pDocShell)
{
@@ -504,7 +505,7 @@ uno::Any SAL_CALL ScSheetLinksObj::getByIndex( sal_Int32 nIndex )
throw(lang::IndexOutOfBoundsException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<beans::XPropertySet> xLink(GetObjectByIndex_Impl(nIndex));
if (xLink.is())
return uno::makeAny(xLink);
@@ -515,13 +516,13 @@ uno::Any SAL_CALL ScSheetLinksObj::getByIndex( sal_Int32 nIndex )
uno::Type SAL_CALL ScSheetLinksObj::getElementType() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return getCppuType((uno::Reference<beans::XPropertySet>*)0);
}
sal_Bool SAL_CALL ScSheetLinksObj::hasElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ( getCount() != 0 );
}
@@ -529,7 +530,7 @@ uno::Any SAL_CALL ScSheetLinksObj::getByName( const rtl::OUString& aName )
throw(container::NoSuchElementException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<beans::XPropertySet> xLink(GetObjectByName_Impl(aName));
if (xLink.is())
return uno::makeAny(xLink);
@@ -541,7 +542,7 @@ uno::Any SAL_CALL ScSheetLinksObj::getByName( const rtl::OUString& aName )
sal_Bool SAL_CALL ScSheetLinksObj::hasByName( const rtl::OUString& aName )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
// Name ist der Dateiname
if (pDocShell)
@@ -564,7 +565,7 @@ sal_Bool SAL_CALL ScSheetLinksObj::hasByName( const rtl::OUString& aName )
uno::Sequence<rtl::OUString> SAL_CALL ScSheetLinksObj::getElementNames() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
// Name ist der Dateiname
if (pDocShell)
@@ -713,7 +714,7 @@ void ScAreaLinkObj::ModifyRefreshDelay_Impl( sal_Int32 nRefresh )
void SAL_CALL ScAreaLinkObj::refresh() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScAreaLink* pLink = lcl_GetAreaLink(pDocShell, nPos);
if (pLink)
pLink->Refresh( pLink->GetFile(), pLink->GetFilter(), pLink->GetSource(), pLink->GetRefreshDelay() );
@@ -723,7 +724,7 @@ void SAL_CALL ScAreaLinkObj::addRefreshListener(
const uno::Reference<util::XRefreshListener >& xListener )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<util::XRefreshListener>* pObj =
new uno::Reference<util::XRefreshListener>( xListener );
aRefreshListeners.Insert( pObj, aRefreshListeners.Count() );
@@ -737,7 +738,7 @@ void SAL_CALL ScAreaLinkObj::removeRefreshListener(
const uno::Reference<util::XRefreshListener >& xListener )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
USHORT nCount = aRefreshListeners.Count();
for ( USHORT n=nCount; n--; )
{
@@ -765,7 +766,7 @@ void ScAreaLinkObj::Refreshed_Impl()
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScAreaLinkObj::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static uno::Reference<beans::XPropertySetInfo> aRef(
new SfxItemPropertySetInfo( aPropSet.getPropertyMap() ));
return aRef;
@@ -777,7 +778,7 @@ void SAL_CALL ScAreaLinkObj::setPropertyValue(
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aNameString(aPropertyName);
rtl::OUString aValStr;
if ( aNameString.EqualsAscii( SC_UNONAME_LINKURL ) )
@@ -813,7 +814,7 @@ uno::Any SAL_CALL ScAreaLinkObj::getPropertyValue( const rtl::OUString& aPropert
throw(beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aNameString(aPropertyName);
uno::Any aRet;
if ( aNameString.EqualsAscii( SC_UNONAME_LINKURL ) )
@@ -835,7 +836,7 @@ SC_IMPL_DUMMY_PROPERTY_LISTENER( ScAreaLinkObj )
rtl::OUString ScAreaLinkObj::getFileName(void) const
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
rtl::OUString aRet;
ScAreaLink* pLink = lcl_GetAreaLink(pDocShell, nPos);
if (pLink)
@@ -845,13 +846,13 @@ rtl::OUString ScAreaLinkObj::getFileName(void) const
void ScAreaLinkObj::setFileName(const rtl::OUString& rNewName)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
Modify_Impl( &rNewName, NULL, NULL, NULL, NULL );
}
rtl::OUString ScAreaLinkObj::getFilter(void) const
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
rtl::OUString aRet;
ScAreaLink* pLink = lcl_GetAreaLink(pDocShell, nPos);
if (pLink)
@@ -861,13 +862,13 @@ rtl::OUString ScAreaLinkObj::getFilter(void) const
void ScAreaLinkObj::setFilter(const rtl::OUString& Filter)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
Modify_Impl( NULL, &Filter, NULL, NULL, NULL );
}
rtl::OUString ScAreaLinkObj::getFilterOptions(void) const
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
rtl::OUString aRet;
ScAreaLink* pLink = lcl_GetAreaLink(pDocShell, nPos);
if (pLink)
@@ -877,13 +878,13 @@ rtl::OUString ScAreaLinkObj::getFilterOptions(void) const
void ScAreaLinkObj::setFilterOptions(const rtl::OUString& FilterOptions)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
Modify_Impl( NULL, NULL, &FilterOptions, NULL, NULL );
}
sal_Int32 ScAreaLinkObj::getRefreshDelay(void) const
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
sal_Int32 nRet = 0;
ScAreaLink* pLink = lcl_GetAreaLink(pDocShell, nPos);
if (pLink)
@@ -893,7 +894,7 @@ sal_Int32 ScAreaLinkObj::getRefreshDelay(void) const
void ScAreaLinkObj::setRefreshDelay(sal_Int32 nRefreshDelay)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ModifyRefreshDelay_Impl( nRefreshDelay );
}
@@ -901,7 +902,7 @@ void ScAreaLinkObj::setRefreshDelay(sal_Int32 nRefreshDelay)
rtl::OUString SAL_CALL ScAreaLinkObj::getSourceArea() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
rtl::OUString aRet;
ScAreaLink* pLink = lcl_GetAreaLink(pDocShell, nPos);
if (pLink)
@@ -912,13 +913,13 @@ rtl::OUString SAL_CALL ScAreaLinkObj::getSourceArea() throw(uno::RuntimeExceptio
void SAL_CALL ScAreaLinkObj::setSourceArea( const rtl::OUString& aSourceArea )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
Modify_Impl( NULL, NULL, NULL, &aSourceArea, NULL );
}
table::CellRangeAddress SAL_CALL ScAreaLinkObj::getDestArea() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
table::CellRangeAddress aRet;
ScAreaLink* pLink = lcl_GetAreaLink(pDocShell, nPos);
if (pLink)
@@ -929,7 +930,7 @@ table::CellRangeAddress SAL_CALL ScAreaLinkObj::getDestArea() throw(uno::Runtime
void SAL_CALL ScAreaLinkObj::setDestArea( const table::CellRangeAddress& aDestArea )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
Modify_Impl( NULL, NULL, NULL, NULL, &aDestArea );
}
@@ -975,7 +976,7 @@ void SAL_CALL ScAreaLinksObj::insertAtPosition( const table::CellAddress& aDestP
const rtl::OUString& aFilterOptions )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
{
String aFileStr (aFileName);
@@ -995,7 +996,7 @@ void SAL_CALL ScAreaLinksObj::insertAtPosition( const table::CellAddress& aDestP
void SAL_CALL ScAreaLinksObj::removeByIndex( sal_Int32 nIndex ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScAreaLink* pLink = lcl_GetAreaLink(pDocShell, (USHORT)nIndex);
if (pLink)
{
@@ -1011,7 +1012,7 @@ void SAL_CALL ScAreaLinksObj::removeByIndex( sal_Int32 nIndex ) throw(uno::Runti
uno::Reference<container::XEnumeration> SAL_CALL ScAreaLinksObj::createEnumeration()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScIndexEnumeration(this, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.CellAreaLinksEnumeration")));
}
@@ -1019,7 +1020,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScAreaLinksObj::createEnumerati
sal_Int32 SAL_CALL ScAreaLinksObj::getCount() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
INT32 nAreaCount = 0;
if (pDocShell)
{
@@ -1039,7 +1040,7 @@ uno::Any SAL_CALL ScAreaLinksObj::getByIndex( sal_Int32 nIndex )
throw(lang::IndexOutOfBoundsException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<sheet::XAreaLink> xLink(GetObjectByIndex_Impl(nIndex));
if (xLink.is())
return uno::makeAny(xLink);
@@ -1050,13 +1051,13 @@ uno::Any SAL_CALL ScAreaLinksObj::getByIndex( sal_Int32 nIndex )
uno::Type SAL_CALL ScAreaLinksObj::getElementType() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return getCppuType((uno::Reference<sheet::XAreaLink>*)0);
}
sal_Bool SAL_CALL ScAreaLinksObj::hasElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ( getCount() != 0 );
}
@@ -1114,7 +1115,7 @@ String lcl_BuildDDEName( const String& rAppl, const String& rTopic, const String
rtl::OUString SAL_CALL ScDDELinkObj::getName() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return lcl_BuildDDEName( aAppl, aTopic, aItem );
}
@@ -1128,7 +1129,7 @@ void SAL_CALL ScDDELinkObj::setName( const rtl::OUString& /* aName */ ) throw(un
rtl::OUString SAL_CALL ScDDELinkObj::getApplication() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
//! Test, ob Link noch im Dokument enthalten?
return aAppl;
@@ -1136,7 +1137,7 @@ rtl::OUString SAL_CALL ScDDELinkObj::getApplication() throw(uno::RuntimeExceptio
rtl::OUString SAL_CALL ScDDELinkObj::getTopic() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
//! Test, ob Link noch im Dokument enthalten?
return aTopic;
@@ -1144,7 +1145,7 @@ rtl::OUString SAL_CALL ScDDELinkObj::getTopic() throw(uno::RuntimeException)
rtl::OUString SAL_CALL ScDDELinkObj::getItem() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
//! Test, ob Link noch im Dokument enthalten?
return aItem;
@@ -1154,7 +1155,7 @@ rtl::OUString SAL_CALL ScDDELinkObj::getItem() throw(uno::RuntimeException)
void SAL_CALL ScDDELinkObj::refresh() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
{
ScDocument* pDoc = pDocShell->GetDocument();
@@ -1167,7 +1168,7 @@ void SAL_CALL ScDDELinkObj::addRefreshListener(
const uno::Reference<util::XRefreshListener >& xListener )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<util::XRefreshListener>* pObj =
new uno::Reference<util::XRefreshListener>( xListener );
aRefreshListeners.Insert( pObj, aRefreshListeners.Count() );
@@ -1181,7 +1182,7 @@ void SAL_CALL ScDDELinkObj::removeRefreshListener(
const uno::Reference<util::XRefreshListener >& xListener )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
USHORT nCount = aRefreshListeners.Count();
for ( USHORT n=nCount; n--; )
{
@@ -1201,7 +1202,7 @@ void SAL_CALL ScDDELinkObj::removeRefreshListener(
uno::Sequence< uno::Sequence< uno::Any > > ScDDELinkObj::getResults( )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Sequence< uno::Sequence< uno::Any > > aReturn;
bool bSuccess = false;
@@ -1240,7 +1241,7 @@ uno::Sequence< uno::Sequence< uno::Any > > ScDDELinkObj::getResults( )
void ScDDELinkObj::setResults( const uno::Sequence< uno::Sequence< uno::Any > >& aResults )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
bool bSuccess = false;
if ( pDocShell )
@@ -1338,7 +1339,7 @@ ScDDELinkObj* ScDDELinksObj::GetObjectByName_Impl(const rtl::OUString& aName)
uno::Reference<container::XEnumeration> SAL_CALL ScDDELinksObj::createEnumeration()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScIndexEnumeration(this, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.DDELinksEnumeration")));
}
@@ -1346,7 +1347,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScDDELinksObj::createEnumeratio
sal_Int32 SAL_CALL ScDDELinksObj::getCount() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
INT32 nAreaCount = 0;
if (pDocShell)
nAreaCount = pDocShell->GetDocument()->GetDdeLinkCount();
@@ -1357,7 +1358,7 @@ uno::Any SAL_CALL ScDDELinksObj::getByIndex( sal_Int32 nIndex )
throw(lang::IndexOutOfBoundsException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<sheet::XDDELink> xLink(GetObjectByIndex_Impl(nIndex));
if (xLink.is())
return uno::makeAny(xLink);
@@ -1368,13 +1369,13 @@ uno::Any SAL_CALL ScDDELinksObj::getByIndex( sal_Int32 nIndex )
uno::Type SAL_CALL ScDDELinksObj::getElementType() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return getCppuType((uno::Reference<sheet::XDDELink>*)0);
}
sal_Bool SAL_CALL ScDDELinksObj::hasElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ( getCount() != 0 );
}
@@ -1382,7 +1383,7 @@ uno::Any SAL_CALL ScDDELinksObj::getByName( const rtl::OUString& aName )
throw(container::NoSuchElementException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<sheet::XDDELink> xLink(GetObjectByName_Impl(aName));
if (xLink.is())
return uno::makeAny(xLink);
@@ -1393,7 +1394,7 @@ uno::Any SAL_CALL ScDDELinksObj::getByName( const rtl::OUString& aName )
uno::Sequence<rtl::OUString> SAL_CALL ScDDELinksObj::getElementNames() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
{
String aAppl, aTopic, aItem;
@@ -1416,7 +1417,7 @@ uno::Sequence<rtl::OUString> SAL_CALL ScDDELinksObj::getElementNames() throw(uno
sal_Bool SAL_CALL ScDDELinksObj::hasByName( const rtl::OUString& aName )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
{
String aNamStr(aName);
@@ -1441,7 +1442,7 @@ uno::Reference< sheet::XDDELink > ScDDELinksObj::addDDELink(
const ::rtl::OUString& aItem, ::com::sun::star::sheet::DDELinkMode nMode )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference< sheet::XDDELink > xLink;
if ( pDocShell )
@@ -1506,7 +1507,7 @@ ScExternalSheetCacheObj::~ScExternalSheetCacheObj()
void SAL_CALL ScExternalSheetCacheObj::setCellValue(sal_Int32 nCol, sal_Int32 nRow, const Any& rValue)
throw (IllegalArgumentException, RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (nRow < 0 || nCol < 0)
throw IllegalArgumentException();
@@ -1527,7 +1528,7 @@ void SAL_CALL ScExternalSheetCacheObj::setCellValue(sal_Int32 nCol, sal_Int32 nR
Any SAL_CALL ScExternalSheetCacheObj::getCellValue(sal_Int32 nCol, sal_Int32 nRow)
throw (IllegalArgumentException, RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (nRow < 0 || nCol < 0)
throw IllegalArgumentException();
@@ -1559,7 +1560,7 @@ Any SAL_CALL ScExternalSheetCacheObj::getCellValue(sal_Int32 nCol, sal_Int32 nRo
Sequence< sal_Int32 > SAL_CALL ScExternalSheetCacheObj::getAllRows()
throw (RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
vector<SCROW> aRows;
mpTable->getAllRows(aRows);
size_t nSize = aRows.size();
@@ -1573,7 +1574,7 @@ Sequence< sal_Int32 > SAL_CALL ScExternalSheetCacheObj::getAllRows()
Sequence< sal_Int32 > SAL_CALL ScExternalSheetCacheObj::getAllColumns(sal_Int32 nRow)
throw (IllegalArgumentException, RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (nRow < 0)
throw IllegalArgumentException();
@@ -1608,7 +1609,7 @@ Reference< sheet::XExternalSheetCache > SAL_CALL ScExternalDocLinkObj::addSheetC
const OUString& aSheetName, sal_Bool bDynamicCache )
throw (RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
size_t nIndex = 0;
ScExternalRefCache::TableTypeRef pTable = mpRefMgr->getCacheTable(mnFileId, aSheetName, true, &nIndex);
if (!bDynamicCache)
@@ -1622,7 +1623,7 @@ Reference< sheet::XExternalSheetCache > SAL_CALL ScExternalDocLinkObj::addSheetC
Any SAL_CALL ScExternalDocLinkObj::getByName(const::rtl::OUString &aName)
throw (container::NoSuchElementException, lang::WrappedTargetException, RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
size_t nIndex = 0;
ScExternalRefCache::TableTypeRef pTable = mpRefMgr->getCacheTable(mnFileId, aName, false, &nIndex);
if (!pTable)
@@ -1638,7 +1639,7 @@ Any SAL_CALL ScExternalDocLinkObj::getByName(const::rtl::OUString &aName)
Sequence< OUString > SAL_CALL ScExternalDocLinkObj::getElementNames()
throw (RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
vector<String> aTabNames;
mpRefMgr->getAllCachedTableNames(mnFileId, aTabNames);
size_t n = aTabNames.size();
@@ -1651,21 +1652,21 @@ Sequence< OUString > SAL_CALL ScExternalDocLinkObj::getElementNames()
sal_Bool SAL_CALL ScExternalDocLinkObj::hasByName(const OUString &aName)
throw (RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return static_cast<sal_Bool>(mpRefMgr->hasCacheTable(mnFileId, aName));
}
sal_Int32 SAL_CALL ScExternalDocLinkObj::getCount()
throw (RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return static_cast<sal_Int32>(mpRefMgr->getCacheTableCount(mnFileId));
}
Any SAL_CALL ScExternalDocLinkObj::getByIndex(sal_Int32 nIndex)
throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
size_t nTabCount = mpRefMgr->getCacheTableCount(mnFileId);
if (nIndex < 0 || nIndex >= static_cast<sal_Int32>(nTabCount))
throw lang::IndexOutOfBoundsException();
@@ -1684,7 +1685,7 @@ Any SAL_CALL ScExternalDocLinkObj::getByIndex(sal_Int32 nIndex)
Reference< container::XEnumeration > SAL_CALL ScExternalDocLinkObj::createEnumeration()
throw (RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
Reference< container::XEnumeration > aRef(
new ScIndexEnumeration(this, OUString::createFromAscii(
"com.sun.star.sheet.ExternalDocLink")));
@@ -1694,14 +1695,14 @@ Reference< container::XEnumeration > SAL_CALL ScExternalDocLinkObj::createEnumer
uno::Type SAL_CALL ScExternalDocLinkObj::getElementType()
throw (RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return getCppuType(static_cast<Reference<sheet::XExternalDocLink>*>(0));
}
sal_Bool SAL_CALL ScExternalDocLinkObj::hasElements()
throw (RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return static_cast<sal_Bool>(mpRefMgr->getCacheTableCount(mnFileId) > 0);
}
@@ -1727,7 +1728,7 @@ Reference< sheet::XExternalDocLink > SAL_CALL ScExternalDocLinksObj::addDocLink(
const OUString& aDocName )
throw (RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
sal_uInt16 nFileId = mpRefMgr->getExternalFileId(aDocName);
Reference< sheet::XExternalDocLink > aDocLink(new ScExternalDocLinkObj(mpRefMgr, nFileId));
return aDocLink;
@@ -1736,7 +1737,7 @@ Reference< sheet::XExternalDocLink > SAL_CALL ScExternalDocLinksObj::addDocLink(
Any SAL_CALL ScExternalDocLinksObj::getByName(const::rtl::OUString &aName)
throw (container::NoSuchElementException, lang::WrappedTargetException, RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (!mpRefMgr->hasExternalFile(aName))
throw container::NoSuchElementException();
@@ -1751,7 +1752,7 @@ Any SAL_CALL ScExternalDocLinksObj::getByName(const::rtl::OUString &aName)
Sequence< OUString > SAL_CALL ScExternalDocLinksObj::getElementNames()
throw (RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
sal_uInt16 n = mpRefMgr->getExternalFileCount();
Sequence<OUString> aSeq(n);
for (sal_uInt16 i = 0; i < n; ++i)
@@ -1766,21 +1767,21 @@ Sequence< OUString > SAL_CALL ScExternalDocLinksObj::getElementNames()
sal_Bool SAL_CALL ScExternalDocLinksObj::hasByName(const OUString &aName)
throw (RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return mpRefMgr->hasExternalFile(aName);
}
sal_Int32 SAL_CALL ScExternalDocLinksObj::getCount()
throw (RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return mpRefMgr->getExternalFileCount();
}
Any SAL_CALL ScExternalDocLinksObj::getByIndex(sal_Int32 nIndex)
throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (nIndex > ::std::numeric_limits<sal_uInt16>::max() || nIndex < ::std::numeric_limits<sal_uInt16>::min())
throw lang::IndexOutOfBoundsException();
@@ -1798,7 +1799,7 @@ Any SAL_CALL ScExternalDocLinksObj::getByIndex(sal_Int32 nIndex)
Reference< container::XEnumeration > SAL_CALL ScExternalDocLinksObj::createEnumeration()
throw (RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
Reference< container::XEnumeration > aRef(
new ScIndexEnumeration(this, OUString::createFromAscii(
"com.sun.star.sheet.ExternalDocLinks")));
@@ -1808,14 +1809,15 @@ Reference< container::XEnumeration > SAL_CALL ScExternalDocLinksObj::createEnume
uno::Type SAL_CALL ScExternalDocLinksObj::getElementType()
throw (RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return getCppuType(static_cast<Reference<sheet::XExternalDocLinks>*>(0));
}
sal_Bool SAL_CALL ScExternalDocLinksObj::hasElements()
throw (RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return mpRefMgr->getExternalFileCount() > 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/listenercalls.cxx b/sc/source/ui/unoobj/listenercalls.cxx
index 9abc8e0ab826..8160cd470424 100644
--- a/sc/source/ui/unoobj/listenercalls.cxx
+++ b/sc/source/ui/unoobj/listenercalls.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -87,3 +88,4 @@ void ScUnoListenerCalls::ExecuteAndClear()
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/makefile.mk b/sc/source/ui/unoobj/makefile.mk
index 36c3493ceefc..f80f74f513cb 100644
--- a/sc/source/ui/unoobj/makefile.mk
+++ b/sc/source/ui/unoobj/makefile.mk
@@ -35,9 +35,7 @@ ENABLE_EXCEPTIONS=TRUE
# --- Settings -----------------------------------------------------
-.INCLUDE : scpre.mk
.INCLUDE : settings.mk
-.INCLUDE : sc.mk
.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files --------------------------------------------------------
@@ -74,7 +72,6 @@ SLO1FILES = \
$(SLO)$/targuno.obj \
$(SLO)$/convuno.obj \
$(SLO)$/editsrc.obj \
- $(SLO)$/unoguard.obj \
$(SLO)$/confuno.obj \
$(SLO)$/filtuno.obj \
$(SLO)$/unodoc.obj \
diff --git a/sc/source/ui/unoobj/miscuno.cxx b/sc/source/ui/unoobj/miscuno.cxx
index 77232a176598..f0c1798e8c73 100644
--- a/sc/source/ui/unoobj/miscuno.cxx
+++ b/sc/source/ui/unoobj/miscuno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,9 +32,9 @@
#include <tools/debug.hxx>
+#include <vcl/svapp.hxx>
#include "miscuno.hxx"
-#include "unoguard.hxx"
using namespace com::sun::star;
using ::com::sun::star::uno::Reference;
@@ -227,14 +228,14 @@ ScIndexEnumeration::~ScIndexEnumeration()
sal_Bool SAL_CALL ScIndexEnumeration::hasMoreElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ( nPos < xIndex->getCount() );
}
uno::Any SAL_CALL ScIndexEnumeration::nextElement() throw(container::NoSuchElementException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Any aReturn;
try
{
@@ -326,3 +327,4 @@ sal_Bool SAL_CALL ScNameToIndexAccess::hasElements( ) throw(::com::sun::star::u
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx
index 8aa34b88f25d..55f03a3bec4a 100644
--- a/sc/source/ui/unoobj/nameuno.cxx
+++ b/sc/source/ui/unoobj/nameuno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,6 +32,7 @@
#include <svl/smplhint.hxx>
+#include <vcl/svapp.hxx>
#include <com/sun/star/sheet/NamedRangeFlag.hpp>
#include <com/sun/star/awt/XBitmap.hpp>
@@ -49,7 +51,6 @@ using namespace ::com::sun::star;
#include "docsh.hxx"
#include "docfunc.hxx"
#include "rangenam.hxx"
-#include "unoguard.hxx"
#include "unonames.hxx"
#include "scui_def.hxx"
@@ -190,14 +191,14 @@ void ScNamedRangeObj::Modify_Impl( const String* pNewName, const ScTokenArray* p
rtl::OUString SAL_CALL ScNamedRangeObj::getName() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return aName;
}
void SAL_CALL ScNamedRangeObj::setName( const rtl::OUString& aNewName )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
//! Formeln anpassen ?????
String aNewStr(aNewName);
@@ -210,7 +211,7 @@ void SAL_CALL ScNamedRangeObj::setName( const rtl::OUString& aNewName )
rtl::OUString SAL_CALL ScNamedRangeObj::getContent() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aContent;
ScRangeData* pData = GetRangeData_Impl();
if (pData)
@@ -222,7 +223,7 @@ rtl::OUString SAL_CALL ScNamedRangeObj::getContent() throw(uno::RuntimeException
void SAL_CALL ScNamedRangeObj::setContent( const rtl::OUString& aContent )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aContStr(aContent);
// GRAM_PODF_A1 for API compatibility.
Modify_Impl( NULL, NULL, &aContStr, NULL, NULL,formula::FormulaGrammar::GRAM_PODF_A1 );
@@ -239,7 +240,7 @@ void ScNamedRangeObj::SetContentWithGrammar( const ::rtl::OUString& aContent,
table::CellAddress SAL_CALL ScNamedRangeObj::getReferencePosition()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScAddress aPos;
ScRangeData* pData = GetRangeData_Impl();
if (pData)
@@ -265,7 +266,7 @@ table::CellAddress SAL_CALL ScNamedRangeObj::getReferencePosition()
void SAL_CALL ScNamedRangeObj::setReferencePosition( const table::CellAddress& aReferencePosition )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScAddress aPos( (SCCOL)aReferencePosition.Column, (SCROW)aReferencePosition.Row, aReferencePosition.Sheet );
// GRAM_PODF_A1 for API compatibility.
Modify_Impl( NULL, NULL, NULL, &aPos, NULL,formula::FormulaGrammar::GRAM_PODF_A1 );
@@ -273,7 +274,7 @@ void SAL_CALL ScNamedRangeObj::setReferencePosition( const table::CellAddress& a
sal_Int32 SAL_CALL ScNamedRangeObj::getType() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
sal_Int32 nType=0;
ScRangeData* pData = GetRangeData_Impl();
if (pData)
@@ -291,7 +292,7 @@ sal_Int32 SAL_CALL ScNamedRangeObj::getType() throw(uno::RuntimeException)
void SAL_CALL ScNamedRangeObj::setType( sal_Int32 nUnoType ) throw(uno::RuntimeException)
{
// see property 'IsSharedFormula' for RT_SHARED
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
sal_uInt16 nNewType = RT_NAME;
if ( nUnoType & sheet::NamedRangeFlag::FILTER_CRITERIA ) nNewType |= RT_CRITERIA;
if ( nUnoType & sheet::NamedRangeFlag::PRINT_AREA ) nNewType |= RT_PRINTAREA;
@@ -306,7 +307,7 @@ void SAL_CALL ScNamedRangeObj::setType( sal_Int32 nUnoType ) throw(uno::RuntimeE
uno::Sequence<sheet::FormulaToken> SAL_CALL ScNamedRangeObj::getTokens() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Sequence<sheet::FormulaToken> aSequence;
ScRangeData* pData = GetRangeData_Impl();
if (pData && pDocShell)
@@ -320,7 +321,7 @@ uno::Sequence<sheet::FormulaToken> SAL_CALL ScNamedRangeObj::getTokens() throw(u
void SAL_CALL ScNamedRangeObj::setTokens( const uno::Sequence<sheet::FormulaToken>& rTokens ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if( pDocShell )
{
ScTokenArray aTokenArray;
@@ -336,7 +337,7 @@ void SAL_CALL ScNamedRangeObj::setTokens( const uno::Sequence<sheet::FormulaToke
uno::Reference<table::XCellRange> SAL_CALL ScNamedRangeObj::getReferredCells()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScRange aRange;
ScRangeData* pData = GetRangeData_Impl();
if ( pData && pData->IsValidReference( aRange ) )
@@ -356,7 +357,7 @@ uno::Reference<table::XCellRange> SAL_CALL ScNamedRangeObj::getReferredCells()
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScNamedRangeObj::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static uno::Reference< beans::XPropertySetInfo > aRef(new SfxItemPropertySetInfo( lcl_GetNamedRangeMap() ));
return aRef;
}
@@ -367,7 +368,7 @@ void SAL_CALL ScNamedRangeObj::setPropertyValue(
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( rPropertyName.equalsAscii( SC_UNONAME_ISSHAREDFMLA ) )
{
bool bIsShared = false;
@@ -383,7 +384,7 @@ uno::Any SAL_CALL ScNamedRangeObj::getPropertyValue( const rtl::OUString& rPrope
throw(beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Any aRet;
if ( rPropertyName.equalsAscii( SC_UNO_LINKDISPBIT ) )
{
@@ -536,7 +537,7 @@ void SAL_CALL ScNamedRangesObj::addNewByName( const rtl::OUString& aName,
const rtl::OUString& aContent, const table::CellAddress& aPosition,
sal_Int32 nUnoType ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aNameStr(aName);
String aContStr(aContent);
ScAddress aPos( (SCCOL)aPosition.Column, (SCROW)aPosition.Row, aPosition.Sheet );
@@ -580,7 +581,7 @@ void SAL_CALL ScNamedRangesObj::addNewByName( const rtl::OUString& aName,
void SAL_CALL ScNamedRangesObj::addNewFromTitles( const table::CellRangeAddress& aSource,
sheet::Border aBorder ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
//! das darf kein enum sein, weil mehrere Bits gesetzt sein koennen !!!
sal_Bool bTop = ( aBorder == sheet::Border_TOP );
@@ -607,7 +608,7 @@ void SAL_CALL ScNamedRangesObj::addNewFromTitles( const table::CellRangeAddress&
void SAL_CALL ScNamedRangesObj::removeByName( const rtl::OUString& aName )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
BOOL bDone = FALSE;
if (pDocShell)
{
@@ -635,7 +636,7 @@ void SAL_CALL ScNamedRangesObj::removeByName( const rtl::OUString& aName )
void SAL_CALL ScNamedRangesObj::outputList( const table::CellAddress& aOutputPosition )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScAddress aPos( (SCCOL)aOutputPosition.Column, (SCROW)aOutputPosition.Row, aOutputPosition.Sheet );
if (pDocShell)
{
@@ -649,7 +650,7 @@ void SAL_CALL ScNamedRangesObj::outputList( const table::CellAddress& aOutputPos
uno::Reference<container::XEnumeration> SAL_CALL ScNamedRangesObj::createEnumeration()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScIndexEnumeration(this, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.NamedRangesEnumeration")));
}
@@ -657,7 +658,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScNamedRangesObj::createEnumera
sal_Int32 SAL_CALL ScNamedRangesObj::getCount() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
long nRet = 0;
if (pDocShell)
{
@@ -677,7 +678,7 @@ uno::Any SAL_CALL ScNamedRangesObj::getByIndex( sal_Int32 nIndex )
throw(lang::IndexOutOfBoundsException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference< sheet::XNamedRange > xRange(GetObjectByIndex_Impl((sal_uInt16)nIndex));
if ( xRange.is() )
return uno::makeAny(xRange);
@@ -688,13 +689,13 @@ uno::Any SAL_CALL ScNamedRangesObj::getByIndex( sal_Int32 nIndex )
uno::Type SAL_CALL ScNamedRangesObj::getElementType() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ::getCppuType((const uno::Reference< sheet::XNamedRange >*)0); // muss zu getByIndex passen
}
sal_Bool SAL_CALL ScNamedRangesObj::hasElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ( getCount() != 0 );
}
@@ -702,7 +703,7 @@ uno::Any SAL_CALL ScNamedRangesObj::getByName( const rtl::OUString& aName )
throw(container::NoSuchElementException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference< sheet::XNamedRange > xRange(GetObjectByName_Impl(aName));
if ( xRange.is() )
return uno::makeAny(xRange);
@@ -714,7 +715,7 @@ uno::Any SAL_CALL ScNamedRangesObj::getByName( const rtl::OUString& aName )
uno::Sequence<rtl::OUString> SAL_CALL ScNamedRangesObj::getElementNames()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
{
ScRangeName* pNames = pDocShell->GetDocument()->GetRangeName();
@@ -742,7 +743,7 @@ uno::Sequence<rtl::OUString> SAL_CALL ScNamedRangesObj::getElementNames()
sal_Bool SAL_CALL ScNamedRangesObj::hasByName( const rtl::OUString& aName )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
{
ScRangeName* pNames = pDocShell->GetDocument()->GetRangeName();
@@ -773,13 +774,13 @@ void ScNamedRangesObj::unlock()
sal_Bool ScNamedRangesObj::isActionLocked() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return pDocShell->GetDocument()->GetNamedRangesLockCount() != 0;
}
void ScNamedRangesObj::addActionLock() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocument* pDoc = pDocShell->GetDocument();
sal_Int16 nLockCount = pDoc->GetNamedRangesLockCount();
++nLockCount;
@@ -792,7 +793,7 @@ void ScNamedRangesObj::addActionLock() throw(uno::RuntimeException)
void ScNamedRangesObj::removeActionLock() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocument* pDoc = pDocShell->GetDocument();
sal_Int16 nLockCount = pDoc->GetNamedRangesLockCount();
if ( nLockCount > 0 )
@@ -808,7 +809,7 @@ void ScNamedRangesObj::removeActionLock() throw(uno::RuntimeException)
void ScNamedRangesObj::setActionLocks( sal_Int16 nLock ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( nLock >= 0 )
{
ScDocument* pDoc = pDocShell->GetDocument();
@@ -827,7 +828,7 @@ void ScNamedRangesObj::setActionLocks( sal_Int16 nLock ) throw(uno::RuntimeExcep
sal_Int16 ScNamedRangesObj::resetActionLocks() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocument* pDoc = pDocShell->GetDocument();
sal_Int16 nLockCount = pDoc->GetNamedRangesLockCount();
if ( nLockCount > 0 )
@@ -922,7 +923,7 @@ void ScLabelRangeObj::Modify_Impl( const ScRange* pLabel, const ScRange* pData )
table::CellRangeAddress SAL_CALL ScLabelRangeObj::getLabelArea()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
table::CellRangeAddress aRet;
ScRangePair* pData = GetData_Impl();
if (pData)
@@ -933,7 +934,7 @@ table::CellRangeAddress SAL_CALL ScLabelRangeObj::getLabelArea()
void SAL_CALL ScLabelRangeObj::setLabelArea( const table::CellRangeAddress& aLabelArea )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScRange aLabelRange;
ScUnoConversion::FillScRange( aLabelRange, aLabelArea );
Modify_Impl( &aLabelRange, NULL );
@@ -942,7 +943,7 @@ void SAL_CALL ScLabelRangeObj::setLabelArea( const table::CellRangeAddress& aLab
table::CellRangeAddress SAL_CALL ScLabelRangeObj::getDataArea()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
table::CellRangeAddress aRet;
ScRangePair* pData = GetData_Impl();
if (pData)
@@ -953,7 +954,7 @@ table::CellRangeAddress SAL_CALL ScLabelRangeObj::getDataArea()
void SAL_CALL ScLabelRangeObj::setDataArea( const table::CellRangeAddress& aDataArea )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScRange aDataRange;
ScUnoConversion::FillScRange( aDataRange, aDataArea );
Modify_Impl( NULL, &aDataRange );
@@ -1007,7 +1008,7 @@ void SAL_CALL ScLabelRangesObj::addNew( const table::CellRangeAddress& aLabelAre
const table::CellRangeAddress& aDataArea )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
{
ScDocument* pDoc = pDocShell->GetDocument();
@@ -1039,7 +1040,7 @@ void SAL_CALL ScLabelRangesObj::addNew( const table::CellRangeAddress& aLabelAre
void SAL_CALL ScLabelRangesObj::removeByIndex( sal_Int32 nIndex )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
BOOL bDone = FALSE;
if (pDocShell)
{
@@ -1079,7 +1080,7 @@ void SAL_CALL ScLabelRangesObj::removeByIndex( sal_Int32 nIndex )
uno::Reference<container::XEnumeration> SAL_CALL ScLabelRangesObj::createEnumeration()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScIndexEnumeration(this, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.LabelRangesEnumeration")));
}
@@ -1087,7 +1088,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScLabelRangesObj::createEnumera
sal_Int32 SAL_CALL ScLabelRangesObj::getCount() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pDocShell)
{
ScDocument* pDoc = pDocShell->GetDocument();
@@ -1102,7 +1103,7 @@ uno::Any SAL_CALL ScLabelRangesObj::getByIndex( sal_Int32 nIndex )
throw(lang::IndexOutOfBoundsException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference< sheet::XLabelRange > xRange(GetObjectByIndex_Impl((sal_uInt16)nIndex));
if ( xRange.is() )
return uno::makeAny(xRange);
@@ -1113,14 +1114,14 @@ uno::Any SAL_CALL ScLabelRangesObj::getByIndex( sal_Int32 nIndex )
uno::Type SAL_CALL ScLabelRangesObj::getElementType() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ::getCppuType((const uno::Reference< sheet::XLabelRange >*)0); // muss zu getByIndex passen
}
sal_Bool SAL_CALL ScLabelRangesObj::hasElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ( getCount() != 0 );
}
@@ -1128,3 +1129,4 @@ sal_Bool SAL_CALL ScLabelRangesObj::hasElements() throw(uno::RuntimeException)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/notesuno.cxx b/sc/source/ui/unoobj/notesuno.cxx
index c5dd11977478..7860ba8fbde6 100644
--- a/sc/source/ui/unoobj/notesuno.cxx
+++ b/sc/source/ui/unoobj/notesuno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,6 +35,7 @@
#include <editeng/unotext.hxx>
#include <svx/svdpool.hxx>
#include <svx/svdobj.hxx>
+#include <vcl/svapp.hxx>
#include "notesuno.hxx"
#include "textuno.hxx"
#include "cellsuno.hxx" // getParent
@@ -48,7 +50,6 @@
#include "drwlayer.hxx"
#include "detfunc.hxx"
#include "undocell.hxx"
-#include "unoguard.hxx"
#include "userdat.hxx"
#include <editeng/outlobj.hxx>
#include <svx/unoshape.hxx>
@@ -56,16 +57,20 @@
#include <svx/svditer.hxx>
#include <svx/svdpage.hxx>
#include <com/sun/star/drawing/XShapeDescriptor.hpp>
+#include <editeng/unoprnms.hxx>
using namespace com::sun::star;
//------------------------------------------------------------------------
-// keine Properties fuer Text in Notizen
const SvxItemPropertySet* lcl_GetAnnotationPropertySet()
{
static SfxItemPropertyMapEntry aAnnotationPropertyMap_Impl[] =
{
+ SVX_UNOEDIT_CHAR_PROPERTIES,
+ SVX_UNOEDIT_FONT_PROPERTIES,
+ SVX_UNOEDIT_PARA_PROPERTIES,
+ SVX_UNOEDIT_NUMBERING_PROPERTIE, // for completeness of service ParagraphProperties
{0,0,0,0,0,0}
};
static SvxItemPropertySet aAnnotationPropertySet_Impl( aAnnotationPropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() );
@@ -119,7 +124,7 @@ void ScAnnotationObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
uno::Reference<uno::XInterface> SAL_CALL ScAnnotationObj::getParent() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
// Parent der Notiz ist die zugehoerige Zelle
//! existierendes Objekt finden und zurueckgeben ???
@@ -142,7 +147,7 @@ void SAL_CALL ScAnnotationObj::setParent( const uno::Reference<uno::XInterface>&
uno::Reference<text::XTextCursor> SAL_CALL ScAnnotationObj::createTextCursor()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
// Notizen brauchen keine Extrawurst
return GetUnoText().createTextCursor();
}
@@ -151,20 +156,20 @@ uno::Reference<text::XTextCursor> SAL_CALL ScAnnotationObj::createTextCursorByRa
const uno::Reference<text::XTextRange>& aTextPosition )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
// Notizen brauchen keine Extrawurst
return GetUnoText().createTextCursorByRange(aTextPosition);
}
rtl::OUString SAL_CALL ScAnnotationObj::getString() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return GetUnoText().getString();
}
void SAL_CALL ScAnnotationObj::setString( const rtl::OUString& aText ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
GetUnoText().setString(aText);
}
@@ -172,7 +177,7 @@ void SAL_CALL ScAnnotationObj::insertString( const uno::Reference<text::XTextRan
const rtl::OUString& aString, sal_Bool bAbsorb )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
GetUnoText().insertString( xRange, aString, bAbsorb );
}
@@ -180,25 +185,25 @@ void SAL_CALL ScAnnotationObj::insertControlCharacter( const uno::Reference<text
sal_Int16 nControlCharacter, sal_Bool bAbsorb )
throw(lang::IllegalArgumentException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
GetUnoText().insertControlCharacter( xRange, nControlCharacter, bAbsorb );
}
uno::Reference<text::XText> SAL_CALL ScAnnotationObj::getText() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return GetUnoText().getText();
}
uno::Reference<text::XTextRange> SAL_CALL ScAnnotationObj::getStart() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return GetUnoText().getStart();
}
uno::Reference<text::XTextRange> SAL_CALL ScAnnotationObj::getEnd() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return GetUnoText().getEnd();
}
@@ -206,7 +211,7 @@ uno::Reference<text::XTextRange> SAL_CALL ScAnnotationObj::getEnd() throw(uno::R
table::CellAddress SAL_CALL ScAnnotationObj::getPosition() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
table::CellAddress aAdr;
aAdr.Sheet = aCellPos.Tab();
aAdr.Column = aCellPos.Col();
@@ -216,28 +221,28 @@ table::CellAddress SAL_CALL ScAnnotationObj::getPosition() throw(uno::RuntimeExc
rtl::OUString SAL_CALL ScAnnotationObj::getAuthor() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
const ScPostIt* pNote = ImplGetNote();
return pNote ? pNote->GetAuthor() : rtl::OUString();
}
rtl::OUString SAL_CALL ScAnnotationObj::getDate() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
const ScPostIt* pNote = ImplGetNote();
return pNote ? pNote->GetDate() : rtl::OUString();
}
sal_Bool SAL_CALL ScAnnotationObj::getIsVisible() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
const ScPostIt* pNote = ImplGetNote();
return pNote && pNote->IsCaptionShown();
}
void SAL_CALL ScAnnotationObj::setIsVisible( sal_Bool bIsVisible ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
// show/hide note with undo action
if( pDocShell )
pDocShell->GetDocFunc().ShowNote( aCellPos, bIsVisible );
@@ -247,7 +252,7 @@ void SAL_CALL ScAnnotationObj::setIsVisible( sal_Bool bIsVisible ) throw(uno::Ru
uno::Reference < drawing::XShape > SAL_CALL ScAnnotationObj::getAnnotationShape()
throw(::com::sun::star::uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScAnnotationShapeObj(pDocShell, aCellPos);
}
@@ -329,7 +334,7 @@ void ScAnnotationShapeObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
uno::Reference<uno::XInterface> SAL_CALL ScAnnotationShapeObj::getParent() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
// Parent der Notiz ist die zugehoerige Zelle
//! existierendes Objekt finden und zurueckgeben ???
@@ -350,14 +355,14 @@ void SAL_CALL ScAnnotationShapeObj::setParent( const uno::Reference<uno::XInterf
// XElementAccess
uno::Type SAL_CALL ScAnnotationShapeObj::getElementType( ) throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return GetUnoText().getElementType();
}
sal_Bool SAL_CALL ScAnnotationShapeObj::hasElements( ) throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return GetUnoText().hasElements();
}
@@ -365,7 +370,7 @@ sal_Bool SAL_CALL ScAnnotationShapeObj::hasElements( ) throw (uno::RuntimeExcep
// XEnumerationAccess
uno::Reference< container::XEnumeration > SAL_CALL ScAnnotationShapeObj::createEnumeration( ) throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return GetUnoText().createEnumeration();
}
@@ -374,7 +379,7 @@ uno::Reference< container::XEnumeration > SAL_CALL ScAnnotationShapeObj::createE
void SAL_CALL ScAnnotationShapeObj::moveTextRange( const uno::Reference< text::XTextRange >& xRange, sal_Int16 nParagraphs )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
GetUnoText().moveTextRange( xRange, nParagraphs );
}
@@ -385,7 +390,7 @@ void SAL_CALL ScAnnotationShapeObj::insertTextContent( const uno::Reference< tex
throw (lang::IllegalArgumentException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
GetUnoText().insertTextContent( xRange, xContent, bAbsorb );
}
@@ -394,7 +399,7 @@ void SAL_CALL ScAnnotationShapeObj::removeTextContent( const uno::Reference< tex
throw (container::NoSuchElementException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
GetUnoText().removeTextContent( xContent );
}
@@ -404,7 +409,7 @@ void SAL_CALL ScAnnotationShapeObj::removeTextContent( const uno::Reference< tex
uno::Reference<text::XTextCursor> SAL_CALL ScAnnotationShapeObj::createTextCursor()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
// Notizen brauchen keine Extrawurst
return GetUnoText().createTextCursor();
}
@@ -413,20 +418,20 @@ uno::Reference<text::XTextCursor> SAL_CALL ScAnnotationShapeObj::createTextCurso
const uno::Reference<text::XTextRange>& aTextPosition )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
// Notizen brauchen keine Extrawurst
return GetUnoText().createTextCursorByRange(aTextPosition);
}
rtl::OUString SAL_CALL ScAnnotationShapeObj::getString() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return GetUnoText().getString();
}
void SAL_CALL ScAnnotationShapeObj::setString( const rtl::OUString& aText ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
GetUnoText().setString(aText);
}
@@ -434,7 +439,7 @@ void SAL_CALL ScAnnotationShapeObj::insertString( const uno::Reference<text::XTe
const rtl::OUString& aString, sal_Bool bAbsorb )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
GetUnoText().insertString( xRange, aString, bAbsorb );
}
@@ -442,25 +447,25 @@ void SAL_CALL ScAnnotationShapeObj::insertControlCharacter( const uno::Reference
sal_Int16 nControlCharacter, sal_Bool bAbsorb )
throw(lang::IllegalArgumentException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
GetUnoText().insertControlCharacter( xRange, nControlCharacter, bAbsorb );
}
uno::Reference<text::XText> SAL_CALL ScAnnotationShapeObj::getText() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return GetUnoText().getText();
}
uno::Reference<text::XTextRange> SAL_CALL ScAnnotationShapeObj::getStart() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return GetUnoText().getStart();
}
uno::Reference<text::XTextRange> SAL_CALL ScAnnotationShapeObj::getEnd() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return GetUnoText().getEnd();
}
@@ -468,7 +473,7 @@ uno::Reference<text::XTextRange> SAL_CALL ScAnnotationShapeObj::getEnd() throw(u
::rtl::OUString SAL_CALL ScAnnotationShapeObj::getShapeType( )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference < drawing::XShapeDescriptor > xDesc(GetXShape(), uno::UNO_QUERY);
if (xDesc.is())
return xDesc->getShapeType();
@@ -479,7 +484,7 @@ uno::Reference<text::XTextRange> SAL_CALL ScAnnotationShapeObj::getEnd() throw(u
awt::Point SAL_CALL ScAnnotationShapeObj::getPosition( )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
GetXShape();
return xShape.is() ? xShape->getPosition() : awt::Point();
}
@@ -487,7 +492,7 @@ awt::Point SAL_CALL ScAnnotationShapeObj::getPosition( )
void SAL_CALL ScAnnotationShapeObj::setPosition( const awt::Point& aPosition )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
GetXShape();
if( xShape.is() )
xShape->setPosition(aPosition);
@@ -496,7 +501,7 @@ void SAL_CALL ScAnnotationShapeObj::setPosition( const awt::Point& aPosition )
awt::Size SAL_CALL ScAnnotationShapeObj::getSize( )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
GetXShape();
return xShape.is() ? xShape->getSize() : awt::Size();
}
@@ -504,7 +509,7 @@ awt::Size SAL_CALL ScAnnotationShapeObj::getSize( )
void SAL_CALL ScAnnotationShapeObj::setSize( const awt::Size& aSize )
throw (beans::PropertyVetoException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
GetXShape();
if( xShape.is() )
xShape->setSize(aSize);
@@ -515,7 +520,7 @@ beans::PropertyState SAL_CALL ScAnnotationShapeObj::getPropertyState( const rtl:
throw (beans::UnknownPropertyException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference < beans::XPropertyState > xState (GetXShape(), uno::UNO_QUERY);
if (xState.is())
return xState->getPropertyState( PropertyName );
@@ -527,7 +532,7 @@ uno::Sequence< beans::PropertyState > SAL_CALL ScAnnotationShapeObj::getProperty
throw (beans::UnknownPropertyException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference < beans::XPropertyState > xState (GetXShape(), uno::UNO_QUERY);
if (xState.is())
return xState->getPropertyStates( aPropertyName );
@@ -538,7 +543,7 @@ void SAL_CALL ScAnnotationShapeObj::setPropertyToDefault( const ::rtl::OUString&
throw (::com::sun::star::beans::UnknownPropertyException,
::com::sun::star::uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference < beans::XPropertyState > xState (GetXShape(), uno::UNO_QUERY);
if (xState.is())
xState->setPropertyToDefault( PropertyName );
@@ -548,7 +553,7 @@ uno::Any SAL_CALL ScAnnotationShapeObj::getPropertyDefault( const rtl::OUString&
throw (beans::UnknownPropertyException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference < beans::XPropertyState > xState (GetXShape(), uno::UNO_QUERY);
if (xState.is())
return xState->getPropertyDefault( aPropertyName );
@@ -559,7 +564,7 @@ uno::Any SAL_CALL ScAnnotationShapeObj::getPropertyDefault( const rtl::OUString&
uno::Reference< beans::XPropertySetInfo > SAL_CALL ScAnnotationShapeObj::getPropertySetInfo( )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference < beans::XPropertySet > xProp (GetXShape(), uno::UNO_QUERY);
if (xProp.is())
return xProp->getPropertySetInfo();
@@ -573,7 +578,7 @@ void SAL_CALL ScAnnotationShapeObj::setPropertyValue( const rtl::OUString& aProp
lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference < beans::XPropertySet > xProp (GetXShape(), uno::UNO_QUERY);
if (xProp.is())
xProp->setPropertyValue( aPropertyName, aValue );
@@ -584,7 +589,7 @@ uno::Any SAL_CALL ScAnnotationShapeObj::getPropertyValue( const rtl::OUString& P
lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference < beans::XPropertySet > xProp (GetXShape(), uno::UNO_QUERY);
if (xProp.is())
return xProp->getPropertyValue( PropertyName );
@@ -597,7 +602,7 @@ void SAL_CALL ScAnnotationShapeObj::addPropertyChangeListener( const rtl::OUStri
lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference < beans::XPropertySet > xProp (GetXShape(), uno::UNO_QUERY);
if (xProp.is())
return xProp->addPropertyChangeListener( aPropertyName, xListener );
@@ -609,7 +614,7 @@ void SAL_CALL ScAnnotationShapeObj::removePropertyChangeListener( const rtl::OUS
lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference < beans::XPropertySet > xProp (GetXShape(), uno::UNO_QUERY);
if (xProp.is())
return xProp->removePropertyChangeListener( aPropertyName, aListener );
@@ -621,7 +626,7 @@ void SAL_CALL ScAnnotationShapeObj::addVetoableChangeListener( const rtl::OUStri
lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference < beans::XPropertySet > xProp (GetXShape(), uno::UNO_QUERY);
if (xProp.is())
return xProp->addVetoableChangeListener( PropertyName, aListener );
@@ -633,7 +638,7 @@ void SAL_CALL ScAnnotationShapeObj::removeVetoableChangeListener( const rtl::OUS
lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference < beans::XPropertySet > xProp (GetXShape(), uno::UNO_QUERY);
if (xProp.is())
return xProp->removeVetoableChangeListener( PropertyName, aListener );
@@ -647,7 +652,7 @@ void SAL_CALL ScAnnotationShapeObj::setPropertyValues( const uno::Sequence< rtl:
lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference < beans::XMultiPropertySet > xProp (GetXShape(), uno::UNO_QUERY);
if (xProp.is())
xProp->setPropertyValues( aPropertyNames, aValues );
@@ -657,7 +662,7 @@ uno::Sequence< uno::Any > SAL_CALL ScAnnotationShapeObj::getPropertyValues(
const uno::Sequence< rtl::OUString >& aPropertyNames )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference < beans::XMultiPropertySet > xProp (GetXShape(), uno::UNO_QUERY);
if (xProp.is())
return xProp->getPropertyValues( aPropertyNames );
@@ -668,7 +673,7 @@ void SAL_CALL ScAnnotationShapeObj::addPropertiesChangeListener( const uno::Sequ
const uno::Reference< beans::XPropertiesChangeListener >& xListener )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference < beans::XMultiPropertySet > xProp (GetXShape(), uno::UNO_QUERY);
if (xProp.is())
xProp->addPropertiesChangeListener( aPropertyNames, xListener );
@@ -677,7 +682,7 @@ void SAL_CALL ScAnnotationShapeObj::addPropertiesChangeListener( const uno::Sequ
void SAL_CALL ScAnnotationShapeObj::removePropertiesChangeListener( const uno::Reference< beans::XPropertiesChangeListener >& xListener )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference < beans::XMultiPropertySet > xProp (GetXShape(), uno::UNO_QUERY);
if (xProp.is())
xProp->removePropertiesChangeListener( xListener );
@@ -687,7 +692,7 @@ void SAL_CALL ScAnnotationShapeObj::firePropertiesChangeEvent( const uno::Sequen
const uno::Reference< beans::XPropertiesChangeListener >& xListener )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference < beans::XMultiPropertySet > xProp (GetXShape(), uno::UNO_QUERY);
if (xProp.is())
xProp->firePropertiesChangeEvent( aPropertyNames, xListener );
@@ -696,7 +701,7 @@ void SAL_CALL ScAnnotationShapeObj::firePropertiesChangeEvent( const uno::Sequen
// XComponent
void SAL_CALL ScAnnotationShapeObj::dispose( ) throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference < lang::XComponent > xComp (GetXShape(), uno::UNO_QUERY);
if (xComp.is())
xComp->dispose();
@@ -707,7 +712,7 @@ void SAL_CALL ScAnnotationShapeObj::dispose( ) throw (uno::RuntimeException)
void SAL_CALL ScAnnotationShapeObj::addEventListener( const uno::Reference< lang::XEventListener >& xListener )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference < lang::XComponent > xComp (GetXShape(), uno::UNO_QUERY);
if (xComp.is())
xComp->addEventListener( xListener );
@@ -716,7 +721,7 @@ void SAL_CALL ScAnnotationShapeObj::addEventListener( const uno::Reference< lang
void SAL_CALL ScAnnotationShapeObj::removeEventListener( const uno::Reference< lang::XEventListener >& aListener )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference < lang::XComponent > xComp (GetXShape(), uno::UNO_QUERY);
if (xComp.is())
xComp->removeEventListener( aListener );
@@ -727,3 +732,4 @@ void SAL_CALL ScAnnotationShapeObj::removeEventListener( const uno::Reference< l
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/optuno.cxx b/sc/source/ui/unoobj/optuno.cxx
index 0d277fdb19fe..bfd6e631bd31 100644
--- a/sc/source/ui/unoobj/optuno.cxx
+++ b/sc/source/ui/unoobj/optuno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,7 +39,6 @@
#include "miscuno.hxx"
#include "unonames.hxx"
#include "docoptio.hxx"
-#include "unoguard.hxx"
using namespace com::sun::star;
@@ -214,7 +214,7 @@ void SAL_CALL ScDocOptionsObj::setPropertyValue(
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
BOOL bDone = ScDocOptionsHelper::setPropertyValue( aOptions, *GetPropertySet().getPropertyMap(), aPropertyName, aValue );
@@ -226,7 +226,7 @@ uno::Any SAL_CALL ScDocOptionsObj::getPropertyValue( const rtl::OUString& aPrope
throw(beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Any aRet(ScDocOptionsHelper::getPropertyValue( aOptions, *GetPropertySet().getPropertyMap(), aPropertyName ));
if ( !aRet.hasValue() )
@@ -235,3 +235,4 @@ uno::Any SAL_CALL ScDocOptionsObj::getPropertyValue( const rtl::OUString& aPrope
return aRet;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/pageuno.cxx b/sc/source/ui/unoobj/pageuno.cxx
index 4687683a8ef4..37b7d83c6886 100644
--- a/sc/source/ui/unoobj/pageuno.cxx
+++ b/sc/source/ui/unoobj/pageuno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -76,3 +77,5 @@ uno::Sequence<rtl::OUString> SAL_CALL ScPageObj::getSupportedServiceNames()
pArray[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.SpreadsheetDrawPage"));
return aRet;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx
index ed45116bc44d..d16edbbd9ea0 100644
--- a/sc/source/ui/unoobj/scdetect.cxx
+++ b/sc/source/ui/unoobj/scdetect.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,6 +31,8 @@
#include "scdetect.hxx"
+#include <sal/macros.h>
+
#include <framework/interaction.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
@@ -62,7 +65,7 @@
#include <svl/eitem.hxx>
#include <svl/stritem.hxx>
#include <tools/urlobj.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <svtools/sfxecode.hxx>
#include <svtools/ehdl.hxx>
#include <sot/storinfo.hxx>
@@ -113,6 +116,7 @@ static const sal_Char __FAR_DATA pFilterExcel95[] = "MS Excel 95";
static const sal_Char __FAR_DATA pFilterEx95Temp[] = "MS Excel 95 Vorlage/Template";
static const sal_Char __FAR_DATA pFilterExcel97[] = "MS Excel 97";
static const sal_Char __FAR_DATA pFilterEx97Temp[] = "MS Excel 97 Vorlage/Template";
+static const sal_Char __FAR_DATA pFilter2003XML[] = "MS Excel 2003 XML";
static const sal_Char __FAR_DATA pFilterDBase[] = "dBase";
static const sal_Char __FAR_DATA pFilterDif[] = "DIF";
static const sal_Char __FAR_DATA pFilterSylk[] = "SYLK";
@@ -165,7 +169,7 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
rStream.Seek(STREAM_SEEK_TO_BEGIN);
rStream >> nMark;
bool bValidMark = false;
- for (size_t i=0; i < sizeof(nValidMarks)/sizeof(nValidMarks[0]) && !bValidMark; ++i)
+ for (size_t i=0; i < SAL_N_ELEMENTS(nValidMarks) && !bValidMark; ++i)
{
if (nValidMarks[i] == nMark)
bValidMark = true;
@@ -206,22 +210,6 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
return ( 0x0d == nEndFlag );
}
-#if 0
-static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter )
-{
- if ( !pFilter )
- return FALSE;
-
- // TRUE for XML file or template
- // (template filter has no internal name -> allow configuration key names)
-
- String aName(pFilter->GetFilterName());
- return aName.EqualsAscii(pFilterXML) ||
- aName.EqualsAscii("calc_StarOffice_XML_Calc") ||
- aName.EqualsAscii("calc_StarOffice_XML_Calc_Template");
-}
-#endif
-
::rtl::OUString SAL_CALL ScFilterDetect::detect( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lDescriptor ) throw( ::com::sun::star::uno::RuntimeException )
{
REFERENCE< XInputStream > xStream;
@@ -301,7 +289,7 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter )
}
// can't check the type for external filters, so set the "dont" flag accordingly
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
//SfxFilterFlags nMust = SFX_FILTER_IMPORT, nDont = SFX_FILTER_NOTINSTALLED;
SfxAllItemSet *pSet = new SfxAllItemSet( SFX_APP()->GetPool() );
@@ -436,7 +424,8 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter )
bool bIsXLS = false;
SvStream* pStream = aMedium.GetInStream();
const SfxFilter* pPreselectedFilter = pFilter;
- if ( pPreselectedFilter && pPreselectedFilter->GetName().SearchAscii("Excel") != STRING_NOTFOUND )
+ if ( pPreselectedFilter && ( ( pPreselectedFilter->GetName().SearchAscii("Excel") != STRING_NOTFOUND ) ||
+ ( !aPreselectedFilterName.Len() && pPreselectedFilter->GetFilterName().EqualsAscii( pFilterAscii ) ) ) )
bIsXLS = true;
pFilter = 0;
if ( pStream )
@@ -631,7 +620,7 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter )
pLotus2,
pQPro
};
- const UINT16 nFilterCount = sizeof(ppFilterPatterns) / sizeof(ppFilterPatterns[0]);
+ const UINT16 nFilterCount = SAL_N_ELEMENTS(ppFilterPatterns);
static const sal_Char* const pFilterName[] = // zugehoerige Filter
{
@@ -719,52 +708,51 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter )
// without the preselection other filters (Writer) take precedence
// DBase can't be detected reliably, so it also needs preselection
bool bMaybeText = lcl_MayBeAscii( rStr );
- if ( pPreselectedFilter->GetFilterName().EqualsAscii(pFilterAscii) && bMaybeText )
+
+ // get file header
+ rStr.Seek( 0 );
+ const int nTrySize = 80;
+ ByteString aHeader;
+ for ( int j = 0; j < nTrySize && !rStr.IsEof(); j++ )
{
- // Text filter is accepted if preselected
- pFilter = pPreselectedFilter;
+ sal_Char c;
+ rStr >> c;
+ aHeader += c;
}
- else
+ aHeader += '\0';
+
+ if ( HTMLParser::IsHTMLFormat( aHeader.GetBuffer() ) )
{
- // get file header
- rStr.Seek( 0 );
- const int nTrySize = 80;
- ByteString aHeader;
- for ( int j = 0; j < nTrySize && !rStr.IsEof(); j++ )
+ // test for HTML
+ if ( pPreselectedFilter->GetName().EqualsAscii(pFilterHtml) )
{
- sal_Char c;
- rStr >> c;
- aHeader += c;
+ pFilter = pPreselectedFilter;
}
- aHeader += '\0';
-
- if ( HTMLParser::IsHTMLFormat( aHeader.GetBuffer() ) )
+ else
{
- // test for HTML
- if ( pPreselectedFilter->GetName().EqualsAscii(pFilterHtml) )
- {
- pFilter = pPreselectedFilter;
- }
- else
- {
- pFilter = aMatcher.GetFilter4FilterName( String::CreateFromAscii(pFilterHtmlWeb) );
- if ( bIsXLS )
- bFakeXLS = true;
- }
+ pFilter = aMatcher.GetFilter4FilterName( String::CreateFromAscii(pFilterHtmlWeb) );
+ if ( bIsXLS )
+ bFakeXLS = true;
}
- else if ( bIsXLS && bMaybeText )
- {
+ }
+ else if ( aHeader.CompareTo( "{\\rtf", 5 ) == COMPARE_EQUAL )
+ {
+ // test for RTF
+ pFilter = aMatcher.GetFilter4FilterName( String::CreateFromAscii(pFilterRtf) );
+ }
+ else if ( bIsXLS && bMaybeText )
+ {
+ aHeader.EraseLeadingChars();
+ if( aHeader.CompareTo( "<?xml", 5 ) == COMPARE_EQUAL )
+ pFilter = aMatcher.GetFilter4FilterName( String::CreateFromAscii(pFilter2003XML) );
+ else
pFilter = aMatcher.GetFilter4FilterName( String::CreateFromAscii(pFilterAscii) );
- bFakeXLS = true;
- }
- else if ( aHeader.CompareTo( "{\\rtf", 5 ) == COMPARE_EQUAL )
- {
- // test for RTF
- pFilter = aMatcher.GetFilter4FilterName( String::CreateFromAscii(pFilterRtf) );
- }
- else if ( pPreselectedFilter->GetName().EqualsAscii(pFilterDBase) && lcl_MayBeDBase( rStr ) )
- pFilter = pPreselectedFilter;
+ bFakeXLS = true;
}
+ else if ( pPreselectedFilter->GetName().EqualsAscii(pFilterDBase) && lcl_MayBeDBase( rStr ) )
+ pFilter = pPreselectedFilter;
+ else if ( pPreselectedFilter->GetFilterName().EqualsAscii(pFilterAscii) && bMaybeText )
+ pFilter = pPreselectedFilter;
}
}
}
@@ -912,3 +900,4 @@ UNOREFERENCE< UNOXINTERFACE > SAL_CALL ScFilterDetect::impl_createInstance( cons
return UNOREFERENCE< UNOXINTERFACE >( *new ScFilterDetect( xServiceManager ) );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/scdetect.hxx b/sc/source/ui/unoobj/scdetect.hxx
index a652d11df951..204a139aae12 100644
--- a/sc/source/ui/unoobj/scdetect.hxx
+++ b/sc/source/ui/unoobj/scdetect.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -93,3 +94,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx
index 0cbe98e96b05..b942c7dd9f11 100644
--- a/sc/source/ui/unoobj/servuno.cxx
+++ b/sc/source/ui/unoobj/servuno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,13 +32,14 @@
#include <tools/debug.hxx>
+#include <sal/macros.h>
#include <svtools/unoimap.hxx>
#include <svx/unofill.hxx>
#include <editeng/unonrule.hxx>
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
#include "servuno.hxx"
-#include "unoguard.hxx"
#include "unonames.hxx"
#include "cellsuno.hxx"
#include "fielduno.hxx"
@@ -71,8 +73,27 @@
#include <basic/basmgr.hxx>
#include <sfx2/app.hxx>
+#include <comphelper/processfactory.hxx>
+#include <com/sun/star/document/XCodeNameQuery.hpp>
+#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
+#include <com/sun/star/form/XFormsSupplier.hpp>
+#include <com/sun/star/script/ScriptEventDescriptor.hpp>
+#include <comphelper/componentcontext.hxx>
+#include <cppuhelper/component_context.hxx>
+#include <vbahelper/vbaaccesshelper.hxx>
+#include <com/sun/star/script/vba/XVBACompatibility.hpp>
+
using namespace ::com::sun::star;
+bool isInVBAMode( ScDocShell& rDocSh )
+{
+ uno::Reference<script::XLibraryContainer> xLibContainer = rDocSh.GetBasicContainer();
+ uno::Reference<script::vba::XVBACompatibility> xVBACompat( xLibContainer, uno::UNO_QUERY );
+ if ( xVBACompat.is() )
+ return xVBACompat->getVBACompatibilityMode();
+ return false;
+}
+
class ScVbaObjectForCodeNameProvider : public ::cppu::WeakImplHelper1< container::XNameAccess >
{
uno::Any maWorkbook;
@@ -94,7 +115,7 @@ public:
virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
maCachedObject = uno::Any(); // clear cached object
String sName = aName;
@@ -136,7 +157,7 @@ public:
}
::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
OSL_TRACE("ScVbaObjectForCodeNameProvider::getByName( %s )",
rtl::OUStringToOString( aName, RTL_TEXTENCODING_UTF8 ).getStr() );
if ( !hasByName( aName ) )
@@ -145,7 +166,7 @@ public:
}
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw (::com::sun::star::uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScDocument* pDoc = mpDocShell->GetDocument();
if ( !pDoc )
throw uno::RuntimeException();
@@ -175,7 +196,7 @@ public:
// XCodeNameQuery
rtl::OUString SAL_CALL getCodeNameForObject( const uno::Reference< uno::XInterface >& xIf ) throw( uno::RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
rtl::OUString sCodeName;
if ( mpDocShell )
{
@@ -285,7 +306,8 @@ static const ProvNamesId_Type __FAR_DATA aProvNamesId[] =
{ "com.sun.star.text.textfield.Time", SC_SERVICE_TIMEFIELD },
{ "com.sun.star.text.textfield.DocumentTitle", SC_SERVICE_TITLEFIELD },
{ "com.sun.star.text.textfield.FileName", SC_SERVICE_FILEFIELD },
- { "com.sun.star.text.textfield.SheetName", SC_SERVICE_SHEETFIELD }
+ { "com.sun.star.text.textfield.SheetName", SC_SERVICE_SHEETFIELD },
+ { "ooo.vba.VBAGlobals", SC_SERVICE_VBAGLOBALS },
};
//
@@ -355,8 +377,8 @@ sal_uInt16 ScServiceProvider::GetProviderType(const String& rServiceName)
{
if (rServiceName.Len())
{
- const sal_uInt16 nEntries =
- sizeof(aProvNamesId) / sizeof(aProvNamesId[0]);
+ const sal_uInt16 nEntries = SAL_N_ELEMENTS(aProvNamesId);
+
for (sal_uInt16 i = 0; i < nEntries; i++)
{
if (rServiceName.EqualsAscii( aProvNamesId[i].pName ))
@@ -547,7 +569,7 @@ uno::Reference<uno::XInterface> ScServiceProvider::MakeInstance(
}
break;
case SC_SERVICE_VBACODENAMEPROVIDER:
- if (pDocShell && pDocShell->GetDocument()->IsInVBAMode())
+ if ( pDocShell && ooo::vba::isAlienExcelDoc( *pDocShell ) && isInVBAMode( *pDocShell ) )
{
OSL_TRACE("**** creating VBA Object provider");
xRet.set(static_cast<document::XCodeNameQuery*>(new ScVbaCodeNameProvider( pDocShell )));
@@ -576,7 +598,7 @@ uno::Reference<uno::XInterface> ScServiceProvider::MakeInstance(
uno::Sequence<rtl::OUString> ScServiceProvider::GetAllServiceNames()
{
- const sal_uInt16 nEntries = sizeof(aProvNamesId) / sizeof(aProvNamesId[0]);
+ const sal_uInt16 nEntries = SAL_N_ELEMENTS(aProvNamesId);
uno::Sequence<rtl::OUString> aRet(nEntries);
rtl::OUString* pArray = aRet.getArray();
for (sal_uInt16 i = 0; i < nEntries; i++)
@@ -589,3 +611,4 @@ uno::Sequence<rtl::OUString> ScServiceProvider::GetAllServiceNames()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx
index 1ed384ed2ebd..3f9ea0aabcab 100644
--- a/sc/source/ui/unoobj/shapeuno.cxx
+++ b/sc/source/ui/unoobj/shapeuno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,6 +35,7 @@
#include <svtools/unoevent.hxx>
#include <svtools/unoimap.hxx>
#include <svx/svdobj.hxx>
+#include <vcl/svapp.hxx>
#include <svx/unoshape.hxx>
#include <editeng/unofield.hxx>
#include <svx/shapepropertynotifier.hxx>
@@ -52,7 +54,6 @@
#include "drwlayer.hxx"
#include "userdat.hxx"
#include "unonames.hxx"
-#include "unoguard.hxx"
using namespace ::com::sun::star;
@@ -70,6 +71,9 @@ const SfxItemPropertyMapEntry* lcl_GetShapeMap()
{MAP_CHAR_LEN(SC_UNONAME_HORIPOS), 0, &getCppuType((sal_Int32*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_IMAGEMAP), 0, &getCppuType((uno::Reference<container::XIndexContainer>*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_VERTPOS), 0, &getCppuType((sal_Int32*)0), 0, 0 },
+ {MAP_CHAR_LEN(SC_UNONAME_MOVEPROTECT), 0, &getCppuType((sal_Bool*)0), 0, 0 },
+ // #i66550 HLINK_FOR_SHAPES
+ {MAP_CHAR_LEN(SC_UNONAME_HYPERLINK), 0, &getCppuType((rtl::OUString*)0), 0, 0 },
{0,0,0,0,0,0}
};
return aShapeMap_Impl;
@@ -84,6 +88,14 @@ const SvEventDescription* ScShapeObj::GetSupportedMacroItems()
};
return aMacroDescriptionsImpl;
}
+// #i66550 HLINK_FOR_SHAPES
+ScMacroInfo* lcl_getShapeHyperMacroInfo( ScShapeObj* pShape, BOOL bCreate = FALSE )
+{
+ if( pShape )
+ if( SdrObject* pObj = pShape->GetSdrObject() )
+ return ScDrawLayer::GetMacroInfo( pObj, bCreate );
+ return 0;
+}
//------------------------------------------------------------------------
@@ -232,7 +244,7 @@ uno::Reference<text::XTextRange> lcl_GetTextRange( const uno::Reference<uno::XAg
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScShapeObj::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
// #i61527# cache property set info for this object
if ( !mxPropSetInfo.is() )
@@ -344,7 +356,7 @@ void SAL_CALL ScShapeObj::setPropertyValue(
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aNameString(aPropertyName);
if ( aNameString.EqualsAscii( SC_UNONAME_ANCHOR ) )
@@ -635,6 +647,22 @@ void SAL_CALL ScShapeObj::setPropertyValue(
}
}
}
+ else if ( aNameString.EqualsAscii( SC_UNONAME_HYPERLINK ) )
+ {
+ rtl::OUString sHlink;
+ ScMacroInfo* pInfo = lcl_getShapeHyperMacroInfo(this, TRUE);
+ if ( ( aValue >>= sHlink ) && pInfo )
+ pInfo->SetHlink( sHlink );
+ }
+ else if ( aNameString.EqualsAscii( SC_UNONAME_MOVEPROTECT ) )
+ {
+ if( SdrObject* pObj = this->GetSdrObject() )
+ {
+ sal_Bool aProt = false;
+ if( aValue >>= aProt )
+ pObj->SetMoveProtect( aProt );
+ }
+ }
else
{
GetShapePropertySet();
@@ -647,7 +675,7 @@ uno::Any SAL_CALL ScShapeObj::getPropertyValue( const rtl::OUString& aPropertyNa
throw(beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aNameString = aPropertyName;
uno::Any aAny;
@@ -816,6 +844,20 @@ uno::Any SAL_CALL ScShapeObj::getPropertyValue( const rtl::OUString& aPropertyNa
}
}
}
+ else if ( aNameString.EqualsAscii( SC_UNONAME_HYPERLINK ) )
+ {
+ rtl::OUString sHlink;
+ if ( ScMacroInfo* pInfo = lcl_getShapeHyperMacroInfo(this) )
+ sHlink = pInfo->GetHlink();
+ aAny <<= sHlink;
+ }
+ else if ( aNameString.EqualsAscii( SC_UNONAME_MOVEPROTECT ) )
+ {
+ sal_Bool aProt = false;
+ if ( SdrObject* pObj = this->GetSdrObject() )
+ aProt = pObj->IsMoveProtect();
+ aAny <<= aProt;
+ }
else
{
GetShapePropertySet();
@@ -831,7 +873,7 @@ void SAL_CALL ScShapeObj::addPropertyChangeListener( const rtl::OUString& aPrope
throw(beans::UnknownPropertyException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
GetShapePropertySet();
if (pShapePropertySet)
@@ -855,7 +897,7 @@ void SAL_CALL ScShapeObj::removePropertyChangeListener( const rtl::OUString& aPr
throw(beans::UnknownPropertyException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
GetShapePropertySet();
if (pShapePropertySet)
@@ -867,7 +909,7 @@ void SAL_CALL ScShapeObj::addVetoableChangeListener( const rtl::OUString& aPrope
throw(beans::UnknownPropertyException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
GetShapePropertySet();
if (pShapePropertySet)
@@ -879,7 +921,7 @@ void SAL_CALL ScShapeObj::removeVetoableChangeListener( const rtl::OUString& aPr
throw(beans::UnknownPropertyException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
GetShapePropertySet();
if (pShapePropertySet)
@@ -891,7 +933,7 @@ void SAL_CALL ScShapeObj::removeVetoableChangeListener( const rtl::OUString& aPr
beans::PropertyState SAL_CALL ScShapeObj::getPropertyState( const rtl::OUString& aPropertyName )
throw(beans::UnknownPropertyException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aNameString(aPropertyName);
beans::PropertyState eRet = beans::PropertyState_DIRECT_VALUE;
@@ -925,7 +967,7 @@ uno::Sequence<beans::PropertyState> SAL_CALL ScShapeObj::getPropertyStates(
const uno::Sequence<rtl::OUString>& aPropertyNames )
throw(beans::UnknownPropertyException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
// simple loop to get own and aggregated states
@@ -940,7 +982,7 @@ uno::Sequence<beans::PropertyState> SAL_CALL ScShapeObj::getPropertyStates(
void SAL_CALL ScShapeObj::setPropertyToDefault( const rtl::OUString& aPropertyName )
throw(beans::UnknownPropertyException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aNameString(aPropertyName);
if ( aNameString.EqualsAscii( SC_UNONAME_IMAGEMAP ) )
@@ -972,7 +1014,7 @@ uno::Any SAL_CALL ScShapeObj::getPropertyDefault( const rtl::OUString& aProperty
throw(beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aNameString = aPropertyName;
uno::Any aAny;
@@ -997,14 +1039,14 @@ uno::Any SAL_CALL ScShapeObj::getPropertyDefault( const rtl::OUString& aProperty
void SAL_CALL ScShapeObj::attach( const uno::Reference<text::XTextRange>& /* xTextRange */ )
throw(lang::IllegalArgumentException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
throw lang::IllegalArgumentException(); // anchor cannot be changed
}
uno::Reference<text::XTextRange> SAL_CALL ScShapeObj::getAnchor() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<text::XTextRange> xRet;
@@ -1045,7 +1087,7 @@ uno::Reference<text::XTextRange> SAL_CALL ScShapeObj::getAnchor() throw(uno::Run
void SAL_CALL ScShapeObj::dispose() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<lang::XComponent> xAggComp(lcl_GetComponent(mxShapeAgg));
if ( xAggComp.is() )
@@ -1056,7 +1098,7 @@ void SAL_CALL ScShapeObj::addEventListener(
const uno::Reference<lang::XEventListener>& xListener )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<lang::XComponent> xAggComp(lcl_GetComponent(mxShapeAgg));
if ( xAggComp.is() )
@@ -1067,7 +1109,7 @@ void SAL_CALL ScShapeObj::removeEventListener(
const uno::Reference<lang::XEventListener>& xListener )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<lang::XComponent> xAggComp(lcl_GetComponent(mxShapeAgg));
if ( xAggComp.is() )
@@ -1095,7 +1137,7 @@ void SAL_CALL ScShapeObj::insertTextContent( const uno::Reference<text::XTextRan
sal_Bool bAbsorb )
throw(lang::IllegalArgumentException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<text::XTextContent> xEffContent;
@@ -1123,7 +1165,7 @@ void SAL_CALL ScShapeObj::insertTextContent( const uno::Reference<text::XTextRan
void SAL_CALL ScShapeObj::removeTextContent( const uno::Reference<text::XTextContent>& xContent )
throw(container::NoSuchElementException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
// ScCellFieldObj can't be used here.
@@ -1138,7 +1180,7 @@ void SAL_CALL ScShapeObj::removeTextContent( const uno::Reference<text::XTextCon
uno::Reference<text::XTextCursor> SAL_CALL ScShapeObj::createTextCursor()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( mxShapeAgg.is() )
{
@@ -1156,7 +1198,7 @@ uno::Reference<text::XTextCursor> SAL_CALL ScShapeObj::createTextCursorByRange(
const uno::Reference<text::XTextRange>& aTextPosition )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( mxShapeAgg.is() && aTextPosition.is() )
{
@@ -1180,7 +1222,7 @@ void SAL_CALL ScShapeObj::insertString( const uno::Reference<text::XTextRange>&
const rtl::OUString& aString, sal_Bool bAbsorb )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<text::XSimpleText> xAggSimpleText(lcl_GetSimpleText(mxShapeAgg));
if ( xAggSimpleText.is() )
@@ -1193,7 +1235,7 @@ void SAL_CALL ScShapeObj::insertControlCharacter( const uno::Reference<text::XTe
sal_Int16 nControlCharacter, sal_Bool bAbsorb )
throw(lang::IllegalArgumentException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<text::XSimpleText> xAggSimpleText(lcl_GetSimpleText(mxShapeAgg));
if ( xAggSimpleText.is() )
@@ -1207,13 +1249,13 @@ void SAL_CALL ScShapeObj::insertControlCharacter( const uno::Reference<text::XTe
uno::Reference<text::XText> SAL_CALL ScShapeObj::getText() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return this;
}
uno::Reference<text::XTextRange> SAL_CALL ScShapeObj::getStart() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<text::XTextRange> xAggTextRange(lcl_GetTextRange(mxShapeAgg));
if ( xAggTextRange.is() )
@@ -1226,7 +1268,7 @@ uno::Reference<text::XTextRange> SAL_CALL ScShapeObj::getStart() throw(uno::Runt
uno::Reference<text::XTextRange> SAL_CALL ScShapeObj::getEnd() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<text::XTextRange> xAggTextRange(lcl_GetTextRange(mxShapeAgg));
if ( xAggTextRange.is() )
@@ -1239,7 +1281,7 @@ uno::Reference<text::XTextRange> SAL_CALL ScShapeObj::getEnd() throw(uno::Runtim
rtl::OUString SAL_CALL ScShapeObj::getString() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<text::XTextRange> xAggTextRange(lcl_GetTextRange(mxShapeAgg));
if ( xAggTextRange.is() )
@@ -1252,7 +1294,7 @@ rtl::OUString SAL_CALL ScShapeObj::getString() throw(uno::RuntimeException)
void SAL_CALL ScShapeObj::setString( const rtl::OUString& aText ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<text::XTextRange> xAggTextRange(lcl_GetTextRange(mxShapeAgg));
if ( xAggTextRange.is() )
@@ -1286,7 +1328,7 @@ uno::Sequence<uno::Type> SAL_CALL ScShapeObj::getTypes() throw(uno::RuntimeExcep
uno::Sequence<sal_Int8> SAL_CALL ScShapeObj::getImplementationId()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
// do we need to compute the implementation id for this instance?
if( !pImplementationId && mxShapeAgg.is())
{
@@ -1339,11 +1381,6 @@ SdrObject* ScShapeObj::GetSdrObject() const throw()
}
#define SC_EVENTACC_ONCLICK ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnClick" ) )
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
-#define SC_EVENTACC_ONACTION ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnAction" ) )
-#define SC_EVENTACC_URL ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) )
-#define SC_EVENTACC_ACTION ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Action" ) )
-#endif
#define SC_EVENTACC_SCRIPT ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Script" ) )
#define SC_EVENTACC_EVENTTYPE ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EventType" ) )
@@ -1355,10 +1392,7 @@ private:
ScMacroInfo* getInfo( BOOL bCreate = FALSE )
{
- if( mpShape )
- if( SdrObject* pObj = mpShape->GetSdrObject() )
- return ScDrawLayer::GetMacroInfo( pObj, bCreate );
- return 0;
+ return lcl_getShapeHyperMacroInfo( mpShape, bCreate );
}
public:
@@ -1384,11 +1418,7 @@ public:
isEventType = true;
continue;
}
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
- if ( isEventType && ((pProperties->Name == SC_EVENTACC_SCRIPT) || (pProperties->Name == SC_EVENTACC_URL)) )
-#else
if ( isEventType && (pProperties->Name == SC_EVENTACC_SCRIPT) )
-#endif
{
rtl::OUString sValue;
if ( pProperties->Value >>= sValue )
@@ -1399,10 +1429,8 @@ public:
break;
if ( pProperties->Name == SC_EVENTACC_SCRIPT )
pInfo->SetMacro( sValue );
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
else
pInfo->SetHlink( sValue );
-#endif
}
}
}
@@ -1425,19 +1453,6 @@ public:
aProperties[ 1 ].Value <<= pInfo->GetMacro();
}
}
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
- else if( aName == SC_EVENTACC_ONACTION )
- {
- if ( pInfo && (pInfo->GetHlink().getLength() > 0) )
- {
- aProperties.realloc( 2 );
- aProperties[ 0 ].Name = SC_EVENTACC_EVENTTYPE;
- aProperties[ 0 ].Value <<= SC_EVENTACC_ACTION;
- aProperties[ 1 ].Name = SC_EVENTACC_URL;
- aProperties[ 1 ].Value <<= pInfo->GetHlink();
- }
- }
-#endif
else
{
throw container::NoSuchElementException();
@@ -1448,25 +1463,14 @@ public:
virtual uno::Sequence< rtl::OUString > SAL_CALL getElementNames() throw(uno::RuntimeException)
{
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
- uno::Sequence< rtl::OUString > aSeq( 2 );
-#else
uno::Sequence< rtl::OUString > aSeq( 1 );
-#endif
aSeq[ 0 ] = SC_EVENTACC_ONCLICK;
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
- aSeq[ 1 ] = SC_EVENTACC_ONACTION;
-#endif
return aSeq;
}
virtual sal_Bool SAL_CALL hasByName( const rtl::OUString& aName ) throw(uno::RuntimeException)
{
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
- return (aName == SC_EVENTACC_ONCLICK) || (aName == SC_EVENTACC_ONACTION);
-#else
return aName == SC_EVENTACC_ONCLICK;
-#endif
}
// XElementAccess
@@ -1519,3 +1523,5 @@ uno::Sequence< ::rtl::OUString > SAL_CALL ScShapeObj::getSupportedServiceNames(
aSupported[ aSupported.getLength() - 1 ] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sheet.Shape" ) );
return aSupported;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/srchuno.cxx b/sc/source/ui/unoobj/srchuno.cxx
index f0bff44dc05c..6402f60d91aa 100644
--- a/sc/source/ui/unoobj/srchuno.cxx
+++ b/sc/source/ui/unoobj/srchuno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,6 +33,7 @@
#include "scitems.hxx"
#include <svl/srchitem.hxx>
+#include <vcl/svapp.hxx>
#include <osl/mutex.hxx>
#include <rtl/uuid.h>
@@ -40,7 +42,6 @@
#include "undoblk.hxx"
#include "hints.hxx"
#include "markdata.hxx"
-#include "unoguard.hxx"
#include "miscuno.hxx"
#include "unonames.hxx"
@@ -114,14 +115,14 @@ ScCellSearchObj::~ScCellSearchObj()
rtl::OUString SAL_CALL ScCellSearchObj::getSearchString() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return pSearchItem->GetSearchString();
}
void SAL_CALL ScCellSearchObj::setSearchString( const rtl::OUString& aString )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
pSearchItem->SetSearchString( aString );
}
@@ -129,14 +130,14 @@ void SAL_CALL ScCellSearchObj::setSearchString( const rtl::OUString& aString )
rtl::OUString SAL_CALL ScCellSearchObj::getReplaceString() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return pSearchItem->GetReplaceString();
}
void SAL_CALL ScCellSearchObj::setReplaceString( const rtl::OUString& aReplaceString )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
pSearchItem->SetReplaceString( aReplaceString );
}
@@ -145,7 +146,7 @@ void SAL_CALL ScCellSearchObj::setReplaceString( const rtl::OUString& aReplaceSt
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScCellSearchObj::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static uno::Reference<beans::XPropertySetInfo> aRef(
new SfxItemPropertySetInfo( aPropSet.getPropertyMap() ));
return aRef;
@@ -157,7 +158,7 @@ void SAL_CALL ScCellSearchObj::setPropertyValue(
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aString(aPropertyName);
if (aString.EqualsAscii( SC_UNO_SRCHBACK )) pSearchItem->SetBackward( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
@@ -179,7 +180,7 @@ uno::Any SAL_CALL ScCellSearchObj::getPropertyValue( const rtl::OUString& aPrope
throw(beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aString(aPropertyName);
uno::Any aRet;
@@ -276,3 +277,4 @@ ScCellSearchObj* ScCellSearchObj::getImplementation(
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index 36c2962bfc71..9383816528ab 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,6 +44,7 @@
#include <sfx2/bindings.hxx>
#include <sfx2/printer.hxx>
#include <vcl/virdev.hxx>
+#include <vcl/svapp.hxx>
#include <svl/itempool.hxx>
#include <svl/itemset.hxx>
#include <svl/intitem.hxx>
@@ -69,7 +71,6 @@
#include "attrib.hxx"
#include "stlpool.hxx"
#include "docpool.hxx"
-#include "unoguard.hxx"
#include "miscuno.hxx"
#include "convuno.hxx"
#include "tablink.hxx"
@@ -628,7 +629,7 @@ uno::Any SAL_CALL ScStyleFamiliesObj::getByIndex( sal_Int32 nIndex )
throw(lang::IndexOutOfBoundsException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference< container::XNameContainer > xFamily(GetObjectByIndex_Impl(nIndex));
if (xFamily.is())
return uno::makeAny(xFamily);
@@ -639,13 +640,13 @@ uno::Any SAL_CALL ScStyleFamiliesObj::getByIndex( sal_Int32 nIndex )
uno::Type SAL_CALL ScStyleFamiliesObj::getElementType() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ::getCppuType((const uno::Reference< container::XNameContainer >*)0); // muss zu getByIndex passen
}
sal_Bool SAL_CALL ScStyleFamiliesObj::hasElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ( getCount() != 0 );
}
@@ -655,7 +656,7 @@ uno::Any SAL_CALL ScStyleFamiliesObj::getByName( const rtl::OUString& aName )
throw(container::NoSuchElementException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference< container::XNameContainer > xFamily(GetObjectByName_Impl(aName));
if (xFamily.is())
return uno::makeAny(xFamily);
@@ -667,7 +668,7 @@ uno::Any SAL_CALL ScStyleFamiliesObj::getByName( const rtl::OUString& aName )
uno::Sequence<rtl::OUString> SAL_CALL ScStyleFamiliesObj::getElementNames()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Sequence<rtl::OUString> aNames(SC_STYLE_FAMILY_COUNT);
rtl::OUString* pNames = aNames.getArray();
pNames[0] = rtl::OUString::createFromAscii( SC_FAMILYNAME_CELL );
@@ -678,7 +679,7 @@ uno::Sequence<rtl::OUString> SAL_CALL ScStyleFamiliesObj::getElementNames()
sal_Bool SAL_CALL ScStyleFamiliesObj::hasByName( const rtl::OUString& aName )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aNameStr( aName );
return ( aNameStr.EqualsAscii( SC_FAMILYNAME_CELL ) || aNameStr.EqualsAscii( SC_FAMILYNAME_PAGE ) );
}
@@ -811,7 +812,7 @@ void SAL_CALL ScStyleFamilyObj::insertByName( const rtl::OUString& aName, const
throw(lang::IllegalArgumentException, container::ElementExistException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
sal_Bool bDone = sal_False;
// Reflection muss nicht uno::XInterface sein, kann auch irgendein Interface sein...
uno::Reference< uno::XInterface > xInterface(aElement, uno::UNO_QUERY);
@@ -857,7 +858,7 @@ void SAL_CALL ScStyleFamilyObj::replaceByName( const rtl::OUString& aName, const
throw(lang::IllegalArgumentException, container::NoSuchElementException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
//! zusammenfassen?
removeByName( aName );
insertByName( aName, aElement );
@@ -867,7 +868,7 @@ void SAL_CALL ScStyleFamilyObj::removeByName( const rtl::OUString& aName )
throw(container::NoSuchElementException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
BOOL bFound = FALSE;
if ( pDocShell )
{
@@ -922,7 +923,7 @@ void SAL_CALL ScStyleFamilyObj::removeByName( const rtl::OUString& aName )
sal_Int32 SAL_CALL ScStyleFamilyObj::getCount() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( pDocShell )
{
ScDocument* pDoc = pDocShell->GetDocument();
@@ -938,7 +939,7 @@ uno::Any SAL_CALL ScStyleFamilyObj::getByIndex( sal_Int32 nIndex )
throw(lang::IndexOutOfBoundsException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference< style::XStyle > xObj(GetObjectByIndex_Impl(nIndex));
if (xObj.is())
return uno::makeAny(xObj);
@@ -949,13 +950,13 @@ uno::Any SAL_CALL ScStyleFamilyObj::getByIndex( sal_Int32 nIndex )
uno::Type SAL_CALL ScStyleFamilyObj::getElementType() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ::getCppuType((const uno::Reference< style::XStyle >*)0); // muss zu getByIndex passen
}
sal_Bool SAL_CALL ScStyleFamilyObj::hasElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ( getCount() != 0 );
}
@@ -965,7 +966,7 @@ uno::Any SAL_CALL ScStyleFamilyObj::getByName( const rtl::OUString& aName )
throw(container::NoSuchElementException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference< style::XStyle > xObj(
GetObjectByName_Impl( ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<UINT16>(eFamily) ) ));
if (xObj.is())
@@ -978,7 +979,7 @@ uno::Any SAL_CALL ScStyleFamilyObj::getByName( const rtl::OUString& aName )
uno::Sequence<rtl::OUString> SAL_CALL ScStyleFamilyObj::getElementNames()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( pDocShell )
{
ScDocument* pDoc = pDocShell->GetDocument();
@@ -1008,7 +1009,7 @@ uno::Sequence<rtl::OUString> SAL_CALL ScStyleFamilyObj::getElementNames()
sal_Bool SAL_CALL ScStyleFamilyObj::hasByName( const rtl::OUString& aName )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( pDocShell )
{
String aString(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<UINT16>(eFamily) ));
@@ -1040,7 +1041,7 @@ uno::Any SAL_CALL ScStyleFamilyObj::getPropertyValue( const ::rtl::OUString& sPr
if ( sPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("DisplayName") ) )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
sal_uInt32 nResId = 0;
switch ( eFamily )
{
@@ -1185,7 +1186,7 @@ SfxStyleSheetBase* ScStyleObj::GetStyle_Impl()
sal_Bool SAL_CALL ScStyleObj::isUserDefined() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
SfxStyleSheetBase* pStyle = GetStyle_Impl();
if (pStyle)
return pStyle->IsUserDefined();
@@ -1194,7 +1195,7 @@ sal_Bool SAL_CALL ScStyleObj::isUserDefined() throw(uno::RuntimeException)
sal_Bool SAL_CALL ScStyleObj::isInUse() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
SfxStyleSheetBase* pStyle = GetStyle_Impl();
if (pStyle)
return pStyle->IsUsed();
@@ -1203,7 +1204,7 @@ sal_Bool SAL_CALL ScStyleObj::isInUse() throw(uno::RuntimeException)
rtl::OUString SAL_CALL ScStyleObj::getParentStyle() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
SfxStyleSheetBase* pStyle = GetStyle_Impl();
if (pStyle)
return ScStyleNameConversion::DisplayToProgrammaticName( pStyle->GetParent(), sal::static_int_cast<UINT16>(eFamily) );
@@ -1213,7 +1214,7 @@ rtl::OUString SAL_CALL ScStyleObj::getParentStyle() throw(uno::RuntimeException)
void SAL_CALL ScStyleObj::setParentStyle( const rtl::OUString& rParentStyle )
throw(container::NoSuchElementException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
SfxStyleSheetBase* pStyle = GetStyle_Impl();
if (pStyle)
{
@@ -1259,7 +1260,7 @@ void SAL_CALL ScStyleObj::setParentStyle( const rtl::OUString& rParentStyle )
rtl::OUString SAL_CALL ScStyleObj::getName() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
SfxStyleSheetBase* pStyle = GetStyle_Impl();
if (pStyle)
return ScStyleNameConversion::DisplayToProgrammaticName( pStyle->GetName(), sal::static_int_cast<UINT16>(eFamily) );
@@ -1269,7 +1270,7 @@ rtl::OUString SAL_CALL ScStyleObj::getName() throw(uno::RuntimeException)
void SAL_CALL ScStyleObj::setName( const rtl::OUString& aNewName )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
SfxStyleSheetBase* pStyle = GetStyle_Impl();
if (pStyle)
{
@@ -1351,7 +1352,7 @@ const SfxItemSet* ScStyleObj::GetStyleItemSet_Impl( const ::rtl::OUString& rProp
beans::PropertyState SAL_CALL ScStyleObj::getPropertyState( const rtl::OUString& aPropertyName )
throw(beans::UnknownPropertyException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
beans::PropertyState eRet = beans::PropertyState_DIRECT_VALUE;
const SfxItemPropertySimpleEntry* pResultEntry = NULL;
@@ -1395,7 +1396,7 @@ uno::Sequence<beans::PropertyState> SAL_CALL ScStyleObj::getPropertyStates(
// duemmliche Default-Implementierung: alles einzeln per getPropertyState holen
//! sollte optimiert werden!
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
const rtl::OUString* pNames = aPropertyNames.getConstArray();
uno::Sequence<beans::PropertyState> aRet(aPropertyNames.getLength());
beans::PropertyState* pStates = aRet.getArray();
@@ -1407,7 +1408,7 @@ uno::Sequence<beans::PropertyState> SAL_CALL ScStyleObj::getPropertyStates(
void SAL_CALL ScStyleObj::setPropertyToDefault( const rtl::OUString& aPropertyName )
throw(beans::UnknownPropertyException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
const SfxItemPropertyMap* pMap = pPropSet->getPropertyMap();
const SfxItemPropertySimpleEntry* pEntry = pMap->getByName( aPropertyName );
@@ -1421,7 +1422,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyDefault( const rtl::OUString& aProperty
throw(beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Any aAny;
const SfxItemPropertySimpleEntry* pResultEntry = NULL;
@@ -1515,7 +1516,7 @@ void SAL_CALL ScStyleObj::setPropertyValues( const uno::Sequence< rtl::OUString
throw (beans::PropertyVetoException, lang::IllegalArgumentException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
sal_Int32 nCount = aPropertyNames.getLength();
if ( aValues.getLength() != nCount )
@@ -1539,7 +1540,7 @@ uno::Sequence<uno::Any> SAL_CALL ScStyleObj::getPropertyValues(
const uno::Sequence< rtl::OUString >& aPropertyNames )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
//! optimize
@@ -1580,7 +1581,7 @@ void SAL_CALL ScStyleObj::firePropertiesChangeEvent( const uno::Sequence<rtl::OU
void SAL_CALL ScStyleObj::setAllPropertiesToDefault() throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
SfxStyleSheetBase* pStyle = GetStyle_Impl();
if ( pStyle )
@@ -1627,7 +1628,7 @@ void SAL_CALL ScStyleObj::setAllPropertiesToDefault() throw (uno::RuntimeExcepti
void SAL_CALL ScStyleObj::setPropertiesToDefault( const uno::Sequence<rtl::OUString>& aPropertyNames )
throw (beans::UnknownPropertyException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
sal_Int32 nCount = aPropertyNames.getLength();
if ( nCount )
@@ -1648,7 +1649,7 @@ uno::Sequence<uno::Any> SAL_CALL ScStyleObj::getPropertyDefaults(
throw (beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
//! optimize
@@ -1668,7 +1669,7 @@ uno::Sequence<uno::Any> SAL_CALL ScStyleObj::getPropertyDefaults(
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScStyleObj::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return pPropSet->getPropertySetInfo();
}
@@ -1678,7 +1679,7 @@ void SAL_CALL ScStyleObj::setPropertyValue(
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
const SfxItemPropertySimpleEntry* pEntry = pPropSet->getPropertyMap()->getByName( aPropertyName );
if ( !pEntry )
@@ -1973,7 +1974,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const rtl::OUString& aPropertyNa
throw(beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Any aAny;
if ( aPropertyName.equalsAscii( SC_UNONAME_DISPNAME ) ) // read-only
@@ -2133,3 +2134,4 @@ uno::Sequence<rtl::OUString> SAL_CALL ScStyleObj::getSupportedServiceNames()
//------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/targuno.cxx b/sc/source/ui/unoobj/targuno.cxx
index e4a0768002a6..6509b03d864d 100644
--- a/sc/source/ui/unoobj/targuno.cxx
+++ b/sc/source/ui/unoobj/targuno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,7 +47,6 @@
#include "nameuno.hxx"
#include "docsh.hxx"
#include "content.hxx"
-#include "unoguard.hxx"
#include "scresid.hxx"
#include "sc.hrc"
#include "unonames.hxx"
@@ -208,7 +208,7 @@ uno::Reference< container::XNameAccess > SAL_CALL ScLinkTargetTypeObj::getLinks
uno::Reference< beans::XPropertySetInfo > SAL_CALL ScLinkTargetTypeObj::getPropertySetInfo(void) throw( uno::RuntimeException )
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static uno::Reference< beans::XPropertySetInfo > aRef(new SfxItemPropertySetInfo( lcl_GetLinkTargetMap() ));
return aRef;
}
@@ -314,3 +314,4 @@ sal_Bool SAL_CALL ScLinkTargetsObj::hasElements(void) throw( uno::RuntimeExcepti
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx
index 5c45195621d8..d97cce02b426 100644
--- a/sc/source/ui/unoobj/textuno.cxx
+++ b/sc/source/ui/unoobj/textuno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,6 +43,7 @@
#include <editeng/unofored.hxx>
#include <rtl/uuid.h>
#include <vcl/virdev.hxx>
+#include <vcl/svapp.hxx>
#include <com/sun/star/awt/FontSlant.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
@@ -52,7 +54,6 @@
#include "editsrc.hxx"
#include "docsh.hxx"
#include "editutil.hxx"
-#include "unoguard.hxx"
#include "miscuno.hxx"
#include "cellsuno.hxx"
#include "hints.hxx"
@@ -167,21 +168,21 @@ void ScHeaderFooterContentObj::UpdateText( USHORT nPart, EditEngine& rSource )
uno::Reference<text::XText> SAL_CALL ScHeaderFooterContentObj::getLeftText()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScHeaderFooterTextObj( *this, SC_HDFT_LEFT );
}
uno::Reference<text::XText> SAL_CALL ScHeaderFooterContentObj::getCenterText()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScHeaderFooterTextObj( *this, SC_HDFT_CENTER );
}
uno::Reference<text::XText> SAL_CALL ScHeaderFooterContentObj::getRightText()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScHeaderFooterTextObj( *this, SC_HDFT_RIGHT );
}
@@ -245,7 +246,7 @@ ScHeaderFooterTextData::ScHeaderFooterTextData( ScHeaderFooterContentObj& rConte
ScHeaderFooterTextData::~ScHeaderFooterTextData()
{
- ScUnoGuard aGuard; // needed for EditEngine dtor
+ SolarMutexGuard aGuard; // needed for EditEngine dtor
rContentObj.RemoveListener( *this );
@@ -369,7 +370,7 @@ const SvxUnoText& ScHeaderFooterTextObj::GetUnoText()
uno::Reference<text::XTextCursor> SAL_CALL ScHeaderFooterTextObj::createTextCursor()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScHeaderFooterTextCursor( *this );
}
@@ -377,7 +378,7 @@ uno::Reference<text::XTextCursor> SAL_CALL ScHeaderFooterTextObj::createTextCurs
const uno::Reference<text::XTextRange>& aTextPosition )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (!pUnoText)
CreateUnoText_Impl();
return pUnoText->createTextCursorByRange(aTextPosition);
@@ -397,7 +398,7 @@ void ScHeaderFooterTextObj::FillDummyFieldData( ScHeaderFieldData& rData ) // s
rtl::OUString SAL_CALL ScHeaderFooterTextObj::getString() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
rtl::OUString aRet;
const EditTextObject* pData;
@@ -427,7 +428,7 @@ rtl::OUString SAL_CALL ScHeaderFooterTextObj::getString() throw(uno::RuntimeExce
void SAL_CALL ScHeaderFooterTextObj::setString( const rtl::OUString& aText ) throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aString(aText);
// for pure text, no font info is needed in pool defaults
@@ -441,7 +442,7 @@ void SAL_CALL ScHeaderFooterTextObj::insertString( const uno::Reference<text::XT
const rtl::OUString& aString, sal_Bool bAbsorb )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (!pUnoText)
CreateUnoText_Impl();
pUnoText->insertString( xRange, aString, bAbsorb );
@@ -452,7 +453,7 @@ void SAL_CALL ScHeaderFooterTextObj::insertControlCharacter(
sal_Int16 nControlCharacter, sal_Bool bAbsorb )
throw(lang::IllegalArgumentException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (!pUnoText)
CreateUnoText_Impl();
pUnoText->insertControlCharacter( xRange, nControlCharacter, bAbsorb );
@@ -464,7 +465,7 @@ void SAL_CALL ScHeaderFooterTextObj::insertTextContent(
sal_Bool bAbsorb )
throw(lang::IllegalArgumentException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( xContent.is() && xRange.is() )
{
ScHeaderFieldObj* pHeaderField = ScHeaderFieldObj::getImplementation( xContent );
@@ -472,13 +473,6 @@ void SAL_CALL ScHeaderFooterTextObj::insertTextContent(
SvxUnoTextRangeBase* pTextRange =
ScHeaderFooterTextCursor::getImplementation( xRange );
-#if 0
- if (!pTextRange)
- pTextRange = (SvxUnoTextRange*)xRange->getImplementation(
- SvxUnoTextRange_getReflection() );
- //! bei SvxUnoTextRange testen, ob in passendem Objekt !!!
-#endif
-
if ( pHeaderField && !pHeaderField->IsInserted() && pTextRange )
{
SvxEditSource* pEditSource = pTextRange->GetEditSource();
@@ -524,7 +518,7 @@ void SAL_CALL ScHeaderFooterTextObj::removeTextContent(
const uno::Reference<text::XTextContent>& xContent )
throw(container::NoSuchElementException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if ( xContent.is() )
{
ScHeaderFieldObj* pHeaderField = ScHeaderFieldObj::getImplementation( xContent );
@@ -542,7 +536,7 @@ void SAL_CALL ScHeaderFooterTextObj::removeTextContent(
uno::Reference<text::XText> SAL_CALL ScHeaderFooterTextObj::getText() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (!pUnoText)
CreateUnoText_Impl();
return pUnoText->getText();
@@ -550,7 +544,7 @@ uno::Reference<text::XText> SAL_CALL ScHeaderFooterTextObj::getText() throw(uno:
uno::Reference<text::XTextRange> SAL_CALL ScHeaderFooterTextObj::getStart() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (!pUnoText)
CreateUnoText_Impl();
return pUnoText->getStart();
@@ -558,7 +552,7 @@ uno::Reference<text::XTextRange> SAL_CALL ScHeaderFooterTextObj::getStart() thro
uno::Reference<text::XTextRange> SAL_CALL ScHeaderFooterTextObj::getEnd() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (!pUnoText)
CreateUnoText_Impl();
return pUnoText->getEnd();
@@ -569,7 +563,7 @@ uno::Reference<text::XTextRange> SAL_CALL ScHeaderFooterTextObj::getEnd() throw(
uno::Reference<container::XEnumerationAccess> SAL_CALL ScHeaderFooterTextObj::getTextFields()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
// all fields
return new ScHeaderFieldsObj( &aTextData.GetContentObj(), aTextData.GetPart(), SC_SERVICE_INVALID );
}
@@ -588,7 +582,7 @@ void SAL_CALL ScHeaderFooterTextObj::moveTextRange(
sal_Int16 nParagraphs )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (!pUnoText)
CreateUnoText_Impl();
pUnoText->moveTextRange( xRange, nParagraphs );
@@ -599,7 +593,7 @@ void SAL_CALL ScHeaderFooterTextObj::moveTextRange(
uno::Reference<container::XEnumeration> SAL_CALL ScHeaderFooterTextObj::createEnumeration()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (!pUnoText)
CreateUnoText_Impl();
return pUnoText->createEnumeration();
@@ -609,7 +603,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScHeaderFooterTextObj::createEn
uno::Type SAL_CALL ScHeaderFooterTextObj::getElementType() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (!pUnoText)
CreateUnoText_Impl();
return pUnoText->getElementType();
@@ -617,7 +611,7 @@ uno::Type SAL_CALL ScHeaderFooterTextObj::getElementType() throw(uno::RuntimeExc
sal_Bool SAL_CALL ScHeaderFooterTextObj::hasElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (!pUnoText)
CreateUnoText_Impl();
return pUnoText->hasElements();
@@ -648,13 +642,13 @@ ScCellTextCursor::~ScCellTextCursor() throw()
uno::Reference<text::XText> SAL_CALL ScCellTextCursor::getText() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return &rTextObj;
}
uno::Reference<text::XTextRange> SAL_CALL ScCellTextCursor::getStart() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
//! use other object for range than cursor?
@@ -671,7 +665,7 @@ uno::Reference<text::XTextRange> SAL_CALL ScCellTextCursor::getStart() throw(uno
uno::Reference<text::XTextRange> SAL_CALL ScCellTextCursor::getEnd() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
//! use other object for range than cursor?
@@ -752,13 +746,13 @@ ScHeaderFooterTextCursor::~ScHeaderFooterTextCursor() throw()
uno::Reference<text::XText> SAL_CALL ScHeaderFooterTextCursor::getText() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return &rTextObj;
}
uno::Reference<text::XTextRange> SAL_CALL ScHeaderFooterTextCursor::getStart() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
//! use other object for range than cursor?
@@ -775,7 +769,7 @@ uno::Reference<text::XTextRange> SAL_CALL ScHeaderFooterTextCursor::getStart() t
uno::Reference<text::XTextRange> SAL_CALL ScHeaderFooterTextCursor::getEnd() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
//! use other object for range than cursor?
@@ -856,13 +850,13 @@ ScDrawTextCursor::~ScDrawTextCursor() throw()
uno::Reference<text::XText> SAL_CALL ScDrawTextCursor::getText() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return xParentText;
}
uno::Reference<text::XTextRange> SAL_CALL ScDrawTextCursor::getStart() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
//! use other object for range than cursor?
@@ -879,7 +873,7 @@ uno::Reference<text::XTextRange> SAL_CALL ScDrawTextCursor::getStart() throw(uno
uno::Reference<text::XTextRange> SAL_CALL ScDrawTextCursor::getEnd() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
//! use other object for range than cursor?
@@ -950,7 +944,7 @@ ScSimpleEditSourceHelper::ScSimpleEditSourceHelper()
ScSimpleEditSourceHelper::~ScSimpleEditSourceHelper()
{
- ScUnoGuard aGuard; // needed for EditEngine dtor
+ SolarMutexGuard aGuard; // needed for EditEngine dtor
delete pOriginalSource;
delete pForwarder;
@@ -999,7 +993,7 @@ ScCellTextData::ScCellTextData(ScDocShell* pDocSh, const ScAddress& rP) :
ScCellTextData::~ScCellTextData()
{
- ScUnoGuard aGuard; // needed for EditEngine dtor
+ SolarMutexGuard aGuard; // needed for EditEngine dtor
if (pDocShell)
{
@@ -1150,3 +1144,4 @@ ScCellTextObj::~ScCellTextObj() throw()
{
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/tokenuno.cxx b/sc/source/ui/unoobj/tokenuno.cxx
index 5e3b3102e14a..fff4fe64d8ba 100644
--- a/sc/source/ui/unoobj/tokenuno.cxx
+++ b/sc/source/ui/unoobj/tokenuno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,6 +31,8 @@
#include "tokenuno.hxx"
+#include <sal/macros.h>
+
#include <com/sun/star/sheet/ComplexReference.hpp>
#include <com/sun/star/sheet/ExternalReference.hpp>
#include <com/sun/star/sheet/ReferenceFlags.hpp>
@@ -37,11 +40,11 @@
#include <com/sun/star/table/CellAddress.hpp>
#include <svl/itemprop.hxx>
+#include <vcl/svapp.hxx>
#include "miscuno.hxx"
#include "convuno.hxx"
#include "unonames.hxx"
-#include "unoguard.hxx"
#include "token.hxx"
#include "compiler.hxx"
#include "tokenarray.hxx"
@@ -105,7 +108,7 @@ void ScFormulaParserObj::SetCompilerFlags( ScCompiler& rCompiler ) const
formula::FormulaGrammar::CONV_XL_OOX, // <- AddressConvention::XL_OOX
formula::FormulaGrammar::CONV_LOTUS_A1 // <- AddressConvention::LOTUS_A1
};
- static const sal_Int16 nConvMapCount = sizeof(aConvMap)/sizeof(aConvMap[0]);
+ static const sal_Int16 nConvMapCount = SAL_N_ELEMENTS(aConvMap);
// If mxOpCodeMap is not empty it overrides mbEnglish, and vice versa. We
// don't need to initialize things twice.
@@ -135,7 +138,7 @@ uno::Sequence<sheet::FormulaToken> SAL_CALL ScFormulaParserObj::parseFormula(
const rtl::OUString& aFormula, const table::CellAddress& rReferencePos )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Sequence<sheet::FormulaToken> aRet;
if (mpDocShell)
@@ -161,7 +164,7 @@ rtl::OUString SAL_CALL ScFormulaParserObj::printFormula(
const uno::Sequence<sheet::FormulaToken>& aTokens, const table::CellAddress& rReferencePos )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
rtl::OUString aRet;
if (mpDocShell)
@@ -188,7 +191,7 @@ rtl::OUString SAL_CALL ScFormulaParserObj::printFormula(
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScFormulaParserObj::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static uno::Reference< beans::XPropertySetInfo > aRef(new SfxItemPropertySetInfo( lcl_GetFormulaParserMap() ));
return aRef;
}
@@ -199,7 +202,7 @@ void SAL_CALL ScFormulaParserObj::setPropertyValue(
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aString(aPropertyName);
if ( aString.EqualsAscii( SC_UNO_COMPILEFAP ) )
{
@@ -257,7 +260,7 @@ uno::Any SAL_CALL ScFormulaParserObj::getPropertyValue( const rtl::OUString& aPr
throw(beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Any aRet;
String aString(aPropertyName);
if ( aString.EqualsAscii( SC_UNO_COMPILEFAP ) )
@@ -465,3 +468,4 @@ ScFormulaOpCodeMapperObj::ScFormulaOpCodeMapperObj(::std::auto_ptr<formula::Form
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/unodoc.cxx b/sc/source/ui/unoobj/unodoc.cxx
index d3d755e8b495..0350546cce2a 100644
--- a/sc/source/ui/unoobj/unodoc.cxx
+++ b/sc/source/ui/unoobj/unodoc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,7 +37,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include "scmod.hxx"
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include "docsh.hxx"
@@ -58,10 +59,11 @@ uno::Sequence< rtl::OUString > SAL_CALL ScDocument_getSupportedServiceNames() th
uno::Reference< uno::XInterface > SAL_CALL ScDocument_createInstance(
const uno::Reference< lang::XMultiServiceFactory > & /* rSMgr */, const sal_uInt64 _nCreationFlags ) throw( uno::Exception )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
ScDLL::Init();
SfxObjectShell* pShell = new ScDocShell( _nCreationFlags );
return uno::Reference< uno::XInterface >( pShell->GetModel() );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/unoreflist.cxx b/sc/source/ui/unoobj/unoreflist.cxx
index 65f43273f6e7..1a80e1e8b2c7 100644
--- a/sc/source/ui/unoobj/unoreflist.cxx
+++ b/sc/source/ui/unoobj/unoreflist.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -71,3 +72,4 @@ ScUnoRefUndoHint::~ScUnoRefUndoHint()
{
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx
index 86ebf066a52d..297ae74b5de1 100644
--- a/sc/source/ui/unoobj/viewuno.cxx
+++ b/sc/source/ui/unoobj/viewuno.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,6 +52,7 @@
#include <sfx2/viewfrm.hxx>
#include <rtl/uuid.h>
#include <toolkit/helper/convert.hxx>
+#include <vcl/svapp.hxx>
#include "drawsh.hxx"
#include "drtxtob.hxx"
@@ -65,7 +67,6 @@
#include "drawview.hxx"
#include "fupoor.hxx"
#include "sc.hrc"
-#include "unoguard.hxx"
#include "unonames.hxx"
#include "scmod.hxx"
#include "appoptio.hxx"
@@ -201,7 +202,7 @@ uno::Sequence<sal_Int8> SAL_CALL ScViewPaneBase::getImplementationId()
sal_Int32 SAL_CALL ScViewPaneBase::getFirstVisibleColumn() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pViewShell)
{
ScViewData* pViewData = pViewShell->GetViewData();
@@ -219,7 +220,7 @@ sal_Int32 SAL_CALL ScViewPaneBase::getFirstVisibleColumn() throw(uno::RuntimeExc
void SAL_CALL ScViewPaneBase::setFirstVisibleColumn( sal_Int32 nFirstVisibleColumn )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pViewShell)
{
ScViewData* pViewData = pViewShell->GetViewData();
@@ -235,7 +236,7 @@ void SAL_CALL ScViewPaneBase::setFirstVisibleColumn( sal_Int32 nFirstVisibleColu
sal_Int32 SAL_CALL ScViewPaneBase::getFirstVisibleRow() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pViewShell)
{
ScViewData* pViewData = pViewShell->GetViewData();
@@ -253,7 +254,7 @@ sal_Int32 SAL_CALL ScViewPaneBase::getFirstVisibleRow() throw(uno::RuntimeExcept
void SAL_CALL ScViewPaneBase::setFirstVisibleRow( sal_Int32 nFirstVisibleRow )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pViewShell)
{
ScViewData* pViewData = pViewShell->GetViewData();
@@ -269,7 +270,7 @@ void SAL_CALL ScViewPaneBase::setFirstVisibleRow( sal_Int32 nFirstVisibleRow )
table::CellRangeAddress SAL_CALL ScViewPaneBase::getVisibleRange() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
table::CellRangeAddress aAdr;
if (pViewShell)
{
@@ -302,7 +303,7 @@ table::CellRangeAddress SAL_CALL ScViewPaneBase::getVisibleRange() throw(uno::Ru
uno::Reference<table::XCellRange> SAL_CALL ScViewPaneBase::getReferredCells()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (pViewShell)
{
ScDocShell* pDocSh = pViewShell->GetViewData()->GetDocShell();
@@ -340,7 +341,7 @@ namespace
// XFormLayerAccess
uno::Reference< form::runtime::XFormController > SAL_CALL ScViewPaneBase::getFormController( const uno::Reference< form::XForm >& _Form ) throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference< form::runtime::XFormController > xController;
@@ -355,7 +356,7 @@ uno::Reference< form::runtime::XFormController > SAL_CALL ScViewPaneBase::getFor
::sal_Bool SAL_CALL ScViewPaneBase::isFormDesignMode( ) throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
sal_Bool bIsFormDesignMode( sal_True );
@@ -368,7 +369,7 @@ uno::Reference< form::runtime::XFormController > SAL_CALL ScViewPaneBase::getFor
void SAL_CALL ScViewPaneBase::setFormDesignMode( ::sal_Bool _DesignMode ) throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
Window* pWindow( NULL );
SdrView* pSdrView( NULL );
@@ -383,7 +384,7 @@ uno::Reference<awt::XControl> SAL_CALL ScViewPaneBase::getControl(
const uno::Reference<awt::XControlModel>& xModel )
throw(container::NoSuchElementException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<awt::XControl> xRet;
@@ -460,6 +461,91 @@ void SAL_CALL ScViewPaneObj::release() throw()
OWeakObject::release();
}
+// To process sheet compatibile event
+typedef ::cppu::WeakImplHelper2< awt::XEnhancedMouseClickHandler, view::XSelectionChangeListener > TabViewEventListener_BASE;
+class ScTabViewEventListener: public TabViewEventListener_BASE
+{
+private:
+ ScTabViewObj* pViewObj;
+ uno::Reference< script::vba::XVBAEventProcessor > xVbaEventsHelper;
+ sal_Bool bDelaySelectionEvent;
+ sal_Bool bSelectionChangeOccured;
+
+ void fireSelectionChangeEvent();
+
+public:
+ ScTabViewEventListener( ScTabViewObj* pObj, uno::Reference< script::vba::XVBAEventProcessor >& rVbaEventsHelper);
+ ~ScTabViewEventListener();
+ // XEnhancedMouseClickHandler
+ virtual sal_Bool SAL_CALL mousePressed( const awt::EnhancedMouseEvent& e ) throw (uno::RuntimeException);
+ virtual sal_Bool SAL_CALL mouseReleased( const awt::EnhancedMouseEvent& e ) throw (uno::RuntimeException);
+
+ // XSelectionChangeListener
+ virtual void SAL_CALL selectionChanged( const lang::EventObject& aEvent ) throw ( uno::RuntimeException );
+ // XEventListener
+ virtual void SAL_CALL disposing( const lang::EventObject& aEvent ) throw ( uno::RuntimeException );
+};
+
+ScTabViewEventListener::ScTabViewEventListener(ScTabViewObj* pObj, uno::Reference< script::vba::XVBAEventProcessor >& rVbaEventsHelper):
+ pViewObj( pObj ),xVbaEventsHelper( rVbaEventsHelper ), bDelaySelectionEvent( sal_False ), bSelectionChangeOccured( sal_False )
+{
+}
+
+ScTabViewEventListener::~ScTabViewEventListener()
+{
+}
+
+void SAL_CALL ScTabViewEventListener::disposing( const lang::EventObject& /*aEvent*/ ) throw ( uno::RuntimeException )
+{
+}
+
+void ScTabViewEventListener::fireSelectionChangeEvent()
+{
+ if ( xVbaEventsHelper.is() && pViewObj )
+ {
+ uno::Sequence< uno::Any > aArgs(1);
+ aArgs[0] = pViewObj->getSelection();
+ try
+ {
+ xVbaEventsHelper->processVbaEvent( script::vba::VBAEventId::WORKSHEET_SELECTIONCHANGE, aArgs );
+ }
+ catch( uno::Exception& )
+ {
+ }
+ }
+ bDelaySelectionEvent = sal_False;
+ bSelectionChangeOccured = sal_False;
+}
+
+sal_Bool SAL_CALL ScTabViewEventListener::mousePressed( const awt::EnhancedMouseEvent& e ) throw (uno::RuntimeException)
+{
+ // Delay to fire the selection change event if clicking the left mouse button to do selection.
+ bDelaySelectionEvent = ( e.Buttons == ::com::sun::star::awt::MouseButton::RIGHT ) ? sal_False : sal_True;
+ bSelectionChangeOccured = sal_False;
+
+ // ScTabViewObj::MousePressed should handle process BeforeDoubleClick and BeforeRightClick events
+ return sal_True;
+}
+
+sal_Bool SAL_CALL ScTabViewEventListener::mouseReleased( const awt::EnhancedMouseEvent&/*e*/) throw (uno::RuntimeException)
+{
+ if ( bSelectionChangeOccured )
+ fireSelectionChangeEvent();
+ return sal_True;
+}
+
+void SAL_CALL ScTabViewEventListener::selectionChanged( const lang::EventObject& /*aEvent*/ ) throw ( uno::RuntimeException )
+{
+ if ( !bDelaySelectionEvent )
+ {
+ fireSelectionChangeEvent();
+ }
+ else
+ {
+ bSelectionChangeOccured = sal_True;
+ }
+}
+
//------------------------------------------------------------------------
// Default-ctor wird fuer SMART_REFLECTION_IMPLEMENTATION gebraucht
@@ -474,7 +560,22 @@ ScTabViewObj::ScTabViewObj( ScTabViewShell* pViewSh ) :
bDrawSelModeSet(sal_False)
{
if (pViewSh)
+ {
nPreviousTab = pViewSh->GetViewData()->GetTabNo();
+ ScViewData* pViewData = pViewSh->GetViewData();
+ if( pViewData )
+ {
+ uno::Reference< script::vba::XVBAEventProcessor > xVbaEventsHelper (pViewData->GetDocument()->GetVbaEventProcessor(), uno::UNO_QUERY );
+ if ( xVbaEventsHelper.is() )
+ {
+ ScTabViewEventListener* pEventListener = new ScTabViewEventListener( this, xVbaEventsHelper );
+ uno::Reference< awt::XEnhancedMouseClickHandler > aMouseClickHandler( *pEventListener, uno::UNO_QUERY );
+ addEnhancedMouseClickHandler( aMouseClickHandler );
+ uno::Reference< view::XSelectionChangeListener > aSelectionChangeListener( *pEventListener, uno::UNO_QUERY );
+ addSelectionChangeListener( aSelectionChangeListener );
+ }
+ }
+ }
}
ScTabViewObj::~ScTabViewObj()
@@ -700,7 +801,7 @@ void lcl_ShowObject( ScTabViewShell& rViewSh, ScDrawView& rDrawView, SdrObject*
sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection )
throw(lang::IllegalArgumentException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScTabViewShell* pViewSh = GetViewShell();
if ( !pViewSh )
@@ -883,7 +984,7 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection )
uno::Any SAL_CALL ScTabViewObj::getSelection() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScTabViewShell* pViewSh = GetViewShell();
ScCellRangesBase* pObj = NULL;
if (pViewSh)
@@ -986,72 +1087,12 @@ uno::Any SAL_CALL ScTabViewObj::getSelection() throw(uno::RuntimeException)
return uno::makeAny(uno::Reference<uno::XInterface>(static_cast<cppu::OWeakObject*>(pObj)));
}
-
-#if 0
-// XPrintable
-
-rtl::OUString ScTabViewObj::getPrinterName(void) const
-{
- ScUnoGuard aGuard;
- ScTabViewShell* pViewSh = GetViewShell();
- if (pViewSh)
- {
- SfxPrinter* pPrinter = pViewSh->GetPrinter(TRUE);
- if (pPrinter)
- return pPrinter->GetName();
- }
-
- DBG_ERROR("getPrinterName: keine View oder kein Printer");
- return rtl::OUString();
-}
-
-void ScTabViewObj::setPrinterName(const rtl::OUString& PrinterName)
-{
- ScUnoGuard aGuard;
- // Drucker setzen - wie in SfxViewShell::ExecPrint_Impl
-
- ScTabViewShell* pViewSh = GetViewShell();
- if (pViewSh)
- {
- SfxPrinter* pPrinter = pViewSh->GetPrinter(TRUE);
- if (pPrinter)
- {
- String aString(PrinterName);
- SfxPrinter* pNewPrinter = new SfxPrinter( pPrinter->GetOptions().Clone(), aString );
- if (pNewPrinter->IsKnown())
- pViewSh->SetPrinter( pNewPrinter, SFX_PRINTER_PRINTER );
- else
- delete pNewPrinter;
- }
- }
-}
-
-XPropertySetRef ScTabViewObj::createPrintOptions(void)
-{
- ScUnoGuard aGuard;
- return new ScPrintSettingsObj; //! ScPrintSettingsObj implementieren!
-}
-
-void ScTabViewObj::print(const XPropertySetRef& xOptions)
-{
- ScUnoGuard aGuard;
- ScTabViewShell* pViewSh = GetViewShell();
- if (pViewSh)
- {
- //! xOptions auswerten (wie denn?)
-
- SfxRequest aReq( SID_PRINTDOCDIRECT, SFX_CALLMODE_SYNCHRON, pViewSh->GetPool() );
- pViewSh->ExecuteSlot( aReq );
- }
-}
-#endif
-
// XEnumerationAccess
uno::Reference<container::XEnumeration> SAL_CALL ScTabViewObj::createEnumeration()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return new ScIndexEnumeration(this, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.SpreadsheetViewPanesEnumeration")));
}
@@ -1059,7 +1100,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScTabViewObj::createEnumeration
sal_Int32 SAL_CALL ScTabViewObj::getCount() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScTabViewShell* pViewSh = GetViewShell();
USHORT nPanes = 0;
if (pViewSh)
@@ -1078,7 +1119,7 @@ uno::Any SAL_CALL ScTabViewObj::getByIndex( sal_Int32 nIndex )
throw(lang::IndexOutOfBoundsException,
lang::WrappedTargetException, uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<sheet::XViewPane> xPane(GetObjectByIndex_Impl((USHORT)nIndex));
if (xPane.is())
return uno::makeAny(xPane);
@@ -1089,13 +1130,13 @@ uno::Any SAL_CALL ScTabViewObj::getByIndex( sal_Int32 nIndex )
uno::Type SAL_CALL ScTabViewObj::getElementType() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return getCppuType((uno::Reference<sheet::XViewPane>*)0);
}
sal_Bool SAL_CALL ScTabViewObj::hasElements() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
return ( getCount() != 0 );
}
@@ -1151,7 +1192,7 @@ ScViewPaneObj* ScTabViewObj::GetObjectByIndex_Impl(USHORT nIndex) const
uno::Reference<sheet::XSpreadsheet> SAL_CALL ScTabViewObj::getActiveSheet()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScTabViewShell* pViewSh = GetViewShell();
if (pViewSh)
{
@@ -1162,10 +1203,20 @@ uno::Reference<sheet::XSpreadsheet> SAL_CALL ScTabViewObj::getActiveSheet()
return NULL;
}
+//liuchen 2009-9-2 support expand (but not replace) the active sheet
void SAL_CALL ScTabViewObj::setActiveSheet( const uno::Reference<sheet::XSpreadsheet>& xActiveSheet )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ selectSheet(xActiveSheet, false);
+}
+
+void SAL_CALL
+ScTabViewObj::selectSheet( const uno::Reference<sheet::XSpreadsheet>& xActiveSheet,
+ sal_Bool bExpand)
+ throw(uno::RuntimeException)
+{
+ SolarMutexGuard aGuard;
+ sal_Bool bNew = bExpand;
ScTabViewShell* pViewSh = GetViewShell();
if ( pViewSh && xActiveSheet.is() )
@@ -1180,7 +1231,7 @@ void SAL_CALL ScTabViewObj::setActiveSheet( const uno::Reference<sheet::XSpreads
{
SCTAB nNewTab = rRanges.GetObject(0)->aStart.Tab();
if ( pViewSh->GetViewData()->GetDocument()->HasTable(nNewTab) )
- pViewSh->SetTabNo( nNewTab );
+ pViewSh->SetTabNo( nNewTab, bNew, bExpand );
}
}
}
@@ -1432,7 +1483,7 @@ void ScTabViewObj::EndActivationListening()
void SAL_CALL ScTabViewObj::addEnhancedMouseClickHandler( const uno::Reference< awt::XEnhancedMouseClickHandler >& aListener )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (aListener.is())
{
@@ -1449,7 +1500,7 @@ void SAL_CALL ScTabViewObj::addEnhancedMouseClickHandler( const uno::Reference<
void SAL_CALL ScTabViewObj::removeEnhancedMouseClickHandler( const uno::Reference< awt::XEnhancedMouseClickHandler >& aListener )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
USHORT nCount = aMouseClickHandlers.Count();
for ( USHORT n=nCount; n--; )
{
@@ -1466,7 +1517,7 @@ void SAL_CALL ScTabViewObj::removeEnhancedMouseClickHandler( const uno::Referenc
void SAL_CALL ScTabViewObj::addActivationEventListener( const uno::Reference< sheet::XActivationEventListener >& aListener )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
if (aListener.is())
{
@@ -1483,7 +1534,7 @@ void SAL_CALL ScTabViewObj::addActivationEventListener( const uno::Reference< sh
void SAL_CALL ScTabViewObj::removeActivationEventListener( const uno::Reference< sheet::XActivationEventListener >& aListener )
throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
USHORT nCount = aActivationListeners.Count();
for ( USHORT n=nCount; n--; )
{
@@ -1495,29 +1546,6 @@ void SAL_CALL ScTabViewObj::removeActivationEventListener( const uno::Reference<
EndActivationListening();
}
-// PageBreakMode / Zoom sind Properties
-
-#if 0
-
-BOOL ScTabViewObj::getPagebreakMode(void) const
-{
- ScUnoGuard aGuard;
- ScTabViewShell* pViewSh = GetViewShell();
- if (pViewSh)
- return pViewSh->GetViewData()->IsPagebreakMode();
- return FALSE;
-}
-
-void ScTabViewObj::setPagebreakMode(BOOL PagebreakMode)
-{
- ScUnoGuard aGuard;
- ScTabViewShell* pViewSh = GetViewShell();
- if (pViewSh)
- pViewSh->SetPagebreakMode(PagebreakMode);
-}
-
-#endif
-
INT16 ScTabViewObj::GetZoom(void) const
{
ScTabViewShell* pViewSh = GetViewShell();
@@ -1640,7 +1668,7 @@ void ScTabViewObj::SetZoomType(INT16 aZoomType)
sal_Bool SAL_CALL ScTabViewObj::getIsWindowSplit() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
// wie Menue-Slot SID_WINDOW_SPLIT
ScTabViewShell* pViewSh = GetViewShell();
@@ -1656,7 +1684,7 @@ sal_Bool SAL_CALL ScTabViewObj::getIsWindowSplit() throw(uno::RuntimeException)
sal_Bool SAL_CALL ScTabViewObj::hasFrozenPanes() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
// wie Menue-Slot SID_WINDOW_FIX
ScTabViewShell* pViewSh = GetViewShell();
@@ -1672,7 +1700,7 @@ sal_Bool SAL_CALL ScTabViewObj::hasFrozenPanes() throw(uno::RuntimeException)
sal_Int32 SAL_CALL ScTabViewObj::getSplitHorizontal() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScTabViewShell* pViewSh = GetViewShell();
if (pViewSh)
{
@@ -1685,7 +1713,7 @@ sal_Int32 SAL_CALL ScTabViewObj::getSplitHorizontal() throw(uno::RuntimeExceptio
sal_Int32 SAL_CALL ScTabViewObj::getSplitVertical() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScTabViewShell* pViewSh = GetViewShell();
if (pViewSh)
{
@@ -1698,7 +1726,7 @@ sal_Int32 SAL_CALL ScTabViewObj::getSplitVertical() throw(uno::RuntimeException)
sal_Int32 SAL_CALL ScTabViewObj::getSplitColumn() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScTabViewShell* pViewSh = GetViewShell();
if (pViewSh)
{
@@ -1723,7 +1751,7 @@ sal_Int32 SAL_CALL ScTabViewObj::getSplitColumn() throw(uno::RuntimeException)
sal_Int32 SAL_CALL ScTabViewObj::getSplitRow() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScTabViewShell* pViewSh = GetViewShell();
if (pViewSh)
{
@@ -1746,7 +1774,7 @@ sal_Int32 SAL_CALL ScTabViewObj::getSplitRow() throw(uno::RuntimeException)
void SAL_CALL ScTabViewObj::splitAtPosition( sal_Int32 nPixelX, sal_Int32 nPixelY )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScTabViewShell* pViewSh = GetViewShell();
if (pViewSh)
{
@@ -1759,7 +1787,7 @@ void SAL_CALL ScTabViewObj::splitAtPosition( sal_Int32 nPixelX, sal_Int32 nPixel
void SAL_CALL ScTabViewObj::freezeAtPosition( sal_Int32 nColumns, sal_Int32 nRows )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScTabViewShell* pViewSh = GetViewShell();
if (pViewSh)
{
@@ -1786,7 +1814,7 @@ void SAL_CALL ScTabViewObj::addSelectionChangeListener(
const uno::Reference<view::XSelectionChangeListener>& xListener )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<view::XSelectionChangeListener>* pObj =
new uno::Reference<view::XSelectionChangeListener>( xListener );
aSelectionListeners.Insert( pObj, aSelectionListeners.Count() );
@@ -1796,7 +1824,7 @@ void SAL_CALL ScTabViewObj::removeSelectionChangeListener(
const uno::Reference< view::XSelectionChangeListener >& xListener )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
USHORT nCount = aSelectionListeners.Count();
for ( USHORT n=nCount; n--; )
{
@@ -1837,19 +1865,7 @@ void ScTabViewObj::SelectionChanged()
/*ErrCode eRet =*/ pDocSh->CallXScript( *pScript, aParams, aRet, aOutArgsIndex, aOutArgs );
}
}
-
- // execute VBA event handler
- try
- {
- uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents( pDoc->GetVbaEventProcessor(), uno::UNO_SET_THROW );
- // the parameter is the clicked object, as in the mousePressed call above
- uno::Sequence< uno::Any > aArgs( 1 );
- aArgs[ 0 ] <<= getSelection();
- xVbaEvents->processVbaEvent( ScSheetEvents::GetVbaSheetEventId( SC_SHEETEVENT_SELECT ), aArgs );
- }
- catch( uno::Exception& )
- {
- }
+ // Removed Sun/Oracle code intentionally, it doesn't work properly ( selection should be fired after mouse release )
}
@@ -1859,7 +1875,7 @@ void ScTabViewObj::SelectionChanged()
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScTabViewObj::getPropertySetInfo()
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
static uno::Reference<beans::XPropertySetInfo> aRef(
new SfxItemPropertySetInfo( aPropSet.getPropertyMap() ));
return aRef;
@@ -1871,9 +1887,15 @@ void SAL_CALL ScTabViewObj::setPropertyValue(
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aString(aPropertyName);
+ if ( aString.EqualsAscii(SC_UNO_FILTERED_RANGE_SELECTION) )
+ {
+ bFilteredRangeSelection = ScUnoHelpFunctions::GetBoolFromAny(aValue);
+ return;
+ }
+
ScTabViewShell* pViewSh = GetViewShell();
if (pViewSh)
{
@@ -1990,10 +2012,16 @@ uno::Any SAL_CALL ScTabViewObj::getPropertyValue( const rtl::OUString& aProperty
throw(beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
String aString(aPropertyName);
uno::Any aRet;
+ if ( aString.EqualsAscii(SC_UNO_FILTERED_RANGE_SELECTION) )
+ {
+ ScUnoHelpFunctions::SetBoolInAny(aRet, bFilteredRangeSelection);
+ return aRet;
+ }
+
ScTabViewShell* pViewSh = GetViewShell();
if (pViewSh)
{
@@ -2037,7 +2065,7 @@ void SAL_CALL ScTabViewObj::addPropertyChangeListener( const ::rtl::OUString& /*
lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<beans::XPropertyChangeListener>* pObj =
new uno::Reference<beans::XPropertyChangeListener>( xListener );
aPropertyChgListeners.Insert( pObj, aPropertyChgListeners.Count() );
@@ -2049,7 +2077,7 @@ void SAL_CALL ScTabViewObj::removePropertyChangeListener( const ::rtl::OUString&
lang::WrappedTargetException,
uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
USHORT nCount = aPropertyChgListeners.Count();
for ( USHORT n=nCount; n--; )
{
@@ -2092,7 +2120,7 @@ void SAL_CALL ScTabViewObj::startRangeSelection(
const uno::Sequence<beans::PropertyValue>& aArguments )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScTabViewShell* pViewSh = GetViewShell();
if (pViewSh)
{
@@ -2133,7 +2161,7 @@ void SAL_CALL ScTabViewObj::startRangeSelection(
void SAL_CALL ScTabViewObj::abortRangeSelection() throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScTabViewShell* pViewSh = GetViewShell();
if (pViewSh)
pViewSh->StopSimpleRefDialog();
@@ -2143,7 +2171,7 @@ void SAL_CALL ScTabViewObj::addRangeSelectionListener(
const uno::Reference<sheet::XRangeSelectionListener>& xListener )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<sheet::XRangeSelectionListener>* pObj =
new uno::Reference<sheet::XRangeSelectionListener>( xListener );
aRangeSelListeners.Insert( pObj, aRangeSelListeners.Count() );
@@ -2153,7 +2181,7 @@ void SAL_CALL ScTabViewObj::removeRangeSelectionListener(
const uno::Reference<sheet::XRangeSelectionListener>& xListener )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
USHORT nCount = aRangeSelListeners.Count();
for ( USHORT n=nCount; n--; )
{
@@ -2170,7 +2198,7 @@ void SAL_CALL ScTabViewObj::addRangeSelectionChangeListener(
const uno::Reference<sheet::XRangeSelectionChangeListener>& xListener )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
uno::Reference<sheet::XRangeSelectionChangeListener>* pObj =
new uno::Reference<sheet::XRangeSelectionChangeListener>( xListener );
aRangeChgListeners.Insert( pObj, aRangeChgListeners.Count() );
@@ -2180,7 +2208,7 @@ void SAL_CALL ScTabViewObj::removeRangeSelectionChangeListener(
const uno::Reference<sheet::XRangeSelectionChangeListener>& xListener )
throw(uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
USHORT nCount = aRangeChgListeners.Count();
for ( USHORT n=nCount; n--; )
{
@@ -2291,7 +2319,7 @@ ScTabViewObj* ScTabViewObj::getImplementation( const uno::Reference<uno::XInterf
::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > SAL_CALL ScTabViewObj::getTransferable( ) throw (::com::sun::star::uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScEditShell* pShell = PTR_CAST( ScEditShell, GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) );
if (pShell)
return pShell->GetEditView()->GetTransferable();
@@ -2317,7 +2345,7 @@ ScTabViewObj* ScTabViewObj::getImplementation( const uno::Reference<uno::XInterf
void SAL_CALL ScTabViewObj::insertTransferable( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& xTrans ) throw (::com::sun::star::datatransfer::UnsupportedFlavorException, ::com::sun::star::uno::RuntimeException)
{
- ScUnoGuard aGuard;
+ SolarMutexGuard aGuard;
ScEditShell* pShell = PTR_CAST( ScEditShell, GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) );
if (pShell)
pShell->GetEditView()->InsertText( xTrans, ::rtl::OUString(), FALSE );
@@ -2345,3 +2373,4 @@ void SAL_CALL ScTabViewObj::insertTransferable( const ::com::sun::star::uno::Ref
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/warnpassword.cxx b/sc/source/ui/unoobj/warnpassword.cxx
index ce81fd2645c4..c00df0a3eedf 100644
--- a/sc/source/ui/unoobj/warnpassword.cxx
+++ b/sc/source/ui/unoobj/warnpassword.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -93,3 +94,4 @@ bool ScWarnPassword::WarningOnPassword( SfxMedium& rMedium )
return bReturn;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx
index 2c39d7154b4b..3ca5ba861dc8 100644
--- a/sc/source/ui/vba/excelvbahelper.cxx
+++ b/sc/source/ui/vba/excelvbahelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,6 +31,9 @@
#include "transobj.hxx"
#include "scmod.hxx"
#include "cellsuno.hxx"
+#include "compiler.hxx"
+#include "token.hxx"
+#include "tokenarray.hxx"
#include <comphelper/processfactory.hxx>
#include <com/sun/star/sheet/XSheetCellRange.hpp>
@@ -43,6 +47,52 @@ namespace vba
namespace excel
{
+uno::Reference< sheet::XDatabaseRanges >
+GetDataBaseRanges( ScDocShell* pShell ) throw ( uno::RuntimeException )
+{
+ uno::Reference< frame::XModel > xModel;
+ if ( pShell )
+ xModel.set( pShell->GetModel(), uno::UNO_QUERY_THROW );
+ uno::Reference< beans::XPropertySet > xModelProps( xModel, uno::UNO_QUERY_THROW );
+ uno::Reference< sheet::XDatabaseRanges > xDBRanges( xModelProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("DatabaseRanges") ) ), uno::UNO_QUERY_THROW );
+ return xDBRanges;
+}
+
+// returns the XDatabaseRange for the autofilter on sheet (nSheet)
+// also populates sName with the name of range
+uno::Reference< sheet::XDatabaseRange >
+GetAutoFiltRange( ScDocShell* pShell, sal_Int16 nSheet, rtl::OUString& sName ) throw ( uno::RuntimeException )
+{
+ uno::Reference< container::XIndexAccess > xIndexAccess( GetDataBaseRanges( pShell ), uno::UNO_QUERY_THROW );
+ uno::Reference< sheet::XDatabaseRange > xDataBaseRange;
+ table::CellRangeAddress dbAddress;
+ for ( sal_Int32 index=0; index < xIndexAccess->getCount(); ++index )
+ {
+ uno::Reference< sheet::XDatabaseRange > xDBRange( xIndexAccess->getByIndex( index ), uno::UNO_QUERY_THROW );
+ uno::Reference< container::XNamed > xNamed( xDBRange, uno::UNO_QUERY_THROW );
+ // autofilters work weirdly with openoffice, unnamed is the default
+ // named range which is used to create an autofilter, but
+ // its also possible that another name could be used
+ // this also causes problems when an autofilter is created on
+ // another sheet
+ // ( but.. you can use any named range )
+ dbAddress = xDBRange->getDataArea();
+ if ( dbAddress.Sheet == nSheet )
+ {
+ sal_Bool bHasAuto = sal_False;
+ uno::Reference< beans::XPropertySet > xProps( xDBRange, uno::UNO_QUERY_THROW );
+ xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("AutoFilter") ) ) >>= bHasAuto;
+ if ( bHasAuto )
+ {
+ sName = xNamed->getName();
+ xDataBaseRange=xDBRange;
+ break;
+ }
+ }
+ }
+ return xDataBaseRange;
+}
+
ScDocShell* GetDocShellFromRange( const uno::Reference< uno::XInterface >& xRange ) throw ( uno::RuntimeException )
{
ScCellRangesBase* pScCellRangesBase = ScCellRangesBase::getImplementation( xRange );
@@ -53,6 +103,13 @@ ScDocShell* GetDocShellFromRange( const uno::Reference< uno::XInterface >& xRang
return pScCellRangesBase->GetDocShell();
}
+ScDocShell* GetDocShellFromRanges( const uno::Reference< sheet::XSheetCellRangeContainer >& xRanges ) throw ( uno::RuntimeException )
+{
+ // need the ScCellRangesBase to get docshell
+ uno::Reference< uno::XInterface > xIf( xRanges, uno::UNO_QUERY_THROW );
+ return GetDocShellFromRange( xIf );
+}
+
ScDocument* GetDocumentFromRange( const uno::Reference< uno::XInterface >& xRange ) throw ( uno::RuntimeException )
{
ScDocShell* pDocShell = GetDocShellFromRange( xRange );
@@ -63,6 +120,16 @@ ScDocument* GetDocumentFromRange( const uno::Reference< uno::XInterface >& xRang
return pDocShell->GetDocument();
}
+uno::Reference< frame::XModel > GetModelFromRange( const uno::Reference< uno::XInterface >& xRange ) throw ( uno::RuntimeException )
+{
+ ScDocShell* pDocShell = GetDocShellFromRange( xRange );
+ if ( !pDocShell )
+ {
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access underlying model uno range object" ) ), uno::Reference< uno::XInterface >() );
+ }
+ return pDocShell->GetModel();
+}
+
void implSetZoom( const uno::Reference< frame::XModel >& xModel, sal_Int16 nZoom, std::vector< SCTAB >& nTabs )
{
ScTabViewShell* pViewSh = excel::getBestViewShell( xModel );
@@ -192,6 +259,15 @@ void implnPasteSpecial( const uno::Reference< frame::XModel>& xModel, USHORT nFl
}
+void implnCopyRange( const uno::Reference< frame::XModel>& xModel, const ScRange& rRange )
+{
+ ScTabViewShell* pViewShell = getBestViewShell( xModel );
+ if ( pViewShell )
+ {
+ pViewShell->CopyToClip( NULL, rRange, FALSE, TRUE, TRUE );
+ }
+}
+
ScDocShell*
getDocShell( const css::uno::Reference< css::frame::XModel>& xModel )
{
@@ -229,6 +305,19 @@ getViewFrame( const uno::Reference< frame::XModel >& xModel )
return NULL;
}
+sal_Bool IsR1C1ReferFormat( ScDocument* pDoc, const rtl::OUString& sRangeStr )
+{
+ ScRangeList aCellRanges;
+ String sAddress( sRangeStr );
+ USHORT nMask = SCA_VALID;
+ USHORT rResFlags = aCellRanges.Parse( sAddress, pDoc, nMask, formula::FormulaGrammar::CONV_XL_R1C1 );
+ if ( rResFlags & SCA_VALID )
+ {
+ return sal_True;
+ }
+ return sal_False;
+}
+
uno::Reference< XHelperInterface >
getUnoSheetModuleObj( const uno::Reference< table::XCellRange >& xRange ) throw ( uno::RuntimeException )
{
@@ -246,6 +335,84 @@ getUnoSheetModuleObj( const uno::Reference< table::XCellRange >& xRange ) throw
return xParent;
}
+formula::FormulaGrammar::Grammar GetFormulaGrammar( ScDocument* pDoc, const ScAddress& sAddress, const css::uno::Any& aFormula )
+{
+ formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_NATIVE_XL_A1;
+ if ( pDoc && aFormula.hasValue() && aFormula.getValueTypeClass() == uno::TypeClass_STRING )
+ {
+ rtl::OUString sFormula;
+ aFormula >>= sFormula;
+
+ ScCompiler aCompiler( pDoc, sAddress );
+ aCompiler.SetGrammar( formula::FormulaGrammar::GRAM_NATIVE_XL_R1C1 );
+ ScTokenArray* pCode = aCompiler.CompileString( sFormula );
+ if ( pCode )
+ {
+ USHORT nLen = pCode->GetLen();
+ formula::FormulaToken** pTokens = pCode->GetArray();
+ for ( USHORT nPos = 0; nPos < nLen; nPos++ )
+ {
+ const formula::FormulaToken& rToken = *pTokens[nPos];
+ switch ( rToken.GetType() )
+ {
+ case formula::svSingleRef:
+ case formula::svDoubleRef:
+ {
+ return formula::FormulaGrammar::GRAM_NATIVE_XL_R1C1;
+ }
+ break;
+ default: break;
+ }
+ }
+ }
+ }
+ return eGrammar;
+}
+
+void CompileExcelFormulaToODF( ScDocument* pDoc, const String& rOldFormula, String& rNewFormula )
+{
+ if ( !pDoc )
+ {
+ return;
+ }
+ ScCompiler aCompiler( pDoc, ScAddress() );
+ aCompiler.SetGrammar( excel::GetFormulaGrammar( pDoc, ScAddress(), uno::Any( rtl::OUString( rOldFormula ) ) ) );
+ ScTokenArray* pCode = aCompiler.CompileString( rOldFormula );
+ aCompiler.SetGrammar( formula::FormulaGrammar::GRAM_PODF_A1 );
+ aCompiler.CreateStringFromTokenArray( rNewFormula );
+}
+
+void CompileODFFormulaToExcel( ScDocument* pDoc, const String& rOldFormula, String& rNewFormula, const formula::FormulaGrammar::Grammar eGrammar )
+{
+ // eGrammar can be formula::FormulaGrammar::GRAM_NATIVE_XL_R1C1 and formula::FormulaGrammar::GRAM_NATIVE_XL_A1
+ if ( !pDoc )
+ {
+ return;
+ }
+ ScCompiler aCompiler( pDoc, ScAddress() );
+ aCompiler.SetGrammar( formula::FormulaGrammar::GRAM_PODF_A1 );
+ ScTokenArray* pCode = aCompiler.CompileString( rOldFormula );
+ aCompiler.SetGrammar( eGrammar );
+ if ( !pCode )
+ {
+ return;
+ }
+ USHORT nLen = pCode->GetLen();
+ formula::FormulaToken** pTokens = pCode->GetArray();
+ for ( USHORT nPos = 0; nPos < nLen && pTokens[nPos]; nPos++ )
+ {
+ String rFormula;
+ formula::FormulaToken* pToken = pTokens[nPos];
+ aCompiler.CreateStringFromToken( rFormula, pToken, TRUE );
+ if ( pToken->GetOpCode() == ocSep )
+ {
+ // Excel formula separator is ",".
+ rFormula = String::CreateFromAscii(",");
+ }
+ rNewFormula += rFormula;
+ }
+}
+
uno::Reference< XHelperInterface >
getUnoSheetModuleObj( const uno::Reference< sheet::XSheetCellRangeContainer >& xRanges ) throw ( uno::RuntimeException )
{
@@ -266,3 +433,5 @@ ScVbaCellRangeAccess::GetDataSet( ScCellRangesBase* pRangeObj )
} //excel
} //vba
} //ooo
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/excelvbahelper.hxx b/sc/source/ui/vba/excelvbahelper.hxx
index da0474e6ceb0..7eff6768aa96 100644
--- a/sc/source/ui/vba/excelvbahelper.hxx
+++ b/sc/source/ui/vba/excelvbahelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,12 @@
#include<vbahelper/vbahelper.hxx>
#include <docsh.hxx>
+#include <com/sun/star/sheet/XDatabaseRanges.hpp>
+#include <com/sun/star/sheet/XDatabaseRange.hpp>
#include <com/sun/star/table/XCellRange.hpp>
#include <com/sun/star/sheet/XSheetCellRangeContainer.hpp>
#include <ooo/vba/XHelperInterface.hpp>
+#include <formula/grammar.hxx>
class ScCellRangesBase;
@@ -39,29 +43,41 @@ namespace ooo
{
namespace vba
{
- namespace excel
+ namespace excel
{
- // nTabs empty means apply zoom to all sheets
- void implSetZoom( const css::uno::Reference< css::frame::XModel >& xModel, sal_Int16 nZoom, std::vector< SCTAB >& nTabs );
- void implnCopy( const css::uno::Reference< css::frame::XModel>& xModel );
- void implnPaste ( const css::uno::Reference< css::frame::XModel>& xModel );
- void implnCut( const css::uno::Reference< css::frame::XModel>& xModel );
- void implnPasteSpecial( const css::uno::Reference< css::frame::XModel>& xModel, sal_uInt16 nFlags,sal_uInt16 nFunction,sal_Bool bSkipEmpty, sal_Bool bTranspose);
- ScTabViewShell* getBestViewShell( const css::uno::Reference< css::frame::XModel>& xModel ) ;
- ScDocShell* getDocShell( const css::uno::Reference< css::frame::XModel>& xModel ) ;
- ScTabViewShell* getCurrentBestViewShell( const css::uno::Reference< css::uno::XComponentContext >& xContext );
- SfxViewFrame* getViewFrame( const css::uno::Reference< css::frame::XModel >& xModel );
+ // nTabs empty means apply zoom to all sheets
+ void implSetZoom( const css::uno::Reference< css::frame::XModel >& xModel, sal_Int16 nZoom, std::vector< SCTAB >& nTabs );
+ void implnCopy( const css::uno::Reference< css::frame::XModel>& xModel );
+ void implnPaste ( const css::uno::Reference< css::frame::XModel>& xModel );
+ void implnCut( const css::uno::Reference< css::frame::XModel>& xModel );
+ void implnPasteSpecial( const css::uno::Reference< css::frame::XModel>& xModel, sal_uInt16 nFlags,sal_uInt16 nFunction,sal_Bool bSkipEmpty, sal_Bool bTranspose);
+ void implnCopyRange( const css::uno::Reference< css::frame::XModel>& xModel, const ScRange& rRange );
+ ScTabViewShell* getBestViewShell( const css::uno::Reference< css::frame::XModel>& xModel ) ;
+ ScDocShell* getDocShell( const css::uno::Reference< css::frame::XModel>& xModel ) ;
+ ScTabViewShell* getCurrentBestViewShell( const css::uno::Reference< css::uno::XComponentContext >& xContext );
+ SfxViewFrame* getViewFrame( const css::uno::Reference< css::frame::XModel >& xModel );
+ sal_Bool IsR1C1ReferFormat( ScDocument* pDoc, const ::rtl::OUString& sRangeStr );
+ formula::FormulaGrammar::Grammar GetFormulaGrammar( ScDocument* pDoc, const ScAddress& sAddress, const css::uno::Any& aFormula );
+ void CompileExcelFormulaToODF( ScDocument* pDoc, const String& rOldFormula, String& rNewFormula );
+ void CompileODFFormulaToExcel( ScDocument* pDoc, const String& rOldFormula, String& rNewFormula, const formula::FormulaGrammar::Grammar eGrammar );
+ css::uno::Reference< css::sheet::XDatabaseRanges > GetDataBaseRanges( ScDocShell* pShell ) throw ( css::uno::RuntimeException );
+
+ css::uno::Reference< css::sheet::XDatabaseRange > GetAutoFiltRange( ScDocShell* pShell, sal_Int16 nSheet, rtl::OUString& sName ) throw ( css::uno::RuntimeException );
css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::sheet::XSheetCellRangeContainer >& xRanges ) throw ( css::uno::RuntimeException );
css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::table::XCellRange >& xRange ) throw ( css::uno::RuntimeException );
ScDocShell* GetDocShellFromRange( const css::uno::Reference< css::uno::XInterface >& xRange ) throw ( css::uno::RuntimeException );
+ ScDocShell* GetDocShellFromRanges( const css::uno::Reference< css::sheet::XSheetCellRangeContainer >& xRanges ) throw ( css::uno::RuntimeException );
ScDocument* GetDocumentFromRange( const css::uno::Reference< css::uno::XInterface >& xRange ) throw ( css::uno::RuntimeException );
css::uno::Reference< css::frame::XModel > GetModelFromRange( const css::uno::Reference< css::uno::XInterface >& xRange ) throw ( css::uno::RuntimeException );
+
class ScVbaCellRangeAccess
{
public:
static SfxItemSet* GetDataSet( ScCellRangesBase* pRangeObj );
};
-}
-}
+ }
+ }
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/helperdecl.hxx b/sc/source/ui/vba/helperdecl.hxx
index a9969179d52f..27930279bcf6 100644
--- a/sc/source/ui/vba/helperdecl.hxx
+++ b/sc/source/ui/vba/helperdecl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,3 +52,4 @@ struct vba_service_class_ : public serviceimpl_base< detail::OwnServiceImpl<Impl
} // namespace service_decl
} // namespace comphelper
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/makefile.mk b/sc/source/ui/vba/makefile.mk
index 92bb3fd39db0..ba50cbad9abd 100644
--- a/sc/source/ui/vba/makefile.mk
+++ b/sc/source/ui/vba/makefile.mk
@@ -31,7 +31,7 @@ PRJNAME=sc
TARGET=vbaobj
ENABLE_EXCEPTIONS=TRUE
VISIBILITY_HIDDEN=TRUE
-
+CDEFS+=-DVBA_OOBUILD_HACK
# --- Settings -----------------------------------------------------
.INCLUDE : settings.mk
@@ -63,18 +63,29 @@ SLOFILES= \
$(SLO)$/vbacharttitle.obj \
$(SLO)$/vbacomment.obj \
$(SLO)$/vbacomments.obj \
+ $(SLO)$/vbacommentshape.obj \
$(SLO)$/vbacondition.obj \
$(SLO)$/vbadialog.obj \
$(SLO)$/vbadialogs.obj \
$(SLO)$/vbaeventshelper.obj \
+ $(SLO)$/vbafiledialog.obj \
+ $(SLO)$/vbafiledialogselecteditems.obj \
+ $(SLO)$/vbafilesearch.obj \
$(SLO)$/vbafont.obj \
$(SLO)$/vbaformat.obj \
$(SLO)$/vbaformatcondition.obj \
$(SLO)$/vbaformatconditions.obj \
+ $(SLO)$/vbafoundfiles.obj \
$(SLO)$/vbaglobals.obj \
$(SLO)$/vbahyperlink.obj \
$(SLO)$/vbahyperlinks.obj \
$(SLO)$/vbainterior.obj \
+ $(SLO)$/vbamenubar.obj \
+ $(SLO)$/vbamenubars.obj \
+ $(SLO)$/vbamenu.obj \
+ $(SLO)$/vbamenus.obj \
+ $(SLO)$/vbamenuitem.obj \
+ $(SLO)$/vbamenuitems.obj \
$(SLO)$/vbaname.obj \
$(SLO)$/vbanames.obj \
$(SLO)$/vbaoleobject.obj \
@@ -88,6 +99,7 @@ SLOFILES= \
$(SLO)$/vbapivotcache.obj \
$(SLO)$/vbapivottable.obj \
$(SLO)$/vbapivottables.obj \
+ $(SLO)$/vbaquerytable.obj \
$(SLO)$/vbarange.obj \
$(SLO)$/vbaseriescollection.obj \
$(SLO)$/vbasheetobject.obj \
diff --git a/sc/source/ui/vba/service.cxx b/sc/source/ui/vba/service.cxx
index 2b1f14cf154a..e0ed82fbc0fd 100644
--- a/sc/source/ui/vba/service.cxx
+++ b/sc/source/ui/vba/service.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -132,3 +133,5 @@ extern "C"
return pRet;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/testvba/testvba.cxx b/sc/source/ui/vba/testvba/testvba.cxx
index 686b3e47eaa9..cf04d45250db 100644
--- a/sc/source/ui/vba/testvba/testvba.cxx
+++ b/sc/source/ui/vba/testvba/testvba.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#include "cppuhelper/bootstrap.hxx"
#include <com/sun/star/beans/Property.hpp>
@@ -159,15 +160,15 @@ mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath ) )
Reference< script::provider::XScript > xScript;
try
{
- xScript = xProv->getScript( rtl::OUString::createFromAscii( "vnd.sun.star.script:Standard.TestMacros.Main?language=Basic&location=document" ));
+ xScript = xProv->getScript( rtl::OUString::createFromAscii( "vnd.sun.star.script:VBAProject.TestMacros.Main?language=Basic&location=document" ));
} catch ( uno::Exception& e )
{
try
{
- xScript = xProv->getScript( rtl::OUString::createFromAscii( "vnd.sun.star.script:Standard.testMacro.Main?language=Basic&location=document" ));
+ xScript = xProv->getScript( rtl::OUString::createFromAscii( "vnd.sun.star.script:VBAProject.testMacro.Main?language=Basic&location=document" ));
} catch ( uno::Exception& e2 )
{
- xScript = xProv->getScript( rtl::OUString::createFromAscii( "vnd.sun.star.script:Standard.testMain.Main?language=Basic&location=document" ));
+ xScript = xProv->getScript( rtl::OUString::createFromAscii( "vnd.sun.star.script:VBAProject.testMain.Main?language=Basic&location=document" ));
}
}
OSL_TRACE("Got script for doc %s", rtl::OUStringToOString( sUrl, RTL_TEXTENCODING_UTF8 ).getStr() );
@@ -307,3 +308,5 @@ int main( int argv, char** argc )
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index f3965393e919..7ed96e7f900e 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,11 +28,14 @@
#include <stdio.h>
+#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
+#include <com/sun/star/datatransfer/clipboard/XFlushableClipboard.hpp>
#include <com/sun/star/sheet/XSpreadsheetView.hpp>
#include <com/sun/star/sheet/XSpreadsheets.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <ooo/vba/excel/XlCalculation.hpp>
+#include <ooo/vba/excel/XlCutCopyMode.hpp>
#include <com/sun/star/sheet/XCellRangeReferrer.hpp>
#include <com/sun/star/sheet/XCalculatable.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>
@@ -40,6 +44,19 @@
#include <ooo/vba/excel/XlMousePointer.hpp>
#include <com/sun/star/sheet/XNamedRanges.hpp>
#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
+#include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp>
+#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
+#include <com/sun/star/ui/dialogs/XFilePicker2.hpp>
+#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
+#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
+//2009-11-06 add by limingl
+#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
+#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
+//end
+#include<ooo/vba/XCommandBars.hpp>
+#include <ooo/vba/excel/XlEnableCancelKey.hpp> //liuchen 2009-11-26
+#include <ooo/vba/excel/XlApplicationInternational.hpp> //liuchen 2009-11-26
+#include <unotools/localedatawrapper.hxx> //liuchen 2009-11-26
#include "vbaapplication.hxx"
#include "vbaworkbooks.hxx"
@@ -51,25 +68,37 @@
#include "vbawindow.hxx"
#include "vbawindows.hxx"
#include "vbaglobals.hxx"
+#include "vbamenubars.hxx"
#include "tabvwsh.hxx"
#include "gridwin.hxx"
#include "vbanames.hxx"
#include <vbahelper/vbashape.hxx>
#include "vbatextboxshape.hxx"
#include "vbaassistant.hxx"
+#include "vbafilesearch.hxx" //liuchen 2009-8-18, add the support of VBA Application.FileSearch
#include "sc.hrc"
+#include "macromgr.hxx"
+#include "global.hxx" //liuchen 2009-11-26
+#include "scmod.hxx" //liuchen 2009-11-26
+#include "docoptio.hxx" //liuchen 2009-11-26
+#include "appoptio.hxx"
#include <osl/file.hxx>
+#include <map>
+
#include <sfx2/request.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/app.hxx>
+#include <comphelper/processfactory.hxx>
+
#include <toolkit/awt/vclxwindow.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <tools/diagnose_ex.h>
+#include <tools/urlobj.hxx>
#include <docuno.hxx>
@@ -78,15 +107,29 @@
#include <basic/sbuno.hxx>
#include <basic/sbmeth.hxx>
+#include "transobj.hxx"
#include "convuno.hxx"
#include "cellsuno.hxx"
+#include "miscuno.hxx"
+#include "unonames.hxx"
#include "docsh.hxx"
#include <vbahelper/helperdecl.hxx>
#include "excelvbahelper.hxx"
-
+#include <basic/sbmeth.hxx>
+#include <basic/sbmod.hxx>
+#include <basic/sbstar.hxx>
+#include <basic/sbx.hxx>
+#include <basic/sbxobj.hxx>
+#include <basic/sbuno.hxx>
+//limingl 2009-07-20
+#include "vbafiledialog.hxx"
using namespace ::ooo::vba;
using namespace ::com::sun::star;
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::UNO_QUERY_THROW;
+using ::com::sun::star::uno::UNO_QUERY;
+using ::rtl::OUString;
// #TODO is this defined somewhere else?
#if ( defined UNX ) || ( defined OS2 ) //unix
@@ -237,16 +280,49 @@ ScVbaApplication::getAssistant() throw (uno::RuntimeException)
return uno::Reference< XAssistant >( new ScVbaAssistant( this, mxContext ) );
}
+//liuchen 2009-8-18, add support of VBA Application.FileSearch
+uno::Reference< XFileSearch > SAL_CALL
+ScVbaApplication::getFileSearch() throw (uno::RuntimeException)
+{
+ if (! m_xFileSearch.get() )
+ {
+ m_xFileSearch = uno::Reference< XFileSearch >( new ScVbaFileSearch( this, uno::Reference< XHelperInterface >( this ), mxContext ) );
+ }
+
+ return m_xFileSearch;
+}
+//liuchen
+
uno::Any SAL_CALL
ScVbaApplication::getSelection() throw (uno::RuntimeException)
{
OSL_TRACE("** ScVbaApplication::getSelection() ** ");
uno::Reference< frame::XModel > xModel( getCurrentDocument() );
- uno::Reference< lang::XServiceInfo > xServiceInfo( xModel->getCurrentSelection(), uno::UNO_QUERY_THROW );
- rtl::OUString sImpementaionName = xServiceInfo->getImplementationName();
- if( sImpementaionName.equalsIgnoreAsciiCaseAscii("com.sun.star.drawing.SvxShapeCollection") )
+
+ Reference< view::XSelectionSupplier > xSelSupp( xModel->getCurrentController(), UNO_QUERY_THROW );
+ Reference< beans::XPropertySet > xPropSet( xSelSupp, UNO_QUERY_THROW );
+ OUString aPropName = OUString::createFromAscii( SC_UNO_FILTERED_RANGE_SELECTION );
+ uno::Any aOldVal = xPropSet->getPropertyValue( aPropName );
+ uno::Any any;
+ any <<= sal_False;
+ xPropSet->setPropertyValue( aPropName, any );
+ uno::Reference< uno::XInterface > aSelection = ScUnoHelpFunctions::AnyToInterface(
+ xSelSupp->getSelection() );
+ xPropSet->setPropertyValue( aPropName, aOldVal );
+
+ if (!aSelection.is())
{
- uno::Reference< drawing::XShapes > xShapes( xModel->getCurrentSelection(), uno::UNO_QUERY_THROW );
+ throw uno::RuntimeException(
+ rtl::OUString::createFromAscii("failed to obtain current selection"),
+ uno::Reference< uno::XInterface >() );
+ }
+
+ uno::Reference< lang::XServiceInfo > xServiceInfo( aSelection, uno::UNO_QUERY_THROW );
+ rtl::OUString sImplementationName = xServiceInfo->getImplementationName();
+
+ if( sImplementationName.equalsIgnoreAsciiCaseAscii("com.sun.star.drawing.SvxShapeCollection") )
+ {
+ uno::Reference< drawing::XShapes > xShapes( aSelection, uno::UNO_QUERY_THROW );
uno::Reference< container::XIndexAccess > xIndexAccess( xShapes, uno::UNO_QUERY_THROW );
uno::Reference< drawing::XShape > xShape( xIndexAccess->getByIndex(0), uno::UNO_QUERY_THROW );
// if ScVbaShape::getType( xShape ) == office::MsoShapeType::msoAutoShape
@@ -265,10 +341,10 @@ ScVbaApplication::getSelection() throw (uno::RuntimeException)
else if( xServiceInfo->supportsService( rtl::OUString::createFromAscii("com.sun.star.sheet.SheetCellRange")) ||
xServiceInfo->supportsService( rtl::OUString::createFromAscii("com.sun.star.sheet.SheetCellRanges")))
{
- uno::Reference< table::XCellRange > xRange( getCurrentDocument()->getCurrentSelection(), ::uno::UNO_QUERY);
+ uno::Reference< table::XCellRange > xRange( aSelection, ::uno::UNO_QUERY);
if ( !xRange.is() )
{
- uno::Reference< sheet::XSheetCellRangeContainer > xRanges( getCurrentDocument()->getCurrentSelection(), ::uno::UNO_QUERY);
+ uno::Reference< sheet::XSheetCellRangeContainer > xRanges( aSelection, ::uno::UNO_QUERY);
if ( xRanges.is() )
return uno::makeAny( uno::Reference< excel::XRange >( new ScVbaRange( excel::getUnoSheetModuleObj( xRanges ), mxContext, xRanges ) ) );
@@ -277,7 +353,7 @@ ScVbaApplication::getSelection() throw (uno::RuntimeException)
}
else
{
- throw uno::RuntimeException( sImpementaionName + rtl::OUString::createFromAscii(" not suported"), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( sImplementationName + rtl::OUString::createFromAscii(" not supported"), uno::Reference< uno::XInterface >() );
}
}
@@ -367,16 +443,67 @@ ScVbaApplication::getActiveWindow() throw (uno::RuntimeException)
uno::Any SAL_CALL
ScVbaApplication::getCutCopyMode() throw (uno::RuntimeException)
{
- //# FIXME TODO, implementation
uno::Any result;
- result <<= sal_False;
+ ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard( NULL );
+ ScDocument* pDoc = pOwnClip ? pOwnClip->GetDocument() : NULL;
+ if ( pDoc )
+ {
+ if ( pDoc->IsCutMode() )
+ {
+ result <<= excel::XlCutCopyMode::xlCut;
+ }
+ else
+ {
+ result <<= excel::XlCutCopyMode::xlCopy;
+ }
+ }
+ else
+ {
+ result <<= sal_False;
+ }
return result;
}
void SAL_CALL
-ScVbaApplication::setCutCopyMode( const uno::Any& /*_cutcopymode*/ ) throw (uno::RuntimeException)
+ScVbaApplication::setCutCopyMode( const uno::Any& _cutcopymode ) throw (uno::RuntimeException)
{
- //# FIXME TODO, implementation
+ // According to Excel's behavior, no matter what is the value of _cutcopymode, always releases the clip object.
+ sal_Bool bCutCopyMode = sal_False;
+ if ( ( _cutcopymode >>= bCutCopyMode ) )
+ {
+ ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard( NULL );
+ if ( pOwnClip )
+ {
+ pOwnClip->ObjectReleased();
+ ScTabViewShell* pTabViewShell = excel::getBestViewShell( getCurrentDocument() );
+ if ( pTabViewShell )
+ {
+ ScViewData* pView = pTabViewShell->GetViewData();
+ Window* pWindow = pView ? pView->GetActiveWin() : NULL;
+ if ( pWindow )
+ {
+ Reference< datatransfer::clipboard::XClipboard > xClipboard = pWindow->GetClipboard();
+ Reference< datatransfer::clipboard::XFlushableClipboard > xFlushableClipboard( xClipboard, uno::UNO_QUERY );
+ if ( xClipboard.is() )
+ {
+ xClipboard->setContents( NULL, NULL );
+ if ( xFlushableClipboard.is() )
+ {
+ const sal_uInt32 nRef = Application::ReleaseSolarMutex();
+ try
+ {
+ xFlushableClipboard->flushClipboard();
+ }
+ catch( const uno::Exception& )
+ {
+ }
+ Application::AcquireSolarMutex( nRef );
+ }
+ }
+ }
+ }
+ }
+ }
}
uno::Any SAL_CALL
@@ -725,6 +852,91 @@ ScVbaApplication::getEnableEvents() throw (uno::RuntimeException)
return m_bEnableEvents;
}
+sal_Bool SAL_CALL
+ScVbaApplication::getVisible() throw (uno::RuntimeException)
+{
+ sal_Bool bVisible = sal_True;
+ return bVisible;
+}
+
+void SAL_CALL
+ScVbaApplication::setVisible(sal_Bool /*bVisible*/) throw (uno::RuntimeException)
+{
+}
+
+//liuchen 2009-11-25 add the support of Excel VBA Application.Iteration
+//The Excel Iteration option is global and unique, but in Symphony there is an Iteration property in ScModule and one in every ScDocument,
+//so the set method will set all the Iteration properties
+sal_Bool SAL_CALL
+ScVbaApplication::getIteration() throw (uno::RuntimeException)
+{
+ ScModule* pScMod = SC_MOD();
+ ScDocOptions aDocOpt = pScMod->GetDocOptions();
+
+ return aDocOpt.IsIter();
+}
+
+void SAL_CALL
+ScVbaApplication::setIteration(sal_Bool bIteration) throw (uno::RuntimeException)
+{
+ ScModule* pScMod = SC_MOD();
+ ScDocOptions& aDocOpt = const_cast< ScDocOptions& > (pScMod->GetDocOptions());
+ aDocOpt.SetIter( bIteration );
+
+ uno::Any aIteration;
+ aIteration <<= bIteration;
+
+ OUString aPropName = OUString::createFromAscii( "IsIterationEnabled" );
+
+ uno::Reference< XCollection > xWorkbooks( new ScVbaWorkbooks( this, mxContext ) );
+ sal_Int32 nCount = xWorkbooks->getCount();
+
+ for (sal_Int32 i = 1; i <= nCount; i++)
+ {
+ uno::Reference< ooo::vba::excel::XWorkbook > xWorkbook;
+ uno::Any aWorkbook = xWorkbooks->Item(uno::makeAny(i), uno::Any());
+ aWorkbook >>= xWorkbook;
+ ScVbaWorkbook* pWorkbook = static_cast< ScVbaWorkbook* > ( xWorkbook.get() );
+
+ uno::Reference< frame::XModel > xModel( pWorkbook->getDocModel(), uno::UNO_QUERY_THROW );
+ uno::Reference< beans::XPropertySet > xPropertySet( xModel, uno::UNO_QUERY_THROW );
+ xPropertySet->setPropertyValue( aPropName, aIteration );
+ }
+}
+//liuchen 2009-11-25 end
+
+//liuchen 2009-11-26 add the support of Excel VBA Application.EnableCancelKey
+sal_Int32 SAL_CALL
+ScVbaApplication::getEnableCancelKey() throw (uno::RuntimeException)
+{
+ return ooo::vba::excel::XlEnableCancelKey::xlDisabled;
+}
+
+void SAL_CALL
+ScVbaApplication::setEnableCancelKey(sal_Int32 /*lEnableCancelKey*/) throw (uno::RuntimeException)
+{
+}
+//liuchen 2009-11-26 end
+
+sal_Int32 SAL_CALL ScVbaApplication::getSheetsInNewWorkbook() throw (uno::RuntimeException)
+{
+ const ScAppOptions& rAppOpt = SC_MOD()->GetAppOptions();
+ return rAppOpt.GetTabCountInNewSpreadsheet();
+}
+
+void SAL_CALL ScVbaApplication::setSheetsInNewWorkbook( sal_Int32 SheetsInNewWorkbook ) throw (script::BasicErrorException, uno::RuntimeException)
+{
+ if ( SheetsInNewWorkbook < 1 || SheetsInNewWorkbook > MAXTAB )
+ {
+ DebugHelper::exception( OUString::createFromAscii("The number must be between 1 and 255"), uno::Exception(), SbERR_METHOD_FAILED, OUString() );
+ }
+ else
+ {
+ ScAppOptions& rAppOpt = const_cast< ScAppOptions& >(SC_MOD()->GetAppOptions());
+ rAppOpt.SetTabCountInNewSpreadsheet( SheetsInNewWorkbook );
+ }
+}
+
void SAL_CALL
ScVbaApplication::Calculate() throw( script::BasicErrorException , uno::RuntimeException )
{
@@ -1090,13 +1302,19 @@ ScVbaApplication::Volatile( const uno::Any& aVolatile ) throw ( uno::RuntimeExc
{
sal_Bool bVolatile = sal_True;
aVolatile >>= bVolatile;
+ SbMethod* pMeth = StarBASIC::GetActiveMethod();
+ if ( pMeth )
+ {
+ OSL_TRACE("ScVbaApplication::Volatile() In method ->%s<-", rtl::OUStringToOString( pMeth->GetName(), RTL_TEXTENCODING_UTF8 ).getStr() );
+ uno::Reference< frame::XModel > xModel( getCurrentDocument() );
+ ScDocument* pDoc = excel::getDocShell( xModel )->GetDocument();
+ pDoc->GetMacroManager()->SetUserFuncVolatile( pMeth->GetName(), bVolatile);
+ }
+
+// this is bound to break when loading the document
return;
}
-void SAL_CALL
-ScVbaApplication::DoEvents() throw ( uno::RuntimeException )
-{
-}
::sal_Bool SAL_CALL
ScVbaApplication::getDisplayFormulaBar() throw ( css::uno::RuntimeException )
{
@@ -1148,12 +1366,421 @@ ScVbaApplication::Caller( const uno::Any& /*aIndex*/ ) throw ( uno::RuntimeExcep
return aRet;
}
+//Add by minz@cn.ibm.com. 2009-07-08.
+uno::Any SAL_CALL
+ScVbaApplication::GetOpenFilename(const uno::Any& FileFilter, const uno::Any& FilterIndex, const uno::Any& Title, const uno::Any& ButtonText, const uno::Any& MultiSelect) throw (uno::RuntimeException)
+{
+ uno::Any aRet = uno::makeAny( sal_False );
+ try
+ {
+ const ::rtl::OUString sServiceName = ::rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.FilePicker" );
+ uno::Reference< lang::XMultiServiceFactory > xMSF( comphelper::getProcessServiceFactory(), uno::UNO_QUERY );
+ // Set the type of File Picker Dialog: TemplateDescription::FILEOPEN_SIMPLE.
+ uno::Sequence< uno::Any > aDialogType( 1 );
+ aDialogType[0] <<= ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE;
+ uno::Reference< ui::dialogs::XFilePicker > xFilePicker( xMSF->createInstanceWithArguments( sServiceName, aDialogType ), UNO_QUERY );
+ uno::Reference< ui::dialogs::XFilePicker2 > xFilePicker2( xFilePicker, UNO_QUERY );
+ uno::Reference< ui::dialogs::XFilterManager > xFilterManager( xFilePicker, UNO_QUERY );
+ uno::Reference< ui::dialogs::XExecutableDialog > xExecutableDialog( xFilePicker, UNO_QUERY );
+ uno::Reference< ui::dialogs::XFilePickerControlAccess > xPickerControlAccess( xFilePicker, UNO_QUERY );
+
+ if ( xFilterManager.is() && FileFilter.hasValue() )
+ {
+ sal_Int32 nFilterIndex = 1;
+ if ( FilterIndex.hasValue() )
+ {
+ FilterIndex >>= nFilterIndex;
+ }
+ ::rtl::OUString strFilter;
+ FileFilter >>= strFilter;
+ sal_Int32 nCommaID = 0;
+ sal_Int32 nIndex = 1;
+ do
+ {
+ ::rtl::OUString aFilterTitleToken = strFilter.getToken( 0, ',' , nCommaID );
+ ::rtl::OUString aFilterToken;
+ if ( nCommaID >= 0 )
+ {
+ aFilterToken = strFilter.getToken( 0, ',' , nCommaID );
+ }
+ else if ( nCommaID < 0 && nIndex == 1 )
+ {
+ throw uno::RuntimeException( rtl::OUString::createFromAscii( "Invalid FileFilter format!" ), uno::Reference< uno::XInterface >() );
+ }
+ xFilterManager->appendFilter( aFilterTitleToken, aFilterToken );
+ if ( nFilterIndex == nIndex )
+ {
+ xFilterManager->setCurrentFilter( aFilterTitleToken );
+ }
+ nIndex++;
+ } while ( nCommaID >= 0 );
+ }
+ if ( xExecutableDialog.is() && Title.hasValue() )
+ {
+ ::rtl::OUString sTitle;
+ Title >>= sTitle;
+ xExecutableDialog->setTitle( sTitle );
+ }
+ if ( xPickerControlAccess.is() && ButtonText.hasValue() )
+ {
+ ::rtl::OUString sButtonText;
+ ButtonText >>= sButtonText;
+ xPickerControlAccess->setLabel( ui::dialogs::CommonFilePickerElementIds::PUSHBUTTON_OK, sButtonText );
+ }
+ sal_Bool bMultiSelect = sal_False;
+ if ( xFilePicker.is() && MultiSelect.hasValue() )
+ {
+ MultiSelect >>= bMultiSelect;
+ xFilePicker->setMultiSelectionMode( bMultiSelect );
+ }
+
+ if ( xFilePicker.is() && xFilePicker->execute() )
+ {
+ sal_Bool bUseXFilePicker2 = sal_False;
+ uno::Reference< lang::XServiceInfo > xServiceInfo( xFilePicker, UNO_QUERY );
+ if ( xServiceInfo.is() )
+ {
+ rtl::OUString sImplName = xServiceInfo->getImplementationName();
+ if ( sImplName.equalsAscii("com.sun.star.comp.fpicker.VistaFileDialog") || sImplName.equalsAscii("com.sun.star.ui.dialogs.SalGtkFilePicker") )
+ {
+ bUseXFilePicker2 = sal_True;
+ }
+ }
+ uno::Sequence< rtl::OUString > aSelectedFiles;
+ if ( bUseXFilePicker2 && xFilePicker2.is() )
+ {
+ // On Linux, XFilePicker->getFiles() always return one selected file although we select more than one file, also on Vista
+ // XFilePicker->getFiles() does not work well too, so we call XFilePicker2->getSelectedFiles() to get selected files.
+ aSelectedFiles = xFilePicker2->getSelectedFiles();
+ }
+ else
+ {
+ // If only one file is selected, the first entry of the sequence contains the complete path/filename in URL format. If multiple files are selected,
+ // the first entry of the sequence contains the path in URL format, and the other entries contains the names of the selected files without path information.
+ uno::Sequence< rtl::OUString > aTmpFiles = xFilePicker->getFiles();
+ aSelectedFiles = aTmpFiles;
+ sal_Int32 iFileCount = aTmpFiles.getLength();
+ if ( iFileCount > 1 )
+ {
+ aSelectedFiles.realloc( iFileCount - 1 );
+ INetURLObject aPath( aTmpFiles[0] );
+ aPath.setFinalSlash();
+ for ( sal_Int32 i = 1; i < iFileCount; i++ )
+ {
+ if ( aTmpFiles[i].indexOf ('/') > 0 || aTmpFiles[i].indexOf ('\\') > 0 )
+ {
+ aSelectedFiles[i - 1] = aTmpFiles[i];
+ }
+ else
+ {
+ if ( i == 1 )
+ aPath.Append( aTmpFiles[i] );
+ else
+ aPath.setName( aTmpFiles[i] );
+ aSelectedFiles[i - 1] = aPath.GetMainURL( INetURLObject::NO_DECODE );
+ }
+ }
+ }
+ }
+
+ sal_Int32 iFileCount = aSelectedFiles.getLength();
+ for ( sal_Int32 i = 0; i < iFileCount; i++ )
+ {
+ INetURLObject aObj( aSelectedFiles[i] );
+ if ( aObj.GetProtocol() == INET_PROT_FILE )
+ {
+ rtl::OUString aTemp = aObj.PathToFileName();
+ aSelectedFiles[i] = aTemp.getLength() > 0 ? aTemp : aSelectedFiles[i];
+ }
+ }
+ if ( bMultiSelect )
+ {
+ aRet = uno::makeAny( aSelectedFiles );
+ }
+ else if ( aSelectedFiles.getLength() > 0 && !bMultiSelect )
+ {
+ aRet = uno::makeAny( aSelectedFiles[0] );
+ }
+ }
+ }
+ catch( const uno::Exception& )
+ {
+ DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString());
+ }
+
+ return aRet;
+}
+
+//liming 2009-7-17
+::com::sun::star::uno::Reference< ::ooo::vba::XFileDialog > SAL_CALL
+ScVbaApplication::getFileDialog() throw (::com::sun::star::uno::RuntimeException)
+{
+ uno::Reference< XFileDialog > xFileDialogs( new ScVbaFileDialog( uno::Reference< XHelperInterface >( this ), mxContext, getCurrentDocument() ) );
+ return xFileDialogs;
+}
+
+typedef std::map< ::rtl::OUString, ::rtl::OUString > FileFilterMap;
+
+//2009-11-06 add by limingl
+uno::Any SAL_CALL
+ScVbaApplication::GetSaveAsFilename( const ::com::sun::star::uno::Any& InitialFilename, const ::com::sun::star::uno::Any& FileFilter, const ::com::sun::star::uno::Any& FilterIndex, const ::com::sun::star::uno::Any& Title, const ::com::sun::star::uno::Any& ButtonText ) throw (::com::sun::star::uno::RuntimeException)
+{
+ uno::Any strRet;
+ try
+ {
+ const ::rtl::OUString sServiceName = ::rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.FilePicker" );
+ uno::Reference< lang::XMultiServiceFactory > xMSF( comphelper::getProcessServiceFactory(), uno::UNO_QUERY );
+
+ uno::Sequence< uno::Any > aDialogType( 1 );
+ aDialogType[0] <<= ui::dialogs::TemplateDescription::FILESAVE_SIMPLE;
+ uno::Reference< ui::dialogs::XFilePicker > xFilePicker( xMSF->createInstanceWithArguments( sServiceName, aDialogType ), UNO_QUERY );
+
+ if (InitialFilename.hasValue())
+ {
+ ::rtl::OUString strInitFileName;
+ InitialFilename >>= strInitFileName;
+ xFilePicker->setDefaultName(strInitFileName);
+ }
+
+ // Begin from 1.
+ sal_Int32 nFilterIndex = 1;
+ if (FilterIndex.hasValue())
+ {
+ FilterIndex >>= nFilterIndex;
+ }
+
+ uno::Reference< ui::dialogs::XFilterManager > xFilter( xFilePicker, UNO_QUERY );
+ FileFilterMap mFilterNameMap;
+ if (FileFilter.hasValue())
+ {
+ ::rtl::OUString strFilter;
+ sal_Int32 nCommaID = 0;
+ FileFilter >>= strFilter;
+
+ sal_Int32 nIndex = 1;
+ do
+ {
+ ::rtl::OUString aFilterTitleToken = strFilter.getToken( 0, ',' , nCommaID );
+ ::rtl::OUString aFilterToken;
+ if ( nCommaID >= 0 )
+ {
+ aFilterToken = strFilter.getToken( 0, ',' , nCommaID );
+ }
+ else if ( nCommaID < 0 && nIndex == 1 )
+ {
+ throw uno::RuntimeException( rtl::OUString::createFromAscii( "Invalid FileFilter format!" ), uno::Reference< uno::XInterface >() );
+ }
+
+ FileFilterMap::const_iterator aIt = mFilterNameMap.find( aFilterTitleToken );
+ if ( aIt == mFilterNameMap.end() )
+ {
+ xFilter->appendFilter( aFilterTitleToken, aFilterToken );
+ if ( nFilterIndex == nIndex )
+ {
+ xFilter->setCurrentFilter( aFilterTitleToken );
+ }
+ nIndex++;
+ mFilterNameMap[aFilterTitleToken] = aFilterToken;
+ }
+ } while ( nCommaID >= 0 );
+ }
+
+ if (Title.hasValue())
+ {
+ ::rtl::OUString strTitle;
+ Title >>= strTitle;
+ uno::Reference< ::com::sun::star::ui::dialogs::XExecutableDialog> xExcTblDlg(xFilePicker, UNO_QUERY );
+ xExcTblDlg->setTitle(strTitle);
+ }
+
+ if (ButtonText.hasValue())
+ {
+ ::rtl::OUString strBttTxt;
+ ButtonText >>= strBttTxt;
+ }
+
+
+ if ( xFilePicker.is() )
+ {
+ sal_Int16 nRet = xFilePicker->execute();
+ if (nRet == 0)
+ {
+ strRet <<= sal_False;
+ }
+ else
+ {
+ uno::Sequence < rtl::OUString > aPathSeq = xFilePicker->getFiles();
+
+ if ( aPathSeq.getLength() )
+ {
+ ::rtl::OUString sSelectedFilters;
+ if ( xFilter.is() )
+ {
+ ::rtl::OUString sSelectedFilterName = xFilter->getCurrentFilter();
+ FileFilterMap::const_iterator aIt = mFilterNameMap.find( sSelectedFilterName );
+ if ( aIt != mFilterNameMap.end() )
+ {
+ sSelectedFilters = aIt->second;
+ }
+ }
+ INetURLObject aURLObj( aPathSeq[0] );
+ ::rtl::OUString aPathStr = aURLObj.PathToFileName();
+ if ( aURLObj.GetProtocol() == INET_PROT_FILE )
+ {
+ sal_Int32 nSemicolonID = 0;
+ ::rtl::OUString sFirstFilter = sSelectedFilters.getToken( 0, ';' , nSemicolonID );
+ ::rtl::OUString sFileExtension = aURLObj.GetExtension();
+ if ( sFileExtension.equalsAscii("") )
+ {
+ sFileExtension = sFirstFilter.equalsAscii("*.*") ? sFileExtension : sFirstFilter.copy( sFirstFilter.indexOfAsciiL("*.", 2) + 2 );
+ aPathStr = sFileExtension.equalsAscii("") ? aPathStr : aPathStr + ::rtl::OUString::createFromAscii(".") + sFileExtension;
+ }
+ else
+ {
+ sal_Bool bValidFilter = sal_False;
+ FileFilterMap::const_iterator aIt = mFilterNameMap.begin();
+ while ( aIt != mFilterNameMap.end() )
+ {
+ sSelectedFilters = aIt->second;
+ nSemicolonID = 0;
+ do
+ {
+ ::rtl::OUString aFilterToken = sSelectedFilters.getToken( 0, ';' , nSemicolonID );
+ if ( aFilterToken.trim().equalsIgnoreAsciiCase(::rtl::OUString::createFromAscii("*.") + sFileExtension) )
+ {
+ bValidFilter = sal_True;
+ break;
+ }
+ } while ( nSemicolonID >= 0 );
+ if ( bValidFilter )
+ {
+ break;
+ }
+ aIt++;
+ }
+ if ( !bValidFilter )
+ {
+ sFileExtension = sFirstFilter.equalsAscii("*.*") ? ::rtl::OUString::createFromAscii("") : sFirstFilter.copy( sFirstFilter.indexOfAsciiL("*.", 2) + 2 );
+ aPathStr = sFileExtension.equalsAscii("") ? aPathStr : aPathStr + ::rtl::OUString::createFromAscii(".") + sFileExtension;
+ }
+ }
+ }
+ strRet <<= aPathStr;
+ }
+ }
+ }
+ }
+ catch( const uno::Exception& )
+ {
+ DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString());
+ }
+ return strRet;
+}
+
+//end add
+
uno::Reference< frame::XModel >
ScVbaApplication::getCurrentDocument() throw (css::uno::RuntimeException)
{
return getCurrentExcelDoc(mxContext);
}
+uno::Any SAL_CALL
+ScVbaApplication::MenuBars( const uno::Any& aIndex ) throw (uno::RuntimeException)
+{
+ uno::Reference< XCommandBars > xCommandBars( CommandBars( uno::Any() ), uno::UNO_QUERY_THROW );
+ uno::Reference< XCollection > xMenuBars( new ScVbaMenuBars( this, mxContext, xCommandBars ) );
+ if ( aIndex.hasValue() )
+ {
+ return uno::Any ( xMenuBars->Item( aIndex, uno::Any() ) );
+ }
+
+ return uno::Any( xMenuBars );
+}
+
+//liuchen 2009-11-26 add the support of Application.International
+sal_Int32 SAL_CALL
+ConvertCountryCode(const OUString& language)
+{
+ sal_Int32 nCode = 0;
+
+ if( language == OUString::createFromAscii("ar") ) nCode = 966; // Arabic
+ else if ( language == OUString::createFromAscii("cs") ) nCode = 42; // Czech
+ else if ( language == OUString::createFromAscii("da") ) nCode = 45; // Danish
+ else if ( language == OUString::createFromAscii("de") ) nCode = 49; // German
+ else if ( language == OUString::createFromAscii("en") ) nCode = 1; // English
+ else if ( language == OUString::createFromAscii("es") ) nCode = 34; // Spanish
+ else if ( language == OUString::createFromAscii("el") ) nCode = 30; // Greek
+ else if ( language == OUString::createFromAscii("fa") ) nCode = 98; // Persian = Farsi
+ else if ( language == OUString::createFromAscii("fi") ) nCode = 358; // Finnish
+ else if ( language == OUString::createFromAscii("fr") ) nCode = 33; // French
+ else if ( language == OUString::createFromAscii("he") ) nCode = 972; // Hebrew
+ else if ( language == OUString::createFromAscii("hi") ) nCode = 91; // Indian = Hindi
+ else if ( language == OUString::createFromAscii("hu") ) nCode = 36; // Hungarian
+ else if ( language == OUString::createFromAscii("it") ) nCode = 39; // Italian
+ else if ( language == OUString::createFromAscii("ja") ) nCode = 81; // Japanese
+ else if ( language == OUString::createFromAscii("ko") ) nCode = 82; // Korean
+ else if ( language == OUString::createFromAscii("nl") ) nCode = 31; // Dutch
+ else if ( language == OUString::createFromAscii("no") ) nCode = 47; // Norwegian
+ else if ( language == OUString::createFromAscii("pl") ) nCode = 48; // Polish
+ else if ( language == OUString::createFromAscii("pt") ) nCode = 351; // Portuguese
+ else if ( language == OUString::createFromAscii("ru") ) nCode = 7; // Russian
+ else if ( language == OUString::createFromAscii("sv") ) nCode = 46; // Swedish
+ else if ( language == OUString::createFromAscii("th") ) nCode = 66; // Thai
+ else if ( language == OUString::createFromAscii("tk") ) nCode = 90; // Turkish
+ else if ( language == OUString::createFromAscii("ur") ) nCode = 92; // Urdu
+ else if ( language == OUString::createFromAscii("vi") ) nCode = 84; // Vietnamese
+ else if ( language == OUString::createFromAscii("zh") ) nCode = 86; // Simplified Chinese
+
+ return nCode;
+}
+
+uno::Any SAL_CALL
+ScVbaApplication::International( sal_Int32 Index ) throw (uno::RuntimeException)
+{
+ uno::Any aRet;
+ OUString str;
+ const LocaleDataWrapper* pLocaleData = ScGlobal::GetpLocaleData();
+ switch ( Index )
+ {
+ case excel::XlApplicationInternational::xlCountryCode:
+ aRet <<= ConvertCountryCode( pLocaleData->getLanguageCountryInfo().Language );
+ break;
+ case excel::XlApplicationInternational::xlDecimalSeparator:
+ str = pLocaleData->getNumDecimalSep();
+ aRet <<= str;
+ break;
+ case excel::XlApplicationInternational::xlDateSeparator:
+ str = pLocaleData->getDateSep();
+ aRet <<= str;
+ break;
+ default:
+ break;
+ }
+ return aRet;
+}
+//liuchen 2009-11-26 end
+
+//2009-12-11 add by limingl
+void SAL_CALL ScVbaApplication::Undo( ) throw (::com::sun::star::uno::RuntimeException)
+{
+ SfxAllItemSet reqList( SFX_APP()->GetPool() );
+ SfxRequest rReq(SID_UNDO, 0, reqList);
+ ScTabViewShell* pViewShell = excel::getCurrentBestViewShell( mxContext );
+
+ if (pViewShell != NULL)
+ {
+ pViewShell->ExecuteUndo(rReq);
+ }
+}
+//end
+
+double SAL_CALL ScVbaApplication::InchesToPoints( double Inches ) throw (uno::RuntimeException)
+{
+ // Convert a measurement from Inch to Point (1 inch = 72 points).
+ return MetricField::ConvertDoubleValue( Inches, 0, 0, FUNIT_INCH, FUNIT_POINT );
+}
+
rtl::OUString&
ScVbaApplication::getServiceImplName()
{
@@ -1182,3 +1809,5 @@ extern sdecl::ServiceDecl const serviceDecl(
"ScVbaApplication",
"ooo.vba.excel.Application" );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaapplication.hxx b/sc/source/ui/vba/vbaapplication.hxx
index a7be5feb1d27..6a5f655f0dbe 100644
--- a/sc/source/ui/vba/vbaapplication.hxx
+++ b/sc/source/ui/vba/vbaapplication.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,6 +48,7 @@ private:
sal_Bool m_bEnableEvents;
rtl::OUString getOfficePath( const rtl::OUString& sPath ) throw ( css::uno::RuntimeException );
+ css::uno::Reference< ov::XFileSearch > m_xFileSearch; //
protected:
virtual css::uno::Reference< css::frame::XModel > getCurrentDocument() throw (css::uno::RuntimeException);
@@ -89,6 +91,7 @@ public:
virtual void SAL_CALL setDisplayFormulaBar( ::sal_Bool _displayformulabar ) throw ( css::uno::RuntimeException );
virtual css::uno::Reference< ov::XAssistant > SAL_CALL getAssistant() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ov::XFileSearch > SAL_CALL getFileSearch() throw (css::uno::RuntimeException); //liuchen 2009-8-18 add the support of Application.FileSearch
virtual css::uno::Reference< ov::excel::XWorkbook > SAL_CALL getThisWorkbook() throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL Workbooks( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL Worksheets( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
@@ -102,6 +105,17 @@ public:
virtual ::sal_Int32 SAL_CALL getCursor() throw (css::uno::RuntimeException);
virtual void SAL_CALL setCursor( ::sal_Int32 _cursor ) throw (css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setVisible( sal_Bool bVisible ) throw (css::uno::RuntimeException);
+
+ virtual sal_Bool SAL_CALL getIteration() throw (css::uno::RuntimeException); //liuchen 2009-11-25 add the support of Iteration
+ virtual void SAL_CALL setIteration( sal_Bool bIteration ) throw (css::uno::RuntimeException); //liuchen 2009-11-25 add the support of Iteration
+ virtual sal_Int32 SAL_CALL getEnableCancelKey() throw (css::uno::RuntimeException); //liuchen 2009-11-26 add the support of EnableCancelKey
+ virtual void SAL_CALL setEnableCancelKey( sal_Int32 lEnableCancelKey ) throw (css::uno::RuntimeException); //liuchen 2009-11-26 add the support of EnableCancelKey
+
+ virtual sal_Int32 SAL_CALL getSheetsInNewWorkbook() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setSheetsInNewWorkbook( sal_Int32 SheetsInNewWorkbook ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+
virtual sal_Bool SAL_CALL getEnableEvents() throw (css::uno::RuntimeException);
virtual void SAL_CALL setEnableEvents( sal_Bool bEnable ) throw (css::uno::RuntimeException);
@@ -114,10 +128,20 @@ public:
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Intersect( const css::uno::Reference< ov::excel::XRange >& Arg1, const css::uno::Reference< ov::excel::XRange >& Arg2, const css::uno::Any& Arg3, const css::uno::Any& Arg4, const css::uno::Any& Arg5, const css::uno::Any& Arg6, const css::uno::Any& Arg7, const css::uno::Any& Arg8, const css::uno::Any& Arg9, const css::uno::Any& Arg10, const css::uno::Any& Arg11, const css::uno::Any& Arg12, const css::uno::Any& Arg13, const css::uno::Any& Arg14, const css::uno::Any& Arg15, const css::uno::Any& Arg16, const css::uno::Any& Arg17, const css::uno::Any& Arg18, const css::uno::Any& Arg19, const css::uno::Any& Arg20, const css::uno::Any& Arg21, const css::uno::Any& Arg22, const css::uno::Any& Arg23, const css::uno::Any& Arg24, const css::uno::Any& Arg25, const css::uno::Any& Arg26, const css::uno::Any& Arg27, const css::uno::Any& Arg28, const css::uno::Any& Arg29, const css::uno::Any& Arg30 ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Union( const css::uno::Reference< ov::excel::XRange >& Arg1, const css::uno::Reference< ov::excel::XRange >& Arg2, const css::uno::Any& Arg3, const css::uno::Any& Arg4, const css::uno::Any& Arg5, const css::uno::Any& Arg6, const css::uno::Any& Arg7, const css::uno::Any& Arg8, const css::uno::Any& Arg9, const css::uno::Any& Arg10, const css::uno::Any& Arg11, const css::uno::Any& Arg12, const css::uno::Any& Arg13, const css::uno::Any& Arg14, const css::uno::Any& Arg15, const css::uno::Any& Arg16, const css::uno::Any& Arg17, const css::uno::Any& Arg18, const css::uno::Any& Arg19, const css::uno::Any& Arg20, const css::uno::Any& Arg21, const css::uno::Any& Arg22, const css::uno::Any& Arg23, const css::uno::Any& Arg24, const css::uno::Any& Arg25, const css::uno::Any& Arg26, const css::uno::Any& Arg27, const css::uno::Any& Arg28, const css::uno::Any& Arg29, const css::uno::Any& Arg30 ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
virtual void SAL_CALL Volatile( const css::uno::Any& Volatile ) throw (css::uno::RuntimeException );
- virtual void SAL_CALL DoEvents() throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL Caller( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL MenuBars( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL GetOpenFilename( const css::uno::Any& FileFilter, const css::uno::Any& FilterIndex, const css::uno::Any& Title, const css::uno::Any& ButtonText, const css::uno::Any& MultiSelect ) throw (css::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::ooo::vba::XFileDialog > SAL_CALL getFileDialog() throw (::com::sun::star::uno::RuntimeException); //liminl 2009-08-12 add
+ virtual css::uno::Any SAL_CALL International( sal_Int32 Index ) throw (css::uno::RuntimeException); //liuchen 2009-11-26
+ //2009-12-04 add by limingl
+ virtual css::uno::Any SAL_CALL GetSaveAsFilename( const ::com::sun::star::uno::Any& InitialFilename, const ::com::sun::star::uno::Any& FileFilter, const ::com::sun::star::uno::Any& FilterIndex, const ::com::sun::star::uno::Any& Title, const ::com::sun::star::uno::Any& ButtonText ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL Undo( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual double SAL_CALL InchesToPoints( double Inches ) throw (css::uno::RuntimeException);
+
// XHelperInterface
virtual rtl::OUString& getServiceImplName();
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
};
#endif /* SC_VBA_APPLICATION_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaassistant.cxx b/sc/source/ui/vba/vbaassistant.cxx
index 51105d60b0d4..714bb783f3cb 100644
--- a/sc/source/ui/vba/vbaassistant.cxx
+++ b/sc/source/ui/vba/vbaassistant.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -130,3 +131,5 @@ ScVbaAssistant::getServiceNames()
}
return aServiceNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaassistant.hxx b/sc/source/ui/vba/vbaassistant.hxx
index dbb95af4b689..8490927c3240 100644
--- a/sc/source/ui/vba/vbaassistant.hxx
+++ b/sc/source/ui/vba/vbaassistant.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -68,3 +69,5 @@ public:
};
#endif//SC_VBA_ASSISTANT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaaxes.cxx b/sc/source/ui/vba/vbaaxes.cxx
index d563ba105108..eac7083a797c 100644
--- a/sc/source/ui/vba/vbaaxes.cxx
+++ b/sc/source/ui/vba/vbaaxes.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -201,3 +202,4 @@ ScVbaAxes::getServiceNames()
return aServiceNames;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaaxes.hxx b/sc/source/ui/vba/vbaaxes.hxx
index 5b5f88e2b72f..f135f8e65c71 100644
--- a/sc/source/ui/vba/vbaaxes.hxx
+++ b/sc/source/ui/vba/vbaaxes.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -49,3 +50,5 @@ public:
};
#endif //SC_VBA_AXES_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaaxis.cxx b/sc/source/ui/vba/vbaaxis.cxx
index a9c91a4cea31..d51534264e38 100644
--- a/sc/source/ui/vba/vbaaxis.cxx
+++ b/sc/source/ui/vba/vbaaxis.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -668,3 +669,4 @@ ScVbaAxis::getServiceNames()
return aServiceNames;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaaxis.hxx b/sc/source/ui/vba/vbaaxis.hxx
index 13432b231a27..f5b22047d1b3 100644
--- a/sc/source/ui/vba/vbaaxis.hxx
+++ b/sc/source/ui/vba/vbaaxis.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -96,3 +97,5 @@ public:
};
#endif //SC_VBA_AXIS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaaxistitle.cxx b/sc/source/ui/vba/vbaaxistitle.cxx
index 89b12b6e2870..cc5b0d791b13 100644
--- a/sc/source/ui/vba/vbaaxistitle.cxx
+++ b/sc/source/ui/vba/vbaaxistitle.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56,3 +57,4 @@ ScVbaAxisTitle::getServiceNames()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaaxistitle.hxx b/sc/source/ui/vba/vbaaxistitle.hxx
index 59ba71d99a87..0360e40be4aa 100644
--- a/sc/source/ui/vba/vbaaxistitle.hxx
+++ b/sc/source/ui/vba/vbaaxistitle.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,3 +43,5 @@ public:
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaborders.cxx b/sc/source/ui/vba/vbaborders.cxx
index 5424da041f84..7fbe157e2bdf 100644
--- a/sc/source/ui/vba/vbaborders.cxx
+++ b/sc/source/ui/vba/vbaborders.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,6 +27,7 @@
************************************************************************/
#include "vbaborders.hxx"
+#include <sal/macros.h>
#include <cppuhelper/implbase3.hxx>
#include <ooo/vba/excel/XlBordersIndex.hpp>
#include <ooo/vba/excel/XlBorderWeight.hpp>
@@ -34,7 +36,6 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/table/TableBorder.hpp>
#include <com/sun/star/table/XColumnRowRange.hpp>
-
#include "vbapalette.hxx"
using namespace ::com::sun::star;
@@ -332,7 +333,7 @@ public:
// XIndexAccess
virtual ::sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException)
{
- return sizeof( supportedIndexTable ) / sizeof( supportedIndexTable[0] );
+ return SAL_N_ELEMENTS( supportedIndexTable );
}
virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
{
@@ -572,3 +573,5 @@ ScVbaBorders::getServiceNames()
}
return aServiceNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaborders.hxx b/sc/source/ui/vba/vbaborders.hxx
index a385ad2e7a14..0164328a9e83 100644
--- a/sc/source/ui/vba/vbaborders.hxx
+++ b/sc/source/ui/vba/vbaborders.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -74,3 +75,4 @@ public:
#endif //SC_VBA_BORDERS_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbacharacters.cxx b/sc/source/ui/vba/vbacharacters.cxx
index 6c0079ac7a82..011b0a4a72e1 100644
--- a/sc/source/ui/vba/vbacharacters.cxx
+++ b/sc/source/ui/vba/vbacharacters.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -134,3 +135,4 @@ ScVbaCharacters::getServiceNames()
return aServiceNames;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbacharacters.hxx b/sc/source/ui/vba/vbacharacters.hxx
index 3400ff159d5e..df2fcf348619 100644
--- a/sc/source/ui/vba/vbacharacters.hxx
+++ b/sc/source/ui/vba/vbacharacters.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -73,3 +74,4 @@ public:
#endif /* SC_VBA_CHARACTER_HXX */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbachart.cxx b/sc/source/ui/vba/vbachart.cxx
index e2f446f93f2b..705f79ed42f9 100644
--- a/sc/source/ui/vba/vbachart.cxx
+++ b/sc/source/ui/vba/vbachart.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1251,3 +1252,4 @@ ScVbaChart::getServiceNames()
return aServiceNames;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbachart.hxx b/sc/source/ui/vba/vbachart.hxx
index d0b53c34421f..a0cee5d04a29 100644
--- a/sc/source/ui/vba/vbachart.hxx
+++ b/sc/source/ui/vba/vbachart.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -112,3 +113,5 @@ public:
};
#endif //SC_VBA_WINDOW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbachartobject.cxx b/sc/source/ui/vba/vbachartobject.cxx
index 617a090b6d7a..eaa42d1cc309 100644
--- a/sc/source/ui/vba/vbachartobject.cxx
+++ b/sc/source/ui/vba/vbachartobject.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -208,3 +209,5 @@ ScVbaChartObject::getUnoObject() throw (script::BasicErrorException)
{
return uno::Reference< uno::XInterface >( xShape, uno::UNO_QUERY );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbachartobject.hxx b/sc/source/ui/vba/vbachartobject.hxx
index 3c1e224728ee..73aa3d1fe119 100644
--- a/sc/source/ui/vba/vbachartobject.hxx
+++ b/sc/source/ui/vba/vbachartobject.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -78,3 +79,5 @@ public:
};
#endif //SC_VBA_WINDOW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbachartobjects.cxx b/sc/source/ui/vba/vbachartobjects.cxx
index 5117cfd75858..b8706b233462 100644
--- a/sc/source/ui/vba/vbachartobjects.cxx
+++ b/sc/source/ui/vba/vbachartobjects.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -192,3 +193,4 @@ ScVbaChartObjects::getServiceNames()
return sNames;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbachartobjects.hxx b/sc/source/ui/vba/vbachartobjects.hxx
index 80ea038bb15d..3524c8ffe30e 100644
--- a/sc/source/ui/vba/vbachartobjects.hxx
+++ b/sc/source/ui/vba/vbachartobjects.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -73,3 +74,5 @@ public:
};
#endif //SC_VBA_WINDOW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbacharts.cxx b/sc/source/ui/vba/vbacharts.cxx
index da0c7789134b..d02e79e8d431 100644
--- a/sc/source/ui/vba/vbacharts.cxx
+++ b/sc/source/ui/vba/vbacharts.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -118,3 +119,4 @@ ScVbaCharts::getServiceNames()
return sNames;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbacharts.hxx b/sc/source/ui/vba/vbacharts.hxx
index b2ecfe23270f..76bd2bec808b 100644
--- a/sc/source/ui/vba/vbacharts.hxx
+++ b/sc/source/ui/vba/vbacharts.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -58,3 +59,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbacharttitle.cxx b/sc/source/ui/vba/vbacharttitle.cxx
index e797c4a0269e..09f678704422 100644
--- a/sc/source/ui/vba/vbacharttitle.cxx
+++ b/sc/source/ui/vba/vbacharttitle.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56,3 +57,4 @@ ScVbaChartTitle::getServiceNames()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbacharttitle.hxx b/sc/source/ui/vba/vbacharttitle.hxx
index 4d6ed34a86b6..db0f3e31529f 100644
--- a/sc/source/ui/vba/vbacharttitle.hxx
+++ b/sc/source/ui/vba/vbacharttitle.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,3 +43,5 @@ public:
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbacomment.cxx b/sc/source/ui/vba/vbacomment.cxx
index 9c50a25b8b7c..f707fad1eb13 100644
--- a/sc/source/ui/vba/vbacomment.cxx
+++ b/sc/source/ui/vba/vbacomment.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,14 +34,23 @@
#include <com/sun/star/sheet/XSheetAnnotationsSupplier.hpp>
#include <com/sun/star/sheet/XSheetAnnotationShapeSupplier.hpp>
#include <com/sun/star/sheet/XSheetCellRange.hpp>
+#include <com/sun/star/sheet/XCellAddressable.hpp>
#include <com/sun/star/table/CellAddress.hpp>
#include <com/sun/star/table/XCell.hpp>
#include <com/sun/star/text/XText.hpp>
+#include <cellsuno.hxx>
+#include <postit.hxx>
+#include <svx/svdobj.hxx>
+#include <svx/svdocapt.hxx>
+#include <ooo/vba/msforms/XShape.hpp>
+#include <com/sun/star/drawing/XShape.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+
#include <vbahelper/vbashape.hxx>
#include "vbaglobals.hxx"
#include "vbacomments.hxx"
-
+#include "vbacommentshape.hxx"
using namespace ::ooo::vba;
using namespace ::com::sun::star;
@@ -178,7 +188,6 @@ ScVbaComment::Text( const uno::Any& aText, const uno::Any& aStart, const uno::An
aText >>= sText;
uno::Reference< text::XSimpleText > xAnnoText( getAnnotation(), uno::UNO_QUERY_THROW );
- rtl::OUString sAnnoText = xAnnoText->getString();
if ( aStart.hasValue() )
{
@@ -212,10 +221,12 @@ ScVbaComment::Text( const uno::Any& aText, const uno::Any& aStart, const uno::An
}
else if ( aText.hasValue() )
{
- xAnnoText->setString( sText );
- return sText;
+ uno::Reference< sheet::XCellAddressable > xCellAddr(mxRange->getCellByPosition(0, 0), uno::UNO_QUERY_THROW );
+ table::CellAddress aAddress = xCellAddr->getCellAddress();
+ getAnnotations()->insertNew( aAddress, sText );
}
+ rtl::OUString sAnnoText = xAnnoText->getString();
return sAnnoText;
}
@@ -237,3 +248,5 @@ ScVbaComment::getServiceNames()
}
return aServiceNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbacomment.hxx b/sc/source/ui/vba/vbacomment.hxx
index 4a7d2fab91ef..81670dca678a 100644
--- a/sc/source/ui/vba/vbacomment.hxx
+++ b/sc/source/ui/vba/vbacomment.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -79,3 +80,4 @@ public:
#endif /* SC_VBA_COMMENT_HXX */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbacomments.cxx b/sc/source/ui/vba/vbacomments.cxx
index 7a6d3d774937..c4c290da3b2a 100644
--- a/sc/source/ui/vba/vbacomments.cxx
+++ b/sc/source/ui/vba/vbacomments.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -114,3 +115,5 @@ ScVbaComments::getServiceNames()
}
return sNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbacomments.hxx b/sc/source/ui/vba/vbacomments.hxx
index 2f98e5b71897..8b65a3cafc8a 100644
--- a/sc/source/ui/vba/vbacomments.hxx
+++ b/sc/source/ui/vba/vbacomments.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,3 +64,4 @@ private:
#endif /* SC_VBA_COMMENTS_HXX */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/unoguard.cxx b/sc/source/ui/vba/vbacommentshape.cxx
index ff1c94338b72..768b63636ad2 100644
--- a/sc/source/ui/unoobj/unoguard.cxx
+++ b/sc/source/ui/vba/vbacommentshape.cxx
@@ -1,7 +1,9 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * Copyright IBM Corporation 2009, 2010.
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -25,23 +27,23 @@
*
************************************************************************/
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sc.hxx"
+#include "vbacommentshape.hxx"
+using namespace com::sun::star;
+using namespace ooo::vba;
-
-#include <vcl/svapp.hxx>
-#include <tools/debug.hxx>
-
-#include "unoguard.hxx"
-
-//------------------------------------------------------------------------
-
-ScUnoGuard::ScUnoGuard() :
- OGuard( Application::GetSolarMutex() )
+ScVbaCommentShape::ScVbaCommentShape( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape >& xShape, const uno::Reference< excel::XComment >& xComment,
+ const uno::Reference< drawing::XShapes >& xShapes, const uno::Reference< frame::XModel >& xModel, sal_Int32 nType ) : ScVbaShape( xParent, xContext, xShape, xShapes, xModel, nType )
{
+ m_xComment.set( xComment, uno::UNO_QUERY );
}
+void SAL_CALL ScVbaCommentShape::Delete() throw (uno::RuntimeException)
+{
+ if ( m_xComment.is() )
+ {
+ m_xComment->Delete();
+ }
+}
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/unoguard.hxx b/sc/source/ui/vba/vbacommentshape.hxx
index 0768eada24d7..6943321cbaef 100644
--- a/sc/inc/unoguard.hxx
+++ b/sc/source/ui/vba/vbacommentshape.hxx
@@ -1,7 +1,9 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * Copyright IBM Corporation 2009, 2010.
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -25,18 +27,23 @@
*
************************************************************************/
-#ifndef SC_UNOGUARD_HXX
-#define SC_UNOGUARD_HXX
+#ifndef SC_VBA_COMMENTSHAPE_HXX
+#define SC_VBA_COMMENTSHAPE_HXX
-#include <vos/mutex.hxx>
+#include <ooo/vba/excel/XComment.hpp>
+#include <vbahelper/vbashape.hxx>
-class ScUnoGuard : public NAMESPACE_VOS(OGuard)
+class ScVbaCommentShape : public ScVbaShape
{
-public:
- ScUnoGuard();
- ~ScUnoGuard() {}
-};
+ css::uno::Reference< ooo::vba::excel::XComment > m_xComment;
+public:
+ ScVbaCommentShape( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& xShape,
+ const css::uno::Reference< ooo::vba::excel::XComment >& xComment, const css::uno::Reference< css::drawing::XShapes >& xShapes, const css::uno::Reference< css::frame::XModel >& xModel, sal_Int32 nType );
-#endif
+ // Methods
+ virtual void SAL_CALL Delete() throw (css::uno::RuntimeException);
+};
+#endif //SC_VBA_COMMENTSHAPE_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbacondition.cxx b/sc/source/ui/vba/vbacondition.cxx
index 590d649ae561..321ca60d810f 100644
--- a/sc/source/ui/vba/vbacondition.cxx
+++ b/sc/source/ui/vba/vbacondition.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -173,3 +174,4 @@ ScVbaCondition< Ifc1 >::Operator(sal_Bool _bIncludeFormulaValue) throw ( script:
template class ScVbaCondition< excel::XFormatCondition >;
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbacondition.hxx b/sc/source/ui/vba/vbacondition.hxx
index 36052fe217ee..878e3d9e346f 100644
--- a/sc/source/ui/vba/vbacondition.hxx
+++ b/sc/source/ui/vba/vbacondition.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,3 +53,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbadialog.cxx b/sc/source/ui/vba/vbadialog.cxx
index 3c578a04e5d0..7b2a0edb4103 100644
--- a/sc/source/ui/vba/vbadialog.cxx
+++ b/sc/source/ui/vba/vbadialog.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,45 +27,63 @@
************************************************************************/
#include "vbadialog.hxx"
+#include <sal/macros.h>
+
using namespace ::ooo::vba;
using namespace ::com::sun::star;
-static const rtl::OUString aStringList[]=
+//liuchen 2009-7-27
+//solve the problem that "Application.Dialogs.Item(***).Show" and "Application.Dialogs.Count" cannot get the correct result
+struct DialogMatch
{
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Open" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormatCellDialog" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:InsertCell" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Print" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PasteSpecial" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ToolProtectionDocument" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ColumnWidth" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DefineName" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ConfigureDialog" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:HyperlinkDialog" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:InsertGraphic" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:InsertObject" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PageFormatDialog" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DataSort" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:RowHeight" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:AutoCorrectDlg" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ConditionalFormatDialog" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DataConsolidate" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:CreateNames" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FillSeries" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Validation") ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DefineLabelRange" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DataFilterAutoFilter" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DataFilterSpecialFilter" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:AutoFormat" ) )
+ sal_Int32 nVbaDlgIndex;
+ rtl::OUString aOODlgName;
};
-const sal_Int32 nDialogSize = sizeof( aStringList ) / sizeof( aStringList[ 0 ] );
+static const DialogMatch aDialogMatchList[] =
+{
+ { 1, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Open" ) ) }, // xlDialogOpen -> .uno:Open
+ { -1, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormatCellDialog" ) ) }, // ??? -> .uno:FormatCellDialog
+ { 55, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:InsertCell" ) ) }, // xlDialogInsert -> .uno:InsertCell
+ { 8, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Print" ) ) }, // xlDialogPrint -> .uno:Print
+ { 9, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PrinterSetup" ) ) }, // xlDialogPrinterSetup -> .uno:PrinterSetup
+ { 53, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PasteSpecial" ) ) }, // xlDialogPasteSpecial -> .uno:PasteSpecial
+ { 28, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ToolProtectionDocument" ) ) }, // xlDialogProtectDocument -> uno:ToolProtectionDocument
+ { 47, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ColumnWidth" ) ) }, // xlDialogColumnWidth -> .uno:ColumnWidth
+ { 61, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DefineName" ) ) }, // xlDialogDefineName -> .uno:DefineName
+ { -1, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ConfigureDialog" ) ) }, // ??? -> .uno:ConfigureDialog
+ { 596, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:HyperlinkDialog" ) ) }, // xlDialogInsertHyperlink -> .uno:HyperlinkDialog
+ { 342, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:InsertGraphic" ) ) }, // xlDialogInsertPicture -> .uno:InsertGraphic
+ { 259, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:InsertObject" ) ) }, // xlDialogInsertObject -> .uno:InsertObject
+ { 7, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PageFormatDialog" ) ) }, // xlDialogPageSetup -> .uno:PageFormatDialog
+ { 39, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DataSort" ) ) }, // xlDialogSort -> .uno:DataSort
+ { 127, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:RowHeight" ) ) }, // xlDialogRowHeight -> .uno:RowHeight
+ { 485, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:AutoCorrectDlg" ) ) }, // xlDialogAutoCorrect -> .uno:AutoCorrectDlg
+ { 583, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ConditionalFormatDialog" ) ) }, // xlDialogCondiationalFormatting -> .uno:ConditionalFormatDialog
+ { 191, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DataConsolidate" ) ) }, // xlDialogConsolidate -> .uno:DataConsolidate
+ { 62, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:CreateNames" ) ) }, // xlDialogCreateNames -> .uno:CreateNames
+ { -1, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FillSeries" ) ) }, // ??? -> .uno:FillSeries
+ { -1, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Validation" ) ) }, // ??? -> .uno:Validation"
+ { -1, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DefineLabelRange" ) ) }, // ??? -> .uno:DefineLabelRange
+ { -1, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DataFilterAutoFilter" ) ) }, // ??? -> .uno:DataFilterAutoFilter
+ { -1, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DataFilterSpecialFilter" ) ) }, // ??? -> .uno:DataFilterSpecialFilter
+ { 269, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:AutoFormat" ) ) } // xlDialogFormatAuto -> .uno:AutoFormat
+};
+const sal_Int32 nDialogSize = SAL_N_ELEMENTS( aDialogMatchList ) ;
+
+//liuchen modified 2009-2-27
rtl::OUString
ScVbaDialog::mapIndexToName( sal_Int32 nIndex )
{
- if( nIndex < nDialogSize )
- return aStringList[ nIndex ];
+ for (int i = 0; i < nDialogSize; i++)
+ {
+ if ( aDialogMatchList[i].nVbaDlgIndex == nIndex )
+ {
+ return aDialogMatchList[i].aOODlgName;
+ }
+ }
+
return rtl::OUString();
}
@@ -86,3 +105,10 @@ ScVbaDialog::getServiceNames()
}
return aServiceNames;
}
+
+//liuchen add 2009-7-27
+sal_Int32 ScVbaDialog::GetSupportedDialogCount()
+{
+ return nDialogSize;
+}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbadialog.hxx b/sc/source/ui/vba/vbadialog.hxx
index 40f4a4a83a11..da733ce92247 100644
--- a/sc/source/ui/vba/vbadialog.hxx
+++ b/sc/source/ui/vba/vbadialog.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45,6 +46,11 @@ public:
// XHelperInterface
virtual rtl::OUString& getServiceImplName();
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+
+ //liuchen 2009-7-27
+ static sal_Int32 GetSupportedDialogCount();
};
#endif /* SC_VBA_DIALOG_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbadialogs.cxx b/sc/source/ui/vba/vbadialogs.cxx
index 67070879535b..361d1a45329c 100644
--- a/sc/source/ui/vba/vbadialogs.cxx
+++ b/sc/source/ui/vba/vbadialogs.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -64,5 +65,14 @@ ScVbaDialogs::getServiceNames()
return aServiceNames;
}
+//liuchen 2009-7-27
+::sal_Int32
+ScVbaDialogs::getCount() throw (uno::RuntimeException)
+{
+ return ScVbaDialog::GetSupportedDialogCount();
+}
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbadialogs.hxx b/sc/source/ui/vba/vbadialogs.hxx
index 9aab5daf11fe..ff4e1553f52f 100644
--- a/sc/source/ui/vba/vbadialogs.hxx
+++ b/sc/source/ui/vba/vbadialogs.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,6 +45,7 @@ public:
// XCollection
virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index ) throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException); //liuchen 2009-7-27
// XDialogs
virtual void SAL_CALL Dummy() throw (css::uno::RuntimeException);
@@ -53,3 +55,5 @@ public:
};
#endif /* SC_VBA_DIALOGS_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaeventshelper.cxx b/sc/source/ui/vba/vbaeventshelper.cxx
index 45667adf2f2c..5e9eab58e8c4 100644
--- a/sc/source/ui/vba/vbaeventshelper.cxx
+++ b/sc/source/ui/vba/vbaeventshelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -372,7 +373,15 @@ void ScVbaEventsListener::processWindowResizeMacro()
{
OSL_TRACE( "**** Attempt to FIRE MACRO **** " );
if( !mbDisposed )
- mrVbaEvents.processVbaEvent( WORKBOOK_WINDOWRESIZE, uno::Sequence< uno::Any >() );
+ {
+ try
+ {
+ mrVbaEvents.processVbaEvent( WORKBOOK_WINDOWRESIZE, uno::Sequence< uno::Any >() );
+ }
+ catch( uno::Exception& )
+ {
+ }
+ }
}
// ============================================================================
@@ -751,3 +760,5 @@ extern sdecl::ServiceDecl const serviceDecl(
}
// ============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaeventshelper.hxx b/sc/source/ui/vba/vbaeventshelper.hxx
index a77f5128b3e9..f0c73dd88d7f 100644
--- a/sc/source/ui/vba/vbaeventshelper.hxx
+++ b/sc/source/ui/vba/vbaeventshelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -86,3 +87,5 @@ private:
// ============================================================================
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbafiledialog.cxx b/sc/source/ui/vba/vbafiledialog.cxx
new file mode 100644
index 000000000000..482e6ab2d5e1
--- /dev/null
+++ b/sc/source/ui/vba/vbafiledialog.cxx
@@ -0,0 +1,186 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright IBM Corporation 2009, 2010.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "vbafiledialog.hxx"
+#include "comphelper/processfactory.hxx"
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
+#include <com/sun/star/ui/dialogs/XFilePicker2.hpp>
+#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
+#include "tools/urlobj.hxx"
+
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+
+
+ScVbaFileDialog::ScVbaFileDialog( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, const css::uno::Reference< css::frame::XModel >& xModel )
+: ScVbaFileDialog_BASE( xParent, xContext, xModel )
+{
+ m_pFileDialogSelectedItems = new VbaFileDialogSelectedItems(xParent, xContext, (com::sun::star::container::XIndexAccess *)&m_FileDialogSelectedObj);
+}
+
+ScVbaFileDialog::~ScVbaFileDialog()
+{
+ if (m_pFileDialogSelectedItems != NULL)
+ {
+ delete m_pFileDialogSelectedItems;
+ }
+}
+
+rtl::OUString&
+ScVbaFileDialog::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaFileDialog") );
+ return sImplName;
+}
+
+css::uno::Sequence<rtl::OUString>
+ScVbaFileDialog::getServiceNames()
+{
+ static Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.FileDialog" ) );
+ }
+ return aServiceNames;
+
+}
+
+css::uno::Reference< ov::XFileDialogSelectedItems > SAL_CALL
+ScVbaFileDialog::getSelectedItems() throw (css::uno::RuntimeException)
+{
+ css::uno::Reference< ov::XFileDialogSelectedItems > xFileDlgSlc = (ov::XFileDialogSelectedItems *)m_pFileDialogSelectedItems;
+ return xFileDlgSlc;
+}
+
+::sal_Int32 SAL_CALL
+ScVbaFileDialog::Show( ) throw (::com::sun::star::uno::RuntimeException)
+{
+ // Returns an Integer indicating if user pressed "Open" button(-1) or "Cancel" button(0).
+ sal_Int32 nResult = -1;
+ try
+ {
+ m_sSelectedItems.realloc(0);
+
+ const ::rtl::OUString sServiceName = ::rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.FilePicker" );
+
+ Reference< lang::XMultiServiceFactory > xMSF( comphelper::getProcessServiceFactory(), uno::UNO_QUERY );
+ // Set the type of File Picker Dialog: TemplateDescription::FILEOPEN_SIMPLE.
+ Sequence< uno::Any > aDialogType( 1 );
+ aDialogType[0] <<= ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE;
+ Reference < ui::dialogs::XFilePicker > xFilePicker( xMSF->createInstanceWithArguments( sServiceName, aDialogType ), UNO_QUERY );
+ Reference < ui::dialogs::XFilePicker2 > xFilePicker2( xFilePicker, UNO_QUERY );
+ if ( xFilePicker.is() )
+ {
+ xFilePicker->setMultiSelectionMode(sal_True);
+ if ( xFilePicker->execute() )
+ {
+ sal_Bool bUseXFilePicker2 = sal_False;
+ Reference< lang::XServiceInfo > xServiceInfo( xFilePicker, UNO_QUERY );
+ if (xServiceInfo.is())
+ {
+ rtl::OUString sImplName = xServiceInfo->getImplementationName();
+ if (sImplName.equalsAscii("com.sun.star.comp.fpicker.VistaFileDialog") ||
+ sImplName.equalsAscii("com.sun.star.ui.dialogs.SalGtkFilePicker"))
+ {
+ bUseXFilePicker2 = sal_True;
+ }
+ }
+ if ( bUseXFilePicker2 && xFilePicker2.is() )
+ {
+ // On Linux, XFilePicker->getFiles() always return one selected file although we select
+ // more than one file, also on Vista XFilePicker->getFiles() does not work well too,
+ // so we call XFilePicker2->getSelectedFiles() to get selected files.
+ m_sSelectedItems = xFilePicker2->getSelectedFiles();
+ }
+ else
+ {
+ // If only one file is selected, the first entry of the sequence contains the complete path/filename in
+ // URL format. If multiple files are selected, the first entry of the sequence contains the path in URL
+ // format, and the other entries contains the names of the selected files without path information.
+ Sequence< rtl::OUString > aSelectedFiles = xFilePicker->getFiles();
+ sal_Int32 iFileCount = aSelectedFiles.getLength();
+ if ( iFileCount > 1 )
+ {
+ m_sSelectedItems.realloc( iFileCount - 1 );
+ INetURLObject aPath( aSelectedFiles[0] );
+ aPath.setFinalSlash();
+ for ( sal_Int32 i = 1; i < iFileCount; i++ )
+ {
+ if ( aSelectedFiles[i].indexOf ('/') > 0 || aSelectedFiles[i].indexOf ('\\') > 0 )
+ {
+ m_sSelectedItems[i - 1] = aSelectedFiles[i];
+ }
+ else
+ {
+ if ( i == 1 )
+ aPath.Append( aSelectedFiles[i] );
+ else
+ aPath.setName( aSelectedFiles[i] );
+ m_sSelectedItems[i - 1] = aPath.GetMainURL(INetURLObject::NO_DECODE);
+ }
+ }
+ }
+ else if ( iFileCount == 1 )
+ {
+ m_sSelectedItems = aSelectedFiles;
+ }
+ }
+
+ sal_Int32 iFileCount = m_sSelectedItems.getLength();
+ rtl::OUString aTemp;
+ for ( sal_Int32 i = 0; i < iFileCount; i++ )
+ {
+ INetURLObject aObj( m_sSelectedItems[i] );
+ if ( aObj.GetProtocol() == INET_PROT_FILE )
+ {
+ aTemp = aObj.PathToFileName();
+ m_sSelectedItems[i] = aTemp.getLength() > 0 ? aTemp : m_sSelectedItems[i];
+ }
+ }
+ }
+ else
+ {
+ nResult = 0;
+ }
+ }
+
+ m_FileDialogSelectedObj.SetSelectedFile(m_sSelectedItems);
+ }
+ catch( const uno::Exception& )
+ {
+ return 0;
+ }
+
+ return nResult;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbafiledialog.hxx b/sc/source/ui/vba/vbafiledialog.hxx
new file mode 100644
index 000000000000..ac905f541185
--- /dev/null
+++ b/sc/source/ui/vba/vbafiledialog.hxx
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright IBM Corporation 2009, 2010.
+ * 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 _vbafiledialog_hxx_
+#define _vbafiledialog_hxx_
+
+#include <cppuhelper/implbase1.hxx>
+#include <vbahelper/vbadialogsbase.hxx>
+#include <ooo/vba/XFileDialog.hpp>
+#include "vbafiledialogselecteditems.hxx"
+
+
+typedef cppu::ImplInheritanceHelper1< VbaDialogsBase, ov::XFileDialog > ScVbaFileDialog_BASE;
+
+class ScVbaFileDialog : public ScVbaFileDialog_BASE
+{
+public:
+
+ ScVbaFileDialog( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, const css::uno::Reference< css::frame::XModel >& xModel ) ;
+ virtual ~ScVbaFileDialog() ;
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+ //XFileDialog
+ virtual css::uno::Reference< ov::XFileDialogSelectedItems > SAL_CALL getSelectedItems() throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL Show( ) throw (::com::sun::star::uno::RuntimeException) ;
+
+private:
+ css::uno::Sequence < rtl::OUString > m_sSelectedItems;
+ VbaFileDialogSelectedItems *m_pFileDialogSelectedItems;
+ VbaFileDialogSelectedObj m_FileDialogSelectedObj;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbafiledialogselecteditems.cxx b/sc/source/ui/vba/vbafiledialogselecteditems.cxx
new file mode 100644
index 000000000000..d8ebc937b489
--- /dev/null
+++ b/sc/source/ui/vba/vbafiledialogselecteditems.cxx
@@ -0,0 +1,157 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright IBM Corporation 2009, 2010.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "vbafiledialogselecteditems.hxx"
+
+using namespace ::com::sun::star;
+
+VbaFileDialogSelectedItems::VbaFileDialogSelectedItems( const css::uno::Reference< ov::XHelperInterface >& xParent,
+ const css::uno::Reference< css::uno::XComponentContext >& xContext,
+ const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess
+ )
+ : FileDialogSelectedItems_BASE( xParent, xContext, xIndexAccess )
+{
+}
+
+
+rtl::OUString& VbaFileDialogSelectedItems::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("VbaFileDialogSelectedItems") );
+ return sImplName;
+
+}
+css::uno::Sequence<rtl::OUString> VbaFileDialogSelectedItems::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.FileDialogSelectedItems" ) );
+ }
+ return aServiceNames;
+
+}
+
+css::uno::Any VbaFileDialogSelectedItems::createCollectionObject( const css::uno::Any& aSource )
+{
+ css::uno::Any aRet;
+ aRet = aSource;
+ return aRet;
+}
+
+
+css::uno::Type SAL_CALL
+VbaFileDialogSelectedItems::getElementType() throw (css::uno::RuntimeException)
+{
+ return ooo::vba::XFileDialogSelectedItems::static_type(0);
+}
+
+css::uno::Reference< css::container::XEnumeration > SAL_CALL
+VbaFileDialogSelectedItems::createEnumeration() throw (css::uno::RuntimeException)
+{
+ css::uno::Reference< css::container::XEnumeration > xEnumRet(m_xIndexAccess, css::uno::UNO_QUERY);
+ return xEnumRet;
+}
+
+
+//VbaFileDialogSelectedObj
+//////////////////////////////////////////////////////////////////////////
+
+VbaFileDialogSelectedObj::VbaFileDialogSelectedObj()
+{
+ m_nIndex = 0;
+}
+
+
+sal_Bool
+VbaFileDialogSelectedObj::SetSelectedFile(css::uno::Sequence<rtl::OUString> &sFList)
+{
+ m_sFileList = sFList;
+ return sal_True;
+}
+
+sal_Int32 SAL_CALL
+VbaFileDialogSelectedObj::getCount() throw(::com::sun::star::uno::RuntimeException)
+{
+ sal_Int32 nListCnt = m_sFileList.getLength();
+ return nListCnt;
+}
+
+::com::sun::star::uno::Any SAL_CALL VbaFileDialogSelectedObj::getByIndex( sal_Int32 nIndex )
+throw(::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException)
+{
+ css::uno::Any aRet;
+
+ if ( nIndex >= getCount() )
+ {
+ throw css::lang::IndexOutOfBoundsException();
+ }
+
+ return uno::makeAny(m_sFileList[nIndex]);
+}
+
+::com::sun::star::uno::Type SAL_CALL
+VbaFileDialogSelectedObj::getElementType()
+throw(::com::sun::star::uno::RuntimeException)
+{
+ return getCppuType((uno::Reference<com::sun::star::container::XIndexAccess>*)0);
+}
+
+sal_Bool SAL_CALL VbaFileDialogSelectedObj::hasElements()
+throw(::com::sun::star::uno::RuntimeException)
+{
+ return ( getCount() != 0 );
+}
+
+::sal_Bool SAL_CALL
+VbaFileDialogSelectedObj::hasMoreElements( )
+throw (uno::RuntimeException)
+{
+ if (getCount() > m_nIndex)
+ {
+ return sal_True;
+ }
+ return sal_False;
+}
+
+uno::Any SAL_CALL
+VbaFileDialogSelectedObj::nextElement( )
+throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ if (!hasMoreElements())
+ {
+ throw container::NoSuchElementException();
+ }
+
+ return uno::makeAny(m_sFileList[m_nIndex++]);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbafiledialogselecteditems.hxx b/sc/source/ui/vba/vbafiledialogselecteditems.hxx
new file mode 100644
index 000000000000..b43364dff709
--- /dev/null
+++ b/sc/source/ui/vba/vbafiledialogselecteditems.hxx
@@ -0,0 +1,90 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright IBM Corporation 2009, 2010.
+ * 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 _vbafiledialogselecteditems_hxx_
+#define _vbafiledialogselecteditems_hxx_
+
+#include <ooo/vba/XFileDialogSelectedItems.hpp>
+#include <vbahelper/vbacollectionimpl.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/container/XIndexAccess.hpp>
+
+typedef CollTestImplHelper< ov::XFileDialogSelectedItems > FileDialogSelectedItems_BASE;
+
+
+class VbaFileDialogSelectedItems : public FileDialogSelectedItems_BASE
+{
+public:
+ VbaFileDialogSelectedItems( const css::uno::Reference< ov::XHelperInterface >& xParent,
+ const css::uno::Reference< css::uno::XComponentContext >& xContext,
+ const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess );
+
+ virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
+ virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+
+protected:
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+private:
+};
+
+
+class VbaFileDialogSelectedObj : public cppu::WeakImplHelper2<css::container::XIndexAccess, css::container::XEnumeration>
+{
+public:
+ VbaFileDialogSelectedObj();
+ sal_Bool SetSelectedFile(css::uno::Sequence<rtl::OUString> &sFList);
+ //XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 nIndex )
+ throw(::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
+ throw(::com::sun::star::uno::RuntimeException);
+
+ virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
+
+ //XEnumeration
+ virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL nextElement( ) throw (css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+
+protected:
+private:
+ css::uno::Sequence<rtl::OUString> m_sFileList;
+ sal_Int32 m_nIndex;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbafilesearch.cxx b/sc/source/ui/vba/vbafilesearch.cxx
new file mode 100644
index 000000000000..6df035c21c2b
--- /dev/null
+++ b/sc/source/ui/vba/vbafilesearch.cxx
@@ -0,0 +1,245 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright IBM Corporation 2009, 2010.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "vbafilesearch.hxx"
+#include "vbaapplication.hxx"
+#include "vbafoundfiles.hxx"
+#include <comphelper/processfactory.hxx>
+#include <tools/urlobj.hxx>
+#include <tools/wldcrd.hxx>
+#include <com/sun/star/ucb/XSimpleFileAccess3.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <vector>
+#include "unotools/viewoptions.hxx"
+#include <osl/file.hxx>
+
+using namespace ::ooo::vba;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::ucb;
+using namespace ::com::sun::star::lang;
+using namespace comphelper;
+
+static Reference< XSimpleFileAccess3 > getFileAccess( void )
+{
+ static Reference< XSimpleFileAccess3 > xSFI;
+ if( !xSFI.is() )
+ {
+ Reference< XMultiServiceFactory > xSMgr = getProcessServiceFactory();
+ if( xSMgr.is() )
+ {
+ xSFI = Reference< XSimpleFileAccess3 >( xSMgr->createInstance
+ ( ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), UNO_QUERY );
+ }
+ }
+ return xSFI;
+}
+
+ScVbaFileSearch::ScVbaFileSearch( ScVbaApplication* pApp, const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext )
+ : ScVbaFileSearchImpl_BASE( xParent, xContext ), m_pApplication( pApp )
+{
+ NewSearch();
+}
+
+ScVbaFileSearch::~ScVbaFileSearch()
+{
+}
+
+::rtl::OUString SAL_CALL ScVbaFileSearch::getFileName() throw (css::uno::RuntimeException)
+{
+ return m_sFileName;
+}
+
+void SAL_CALL ScVbaFileSearch::setFileName(const ::rtl::OUString& _fileName ) throw (css::uno::RuntimeException)
+{
+ m_sFileName = _fileName;
+}
+
+::rtl::OUString SAL_CALL ScVbaFileSearch::getLookIn() throw (css::uno::RuntimeException)
+{
+ return m_sLookIn;
+}
+
+void SAL_CALL ScVbaFileSearch::setLookIn( const ::rtl::OUString& _lookIn ) throw (css::uno::RuntimeException)
+{
+ m_sLookIn = _lookIn;
+}
+
+sal_Bool SAL_CALL ScVbaFileSearch::getSearchSubFolders() throw (css::uno::RuntimeException)
+{
+ return m_bSearchSubFolders;
+}
+
+void SAL_CALL ScVbaFileSearch::setSearchSubFolders( sal_Bool _searchSubFolders ) throw (css::uno::RuntimeException)
+{
+ m_bSearchSubFolders = _searchSubFolders;
+}
+
+sal_Bool SAL_CALL ScVbaFileSearch::getMatchTextExactly() throw (css::uno::RuntimeException)
+{
+ return m_bMatchTextExactly;
+}
+
+void SAL_CALL ScVbaFileSearch::setMatchTextExactly( sal_Bool _matchTextExactly ) throw (css::uno::RuntimeException)
+{
+ m_bMatchTextExactly = _matchTextExactly;
+}
+
+static bool IsWildCard( const ::rtl::OUString& fileName )
+{
+ static sal_Char cWild1 = '*';
+ static sal_Char cWild2 = '?';
+
+ return ( ( fileName.indexOf( cWild1 ) >= 0 )
+ || ( fileName.indexOf( cWild2 ) >= 0 ) );
+}
+
+static void SearchWildCard(const WildCard& wildCard, const ::rtl::OUString& aDir, bool bSearchSubFolders, css::uno::Sequence< rtl::OUString >& aSearchedFiles)
+{
+ Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
+ Sequence< rtl::OUString > aDirSeq;
+ try
+ {
+ if ( xSFI.is() )
+ {
+ aDirSeq = xSFI->getFolderContents( aDir, bSearchSubFolders );
+ }
+ }
+ catch( css::uno::Exception& )
+ {
+ }
+ sal_Int32 nLength = aDirSeq.getLength();
+ for ( sal_Int32 i = 0; i < nLength; i++ )
+ {
+ rtl::OUString aURLStr = aDirSeq[i];
+ if ( xSFI->isFolder( aURLStr ) )
+ {
+ if ( bSearchSubFolders )
+ {
+ SearchWildCard( wildCard, aURLStr, true, aSearchedFiles );
+ }
+ }
+ else
+ {
+ INetURLObject aFileURL( aURLStr );
+ rtl::OUString aFileName = aFileURL.GetLastName( INetURLObject::DECODE_UNAMBIGUOUS );
+ if ( wildCard.Matches( aFileName.toAsciiLowerCase() ) )
+ {
+ sal_Int32 nFilesLength = aSearchedFiles.getLength();
+ aSearchedFiles.realloc( nFilesLength + 1 );
+ rtl::OUString sSystemPath;
+ ::osl::File::getSystemPathFromFileURL( aURLStr, sSystemPath );
+ aSearchedFiles[nFilesLength] = sSystemPath;
+ }
+ }
+ }
+}
+
+sal_Int32 SAL_CALL ScVbaFileSearch::Execute( ) throw (css::uno::RuntimeException)
+{
+ m_aSearchedFiles.realloc(0);
+ Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
+ if ( !xSFI.is() || !xSFI->isFolder( m_sLookIn ) )
+ {
+ return 0;
+ }
+
+ if ( m_sFileName == ::rtl::OUString::createFromAscii( "" ) )
+ {
+ return 1;
+ }
+
+ ::rtl::OUString aTempFileName = m_sFileName.toAsciiLowerCase();
+ if ( IsWildCard( aTempFileName ) )
+ {
+ bool bEndWithAsterisk = aTempFileName.endsWithAsciiL("*", 1);
+ bool bStartWithAsterisk = (aTempFileName.indexOf(::rtl::OUString::createFromAscii("*")) == 0);
+ if ( !bEndWithAsterisk && !bStartWithAsterisk )
+ {
+ aTempFileName = ::rtl::OUString::createFromAscii("*") + aTempFileName + ::rtl::OUString::createFromAscii("*");
+ }
+ }
+ else
+ {
+ aTempFileName = ::rtl::OUString::createFromAscii("*") + aTempFileName + ::rtl::OUString::createFromAscii("*");
+ }
+ WildCard wildCard( aTempFileName );
+ SearchWildCard( wildCard, m_sLookIn, m_bSearchSubFolders, m_aSearchedFiles );
+
+ return m_aSearchedFiles.getLength();
+}
+
+//liuchen 2009-11-5 set ScVbaApplication::getDefaultFilePath( ) as the InitPath for FileSearch
+ ::rtl::OUString ScVbaFileSearch::getInitPath() throw (css::uno::RuntimeException)
+{
+ String aPath;
+
+ if (m_pApplication != NULL)
+ {
+ aPath = m_pApplication->getDefaultFilePath();
+ }
+
+ return aPath;
+}
+
+void SAL_CALL ScVbaFileSearch::NewSearch( ) throw (css::uno::RuntimeException)
+{
+ m_sFileName = ::rtl::OUString::createFromAscii( "" );
+ m_sLookIn = getInitPath();
+ m_bSearchSubFolders = false;
+ m_bMatchTextExactly = false;
+ m_aSearchedFiles.realloc(0);
+}
+
+Reference< XFoundFiles > SAL_CALL ScVbaFileSearch::getFoundFiles() throw (css::uno::RuntimeException)
+{
+ css::uno::Reference< ov::XFoundFiles > xFoundFiles = new VbaFoundFiles(
+ mxParent, mxContext, (css::container::XIndexAccess *) new VbaFoundFilesEnum(m_aSearchedFiles) );
+ return xFoundFiles;
+}
+
+rtl::OUString& ScVbaFileSearch::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("VbaFileSearch") );
+ return sImplName;
+}
+
+css::uno::Sequence< rtl::OUString > ScVbaFileSearch::getServiceNames()
+{
+ static css::uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.FileSearch") );
+ }
+ return aServiceNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbafilesearch.hxx b/sc/source/ui/vba/vbafilesearch.hxx
new file mode 100644
index 000000000000..33e9caa53ca6
--- /dev/null
+++ b/sc/source/ui/vba/vbafilesearch.hxx
@@ -0,0 +1,80 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright IBM Corporation 2009, 2010.
+ * 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 SC_VBA_FILESEARCH_HXX
+#define SC_VBA_FILESEARCH_HXX
+
+#include <ooo/vba/XFileSearch.hpp>
+#include <cppuhelper/implbase1.hxx>
+#include <vbahelper/vbahelperinterface.hxx>
+
+namespace css = ::com::sun::star;
+
+typedef InheritedHelperInterfaceImpl1< ooo::vba::XFileSearch > ScVbaFileSearchImpl_BASE;
+
+class ScVbaApplication;
+
+class ScVbaFileSearch : public ScVbaFileSearchImpl_BASE
+{
+private:
+ rtl::OUString m_sFileName;
+ rtl::OUString m_sLookIn;
+ sal_Bool m_bSearchSubFolders;
+ sal_Bool m_bMatchTextExactly;
+ ScVbaApplication* m_pApplication;
+ css::uno::Sequence< rtl::OUString > m_aSearchedFiles;
+
+ ::rtl::OUString getInitPath() throw (css::uno::RuntimeException);
+
+public:
+ ScVbaFileSearch( ScVbaApplication* pApp, const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext );
+ virtual ~ScVbaFileSearch();
+
+ // Attributes
+ virtual ::rtl::OUString SAL_CALL getFileName() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setFileName(const ::rtl::OUString& _fileName ) throw (css::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getLookIn() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setLookIn(const ::rtl::OUString& _lookIn ) throw (css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL getSearchSubFolders() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setSearchSubFolders( sal_Bool _searchSubFolders ) throw (css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL getMatchTextExactly() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setMatchTextExactly( sal_Bool _matchTextExactly ) throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ::ooo::vba::XFoundFiles > SAL_CALL getFoundFiles() throw (css::uno::RuntimeException);
+
+ virtual sal_Int32 SAL_CALL Execute( ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL NewSearch( ) throw (css::uno::RuntimeException);
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence< rtl::OUString > getServiceNames();
+};
+
+#endif /* SC_VBA_FILESEARCH_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbafont.cxx b/sc/source/ui/vba/vbafont.cxx
index 5894d3ea8c71..68ade5207674 100644
--- a/sc/source/ui/vba/vbafont.cxx
+++ b/sc/source/ui/vba/vbafont.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -499,3 +500,5 @@ ScVbaFont::getServiceNames()
}
return aServiceNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbafont.hxx b/sc/source/ui/vba/vbafont.hxx
index 3ef52c6d240f..b87672a1223a 100644
--- a/sc/source/ui/vba/vbafont.hxx
+++ b/sc/source/ui/vba/vbafont.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -88,3 +89,4 @@ public:
#endif /* SC_VBA_FONT_HXX */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaformat.cxx b/sc/source/ui/vba/vbaformat.cxx
index 81e9e0ebe73b..a493bac28e05 100644
--- a/sc/source/ui/vba/vbaformat.cxx
+++ b/sc/source/ui/vba/vbaformat.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -120,7 +121,7 @@ ScVbaFormat<Ifc1>::getVerticalAlignment( ) throw (script::BasicErrorException,
{
if (!isAmbiguous( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CELLVJUS ) ) ) )
{
- sal_Int32 aAPIAlignment;
+ sal_Int32 aAPIAlignment = table::CellVertJustify2::STANDARD;
mxPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CELLVJUS ) ) ) >>= aAPIAlignment;
switch( aAPIAlignment )
{
@@ -841,3 +842,4 @@ template class ScVbaFormat< excel::XStyle >;
template class ScVbaFormat< excel::XRange >;
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaformat.hxx b/sc/source/ui/vba/vbaformat.hxx
index bfa88d6c7cb8..3646665f5b24 100644
--- a/sc/source/ui/vba/vbaformat.hxx
+++ b/sc/source/ui/vba/vbaformat.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -106,3 +107,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaformatcondition.cxx b/sc/source/ui/vba/vbaformatcondition.cxx
index 99d8a579956a..deed22ab287e 100644
--- a/sc/source/ui/vba/vbaformatcondition.cxx
+++ b/sc/source/ui/vba/vbaformatcondition.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -174,3 +175,5 @@ ScVbaFormatCondition::getServiceNames()
}
return aServiceNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaformatcondition.hxx b/sc/source/ui/vba/vbaformatcondition.hxx
index 075dbf658203..aa1a3e5bb740 100644
--- a/sc/source/ui/vba/vbaformatcondition.hxx
+++ b/sc/source/ui/vba/vbaformatcondition.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -68,3 +69,5 @@ public:
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaformatconditions.cxx b/sc/source/ui/vba/vbaformatconditions.cxx
index 8dd67843ec00..6eda5c654238 100644
--- a/sc/source/ui/vba/vbaformatconditions.cxx
+++ b/sc/source/ui/vba/vbaformatconditions.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -299,3 +300,4 @@ ScVbaFormatConditions::getServiceNames()
return aServiceNames;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaformatconditions.hxx b/sc/source/ui/vba/vbaformatconditions.hxx
index 7dfa065ea8b6..dea8f4c45a62 100644
--- a/sc/source/ui/vba/vbaformatconditions.hxx
+++ b/sc/source/ui/vba/vbaformatconditions.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,3 +64,5 @@ public:
};
#endif //SC_VBA_AXES_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbafoundfiles.cxx b/sc/source/ui/vba/vbafoundfiles.cxx
new file mode 100644
index 000000000000..9d3af947e1dd
--- /dev/null
+++ b/sc/source/ui/vba/vbafoundfiles.cxx
@@ -0,0 +1,146 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright IBM Corporation 2009, 2010.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "vbafoundfiles.hxx"
+
+////////////////////////////////VbaFoundFilesEnum//////////////////////////////////////////
+VbaFoundFilesEnum::VbaFoundFilesEnum() : m_nIndex(0)
+{
+
+}
+
+VbaFoundFilesEnum::VbaFoundFilesEnum( css::uno::Sequence<rtl::OUString>& sFileList ) : m_nIndex(0), m_sFileList(sFileList)
+{
+
+}
+
+VbaFoundFilesEnum::~VbaFoundFilesEnum()
+{
+
+}
+
+void VbaFoundFilesEnum::SetFileList( css::uno::Sequence<rtl::OUString>& sFileList )
+{
+ m_nIndex = 0;
+ m_sFileList = sFileList;
+}
+
+sal_Int32 SAL_CALL VbaFoundFilesEnum::getCount() throw (css::uno::RuntimeException)
+{
+ return m_sFileList.getLength();
+}
+
+css::uno::Any SAL_CALL VbaFoundFilesEnum::getByIndex( sal_Int32 nIndex )
+ throw (css::lang::IndexOutOfBoundsException, css::lang::WrappedTargetException, css::uno::RuntimeException)
+{
+ if ( nIndex >= getCount() )
+ {
+ throw css::lang::IndexOutOfBoundsException();
+ }
+
+ return css::uno::makeAny( m_sFileList[nIndex] );
+}
+
+css::uno::Type SAL_CALL VbaFoundFilesEnum::getElementType() throw (css::uno::RuntimeException)
+{
+ return getCppuType((css::uno::Reference< css::container::XIndexAccess >*)0);
+}
+
+sal_Bool SAL_CALL VbaFoundFilesEnum::hasElements() throw (css::uno::RuntimeException)
+{
+ return ( getCount() != 0 );
+}
+
+sal_Bool SAL_CALL VbaFoundFilesEnum::hasMoreElements() throw (css::uno::RuntimeException)
+{
+ if ( getCount() > m_nIndex )
+ {
+ return sal_True;
+ }
+ return sal_False;
+}
+
+css::uno::Any SAL_CALL VbaFoundFilesEnum::nextElement() throw (css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException)
+{
+ if ( !hasMoreElements() )
+ {
+ throw css::container::NoSuchElementException();
+ }
+
+ return css::uno::makeAny( m_sFileList[m_nIndex++] );
+}
+
+////////////////////////////////VbaFoundFiles//////////////////////////////////////////
+VbaFoundFiles::VbaFoundFiles( const css::uno::Reference< ov::XHelperInterface >& xParent,
+ const css::uno::Reference< css::uno::XComponentContext >& xContext,
+ const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess
+ ) : VbaFoundFilesImpl_BASE( xParent, xContext, xIndexAccess )
+{
+
+}
+
+VbaFoundFiles::~VbaFoundFiles()
+{
+
+}
+
+css::uno::Reference< css::container::XEnumeration > VbaFoundFiles::createEnumeration() throw (css::uno::RuntimeException)
+{
+ css::uno::Reference< css::container::XEnumeration > xEnumRet( m_xIndexAccess, css::uno::UNO_QUERY );
+ return xEnumRet;
+}
+
+css::uno::Any VbaFoundFiles::createCollectionObject( const css::uno::Any& aSource )
+{
+ return aSource;
+}
+
+css::uno::Type VbaFoundFiles::getElementType() throw (css::uno::RuntimeException)
+{
+ return ov::XFoundFiles::static_type(0);
+}
+
+rtl::OUString& VbaFoundFiles::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("VbaFoundFiles") );
+ return sImplName;
+}
+
+css::uno::Sequence< rtl::OUString > VbaFoundFiles::getServiceNames()
+{
+ static css::uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.FoundFiles") );
+ }
+ return aServiceNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbafoundfiles.hxx b/sc/source/ui/vba/vbafoundfiles.hxx
new file mode 100644
index 000000000000..7a0a1e7b2a19
--- /dev/null
+++ b/sc/source/ui/vba/vbafoundfiles.hxx
@@ -0,0 +1,91 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright IBM Corporation 2009, 2010.
+ * 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 SC_VBA_FOUNDFILES_HXX
+#define SC_VBA_FOUNDFILES_HXX
+
+#include <cppuhelper/implbase2.hxx>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <ooo/vba/XFoundFiles.hpp>
+#include <vbahelper/vbacollectionimpl.hxx>
+
+namespace css = ::com::sun::star;
+
+typedef CollTestImplHelper< ooo::vba::XFoundFiles > VbaFoundFilesImpl_BASE;
+
+class VbaFoundFilesEnum : public cppu::WeakImplHelper2< css::container::XIndexAccess, css::container::XEnumeration >
+{
+private:
+ sal_Int32 m_nIndex;
+ css::uno::Sequence< rtl::OUString > m_sFileList;
+
+public:
+ VbaFoundFilesEnum();
+ VbaFoundFilesEnum( css::uno::Sequence< rtl::OUString >& sFileList );
+ ~VbaFoundFilesEnum();
+
+ void SetFileList( css::uno::Sequence< rtl::OUString >& sFileList );
+
+ // XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+
+ // XElementAccess
+ virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements() throw (css::uno::RuntimeException);
+
+ // XEnumeration
+ virtual sal_Bool SAL_CALL hasMoreElements() throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL nextElement() throw (css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+};
+
+class VbaFoundFiles : public VbaFoundFilesImpl_BASE
+{
+private:
+
+public:
+ VbaFoundFiles( const css::uno::Reference< ov::XHelperInterface >& xParent,
+ const css::uno::Reference< css::uno::XComponentContext >& xContext,
+ const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess );
+ virtual ~VbaFoundFiles();
+
+ virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
+
+ // XEnumerationAccess
+ virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence< rtl::OUString > getServiceNames();
+};
+
+#endif /* SC_VBA_FOUNDFILES_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaglobals.cxx b/sc/source/ui/vba/vbaglobals.cxx
index c70a7f83726d..e37a2bb933c0 100644
--- a/sc/source/ui/vba/vbaglobals.cxx
+++ b/sc/source/ui/vba/vbaglobals.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,12 +28,13 @@
#include <vbahelper/helperdecl.hxx>
#include "vbaglobals.hxx"
+#include <sal/macros.h>
+
#include <comphelper/unwrapargs.hxx>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <cppuhelper/component_context.hxx>
-
#include "vbaapplication.hxx"
#include "vbaworksheet.hxx"
#include "vbarange.hxx"
@@ -247,6 +249,12 @@ ScVbaGlobals::getDebug() throw (uno::RuntimeException)
return uno::Any();
}
+uno::Any SAL_CALL
+ScVbaGlobals::MenuBars( const uno::Any& aIndex ) throw (uno::RuntimeException)
+{
+ return uno::Any( getApplication()->MenuBars(aIndex) );
+}
+
uno::Sequence< ::rtl::OUString > SAL_CALL
ScVbaGlobals::getAvailableServiceNames( ) throw (uno::RuntimeException)
{
@@ -263,7 +271,7 @@ ScVbaGlobals::getAvailableServiceNames( ) throw (uno::RuntimeException)
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "ooo.vba.excel.Hyperlink" ) ),
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.script.vba.VBASpreadsheetEventProcessor" ) )
};
- sal_Int32 nExcelServices = ( sizeof( names )/ sizeof( names[0] ) );
+ sal_Int32 nExcelServices = ( SAL_N_ELEMENTS(names) );
sal_Int32 startIndex = serviceNames.getLength();
serviceNames.realloc( serviceNames.getLength() + nExcelServices );
for ( sal_Int32 index = 0; index < nExcelServices; ++index )
@@ -302,3 +310,4 @@ extern sdecl::ServiceDecl const serviceDecl(
"ooo.vba.excel.Globals" );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaglobals.hxx b/sc/source/ui/vba/vbaglobals.hxx
index f22e5b19faa4..a320ebdf94f6 100644
--- a/sc/source/ui/vba/vbaglobals.hxx
+++ b/sc/source/ui/vba/vbaglobals.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -84,6 +85,7 @@ typedef ::cppu::ImplInheritanceHelper1< VbaGlobalsBase, ov::excel::XGlobals > Sc
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Union( const css::uno::Reference< ov::excel::XRange >& Arg1, const css::uno::Reference< ov::excel::XRange >& Arg2, const css::uno::Any& Arg3, const css::uno::Any& Arg4, const css::uno::Any& Arg5, const css::uno::Any& Arg6, const css::uno::Any& Arg7, const css::uno::Any& Arg8, const css::uno::Any& Arg9, const css::uno::Any& Arg10, const css::uno::Any& Arg11, const css::uno::Any& Arg12, const css::uno::Any& Arg13, const css::uno::Any& Arg14, const css::uno::Any& Arg15, const css::uno::Any& Arg16, const css::uno::Any& Arg17, const css::uno::Any& Arg18, const css::uno::Any& Arg19, const css::uno::Any& Arg20, const css::uno::Any& Arg21, const css::uno::Any& Arg22, const css::uno::Any& Arg23, const css::uno::Any& Arg24, const css::uno::Any& Arg25, const css::uno::Any& Arg26, const css::uno::Any& Arg27, const css::uno::Any& Arg28, const css::uno::Any& Arg29, const css::uno::Any& Arg30 ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
virtual css::uno::Reference< ov::excel::XApplication > SAL_CALL getExcel() throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL getDebug() throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL MenuBars( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
// XMultiServiceFactory
@@ -93,3 +95,5 @@ typedef ::cppu::ImplInheritanceHelper1< VbaGlobalsBase, ov::excel::XGlobals > Sc
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
};
#endif //
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbahelper.cxx b/sc/source/ui/vba/vbahelper.cxx
index cc76b1e60125..62d71a08f4fc 100644
--- a/sc/source/ui/vba/vbahelper.cxx
+++ b/sc/source/ui/vba/vbahelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -756,3 +757,5 @@ ScVbaCellRangeAccess::GetDataSet( ScCellRangeObj* pRangeObj )
} // vba
} // ooo
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbahyperlink.cxx b/sc/source/ui/vba/vbahyperlink.cxx
index e37df1e118b4..2f3c5703203f 100644
--- a/sc/source/ui/vba/vbahyperlink.cxx
+++ b/sc/source/ui/vba/vbahyperlink.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -244,3 +245,5 @@ extern sdecl::ServiceDecl const serviceDecl(
}
// ============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbahyperlink.hxx b/sc/source/ui/vba/vbahyperlink.hxx
index e1520b59c15a..36df21cf324c 100644
--- a/sc/source/ui/vba/vbahyperlink.hxx
+++ b/sc/source/ui/vba/vbahyperlink.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -86,3 +87,4 @@ private:
#endif /* SC_VBA_HYPERLINK_HXX */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbahyperlinks.cxx b/sc/source/ui/vba/vbahyperlinks.cxx
index 89a8109e6aa2..083607ff345d 100644
--- a/sc/source/ui/vba/vbahyperlinks.cxx
+++ b/sc/source/ui/vba/vbahyperlinks.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -291,3 +292,5 @@ uno::Any ScVbaHyperlinks::createCollectionObject( const uno::Any& rSource )
VBAHELPER_IMPL_XHELPERINTERFACE( ScVbaHyperlinks, "ooo.vba.excel.Hyperlinks" )
// ============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbahyperlinks.hxx b/sc/source/ui/vba/vbahyperlinks.hxx
index ca7d990ad6a8..161b236e26fe 100644
--- a/sc/source/ui/vba/vbahyperlinks.hxx
+++ b/sc/source/ui/vba/vbahyperlinks.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -148,3 +149,5 @@ private:
// ============================================================================
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbainterior.cxx b/sc/source/ui/vba/vbainterior.cxx
index face47767bdc..733f394fabd4 100644
--- a/sc/source/ui/vba/vbainterior.cxx
+++ b/sc/source/ui/vba/vbainterior.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -415,3 +416,4 @@ ScVbaInterior::getServiceNames()
return aServiceNames;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbainterior.hxx b/sc/source/ui/vba/vbainterior.hxx
index 027d06040af9..72b0f3748ffe 100644
--- a/sc/source/ui/vba/vbainterior.hxx
+++ b/sc/source/ui/vba/vbainterior.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -86,3 +87,4 @@ public:
};
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbamenu.cxx b/sc/source/ui/vba/vbamenu.cxx
new file mode 100644
index 000000000000..ae6d4e4b1223
--- /dev/null
+++ b/sc/source/ui/vba/vbamenu.cxx
@@ -0,0 +1,87 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Novell Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Pei Feng Lin <pflin@novell.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+#include "vbamenu.hxx"
+#include "vbamenuitems.hxx"
+
+using namespace com::sun::star;
+using namespace ooo::vba;
+
+ScVbaMenu::ScVbaMenu( const uno::Reference< ov::XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext, const uno::Reference< XCommandBarControl >& xCommandBarControl ) throw( uno::RuntimeException ) : Menu_BASE( xParent, xContext ), m_xCommandBarControl( xCommandBarControl )
+{
+}
+
+::rtl::OUString SAL_CALL
+ScVbaMenu::getCaption() throw ( uno::RuntimeException )
+{
+ return m_xCommandBarControl->getCaption();
+}
+
+void SAL_CALL
+ScVbaMenu::setCaption( const ::rtl::OUString& _caption ) throw (uno::RuntimeException)
+{
+ m_xCommandBarControl->setCaption( _caption );
+}
+
+void SAL_CALL
+ScVbaMenu::Delete( ) throw (script::BasicErrorException, uno::RuntimeException)
+{
+ m_xCommandBarControl->Delete();
+}
+
+uno::Any SAL_CALL
+ScVbaMenu::MenuItems( const uno::Any& aIndex ) throw (script::BasicErrorException, uno::RuntimeException)
+{
+ uno::Reference< XCommandBarControls > xCommandBarControls( m_xCommandBarControl->Controls( uno::Any() ), uno::UNO_QUERY_THROW );
+ uno::Reference< excel::XMenuItems > xMenuItems( new ScVbaMenuItems( this, mxContext, xCommandBarControls ) );
+ if( aIndex.hasValue() )
+ {
+ return xMenuItems->Item( aIndex, uno::Any() );
+ }
+ return uno::makeAny( xMenuItems );
+}
+
+rtl::OUString&
+ScVbaMenu::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaMenu") );
+ return sImplName;
+}
+uno::Sequence<rtl::OUString>
+ScVbaMenu::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Menu" ) );
+ }
+ return aServiceNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbamenu.hxx b/sc/source/ui/vba/vbamenu.hxx
new file mode 100644
index 000000000000..3141b5718447
--- /dev/null
+++ b/sc/source/ui/vba/vbamenu.hxx
@@ -0,0 +1,57 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Novell Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Pei Feng Lin <pflin@novell.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#ifndef SC_VBA_MENU_HXX
+#define SC_VBA_MENU_HXX
+
+#include <ooo/vba/excel/XMenu.hpp>
+#include <ooo/vba/XCommandBarControl.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+
+typedef InheritedHelperInterfaceImpl1< ov::excel::XMenu > Menu_BASE;
+
+class ScVbaMenu : public Menu_BASE
+{
+private:
+ css::uno::Reference< ov::XCommandBarControl > m_xCommandBarControl;
+
+public:
+ ScVbaMenu( const css::uno::Reference< ov::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext > xContext, const css::uno::Reference< ov::XCommandBarControl >& xCommandBarControl ) throw( css::uno::RuntimeException );
+
+ virtual ::rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setCaption( const ::rtl::OUString& _caption ) throw (css::uno::RuntimeException);
+
+ virtual void SAL_CALL Delete( ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL MenuItems( const css::uno::Any& aIndex ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif//SC_VBA_MENU_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbamenubar.cxx b/sc/source/ui/vba/vbamenubar.cxx
new file mode 100644
index 000000000000..1ad19a6a3b51
--- /dev/null
+++ b/sc/source/ui/vba/vbamenubar.cxx
@@ -0,0 +1,69 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Novell Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Pei Feng Lin <pflin@novell.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#include "vbamenubar.hxx"
+#include "vbamenus.hxx"
+#include <ooo/vba/XCommandBarControls.hpp>
+
+using namespace com::sun::star;
+using namespace ooo::vba;
+
+ScVbaMenuBar::ScVbaMenuBar( const uno::Reference< ov::XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext, const uno::Reference< XCommandBar >& xCommandBar ) throw( uno::RuntimeException ) : MenuBar_BASE( xParent, xContext ), m_xCommandBar( xCommandBar )
+{
+}
+
+uno::Any SAL_CALL
+ScVbaMenuBar::Menus( const uno::Any& aIndex ) throw (script::BasicErrorException, uno::RuntimeException)
+{
+ uno::Reference< XCommandBarControls > xCommandBarControls( m_xCommandBar->Controls( uno::Any() ), uno::UNO_QUERY_THROW );
+ uno::Reference< excel::XMenus > xMenus( new ScVbaMenus( this, mxContext, xCommandBarControls ) );
+ if( aIndex.hasValue() )
+ {
+ return xMenus->Item( aIndex, uno::Any() );
+ }
+ return uno::makeAny( xMenus );
+}
+
+rtl::OUString&
+ScVbaMenuBar::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaMenuBar") );
+ return sImplName;
+}
+uno::Sequence<rtl::OUString>
+ScVbaMenuBar::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.MenuBar" ) );
+ }
+ return aServiceNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbamenubar.hxx b/sc/source/ui/vba/vbamenubar.hxx
new file mode 100644
index 000000000000..15253d4e73cb
--- /dev/null
+++ b/sc/source/ui/vba/vbamenubar.hxx
@@ -0,0 +1,53 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Novell Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Pei Feng Lin <pflin@novell.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#ifndef SC_VBA_MENUBAR_HXX
+#define SC_VBA_MENUBAR_HXX
+
+#include <ooo/vba/excel/XMenuBar.hpp>
+#include <ooo/vba/XCommandBar.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+
+typedef InheritedHelperInterfaceImpl1< ov::excel::XMenuBar > MenuBar_BASE;
+
+class ScVbaMenuBar : public MenuBar_BASE
+{
+private:
+ css::uno::Reference< ov::XCommandBar > m_xCommandBar;
+
+public:
+ ScVbaMenuBar( const css::uno::Reference< ov::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext > xContext, const css::uno::Reference< ov::XCommandBar >& xCommandBar ) throw( css::uno::RuntimeException );
+
+ virtual css::uno::Any SAL_CALL Menus( const css::uno::Any& aIndex ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif//SC_VBA_MENUBAR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbamenubars.cxx b/sc/source/ui/vba/vbamenubars.cxx
new file mode 100644
index 000000000000..4dfaefcddda4
--- /dev/null
+++ b/sc/source/ui/vba/vbamenubars.cxx
@@ -0,0 +1,140 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Novell Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Pei Feng Lin <pflin@novell.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#include "vbamenubars.hxx"
+#include "vbamenubar.hxx"
+#include <ooo/vba/excel/XlSheetType.hpp>
+
+using namespace com::sun::star;
+using namespace ooo::vba;
+
+
+typedef ::cppu::WeakImplHelper1< container::XEnumeration > MenuBarEnumeration_BASE;
+
+class MenuBarEnumeration : public MenuBarEnumeration_BASE
+{
+ uno::Reference< XHelperInterface > m_xParent;
+ uno::Reference< uno::XComponentContext > m_xContext;
+ uno::Reference< container::XEnumeration > m_xEnumeration;
+public:
+ MenuBarEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration) throw ( uno::RuntimeException ) : m_xParent( xParent ), m_xContext( xContext ), m_xEnumeration( xEnumeration )
+ {
+ }
+ virtual sal_Bool SAL_CALL hasMoreElements() throw ( uno::RuntimeException )
+ {
+ return m_xEnumeration->hasMoreElements();
+ }
+ virtual uno::Any SAL_CALL nextElement() throw ( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException )
+ {
+ // FIXME: should be add menubar
+ if( hasMoreElements() )
+ {
+ uno::Reference< XCommandBar > xCommandBar( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW );
+ uno::Reference< excel::XMenuBar > xMenuBar( new ScVbaMenuBar( m_xParent, m_xContext, xCommandBar ) );
+ return uno::makeAny( xMenuBar );
+ }
+ else
+ throw container::NoSuchElementException();
+ return uno::Any();
+ }
+};
+
+ScVbaMenuBars::ScVbaMenuBars( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< XCommandBars >& xCommandBars ) throw ( uno::RuntimeException ) : MenuBars_BASE( xParent, xContext, uno::Reference< container::XIndexAccess>() ), m_xCommandBars( xCommandBars )
+{
+}
+
+ScVbaMenuBars::~ScVbaMenuBars()
+{
+}
+
+// XEnumerationAccess
+uno::Type SAL_CALL
+ScVbaMenuBars::getElementType() throw ( uno::RuntimeException )
+{
+ return excel::XMenuBar::static_type( 0 );
+}
+
+uno::Reference< container::XEnumeration >
+ScVbaMenuBars::createEnumeration() throw ( uno::RuntimeException )
+{
+ uno::Reference< container::XEnumerationAccess > xEnumAccess( m_xCommandBars, uno::UNO_QUERY_THROW );
+ return uno::Reference< container::XEnumeration >( new MenuBarEnumeration( this, mxContext, xEnumAccess->createEnumeration() ) );
+}
+
+uno::Any
+ScVbaMenuBars::createCollectionObject( const uno::Any& aSource )
+{
+ // make no sense
+ return aSource;
+}
+
+sal_Int32 SAL_CALL
+ScVbaMenuBars::getCount() throw(css::uno::RuntimeException)
+{
+ return m_xCommandBars->getCount();
+}
+
+// ScVbaCollectionBaseImpl
+uno::Any SAL_CALL
+ScVbaMenuBars::Item( const uno::Any& aIndex, const uno::Any& /*aIndex2*/ ) throw( uno::RuntimeException )
+{
+ sal_Int16 nIndex = 0;
+ aIndex >>= nIndex;
+ if( nIndex == excel::XlSheetType::xlWorksheet )
+ {
+ uno::Any aSource;
+ aSource <<= rtl::OUString::createFromAscii( "Worksheet Menu Bar" );
+ uno::Reference< XCommandBar > xCommandBar( m_xCommandBars->Item( aSource, uno::Any() ), uno::UNO_QUERY_THROW );
+ uno::Reference< excel::XMenuBar > xMenuBar( new ScVbaMenuBar( this, mxContext, xCommandBar ) );
+ return uno::makeAny( xMenuBar );
+ }
+
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
+
+ return uno::Any();
+}
+
+// XHelperInterface
+rtl::OUString&
+ScVbaMenuBars::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaMenuBars") );
+ return sImplName;
+}
+uno::Sequence<rtl::OUString>
+ScVbaMenuBars::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.MenuBars" ) );
+ }
+ return aServiceNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbamenubars.hxx b/sc/source/ui/vba/vbamenubars.hxx
new file mode 100644
index 000000000000..2579eb74f8aa
--- /dev/null
+++ b/sc/source/ui/vba/vbamenubars.hxx
@@ -0,0 +1,64 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Novell Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Pei Feng Lin <pflin@novell.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#ifndef SC_VBA_MENUBARS_HXX
+#define SC_VBA_MENUBARS_HXX
+
+#include <ooo/vba/excel/XMenuBars.hpp>
+#include <ooo/vba/excel/XMenuBar.hpp>
+#include <ooo/vba/XCommandBars.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <cppuhelper/implbase1.hxx>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <vbahelper/vbacollectionimpl.hxx>
+
+typedef CollTestImplHelper< ov::excel::XMenuBars > MenuBars_BASE;
+
+class ScVbaMenuBars : public MenuBars_BASE
+{
+private:
+ css::uno::Reference< ov::XCommandBars > m_xCommandBars;
+
+public:
+ ScVbaMenuBars( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< ov::XCommandBars >& xCommandBars ) throw (css::uno::RuntimeException);
+ virtual ~ScVbaMenuBars();
+
+ // XEnumerationAccess
+ virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+ virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
+
+ virtual sal_Int32 SAL_CALL getCount() throw(css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Item( const css::uno::Any& aIndex, const css::uno::Any& /*aIndex2*/ ) throw( css::uno::RuntimeException);
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+#endif//SC_VBA_MENUBARS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbamenuitem.cxx b/sc/source/ui/vba/vbamenuitem.cxx
new file mode 100644
index 000000000000..8843544f31f0
--- /dev/null
+++ b/sc/source/ui/vba/vbamenuitem.cxx
@@ -0,0 +1,85 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Novell Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Pei Feng Lin <pflin@novell.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#include "vbamenuitem.hxx"
+
+using namespace com::sun::star;
+using namespace ooo::vba;
+
+ScVbaMenuItem::ScVbaMenuItem( const uno::Reference< ov::XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext, const uno::Reference< XCommandBarControl >& xCommandBarControl ) throw( uno::RuntimeException ) : MenuItem_BASE( xParent, xContext ), m_xCommandBarControl( xCommandBarControl )
+{
+}
+
+::rtl::OUString SAL_CALL
+ScVbaMenuItem::getCaption() throw ( uno::RuntimeException )
+{
+ return m_xCommandBarControl->getCaption();
+}
+
+void SAL_CALL
+ScVbaMenuItem::setCaption( const ::rtl::OUString& _caption ) throw (uno::RuntimeException)
+{
+ m_xCommandBarControl->setCaption( _caption );
+}
+
+::rtl::OUString SAL_CALL
+ScVbaMenuItem::getOnAction() throw ( uno::RuntimeException )
+{
+ return m_xCommandBarControl->getOnAction();
+}
+
+void SAL_CALL
+ScVbaMenuItem::setOnAction( const ::rtl::OUString& _onaction ) throw (uno::RuntimeException)
+{
+ m_xCommandBarControl->setOnAction( _onaction );
+}
+
+void SAL_CALL
+ScVbaMenuItem::Delete( ) throw (script::BasicErrorException, uno::RuntimeException)
+{
+ m_xCommandBarControl->Delete();
+}
+
+rtl::OUString&
+ScVbaMenuItem::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaMenuItem") );
+ return sImplName;
+}
+uno::Sequence<rtl::OUString>
+ScVbaMenuItem::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.MenuItem" ) );
+ }
+ return aServiceNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbamenuitem.hxx b/sc/source/ui/vba/vbamenuitem.hxx
new file mode 100644
index 000000000000..5c22b3409a28
--- /dev/null
+++ b/sc/source/ui/vba/vbamenuitem.hxx
@@ -0,0 +1,58 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Novell Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Pei Feng Lin <pflin@novell.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#ifndef SC_VBA_MENUITEM_HXX
+#define SC_VBA_MENUITEM_HXX
+
+#include <ooo/vba/excel/XMenuItem.hpp>
+#include <ooo/vba/XCommandBarControl.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+
+typedef InheritedHelperInterfaceImpl1< ov::excel::XMenuItem > MenuItem_BASE;
+
+class ScVbaMenuItem : public MenuItem_BASE
+{
+private:
+ css::uno::Reference< ov::XCommandBarControl > m_xCommandBarControl;
+
+public:
+ ScVbaMenuItem( const css::uno::Reference< ov::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext > xContext, const css::uno::Reference< ov::XCommandBarControl >& xCommandBarControl ) throw( css::uno::RuntimeException );
+
+ virtual ::rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setCaption( const ::rtl::OUString& _caption ) throw (css::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getOnAction() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setOnAction( const ::rtl::OUString& _onaction ) throw (css::uno::RuntimeException);
+
+ virtual void SAL_CALL Delete( ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+#endif//SC_VBA_MENUITEM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbamenuitems.cxx b/sc/source/ui/vba/vbamenuitems.cxx
new file mode 100644
index 000000000000..5722830fce0a
--- /dev/null
+++ b/sc/source/ui/vba/vbamenuitems.cxx
@@ -0,0 +1,153 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Novell Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Pei Feng Lin <pflin@novell.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#include "vbamenuitems.hxx"
+#include "vbamenuitem.hxx"
+#include "vbamenu.hxx"
+#include <ooo/vba/office/MsoControlType.hpp>
+
+using namespace com::sun::star;
+using namespace ooo::vba;
+
+
+typedef ::cppu::WeakImplHelper1< container::XEnumeration > MenuEnumeration_BASE;
+
+class MenuEnumeration : public MenuEnumeration_BASE
+{
+ uno::Reference< XHelperInterface > m_xParent;
+ uno::Reference< uno::XComponentContext > m_xContext;
+ uno::Reference< container::XEnumeration > m_xEnumeration;
+public:
+ MenuEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration) throw ( uno::RuntimeException ) : m_xParent( xParent ), m_xContext( xContext ), m_xEnumeration( xEnumeration )
+ {
+ }
+ virtual sal_Bool SAL_CALL hasMoreElements() throw ( uno::RuntimeException )
+ {
+ return m_xEnumeration->hasMoreElements();
+ }
+ virtual uno::Any SAL_CALL nextElement() throw ( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException )
+ {
+ // FIXME: should be add menu
+ if( hasMoreElements() )
+ {
+ uno::Reference< XCommandBarControl > xCommandBarControl( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW );
+ if( xCommandBarControl->getType() == office::MsoControlType::msoControlPopup )
+ {
+ uno::Reference< excel::XMenu > xMenu( new ScVbaMenu( m_xParent, m_xContext, xCommandBarControl ) );
+ return uno::makeAny( xMenu );
+ }
+ else if( xCommandBarControl->getType() == office::MsoControlType::msoControlButton )
+ {
+ uno::Reference< excel::XMenuItem > xMenuItem( new ScVbaMenuItem( m_xParent, m_xContext, xCommandBarControl ) );
+ return uno::makeAny( xMenuItem );
+ }
+ nextElement();
+ }
+ else
+ throw container::NoSuchElementException();
+ return uno::Any();
+ }
+};
+
+ScVbaMenuItems::ScVbaMenuItems( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< XCommandBarControls >& xCommandBarControls ) throw ( uno::RuntimeException ) : MenuItems_BASE( xParent, xContext, uno::Reference< container::XIndexAccess>() ), m_xCommandBarControls( xCommandBarControls )
+{
+}
+
+// XEnumerationAccess
+uno::Type SAL_CALL
+ScVbaMenuItems::getElementType() throw ( uno::RuntimeException )
+{
+ return excel::XMenuItem::static_type( 0 );
+}
+
+uno::Reference< container::XEnumeration >
+ScVbaMenuItems::createEnumeration() throw ( uno::RuntimeException )
+{
+ uno::Reference< container::XEnumerationAccess > xEnumAccess( m_xCommandBarControls, uno::UNO_QUERY_THROW );
+ return uno::Reference< container::XEnumeration >( new MenuEnumeration( this, mxContext, xEnumAccess->createEnumeration() ) );
+}
+
+uno::Any
+ScVbaMenuItems::createCollectionObject( const uno::Any& aSource )
+{
+ // make no sense
+ return aSource;
+}
+
+sal_Int32 SAL_CALL
+ScVbaMenuItems::getCount() throw(css::uno::RuntimeException)
+{
+ // FIXME: should check if it is a popup menu
+ return m_xCommandBarControls->getCount();
+}
+
+// ScVbaCollectionBaseImpl
+uno::Any SAL_CALL
+ScVbaMenuItems::Item( const uno::Any& aIndex, const uno::Any& /*aIndex2*/ ) throw( uno::RuntimeException )
+{
+ uno::Reference< XCommandBarControl > xCommandBarControl( m_xCommandBarControls->Item( aIndex, uno::Any() ), uno::UNO_QUERY_THROW );
+ if( xCommandBarControl->getType() == office::MsoControlType::msoControlPopup )
+ return uno::makeAny( uno::Reference< excel::XMenu > ( new ScVbaMenu( this, mxContext, xCommandBarControl ) ) );
+ else if( xCommandBarControl->getType() == office::MsoControlType::msoControlButton )
+ return uno::makeAny( uno::Reference< excel::XMenuItem > ( new ScVbaMenuItem( this, mxContext, xCommandBarControl ) ) );
+ throw uno::RuntimeException();
+}
+
+uno::Reference< excel::XMenuItem > SAL_CALL ScVbaMenuItems::Add( const rtl::OUString& Caption, const css::uno::Any& OnAction, const css::uno::Any& /*ShortcutKey*/, const css::uno::Any& Before, const css::uno::Any& Restore, const css::uno::Any& /*StatusBar*/, const css::uno::Any& /*HelpFile*/, const css::uno::Any& /*HelpContextID*/ ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
+{
+ sal_Int32 nType = office::MsoControlType::msoControlButton;
+ uno::Reference< XCommandBarControl > xCommandBarControl = m_xCommandBarControls->Add( uno::makeAny( nType ), uno::Any(), uno::Any(), Before, Restore );
+ xCommandBarControl->setCaption( Caption );
+ if( OnAction.hasValue() )
+ {
+ rtl::OUString sAction;
+ OnAction >>= sAction;
+ xCommandBarControl->setOnAction( sAction );
+ }
+ return uno::Reference< excel::XMenuItem >( new ScVbaMenuItem( this, mxContext, xCommandBarControl ) );
+}
+
+// XHelperInterface
+rtl::OUString&
+ScVbaMenuItems::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaMenuItems") );
+ return sImplName;
+}
+uno::Sequence<rtl::OUString>
+ScVbaMenuItems::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.MenuItems" ) );
+ }
+ return aServiceNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbamenuitems.hxx b/sc/source/ui/vba/vbamenuitems.hxx
new file mode 100644
index 000000000000..8a8dd6021b2d
--- /dev/null
+++ b/sc/source/ui/vba/vbamenuitems.hxx
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Novell Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Pei Feng Lin <pflin@novell.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#ifndef SC_VBA_MENUITEMS_HXX
+#define SC_VBA_MENUITEMS_HXX
+
+#include <ooo/vba/excel/XMenuItems.hpp>
+#include <ooo/vba/excel/XMenuItem.hpp>
+#include <ooo/vba/XCommandBarControls.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <vbahelper/vbacollectionimpl.hxx>
+
+typedef CollTestImplHelper< ov::excel::XMenuItems > MenuItems_BASE;
+
+class ScVbaMenuItems : public MenuItems_BASE
+{
+private:
+ css::uno::Reference< ov::XCommandBarControls > m_xCommandBarControls;
+
+public:
+ ScVbaMenuItems( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< ov::XCommandBarControls >& xCommandBarControls ) throw( css::uno::RuntimeException );
+
+ // XEnumerationAccess
+ virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+ virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
+
+ // Methods
+ virtual sal_Int32 SAL_CALL getCount() throw(css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index, const css::uno::Any& /*Index2*/ ) throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ov::excel::XMenuItem > SAL_CALL Add( const rtl::OUString& Caption, const css::uno::Any& OnAction, const css::uno::Any& ShortcutKey, const css::uno::Any& Before, const css::uno::Any& Restore, const css::uno::Any& StatusBar, const css::uno::Any& HelpFile, const css::uno::Any& HelpContextID ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+#endif//SC_VBA_MENUITEMS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbamenus.cxx b/sc/source/ui/vba/vbamenus.cxx
new file mode 100644
index 000000000000..e604d7b59242
--- /dev/null
+++ b/sc/source/ui/vba/vbamenus.cxx
@@ -0,0 +1,139 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Novell Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Pei Feng Lin <pflin@novell.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#include "vbamenus.hxx"
+#include "vbamenu.hxx"
+#include <ooo/vba/office/MsoControlType.hpp>
+
+using namespace com::sun::star;
+using namespace ooo::vba;
+
+
+typedef ::cppu::WeakImplHelper1< container::XEnumeration > MenuEnumeration_BASE;
+
+class MenuEnumeration : public MenuEnumeration_BASE
+{
+ uno::Reference< XHelperInterface > m_xParent;
+ uno::Reference< uno::XComponentContext > m_xContext;
+ uno::Reference< container::XEnumeration > m_xEnumeration;
+public:
+ MenuEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration) throw ( uno::RuntimeException ) : m_xParent( xParent ), m_xContext( xContext ), m_xEnumeration( xEnumeration )
+ {
+ }
+ virtual sal_Bool SAL_CALL hasMoreElements() throw ( uno::RuntimeException )
+ {
+ return m_xEnumeration->hasMoreElements();
+ }
+ virtual uno::Any SAL_CALL nextElement() throw ( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException )
+ {
+ // FIXME: should be add menu
+ if( hasMoreElements() )
+ {
+ uno::Reference< XCommandBarControl > xCommandBarControl( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW );
+ if( xCommandBarControl->getType() == office::MsoControlType::msoControlPopup )
+ {
+ uno::Reference< excel::XMenu > xMenu( new ScVbaMenu( m_xParent, m_xContext, xCommandBarControl ) );
+ return uno::makeAny( xMenu );
+ }
+ nextElement();
+ }
+ else
+ throw container::NoSuchElementException();
+ return uno::Any();
+ }
+};
+
+ScVbaMenus::ScVbaMenus( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< XCommandBarControls >& xCommandBarControls ) throw ( uno::RuntimeException ) : Menus_BASE( xParent, xContext, uno::Reference< container::XIndexAccess>() ), m_xCommandBarControls( xCommandBarControls )
+{
+}
+
+// XEnumerationAccess
+uno::Type SAL_CALL
+ScVbaMenus::getElementType() throw ( uno::RuntimeException )
+{
+ return excel::XMenu::static_type( 0 );
+}
+
+uno::Reference< container::XEnumeration >
+ScVbaMenus::createEnumeration() throw ( uno::RuntimeException )
+{
+ uno::Reference< container::XEnumerationAccess > xEnumAccess( m_xCommandBarControls, uno::UNO_QUERY_THROW );
+ return uno::Reference< container::XEnumeration >( new MenuEnumeration( this, mxContext, xEnumAccess->createEnumeration() ) );
+}
+
+uno::Any
+ScVbaMenus::createCollectionObject( const uno::Any& aSource )
+{
+ // make no sense
+ return aSource;
+}
+
+sal_Int32 SAL_CALL
+ScVbaMenus::getCount() throw(css::uno::RuntimeException)
+{
+ // FIXME: should check if it is a popup menu
+ return m_xCommandBarControls->getCount();
+}
+
+// ScVbaCollectionBaseImpl
+uno::Any SAL_CALL
+ScVbaMenus::Item( const uno::Any& aIndex, const uno::Any& /*aIndex2*/ ) throw( uno::RuntimeException )
+{
+ uno::Reference< XCommandBarControl > xCommandBarControl( m_xCommandBarControls->Item( aIndex, uno::Any() ), uno::UNO_QUERY_THROW );
+ if( xCommandBarControl->getType() != office::MsoControlType::msoControlPopup )
+ throw uno::RuntimeException();
+ return uno::makeAny( uno::Reference< excel::XMenu > ( new ScVbaMenu( this, mxContext, xCommandBarControl ) ) );
+}
+
+uno::Reference< excel::XMenu > SAL_CALL ScVbaMenus::Add( const rtl::OUString& Caption, const css::uno::Any& Before, const css::uno::Any& Restore ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
+{
+ sal_Int32 nType = office::MsoControlType::msoControlPopup;
+ uno::Reference< XCommandBarControl > xCommandBarControl = m_xCommandBarControls->Add( uno::makeAny( nType ), uno::Any(), uno::Any(), Before, Restore );
+ xCommandBarControl->setCaption( Caption );
+ return uno::Reference< excel::XMenu >( new ScVbaMenu( this, mxContext, xCommandBarControl ) );
+}
+
+// XHelperInterface
+rtl::OUString&
+ScVbaMenus::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaMenus") );
+ return sImplName;
+}
+uno::Sequence<rtl::OUString>
+ScVbaMenus::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Menus" ) );
+ }
+ return aServiceNames;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbamenus.hxx b/sc/source/ui/vba/vbamenus.hxx
new file mode 100644
index 000000000000..a85e73bdb394
--- /dev/null
+++ b/sc/source/ui/vba/vbamenus.hxx
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Novell Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Pei Feng Lin <pflin@novell.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#ifndef SC_VBA_MENUS_HXX
+#define SC_VBA_MENUS_HXX
+
+#include <ooo/vba/excel/XMenus.hpp>
+#include <ooo/vba/excel/XMenu.hpp>
+#include <ooo/vba/XCommandBarControls.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <vbahelper/vbacollectionimpl.hxx>
+
+typedef CollTestImplHelper< ov::excel::XMenus > Menus_BASE;
+
+class ScVbaMenus : public Menus_BASE
+{
+private:
+ css::uno::Reference< ov::XCommandBarControls > m_xCommandBarControls;
+
+public:
+ ScVbaMenus( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< ov::XCommandBarControls >& xCommandBarControls ) throw( css::uno::RuntimeException );
+
+ // XEnumerationAccess
+ virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
+ virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
+
+ // Methods
+ virtual sal_Int32 SAL_CALL getCount() throw(css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index, const css::uno::Any& /*Index2*/ ) throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ov::excel::XMenu > SAL_CALL Add( const rtl::OUString& Caption, const css::uno::Any& Before, const css::uno::Any& Restore ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
+#endif//SC_VBA_MENUS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaname.cxx b/sc/source/ui/vba/vbaname.cxx
index 464b167df250..71d42038f89b 100644
--- a/sc/source/ui/vba/vbaname.cxx
+++ b/sc/source/ui/vba/vbaname.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -69,8 +70,8 @@ ScVbaName::getWorkSheet() throw (css::uno::RuntimeException)
ScVbaName::getName() throw (css::uno::RuntimeException)
{
String sName;
- sName += UniString( getWorkSheet()->getName());
- sName += String::CreateFromAscii("!");
+ //sName += UniString( getWorkSheet()->getName()); //liuchen 2009-9-9 resolve the defect that the name get by macro code are not the same with that in UI (for example, if a name of "AA" is found in the UI "Define Names" dialog box, the result of get that name through macro code will be "Sheet1!AA")
+ //sName += String::CreateFromAscii("!");
sName += UniString ( mxNamedRange->getName() );
return ::rtl::OUString( sName );
}
@@ -107,78 +108,41 @@ ScVbaName::setVisible( sal_Bool /*bVisible*/ ) throw (css::uno::RuntimeException
::rtl::OUString
ScVbaName::getValue() throw (css::uno::RuntimeException)
{
- ::rtl::OUString sValue = mxNamedRange->getContent();
- ::rtl::OUString sSheetName = getWorkSheet()->getName();
- ::rtl::OUString sSegmentation = ::rtl::OUString::createFromAscii( ";" );
- ::rtl::OUString sNewSegmentation = ::rtl::OUString::createFromAscii( "," );
- ::rtl::OUString sResult;
- sal_Int32 nFrom = 0;
- sal_Int32 nTo = 0;
- nTo = sValue.indexOf( sSegmentation, nFrom );
- while ( nTo != -1 )
- {
- ::rtl::OUString sTmpValue = sValue.copy( nFrom, nTo - nFrom );
- if ( sTmpValue.toChar() == '$' )
- {
- ::rtl::OUString sTmp = sTmpValue.copy( 1 );
- sTmp = sTmp.replaceAt(0, (sSheetName + ::rtl::OUString::createFromAscii(".")).getLength(), sSheetName + ::rtl::OUString::createFromAscii("!"));
- sResult += sTmp;
- sResult += sNewSegmentation;
- }
- nFrom = nTo + 1;
- nTo = sValue.indexOf( sSegmentation, nFrom );
- }
- ::rtl::OUString sTmpValue = sValue.copy( nFrom );
- if ( sTmpValue.toChar() == '$' )
+ return getValue( formula::FormulaGrammar::GRAM_NATIVE_XL_A1 );
+}
+
+::rtl::OUString
+ScVbaName::getValue(const formula::FormulaGrammar::Grammar eGrammar) throw (css::uno::RuntimeException)
+{
+ rtl::OUString sValue = mxNamedRange->getContent();
+ ScDocShell* pDocShell = excel::getDocShell( mxModel );
+ ScDocument* pDoc = pDocShell ? pDocShell->GetDocument() : NULL;
+ String aContent;
+ excel::CompileODFFormulaToExcel( pDoc, sValue, aContent, eGrammar );
+ if ( aContent.Len() > 0 )
{
- ::rtl::OUString sTmp = sTmpValue.copy(1);
- sTmp = sTmp.replaceAt(0, (sSheetName + ::rtl::OUString::createFromAscii(".")).getLength(), sSheetName + ::rtl::OUString::createFromAscii("!"));
- sResult += sTmp;
+ sValue = aContent;
}
- if (sResult.indexOf('=') != 0)
+ if ( sValue.indexOf('=') != 0 )
{
- sResult = ::rtl::OUString::createFromAscii("=") + sResult;
+ sValue = rtl::OUString::createFromAscii("=") + sValue;
}
- return sResult;
+ return sValue;
}
void
ScVbaName::setValue( const ::rtl::OUString & rValue ) throw (css::uno::RuntimeException)
{
- ::rtl::OUString sSheetName = getWorkSheet()->getName();
::rtl::OUString sValue = rValue;
- ::rtl::OUString sSegmentation = ::rtl::OUString::createFromAscii( "," );
- ::rtl::OUString sNewSegmentation = ::rtl::OUString::createFromAscii( ";" );
- ::rtl::OUString sResult;
- sal_Int32 nFrom = 0;
- sal_Int32 nTo = 0;
- if (sValue.indexOf('=') == 0)
+ ScDocShell* pDocShell = excel::getDocShell( mxModel );
+ ScDocument* pDoc = pDocShell ? pDocShell->GetDocument() : NULL;
+ String aContent;
+ excel::CompileExcelFormulaToODF( pDoc, sValue, aContent );
+ if ( aContent.Len() > 0 )
{
- ::rtl::OUString sTmp = sValue.copy(1);
- sValue = sTmp;
+ sValue = aContent;
}
- nTo = sValue.indexOf( sSegmentation, nFrom );
- while ( nTo != -1 )
- {
- ::rtl::OUString sTmpValue = sValue.copy( nFrom, nTo - nFrom );
- sTmpValue = sTmpValue.replaceAt(0, (sSheetName + ::rtl::OUString::createFromAscii("!")).getLength(), sSheetName + ::rtl::OUString::createFromAscii("."));
- if (sTmpValue.copy(0, sSheetName.getLength()).equals(sSheetName))
- {
- sTmpValue = ::rtl::OUString::createFromAscii("$") + sTmpValue;
- }
- sTmpValue += sNewSegmentation;
- sResult += sTmpValue;
- nFrom = nTo + 1;
- nTo = sValue.indexOf( sSegmentation, nFrom );
- }
- ::rtl::OUString sTmpValue = sValue.copy( nFrom );
- sTmpValue = sTmpValue.replaceAt(0, (sSheetName + ::rtl::OUString::createFromAscii("!")).getLength(), sSheetName + ::rtl::OUString::createFromAscii("."));
- if (sTmpValue.copy(0, sSheetName.getLength()).equals(sSheetName))
- {
- sTmpValue = ::rtl::OUString::createFromAscii("$") + sTmpValue;
- }
- sResult += sTmpValue;
- mxNamedRange->setContent(sResult);
+ mxNamedRange->setContent( sValue );
}
::rtl::OUString
@@ -208,7 +172,7 @@ ScVbaName::setRefersToLocal( const ::rtl::OUString & rRefersTo ) throw (css::uno
::rtl::OUString
ScVbaName::getRefersToR1C1() throw (css::uno::RuntimeException)
{
- return getRefersTo();
+ return getValue( formula::FormulaGrammar::GRAM_NATIVE_XL_R1C1 );
}
void
@@ -220,7 +184,7 @@ ScVbaName::setRefersToR1C1( const ::rtl::OUString & rRefersTo ) throw (css::uno:
::rtl::OUString
ScVbaName::getRefersToR1C1Local() throw (css::uno::RuntimeException)
{
- return getRefersTo();
+ return getValue( formula::FormulaGrammar::GRAM_NATIVE_XL_R1C1 );
}
void
@@ -267,3 +231,4 @@ ScVbaName::getServiceNames()
return aServiceNames;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaname.hxx b/sc/source/ui/vba/vbaname.hxx
index 81b2555a4ce1..fc6d210ffa10 100644
--- a/sc/source/ui/vba/vbaname.hxx
+++ b/sc/source/ui/vba/vbaname.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,6 +34,8 @@
#include <vbahelper/vbahelperinterface.hxx>
+#include <formula/grammar.hxx>
+
class ScDocument;
typedef InheritedHelperInterfaceImpl1< ov::excel::XName > NameImpl_BASE;
@@ -48,6 +51,8 @@ class ScVbaName : public NameImpl_BASE
protected:
virtual css::uno::Reference< css::frame::XModel > getModel() { return mxModel; }
virtual css::uno::Reference< ov::excel::XWorksheet > getWorkSheet() throw (css::uno::RuntimeException);
+ // Get value by FormulaGrammar, such as FormulaGrammar::GRAM_NATIVE_XL_R1C1
+ virtual ::rtl::OUString SAL_CALL getValue(const formula::FormulaGrammar::Grammar eGrammar) throw (css::uno::RuntimeException);
public:
ScVbaName( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XNamedRange >& xName , const css::uno::Reference< css::sheet::XNamedRanges >& xNames , const css::uno::Reference< css::frame::XModel >& xModel );
@@ -82,3 +87,4 @@ public:
};
#endif /* SC_VBA_NAME_HXX */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbanames.cxx b/sc/source/ui/vba/vbanames.cxx
index 9fd22bf89f7a..bee4fbb58856 100644
--- a/sc/source/ui/vba/vbanames.cxx
+++ b/sc/source/ui/vba/vbanames.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -87,6 +88,33 @@ ScVbaNames::getScDocument()
return pViewData->GetDocument();
}
+void GetRangeOrRefersTo( const css::uno::Any& RefersTo, const uno::Reference< uno::XComponentContext >& xContext, css::uno::Reference< excel::XRange >& xRange, rtl::OUString& sRefersTo )
+{
+ if ( RefersTo.getValueTypeClass() == uno::TypeClass_STRING )
+ {
+ RefersTo >>= sRefersTo;
+ }
+ else if ( RefersTo.getValueTypeClass() == uno::TypeClass_INTERFACE )
+ {
+ RefersTo >>= xRange;
+ }
+ else if ( RefersTo.hasValue() )
+ {
+ uno::Reference< script::XTypeConverter > xConverter = getTypeConverter( xContext );
+ try
+ {
+ if ( xConverter.is() )
+ {
+ uno::Any aConverted = xConverter->convertTo( RefersTo, getCppuType((rtl::OUString*)0) );
+ aConverted >>= sRefersTo;
+ }
+ }
+ catch( uno::Exception& )
+ {
+ }
+ }
+}
+
css::uno::Any
ScVbaNames::Add( const css::uno::Any& Name ,
const css::uno::Any& RefersTo,
@@ -100,8 +128,9 @@ ScVbaNames::Add( const css::uno::Any& Name ,
const css::uno::Any& RefersToR1C1,
const css::uno::Any& RefersToR1C1Local ) throw (css::uno::RuntimeException)
{
-
+ rtl::OUString sSheetName;
rtl::OUString sName;
+ rtl::OUString sRefersTo;
uno::Reference< excel::XRange > xRange;
if ( Name.hasValue() )
Name >>= sName;
@@ -109,6 +138,12 @@ ScVbaNames::Add( const css::uno::Any& Name ,
NameLocal >>= sName;
if ( sName.getLength() != 0 )
{
+ sal_Int32 nTokenIndex = sName.indexOf('!');
+ if ( nTokenIndex >= 0 )
+ {
+ sSheetName = sName.copy( 0, nTokenIndex );
+ sName = sName.copy( nTokenIndex + 1 );
+ }
if ( !ScRangeData::IsNameValid( sName , getScDocument() ) )
{
::rtl::OUString sResult ;
@@ -121,19 +156,22 @@ ScVbaNames::Add( const css::uno::Any& Name ,
sResult = sName.copy( nIndex );
sName = sResult ;
if ( !ScRangeData::IsNameValid( sName , getScDocument() ) )
- throw uno::RuntimeException( rtl::OUString::createFromAscii("This Name is a valid ."), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString::createFromAscii("This Name is a invalid ."), uno::Reference< uno::XInterface >() );
}
}
if ( RefersTo.hasValue() || RefersToR1C1.hasValue() || RefersToR1C1Local.hasValue() )
{
if ( RefersTo.hasValue() )
- RefersTo >>= xRange;
+ GetRangeOrRefersTo( RefersTo, mxContext, xRange, sRefersTo );
if ( RefersToR1C1.hasValue() )
- RefersToR1C1 >>= xRange;
+ GetRangeOrRefersTo( RefersToR1C1, mxContext, xRange, sRefersTo );
if ( RefersToR1C1Local.hasValue() )
- RefersToR1C1Local >>= xRange;
+ GetRangeOrRefersTo( RefersToR1C1Local, mxContext, xRange, sRefersTo );
}
+ String aContent;
+ table::CellAddress aPosition;
+ RangeType nType = RT_NAME;
if ( xRange.is() )
{
ScVbaRange* pRange = dynamic_cast< ScVbaRange* >( xRange.get() );
@@ -146,19 +184,36 @@ ScVbaNames::Add( const css::uno::Any& Name ,
ScAddress aPos( static_cast< SCCOL >( aAddr.StartColumn ) , static_cast< SCROW >( aAddr.StartRow ) , static_cast< SCTAB >(aAddr.Sheet ) );
uno::Any xAny2 ;
String sRangeAdd = xRange->Address( xAny2, xAny2 , xAny2 , xAny2, xAny2 );
- String sTmp;
- sTmp += String::CreateFromAscii("$");
- sTmp += UniString(xRange->getWorksheet()->getName());
- sTmp += String::CreateFromAscii(".");
- sTmp += sRangeAdd;
- if ( mxNames.is() )
+ aContent += String::CreateFromAscii("$");
+ aContent += UniString(xRange->getWorksheet()->getName());
+ aContent += String::CreateFromAscii(".");
+ aContent += sRangeAdd;
+ aPosition = table::CellAddress( aAddr.Sheet , aAddr.StartColumn , aAddr.StartRow );
+ }
+ else
+ {
+ ScDocShell* pDocShell = excel::getDocShell( mxModel );
+ ScDocument* pDoc = pDocShell ? pDocShell->GetDocument() : NULL;
+ excel::CompileExcelFormulaToODF( pDoc, sRefersTo, aContent );
+ if ( aContent.Len() == 0 )
+ {
+ aContent = sRefersTo;
+ }
+ }
+
+ uno::Reference< sheet::XNamedRange > xNewNamedRange;
+ if ( mxNames.is() )
+ {
+ if ( mxNames->hasByName( sName ) )
{
- RangeType nType = RT_NAME;
- table::CellAddress aCellAddr( aAddr.Sheet , aAddr.StartColumn , aAddr.StartRow );
- if ( mxNames->hasByName( sName ) )
- mxNames->removeByName(sName);
- mxNames->addNewByName( sName , rtl::OUString(sTmp) , aCellAddr , (sal_Int32)nType);
+ mxNames->removeByName( sName );
}
+ mxNames->addNewByName( sName, rtl::OUString( aContent ), aPosition, (sal_Int32) nType );
+ xNewNamedRange = uno::Reference< sheet::XNamedRange >( mxNames->getByName( sName ), uno::UNO_QUERY );
+ }
+ if ( xNewNamedRange.is() )
+ {
+ return uno::makeAny( uno::Reference< excel::XName >( new ScVbaName( mxParent, mxContext, xNewNamedRange ,mxNames , mxModel ) ) );
}
return css::uno::Any();
}
@@ -204,3 +259,4 @@ ScVbaNames::getServiceNames()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbanames.hxx b/sc/source/ui/vba/vbanames.hxx
index 1997ac6163d7..a3fddb13286d 100644
--- a/sc/source/ui/vba/vbanames.hxx
+++ b/sc/source/ui/vba/vbanames.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -80,3 +81,4 @@ public:
};
#endif /* SC_VBA_NAMES_HXX */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaoleobject.cxx b/sc/source/ui/vba/vbaoleobject.cxx
index a35ce4b3120f..ebf87bf5275d 100644
--- a/sc/source/ui/vba/vbaoleobject.cxx
+++ b/sc/source/ui/vba/vbaoleobject.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,7 +68,7 @@ ScVbaOLEObject::ScVbaOLEObject( const uno::Reference< XHelperInterface >& xParen
uno::Reference< uno::XInterface > SAL_CALL
ScVbaOLEObject::getObject() throw (uno::RuntimeException)
{
- return uno::Reference< uno::XInterface >( m_xControlShape, uno::UNO_QUERY_THROW );
+ return uno::Reference< uno::XInterface >( m_xControl, uno::UNO_QUERY_THROW );
}
sal_Bool SAL_CALL
@@ -162,3 +163,5 @@ ScVbaOLEObject::getServiceNames()
}
return aServiceNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaoleobject.hxx b/sc/source/ui/vba/vbaoleobject.hxx
index 008564d71e16..e329789cd7a4 100644
--- a/sc/source/ui/vba/vbaoleobject.hxx
+++ b/sc/source/ui/vba/vbaoleobject.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,3 +66,4 @@ public:
};
#endif //SC_VBA_OLEOBJECT_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaoleobjects.cxx b/sc/source/ui/vba/vbaoleobjects.cxx
index 69ba36cf8279..84cba7b96e92 100644
--- a/sc/source/ui/vba/vbaoleobjects.cxx
+++ b/sc/source/ui/vba/vbaoleobjects.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -183,3 +184,5 @@ ScVbaOLEObjects::getServiceNames()
}
return aServiceNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaoleobjects.hxx b/sc/source/ui/vba/vbaoleobjects.hxx
index ab4ed29d163d..c949d578422a 100644
--- a/sc/source/ui/vba/vbaoleobjects.hxx
+++ b/sc/source/ui/vba/vbaoleobjects.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,3 +56,4 @@ public:
};
#endif //SC_VBA_OLEOBJECTS_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaoutline.cxx b/sc/source/ui/vba/vbaoutline.cxx
index ee4c78c73151..b42d81052d15 100644
--- a/sc/source/ui/vba/vbaoutline.cxx
+++ b/sc/source/ui/vba/vbaoutline.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,3 +64,5 @@ ScVbaOutline::getServiceNames()
}
return aServiceNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaoutline.hxx b/sc/source/ui/vba/vbaoutline.hxx
index c954842cf7fd..4b297a0a9079 100644
--- a/sc/source/ui/vba/vbaoutline.hxx
+++ b/sc/source/ui/vba/vbaoutline.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,3 +51,5 @@ public:
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbapagebreak.cxx b/sc/source/ui/vba/vbapagebreak.cxx
index 1103c10f54c8..8c28aada76f4 100644
--- a/sc/source/ui/vba/vbapagebreak.cxx
+++ b/sc/source/ui/vba/vbapagebreak.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -170,3 +171,4 @@ ScVbaVPageBreak::getServiceNames()
return aServiceNames;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbapagebreak.hxx b/sc/source/ui/vba/vbapagebreak.hxx
index 4832464c1296..c047a8e3c06a 100644
--- a/sc/source/ui/vba/vbapagebreak.hxx
+++ b/sc/source/ui/vba/vbapagebreak.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -101,3 +102,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbapagebreaks.cxx b/sc/source/ui/vba/vbapagebreaks.cxx
index 25ccbb0f4cdc..e6c83ed618c7 100644
--- a/sc/source/ui/vba/vbapagebreaks.cxx
+++ b/sc/source/ui/vba/vbapagebreaks.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -115,10 +116,13 @@ sal_Int32 SAL_CALL RangePageBreaks::getCount( ) throw (uno::RuntimeException)
for( sal_Int32 i=0; i<nLength; i++ )
{
sal_Int32 nPos = aTablePageBreakData[i].Position;
- if( nPos > nUsedEnd )
- return nCount;
- if( nPos >= nUsedStart )
+
+ // VBA. minz@cn.ibm.com. All page breaks before the used range should be counted.
+ // And the page break at the end of the used range also should be counted.
+ if( nPos <= nUsedEnd + 1 )
nCount++;
+ else
+ return nCount;
}
return nCount;
@@ -144,26 +148,15 @@ uno::Any SAL_CALL RangePageBreaks::getByIndex( sal_Int32 Index ) throw (lang::In
sheet::TablePageBreakData RangePageBreaks::getTablePageBreakData( sal_Int32 nAPIItemIndex ) throw ( script::BasicErrorException, uno::RuntimeException)
{
- sal_Int32 index = -1;
sheet::TablePageBreakData aTablePageBreakData;
uno::Reference< excel::XWorksheet > xWorksheet( mxParent, uno::UNO_QUERY_THROW );
uno::Reference< excel::XRange > xRange = xWorksheet->getUsedRange();
- sal_Int32 nUsedStart = getAPIStartofRange( xRange );
- sal_Int32 nUsedEnd = getAPIEndIndexofRange( xRange, nUsedStart );
uno::Sequence<sheet::TablePageBreakData> aTablePageBreakDataList = getAllPageBreaks();
sal_Int32 nLength = aTablePageBreakDataList.getLength();
- for( sal_Int32 i=0; i<nLength; i++ )
- {
- aTablePageBreakData = aTablePageBreakDataList[i];
- sal_Int32 nPos = aTablePageBreakData.Position;
- if( nPos >= nUsedStart )
- index++;
- if( nPos > nUsedEnd )
- DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString());
- if( index == nAPIItemIndex )
- return aTablePageBreakData;
- }
+ //VBA. minz@cn.ibm.com. No need to filter the page break. All page breaks before the used range are counted.
+ if ( nAPIItemIndex < nLength && nAPIItemIndex>=0 )
+ aTablePageBreakData = aTablePageBreakDataList[nAPIItemIndex];
return aTablePageBreakData;
}
@@ -325,3 +318,4 @@ ScVbaVPageBreaks::getServiceNames()
return aServiceNames;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbapagebreaks.hxx b/sc/source/ui/vba/vbapagebreaks.hxx
index de6174191e95..5b8feb57c221 100644
--- a/sc/source/ui/vba/vbapagebreaks.hxx
+++ b/sc/source/ui/vba/vbapagebreaks.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -95,3 +96,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbapagesetup.cxx b/sc/source/ui/vba/vbapagesetup.cxx
index d660ddbbfd77..c80e407fb532 100644
--- a/sc/source/ui/vba/vbapagesetup.cxx
+++ b/sc/source/ui/vba/vbapagesetup.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,6 +38,10 @@
#include <ooo/vba/excel/XlPageOrientation.hpp>
#include <ooo/vba/excel/XlOrder.hpp>
#include <ooo/vba/excel/Constants.hpp>
+#include <i18npool/paper.hxx>
+#include <editeng/paperinf.hxx>
+#include <ooo/vba/excel/XlPaperSize.hpp>
+#include <sal/macros.h>
using namespace ::com::sun::star;
using namespace ::ooo::vba;
@@ -624,3 +629,106 @@ ScVbaPageSetup::getServiceNames()
}
return aServiceNames;
}
+
+//liuchen 2009-12-11
+
+struct PaperSizeMap
+{
+ Paper ePaper;
+ sal_Int32 xlPaper;
+};
+
+static PaperSizeMap paperSizeMappings[] =
+{
+ { PAPER_A3, ooo::vba::excel::XlPaperSize::xlPaperA3 },
+ { PAPER_A4, ooo::vba::excel::XlPaperSize::xlPaperA4 },
+ { PAPER_A5, ooo::vba::excel::XlPaperSize::xlPaperA5 },
+ { PAPER_B4_ISO, ooo::vba::excel::XlPaperSize::xlPaperB4 },
+ { PAPER_B5_ISO, ooo::vba::excel::XlPaperSize::xlPaperB5 },
+ { PAPER_LETTER, ooo::vba::excel::XlPaperSize::xlPaperLetter },
+ { PAPER_LEGAL, ooo::vba::excel::XlPaperSize::xlPaperLegal },
+ { PAPER_TABLOID, ooo::vba::excel::XlPaperSize::xlPaperTabloid },
+ { PAPER_USER, ooo::vba::excel::XlPaperSize::xlPaperUser },
+ { PAPER_B6_ISO, ooo::vba::excel::XlPaperSize::xlPaperEnvelopeB6 },
+ { PAPER_ENV_C4, ooo::vba::excel::XlPaperSize::xlPaperEnvelopeC4 },
+ { PAPER_ENV_C5, ooo::vba::excel::XlPaperSize::xlPaperEnvelopeC5 },
+ { PAPER_ENV_C6, ooo::vba::excel::XlPaperSize::xlPaperEnvelopeC6 },
+ { PAPER_ENV_C65, ooo::vba::excel::XlPaperSize::xlPaperEnvelopeC65 },
+ { PAPER_ENV_DL, ooo::vba::excel::XlPaperSize::xlPaperEnvelopeDL },
+ { PAPER_C, ooo::vba::excel::XlPaperSize::xlPaperCsheet },
+ { PAPER_D, ooo::vba::excel::XlPaperSize::xlPaperDsheet },
+ { PAPER_E, ooo::vba::excel::XlPaperSize::xlPaperEsheet },
+ { PAPER_ENV_MONARCH, ooo::vba::excel::XlPaperSize::xlPaperEnvelopeMonarch },
+ { PAPER_ENV_PERSONAL, ooo::vba::excel::XlPaperSize::xlPaperEnvelopePersonal },
+ { PAPER_ENV_9, ooo::vba::excel::XlPaperSize::xlPaperEnvelope9 },
+ { PAPER_ENV_10, ooo::vba::excel::XlPaperSize::xlPaperEnvelope10 },
+ { PAPER_ENV_11, ooo::vba::excel::XlPaperSize::xlPaperEnvelope11 },
+ { PAPER_ENV_12, ooo::vba::excel::XlPaperSize::xlPaperEnvelope12 }
+};
+
+static const int nMapSize = SAL_N_ELEMENTS(paperSizeMappings);
+
+sal_Int32 PaperSizeOOoToExcel(Paper ePaper)
+{
+ sal_Int32 nPaperSize = ooo::vba::excel::XlPaperSize::xlPaperUser;
+
+ for (int i = 0; i < nMapSize; i++)
+ {
+ if (ePaper == paperSizeMappings[i].ePaper)
+ {
+ nPaperSize = paperSizeMappings[i].xlPaper;
+ break;
+ }
+ }
+
+ return nPaperSize;
+}
+
+sal_Int32 SAL_CALL ScVbaPageSetup::getPaperSize() throw (css::uno::RuntimeException)
+{
+ com::sun::star::awt::Size size;
+ Paper ePaper = PAPER_USER;
+
+ try
+ {
+ uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Size")));
+ aValue >>= size;
+ ePaper = SvxPaperInfo::GetSvxPaper( Size(size.Width, size.Height), MAP_100TH_MM, TRUE);
+ }
+ catch( uno::Exception& )
+ {
+ }
+
+ return PaperSizeOOoToExcel(ePaper);
+}
+
+Paper PaperSizeExcelToOOo( sal_Int32 xlPaper)
+{
+ Paper ePaper = PAPER_USER;
+
+ for (int i = 0; i < nMapSize; i++)
+ {
+ if (xlPaper == paperSizeMappings[i].xlPaper)
+ {
+ ePaper = paperSizeMappings[i].ePaper;
+ break;
+ }
+ }
+
+ return ePaper;
+}
+void SAL_CALL ScVbaPageSetup::setPaperSize( sal_Int32 paperSize) throw (css::uno::RuntimeException)
+{
+ Paper ePaper = PaperSizeExcelToOOo( paperSize );
+
+ try
+ {
+ Size size1 = SvxPaperInfo::GetPaperSize( ePaper, MAP_100TH_MM );
+ com::sun::star::awt::Size size(size1.Width(), size1.Height());
+ mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Size")), uno::makeAny( size ));
+ }
+ catch( uno::Exception& )
+ {
+ }
+}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbapagesetup.hxx b/sc/source/ui/vba/vbapagesetup.hxx
index d2c001b225cf..57cc3dbbd153 100644
--- a/sc/source/ui/vba/vbapagesetup.hxx
+++ b/sc/source/ui/vba/vbapagesetup.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -82,9 +83,13 @@ public:
virtual void SAL_CALL setCenterHorizontally( sal_Bool centerHorizontally ) throw (css::uno::RuntimeException);
virtual sal_Bool SAL_CALL getPrintHeadings() throw (css::uno::RuntimeException);
virtual void SAL_CALL setPrintHeadings( sal_Bool printHeadings ) throw (css::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getPaperSize() throw (css::uno::RuntimeException); //liuchen 2009-12-11
+ virtual void SAL_CALL setPaperSize( sal_Int32 paperSize ) throw (css::uno::RuntimeException); //liuchen 2009-12-11
// XHelperInterface
virtual rtl::OUString& getServiceImplName();
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbapalette.cxx b/sc/source/ui/vba/vbapalette.cxx
index c6ae5c488a20..209dd2d8e564 100644
--- a/sc/source/ui/vba/vbapalette.cxx
+++ b/sc/source/ui/vba/vbapalette.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,6 +27,8 @@
************************************************************************/
#include "vbapalette.hxx"
+
+#include <sal/macros.h>
#include <cppuhelper/implbase1.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
@@ -62,7 +65,7 @@ public:
// Methods XIndexAccess
virtual ::sal_Int32 SAL_CALL getCount() throw (uno::RuntimeException)
{
- return sizeof(spnDefColorTable8) / sizeof(spnDefColorTable8[0]);
+ return SAL_N_ELEMENTS(spnDefColorTable8);
}
virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
@@ -109,3 +112,5 @@ ScVbaPalette::getPalette() const
return new DefaultPalette();
return xIndex;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbapalette.hxx b/sc/source/ui/vba/vbapalette.hxx
index b51483772674..2f5c752e3ebd 100644
--- a/sc/source/ui/vba/vbapalette.hxx
+++ b/sc/source/ui/vba/vbapalette.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,3 +53,4 @@ public:
#endif //SC_VBAPALETTE_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbapane.cxx b/sc/source/ui/vba/vbapane.cxx
index 29d7a286b402..e034ffeead41 100644
--- a/sc/source/ui/vba/vbapane.cxx
+++ b/sc/source/ui/vba/vbapane.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -204,3 +205,5 @@ ScVbaPane::LargeScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any
// XHelperInterface
VBAHELPER_IMPL_XHELPERINTERFACE( ScVbaPane, "ooo.vba.excel.Pane" )
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbapane.hxx b/sc/source/ui/vba/vbapane.hxx
index ff87a9966d80..27a9c3529545 100644
--- a/sc/source/ui/vba/vbapane.hxx
+++ b/sc/source/ui/vba/vbapane.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,3 +66,5 @@ protected:
};
#endif //SC_VBA_PANE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbapivotcache.cxx b/sc/source/ui/vba/vbapivotcache.cxx
index 322b42368b48..7b2b4c6ddf61 100644
--- a/sc/source/ui/vba/vbapivotcache.cxx
+++ b/sc/source/ui/vba/vbapivotcache.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,6 +35,17 @@ ScVbaPivotCache::ScVbaPivotCache( const uno::Reference< XHelperInterface >& xPar
{
}
+sal_Int32
+ScVbaPivotCache::getMissingItemsLimit() throw (css::uno::RuntimeException)
+{
+ return -1;
+}
+
+void
+ScVbaPivotCache::setMissingItemsLimit( sal_Int32 /*aValue*/ ) throw ( css::uno::RuntimeException)
+{
+}
+
void SAL_CALL
ScVbaPivotCache::Refresh() throw (css::uno::RuntimeException)
{
@@ -58,3 +70,4 @@ ScVbaPivotCache::getServiceNames()
return aServiceNames;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbapivotcache.hxx b/sc/source/ui/vba/vbapivotcache.hxx
index dea3e35d18bd..da8c7752bd46 100644
--- a/sc/source/ui/vba/vbapivotcache.hxx
+++ b/sc/source/ui/vba/vbapivotcache.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,6 +41,10 @@ class ScVbaPivotCache : public PivotCacheImpl_BASE
css::uno::Reference< css::sheet::XDataPilotTable > m_xTable;
public:
ScVbaPivotCache( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XDataPilotTable >& xTable );
+
+ virtual ::sal_Int32 SAL_CALL getMissingItemsLimit() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setMissingItemsLimit( ::sal_Int32 aValue ) throw ( css::uno::RuntimeException);
+
virtual void SAL_CALL Refresh() throw (css::uno::RuntimeException);
// XHelperInterface
virtual rtl::OUString& getServiceImplName();
@@ -47,3 +52,5 @@ public:
};
#endif //SC_VBA_PIVOTCACHE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbapivottable.cxx b/sc/source/ui/vba/vbapivottable.cxx
index e5d78602dcdd..cffd07eeb5e1 100644
--- a/sc/source/ui/vba/vbapivottable.cxx
+++ b/sc/source/ui/vba/vbapivottable.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -61,3 +62,5 @@ ScVbaPivotTable::getServiceNames()
}
return aServiceNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbapivottable.hxx b/sc/source/ui/vba/vbapivottable.hxx
index e6e341830489..5f244a8ef95e 100644
--- a/sc/source/ui/vba/vbapivottable.hxx
+++ b/sc/source/ui/vba/vbapivottable.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,3 +48,5 @@ public:
};
#endif //SC_VBA_PIVOTTABLE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbapivottables.cxx b/sc/source/ui/vba/vbapivottables.cxx
index fcbf347a3cd4..b7e090d1a841 100644
--- a/sc/source/ui/vba/vbapivottables.cxx
+++ b/sc/source/ui/vba/vbapivottables.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -92,3 +93,5 @@ ScVbaPivotTables::getServiceNames()
}
return sNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbapivottables.hxx b/sc/source/ui/vba/vbapivottables.hxx
index 3354d8a82953..4928756e179b 100644
--- a/sc/source/ui/vba/vbapivottables.hxx
+++ b/sc/source/ui/vba/vbapivottables.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,3 +64,5 @@ public:
};
#endif //SC_VBA_PIVOTTABLES
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbapropvalue.cxx b/sc/source/ui/vba/vbapropvalue.cxx
index ff821d17f479..2fdbd16195fe 100644
--- a/sc/source/ui/vba/vbapropvalue.cxx
+++ b/sc/source/ui/vba/vbapropvalue.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,3 +44,5 @@ ScVbaPropValue::setValue( const css::uno::Any& _value ) throw (css::uno::Runtime
{
m_pListener->setValueEvent( _value );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbapropvalue.hxx b/sc/source/ui/vba/vbapropvalue.hxx
index af748dae5585..289870e5b520 100644
--- a/sc/source/ui/vba/vbapropvalue.hxx
+++ b/sc/source/ui/vba/vbapropvalue.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,3 +56,5 @@ public:
};
#endif //SC_VBA_PROPVALULE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaquerytable.cxx b/sc/source/ui/vba/vbaquerytable.cxx
new file mode 100644
index 000000000000..305c14262d3a
--- /dev/null
+++ b/sc/source/ui/vba/vbaquerytable.cxx
@@ -0,0 +1,90 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright IBM Corporation 2009, 2010.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "vbaquerytable.hxx"
+#include "document.hxx"
+#include "docsh.hxx"
+#include "sfx2/lnkbase.hxx"
+#include "sfx2/linkmgr.hxx"
+#include "arealink.hxx"
+#include "vbarange.hxx"
+
+using namespace com::sun::star;
+
+
+ScVbaQueryTable::ScVbaQueryTable(const css::uno::Reference< ov::XHelperInterface >& /*xParent*/,
+ const css::uno::Reference< css::uno::XComponentContext > & /*xContext*/,
+ ScDocument *pDocument ,
+ ScVbaRange *pParent
+ )
+//:QueryTable_Base(xParent, xContext)
+{
+ m_pDocument = pDocument;
+ m_pParent = pParent;
+}
+
+ScVbaQueryTable::~ScVbaQueryTable()
+{
+
+}
+
+::sal_Bool SAL_CALL
+ScVbaQueryTable::Refresh( const ::com::sun::star::uno::Any& /*aBackgroundQuery*/ ) throw (::com::sun::star::uno::RuntimeException)
+{
+
+ //Get parent Info
+ sal_Int32 nRow = m_pParent->getRow();
+ sal_Int32 nClm = m_pParent->getColumn();
+ sal_Int16 nTab = m_pParent->getWorksheet()->getIndex() - 1; //The vba index begin from 1.
+ ScAddress crrRngAddr(nClm, nRow, nTab);
+
+ //Get link info
+ sfx2::LinkManager *pLinkMng = m_pDocument->GetLinkManager();
+ const ::sfx2::SvBaseLinks &rLinks = pLinkMng->GetLinks();
+ USHORT nCount = rLinks.Count();
+
+ for (USHORT i=0; i<nCount; i++)
+ {
+ ::sfx2::SvBaseLink* pBase = *rLinks[i];
+ if (pBase->ISA(ScAreaLink))
+ {
+
+ ScAreaLink *pAreaLink = (ScAreaLink *)pBase;
+ const ScRange &destRange = pAreaLink->GetDestArea();
+ if (destRange.In(crrRngAddr))
+ {
+ pBase->Update();
+ }
+ }
+ }
+
+ return sal_True;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaquerytable.hxx b/sc/source/ui/vba/vbaquerytable.hxx
new file mode 100644
index 000000000000..f7deea7014cb
--- /dev/null
+++ b/sc/source/ui/vba/vbaquerytable.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright IBM Corporation 2009, 2010.
+ * 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 SC_VBA_QUERYTABLE_HXX
+#define SC_VBA_QUERYTABLE_HXX
+
+
+#include <ooo/vba/excel/XQueryTable.hpp>
+#include "vbahelper/vbahelperinterface.hxx"
+
+using namespace ::ooo::vba;
+typedef ::cppu::WeakImplHelper1<excel::XQueryTable> QueryTable_Base;
+
+class ScDocument;
+class ScVbaRange;
+
+class ScVbaQueryTable : public QueryTable_Base
+{
+private:
+ ScDocument *m_pDocument;
+ ScVbaRange *m_pParent;
+public:
+ ScVbaQueryTable(const css::uno::Reference< ov::XHelperInterface >& xParent,
+ const css::uno::Reference< css::uno::XComponentContext > & xContext,
+ ScDocument *pDocument = NULL,
+ ScVbaRange *pParent = NULL
+ );
+ ~ScVbaQueryTable();
+ virtual ::sal_Bool SAL_CALL Refresh( const ::com::sun::star::uno::Any& aBackgroundQuery )
+ throw (::com::sun::star::uno::RuntimeException);
+
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 0724541278fa..c9dce622bf36 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,7 +44,6 @@
#include <com/sun/star/text/XTextRange.hpp>
#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
#include <com/sun/star/table/CellRangeAddress.hpp>
-#include <com/sun/star/table/CellAddress.hpp>
#include <com/sun/star/sheet/XSpreadsheetView.hpp>
#include <com/sun/star/sheet/XCellRangeReferrer.hpp>
#include <com/sun/star/sheet/XSheetCellRange.hpp>
@@ -51,6 +51,7 @@
#include <com/sun/star/sheet/XSheetCellCursor.hpp>
#include <com/sun/star/sheet/XArrayFormulaRange.hpp>
#include <com/sun/star/sheet/XNamedRange.hpp>
+#include <com/sun/star/sheet/XNamedRanges.hpp>
#include <com/sun/star/sheet/XPrintAreas.hpp>
#include <com/sun/star/sheet/XCellRangesQuery.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -91,6 +92,15 @@
#include <com/sun/star/sheet/XSubTotalDescriptor.hpp>
#include <com/sun/star/sheet/GeneralFunction.hdl>
+#include <com/sun/star/sheet/XSheetAnnotationsSupplier.hpp>
+#include <com/sun/star/sheet/XSheetAnnotations.hpp>
+
+#include <com/sun/star/sheet/XDataPilotTable.hpp>
+#include <com/sun/star/sheet/XDataPilotTable2.hpp>
+#include <com/sun/star/sheet/XDataPilotTablesSupplier.hpp>
+#include <com/sun/star/sheet/DataPilotTablePositionData.hpp>
+#include <com/sun/star/sheet/DataPilotTablePositionType.hpp>
+
#include <ooo/vba/excel/XlPasteSpecialOperation.hpp>
#include <ooo/vba/excel/XlPasteType.hpp>
#include <ooo/vba/excel/Constants.hpp>
@@ -116,12 +126,15 @@
#include <ooo/vba/excel/XlSpecialCellsValue.hpp>
#include <ooo/vba/excel/XlConsolidationFunction.hpp>
#include <ooo/vba/excel/XlSearchDirection.hpp>
+#include <ooo/vba/excel/XlColumnDataType.hpp>
+#include <ooo/vba/excel/XlFilterAction.hpp>
#include <scitems.hxx>
#include <svl/srchitem.hxx>
#include <cellsuno.hxx>
#include <dbcolect.hxx>
#include "docfunc.hxx"
+#include <docuno.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/app.hxx>
@@ -132,6 +145,7 @@
#include <sc.hrc>
#include <globstr.hrc>
#include <unonames.hxx>
+#include <tools/stream.hxx>
#include "vbarange.hxx"
#include "vbafont.hxx"
@@ -143,8 +157,13 @@
#include "vbavalidation.hxx"
#include "vbahyperlinks.hxx"
+#include "vbapivottable.hxx"
+
+#include "asciiopt.hxx"
+#include "impex.hxx"
#include "tabvwsh.hxx"
#include "rangelst.hxx"
+#include "rangenam.hxx"
#include "convuno.hxx"
#include "compiler.hxx"
#include "attrib.hxx"
@@ -158,6 +177,8 @@
#include "vbaglobals.hxx"
#include "vbastyle.hxx"
+#include "vbaname.hxx"
+#include "vbanames.hxx"
#include <vector>
#include <vbahelper/vbacollectionimpl.hxx>
// begin test includes
@@ -362,55 +383,6 @@ ScVbaRangeAreas::createCollectionObject( const uno::Any& aSource )
return lcl_makeRange( mxParent, mxContext, aSource, mbIsRows, mbIsColumns );
}
-// assume that xIf is infact a ScCellRangesBase
-ScDocShell*
-getDocShellFromIf( const uno::Reference< uno::XInterface >& xIf ) throw ( uno::RuntimeException )
-{
- ScCellRangesBase* pUno = ScCellRangesBase::getImplementation( xIf );
- if ( !pUno )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access underlying uno range object" ) ), uno::Reference< uno::XInterface >() );
- return pUno->GetDocShell();
-}
-
-ScDocShell*
-getDocShellFromRange( const uno::Reference< table::XCellRange >& xRange ) throw ( uno::RuntimeException )
-{
- // need the ScCellRangesBase to get docshell
- uno::Reference< uno::XInterface > xIf( xRange, uno::UNO_QUERY_THROW );
- return getDocShellFromIf(xIf );
-}
-
-ScDocShell*
-getDocShellFromRanges( const uno::Reference< sheet::XSheetCellRangeContainer >& xRanges ) throw ( uno::RuntimeException )
-{
- // need the ScCellRangesBase to get docshell
- uno::Reference< uno::XInterface > xIf( xRanges, uno::UNO_QUERY_THROW );
- return getDocShellFromIf(xIf );
-}
-
-uno::Reference< frame::XModel > getModelFromXIf( const uno::Reference< uno::XInterface >& xIf ) throw ( uno::RuntimeException )
-{
- ScDocShell* pDocShell = getDocShellFromIf(xIf );
- return pDocShell->GetModel();
-}
-
-uno::Reference< frame::XModel > getModelFromRange( const uno::Reference< table::XCellRange >& xRange ) throw ( uno::RuntimeException )
-{
- uno::Reference< uno::XInterface > xIf( xRange, uno::UNO_QUERY_THROW );
- return getModelFromXIf( xIf );
-}
-
-ScDocument*
-getDocumentFromRange( const uno::Reference< table::XCellRange >& xRange )
-{
- ScDocShell* pDocShell = getDocShellFromRange( xRange );
- if ( !pDocShell )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access underlying docshell from uno range object" ) ), uno::Reference< uno::XInterface >() );
- ScDocument* pDoc = pDocShell->GetDocument();
- return pDoc;
-}
-
-
ScDocument*
ScVbaRange::getScDocument() throw (uno::RuntimeException)
{
@@ -418,9 +390,9 @@ ScVbaRange::getScDocument() throw (uno::RuntimeException)
{
uno::Reference< container::XIndexAccess > xIndex( mxRanges, uno::UNO_QUERY_THROW );
uno::Reference< table::XCellRange > xRange( xIndex->getByIndex( 0 ), uno::UNO_QUERY_THROW );
- return getDocumentFromRange( xRange );
+ return excel::GetDocumentFromRange( xRange );
}
- return getDocumentFromRange( mxRange );
+ return excel::GetDocumentFromRange( mxRange );
}
ScDocShell*
@@ -430,9 +402,9 @@ ScVbaRange::getScDocShell() throw (uno::RuntimeException)
{
uno::Reference< container::XIndexAccess > xIndex( mxRanges, uno::UNO_QUERY_THROW );
uno::Reference< table::XCellRange > xRange( xIndex->getByIndex( 0 ), uno::UNO_QUERY_THROW );
- return getDocShellFromRange( xRange );
+ return excel::GetDocShellFromRange( xRange );
}
- return getDocShellFromRange( mxRange );
+ return excel::GetDocShellFromRange( mxRange );
}
/*static*/ ScVbaRange* ScVbaRange::getImplementation( const uno::Reference< excel::XRange >& rxRange )
@@ -478,7 +450,7 @@ class NumFormatHelper
public:
NumFormatHelper( const uno::Reference< table::XCellRange >& xRange )
{
- mxSupplier.set( getModelFromRange( xRange ), uno::UNO_QUERY_THROW );
+ mxSupplier.set( excel::GetModelFromRange( xRange ), uno::UNO_QUERY_THROW );
mxRangeProps.set( xRange, uno::UNO_QUERY_THROW);
mxFormats = mxSupplier->getNumberFormats();
}
@@ -743,7 +715,15 @@ CellValueSetter::processValue( const uno::Any& aValue, const uno::Reference< tab
{
double nDouble = 0.0;
if ( aValue >>= nDouble )
+ {
xCell->setValue( nDouble );
+ uno::Reference< table::XCellRange > xRange( xCell, uno::UNO_QUERY_THROW );
+ NumFormatHelper cellNumFormat( xRange );
+ if ( cellNumFormat.isBooleanType() )
+ {
+ cellNumFormat.setNumberFormat( util::NumberFormat::NUMBER );
+ }
+ }
else
isExtracted = false;
break;
@@ -837,9 +817,10 @@ protected:
double aDblValue = 0.0;
if ( aValue >>= sFormula )
{
- // convert to CONV_OOO style formula string because XCell::setFormula
- // always compile it in CONV_OOO style. Perhaps css.sheet.FormulaParser
- // should be used in future to directly pass formula tokens.
+ // convert to GRAM_PODF_A1 style grammar because XCell::setFormula
+ // always compile it in that grammar. Perhaps
+ // css.sheet.FormulaParser should be used in future to directly
+ // pass formula tokens when that API stabilizes.
if ( m_eGrammar != formula::FormulaGrammar::GRAM_PODF_A1 && ( sFormula.trim().indexOf('=') == 0 ) )
{
uno::Reference< uno::XInterface > xIf( xCell, uno::UNO_QUERY_THROW );
@@ -1100,7 +1081,7 @@ public:
};
bool
-getCellRangesForAddress( USHORT& rResFlags, const rtl::OUString& sAddress, ScDocShell* pDocSh, ScRangeList& rCellRanges, formula::FormulaGrammar::AddressConvention& eConv )
+getCellRangesForAddress( USHORT& rResFlags, const rtl::OUString& sAddress, ScDocShell* pDocSh, ScRangeList& rCellRanges, formula::FormulaGrammar::AddressConvention& eConv, char cDelimiter = 0 )
{
ScDocument* pDoc = NULL;
@@ -1109,7 +1090,7 @@ getCellRangesForAddress( USHORT& rResFlags, const rtl::OUString& sAddress, ScDoc
pDoc = pDocSh->GetDocument();
String aString(sAddress);
USHORT nMask = SCA_VALID;
- rResFlags = rCellRanges.Parse( sAddress, pDoc, nMask, eConv, 0 );
+ rResFlags = rCellRanges.Parse( sAddress, pDoc, nMask, eConv, cDelimiter );
if ( rResFlags & SCA_VALID )
{
return true;
@@ -1144,6 +1125,25 @@ bool getScRangeListForAddress( const rtl::OUString& sName, ScDocShell* pDocSh, S
formula::FormulaGrammar::AddressConvention eConv = aConv;
// spaces are illegal ( but the user of course can enter them )
rtl::OUString sAddress = (*it).trim();
+ // if a local name ( on the active sheet ) exists this will
+ // take precedence over a global with the same name
+ if ( !xNameAccess->hasByName( sAddress ) && pDocSh )
+ {
+ // try a local name
+ ScDocument* pDoc = pDocSh->GetDocument();
+ SCTAB nCurTab = pDocSh->GetCurTab();
+ if ( pDoc )
+ {
+ NameToNameMap* pMap = pDoc->GetLocalNameMap( nCurTab );
+ if ( pMap )
+ {
+ NameToNameMap::iterator itTmp = pMap->find( sAddress );
+ if ( itTmp != pMap->end() ) // found a mapping
+ sAddress = itTmp->second;
+ }
+ }
+ }
+ char aChar = 0;
if ( xNameAccess->hasByName( sAddress ) )
{
uno::Reference< sheet::XNamedRange > xNamed( xNameAccess->getByName( sAddress ), uno::UNO_QUERY_THROW );
@@ -1151,10 +1151,11 @@ bool getScRangeListForAddress( const rtl::OUString& sName, ScDocShell* pDocSh, S
// As the address comes from OOO, the addressing
// style is may not be XL_A1
eConv = pDocSh->GetDocument()->GetAddressConvention();
+ aChar = ';';
}
USHORT nFlags = 0;
- if ( !getCellRangesForAddress( nFlags, sAddress, pDocSh, aCellRanges, eConv ) )
+ if ( !getCellRangesForAddress( nFlags, sAddress, pDocSh, aCellRanges, eConv, aChar ) )
return false;
bool bTabFromReferrer = !( nFlags & SCA_TAB_3D );
@@ -1248,7 +1249,7 @@ uno::Reference< sheet::XSheetCellRangeContainer > lclExpandToMerged( const uno::
ScUnoConversion::FillScRange( aScRange, aRangeAddr );
aScRanges.Append( aScRange );
}
- return new ScCellRangesObj( getDocShellFromRanges( rxCellRanges ), aScRanges );
+ return new ScCellRangesObj( excel::GetDocShellFromRanges( rxCellRanges ), aScRanges );
}
void lclExpandAndMerge( const uno::Reference< table::XCellRange >& rxCellRange, bool bMerge ) throw (uno::RuntimeException)
@@ -1294,7 +1295,7 @@ util::TriState lclGetMergedState( const uno::Reference< table::XCellRange >& rxC
of a merged range is part of this range are not covered. */
ScRange aScRange;
ScUnoConversion::FillScRange( aScRange, aRangeAddr );
- bool bHasMerged = getDocumentFromRange( rxCellRange )->HasAttrib( aScRange, HASATTR_MERGED | HASATTR_OVERLAPPED );
+ bool bHasMerged = excel::GetDocumentFromRange( rxCellRange )->HasAttrib( aScRange, HASATTR_MERGED | HASATTR_OVERLAPPED );
return bHasMerged ? util::TriState_INDETERMINATE : util::TriState_NO;
}
@@ -1311,6 +1312,28 @@ ScVbaRange::getRangeObjectForName(
return getRangeForName( xContext, sRangeName, pDocSh, refAddr, eConv );
}
+table::CellAddress ScVbaRange::getLeftUpperCellAddress()
+{
+ table::CellAddress aCellAddress;
+ uno::Reference< table::XCellRange > xCellRange = mxRange;
+ if ( mxRanges.is() && m_Areas.is() && m_Areas->getCount() > 1 )
+ {
+ uno::Reference< container::XIndexAccess > xIndex( mxRanges, uno::UNO_QUERY );
+ if ( xIndex.is() && xIndex->getCount() > 0 )
+ {
+ xCellRange.set( xIndex->getByIndex( 0 ), uno::UNO_QUERY );
+ }
+ }
+ if ( xCellRange.is() )
+ {
+ uno::Reference< sheet::XCellAddressable > xCellAddr( xCellRange->getCellByPosition( 0, 0 ), uno::UNO_QUERY );
+ if ( xCellAddr.is() )
+ {
+ aCellAddress = xCellAddr->getCellAddress();
+ }
+ }
+ return aCellAddress;
+}
table::CellRangeAddress getCellRangeAddressForVBARange( const uno::Any& aParam, ScDocShell* pDocSh, formula::FormulaGrammar::AddressConvention aConv = formula::FormulaGrammar::CONV_XL_A1) throw ( uno::RuntimeException )
{
@@ -1338,7 +1361,14 @@ table::CellRangeAddress getCellRangeAddressForVBARange( const uno::Any& aParam,
uno::Reference< excel::XRange > xRange;
aParam >>= xRange;
if ( xRange.is() )
+ {
+ ScVbaRange* pRange = dynamic_cast< ScVbaRange* >( xRange.get() );
+ if ( pRange && pDocSh && pRange->getScDocument() != pDocSh->GetDocument() )
+ {
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Invalid range" ) ), uno::Reference< uno::XInterface >() );
+ }
xRange->getCellRange() >>= xRangeParam;
+ }
break;
}
default:
@@ -1351,7 +1381,7 @@ uno::Reference< XCollection >
lcl_setupBorders( const uno::Reference< excel::XRange >& xParentRange, const uno::Reference<uno::XComponentContext>& xContext, const uno::Reference< table::XCellRange >& xRange ) throw( uno::RuntimeException )
{
uno::Reference< XHelperInterface > xParent( xParentRange, uno::UNO_QUERY_THROW );
- ScDocument* pDoc = getDocumentFromRange(xRange);
+ ScDocument* pDoc = excel::GetDocumentFromRange(xRange);
if ( !pDoc )
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access document from shell" ) ), uno::Reference< uno::XInterface >() );
ScVbaPalette aPalette( pDoc->GetDocumentShell() );
@@ -1359,8 +1389,21 @@ lcl_setupBorders( const uno::Reference< excel::XRange >& xParentRange, const uno
return borders;
}
+void lcl_NotifyRangeChanges( const uno::Reference< frame::XModel >& xModel, ScCellRangesBase* pUnoRangesBase )
+{
+ if ( xModel.is() && pUnoRangesBase )
+ {
+ ScModelObj* pModelObj = ScModelObj::getImplementation( xModel );
+ const ScRangeList& aCellRanges = pUnoRangesBase->GetRangeList();
+ if ( pModelObj && pModelObj->HasChangesListeners() )
+ {
+ pModelObj->NotifyChanges( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "cell-change" ) ), aCellRanges );
+ }
+ }
+}
+
ScVbaRange::ScVbaRange( uno::Sequence< uno::Any> const & args,
- uno::Reference< uno::XComponentContext> const & xContext ) throw ( lang::IllegalArgumentException ) : ScVbaRange_BASE( getXSomethingFromArgs< XHelperInterface >( args, 0 ), xContext, getXSomethingFromArgs< beans::XPropertySet >( args, 1, false ), getModelFromXIf( getXSomethingFromArgs< uno::XInterface >( args, 1 ) ), true ), mbIsRows( sal_False ), mbIsColumns( sal_False )
+ uno::Reference< uno::XComponentContext> const & xContext ) throw ( lang::IllegalArgumentException ) : ScVbaRange_BASE( getXSomethingFromArgs< XHelperInterface >( args, 0 ), xContext, getXSomethingFromArgs< beans::XPropertySet >( args, 1, false ), excel::GetModelFromRange( getXSomethingFromArgs< uno::XInterface >( args, 1 ) ), true ), mbIsRows( sal_False ), mbIsColumns( sal_False )
{
mxRange.set( mxPropertySet, uno::UNO_QUERY );
mxRanges.set( mxPropertySet, uno::UNO_QUERY );
@@ -1377,7 +1420,7 @@ ScVbaRange::ScVbaRange( uno::Sequence< uno::Any> const & args,
}
ScVbaRange::ScVbaRange( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< table::XCellRange >& xRange, sal_Bool bIsRows, sal_Bool bIsColumns ) throw( lang::IllegalArgumentException )
-: ScVbaRange_BASE( xParent, xContext, uno::Reference< beans::XPropertySet >( xRange, uno::UNO_QUERY_THROW ), getModelFromRange( xRange), true ), mxRange( xRange ),
+: ScVbaRange_BASE( xParent, xContext, uno::Reference< beans::XPropertySet >( xRange, uno::UNO_QUERY_THROW ), excel::GetModelFromRange( xRange), true ), mxRange( xRange ),
mbIsRows( bIsRows ),
mbIsColumns( bIsColumns )
{
@@ -1392,7 +1435,7 @@ ScVbaRange::ScVbaRange( const uno::Reference< XHelperInterface >& xParent, const
}
ScVbaRange::ScVbaRange( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< sheet::XSheetCellRangeContainer >& xRanges, sal_Bool bIsRows, sal_Bool bIsColumns ) throw ( lang::IllegalArgumentException )
-: ScVbaRange_BASE( xParent, xContext, uno::Reference< beans::XPropertySet >( xRanges, uno::UNO_QUERY_THROW ), getModelFromXIf( uno::Reference< uno::XInterface >( xRanges, uno::UNO_QUERY_THROW ) ), true ), mxRanges( xRanges ),mbIsRows( bIsRows ), mbIsColumns( bIsColumns )
+: ScVbaRange_BASE( xParent, xContext, uno::Reference< beans::XPropertySet >( xRanges, uno::UNO_QUERY_THROW ), excel::GetModelFromRange( uno::Reference< uno::XInterface >( xRanges, uno::UNO_QUERY_THROW ) ), true ), mxRanges( xRanges ),mbIsRows( bIsRows ), mbIsColumns( bIsColumns )
{
uno::Reference< container::XIndexAccess > xIndex( mxRanges, uno::UNO_QUERY_THROW );
@@ -1431,7 +1474,53 @@ ScVbaRange::visitArray( ArrayVisitor& visitor )
}
}
+uno::Any SAL_CALL ScVbaRange::getName() throw (uno::RuntimeException)
+{
+ uno::Reference< excel::XName > xName;
+ ScDocShell* pDocShell = getScDocShell();
+ uno::Reference< frame::XModel > xModel = pDocShell ? pDocShell->GetModel() : NULL;
+ if ( !xModel.is() )
+ {
+ throw uno::RuntimeException( rtl::OUString::createFromAscii( "Invalid document" ), uno::Reference< uno::XInterface >() );
+ }
+ uno::Reference< beans::XPropertySet > xPropertySet( xModel, uno::UNO_QUERY_THROW );
+ uno::Reference< sheet::XNamedRanges > xNamedRanges( xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("NamedRanges")) , uno::UNO_QUERY_THROW );
+
+ uno::Reference< excel::XNames > xNames( new ScVbaNames( uno::Reference< XHelperInterface >(), mxContext , xNamedRanges , xModel ) );
+ sal_Int32 nCount = xNames->getCount();
+ ScCellRangesBase* pUnoRangesBase = getCellRangesBase();
+ if ( pUnoRangesBase && nCount > 0 )
+ {
+ ScRangeList aRangeList = pUnoRangesBase->GetRangeList();
+ for ( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++ )
+ {
+ uno::Reference< excel::XName > xTmpName( xNames->Item( uno::makeAny( nIndex + 1 ), uno::Any() ), uno::UNO_QUERY );
+ if ( xTmpName.is() )
+ {
+ try
+ {
+ uno::Reference< excel::XRange > xRange = xTmpName->getRefersToRange();
+ if ( xRange.is() )
+ {
+ ScVbaRange* pRange = dynamic_cast< ScVbaRange* >( xRange.get() );
+ ScCellRangesBase* pCurRangesBase = pRange ? pRange->getCellRangesBase() : NULL;
+ if ( pCurRangesBase && aRangeList == pCurRangesBase->GetRangeList() )
+ {
+ xName = xTmpName;
+ break;
+ }
+ }
+ }
+ catch (const uno::Exception&)
+ {
+ }
+ }
+ }
+ }
+
+ return uno::makeAny( xName );
+}
uno::Any
ScVbaRange::getValue( ValueGetter& valueGetter) throw (uno::RuntimeException)
@@ -1521,6 +1610,9 @@ ScVbaRange::setValue( const uno::Any &aValue ) throw (uno::RuntimeException)
}
CellValueSetter valueSetter( aValue );
setValue( aValue, valueSetter );
+
+ // Fires the range change event.
+ lcl_NotifyRangeChanges( getScDocShell()->GetModel(), getCellRangesBase() );
}
void
@@ -1529,6 +1621,9 @@ ScVbaRange::Clear() throw (uno::RuntimeException)
using namespace ::com::sun::star::sheet::CellFlags;
sal_Int32 nFlags = VALUE | DATETIME | STRING | FORMULA | HARDATTR | EDITATTR | FORMATTED;
ClearContents( nFlags );
+
+ // Fires the range change event.
+ lcl_NotifyRangeChanges( getScDocShell()->GetModel(), getCellRangesBase() );
}
//helper ClearContent
@@ -1569,6 +1664,9 @@ ScVbaRange::ClearContents() throw (uno::RuntimeException)
sheet::CellFlags::STRING | sheet::CellFlags::DATETIME |
sheet::CellFlags::FORMULA );
ClearContents( nClearFlags );
+
+ // Fires the range change event.
+ lcl_NotifyRangeChanges( getScDocShell()->GetModel(), getCellRangesBase() );
}
void
@@ -1577,6 +1675,9 @@ ScVbaRange::ClearFormats() throw (uno::RuntimeException)
//FIXME: need to check if we need to combine sheet::CellFlags::FORMATTED
sal_Int32 nClearFlags = sheet::CellFlags::HARDATTR | sheet::CellFlags::FORMATTED | sheet::CellFlags::EDITATTR;
ClearContents( nClearFlags );
+
+ // Fires the range change event.
+ lcl_NotifyRangeChanges( getScDocShell()->GetModel(), getCellRangesBase() );
}
void
@@ -1592,6 +1693,9 @@ ScVbaRange::setFormulaValue( const uno::Any& rFormula, formula::FormulaGrammar::
}
CellFormulaValueSetter formulaValueSetter( rFormula, getScDocument(), eGram );
setValue( rFormula, formulaValueSetter );
+
+ // Fires the range change event.
+ lcl_NotifyRangeChanges( getScDocShell()->GetModel(), getCellRangesBase() );
}
uno::Any
@@ -1751,6 +1855,9 @@ ScVbaRange::fillSeries( sheet::FillDirection nFillDirection, sheet::FillMode nFi
uno::Reference< sheet::XCellSeries > xCellSeries(mxRange, uno::UNO_QUERY_THROW );
xCellSeries->fillSeries( nFillDirection, nFillMode, nFillDateMode, fStep, fEndValue );
+
+ // Fires the range change event.
+ lcl_NotifyRangeChanges( getScDocShell()->GetModel(), getCellRangesBase() );
}
void
@@ -1890,7 +1997,16 @@ ScVbaRange::getFormulaArray() throw (uno::RuntimeException)
uno::Reference< sheet::XCellRangeFormula> xCellRangeFormula( mxRange, uno::UNO_QUERY_THROW );
uno::Reference< script::XTypeConverter > xConverter = getTypeConverter( mxContext );
uno::Any aMatrix;
- aMatrix = xConverter->convertTo( uno::makeAny( xCellRangeFormula->getFormulaArray() ) , getCppuType((uno::Sequence< uno::Sequence< uno::Any > >*)0) ) ;
+
+ //VBA, minz@cn.ibm.com
+ uno::Sequence< uno::Sequence<rtl::OUString> > aFmArray = xCellRangeFormula->getFormulaArray();
+ if( aFmArray.getLength() )
+ {
+ if( aFmArray.getLength() == 1 && aFmArray[0].getLength() == 1 )
+ aMatrix <<= aFmArray[0][0];
+ else
+ aMatrix = xConverter->convertTo( uno::makeAny( xCellRangeFormula->getFormulaArray() ) , getCppuType((uno::Sequence< uno::Sequence< uno::Any > >*)0) ) ;
+ }
return aMatrix;
}
@@ -2061,29 +2177,65 @@ ScVbaRange::Cells( const uno::Any &nRowIndex, const uno::Any &nColumnIndex ) thr
// set in the Any, we should convert as appropriate
// #FIXME - perhaps worth turning this into some sort of
// convertion routine e.g. bSuccess = getValueFromAny( nRow, nRowIndex, getCppuType((sal_Int32*)0) )
- if ( nRowIndex.hasValue() && !( nRowIndex >>= nRow ) )
+ uno::Any aRowIndexAny = nRowIndex;
+ if ( aRowIndexAny.getValueTypeClass() == uno::TypeClass_INTERFACE )
{
- uno::Reference< script::XTypeConverter > xConverter = getTypeConverter( mxContext );
- uno::Any aConverted;
try
{
- aConverted = xConverter->convertTo( nRowIndex, getCppuType((sal_Int32*)0) );
- bIsIndex = ( aConverted >>= nRow );
+ aRowIndexAny = getDefaultPropByIntrospection( aRowIndexAny );
}
- catch( uno::Exception& ) {} // silence any errors
+ catch( uno::Exception& ) {}
}
- if ( bIsColumnIndex && !( nColumnIndex >>= nColumn ) )
+ else if ( aRowIndexAny.hasValue() && !( aRowIndexAny >>= nRow ) )
{
uno::Reference< script::XTypeConverter > xConverter = getTypeConverter( mxContext );
uno::Any aConverted;
try
{
- aConverted = xConverter->convertTo( nColumnIndex, getCppuType((sal_Int32*)0) );
- bIsColumnIndex = ( aConverted >>= nColumn );
+ aConverted = xConverter->convertTo( aRowIndexAny, getCppuType((sal_Int32*)0) );
+ bIsIndex = ( aConverted >>= nRow );
}
catch( uno::Exception& ) {} // silence any errors
}
+ uno::Any aColumnAny = nColumnIndex;
+
+ if ( bIsColumnIndex )
+ {
+ // Column index can be a col address e.g Cells( 1, "B" ) etc.
+ rtl::OUString sCol;
+ if ( nColumnIndex >>= sCol )
+ {
+ ScAddress::Details dDetails( formula::FormulaGrammar::CONV_XL_A1, 0, 0 );
+ ScRange tmpRange;
+ USHORT flags = tmpRange.ParseCols( sCol, excel::GetDocumentFromRange( mxRange ), dDetails );
+ if ( ( flags & 0x200 ) != 0x200 )
+ throw uno::RuntimeException();
+ nColumn = tmpRange.aStart.Col() + 1;
+ }
+ else
+ {
+ if ( aColumnAny.getValueTypeClass() == uno::TypeClass_INTERFACE )
+ {
+ try
+ {
+ aColumnAny = getDefaultPropByIntrospection( aColumnAny );
+ }
+ catch( uno::Exception& ) {}
+ }
+ if ( !( aColumnAny >>= nColumn ) )
+ {
+ uno::Reference< script::XTypeConverter > xConverter = getTypeConverter( mxContext );
+ uno::Any aConverted;
+ try
+ {
+ aConverted = xConverter->convertTo( aColumnAny, getCppuType((sal_Int32*)0) );
+ bIsColumnIndex = ( aConverted >>= nColumn );
+ }
+ catch( uno::Exception& ) {} // silence any errors
+ }
+ }
+ }
RangeHelper thisRange( mxRange );
table::CellRangeAddress thisRangeAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
uno::Reference< table::XCellRange > xSheetRange = thisRange.getCellRangeFromSheet();
@@ -2245,7 +2397,7 @@ ScVbaRange::Rows(const uno::Any& aIndex ) throw (uno::RuntimeException)
{
ScAddress::Details dDetails( formula::FormulaGrammar::CONV_XL_A1, 0, 0 );
ScRange tmpRange;
- tmpRange.ParseRows( sAddress, getDocumentFromRange( mxRange ), dDetails );
+ tmpRange.ParseRows( sAddress, excel::GetDocumentFromRange( mxRange ), dDetails );
nStartRow = tmpRange.aStart.Row();
nEndRow = tmpRange.aEnd.Row();
@@ -2292,7 +2444,7 @@ ScVbaRange::Columns(const uno::Any& aIndex ) throw (uno::RuntimeException)
{
ScAddress::Details dDetails( formula::FormulaGrammar::CONV_XL_A1, 0, 0 );
ScRange tmpRange;
- tmpRange.ParseCols( sAddress, getDocumentFromRange( mxRange ), dDetails );
+ tmpRange.ParseCols( sAddress, excel::GetDocumentFromRange( mxRange ), dDetails );
nStartCol = tmpRange.aStart.Col();
nEndCol = tmpRange.aEnd.Col();
@@ -2395,9 +2547,11 @@ ScVbaRange::Copy(const ::uno::Any& Destination) throw (uno::RuntimeException)
}
else
{
- uno::Reference< frame::XModel > xModel = getModelFromRange( mxRange );
- Select();
- excel::implnCopy( xModel );
+ ScRange aRange;
+ RangeHelper thisRange( mxRange );
+ ScUnoConversion::FillScRange( aRange, thisRange.getCellRangeAddressable()->getRangeAddress() );
+ uno::Reference< frame::XModel > xModel = excel::GetModelFromRange( mxRange );
+ excel::implnCopyRange( xModel, aRange );
}
}
@@ -2419,8 +2573,9 @@ ScVbaRange::Cut(const ::uno::Any& Destination) throw (uno::RuntimeException)
uno::Reference< sheet::XCellRangeAddressable > xSource( mxRange, uno::UNO_QUERY);
xMover->moveRange( xDestination->getCellAddress(), xSource->getRangeAddress() );
}
- {
- uno::Reference< frame::XModel > xModel = getModelFromRange( mxRange );
+ //VBA, minz@cn.ibm.com.
+ else {
+ uno::Reference< frame::XModel > xModel = excel::GetModelFromRange( mxRange );
Select();
excel::implnCut( xModel );
}
@@ -2740,8 +2895,6 @@ ScVbaRange::PasteSpecial( const uno::Any& Paste, const uno::Any& Operation, cons
uno::Reference< frame::XModel > xModel( ( pShell ? pShell->GetModel() : NULL ), uno::UNO_QUERY_THROW );
uno::Reference< view::XSelectionSupplier > xSelection( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
- // save old selection
- uno::Reference< uno::XInterface > xSel( xModel->getCurrentSelection() );
// select this range
xSelection->select( uno::makeAny( mxRange ) );
// set up defaults
@@ -2762,8 +2915,6 @@ ScVbaRange::PasteSpecial( const uno::Any& Paste, const uno::Any& Operation, cons
USHORT nFlags = getPasteFlags(nPaste);
USHORT nFormulaBits = getPasteFormulaBits(nOperation);
excel::implnPasteSpecial(pShell->GetModel(), nFlags,nFormulaBits,bSkipBlanks,bTranspose);
- // restore selection
- xSelection->select( uno::makeAny( xSel ) );
}
uno::Reference< excel::XRange >
@@ -2984,7 +3135,16 @@ ScVbaRange::Replace( const ::rtl::OUString& What, const ::rtl::OUString& Replace
// OOo.org afaik
uno::Reference< util::XSearchDescriptor > xSearch( xDescriptor, uno::UNO_QUERY );
+ // Find all cells that being replaced, used to fire the range changed event.
+ uno::Reference< container::XIndexAccess > xIndexAccess = xReplace->findAll( xSearch );
xReplace->replaceAll( xSearch );
+
+ if ( xIndexAccess.is() && xIndexAccess->getCount() > 0 )
+ {
+ // Fires the range change event.
+ ScCellRangesBase* pScCellRangesBase = ScCellRangesBase::getImplementation( xIndexAccess ); //liuchen 2010-01-05
+ lcl_NotifyRangeChanges( getScDocShell()->GetModel(), pScCellRangesBase ); //liuchen 2010-01-05 the original convert method will fail in SUSE
+ }
}
return sal_True; // always
}
@@ -3135,6 +3295,13 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
uno::Reference< uno::XInterface > xInterface = xStartCell.is() ? xSearch->findNext( xStartCell, xDescriptor) : xSearch->findFirst( xDescriptor );
uno::Reference< table::XCellRange > xCellRange( xInterface, uno::UNO_QUERY );
+ // if we are searching from a starting cell and failed to find a match
+ // then try from the begining
+ if ( !xCellRange.is() && xStartCell.is() )
+ {
+ xInterface = xSearch->findFirst( xDescriptor );
+ xCellRange.set( xInterface, uno::UNO_QUERY );
+ }
if ( xCellRange.is() )
{
uno::Reference< excel::XRange > xResultRange = new ScVbaRange( mxParent, mxContext, xCellRange );
@@ -3428,76 +3595,45 @@ ScVbaRange::End( ::sal_Int32 Direction ) throw (uno::RuntimeException)
return xRange->End( Direction );
}
+ table::CellAddress aAddress = getLeftUpperCellAddress();
+ SCTAB nTab = aAddress.Sheet;
+ SCCOL nCurX = aAddress.Column;
+ SCROW nCurY = aAddress.Row;
+ SCCOL nNewX = nCurX;
+ SCROW nNewY = nCurY;
- // #FIXME #TODO
- // euch! found my orig implementation sucked, so
- // trying this even suckier one ( really need to use/expose code in
- // around ScTabView::MoveCursorArea(), thats the bit that calcutes
- // where the cursor should go )
- // Main problem with this method is the ultra hacky attempt to preserve
- // the ActiveCell, there should be no need to go to these extreems
-
- // Save ActiveCell pos ( to restore later )
- uno::Any aDft;
- uno::Reference< excel::XApplication > xApplication( Application(), uno::UNO_QUERY_THROW );
- rtl::OUString sActiveCell = xApplication->getActiveCell()->Address(aDft, aDft, aDft, aDft, aDft );
-
- // position current cell upper left of this range
- Cells( uno::makeAny( (sal_Int32) 1 ), uno::makeAny( (sal_Int32) 1 ) )->Select();
+ ScDocShell* pDocShell = getScDocShell();
+ ScDocument* pDoc = pDocShell->GetDocument();
- uno::Reference< frame::XModel > xModel = getModelFromRange( mxRange );
+ SCsCOL nMoveX = 0;
+ SCsROW nMoveY = 0;
+ switch ( Direction )
+ {
+ case excel::XlDirection::xlDown:
+ nMoveY = 1;
+ break;
+ case excel::XlDirection::xlUp:
+ nMoveY = -1;
+ break;
+ case excel::XlDirection::xlToLeft:
+ nMoveX = -1;
+ break;
+ case excel::XlDirection::xlToRight:
+ nMoveX = 1;
+ break;
+ default:
+ throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Invalid Direction" ) ), uno::Reference< uno::XInterface >() );
+ }
- SfxViewFrame* pViewFrame = excel::getViewFrame( xModel );
- if ( pViewFrame )
+ if ( pDoc )
{
- SfxAllItemSet aArgs( SFX_APP()->GetPool() );
- // Hoping this will make sure this slot is called
- // synchronously
- SfxBoolItem sfxAsync( SID_ASYNCHRON, sal_False );
- aArgs.Put( sfxAsync, sfxAsync.Which() );
- SfxDispatcher* pDispatcher = pViewFrame->GetDispatcher();
-
- USHORT nSID = 0;
-
- switch( Direction )
- {
- case excel::XlDirection::xlDown:
- nSID = SID_CURSORBLKDOWN;
- break;
- case excel::XlDirection::xlUp:
- nSID = SID_CURSORBLKUP;
- break;
- case excel::XlDirection::xlToLeft:
- nSID = SID_CURSORBLKLEFT;
- break;
- case excel::XlDirection::xlToRight:
- nSID = SID_CURSORBLKRIGHT;
- break;
- default:
- throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": Invalid ColumnIndex" ) ), uno::Reference< uno::XInterface >() );
- }
- if ( pDispatcher )
- {
- pDispatcher->Execute( nSID, (SfxCallMode)SFX_CALLMODE_SYNCHRON, aArgs );
- }
+ pDoc->FindAreaPos( nNewX, nNewY, nTab, nMoveX, nMoveY );
}
- // result is the ActiveCell
- rtl::OUString sMoved = xApplication->getActiveCell()->Address(aDft, aDft, aDft, aDft, aDft );
-
- // restore old ActiveCell
- uno::Any aVoid;
-
- uno::Reference< excel::XRange > xOldActiveCell( xApplication->getActiveSheet()->Range( uno::makeAny( sActiveCell ), aVoid ), uno::UNO_QUERY_THROW );
- xOldActiveCell->Select();
-
- uno::Reference< excel::XRange > resultCell;
-
- resultCell.set( xApplication->getActiveSheet()->Range( uno::makeAny( sMoved ), aVoid ), uno::UNO_QUERY_THROW );
-
- // return result
-
- return resultCell;
+ ScRange aNewRange( (SCCOL)nNewX, (SCROW)nNewY, nTab, (SCCOL)nNewX, (SCROW)nNewY, nTab );
+ uno::Reference< table::XCellRange > xCellRange( new ScCellRangeObj( getScDocShell(), aNewRange ) );
+ uno::Reference< excel::XRange > xResultRange = new ScVbaRange( mxParent, mxContext, xCellRange );
+ return xResultRange;
}
bool
@@ -3515,7 +3651,7 @@ ScVbaRange::characters( const uno::Any& Start, const uno::Any& Length ) throw (u
if ( !isSingleCellRange() )
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can't create Characters property for multicell range ") ), uno::Reference< uno::XInterface >() );
uno::Reference< text::XSimpleText > xSimple(mxRange->getCellByPosition(0,0) , uno::UNO_QUERY_THROW );
- ScDocument* pDoc = getDocumentFromRange(mxRange);
+ ScDocument* pDoc = excel::GetDocumentFromRange(mxRange);
if ( !pDoc )
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access document from shell" ) ), uno::Reference< uno::XInterface >() );
@@ -3632,7 +3768,7 @@ ScVbaRange::getCalcColWidth( const table::CellRangeAddress& rAddress) throw (uno
double
ScVbaRange::getCalcRowHeight( const table::CellRangeAddress& rAddress ) throw (uno::RuntimeException)
{
- ScDocument* pDoc = getDocumentFromRange( mxRange );
+ ScDocument* pDoc = excel::GetDocumentFromRange( mxRange );
USHORT nWidth = pDoc->GetOriginalHeight( rAddress.StartRow, rAddress.Sheet );
double nPoints = lcl_TwipsToPoints( nWidth );
nPoints = lcl_Round2DecPlaces( nPoints );
@@ -3894,7 +4030,7 @@ ScVbaRange::setRowHeight( const uno::Any& _rowheight) throw (uno::RuntimeExcepti
table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
USHORT nTwips = lcl_pointsToTwips( nHeight );
- ScDocShell* pDocShell = getDocShellFromRange( mxRange );
+ ScDocShell* pDocShell = excel::GetDocShellFromRange( mxRange );
ScDocFunc aFunc(*pDocShell);
SCCOLROW nRowArr[2];
nRowArr[0] = thisAddress.StartRow;
@@ -3907,7 +4043,7 @@ uno::Any SAL_CALL
ScVbaRange::getPageBreak() throw (uno::RuntimeException)
{
sal_Int32 nPageBreak = excel::XlPageBreak::xlPageBreakNone;
- ScDocShell* pShell = getDocShellFromRange( mxRange );
+ ScDocShell* pShell = excel::GetDocShellFromRange( mxRange );
if ( pShell )
{
RangeHelper thisRange( mxRange );
@@ -3920,7 +4056,7 @@ ScVbaRange::getPageBreak() throw (uno::RuntimeException)
uno::Reference< frame::XModel > xModel = pShell->GetModel();
if ( xModel.is() )
{
- ScDocument* pDoc = getDocumentFromRange( mxRange );
+ ScDocument* pDoc = excel::GetDocumentFromRange( mxRange );
ScBreakType nBreak = BREAK_NONE;
if ( !bColumn )
@@ -3945,7 +4081,7 @@ ScVbaRange::setPageBreak( const uno::Any& _pagebreak) throw (uno::RuntimeExcepti
sal_Int32 nPageBreak = 0;
_pagebreak >>= nPageBreak;
- ScDocShell* pShell = getDocShellFromRange( mxRange );
+ ScDocShell* pShell = excel::GetDocShellFromRange( mxRange );
if ( pShell )
{
RangeHelper thisRange( mxRange );
@@ -4039,7 +4175,7 @@ ScVbaRange::getWorksheet() throw (uno::RuntimeException)
uno::Reference< container::XIndexAccess > xIndex( mxRanges, uno::UNO_QUERY_THROW );
xRange.set( xIndex->getByIndex( 0 ), uno::UNO_QUERY_THROW );
}
- ScDocShell* pDocShell = getDocShellFromRange(xRange);
+ ScDocShell* pDocShell = excel::GetDocShellFromRange(xRange);
RangeHelper rHelper(xRange);
// parent should be Thisworkbook
xSheet.set( new ScVbaWorksheet( uno::Reference< XHelperInterface >(), mxContext,rHelper.getSpreadSheet(),pDocShell->GetModel()) );
@@ -4094,63 +4230,44 @@ ScVbaRange::ApplicationRange( const uno::Reference< uno::XComponentContext >& xC
}
}
}
- uno::Reference< sheet::XSpreadsheetView > xView( getCurrentExcelDoc(xContext)->getCurrentController(), uno::UNO_QUERY );
- uno::Reference< table::XCellRange > xSheetRange( xView->getActiveSheet(), uno::UNO_QUERY_THROW );
- ScVbaRange* pRange = new ScVbaRange( excel::getUnoSheetModuleObj( xSheetRange ), xContext, xSheetRange );
- uno::Reference< excel::XRange > xVbSheetRange( pRange );
- return pRange->Range( Cell1, Cell2, true );
-}
-uno::Reference< sheet::XDatabaseRanges >
-lcl_GetDataBaseRanges( ScDocShell* pShell ) throw ( uno::RuntimeException )
-{
- uno::Reference< frame::XModel > xModel;
- if ( pShell )
- xModel.set( pShell->GetModel(), uno::UNO_QUERY_THROW );
- uno::Reference< beans::XPropertySet > xModelProps( xModel, uno::UNO_QUERY_THROW );
- uno::Reference< sheet::XDatabaseRanges > xDBRanges( xModelProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("DatabaseRanges") ) ), uno::UNO_QUERY_THROW );
- return xDBRanges;
-}
-// returns the XDatabaseRange for the autofilter on sheet (nSheet)
-// also populates sName with the name of range
-uno::Reference< sheet::XDatabaseRange >
-lcl_GetAutoFiltRange( ScDocShell* pShell, sal_Int16 nSheet, rtl::OUString& sName )
-{
- uno::Reference< container::XIndexAccess > xIndexAccess( lcl_GetDataBaseRanges( pShell ), uno::UNO_QUERY_THROW );
- uno::Reference< sheet::XDatabaseRange > xDataBaseRange;
- table::CellRangeAddress dbAddress;
- for ( sal_Int32 index=0; index < xIndexAccess->getCount(); ++index )
- {
- uno::Reference< sheet::XDatabaseRange > xDBRange( xIndexAccess->getByIndex( index ), uno::UNO_QUERY_THROW );
- uno::Reference< container::XNamed > xNamed( xDBRange, uno::UNO_QUERY_THROW );
- // autofilters work weirdly with openoffice, unnamed is the default
- // named range which is used to create an autofilter, but
- // its also possible that another name could be used
- // this also causes problems when an autofilter is created on
- // another sheet
- // ( but.. you can use any named range )
- dbAddress = xDBRange->getDataArea();
- if ( dbAddress.Sheet == nSheet )
- {
- sal_Bool bHasAuto = sal_False;
- uno::Reference< beans::XPropertySet > xProps( xDBRange, uno::UNO_QUERY_THROW );
- xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("AutoFilter") ) ) >>= bHasAuto;
- if ( bHasAuto )
- {
- sName = xNamed->getName();
- xDataBaseRange=xDBRange;
- break;
- }
+ // Add these codes for supporting shortcut: Application.Range(Range1, Range2), Range1 or Range2 is not the range of current active sheet.
+ // If Range1 and Range2 are not in current active sheet, we should not use the active sheet, but use the sheet of Range1 and Range2.
+ // If Range1 and Range2 are not in the same sheet, we throw an exception.
+ uno::Reference< sheet::XSpreadsheet > xSpreadsheet;
+ uno::Reference< excel::XRange > xRange1( Cell1, uno::UNO_QUERY ), xRange2( Cell2, uno::UNO_QUERY );
+ if ( xRange1.is() )
+ {
+ RangeHelper thisRange( xRange1->getCellRange() );
+ xSpreadsheet = thisRange.getSpreadSheet();
+ }
+ else if ( xRange2.is() )
+ {
+ RangeHelper thisRange( xRange2->getCellRange() );
+ xSpreadsheet = thisRange.getSpreadSheet();
+ }
+ if ( !xSpreadsheet.is() )
+ {
+ uno::Reference< frame::XModel > xModel = getCurrentExcelDoc( xContext );
+ if ( xModel.is() )
+ {
+ uno::Reference< sheet::XSpreadsheetView > xView( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
+ xSpreadsheet = xView->getActiveSheet();
}
}
- return xDataBaseRange;
+
+ uno::Reference< table::XCellRange > xSheetRange( xSpreadsheet, uno::UNO_QUERY_THROW );
+ ScVbaRange* pRange = new ScVbaRange( excel::getUnoSheetModuleObj( xSheetRange ), xContext, xSheetRange );
+
+ uno::Reference< excel::XRange > xVbSheetRange( pRange );
+ return pRange->Range( Cell1, Cell2, true );
}
// Helper functions for AutoFilter
ScDBData* lcl_GetDBData_Impl( ScDocShell* pDocShell, sal_Int16 nSheet )
{
rtl::OUString sName;
- lcl_GetAutoFiltRange( pDocShell, nSheet, sName );
+ excel::GetAutoFiltRange( pDocShell, nSheet, sName );
OSL_TRACE("lcl_GetDBData_Impl got autofilter range %s for sheet %d",
rtl::OUStringToOString( sName, RTL_TEXTENCODING_UTF8 ).getStr() , nSheet );
ScDBData* pRet = NULL;
@@ -4317,7 +4434,7 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
ScDocShell* pShell = getScDocShell();
sal_Bool bHasAuto = sal_False;
rtl::OUString sAutofiltRangeName;
- uno::Reference< sheet::XDatabaseRange > xDataBaseRange = lcl_GetAutoFiltRange( pShell, nSheet, sAutofiltRangeName );
+ uno::Reference< sheet::XDatabaseRange > xDataBaseRange = excel::GetAutoFiltRange( pShell, nSheet, sAutofiltRangeName );
if ( xDataBaseRange.is() )
bHasAuto = true;
@@ -4350,7 +4467,7 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
autoFiltAddress = multiCellRange.getCellRangeAddressable()->getRangeAddress();
}
- uno::Reference< sheet::XDatabaseRanges > xDBRanges = lcl_GetDataBaseRanges( pShell );
+ uno::Reference< sheet::XDatabaseRanges > xDBRanges = excel::GetDataBaseRanges( pShell );
if ( xDBRanges.is() )
{
rtl::OUString sGenName( RTL_CONSTASCII_USTRINGPARAM("VBA_Autofilter_") );
@@ -4403,8 +4520,21 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
// Use the normal uno api, sometimes e.g. when you want to use ALL as the filter
// we can't use refresh as the uno interface doesn't have a concept of ALL
// in this case we just call the core calc functionality -
- bool bAll = false;;
- if ( ( Field >>= nField ) )
+ bool bAll = false;
+ uno::Reference< script::XTypeConverter > xConverter = getTypeConverter( mxContext );
+ bool bIsValidFieldValue = ( Field >>= nField );
+ if ( !bIsValidFieldValue && xConverter.is() )
+ {
+ try
+ {
+ uno::Any aConverted = xConverter->convertTo( Field, getCppuType( (sal_Int32*)0 ) );
+ bIsValidFieldValue = ( aConverted >>= nField );
+ }
+ catch( const uno::Exception& ex )
+ {
+ }
+ }
+ if ( bIsValidFieldValue )
{
uno::Reference< sheet::XSheetFilterDescriptor2 > xDesc(
xDataBaseRange->getFilterDescriptor(), uno::UNO_QUERY );
@@ -4435,7 +4565,19 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
bAll = true;
// not sure what the relationship between Criteria1 and Operator is,
// e.g. can you have a Operator without a Criteria ? in openoffice it
- if ( Operator.hasValue() && ( Operator >>= nOperator ) )
+ bool bIsValidOpValue = ( Operator.hasValue() && ( Operator >>= nOperator ) );
+ if ( Operator.hasValue() && !bIsValidOpValue && xConverter.is() )
+ {
+ try
+ {
+ uno::Any aConverted = xConverter->convertTo( Operator, getCppuType( (sal_Int32*)0 ) );
+ bIsValidOpValue = ( aConverted >>= nOperator );
+ }
+ catch( const uno::Exception& ex )
+ {
+ }
+ }
+ if ( bIsValidOpValue )
{
// if its a bottom/top Ten(Percent/Value) and there
// is no value specified for critera1 set it to 10
@@ -4583,7 +4725,7 @@ ScVbaRange::Insert( const uno::Any& Shift, const uno::Any& CopyOrigin ) throw (u
{
// After the insert ( this range ) actually has moved
ScRange aRange( static_cast< SCCOL >( thisAddress.StartColumn ), static_cast< SCROW >( thisAddress.StartRow ), static_cast< SCTAB >( thisAddress.Sheet ), static_cast< SCCOL >( thisAddress.EndColumn ), static_cast< SCROW >( thisAddress.EndRow ), static_cast< SCTAB >( thisAddress.Sheet ) );
- uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( getDocShellFromRange( mxRange ) , aRange ) );
+ uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( excel::GetDocShellFromRange( mxRange ) , aRange ) );
uno::Reference< excel::XRange > xVbaRange( new ScVbaRange( mxParent, mxContext, xRange, mbIsRows, mbIsColumns ) );
xVbaRange->PasteSpecial( uno::Any(), uno::Any(), uno::Any(), uno::Any() );
}
@@ -4607,7 +4749,7 @@ ScVbaRange::Autofit() throw (uno::RuntimeException)
if ( !( mbIsColumns || mbIsRows ) )
DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString());
- ScDocShell* pDocShell = getDocShellFromRange( mxRange );
+ ScDocShell* pDocShell = excel::GetDocShellFromRange( mxRange );
if ( pDocShell )
{
RangeHelper thisRange( mxRange );
@@ -4639,8 +4781,8 @@ ScVbaRange::Autofit() throw (uno::RuntimeException)
***************************************************************************************/
void SAL_CALL
ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any& DataType, const css::uno::Any& TextQualifier,
- const css::uno::Any& ConsecutinveDelimiter, const css::uno::Any& Tab, const css::uno::Any& Semicolon, const css::uno::Any& Comma,
- const css::uno::Any& Space, const css::uno::Any& Other, const css::uno::Any& OtherChar, const css::uno::Any& /*FieldInfo*/,
+ const css::uno::Any& ConsecutiveDelimiter, const css::uno::Any& Tab, const css::uno::Any& Semicolon, const css::uno::Any& Comma,
+ const css::uno::Any& Space, const css::uno::Any& Other, const css::uno::Any& OtherChar, const css::uno::Any& FieldInfo,
const css::uno::Any& DecimalSeparator, const css::uno::Any& ThousandsSeparator, const css::uno::Any& /*TrailingMinusNumbers*/ ) throw (css::uno::RuntimeException)
{
uno::Reference< excel::XRange > xRange;
@@ -4677,13 +4819,13 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
OSL_TRACE("set TextQualifier\n");
}
- sal_Bool bConsecutinveDelimiter = sal_False;
- if( ConsecutinveDelimiter.hasValue() )
+ sal_Bool bConsecutiveDelimiter = sal_False;
+ if( ConsecutiveDelimiter.hasValue() )
{
- if( !( ConsecutinveDelimiter >>= bConsecutinveDelimiter ) )
- throw uno::RuntimeException( rtl::OUString::createFromAscii( "ConsecutinveDelimiter parameter should be a boolean" ),
+ if( !( ConsecutiveDelimiter >>= bConsecutiveDelimiter ) )
+ throw uno::RuntimeException( rtl::OUString::createFromAscii( "ConsecutiveDelimiter parameter should be a boolean" ),
uno::Reference< uno::XInterface >() );
- OSL_TRACE("set ConsecutinveDelimiter\n");
+ OSL_TRACE("set ConsecutiveDelimiter\n");
}
sal_Bool bTab = sal_False;
@@ -4735,7 +4877,13 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
throw uno::RuntimeException( rtl::OUString::createFromAscii( "Other parameter should be a True" ),
uno::Reference< uno::XInterface >() );
}
- //TODO* FieldInfo Optional Variant. An array containing parse information for the individual columns of data. The interpretation depends on the value of DataType. When the data is delimited, this argument is an array of two-element arrays, with each two-element array specifying the conversion options for a particular column. The first element is the column number (1-based), and the second element is one of the xlColumnDataType constants specifying how the column is parsed.
+ // FieldInfo, Optional Variant. An array containing parse information for the individual columns of data.
+ // The interpretation depends on the value of DataType. When the data is delimited, this argument is an array
+ // of two-element arrays, with each two-element array specifying the conversion options for a particular column.
+ // The first element is the column number (1-based), and the second element is one of the xlColumnDataType
+ // constants specifying how the column is parsed.
+ uno::Sequence< uno::Sequence< uno::Any > > sFieldInfo;
+ FieldInfo >>= sFieldInfo;
rtl::OUString sDecimalSeparator;
if( DecimalSeparator.hasValue() )
@@ -4753,7 +4901,106 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
uno::Reference< uno::XInterface >() );
OSL_TRACE("set ThousandsSpeparator\n" );
}
- //TODO* TrailingMinusNumbers Optional Variant. Numbers that begin with a minus character.
+ //TODO* TrailingMinusNumbers Optional Variant. Numbers that begin with a minus character.
+
+ // Get the destination range's left-upper cell address.
+ ScVbaRange* pDestVbaRange = dynamic_cast< ScVbaRange* >( xRange.get() );
+ ScAddress aScDestAddress;
+ if ( pDestVbaRange )
+ {
+ ScUnoConversion::FillScAddress( aScDestAddress, pDestVbaRange->getLeftUpperCellAddress() );
+ }
+
+ // Parse the value of parameter FieldInfo.
+ USHORT nCount = 0, nRealCount = 0;
+ xub_StrLen* pColumns = NULL;
+ BYTE* pFormats = NULL;
+ if ( sFieldInfo.getLength() > 0 )
+ {
+ nCount = sFieldInfo.getLength();
+ pColumns = new xub_StrLen[nCount];
+ pFormats = new BYTE[nCount];
+ USHORT nFormat = 1;
+ uno::Reference< script::XTypeConverter > xConverter = getTypeConverter( mxContext );
+ for ( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++ )
+ {
+ if ( sFieldInfo[nIndex].getLength() >= 2 )
+ {
+ nFormat = 1;
+ try
+ {
+ uno::Any aConverted = xConverter->convertTo( sFieldInfo[nIndex][0], getCppuType((xub_StrLen*)0) );
+ aConverted >>= pColumns[nRealCount];
+ aConverted = xConverter->convertTo( sFieldInfo[nIndex][1], getCppuType((USHORT*)0) );
+ aConverted >>= nFormat;
+ }
+ catch( const uno::Exception& )
+ {
+ }
+ pFormats[nRealCount++] = nFormat;
+ }
+ }
+ }
+
+ sal_Unicode cTextQualifier = '"';
+ cTextQualifier = xlTextQualifier == excel::XlTextQualifier::xlTextQualifierNone ? '\0' : cTextQualifier;
+ cTextQualifier = xlTextQualifier == excel::XlTextQualifier::xlTextQualifierSingleQuote ? '\'' : cTextQualifier;
+
+ // Get field delimiters.
+ String rFieldDelimiters;
+ if ( bTab ) rFieldDelimiters += '\t';
+ if ( bSemicolon ) rFieldDelimiters += ';';
+ if ( bComma ) rFieldDelimiters += ',';
+ if ( bSpace ) rFieldDelimiters += ' ';
+ if ( bOther ) rFieldDelimiters += *sOtherChar.getStr();
+
+ // Get the text in current range to SvMemoryStream.
+ ScRange aSrcScRange;
+ ScCellRangesBase* pSrcCellRangesBase = getCellRangesBase();
+ if ( pSrcCellRangesBase )
+ {
+ ScRangeList aRangeList = pSrcCellRangesBase->GetRangeList();
+ if ( aRangeList.First() )
+ {
+ aSrcScRange = *aRangeList.First();
+ }
+ }
+ ScImportExport aExport( getScDocument(), aSrcScRange );
+ aExport.SetDelimiter( static_cast< sal_Unicode >( 0 ) );
+ SvMemoryStream aStream;
+ aStream.SetStreamCharSet( RTL_TEXTENCODING_UNICODE );
+ ScImportExport::SetNoEndianSwap( aStream );
+ aExport.ExportStream( aStream, String(), FORMAT_STRING );
+ aStream.Seek( 0 );
+
+ // Set ScAsciiOptions according to the input parameters.
+ ScAsciiOptions aOptions;
+ aOptions.SetFixedLen( !bDilimited );
+ aOptions.SetStartRow( 0 );
+ aOptions.SetColInfo( nRealCount, pColumns, pFormats );
+ if ( bDilimited )
+ {
+ aOptions.SetFieldSeps( rFieldDelimiters );
+ aOptions.SetMergeSeps( bConsecutiveDelimiter );
+ aOptions.SetTextSep( cTextQualifier );
+ }
+
+ // Split the String in to columns.
+ if ( pDestVbaRange && pDestVbaRange->getScDocument() )
+ {
+ ScImportExport aImport( pDestVbaRange->getScDocument(), aScDestAddress );
+ aImport.SetExtOptions( aOptions );
+ aImport.SetApi( false );
+ aImport.ImportStream( aStream, String(), FORMAT_STRING );
+ }
+ if ( pColumns )
+ {
+ DELETEZ( pColumns );
+ }
+ if ( pFormats )
+ {
+ DELETEZ( pFormats );
+ }
}
uno::Any SAL_CALL
@@ -4898,7 +5145,7 @@ uno::Any ScVbaRange::getShowDetail() throw ( css::uno::RuntimeException)
(thisAddress.StartColumn == thisAddress.EndColumn && thisAddress.EndColumn == aOutlineAddress.EndColumn ))
{
sal_Bool bColumn =thisAddress.StartRow == thisAddress.EndRow ? sal_False:sal_True;
- ScDocument* pDoc = getDocumentFromRange( mxRange );
+ ScDocument* pDoc = excel::GetDocumentFromRange( mxRange );
ScOutlineTable* pOutlineTable = pDoc->GetOutlineTable(static_cast<SCTAB>(thisAddress.Sheet), sal_True);
const ScOutlineArray* pOutlineArray = bColumn ? pOutlineTable->GetColArray(): pOutlineTable->GetRowArray();
if( pOutlineArray )
@@ -4954,6 +5201,24 @@ void ScVbaRange::setShowDetail(const uno::Any& aShowDetail) throw ( css::uno::Ru
}
}
+//09-09-16 add by limingl
+::com::sun::star::uno::Reference< ::ooo::vba::excel::XQueryTable > SAL_CALL
+ScVbaRange::getQueryTable() throw (::com::sun::star::uno::RuntimeException)
+{
+ /*
+ if (m_pQueryTable == NULL)
+ {
+ m_pQueryTable = new ScVbaQueryTable(mxParent ,mxContext, getScDocument(), this); //add by limingl
+ }
+ //*/
+ if (!m_xQueryTable.is())
+ {
+ m_xQueryTable = new ScVbaQueryTable(mxParent ,mxContext, getScDocument(), this); //add by limingl
+ }
+
+ return m_xQueryTable;
+}
+//end add
uno::Reference< excel::XRange > SAL_CALL
ScVbaRange::MergeArea() throw (script::BasicErrorException, uno::RuntimeException)
{
@@ -4983,6 +5248,118 @@ ScVbaRange::MergeArea() throw (script::BasicErrorException, uno::RuntimeExceptio
return new ScVbaRange( mxParent, mxContext, mxRange );
}
+//2008-08-25 add by limingl
+//The recordset's member: Recordset.Fields.Item will get a Field obj.
+//Field.value is the column value.
+::sal_Int32 SAL_CALL
+ScVbaRange::CopyFromRecordset( const ::com::sun::star::uno::Any& Data, const ::com::sun::star::uno::Any& MaxRows, const ::com::sun::star::uno::Any& MaxColumns )
+throw (::com::sun::star::script::BasicErrorException, ::com::sun::star::uno::RuntimeException)
+{
+ uno::Sequence< uno::Any > aParams;
+ uno::Sequence< uno::Any > aFieldsParams(1);
+ uno::Sequence< sal_Int16 > aOutParamIndex;
+ uno::Sequence< uno::Any > aOutParam;
+ uno::Reference< uno::XInterface > xIntRes;
+ uno::Reference< uno::XInterface > xIntFields;
+ uno::Reference< uno::XInterface > xIntFld;
+ uno::Any aRet;
+ uno::Any aPar;
+ uno::Any aCrrCol;
+ uno::Any aCrrRow;
+ sal_Int16 nCrrCol = 0;
+ sal_Int32 nCrrRow = 0;
+ sal_Int32 nCol;
+ sal_Int32 nMaxRows = 0;
+ sal_Int32 nMaxColumns = 0;
+ sal_Bool bEof;
+// sal_Bool bColName = sal_True;
+ long lColCnt = 0;
+ if (MaxColumns.hasValue())
+ {
+ MaxColumns >>= nMaxColumns;
+ }
+
+ long lMaxCol = nMaxColumns;
+
+ if (MaxRows.hasValue())
+ {
+ MaxRows >>= nMaxRows;
+ }
+
+
+ Data >>= xIntRes;
+ uno::Reference< script::XInvocation > xInvRes(xIntRes, uno::UNO_QUERY_THROW);
+ rtl::OUString oMoveNext = rtl::OUString::createFromAscii("MoveNext") ;
+ rtl::OUString oEof = rtl::OUString::createFromAscii("EOF") ;
+ rtl::OUString oFields = rtl::OUString::createFromAscii("Fields") ;
+
+ if( !xInvRes->hasMethod(oMoveNext))
+ {
+ return -1;
+ }
+
+ //Get columns count
+ aRet = xInvRes->getValue(oFields);
+ aRet >>= xIntFields;
+ uno::Reference< script::XInvocation > xInvFields(xIntFields, uno::UNO_QUERY_THROW);
+ aRet = xInvFields->getValue( rtl::OUString::createFromAscii("Count")) ;
+ aRet >>= lColCnt;
+
+ //Set the assign column number
+ if (lMaxCol != 0)
+ {
+ if (lColCnt > lMaxCol)
+ {
+ lColCnt = lMaxCol;
+ }
+ }
+
+ aCrrRow <<= nCrrRow;
+ aCrrCol <<= nCrrCol;
+
+
+ //Get start position
+ uno::Reference< excel::XRange > xRngStartRow = Rows(uno::Any(sal_Int32(1)) );
+ uno::Reference< excel::XRange > xRngPos = xRngStartRow->Columns( uno::Any(sal_Int32(1)) );
+
+ while(1)
+ {//travel recordset
+ //get every column
+ for (long l = 0; l < lColCnt ; l++)
+ {
+ nCol = l;
+ aPar <<= nCol;
+ //get every field
+ aRet = xInvFields->invoke( rtl::OUString::createFromAscii("Item"), uno::Sequence< uno::Any >(&aPar,1) , aOutParamIndex,aOutParam);
+ aRet >>= xIntFld;
+ uno::Reference< script::XInvocation > xInvFld(xIntFld, uno::UNO_QUERY_THROW); //Get the Field obj
+
+ //set the field value
+ aRet = xInvFld->getValue( rtl::OUString::createFromAscii("Value") );
+ uno::Reference< excel::XRange > xRngToFill = xRngPos->Offset(aCrrRow,aCrrCol );
+
+ xRngToFill->setValue(aRet);
+ nCrrCol++;
+ aCrrCol <<= nCrrCol;
+ }
+
+ aRet = xInvRes->invoke(oMoveNext, aParams,aOutParamIndex,aOutParam );
+ aRet = xInvRes->getValue(oEof);
+ aRet >>= bEof;
+ if (bEof || ( nCrrRow >= nMaxRows && nMaxRows != 0) )
+ {//Arrive the end of recordset
+ break;
+ }
+
+ nCrrRow++;
+ aCrrRow <<= nCrrRow;
+ nCrrCol = 0;
+ aCrrCol <<= nCrrCol;
+ }
+
+ return 0;
+}
+//end add
void SAL_CALL
ScVbaRange::PrintOut( const uno::Any& From, const uno::Any& To, const uno::Any& Copies, const uno::Any& Preview, const uno::Any& ActivePrinter, const uno::Any& PrintToFile, const uno::Any& Collate, const uno::Any& PrToFileName ) throw (uno::RuntimeException)
{
@@ -5001,7 +5378,7 @@ ScVbaRange::PrintOut( const uno::Any& From, const uno::Any& To, const uno::Any&
{
ScVbaRange* pRange = getImplementation( xRange );
// initialise the doc shell and the printareas
- pShell = getDocShellFromRange( pRange->mxRange );
+ pShell = excel::GetDocShellFromRange( pRange->mxRange );
xPrintAreas.set( thisRange.getSpreadSheet(), uno::UNO_QUERY_THROW );
}
printAreas[ index - 1 ] = rangeAddress;
@@ -5087,7 +5464,7 @@ ScVbaRange::AutoFill( const uno::Reference< excel::XRange >& Destination, const
}
}
}
- ScDocShell* pDocSh= getDocShellFromRange( mxRange );
+ ScDocShell* pDocSh= excel::GetDocShellFromRange( mxRange );
FillCmd eCmd = FILL_AUTO;
FillDateCmd eDateCmd = FILL_DAY;
@@ -5210,13 +5587,8 @@ ScVbaRange::AutoOutline( ) throw (script::BasicErrorException, uno::RuntimeExce
RangeHelper thisRange( mxRange );
table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
- if ( isSingleCellRange() || mbIsRows )
- {
- uno::Reference< sheet::XSheetOutline > xSheetOutline( thisRange.getSpreadSheet(), uno::UNO_QUERY_THROW );
- xSheetOutline->autoOutline( thisAddress );
- }
- else
- DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString());
+ uno::Reference< sheet::XSheetOutline > xSheetOutline( thisRange.getSpreadSheet(), uno::UNO_QUERY_THROW );
+ xSheetOutline->autoOutline( thisAddress );
}
void SAL_CALL
@@ -5243,9 +5615,9 @@ ScVbaRange::groupUnGroup( bool bUnGroup ) throw ( script::BasicErrorException, u
{
if ( m_Areas->getCount() > 1 )
DebugHelper::exception(SbERR_METHOD_FAILED, STR_ERRORMESSAGE_APPLIESTOSINGLERANGEONLY);
- table::TableOrientation nOrient = table::TableOrientation_ROWS;
- if ( mbIsColumns )
- nOrient = table::TableOrientation_COLUMNS;
+ table::TableOrientation nOrient = table::TableOrientation_COLUMNS;
+ if ( mbIsRows )
+ nOrient = table::TableOrientation_ROWS;
RangeHelper thisRange( mxRange );
table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
uno::Reference< sheet::XSheetOutline > xSheetOutline( thisRange.getSpreadSheet(), uno::UNO_QUERY_THROW );
@@ -5404,6 +5776,7 @@ ScVbaRange::SpecialCells( const uno::Any& _oType, const uno::Any& _oValue) throw
bool bIsSingleCell = isSingleCellRange();
bool bIsMultiArea = ( m_Areas->getCount() > 1 );
ScVbaRange* pRangeToUse = this;
+ uno::Reference< excel::XRange > xUsedRange( getWorksheet()->getUsedRange() );
sal_Int32 nType = 0;
if ( !( _oType >>= nType ) )
DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
@@ -5464,7 +5837,6 @@ ScVbaRange::SpecialCells( const uno::Any& _oType, const uno::Any& _oValue) throw
}
else if ( bIsSingleCell )
{
- uno::Reference< excel::XRange > xUsedRange = getWorksheet()->getUsedRange();
pRangeToUse = static_cast< ScVbaRange* >( xUsedRange.get() );
}
@@ -5639,6 +6011,183 @@ ScVbaRange::Subtotal( ::sal_Int32 _nGroupBy, ::sal_Int32 _nFunction, const uno::
}
}
+uno::Any SAL_CALL ScVbaRange::AdvancedFilter( sal_Int32 Action, const uno::Any& CriteriaRange,
+ const uno::Any& CopyToRange, const uno::Any& Unique ) throw (script::BasicErrorException, uno::RuntimeException)
+{
+ uno::Any aRet;
+ aRet <<= sal_True;
+
+ uno::Reference< script::XTypeConverter > xConverter = getTypeConverter( mxContext );
+ ScDocument* pDoc = getScDocument();
+ if ( !pDoc )
+ {
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access document from range" ) ), uno::Reference< uno::XInterface >() );
+ }
+
+ // Action
+ if ( Action != excel::XlFilterAction::xlFilterInPlace && Action != excel::XlFilterAction::xlFilterCopy )
+ {
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Invalid input parameter" ) ), uno::Reference< uno::XInterface >() );
+ }
+ if ( m_Areas->getCount() > 1 )
+ {
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Invalid range" ) ), uno::Reference< uno::XInterface >() );
+ }
+
+ sal_Bool bCopyOut = ( Action != excel::XlFilterAction::xlFilterInPlace );
+ uno::Reference< sheet::XSheetFilterDescriptor > xFilterDesc;
+ uno::Reference< sheet::XSheetFilterable > xSheetFilter( mxRange, uno::UNO_QUERY_THROW );
+
+ // CriteriaRange
+ String aBuiltInCriteria; // Excel Built-In Filter Criteria.
+ ScRangeData* pData = NULL;
+ table::CellRangeAddress refParentAddr;
+ uno::Any aCriteriaRange = CriteriaRange;
+ formula::FormulaGrammar::AddressConvention aConv = formula::FormulaGrammar::CONV_XL_A1;
+ if ( aCriteriaRange.hasValue() && aCriteriaRange.getValueTypeClass() == uno::TypeClass_STRING )
+ {
+ rtl::OUString rRangeString;
+ aCriteriaRange >>= rRangeString;
+ aConv = excel::IsR1C1ReferFormat( pDoc, rRangeString ) ? formula::FormulaGrammar::CONV_XL_R1C1 : aConv;
+ }
+ else
+ {
+ // Get Excel BuiltIn Filter Criteria.
+ ScRangeName* pRangeNames = pDoc->GetRangeName();
+ const USHORT nCount = pRangeNames ? pRangeNames->GetCount() : 0;
+ for ( USHORT index = 0; index < nCount; index++ )
+ {
+ pData = ( ScRangeData* )( pRangeNames->At( index ) );
+ if ( pData && pData->HasType( RT_CRITERIA ) )
+ {
+ pData->GetSymbol( aBuiltInCriteria, formula::FormulaGrammar::GRAM_NATIVE_XL_A1 );
+ break;
+ }
+ }
+ aCriteriaRange = aBuiltInCriteria.Len() > 0 ? uno::makeAny( rtl::OUString( aBuiltInCriteria ) ) : aCriteriaRange;
+ }
+ if ( aCriteriaRange.hasValue() )
+ {
+ table::CellRangeAddress criteriaRangeAddress = getCellRangeAddressForVBARange( aCriteriaRange, getScDocShell(), aConv );
+ ScRange refRange;
+ ScUnoConversion::FillScRange( refRange, criteriaRangeAddress );
+ uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( getScDocShell(), refRange ) );
+ uno::Reference< sheet::XSheetFilterableEx > xCriteria( xRange, uno::UNO_QUERY );
+ if ( xCriteria.is() )
+ {
+ xFilterDesc = xCriteria->createFilterDescriptorByObject( xSheetFilter );
+ }
+ }
+ else if ( mxRange.is() )
+ {
+ uno::Reference< sheet::XSheetFilterableEx > xCriteria( mxRange, uno::UNO_QUERY );
+ if ( xCriteria.is() )
+ {
+ xFilterDesc = xCriteria->createFilterDescriptorByObject( xSheetFilter );
+ }
+ }
+
+ uno::Reference< beans::XPropertySet > xPropertySet( xFilterDesc, uno::UNO_QUERY );
+ if ( xPropertySet.is() )
+ {
+ xPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_COPYOUT ) ), uno::makeAny( bCopyOut ) );
+ }
+
+ // CopyToRange
+ if ( bCopyOut && CopyToRange.hasValue() && xPropertySet.is() )
+ {
+ formula::FormulaGrammar::AddressConvention aTmpConv = formula::FormulaGrammar::CONV_XL_A1;
+ if ( CopyToRange.getValueTypeClass() == uno::TypeClass_STRING )
+ {
+ rtl::OUString rRangeString;
+ CopyToRange >>= rRangeString;
+ aTmpConv = excel::IsR1C1ReferFormat( pDoc, rRangeString ) ? formula::FormulaGrammar::CONV_XL_R1C1 : aConv;
+ }
+ ScRange refRange;
+ ScUnoConversion::FillScRange( refRange, getCellRangeAddressForVBARange( CopyToRange, getScDocShell(), aTmpConv ) );
+ uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( getScDocShell(), refRange ) );
+ uno::Reference< sheet::XCellAddressable > xCellAddr( xRange->getCellByPosition( 0, 0 ), uno::UNO_QUERY_THROW );
+ xPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_OUTPOS ) ), uno::makeAny( xCellAddr->getCellAddress() ) );
+ }
+
+ // Unique
+ if ( xPropertySet.is() )
+ {
+ sal_Bool bUnique = sal_False;
+ uno::Any aUnique;
+ try
+ {
+ aUnique <<= bUnique;
+ aUnique = ( xConverter.is() && Unique.hasValue() ) ? xConverter->convertTo( Unique, getCppuType( ( sal_Bool* ) 0 ) ) : aUnique;
+ }
+ catch( const uno::Exception& )
+ {
+ }
+ xPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_SKIPDUP ) ), aUnique );
+ }
+
+ // Do filter.
+ if ( xFilterDesc.is() )
+ {
+ xSheetFilter->filter( xFilterDesc );
+ }
+
+ return aRet;
+}
+
+//Add by minz@cn.ibm.com. Range.PivotTable.
+//Returns a PivotTable object that represents the PivotTable report containing the upper-left corner of the specified range.
+uno::Reference< excel::XPivotTable >
+ScVbaRange::PivotTable() throw (uno::RuntimeException)
+{
+ uno::Reference< excel::XPivotTable > xDestPVTable;
+
+ uno::Reference< sheet::XSpreadsheet > xSheet;
+ if ( mxRange.is() )
+ {
+ RangeHelper thisRange( mxRange );
+ xSheet = thisRange.getSpreadSheet();
+ }
+ else if ( mxRanges.is() )
+ {
+ uno::Reference< container::XIndexAccess > xIndex( mxRanges, uno::UNO_QUERY_THROW );
+ uno::Reference< table::XCellRange > xRange( xIndex->getByIndex( 0 ), uno::UNO_QUERY_THROW );
+ RangeHelper thisRange( xRange );
+ xSheet = thisRange.getSpreadSheet();
+ }
+
+// RangeHelper thisRange( mxRange );
+// uno::Reference< sheet::XSpreadsheet > xSheet = thisRange.getSpreadSheet();
+ uno::Reference< sheet::XDataPilotTablesSupplier > xTables(xSheet, uno::UNO_QUERY_THROW ) ;
+ uno::Reference< container::XIndexAccess > xIndexAccess( xTables->getDataPilotTables(), uno::UNO_QUERY_THROW );
+ if ( xIndexAccess.is() )
+ {
+ //get the upper-left cell address
+ table::CellAddress aAddress = getLeftUpperCellAddress();
+
+ sal_Int32 nCount = xIndexAccess->getCount();
+ for (sal_Int32 i=0; i < nCount; i++)
+ {
+ uno::Reference< sheet::XDataPilotTable > xDPTable(xIndexAccess->getByIndex(i), uno::UNO_QUERY);
+ uno::Reference< sheet::XDataPilotTable2 > xDPTable2(xDPTable, uno::UNO_QUERY);
+
+ //check if the cell is in the pivot table
+ sheet::DataPilotTablePositionData posData = xDPTable2->getPositionData(aAddress);
+ table::CellRangeAddress aCellRangeAddress = xDPTable->getOutputRange();
+ ScRange aScRange( aCellRangeAddress.StartColumn, aCellRangeAddress.StartRow, aCellRangeAddress.Sheet,
+ aCellRangeAddress.EndColumn, aCellRangeAddress.EndRow, aCellRangeAddress.Sheet );
+ ScAddress aPos( aAddress.Column, aAddress.Row, aAddress.Sheet );
+ if( !(posData.PositionType == sheet::DataPilotTablePositionType::NOT_IN_TABLE) || aScRange.In( aPos ) )
+ {
+ xDestPVTable = new ScVbaPivotTable( mxContext, xDPTable );
+ break;
+ }
+ }
+ }
+ return xDestPVTable;
+}
+
+
rtl::OUString&
ScVbaRange::getServiceImplName()
{
@@ -5658,6 +6207,25 @@ ScVbaRange::getServiceNames()
return aServiceNames;
}
+sal_Bool SAL_CALL
+ScVbaRange::hasError() throw (uno::RuntimeException)
+{
+ double dResult = sal_False;
+ uno::Reference< excel::XApplication > xApplication( Application(), uno::UNO_QUERY_THROW );
+ uno::Reference< script::XInvocation > xInvoc( xApplication->WorksheetFunction(), uno::UNO_QUERY_THROW );
+
+ static rtl::OUString FunctionName( RTL_CONSTASCII_USTRINGPARAM("IsError" ) );
+ uno::Sequence< uno::Any > Params(1);
+ uno::Reference< excel::XRange > aRange( this );
+ Params[0] = uno::makeAny( aRange );
+ uno::Sequence< sal_Int16 > OutParamIndex;
+ uno::Sequence< uno::Any > OutParam;
+ xInvoc->invoke( FunctionName, Params, OutParamIndex, OutParam ) >>= dResult;
+ if ( dResult > 0.0 )
+ return sal_True;
+ return sal_False;
+}
+
namespace range
{
namespace sdecl = comphelper::service_decl;
@@ -5667,3 +6235,5 @@ extern sdecl::ServiceDecl const serviceDecl(
"SvVbaRange",
"ooo.vba.excel.Range" );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbarange.hxx b/sc/source/ui/vba/vbarange.hxx
index 84a65e7e2af5..46c60ac35e50 100644
--- a/sc/source/ui/vba/vbarange.hxx
+++ b/sc/source/ui/vba/vbarange.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,6 +36,7 @@
#include <ooo/vba/excel/XFont.hpp>
#include <ooo/vba/excel/XComment.hpp>
#include <ooo/vba/XCollection.hpp>
+#include <ooo/vba/excel/XPivotTable.hpp>
#include <ooo/vba/excel/XlPasteType.hdl>
#include <ooo/vba/excel/XlPasteSpecialOperation.hdl>
@@ -49,6 +51,8 @@
#include <com/sun/star/sheet/FillDirection.hpp>
#include <com/sun/star/sheet/XSpreadsheet.hpp>
#include <com/sun/star/sheet/XSheetCellRangeContainer.hpp>
+#include <com/sun/star/table/CellAddress.hpp>
+#include "vbaquerytable.hxx" //09-09-18 add by limingl
#include "vbaformat.hxx"
#include <formula/grammar.hxx>
@@ -97,6 +101,7 @@ class ScVbaRange : public ScVbaRange_BASE
sal_Bool mbIsRows;
sal_Bool mbIsColumns;
css::uno::Reference< ov::excel::XValidation > m_xValidation;
+ css::uno::Reference<excel::XQueryTable> m_xQueryTable; //09-09-16 add by limingl
double getCalcColWidth( const css::table::CellRangeAddress& ) throw (css::uno::RuntimeException);
double getCalcRowHeight( const css::table::CellRangeAddress& ) throw (css::uno::RuntimeException);
void visitArray( ArrayVisitor& vistor );
@@ -146,8 +151,10 @@ public:
const css::uno::Reference< css::uno::XComponentContext >& xContext,
const rtl::OUString& sRangeName, ScDocShell* pDocSh,
formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_XL_A1 ) throw ( css::uno::RuntimeException );
+ css::table::CellAddress getLeftUpperCellAddress();
// Attributes
+ virtual css::uno::Any SAL_CALL getName() throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
virtual void SAL_CALL setValue( const css::uno::Any& aValue ) throw ( css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL getFormula() throw (css::uno::RuntimeException);
@@ -188,6 +195,7 @@ public:
virtual css::uno::Any SAL_CALL getPrefixCharacter() throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL getShowDetail() throw (css::uno::RuntimeException);
virtual void SAL_CALL setShowDetail(const css::uno::Any& aShowDetail) throw (css::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::ooo::vba::excel::XQueryTable > SAL_CALL getQueryTable() throw (::com::sun::star::uno::RuntimeException); //09-09-16 add by limingl
// Methods
sal_Bool IsRows() { return mbIsRows; }
sal_Bool IsColumns() { return mbIsColumns; }
@@ -238,7 +246,7 @@ public:
virtual css::uno::Any SAL_CALL BorderAround( const css::uno::Any& LineStyle,
const css::uno::Any& Weight, const css::uno::Any& ColorIndex, const css::uno::Any& Color ) throw (css::uno::RuntimeException);
virtual void SAL_CALL TextToColumns( const css::uno::Any& Destination, const css::uno::Any& DataType, const css::uno::Any& TextQualifier,
- const css::uno::Any& ConsecutinveDelimiter, const css::uno::Any& Tab, const css::uno::Any& Semicolon, const css::uno::Any& Comma,
+ const css::uno::Any& ConsecutiveDelimiter, const css::uno::Any& Tab, const css::uno::Any& Semicolon, const css::uno::Any& Comma,
const css::uno::Any& Space, const css::uno::Any& Other, const css::uno::Any& OtherChar, const css::uno::Any& FieldInfo,
const css::uno::Any& DecimalSeparator, const css::uno::Any& ThousandsSeparator, const css::uno::Any& TrailingMinusNumbers ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL Hyperlinks( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
@@ -263,6 +271,11 @@ public:
virtual void SAL_CALL RemoveSubtotal( ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL MergeArea() throw (css::script::BasicErrorException, css::uno::RuntimeException);
virtual void SAL_CALL Subtotal( ::sal_Int32 GroupBy, ::sal_Int32 Function, const css::uno::Sequence< ::sal_Int32 >& TotalList, const css::uno::Any& Replace, const css::uno::Any& PageBreaks, const css::uno::Any& SummaryBelowData ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL AdvancedFilter( ::sal_Int32 Action, const css::uno::Any& CriteriaRange, const css::uno::Any& CopyToRange, const css::uno::Any& Unique ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+
+ virtual css::uno::Reference< ov::excel::XPivotTable > SAL_CALL PivotTable( ) throw (css::uno::RuntimeException);
+
+ virtual ::sal_Int32 SAL_CALL CopyFromRecordset( const ::com::sun::star::uno::Any& Data, const ::com::sun::star::uno::Any& MaxRows, const ::com::sun::star::uno::Any& MaxColumns ) throw (::com::sun::star::script::BasicErrorException, ::com::sun::star::uno::RuntimeException); //2008-08-25 add by limingl
// XEnumerationAccess
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
// XElementAccess
@@ -288,9 +301,12 @@ public:
static css::uno::Reference< ov::excel::XRange > ApplicationRange( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Any &Cell1, const css::uno::Any &Cell2 ) throw (css::uno::RuntimeException);
virtual sal_Bool SAL_CALL GoalSeek( const css::uno::Any& Goal, const css::uno::Reference< ov::excel::XRange >& ChangingCell ) throw (css::uno::RuntimeException);
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL SpecialCells( const css::uno::Any& _oType, const css::uno::Any& _oValue) throw ( css::script::BasicErrorException );
+ // XErrorQuery
+ virtual ::sal_Bool SAL_CALL hasError( ) throw (css::uno::RuntimeException);
// XHelperInterface
virtual rtl::OUString& getServiceImplName();
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
};
#endif /* SC_VBA_RANGE_HXX */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaseriescollection.cxx b/sc/source/ui/vba/vbaseriescollection.cxx
index 8caa746beff0..1ccb7bda8f7f 100644
--- a/sc/source/ui/vba/vbaseriescollection.cxx
+++ b/sc/source/ui/vba/vbaseriescollection.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -78,3 +79,4 @@ ScVbaSeriesCollection::getServiceNames()
return sNames;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaseriescollection.hxx b/sc/source/ui/vba/vbaseriescollection.hxx
index f61720102919..1b1d59e6157d 100644
--- a/sc/source/ui/vba/vbaseriescollection.hxx
+++ b/sc/source/ui/vba/vbaseriescollection.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,3 +53,5 @@ public:
};
#endif //SC_VBA_WINDOW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbasheetobject.cxx b/sc/source/ui/vba/vbasheetobject.cxx
index 4bd0f1d60547..652c8e4f87b1 100644
--- a/sc/source/ui/vba/vbasheetobject.cxx
+++ b/sc/source/ui/vba/vbasheetobject.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -515,3 +516,5 @@ void ScVbaButton::implSetDefaultProperties() throw (uno::RuntimeException)
}
// ============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbasheetobject.hxx b/sc/source/ui/vba/vbasheetobject.hxx
index b2546ca09c93..245320e5be3b 100644
--- a/sc/source/ui/vba/vbasheetobject.hxx
+++ b/sc/source/ui/vba/vbasheetobject.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -218,3 +219,5 @@ protected:
// ============================================================================
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbasheetobjects.cxx b/sc/source/ui/vba/vbasheetobjects.cxx
index ced94db5ba76..3847209989f9 100644
--- a/sc/source/ui/vba/vbasheetobjects.cxx
+++ b/sc/source/ui/vba/vbasheetobjects.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -532,3 +533,5 @@ ScVbaButtons::ScVbaButtons(
VBAHELPER_IMPL_XHELPERINTERFACE( ScVbaButtons, "ooo.vba.excel.Buttons" )
// ============================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbasheetobjects.hxx b/sc/source/ui/vba/vbasheetobjects.hxx
index fd69d4927a20..2a68d2251ad4 100644
--- a/sc/source/ui/vba/vbasheetobjects.hxx
+++ b/sc/source/ui/vba/vbasheetobjects.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -111,3 +112,5 @@ public:
// ============================================================================
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbastyle.cxx b/sc/source/ui/vba/vbastyle.cxx
index b99b2e783101..83d72dd99c05 100644
--- a/sc/source/ui/vba/vbastyle.cxx
+++ b/sc/source/ui/vba/vbastyle.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -184,3 +185,5 @@ ScVbaStyle::getServiceNames()
}
return aServiceNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbastyle.hxx b/sc/source/ui/vba/vbastyle.hxx
index d5bb232dabc2..f98ecac1a163 100644
--- a/sc/source/ui/vba/vbastyle.hxx
+++ b/sc/source/ui/vba/vbastyle.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -94,3 +95,5 @@ public:
};
#endif //SC_VBA_AXIS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbastyles.cxx b/sc/source/ui/vba/vbastyles.cxx
index c323e2b3f6f6..b07d98e81b80 100644
--- a/sc/source/ui/vba/vbastyles.cxx
+++ b/sc/source/ui/vba/vbastyles.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -180,3 +181,5 @@ ScVbaStyles::getServiceNames()
}
return aServiceNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbastyles.hxx b/sc/source/ui/vba/vbastyles.hxx
index 300596d6b3fe..821233f75ea0 100644
--- a/sc/source/ui/vba/vbastyles.hxx
+++ b/sc/source/ui/vba/vbastyles.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,3 +56,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbatextboxshape.cxx b/sc/source/ui/vba/vbatextboxshape.cxx
index 0ef9e0f7393b..b5502fac9aa8 100644
--- a/sc/source/ui/vba/vbatextboxshape.cxx
+++ b/sc/source/ui/vba/vbatextboxshape.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -64,3 +65,5 @@ ScVbaTextBoxShape::characters( const uno::Any& Start, const uno::Any& Length ) t
ScVbaPalette aPalette( pDoc->GetDocumentShell() );
return new ScVbaCharacters( this, mxContext, aPalette, xSimple, Start, Length, sal_True );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbatextboxshape.hxx b/sc/source/ui/vba/vbatextboxshape.hxx
index c08a576b7155..02298cd767eb 100644
--- a/sc/source/ui/vba/vbatextboxshape.hxx
+++ b/sc/source/ui/vba/vbatextboxshape.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -48,3 +49,5 @@ public:
virtual css::uno::Reference< ov::excel::XCharacters > SAL_CALL characters( const css::uno::Any& Start, const css::uno::Any& Length ) throw (css::uno::RuntimeException);
};
#endif //SC_VBA_TEXTBOX_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbatextframe.cxx b/sc/source/ui/vba/vbatextframe.cxx
index b06777526c1f..dffbed8b511f 100644
--- a/sc/source/ui/vba/vbatextframe.cxx
+++ b/sc/source/ui/vba/vbatextframe.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -76,3 +77,5 @@ extern sdecl::ServiceDecl const serviceDecl(
"ScVbaTextFrame",
"ooo.vba.excel.TextFrame" );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbatextframe.hxx b/sc/source/ui/vba/vbatextframe.hxx
index b48cd8752ef9..e45af4e1c2be 100644
--- a/sc/source/ui/vba/vbatextframe.hxx
+++ b/sc/source/ui/vba/vbatextframe.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,3 +48,5 @@ public:
};
#endif//SC_VBA_TEXTFRAME_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbatitle.hxx b/sc/source/ui/vba/vbatitle.hxx
index fb97f3f20f0c..1d89ea01e6d3 100644
--- a/sc/source/ui/vba/vbatitle.hxx
+++ b/sc/source/ui/vba/vbatitle.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -161,3 +162,5 @@ public:
}
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbavalidation.cxx b/sc/source/ui/vba/vbavalidation.cxx
index e2a768549e11..36662c87c598 100644
--- a/sc/source/ui/vba/vbavalidation.cxx
+++ b/sc/source/ui/vba/vbavalidation.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -25,6 +26,7 @@
*
************************************************************************/
#include "vbavalidation.hxx"
+#include "vbaformatcondition.hxx"
#include <com/sun/star/sheet/XSheetCondition.hpp>
#include <com/sun/star/sheet/ValidationType.hpp>
#include <com/sun/star/sheet/ValidationAlertStyle.hpp>
@@ -225,8 +227,10 @@ ScVbaValidation::Delete( ) throw (uno::RuntimeException)
lcl_setValidationProps( m_xRange, xProps );
}
+
+// Fix the defect that validatation cannot work when the input should be limited between a lower bound and an upper bound
void SAL_CALL
-ScVbaValidation::Add( const uno::Any& Type, const uno::Any& AlertStyle, const uno::Any& /*Operator*/, const uno::Any& Formula1, const uno::Any& Formula2 ) throw (uno::RuntimeException)
+ScVbaValidation::Add( const uno::Any& Type, const uno::Any& AlertStyle, const uno::Any& Operator, const uno::Any& Formula1, const uno::Any& Formula2 ) throw (uno::RuntimeException)
{
uno::Reference< beans::XPropertySet > xProps( lcl_getValidationProps( m_xRange ) );
uno::Reference< sheet::XSheetCondition > xCond( xProps, uno::UNO_QUERY_THROW );
@@ -291,6 +295,13 @@ ScVbaValidation::Add( const uno::Any& Type, const uno::Any& AlertStyle, const un
xProps->setPropertyValue( ALERTSTYLE, uno::makeAny( eStyle ) );
+ //2009-11-11 fix the defect that validatation cannot work when the input should be limited between a lower bound and an upper bound
+ if ( Operator.hasValue() )
+ {
+ css::sheet::ConditionOperator conOperator = ScVbaFormatCondition::retrieveAPIOperator( Operator );
+ xCond->setOperator( conOperator );
+ }
+ //2009-11-11
if ( sFormula1.getLength() )
xCond->setFormula1( sFormula1 );
if ( sFormula2.getLength() )
@@ -331,3 +342,5 @@ ScVbaValidation::getServiceNames()
}
return aServiceNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbavalidation.hxx b/sc/source/ui/vba/vbavalidation.hxx
index 563ee1d003b6..1ac0f3e35858 100644
--- a/sc/source/ui/vba/vbavalidation.hxx
+++ b/sc/source/ui/vba/vbavalidation.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -69,3 +70,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx
index 10dad39341b7..a31d348ff7c8 100644
--- a/sc/source/ui/vba/vbawindow.cxx
+++ b/sc/source/ui/vba/vbawindow.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -856,3 +857,5 @@ extern sdecl::ServiceDecl const serviceDecl(
"ScVbaWindow",
"ooo.vba.excel.Window" );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbawindow.hxx b/sc/source/ui/vba/vbawindow.hxx
index d58d2a07cb4b..b21e5a42b9c1 100644
--- a/sc/source/ui/vba/vbawindow.hxx
+++ b/sc/source/ui/vba/vbawindow.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -121,3 +122,5 @@ public:
};
#endif //SC_VBA_WINDOW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbawindows.cxx b/sc/source/ui/vba/vbawindows.cxx
index e21ca2c53090..f7a3e6acb589 100644
--- a/sc/source/ui/vba/vbawindows.cxx
+++ b/sc/source/ui/vba/vbawindows.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -257,3 +258,5 @@ ScVbaWindows::getServiceNames()
}
return sNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbawindows.hxx b/sc/source/ui/vba/vbawindows.hxx
index 3441b6ccbac4..9b1ac796503a 100644
--- a/sc/source/ui/vba/vbawindows.hxx
+++ b/sc/source/ui/vba/vbawindows.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -62,3 +63,4 @@ public:
#endif //SC_VBA_WINDOWS_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaworkbook.cxx b/sc/source/ui/vba/vbaworkbook.cxx
index 28469c4685a2..3e9fa27443cb 100644
--- a/sc/source/ui/vba/vbaworkbook.cxx
+++ b/sc/source/ui/vba/vbaworkbook.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,6 +37,7 @@
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <ooo/vba/excel/XlFileFormat.hpp>
+#include <ooo/vba/excel/XApplication.hpp> //liuchen 2009-12-16
#include "scextopt.hxx"
#include "vbaworksheet.hxx"
@@ -125,7 +127,7 @@ ScVbaWorkbook::Colors( const ::uno::Any& Index ) throw (::script::BasicErrorExce
}
::sal_Int32 SAL_CALL
-ScVbaWorkbook::FileFormat( ) throw (::script::BasicErrorException, ::uno::RuntimeException)
+ScVbaWorkbook::getFileFormat( ) throw (::uno::RuntimeException)
{
sal_Int32 aFileFormat = 0;
rtl::OUString aFilterName;
@@ -185,6 +187,24 @@ ScVbaWorkbook::FileFormat( ) throw (::script::BasicErrorException, ::uno::Runti
return aFileFormat;
}
+//VBA by minz@cn.ibm.com. Convert Excel fileformat to OO file filter
+::rtl::OUString ScVbaWorkbook::convertFileFormat(sal_Int32 aFileFormat)
+{
+ rtl::OUString aFilterName;
+
+ switch(aFileFormat)
+ {
+ case excel::XlFileFormat::xlCSV:
+ aFilterName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Text - txt - csv (StarCalc)" ) );
+ break;
+ case excel::XlFileFormat::xlExcel9795:
+ aFilterName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MS Excel 97" ) );
+ break;
+ }
+
+ return aFilterName;
+}
+
void
ScVbaWorkbook::init()
{
@@ -264,6 +284,12 @@ ScVbaWorkbook::Activate() throw (uno::RuntimeException)
VbaDocumentBase::Activate();
}
+void
+ScVbaWorkbook::Protect( const uno::Any &aPassword ) throw (uno::RuntimeException)
+{
+ VbaDocumentBase::Protect( aPassword );
+}
+
::sal_Bool
ScVbaWorkbook::getProtectStructure() throw (uno::RuntimeException)
{
@@ -299,6 +325,50 @@ ScVbaWorkbook::SaveCopyAs( const rtl::OUString& sFileName ) throw ( uno::Runtime
xStor->storeToURL( aURL, storeProps );
}
+//VBA by minz@cn.ibm.com. Add Workbook.SaveAs.
+void
+ScVbaWorkbook::SaveAs( const rtl::OUString& FileName, const uno::Any& FileFormat, const uno::Any& /*CreateBackup*/ ) throw ( uno::RuntimeException)
+{
+ rtl::OUString aURL;
+ osl::FileBase::getFileURLFromSystemPath( FileName, aURL );
+ //liuchen 2009-12-16 if the input parameter "FileName" takes the form as "MyFile", we need to get the current directory and combine the current directory and the file name
+ INetURLObject aFileNameURL( aURL );
+ aURL = aFileNameURL.GetMainURL( INetURLObject::NO_DECODE );
+ if ( aURL.getLength() == 0 )
+ {
+ uno::Reference< excel::XApplication > xApplication ( Application(),uno::UNO_QUERY_THROW );
+ rtl::OUString aPathStr = xApplication->getDefaultFilePath();
+ rtl::OUString aPathURLStr;
+ osl::FileBase::getFileURLFromSystemPath( aPathStr, aPathURLStr );
+ INetURLObject aPathURL( aPathURLStr );
+ aPathURL.Append( FileName );
+ aURL = aPathURL.GetMainURL( INetURLObject::NO_DECODE );
+ }
+ //liuchen 2009-12-16
+ uno::Reference< frame::XStorable > xStor( getModel(), uno::UNO_QUERY_THROW );
+
+ sal_Int32 aFileFormat = excel::XlFileFormat::xlExcel9795;
+ FileFormat >>= aFileFormat;
+
+ if ( FileName.indexOf('.') == -1 )
+ {
+ if ( aFileFormat == excel::XlFileFormat::xlExcel9795 )
+ {
+ aURL = aURL + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".xls" ) );
+ }
+ else if ( aFileFormat == excel::XlFileFormat::xlCSV )
+ {
+ aURL = aURL + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".csv" ) );
+ }
+ }
+
+ uno::Sequence< beans::PropertyValue > storeProps(1);
+ storeProps[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterName" ) );
+ storeProps[0].Value <<= convertFileFormat(aFileFormat);
+
+ xStor->storeAsURL( aURL, storeProps );
+}
+
css::uno::Any SAL_CALL
ScVbaWorkbook::Styles( const::uno::Any& Item ) throw (uno::RuntimeException)
{
@@ -361,3 +431,5 @@ extern sdecl::ServiceDecl const serviceDecl(
"ScVbaWorkbook",
"ooo.vba.excel.Workbook" );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaworkbook.hxx b/sc/source/ui/vba/vbaworkbook.hxx
index 4aff58078403..3f52e2683f3f 100644
--- a/sc/source/ui/vba/vbaworkbook.hxx
+++ b/sc/source/ui/vba/vbaworkbook.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,6 +42,8 @@ class ScVbaWorkbook : public ScVbaWorkbook_BASE
static css::uno::Sequence< sal_Int32 > ColorData;
void initColorData( const css::uno::Sequence< sal_Int32 >& sColors );
void init();
+
+ ::rtl::OUString convertFileFormat(sal_Int32 aFileFormat);
protected:
ScVbaWorkbook( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext);
@@ -61,20 +64,27 @@ public:
virtual css::uno::Any SAL_CALL Sheets( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL Windows( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
virtual void SAL_CALL Activate() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL Protect( const css::uno::Any & aPassword ) throw (css::uno::RuntimeException);
// Amelia Wang
virtual css::uno::Any SAL_CALL Names( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL Styles( const css::uno::Any& Item ) throw (css::uno::RuntimeException);
virtual void SAL_CALL ResetColors( ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL Colors( const css::uno::Any& Index ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
- virtual ::sal_Int32 SAL_CALL FileFormat( ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getFileFormat( ) throw (css::uno::RuntimeException);
virtual void SAL_CALL SaveCopyAs( const rtl::OUString& Filename ) throw ( css::uno::RuntimeException);
+ virtual void SAL_CALL SaveAs( const rtl::OUString& FileName, const css::uno::Any& FileFormat, const css::uno::Any& CreateBackup ) throw (css::uno::RuntimeException);
+
// code name
virtual ::rtl::OUString SAL_CALL getCodeName() throw ( css::uno::RuntimeException);
// XHelperInterface
virtual rtl::OUString& getServiceImplName();
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+
+ virtual css::uno::Reference< css::frame::XModel > getDocModel() { return mxModel; }
};
#endif /* SC_VBA_WORKBOOK_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaworkbooks.cxx b/sc/source/ui/vba/vbaworkbooks.cxx
index 7efee1505dcb..67de260af9aa 100644
--- a/sc/source/ui/vba/vbaworkbooks.cxx
+++ b/sc/source/ui/vba/vbaworkbooks.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -365,3 +366,5 @@ ScVbaWorkbooks::getServiceNames()
}
return sNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaworkbooks.hxx b/sc/source/ui/vba/vbaworkbooks.hxx
index 5d6210244d80..a195bb8d3cd0 100644
--- a/sc/source/ui/vba/vbaworkbooks.hxx
+++ b/sc/source/ui/vba/vbaworkbooks.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -69,3 +70,5 @@ public:
};
#endif /* SC_VBA_WORKBOOKS_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx
index d76aa7bd612e..ca00ef9ee495 100644
--- a/sc/source/ui/vba/vbaworksheet.cxx
+++ b/sc/source/ui/vba/vbaworksheet.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,6 +64,7 @@
#include <ooo/vba/excel/XlEnableSelection.hpp>
#include <ooo/vba/excel/XWorkbook.hpp>
#include <ooo/vba/XControlProvider.hpp>
+#include <ooo/vba/excel/XlSheetVisibility.hpp>
#include <comphelper/processfactory.hxx>
#include <vbahelper/vbashapes.hxx>
@@ -80,7 +82,7 @@
#include "cellsuno.hxx"
#include "drwlayer.hxx"
-
+#include "tabprotection.hxx"
#include "scextopt.hxx"
#include "vbaoutline.hxx"
#include "vbarange.hxx"
@@ -94,6 +96,7 @@
#include "vbaworksheets.hxx"
#include "vbahyperlinks.hxx"
#include "vbasheetobjects.hxx"
+#include "viewuno.hxx" //liuchen 2009-9-2
#define STANDARDWIDTH 2267
#define STANDARDHEIGHT 427
@@ -221,7 +224,7 @@ ScVbaWorksheet::setName(const ::rtl::OUString &rName ) throw (uno::RuntimeExcept
xNamed->setName( rName );
}
-sal_Bool
+::sal_Int32
ScVbaWorksheet::getVisible() throw (uno::RuntimeException)
{
uno::Reference< beans::XPropertySet > xProps( getSheet(), uno::UNO_QUERY_THROW );
@@ -229,13 +232,33 @@ ScVbaWorksheet::getVisible() throw (uno::RuntimeException)
(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsVisible" ) ) );
sal_Bool bRet = false;
aValue >>= bRet;
- return bRet;
+ if ( bRet )
+ {
+ return excel::XlSheetVisibility::xlSheetVisible;
+ }
+ else
+ {
+ return excel::XlSheetVisibility::xlSheetHidden;
+ }
}
void
-ScVbaWorksheet::setVisible( sal_Bool bVisible ) throw (uno::RuntimeException)
+ScVbaWorksheet::setVisible( ::sal_Int32 _Visible ) throw (uno::RuntimeException)
{
uno::Reference< beans::XPropertySet > xProps( getSheet(), uno::UNO_QUERY_THROW );
+
+ //VBA by minz@cn.ibm.com.
+ sal_Bool bVisible = true;
+ switch( _Visible )
+ {
+ case excel::XlSheetVisibility::xlSheetHidden:
+ case excel::XlSheetVisibility::xlSheetVeryHidden:
+ bVisible = false;
+ break;
+ case excel::XlSheetVisibility::xlSheetVisible:
+ bVisible = true;
+ break;
+ }
uno::Any aValue( bVisible );
xProps->setPropertyValue
(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsVisible" ) ), aValue);
@@ -427,6 +450,18 @@ ScVbaWorksheet::getProtectContents()throw (uno::RuntimeException)
sal_Bool
ScVbaWorksheet::getProtectDrawingObjects() throw (uno::RuntimeException)
{
+ SCTAB nTab = 0;
+ rtl::OUString aSheetName = getName();
+ uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( getModel(), uno::UNO_QUERY_THROW );
+ bool bSheetExists = ScVbaWorksheets::nameExists (xSpreadDoc, aSheetName, nTab);
+ if ( bSheetExists )
+ {
+ uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_QUERY_THROW );
+ ScDocument* pDoc = excel::getDocShell( xModel )->GetDocument();
+ ScTableProtection* pProtect = pDoc->GetTabProtection(nTab);
+ if ( pProtect )
+ return pProtect->isOptionEnabled( ScTableProtection::OBJECTS );
+ }
return sal_False;
}
@@ -444,10 +479,30 @@ ScVbaWorksheet::Activate() throw (uno::RuntimeException)
xSpreadsheet->setActiveSheet(getSheet());
}
+//liuchen 2009-9-2, support expand (but not replace) the active sheet
void
-ScVbaWorksheet::Select() throw (uno::RuntimeException)
+ScVbaWorksheet::Select(const css::uno::Any& aReplace) throw (uno::RuntimeException)
{
- Activate();
+ sal_Bool bReplace = true;
+ if (aReplace.hasValue() && aReplace.getValueTypeClass() == uno::TypeClass_BOOLEAN)
+ {
+ aReplace >>= bReplace;
+ }
+
+ uno::Reference< sheet::XSpreadsheetView > xSpreadsheet(
+ getModel()->getCurrentController(), uno::UNO_QUERY_THROW );
+ ScTabViewObj* pTabView = static_cast< ScTabViewObj* >( xSpreadsheet.get() );
+
+ if (bReplace)
+ {
+ pTabView->selectSheet(getSheet(), false);
+ }
+ else
+ {
+ uno::Reference< sheet::XSpreadsheet > xOldActiveSheet = pTabView->getActiveSheet();
+ pTabView->selectSheet(getSheet(), true);
+ pTabView->selectSheet(xOldActiveSheet, true);
+ }
}
void
@@ -509,18 +564,42 @@ ScVbaWorksheet::Copy( const uno::Any& Before, const uno::Any& After ) throw (uno
return;
}
- uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( getModel(), uno::UNO_QUERY );
+ ScVbaWorksheet* pDestSheet = static_cast< ScVbaWorksheet* >(xSheet.get());
+ uno::Reference <sheet::XSpreadsheetDocument> xDestDoc( pDestSheet->getModel(), uno::UNO_QUERY );
+ uno::Reference <sheet::XSpreadsheetDocument> xSrcDoc( getModel(), uno::UNO_QUERY );
+
SCTAB nDest = 0;
+ SCTAB nSrc = 0;
rtl::OUString aSheetName = xSheet->getName();
- if ( ScVbaWorksheets::nameExists (xSpreadDoc, aSheetName, nDest ) )
+ bool bSameDoc = ( pDestSheet->getModel() == getModel() );
+ bool bDestSheetExists = ScVbaWorksheets::nameExists (xDestDoc, aSheetName, nDest );
+ bool bSheetExists = ScVbaWorksheets::nameExists (xSrcDoc, aCurrSheetName, nSrc );
+
+ // set sheet name to be newSheet name
+ aSheetName = aCurrSheetName;
+ SCTAB nDummy=0;
+ if ( bSheetExists && bDestSheetExists )
{
sal_Bool bAfter = After.hasValue();
if(bAfter)
nDest++;
- uno::Reference<sheet::XSpreadsheets> xSheets = xSpreadDoc->getSheets();
- getNewSpreadsheetName(aSheetName,aCurrSheetName,xSpreadDoc);
- xSheets->copyByName(aCurrSheetName,aSheetName,nDest);
+ uno::Reference<sheet::XSpreadsheets> xSheets = xDestDoc->getSheets();
+ if ( bSameDoc || ScVbaWorksheets::nameExists( xDestDoc, aCurrSheetName, nDummy ) )
+ getNewSpreadsheetName(aSheetName,aCurrSheetName,xDestDoc);
+ if ( bSameDoc )
+ xSheets->copyByName(aCurrSheetName,aSheetName,nDest);
+ else
+ {
+ ScDocShell* pDestDocShell = excel::getDocShell( pDestSheet->getModel() );
+ ScDocShell* pSrcDocShell = excel::getDocShell( getModel() );
+ if ( pDestDocShell && pSrcDocShell )
+ pDestDocShell->TransferTab( *pSrcDocShell, static_cast<SCTAB>(nSrc), static_cast<SCTAB>(nDest), TRUE, TRUE );
+ }
}
+ // active the new sheet
+ uno::Reference< excel::XApplication > xApplication( Application(), uno::UNO_QUERY_THROW );
+ uno::Reference< excel::XWorksheet > xNewSheet( xApplication->Worksheets( uno::makeAny( aSheetName ) ), uno::UNO_QUERY_THROW );
+ xNewSheet->Activate();
}
@@ -572,13 +651,25 @@ ScVbaWorksheet::getSheetAtOffset(SCTAB offset) throw (uno::RuntimeException)
uno::Reference< excel::XWorksheet >
ScVbaWorksheet::getNext() throw (uno::RuntimeException)
{
- return getSheetAtOffset(static_cast<SCTAB>(1));
+ //VBA, minz@cn.ibm.com. catch the exception for index out of bound
+ try{
+ return getSheetAtOffset(static_cast<SCTAB>(1));
+ }catch( lang::IndexOutOfBoundsException& /*e*/ )
+ {
+ return NULL;
+ }
}
uno::Reference< excel::XWorksheet >
ScVbaWorksheet::getPrevious() throw (uno::RuntimeException)
{
- return getSheetAtOffset(-1);
+ //VBA, minz@cn.ibm.com. catch the exception for index out of bound
+ try{
+ return getSheetAtOffset(-1);
+ }catch( lang::IndexOutOfBoundsException& /*e*/ )
+ {
+ return NULL;
+ }
}
@@ -662,7 +753,7 @@ ScVbaWorksheet::ChartObjects( const uno::Any& Index ) throw (uno::RuntimeExcepti
uno::Reference< table::XTableChartsSupplier > xChartSupplier( getSheet(), uno::UNO_QUERY_THROW );
uno::Reference< table::XTableCharts > xTableCharts = xChartSupplier->getCharts();
- uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( mxSheet, uno::UNO_QUERY_THROW );
+ uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( getSheet(), uno::UNO_QUERY_THROW ); //VBA, minz@cn.ibm.com.
mxCharts = new ScVbaChartObjects( this, mxContext, xTableCharts, xDrawPageSupplier );
}
if ( Index.hasValue() )
@@ -981,7 +1072,7 @@ ScVbaWorksheet::getCodeName() throw (css::uno::RuntimeException)
sal_Int16
ScVbaWorksheet::getSheetID() throw (uno::RuntimeException)
{
- uno::Reference< sheet::XCellRangeAddressable > xAddressable( mxSheet, uno::UNO_QUERY_THROW );
+ uno::Reference< sheet::XCellRangeAddressable > xAddressable( getSheet(), uno::UNO_QUERY_THROW ); //VBA. minz@cn.ibm.com. if ActiveSheet, mxSheet is null.
return xAddressable->getRangeAddress().Sheet;
}
@@ -1017,3 +1108,5 @@ extern sdecl::ServiceDecl const serviceDecl(
"ScVbaWorksheet",
"ooo.vba.excel.Worksheet" );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaworksheet.hxx b/sc/source/ui/vba/vbaworksheet.hxx
index 78bcc2503a49..abcdf60398af 100644
--- a/sc/source/ui/vba/vbaworksheet.hxx
+++ b/sc/source/ui/vba/vbaworksheet.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,6 +43,7 @@
#include <ooo/vba/excel/XPageSetup.hpp>
#include <ooo/vba/excel/XHPageBreaks.hpp>
#include <ooo/vba/excel/XVPageBreaks.hpp>
+#include <com/sun/star/container/XNamed.hpp>
#include <vbahelper/vbahelperinterface.hxx>
#include "address.hxx"
@@ -91,8 +93,8 @@ public:
// Attributes
virtual ::rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException);
virtual void SAL_CALL setName( const ::rtl::OUString &rName ) throw (css::uno::RuntimeException);
- virtual sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setVisible( sal_Bool bVisible ) throw (css::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getVisible() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setVisible( ::sal_Int32 _Visible ) throw (css::uno::RuntimeException);
virtual ::sal_Int32 SAL_CALL getStandardWidth() throw (css::uno::RuntimeException);
virtual ::sal_Int32 SAL_CALL getStandardHeight() throw (css::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL getProtectionMode() throw (css::uno::RuntimeException);
@@ -115,7 +117,7 @@ public:
// Methods
virtual void SAL_CALL Activate() throw (css::uno::RuntimeException);
- virtual void SAL_CALL Select() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL Select(const css::uno::Any& aReplace) throw (css::uno::RuntimeException); //liuchen 2009-9-2, add the input parameter to support expand selection
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Range( const css::uno::Any& Cell1, const css::uno::Any& Cell2 ) throw (css::uno::RuntimeException);
virtual void SAL_CALL Move( const css::uno::Any& Before, const css::uno::Any& After ) throw (css::uno::RuntimeException) ;
virtual void SAL_CALL Copy( const css::uno::Any& Before, const css::uno::Any& After ) throw (css::uno::RuntimeException);
@@ -172,3 +174,4 @@ public:
#endif /* SC_VBA_WORKSHEET_HXX */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx
index 7fa5196a6b04..cb345950958b 100644
--- a/sc/source/ui/vba/vbaworksheets.cxx
+++ b/sc/source/ui/vba/vbaworksheets.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -499,3 +500,5 @@ ScVbaWorksheets::getServiceNames()
}
return false;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbaworksheets.hxx b/sc/source/ui/vba/vbaworksheets.hxx
index 2ced68bc9e27..9854c0447c1d 100644
--- a/sc/source/ui/vba/vbaworksheets.hxx
+++ b/sc/source/ui/vba/vbaworksheets.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -81,3 +82,5 @@ public:
};
#endif /* SC_VBA_WORKSHEETS_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbawsfunction.cxx b/sc/source/ui/vba/vbawsfunction.cxx
index 60daa7303f2e..b87ec852b9a5 100644
--- a/sc/source/ui/vba/vbawsfunction.cxx
+++ b/sc/source/ui/vba/vbawsfunction.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,6 +61,18 @@ void lclConvertDoubleToBoolean( uno::Any& rAny )
}
}
+void lclConvertBooleanToDouble( uno::Any& rAny )
+{
+ sal_Bool bValue( sal_False );
+ if ( rAny >>= bValue )
+ {
+ if ( bValue )
+ rAny <<= double( 1.0 );
+ else
+ rAny <<= double( 0.0 );
+ }
+}
+
} // namespace
ScVbaWSFunction::ScVbaWSFunction( const uno::Reference< XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext ) :
@@ -84,9 +97,57 @@ ScVbaWSFunction::invoke(const rtl::OUString& FunctionName, const uno::Sequence<
uno::Any* pArrayEnd = pArray + aParamTemp.getLength();
for( ; pArray < pArrayEnd; ++pArray )
{
- uno::Reference< excel::XRange > myRange( *pArray, uno::UNO_QUERY );
- if( myRange.is() )
- *pArray = myRange->getCellRange();
+ switch( pArray->getValueType().getTypeClass() )
+ {
+ case uno::TypeClass_BOOLEAN:
+ lclConvertBooleanToDouble( *pArray );
+ break;
+ case uno::TypeClass_INTERFACE:
+ {
+ uno::Reference< excel::XRange > myRange( *pArray, uno::UNO_QUERY );
+ if( myRange.is() )
+ *pArray = myRange->getCellRange();
+ }
+ break;
+ case uno::TypeClass_SEQUENCE:
+ {
+ // the sheet.FunctionAccess service doesn't deal with Sequences, only Sequences of Sequence
+ uno::Type aType = pArray->getValueType();
+ if ( aType.equals( getCppuType( (uno::Sequence<sal_Int16>*)0 ) ) )
+ {
+ uno::Sequence< uno::Sequence< sal_Int16 > > aTmp(1);
+ (*pArray) >>= aTmp[ 0 ];
+ (*pArray) <<= aTmp;
+ }
+ else if ( aType.equals( getCppuType( (uno::Sequence<sal_Int32>*)0 ) ) )
+ {
+ uno::Sequence< uno::Sequence< sal_Int32 > > aTmp(1);
+ (*pArray) >>= aTmp[ 0 ];
+ (*pArray) <<= aTmp;
+ }
+ else if ( aType.equals( getCppuType( (uno::Sequence<double>*)0 ) ) )
+ {
+ uno::Sequence< uno::Sequence< double > > aTmp(1);
+ (*pArray) >>= aTmp[ 0 ];
+ (*pArray) <<= aTmp;
+ }
+ else if ( aType.equals( getCppuType( (uno::Sequence<rtl::OUString>*)0 ) ) )
+ {
+ uno::Sequence< uno::Sequence< rtl::OUString > > aTmp(1);
+ (*pArray) >>= aTmp[ 0 ];
+ (*pArray) <<= aTmp;
+ }
+ else if ( aType.equals( getCppuType( (uno::Sequence<uno::Any>*)0 ) ) )
+ {
+ uno::Sequence< uno::Sequence<uno::Any > > aTmp(1);
+ (*pArray) >>= aTmp[ 0 ];
+ (*pArray) <<= aTmp;
+ }
+ }
+ break;
+ default:
+ break;
+ }
OSL_TRACE("Param[%d] is %s", (int)(pArray - aParamTemp.getConstArray()), rtl::OUStringToOString( comphelper::anyToString( *pArray ), RTL_TEXTENCODING_UTF8 ).getStr() );
}
}
@@ -257,3 +318,5 @@ ScVbaWSFunction::getServiceNames()
}
return aServiceNames;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbawsfunction.hxx b/sc/source/ui/vba/vbawsfunction.hxx
index ffd33849afe5..2e1c768b9588 100644
--- a/sc/source/ui/vba/vbawsfunction.hxx
+++ b/sc/source/ui/vba/vbawsfunction.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,3 +56,4 @@ public:
};
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/auditsh.cxx b/sc/source/ui/view/auditsh.cxx
index 2c80c154759d..115055b2f136 100644
--- a/sc/source/ui/view/auditsh.cxx
+++ b/sc/source/ui/view/auditsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -153,3 +154,4 @@ void ScAuditingShell::GetState( SfxItemSet& rSet )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/cellmergeoption.cxx b/sc/source/ui/view/cellmergeoption.cxx
index da531966cb19..ff5220ec907e 100644
--- a/sc/source/ui/view/cellmergeoption.cxx
+++ b/sc/source/ui/view/cellmergeoption.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -72,3 +73,5 @@ ScRange ScCellMergeOption::getFirstSingleRange() const
return getSingleRange(nTab);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index c880a29f8067..7cfa50a4e686 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1003,3 +1004,4 @@ void ScCellShell::GetState(SfxItemSet &rSet)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index de05496a12d8..750d3648631e 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -2193,3 +2194,5 @@ void ScCellShell::PasteFromClipboard( ScViewData* pViewData, ScTabViewShell* pTa
}
pTabViewShell->CellContentChanged(); // => PasteFromSystem() ???
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 2e318a920898..a74a73c85721 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -334,6 +335,20 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
}
break;
+ case SID_DATA_FORM:
+ {
+ ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
+ DBG_ASSERT(pFact, "ScAbstractFactory create fail!");//CHINA001
+
+ AbstractScDataFormDlg* pDlg = pFact->CreateScDataFormDlg( pTabViewShell->GetDialogParent(),RID_SCDLG_DATAFORM, pTabViewShell);
+ DBG_ASSERT(pDlg, "Dialog create fail!");//CHINA001
+
+ pDlg->Execute();
+
+ rReq.Done();
+ }
+ break;
+
case SID_SUBTOTALS:
{
const SfxItemSet* pArgs = rReq.GetArgs();
@@ -854,33 +869,6 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
if ( pNewDPObject )
pNewDPObject->SetOutRange( aDestPos );
-
-#if 0
- ScDBData* pDBData = pTabViewShell->GetDBData();
- String aErrMsg;
-
- pDBData->GetArea( nTab, nCol1, nRow1, nCol2, nRow2 );
-
- bAreaOk = TRUE;
- if ( nRow2-nRow1 < 1 )
- {
- // "mindestens eine Datenzeile"
- pTabViewShell->ErrorMessage(STR_PIVOT_INVALID_DBAREA);
- bAreaOk = FALSE;
- }
- else if (!pDBData->HasHeader())
- {
- if ( MessBox( pTabViewShell->GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES),
- ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), // "StarCalc"
- ScGlobal::GetRscString( STR_MSSG_MAKEAUTOFILTER_0 ) // Koepfe aus erster Zeile?
- ).Execute() == RET_YES )
- {
- pDBData->SetHeader( TRUE ); //! Undo ??
- }
- else
- bAreaOk = FALSE;
- }
-#endif
}
pTabViewShell->SetDialogDPObject( pNewDPObject ); // is copied
@@ -1401,3 +1389,4 @@ void __EXPORT ScCellShell::GetDBState( SfxItemSet& rSet )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index bd74d7794e65..a57835fdf54d 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -928,3 +929,4 @@ void ScCellShell::Execute( SfxRequest& rReq )
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/cellsh4.cxx b/sc/source/ui/view/cellsh4.cxx
index bd4708805a7d..f5c4e70ae98a 100644
--- a/sc/source/ui/view/cellsh4.cxx
+++ b/sc/source/ui/view/cellsh4.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -452,3 +453,4 @@ void ScCellShell::ExecutePage( SfxRequest& rReq )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/colrowba.cxx b/sc/source/ui/view/colrowba.cxx
index f2322f6de317..c94e08803594 100644
--- a/sc/source/ui/view/colrowba.cxx
+++ b/sc/source/ui/view/colrowba.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -415,3 +416,4 @@ BOOL ScRowBar::IsMirrored() // overloaded only for rows
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx
index b1969fbcdf70..9dc58f936b81 100644
--- a/sc/source/ui/view/dbfunc.cxx
+++ b/sc/source/ui/view/dbfunc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -99,7 +100,7 @@ void ScDBFunc::GotoDBArea( const String& rDBName )
// aktuellen Datenbereich fuer Sortieren / Filtern suchen
-ScDBData* ScDBFunc::GetDBData( BOOL bMark, ScGetDBMode eMode, ScGetDBSelection eSel, bool bShrinkToData, bool bExpandRows )
+ScDBData* ScDBFunc::GetDBData( BOOL bMark, ScGetDBMode eMode, ScGetDBSelection eSel, bool /*bShrinkToData*/, bool bExpandRows )
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDBData* pData = NULL;
@@ -511,3 +512,4 @@ BOOL ScDBFunc::ImportData( const ScImportParam& rParam, BOOL bRecord )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/dbfunc2.cxx b/sc/source/ui/view/dbfunc2.cxx
index 54ddde9b7710..f789daea996d 100644
--- a/sc/source/ui/view/dbfunc2.cxx
+++ b/sc/source/ui/view/dbfunc2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -75,3 +76,4 @@ void ScDBFunc::UpdateCharts( BOOL bAllCharts )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index 9004c5fc486f..2c2df72120fa 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -2369,3 +2370,5 @@ void ScDBFunc::RepeatDB( BOOL bRecord )
else // "Keine Operationen auszufuehren"
ErrorMessage(STR_MSSG_REPEATDB_0);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/dbfunc4.cxx b/sc/source/ui/view/dbfunc4.cxx
index 870622293e37..a96dc2970875 100644
--- a/sc/source/ui/view/dbfunc4.cxx
+++ b/sc/source/ui/view/dbfunc4.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -100,3 +101,4 @@ USHORT ScDBFunc::DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, BOOL b
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/drawattr.cxx b/sc/source/ui/view/drawattr.cxx
index fa7872617c03..36615b14525d 100644
--- a/sc/source/ui/view/drawattr.cxx
+++ b/sc/source/ui/view/drawattr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -80,3 +81,4 @@ SfxPoolItem* __EXPORT SvxDrawToolItem::Create( SvStream& rStream, USHORT nVer )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/drawutil.cxx b/sc/source/ui/view/drawutil.cxx
index ba250767c169..4270170e099a 100644
--- a/sc/source/ui/view/drawutil.cxx
+++ b/sc/source/ui/view/drawutil.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -114,3 +115,4 @@ void ScDrawUtil::CalcScale( ScDocument* pDoc, SCTAB nTab,
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/drawvie2.cxx b/sc/source/ui/view/drawvie2.cxx
index c760ce86a3d7..c047fcdbd6fe 100644
--- a/sc/source/ui/view/drawvie2.cxx
+++ b/sc/source/ui/view/drawvie2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,3 +61,4 @@ void ScDrawView::VCRemoveWin( Window* /* pWin */ )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/drawvie3.cxx b/sc/source/ui/view/drawvie3.cxx
index ffa1efe28654..3ef141f2c526 100644
--- a/sc/source/ui/view/drawvie3.cxx
+++ b/sc/source/ui/view/drawvie3.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -180,3 +181,4 @@ void ScDrawView::UpdateIMap( SdrObject* pObj )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx
index 3a28096d2853..c2340aa0a474 100644
--- a/sc/source/ui/view/drawvie4.cxx
+++ b/sc/source/ui/view/drawvie4.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -104,44 +105,6 @@ void lcl_CheckOle( const SdrMarkList& rMarkList, BOOL& rAnyOle, BOOL& rOneOle )
}
}
-#if 0
-void lcl_RefreshChartData( SdrModel* pModel, ScDocument* pSourceDoc )
-{
- USHORT nPages = pModel->GetPageCount();
- for (SCTAB nTab=0; nTab<nPages; nTab++)
- {
- SdrPage* pPage = pModel->GetPage(nTab);
- SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS );
- SdrObject* pObject = aIter.Next();
- while (pObject)
- {
- if ( pObject->GetObjIdentifier() == OBJ_OLE2 )
- {
- SvInPlaceObjectRef aIPObj = ((SdrOle2Obj*)pObject)->GetObjRef();
- if ( aIPObj.Is() && SotExchange::IsChart( aIPObj->GetStorage()->GetClassName() ) )
- {
- SchMemChart* pOldData = SchDLL::GetChartData(aIPObj);
- if ( pOldData )
- {
- // create data from source document
- ScChartArray aArray( pSourceDoc, *pOldData );
- if ( aArray.IsValid() )
- {
- SchMemChart* pNewData = aArray.CreateMemChart();
- SchDLL::Update( aIPObj, pNewData );
- delete pNewData;
- ((SdrOle2Obj*)pObject)->GetNewReplacement();
- }
- }
- }
- }
- pObject = aIter.Next();
- }
- }
-}
-#endif
-
-
BOOL ScDrawView::BeginDrag( Window* pWindow, const Point& rStartPos )
{
BOOL bReturn = FALSE;
@@ -392,3 +355,4 @@ void ScDrawView::SetMarkedOriginalSize()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index 2fd43356720a..d47136d8fc51 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -696,7 +697,7 @@ BOOL ScDrawView::SelectObject( const String& rName )
}
-FASTBOOL ScDrawView::InsertObjectSafe(SdrObject* pObj, SdrPageView& rPV, ULONG nOptions)
+bool ScDrawView::InsertObjectSafe(SdrObject* pObj, SdrPageView& rPV, ULONG nOptions)
{
// Markierung nicht aendern, wenn Ole-Objekt aktiv
// (bei Drop aus Ole-Objekt wuerde sonst mitten im ExecuteDrag deaktiviert!)
@@ -805,3 +806,5 @@ void ScDrawView::MarkDropObj( SdrObject* pObj )
}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index e282cbef2881..01e5b5a9a3b1 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1198,3 +1199,4 @@ void ScEditShell::ExecuteTrans( SfxRequest& rReq )
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 0e5e7ebb71b9..6b71dbc61514 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -2269,3 +2270,5 @@ short ScFormatShell::GetCurrentNumberFormatType()
}
return nType;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/galwrap.cxx b/sc/source/ui/view/galwrap.cxx
index 1d92cb5f303a..2e5f8f831bad 100644
--- a/sc/source/ui/view/galwrap.cxx
+++ b/sc/source/ui/view/galwrap.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -77,3 +78,4 @@ String GalleryGetFilterName()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/gridmerg.cxx b/sc/source/ui/view/gridmerg.cxx
index 5a1f501e38ca..31dba191b2fd 100644
--- a/sc/source/ui/view/gridmerg.cxx
+++ b/sc/source/ui/view/gridmerg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -172,3 +173,4 @@ void ScGridMerger::Flush()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 4fe8b2435e66..1f21e93d28d3 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1511,17 +1512,6 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
// Filter-Popup beendet sich mit eigenem Mausklick, nicht erst beim Klick
// in das GridWindow, darum ist die folgende Abfrage nicht mehr noetig:
-#if 0
- // merken, dass FilterBox geloescht wird, damit sichergestellt
- // ist, dass in diesem Handler nicht an gleicher Stelle wieder
- // eine neue geoeffnet wird.
- BOOL bWasFilterBox = ( pFilterBox != NULL &&
- ((Window*)pFilterBox)->IsVisible() &&
- !pFilterBox->IsDataSelect() );
- SCCOL nOldColFBox = bWasFilterBox ? pFilterBox->GetCol() : 0;
- SCROW nOldRowFBox = bWasFilterBox ? pFilterBox->GetRow() : 0;
-#endif
-
ClickExtern(); // loescht FilterBox, wenn vorhanden
HideNoteMarker(); // Notiz-Anzeige
@@ -3543,21 +3533,6 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
// pViewData->GetView()->DrawDragRect( nDragStartX, nDragStartY, nDragEndX, nDragEndY, eWhich );
UpdateDragRectOverlay();
-
- // show target position as tip help
-#if 0
- if (Help::IsQuickHelpEnabled())
- {
- ScRange aRange( nDragStartX, nDragStartY, nTab, nDragEndX, nDragEndY, nTab );
- String aHelpStr;
- aRange.Format( aHelpStr, SCA_VALID ); // non-3D
-
- Point aPos = Pointer::GetPosPixel();
- USHORT nAlign = QUICKHELP_BOTTOM|QUICKHELP_RIGHT;
- Rectangle aRect( aPos, aPos );
- Help::ShowQuickHelp(aRect, aHelpStr, nAlign);
- }
-#endif
}
}
@@ -5856,3 +5831,5 @@ void ScGridWindow::flushOverlayManager()
// ---------------------------------------------------------------------------
// eof
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index 3574426f731b..4aa2b1476759 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -144,7 +145,8 @@ bool ScGridWindow::DoAutoFilterButton( SCCOL nCol, SCROW nRow, const MouseEvent&
// Check if the mouse cursor is clicking on the popup arrow box.
mpFilterButton.reset(new ScDPFieldButton(this, &GetSettings().GetStyleSettings(), &pViewData->GetZoomX(), &pViewData->GetZoomY(), pDoc));
- mpFilterButton->setBoundingBox(aScrPos, aScrSize);
+ mpFilterButton->setBoundingBox(aScrPos, aScrSize, bLayoutRTL);
+ mpFilterButton->setPopupLeft(bLayoutRTL); // #i114944# AutoFilter button is left-aligned in RTL
Point aPopupPos;
Size aPopupSize;
mpFilterButton->getPopupBoundingBox(aPopupPos, aPopupSize);
@@ -367,6 +369,8 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, BOOL bMove )
bool ScGridWindow::DPTestFieldPopupArrow(const MouseEvent& rMEvt, const ScAddress& rPos, ScDPObject* pDPObj)
{
+ BOOL bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() );
+
// Get the geometry of the cell.
Point aScrPos = pViewData->GetScrPos(rPos.Col(), rPos.Row(), eWhich);
long nSizeX, nSizeY;
@@ -375,7 +379,8 @@ bool ScGridWindow::DPTestFieldPopupArrow(const MouseEvent& rMEvt, const ScAddres
// Check if the mouse cursor is clicking on the popup arrow box.
ScDPFieldButton aBtn(this, &GetSettings().GetStyleSettings());
- aBtn.setBoundingBox(aScrPos, aScrSize);
+ aBtn.setBoundingBox(aScrPos, aScrSize, bLayoutRTL);
+ aBtn.setPopupLeft(false); // DataPilot popup is always right-aligned for now
Point aPopupPos;
Size aPopupSize;
aBtn.getPopupBoundingBox(aPopupPos, aPopupSize);
@@ -516,9 +521,16 @@ void ScGridWindow::DPLaunchFieldPopupMenu(
}
}
+ BOOL bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() );
+
Rectangle aCellRect(rScrPos, rScrSize);
const Size& rPopupSize = mpDPFieldPopup->getWindowSize();
- if (rScrSize.getWidth() > rPopupSize.getWidth())
+ if (bLayoutRTL)
+ {
+ // RTL: rScrPos is logical-left (visual right) position, always right-align with that
+ aCellRect.SetPos(Point(rScrPos.X() - rPopupSize.Width() + 1, rScrPos.Y()));
+ }
+ else if (rScrSize.getWidth() > rPopupSize.getWidth())
{
// If the cell width is larger than the popup window width, launch it
// right-aligned with the cell.
@@ -1044,3 +1056,4 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx
index f16c2fe1ada7..9d220008907e 100644
--- a/sc/source/ui/view/gridwin3.cxx
+++ b/sc/source/ui/view/gridwin3.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -441,3 +442,4 @@ void ScGridWindow::DrawMarkDropObj( SdrObject* pObj )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index c596e7e62c79..136522fec177 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -825,38 +826,6 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
if ( pViewData->IsRefMode() && nTab >= pViewData->GetRefStartZ() && nTab <= pViewData->GetRefEndZ() )
{
- // The AutoFill shrink area has an own overlay now
-#if 0
- // Schraffur beim Loeschen per AutoFill
- if ( pViewData->GetRefType() == SC_REFTYPE_FILL )
- {
- ScRange aRange;
- if ( pViewData->GetDelMark( aRange ) )
- {
- if ( aRange.aStart.Col() < nX1 ) aRange.aStart.SetCol(nX1);
- if ( aRange.aEnd.Col() > nX2 ) aRange.aEnd.SetCol(nX2);
- if ( aRange.aStart.Row() < nY1 ) aRange.aStart.SetRow(nY1);
- if ( aRange.aEnd.Row() > nY2 ) aRange.aEnd.SetRow(nY2);
- if ( aRange.aStart.Col() <= aRange.aEnd.Col() &&
- aRange.aStart.Row() <= aRange.aEnd.Row() )
- {
- Point aStart = pViewData->GetScrPos( aRange.aStart.Col(),
- aRange.aStart.Row(), eWhich );
- Point aEnd = pViewData->GetScrPos( aRange.aEnd.Col()+1,
- aRange.aEnd.Row()+1, eWhich );
- aEnd.X() -= 1;
- aEnd.Y() -= 1;
-
- // Markierung aufheben - roter Rahmen bleibt stehen
- Rectangle aRect( aStart,aEnd );
- Invert( aRect, INVERT_HIGHLIGHT );
-
- //! Delete-Bereich extra kennzeichnen?!?!?
- }
- }
- }
-#endif
-
Color aRefColor( rColorCfg.GetColorValue(svtools::CALCREFERENCE).nColor );
aOutputData.DrawRefMark( pViewData->GetRefStartX(), pViewData->GetRefStartY(),
pViewData->GetRefEndX(), pViewData->GetRefEndY(),
@@ -993,15 +962,14 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
Color aManual( rColorCfg.GetColorValue(svtools::CALCPAGEBREAKMANUAL).nColor );
Color aAutomatic( rColorCfg.GetColorValue(svtools::CALCPAGEBREAK).nColor );
- String aPageText = ScGlobal::GetRscString( STR_PAGE );
+ String aPageStr = ScGlobal::GetRscString( STR_PGNUM );
if ( nPageScript == 0 )
{
// get script type of translated "Page" string only once
- nPageScript = pDoc->GetStringScriptType( aPageText );
+ nPageScript = pDoc->GetStringScriptType( aPageStr );
if (nPageScript == 0)
nPageScript = ScGlobal::GetDefaultScriptType();
}
- aPageText += ' ';
Font aFont;
ScEditEngineDefaulter* pEditEng = NULL;
@@ -1126,8 +1094,7 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
nPageNo += ((long)nColPos)*nRowBreaks+nRowPos;
else
nPageNo += ((long)nRowPos)*nColBreaks+nColPos;
- String aPageStr = aPageText;
- aPageStr += String::CreateFromInt32(nPageNo);
+ aPageStr.SearchAndReplaceAscii("%1", String::CreateFromInt32(nPageNo));
if ( pEditEng )
{
@@ -1275,7 +1242,8 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2
pViewData->GetMergeSizePixel( nCol, nRow, nSizeX, nSizeY );
Point aScrPos = pViewData->GetScrPos( nCol, nRow, eWhich );
- aCellBtn.setBoundingBox(aScrPos, Size(nSizeX-1, nSizeY-1));
+ aCellBtn.setBoundingBox(aScrPos, Size(nSizeX-1, nSizeY-1), bLayoutRTL);
+ aCellBtn.setPopupLeft(bLayoutRTL); // #i114944# AutoFilter button is left-aligned in RTL
aCellBtn.setDrawBaseButton(false);
aCellBtn.setDrawPopupButton(true);
aCellBtn.setHasHiddenMember(bArrowState);
@@ -1299,17 +1267,13 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2
pViewData->GetMergeSizePixel( nCol, nRow, nSizeX, nSizeY );
long nPosX = aScrPos.X();
long nPosY = aScrPos.Y();
- if ( bLayoutRTL )
- {
- // overwrite the right, not left (visually) grid as long as the
- // left/right colors of the button borders aren't mirrored.
- nPosX -= nSizeX - 2;
- }
+ // bLayoutRTL is handled in setBoundingBox
String aStr;
pDoc->GetString(nCol, nRow, nTab, aStr);
aCellBtn.setText(aStr);
- aCellBtn.setBoundingBox(Point(nPosX, nPosY), Size(nSizeX-1, nSizeY-1));
+ aCellBtn.setBoundingBox(Point(nPosX, nPosY), Size(nSizeX-1, nSizeY-1), bLayoutRTL);
+ aCellBtn.setPopupLeft(false); // DataPilot popup is always right-aligned for now
aCellBtn.setDrawBaseButton(true);
aCellBtn.setDrawPopupButton(pInfo->bPopupButton);
aCellBtn.setHasHiddenMember(pInfo->bFilterActive);
@@ -1984,3 +1948,4 @@ void ScGridWindow::DataChanged( const DataChangedEvent& rDCEvt )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx
index 4a9dbbaf98b6..1e4c09fd8c6b 100644
--- a/sc/source/ui/view/gridwin5.cxx
+++ b/sc/source/ui/view/gridwin5.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -343,14 +344,12 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
if ( pDrView->PickObj(aMDPos, pDrView->getHitTolLog(), pHit, pPV, SDRSEARCH_DEEP ) )
pObj = pHit;
}
-#ifdef ISSUE66550_HLINK_FOR_SHAPES
ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj );
if ( pInfo && (pInfo->GetHlink().getLength() > 0) )
{
aPixRect = LogicToPixel(aVEvt.pObj->GetLogicRect());
aHelpText = pInfo->GetHlink();
}
-#endif
}
}
}
@@ -437,3 +436,5 @@ com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
return xAccessible;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/hdrcont.cxx b/sc/source/ui/view/hdrcont.cxx
index 25f3c1c8f10a..1e2d45e4c091 100644
--- a/sc/source/ui/view/hdrcont.cxx
+++ b/sc/source/ui/view/hdrcont.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -421,15 +422,6 @@ void ScHeaderControl::Paint( const Rectangle& rRect )
}
}
-#if 0
- // 3D border is no longer used
- SetLineColor( rStyleSettings.GetLightColor() );
- if (bVertical)
- DrawLine( Point( 0, nPStart ), Point( 0, nLineEnd ) );
- else
- DrawLine( Point( nPStart, 0 ), Point( nLineEnd, 0 ) );
-#endif
-
SetLineColor( rStyleSettings.GetDarkShadowColor() );
if (bVertical)
{
@@ -1044,3 +1036,4 @@ void ScHeaderControl::SetMarking( BOOL /* bSet */ )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/hintwin.cxx b/sc/source/ui/view/hintwin.cxx
index 568923f42838..301ba616e769 100644
--- a/sc/source/ui/view/hintwin.cxx
+++ b/sc/source/ui/view/hintwin.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -106,3 +107,5 @@ void __EXPORT ScHintWindow::Paint( const Rectangle& /* rRect */ )
aLineStart.Y() += nTextHeight;
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/imapwrap.cxx b/sc/source/ui/view/imapwrap.cxx
index b2f4fb714775..88e78ccf1ee6 100644
--- a/sc/source/ui/view/imapwrap.cxx
+++ b/sc/source/ui/view/imapwrap.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -74,3 +75,4 @@ const ImageMap& ScIMapDlgGetMap( SvxIMapDlg* pDlg )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/invmerge.cxx b/sc/source/ui/view/invmerge.cxx
index a895dc5faec0..cb913677e962 100644
--- a/sc/source/ui/view/invmerge.cxx
+++ b/sc/source/ui/view/invmerge.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -190,3 +191,4 @@ void ScInvertMerger::AddRect( const Rectangle& rRect )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/makefile.mk b/sc/source/ui/view/makefile.mk
index f7be2b3cbaf3..3b1d570f71c0 100644
--- a/sc/source/ui/view/makefile.mk
+++ b/sc/source/ui/view/makefile.mk
@@ -31,9 +31,7 @@ TARGET=view
# --- Settings -----------------------------------------------------
-.INCLUDE : scpre.mk
.INCLUDE : settings.mk
-.INCLUDE : sc.mk
.INCLUDE : $(PRJ)$/util$/makefile.pmk
# --- Files --------------------------------------------------------
diff --git a/sc/source/ui/view/notemark.cxx b/sc/source/ui/view/notemark.cxx
index 065ba5899817..3ab921f8956e 100644
--- a/sc/source/ui/view/notemark.cxx
+++ b/sc/source/ui/view/notemark.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -198,3 +199,4 @@ void ScNoteMarker::InvalidateWin()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/olinewin.cxx b/sc/source/ui/view/olinewin.cxx
index b1e82fd9217f..9fd8e497d3b7 100644
--- a/sc/source/ui/view/olinewin.cxx
+++ b/sc/source/ui/view/olinewin.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1043,3 +1044,4 @@ void ScOutlineWindow::KeyInput( const KeyEvent& rKEvt )
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/olkact.cxx b/sc/source/ui/view/olkact.cxx
index 248777f4e473..a5f63f5a15bd 100644
--- a/sc/source/ui/view/olkact.cxx
+++ b/sc/source/ui/view/olkact.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -280,3 +281,4 @@ void DeActivateOlk( ScViewData* /* pViewData */ )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 38622bf18752..fceb71a335db 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -401,20 +402,6 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage )
BOOL bDraw = bGrid || nBreakOld; // einfaches Gitter nur wenn eingestellt
- //! Mit dieser Abfrage wird zuviel weggelassen, wenn ein automatischer
- //! Umbruch mitten in den Wiederholungsspalten liegt.
- //! Dann lieber den aeusseren Rahmen zweimal ausgeben...
-#if 0
- // auf dem Drucker die Aussen-Linien weglassen (werden getrennt ausgegeben)
- if ( eType == OUTTYPE_PRINTER && !bMetaFile )
- {
- if ( nX == MAXCOL )
- bDraw = FALSE;
- else if (pDoc->HasColBreak(nXplus1, nTab))
- bDraw = FALSE;
- }
-#endif
-
USHORT nWidthXplus2 = pRowInfo[0].pCellInfo[nXplus2].nWidth;
bSingle = bSingleGrid; //! in Fillinfo holen !!!!!
if ( nX<MAXCOL && !bSingle )
@@ -530,20 +517,6 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage )
BOOL bDraw = bGrid || nBreakOld; // einfaches Gitter nur wenn eingestellt
- //! Mit dieser Abfrage wird zuviel weggelassen, wenn ein automatischer
- //! Umbruch mitten in den Wiederholungszeilen liegt.
- //! Dann lieber den aeusseren Rahmen zweimal ausgeben...
-#if 0
- // auf dem Drucker die Aussen-Linien weglassen (werden getrennt ausgegeben)
- if ( eType == OUTTYPE_PRINTER && !bMetaFile )
- {
- if ( nY == MAXROW )
- bDraw = FALSE;
- else if (pDoc->HasRowBreak(nYplus1, nTab))
- bDraw = FALSE;
- }
-#endif
-
BOOL bNextYisNextRow = (pRowInfo[nArrYplus1].nRowNo == nYplus1);
bSingle = !bNextYisNextRow; // Hidden
for (SCCOL i=nX1; i<=nX2 && !bSingle; i++)
@@ -2446,12 +2419,6 @@ void ScOutputData::DrawClipMarks()
// visually left
Rectangle aMarkRect = aCellRect;
aMarkRect.Right() = aCellRect.Left()+nMarkPixel-1;
-#if 0
- //! Test
- pDev->SetLineColor(); pDev->SetFillColor(COL_YELLOW);
- pDev->DrawRect(aMarkRect);
- //! Test
-#endif
SvxFont::DrawArrow( *pDev, aMarkRect, aMarkSize, aArrowFillCol, TRUE );
}
if ( pInfo->nClipMark & ( bLayoutRTL ? SC_CLIPMARK_LEFT : SC_CLIPMARK_RIGHT ) )
@@ -2459,12 +2426,6 @@ void ScOutputData::DrawClipMarks()
// visually right
Rectangle aMarkRect = aCellRect;
aMarkRect.Left() = aCellRect.Right()-nMarkPixel+1;
-#if 0
- //! Test
- pDev->SetLineColor(); pDev->SetFillColor(COL_LIGHTGREEN);
- pDev->DrawRect(aMarkRect);
- //! Test
-#endif
SvxFont::DrawArrow( *pDev, aMarkRect, aMarkSize, aArrowFillCol, FALSE );
}
}
@@ -2479,3 +2440,4 @@ void ScOutputData::DrawClipMarks()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 74724b45b5be..7f9c1a00deef 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -81,7 +82,7 @@
#include <math.h>
//! Autofilter-Breite mit column.cxx zusammenfassen
-#define DROPDOWN_BITMAP_SIZE 17
+#define DROPDOWN_BITMAP_SIZE 18
#define DRAWTEXT_MAX 32767
@@ -1306,7 +1307,8 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY
( static_cast<const ScMergeFlagAttr&>(rPattern.GetItem(ATTR_MERGE_FLAG)).GetValue() & SC_MF_AUTO ) &&
( !bBreak || pRefDevice == pFmtDevice ) )
{
- long nFilter = Min( nMergeSizeY, (long) DROPDOWN_BITMAP_SIZE );
+ // filter drop-down width is now independent from row height
+ const long nFilter = DROPDOWN_BITMAP_SIZE;
BOOL bFit = ( nNeeded + nFilter <= nMergeSizeX );
if ( bFit || bCellIsValue )
{
@@ -1329,17 +1331,6 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY
rParam.maAlignRect.Justify();
rParam.maClipRect.Justify();
-
-#if 0
- //! Test !!!
- pDev->Push();
- pDev->SetLineColor();
- pDev->SetFillColor( COL_LIGHTGREEN );
- pDev->DrawRect( pDev->PixelToLogic(rParam.maClipRect) );
- pDev->DrawRect( rParam.maClipRect ); // print preview
- pDev->Pop();
- //! Test !!!
-#endif
}
void ScOutputData::DrawStrings( BOOL bPixelToLogic )
@@ -2401,11 +2392,6 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
long nInitPosX = nScrX;
if ( bLayoutRTL )
{
-#if 0
- Size aOnePixel = pDev->PixelToLogic(Size(1,1));
- long nOneX = aOnePixel.Width();
- nInitPosX += nMirrorW - nOneX;
-#endif
nInitPosX += nMirrorW - 1;
}
long nLayoutSign = bLayoutRTL ? -1 : 1;
@@ -2933,20 +2919,6 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
}
}
-#if 0
- long nClipStartY = nStartY;
- if (nArrY==0 || bVisChanged)
- {
- if ( nClipStartY < nRowPosY )
- {
- long nDif = nRowPosY - nClipStartY;
- bClip = TRUE;
- nClipStartY = nRowPosY;
- aClipSize.Height() -= nDif;
- }
- }
-#endif
-
Rectangle aLogicClip;
if (bClip || bSimClip)
{
@@ -3223,11 +3195,6 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
long nInitPosX = nScrX;
if ( bLayoutRTL )
{
-#if 0
- Size aOnePixel = pDev->PixelToLogic(Size(1,1));
- long nOneX = aOnePixel.Width();
- nInitPosX += nMirrorW - nOneX;
-#endif
nInitPosX += nMirrorW - 1;
}
long nLayoutSign = bLayoutRTL ? -1 : 1;
@@ -3731,20 +3698,11 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
eOrient!=SVX_ORIENTATION_STACKED &&
pInfo && pInfo->bAutoFilter)
{
- if (pRowInfo[nArrY].nHeight < DROPDOWN_BITMAP_SIZE)
- {
- if (bPixelToLogic)
- nAvailWidth -= pRefDevice->PixelToLogic(Size(0,pRowInfo[nArrY].nHeight)).Height();
- else
- nAvailWidth -= pRowInfo[nArrY].nHeight;
- }
+ // filter drop-down width is now independent from row height
+ if (bPixelToLogic)
+ nAvailWidth -= pRefDevice->PixelToLogic(Size(0,DROPDOWN_BITMAP_SIZE)).Height();
else
- {
- if (bPixelToLogic)
- nAvailWidth -= pRefDevice->PixelToLogic(Size(0,DROPDOWN_BITMAP_SIZE)).Height();
- else
- nAvailWidth -= DROPDOWN_BITMAP_SIZE;
- }
+ nAvailWidth -= DROPDOWN_BITMAP_SIZE;
long nComp = nEngineWidth;
if (nAvailWidth<nComp) nAvailWidth=nComp;
}
@@ -3917,3 +3875,4 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/output3.cxx b/sc/source/ui/view/output3.cxx
index 2c368937e156..b5bb920fb209 100644
--- a/sc/source/ui/view/output3.cxx
+++ b/sc/source/ui/view/output3.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -274,3 +275,4 @@ void ScOutputData::DrawingSingle(const sal_uInt16 nLayer)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/overlayobject.cxx b/sc/source/ui/view/overlayobject.cxx
index 7f44f451188f..a477f30576b1 100644
--- a/sc/source/ui/view/overlayobject.cxx
+++ b/sc/source/ui/view/overlayobject.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -102,3 +103,5 @@ Primitive2DSequence ScOverlayDashedBorder::createOverlayObjectPrimitive2DSequenc
return drawinglayer::primitive2d::Primitive2DSequence(&aReference, 1);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/pfuncache.cxx b/sc/source/ui/view/pfuncache.cxx
index 6a206ef3eb13..5fe990aad697 100644
--- a/sc/source/ui/view/pfuncache.cxx
+++ b/sc/source/ui/view/pfuncache.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -72,6 +73,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
@@ -194,3 +197,4 @@ long ScPrintFuncCache::GetDisplayStart( SCTAB nTab ) const
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/pgbrksh.cxx b/sc/source/ui/view/pgbrksh.cxx
index 0e792b2bb279..e1d493dd3f24 100644
--- a/sc/source/ui/view/pgbrksh.cxx
+++ b/sc/source/ui/view/pgbrksh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -83,3 +84,4 @@ ScPageBreakShell::~ScPageBreakShell()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/pivotsh.cxx b/sc/source/ui/view/pivotsh.cxx
index d52759f5353e..f23082e1a041 100644
--- a/sc/source/ui/view/pivotsh.cxx
+++ b/sc/source/ui/view/pivotsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -198,3 +199,4 @@ ScDPObject* ScPivotShell::GetCurrDPObject()
rViewData.GetCurX(), rViewData.GetCurY(), rViewData.GetTabNo() );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index 3ab6dc140484..8317d9df747c 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -174,13 +175,6 @@ void ScPreview::UpdateDrawView() // nTab muss richtig sein
pDrawView->SetPrintPreview( TRUE );
pDrawView->ShowSdrPage(pPage);
}
-#if 0
- else if ( !pDrawView->GetSdrPageView()) // angezeigte Page umstellen
- {
- pDrawView->HideSdrPage();
- pDrawView->ShowSdrPage(pDrawView->GetModel()->GetPage(nTab));
- }
-#endif
}
else if ( pDrawView )
{
@@ -1611,3 +1605,5 @@ void ScPreview::DrawInvert( long nDragPos, USHORT nFlags )
}
}
//Issue51656 Add resizeable margin on page preview from maoyg
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/prevloc.cxx b/sc/source/ui/view/prevloc.cxx
index 9ddb63a6a6d4..22e24170fba0 100644
--- a/sc/source/ui/view/prevloc.cxx
+++ b/sc/source/ui/view/prevloc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -752,3 +753,4 @@ BOOL ScPreviewLocationData::GetMainCellRange( ScRange& rRange, Rectangle& rPixRe
return FALSE; // not found
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index d12c5492f883..ec316617e20e 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1232,3 +1233,4 @@ ScDocument* ScPreviewShell::GetDocument()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/prevwsh2.cxx b/sc/source/ui/view/prevwsh2.cxx
index 07af90f797aa..6677798f9dcf 100644
--- a/sc/source/ui/view/prevwsh2.cxx
+++ b/sc/source/ui/view/prevwsh2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -355,3 +356,4 @@ void __EXPORT ScPreviewShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index 378ea1233cf9..8180c1b8ea1e 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1146,7 +1147,7 @@ void ScPrintFunc::SetDateTime( const Date& rDate, const Time& rTime )
void lcl_DrawGraphic( const Graphic &rGraphic, OutputDevice *pOut,
const Rectangle &rGrf, const Rectangle &rOut )
{
- const FASTBOOL bNotInside = !rOut.IsInside( rGrf );
+ const bool bNotInside = !rOut.IsInside( rGrf );
if ( bNotInside )
{
pOut->Push();
@@ -1181,8 +1182,8 @@ void lcl_DrawGraphic( const SvxBrushItem &rBrush, OutputDevice *pOut, OutputDevi
Point aPos;
Size aDrawSize = aGrfSize;
- FASTBOOL bDraw = TRUE;
-// FASTBOOL bRetouche = TRUE;
+ bool bDraw = TRUE;
+// bool bRetouche = TRUE;
switch ( ePos )
{
case GPOS_LT: aPos = rOrg.TopLeft();
@@ -3200,3 +3201,4 @@ ScJobSetup::ScJobSetup( SfxPrinter* pPrinter )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/reffact.cxx b/sc/source/ui/view/reffact.cxx
index 0d5d64964f5c..21d66c5a39be 100644
--- a/sc/source/ui/view/reffact.cxx
+++ b/sc/source/ui/view/reffact.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -432,3 +433,5 @@ ScValidityRefChildWin::~ScValidityRefChildWin()
pWindow = NULL;
}
//-->Added by PengYunQuan for Validity Cell Range Picker
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/scextopt.cxx b/sc/source/ui/view/scextopt.cxx
index fe5a91f54bd4..c9af56f00d33 100644
--- a/sc/source/ui/view/scextopt.cxx
+++ b/sc/source/ui/view/scextopt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -223,3 +224,4 @@ void ScExtDocOptions::SetCodeName( SCTAB nTab, const String& rCodeName )
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx
index 72ee0fdaadfa..52139ccb8f04 100644
--- a/sc/source/ui/view/select.cxx
+++ b/sc/source/ui/view/select.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -422,25 +423,8 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
nEndX,nEndY,nTab ) );
pViewData->GetView()->UpdateShrinkOverlay();
-#if 0
- if ( bOldDelMark )
- {
- ScUpdateRect aRect( aDelRange.aStart.Col(), aDelRange.aStart.Row(),
- aDelRange.aEnd.Col(), aDelRange.aEnd.Row() );
- aRect.SetNew( nDelStartX,nDelStartY, nEndX,nEndY );
- SCCOL nPaintStartX;
- SCROW nPaintStartY;
- SCCOL nPaintEndX;
- SCROW nPaintEndY;
- if (aRect.GetDiff( nPaintStartX, nPaintStartY, nPaintEndX, nPaintEndY ))
- pViewData->GetView()->
- PaintArea( nPaintStartX, nPaintStartY,
- nPaintEndX, nPaintEndY, SC_UPDATE_MARKS );
- }
- else
-#endif
- pViewData->GetView()->
- PaintArea( nStartX,nDelStartY, nEndX,nEndY, SC_UPDATE_MARKS );
+ pViewData->GetView()->
+ PaintArea( nStartX,nDelStartY, nEndX,nEndY, SC_UPDATE_MARKS );
nPosX = nEndX; // roten Rahmen um ganzen Bereich lassen
nPosY = nEndY;
@@ -458,12 +442,6 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
{
pViewData->ResetDelMark();
pViewData->GetView()->UpdateShrinkOverlay();
-
-#if 0
- pViewData->GetView()->
- PaintArea( aDelRange.aStart.Col(), aDelRange.aStart.Row(),
- aDelRange.aEnd.Col(), aDelRange.aEnd.Row(), SC_UPDATE_MARKS );
-#endif
}
BOOL bNegX = ( nPosX < (SCsCOL) nStartX );
@@ -890,3 +868,4 @@ ScHeaderSelectionEngine::ScHeaderSelectionEngine( Window* pWindow, ScHeaderFunct
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/selectionstate.cxx b/sc/source/ui/view/selectionstate.cxx
index 0edd50a0b825..3412dd53f03a 100644
--- a/sc/source/ui/view/selectionstate.cxx
+++ b/sc/source/ui/view/selectionstate.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -87,3 +88,4 @@ bool operator==( const ScSelectionState& rL, const ScSelectionState& rR )
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/spelldialog.cxx b/sc/source/ui/view/spelldialog.cxx
index ee13ee9fbf90..f2100ba6d918 100644
--- a/sc/source/ui/view/spelldialog.cxx
+++ b/sc/source/ui/view/spelldialog.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -277,3 +278,4 @@ bool ScSpellDialogChildWindow::IsSelectionChanged()
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx
index ac6288028dfc..457395fd9deb 100644
--- a/sc/source/ui/view/spelleng.cxx
+++ b/sc/source/ui/view/spelleng.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -456,3 +457,4 @@ bool ScTextConversionEngine::NeedsConversion()
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index 1048c903ec4a..daea22b78027 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -54,8 +55,9 @@
//==================================================================
ScTabControl::ScTabControl( Window* pParent, ScViewData* pData ) :
- TabBar( pParent, WinBits( WB_BORDER | WB_3DLOOK | WB_SCROLL | WB_INSERTTAB |
- WB_RANGESELECT | WB_MULTISELECT | WB_DRAG | WB_SIZEABLE ) ),
+ TabBar( pParent,
+ WinBits(WB_BORDER | WB_3DLOOK | WB_SCROLL | WB_RANGESELECT |
+ WB_MULTISELECT | WB_DRAG | WB_SIZEABLE) ),
DropTargetHelper( this ),
DragSourceHelper( this ),
pViewData( pData ),
@@ -94,6 +96,7 @@ ScTabControl::ScTabControl( Window* pParent, ScViewData* pData ) :
SetSplitHdl( LINK( pViewData->GetView(), ScTabView, TabBarResize ) );
EnableEditMode();
+ UpdateInputContext();
}
ScTabControl::~ScTabControl()
@@ -297,6 +300,17 @@ void ScTabControl::Select()
}
}
+void ScTabControl::UpdateInputContext()
+{
+ ScDocument* pDoc = pViewData->GetDocument();
+ WinBits nStyle = GetStyle();
+ if (pDoc->GetDocumentShell()->IsReadOnly())
+ // no insert sheet tab for readonly doc.
+ SetStyle((nStyle & ~WB_INSERTTAB));
+ else
+ SetStyle((nStyle | WB_INSERTTAB));
+}
+
void ScTabControl::UpdateStatus()
{
ScDocument* pDoc = pViewData->GetDocument();
@@ -648,3 +662,4 @@ void ScTabControl::Mirror()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/tabpopsh.cxx b/sc/source/ui/view/tabpopsh.cxx
index f5033d5d0df5..bb610ada84c0 100644
--- a/sc/source/ui/view/tabpopsh.cxx
+++ b/sc/source/ui/view/tabpopsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -70,3 +71,5 @@ void ScTabPopShell::DummyExec( SfxRequest& rReq )
void ScTabPopShell::DummyState( SfxItemSet& rSet )
{
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/tabsplit.cxx b/sc/source/ui/view/tabsplit.cxx
index 0f72e0e73d02..7babaad6d154 100644
--- a/sc/source/ui/view/tabsplit.cxx
+++ b/sc/source/ui/view/tabsplit.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -103,3 +104,4 @@ void ScTabSplitter::SetFixed(BOOL bSet)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 9fe3800e0ef8..01877252b078 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,36 +31,6 @@
//------------------------------------------------------------------
-
-#if 0
-#define _MACRODLG_HXX
-#define _BIGINT_HXX
-#define _SVCONTNR_HXX
-#define BASIC_NODIALOGS
-#define _SFXMNUITEM_HXX
-#define _SVDXOUT_HXX
-#define _SVDATTR_HXX
-#define _SFXMNUITEM_HXX
-#define _DLGCFG_HXX
-#define _SFXMNUMGR_HXX
-#define _SFXBASIC_HXX
-#define _MODALDLG_HXX
-#define _SFX_TEMPLDLG_HXX
-#define _SFXSTBMGR_HXX
-#define _SFXTBXMGR_HXX
-#define _BASE_DLGS_HXX
-#define _SFXIMGMGR_HXX
-#define _SFXMNUMGR_HXX
-#define _SFXSTBITEM_HXX
-#define _SFXTBXCTRL_HXX
-#define _PASSWD_HXX
-//#define _SFXFILEDLG_HXX
-//#define _SFXREQUEST_HXX
-#define _SFXOBJFACE_HXX
-
-#define _SDR_NOTRANSFORM
-#define _SVDXOUT_HXX
-#endif
#include <vcl/svapp.hxx>
///////////////////////////////////////////////////////////////////////////
@@ -68,24 +39,6 @@
// Die u.a. Aenderungen nehmen vorgeschlagene Konstante vorweg
///////////////////////////////////////////////////////////////////////////
-#if 0
-#define _SDR_NOTRANSFORM // Transformationen, selten verwendet
-#define _SDR_NOTOUCH // Hit-Tests, selten verwendet
-
-#define _SDR_NOUNDO // Undo-Objekte
-#define _SDR_NOPAGEOBJ // SdrPageObj
-#define _SDR_NOVIRTOBJ // SdrVirtObj
-#define _SDR_NOGROUPOBJ // SdrGroupObj
-#define _SDR_NOTEXTOBJ // SdrTextObj
-#define _SDR_NOPATHOBJ // SdrPathObj
-#define _SDR_NOEDGEOBJ // SdrEdgeObj
-#define _SDR_NORECTOBJ // SdrRectObj
-#define _SDR_NOCAPTIONOBJ // SdrCaptionObj
-#define _SDR_NOCIRCLEOBJ // SdrCircleObj
-#define _SDR_NOGRAFOBJ // SdrGrafObj
-#define _SDR_NOOLE2OBJ // SdrOle2Obj
-#endif
-
// Dieses define entfernt die VCControls aus SI.HXX
#define _SI_HXX // VCControls
@@ -2490,3 +2443,4 @@ void ScTabView::EnableRefInput(BOOL bFlag)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx
index ce068e0ef6b2..91e5cc3cc96a 100644
--- a/sc/source/ui/view/tabview2.cxx
+++ b/sc/source/ui/view/tabview2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1280,3 +1281,4 @@ void ScTabView::UpdatePageBreakData( BOOL bForcePaint )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 983113760bb9..bffd30928982 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1419,9 +1420,11 @@ void ScTabView::MarkRange( const ScRange& rRange, BOOL bSetCursor, BOOL bContinu
{
SCCOL nAlignX = rRange.aStart.Col();
SCROW nAlignY = rRange.aStart.Row();
- if ( rRange.aStart.Col() == 0 && rRange.aEnd.Col() == MAXCOL )
+ bool bCol = ( rRange.aStart.Col() == 0 && rRange.aEnd.Col() == MAXCOL ) && !aViewData.GetDocument()->IsInVBAMode();
+ bool bRow = ( rRange.aStart.Row() == 0 && rRange.aEnd.Row() == MAXROW );
+ if ( bCol )
nAlignX = aViewData.GetPosX(WhichH(aViewData.GetActivePart()));
- if ( rRange.aStart.Row() == 0 && rRange.aEnd.Row() == MAXROW )
+ if ( bRow )
nAlignY = aViewData.GetPosY(WhichV(aViewData.GetActivePart()));
AlignToCursor( nAlignX, nAlignY, SC_FOLLOW_JUMP );
}
@@ -1535,6 +1538,7 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection )
// nicht InputEnterHandler wegen Referenzeingabe !
ScDocument* pDoc = aViewData.GetDocument();
+
pDoc->MakeTable( nTab );
// Update pending row heights before switching the sheet, so Reschedule from the progress bar
@@ -2610,6 +2614,9 @@ void ScTabView::UpdateInputContext()
ScGridWindow* pWin = pGridWin[aViewData.GetActivePart()];
if (pWin)
pWin->UpdateInputContext();
+
+ if (pTabControl)
+ pTabControl->UpdateInputContext();
}
// GetGridWidth - Breite eines Ausgabebereichs (fuer ViewData)
@@ -2709,3 +2716,4 @@ void ScTabView::CheckNeedsRepaint()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/tabview4.cxx b/sc/source/ui/view/tabview4.cxx
index 00652e2f76d2..13ef6ca977b0 100644
--- a/sc/source/ui/view/tabview4.cxx
+++ b/sc/source/ui/view/tabview4.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -563,3 +564,4 @@ void ScTabView::InterpretVisible()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx
index c19efabad2f3..c77034366c85 100644
--- a/sc/source/ui/view/tabview5.cxx
+++ b/sc/source/ui/view/tabview5.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -298,32 +299,6 @@ void ScTabView::TabChanged()
// (fuer disablete Slots auf geschuetzten Tabellen), darum hier einfach alles...
rBindings.InvalidateAll(FALSE);
-#if 0
- rBindings.Invalidate( SID_SELECT_SCENARIO );
- rBindings.Invalidate( FID_PROTECT_TABLE );
- rBindings.Invalidate( FID_DELETE_TABLE );
- rBindings.Invalidate( FID_TABLE_SHOW );
- rBindings.Invalidate( FID_TABLE_HIDE );
-
- // Auswirkungen von geschuetzten Tabellen.
- rBindings.Invalidate( FID_TAB_RENAME );
- rBindings.Invalidate( FID_TAB_MOVE );
- rBindings.Invalidate( SID_DEL_ROWS );
- rBindings.Invalidate( SID_DEL_COLS );
- rBindings.Invalidate( FID_INS_ROW );
- rBindings.Invalidate( FID_INS_COLUMN );
- rBindings.Invalidate( FID_INS_CELL );
- rBindings.Invalidate( FID_INS_CELLSDOWN );
- rBindings.Invalidate( FID_INS_CELLSRIGHT );
- rBindings.Invalidate( FID_DELETE_CELL );
-
- rBindings.Invalidate( SID_OPENDLG_CHART );
- rBindings.Invalidate( SID_INSERT_OBJECT );
- rBindings.Invalidate( SID_INSERT_DIAGRAM );
- rBindings.Invalidate( SID_INSERT_SMATH );
- rBindings.Invalidate( SID_INSERT_GRAPHIC );
-#endif
-
if (aViewData.GetViewShell()->HasAccessibilityObjects())
{
SfxSimpleHint aAccHint(SC_HINT_ACC_TABLECHANGED);
@@ -712,3 +687,4 @@ void ScTabView::ResetBrushDocument()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/tabvwsh.cxx b/sc/source/ui/view/tabvwsh.cxx
index 2fc2bba072d9..d5e166d121a7 100644
--- a/sc/source/ui/view/tabvwsh.cxx
+++ b/sc/source/ui/view/tabvwsh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -115,3 +116,5 @@ IMPL_LINK( ScTabViewShell, HtmlOptionsHdl, void*, EMPTYARG )
GetViewFrame()->GetBindings().Invalidate(SID_DRAW_TEXT_MARQUEE);
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index 26e040ede0b0..81a011516cbd 100644
--- a/sc/source/ui/view/tabvwsh2.cxx
+++ b/sc/source/ui/view/tabvwsh2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -478,3 +479,4 @@ BOOL ScTabViewShell::SelectObject( const String& rName )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index 5f98cf3e1cb1..7eb78c81d003 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1233,3 +1234,4 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index bcff0f699b5e..493f45341ff4 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -280,13 +281,6 @@ void ScTabViewShell::SetActive()
// Die Sfx-View moechte sich gerne selbst aktivieren, weil dabei noch
// magische Dinge geschehen (z.B. stuerzt sonst evtl. der Gestalter ab)
ActiveGrabFocus();
-
-#if 0
- SfxViewFrame* pFrame = GetViewFrame();
- pFrame->GetFrame().Appear();
-
- SFX_APP()->SetViewFrame( pFrame ); // immer erst Appear, dann SetViewFrame (#29290#)
-#endif
}
USHORT __EXPORT ScTabViewShell::PrepareClose(BOOL bUI, BOOL bForBrowsing)
@@ -491,31 +485,6 @@ void __EXPORT ScTabViewShell::QueryObjAreaPixel( Rectangle& rRect ) const
pDoc->SnapVisArea( aLogicRect );
rRect.SetSize( pWin->LogicToPixel( aLogicRect.GetSize() ) );
-
-#if 0
- // auf ganze Zellen anpassen (in Pixeln)
-
- ScViewData* pViewData = ((ScTabViewShell*)this)->GetViewData();
- Size aSize = rRect.GetSize();
-
- ScSplitPos ePos = pViewData->GetActivePart();
- Window* pWin = ((ScTabViewShell*)this)->GetActiveWin();
-
- Point aTest( aSize.Width(), aSize.Height() );
- SCsCOL nPosX;
- SCsROW nPosY;
- pViewData->GetPosFromPixel( aTest.X(), aTest.Y(), ePos, nPosX, nPosY );
- BOOL bLeft;
- BOOL bTop;
- pViewData->GetMouseQuadrant( aTest, ePos, nPosX, nPosY, bLeft, bTop );
- if (!bLeft)
- ++nPosX;
- if (!bTop)
- ++nPosY;
- aTest = pViewData->GetScrPos( (SCCOL)nPosX, (SCROW)nPosY, ePos, TRUE );
-
- rRect.SetSize(Size(aTest.X(),aTest.Y()));
-#endif
}
//------------------------------------------------------------------
@@ -533,7 +502,7 @@ void __EXPORT ScTabViewShell::Move()
//------------------------------------------------------------------
-void __EXPORT ScTabViewShell::ShowCursor(FASTBOOL /* bOn */)
+void __EXPORT ScTabViewShell::ShowCursor(bool /* bOn */)
{
/*!!! ShowCursor wird nicht paarweise wie im gridwin gerufen.
Der CursorLockCount am Gridwin muss hier direkt auf 0 gesetzt werden
@@ -1599,7 +1568,7 @@ BOOL ScTabViewShell::SfxKeyInput(const KeyEvent& rKeyEvent)
return sal::static_int_cast<BOOL>(SfxViewShell::KeyInput( rKeyEvent ));
}
-FASTBOOL __EXPORT ScTabViewShell::KeyInput( const KeyEvent &rKeyEvent )
+bool __EXPORT ScTabViewShell::KeyInput( const KeyEvent &rKeyEvent )
{
// return SfxViewShell::KeyInput( rKeyEvent );
return TabKeyInput( rKeyEvent );
@@ -1762,6 +1731,13 @@ void ScTabViewShell::Construct( BYTE nForceDesignMode )
if ( pDocSh->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED )
{
SCTAB nInitTabCount = 3; //! konfigurierbar !!!
+ // Get the customized initial tab count, we only can set the count by VBA API currently.
+ const ScAppOptions& rAppOpt = SC_MOD()->GetAppOptions();
+ SCTAB nNewTabCount = rAppOpt.GetTabCountInNewSpreadsheet();
+ if ( nNewTabCount >= 1 && nNewTabCount <= MAXTAB )
+ {
+ nInitTabCount = nNewTabCount;
+ }
for (SCTAB i=1; i<nInitTabCount; i++)
pDoc->MakeTable(i,false);
}
@@ -2049,3 +2025,4 @@ void ScTabViewShell::GetTbxState( SfxItemSet& rSet )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/tabvwsh5.cxx b/sc/source/ui/view/tabvwsh5.cxx
index 1a3dd6928a17..c6cb9d5cfb37 100644
--- a/sc/source/ui/view/tabvwsh5.cxx
+++ b/sc/source/ui/view/tabvwsh5.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -426,3 +427,4 @@ void ScTabViewShell::UpdateNumberFormatter(
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/tabvwsh8.cxx b/sc/source/ui/view/tabvwsh8.cxx
index b3612fa0c6f2..2f4ca5c72bab 100644
--- a/sc/source/ui/view/tabvwsh8.cxx
+++ b/sc/source/ui/view/tabvwsh8.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -102,3 +103,4 @@ void ScTabViewShell::UIDeactivated( SfxInPlaceClient* pClient )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/tabvwsh9.cxx b/sc/source/ui/view/tabvwsh9.cxx
index 30f9c50fd925..3984465f1f50 100644
--- a/sc/source/ui/view/tabvwsh9.cxx
+++ b/sc/source/ui/view/tabvwsh9.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -293,3 +294,4 @@ void ScTabViewShell::GetImageMapState( SfxItemSet& rSet )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index c7f75d161b54..aaa55a4ad596 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -890,3 +891,4 @@ void ScTabViewShell::GetDrawOptState( SfxItemSet& rSet )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index 8f4a203ea14d..f650b0bb68cd 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -498,3 +499,4 @@ void ScTabViewShell::GetDrawInsState(SfxItemSet &rSet)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index 3b0ee60ef4e8..9bd1efdcd521 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -331,3 +332,4 @@ SfxModelessDialog* ScTabViewShell::CreateRefDialog(
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/tabvwshd.cxx b/sc/source/ui/view/tabvwshd.cxx
index 4ef5186a25a0..45875808926f 100644
--- a/sc/source/ui/view/tabvwshd.cxx
+++ b/sc/source/ui/view/tabvwshd.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -98,3 +99,4 @@ Window* ScTabViewShell::GetDialogParent()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx
index c0af39226c3f..07be1e04f39f 100644
--- a/sc/source/ui/view/tabvwshe.cxx
+++ b/sc/source/ui/view/tabvwshe.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -339,3 +340,4 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index 5e0630b366f4..3baa549f2932 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -365,20 +366,6 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
( pDoc->IsTabProtected( nTabNr ) || nTabSelCount > 1 ) )
break; // kein Rename
-#if 0
- // ScSbxObject wird nicht mehr benutzt, stattdessen aus dem
- // ScSbxTable::Notify die richtige Tabelle an der Basic-View eingestellt
- if( rReq.IsAPI() )
- {
- SbxObject* pObj = GetScSbxObject();
- ScSbxTable* pSbxTab = PTR_CAST( ScSbxTable, pObj );
- DBG_ASSERT( pSbxTab, "pSbxTab???" );
-
- if( pSbxTab )
- nTabNr = pSbxTab->GetTableNr();
- }
-#endif
-
if( pReqArgs != NULL )
{
BOOL bDone = FALSE;
@@ -964,3 +951,4 @@ void ScTabViewShell::GetStateTable( SfxItemSet& rSet )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/tabvwshg.cxx b/sc/source/ui/view/tabvwshg.cxx
index b30b07c43cb9..f7aac8b56da4 100644
--- a/sc/source/ui/view/tabvwshg.cxx
+++ b/sc/source/ui/view/tabvwshg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -138,3 +139,4 @@ void ScTabViewShell::InsertURLButton( const String& rName, const String& rURL,
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/tabvwshh.cxx b/sc/source/ui/view/tabvwshh.cxx
index 480514741bae..c462c48abe9c 100644
--- a/sc/source/ui/view/tabvwshh.cxx
+++ b/sc/source/ui/view/tabvwshh.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -291,3 +292,4 @@ bool ScTabViewShell::ExecuteRetypePassDlg(ScPasswordHash eDesiredHash)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index c36bcd51271c..4ffb4d6db889 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -3113,3 +3114,5 @@ void ScViewData::AddPixelsWhileBackward( long & rScrY, long nEndPixels,
++nRow;
rPosY = nRow;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index c2b8cf77a420..49f93c43ffac 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52,6 +53,11 @@
#include <vcl/sound.hxx>
#include <vcl/waitobj.hxx>
+#include <basic/sbstar.hxx>
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/script/XLibraryContainer.hpp>
+using namespace com::sun::star;
+
#include "viewfunc.hxx"
#include "sc.hrc"
@@ -2200,6 +2206,8 @@ BOOL ScViewFunc::DeleteTables(const SvShorts &TheTabs, BOOL bRecord )
WaitObject aWait( GetFrameWin() );
if (bRecord && !pDoc->IsUndoEnabled())
bRecord = FALSE;
+ if ( bVbaEnabled )
+ bRecord = FALSE;
while ( nNewTab > 0 && !pDoc->IsVisible( nNewTab ) )
--nNewTab;
@@ -2307,6 +2315,7 @@ BOOL ScViewFunc::DeleteTables(const SvShorts &TheTabs, BOOL bRecord )
pDocSh->PostPaintExtras();
pDocSh->SetDocumentModified();
+
SfxApplication* pSfxApp = SFX_APP(); // Navigator
pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
@@ -2451,8 +2460,8 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell,
{
SCTAB nSrcTab = pSrcTabs[i];
SCTAB nDestTab1=nTab+i;
- ULONG nErrVal = pDoc->TransferTab( pSrcDoc, nSrcTab, nDestTab1,
- FALSE ); // no insert
+ ULONG nErrVal = pDocSh->TransferTab( *pSrcShell, nSrcTab, nDestTab1,
+ FALSE, FALSE ); // no insert
switch (nErrVal)
{
@@ -2470,25 +2479,6 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell,
break;
}
- // TransferTab doesn't copy drawing objects with bInsertNew=FALSE
- if ( !bError )
- pDoc->TransferDrawPage( pSrcDoc, nSrcTab, nDestTab1 );
-
- if(!bError &&pSrcDoc->IsScenario(nSrcTab))
- {
- String aComment;
- Color aColor;
- USHORT nFlags;
-
- pSrcDoc->GetScenarioData(nSrcTab, aComment,aColor, nFlags);
- pDoc->SetScenario( nDestTab1,TRUE);
- pDoc->SetScenarioData( nTab+i,aComment,aColor,nFlags);
- BOOL bActive = pSrcDoc->IsActiveScenario(nSrcTab );
- pDoc->SetActiveScenario( nDestTab1, bActive );
- BOOL bVisible=pSrcDoc->IsVisible(nSrcTab);
- pDoc->SetVisible(nDestTab1,bVisible );
-
- }
}
if (bLink)
@@ -2672,33 +2662,7 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy )
nDestTab1 = nDestTab;
for(USHORT i=0;i<TheTabs.Count();i++)
{
- nErrVal = pDestDoc->TransferTab( pDoc, TheTabs[i], nDestTab1,
- FALSE ); // no insert
-
- // TransferTab doesn't copy drawing objects with bInsertNew=FALSE
- if ( nErrVal > 0 )
- pDestDoc->TransferDrawPage( pDoc, TheTabs[i], nDestTab1 );
-
- if(nErrVal>0 && pDoc->IsScenario(TheTabs[i]))
- {
- String aComment;
- Color aColor;
- USHORT nFlags;
-
- pDoc->GetScenarioData(TheTabs[i], aComment,aColor, nFlags);
- pDestDoc->SetScenario(nDestTab1,TRUE);
- pDestDoc->SetScenarioData(nDestTab1,aComment,aColor,nFlags);
- BOOL bActive = pDoc->IsActiveScenario(TheTabs[i]);
- pDestDoc->SetActiveScenario(nDestTab1, bActive );
-
- BOOL bVisible=pDoc->IsVisible(TheTabs[i]);
- pDestDoc->SetVisible(nDestTab1,bVisible );
-
- }
-
- if ( nErrVal > 0 && pDoc->IsTabProtected( TheTabs[i] ) )
- pDestDoc->SetTabProtection(nDestTab1, pDoc->GetTabProtection(TheTabs[i]));
-
+ nErrVal = pDestShell->TransferTab( *pDocShell, static_cast<SCTAB>(TheTabs[i]), static_cast<SCTAB>(nDestTab1), FALSE, FALSE );
nDestTab1++;
}
}
@@ -3192,3 +3156,4 @@ void ScViewFunc::SetValidation( const ScValidationData& rNew )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 24fab9ac2eba..d19401efcab9 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -210,6 +211,7 @@
#include "drwtrans.hxx"
#include "docuno.hxx"
#include "clipparam.hxx"
+#include "undodat.hxx" // Amelia Wang
using namespace com::sun::star;
@@ -506,6 +508,76 @@ BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, BOOL bCut, BOOL bApi, BOOL bI
return bDone;
}
+// Copy the content of the Range into clipboard. Adding this method for VBA API: Range.Copy().
+BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRange& rRange, BOOL bCut, BOOL bApi, BOOL bIncludeObjects, BOOL bStopEdit )
+{
+ BOOL bDone = FALSE;
+ if ( bStopEdit )
+ UpdateInputLine();
+
+ ScRange aRange = rRange;
+ ScDocument* pDoc = GetViewData()->GetDocument();
+ if ( pDoc && !pDoc->HasSelectedBlockMatrixFragment( aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aStart.Tab() ) )
+ {
+ BOOL bSysClip = FALSE;
+ if ( !pClipDoc )
+ {
+ // Create one (deleted by ScTransferObj).
+ pClipDoc = new ScDocument( SCDOCMODE_CLIP );
+ bSysClip = TRUE;
+ }
+ if ( !bCut )
+ {
+ ScChangeTrack* pChangeTrack = pDoc->GetChangeTrack();
+ if ( pChangeTrack )
+ pChangeTrack->ResetLastCut();
+ }
+
+ if ( bSysClip && bIncludeObjects )
+ {
+ BOOL bAnyOle = pDoc->HasOLEObjectsInArea( aRange );
+ // Update ScGlobal::pDrawClipDocShellRef.
+ ScDrawLayer::SetGlobalDrawPersist( ScTransferObj::SetDrawClipDoc( bAnyOle ) );
+ }
+
+ ScClipParam aClipParam( aRange, bCut );
+ pDoc->CopyToClip4VBA( aClipParam, pClipDoc, false, bIncludeObjects );
+ if ( bSysClip )
+ {
+ ScDrawLayer::SetGlobalDrawPersist(NULL);
+ ScGlobal::SetClipDocName( pDoc->GetDocumentShell()->GetTitle( SFX_TITLE_FULLNAME ) );
+ }
+ pClipDoc->ExtendMerge( aRange, TRUE );
+
+ if ( bSysClip )
+ {
+ ScDocShell* pDocSh = GetViewData()->GetDocShell();
+ TransferableObjectDescriptor aObjDesc;
+ pDocSh->FillTransferableObjectDescriptor( aObjDesc );
+ aObjDesc.maDisplayName = pDocSh->GetMedium()->GetURLObject().GetURLNoPass();
+
+ ScTransferObj* pTransferObj = new ScTransferObj( pClipDoc, aObjDesc );
+ uno::Reference<datatransfer::XTransferable> xTransferable( pTransferObj );
+ if ( ScGlobal::pDrawClipDocShellRef )
+ {
+ SfxObjectShellRef aPersistRef( &(*ScGlobal::pDrawClipDocShellRef) );
+ pTransferObj->SetDrawPersist( aPersistRef );
+ }
+ pTransferObj->CopyToClipboard( GetActiveWin() );
+ SC_MOD()->SetClipObject( pTransferObj, NULL );
+ }
+
+ bDone = TRUE;
+ }
+ else
+ {
+ if ( !bApi )
+ ErrorMessage(STR_MATRIXFRAGMENTERR);
+ }
+
+ return bDone;
+}
+
ScTransferObj* ScViewFunc::CopyToTransferable()
{
ScRange aRange;
@@ -1784,6 +1856,85 @@ BOOL ScViewFunc::LinkBlock( const ScRange& rSource, const ScAddress& rDestPos, B
return TRUE;
}
+void ScViewFunc::DataFormPutData( SCROW nCurrentRow ,
+ SCROW nStartRow , SCCOL nStartCol ,
+ SCROW nEndRow , SCCOL nEndCol ,
+ Edit** pEdits ,
+ sal_uInt16 aColLength )
+{
+ ScDocument* pDoc = GetViewData()->GetDocument();
+ ScDocShell* pDocSh = GetViewData()->GetDocShell();
+ ScMarkData& rMark = GetViewData()->GetMarkData();
+ ScDocShellModificator aModificator( *pDocSh );
+ SfxUndoManager* pUndoMgr = pDocSh->GetUndoManager();
+ if ( pDoc )
+ {
+ const BOOL bRecord( pDoc->IsUndoEnabled());
+ ScDocument* pUndoDoc = NULL;
+ ScDocument* pRedoDoc = NULL;
+ ScRefUndoData* pUndoData = NULL;
+ SCTAB nTab = GetViewData()->GetTabNo();
+ SCTAB nStartTab = nTab;
+ SCTAB nEndTab = nTab;
+
+ {
+ ScChangeTrack* pChangeTrack = pDoc->GetChangeTrack();
+ if ( pChangeTrack )
+ pChangeTrack->ResetLastCut(); // kein CutMode mehr
+ }
+ ScRange aUserRange( nStartCol, nCurrentRow, nStartTab, nEndCol, nCurrentRow, nEndTab );
+ BOOL bColInfo = ( nStartRow==0 && nEndRow==MAXROW );
+ BOOL bRowInfo = ( nStartCol==0 && nEndCol==MAXCOL );
+ SCCOL nUndoEndCol = nStartCol+aColLength-1;
+ SCROW nUndoEndRow = nCurrentRow;
+ USHORT nUndoFlags = IDF_NONE;
+
+ if ( bRecord )
+ {
+ pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
+ pUndoDoc->InitUndoSelected( pDoc , rMark , bColInfo , bRowInfo );
+ pDoc->CopyToDocument( aUserRange , 1 , FALSE , pUndoDoc );
+ }
+ USHORT nExtFlags = 0;
+ pDocSh->UpdatePaintExt( nExtFlags, nStartCol, nStartRow, nStartTab , nEndCol, nEndRow, nEndTab ); // content before the change
+ //rMark.SetMarkArea( aUserRange );
+ pDoc->BeginDrawUndo();
+
+ for(sal_uInt16 i = 0; i < aColLength; i++)
+ {
+ if (pEdits[i])
+ {
+ String aFieldName=pEdits[i]->GetText();
+ pDoc->SetString( nStartCol + i, nCurrentRow, nTab, aFieldName );
+ }
+ }
+ //pDoc->ExtendMergeSel( nStartCol, nStartRow, nEndCol, nEndRow, rMark, TRUE ); // Refresh
+ pDocSh->UpdatePaintExt( nExtFlags, nStartCol, nCurrentRow, nStartTab, nEndCol, nCurrentRow, nEndTab ); // content after the change
+ SfxUndoAction* pUndo = new ScUndoDataForm( pDocSh,
+ nStartCol, nCurrentRow, nStartTab,
+ nUndoEndCol, nUndoEndRow, nEndTab, rMark,
+ pUndoDoc, pRedoDoc, nUndoFlags,
+ pUndoData, NULL, NULL, NULL,
+ FALSE ); // FALSE = Redo data not yet copied
+ pUndoMgr->AddUndoAction( new ScUndoWrapper( pUndo ), TRUE );
+
+ USHORT nPaint = PAINT_GRID;
+ if (bColInfo)
+ {
+ nPaint |= PAINT_TOP;
+ nUndoEndCol = MAXCOL; // nur zum Zeichnen !
+ }
+ if (bRowInfo)
+ {
+ nPaint |= PAINT_LEFT;
+ nUndoEndRow = MAXROW; // nur zum Zeichnen !
+ }
+ pDocSh->PostPaint( nStartCol, nCurrentRow, nStartTab,
+ nUndoEndCol, nUndoEndRow, nEndTab, nPaint, nExtFlags );
+ pDocSh->UpdateOle(GetViewData());
+ }
+}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx
index 164075c0afb1..52fe04459ad8 100644
--- a/sc/source/ui/view/viewfun4.cxx
+++ b/sc/source/ui/view/viewfun4.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -826,3 +827,4 @@ BOOL ScViewFunc::HasBookmarkAtCursor( SvxHyperlinkItem* pContent )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index dc4e96bbbf34..5ab159cf7dbc 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -325,12 +326,6 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
{
// Do CSV dialog if more than one line.
sal_Int32 nDelim = aStr.indexOf('\n');
-#if 0
- ::rtl::OString tmpStr = OUStringToOString( aStr,
- RTL_TEXTENCODING_UTF8 );
- fprintf( stderr, "String is '%s' (%d) [%d]\n", tmpStr.getStr(),
- tmpStr.getLength(), nDelim);
-#endif
if (nDelim >= 0 && nDelim != aStr.getLength () - 1)
{
ScImportStringStream aStrm( aStr);
@@ -539,10 +534,6 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
uno::Reference < io::XInputStream > xStm;
if( aDataHelper.GetInputStream( nFormatId, xStm ) )
{
-#if 0
- SotStorage aDest( "d:\\test.xls" ); // to see the file
- pStor->CopyTo( &aDest );
-#endif
ScDocument* pInsDoc = new ScDocument( SCDOCMODE_CLIP );
SCTAB nSrcTab = 0; // Biff5 in clipboard: always sheet 0
pInsDoc->ResetClip( pDoc, nSrcTab );
@@ -614,15 +605,6 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
String aFile = aFileList.GetFile( i );
PasteFile( aPos, aFile, bLink );
-#if 0
- SfxStringItem aNameItem( FID_INSERT_FILE, aFile );
- SfxPointItem aPosItem( FN_PARAM_1, aPos );
- SfxDispatcher* pDisp =
- GetViewData()->GetViewShell()->GetViewFrame()->GetDispatcher();
- if (pDisp)
- pDisp->Execute( FID_INSERT_FILE, SFX_CALLMODE_ASYNCHRON,
- &aNameItem, &aPosItem, (void*)0 );
-#endif
aPos.X() += 400;
aPos.Y() += 400;
@@ -747,3 +729,4 @@ BOOL ScViewFunc::PasteDDE( const uno::Reference<datatransfer::XTransferable>& rx
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx
index eaa55f50a0e2..3aaae4e10f0d 100644
--- a/sc/source/ui/view/viewfun6.cxx
+++ b/sc/source/ui/view/viewfun6.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -358,3 +359,5 @@ void ScViewFunc::EditNote()
}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx
index afa06ddfee3e..b01c7c53da35 100644
--- a/sc/source/ui/view/viewfun7.cxx
+++ b/sc/source/ui/view/viewfun7.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -452,3 +453,4 @@ BOOL ScViewFunc::ApplyGraphicToObject( SdrObject* pPickObj, const Graphic& rGrap
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 840bfda2131e..2997b71822e5 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -3031,3 +3032,4 @@ void ScViewFunc::InsertNameList()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx
index 6c2d804f72ee..050fb131bfae 100644
--- a/sc/source/ui/view/viewutil.cxx
+++ b/sc/source/ui/view/viewutil.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -638,3 +639,4 @@ void ScUpdateRect::GetContDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/waitoff.cxx b/sc/source/ui/view/waitoff.cxx
index 2e3c3e8476af..a3c768e85418 100644
--- a/sc/source/ui/view/waitoff.cxx
+++ b/sc/source/ui/view/waitoff.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -68,3 +69,4 @@ ScWaitCursorOff::~ScWaitCursorOff()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/uiconfig/scalc/menubar/menubar.xml b/sc/uiconfig/scalc/menubar/menubar.xml
index ed16e94b9552..539bee7d0d1c 100644
--- a/sc/uiconfig/scalc/menubar/menubar.xml
+++ b/sc/uiconfig/scalc/menubar/menubar.xml
@@ -404,6 +404,7 @@
<menu:menuitem menu:id=".uno:DataFilterHideAutoFilter"/>
</menu:menupopup>
</menu:menu>
+ <menu:menuitem menu:id=".uno:DataForm"/>
<menu:menuitem menu:id=".uno:DataSubTotals"/>
<menu:menuitem menu:id=".uno:Validation"/>
<menu:menuseparator/>
diff --git a/sc/util/makefile.mk b/sc/util/makefile.mk
index 980d271ae7c0..5b9c165450d7 100644
--- a/sc/util/makefile.mk
+++ b/sc/util/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -86,8 +86,8 @@ SHL1STDLIBS= \
$(COMPHELPERLIB) \
$(UCBHELPERLIB) \
$(TKLIB) \
- $(VOSLIB) \
$(SALLIB) \
+ $(SALHELPERLIB) \
$(TOOLSLIB) \
$(I18NISOLANGLIB) \
$(UNOTOOLSLIB) \
@@ -96,7 +96,7 @@ SHL1STDLIBS= \
$(AVMEDIALIB) \
$(FORLIB) \
$(FORUILIB)
-
+
SHL1LIBS=$(LIB3TARGET) $(LIB4TARGET)
SHL1DEF=$(MISC)$/$(SHL1TARGET).def
@@ -192,7 +192,6 @@ SHL6STDLIBS= \
$(CPPUHELPERLIB) \
$(COMPHELPERLIB) \
$(TKLIB) \
- $(VOSLIB) \
$(SALLIB) \
$(TOOLSLIB) \
$(UNOTOOLSLIB) \
@@ -273,6 +272,7 @@ LIB8OBJFILES = \
$(SLO)$/filldlg.obj \
$(SLO)$/delcodlg.obj \
$(SLO)$/delcldlg.obj \
+ $(SLO)$/datafdlg.obj \
$(SLO)$/dapitype.obj \
$(SLO)$/dapidata.obj \
$(SLO)$/crdlg.obj \
@@ -316,7 +316,8 @@ SHL9STDLIBS= \
$(VCLLIB) \
$(TKLIB) \
$(MSFILTERLIB) \
- $(FORLIB)
+ $(FORLIB) \
+ $(UNOTOOLSLIB)
SHL9DEPN=$(SHL1TARGETN) $(SHL8TARGETN)
SHL9LIBS=$(SLB)$/$(TARGET_VBA).lib
@@ -328,7 +329,7 @@ SHL9LIBS=$(SLB)$/$(TARGET_VBA).lib
.ENDIF
.ENDIF
-
+
# --- Targets -------------------------------------------------------------
diff --git a/sc/util/scfilt.map b/sc/util/scfilt.map
index 642b8db15088..ea169e176103 100644
--- a/sc/util/scfilt.map
+++ b/sc/util/scfilt.map
@@ -1,6 +1,9 @@
UDK_3_0_0 {
global:
ScFilterCreate;
+ component_getImplementationEnvironment;
+ component_writeInfo;
+ component_getFactory;
local:
*;
};
diff --git a/sc/workben/addin.cxx b/sc/workben/addin.cxx
index 68424abfc9c0..9c724e0da871 100644
--- a/sc/workben/addin.cxx
+++ b/sc/workben/addin.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,7 +33,7 @@
#include <usr/factoryhlp.hxx>
#include <usr/macros.hxx>
#include <usr/reflserv.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <tools/debug.hxx>
#include <tools/date.hxx>
@@ -593,3 +594,4 @@ sal_Bool SAL_CALL ScTestAddIn::supportsService( const ::rtl::OUString& ServiceNa
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/workben/addin.hxx b/sc/workben/addin.hxx
index 958bf34d92b5..ce87f29726c6 100644
--- a/sc/workben/addin.hxx
+++ b/sc/workben/addin.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -100,3 +101,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/workben/makefile.mk b/sc/workben/makefile.mk
index 08d09a67d387..ba5ebbbba15e 100644
--- a/sc/workben/makefile.mk
+++ b/sc/workben/makefile.mk
@@ -68,7 +68,7 @@ EXCEPTIONSFILES= \
SHL1TARGET= $(TARGET)$(DLLPOSTFIX)
-SHL1STDLIBS=$(VCLLIB) $(TOOLSLIB) $(SVLLIB) $(TKLIB) $(SALLIB) $(VOSLIB) $(CPPULIB) $(CPPUHELPERLIB)
+SHL1STDLIBS=$(VCLLIB) $(TOOLSLIB) $(SVLLIB) $(TKLIB) $(SALLIB) $(CPPULIB) $(CPPUHELPERLIB)
SHL1DEPN= $(L)$/itools.lib $(SVLIBDEPEND)
SHL1DEF= $(MISC)$/$(SHL1TARGET).def
diff --git a/sc/workben/result.cxx b/sc/workben/result.cxx
index 9198692357e6..9ef0a54dfb64 100644
--- a/sc/workben/result.cxx
+++ b/sc/workben/result.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -131,3 +132,4 @@ void SAL_CALL ScAddInResult::removeResultListener( const ::com::sun::star::uno::
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/workben/result.hxx b/sc/workben/result.hxx
index 1248eb290916..b0c31da16e9d 100644
--- a/sc/workben/result.hxx
+++ b/sc/workben/result.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -73,3 +74,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/workben/test.cxx b/sc/workben/test.cxx
index 4caa49e3adcd..11886115e2dc 100644
--- a/sc/workben/test.cxx
+++ b/sc/workben/test.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -768,13 +769,6 @@ void lcl_Sheets( FixedText& aTimeText )
XSpreadsheetsRef xSheets = xDoc->getSheets();
if (!xSheets) return;
-#if 0
- xSheets->insertSheet( "hinten", 100 );
- xSheets->insertSheet( "vorne", 0 );
- xSheets->removeSheetByName( "hinten" );
- xSheets->removeSheetByName( "vorne" );
-#endif
-
xSheets->moveSheet(0, 1, TRUE);
xSheets->moveSheet(0, 2, FALSE);
}
@@ -1010,21 +1004,6 @@ void lcl_Filter( FixedText& aTimeText )
XFilterableRef xFilter = (XFilterable*)xSelInt->queryInterface(XFilterable::getSmartUik());
if (!xFilter) return;
-#if 0
- XTableFilterDescriptorRef xDesc = xFilter->createFilterDescriptor(FALSE);
- if (!xDesc) return;
- Sequence<TableFilterField> aFields = xDesc->getFilterFields();
- if (aFields.getLen())
- {
- // 1.Feld zwischen 1. und 2. Spalte toggeln
- TableFilterField* pAry = aFields.getArray();
- if (!pAry) return;
- pAry[0].Field = pAry[0].Field ? 0 : 1;
- }
- xDesc->setFilterFields(aFields);
- xFilter->filter(xDesc);
-#endif
-
XSpreadsheetDocumentRef xDoc = lcl_GetDocument(); // Calc-Model
if (!xDoc) return;
CellRangeAddress aAddress;
@@ -1481,14 +1460,6 @@ void lcl_AutoForm( FixedText& aTimeText ) // 29
XInterfaceRef xInt = lcl_GetView();
if (!xInt) return;
-#if 0
- //! Test - AutoFormat muss von der App kommen
- XStarCalcViewRef xView = (XStarCalcView*)xInt->queryInterface(XStarCalcView::getSmartUik());
- if (!xView) return;
- XTableAutoFormatsRef xFormats = xView->getTableAutoFormats();
- if (!xFormats) return;
- //! Test
-#endif
XTableAutoFormatsRef xFormats;
XTableAutoFormatRef xFormat = xFormats->getAutoFormatByName(L"gaga");
@@ -1566,19 +1537,6 @@ void lcl_Pivot( FixedText& aTimeText ) // 30
IMPL_LINK(MyWindow, CountHdl, PushButton*, EMPTYARG)
{
-#if 0
-
- long nCount = aCountField.GetValue();
- if (nCount < 1)
- nCount = 1;
-
- ULONG nStart = Time::GetSystemTicks();
- for (long i=0; i<nCount; i++)
- lcl_DoCount();
- ULONG nEnd = Time::GetSystemTicks();
- aTimeText.SetText(String(nCount)+String(" x Count: ")+String(nEnd-nStart)+String(" ms"));
-
-#else
long nCount = aCountField.GetValue();
switch ( nCount )
@@ -1683,8 +1641,6 @@ IMPL_LINK(MyWindow, CountHdl, PushButton*, EMPTYARG)
break;
}
-#endif
-
return 0;
}
@@ -1766,29 +1722,6 @@ IMPL_LINK(MyWindow, BlaHdl, PushButton*, EMPTYARG)
XTextCursorRef xCursor = xText->createTextCursor();
if ( xCursor && xType )
{
-#if 0
- // Feld einfuegen
- XTextPositionRef xPos = (XTextPosition*)
- xCursor->queryInterface(XTextPosition::getSmartUik());
- if ( xPos )
- {
- xCursor->gotoEnd(FALSE);
- XTextFieldRef xField = xTypes->insertTextField( xType, xPos );
- if (xField)
- {
- // Eigenschaften setzen
- XPropertySetRef xProp = (XPropertySet*)xField->
- queryInterface(XPropertySet::getSmartUik());
- if ( xProp )
- {
- xProp->setPropertyValue(L"URL",
- UsrAny(String("http://www.mopo.de/")));
- xProp->setPropertyValue(L"Representation",
- UsrAny(String("ein Hyperlink")));
- }
- }
- }
-#endif
// letztes Feld loeschen
XIndexAccessRef xIndex = (XIndexAccess*)
@@ -1940,27 +1873,6 @@ IMPL_LINK(MyWindow, ViewHdl, PushButton*, EMPTYARG)
XInterfaceRef xSelInt = xView->getSelection();
if (!xSelInt) return 0;
-#if 0
- XPropertySetRef xProp = (XPropertySet*)xSelInt->queryInterface(XPropertySet::getSmartUik());
- if ( xProp )
- {
- UsrAny aAny;
-
- aAny = xProp->getPropertyValue(L"TransparentBackground");
- aAny.setBOOL(FALSE);
- xProp->setPropertyValue(L"TransparentBackground", aAny);
-
- aAny = xProp->getPropertyValue(L"BackgroundColor");
- aAny.setUINT32(0xffff00);
- xProp->setPropertyValue(L"BackgroundColor", aAny);
- }
- XIndentRef xInd = (XIndent*)xSelInt->queryInterface(XIndent::getSmartUik());
- if ( xInd )
- {
- xInd->incrementIndent();
- }
-#endif
-
XAutoFormattableRef xAuto = (XAutoFormattable*)xSelInt->
queryInterface(XAutoFormattable::getSmartUik());
if ( xAuto )
@@ -1984,21 +1896,6 @@ IMPL_LINK(MyWindow, ViewHdl, PushButton*, EMPTYARG)
xText->setText(StringToOUString(aStr, CHARSET_SYSTEM));
}
- // Zelle selektieren
-
-#if 0
- if (xDoc)
- {
- CellAddress aPos;
- aPos.Sheet = 0;
- aPos.Column = 1;
- aPos.Row = 2;
- XCellRef xCell = xDoc->getCell(aPos);
- if ( xCell )
- xView->select( xCell );
- }
-#endif
-
XPrintableRef xPrint = (XPrintable*)xInt->queryInterface(XPrintable::getSmartUik());
String aName = OUStringToString( xPrint->getPrinterName(), CHARSET_SYSTEM );
// aTimeText.SetText(aName);
@@ -2039,3 +1936,4 @@ IMPL_LINK(MyWindow, ViewHdl, PushButton*, EMPTYARG)
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/xml/AccessibleEditableTextPara_HeaderFooter.xml b/sc/xml/AccessibleEditableTextPara_HeaderFooter.xml
index 739224b66261..320a8fa46a58 100644
--- a/sc/xml/AccessibleEditableTextPara_HeaderFooter.xml
+++ b/sc/xml/AccessibleEditableTextPara_HeaderFooter.xml
@@ -25,6 +25,5 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
<project-build-dependency>svx</project-build-dependency>
</module-description>
diff --git a/sc/xml/AccessibleEditableTextPara_PreviewCell.xml b/sc/xml/AccessibleEditableTextPara_PreviewCell.xml
index ed571f297af2..f943b29f84c2 100644
--- a/sc/xml/AccessibleEditableTextPara_PreviewCell.xml
+++ b/sc/xml/AccessibleEditableTextPara_PreviewCell.xml
@@ -24,6 +24,5 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
<project-build-dependency>svx</project-build-dependency>
</module-description>
diff --git a/sc/xml/AccessibleEditableTextPara_PreviewNote.xml b/sc/xml/AccessibleEditableTextPara_PreviewNote.xml
index 4342213ba44e..0b99c96211af 100644
--- a/sc/xml/AccessibleEditableTextPara_PreviewNote.xml
+++ b/sc/xml/AccessibleEditableTextPara_PreviewNote.xml
@@ -24,6 +24,5 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
<project-build-dependency>svx</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScAccessibleCell.xml b/sc/xml/ScAccessibleCell.xml
index 89ab2bdf03a9..6259b03b1912 100644
--- a/sc/xml/ScAccessibleCell.xml
+++ b/sc/xml/ScAccessibleCell.xml
@@ -25,6 +25,5 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
<project-build-dependency>svx</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScAccessibleCsvCell.xml b/sc/xml/ScAccessibleCsvCell.xml
index 820a0fda5707..746299312882 100644
--- a/sc/xml/ScAccessibleCsvCell.xml
+++ b/sc/xml/ScAccessibleCsvCell.xml
@@ -23,6 +23,5 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
<project-build-dependency>svx</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScAccessibleCsvGrid.xml b/sc/xml/ScAccessibleCsvGrid.xml
index c59bb49d2e51..13b65f129d57 100644
--- a/sc/xml/ScAccessibleCsvGrid.xml
+++ b/sc/xml/ScAccessibleCsvGrid.xml
@@ -24,6 +24,5 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
<project-build-dependency>svx</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScAccessibleCsvRuler.xml b/sc/xml/ScAccessibleCsvRuler.xml
index 85b503700636..123f5ae80267 100644
--- a/sc/xml/ScAccessibleCsvRuler.xml
+++ b/sc/xml/ScAccessibleCsvRuler.xml
@@ -23,6 +23,5 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
<project-build-dependency>svx</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScAccessibleDocument.xml b/sc/xml/ScAccessibleDocument.xml
index 7093e4a9f742..b341efa938c9 100644
--- a/sc/xml/ScAccessibleDocument.xml
+++ b/sc/xml/ScAccessibleDocument.xml
@@ -23,6 +23,5 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
<project-build-dependency>svx</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScAccessibleDocumentPagePreview.xml b/sc/xml/ScAccessibleDocumentPagePreview.xml
index 62ff8578d3ff..a9f47a97965d 100644
--- a/sc/xml/ScAccessibleDocumentPagePreview.xml
+++ b/sc/xml/ScAccessibleDocumentPagePreview.xml
@@ -22,6 +22,5 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
<project-build-dependency>svx</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScAccessiblePageHeader.xml b/sc/xml/ScAccessiblePageHeader.xml
index 7ff43bdd2709..38f5bcbaf61b 100644
--- a/sc/xml/ScAccessiblePageHeader.xml
+++ b/sc/xml/ScAccessiblePageHeader.xml
@@ -22,6 +22,5 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
<project-build-dependency>svx</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScAccessiblePageHeaderArea.xml b/sc/xml/ScAccessiblePageHeaderArea.xml
index 1eb92f124752..29db1fcc6c6f 100644
--- a/sc/xml/ScAccessiblePageHeaderArea.xml
+++ b/sc/xml/ScAccessiblePageHeaderArea.xml
@@ -22,6 +22,5 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
<project-build-dependency>svx</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScAccessiblePreviewCell.xml b/sc/xml/ScAccessiblePreviewCell.xml
index a354d72b5474..90432f40dc39 100644
--- a/sc/xml/ScAccessiblePreviewCell.xml
+++ b/sc/xml/ScAccessiblePreviewCell.xml
@@ -23,6 +23,5 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
<project-build-dependency>svx</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScAccessiblePreviewHeaderCell.xml b/sc/xml/ScAccessiblePreviewHeaderCell.xml
index ddc2c81d6e65..90d53ecc0c18 100644
--- a/sc/xml/ScAccessiblePreviewHeaderCell.xml
+++ b/sc/xml/ScAccessiblePreviewHeaderCell.xml
@@ -23,6 +23,5 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
<project-build-dependency>svx</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScAccessiblePreviewTable.xml b/sc/xml/ScAccessiblePreviewTable.xml
index 0438b8ef5c60..646ec6787fe6 100644
--- a/sc/xml/ScAccessiblePreviewTable.xml
+++ b/sc/xml/ScAccessiblePreviewTable.xml
@@ -22,6 +22,5 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
<project-build-dependency>svx</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScAccessibleSpreadsheet.xml b/sc/xml/ScAccessibleSpreadsheet.xml
index d633cdd4c79f..3b892b718349 100644
--- a/sc/xml/ScAccessibleSpreadsheet.xml
+++ b/sc/xml/ScAccessibleSpreadsheet.xml
@@ -23,6 +23,5 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
<project-build-dependency>svx</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScAnnotationObj.xml b/sc/xml/ScAnnotationObj.xml
index b794ceed3592..6be9af057e2c 100644
--- a/sc/xml/ScAnnotationObj.xml
+++ b/sc/xml/ScAnnotationObj.xml
@@ -199,5 +199,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScAnnotationShapeObj.xml b/sc/xml/ScAnnotationShapeObj.xml
index d9902b0c7734..876a3f070343 100644
--- a/sc/xml/ScAnnotationShapeObj.xml
+++ b/sc/xml/ScAnnotationShapeObj.xml
@@ -199,5 +199,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScAnnotationsObj.xml b/sc/xml/ScAnnotationsObj.xml
index 69b997a2d57c..3363e5cd12e7 100644
--- a/sc/xml/ScAnnotationsObj.xml
+++ b/sc/xml/ScAnnotationsObj.xml
@@ -291,5 +291,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScAreaLinkObj.xml b/sc/xml/ScAreaLinkObj.xml
index 806a8541eeb3..73a42a533b30 100644
--- a/sc/xml/ScAreaLinkObj.xml
+++ b/sc/xml/ScAreaLinkObj.xml
@@ -104,5 +104,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScAreaLinksObj.xml b/sc/xml/ScAreaLinksObj.xml
index d6b21fdb5dad..8b2d19101b90 100644
--- a/sc/xml/ScAreaLinksObj.xml
+++ b/sc/xml/ScAreaLinksObj.xml
@@ -104,5 +104,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScAutoFormatFieldObj.xml b/sc/xml/ScAutoFormatFieldObj.xml
index cceb359562a7..9a93209e79a3 100644
--- a/sc/xml/ScAutoFormatFieldObj.xml
+++ b/sc/xml/ScAutoFormatFieldObj.xml
@@ -131,5 +131,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScAutoFormatObj.xml b/sc/xml/ScAutoFormatObj.xml
index a657c3ed5ca4..48b24ea73cb7 100644
--- a/sc/xml/ScAutoFormatObj.xml
+++ b/sc/xml/ScAutoFormatObj.xml
@@ -131,5 +131,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScAutoFormatsObj.xml b/sc/xml/ScAutoFormatsObj.xml
index 3db4ae81f5b9..f8e21d25af13 100644
--- a/sc/xml/ScAutoFormatsObj.xml
+++ b/sc/xml/ScAutoFormatsObj.xml
@@ -131,5 +131,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScCellCursorObj.xml b/sc/xml/ScCellCursorObj.xml
index d98228487350..aebc8a2f7030 100644
--- a/sc/xml/ScCellCursorObj.xml
+++ b/sc/xml/ScCellCursorObj.xml
@@ -196,5 +196,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScCellFieldObj.xml b/sc/xml/ScCellFieldObj.xml
index b92cf9f27802..aa2421d79514 100644
--- a/sc/xml/ScCellFieldObj.xml
+++ b/sc/xml/ScCellFieldObj.xml
@@ -201,5 +201,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScCellFieldsObj.xml b/sc/xml/ScCellFieldsObj.xml
index e0157dd91a2f..a11c809f4fe1 100644
--- a/sc/xml/ScCellFieldsObj.xml
+++ b/sc/xml/ScCellFieldsObj.xml
@@ -201,5 +201,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScCellFormatsEnumeration.xml b/sc/xml/ScCellFormatsEnumeration.xml
index 39c0a86b8f05..57dc068486fb 100644
--- a/sc/xml/ScCellFormatsEnumeration.xml
+++ b/sc/xml/ScCellFormatsEnumeration.xml
@@ -313,5 +313,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScCellFormatsObj.xml b/sc/xml/ScCellFormatsObj.xml
index b242ae1456ab..fe088f94aee7 100644
--- a/sc/xml/ScCellFormatsObj.xml
+++ b/sc/xml/ScCellFormatsObj.xml
@@ -313,5 +313,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScCellObj.xml b/sc/xml/ScCellObj.xml
index b5e1acf0791e..45156cecb8d2 100644
--- a/sc/xml/ScCellObj.xml
+++ b/sc/xml/ScCellObj.xml
@@ -313,5 +313,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScCellRangeObj.xml b/sc/xml/ScCellRangeObj.xml
index f4f1278ecad6..373a963d2cee 100644
--- a/sc/xml/ScCellRangeObj.xml
+++ b/sc/xml/ScCellRangeObj.xml
@@ -313,5 +313,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScCellRangesObj.xml b/sc/xml/ScCellRangesObj.xml
index 14c6d4b7110d..197b163aef76 100644
--- a/sc/xml/ScCellRangesObj.xml
+++ b/sc/xml/ScCellRangesObj.xml
@@ -313,5 +313,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScCellSearchObj.xml b/sc/xml/ScCellSearchObj.xml
index d7987a7435b3..2608e9522011 100644
--- a/sc/xml/ScCellSearchObj.xml
+++ b/sc/xml/ScCellSearchObj.xml
@@ -99,5 +99,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScCellTextCursor.xml b/sc/xml/ScCellTextCursor.xml
index 8720e14471d6..40415228975b 100644
--- a/sc/xml/ScCellTextCursor.xml
+++ b/sc/xml/ScCellTextCursor.xml
@@ -117,5 +117,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScCellsEnumeration.xml b/sc/xml/ScCellsEnumeration.xml
index 3fb056942624..a277e5676c8c 100644
--- a/sc/xml/ScCellsEnumeration.xml
+++ b/sc/xml/ScCellsEnumeration.xml
@@ -313,5 +313,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScCellsObj.xml b/sc/xml/ScCellsObj.xml
index c43a6d98693d..86ac35e286a7 100644
--- a/sc/xml/ScCellsObj.xml
+++ b/sc/xml/ScCellsObj.xml
@@ -313,5 +313,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScChartObj.xml b/sc/xml/ScChartObj.xml
index 703eecb073e3..e91d6625e925 100644
--- a/sc/xml/ScChartObj.xml
+++ b/sc/xml/ScChartObj.xml
@@ -107,5 +107,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScChartsObj.xml b/sc/xml/ScChartsObj.xml
index 8e0075a4a635..8014ea0fd74c 100644
--- a/sc/xml/ScChartsObj.xml
+++ b/sc/xml/ScChartsObj.xml
@@ -107,5 +107,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScConsolidationDescriptor.xml b/sc/xml/ScConsolidationDescriptor.xml
index 60110fde0a61..8fc7642d4710 100644
--- a/sc/xml/ScConsolidationDescriptor.xml
+++ b/sc/xml/ScConsolidationDescriptor.xml
@@ -215,5 +215,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScDDELinkObj.xml b/sc/xml/ScDDELinkObj.xml
index 9425cdaeec0a..6a876bb6691b 100644
--- a/sc/xml/ScDDELinkObj.xml
+++ b/sc/xml/ScDDELinkObj.xml
@@ -104,5 +104,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScDDELinksObj.xml b/sc/xml/ScDDELinksObj.xml
index 4753c186903f..65d1a1b00056 100644
--- a/sc/xml/ScDDELinksObj.xml
+++ b/sc/xml/ScDDELinksObj.xml
@@ -104,5 +104,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScDataPilotFieldGroupItemObj.xml b/sc/xml/ScDataPilotFieldGroupItemObj.xml
index 23471774ddb3..a279078820cf 100644
--- a/sc/xml/ScDataPilotFieldGroupItemObj.xml
+++ b/sc/xml/ScDataPilotFieldGroupItemObj.xml
@@ -119,5 +119,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScDataPilotFieldGroupObj.xml b/sc/xml/ScDataPilotFieldGroupObj.xml
index 8055bc661393..685ac64c351d 100644
--- a/sc/xml/ScDataPilotFieldGroupObj.xml
+++ b/sc/xml/ScDataPilotFieldGroupObj.xml
@@ -119,5 +119,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScDataPilotFieldGroupsObj.xml b/sc/xml/ScDataPilotFieldGroupsObj.xml
index ade8cd261650..201d58197296 100644
--- a/sc/xml/ScDataPilotFieldGroupsObj.xml
+++ b/sc/xml/ScDataPilotFieldGroupsObj.xml
@@ -119,5 +119,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScDataPilotFieldObj.xml b/sc/xml/ScDataPilotFieldObj.xml
index 653c69f7f5ca..c83918e1d530 100644
--- a/sc/xml/ScDataPilotFieldObj.xml
+++ b/sc/xml/ScDataPilotFieldObj.xml
@@ -119,5 +119,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScDataPilotFieldsObj.xml b/sc/xml/ScDataPilotFieldsObj.xml
index 7f46a322bd56..38f9cf5cc8a8 100644
--- a/sc/xml/ScDataPilotFieldsObj.xml
+++ b/sc/xml/ScDataPilotFieldsObj.xml
@@ -119,5 +119,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScDataPilotItemObj.xml b/sc/xml/ScDataPilotItemObj.xml
index 8349ce4baf3e..a4777b1c96b9 100644
--- a/sc/xml/ScDataPilotItemObj.xml
+++ b/sc/xml/ScDataPilotItemObj.xml
@@ -119,5 +119,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScDataPilotItemsObj.xml b/sc/xml/ScDataPilotItemsObj.xml
index 6f4d23eb6a43..4ce1b1828d57 100644
--- a/sc/xml/ScDataPilotItemsObj.xml
+++ b/sc/xml/ScDataPilotItemsObj.xml
@@ -119,5 +119,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScDataPilotTableObj.xml b/sc/xml/ScDataPilotTableObj.xml
index 3e983228b54a..53d07550aa8a 100644
--- a/sc/xml/ScDataPilotTableObj.xml
+++ b/sc/xml/ScDataPilotTableObj.xml
@@ -120,5 +120,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScDataPilotTablesObj.xml b/sc/xml/ScDataPilotTablesObj.xml
index 9e0250c0ad9e..1abff15f7049 100644
--- a/sc/xml/ScDataPilotTablesObj.xml
+++ b/sc/xml/ScDataPilotTablesObj.xml
@@ -119,5 +119,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScDatabaseRangeObj.xml b/sc/xml/ScDatabaseRangeObj.xml
index d0fb42190096..2a6164c4ce31 100644
--- a/sc/xml/ScDatabaseRangeObj.xml
+++ b/sc/xml/ScDatabaseRangeObj.xml
@@ -215,5 +215,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScDatabaseRangesObj.xml b/sc/xml/ScDatabaseRangesObj.xml
index 71f382361b6c..16454897cd3d 100644
--- a/sc/xml/ScDatabaseRangesObj.xml
+++ b/sc/xml/ScDatabaseRangesObj.xml
@@ -215,5 +215,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScDocumentConfiguration.xml b/sc/xml/ScDocumentConfiguration.xml
index 6571c3873b0c..c4e6eb561a30 100644
--- a/sc/xml/ScDocumentConfiguration.xml
+++ b/sc/xml/ScDocumentConfiguration.xml
@@ -291,5 +291,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScDrawPageObj.xml b/sc/xml/ScDrawPageObj.xml
index 3da01e9a46a7..6aa6fad612b4 100644
--- a/sc/xml/ScDrawPageObj.xml
+++ b/sc/xml/ScDrawPageObj.xml
@@ -291,5 +291,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScDrawPagesObj.xml b/sc/xml/ScDrawPagesObj.xml
index a98d0649b4c4..d5d7be85b929 100644
--- a/sc/xml/ScDrawPagesObj.xml
+++ b/sc/xml/ScDrawPagesObj.xml
@@ -291,5 +291,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScFilterDescriptorBase.xml b/sc/xml/ScFilterDescriptorBase.xml
index 91d019591486..da820bc671e8 100644
--- a/sc/xml/ScFilterDescriptorBase.xml
+++ b/sc/xml/ScFilterDescriptorBase.xml
@@ -215,5 +215,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScFunctionListObj.xml b/sc/xml/ScFunctionListObj.xml
index f42f68c6e368..185554fa0d3b 100644
--- a/sc/xml/ScFunctionListObj.xml
+++ b/sc/xml/ScFunctionListObj.xml
@@ -110,5 +110,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScHeaderFieldObj.xml b/sc/xml/ScHeaderFieldObj.xml
index 9b922c5b4c29..29365cfd6b93 100644
--- a/sc/xml/ScHeaderFieldObj.xml
+++ b/sc/xml/ScHeaderFieldObj.xml
@@ -201,5 +201,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScHeaderFieldsObj.xml b/sc/xml/ScHeaderFieldsObj.xml
index 42daa8bc6ec9..91fcd12c2447 100644
--- a/sc/xml/ScHeaderFieldsObj.xml
+++ b/sc/xml/ScHeaderFieldsObj.xml
@@ -201,5 +201,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScHeaderFooterContentObj.xml b/sc/xml/ScHeaderFooterContentObj.xml
index 61ad244f1056..e2402063b96b 100644
--- a/sc/xml/ScHeaderFooterContentObj.xml
+++ b/sc/xml/ScHeaderFooterContentObj.xml
@@ -117,5 +117,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScHeaderFooterTextCursor.xml b/sc/xml/ScHeaderFooterTextCursor.xml
index bfe25ad8c7bf..1f666a2fafd0 100644
--- a/sc/xml/ScHeaderFooterTextCursor.xml
+++ b/sc/xml/ScHeaderFooterTextCursor.xml
@@ -117,5 +117,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScHeaderFooterTextObj.xml b/sc/xml/ScHeaderFooterTextObj.xml
index d3f22b6cd4a6..87cba50d3d3f 100644
--- a/sc/xml/ScHeaderFooterTextObj.xml
+++ b/sc/xml/ScHeaderFooterTextObj.xml
@@ -117,5 +117,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScIndexEnumeration_CellAnnotationsEnumeration.xml b/sc/xml/ScIndexEnumeration_CellAnnotationsEnumeration.xml
index 34c2623c2a71..c9e2355ab7da 100644
--- a/sc/xml/ScIndexEnumeration_CellAnnotationsEnumeration.xml
+++ b/sc/xml/ScIndexEnumeration_CellAnnotationsEnumeration.xml
@@ -57,5 +57,4 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScIndexEnumeration_CellAreaLinksEnumeration.xml b/sc/xml/ScIndexEnumeration_CellAreaLinksEnumeration.xml
index 6db5e7bb4197..4b7674a5a7da 100644
--- a/sc/xml/ScIndexEnumeration_CellAreaLinksEnumeration.xml
+++ b/sc/xml/ScIndexEnumeration_CellAreaLinksEnumeration.xml
@@ -57,5 +57,4 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScIndexEnumeration_DDELinksEnumeration.xml b/sc/xml/ScIndexEnumeration_DDELinksEnumeration.xml
index 528bd93ea355..f7d8db5453f0 100644
--- a/sc/xml/ScIndexEnumeration_DDELinksEnumeration.xml
+++ b/sc/xml/ScIndexEnumeration_DDELinksEnumeration.xml
@@ -57,5 +57,4 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScIndexEnumeration_DataPilotFieldsEnumeration.xml b/sc/xml/ScIndexEnumeration_DataPilotFieldsEnumeration.xml
index 12291f94139c..6c3147d5f819 100644
--- a/sc/xml/ScIndexEnumeration_DataPilotFieldsEnumeration.xml
+++ b/sc/xml/ScIndexEnumeration_DataPilotFieldsEnumeration.xml
@@ -57,5 +57,4 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScIndexEnumeration_DataPilotItemsEnumeration.xml b/sc/xml/ScIndexEnumeration_DataPilotItemsEnumeration.xml
index d26b0030e0ae..8a50413c1dcb 100644
--- a/sc/xml/ScIndexEnumeration_DataPilotItemsEnumeration.xml
+++ b/sc/xml/ScIndexEnumeration_DataPilotItemsEnumeration.xml
@@ -57,5 +57,4 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScIndexEnumeration_DataPilotTablesEnumeration.xml b/sc/xml/ScIndexEnumeration_DataPilotTablesEnumeration.xml
index 5811e6343818..56c38fe3ac69 100644
--- a/sc/xml/ScIndexEnumeration_DataPilotTablesEnumeration.xml
+++ b/sc/xml/ScIndexEnumeration_DataPilotTablesEnumeration.xml
@@ -57,5 +57,4 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScIndexEnumeration_DatabaseRangesEnumeration.xml b/sc/xml/ScIndexEnumeration_DatabaseRangesEnumeration.xml
index dacd53b089c4..0010b86a151a 100644
--- a/sc/xml/ScIndexEnumeration_DatabaseRangesEnumeration.xml
+++ b/sc/xml/ScIndexEnumeration_DatabaseRangesEnumeration.xml
@@ -57,5 +57,4 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScIndexEnumeration_FunctionDescriptionEnumeration.xml b/sc/xml/ScIndexEnumeration_FunctionDescriptionEnumeration.xml
index cb269eea1d6b..4b7232531011 100644
--- a/sc/xml/ScIndexEnumeration_FunctionDescriptionEnumeration.xml
+++ b/sc/xml/ScIndexEnumeration_FunctionDescriptionEnumeration.xml
@@ -57,5 +57,4 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScIndexEnumeration_LabelRangesEnumeration.xml b/sc/xml/ScIndexEnumeration_LabelRangesEnumeration.xml
index 0ab1f5f0fdfb..21634e747e27 100644
--- a/sc/xml/ScIndexEnumeration_LabelRangesEnumeration.xml
+++ b/sc/xml/ScIndexEnumeration_LabelRangesEnumeration.xml
@@ -57,5 +57,4 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScIndexEnumeration_NamedRangesEnumeration.xml b/sc/xml/ScIndexEnumeration_NamedRangesEnumeration.xml
index 236a0a68261b..00505ca3df01 100644
--- a/sc/xml/ScIndexEnumeration_NamedRangesEnumeration.xml
+++ b/sc/xml/ScIndexEnumeration_NamedRangesEnumeration.xml
@@ -57,5 +57,4 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScIndexEnumeration_ScenariosEnumeration.xml b/sc/xml/ScIndexEnumeration_ScenariosEnumeration.xml
index 3e1984e762f0..f38904d39c95 100644
--- a/sc/xml/ScIndexEnumeration_ScenariosEnumeration.xml
+++ b/sc/xml/ScIndexEnumeration_ScenariosEnumeration.xml
@@ -57,5 +57,4 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScIndexEnumeration_SheetCellRangesEnumeration.xml b/sc/xml/ScIndexEnumeration_SheetCellRangesEnumeration.xml
index 52288141bf07..c384d8731536 100644
--- a/sc/xml/ScIndexEnumeration_SheetCellRangesEnumeration.xml
+++ b/sc/xml/ScIndexEnumeration_SheetCellRangesEnumeration.xml
@@ -57,5 +57,4 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScIndexEnumeration_SheetLinksEnumeration.xml b/sc/xml/ScIndexEnumeration_SheetLinksEnumeration.xml
index 3ae7fd52b769..8a62b60079fb 100644
--- a/sc/xml/ScIndexEnumeration_SheetLinksEnumeration.xml
+++ b/sc/xml/ScIndexEnumeration_SheetLinksEnumeration.xml
@@ -57,5 +57,4 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScIndexEnumeration_SpreadsheetViewPanesEnumeration.xml b/sc/xml/ScIndexEnumeration_SpreadsheetViewPanesEnumeration.xml
index 2b70bbe24d61..661a276facd7 100644
--- a/sc/xml/ScIndexEnumeration_SpreadsheetViewPanesEnumeration.xml
+++ b/sc/xml/ScIndexEnumeration_SpreadsheetViewPanesEnumeration.xml
@@ -57,5 +57,4 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScIndexEnumeration_SpreadsheetsEnumeration.xml b/sc/xml/ScIndexEnumeration_SpreadsheetsEnumeration.xml
index bf1d724c861c..f134beedbbe9 100644
--- a/sc/xml/ScIndexEnumeration_SpreadsheetsEnumeration.xml
+++ b/sc/xml/ScIndexEnumeration_SpreadsheetsEnumeration.xml
@@ -57,5 +57,4 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScIndexEnumeration_SubTotalFieldsEnumeration.xml b/sc/xml/ScIndexEnumeration_SubTotalFieldsEnumeration.xml
index 708a3a872294..f13508cf3299 100644
--- a/sc/xml/ScIndexEnumeration_SubTotalFieldsEnumeration.xml
+++ b/sc/xml/ScIndexEnumeration_SubTotalFieldsEnumeration.xml
@@ -57,5 +57,4 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScIndexEnumeration_TableAutoFormatEnumeration.xml b/sc/xml/ScIndexEnumeration_TableAutoFormatEnumeration.xml
index 9381e61674a8..27b35a630e0e 100644
--- a/sc/xml/ScIndexEnumeration_TableAutoFormatEnumeration.xml
+++ b/sc/xml/ScIndexEnumeration_TableAutoFormatEnumeration.xml
@@ -57,5 +57,4 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScIndexEnumeration_TableChartsEnumeration.xml b/sc/xml/ScIndexEnumeration_TableChartsEnumeration.xml
index b0dbd98826ea..d0bfcb134732 100644
--- a/sc/xml/ScIndexEnumeration_TableChartsEnumeration.xml
+++ b/sc/xml/ScIndexEnumeration_TableChartsEnumeration.xml
@@ -57,5 +57,4 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScIndexEnumeration_TableColumnsEnumeration.xml b/sc/xml/ScIndexEnumeration_TableColumnsEnumeration.xml
index ee1cec845777..d884d5b31e99 100644
--- a/sc/xml/ScIndexEnumeration_TableColumnsEnumeration.xml
+++ b/sc/xml/ScIndexEnumeration_TableColumnsEnumeration.xml
@@ -57,5 +57,4 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScIndexEnumeration_TableConditionalEntryEnumeration.xml b/sc/xml/ScIndexEnumeration_TableConditionalEntryEnumeration.xml
index c93d82f8d6b1..cf4eb816a885 100644
--- a/sc/xml/ScIndexEnumeration_TableConditionalEntryEnumeration.xml
+++ b/sc/xml/ScIndexEnumeration_TableConditionalEntryEnumeration.xml
@@ -57,5 +57,4 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScIndexEnumeration_TableRowsEnumeration.xml b/sc/xml/ScIndexEnumeration_TableRowsEnumeration.xml
index 49a3eb6073b3..db1a154418cd 100644
--- a/sc/xml/ScIndexEnumeration_TableRowsEnumeration.xml
+++ b/sc/xml/ScIndexEnumeration_TableRowsEnumeration.xml
@@ -57,5 +57,4 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScIndexEnumeration_TextFieldEnumeration.xml b/sc/xml/ScIndexEnumeration_TextFieldEnumeration.xml
index d6876fb76f87..c7fa00956018 100644
--- a/sc/xml/ScIndexEnumeration_TextFieldEnumeration.xml
+++ b/sc/xml/ScIndexEnumeration_TextFieldEnumeration.xml
@@ -57,5 +57,4 @@
<project-build-dependency>tools</project-build-dependency>
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScLabelRangeObj.xml b/sc/xml/ScLabelRangeObj.xml
index 43ffcb9688d9..eec965e3d3e7 100644
--- a/sc/xml/ScLabelRangeObj.xml
+++ b/sc/xml/ScLabelRangeObj.xml
@@ -213,5 +213,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScLabelRangesObj.xml b/sc/xml/ScLabelRangesObj.xml
index 80a50a2fafc4..3b62c9d56c91 100644
--- a/sc/xml/ScLabelRangesObj.xml
+++ b/sc/xml/ScLabelRangesObj.xml
@@ -213,5 +213,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScModelObj.xml b/sc/xml/ScModelObj.xml
index f0d2cb082e52..444ddeb668b5 100644
--- a/sc/xml/ScModelObj.xml
+++ b/sc/xml/ScModelObj.xml
@@ -291,5 +291,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScNamedRangeObj.xml b/sc/xml/ScNamedRangeObj.xml
index 8f518f72a144..64c1d44bcd97 100644
--- a/sc/xml/ScNamedRangeObj.xml
+++ b/sc/xml/ScNamedRangeObj.xml
@@ -213,5 +213,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScNamedRangesObj.xml b/sc/xml/ScNamedRangesObj.xml
index 59e27061bc70..8545110fc19b 100644
--- a/sc/xml/ScNamedRangesObj.xml
+++ b/sc/xml/ScNamedRangesObj.xml
@@ -213,5 +213,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScPageObj.xml b/sc/xml/ScPageObj.xml
index 678987592e21..8a2b8550315b 100644
--- a/sc/xml/ScPageObj.xml
+++ b/sc/xml/ScPageObj.xml
@@ -291,5 +291,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScRecentFunctionsObj.xml b/sc/xml/ScRecentFunctionsObj.xml
index 57bbdc6681bd..4fb9b15f5710 100644
--- a/sc/xml/ScRecentFunctionsObj.xml
+++ b/sc/xml/ScRecentFunctionsObj.xml
@@ -110,5 +110,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScScenariosObj.xml b/sc/xml/ScScenariosObj.xml
index cc644f2b228c..137598b25b29 100644
--- a/sc/xml/ScScenariosObj.xml
+++ b/sc/xml/ScScenariosObj.xml
@@ -291,5 +291,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScShapeObj.xml b/sc/xml/ScShapeObj.xml
index ef631e57ee26..77bcf8c5cd01 100644
--- a/sc/xml/ScShapeObj.xml
+++ b/sc/xml/ScShapeObj.xml
@@ -30,5 +30,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScSheetLinkObj.xml b/sc/xml/ScSheetLinkObj.xml
index f0ff56f208ff..0306717455b7 100644
--- a/sc/xml/ScSheetLinkObj.xml
+++ b/sc/xml/ScSheetLinkObj.xml
@@ -104,5 +104,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScSheetLinksObj.xml b/sc/xml/ScSheetLinksObj.xml
index f22b56cae040..3f511c249dd1 100644
--- a/sc/xml/ScSheetLinksObj.xml
+++ b/sc/xml/ScSheetLinksObj.xml
@@ -104,5 +104,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScSpreadsheetSettings.xml b/sc/xml/ScSpreadsheetSettings.xml
index c0375dfba947..6c84d07ce7f8 100644
--- a/sc/xml/ScSpreadsheetSettings.xml
+++ b/sc/xml/ScSpreadsheetSettings.xml
@@ -110,5 +110,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScSpreadsheetSettingsObj.xml b/sc/xml/ScSpreadsheetSettingsObj.xml
index 4a083524d9fa..ed5826aa19b8 100644
--- a/sc/xml/ScSpreadsheetSettingsObj.xml
+++ b/sc/xml/ScSpreadsheetSettingsObj.xml
@@ -292,5 +292,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScStyleFamiliesObj.xml b/sc/xml/ScStyleFamiliesObj.xml
index 6374def9bcd3..a4e24000306b 100644
--- a/sc/xml/ScStyleFamiliesObj.xml
+++ b/sc/xml/ScStyleFamiliesObj.xml
@@ -131,5 +131,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScStyleFamilyObj.xml b/sc/xml/ScStyleFamilyObj.xml
index a290231d21ae..15e674928c4a 100644
--- a/sc/xml/ScStyleFamilyObj.xml
+++ b/sc/xml/ScStyleFamilyObj.xml
@@ -130,5 +130,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScStyleObj.xml b/sc/xml/ScStyleObj.xml
index bae2b2a1389f..d794268017c2 100644
--- a/sc/xml/ScStyleObj.xml
+++ b/sc/xml/ScStyleObj.xml
@@ -130,5 +130,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScSubTotalDescriptorBase.xml b/sc/xml/ScSubTotalDescriptorBase.xml
index c6255f671f4f..4d504d7097e7 100644
--- a/sc/xml/ScSubTotalDescriptorBase.xml
+++ b/sc/xml/ScSubTotalDescriptorBase.xml
@@ -215,5 +215,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScSubTotalFieldObj.xml b/sc/xml/ScSubTotalFieldObj.xml
index 8738bf648dc7..fcce1d28ea84 100644
--- a/sc/xml/ScSubTotalFieldObj.xml
+++ b/sc/xml/ScSubTotalFieldObj.xml
@@ -215,5 +215,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScTabViewObj.xml b/sc/xml/ScTabViewObj.xml
index 21ffb4ca4c47..4a73050b55b8 100644
--- a/sc/xml/ScTabViewObj.xml
+++ b/sc/xml/ScTabViewObj.xml
@@ -246,5 +246,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScTableColumnObj.xml b/sc/xml/ScTableColumnObj.xml
index 57d342f82c89..bd6fd73c7705 100644
--- a/sc/xml/ScTableColumnObj.xml
+++ b/sc/xml/ScTableColumnObj.xml
@@ -313,5 +313,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScTableColumnsObj.xml b/sc/xml/ScTableColumnsObj.xml
index 33a195cea9e5..2465b29671b9 100644
--- a/sc/xml/ScTableColumnsObj.xml
+++ b/sc/xml/ScTableColumnsObj.xml
@@ -291,5 +291,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScTableConditionalEntry.xml b/sc/xml/ScTableConditionalEntry.xml
index c2527f83d720..b3b266314bfb 100644
--- a/sc/xml/ScTableConditionalEntry.xml
+++ b/sc/xml/ScTableConditionalEntry.xml
@@ -69,5 +69,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScTableConditionalFormat.xml b/sc/xml/ScTableConditionalFormat.xml
index 65d1b076883e..37e5c38b7852 100644
--- a/sc/xml/ScTableConditionalFormat.xml
+++ b/sc/xml/ScTableConditionalFormat.xml
@@ -69,5 +69,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScTableRowObj.xml b/sc/xml/ScTableRowObj.xml
index e7652f5611f8..707c5a4373ae 100644
--- a/sc/xml/ScTableRowObj.xml
+++ b/sc/xml/ScTableRowObj.xml
@@ -313,5 +313,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScTableRowsObj.xml b/sc/xml/ScTableRowsObj.xml
index b3c4bc63863d..229e4cf7b74f 100644
--- a/sc/xml/ScTableRowsObj.xml
+++ b/sc/xml/ScTableRowsObj.xml
@@ -291,5 +291,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScTableSheetObj.xml b/sc/xml/ScTableSheetObj.xml
index d8f774a2511e..58c10cd918bd 100644
--- a/sc/xml/ScTableSheetObj.xml
+++ b/sc/xml/ScTableSheetObj.xml
@@ -313,5 +313,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScTableSheetsObj.xml b/sc/xml/ScTableSheetsObj.xml
index 8a505dcbbe79..e17cbb012671 100644
--- a/sc/xml/ScTableSheetsObj.xml
+++ b/sc/xml/ScTableSheetsObj.xml
@@ -291,5 +291,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScTableValidationObj.xml b/sc/xml/ScTableValidationObj.xml
index 88a23be88cfa..581efb362d28 100644
--- a/sc/xml/ScTableValidationObj.xml
+++ b/sc/xml/ScTableValidationObj.xml
@@ -69,5 +69,4 @@
<project-build-dependency>typelib</project-build-dependency>
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScUniqueCellFormatsEnumeration.xml b/sc/xml/ScUniqueCellFormatsEnumeration.xml
index 0a93d7ad2bba..e47e4bf21476 100644
--- a/sc/xml/ScUniqueCellFormatsEnumeration.xml
+++ b/sc/xml/ScUniqueCellFormatsEnumeration.xml
@@ -313,5 +313,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScUniqueCellFormatsObj.xml b/sc/xml/ScUniqueCellFormatsObj.xml
index 6813b0041db9..83080cfc66e1 100644
--- a/sc/xml/ScUniqueCellFormatsObj.xml
+++ b/sc/xml/ScUniqueCellFormatsObj.xml
@@ -313,5 +313,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScViewPaneObj.xml b/sc/xml/ScViewPaneObj.xml
index f06ec41216eb..50e780217cc9 100644
--- a/sc/xml/ScViewPaneObj.xml
+++ b/sc/xml/ScViewPaneObj.xml
@@ -246,5 +246,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScXMLExport.xml b/sc/xml/ScXMLExport.xml
index 1600a7944de3..bedcdb4e438f 100644
--- a/sc/xml/ScXMLExport.xml
+++ b/sc/xml/ScXMLExport.xml
@@ -112,5 +112,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>
diff --git a/sc/xml/ScXMLImport.xml b/sc/xml/ScXMLImport.xml
index 6a5248002d60..ad2eca516aa4 100644
--- a/sc/xml/ScXMLImport.xml
+++ b/sc/xml/ScXMLImport.xml
@@ -112,5 +112,4 @@
<project-build-dependency>uno</project-build-dependency>
<project-build-dependency>unotools</project-build-dependency>
<project-build-dependency>vcl</project-build-dependency>
- <project-build-dependency>vos</project-build-dependency>
</module-description>