summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2010-01-19 23:22:49 +0100
committerKohei Yoshida <kyoshida@novell.com>2010-01-19 23:22:49 +0100
commit103ebf53e8acb8cc641fe97ba14b3ff04f33f8a8 (patch)
treeacca46a412b6a11ae957aa5a0e08604546ff2f79 /sc
parentc08d97576a8e0e4578073cc28da7ffe93a8b44b1 (diff)
parenta15b7f802db8a2286ce59f325d50b2db29743171 (diff)
rebased to DEV300_m69.
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/addruno.hxx2
-rw-r--r--sc/inc/afmtuno.hxx4
-rw-r--r--sc/inc/appluno.hxx2
-rw-r--r--sc/inc/attrib.hxx6
-rw-r--r--sc/inc/autoform.hxx2
-rw-r--r--sc/inc/brdcst.hxx4
-rw-r--r--sc/inc/cell.hxx4
-rw-r--r--sc/inc/cellsuno.hxx10
-rw-r--r--sc/inc/chart2uno.hxx4
-rw-r--r--sc/inc/chartlis.hxx2
-rw-r--r--sc/inc/chartuno.hxx2
-rw-r--r--sc/inc/chgtrack.hxx8
-rw-r--r--sc/inc/conditio.hxx2
-rw-r--r--sc/inc/confuno.hxx4
-rw-r--r--sc/inc/dapiuno.hxx4
-rw-r--r--sc/inc/datauno.hxx4
-rw-r--r--sc/inc/defltuno.hxx4
-rw-r--r--sc/inc/detdata.hxx2
-rw-r--r--sc/inc/dispuno.hxx4
-rw-r--r--sc/inc/docoptio.hxx4
-rw-r--r--sc/inc/docpool.hxx2
-rw-r--r--sc/inc/document.hxx2
-rw-r--r--sc/inc/docuno.hxx5
-rw-r--r--sc/inc/dptabres.hxx2
-rw-r--r--sc/inc/drawattr.hxx2
-rw-r--r--sc/inc/drdefuno.hxx2
-rw-r--r--sc/inc/editsrc.hxx2
-rw-r--r--sc/inc/externalrefmgr.hxx2
-rw-r--r--sc/inc/fielduno.hxx4
-rw-r--r--sc/inc/fmtuno.hxx2
-rw-r--r--sc/inc/forbiuno.hxx2
-rw-r--r--sc/inc/funcuno.hxx2
-rw-r--r--sc/inc/hints.hxx2
-rw-r--r--sc/inc/linkuno.hxx4
-rw-r--r--sc/inc/lookupcache.hxx2
-rw-r--r--sc/inc/nameuno.hxx2
-rw-r--r--sc/inc/notesuno.hxx2
-rw-r--r--sc/inc/patattr.hxx6
-rw-r--r--sc/inc/pch/precompiled_sc.hxx20
-rw-r--r--sc/inc/printopt.hxx3
-rw-r--r--sc/inc/sc.hrc4
-rw-r--r--sc/inc/scabstdlg.hxx10
-rw-r--r--sc/inc/scmod.hxx29
-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/styleuno.hxx4
-rw-r--r--sc/inc/targuno.hxx2
-rw-r--r--sc/inc/textuno.hxx4
-rw-r--r--sc/inc/tokenuno.hxx2
-rw-r--r--sc/inc/unoreflist.hxx2
-rw-r--r--sc/inc/viewuno.hxx4
-rwxr-xr-x[-rw-r--r--]sc/prj/build.lst2
-rwxr-xr-xsc/qa/complex/calcPreview/makefile.mk2
-rwxr-xr-xsc/qa/complex/cellRanges/makefile.mk2
-rw-r--r--sc/sdi/cellsh.sdi3
-rw-r--r--sc/sdi/docsh.sdi4
-rw-r--r--sc/sdi/makefile.mk12
-rw-r--r--sc/sdi/prevwsh.sdi4
-rw-r--r--sc/sdi/scalc.sdi27
-rw-r--r--sc/sdi/scslots.sdi7
-rw-r--r--sc/sdi/tabvwsh.sdi4
-rw-r--r--sc/source/core/data/attarray.cxx4
-rw-r--r--sc/source/core/data/bcaslot.cxx63
-rw-r--r--sc/source/core/data/cell.cxx12
-rw-r--r--sc/source/core/data/cell2.cxx12
-rw-r--r--sc/source/core/data/column.cxx8
-rw-r--r--sc/source/core/data/column2.cxx6
-rw-r--r--sc/source/core/data/column3.cxx4
-rw-r--r--sc/source/core/data/conditio.cxx4
-rw-r--r--sc/source/core/data/dbdocutl.cxx2
-rw-r--r--sc/source/core/data/dociter.cxx2
-rw-r--r--sc/source/core/data/docpool.cxx4
-rw-r--r--sc/source/core/data/documen2.cxx6
-rw-r--r--sc/source/core/data/documen3.cxx7
-rw-r--r--sc/source/core/data/documen4.cxx4
-rw-r--r--sc/source/core/data/documen8.cxx60
-rw-r--r--sc/source/core/data/documen9.cxx4
-rw-r--r--sc/source/core/data/document.cxx12
-rw-r--r--sc/source/core/data/dpdimsave.cxx2
-rw-r--r--sc/source/core/data/dpgroup.cxx2
-rw-r--r--sc/source/core/data/dpobject.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/dptabsrc.cxx4
-rw-r--r--sc/source/core/data/drwlayer.cxx4
-rw-r--r--sc/source/core/data/global.cxx8
-rw-r--r--sc/source/core/data/global2.cxx6
-rw-r--r--sc/source/core/data/globalx.cxx2
-rw-r--r--sc/source/core/data/patattr.cxx4
-rw-r--r--sc/source/core/data/poolhelp.cxx19
-rw-r--r--sc/source/core/data/postit.cxx2
-rw-r--r--sc/source/core/data/stlpool.cxx6
-rw-r--r--sc/source/core/data/stlsheet.cxx6
-rw-r--r--sc/source/core/data/table1.cxx17
-rw-r--r--sc/source/core/data/table2.cxx4
-rw-r--r--sc/source/core/data/table3.cxx2
-rw-r--r--sc/source/core/data/table4.cxx2
-rw-r--r--sc/source/core/data/table5.cxx6
-rw-r--r--sc/source/core/data/tabprotection.cxx2
-rw-r--r--sc/source/core/data/validat.cxx2
-rw-r--r--sc/source/core/inc/adiasync.hxx4
-rw-r--r--sc/source/core/inc/bcaslot.hxx5
-rw-r--r--sc/source/core/inc/core_pch.hxx44
-rw-r--r--sc/source/core/inc/ddelink.hxx2
-rw-r--r--sc/source/core/inc/poolhelp.hxx4
-rw-r--r--sc/source/core/tool/address.cxx6
-rw-r--r--sc/source/core/tool/autoform.cxx4
-rw-r--r--sc/source/core/tool/cellform.cxx4
-rw-r--r--sc/source/core/tool/chartarr.cxx4
-rw-r--r--sc/source/core/tool/chgtrack.cxx21
-rw-r--r--sc/source/core/tool/compiler.cxx36
-rw-r--r--sc/source/core/tool/ddelink.cxx2
-rw-r--r--sc/source/core/tool/detfunc.cxx2
-rw-r--r--sc/source/core/tool/docoptio.cxx2
-rw-r--r--sc/source/core/tool/editutil.cxx6
-rw-r--r--sc/source/core/tool/interpr1.cxx6
-rw-r--r--sc/source/core/tool/interpr2.cxx4
-rw-r--r--sc/source/core/tool/interpr4.cxx2
-rw-r--r--sc/source/core/tool/interpr5.cxx2
-rw-r--r--sc/source/core/tool/optutil.cxx2
-rw-r--r--sc/source/core/tool/printopt.cxx1
-rw-r--r--sc/source/core/tool/progress.cxx4
-rw-r--r--sc/source/core/tool/rangeseq.cxx2
-rw-r--r--sc/source/core/tool/reftokenhelper.cxx7
-rw-r--r--sc/source/core/tool/scmatrix.cxx2
-rw-r--r--sc/source/core/tool/token.cxx2
-rw-r--r--sc/source/core/tool/zforauto.cxx4
-rw-r--r--sc/source/filter/dif/difimp.cxx2
-rw-r--r--sc/source/filter/excel/excdoc.cxx63
-rw-r--r--sc/source/filter/excel/excel.cxx2
-rw-r--r--sc/source/filter/excel/excimp8.cxx26
-rw-r--r--sc/source/filter/excel/excrecds.cxx44
-rw-r--r--sc/source/filter/excel/exctools.cxx2
-rw-r--r--sc/source/filter/excel/expop2.cxx4
-rw-r--r--sc/source/filter/excel/impop.cxx25
-rw-r--r--sc/source/filter/excel/makefile.mk1
-rw-r--r--sc/source/filter/excel/read.cxx49
-rw-r--r--sc/source/filter/excel/xechart.cxx2
-rw-r--r--sc/source/filter/excel/xecontent.cxx2
-rw-r--r--sc/source/filter/excel/xeformula.cxx13
-rw-r--r--sc/source/filter/excel/xehelper.cxx8
-rw-r--r--sc/source/filter/excel/xelink.cxx2
-rw-r--r--sc/source/filter/excel/xename.cxx12
-rw-r--r--sc/source/filter/excel/xepage.cxx6
-rw-r--r--sc/source/filter/excel/xepivot.cxx2
-rw-r--r--sc/source/filter/excel/xeroot.cxx8
-rw-r--r--sc/source/filter/excel/xestream.cxx2
-rw-r--r--sc/source/filter/excel/xestyle.cxx210
-rw-r--r--sc/source/filter/excel/xetable.cxx2
-rw-r--r--sc/source/filter/excel/xichart.cxx4
-rw-r--r--sc/source/filter/excel/xicontent.cxx6
-rw-r--r--sc/source/filter/excel/xiescher.cxx4
-rw-r--r--sc/source/filter/excel/xihelper.cxx2
-rw-r--r--sc/source/filter/excel/xilink.cxx40
-rw-r--r--sc/source/filter/excel/xipage.cxx6
-rw-r--r--sc/source/filter/excel/xipivot.cxx4
-rw-r--r--sc/source/filter/excel/xistream.cxx6
-rw-r--r--sc/source/filter/excel/xistyle.cxx377
-rw-r--r--sc/source/filter/excel/xlchart.cxx4
-rw-r--r--sc/source/filter/excel/xlformula.cxx7
-rw-r--r--sc/source/filter/excel/xlroot.cxx11
-rw-r--r--sc/source/filter/excel/xltools.cxx46
-rw-r--r--sc/source/filter/excel/xltracer.cxx2
-rw-r--r--sc/source/filter/ftools/fapihelper.cxx4
-rw-r--r--sc/source/filter/ftools/ftools.cxx6
-rw-r--r--sc/source/filter/html/htmlexp.cxx10
-rw-r--r--sc/source/filter/html/htmlexp2.cxx2
-rw-r--r--sc/source/filter/html/htmlpars.cxx2
-rw-r--r--sc/source/filter/inc/eeparser.hxx2
-rw-r--r--sc/source/filter/inc/excrecds.hxx14
-rw-r--r--sc/source/filter/inc/filt_pch.hxx32
-rw-r--r--sc/source/filter/inc/ftools.hxx4
-rw-r--r--sc/source/filter/inc/imp_op.hxx2
-rw-r--r--sc/source/filter/inc/root.hxx1
-rw-r--r--sc/source/filter/inc/xcl97esc.hxx2
-rw-r--r--sc/source/filter/inc/xcl97rec.hxx85
-rw-r--r--sc/source/filter/inc/xestream.hxx4
-rw-r--r--sc/source/filter/inc/xestyle.hxx43
-rw-r--r--sc/source/filter/inc/xichart.hxx2
-rw-r--r--sc/source/filter/inc/xiescher.hxx4
-rw-r--r--sc/source/filter/inc/xistream.hxx10
-rw-r--r--sc/source/filter/inc/xistyle.hxx75
-rw-r--r--sc/source/filter/inc/xlconst.hxx27
-rw-r--r--sc/source/filter/inc/xlroot.hxx3
-rw-r--r--sc/source/filter/inc/xlstyle.hxx4
-rw-r--r--sc/source/filter/inc/xltools.hxx7
-rw-r--r--sc/source/filter/lotus/tool.cxx2
-rw-r--r--sc/source/filter/rtf/eeimpars.cxx4
-rw-r--r--sc/source/filter/rtf/rtfexp.cxx2
-rw-r--r--sc/source/filter/starcalc/scflt.cxx4
-rw-r--r--sc/source/filter/starcalc/scfobj.cxx2
-rw-r--r--sc/source/filter/xcl97/XclImpChangeTrack.cxx2
-rw-r--r--sc/source/filter/xcl97/xcl97esc.cxx2
-rw-r--r--sc/source/filter/xcl97/xcl97rec.cxx142
-rw-r--r--sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx2
-rw-r--r--sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx2
-rw-r--r--sc/source/filter/xml/XMLExportDatabaseRanges.cxx4
-rw-r--r--sc/source/filter/xml/XMLTrackedChangesContext.cxx2
-rw-r--r--sc/source/filter/xml/xmlcelli.cxx4
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx10
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx8
-rw-r--r--sc/source/filter/xml/xmlwrap.cxx14
-rw-r--r--sc/source/ui/Accessibility/AccessibleContextBase.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocument.cxx4
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessiblePageHeader.cxx6
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewTable.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleText.cxx6
-rw-r--r--sc/source/ui/app/drwtrans.cxx4
-rw-r--r--sc/source/ui/app/inputhdl.cxx2
-rw-r--r--sc/source/ui/app/inputwin.cxx55
-rw-r--r--sc/source/ui/app/lnktrans.cxx2
-rw-r--r--sc/source/ui/app/makefile.mk3
-rw-r--r--sc/source/ui/app/scdll.cxx4
-rw-r--r--sc/source/ui/app/scmod.cxx289
-rw-r--r--sc/source/ui/app/scmod2.cxx2
-rw-r--r--sc/source/ui/app/transobj.cxx4
-rw-r--r--sc/source/ui/app/typemap.cxx12
-rw-r--r--sc/source/ui/attrdlg/attrdlg.cxx2
-rw-r--r--sc/source/ui/attrdlg/condfrmt.cxx2
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.cxx10
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.hxx5
-rw-r--r--sc/source/ui/cctrl/tbinsert.cxx4
-rw-r--r--sc/source/ui/cctrl/tbzoomsliderctrl.cxx10
-rw-r--r--sc/source/ui/dbgui/csvgrid.cxx18
-rw-r--r--sc/source/ui/dbgui/makefile.mk3
-rw-r--r--sc/source/ui/dbgui/pfiltdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/scendlg.cxx2
-rw-r--r--sc/source/ui/dbgui/tpsubt.cxx4
-rw-r--r--sc/source/ui/dbgui/validate.cxx378
-rw-r--r--sc/source/ui/dbgui/validate.src82
-rw-r--r--sc/source/ui/docshell/arealink.cxx6
-rw-r--r--sc/source/ui/docshell/docfunc.cxx10
-rw-r--r--sc/source/ui/docshell/docsh.cxx59
-rw-r--r--sc/source/ui/docshell/docsh2.cxx26
-rw-r--r--sc/source/ui/docshell/docsh3.cxx10
-rw-r--r--sc/source/ui/docshell/docsh4.cxx8
-rw-r--r--sc/source/ui/docshell/docsh5.cxx5
-rw-r--r--sc/source/ui/docshell/docsh8.cxx4
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx34
-rw-r--r--sc/source/ui/docshell/impex.cxx4
-rw-r--r--sc/source/ui/docshell/olinefun.cxx12
-rw-r--r--sc/source/ui/docshell/tablink.cxx4
-rw-r--r--sc/source/ui/drawfunc/chartsh.cxx2
-rw-r--r--sc/source/ui/drawfunc/drawsh.cxx12
-rw-r--r--sc/source/ui/drawfunc/drawsh2.cxx4
-rw-r--r--sc/source/ui/drawfunc/drawsh5.cxx4
-rw-r--r--sc/source/ui/drawfunc/drformsh.cxx2
-rw-r--r--sc/source/ui/drawfunc/drtxtob.cxx6
-rw-r--r--sc/source/ui/drawfunc/drtxtob2.cxx2
-rw-r--r--sc/source/ui/drawfunc/fuconcustomshape.cxx2
-rw-r--r--sc/source/ui/drawfunc/fuins1.cxx2
-rw-r--r--sc/source/ui/drawfunc/fuins2.cxx8
-rw-r--r--sc/source/ui/drawfunc/futext.cxx2
-rw-r--r--sc/source/ui/drawfunc/graphsh.cxx2
-rw-r--r--sc/source/ui/drawfunc/mediash.cxx2
-rw-r--r--sc/source/ui/drawfunc/oleobjsh.cxx2
-rw-r--r--sc/source/ui/formdlg/formula.cxx4
-rw-r--r--sc/source/ui/inc/AccessibilityHints.hxx4
-rw-r--r--sc/source/ui/inc/AccessibleContextBase.hxx2
-rw-r--r--sc/source/ui/inc/DrawModelBroadcaster.hxx2
-rw-r--r--sc/source/ui/inc/acredlin.hxx2
-rw-r--r--sc/source/ui/inc/anyrefdg.hxx129
-rw-r--r--sc/source/ui/inc/csvgrid.hxx9
-rw-r--r--sc/source/ui/inc/docsh.hxx4
-rw-r--r--sc/source/ui/inc/dwfunctr.hxx2
-rw-r--r--sc/source/ui/inc/formula.hxx2
-rw-r--r--sc/source/ui/inc/funcpage.hxx2
-rw-r--r--sc/source/ui/inc/inputwin.hxx15
-rw-r--r--sc/source/ui/inc/msgpool.hxx6
-rw-r--r--sc/source/ui/inc/navipi.hxx4
-rw-r--r--sc/source/ui/inc/parawin.hxx2
-rw-r--r--sc/source/ui/inc/privsplt.hxx1
-rw-r--r--sc/source/ui/inc/reffact.hxx16
-rw-r--r--sc/source/ui/inc/servobj.hxx4
-rw-r--r--sc/source/ui/inc/tabview.hxx7
-rw-r--r--sc/source/ui/inc/target.hxx2
-rw-r--r--sc/source/ui/inc/tbzoomsliderctrl.hxx2
-rw-r--r--sc/source/ui/inc/ui_pch.hxx48
-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/undodraw.hxx2
-rw-r--r--sc/source/ui/inc/undotab.hxx4
-rw-r--r--sc/source/ui/inc/validate.hrc3
-rw-r--r--sc/source/ui/inc/validate.hxx196
-rw-r--r--sc/source/ui/inc/viewdata.hxx3
-rw-r--r--sc/source/ui/inc/viewfunc.hxx4
-rw-r--r--sc/source/ui/miscdlgs/acredlin.cxx2
-rw-r--r--sc/source/ui/miscdlgs/anyrefdg.cxx205
-rw-r--r--sc/source/ui/miscdlgs/autofmt.cxx2
-rw-r--r--sc/source/ui/miscdlgs/filldlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/optsolver.cxx2
-rw-r--r--sc/source/ui/miscdlgs/redcom.cxx2
-rw-r--r--sc/source/ui/miscdlgs/scuiautofmt.cxx2
-rw-r--r--sc/source/ui/miscdlgs/sharedocdlg.cxx4
-rw-r--r--sc/source/ui/miscdlgs/solvrdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/textdlgs.cxx4
-rw-r--r--sc/source/ui/navipi/content.cxx2
-rw-r--r--sc/source/ui/navipi/navcitem.cxx4
-rw-r--r--sc/source/ui/navipi/navipi.cxx16
-rw-r--r--sc/source/ui/navipi/scenwnd.cxx4
-rw-r--r--sc/source/ui/optdlg/tpprint.cxx2
-rw-r--r--sc/source/ui/pagedlg/areasdlg.cxx2
-rw-r--r--sc/source/ui/pagedlg/hfedtdlg.cxx2
-rw-r--r--sc/source/ui/pagedlg/scuitphfedit.cxx4
-rw-r--r--sc/source/ui/pagedlg/tphf.cxx2
-rw-r--r--sc/source/ui/pagedlg/tptable.cxx4
-rw-r--r--sc/source/ui/src/globstr.src2
-rw-r--r--sc/source/ui/styleui/scstyles.src2
-rw-r--r--sc/source/ui/styleui/styledlg.cxx8
-rw-r--r--sc/source/ui/undo/undocell.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/unoobj/addruno.cxx2
-rw-r--r--sc/source/ui/unoobj/afmtuno.cxx2
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx4
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx8
-rw-r--r--sc/source/ui/unoobj/chartuno.cxx2
-rw-r--r--sc/source/ui/unoobj/cursuno.cxx4
-rw-r--r--sc/source/ui/unoobj/dapiuno.cxx2
-rw-r--r--sc/source/ui/unoobj/datauno.cxx4
-rw-r--r--sc/source/ui/unoobj/defltuno.cxx4
-rw-r--r--sc/source/ui/unoobj/dispuno.cxx2
-rw-r--r--sc/source/ui/unoobj/docuno.cxx28
-rw-r--r--sc/source/ui/unoobj/fielduno.cxx2
-rw-r--r--sc/source/ui/unoobj/funcuno.cxx2
-rw-r--r--sc/source/ui/unoobj/linkuno.cxx2
-rw-r--r--sc/source/ui/unoobj/nameuno.cxx2
-rw-r--r--sc/source/ui/unoobj/notesuno.cxx2
-rw-r--r--sc/source/ui/unoobj/optuno.cxx2
-rw-r--r--sc/source/ui/unoobj/scdetect.cxx6
-rw-r--r--sc/source/ui/unoobj/servuno.cxx131
-rw-r--r--sc/source/ui/unoobj/styleuno.cxx8
-rw-r--r--sc/source/ui/unoobj/targuno.cxx6
-rw-r--r--sc/source/ui/unoobj/tokenuno.cxx2
-rw-r--r--sc/source/ui/unoobj/warnpassword.cxx2
-rw-r--r--sc/source/ui/vba/excelvbahelper.cxx222
-rw-r--r--sc/source/ui/vba/excelvbahelper.hxx62
-rw-r--r--sc/source/ui/vba/helperdecl.hxx108
-rw-r--r--sc/source/ui/vba/makefile.mk33
-rw-r--r--sc/source/ui/vba/service.cxx22
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/ApplicationRunTest.xlsbin0 -> 25088 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/AutoFilter.xlsbin0 -> 54272 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/CalcFont.xlsbin0 -> 73728 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/CalcZoom.xlsbin0 -> 62976 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/FinancialFuncTests.xlsbin0 -> 71168 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/FinancialFuncs.xlsbin0 -> 47104 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/MiscOperatorTests.xlsbin0 -> 66048 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/MiscRangeTests.xlsbin0 -> 126976 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/PageBreaks.xlsbin0 -> 63488 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/Ranges-2.xlsbin0 -> 2209280 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/Ranges-3.xlsbin0 -> 54784 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/Ranges.xlsbin0 -> 2236416 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/Shapes.xlsbin0 -> 74240 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/StrConv-test.xlsbin0 -> 65024 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/Template.xlsbin0 -> 65024 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/TestAddress.xlsbin0 -> 84480 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/TestCalc_Rangetest.xlsbin0 -> 67584 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/TestCalc_Rangetest2.xlsbin0 -> 71680 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/TestIntersection.xlsbin0 -> 81408 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/TestUnion.xlsbin0 -> 72192 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/VariantTest.xlsbin0 -> 68608 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/Window.xlsbin0 -> 87040 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/bytearraystring.xlsbin0 -> 58880 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/dateserial.xlsbin0 -> 57344 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/datevalue.xlsbin0 -> 61952 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/format.xlsbin0 -> 102400 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/excel/AutoFilter.log20
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/excel/MiscRangeTests.log45
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/excel/Ranges-2.log68
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/excel/Ranges-3.log8
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/excel/Ranges.log280
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/excel/TestAddress.log62
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/excel/TestCalc_Rangetest.log60
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/excel/TestCalc_Rangetest2.log64
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/format.log36
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/AutoFilter.log20
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/CalcFont.log17
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/CalcZoom.log18
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/FinancialFuncTests.log31
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/MiscOperatorTests.log30
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/MiscRangeTests.log45
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/PageBreaks.log10
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/Ranges-2.log68
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/Ranges-3.log8
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/Ranges.log280
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/Shapes.log77
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/StrConv-test.log9
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/Template.log14
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/TestAddress.log67
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/TestCalc_Rangetest.log60
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/TestCalc_Rangetest2.log65
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/TestIntersection.log26
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/TestUnion.log17
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/VariantTest.log47
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/Window.log46
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/bytearraystring.log8
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/dateserial.log9
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/datevalue.log8
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/format.log36
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/pagesetup.log77
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/partition.log11
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/range-4.log16
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/replace.log14
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/stringplusdouble.log62
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/window2.log41
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/AutoFilter.log20
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/CalcFont.log17
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/MiscOperatorTests.log29
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/MiscRangeTests.log45
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/PageBreaks.log10
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/Ranges-2.log68
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/Ranges-3.log8
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/Ranges.log280
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/Shapes.log77
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/StrConv-test.log9
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/Template.log14
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/TestAddress.log67
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/TestCalc_Rangetest.log60
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/TestCalc_Rangetest2.log65
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/TestIntersection.log26
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/TestUnion.log17
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/VariantTest.log47
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/Window.log46
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/bytearraystring.log8
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/dateserial.log9
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/datevalue.log8
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/format.log36
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/pagesetup.log87
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/partition.log11
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/range-4.log16
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/replace.log14
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/stringplusdouble.log62
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/window2.log41
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/notwork/error.xlsbin0 -> 38400 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/notwork/imagecontrols.xlsbin0 -> 2415104 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/notwork/keyword.xlsbin0 -> 50688 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/notwork/objectmodule.xlsbin0 -> 62464 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/notwork/stringtodouble.odsbin0 -> 13260 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/partition.xlsbin0 -> 65536 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/range-4.xlsbin0 -> 2192384 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/replace.xlsbin0 -> 64512 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/stringplusdouble.xlsbin0 -> 75264 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments-ooo-build/window2.xlsbin0 -> 72192 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments/ApplicationRunTest.xlsbin0 -> 25088 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments/CalcFont.xlsbin0 -> 73728 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments/FinancialFuncs.xlsbin0 -> 47104 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments/Ranges.xlsbin2248192 -> 2236416 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments/TestAddress.xlsbin52736 -> 84480 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments/TestIntersection.xlsbin0 -> 81408 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments/TestUnion.xlsbin0 -> 72192 bytes
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments/logs/unix/CalcFont.log17
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges.log20
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestAddress.log11
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestIntersection.log26
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestUnion.log17
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments/logs/unix/format.log4
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments/logs/unix/replace.log4
-rw-r--r--sc/source/ui/vba/testvba/TestDocuments/logs/unix/window2.log24
-rwxr-xr-xsc/source/ui/vba/testvba/TestDocuments/pagesetup.xls (renamed from sc/source/ui/vba/testvba/TestDocuments/PageSetup.xls)bin72704 -> 72704 bytes
-rwxr-xr-xsc/source/ui/vba/testvba/TestDocuments/window2.xlsbin91136 -> 72192 bytes
-rw-r--r--sc/source/ui/vba/testvba/runTests.pl2
-rwxr-xr-xsc/source/ui/vba/testvba/testclientbin0 -> 39390 bytes
-rw-r--r--sc/source/ui/vba/vbaapplication.cxx286
-rw-r--r--sc/source/ui/vba/vbaapplication.hxx21
-rw-r--r--sc/source/ui/vba/vbaassistant.hxx4
-rw-r--r--sc/source/ui/vba/vbaaxes.hxx2
-rw-r--r--sc/source/ui/vba/vbaaxis.hxx4
-rw-r--r--sc/source/ui/vba/vbaborders.hxx2
-rw-r--r--sc/source/ui/vba/vbabutton.cxx74
-rw-r--r--sc/source/ui/vba/vbabutton.hxx51
-rw-r--r--sc/source/ui/vba/vbacharacters.hxx2
-rw-r--r--sc/source/ui/vba/vbachart.hxx2
-rw-r--r--sc/source/ui/vba/vbachartobject.cxx7
-rw-r--r--sc/source/ui/vba/vbachartobject.hxx2
-rw-r--r--sc/source/ui/vba/vbachartobjects.hxx4
-rw-r--r--sc/source/ui/vba/vbacharts.cxx6
-rw-r--r--sc/source/ui/vba/vbacharts.hxx6
-rw-r--r--sc/source/ui/vba/vbacheckbox.cxx110
-rw-r--r--sc/source/ui/vba/vbacheckbox.hxx60
-rw-r--r--sc/source/ui/vba/vbacollectionimpl.cxx136
-rw-r--r--sc/source/ui/vba/vbacollectionimpl.hxx259
-rw-r--r--sc/source/ui/vba/vbacolorformat.cxx190
-rw-r--r--sc/source/ui/vba/vbacolorformat.hxx128
-rw-r--r--sc/source/ui/vba/vbacombobox.cxx175
-rw-r--r--sc/source/ui/vba/vbacombobox.hxx80
-rw-r--r--sc/source/ui/vba/vbacommandbar.cxx329
-rw-r--r--sc/source/ui/vba/vbacommandbar.hxx105
-rw-r--r--sc/source/ui/vba/vbacommandbarcontrol.cxx403
-rw-r--r--sc/source/ui/vba/vbacommandbarcontrol.hxx90
-rw-r--r--sc/source/ui/vba/vbacommandbarcontrols.cxx246
-rw-r--r--sc/source/ui/vba/vbacommandbarcontrols.hxx90
-rw-r--r--sc/source/ui/vba/vbacommandbars.cxx247
-rw-r--r--sc/source/ui/vba/vbacommandbars.hxx79
-rw-r--r--sc/source/ui/vba/vbacomment.hxx2
-rw-r--r--sc/source/ui/vba/vbacomments.hxx4
-rw-r--r--sc/source/ui/vba/vbacondition.hxx2
-rw-r--r--sc/source/ui/vba/vbacontrol.cxx468
-rw-r--r--sc/source/ui/vba/vbacontrol.hxx111
-rw-r--r--sc/source/ui/vba/vbacontrols.cxx227
-rw-r--r--sc/source/ui/vba/vbacontrols.hxx62
-rw-r--r--sc/source/ui/vba/vbadialog.cxx32
-rw-r--r--sc/source/ui/vba/vbadialog.hxx17
-rw-r--r--sc/source/ui/vba/vbadialogs.cxx25
-rw-r--r--sc/source/ui/vba/vbadialogs.hxx13
-rw-r--r--sc/source/ui/vba/vbafillformat.cxx202
-rw-r--r--sc/source/ui/vba/vbafillformat.hxx74
-rw-r--r--sc/source/ui/vba/vbafont.cxx142
-rw-r--r--sc/source/ui/vba/vbafont.hxx15
-rw-r--r--sc/source/ui/vba/vbaformat.cxx5
-rw-r--r--sc/source/ui/vba/vbaformat.hxx2
-rw-r--r--sc/source/ui/vba/vbaformatconditions.cxx3
-rw-r--r--sc/source/ui/vba/vbaformatconditions.hxx2
-rw-r--r--sc/source/ui/vba/vbaframe.cxx93
-rw-r--r--sc/source/ui/vba/vbaframe.hxx58
-rw-r--r--sc/source/ui/vba/vbaglobals.cxx204
-rw-r--r--sc/source/ui/vba/vbaglobals.hxx52
-rw-r--r--sc/source/ui/vba/vbahelper.cxx4
-rw-r--r--sc/source/ui/vba/vbahelper.hxx352
-rw-r--r--sc/source/ui/vba/vbahelperinterface.hxx116
-rw-r--r--sc/source/ui/vba/vbahyperlink.cxx2
-rw-r--r--sc/source/ui/vba/vbahyperlink.hxx2
-rw-r--r--sc/source/ui/vba/vbaimage.cxx59
-rw-r--r--sc/source/ui/vba/vbaimage.hxx48
-rw-r--r--sc/source/ui/vba/vbainterior.cxx26
-rw-r--r--sc/source/ui/vba/vbainterior.hxx3
-rw-r--r--sc/source/ui/vba/vbalabel.cxx88
-rw-r--r--sc/source/ui/vba/vbalabel.hxx56
-rw-r--r--sc/source/ui/vba/vbalineformat.cxx458
-rw-r--r--sc/source/ui/vba/vbalineformat.hxx85
-rw-r--r--sc/source/ui/vba/vbalistbox.cxx289
-rw-r--r--sc/source/ui/vba/vbalistbox.hxx90
-rw-r--r--sc/source/ui/vba/vbalistcontrolhelper.cxx145
-rw-r--r--sc/source/ui/vba/vbalistcontrolhelper.hxx20
-rw-r--r--sc/source/ui/vba/vbamultipage.cxx132
-rw-r--r--sc/source/ui/vba/vbamultipage.hxx65
-rw-r--r--sc/source/ui/vba/vbaname.cxx7
-rw-r--r--sc/source/ui/vba/vbaname.hxx4
-rw-r--r--sc/source/ui/vba/vbanames.cxx4
-rw-r--r--sc/source/ui/vba/vbanames.hxx5
-rw-r--r--sc/source/ui/vba/vbaoleobject.cxx56
-rw-r--r--sc/source/ui/vba/vbaoleobject.hxx6
-rw-r--r--sc/source/ui/vba/vbaoleobjects.hxx4
-rw-r--r--sc/source/ui/vba/vbaoutline.hxx2
-rw-r--r--sc/source/ui/vba/vbapagebreak.cxx34
-rw-r--r--sc/source/ui/vba/vbapagebreak.hxx21
-rw-r--r--sc/source/ui/vba/vbapagebreaks.cxx73
-rw-r--r--sc/source/ui/vba/vbapagebreaks.hxx33
-rw-r--r--sc/source/ui/vba/vbapages.cxx81
-rw-r--r--sc/source/ui/vba/vbapages.hxx64
-rw-r--r--sc/source/ui/vba/vbapagesetup.cxx285
-rw-r--r--sc/source/ui/vba/vbapagesetup.hxx25
-rw-r--r--sc/source/ui/vba/vbapalette.cxx2
-rw-r--r--sc/source/ui/vba/vbapalette.hxx4
-rw-r--r--sc/source/ui/vba/vbapane.hxx2
-rw-r--r--sc/source/ui/vba/vbapictureformat.cxx147
-rw-r--r--sc/source/ui/vba/vbapictureformat.hxx64
-rw-r--r--sc/source/ui/vba/vbapivotcache.hxx2
-rw-r--r--sc/source/ui/vba/vbapivottable.hxx4
-rw-r--r--sc/source/ui/vba/vbapivottables.hxx6
-rw-r--r--sc/source/ui/vba/vbaprogressbar.cxx78
-rw-r--r--sc/source/ui/vba/vbaprogressbar.hxx59
-rw-r--r--sc/source/ui/vba/vbapropvalue.hxx2
-rw-r--r--sc/source/ui/vba/vbaradiobutton.cxx107
-rw-r--r--sc/source/ui/vba/vbaradiobutton.hxx55
-rw-r--r--sc/source/ui/vba/vbarange.cxx106
-rw-r--r--sc/source/ui/vba/vbarange.hxx5
-rw-r--r--sc/source/ui/vba/vbascrollbar.cxx139
-rw-r--r--sc/source/ui/vba/vbascrollbar.hxx66
-rw-r--r--sc/source/ui/vba/vbaseriescollection.hxx6
-rw-r--r--sc/source/ui/vba/vbashape.cxx480
-rw-r--r--sc/source/ui/vba/vbashape.hxx108
-rw-r--r--sc/source/ui/vba/vbashaperange.cxx170
-rw-r--r--sc/source/ui/vba/vbashaperange.hxx66
-rw-r--r--sc/source/ui/vba/vbashapes.cxx394
-rw-r--r--sc/source/ui/vba/vbashapes.hxx80
-rw-r--r--sc/source/ui/vba/vbaspinbutton.cxx109
-rw-r--r--sc/source/ui/vba/vbaspinbutton.hxx61
-rw-r--r--sc/source/ui/vba/vbastyle.cxx4
-rw-r--r--sc/source/ui/vba/vbastyles.cxx1
-rw-r--r--sc/source/ui/vba/vbastyles.hxx2
-rw-r--r--sc/source/ui/vba/vbatextbox.cxx137
-rw-r--r--sc/source/ui/vba/vbatextbox.hxx57
-rw-r--r--sc/source/ui/vba/vbatextboxshape.cxx4
-rw-r--r--sc/source/ui/vba/vbatextboxshape.hxx4
-rw-r--r--sc/source/ui/vba/vbatextframe.cxx118
-rw-r--r--sc/source/ui/vba/vbatextframe.hxx40
-rw-r--r--sc/source/ui/vba/vbatitle.hxx5
-rw-r--r--sc/source/ui/vba/vbatogglebutton.cxx108
-rw-r--r--sc/source/ui/vba/vbatogglebutton.hxx63
-rw-r--r--sc/source/ui/vba/vbauserform.cxx228
-rw-r--r--sc/source/ui/vba/vbauserform.hxx78
-rw-r--r--sc/source/ui/vba/vbavalidation.hxx2
-rw-r--r--sc/source/ui/vba/vbawindow.cxx195
-rw-r--r--sc/source/ui/vba/vbawindow.hxx17
-rw-r--r--sc/source/ui/vba/vbawindows.cxx29
-rw-r--r--sc/source/ui/vba/vbawindows.hxx7
-rw-r--r--sc/source/ui/vba/vbaworkbook.cxx175
-rw-r--r--sc/source/ui/vba/vbaworkbook.hxx20
-rw-r--r--sc/source/ui/vba/vbaworkbooks.cxx230
-rw-r--r--sc/source/ui/vba/vbaworkbooks.hxx11
-rw-r--r--sc/source/ui/vba/vbaworksheet.cxx124
-rw-r--r--sc/source/ui/vba/vbaworksheet.hxx7
-rw-r--r--sc/source/ui/vba/vbaworksheets.cxx35
-rw-r--r--sc/source/ui/vba/vbaworksheets.hxx3
-rw-r--r--sc/source/ui/view/cellsh.cxx8
-rw-r--r--sc/source/ui/view/cellsh1.cxx10
-rw-r--r--sc/source/ui/view/cellsh2.cxx42
-rw-r--r--sc/source/ui/view/cellsh3.cxx2
-rw-r--r--sc/source/ui/view/dbfunc3.cxx2
-rw-r--r--sc/source/ui/view/editsh.cxx4
-rw-r--r--sc/source/ui/view/formatsh.cxx8
-rw-r--r--sc/source/ui/view/gridwin.cxx4
-rw-r--r--sc/source/ui/view/gridwin3.cxx2
-rw-r--r--sc/source/ui/view/makefile.mk3
-rw-r--r--sc/source/ui/view/notemark.cxx4
-rw-r--r--sc/source/ui/view/olinewin.cxx2
-rw-r--r--sc/source/ui/view/output2.cxx4
-rw-r--r--sc/source/ui/view/output3.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.cxx2
-rw-r--r--sc/source/ui/view/prevwsh.cxx6
-rw-r--r--sc/source/ui/view/prevwsh2.cxx2
-rw-r--r--sc/source/ui/view/reffact.cxx84
-rw-r--r--sc/source/ui/view/tabvwsh.cxx4
-rw-r--r--sc/source/ui/view/tabvwsh2.cxx10
-rw-r--r--sc/source/ui/view/tabvwsh3.cxx10
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx4
-rw-r--r--sc/source/ui/view/tabvwsh5.cxx4
-rw-r--r--sc/source/ui/view/tabvwsh9.cxx2
-rw-r--r--sc/source/ui/view/tabvwsha.cxx8
-rw-r--r--sc/source/ui/view/tabvwshb.cxx6
-rw-r--r--sc/source/ui/view/tabvwshe.cxx2
-rw-r--r--sc/source/ui/view/tabvwshf.cxx6
-rw-r--r--sc/source/ui/view/tabvwshh.cxx2
-rw-r--r--sc/source/ui/view/viewdata.cxx135
-rw-r--r--sc/source/ui/view/viewfun2.cxx6
-rw-r--r--sc/source/ui/view/viewfun3.cxx6
-rw-r--r--sc/source/ui/view/viewfun4.cxx4
-rw-r--r--sc/source/ui/view/viewfun5.cxx6
-rw-r--r--sc/source/ui/view/viewfunc.cxx4
-rw-r--r--sc/source/ui/view/viewutil.cxx12
-rw-r--r--sc/util/makefile.mk14
-rw-r--r--sc/workben/addin.cxx2
-rw-r--r--sc/workben/result.hxx2
648 files changed, 7675 insertions, 12706 deletions
diff --git a/sc/inc/addruno.hxx b/sc/inc/addruno.hxx
index 1427d9b14a75..c9089ba48d2e 100644
--- a/sc/inc/addruno.hxx
+++ b/sc/inc/addruno.hxx
@@ -34,7 +34,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <cppuhelper/implbase2.hxx>
-#include <svtools/lstner.hxx>
+#include <svl/lstner.hxx>
#include "global.hxx"
#include "address.hxx"
diff --git a/sc/inc/afmtuno.hxx b/sc/inc/afmtuno.hxx
index ac7d444ca561..843fa673543f 100644
--- a/sc/inc/afmtuno.hxx
+++ b/sc/inc/afmtuno.hxx
@@ -31,8 +31,8 @@
#ifndef SC_AFMTUNO_HXX
#define SC_AFMTUNO_HXX
-#include <svtools/lstner.hxx>
-#include <svtools/itemprop.hxx>
+#include <svl/lstner.hxx>
+#include <svl/itemprop.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/container/XContainer.hpp>
#include <com/sun/star/container/XIndexContainer.hpp>
diff --git a/sc/inc/appluno.hxx b/sc/inc/appluno.hxx
index 09a1e9ced9ba..05de5a22cc90 100644
--- a/sc/inc/appluno.hxx
+++ b/sc/inc/appluno.hxx
@@ -31,7 +31,7 @@
#ifndef SC_APPLUNO_HXX
#define SC_APPLUNO_HXX
-#include <svtools/itemprop.hxx>
+#include <svl/itemprop.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/sheet/XRecentFunctions.hpp>
diff --git a/sc/inc/attrib.hxx b/sc/inc/attrib.hxx
index 8dd77cf68c3f..55bb707f4edb 100644
--- a/sc/inc/attrib.hxx
+++ b/sc/inc/attrib.hxx
@@ -31,9 +31,9 @@
#ifndef SC_SCATTR_HXX
#define SC_SCATTR_HXX
-#include <svtools/poolitem.hxx>
-#include <svtools/intitem.hxx>
-#include <svtools/eitem.hxx>
+#include <svl/poolitem.hxx>
+#include <svl/intitem.hxx>
+#include <svl/eitem.hxx>
#include "scdllapi.h"
#include "global.hxx"
#include "address.hxx"
diff --git a/sc/inc/autoform.hxx b/sc/inc/autoform.hxx
index f8df5e9fa236..8ec139ffa2d5 100644
--- a/sc/inc/autoform.hxx
+++ b/sc/inc/autoform.hxx
@@ -64,7 +64,7 @@ JP 20.07.95:
#include <svx/udlnitem.hxx>
#include <svx/wghtitem.hxx>
#include <svx/rotmodit.hxx>
-#include <svtools/intitem.hxx>
+#include <svl/intitem.hxx>
#include <svx/bolnitem.hxx>
#include "scdllapi.h"
#include "collect.hxx"
diff --git a/sc/inc/brdcst.hxx b/sc/inc/brdcst.hxx
index 0d4b9aac9fa7..e7418c8dedfe 100644
--- a/sc/inc/brdcst.hxx
+++ b/sc/inc/brdcst.hxx
@@ -33,8 +33,8 @@
#include "global.hxx"
#include "address.hxx"
#include <tools/rtti.hxx>
-#include <svtools/hint.hxx>
-#include <svtools/smplhint.hxx>
+#include <svl/hint.hxx>
+#include <svl/smplhint.hxx>
class ScBaseCell;
#define SC_HINT_DYING SFX_HINT_DYING
diff --git a/sc/inc/cell.hxx b/sc/inc/cell.hxx
index 1f2bff35ce98..9355176e3a62 100644
--- a/sc/inc/cell.hxx
+++ b/sc/inc/cell.hxx
@@ -35,14 +35,14 @@
#include <set>
#include <tools/mempool.hxx>
-#include <svtools/listener.hxx>
+#include <svl/listener.hxx>
#include "global.hxx"
#include "rangenam.hxx"
#include "formula/grammar.hxx"
#include "tokenarray.hxx"
#include "formularesult.hxx"
#include <rtl/ustrbuf.hxx>
-#include <vcl/fontcvt.hxx>
+#include <unotools/fontcvt.hxx>
#include "scdllapi.h"
#define USE_MEMPOOL
diff --git a/sc/inc/cellsuno.hxx b/sc/inc/cellsuno.hxx
index 2dd0bd6cc16e..7d0cc1411263 100644
--- a/sc/inc/cellsuno.hxx
+++ b/sc/inc/cellsuno.hxx
@@ -35,9 +35,9 @@
#include "rangelst.hxx" // ScRangeList
#include "formula/grammar.hxx"
-#include <svtools/lstner.hxx>
-#include <svtools/listener.hxx>
-#include <svtools/itemprop.hxx>
+#include <svl/lstner.hxx>
+#include <svl/listener.hxx>
+#include <svl/itemprop.hxx>
#include <com/sun/star/table/XTableChartsSupplier.hpp>
#include <com/sun/star/chart/XChartDataArray.hpp>
#include <com/sun/star/text/XTextFieldsSupplier.hpp>
@@ -152,8 +152,10 @@ public:
namespace ooo
{
namespace vba {
+ namespace excel {
class ScVbaCellRangeAccess; // Vba Helper class
}
+ }
}
class SC_DLLPUBLIC ScCellRangesBase : public com::sun::star::beans::XPropertySet,
@@ -175,7 +177,7 @@ class SC_DLLPUBLIC ScCellRangesBase : public com::sun::star::beans::XPropertySet
{
friend class ScTabViewObj; // fuer select()
friend class ScTableSheetObj; // fuer createCursorByRange()
- friend class ooo::vba::ScVbaCellRangeAccess;
+ friend class ooo::vba::excel::ScVbaCellRangeAccess;
private:
const SfxItemPropertySet* pPropSet;
diff --git a/sc/inc/chart2uno.hxx b/sc/inc/chart2uno.hxx
index dc0244dfcdb8..32dc3a777086 100644
--- a/sc/inc/chart2uno.hxx
+++ b/sc/inc/chart2uno.hxx
@@ -37,7 +37,7 @@
#include "token.hxx"
#include "chartlis.hxx"
-#include <svtools/lstner.hxx>
+#include <svl/lstner.hxx>
#include <com/sun/star/chart/ChartDataRowSource.hpp>
#include <com/sun/star/chart2/data/XDataProvider.hpp>
#include <com/sun/star/chart2/data/XRangeXMLConversion.hpp>
@@ -59,7 +59,7 @@
#include <cppuhelper/implbase6.hxx>
#include <cppuhelper/implbase7.hxx>
#include <rtl/ustring.hxx>
-#include <svtools/itemprop.hxx>
+#include <svl/itemprop.hxx>
#include <hash_set>
#include <list>
diff --git a/sc/inc/chartlis.hxx b/sc/inc/chartlis.hxx
index 490c62743fb4..0ebc84268f74 100644
--- a/sc/inc/chartlis.hxx
+++ b/sc/inc/chartlis.hxx
@@ -33,7 +33,7 @@
#include <vcl/timer.hxx>
-#include <svtools/listener.hxx>
+#include <svl/listener.hxx>
#include "collect.hxx"
#include "rangelst.hxx"
#include "token.hxx"
diff --git a/sc/inc/chartuno.hxx b/sc/inc/chartuno.hxx
index 914c48393573..7c82b4874fca 100644
--- a/sc/inc/chartuno.hxx
+++ b/sc/inc/chartuno.hxx
@@ -32,7 +32,7 @@
#define SC_CHARTUNO_HXX
#include "address.hxx"
-#include <svtools/lstner.hxx>
+#include <svl/lstner.hxx>
#include <tools/string.hxx>
#include <com/sun/star/table/XTableChart.hpp>
diff --git a/sc/inc/chgtrack.hxx b/sc/inc/chgtrack.hxx
index 6707473f5610..0018f8b2ac3c 100644
--- a/sc/inc/chgtrack.hxx
+++ b/sc/inc/chgtrack.hxx
@@ -39,7 +39,7 @@
#include <tools/queue.hxx>
#include <tools/mempool.hxx>
#include <tools/link.hxx>
-#include <svtools/lstner.hxx>
+#include <unotools/options.hxx>
#include "global.hxx"
#include "bigrange.hxx"
#include "collect.hxx"
@@ -994,9 +994,7 @@ DECLARE_TABLE( ScChangeActionTable, ScChangeAction* )
// "normalen" Actions in die Quere zu kommen.
#define SC_CHGTRACK_GENERATED_START ((UINT32) 0xfffffff0)
-// SfxListener an der Applikation, um Aenderungen des Usernamens mitzubekommen
-
-class ScChangeTrack : public SfxListener
+class ScChangeTrack : public utl::ConfigurationListener
{
friend void ScChangeAction::RejectRestoreContents( ScChangeTrack*, SCsCOL, SCsROW );
friend BOOL ScChangeActionDel::Reject( ScDocument* pDoc );
@@ -1059,7 +1057,6 @@ class ScChangeTrack : public SfxListener
const ScBaseCell* pOldCell,
const ScBaseCell* pNewCell );
- virtual void Notify( SfxBroadcaster&, const SfxHint& );
void Init();
void DtorClear();
void SetLoadSave( BOOL bVal ) { bLoadSave = bVal; }
@@ -1130,6 +1127,7 @@ class ScChangeTrack : public SfxListener
#endif // SC_CHGTRACK_CXX
void ClearMsgQueue();
+ virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 );
public:
diff --git a/sc/inc/conditio.hxx b/sc/inc/conditio.hxx
index 141cb5706515..f659c52d0892 100644
--- a/sc/inc/conditio.hxx
+++ b/sc/inc/conditio.hxx
@@ -34,7 +34,7 @@
#include "global.hxx"
#include "address.hxx"
#include "formula/grammar.hxx"
-#include <svtools/svarray.hxx>
+#include <svl/svarray.hxx>
#include "scdllapi.h"
class ScBaseCell;
diff --git a/sc/inc/confuno.hxx b/sc/inc/confuno.hxx
index a7327402e5e0..a82e4fad1a09 100644
--- a/sc/inc/confuno.hxx
+++ b/sc/inc/confuno.hxx
@@ -31,8 +31,8 @@
#ifndef SC_CONFUNO_HXX
#define SC_CONFUNO_HXX
-#include <svtools/itemprop.hxx>
-#include <svtools/lstner.hxx>
+#include <svl/itemprop.hxx>
+#include <svl/lstner.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <cppuhelper/implbase2.hxx>
diff --git a/sc/inc/dapiuno.hxx b/sc/inc/dapiuno.hxx
index c3d5db0bc72b..86f395f525ca 100644
--- a/sc/inc/dapiuno.hxx
+++ b/sc/inc/dapiuno.hxx
@@ -34,8 +34,8 @@
#include "global.hxx"
#include "dpobject.hxx"
#include "rangeutl.hxx" // ScArea
-#include <svtools/lstner.hxx>
-#include <svtools/itemprop.hxx>
+#include <svl/lstner.hxx>
+#include <svl/itemprop.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
diff --git a/sc/inc/datauno.hxx b/sc/inc/datauno.hxx
index a93bfc341573..6cd2d1555bdf 100644
--- a/sc/inc/datauno.hxx
+++ b/sc/inc/datauno.hxx
@@ -32,8 +32,8 @@
#define SC_DATAUNO_HXX
#include "global.hxx"
-#include <svtools/itemprop.hxx>
-#include <svtools/lstner.hxx>
+#include <svl/itemprop.hxx>
+#include <svl/lstner.hxx>
#include <com/sun/star/sheet/TableFilterField.hpp>
#include <com/sun/star/sheet/GeneralFunction.hpp>
#include <com/sun/star/sheet/XCellRangeReferrer.hpp>
diff --git a/sc/inc/defltuno.hxx b/sc/inc/defltuno.hxx
index 2f33dcdb3f48..b93c386a77f0 100644
--- a/sc/inc/defltuno.hxx
+++ b/sc/inc/defltuno.hxx
@@ -31,12 +31,12 @@
#ifndef SC_DEFLTUNO_HXX
#define SC_DEFLTUNO_HXX
-#include <svtools/lstner.hxx>
+#include <svl/lstner.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
#include <cppuhelper/implbase3.hxx>
-#include <svtools/itemprop.hxx>
+#include <svl/itemprop.hxx>
class ScDocShell;
diff --git a/sc/inc/detdata.hxx b/sc/inc/detdata.hxx
index 06beb91790f1..b16b5a05778c 100644
--- a/sc/inc/detdata.hxx
+++ b/sc/inc/detdata.hxx
@@ -31,7 +31,7 @@
#ifndef SC_DETDATA_HXX
#define SC_DETDATA_HXX
-#include <svtools/svarray.hxx>
+#include <svl/svarray.hxx>
#include "global.hxx"
#include "address.hxx"
diff --git a/sc/inc/dispuno.hxx b/sc/inc/dispuno.hxx
index 34578c64bacf..b09a064ee797 100644
--- a/sc/inc/dispuno.hxx
+++ b/sc/inc/dispuno.hxx
@@ -34,8 +34,8 @@
#include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
#include <com/sun/star/view/XSelectionChangeListener.hpp>
#include <cppuhelper/implbase2.hxx>
-#include <svtools/lstner.hxx>
-#include <svtools/svarray.hxx>
+#include <svl/lstner.hxx>
+#include <svl/svarray.hxx>
#include "global.hxx" // ScImportParam
diff --git a/sc/inc/docoptio.hxx b/sc/inc/docoptio.hxx
index 325060f0c05a..f102b5ea966d 100644
--- a/sc/inc/docoptio.hxx
+++ b/sc/inc/docoptio.hxx
@@ -32,8 +32,8 @@
#define SC_DOCOPTIO_HXX
#include <unotools/configitem.hxx>
-#include <svtools/poolitem.hxx>
-#include <svtools/itemprop.hxx>
+#include <svl/poolitem.hxx>
+#include <svl/itemprop.hxx>
#include "scdllapi.h"
#include "optutil.hxx"
diff --git a/sc/inc/docpool.hxx b/sc/inc/docpool.hxx
index c81a68afe63d..52cf1a968163 100644
--- a/sc/inc/docpool.hxx
+++ b/sc/inc/docpool.hxx
@@ -31,7 +31,7 @@
#ifndef SC_SCDOCPOL_HXX
#define SC_SCDOCPOL_HXX
-#include <svtools/itempool.hxx>
+#include <svl/itempool.hxx>
#include "scdllapi.h"
class ScStyleSheet;
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 5f75108c2ebf..116d25ee901e 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -155,7 +155,7 @@ namespace com { namespace sun { namespace star {
}
} } }
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
/*
#ifdef _ZFORLIST_DECLARE_TABLE
class SvNumberFormatterIndexTable;
diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx
index 0d69c9f68670..0228cddc50af 100644
--- a/sc/inc/docuno.hxx
+++ b/sc/inc/docuno.hxx
@@ -33,7 +33,7 @@
#include "address.hxx"
#include <sfx2/sfxbasemodel.hxx>
-#include <svtools/lstner.hxx>
+#include <svl/lstner.hxx>
#include <svx/fmdmod.hxx>
#include <com/sun/star/view/XRenderable.hpp>
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
@@ -61,7 +61,7 @@
#include <cppuhelper/implbase4.hxx>
#include <cppuhelper/implbase5.hxx>
#include <cppuhelper/interfacecontainer.h>
-#include <svtools/itemprop.hxx>
+#include <svl/itemprop.hxx>
#include "drwlayer.hxx"
class ScDocShell;
@@ -114,6 +114,7 @@ private:
com::sun::star::uno::Reference<com::sun::star::uno::XAggregation> GetFormatter();
rtl::OUString maBuildId;
+ sal_Int32 mnXlsWriteProtPass;
protected:
const SfxItemPropertySet& GetPropertySet() const { return aPropSet; }
diff --git a/sc/inc/dptabres.hxx b/sc/inc/dptabres.hxx
index 6dfb782b2313..b18ea8e56b76 100644
--- a/sc/inc/dptabres.hxx
+++ b/sc/inc/dptabres.hxx
@@ -31,7 +31,7 @@
#ifndef SC_DPTABRES_HXX
#define SC_DPTABRES_HXX
-#include <svtools/svarray.hxx>
+#include <svl/svarray.hxx>
#include <tools/string.hxx>
#include <com/sun/star/sheet/MemberResult.hpp>
#include <com/sun/star/sheet/DataResult.hpp>
diff --git a/sc/inc/drawattr.hxx b/sc/inc/drawattr.hxx
index 174b675ebcae..ad0ce37e35c3 100644
--- a/sc/inc/drawattr.hxx
+++ b/sc/inc/drawattr.hxx
@@ -30,7 +30,7 @@
#ifndef _IDLITEMS_HXX
#define _IDLITEMS_HXX
-#include <svtools/eitem.hxx>
+#include <svl/eitem.hxx>
#include <svx/svxenum.hxx>
diff --git a/sc/inc/drdefuno.hxx b/sc/inc/drdefuno.hxx
index 7eb45d3ea355..4b0a534dc655 100644
--- a/sc/inc/drdefuno.hxx
+++ b/sc/inc/drdefuno.hxx
@@ -32,7 +32,7 @@
#define SC_DRDEFUNO_HXX
#include <svx/unopool.hxx>
-#include <svtools/lstner.hxx>
+#include <svl/lstner.hxx>
class ScDocShell;
diff --git a/sc/inc/editsrc.hxx b/sc/inc/editsrc.hxx
index 950c3533e44a..3dd928384fe8 100644
--- a/sc/inc/editsrc.hxx
+++ b/sc/inc/editsrc.hxx
@@ -33,7 +33,7 @@
#include "address.hxx"
#include <svx/unoedsrc.hxx>
-#include <svtools/lstner.hxx>
+#include <svl/lstner.hxx>
#include <memory>
diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx
index bf795f04fe1c..90adedd6d346 100644
--- a/sc/inc/externalrefmgr.hxx
+++ b/sc/inc/externalrefmgr.hxx
@@ -37,7 +37,7 @@
#include "sfx2/lnkbase.hxx"
#include "tools/time.hxx"
#include "vcl/timer.hxx"
-#include "svtools/zforlist.hxx"
+#include "svl/zforlist.hxx"
#include "scmatrix.hxx"
#include <hash_map>
diff --git a/sc/inc/fielduno.hxx b/sc/inc/fielduno.hxx
index d4319bcba50e..6d777b38424a 100644
--- a/sc/inc/fielduno.hxx
+++ b/sc/inc/fielduno.hxx
@@ -34,8 +34,8 @@
#include "address.hxx"
#include "mutexhlp.hxx"
-#include <svtools/lstner.hxx>
-#include <svtools/itemprop.hxx>
+#include <svl/lstner.hxx>
+#include <svl/itemprop.hxx>
#include <svx/editdata.hxx>
#include <com/sun/star/text/XTextField.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
diff --git a/sc/inc/fmtuno.hxx b/sc/inc/fmtuno.hxx
index 6005a849fb0f..ccd93d982bdf 100644
--- a/sc/inc/fmtuno.hxx
+++ b/sc/inc/fmtuno.hxx
@@ -35,7 +35,7 @@
#include "conditio.hxx"
#include <formula/grammar.hxx>
#include <tools/list.hxx>
-#include <svtools/itemprop.hxx>
+#include <svl/itemprop.hxx>
#include <com/sun/star/sheet/XSheetConditionalEntries.hpp>
#include <com/sun/star/sheet/XSheetCondition.hpp>
#include <com/sun/star/sheet/XSheetConditionalEntry.hpp>
diff --git a/sc/inc/forbiuno.hxx b/sc/inc/forbiuno.hxx
index eb142b2166a1..305d818a299d 100644
--- a/sc/inc/forbiuno.hxx
+++ b/sc/inc/forbiuno.hxx
@@ -32,7 +32,7 @@
#define SC_FORBIUNO_HXX
#include <svx/UnoForbiddenCharsTable.hxx>
-#include <svtools/lstner.hxx>
+#include <svl/lstner.hxx>
class ScDocShell;
diff --git a/sc/inc/funcuno.hxx b/sc/inc/funcuno.hxx
index 2e5e167bc988..4c45cdb627bc 100644
--- a/sc/inc/funcuno.hxx
+++ b/sc/inc/funcuno.hxx
@@ -35,7 +35,7 @@
#include <com/sun/star/sheet/XFunctionAccess.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <cppuhelper/implbase3.hxx>
-#include <svtools/lstner.hxx>
+#include <svl/lstner.hxx>
class ScDocument;
class ScDocOptions;
diff --git a/sc/inc/hints.hxx b/sc/inc/hints.hxx
index 92c17caf9641..889dc302fcf6 100644
--- a/sc/inc/hints.hxx
+++ b/sc/inc/hints.hxx
@@ -33,7 +33,7 @@
#include "global.hxx"
#include "address.hxx"
-#include <svtools/hint.hxx>
+#include <svl/hint.hxx>
// ---------------------------------------------------------------------------
diff --git a/sc/inc/linkuno.hxx b/sc/inc/linkuno.hxx
index c45da4f35e27..1a9479dff278 100644
--- a/sc/inc/linkuno.hxx
+++ b/sc/inc/linkuno.hxx
@@ -31,8 +31,8 @@
#ifndef SC_LINKUNO_HXX
#define SC_LINKUNO_HXX
-#include <svtools/lstner.hxx>
-#include <svtools/itemprop.hxx>
+#include <svl/lstner.hxx>
+#include <svl/itemprop.hxx>
#include <com/sun/star/sheet/XDDELink.hpp>
#include <com/sun/star/sheet/XDDELinkResults.hpp>
#include <com/sun/star/sheet/XDDELinks.hpp>
diff --git a/sc/inc/lookupcache.hxx b/sc/inc/lookupcache.hxx
index 12b85d54cc49..9261a6db0395 100644
--- a/sc/inc/lookupcache.hxx
+++ b/sc/inc/lookupcache.hxx
@@ -34,7 +34,7 @@
#include "address.hxx"
#include "global.hxx"
#include "formula/token.hxx"
-#include <svtools/listener.hxx>
+#include <svl/listener.hxx>
#include <tools/string.hxx>
#include <hash_map>
diff --git a/sc/inc/nameuno.hxx b/sc/inc/nameuno.hxx
index bac1dd9711d5..240cead3be83 100644
--- a/sc/inc/nameuno.hxx
+++ b/sc/inc/nameuno.hxx
@@ -31,7 +31,7 @@
#ifndef SC_NAMEUNO_HXX
#define SC_NAMEUNO_HXX
-#include <svtools/lstner.hxx>
+#include <svl/lstner.hxx>
#include "address.hxx"
#include "formula/grammar.hxx"
#include <com/sun/star/sheet/XLabelRange.hpp>
diff --git a/sc/inc/notesuno.hxx b/sc/inc/notesuno.hxx
index 3907f3d20967..4cf8148eff17 100644
--- a/sc/inc/notesuno.hxx
+++ b/sc/inc/notesuno.hxx
@@ -32,7 +32,7 @@
#define SC_NOTESUNO_HXX
#include "address.hxx"
-#include <svtools/lstner.hxx>
+#include <svl/lstner.hxx>
#include <com/sun/star/sheet/XSheetAnnotation.hpp>
#include <com/sun/star/sheet/XSheetAnnotationShapeSupplier.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
diff --git a/sc/inc/patattr.hxx b/sc/inc/patattr.hxx
index 86506d7ccdb8..65d350455ddd 100644
--- a/sc/inc/patattr.hxx
+++ b/sc/inc/patattr.hxx
@@ -31,9 +31,9 @@
#ifndef SC_SCPATATR_HXX
#define SC_SCPATATR_HXX
-#include <svtools/poolitem.hxx>
-#include <svtools/itemset.hxx>
-#include <vcl/fontcvt.hxx>
+#include <svl/poolitem.hxx>
+#include <svl/itemset.hxx>
+#include <unotools/fontcvt.hxx>
#include <svx/svxenum.hxx>
#include "scdllapi.h"
diff --git a/sc/inc/pch/precompiled_sc.hxx b/sc/inc/pch/precompiled_sc.hxx
index b905bb19db03..dbb86fdf7484 100644
--- a/sc/inc/pch/precompiled_sc.hxx
+++ b/sc/inc/pch/precompiled_sc.hxx
@@ -152,16 +152,16 @@
#include <sot/exchange.hxx>
#include <sot/factory.hxx>
#include <sot/storage.hxx>
-#include <svtools/brdcst.hxx>
-#include <svtools/cenumitm.hxx>
-#include <svtools/cintitem.hxx>
-#include <svtools/fltrcfg.hxx>
-#include <svtools/intitem.hxx>
-#include <svtools/listener.hxx>
-#include <svtools/lstner.hxx>
-#include <svtools/pathoptions.hxx>
-#include <svtools/solar.hrc>
-#include <svtools/useroptions.hxx>
+#include <svl/brdcst.hxx>
+#include <svl/cenumitm.hxx>
+#include <svl/cintitem.hxx>
+#include <unotools/fltrcfg.hxx>
+#include <svl/intitem.hxx>
+#include <svl/listener.hxx>
+#include <svl/lstner.hxx>
+#include <unotools/pathoptions.hxx>
+#include <svl/solar.hrc>
+#include <unotools/useroptions.hxx>
#include <svx/editobj.hxx>
#include <svx/eeitem.hxx>
#include <svx/fmglob.hxx>
diff --git a/sc/inc/printopt.hxx b/sc/inc/printopt.hxx
index 6c4a88d9df60..0c90ba4497fc 100644
--- a/sc/inc/printopt.hxx
+++ b/sc/inc/printopt.hxx
@@ -31,7 +31,7 @@
#ifndef SC_PRINTOPT_HXX
#define SC_PRINTOPT_HXX
-#include <svtools/poolitem.hxx>
+#include <svl/poolitem.hxx>
#include <unotools/configitem.hxx>
#include "scdllapi.h"
@@ -96,6 +96,7 @@ public:
void SetOptions( const ScPrintOptions& rNew );
virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
};
#endif
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index c00d66ee5dd5..92e641a0b2b8 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -662,7 +662,9 @@
//#define SID_OPENDLG_MODCHART (SC_MESSAGE_START + 58)
#define SID_OPENDLG_CONDFRMT (SC_MESSAGE_START + 59)
#define SID_OPENDLG_OPTSOLVER (SC_MESSAGE_START + 60)
-
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+#define SID_VALIDITY_REFERENCE (SC_MESSAGE_START + 61)
+//-->Added by PengYunQuan for Validity Cell Range Picker
#define SC_HINT_NAVIGATOR_UPDATEALL (SC_MESSAGE_START + 65)
// Funktionen ------------------------------------------------------------
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index fb8416e52239..f973c6e97651 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -55,6 +55,9 @@ class SfxStyleSheetBase;
class ScDPObject;
struct ScDPFuncData;
struct ScDPNumGroupInfo;
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+class ScTabViewShell;
+//-->Added by PengYunQuan for Validity Cell Range Picker
namespace com { namespace sun { namespace star { namespace sheet {
struct DataPilotFieldReference;
@@ -473,8 +476,13 @@ public:
virtual SfxAbstractTabDialog * CreateScParagraphDlg( Window* pParent, const SfxItemSet* pAttr ,//add for ScParagraphDlg
int nId ) = 0;
+ //<!--Modified by PengYunQuan for Validity Cell Range Picker
+ //virtual SfxAbstractTabDialog * CreateScValidationDlg( Window* pParent, //add for ScValidationDlg
+ // const SfxItemSet* pArgSet,int nId ) = 0;
+
virtual SfxAbstractTabDialog * CreateScValidationDlg( Window* pParent, //add for ScValidationDlg
- const SfxItemSet* pArgSet,int nId ) = 0;
+ const SfxItemSet* pArgSet,int nId, ScTabViewShell *pTabVwSh ) = 0;
+ //-->Modified by PengYunQuan for Validity Cell Range Picker
virtual SfxAbstractTabDialog * CreateScSortDlg( Window* pParent, //add for ScSortDlg
const SfxItemSet* pArgSet,int nId ) = 0;
// for tabpage
diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx
index 69f3def3efc5..bf7f8810fec3 100644
--- a/sc/inc/scmod.hxx
+++ b/sc/inc/scmod.hxx
@@ -34,13 +34,19 @@
#include "scdllapi.h"
#include "scdll.hxx"
#include <vcl/timer.hxx>
-#include <svtools/lstner.hxx>
+#include <svl/lstner.hxx>
#include "global.hxx" // ScInputMode
#include "markdata.hxx" //ScMarkData
#include "shellids.hxx"
-
+#include <unotools/options.hxx>
#include <tools/shl.hxx>
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+#include <map>
+#include <list>
+#include <algorithm>
+//-->Added by PengYunQuan for Validity Cell Range Picker
+
class KeyEvent;
class SdrModel;
@@ -113,7 +119,7 @@ struct ScClipData
//==================================================================
-class ScModule: public SfxModule, public SfxListener
+class ScModule: public SfxModule, public SfxListener, utl::ConfigurationListener
{
Timer aIdleTimer;
Timer aSpellTimer;
@@ -145,6 +151,9 @@ class ScModule: public SfxModule, public SfxListener
bool mbIsInSharedDocLoading;
bool mbIsInSharedDocSaving;
+ //<!--Added by PengYunQuan for Validity Cell Range Picker
+ std::map<USHORT, std::list<Window*> > m_mapRefWindow;
+ //-->Added by PengYunQuan for Validity Cell Range Picker
public:
SFX_DECL_INTERFACE(SCID_APP)
@@ -153,6 +162,7 @@ public:
virtual void FillStatusBar(StatusBar &rBar);
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+ virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 );
void DeleteCfg();
// von der Applikation verschoben:
@@ -253,7 +263,10 @@ SC_DLLPUBLIC void SetAppOptions ( const ScAppOptions& rO
ScFormEditData* GetFormEditData() { return pFormEditData; }
// Referenzeingabe:
- void SetRefDialog( USHORT nId, BOOL bVis, SfxViewFrame* pViewFrm = NULL );
+ //<!--Added by PengYunQuan for Validity Cell Range Picker
+ //void SetRefDialog( USHORT nId, BOOL bVis, SfxViewFrame* pViewFrm = NULL );
+ SC_DLLPUBLIC void SetRefDialog( USHORT nId, BOOL bVis, SfxViewFrame* pViewFrm = NULL );
+ //-->Added by PengYunQuan for Validity Cell Range Picker
BOOL IsModalMode(SfxObjectShell* pDocSh = NULL);
BOOL IsFormulaMode();
BOOL IsRefDialogOpen();
@@ -276,6 +289,14 @@ SC_DLLPUBLIC void SetAppOptions ( const ScAppOptions& rO
bool IsInSharedDocLoading() const { return mbIsInSharedDocLoading; }
void SetInSharedDocSaving( bool bNew ) { mbIsInSharedDocSaving = bNew; }
bool IsInSharedDocSaving() const { return mbIsInSharedDocSaving; }
+
+ //<!--Added by PengYunQuan for Validity Cell Range Picker
+ SC_DLLPUBLIC BOOL RegisterRefWindow( USHORT nSlotId, Window *pWnd );
+ SC_DLLPUBLIC BOOL UnregisterRefWindow( USHORT nSlotId, Window *pWnd );
+ SC_DLLPUBLIC BOOL IsAliveRefDlg( USHORT nSlotId, Window *pWnd );
+ SC_DLLPUBLIC Window * Find1RefWindow( USHORT nSlotId, Window *pWndAncestor );
+ SC_DLLPUBLIC Window * Find1RefWindow( Window *pWndAncestor );
+ //-->Added by PengYunQuan for Validity Cell Range Picker
};
#define SC_MOD() ( *(ScModule**) GetAppData(SHL_CALC) )
diff --git a/sc/inc/srchuno.hxx b/sc/inc/srchuno.hxx
index d486d8b7e298..ffa54cf29d70 100644
--- a/sc/inc/srchuno.hxx
+++ b/sc/inc/srchuno.hxx
@@ -34,7 +34,7 @@
#include <com/sun/star/util/XReplaceDescriptor.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
-#include <svtools/itemprop.hxx>
+#include <svl/itemprop.hxx>
#include <cppuhelper/implbase3.hxx>
diff --git a/sc/inc/stlpool.hxx b/sc/inc/stlpool.hxx
index 1028bb5f7673..ce1d643cd27f 100644
--- a/sc/inc/stlpool.hxx
+++ b/sc/inc/stlpool.hxx
@@ -31,7 +31,7 @@
#ifndef SC_STLPOOL_HXX
#define SC_STLPOOL_HXX
-#include <svtools/style.hxx>
+#include <svl/style.hxx>
class ScStyleSheet;
diff --git a/sc/inc/stlsheet.hxx b/sc/inc/stlsheet.hxx
index 06786dfff69d..ddbbc41b4f80 100644
--- a/sc/inc/stlsheet.hxx
+++ b/sc/inc/stlsheet.hxx
@@ -31,7 +31,7 @@
#ifndef SC_STLSHEET_HXX
#define SC_STLSHEET_HXX
-#include <svtools/style.hxx>
+#include <svl/style.hxx>
//------------------------------------------------------------------------
diff --git a/sc/inc/styleuno.hxx b/sc/inc/styleuno.hxx
index 5fb28db3239a..34d1b8d3302c 100644
--- a/sc/inc/styleuno.hxx
+++ b/sc/inc/styleuno.hxx
@@ -31,8 +31,8 @@
#ifndef SC_STYLEUNO_HXX
#define SC_STYLEUNO_HXX
-#include <svtools/itemprop.hxx>
-#include <svtools/lstner.hxx>
+#include <svl/itemprop.hxx>
+#include <svl/lstner.hxx>
#include <rsc/rscsfx.hxx>
#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/style/XStyle.hpp>
diff --git a/sc/inc/targuno.hxx b/sc/inc/targuno.hxx
index 3dc549656fa1..db8670521c25 100644
--- a/sc/inc/targuno.hxx
+++ b/sc/inc/targuno.hxx
@@ -31,7 +31,7 @@
#ifndef SC_TARGUNO_HXX
#define SC_TARGUNO_HXX
-#include <svtools/lstner.hxx>
+#include <svl/lstner.hxx>
#include <tools/string.hxx>
#include <com/sun/star/document/XLinkTargetSupplier.hpp>
#include <com/sun/star/lang/XServiceName.hpp>
diff --git a/sc/inc/textuno.hxx b/sc/inc/textuno.hxx
index 8ec7707874be..64eb2aaba696 100644
--- a/sc/inc/textuno.hxx
+++ b/sc/inc/textuno.hxx
@@ -34,8 +34,8 @@
#include "global.hxx" // ScRange, ScAddress
#include "address.hxx"
#include <svx/unotext.hxx>
-#include <svtools/brdcst.hxx>
-#include <svtools/lstner.hxx>
+#include <svl/brdcst.hxx>
+#include <svl/lstner.hxx>
#include <com/sun/star/text/XTextFieldsSupplier.hpp>
#include <com/sun/star/sheet/XHeaderFooterContent.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
diff --git a/sc/inc/tokenuno.hxx b/sc/inc/tokenuno.hxx
index bcd3435668be..0c573c6961c1 100644
--- a/sc/inc/tokenuno.hxx
+++ b/sc/inc/tokenuno.hxx
@@ -38,7 +38,7 @@
#include <com/sun/star/sheet/FormulaToken.hpp>
#include <com/sun/star/sheet/XFormulaParser.hpp>
#include <cppuhelper/implbase3.hxx>
-#include <svtools/lstner.hxx>
+#include <svl/lstner.hxx>
#include <formula/FormulaOpCodeMapperObj.hxx>
#include "address.hxx"
#include "compiler.hxx"
diff --git a/sc/inc/unoreflist.hxx b/sc/inc/unoreflist.hxx
index 42486071adef..08223d546c57 100644
--- a/sc/inc/unoreflist.hxx
+++ b/sc/inc/unoreflist.hxx
@@ -32,7 +32,7 @@
#define SC_UNOREFLIST_HXX
#include <list>
-#include <svtools/hint.hxx>
+#include <svl/hint.hxx>
#include "rangelst.hxx"
diff --git a/sc/inc/viewuno.hxx b/sc/inc/viewuno.hxx
index e489cb718163..bb322424a9a6 100644
--- a/sc/inc/viewuno.hxx
+++ b/sc/inc/viewuno.hxx
@@ -32,8 +32,8 @@
#define SC_VIEWUNO_HXX
#include <sfx2/sfxbasecontroller.hxx>
-#include <svtools/svarray.hxx>
-#include <svtools/itemprop.hxx>
+#include <svl/svarray.hxx>
+#include <svl/itemprop.hxx>
#include <com/sun/star/view/XFormLayerAccess.hpp>
#include <com/sun/star/view/XSelectionChangeListener.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
diff --git a/sc/prj/build.lst b/sc/prj/build.lst
index c893349232e7..115e92990f3c 100644..100755
--- a/sc/prj/build.lst
+++ b/sc/prj/build.lst
@@ -1,4 +1,4 @@
-sc sc : l10n oovbaapi svx stoc uui BOOST:boost formula oox NULL
+sc sc : filter l10n vbahelper oovbaapi svx uui stoc BOOST:boost formula oox NULL
sc sc usr1 - all sc_mkout NULL
sc sc\inc nmake - all sc_inc NULL
sc sc\prj get - all sc_prj NULL
diff --git a/sc/qa/complex/calcPreview/makefile.mk b/sc/qa/complex/calcPreview/makefile.mk
index 76a6afb4edf0..d346f6ea9213 100755
--- a/sc/qa/complex/calcPreview/makefile.mk
+++ b/sc/qa/complex/calcPreview/makefile.mk
@@ -40,7 +40,7 @@ PACKAGE = complex$/calcPreview
#----- compile .java files -----------------------------------------
-JARFILES = mysql.jar sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar mysql.jar
+JARFILES = mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar mysql.jar
JAVAFILES = ViewForwarder.java
JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
diff --git a/sc/qa/complex/cellRanges/makefile.mk b/sc/qa/complex/cellRanges/makefile.mk
index 5af9bcf3b222..5ed6a3f083ff 100755
--- a/sc/qa/complex/cellRanges/makefile.mk
+++ b/sc/qa/complex/cellRanges/makefile.mk
@@ -40,7 +40,7 @@ PACKAGE = complex$/cellRanges
#----- compile .java files -----------------------------------------
-JARFILES = mysql.jar sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
+JARFILES = mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
JAVAFILES = $(TARGET).java
JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
diff --git a/sc/sdi/cellsh.sdi b/sc/sdi/cellsh.sdi
index 8b6d488baee6..bdabc363738f 100644
--- a/sc/sdi/cellsh.sdi
+++ b/sc/sdi/cellsh.sdi
@@ -52,6 +52,9 @@ interface CellSelection
SID_OPENDLG_FUNCTION [ ExecMethod = Execute; StateMethod = GetCellState; ]
SID_INS_FUNCTION [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
+ // no Exec/StateMethod needed, but SfxDispatcher complains if the slot is not included in the shell
+ SID_VALIDITY_REFERENCE []
+
// Datenbank-Operationen {
SID_SORT_ASCENDING [ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
SID_SORT_DESCENDING [ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
diff --git a/sc/sdi/docsh.sdi b/sc/sdi/docsh.sdi
index ad6dfbf31e42..bb1089820a9e 100644
--- a/sc/sdi/docsh.sdi
+++ b/sc/sdi/docsh.sdi
@@ -70,7 +70,7 @@ interface TableSelection
//============================================================================
-interface TableDocument : OfficeDocument
+interface TableDocument
[
uuid = "BA338A42-064E-11d0-89CB-008029E4B0B1" ;
]
@@ -117,7 +117,7 @@ interface TableDocument : OfficeDocument
//============================================================================
-shell ScDocShell : SfxObjectShell
+shell ScDocShell
[
uuid ( "3F543FA0-B6A6-101B-9961-04021C007002" )
]
diff --git a/sc/sdi/makefile.mk b/sc/sdi/makefile.mk
index f0f7d12885d8..0ab1b486cd43 100644
--- a/sc/sdi/makefile.mk
+++ b/sc/sdi/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# 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
@@ -47,7 +47,12 @@ SDI1NAME=$(TARGET)
SDI1EXPORT=scalc
SVSDI1DEPEND= \
- scalc.sdi \
+ $(SOLARINCXDIR)$/sfx2/sfx.sdi \
+ $(SOLARINCXDIR)$/sfx2/sfxitems.sdi \
+ $(SOLARINCXDIR)$/svx/svx.sdi \
+ $(SOLARINCXDIR)$/svx/svxitems.sdi \
+ $(SOLARINCXDIR)$/svx/xoitems.sdi \
+ scalc.sdi \
app.sdi \
auditsh.sdi \
docsh.sdi \
@@ -66,8 +71,7 @@ SVSDI1DEPEND= \
mediash.sdi \
pgbrksh.sdi \
scslots.hrc \
- $(INC)$/sc.hrc \
- $(SOLARINCXDIR)$/svxslots.ilb
+ $(INC)$/sc.hrc
.ENDIF
# --- Targets -------------------------------------------------------
diff --git a/sc/sdi/prevwsh.sdi b/sc/sdi/prevwsh.sdi
index 70ca39a816c6..92add2aa2fd1 100644
--- a/sc/sdi/prevwsh.sdi
+++ b/sc/sdi/prevwsh.sdi
@@ -27,7 +27,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-interface TablePrintPreview : View
+interface TablePrintPreview
{
// von Basic aus nicht erreichbar, darum alles mit Export = FALSE
@@ -166,7 +166,7 @@ interface TablePrintPreview : View
// ===========================================================================
-shell ScPreviewShell : SfxViewShell
+shell ScPreviewShell
{
import TablePrintPreview;
}
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index c481fdc88353..1daf26faf6e9 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -2780,6 +2780,33 @@ SfxVoidItem SolverDialog SID_OPENDLG_OPTSOLVER
]
//--------------------------------------------------------------------------
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+SfxVoidItem ValidityReference SID_VALIDITY_REFERENCE
+()
+[
+ /* 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 = TRUE,
+ GroupId = GID_OPTIONS;
+]
+//-->Added by PengYunQuan for Validity Cell Range Picker
+
+//--------------------------------------------------------------------------
SfxVoidItem GoDownToEndOfData SID_CURSORBLKDOWN
(SfxInt16Item By FN_PARAM_1,SfxBoolItem Sel FN_PARAM_2)
[
diff --git a/sc/sdi/scslots.sdi b/sc/sdi/scslots.sdi
index 3f1ff119873d..e50d282ab60d 100644
--- a/sc/sdi/scslots.sdi
+++ b/sc/sdi/scslots.sdi
@@ -27,7 +27,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-import "svxslots.ilb"
module
"ADC7D7A1-2341-101C-A55A-04021C007002"
@@ -36,7 +35,6 @@ StarCalc
[
HelpText( "StarDivision StarCalc" ),
SlotIdFile( "scslots.hrc" )
-TypeLibFile( "scslots.tlb" )
ModulePrefix( "Sc" )
]
{
@@ -54,6 +52,11 @@ ModulePrefix( "Sc" )
//----------------------------------------------------------
// bei Problemen ggF. "von Hand" includen (=Copy/Paste)
+ include "sfx2/sfxitems.sdi"
+ include "sfx2/sfx.sdi"
+ include "svx/svxitems.sdi"
+ include "svx/xoitems.sdi"
+ include "svx/svx.sdi"
include "scalc.sdi"
include "docsh.sdi"
diff --git a/sc/sdi/tabvwsh.sdi b/sc/sdi/tabvwsh.sdi
index cfada86a8ece..abf37ded4b63 100644
--- a/sc/sdi/tabvwsh.sdi
+++ b/sc/sdi/tabvwsh.sdi
@@ -131,7 +131,7 @@ interface BaseSelection
}
-interface TableEditView : View
+interface TableEditView
[
uuid ( "16D7E4A0-2FB4-11CF-89CB-008029E4B0B1" )
]
@@ -268,7 +268,7 @@ interface DataPilotField
}
// ===========================================================================
-shell ScTabViewShell : SfxViewShell
+shell ScTabViewShell
{
import TableSelection "ActiveDocument.ActiveTable";
import TableOLEObject "SelectedObject";
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 1a466d231459..590f278901d6 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -41,9 +41,9 @@
#include <svx/bolnitem.hxx>
#include <svx/frmdiritem.hxx>
#include <svx/shaditem.hxx>
-#include <svtools/poolcach.hxx>
+#include <svl/poolcach.hxx>
#include <svx/fontitem.hxx>
-#include <vcl/fontcvt.hxx>
+#include <unotools/fontcvt.hxx>
#include "attarray.hxx"
#include "global.hxx"
diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx
index 85f8a4921242..2d8688ce5b3b 100644
--- a/sc/source/core/data/bcaslot.cxx
+++ b/sc/source/core/data/bcaslot.cxx
@@ -34,8 +34,8 @@
#include <sfx2/objsh.hxx>
-#include <svtools/listener.hxx>
-#include <svtools/listeneriter.hxx>
+#include <svl/listener.hxx>
+#include <svl/listeneriter.hxx>
#include "document.hxx"
#include "brdcst.hxx"
@@ -353,6 +353,21 @@ void ScBroadcastAreaSlot::UpdateRemove( UpdateRefMode eUpdateRefMode,
}
+void ScBroadcastAreaSlot::UpdateRemoveArea( ScBroadcastArea* pArea )
+{
+ ScBroadcastAreas::iterator aIter( aBroadcastAreaTbl.find( pArea));
+ if (aIter == aBroadcastAreaTbl.end())
+ return;
+ if (*aIter != pArea)
+ DBG_ERRORFILE( "UpdateRemoveArea: area pointer mismatch");
+ else
+ {
+ aBroadcastAreaTbl.erase( aIter);
+ pArea->DecRef();
+ }
+}
+
+
void ScBroadcastAreaSlot::UpdateInsert( ScBroadcastArea* pArea )
{
::std::pair< ScBroadcastAreas::iterator, bool > aPair =
@@ -732,6 +747,50 @@ void ScBroadcastAreaSlotMachine::UpdateBroadcastAreas(
}
}
+ // Updating an area's range will modify the hash key, remove areas from all
+ // affected slots. Will be reinserted later with the updated range.
+ ScBroadcastArea* pChain = pUpdateChain;
+ while (pChain)
+ {
+ ScBroadcastArea* pArea = pChain;
+ pChain = pArea->GetUpdateChainNext();
+ ScRange aRange( pArea->GetRange());
+ // remove from slots
+ for (SCTAB nTab = aRange.aStart.Tab(); nTab <= aRange.aEnd.Tab() && pArea->GetRef(); ++nTab)
+ {
+ TableSlotsMap::iterator iTab( aTableSlotsMap.find( nTab));
+ if (iTab == aTableSlotsMap.end())
+ {
+ DBG_ERRORFILE( "UpdateBroadcastAreas: Where's the TableSlot?!?");
+ continue; // for
+ }
+ ScBroadcastAreaSlot** ppSlots = (*iTab).second->getSlots();
+ SCSIZE nStart, nEnd, nRowBreak;
+ ComputeAreaPoints( aRange, nStart, nEnd, nRowBreak );
+ SCSIZE nOff = nStart;
+ SCSIZE nBreak = nOff + nRowBreak;
+ ScBroadcastAreaSlot** pp = ppSlots + nOff;
+ while ( nOff <= nEnd && pArea->GetRef() )
+ {
+ if (*pp)
+ (*pp)->UpdateRemoveArea( pArea);
+ if ( nOff < nBreak )
+ {
+ ++nOff;
+ ++pp;
+ }
+ else
+ {
+ nStart += BCA_SLOTS_ROW;
+ nOff = nStart;
+ pp = ppSlots + nOff;
+ nBreak = nOff + nRowBreak;
+ }
+ }
+ }
+
+ }
+
// shift sheets
if (nDz)
{
diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx
index aea2bf4ff276..e7c74d34a95e 100644
--- a/sc/source/core/data/cell.cxx
+++ b/sc/source/core/data/cell.cxx
@@ -33,7 +33,7 @@
// INCLUDE ---------------------------------------------------------------
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include "scitems.hxx"
#include "attrib.hxx"
@@ -55,9 +55,9 @@
#include "postit.hxx"
#include "externalrefmgr.hxx"
#include <svx/editobj.hxx>
-#include <svtools/intitem.hxx>
+#include <svl/intitem.hxx>
#include <svx/flditem.hxx>
-#include <svtools/broadcast.hxx>
+#include <svl/broadcast.hxx>
using namespace formula;
// More or less arbitrary, of course all recursions must fit into available
@@ -1641,8 +1641,9 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
if ( eOld == svHybridCell ) // string result from SetFormulaResultString?
eOld = svString; // ScHybridCellToken has a valid GetString method
+ // #i106045# use approxEqual to compare with stored value
bContentChanged = (eOld != eNew ||
- (eNew == svDouble && aResult.GetDouble() != aNewResult.GetDouble()) ||
+ (eNew == svDouble && !rtl::math::approxEqual( aResult.GetDouble(), aNewResult.GetDouble() )) ||
(eNew == svString && aResult.GetString() != aNewResult.GetString()));
}
}
@@ -1662,7 +1663,8 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
if ( bChanged && !bContentChanged && pDocument->IsStreamValid(aPos.Tab()) )
{
if ( ( eOld == svUnknown && ( eNew == svError || ( eNew == svDouble && aNewResult.GetDouble() == 0.0 ) ) ) ||
- ( eOld == svHybridCell && eNew == svString && aResult.GetString() == aNewResult.GetString() ) )
+ ( eOld == svHybridCell && eNew == svString && aResult.GetString() == aNewResult.GetString() ) ||
+ ( eOld == svDouble && eNew == svDouble && rtl::math::approxEqual( aResult.GetDouble(), aNewResult.GetDouble() ) ) )
{
// no change, see above
}
diff --git a/sc/source/core/data/cell2.cxx b/sc/source/core/data/cell2.cxx
index acac874704c6..4caaa1cb3267 100644
--- a/sc/source/core/data/cell2.cxx
+++ b/sc/source/core/data/cell2.cxx
@@ -570,7 +570,7 @@ USHORT ScFormulaCell::GetMatrixEdge( ScAddress& rOrgPos )
}
else
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
String aTmp;
ByteString aMsg( "broken Matrix, no MatFormula at origin, Pos: " );
aPos.Format( aTmp, SCA_VALID_COL | SCA_VALID_ROW, pDocument );
@@ -600,7 +600,7 @@ USHORT ScFormulaCell::GetMatrixEdge( ScAddress& rOrgPos )
if ( !nEdges )
nEdges = 1; // mittendrin
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
else
{
String aTmp;
@@ -679,6 +679,14 @@ ScFormulaCell::HasRefListExpressibleAsOneReference(ScRange& rRange) const
Union of these references must form one range and their
intersection must be empty set.
*/
+
+ // Detect the simple case of exactly one reference in advance without all
+ // overhead.
+ // #i107741# Doing so actually makes outlines using SUBTOTAL(x;reference)
+ // work again, where the function does not have only references.
+ if (HasOneReference( rRange))
+ return true;
+
pCode->Reset();
// Get first reference, if any
ScToken* const pFirstReference(
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 0afc4fb1347c..b5dc01a8b059 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -37,8 +37,8 @@
#include <map>
-#include <svtools/poolcach.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/poolcach.hxx>
+#include <svl/zforlist.hxx>
#include <svx/scripttypeitem.hxx>
#include <string.h>
@@ -1233,8 +1233,8 @@ void ScColumn::InsertRow( SCROW nStartRow, SCSIZE nSize )
}
}
- delete pDelRows;
- delete ppDelCells;
+ delete [] pDelRows;
+ delete [] ppDelCells;
}
pDocument->SetAutoCalc( bOldAutoCalc );
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 01c72ab4e0c4..4205c0f59dcc 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -47,9 +47,9 @@
#include <svx/rotmodit.hxx>
#include <svx/scripttypeitem.hxx>
#include <svx/unolingu.hxx>
-#include <svtools/zforlist.hxx>
-#include <svtools/broadcast.hxx>
-#include <svtools/listeneriter.hxx>
+#include <svl/zforlist.hxx>
+#include <svl/broadcast.hxx>
+#include <svl/listeneriter.hxx>
#include <vcl/outdev.hxx>
#include "column.hxx"
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 5726862366cf..e94cfca12ab7 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -35,8 +35,8 @@
#include <sfx2/objsh.hxx>
-#include <svtools/zforlist.hxx>
-#include <svtools/zformat.hxx>
+#include <svl/zforlist.hxx>
+#include <svl/zformat.hxx>
#include "scitems.hxx"
#include "column.hxx"
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index 45ead48d0f35..857c149476b7 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -37,8 +37,8 @@
#include "scitems.hxx"
#include <sfx2/objsh.hxx>
-#include <svtools/itemset.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/itemset.hxx>
+#include <svl/zforlist.hxx>
#include <rtl/math.hxx>
#include <unotools/collatorwrapper.hxx>
diff --git a/sc/source/core/data/dbdocutl.cxx b/sc/source/core/data/dbdocutl.cxx
index 6a849282a642..215f2d34aab1 100644
--- a/sc/source/core/data/dbdocutl.cxx
+++ b/sc/source/core/data/dbdocutl.cxx
@@ -38,7 +38,7 @@
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include "dbdocutl.hxx"
#include "document.hxx"
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index b88cd49a6a8c..4548f1f7a1b5 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -33,7 +33,7 @@
// INCLUDE ---------------------------------------------------------------
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include "scitems.hxx"
#include "global.hxx"
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index fce83f25cd93..662e524b2bfc 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -36,8 +36,8 @@
#include "scitems.hxx"
#include <tools/shl.hxx>
#include <vcl/outdev.hxx>
-#include <svtools/aeitem.hxx>
-#include <svtools/itemiter.hxx>
+#include <svl/aeitem.hxx>
+#include <svl/itemiter.hxx>
#include <svx/algitem.hxx>
#include <svx/boxitem.hxx>
#include <svx/bolnitem.hxx>
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 3404866446fe..09477e5a7eb4 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -45,11 +45,11 @@
#include <sfx2/bindings.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/printer.hxx>
-#include <svtools/zforlist.hxx>
-#include <svtools/zformat.hxx>
+#include <svl/zforlist.hxx>
+#include <svl/zformat.hxx>
#include <vcl/virdev.hxx>
#include <comphelper/processfactory.hxx>
-#include <svtools/PasswordHelper.hxx>
+#include <svl/PasswordHelper.hxx>
#include <tools/tenccvt.hxx>
#include <tools/list.hxx>
#include <rtl/crc.h>
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 9fc4b09f21af..2529d0ad7f1d 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -39,8 +39,8 @@
#include <svx/linkmgr.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/objsh.hxx>
-#include <svtools/zforlist.hxx>
-#include <svtools/PasswordHelper.hxx>
+#include <svl/zforlist.hxx>
+#include <svl/PasswordHelper.hxx>
#include <vcl/svapp.hxx>
#include "document.hxx"
#include "attrib.hxx"
@@ -1734,11 +1734,8 @@ const ScDocOptions& ScDocument::GetDocOptions() const
void ScDocument::SetDocOptions( const ScDocOptions& rOpt )
{
- USHORT d,m,y;
-
DBG_ASSERT( pDocOptions, "No DocOptions! :-(" );
*pDocOptions = rOpt;
- rOpt.GetDate( d,m,y );
xPoolHelper->SetFormTableOpt(rOpt);
}
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index 7313ebbf83f5..b47f55124041 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -35,8 +35,8 @@
// INCLUDE ---------------------------------------------------------------
-#include <svtools/intitem.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/intitem.hxx>
+#include <svl/zforlist.hxx>
#include <vcl/sound.hxx>
#include <formula/token.hxx>
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index 64433a30297a..2b0b3821dcc2 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -49,16 +49,16 @@
#include <sfx2/printer.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/viewsh.hxx>
-#include <svtools/flagitem.hxx>
-#include <svtools/intitem.hxx>
+#include <svl/flagitem.hxx>
+#include <svl/intitem.hxx>
#define _SVSTDARR_USHORTS
-#include <svtools/svstdarr.hxx>
-#include <svtools/zforlist.hxx>
-#include <svtools/zformat.hxx>
-#include <svtools/misccfg.hxx>
+#include <svl/svstdarr.hxx>
+#include <svl/zforlist.hxx>
+#include <svl/zformat.hxx>
+#include <unotools/misccfg.hxx>
#include <sfx2/app.hxx>
#include <unotools/transliterationwrapper.hxx>
-#include <svtools/securityoptions.hxx>
+#include <unotools/securityoptions.hxx>
#include <vcl/virdev.hxx>
#include <vcl/msgbox.hxx>
@@ -137,17 +137,14 @@ SfxPrinter* ScDocument::GetPrinter(BOOL bCreateIfNotExist)
SID_SCPRINTOPTIONS, SID_SCPRINTOPTIONS,
NULL );
- SfxMiscCfg* pOffCfg = SFX_APP()->GetMiscConfig();
- if ( pOffCfg )
- {
- USHORT nFlags = 0;
- if ( pOffCfg->IsPaperOrientationWarning() )
- nFlags |= SFX_PRINTER_CHG_ORIENTATION;
- if ( pOffCfg->IsPaperSizeWarning() )
- nFlags |= SFX_PRINTER_CHG_SIZE;
- pSet->Put( SfxFlagItem( SID_PRINTER_CHANGESTODOC, nFlags ) );
- pSet->Put( SfxBoolItem( SID_PRINTER_NOTFOUND_WARN, pOffCfg->IsNotFoundWarning() ) );
- }
+ ::utl::MiscCfg aMisc;
+ USHORT nFlags = 0;
+ if ( aMisc.IsPaperOrientationWarning() )
+ nFlags |= SFX_PRINTER_CHG_ORIENTATION;
+ if ( aMisc.IsPaperSizeWarning() )
+ nFlags |= SFX_PRINTER_CHG_SIZE;
+ pSet->Put( SfxFlagItem( SID_PRINTER_CHANGESTODOC, nFlags ) );
+ pSet->Put( SfxBoolItem( SID_PRINTER_NOTFOUND_WARN, aMisc.IsNotFoundWarning() ) );
pPrinter = new SfxPrinter( pSet );
pPrinter->SetMapMode( MAP_100TH_MM );
@@ -189,21 +186,18 @@ void ScDocument::SetPrintOptions()
if ( pPrinter )
{
- SfxMiscCfg* pOffCfg = SFX_APP()->GetMiscConfig();
- if ( pOffCfg )
- {
- SfxItemSet aOptSet( pPrinter->GetOptions() );
-
- USHORT nFlags = 0;
- if ( pOffCfg->IsPaperOrientationWarning() )
- nFlags |= SFX_PRINTER_CHG_ORIENTATION;
- if ( pOffCfg->IsPaperSizeWarning() )
- nFlags |= SFX_PRINTER_CHG_SIZE;
- aOptSet.Put( SfxFlagItem( SID_PRINTER_CHANGESTODOC, nFlags ) );
- aOptSet.Put( SfxBoolItem( SID_PRINTER_NOTFOUND_WARN, pOffCfg->IsNotFoundWarning() ) );
-
- pPrinter->SetOptions( aOptSet );
- }
+ ::utl::MiscCfg aMisc;
+ SfxItemSet aOptSet( pPrinter->GetOptions() );
+
+ USHORT nFlags = 0;
+ if ( aMisc.IsPaperOrientationWarning() )
+ nFlags |= SFX_PRINTER_CHG_ORIENTATION;
+ if ( aMisc.IsPaperSizeWarning() )
+ nFlags |= SFX_PRINTER_CHG_SIZE;
+ aOptSet.Put( SfxFlagItem( SID_PRINTER_CHANGESTODOC, nFlags ) );
+ aOptSet.Put( SfxBoolItem( SID_PRINTER_NOTFOUND_WARN, aMisc.IsNotFoundWarning() ) );
+
+ pPrinter->SetOptions( aOptSet );
}
}
diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index de27a80b17ee..772ed496d2e1 100644
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -56,8 +56,8 @@
#include <svx/xtable.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/printer.hxx>
-#include <svtools/saveopt.hxx>
-#include <svtools/pathoptions.hxx>
+#include <unotools/saveopt.hxx>
+#include <unotools/pathoptions.hxx>
#include "document.hxx"
#include "docoptio.hxx"
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 8b04d5a0500e..4dd3f34e3f0d 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -46,9 +46,9 @@
#include <svx/svdocapt.hxx>
#include <sfx2/app.hxx>
#include <sfx2/objsh.hxx>
-#include <svtools/poolcach.hxx>
-#include <svtools/saveopt.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/poolcach.hxx>
+#include <unotools/saveopt.hxx>
+#include <svl/zforlist.hxx>
#include <unotools/charclass.hxx>
#include <unotools/transliterationwrapper.hxx>
#include <tools/tenccvt.hxx>
@@ -476,6 +476,12 @@ BOOL ScDocument::RenameTab( SCTAB nTab, const String& rName, BOOL /* bUpdateRef
if ( pChartListenerCollection )
pChartListenerCollection->UpdateChartsContainingTab( nTab );
pTab[nTab]->SetName(rName);
+
+ // If formulas refer to the renamed sheet, the TokenArray remains valid,
+ // but the XML stream must be re-generated.
+ for (i=0; i<=MAXTAB; ++i)
+ if (pTab[i] && pTab[i]->IsStreamValid())
+ pTab[i]->SetStreamValid( FALSE );
}
}
return bValid;
diff --git a/sc/source/core/data/dpdimsave.cxx b/sc/source/core/data/dpdimsave.cxx
index 7e1bc0389eaf..49e2c5b09c94 100644
--- a/sc/source/core/data/dpdimsave.cxx
+++ b/sc/source/core/data/dpdimsave.cxx
@@ -38,7 +38,7 @@
#include <com/sun/star/sheet/DataPilotFieldGroupBy.hpp>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <tools/debug.hxx>
#include <rtl/math.hxx>
#include <algorithm>
diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx
index a2d21079826d..09f32b4ba1b1 100644
--- a/sc/source/core/data/dpgroup.cxx
+++ b/sc/source/core/data/dpgroup.cxx
@@ -40,7 +40,7 @@
#include <tools/debug.hxx>
#include <rtl/math.hxx>
#include <unotools/localedatawrapper.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include "dpgroup.hxx"
#include "collect.hxx"
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 787875fcb5ff..ad9795d11c4d 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -72,7 +72,7 @@
#include <comphelper/processfactory.hxx>
#include <tools/debug.hxx>
-#include <svtools/zforlist.hxx> // IsNumberFormat
+#include <svl/zforlist.hxx> // IsNumberFormat
#include <vector>
diff --git a/sc/source/core/data/dpsdbtab.cxx b/sc/source/core/data/dpsdbtab.cxx
index cfc98af5af99..01f63f0cbaa9 100644
--- a/sc/source/core/data/dpsdbtab.cxx
+++ b/sc/source/core/data/dpsdbtab.cxx
@@ -37,7 +37,7 @@
#include <tools/debug.hxx>
#include <vcl/msgbox.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/types.hxx>
diff --git a/sc/source/core/data/dpshttab.cxx b/sc/source/core/data/dpshttab.cxx
index 7956b68ad03f..29fe2dc7b6e5 100644
--- a/sc/source/core/data/dpshttab.cxx
+++ b/sc/source/core/data/dpshttab.cxx
@@ -36,7 +36,7 @@
// INCLUDE --------------------------------------------------------------
#include <tools/debug.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include "dpshttab.hxx"
#include "dptabres.hxx"
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index 3e9a7586fd1a..e123e74a20e6 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -44,8 +44,8 @@
#include <tools/debug.hxx>
#include <rtl/math.hxx>
-#include <svtools/itemprop.hxx>
-#include <svtools/intitem.hxx>
+#include <svl/itemprop.hxx>
+#include <svl/intitem.hxx>
#include "scitems.hxx"
#include "document.hxx"
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index a5c571026e96..cb82ede30dca 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -64,8 +64,8 @@
#include <sfx2/viewsh.hxx>
#include <sfx2/docfile.hxx>
#include <sot/storage.hxx>
-#include <svtools/pathoptions.hxx>
-#include <svtools/itempool.hxx>
+#include <unotools/pathoptions.hxx>
+#include <svl/itempool.hxx>
#include <vcl/virdev.hxx>
#include <vcl/svapp.hxx>
#include <unotools/ucbstreamhelper.hxx>
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 88ff065572b4..d49e8e1aa139 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -47,9 +47,9 @@
#include <sfx2/objsh.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/viewsh.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/zforlist.hxx>
-#include <svtools/zformat.hxx>
+#include <svl/stritem.hxx>
+#include <svl/zforlist.hxx>
+#include <svl/zformat.hxx>
#include <vcl/image.hxx>
#include <vcl/virdev.hxx>
#include <tools/rcid.h>
@@ -67,7 +67,7 @@
#include <unotools/collatorwrapper.hxx>
#include <com/sun/star/i18n/CollatorOptions.hpp>
#include <unotools/intlwrapper.hxx>
-#include <svtools/syslocale.hxx>
+#include <unotools/syslocale.hxx>
#include <unotools/transliterationwrapper.hxx>
#include "global.hxx"
diff --git a/sc/source/core/data/global2.cxx b/sc/source/core/data/global2.cxx
index 6af662119f12..e6f8523a3c42 100644
--- a/sc/source/core/data/global2.cxx
+++ b/sc/source/core/data/global2.cxx
@@ -38,13 +38,13 @@
#include <sfx2/docfile.hxx>
#include <sfx2/objsh.hxx>
#include <unotools/textsearch.hxx>
-#include <svtools/pathoptions.hxx>
-#include <svtools/useroptions.hxx>
+#include <unotools/pathoptions.hxx>
+#include <unotools/useroptions.hxx>
#include <tools/urlobj.hxx>
#include <unotools/charclass.hxx>
#include <stdlib.h>
#include <ctype.h>
-#include <svtools/syslocale.hxx>
+#include <unotools/syslocale.hxx>
#include "global.hxx"
#include "rangeutl.hxx"
diff --git a/sc/source/core/data/globalx.cxx b/sc/source/core/data/globalx.cxx
index 03ca187df4d2..a5b14a3cc8c5 100644
--- a/sc/source/core/data/globalx.cxx
+++ b/sc/source/core/data/globalx.cxx
@@ -40,7 +40,7 @@
#include <unotools/localfilehelper.hxx>
#include <tools/debug.hxx>
-#include <svtools/pathoptions.hxx>
+#include <unotools/pathoptions.hxx>
#include <com/sun/star/sdbc/XResultSet.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index ee74a66bcc3b..dbc5bbf50c63 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -60,8 +60,8 @@
#include <svx/udlnitem.hxx>
#include <svx/wghtitem.hxx>
#include <svx/wrlmitem.hxx>
-#include <svtools/intitem.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/intitem.hxx>
+#include <svl/zforlist.hxx>
#include <vcl/outdev.hxx>
#include <vcl/svapp.hxx>
diff --git a/sc/source/core/data/poolhelp.cxx b/sc/source/core/data/poolhelp.cxx
index ff8f7bb76c5c..2bd7cc9c1ea9 100644
--- a/sc/source/core/data/poolhelp.cxx
+++ b/sc/source/core/data/poolhelp.cxx
@@ -35,7 +35,7 @@
// INCLUDE ---------------------------------------------------------------
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <svx/editeng.hxx>
#include "poolhelp.hxx"
@@ -95,14 +95,29 @@ SvNumberFormatter* ScPoolHelper::GetFormTable() const
pFormTable->SetColorLink( LINK( m_pSourceDoc, ScDocument, GetUserDefinedColor ) );
pFormTable->SetEvalDateFormat( NF_EVALDATEFORMAT_INTL_FORMAT );
+ UseDocOptions(); // null date, year2000, std precision
+ }
+ return pFormTable;
+}
+
+void ScPoolHelper::UseDocOptions() const
+{
+ if (pFormTable)
+ {
USHORT d,m,y;
aOpt.GetDate( d,m,y );
pFormTable->ChangeNullDate( d,m,y );
pFormTable->ChangeStandardPrec( (USHORT)aOpt.GetStdPrecision() );
pFormTable->SetYear2000( aOpt.GetYear2000() );
}
- return pFormTable;
}
+
+void ScPoolHelper::SetFormTableOpt(const ScDocOptions& rOpt)
+{
+ aOpt = rOpt;
+ UseDocOptions(); // #i105512# if the number formatter exists, update its settings
+}
+
void ScPoolHelper::SourceDocumentGone()
{
// reset all pointers to the source document
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index 7a08f352ed91..6489b4f21a6a 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -34,7 +34,7 @@
#include "postit.hxx"
#include <rtl/ustrbuf.hxx>
-#include <svtools/useroptions.hxx>
+#include <unotools/useroptions.hxx>
#include <svx/svdpage.hxx>
#include <svx/svdocapt.hxx>
#include <svx/outlobj.hxx>
diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx
index 260385d6feac..e47f3899bfeb 100644
--- a/sc/source/core/data/stlpool.cxx
+++ b/sc/source/core/data/stlpool.cxx
@@ -49,10 +49,10 @@
#include <svx/postitem.hxx>
#include <svx/udlnitem.hxx>
#include <svx/wghtitem.hxx>
-#include <svtools/itemset.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/itemset.hxx>
+#include <svl/zforlist.hxx>
#include <unotools/charclass.hxx>
-#include <vcl/fontcvt.hxx>
+#include <unotools/fontcvt.hxx>
#include <vcl/outdev.hxx>
#include <vcl/svapp.hxx>
diff --git a/sc/source/core/data/stlsheet.cxx b/sc/source/core/data/stlsheet.cxx
index 4452cd357132..277a7ce9f326 100644
--- a/sc/source/core/data/stlsheet.cxx
+++ b/sc/source/core/data/stlsheet.cxx
@@ -48,9 +48,9 @@
#include <svx/sizeitem.hxx>
#include <svx/ulspitem.hxx>
#include <sfx2/printer.hxx>
-#include <svtools/itempool.hxx>
-#include <svtools/itemset.hxx>
-#include <svtools/smplhint.hxx>
+#include <svl/itempool.hxx>
+#include <svl/itemset.hxx>
+#include <svl/smplhint.hxx>
#include "attrib.hxx"
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 10197e3a9ad5..403377342661 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -238,6 +238,8 @@ void ScTable::SetName( const String& rNewName )
bIsOlk = bOderSo = TRUE;
aName = rNewName;
aUpperName.Erase(); // invalidated if the name is changed
+
+ // SetStreamValid is handled in ScDocument::RenameTab
}
const String& ScTable::GetUpperName() const
@@ -291,6 +293,9 @@ void ScTable::SetLink( BYTE nMode,
aLinkOpt = rOpt; // Filter-Optionen
aLinkTab = rTab; // Tabellenname in Quelldatei
nLinkRefreshDelay = nRefreshDelay; // refresh delay in seconds, 0==off
+
+ if (IsStreamValid())
+ SetStreamValid(FALSE);
}
USHORT ScTable::GetOptimalColWidth( SCCOL nCol, OutputDevice* pDev,
@@ -1457,17 +1462,26 @@ void ScTable::DoColResize( SCCOL nCol1, SCCOL nCol2, SCSIZE nAdd )
void ScTable::SetRepeatColRange( const ScRange* pNew )
{
SET_PRINTRANGE( pRepeatColRange, pNew );
+
+ if (IsStreamValid())
+ SetStreamValid(FALSE);
}
void ScTable::SetRepeatRowRange( const ScRange* pNew )
{
SET_PRINTRANGE( pRepeatRowRange, pNew );
+
+ if (IsStreamValid())
+ SetStreamValid(FALSE);
}
void ScTable::ClearPrintRanges()
{
aPrintRanges.clear();
bPrintEntireSheet = FALSE;
+
+ if (IsStreamValid())
+ SetStreamValid(FALSE);
}
void ScTable::AddPrintRange( const ScRange& rNew )
@@ -1475,6 +1489,9 @@ void ScTable::AddPrintRange( const ScRange& rNew )
bPrintEntireSheet = FALSE;
if( aPrintRanges.size() < 0xFFFF )
aPrintRanges.push_back( rNew );
+
+ if (IsStreamValid())
+ SetStreamValid(FALSE);
}
//UNUSED2009-05 void ScTable::SetPrintRange( const ScRange& rNew )
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index c8a25fbe0ec1..31f9c18e3d3a 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -36,10 +36,10 @@
#include "scitems.hxx"
#include <svx/boxitem.hxx>
#include <tools/urlobj.hxx>
-#include <svtools/poolcach.hxx>
+#include <svl/poolcach.hxx>
#include <unotools/charclass.hxx>
#include <math.h>
-#include <svtools/PasswordHelper.hxx>
+#include <svl/PasswordHelper.hxx>
#include <unotools/transliterationwrapper.hxx>
#include "patattr.hxx"
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 01dc74f8644e..b85b910795a5 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -33,7 +33,7 @@
#include <rtl/math.hxx>
#include <unotools/textsearch.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <unotools/charclass.hxx>
#include <unotools/collatorwrapper.hxx>
#include <com/sun/star/i18n/CollatorOptions.hpp>
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index fd725e96d124..b10741f46c3f 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -61,7 +61,7 @@
#include <svx/editeng.hxx>
#include <svx/eeitem.hxx>
#include <svx/escpitem.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <vcl/keycodes.hxx>
#include <rtl/math.hxx>
#include <unotools/charclass.hxx>
diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx
index eb959dfb2ffa..4a0cd9e135d5 100644
--- a/sc/source/core/data/table5.cxx
+++ b/sc/source/core/data/table5.cxx
@@ -249,6 +249,9 @@ void ScTable::RemoveManualBreaks()
if (pRowFlags)
pRowFlags->AndValue( 0, MAXROW, sal::static_int_cast<BYTE>(~CR_MANUALBREAK) );
+
+ if (IsStreamValid())
+ SetStreamValid(FALSE);
}
BOOL ScTable::HasManualBreaks() const
@@ -287,6 +290,9 @@ void ScTable::SetProtection(const ScTableProtection* pProtect)
pTabProtection.reset(new ScTableProtection(*pProtect));
else
pTabProtection.reset(NULL);
+
+ if (IsStreamValid())
+ SetStreamValid(FALSE);
}
ScTableProtection* ScTable::GetProtection()
diff --git a/sc/source/core/data/tabprotection.cxx b/sc/source/core/data/tabprotection.cxx
index 1620c5194e92..c19cd8cf6b21 100644
--- a/sc/source/core/data/tabprotection.cxx
+++ b/sc/source/core/data/tabprotection.cxx
@@ -35,7 +35,7 @@
#include "tabprotection.hxx"
#include "tools/debug.hxx"
-#include "svtools/PasswordHelper.hxx"
+#include "svl/PasswordHelper.hxx"
#include "document.hxx"
#define DEBUG_TAB_PROTECTION 0
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index 443474060c3e..9b0970611254 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -45,7 +45,7 @@
#include <basic/basmgr.hxx>
#include <basic/sbx.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <vcl/msgbox.hxx>
#include <tools/urlobj.hxx>
#include <rtl/math.hxx>
diff --git a/sc/source/core/inc/adiasync.hxx b/sc/source/core/inc/adiasync.hxx
index 9d1b4e89e1c3..cc696499d025 100644
--- a/sc/source/core/inc/adiasync.hxx
+++ b/sc/source/core/inc/adiasync.hxx
@@ -31,8 +31,8 @@
#ifndef SC_ADIASYNC_HXX
#define SC_ADIASYNC_HXX
-#include <svtools/broadcast.hxx>
-#include <svtools/svarray.hxx>
+#include <svl/broadcast.hxx>
+#include <svl/svarray.hxx>
#include "callform.hxx"
diff --git a/sc/source/core/inc/bcaslot.hxx b/sc/source/core/inc/bcaslot.hxx
index ef2f77b55684..a198861092d6 100644
--- a/sc/source/core/inc/bcaslot.hxx
+++ b/sc/source/core/inc/bcaslot.hxx
@@ -34,8 +34,8 @@
#include <set>
#include <hash_set>
#include <functional>
-#include <svtools/broadcast.hxx>
-#include <svtools/svarray.hxx>
+#include <svl/broadcast.hxx>
+#include <svl/svarray.hxx>
#include "global.hxx"
#include "brdcst.hxx"
@@ -192,6 +192,7 @@ public:
void UpdateRemove( UpdateRefMode eUpdateRefMode,
const ScRange& rRange,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz );
+ void UpdateRemoveArea( ScBroadcastArea* pArea );
void UpdateInsert( ScBroadcastArea* pArea );
};
diff --git a/sc/source/core/inc/core_pch.hxx b/sc/source/core/inc/core_pch.hxx
index d756d1a91246..19d0463e7871 100644
--- a/sc/source/core/inc/core_pch.hxx
+++ b/sc/source/core/inc/core_pch.hxx
@@ -59,7 +59,7 @@
#include <i18npool/lang.h>
#include <tools/debug.hxx>
#include <tools/gen.hxx>
-#include <svtools/svarray.hxx>
+#include <svl/svarray.hxx>
#include <markarr.hxx>
#include <vcl/timer.hxx>
#include <rangelst.hxx>
@@ -67,18 +67,18 @@
#include <vcl/prntypes.hxx>
#include <table.hxx>
#include <column.hxx>
-#include <svtools/hint.hxx>
-#include <svtools/lstner.hxx>
-#include <svtools/poolitem.hxx>
+#include <svl/hint.hxx>
+#include <svl/lstner.hxx>
+#include <svl/poolitem.hxx>
#include <tools/time.hxx>
-#include <svtools/solar.hrc>
+#include <svl/solar.hrc>
#include <tools/date.hxx>
-#include <svtools/brdcst.hxx>
+#include <svl/brdcst.hxx>
#include <svx/svxids.hrc>
-#include <svtools/memberid.hrc>
+#include <svl/memberid.hrc>
#include <sfx2/sfx.hrc>
#include <sfx2/sfxsids.hrc>
-#include <svtools/cntwids.hrc>
+#include <svl/cntwids.hrc>
#include <tools/resid.hxx>
#include <tools/table.hxx>
#include <stdarg.h>
@@ -87,7 +87,7 @@
#include <tools/unqidx.hxx>
#include <rsc/rscsfx.hxx>
#include <basic/sbxdef.hxx>
-#include <svtools/itemset.hxx>
+#include <svl/itemset.hxx>
#include <stddef.h>
#include <collect.hxx>
#include <scitems.hxx>
@@ -100,8 +100,8 @@
#include <vcl/region.hxx>
#include <vcl/mapmod.hxx>
#include <vcl/bitmap.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/intitem.hxx>
+#include <svl/eitem.hxx>
+#include <svl/intitem.hxx>
#include <sot/object.hxx>
#include <sot/factory.hxx>
#include <sot/sotdata.hxx>
@@ -117,12 +117,12 @@
#include <tools/shl.hxx>
#include <compiler.hxx>
#include <vcl/font.hxx>
-#include <svtools/smplhint.hxx>
+#include <svl/smplhint.hxx>
#include <vcl/wall.hxx>
#include <vcl/settings.hxx>
#include <vcl/accel.hxx>
#include <patattr.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <tools/pstm.hxx>
#include <vcl/svapp.hxx>
#include <vcl/outdev.hxx>
@@ -131,7 +131,7 @@
#include <vcl/wintypes.hxx>
#include <vcl/event.hxx>
#include <tools/ownlist.hxx>
-#include <svtools/itempool.hxx>
+#include <svl/itempool.hxx>
#include <tools/datetime.hxx>
#include <attrib.hxx>
#include <docpool.hxx>
@@ -143,8 +143,8 @@
#include <sc.hrc>
#include <svx/dialogs.hrc>
#include <math.h>
-#include <svtools/style.hxx>
-#include <svtools/style.hrc>
+#include <svl/style.hxx>
+#include <svl/style.hrc>
#include <stdlib.h>
#include <vcl/prntypes.hxx>
#include <vcl/jobset.hxx>
@@ -157,11 +157,11 @@
#include <vcl/wrkwin.hxx>
#include <stlpool.hxx>
#include <sfx2/app.hxx>
-#include <svtools/inetmsg.hxx>
+#include <svl/inetmsg.hxx>
#include <svtools/compat.hxx>
-#include <svtools/inetdef.hxx>
-#include <svtools/inethist.hxx>
-#include <svtools/cancel.hxx>
+#include <svl/inetdef.hxx>
+#include <svl/inethist.hxx>
+#include <svl/cancel.hxx>
#include <vcl/accel.hxx>
#include <sfx2/sfxdefs.hxx>
#include <sfx2/module.hxx>
@@ -200,7 +200,7 @@
#include <scresid.hxx>
#include <vcl/print.hxx>
#include <attarray.hxx>
-#include <svtools/ownlist.hxx>
+#include <svl/ownlist.hxx>
#include <interpre.hxx>
#include <subtotal.hxx>
#include <rangenam.hxx>
@@ -225,7 +225,7 @@
#include <svx/editobj.hxx>
#include <svx/wghtitem.hxx>
#include <svx/fhgtitem.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <pivot.hxx>
#include <vcl/gdimtf.hxx>
#include <svx/svdpage.hxx>
diff --git a/sc/source/core/inc/ddelink.hxx b/sc/source/core/inc/ddelink.hxx
index b8b44a568110..465c58afb823 100644
--- a/sc/source/core/inc/ddelink.hxx
+++ b/sc/source/core/inc/ddelink.hxx
@@ -33,7 +33,7 @@
#include "address.hxx"
#include <sfx2/lnkbase.hxx>
-#include <svtools/broadcast.hxx>
+#include <svl/broadcast.hxx>
#include "scmatrix.hxx"
class ScDocument;
diff --git a/sc/source/core/inc/poolhelp.hxx b/sc/source/core/inc/poolhelp.hxx
index a60b8db462ab..00474d63c080 100644
--- a/sc/source/core/inc/poolhelp.hxx
+++ b/sc/source/core/inc/poolhelp.hxx
@@ -54,6 +54,8 @@ private:
mutable SfxItemPool* pEnginePool; // EditEnginePool
ScDocument* m_pSourceDoc;
+ void UseDocOptions() const;
+
public:
ScPoolHelper( ScDocument* pSourceDoc );
virtual ~ScPoolHelper();
@@ -68,7 +70,7 @@ public:
SfxItemPool* GetEditPool() const;
SfxItemPool* GetEnginePool() const;
- void SetFormTableOpt(const ScDocOptions& rOpt) { aOpt = rOpt; }
+ void SetFormTableOpt(const ScDocOptions& rOpt);
};
#endif
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index 259018e213ce..4cf317073b56 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -365,7 +365,10 @@ const sal_Unicode* ScRange::Parse_XL_Header(
{
p = lcl_ParseQuotedName(p, rExternDocName);
if (!*p || *p != ']' || !rExternDocName.Len())
+ {
+ rExternDocName.Erase();
return start;
+ }
}
else
{
@@ -418,7 +421,10 @@ const sal_Unicode* ScRange::Parse_XL_Header(
// Excel does not allow [ and ] characters in sheet names though.
p = lcl_ParseQuotedName(p, rExternDocName);
if (!*p || *p != '!')
+ {
+ rExternDocName.Erase();
return start;
+ }
if (rExternDocName.Len())
{
xub_StrLen nOpen = rExternDocName.Search( '[');
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index 3b8a88c47e2f..f9a9f0bd51a0 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -39,8 +39,8 @@
#include <sfx2/app.hxx>
#include <sfx2/docfile.hxx>
-#include <svtools/pathoptions.hxx>
-#include <svtools/itemset.hxx>
+#include <unotools/pathoptions.hxx>
+#include <svl/itemset.hxx>
#include <tools/shl.hxx>
#include <vcl/svapp.hxx>
#include <vcl/outdev.hxx>
diff --git a/sc/source/core/tool/cellform.cxx b/sc/source/core/tool/cellform.cxx
index 238d0f943367..5305db490f8d 100644
--- a/sc/source/core/tool/cellform.cxx
+++ b/sc/source/core/tool/cellform.cxx
@@ -33,8 +33,8 @@
// INCLUDE ---------------------------------------------------------------
#include <sfx2/objsh.hxx>
-#include <svtools/smplhint.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/smplhint.hxx>
+#include <svl/zforlist.hxx>
#include "cellform.hxx"
#include "cell.hxx"
diff --git a/sc/source/core/tool/chartarr.cxx b/sc/source/core/tool/chartarr.cxx
index bd2b06001726..e4def00c10b0 100644
--- a/sc/source/core/tool/chartarr.cxx
+++ b/sc/source/core/tool/chartarr.cxx
@@ -36,8 +36,8 @@
// INCLUDE ---------------------------------------------------------------
#include "scitems.hxx"
-#include <svtools/intitem.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/intitem.hxx>
+#include <svl/zforlist.hxx>
#include <float.h> // DBL_MIN
#include "chartarr.hxx"
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index 22d996dd701f..7dfd75206a9f 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -36,12 +36,12 @@
#include <tools/shl.hxx> // SHL_CALC
#include <tools/stack.hxx>
#include <tools/rtti.hxx>
-#include <svtools/zforlist.hxx>
-#include <svtools/itemset.hxx>
-#include <svtools/isethint.hxx>
-#include <svtools/itempool.hxx>
+#include <svl/zforlist.hxx>
+#include <svl/itemset.hxx>
+#include <svl/isethint.hxx>
+#include <svl/itempool.hxx>
#include <sfx2/app.hxx>
-#include <svtools/useroptions.hxx>
+#include <unotools/useroptions.hxx>
#include <sfx2/sfxsids.hrc>
#include "cell.hxx"
@@ -2229,7 +2229,7 @@ ScChangeTrack::ScChangeTrack( ScDocument* pDocP ) :
pDoc( pDocP )
{
Init();
- StartListening(SC_MOD()->GetUserOptions());
+ SC_MOD()->GetUserOptions().AddListener(this);
ppContentSlots = new ScChangeActionContent* [ nContentSlots ];
memset( ppContentSlots, 0, nContentSlots * sizeof( ScChangeActionContent* ) );
@@ -2240,13 +2240,14 @@ ScChangeTrack::ScChangeTrack( ScDocument* pDocP, const ScStrCollection& aTempUse
pDoc( pDocP )
{
Init();
- StartListening(SC_MOD()->GetUserOptions());
+ SC_MOD()->GetUserOptions().AddListener(this);
ppContentSlots = new ScChangeActionContent* [ nContentSlots ];
memset( ppContentSlots, 0, nContentSlots * sizeof( ScChangeActionContent* ) );
}
ScChangeTrack::~ScChangeTrack()
{
+ SC_MOD()->GetUserOptions().RemoveListener(this);
DtorClear();
delete [] ppContentSlots;
}
@@ -2339,11 +2340,9 @@ void ScChangeTrack::Clear()
}
-void __EXPORT ScChangeTrack::Notify( SfxBroadcaster&, const SfxHint& rHint )
+void __EXPORT ScChangeTrack::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 )
{
- if ( !pDoc->IsInDtorClear() &&
- rHint.ISA(SfxSimpleHint) &&
- ((SfxSimpleHint&)rHint).GetId() == SFX_HINT_USER_OPTIONS_CHANGED )
+ if ( !pDoc->IsInDtorClear() )
{
const SvtUserOptions& rUserOptions = SC_MOD()->GetUserOptions();
USHORT nOldCount = aUserCollection.GetCount();
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index a8ca4be2b5b6..4eab9aa85c9e 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -37,7 +37,7 @@
#include <sfx2/objsh.hxx>
#include <basic/sbmeth.hxx>
#include <basic/sbstar.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <tools/rcid.h>
#include <tools/rc.hxx>
#include <tools/solar.h>
@@ -2278,14 +2278,16 @@ Label_MaskStateMachine:
static const int kQuote = (1 << 4);
// Past ' closing quote.
static const int kClose = (1 << 5);
+ // Encountered # file/sheet separator.
+ static const int kFileSep = (1 << 6);
// Past . sheet name separator.
- static const int kPast = (1 << 6);
+ static const int kPast = (1 << 7);
// Marked name $$ follows sheet name separator, detected
// while we're still on the separator. Will be cleared when
// entering the name.
- static const int kMarkAhead = (1 << 7);
+ static const int kMarkAhead = (1 << 8);
// In marked defined name.
- static const int kDefName = (1 << 8);
+ static const int kDefName = (1 << 9);
bool bAddToSymbol = true;
if ((nMask & SC_COMPILER_C_ODF_RBRACKET) && !(nRefInName & kOpen))
@@ -2309,7 +2311,9 @@ Label_MaskStateMachine:
{
// Not in col/row yet.
- if ('$' == c && '$' == pSrc[0] && !(nRefInName & kOpen))
+ if (SC_COMPILER_FILE_TAB_SEP == c && (nRefInName & kFileSep))
+ nRefInName = 0;
+ else if ('$' == c && '$' == pSrc[0] && !(nRefInName & kOpen))
{
nRefInName &= ~kMarkAhead;
if (!(nRefInName & kDefName))
@@ -2356,16 +2360,20 @@ Label_MaskStateMachine:
}
else
{
- if ('\'' == pSrc[0])
- {
- // escapes embedded quote
- nRefInName |= kQuote;
- }
- else
+ switch (pSrc[0])
{
- // quote not followed by quote => close
- nRefInName |= kClose;
- nRefInName &= ~kOpen;
+ case '\'':
+ // escapes embedded quote
+ nRefInName |= kQuote;
+ break;
+ case SC_COMPILER_FILE_TAB_SEP:
+ // sheet name should follow
+ nRefInName |= kFileSep;
+ // fallthru
+ default:
+ // quote not followed by quote => close
+ nRefInName |= kClose;
+ nRefInName &= ~kOpen;
}
bAddToSymbol = !(nRefInName & kDefName);
}
diff --git a/sc/source/core/tool/ddelink.cxx b/sc/source/core/tool/ddelink.cxx
index cab3322401a8..446f892452fc 100644
--- a/sc/source/core/tool/ddelink.cxx
+++ b/sc/source/core/tool/ddelink.cxx
@@ -37,7 +37,7 @@
#include <tools/list.hxx>
#include <svx/linkmgr.hxx>
#include <sfx2/bindings.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include "ddelink.hxx"
#include "brdcst.hxx"
diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index a08b81a1917c..fed4a3b0ae40 100644
--- a/sc/source/core/tool/detfunc.cxx
+++ b/sc/source/core/tool/detfunc.cxx
@@ -61,7 +61,7 @@
#include <svx/outliner.hxx>
#include <svx/editobj.hxx>
#include <svx/sxcecitm.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/whiter.hxx>
#include <svx/writingmodeitem.hxx>
#include <basegfx/point/b2dpoint.hxx>
diff --git a/sc/source/core/tool/docoptio.cxx b/sc/source/core/tool/docoptio.cxx
index 13934914a3f3..37e6c68fbf03 100644
--- a/sc/source/core/tool/docoptio.cxx
+++ b/sc/source/core/tool/docoptio.cxx
@@ -34,7 +34,7 @@
#include <vcl/svapp.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index 5519c679f84e..e4f2c07a3c57 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -49,11 +49,11 @@
#include <svx/numitem.hxx>
#include <vcl/svapp.hxx>
#include <vcl/outdev.hxx>
-#include <svtools/inethist.hxx>
-#include <svtools/syslocale.hxx>
+#include <svl/inethist.hxx>
+#include <unotools/syslocale.hxx>
#ifndef _SVSTDARR_USHORTS
#define _SVSTDARR_USHORTS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
#include "editutil.hxx"
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 904c2625730c..f92703064d3d 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -37,8 +37,8 @@
#include <svx/langitem.hxx>
#include <svx/algitem.hxx>
#include <unotools/textsearch.hxx>
-#include <svtools/zforlist.hxx>
-#include <svtools/zformat.hxx>
+#include <svl/zforlist.hxx>
+#include <svl/zformat.hxx>
#include <tools/urlobj.hxx>
#include <unotools/charclass.hxx>
#include <sfx2/docfile.hxx>
@@ -780,6 +780,7 @@ double ScInterpreter::Compare()
switch ( GetRawStackType() )
{
case svEmptyCell:
+ Pop();
aComp.bEmpty[ i ] = TRUE;
break;
case svMissing:
@@ -836,6 +837,7 @@ ScMatrixRef ScInterpreter::CompareMat( ScCompareOptions* pOptions )
switch (GetRawStackType())
{
case svEmptyCell:
+ Pop();
aComp.bEmpty[ i ] = TRUE;
break;
case svMissing:
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index fc0f085706c5..cb418476e9d9 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -36,8 +36,8 @@
#include <svx/linkmgr.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/objsh.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/stritem.hxx>
+#include <svl/zforlist.hxx>
#include <rtl/logfile.hxx>
#include "interpre.hxx"
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 11fd414c81f2..2880d7708b10 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -40,7 +40,7 @@
#include <basic/sbmod.hxx>
#include <basic/sbstar.hxx>
#include <basic/sbx.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <tools/urlobj.hxx>
#include <rtl/logfile.hxx>
#include <stdlib.h>
diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index 7da4778bfe1a..482748cbb547 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -45,7 +45,7 @@
#include <stdio.h>
#endif
#include <unotools/bootstrap.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include "interpre.hxx"
#include "global.hxx"
diff --git a/sc/source/core/tool/optutil.cxx b/sc/source/core/tool/optutil.cxx
index 3f3d2886dfa7..36fea8a5e899 100644
--- a/sc/source/core/tool/optutil.cxx
+++ b/sc/source/core/tool/optutil.cxx
@@ -37,7 +37,7 @@
#include "optutil.hxx"
#include "global.hxx" // for pSysLocale
-#include <svtools/syslocale.hxx>
+#include <unotools/syslocale.hxx>
//------------------------------------------------------------------
diff --git a/sc/source/core/tool/printopt.cxx b/sc/source/core/tool/printopt.cxx
index dae055b5f47e..157375f32c91 100644
--- a/sc/source/core/tool/printopt.cxx
+++ b/sc/source/core/tool/printopt.cxx
@@ -210,4 +210,5 @@ void ScPrintCfg::SetOptions( const ScPrintOptions& rNew )
SetModified();
}
+void ScPrintCfg::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
diff --git a/sc/source/core/tool/progress.cxx b/sc/source/core/tool/progress.cxx
index 450736997c2d..a24c33cf6255 100644
--- a/sc/source/core/tool/progress.cxx
+++ b/sc/source/core/tool/progress.cxx
@@ -40,8 +40,8 @@
#include <sfx2/progress.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/sfxsids.hrc>
-#include <svtools/eitem.hxx>
-#include <svtools/itemset.hxx>
+#include <svl/eitem.hxx>
+#include <svl/itemset.hxx>
#define SC_PROGRESS_CXX
#include "progress.hxx"
diff --git a/sc/source/core/tool/rangeseq.cxx b/sc/source/core/tool/rangeseq.cxx
index 499dbf0a6ba1..078f9a774c09 100644
--- a/sc/source/core/tool/rangeseq.cxx
+++ b/sc/source/core/tool/rangeseq.cxx
@@ -33,7 +33,7 @@
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <rtl/math.hxx>
#include <tools/debug.hxx>
diff --git a/sc/source/core/tool/reftokenhelper.cxx b/sc/source/core/tool/reftokenhelper.cxx
index d0f2b8233de0..53a87667e8c6 100644
--- a/sc/source/core/tool/reftokenhelper.cxx
+++ b/sc/source/core/tool/reftokenhelper.cxx
@@ -54,12 +54,17 @@ void ScRefTokenHelper::compileRangeRepresentation(
const sal_Unicode cSep = GetScCompilerNativeSymbol(ocSep).GetChar(0);
const sal_Unicode cQuote = '\'';
+ // #i107275# ignore parentheses
+ OUString aRangeStr = rRangeStr;
+ while( (aRangeStr.getLength() >= 2) && (aRangeStr[ 0 ] == '(') && (aRangeStr[ aRangeStr.getLength() - 1 ] == ')') )
+ aRangeStr = aRangeStr.copy( 1, aRangeStr.getLength() - 2 );
+
bool bFailure = false;
sal_Int32 nOffset = 0;
while (nOffset >= 0 && !bFailure)
{
OUString aToken;
- ScRangeStringConverter::GetTokenByOffset(aToken, rRangeStr, nOffset, cSep, cQuote);
+ ScRangeStringConverter::GetTokenByOffset(aToken, aRangeStr, nOffset, cSep, cQuote);
if (nOffset < 0)
break;
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index ad7147ccb14d..6195164e34fa 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -38,7 +38,7 @@
#include "address.hxx"
#include "formula/errorcodes.hxx"
#include "interpre.hxx"
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <tools/stream.hxx>
#include <rtl/math.hxx>
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 6c5c6a03b773..e4a97d96d2e4 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -394,7 +394,7 @@ ScRawToken* ScRawToken::Clone() const
FormulaToken* ScRawToken::CreateToken() const
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
#define IF_NOT_OPCODE_ERROR(o,c) if (eOp!=o) DBG_ERROR1( #c "::ctor: OpCode %d lost, converted to " #o "; maybe inherit from FormulaToken instead!", int(eOp))
#else
#define IF_NOT_OPCODE_ERROR(o,c)
diff --git a/sc/source/core/tool/zforauto.cxx b/sc/source/core/tool/zforauto.cxx
index f8d2bd3f1906..62a6b48c4da0 100644
--- a/sc/source/core/tool/zforauto.cxx
+++ b/sc/source/core/tool/zforauto.cxx
@@ -31,8 +31,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
-#include <svtools/zforlist.hxx>
-#include <svtools/zformat.hxx>
+#include <svl/zforlist.hxx>
+#include <svl/zformat.hxx>
#include <vcl/svapp.hxx>
#include <tools/debug.hxx>
diff --git a/sc/source/filter/dif/difimp.cxx b/sc/source/filter/dif/difimp.cxx
index cf0ccf5447a3..77803d338788 100644
--- a/sc/source/filter/dif/difimp.cxx
+++ b/sc/source/filter/dif/difimp.cxx
@@ -34,7 +34,7 @@
//------------------------------------------------------------------------
#include "scitems.hxx"
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include "dif.hxx"
#include "filter.hxx"
diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx
index d1b08b9cfc68..998208541157 100644
--- a/sc/source/filter/excel/excdoc.cxx
+++ b/sc/source/filter/excel/excdoc.cxx
@@ -42,8 +42,8 @@
#include <svx/svdpage.hxx>
#include <svx/lrspitem.hxx>
#include <svx/ulspitem.hxx>
-#include <svtools/intitem.hxx>
-#include <svtools/zformat.hxx>
+#include <svl/intitem.hxx>
+#include <svl/zformat.hxx>
#include <sot/storage.hxx>
#include <sfx2/objsh.hxx>
#include <tools/urlobj.hxx>
@@ -144,12 +144,12 @@ static void lcl_AddWorkbookProtection( XclExpRecordList<>& aRecList, ExcTable& s
}
#endif
-static void lcl_AddScenariosAndFilters( XclExpRecordList<>& aRecList, ExcTable& self, SCTAB mnScTab )
+static void lcl_AddScenariosAndFilters( XclExpRecordList<>& aRecList, const XclExpRoot& rRoot, SCTAB nScTab )
{
// Scenarios
- aRecList.AppendNewRecord( new ExcEScenarioManager( self.GetDoc(), mnScTab ) );
+ aRecList.AppendNewRecord( new ExcEScenarioManager( rRoot, nScTab ) );
// filter
- aRecList.AppendRecord( self.GetFilterManager().CreateRecord( mnScTab ) );
+ aRecList.AppendRecord( rRoot.GetFilterManager().CreateRecord( nScTab ) );
}
@@ -205,20 +205,47 @@ void ExcTable::FillAsHeader( ExcBoundsheetList& rBoundsheetList )
rR.pObjRecs = NULL; // per sheet
+ sal_uInt16 nWriteProtHash = 0;
+ if( SfxObjectShell* pDocShell = GetDocShell() )
+ {
+ ScfPropertySet aPropSet( pDocShell->GetModel() );
+ sal_Int32 nApiHash = 0;
+ if( aPropSet.GetProperty( nApiHash, CREATE_OUSTRING( "WriteProtectionPassword" ) ) && (0 < nApiHash) && (nApiHash <= SAL_MAX_UINT16) )
+ {
+ nWriteProtHash = static_cast< sal_uInt16 >( nApiHash );
+ Add( new XclExpEmptyRecord( EXC_ID_WRITEPROT ) );
+ }
+ }
+
+ // TODO: correct codepage for BIFF5?
+ sal_uInt16 nCodePage = XclTools::GetXclCodePage( (GetBiff() <= EXC_BIFF5) ? RTL_TEXTENCODING_MS_1252 : RTL_TEXTENCODING_UNICODE );
+
if( GetBiff() <= EXC_BIFF5 )
+ {
+ Add( new XclExpEmptyRecord( EXC_ID_INTERFACEHDR ) );
+ Add( new XclExpUInt16Record( EXC_ID_MMS, 0 ) );
+ Add( new XclExpEmptyRecord( EXC_ID_TOOLBARHDR ) );
+ Add( new XclExpEmptyRecord( EXC_ID_TOOLBAREND ) );
+ Add( new XclExpEmptyRecord( EXC_ID_INTERFACEEND ) );
Add( new ExcDummy_00 );
+ }
else
{
- if ( IsDocumentEncrypted() )
- Add( new XclExpFilePass(GetRoot()) );
-
- Add( new XclExpInterfaceHdr );
- Add( new XclExpMMS );
- Add( new XclExpInterfaceEnd );
+ if( IsDocumentEncrypted() )
+ Add( new XclExpFilePass( GetRoot() ) );
+ Add( new XclExpInterfaceHdr( nCodePage ) );
+ Add( new XclExpUInt16Record( EXC_ID_MMS, 0 ) );
+ Add( new XclExpEmptyRecord( EXC_ID_INTERFACEEND ) );
Add( new XclExpWriteAccess );
- Add( new XclExpCodePage );
- Add( new XclExpDSF );
- Add( new XclExpExcel9File );
+ }
+
+ Add( new XclExpFileSharing( GetRoot(), nWriteProtHash ) );
+ Add( new XclExpUInt16Record( EXC_ID_CODEPAGE, nCodePage ) );
+
+ if( GetBiff() == EXC_BIFF8 )
+ {
+ Add( new XclExpBoolRecord( EXC_ID_DSF, false ) );
+ Add( new XclExpEmptyRecord( EXC_ID_XL9FILE ) );
rR.pTabId = new XclExpChTrTabId( Max( nExcTabCount, nCodenames ) );
Add( rR.pTabId );
if( HasVbaStorage() )
@@ -228,10 +255,10 @@ void ExcTable::FillAsHeader( ExcBoundsheetList& rBoundsheetList )
if( rCodeName.Len() )
Add( new XclCodename( rCodeName ) );
}
-
- Add( new XclExpFnGroupCount );
}
+ Add( new XclExpUInt16Record( EXC_ID_FNGROUPCOUNT, 14 ) );
+
// erst Namen- und Tabellen-Eintraege aufbauen
String aName;
@@ -473,7 +500,7 @@ void ExcTable::FillAsTable( size_t nCodeNameIdx )
aRecList.AppendRecord( CreateRecord( EXC_ID_EXTERNSHEET ) );
if ( eBiff == EXC_BIFF8 )
- lcl_AddScenariosAndFilters( aRecList, *this, mnScTab );
+ lcl_AddScenariosAndFilters( aRecList, GetRoot(), mnScTab );
// cell table: DEFCOLWIDTH, COLINFO, DIMENSIONS, ROW, cell records
aRecList.AppendRecord( mxCellTable );
@@ -585,7 +612,7 @@ void ExcTable::FillAsXmlTable( size_t nCodeNameIdx )
// web queries
Add( new XclExpWebQueryBuffer( GetRoot() ) );
- lcl_AddScenariosAndFilters( aRecList, *this, mnScTab );
+ lcl_AddScenariosAndFilters( aRecList, GetRoot(), mnScTab );
// MERGEDCELLS record, generated by the cell table
aRecList.AppendRecord( mxCellTable->CreateRecord( EXC_ID_MERGEDCELLS ) );
diff --git a/sc/source/filter/excel/excel.cxx b/sc/source/filter/excel/excel.cxx
index 8365ef0db3f9..41529b66346f 100644
--- a/sc/source/filter/excel/excel.cxx
+++ b/sc/source/filter/excel/excel.cxx
@@ -43,7 +43,7 @@
#include <com/sun/star/document/XFilter.hpp>
#include <com/sun/star/document/XImporter.hpp>
#include "scitems.hxx"
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include "filter.hxx"
#include "document.hxx"
#include "xistream.hxx"
diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx
index 1d209b91bc68..a172bd63e69b 100644
--- a/sc/source/filter/excel/excimp8.cxx
+++ b/sc/source/filter/excel/excimp8.cxx
@@ -36,7 +36,7 @@
#include <scitems.hxx>
#include <comphelper/processfactory.hxx>
-#include <svtools/fltrcfg.hxx>
+#include <unotools/fltrcfg.hxx>
#include <svtools/wmf.hxx>
@@ -56,7 +56,7 @@
#include <svx/crsditem.hxx>
#include <svx/flditem.hxx>
#include <svx/xflclit.hxx>
-#include <svx/svxmsbas.hxx>
+#include <filter/msfilter/svxmsbas.hxx>
#include <vcl/graph.hxx>
#include <vcl/bmpacc.hxx>
@@ -102,6 +102,10 @@
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
+#include <basic/basmgr.hxx>
+#include <cppuhelper/component_context.hxx>
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <sfx2/app.hxx>
using namespace com::sun::star;
@@ -165,14 +169,14 @@ void ImportExcel8::Boundsheet( void )
UINT8 nLen;
UINT16 nGrbit;
- aIn.Ignore( 4 );
+ aIn.DisableDecryption();
+ maSheetOffsets.push_back( aIn.ReaduInt32() );
+ aIn.EnableDecryption();
aIn >> nGrbit >> nLen;
String aName( aIn.ReadUniString( nLen ) );
GetTabInfo().AppendXclTabName( aName, nBdshtTab );
- *pExcRoot->pTabNameBuff << aName;
-
SCTAB nScTab = static_cast< SCTAB >( nBdshtTab );
if( nScTab > 0 )
{
@@ -248,16 +252,6 @@ void ImportExcel8::SheetProtection( void )
GetSheetProtectBuffer().ReadOptions( aIn, GetCurrScTab() );
}
-bool lcl_hasVBAEnabled()
-{
- uno::Reference< beans::XPropertySet > xProps( ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY);
- // test if vba service is present
- uno::Reference< uno::XComponentContext > xCtx( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), uno::UNO_QUERY );
- uno::Reference< uno::XInterface > xGlobals( xCtx->getValueByName( ::rtl::OUString::createFromAscii( "/singletons/ooo.vba.theGlobals") ), uno::UNO_QUERY );
-
- return xGlobals.is();
-}
-
void ImportExcel8::ReadBasic( void )
{
bHasBasic = TRUE;
@@ -273,7 +267,7 @@ void ImportExcel8::ReadBasic( void )
if( bLoadCode || bLoadStrg )
{
SvxImportMSVBasic aBasicImport( *pShell, *xRootStrg, bLoadCode, bLoadStrg );
- bool bAsComment = !bLoadExecutable || !lcl_hasVBAEnabled();
+ bool bAsComment = !bLoadExecutable;
aBasicImport.Import( EXC_STORAGE_VBA_PROJECT, EXC_STORAGE_VBA, bAsComment );
}
}
diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx
index bff8d4cba246..ce824fa70e44 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -38,7 +38,7 @@
#include "excrecds.hxx"
#include <map>
-#include <svx/countryid.hxx>
+#include <filter/msfilter/countryid.hxx>
#include "scitems.hxx"
#include <svx/eeitem.hxx>
@@ -62,13 +62,13 @@
#include <svx/ulspitem.hxx>
#include <svx/fhgtitem.hxx>
#include <svx/escpitem.hxx>
-#include <svtools/intitem.hxx>
-#include <svtools/zforlist.hxx>
-#include <svtools/zformat.hxx>
+#include <svl/intitem.hxx>
+#include <svl/zforlist.hxx>
+#include <svl/zformat.hxx>
#include <svtools/ctrltool.hxx>
#define _SVSTDARR_USHORTS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <string.h>
@@ -107,17 +107,10 @@ using ::rtl::OString;
//--------------------------------------------------------- class ExcDummy_00 -
const BYTE ExcDummy_00::pMyData[] = {
- 0xe1, 0x00, 0x00, 0x00, // INTERFACEHDR
- 0xc1, 0x00, 0x02, 0x00, 0x00, 0x00, // MMS
- 0xbf, 0x00, 0x00, 0x00, // TOOLBARHDR
- 0xc0, 0x00, 0x00, 0x00, // TOOLBAREND
- 0xe2, 0x00, 0x00, 0x00, // INTERFACEEND
- 0x5c, 0x00, 0x20, 0x00, 0x04, 0x4d, 0x72, 0x20, 0x58, // WRITEACCESS
+ 0x5c, 0x00, 0x20, 0x00, 0x04, 'C', 'a', 'l', 'c', // WRITEACCESS
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x42, 0x00, 0x02, 0x00, 0xe4, 0x04, // CODEPAGE
- 0x9c, 0x00, 0x02, 0x00, 0x0e, 0x00 // FNGROUPCOUNT
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20
};
const sal_Size ExcDummy_00::nMyLen = sizeof( ExcDummy_00::pMyData );
@@ -315,27 +308,6 @@ sal_Size ExcEof::GetLen( void ) const
-//----------------------------------------------------- class ExcFngroupcount -
-
-void ExcFngroupcount::SaveCont( XclExpStream& rStrm )
-{
- rStrm << ( UINT16 ) 0x000E; // copied from Excel
-}
-
-
-UINT16 ExcFngroupcount::GetNum( void ) const
-{
- return 0x009C;
-}
-
-
-sal_Size ExcFngroupcount::GetLen( void ) const
-{
- return 2;
-}
-
-
-
//--------------------------------------------------------- class ExcDummy_00 -
sal_Size ExcDummy_00::GetLen( void ) const
@@ -484,7 +456,7 @@ XclExpCountry::XclExpCountry( const XclExpRoot& rRoot ) :
/* #i31530# set document country as UI country too -
needed for correct behaviour of number formats. */
mnUICountry = mnDocCountry = static_cast< sal_uInt16 >(
- ::svx::ConvertLanguageToCountry( rRoot.GetDocLanguage() ) );
+ ::msfilter::ConvertLanguageToCountry( rRoot.GetDocLanguage() ) );
}
void XclExpCountry::WriteBody( XclExpStream& rStrm )
diff --git a/sc/source/filter/excel/exctools.cxx b/sc/source/filter/excel/exctools.cxx
index 11400ca20742..d698278d9d3c 100644
--- a/sc/source/filter/excel/exctools.cxx
+++ b/sc/source/filter/excel/exctools.cxx
@@ -68,7 +68,6 @@ RootData::RootData( void )
{
eDateiTyp = BiffX;
pExtSheetBuff = NULL;
- pTabNameBuff = NULL;
pShrfmlaBuff = NULL;
pExtNameBuff = NULL;
pFmlaConverter = NULL;
@@ -90,7 +89,6 @@ RootData::RootData( void )
RootData::~RootData()
{
delete pExtSheetBuff;
- delete pTabNameBuff;
delete pShrfmlaBuff;
delete pExtNameBuff;
delete pAutoFilterBuffer;
diff --git a/sc/source/filter/excel/expop2.cxx b/sc/source/filter/excel/expop2.cxx
index 677d872fe8e9..1a79aef3f0ec 100644
--- a/sc/source/filter/excel/expop2.cxx
+++ b/sc/source/filter/excel/expop2.cxx
@@ -35,11 +35,11 @@
//------------------------------------------------------------------------
-#include <svtools/fltrcfg.hxx>
+#include <unotools/fltrcfg.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/docinf.hxx>
-#include <svx/svxmsbas.hxx>
+#include <filter/msfilter/svxmsbas.hxx>
#include "scerrors.hxx"
#include "scextopt.hxx"
diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx
index 5a0ae1f9a972..7003cc683688 100644
--- a/sc/source/filter/excel/impop.cxx
+++ b/sc/source/filter/excel/impop.cxx
@@ -33,7 +33,7 @@
#include "imp_op.hxx"
-#include <svx/countryid.hxx>
+#include <filter/msfilter/countryid.hxx>
#include "scitems.hxx"
#include <svx/eeitem.hxx>
@@ -47,7 +47,7 @@
#include <svx/colritem.hxx>
#include <sfx2/printer.hxx>
#include <sfx2/docfile.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <sfx2/objsh.hxx>
#include "docuno.hxx"
@@ -136,7 +136,6 @@ ImportExcel::ImportExcel( XclImpRootData& rImpData, SvStream& rStrm ):
pExcRoot->pIR = this; // ExcRoot -> XclImpRoot
pExcRoot->eDateiTyp = BiffX;
pExcRoot->pExtSheetBuff = new ExtSheetBuffer( pExcRoot ); //&aExtSheetBuff;
- pExcRoot->pTabNameBuff = new NameBuffer( pExcRoot ); //&aTabNameBuff;
pExcRoot->pShrfmlaBuff = new ShrfmlaBuffer( pExcRoot ); //&aShrfrmlaBuff;
pExcRoot->pExtNameBuff = new ExtNameBuff ( *this );
@@ -180,9 +179,19 @@ void ImportExcel::ReadFileSharing()
{
sal_uInt16 nRecommendReadOnly, nPasswordHash;
maStrm >> nRecommendReadOnly >> nPasswordHash;
+
if( (nRecommendReadOnly != 0) || (nPasswordHash != 0) )
if( SfxItemSet* pItemSet = GetMedium().GetItemSet() )
pItemSet->Put( SfxBoolItem( SID_DOC_READONLY, TRUE ) );
+
+ if( nPasswordHash != 0 )
+ {
+ if( SfxObjectShell* pDocShell = GetDocShell() )
+ {
+ ScfPropertySet aPropSet( pDocShell->GetModel() );
+ aPropSet.SetProperty( CREATE_OUSTRING( "WriteProtectionPassword" ), static_cast< sal_Int32 >( nPasswordHash ) );
+ }
+ }
}
sal_uInt16 ImportExcel::ReadXFIndex( bool bBiff2 )
@@ -688,14 +697,14 @@ void ImportExcel::Boundsheet( void )
if( GetBiff() == EXC_BIFF5 )
{
- aIn.Ignore( 4 );
+ aIn.DisableDecryption();
+ maSheetOffsets.push_back( aIn.ReaduInt32() );
+ aIn.EnableDecryption();
aIn >> nGrbit;
}
String aName( aIn.ReadByteString( FALSE ) );
- *pExcRoot->pTabNameBuff << aName;
-
SCTAB nScTab = static_cast< SCTAB >( nBdshtTab );
if( nScTab > 0 )
{
@@ -722,12 +731,12 @@ void ImportExcel::Country( void )
maStrm >> nUICountry >> nDocCountry;
// Store system language in XclRoot
- LanguageType eLanguage = ::svx::ConvertCountryToLanguage( static_cast< ::svx::CountryId >( nDocCountry ) );
+ LanguageType eLanguage = ::msfilter::ConvertCountryToLanguage( static_cast< ::msfilter::CountryId >( nDocCountry ) );
if( eLanguage != LANGUAGE_DONTKNOW )
SetDocLanguage( eLanguage );
// Set Excel UI language in add-in name translator
- eLanguage = ::svx::ConvertCountryToLanguage( static_cast< ::svx::CountryId >( nUICountry ) );
+ eLanguage = ::msfilter::ConvertCountryToLanguage( static_cast< ::msfilter::CountryId >( nUICountry ) );
if( eLanguage != LANGUAGE_DONTKNOW )
SetUILanguage( eLanguage );
}
diff --git a/sc/source/filter/excel/makefile.mk b/sc/source/filter/excel/makefile.mk
index 5b483f04729d..4c94b0712d89 100644
--- a/sc/source/filter/excel/makefile.mk
+++ b/sc/source/filter/excel/makefile.mk
@@ -121,6 +121,7 @@ EXCEPTIONSFILES = \
$(SLO)$/excimp8.obj \
$(SLO)$/excrecds.obj \
$(SLO)$/expop2.obj \
+ $(SLO)$/impop.obj \
$(SLO)$/namebuff.obj \
$(SLO)$/tokstack.obj \
$(SLO)$/xecontent.obj \
diff --git a/sc/source/filter/excel/read.cxx b/sc/source/filter/excel/read.cxx
index 50c173d076a1..acb8b065416a 100644
--- a/sc/source/filter/excel/read.cxx
+++ b/sc/source/filter/excel/read.cxx
@@ -99,9 +99,28 @@ FltError ImportExcel::Read( void )
::std::auto_ptr< ScfSimpleProgressBar > pProgress( new ScfSimpleProgressBar(
aIn.GetSvStreamSize(), GetDocShell(), STR_LOAD_DOC ) );
+ /* #i104057# Need to track a base position for progress bar calculation,
+ because sheet substreams may not be in order of sheets. */
+ sal_Size nProgressBasePos = 0;
+ sal_Size nProgressBaseSize = 0;
+
while( eAkt != Z_Ende )
{
- aIn.StartNextRecord();
+ if( eAkt == Z_Biff5E )
+ {
+ sal_uInt16 nScTab = GetCurrScTab();
+ if( nScTab < maSheetOffsets.size() )
+ {
+ nProgressBaseSize += (aIn.GetSvStreamPos() - nProgressBasePos);
+ nProgressBasePos = maSheetOffsets[ nScTab ];
+ aIn.StartNextRecord( nProgressBasePos );
+ }
+ else
+ eAkt = Z_Ende;
+ }
+ else
+ aIn.StartNextRecord();
+
nOpcode = aIn.GetRecId();
if( !aIn.IsValid() )
@@ -124,8 +143,11 @@ FltError ImportExcel::Read( void )
break;
}
+ if( eAkt == Z_Ende )
+ break;
+
if( eAkt != Z_Biff5TPre && eAkt != Z_Biff5WPre )
- pProgress->ProgressAbs( aIn.GetSvStreamPos() );
+ pProgress->ProgressAbs( nProgressBaseSize + aIn.GetSvStreamPos() - nProgressBasePos );
switch( eAkt )
{
@@ -804,9 +826,28 @@ FltError ImportExcel8::Read( void )
::std::auto_ptr< ScfSimpleProgressBar > pProgress( new ScfSimpleProgressBar(
aIn.GetSvStreamSize(), GetDocShell(), STR_LOAD_DOC ) );
+ /* #i104057# Need to track a base position for progress bar calculation,
+ because sheet substreams may not be in order of sheets. */
+ sal_Size nProgressBasePos = 0;
+ sal_Size nProgressBaseSize = 0;
+
while( eAkt != EXC_STATE_END )
{
- aIn.StartNextRecord();
+ if( eAkt == EXC_STATE_BEFORE_SHEET )
+ {
+ sal_uInt16 nScTab = GetCurrScTab();
+ if( nScTab < maSheetOffsets.size() )
+ {
+ nProgressBaseSize += (aIn.GetSvStreamPos() - nProgressBasePos);
+ nProgressBasePos = maSheetOffsets[ nScTab ];
+ aIn.StartNextRecord( nProgressBasePos );
+ }
+ else
+ eAkt = EXC_STATE_END;
+ }
+ else
+ aIn.StartNextRecord();
+
if( !aIn.IsValid() )
{
// #124240# #i63591# finalize table if EOF is missing
@@ -830,7 +871,7 @@ FltError ImportExcel8::Read( void )
break;
if( eAkt != EXC_STATE_SHEET_PRE && eAkt != EXC_STATE_GLOBALS_PRE )
- pProgress->ProgressAbs( aIn.GetSvStreamPos() );
+ pProgress->ProgressAbs( nProgressBaseSize + aIn.GetSvStreamPos() - nProgressBasePos );
sal_uInt16 nRecId = aIn.GetRecId();
diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx
index d1fed27bbec1..261bf8c42e30 100644
--- a/sc/source/filter/excel/xechart.cxx
+++ b/sc/source/filter/excel/xechart.cxx
@@ -58,7 +58,7 @@
#include <com/sun/star/chart2/TickmarkStyle.hpp>
#include <vcl/outdev.hxx>
-#include <svx/escherex.hxx>
+#include <filter/msfilter/escherex.hxx>
#include "document.hxx"
#include "rangelst.hxx"
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 1d09082ede82..ad51304b3e3e 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -40,7 +40,7 @@
#include <com/sun/star/sheet/XAreaLink.hpp>
#include <sfx2/objsh.hxx>
#include <tools/urlobj.hxx>
-#include <svtools/itemset.hxx>
+#include <svl/itemset.hxx>
#include <formula/grammar.hxx>
#include "scitems.hxx"
#include <svx/eeitem.hxx>
diff --git a/sc/source/filter/excel/xeformula.cxx b/sc/source/filter/excel/xeformula.cxx
index ef15b16030cf..849ac080bb1d 100644
--- a/sc/source/filter/excel/xeformula.cxx
+++ b/sc/source/filter/excel/xeformula.cxx
@@ -2170,10 +2170,15 @@ void XclExpFmlaCompImpl::PushOperatorPos( sal_uInt16 nTokPos, const XclExpOperan
sal_uInt16 XclExpFmlaCompImpl::PopOperandPos()
{
- DBG_ASSERT( !mxData->maOpPosStack.empty(), "XclExpFmlaCompImpl::PopOperandPos - token stack broken" );
- sal_uInt16 nTokPos = mxData->maOpPosStack.back();
- mxData->maOpPosStack.pop_back();
- return nTokPos;
+ DBG_ASSERT( !mxData->mbOk || !mxData->maOpPosStack.empty(), "XclExpFmlaCompImpl::PopOperandPos - token stack broken" );
+ mxData->mbOk &= !mxData->maOpPosStack.empty();
+ if( mxData->mbOk )
+ {
+ sal_uInt16 nTokPos = mxData->maOpPosStack.back();
+ mxData->maOpPosStack.pop_back();
+ return nTokPos;
+ }
+ return 0;
}
namespace {
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index 45a44b2c88d1..30b30639f7c7 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -35,7 +35,7 @@
#include <sfx2/objsh.hxx>
#include <vcl/font.hxx>
#include <tools/urlobj.hxx>
-#include <svtools/itemset.hxx>
+#include <svl/itemset.hxx>
#include <svtools/ctrltool.hxx>
#include <svx/svdotext.hxx>
#include <svx/outlobj.hxx>
@@ -49,7 +49,7 @@
#include <svx/svxfont.hxx>
#define _SVSTDARR_USHORTS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include "document.hxx"
#include "docpool.hxx"
#include "cell.hxx"
@@ -415,7 +415,7 @@ XclExpStringRef lclCreateFormattedString(
nScript = nLastScript;
// construct font from current text portion
- SvxFont aFont( XclExpFontBuffer::GetFontFromItemSet( rItemSet, nScript ) );
+ SvxFont aFont( XclExpFontHelper::GetFontFromItemSet( rRoot, rItemSet, nScript ) );
// Excel start position of this portion
sal_uInt16 nXclPortionStart = xString->Len();
@@ -529,7 +529,7 @@ XclExpStringRef lclCreateFormattedString(
sal_Int16 nScript = xBreakIt->getScriptType( aXclPortionText, 0 );
if( nScript == ApiScriptType::WEAK )
nScript = nLastScript;
- SvxFont aFont( XclExpFontBuffer::GetFontFromItemSet( aItemSet, nScript ) );
+ SvxFont aFont( XclExpFontHelper::GetFontFromItemSet( rRoot, aItemSet, nScript ) );
nLastScript = nScript;
// add escapement
diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx
index 47f101f4c351..46fcd166ecf1 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -34,7 +34,7 @@
#include <algorithm>
#include <unotools/collatorwrapper.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include "document.hxx"
#include "cell.hxx"
#include "scextopt.hxx"
diff --git a/sc/source/filter/excel/xename.cxx b/sc/source/filter/excel/xename.cxx
index ace7a66dc1f9..004fbfa2932c 100644
--- a/sc/source/filter/excel/xename.cxx
+++ b/sc/source/filter/excel/xename.cxx
@@ -636,10 +636,13 @@ void XclExpNameManagerImpl::CreateBuiltInNames()
// Calc document does not care about sheet index in print ranges
aRange.aStart.SetTab( nScTab );
aRange.aEnd.SetTab( nScTab );
+ aRange.Justify();
aRangeList.Append( aRange );
}
- GetAddressConverter().ValidateRangeList( aRangeList, true );
- GetNameManager().InsertBuiltInName( EXC_BUILTIN_PRINTAREA, aRangeList );
+ // create the NAME record (do not warn if ranges are shrunken)
+ GetAddressConverter().ValidateRangeList( aRangeList, false );
+ if( aRangeList.Count() > 0 )
+ GetNameManager().InsertBuiltInName( EXC_BUILTIN_PRINTAREA, aRangeList );
}
// *** 2) print titles *** ----------------------------------------
@@ -656,8 +659,9 @@ void XclExpNameManagerImpl::CreateBuiltInNames()
0, pRowRange->aStart.Row(), nScTab,
GetXclMaxPos().Col(), pRowRange->aEnd.Row(), nScTab ) );
// create the NAME record
- GetAddressConverter().ValidateRangeList( aTitleList, true );
- GetNameManager().InsertBuiltInName( EXC_BUILTIN_PRINTTITLES, aTitleList );
+ GetAddressConverter().ValidateRangeList( aTitleList, false );
+ if( aTitleList.Count() > 0 )
+ GetNameManager().InsertBuiltInName( EXC_BUILTIN_PRINTTITLES, aTitleList );
// *** 3) filter ranges *** ---------------------------------------
diff --git a/sc/source/filter/excel/xepage.cxx b/sc/source/filter/excel/xepage.cxx
index 36d7a9dc31b7..47414c07bec8 100644
--- a/sc/source/filter/excel/xepage.cxx
+++ b/sc/source/filter/excel/xepage.cxx
@@ -32,10 +32,10 @@
#include "precompiled_sc.hxx"
#include "xepage.hxx"
-#include <svtools/itemset.hxx>
+#include <svl/itemset.hxx>
#include "scitems.hxx"
-#include <svtools/eitem.hxx>
-#include <svtools/intitem.hxx>
+#include <svl/eitem.hxx>
+#include <svl/intitem.hxx>
#include <svx/pageitem.hxx>
#include <svx/sizeitem.hxx>
#include <svx/lrspitem.hxx>
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index 69b323e1e718..bc694d01725e 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -42,7 +42,7 @@
#include <rtl/math.hxx>
#include <tools/date.hxx>
-#include <svtools/zformat.hxx>
+#include <svl/zformat.hxx>
#include <sot/storage.hxx>
#include "document.hxx"
#include "dpobject.hxx"
diff --git a/sc/source/filter/excel/xeroot.cxx b/sc/source/filter/excel/xeroot.cxx
index 7c4974db3029..45f90732b070 100644
--- a/sc/source/filter/excel/xeroot.cxx
+++ b/sc/source/filter/excel/xeroot.cxx
@@ -32,10 +32,10 @@
#include "precompiled_sc.hxx"
#include <sfx2/docfile.hxx>
#include <sfx2/sfxsids.hrc>
-#include <svtools/saveopt.hxx>
-#include <svtools/itemset.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/eitem.hxx>
+#include <unotools/saveopt.hxx>
+#include <svl/itemset.hxx>
+#include <svl/stritem.hxx>
+#include <svl/eitem.hxx>
#include "xecontent.hxx"
#include "xltracer.hxx"
#include "xehelper.hxx"
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index 10d23eccdf27..1dd1bbc747f7 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -578,7 +578,7 @@ void XclExpBiff8Encrypter::Init( const String& aPass, const sal_uInt8 nDocId[16]
maCodec.InitKey(mnPassw, mnDocId);
// generate salt hash.
- ::svx::MSCodec_Std97 aCodec;
+ ::msfilter::MSCodec_Std97 aCodec;
aCodec.InitKey(mnPassw, mnDocId);
aCodec.CreateSaltDigest(nSalt, mnSaltDigest);
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index 0412dacabb15..d1ab058d7862 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -37,8 +37,8 @@
#include <set>
#include <com/sun/star/i18n/ScriptType.hpp>
#include <vcl/font.hxx>
-#include <svtools/zformat.hxx>
-#include <svtools/languageoptions.hxx>
+#include <svl/zformat.hxx>
+#include <svl/languageoptions.hxx>
#include <sfx2/printer.hxx>
#include "scitems.hxx"
#include <svx/algitem.hxx>
@@ -824,6 +824,120 @@ void XclExpPalette::WriteBody( XclExpStream& rStrm )
namespace {
+typedef ::std::pair< USHORT, sal_Int16 > WhichAndScript;
+
+sal_Int16 lclCheckFontItems( const SfxItemSet& rItemSet,
+ const WhichAndScript& rWAS1, const WhichAndScript& rWAS2, const WhichAndScript& rWAS3 )
+{
+ if( ScfTools::CheckItem( rItemSet, rWAS1.first, false ) ) return rWAS1.second;
+ if( ScfTools::CheckItem( rItemSet, rWAS2.first, false ) ) return rWAS2.second;
+ if( ScfTools::CheckItem( rItemSet, rWAS3.first, false ) ) return rWAS3.second;
+ return 0;
+};
+
+} // namespace
+
+/*static*/ sal_Int16 XclExpFontHelper::GetFirstUsedScript( const XclExpRoot& rRoot, const SfxItemSet& rItemSet )
+{
+ namespace ApiScriptType = ::com::sun::star::i18n::ScriptType;
+
+ /* #i17050# #i107170# We need to determine which font items are set in the
+ item set, and which script type we should prefer according to the
+ current language settings. */
+
+ static const WhichAndScript WAS_LATIN( ATTR_FONT, ::com::sun::star::i18n::ScriptType::LATIN );
+ static const WhichAndScript WAS_ASIAN( ATTR_CJK_FONT, ::com::sun::star::i18n::ScriptType::ASIAN );
+ static const WhichAndScript WAS_CMPLX( ATTR_CTL_FONT, ::com::sun::star::i18n::ScriptType::COMPLEX );
+
+ /* #114008# do not let a font from a parent style override an explicit
+ cell font. */
+
+ sal_Int16 nDefScript = rRoot.GetDefApiScript();
+ sal_Int16 nScript = 0;
+ const SfxItemSet* pCurrSet = &rItemSet;
+
+ while( (nScript == 0) && pCurrSet )
+ {
+ switch( nDefScript )
+ {
+ case ApiScriptType::LATIN:
+ nScript = lclCheckFontItems( *pCurrSet, WAS_LATIN, WAS_CMPLX, WAS_ASIAN );
+ break;
+ case ApiScriptType::ASIAN:
+ nScript = lclCheckFontItems( *pCurrSet, WAS_ASIAN, WAS_CMPLX, WAS_LATIN );
+ break;
+ case ApiScriptType::COMPLEX:
+ nScript = lclCheckFontItems( *pCurrSet, WAS_CMPLX, WAS_ASIAN, WAS_LATIN );
+ break;
+ default:
+ DBG_ERRORFILE( "XclExpFontHelper::GetFirstUsedScript - unknown script type" );
+ nScript = ApiScriptType::LATIN;
+ };
+ pCurrSet = pCurrSet->GetParent();
+ }
+
+ return nScript;
+}
+
+/*static*/ Font XclExpFontHelper::GetFontFromItemSet( const XclExpRoot& rRoot, const SfxItemSet& rItemSet, sal_Int16 nScript )
+{
+ namespace ApiScriptType = ::com::sun::star::i18n::ScriptType;
+
+ // if WEAK is passed, guess script type from existing items in the item set
+ if( nScript == ApiScriptType::WEAK )
+ nScript = GetFirstUsedScript( rRoot, rItemSet );
+
+ // convert to core script type constants
+ BYTE nScScript = SCRIPTTYPE_LATIN;
+ switch( nScript )
+ {
+ case ApiScriptType::LATIN: nScScript = SCRIPTTYPE_LATIN; break;
+ case ApiScriptType::ASIAN: nScScript = SCRIPTTYPE_ASIAN; break;
+ case ApiScriptType::COMPLEX: nScScript = SCRIPTTYPE_COMPLEX; break;
+ default: DBG_ERRORFILE( "XclExpFontHelper::GetFontFromItemSet - unknown script type" );
+ }
+
+ // fill the font object
+ Font aFont;
+ ScPatternAttr::GetFont( aFont, rItemSet, SC_AUTOCOL_RAW, 0, 0, 0, nScScript );
+ return aFont;
+}
+
+/*static*/ bool XclExpFontHelper::CheckItems( const XclExpRoot& rRoot, const SfxItemSet& rItemSet, sal_Int16 nScript, bool bDeep )
+{
+ static const USHORT pnCommonIds[] = {
+ ATTR_FONT_UNDERLINE, ATTR_FONT_CROSSEDOUT, ATTR_FONT_CONTOUR,
+ ATTR_FONT_SHADOWED, ATTR_FONT_COLOR, ATTR_FONT_LANGUAGE, 0 };
+ static const USHORT pnLatinIds[] = {
+ ATTR_FONT, ATTR_FONT_HEIGHT, ATTR_FONT_WEIGHT, ATTR_FONT_POSTURE, 0 };
+ static const USHORT pnAsianIds[] = {
+ ATTR_CJK_FONT, ATTR_CJK_FONT_HEIGHT, ATTR_CJK_FONT_WEIGHT, ATTR_CJK_FONT_POSTURE, 0 };
+ static const USHORT pnComplexIds[] = {
+ ATTR_CTL_FONT, ATTR_CTL_FONT_HEIGHT, ATTR_CTL_FONT_WEIGHT, ATTR_CTL_FONT_POSTURE, 0 };
+
+ bool bUsed = ScfTools::CheckItems( rItemSet, pnCommonIds, bDeep );
+ if( !bUsed )
+ {
+ namespace ApiScriptType = ::com::sun::star::i18n::ScriptType;
+ // if WEAK is passed, guess script type from existing items in the item set
+ if( nScript == ApiScriptType::WEAK )
+ nScript = GetFirstUsedScript( rRoot, rItemSet );
+ // check the correct items
+ switch( nScript )
+ {
+ case ApiScriptType::LATIN: bUsed = ScfTools::CheckItems( rItemSet, pnLatinIds, bDeep ); break;
+ case ApiScriptType::ASIAN: bUsed = ScfTools::CheckItems( rItemSet, pnAsianIds, bDeep ); break;
+ case ApiScriptType::COMPLEX: bUsed = ScfTools::CheckItems( rItemSet, pnComplexIds, bDeep ); break;
+ default: DBG_ERRORFILE( "XclExpFontHelper::CheckItems - unknown script type" );
+ }
+ }
+ return bUsed;
+}
+
+// ----------------------------------------------------------------------------
+
+namespace {
+
sal_uInt32 lclCalcHash( const XclFontData& rFontData )
{
sal_uInt32 nHash = rFontData.maName.Len();
@@ -994,7 +1108,8 @@ sal_uInt16 XclExpFontBuffer::Insert( const SfxItemSet& rItemSet,
sal_Int16 nScript, XclExpColorType eColorType, bool bAppFont )
{
// #i17050# #114008# #115495# script type now provided by caller
- return Insert( GetFontFromItemSet( rItemSet, nScript ), eColorType, bAppFont );
+ Font aFont = XclExpFontHelper::GetFontFromItemSet( GetRoot(), rItemSet, nScript );
+ return Insert( aFont, eColorType, bAppFont );
}
sal_uInt16 XclExpFontBuffer::Insert( const ScPatternAttr& rPattern,
@@ -1023,90 +1138,6 @@ void XclExpFontBuffer::SaveXml( XclExpXmlStream& rStrm )
rStyleSheet->endElement( XML_fonts );
}
-sal_Int16 XclExpFontBuffer::GetFirstUsedScript( const SfxItemSet& rItemSet )
-{
- /* #i17050# We need to determine if a CJK or CTL font item is set in the
- item set. It is possible that both may be present. In this case,
- we will choose CJK. Either option is equally correct. */
-
- namespace ApiScriptType = ::com::sun::star::i18n::ScriptType;
- sal_Int16 nScript = ApiScriptType::LATIN;
-
- // #114008# do not let a font from a parent style override an explicit cell font
- const SfxItemSet* pCurrSet = &rItemSet;
- bool bFound = false;
- while( !bFound && pCurrSet )
- {
- bFound = true;
- if( ScfTools::CheckItem( *pCurrSet, ATTR_CJK_FONT, false ) )
- nScript = ApiScriptType::ASIAN;
- else if( ScfTools::CheckItem( *pCurrSet, ATTR_CTL_FONT, false ) )
- nScript = ApiScriptType::COMPLEX;
- else if( ScfTools::CheckItem( *pCurrSet, ATTR_FONT, false ) )
- nScript = ApiScriptType::LATIN;
- else
- bFound = false;
- pCurrSet = pCurrSet->GetParent();
- }
-
- return nScript;
-}
-
-Font XclExpFontBuffer::GetFontFromItemSet( const SfxItemSet& rItemSet, sal_Int16 nScript )
-{
- namespace ApiScriptType = ::com::sun::star::i18n::ScriptType;
-
- // if WEAK is passed, guess script type from existing items in the item set
- if( nScript == ApiScriptType::WEAK )
- nScript = GetFirstUsedScript( rItemSet );
-
- // convert to core script type constants
- BYTE nScScript = SCRIPTTYPE_LATIN;
- switch( nScript )
- {
- case ApiScriptType::LATIN: nScScript = SCRIPTTYPE_LATIN; break;
- case ApiScriptType::ASIAN: nScScript = SCRIPTTYPE_ASIAN; break;
- case ApiScriptType::COMPLEX: nScScript = SCRIPTTYPE_COMPLEX; break;
- default: DBG_ERRORFILE( "XclExpFontBuffer::GetFontFromItemSet - unknown script type" );
- }
-
- // fill the font object
- Font aFont;
- ScPatternAttr::GetFont( aFont, rItemSet, SC_AUTOCOL_RAW, 0, 0, 0, nScScript );
- return aFont;
-}
-
-bool XclExpFontBuffer::CheckItems( const SfxItemSet& rItemSet, sal_Int16 nScript, bool bDeep )
-{
- static const USHORT pnCommonIds[] = {
- ATTR_FONT_UNDERLINE, ATTR_FONT_CROSSEDOUT, ATTR_FONT_CONTOUR,
- ATTR_FONT_SHADOWED, ATTR_FONT_COLOR, ATTR_FONT_LANGUAGE, 0 };
- static const USHORT pnLatinIds[] = {
- ATTR_FONT, ATTR_FONT_HEIGHT, ATTR_FONT_WEIGHT, ATTR_FONT_POSTURE, 0 };
- static const USHORT pnAsianIds[] = {
- ATTR_CJK_FONT, ATTR_CJK_FONT_HEIGHT, ATTR_CJK_FONT_WEIGHT, ATTR_CJK_FONT_POSTURE, 0 };
- static const USHORT pnComplexIds[] = {
- ATTR_CTL_FONT, ATTR_CTL_FONT_HEIGHT, ATTR_CTL_FONT_WEIGHT, ATTR_CTL_FONT_POSTURE, 0 };
-
- bool bUsed = ScfTools::CheckItems( rItemSet, pnCommonIds, bDeep );
- if( !bUsed )
- {
- namespace ApiScriptType = ::com::sun::star::i18n::ScriptType;
- // if WEAK is passed, guess script type from existing items in the item set
- if( nScript == ApiScriptType::WEAK )
- nScript = GetFirstUsedScript( rItemSet );
- // check the correct items
- switch( nScript )
- {
- case ApiScriptType::LATIN: bUsed = ScfTools::CheckItems( rItemSet, pnLatinIds, bDeep ); break;
- case ApiScriptType::ASIAN: bUsed = ScfTools::CheckItems( rItemSet, pnAsianIds, bDeep ); break;
- case ApiScriptType::COMPLEX: bUsed = ScfTools::CheckItems( rItemSet, pnComplexIds, bDeep ); break;
- default: DBG_ERRORFILE( "XclExpFontBuffer::CheckItems - unknown script type" );
- }
- }
- return bUsed;
-}
-
// private --------------------------------------------------------------------
void XclExpFontBuffer::InitDefaultFonts()
@@ -1886,7 +1917,8 @@ XclExpXF::XclExpXF( const XclExpRoot& rRoot, const SfxStyleSheetBase& rStyleShee
mnParentXFId( XclExpXFBuffer::GetXFIdFromIndex( EXC_XF_STYLEPARENT ) )
{
bool bDefStyle = (rStyleSheet.GetName() == ScGlobal::GetRscString( STR_STYLENAME_STANDARD ));
- Init( const_cast< SfxStyleSheetBase& >( rStyleSheet ).GetItemSet(), ::com::sun::star::i18n::ScriptType::WEAK,
+ sal_Int16 nScript = bDefStyle ? GetDefApiScript() : ::com::sun::star::i18n::ScriptType::WEAK;
+ Init( const_cast< SfxStyleSheetBase& >( rStyleSheet ).GetItemSet(), nScript,
NUMBERFORMAT_ENTRY_NOT_FOUND, EXC_FONT_NOTFOUND, false, bDefStyle );
}
@@ -1948,7 +1980,7 @@ void XclExpXF::Init( const SfxItemSet& rItemSet, sal_Int16 nScript,
if( nForceXclFont == EXC_FONT_NOTFOUND )
{
mnXclFont = GetFontBuffer().Insert( rItemSet, nScript, EXC_COLOR_CELLTEXT, bDefStyle );
- mbFontUsed = XclExpFontBuffer::CheckItems( rItemSet, nScript, IsStyleXF() );
+ mbFontUsed = XclExpFontHelper::CheckItems( GetRoot(), rItemSet, nScript, IsStyleXF() );
}
else
{
diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx
index ef30e9a78f6d..1583828706cc 100644
--- a/sc/source/filter/excel/xetable.cxx
+++ b/sc/source/filter/excel/xetable.cxx
@@ -35,7 +35,7 @@
#include <map>
#include <com/sun/star/i18n/ScriptType.hpp>
#include "scitems.hxx"
-#include <svtools/intitem.hxx>
+#include <svl/intitem.hxx>
#include "document.hxx"
#include "dociter.hxx"
#include "olinetab.hxx"
diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx
index bc81ff6ae235..9bdeaf8ee432 100644
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -2159,7 +2159,9 @@ void XclImpChChart3d::ReadChChart3d( XclImpStream& rStrm )
void XclImpChChart3d::Convert( ScfPropertySet& rPropSet, bool b3dWallChart ) const
{
namespace cssd = ::com::sun::star::drawing;
- DBG_ASSERT( ::get_flag( maData.mnFlags, EXC_CHCHART3D_HASWALLS ) == b3dWallChart, "XclImpChChart3d::Convert - wrong wall flag" );
+
+// #i104057# do not assert this, written by broken external generators
+// DBG_ASSERT( ::get_flag( maData.mnFlags, EXC_CHCHART3D_HASWALLS ) == b3dWallChart, "XclImpChChart3d::Convert - wrong wall flag" );
sal_Int32 nRotationY = 0;
sal_Int32 nRotationX = 0;
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx
index 7b5fb222a12b..444cf4c848d1 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -37,11 +37,11 @@
#include <svx/editeng.hxx>
#include <svx/editobj.hxx>
#include <svx/linkmgr.hxx>
-#include <svtools/itemset.hxx>
+#include <svl/itemset.hxx>
#include "scitems.hxx"
#include <svx/eeitem.hxx>
-#include <svtools/intitem.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/intitem.hxx>
+#include <svl/stritem.hxx>
#include <svx/flditem.hxx>
#include <svx/fhgtitem.hxx>
#include <svx/wghtitem.hxx>
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index 599b33f9c8aa..419cbb3d6168 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -56,8 +56,8 @@
#include <rtl/logfile.hxx>
#include <sfx2/objsh.hxx>
-#include <svtools/moduleoptions.hxx>
-#include <svtools/fltrcfg.hxx>
+#include <unotools/moduleoptions.hxx>
+#include <unotools/fltrcfg.hxx>
#include <svtools/wmf.hxx>
#include <comphelper/types.hxx>
#include <comphelper/classids.hxx>
diff --git a/sc/source/filter/excel/xihelper.cxx b/sc/source/filter/excel/xihelper.cxx
index 47b42ad51e93..99dd5632443b 100644
--- a/sc/source/filter/excel/xihelper.cxx
+++ b/sc/source/filter/excel/xihelper.cxx
@@ -31,7 +31,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
#include "xihelper.hxx"
-#include <svtools/itemset.hxx>
+#include <svl/itemset.hxx>
#include <svx/editobj.hxx>
#include <tools/urlobj.hxx>
#include "scitems.hxx"
diff --git a/sc/source/filter/excel/xilink.cxx b/sc/source/filter/excel/xilink.cxx
index 9033ecc125bd..00268215a5dc 100644
--- a/sc/source/filter/excel/xilink.cxx
+++ b/sc/source/filter/excel/xilink.cxx
@@ -153,6 +153,7 @@ struct XclImpXti
sal_uInt16 mnSupbook; /// Index to SUPBOOK record.
sal_uInt16 mnSBTabFirst; /// Index to the first sheet of the range in the SUPBOOK.
sal_uInt16 mnSBTabLast; /// Index to the last sheet of the range in the SUPBOOK.
+ inline explicit XclImpXti() : mnSupbook( SAL_MAX_UINT16 ), mnSBTabFirst( SAL_MAX_UINT16 ), mnSBTabLast( SAL_MAX_UINT16 ) {}
};
inline XclImpStream& operator>>( XclImpStream& rStrm, XclImpXti& rXti )
@@ -204,8 +205,10 @@ public:
const String& GetMacroName( sal_uInt16 nExtSheet, sal_uInt16 nExtName ) const;
private:
+ /** Returns the specified XTI (link entry from BIFF8 EXTERNSHEET record). */
+ const XclImpXti* GetXti( sal_uInt16 nXtiIndex ) const;
/** Returns the specified SUPBOOK (external document). */
- const XclImpSupbook* GetSupbook( sal_uInt32 nXtiIndex ) const;
+ const XclImpSupbook* GetSupbook( sal_uInt16 nXtiIndex ) const;
//UNUSED2009-05 /** Returns the SUPBOOK (external workbook) specified by its URL. */
//UNUSED2009-05 const XclImpSupbook* GetSupbook( const String& rUrl ) const;
@@ -222,10 +225,10 @@ private:
//UNUSED2009-05 sal_uInt16 nSupbook, sal_uInt16 nSBTabStart ) const;
private:
- typedef ScfDelList< XclImpXti > XclImpXtiList;
+ typedef ::std::vector< XclImpXti > XclImpXtiVector;
typedef ScfDelList< XclImpSupbook > XclImpSupbookList;
- XclImpXtiList maXtiList; /// List of all XTI structures.
+ XclImpXtiVector maXtiList; /// List of all XTI structures.
XclImpSupbookList maSupbookList; /// List of external documents.
bool mbCreated; /// true = Calc sheets already created.
};
@@ -582,15 +585,17 @@ void XclImpLinkManagerImpl::ReadExternsheet( XclImpStream& rStrm )
{
sal_uInt16 nXtiCount;
rStrm >> nXtiCount;
-
- XclImpXti* pXti;
- while( nXtiCount )
- {
- pXti = new XclImpXti;
- rStrm >> *pXti;
- maXtiList.Append( pXti );
- --nXtiCount;
- }
+ DBG_ASSERT( static_cast< sal_Size >( nXtiCount * 6 ) == rStrm.GetRecLeft(), "XclImpLinkManagerImpl::ReadExternsheet - invalid count" );
+ nXtiCount = static_cast< sal_uInt16 >( ::std::min< sal_Size >( nXtiCount, rStrm.GetRecLeft() / 6 ) );
+
+ /* #i104057# A weird external XLS generator writes multiple EXTERNSHEET
+ records instead of only one as expected. Surprisingly, Excel seems to
+ insert the entries of the second record before the entries of the first
+ record. */
+ XclImpXtiVector aNewEntries( nXtiCount );
+ for( XclImpXtiVector::iterator aIt = aNewEntries.begin(), aEnd = aNewEntries.end(); rStrm.IsValid() && (aIt != aEnd); ++aIt )
+ rStrm >> *aIt;
+ maXtiList.insert( maXtiList.begin(), aNewEntries.begin(), aNewEntries.end() );
LoadCachedValues();
}
@@ -627,7 +632,7 @@ bool XclImpLinkManagerImpl::IsSelfRef( sal_uInt16 nXtiIndex ) const
bool XclImpLinkManagerImpl::GetScTabRange(
SCTAB& rnFirstScTab, SCTAB& rnLastScTab, sal_uInt16 nXtiIndex ) const
{
- if( const XclImpXti* pXti = maXtiList.GetObject( nXtiIndex ) )
+ if( const XclImpXti* pXti = GetXti( nXtiIndex ) )
{
if (maSupbookList.GetObject(pXti->mnSupbook))
{
@@ -671,9 +676,14 @@ const String& XclImpLinkManagerImpl::GetMacroName( sal_uInt16 nExtSheet, sal_uIn
return pSupbook ? pSupbook->GetMacroName( nExtName ) : EMPTY_STRING;
}
-const XclImpSupbook* XclImpLinkManagerImpl::GetSupbook( sal_uInt32 nXtiIndex ) const
+const XclImpXti* XclImpLinkManagerImpl::GetXti( sal_uInt16 nXtiIndex ) const
+{
+ return (nXtiIndex < maXtiList.size()) ? &maXtiList[ nXtiIndex ] : 0;
+}
+
+const XclImpSupbook* XclImpLinkManagerImpl::GetSupbook( sal_uInt16 nXtiIndex ) const
{
- const XclImpXti* pXti = maXtiList.GetObject( nXtiIndex );
+ const XclImpXti* pXti = GetXti( nXtiIndex );
return pXti ? maSupbookList.GetObject( pXti->mnSupbook ) : 0;
}
diff --git a/sc/source/filter/excel/xipage.cxx b/sc/source/filter/excel/xipage.cxx
index 2a5252193728..4d5b5c1ce56b 100644
--- a/sc/source/filter/excel/xipage.cxx
+++ b/sc/source/filter/excel/xipage.cxx
@@ -31,11 +31,11 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
#include "xipage.hxx"
-#include <svtools/itemset.hxx>
+#include <svl/itemset.hxx>
#include <vcl/graph.hxx>
#include "scitems.hxx"
-#include <svtools/eitem.hxx>
-#include <svtools/intitem.hxx>
+#include <svl/eitem.hxx>
+#include <svl/intitem.hxx>
#include <svx/pageitem.hxx>
#include <svx/sizeitem.hxx>
#include <svx/lrspitem.hxx>
diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx
index acd371f43f7d..56532f1281cc 100644
--- a/sc/source/filter/excel/xipivot.cxx
+++ b/sc/source/filter/excel/xipivot.cxx
@@ -39,8 +39,8 @@
#include <com/sun/star/sheet/DataPilotFieldReference.hpp>
#include <tools/datetime.hxx>
-#include <svtools/zformat.hxx>
-#include <svtools/intitem.hxx>
+#include <svl/zformat.hxx>
+#include <svl/intitem.hxx>
#include "document.hxx"
#include "cell.hxx"
diff --git a/sc/source/filter/excel/xistream.cxx b/sc/source/filter/excel/xistream.cxx
index b168c4389c4c..a040f21b1c4f 100644
--- a/sc/source/filter/excel/xistream.cxx
+++ b/sc/source/filter/excel/xistream.cxx
@@ -414,6 +414,12 @@ bool XclImpStream::StartNextRecord()
return mbValidRec;
}
+bool XclImpStream::StartNextRecord( sal_Size nNextRecPos )
+{
+ mnNextRecPos = nNextRecPos;
+ return StartNextRecord();
+}
+
void XclImpStream::ResetRecord( bool bContLookup, sal_uInt16 nAltContId )
{
if( mbValidRec )
diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx
index a83e203c167d..07368f6db680 100644
--- a/sc/source/filter/excel/xistyle.cxx
+++ b/sc/source/filter/excel/xistyle.cxx
@@ -968,9 +968,7 @@ XclImpXF::XclImpXF( const XclImpRoot& rRoot ) :
XclImpRoot( rRoot ),
mpStyleSheet( 0 ),
mnXclNumFmt( 0 ),
- mnXclFont( 0 ),
- mbWasBuiltIn( false ),
- mbForceCreate( false )
+ mnXclFont( 0 )
{
}
@@ -1088,31 +1086,61 @@ void XclImpXF::ReadXF( XclImpStream& rStrm )
}
}
-void XclImpXF::SetStyleName( const String& rStyleName, bool bBuiltIn, bool bForceCreate )
+const ScPatternAttr& XclImpXF::CreatePattern( bool bSkipPoolDefs )
{
- DBG_ASSERT( IsStyleXF(), "XclImpXF::SetStyleName - not a style XF" );
- DBG_ASSERT( rStyleName.Len() > 0, "XclImpXF::SetStyleName - style name empty" );
- if( IsStyleXF() && (rStyleName.Len() > 0) )
+ if( mpPattern.get() )
+ return *mpPattern;
+
+ // create new pattern attribute set
+ mpPattern.reset( new ScPatternAttr( GetDoc().GetPool() ) );
+ SfxItemSet& rItemSet = mpPattern->GetItemSet();
+
+ // parent cell style
+ if( IsCellXF() && !mpStyleSheet )
{
- maStyleName = rStyleName;
- mbWasBuiltIn = bBuiltIn;
- mbForceCreate = bForceCreate;
+ mpStyleSheet = GetXFBuffer().CreateStyleSheet( mnParent );
+ if( XclImpXF* pParentXF = GetXFBuffer().GetXF( mnParent ) )
+ UpdateUsedFlags( *pParentXF );
}
-}
-void XclImpXF::ChangeStyleName( const String& rStyleName )
-{
- DBG_ASSERT( IsStyleXF(), "XclImpXF::ChangeStyleName - not a style XF" );
- DBG_ASSERT( rStyleName.Len() > 0, "XclImpXF::ChangeStyleName - new style name empty" );
- DBG_ASSERT( maStyleName.Len() > 0, "XclImpXF::ChangeStyleName - old style name empty" );
- if( IsStyleXF() && (rStyleName.Len() > 0) )
- maStyleName = rStyleName;
-}
+ // cell protection
+ if( mbProtUsed )
+ maProtection.FillToItemSet( rItemSet, bSkipPoolDefs );
-void XclImpXF::CreateUserStyle()
-{
- if( IsStyleXF() && mbForceCreate )
- CreateStyleSheet();
+ // font
+ if( mbFontUsed )
+ GetFontBuffer().FillToItemSet( rItemSet, EXC_FONTITEM_CELL, mnXclFont, bSkipPoolDefs );
+
+ // value format
+ if( mbFmtUsed )
+ {
+ GetNumFmtBuffer().FillToItemSet( rItemSet, mnXclNumFmt, bSkipPoolDefs );
+ // Trace occurrences of Windows date formats
+ GetTracer().TraceDates( mnXclNumFmt );
+ }
+
+ // alignment
+ if( mbAlignUsed )
+ maAlignment.FillToItemSet( rItemSet, GetFontBuffer().GetFont( mnXclFont ), bSkipPoolDefs );
+
+ // border
+ if( mbBorderUsed )
+ {
+ maBorder.FillToItemSet( rItemSet, GetPalette(), bSkipPoolDefs );
+ GetTracer().TraceBorderLineStyle(maBorder.mnLeftLine > EXC_LINE_HAIR ||
+ maBorder.mnRightLine > EXC_LINE_HAIR || maBorder.mnTopLine > EXC_LINE_HAIR ||
+ maBorder.mnBottomLine > EXC_LINE_HAIR );
+ }
+
+ // area
+ if( mbAreaUsed )
+ {
+ maArea.FillToItemSet( rItemSet, GetPalette(), bSkipPoolDefs );
+ GetTracer().TraceFillPattern(maArea.mnPattern != EXC_PATT_NONE &&
+ maArea.mnPattern != EXC_PATT_SOLID);
+ }
+
+ return *mpPattern;
}
void XclImpXF::ApplyPattern(
@@ -1175,80 +1203,71 @@ void XclImpXF::UpdateUsedFlags( const XclImpXF& rParentXF )
mbAreaUsed = !rParentXF.mbAreaUsed || !(maArea == rParentXF.maArea);
}
-const ScPatternAttr& XclImpXF::CreatePattern( bool bSkipPoolDefs )
-{
- if( mpPattern.get() )
- return *mpPattern;
-
- // create new pattern attribute set
- mpPattern.reset( new ScPatternAttr( GetDoc().GetPool() ) );
- SfxItemSet& rItemSet = mpPattern->GetItemSet();
-
- // parent cell style
- if( IsCellXF() )
- {
- if( XclImpXF* pParentXF = GetXFBuffer().GetXF( mnParent ) )
- {
- mpStyleSheet = pParentXF->CreateStyleSheet();
- UpdateUsedFlags( *pParentXF );
- }
- }
-
- // cell protection
- if( mbProtUsed )
- maProtection.FillToItemSet( rItemSet, bSkipPoolDefs );
+// ----------------------------------------------------------------------------
- // font
- if( mbFontUsed )
- GetFontBuffer().FillToItemSet( rItemSet, EXC_FONTITEM_CELL, mnXclFont, bSkipPoolDefs );
+XclImpStyle::XclImpStyle( const XclImpRoot& rRoot ) :
+ XclImpRoot( rRoot ),
+ mnXfId( EXC_XF_NOTFOUND ),
+ mnBuiltinId( EXC_STYLE_USERDEF ),
+ mnLevel( EXC_STYLE_NOLEVEL ),
+ mbBuiltin( false ),
+ mbCustom( false ),
+ mbHidden( false ),
+ mpStyleSheet( 0 )
+{
+}
- // value format
- if( mbFmtUsed )
- {
- GetNumFmtBuffer().FillToItemSet( rItemSet, mnXclNumFmt, bSkipPoolDefs );
- // Trace occurrences of Windows date formats
- GetTracer().TraceDates( mnXclNumFmt );
- }
+void XclImpStyle::ReadStyle( XclImpStream& rStrm )
+{
+ DBG_ASSERT_BIFF( GetBiff() >= EXC_BIFF3 );
- // alignment
- if( mbAlignUsed )
- maAlignment.FillToItemSet( rItemSet, GetFontBuffer().GetFont( mnXclFont ), bSkipPoolDefs );
+ sal_uInt16 nXFIndex;
+ rStrm >> nXFIndex;
+ mnXfId = nXFIndex & EXC_STYLE_XFMASK;
+ mbBuiltin = ::get_flag( nXFIndex, EXC_STYLE_BUILTIN );
- // border
- if( mbBorderUsed )
+ if( mbBuiltin )
{
- maBorder.FillToItemSet( rItemSet, GetPalette(), bSkipPoolDefs );
- GetTracer().TraceBorderLineStyle(maBorder.mnLeftLine > EXC_LINE_HAIR ||
- maBorder.mnRightLine > EXC_LINE_HAIR || maBorder.mnTopLine > EXC_LINE_HAIR ||
- maBorder.mnBottomLine > EXC_LINE_HAIR );
+ rStrm >> mnBuiltinId >> mnLevel;
}
-
- // area
- if( mbAreaUsed )
+ else
{
- maArea.FillToItemSet( rItemSet, GetPalette(), bSkipPoolDefs );
- GetTracer().TraceFillPattern(maArea.mnPattern != EXC_PATT_NONE &&
- maArea.mnPattern != EXC_PATT_SOLID);
+ maName = (GetBiff() <= EXC_BIFF5) ? rStrm.ReadByteString( false ) : rStrm.ReadUniString();
+ // #i103281# check if this is a new built-in style introduced in XL2007
+ if( (GetBiff() == EXC_BIFF8) && (rStrm.GetNextRecId() == EXC_ID_STYLEEXT) && rStrm.StartNextRecord() )
+ {
+ sal_uInt8 nExtFlags;
+ rStrm.Ignore( 12 );
+ rStrm >> nExtFlags;
+ mbBuiltin = ::get_flag( nExtFlags, EXC_STYLEEXT_BUILTIN );
+ mbCustom = ::get_flag( nExtFlags, EXC_STYLEEXT_CUSTOM );
+ mbHidden = ::get_flag( nExtFlags, EXC_STYLEEXT_HIDDEN );
+ if( mbBuiltin )
+ {
+ rStrm.Ignore( 1 ); // category
+ rStrm >> mnBuiltinId >> mnLevel;
+ }
+ }
}
-
- return *mpPattern;
}
-ScStyleSheet* XclImpXF::CreateStyleSheet()
+ScStyleSheet* XclImpStyle::CreateStyleSheet()
{
- if( !mpStyleSheet && maStyleName.Len() ) // valid name implies style XF
+ // #i1624# #i1768# ignore unnamed user styles
+ if( !mpStyleSheet && (maFinalName.Len() > 0) )
{
bool bCreatePattern = false;
- // there may be a user-defined "Default" - test on built-in too!
- bool bDefStyle = mbWasBuiltIn && (maStyleName == ScGlobal::GetRscString( STR_STYLENAME_STANDARD ));
+ XclImpXF* pXF = GetXFBuffer().GetXF( mnXfId );
+
+ bool bDefStyle = mbBuiltin && (mnBuiltinId == EXC_STYLE_NORMAL);
if( bDefStyle )
{
- // set all flags to true to get all items in CreatePattern()
- SetAllUsedFlags( true );
+ // set all flags to true to get all items in XclImpXF::CreatePattern()
+ if( pXF ) pXF->SetAllUsedFlags( true );
// use existing "Default" style sheet
mpStyleSheet = static_cast< ScStyleSheet* >( GetStyleSheetPool().Find(
ScGlobal::GetRscString( STR_STYLENAME_STANDARD ), SFX_STYLE_FAMILY_PARA ) );
- DBG_ASSERT( mpStyleSheet, "XclImpXF::CreateStyleSheet - Default style not found" );
+ DBG_ASSERT( mpStyleSheet, "XclImpStyle::CreateStyleSheet - Default style not found" );
bCreatePattern = true;
}
else
@@ -1256,21 +1275,28 @@ ScStyleSheet* XclImpXF::CreateStyleSheet()
/* #i103281# do not create another style sheet of the same name,
if it exists already. This is needed to prevent that styles
pasted from clipboard get duplicated over and over. */
- mpStyleSheet = static_cast< ScStyleSheet* >( GetStyleSheetPool().Find( maStyleName, SFX_STYLE_FAMILY_PARA ) );
+ mpStyleSheet = static_cast< ScStyleSheet* >( GetStyleSheetPool().Find( maFinalName, SFX_STYLE_FAMILY_PARA ) );
if( !mpStyleSheet )
{
- mpStyleSheet = &static_cast< ScStyleSheet& >( GetStyleSheetPool().Make( maStyleName, SFX_STYLE_FAMILY_PARA, SFXSTYLEBIT_USERDEF ) );
+ mpStyleSheet = &static_cast< ScStyleSheet& >( GetStyleSheetPool().Make( maFinalName, SFX_STYLE_FAMILY_PARA, SFXSTYLEBIT_USERDEF ) );
bCreatePattern = true;
}
}
// bDefStyle==true omits default pool items in CreatePattern()
- if( bCreatePattern && mpStyleSheet )
- mpStyleSheet->GetItemSet().Put( CreatePattern( bDefStyle ).GetItemSet() );
+ if( bCreatePattern && mpStyleSheet && pXF )
+ mpStyleSheet->GetItemSet().Put( pXF->CreatePattern( bDefStyle ).GetItemSet() );
}
return mpStyleSheet;
}
+void XclImpStyle::CreateUserStyle( const String& rFinalName )
+{
+ maFinalName = rFinalName;
+ if( !IsBuiltin() || mbCustom )
+ CreateStyleSheet();
+}
+
// ----------------------------------------------------------------------------
XclImpXFBuffer::XclImpXFBuffer( const XclImpRoot& rRoot ) :
@@ -1281,16 +1307,9 @@ XclImpXFBuffer::XclImpXFBuffer( const XclImpRoot& rRoot ) :
void XclImpXFBuffer::Initialize()
{
maXFList.Clear();
- maStyleXFs.clear();
- /* Reserve style names that are built-in in Calc. For BIFF4 workbooks
- which contain a separate list of styles per sheet, reserve all existing
- names if current sheet is not the first sheet. This will create unique
- names for styles in different sheets with the same name. */
- bool bReserveAll = (GetBiff() == EXC_BIFF4) && (GetCurrScTab() > 0);
- SfxStyleSheetIterator aStyleIter( GetDoc().GetStyleSheetPool(), SFX_STYLE_FAMILY_PARA );
- for( SfxStyleSheetBase* pStyleSheet = aStyleIter.First(); pStyleSheet; pStyleSheet = aStyleIter.Next() )
- if( bReserveAll || !pStyleSheet->IsUserDefined() )
- maStyleXFs[ pStyleSheet->GetName() ] = 0;
+ maBuiltinStyles.Clear();
+ maUserStyles.Clear();
+ maStylesByXf.clear();
}
void XclImpXFBuffer::ReadXF( XclImpStream& rStrm )
@@ -1298,51 +1317,15 @@ void XclImpXFBuffer::ReadXF( XclImpStream& rStrm )
XclImpXF* pXF = new XclImpXF( GetRoot() );
pXF->ReadXF( rStrm );
maXFList.Append( pXF );
-
- // set the name of the "Default" cell style (always the first XF in an Excel file)
- if( (GetBiff() >= EXC_BIFF3) && (maXFList.Count() == 1) )
- CalcStyleName( *pXF, EXC_STYLE_NORMAL, 0 );
}
void XclImpXFBuffer::ReadStyle( XclImpStream& rStrm )
{
- DBG_ASSERT_BIFF( GetBiff() >= EXC_BIFF3 );
-
- sal_uInt16 nXFIndex;
- rStrm >> nXFIndex;
-
- XclImpXF* pXF = GetXF( nXFIndex & EXC_STYLE_XFMASK ); // bits 0...11 are used for XF index
- if( pXF && pXF->IsStyleXF() )
- {
- if( ::get_flag( nXFIndex, EXC_STYLE_BUILTIN ) ) // built-in styles
- {
- sal_uInt8 nStyleId, nLevel;
- rStrm >> nStyleId >> nLevel;
- CalcStyleName( *pXF, nStyleId, nLevel );
- }
- else // user-defined styles
- {
- String aStyleName;
- if( GetBiff() <= EXC_BIFF5 )
- aStyleName = rStrm.ReadByteString( false ); // 8 bit length
- else
- aStyleName = rStrm.ReadUniString();
-
- if( aStyleName.Len() > 0 ) // #i1624# #i1768# ignore unnamed styles
- {
- // #i103281# check if this is a new built-in style introduced in XL2007
- bool bBuiltIn = false;
- if( (GetBiff() == EXC_BIFF8) && (rStrm.GetNextRecId() == EXC_ID_STYLEEXT) && rStrm.StartNextRecord() )
- {
- sal_uInt8 nExtFlags;
- rStrm.Ignore( 12 );
- rStrm >> nExtFlags;
- bBuiltIn = ::get_flag( nExtFlags, EXC_STYLEEXT_BUILTIN );
- }
- CalcStyleName( *pXF, aStyleName, bBuiltIn );
- }
- }
- }
+ XclImpStyle* pStyle = new XclImpStyle( GetRoot() );
+ pStyle->ReadStyle( rStrm );
+ (pStyle->IsBuiltin() ? maBuiltinStyles : maUserStyles).Append( pStyle );
+ DBG_ASSERT( maStylesByXf.count( pStyle->GetXfId() ) == 0, "XclImpXFBuffer::ReadStyle - multiple styles with equal XF identifier" );
+ maStylesByXf[ pStyle->GetXfId() ] = pStyle;
}
sal_uInt16 XclImpXFBuffer::GetFontIndex( sal_uInt16 nXFIndex ) const
@@ -1356,64 +1339,104 @@ const XclImpFont* XclImpXFBuffer::GetFont( sal_uInt16 nXFIndex ) const
return GetFontBuffer().GetFont( GetFontIndex( nXFIndex ) );
}
-void XclImpXFBuffer::CreateUserStyles()
+namespace {
+
+/** Functor for case-insensitive string comparison, usable in maps etc. */
+struct IgnoreCaseCompare
{
- for( XclImpXF* pXF = maXFList.First(); pXF; pXF = maXFList.Next() )
- pXF->CreateUserStyle();
-}
+ inline bool operator()( const String& rName1, const String& rName2 ) const
+ { return rName1.CompareIgnoreCaseToAscii( rName2 ) == COMPARE_LESS; }
+};
-void XclImpXFBuffer::ApplyPattern(
- SCCOL nScCol1, SCROW nScRow1, SCCOL nScCol2, SCROW nScRow2,
- SCTAB nScTab, const XclImpXFIndex& rXFIndex )
+} // namespace
+
+void XclImpXFBuffer::CreateUserStyles()
{
- if( XclImpXF* pXF = GetXF( rXFIndex.GetXFIndex() ) )
+ // calculate final names of all styles
+ typedef ::std::map< String, XclImpStyle*, IgnoreCaseCompare > CellStyleNameMap;
+ typedef ::std::vector< XclImpStyle* > XclImpStyleVector;
+
+ CellStyleNameMap aCellStyles;
+ XclImpStyleVector aConflictNameStyles;
+
+ /* First, reserve style names that are built-in in Calc. This causes that
+ imported cell styles get different unused names and thus do not try to
+ overwrite these built-in styles. For BIFF4 workbooks (which contain a
+ separate list of cell styles per sheet), reserve all existing styles if
+ current sheet is not the first sheet (this styles buffer will be
+ initialized again for every new sheet). This will create unique names
+ for styles in different sheets with the same name. Assuming that the
+ BIFF4W import filter is never used to import from clipboard... */
+ bool bReserveAll = (GetBiff() == EXC_BIFF4) && (GetCurrScTab() > 0);
+ SfxStyleSheetIterator aStyleIter( GetDoc().GetStyleSheetPool(), SFX_STYLE_FAMILY_PARA );
+ String aStandardName = ScGlobal::GetRscString( STR_STYLENAME_STANDARD );
+ for( SfxStyleSheetBase* pStyleSheet = aStyleIter.First(); pStyleSheet; pStyleSheet = aStyleIter.Next() )
+ if( (pStyleSheet->GetName() != aStandardName) && (bReserveAll || !pStyleSheet->IsUserDefined()) )
+ if( aCellStyles.count( pStyleSheet->GetName() ) == 0 )
+ aCellStyles[ pStyleSheet->GetName() ] = 0;
+
+ /* Calculate names of built-in styles. Store styles with reserved names
+ in the aConflictNameStyles list. */
+ for( XclImpStyle* pStyle = maBuiltinStyles.First(); pStyle; pStyle = maBuiltinStyles.Next() )
{
- // #108770# set 'Standard' number format for all Boolean cells
- ULONG nForceScNumFmt = rXFIndex.IsBoolCell() ? GetNumFmtBuffer().GetStdScNumFmt() : NUMBERFORMAT_ENTRY_NOT_FOUND;
- pXF->ApplyPattern( nScCol1, nScRow1, nScCol2, nScRow2, nScTab, nForceScNumFmt );
+ String aStyleName = XclTools::GetBuiltInStyleName( pStyle->GetBuiltinId(), pStyle->GetName(), pStyle->GetLevel() );
+ DBG_ASSERT( bReserveAll || (aCellStyles.count( aStyleName ) == 0),
+ "XclImpXFBuffer::CreateUserStyles - multiple styles with equal built-in identifier" );
+ if( aCellStyles.count( aStyleName ) > 0 )
+ aConflictNameStyles.push_back( pStyle );
+ else
+ aCellStyles[ aStyleName ] = pStyle;
}
-}
-void XclImpXFBuffer::CalcStyleName( XclImpXF& rXF, const String& rStyleName, bool bBuiltIn )
-{
- DBG_ASSERT( rStyleName.Len() > 0, "XclImpXFBuffer::CalcStyleName - style name empty" );
- if( rStyleName.Len() > 0 )
+ /* Calculate names of user defined styles. Store styles with reserved
+ names in the aConflictNameStyles list. */
+ for( XclImpStyle* pStyle = maUserStyles.First(); pStyle; pStyle = maUserStyles.Next() )
{
- String aStyleName = bBuiltIn ? XclTools::GetBuiltInStyleName( rStyleName ) : rStyleName;
- SetStyleName( rXF, aStyleName, bBuiltIn, !bBuiltIn );
+ // #i1624# #i1768# ignore unnamed user styles
+ if( pStyle->GetName().Len() > 0 )
+ {
+ if( aCellStyles.count( pStyle->GetName() ) > 0 )
+ aConflictNameStyles.push_back( pStyle );
+ else
+ aCellStyles[ pStyle->GetName() ] = pStyle;
+ }
}
+
+ // find unused names for all styles with conflicting names
+ for( XclImpStyleVector::iterator aIt = aConflictNameStyles.begin(), aEnd = aConflictNameStyles.end(); aIt != aEnd; ++aIt )
+ {
+ XclImpStyle* pStyle = *aIt;
+ String aUnusedName;
+ sal_Int32 nIndex = 0;
+ do
+ {
+ aUnusedName.Assign( pStyle->GetName() ).Append( ' ' ).Append( String::CreateFromInt32( ++nIndex ) );
+ }
+ while( aCellStyles.count( aUnusedName ) > 0 );
+ aCellStyles[ aUnusedName ] = pStyle;
+ }
+
+ // set final names and create user-defined and modified built-in cell styles
+ for( CellStyleNameMap::iterator aIt = aCellStyles.begin(), aEnd = aCellStyles.end(); aIt != aEnd; ++aIt )
+ if( aIt->second )
+ aIt->second->CreateUserStyle( aIt->first );
}
-void XclImpXFBuffer::CalcStyleName( XclImpXF& rXF, sal_uInt8 nStyleId, sal_uInt8 nLevel )
+ScStyleSheet* XclImpXFBuffer::CreateStyleSheet( sal_uInt16 nXFIndex )
{
- // force creation of "Default" style
- SetStyleName( rXF, XclTools::GetBuiltInStyleName( nStyleId, nLevel ), true, nStyleId == EXC_STYLE_NORMAL );
+ XclImpStyleMap::iterator aIt = maStylesByXf.find( nXFIndex );
+ return (aIt == maStylesByXf.end()) ? 0 : aIt->second->CreateStyleSheet();
}
-void XclImpXFBuffer::SetStyleName( XclImpXF& rXF, const String& rStyleName, bool bBuiltIn, bool bForceCreate )
+void XclImpXFBuffer::ApplyPattern(
+ SCCOL nScCol1, SCROW nScRow1, SCCOL nScCol2, SCROW nScRow2,
+ SCTAB nScTab, const XclImpXFIndex& rXFIndex )
{
- DBG_ASSERT( rXF.IsStyleXF(), "XclImpXFBuffer::SetStyleName - not a style XF" );
- if( rXF.IsStyleXF() )
+ if( XclImpXF* pXF = GetXF( rXFIndex.GetXFIndex() ) )
{
- // find an unused name
- String aUnusedName( rStyleName );
- sal_Int32 nIndex = 0;
- while( maStyleXFs.count( aUnusedName ) > 0 )
- aUnusedName.Assign( rStyleName ).Append( ' ' ).Append( String::CreateFromInt32( ++nIndex ) );
-
- // move old style to new name, if new style is built-in
- if( bBuiltIn && (aUnusedName != rStyleName) )
- {
- XclImpXF*& rpXF = maStyleXFs[ aUnusedName ];
- rpXF = maStyleXFs[ rStyleName ];
- if( rpXF )
- rpXF->ChangeStyleName( aUnusedName );
- aUnusedName = rStyleName;
- }
-
- // insert new style
- maStyleXFs[ aUnusedName ] = &rXF;
- rXF.SetStyleName( aUnusedName, bBuiltIn, bForceCreate );
+ // #108770# set 'Standard' number format for all Boolean cells
+ ULONG nForceScNumFmt = rXFIndex.IsBoolCell() ? GetNumFmtBuffer().GetStdScNumFmt() : NUMBERFORMAT_ENTRY_NOT_FOUND;
+ pXF->ApplyPattern( nScCol1, nScRow1, nScCol2, nScRow2, nScTab, nForceScNumFmt );
}
}
diff --git a/sc/source/filter/excel/xlchart.cxx b/sc/source/filter/excel/xlchart.cxx
index d5664c088e29..5e7f1665c0e0 100644
--- a/sc/source/filter/excel/xlchart.cxx
+++ b/sc/source/filter/excel/xlchart.cxx
@@ -48,14 +48,14 @@
#include <com/sun/star/chart/DataLabelPlacement.hpp>
#include <rtl/math.hxx>
-#include <svtools/itemset.hxx>
+#include <svl/itemset.hxx>
#include <svx/xfillit0.hxx>
#include <svx/xflclit.hxx>
#include <svx/xfltrit.hxx>
#include <svx/xflgrit.hxx>
#include <svx/xbtmpit.hxx>
#include <svx/unomid.hxx>
-#include <svx/escherex.hxx>
+#include <filter/msfilter/escherex.hxx>
#include "global.hxx"
#include "xlconst.hxx"
diff --git a/sc/source/filter/excel/xlformula.cxx b/sc/source/filter/excel/xlformula.cxx
index 5e6c85b49077..b8c18eb3e7c0 100644
--- a/sc/source/filter/excel/xlformula.cxx
+++ b/sc/source/filter/excel/xlformula.cxx
@@ -30,18 +30,13 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
-
-// XXX xestream.hxx MUST be included before xlformula.hxx because of the
-// redifinition of the CREATE_OUSTRING() macro, which is in oox/helper.hxx
-// (indirectly included via xestream.hxx) and ../inc/ftools.hxx (indirectly
-// included via xlformula.hxx) that does an undef first. Ugly.
-#include "xestream.hxx"
#include "xlformula.hxx"
#include "compiler.hxx"
#include "rangenam.hxx"
#include "token.hxx"
#include "tokenarray.hxx"
+#include "xestream.hxx"
#include "xistream.hxx"
#include "xlroot.hxx"
diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx
index 29522f4f50ff..9706279307d1 100644
--- a/sc/source/filter/excel/xlroot.cxx
+++ b/sc/source/filter/excel/xlroot.cxx
@@ -33,8 +33,8 @@
#include "xlroot.hxx"
#include <com/sun/star/i18n/ScriptType.hpp>
#include <vcl/svapp.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/languageoptions.hxx>
+#include <svl/stritem.hxx>
+#include <svl/languageoptions.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/printer.hxx>
#include <sfx2/docfile.hxx>
@@ -54,7 +54,7 @@
#include "xlstyle.hxx"
#include "xlchart.hxx"
#include "xltracer.hxx"
-
+#include <unotools/useroptions.hxx>
#include "root.hxx"
namespace ApiScriptType = ::com::sun::star::i18n::ScriptType;
@@ -95,7 +95,10 @@ XclRootData::XclRootData( XclBiff eBiff, SfxMedium& rMedium,
mnScTab( 0 ),
mbExport( bExport )
{
- // default script type, e.g. for empty cells
+ maUserName = SvtUserOptions().GetLastName();
+ if( maUserName.Len() == 0 )
+ maUserName = CREATE_STRING( "Calc" );
+
switch( ScGlobal::GetDefaultScriptType() )
{
case SCRIPTTYPE_LATIN: mnDefApiScript = ApiScriptType::LATIN; break;
diff --git a/sc/source/filter/excel/xltools.cxx b/sc/source/filter/excel/xltools.cxx
index a84aaba82b90..4aa46c2ebed9 100644
--- a/sc/source/filter/excel/xltools.cxx
+++ b/sc/source/filter/excel/xltools.cxx
@@ -34,7 +34,7 @@
#include <algorithm>
#include <math.h>
#include <sal/mathconf.h>
-#include <vcl/fontcvt.hxx>
+#include <unotools/fontcvt.hxx>
#include <sfx2/objsh.hxx>
#include <svx/editstat.hxx>
#include "xestream.hxx"
@@ -426,16 +426,19 @@ rtl_TextEncoding XclTools::GetTextEncoding( sal_uInt16 nCodePage )
return pEntry->meTextEnc;
}
-//UNUSED2008-05 sal_uInt16 XclTools::GetXclCodePage( rtl_TextEncoding eTextEnc )
-//UNUSED2008-05 {
-//UNUSED2008-05 const XclCodePageEntry* pEntry = ::std::find_if( pCodePageTable, pCodePageTableEnd, XclCodePageEntry_TEPred( eTextEnc ) );
-//UNUSED2008-05 if( pEntry == pCodePageTableEnd )
-//UNUSED2008-05 {
-//UNUSED2008-05 DBG_ERROR1( "XclTools::GetXclCodePage - unsupported text encoding: %d", eTextEnc );
-//UNUSED2008-05 return 1252;
-//UNUSED2008-05 }
-//UNUSED2008-05 return pEntry->mnCodePage;
-//UNUSED2008-05 }
+sal_uInt16 XclTools::GetXclCodePage( rtl_TextEncoding eTextEnc )
+{
+ if( eTextEnc == RTL_TEXTENCODING_UNICODE )
+ return 1200; // for BIFF8
+
+ const XclCodePageEntry* pEntry = ::std::find_if( pCodePageTable, pCodePageTableEnd, XclCodePageEntry_TEPred( eTextEnc ) );
+ if( pEntry == pCodePageTableEnd )
+ {
+ DBG_ERROR1( "XclTools::GetXclCodePage - unsupported text encoding: %d", eTextEnc );
+ return 1252;
+ }
+ return pEntry->mnCodePage;
+}
// font names -----------------------------------------------------------------
@@ -528,17 +531,26 @@ static const sal_Char* const ppcStyleNames[] =
"Followed_Hyperlink"
};
-String XclTools::GetBuiltInStyleName( sal_uInt8 nStyleId, sal_uInt8 nLevel )
+String XclTools::GetBuiltInStyleName( sal_uInt8 nStyleId, const String& rName, sal_uInt8 nLevel )
{
String aStyleName;
if( nStyleId == EXC_STYLE_NORMAL ) // "Normal" becomes "Default" style
+ {
aStyleName = ScGlobal::GetRscString( STR_STYLENAME_STANDARD );
- else if( nStyleId < STATIC_TABLE_SIZE( ppcStyleNames ) )
- aStyleName.Assign( maStyleNamePrefix1 ).AppendAscii( ppcStyleNames[ nStyleId ] );
-
- if( (nStyleId == EXC_STYLE_ROWLEVEL) || (nStyleId == EXC_STYLE_COLLEVEL) )
- aStyleName.Append( String::CreateFromInt32( nLevel + 1 ) );
+ }
+ else
+ {
+ aStyleName = maStyleNamePrefix1;
+ if( nStyleId < STATIC_TABLE_SIZE( ppcStyleNames ) )
+ aStyleName.AppendAscii( ppcStyleNames[ nStyleId ] );
+ else if( rName.Len() > 0 )
+ aStyleName.Append( rName );
+ else
+ aStyleName.Append( String::CreateFromInt32( nStyleId ) );
+ if( (nStyleId == EXC_STYLE_ROWLEVEL) || (nStyleId == EXC_STYLE_COLLEVEL) )
+ aStyleName.Append( String::CreateFromInt32( nLevel + 1 ) );
+ }
return aStyleName;
}
diff --git a/sc/source/filter/excel/xltracer.cxx b/sc/source/filter/excel/xltracer.cxx
index 48044c8401f4..fa7c0a17c5c1 100644
--- a/sc/source/filter/excel/xltracer.cxx
+++ b/sc/source/filter/excel/xltracer.cxx
@@ -33,7 +33,7 @@
// ============================================================================
#include "xltracer.hxx"
-#include <svx/msfiltertracer.hxx>
+#include <filter/msfilter/msfiltertracer.hxx>
#include "address.hxx"
using ::rtl::OUString;
diff --git a/sc/source/filter/ftools/fapihelper.cxx b/sc/source/filter/ftools/fapihelper.cxx
index 31190b6407b1..299708d2e11c 100644
--- a/sc/source/filter/ftools/fapihelper.cxx
+++ b/sc/source/filter/ftools/fapihelper.cxx
@@ -42,8 +42,8 @@
#include <sfx2/objsh.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/sfxsids.hrc>
-#include <svtools/stritem.hxx>
-#include <svtools/itemset.hxx>
+#include <svl/stritem.hxx>
+#include <svl/itemset.hxx>
#include "miscuno.hxx"
using ::rtl::OUString;
diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx
index 2271a8f35d4d..917cba6c34ce 100644
--- a/sc/source/filter/ftools/ftools.cxx
+++ b/sc/source/filter/ftools/ftools.cxx
@@ -33,9 +33,9 @@
#include "ftools.hxx"
#include <tools/color.hxx>
#include <unotools/charclass.hxx>
-#include <svtools/itempool.hxx>
-#include <svtools/itemset.hxx>
-#include <svtools/poolitem.hxx>
+#include <svl/itempool.hxx>
+#include <svl/itemset.hxx>
+#include <svl/poolitem.hxx>
#include <sot/storage.hxx>
#include <math.h>
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index ac6a5ac5705f..8d6486fca38d 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -57,13 +57,13 @@
#include <sfx2/docfile.hxx>
#include <sfx2/frmhtmlw.hxx>
#include <sfx2/objsh.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/stritem.hxx>
+#include <svl/urihelper.hxx>
#ifndef _SVSTDARR_USHORTS
#define _SVSTDARR_USHORTS
#endif
-#include <svtools/svstdarr.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/svstdarr.hxx>
+#include <svl/zforlist.hxx>
#include <svtools/htmlkywd.hxx>
#include <svtools/htmlout.hxx>
#include <svtools/parhtml.hxx>
@@ -88,7 +88,7 @@
#include <svx/flditem.hxx>
#include <svx/borderline.hxx>
-#include <svtools/syslocale.hxx>
+#include <unotools/syslocale.hxx>
// ohne sc.hrc: error C2679: binary '=' : no operator defined which takes a
diff --git a/sc/source/filter/html/htmlexp2.cxx b/sc/source/filter/html/htmlexp2.cxx
index b9705e66936d..6793cb879751 100644
--- a/sc/source/filter/html/htmlexp2.cxx
+++ b/sc/source/filter/html/htmlexp2.cxx
@@ -46,7 +46,7 @@
#include <svtools/htmlout.hxx>
#include <svtools/transfer.hxx>
#include <svtools/embedtransfer.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#include <tools/urlobj.hxx>
#include "htmlexp.hxx"
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index 36bbfe1d2787..99b5150621ef 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -50,7 +50,7 @@
#include <svx/wghtitem.hxx>
#include <svx/boxitem.hxx>
#include <sfx2/objsh.hxx>
-#include <svtools/eitem.hxx>
+#include <svl/eitem.hxx>
#include <svtools/filter.hxx>
#include <svtools/parhtml.hxx>
#include <svtools/htmlkywd.hxx>
diff --git a/sc/source/filter/inc/eeparser.hxx b/sc/source/filter/inc/eeparser.hxx
index ce1848d25cd9..a5398fb8fa84 100644
--- a/sc/source/filter/inc/eeparser.hxx
+++ b/sc/source/filter/inc/eeparser.hxx
@@ -35,7 +35,7 @@
#include <tools/gen.hxx>
#include <vcl/graph.hxx>
#include <tools/table.hxx>
-#include <svtools/itemset.hxx>
+#include <svl/itemset.hxx>
#include <svx/editdata.hxx>
#include <address.hxx>
diff --git a/sc/source/filter/inc/excrecds.hxx b/sc/source/filter/inc/excrecds.hxx
index 568032aa317f..b1571637828a 100644
--- a/sc/source/filter/inc/excrecds.hxx
+++ b/sc/source/filter/inc/excrecds.hxx
@@ -32,7 +32,7 @@
#define SC_EXCRECDS_HXX
#include <tools/solar.h>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <tools/string.hxx>
#include <vcl/vclenum.hxx>
#include <tools/color.hxx>
@@ -210,18 +210,6 @@ public:
};
-//----------------------------------------------------- class ExcFngroupcount -
-
-class ExcFngroupcount : public ExcRecord
-{
-private:
- virtual void SaveCont( XclExpStream& rStrm );
-public:
- virtual UINT16 GetNum( void ) const;
- virtual sal_Size GetLen( void ) const;
-};
-
-
//--------------------------------------------------------- class ExcDummy_00 -
// INTERFACEHDR to FNGROUPCOUNT (see excrecds.cxx)
diff --git a/sc/source/filter/inc/filt_pch.hxx b/sc/source/filter/inc/filt_pch.hxx
index b0ef236519a3..606cc2c98482 100644
--- a/sc/source/filter/inc/filt_pch.hxx
+++ b/sc/source/filter/inc/filt_pch.hxx
@@ -67,7 +67,7 @@
#include <tools/debug.hxx>
#include <tools/time.hxx>
#include <tools/date.hxx>
-#include <svtools/svarray.hxx>
+#include <svl/svarray.hxx>
#include <vcl/sv.h>
#include <vcl/timer.hxx>
#include <tools/gen.hxx>
@@ -99,8 +99,8 @@
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/RuntimeException.hpp>
#include <com/sun/star/uno/Exception.hpp>
-#include <svtools/hint.hxx>
-#include <svtools/poolitem.hxx>
+#include <svl/hint.hxx>
+#include <svl/poolitem.hxx>
#include <document.hxx>
#include <vcl/prntypes.hxx>
#include <table.hxx>
@@ -108,9 +108,9 @@
#include <markarr.hxx>
#include <root.hxx>
#include <flttypes.hxx>
-#include <svtools/solar.hrc>
+#include <svl/solar.hrc>
#include <sfx2/sfxsids.hrc>
-#include <svtools/cntwids.hrc>
+#include <svl/cntwids.hrc>
#include <sfx2/cntids.hrc>
#include <tools/mempool.hxx>
#include <compiler.hxx>
@@ -118,8 +118,8 @@
#include <sfx2/sfx.hrc>
#include <scitems.hxx>
#include <svx/svxids.hrc>
-#include <svtools/itemset.hxx>
-#include <svtools/memberid.hrc>
+#include <svl/itemset.hxx>
+#include <svl/memberid.hrc>
#include <tools/table.hxx>
#include <flttools.hxx>
#include <vcl/vclenum.hxx>
@@ -131,14 +131,14 @@
#include <vcl/mapmod.hxx>
#include <vcl/mapunit.hxx>
#include <vcl/region.hxx>
-#include <svtools/lstner.hxx>
+#include <svl/lstner.hxx>
#include <patattr.hxx>
#include <vcl/font.hxx>
-#include <svtools/cenumitm.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/intitem.hxx>
-#include <svtools/cintitem.hxx>
-#include <svtools/brdcst.hxx>
+#include <svl/cenumitm.hxx>
+#include <svl/eitem.hxx>
+#include <svl/intitem.hxx>
+#include <svl/cintitem.hxx>
+#include <svl/brdcst.hxx>
#include <sot/sotref.hxx>
#include <tools/globname.hxx>
#include <sot/factory.hxx>
@@ -170,7 +170,7 @@
#include <uno/sequence2.h>
#include <com/sun/star/uno/Sequence.hxx>
#include <attrib.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <svx/fontitem.hxx>
#include <com/sun/star/lang/XEventListener.hpp>
#include <com/sun/star/lang/XEventListener.hdl>
@@ -243,11 +243,11 @@
#include <formel.hxx>
#include <com/sun/star/container/XElementAccess.hdl>
#include <com/sun/star/container/XElementAccess.hpp>
-#include <svtools/itempool.hxx>
+#include <svl/itempool.hxx>
#include <svx/eeitem.hxx>
#include <rangenam.hxx>
#include <vcl/syswin.hxx>
-#include <svtools/smplhint.hxx>
+#include <svl/smplhint.hxx>
#include <fontbuff.hxx>
#include <vcl/ctrl.hxx>
#include <vcl/field.hxx>
diff --git a/sc/source/filter/inc/ftools.hxx b/sc/source/filter/inc/ftools.hxx
index 393775e721f7..5fd338a73bb5 100644
--- a/sc/source/filter/inc/ftools.hxx
+++ b/sc/source/filter/inc/ftools.hxx
@@ -38,6 +38,7 @@
#include <tools/string.hxx>
#include <tools/list.hxx>
#include <tools/debug.hxx>
+#include <oox/helper/helper.hxx>
#include "filter.hxx"
#include "scdllapi.h"
@@ -50,9 +51,6 @@
/** Expands to a temporary String, created from an ASCII character array. */
#define CREATE_STRING( ascii ) String( RTL_CONSTASCII_USTRINGPARAM( ascii ) )
-/** Expands to a temporary ::rtl::OUString, created from an ASCII character array. */
-#undef CREATE_OUSTRING
-#define CREATE_OUSTRING( ascii ) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ascii ) )
// items and item sets --------------------------------------------------------
diff --git a/sc/source/filter/inc/imp_op.hxx b/sc/source/filter/inc/imp_op.hxx
index ab5513ead1ed..fa0e6b7f5074 100644
--- a/sc/source/filter/inc/imp_op.hxx
+++ b/sc/source/filter/inc/imp_op.hxx
@@ -99,6 +99,8 @@ protected:
XclImpStream maStrm; // input stream
XclImpStream& aIn; // input stream
+ ScfUInt32Vec maSheetOffsets;
+
NameBuffer* pExtNameBuff; // ... externe Namen (Ind.-Basis=1)
ExcelToSc* pFormConv; // Formel-Konverter
diff --git a/sc/source/filter/inc/root.hxx b/sc/source/filter/inc/root.hxx
index 3aa94ca542b1..ffff5dd9ff94 100644
--- a/sc/source/filter/inc/root.hxx
+++ b/sc/source/filter/inc/root.hxx
@@ -67,7 +67,6 @@ struct RootData // -> Inkarnation jeweils im ImportExcel-Objekt!
{
BiffTyp eDateiTyp; // feine Differenzierung
ExtSheetBuffer* pExtSheetBuff;
- NameBuffer* pTabNameBuff;
ShrfmlaBuffer* pShrfmlaBuff;
ExtNameBuff* pExtNameBuff;
ExcelToSc* pFmlaConverter;
diff --git a/sc/source/filter/inc/xcl97esc.hxx b/sc/source/filter/inc/xcl97esc.hxx
index 00281461f289..50583debc17f 100644
--- a/sc/source/filter/inc/xcl97esc.hxx
+++ b/sc/source/filter/inc/xcl97esc.hxx
@@ -31,7 +31,7 @@
#ifndef SC_XCL97ESC_HXX
#define SC_XCL97ESC_HXX
-#include <svx/escherex.hxx>
+#include <filter/msfilter/escherex.hxx>
#include <tools/table.hxx>
#include <tools/stack.hxx>
#include "xlescher.hxx"
diff --git a/sc/source/filter/inc/xcl97rec.hxx b/sc/source/filter/inc/xcl97rec.hxx
index 649a7bd02702..ef97a60a8a8e 100644
--- a/sc/source/filter/inc/xcl97rec.hxx
+++ b/sc/source/filter/inc/xcl97rec.hxx
@@ -412,7 +412,7 @@ private:
sal_Size nRecLen;
XclExpString sName;
XclExpString sComment;
- static XclExpString sUsername;
+ XclExpString sUserName;
UINT8 nProtected;
inline ExcEScenarioCell* _First() { return (ExcEScenarioCell*) List::First(); }
@@ -424,7 +424,7 @@ private:
protected:
public:
- ExcEScenario( ScDocument& rDoc, SCTAB nTab );
+ ExcEScenario( const XclExpRoot& rRoot, SCTAB nTab );
virtual ~ExcEScenario();
virtual UINT16 GetNum() const;
@@ -450,7 +450,7 @@ private:
protected:
public:
- ExcEScenarioManager( ScDocument& rDoc, SCTAB nTab );
+ ExcEScenarioManager( const XclExpRoot& rRoot, SCTAB nTab );
virtual ~ExcEScenarioManager();
virtual void Save( XclExpStream& rStrm );
@@ -558,53 +558,14 @@ private:
// ============================================================================
-class XclExpFnGroupCount : public XclExpRecord
-{
-public:
- explicit XclExpFnGroupCount();
- virtual ~XclExpFnGroupCount();
-
-private:
- virtual void WriteBody( XclExpStream& rStrm );
-};
-
-// ============================================================================
-
/** Beginning of User Interface Records */
-class XclExpInterfaceHdr : public XclExpRecord
+class XclExpInterfaceHdr : public XclExpUInt16Record
{
public:
- explicit XclExpInterfaceHdr();
- virtual ~XclExpInterfaceHdr();
+ explicit XclExpInterfaceHdr( sal_uInt16 nCodePage );
private:
- virtual void WriteBody( XclExpStream& rStrm );
-};
-
-// ============================================================================
-
-/** Beginning of User Interface Records */
-class XclExpInterfaceEnd : public XclExpRecord
-{
-public:
- explicit XclExpInterfaceEnd();
- virtual ~XclExpInterfaceEnd();
-
-private:
- virtual void WriteBody( XclExpStream& rStrm );
-};
-
-// ============================================================================
-
-/** ADDMENU/DELMENU Record Group Count */
-class XclExpMMS : public XclExpRecord
-{
-public:
- explicit XclExpMMS();
- virtual ~XclExpMMS();
-
-private:
- virtual void WriteBody( XclExpStream& rStrm );
+ virtual void WriteBody( XclExpStream& rStrm );
};
// ============================================================================
@@ -623,26 +584,19 @@ private:
// ============================================================================
-class XclExpCodePage : public XclExpRecord
+class XclExpFileSharing : public XclExpRecord
{
public:
- explicit XclExpCodePage();
- virtual ~XclExpCodePage();
-
-private:
- virtual void WriteBody( XclExpStream& rStrm );
-};
+ explicit XclExpFileSharing( const XclExpRoot& rRoot, sal_uInt16 nPasswordHash );
-// ============================================================================
+ virtual void Save( XclExpStream& rStrm );
-class XclExpDSF : public XclExpRecord
-{
-public:
- explicit XclExpDSF();
- virtual ~XclExpDSF();
+private:
+ virtual void WriteBody( XclExpStream& rStrm );
private:
- virtual void WriteBody( XclExpStream& rStrm );
+ XclExpString maUserName;
+ sal_uInt16 mnPasswordHash;
};
// ============================================================================
@@ -671,19 +625,6 @@ private:
// ============================================================================
-/** What's this record for? It is a zero-byte record. */
-class XclExpExcel9File : public XclExpRecord
-{
-public:
- explicit XclExpExcel9File();
- virtual ~XclExpExcel9File();
-
-private:
- virtual void WriteBody( XclExpStream& rStrm );
-};
-
-// ============================================================================
-
class XclExpRecalcId : public XclExpDummyRecord
{
public:
diff --git a/sc/source/filter/inc/xestream.hxx b/sc/source/filter/inc/xestream.hxx
index 857d756e2133..95d172baf9c2 100644
--- a/sc/source/filter/inc/xestream.hxx
+++ b/sc/source/filter/inc/xestream.hxx
@@ -43,7 +43,7 @@
#include "xlstream.hxx"
#include "xestring.hxx"
-#include <svx/mscodec.hxx>
+#include <filter/msfilter/mscodec.hxx>
#include <vector>
/* ============================================================================
@@ -245,7 +245,7 @@ private:
sal_uInt16 GetOffsetInBlock( sal_Size nStrmPos ) const;
private:
- ::svx::MSCodec_Std97 maCodec; /// Crypto algorithm implementation.
+ ::msfilter::MSCodec_Std97 maCodec; /// Crypto algorithm implementation.
sal_uInt16 mnPassw[16]; /// Cached password data for copy construction.
sal_uInt8 mnDocId[16]; /// Cached document ID for copy construction.
sal_uInt8 mnSaltDigest[16];
diff --git a/sc/source/filter/inc/xestyle.hxx b/sc/source/filter/inc/xestyle.hxx
index 05e73a316174..793f60fd4f06 100644
--- a/sc/source/filter/inc/xestyle.hxx
+++ b/sc/source/filter/inc/xestyle.hxx
@@ -34,8 +34,8 @@
#include <map>
#include <tools/mempool.hxx>
#include <tools/string.hxx>
-#include <svtools/zforlist.hxx>
-#include <svtools/nfkeytab.hxx>
+#include <svl/zforlist.hxx>
+#include <svl/nfkeytab.hxx>
#include <svx/svxfont.hxx>
#include "xerecord.hxx"
#include "xlstyle.hxx"
@@ -140,6 +140,36 @@ const size_t EXC_FONTLIST_NOTFOUND = static_cast< size_t >( -1 );
// ----------------------------------------------------------------------------
+/** Static helper functions for font export. */
+class XclExpFontHelper
+{
+public:
+ /** Returns the script type of the first font item found in the item set and its parents. */
+ static sal_Int16 GetFirstUsedScript(
+ const XclExpRoot& rRoot,
+ const SfxItemSet& rItemSet );
+
+ /** Returns a VCL font object filled from the passed item set. */
+ static Font GetFontFromItemSet(
+ const XclExpRoot& rRoot,
+ const SfxItemSet& rItemSet,
+ sal_Int16 nScript );
+
+ /** Returns true, if at least one font related item is set in the passed item set.
+ @param bDeep true = Searches in parent item sets too. */
+ static bool CheckItems(
+ const XclExpRoot& rRoot,
+ const SfxItemSet& rItemSet,
+ sal_Int16 nScript,
+ bool bDeep );
+
+private:
+ XclExpFontHelper();
+ ~XclExpFontHelper();
+};
+
+// ----------------------------------------------------------------------------
+
/** Stores all data of an Excel font and provides export of FONT records. */
class XclExpFont : public XclExpRecord, protected XclExpRoot
{
@@ -229,15 +259,6 @@ public:
virtual void Save( XclExpStream& rStrm );
virtual void SaveXml( XclExpXmlStream& rStrm );
- /** Returns the script type of the first font item found in the item set and its parents. */
- static sal_Int16 GetFirstUsedScript( const SfxItemSet& rItemSet );
-
- /** Returns a VCL font object filled from the passed item set. */
- static Font GetFontFromItemSet( const SfxItemSet& rItemSet, sal_Int16 nScript );
- /** Returns true, if at least one font related item is set in the passed item set.
- @param bDeep true = Searches in parent item sets too. */
- static bool CheckItems( const SfxItemSet& rItemSet, sal_Int16 nScript, bool bDeep );
-
private:
/** Initializes the default fonts for the current BIFF version. */
void InitDefaultFonts();
diff --git a/sc/source/filter/inc/xichart.hxx b/sc/source/filter/inc/xichart.hxx
index 1798242df3c6..e09530083965 100644
--- a/sc/source/filter/inc/xichart.hxx
+++ b/sc/source/filter/inc/xichart.hxx
@@ -36,7 +36,7 @@
#include <set>
#include <list>
-#include <svtools/itemset.hxx>
+#include <svl/itemset.hxx>
#include "rangelst.hxx"
#include "xlchart.hxx"
diff --git a/sc/source/filter/inc/xiescher.hxx b/sc/source/filter/inc/xiescher.hxx
index c9d2daa6bb2f..3eb5a7257630 100644
--- a/sc/source/filter/inc/xiescher.hxx
+++ b/sc/source/filter/inc/xiescher.hxx
@@ -33,8 +33,8 @@
#include <vector>
#include <map>
-#include <svx/msdffimp.hxx>
-#include <svx/msocximex.hxx>
+#include <filter/msfilter/msdffimp.hxx>
+#include <filter/msfilter/msocximex.hxx>
#include <vcl/graph.hxx>
#include "xlescher.hxx"
#include "xiroot.hxx"
diff --git a/sc/source/filter/inc/xistream.hxx b/sc/source/filter/inc/xistream.hxx
index 3ee461f163fe..8ff3c26e9abe 100644
--- a/sc/source/filter/inc/xistream.hxx
+++ b/sc/source/filter/inc/xistream.hxx
@@ -32,7 +32,7 @@
#define SC_XISTREAM_HXX
#include <comphelper/docpasswordhelper.hxx>
-#include <svx/mscodec.hxx>
+#include <filter/msfilter/mscodec.hxx>
#include "xlstream.hxx"
#include "xlconst.hxx"
@@ -121,7 +121,7 @@ private:
virtual sal_uInt16 OnRead( SvStream& rStrm, sal_uInt8* pnData, sal_uInt16 nBytes );
private:
- ::svx::MSCodec_XorXLS95 maCodec; /// Crypto algorithm implementation.
+ ::msfilter::MSCodec_XorXLS95 maCodec; /// Crypto algorithm implementation.
::std::vector< sal_uInt8 > maPassword;
sal_uInt16 mnKey;
sal_uInt16 mnHash;
@@ -155,7 +155,7 @@ private:
sal_uInt16 GetOffset( sal_Size nStrmPos ) const;
private:
- ::svx::MSCodec_Std97 maCodec; /// Crypto algorithm implementation.
+ ::msfilter::MSCodec_Std97 maCodec; /// Crypto algorithm implementation.
::std::vector< sal_uInt16 > maPassword;
::std::vector< sal_uInt8 > maSalt;
::std::vector< sal_uInt8 > maVerifier;
@@ -269,6 +269,10 @@ public:
CONTINUE usage is switched on.
@return false = no record found (end of stream). */
bool StartNextRecord();
+ /** Sets stream pointer to the start of the record content for the record
+ at the passed absolute stream position.
+ @return false = no record found (end of stream). */
+ bool StartNextRecord( sal_Size nNextRecPos );
/** Sets stream pointer to begin of record content.
@param bContLookup Automatic CONTINUE lookup on/off. In difference
to other stream settings, this setting is persistent until next call of
diff --git a/sc/source/filter/inc/xistyle.hxx b/sc/source/filter/inc/xistyle.hxx
index 2fe3a6ecbc15..a67458366057 100644
--- a/sc/source/filter/inc/xistyle.hxx
+++ b/sc/source/filter/inc/xistyle.hxx
@@ -397,19 +397,14 @@ public:
/** Reads an XF record. */
void ReadXF( XclImpStream& rStrm );
- /** Sets the style name of this XF, if it is a style XF. */
- void SetStyleName( const String& rStyleName, bool bBuiltIn, bool bForceCreate );
- /** Changes the style name of this XF, if it is a style XF. */
- void ChangeStyleName( const String& rStyleName );
- /** Returns the style name of this XF, if it is a style XF. */
- inline const String& GetStyleName() const { return maStyleName; }
-
inline sal_uInt8 GetHorAlign() const { return maAlignment.mnHorAlign; }
inline sal_uInt8 GetVerAlign() const { return maAlignment.mnVerAlign; }
inline sal_uInt16 GetFontIndex() const { return mnXclFont; }
- /** Creates the Calc style sheet, if this is a user-defined style. */
- void CreateUserStyle();
+ /** Creates a Calc item set containing an item set with all cell properties.
+ @param bSkipPoolDefs true = Do not put items equal to pool default; false = Put all items.
+ @return A read-only reference to the item set stored internally. */
+ const ScPatternAttr& CreatePattern( bool bSkipPoolDefs = false );
/** Inserts all formatting attributes to the specified area in the Calc document.
@param nForcedNumFmt If not set to NUMBERFORMAT_ENTRY_NOT_FOUND, it will overwrite
@@ -434,20 +429,10 @@ private:
/** Sets own "attribute used" flags, if attributes are different from passed parent XF. */
void UpdateUsedFlags( const XclImpXF& rParentXF );
- /** Creates a Calc item set containing an item set with all cell properties.
- @param bSkipPoolDefs true = Do not put items equal to pool default; false = Put all items.
- @return A read-only reference to the item set stored internally. */
- const ScPatternAttr& CreatePattern( bool bSkipPoolDefs = false );
- /** Creates a cell style sheet and inserts it into the Calc document.
- @descr Creates a style sheet only for style XFs with a valid style name.
- @return The pointer to the cell style sheet, or 0, if there is no style sheet. */
- ScStyleSheet* CreateStyleSheet();
-
private:
typedef ::std::auto_ptr< ScPatternAttr > ScPatternAttrPtr;
ScPatternAttrPtr mpPattern; /// Calc item set.
- String maStyleName; /// Name of the style sheet.
ScStyleSheet* mpStyleSheet; /// Calc cell style sheet.
XclImpCellProt maProtection; /// Cell protection flags.
@@ -456,9 +441,42 @@ private:
XclImpCellArea maArea; /// Background area style.
sal_uInt16 mnXclNumFmt; /// Index to number format.
sal_uInt16 mnXclFont; /// Index to font record.
+};
+
+// ----------------------------------------------------------------------------
- bool mbWasBuiltIn; /// true = XF was an Excel built-in style.
- bool mbForceCreate; /// true = Force creation of style sheet.
+/** Contains all data of a cell style associated with an XF record. */
+class XclImpStyle : protected XclImpRoot
+{
+public:
+ explicit XclImpStyle( const XclImpRoot& rRoot );
+
+ /** Reads a STYLE record. */
+ void ReadStyle( XclImpStream& rStrm );
+
+ inline const String& GetName() const { return maName; }
+ inline sal_uInt16 GetXfId() const { return mnXfId; }
+ inline bool IsBuiltin() const { return mbBuiltin && (mnBuiltinId != EXC_STYLE_USERDEF); }
+ inline sal_uInt8 GetBuiltinId() const { return mnBuiltinId; }
+ inline sal_uInt8 GetLevel() const { return mnLevel; }
+
+ /** Creates a cell style sheet and inserts it into the Calc document.
+ @return The pointer to the cell style sheet, or 0, if there is no style sheet. */
+ ScStyleSheet* CreateStyleSheet();
+ /** Creates the Calc style sheet, if this is a user-defined style. */
+ void CreateUserStyle( const String& rFinalName );
+
+private:
+ String maName; /// Cell style name.
+ sal_uInt16 mnXfId; /// Formatting for this cell style.
+ sal_uInt8 mnBuiltinId; /// Identifier for builtin styles.
+ sal_uInt8 mnLevel; /// Level for builtin column/row styles.
+ bool mbBuiltin; /// True = builtin style.
+ bool mbCustom; /// True = customized builtin style.
+ bool mbHidden; /// True = style not visible in GUI.
+
+ String maFinalName; /// Final name used in the Calc document.
+ ScStyleSheet* mpStyleSheet; /// Calc cell style sheet.
};
// ----------------------------------------------------------------------------
@@ -489,6 +507,9 @@ public:
/** Creates all user defined style sheets. */
void CreateUserStyles();
+ /** Creates a cell style sheet of the passed XF and inserts it into the Calc document.
+ @return The pointer to the cell style sheet, or 0, if there is no style sheet. */
+ ScStyleSheet* CreateStyleSheet( sal_uInt16 nXFIndex );
/** Inserts formatting attributes from an XF to the specified area in the Calc document.
@param nForcedNumFmt If not set to NUMBERFORMAT_ENTRY_NOT_FOUND, it will overwrite
@@ -499,15 +520,13 @@ public:
SCTAB nScTab, const XclImpXFIndex& rXFIndex );
private:
- void CalcStyleName( XclImpXF& rXF, const String& rStyleName, bool bBuiltIn );
- void CalcStyleName( XclImpXF& rXF, sal_uInt8 nStyleId, sal_uInt8 nLevel );
- void SetStyleName( XclImpXF& rXF, const String& rStyleName, bool bBuiltIn, bool bForceCreate );
-
-private:
- typedef ::std::map< String, XclImpXF* > XclImpStyleXFMap;
+ typedef ScfDelList< XclImpStyle > XclImpStyleList;
+ typedef ::std::map< sal_uInt16, XclImpStyle* > XclImpStyleMap;
ScfDelList< XclImpXF > maXFList; /// List of contents of all XF record.
- XclImpStyleXFMap maStyleXFs; /// Maps style names to style XF records.
+ XclImpStyleList maBuiltinStyles; /// List of built-in cell styles.
+ XclImpStyleList maUserStyles; /// List of user defined cell styles.
+ XclImpStyleMap maStylesByXf; /// Maps XF records to cell styles.
};
// Buffer for XF indexes in cells =============================================
diff --git a/sc/source/filter/inc/xlconst.hxx b/sc/source/filter/inc/xlconst.hxx
index eebaa76e4702..eeb3fb3982b9 100644
--- a/sc/source/filter/inc/xlconst.hxx
+++ b/sc/source/filter/inc/xlconst.hxx
@@ -205,6 +205,10 @@ const sal_uInt16 EXC_WSBOOL_FITTOPAGE = 0x0100;
const sal_uInt16 EXC_WSBOOL_DEFAULTFLAGS = 0x04C1;
+// (0x0086) WRITEPROT ---------------------------------------------------------
+
+const sal_uInt16 EXC_ID_WRITEPROT = 0x0086;
+
// (0x008C) COUNTRY -----------------------------------------------------------
const sal_uInt16 EXC_ID_COUNTRY = 0x008C;
@@ -213,6 +217,10 @@ const sal_uInt16 EXC_ID_COUNTRY = 0x008C;
const sal_uInt16 EXC_ID_FILTERMODE = 0x009B;
+// (0x009C) FNGROUPCOUNT ------------------------------------------------------
+
+const sal_uInt16 EXC_ID_FNGROUPCOUNT = 0x009C;
+
// (0x009D) AUTOFILTERINFO ----------------------------------------------------
const sal_uInt16 EXC_ID_AUTOFILTERINFO = 0x009D;
@@ -221,15 +229,34 @@ const sal_uInt16 EXC_ID_AUTOFILTERINFO = 0x009D;
const sal_uInt16 EXC_ID_AUTOFILTER = 0x009E;
+// (0x00BF, 0x00C0, 0x00C1) TOOLBARHDR, TOOLBAREND, MMS -----------------------
+
+const sal_uInt16 EXC_ID_TOOLBARHDR = 0x00BF;
+const sal_uInt16 EXC_ID_TOOLBAREND = 0x00C0;
+const sal_uInt16 EXC_ID_MMS = 0x00C1;
+
+// (0x00E1, 0x00E2) INTERFACEHDR, INTERFACEEND --------------------------------
+
+const sal_uInt16 EXC_ID_INTERFACEHDR = 0x00E1;
+const sal_uInt16 EXC_ID_INTERFACEEND = 0x00E2;
+
// (0x0160) USESELFS ----------------------------------------------------------
const sal_uInt16 EXC_ID_USESELFS = 0x0160;
+// (0x0161) DSF ---------------------------------------------------------------
+
+const sal_uInt16 EXC_ID_DSF = 0x0161;
+
// (0x01AA,0x01AB) USERSVIEWBEGIN, USERSVIEWEND -------------------------------
const sal_uInt16 EXC_ID_USERSVIEWBEGIN = 0x01AA;
const sal_uInt16 EXC_ID_USERSVIEWEND = 0x01AB;
+// (0x01C0) XL9FILE --------------------------------------------------------
+
+const sal_uInt16 EXC_ID_XL9FILE = 0x01C0;
+
// (0x8xx) Future records -----------------------------------------------------
/** Enumerates different header types of future records. */
diff --git a/sc/source/filter/inc/xlroot.hxx b/sc/source/filter/inc/xlroot.hxx
index 8571dafcbc74..8b0873b25475 100644
--- a/sc/source/filter/inc/xlroot.hxx
+++ b/sc/source/filter/inc/xlroot.hxx
@@ -94,6 +94,7 @@ struct XclRootData
ScDocument& mrDoc; /// The source or destination document.
String maDocUrl; /// Document URL of imported/exported file.
String maBasePath; /// Base path of imported/exported file (path of maDocUrl).
+ String maUserName; /// Current user name.
const String maDefPassword; /// The default password used for stream encryption.
rtl_TextEncoding meTextEnc; /// Text encoding to import/export byte strings.
LanguageType meSysLang; /// System language.
@@ -185,6 +186,8 @@ public:
inline const String& GetDocUrl() const { return mrData.maDocUrl; }
/** Returns the base path of the imported/exported file. */
inline const String& GetBasePath() const { return mrData.maBasePath; }
+ /** Returns the current user name. */
+ inline const String& GetUserName() const { return mrData.maUserName; }
/** Returns the default password used for stream encryption. */
inline const String& GetDefaultPassword() const { return mrData.maDefPassword; }
diff --git a/sc/source/filter/inc/xlstyle.hxx b/sc/source/filter/inc/xlstyle.hxx
index ebb22c2cb05f..f8cca7199f24 100644
--- a/sc/source/filter/inc/xlstyle.hxx
+++ b/sc/source/filter/inc/xlstyle.hxx
@@ -39,7 +39,7 @@
#include <vcl/vclenum.hxx>
#include <svx/svxenum.hxx>
#include <svx/frmdir.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include "fapihelper.hxx"
class XclRoot;
@@ -247,6 +247,8 @@ const sal_uInt8 EXC_STYLE_NOLEVEL = 0xFF; /// Default value fo
const sal_uInt16 EXC_ID_STYLEEXT = 0x0892;
const sal_uInt8 EXC_STYLEEXT_BUILTIN = 0x01;
+const sal_uInt8 EXC_STYLEEXT_HIDDEN = 0x02;
+const sal_uInt8 EXC_STYLEEXT_CUSTOM = 0x04;
// Structs and classes ========================================================
diff --git a/sc/source/filter/inc/xltools.hxx b/sc/source/filter/inc/xltools.hxx
index d818fa9e0a89..392b0a2ae1fc 100644
--- a/sc/source/filter/inc/xltools.hxx
+++ b/sc/source/filter/inc/xltools.hxx
@@ -167,8 +167,8 @@ public:
@return The corresponding text encoding or RTL_TEXTENCODING_DONTKNOW. */
static rtl_TextEncoding GetTextEncoding( sal_uInt16 nCodePage );
-//UNUSED2008-05 /** Returns an Excel code page from a text encoding. */
-//UNUSED2008-05 static sal_uInt16 GetXclCodePage( rtl_TextEncoding eTextEnc );
+ /** Returns an Excel code page from a text encoding. */
+ static sal_uInt16 GetXclCodePage( rtl_TextEncoding eTextEnc );
// font names -------------------------------------------------------------
@@ -194,9 +194,10 @@ public:
/** Returns the specified built-in cell style name.
@param nStyleId The identifier of the built-in style.
+ @param rName Default name for unknown styles.
@param nLevel The zero-based outline level for RowLevel and ColLevel styles.
@return The style name or an empty string, if the parameters are not valid. */
- static String GetBuiltInStyleName( sal_uInt8 nStyleId, sal_uInt8 nLevel );
+ static String GetBuiltInStyleName( sal_uInt8 nStyleId, const String& rName, sal_uInt8 nLevel );
/** Returns the passed style name with a special built-in prefix. */
static String GetBuiltInStyleName( const String& rStyleName );
/** Returns true, if the passed string is a name of an Excel built-in style.
diff --git a/sc/source/filter/lotus/tool.cxx b/sc/source/filter/lotus/tool.cxx
index b413384064c4..a0c9a25d58d9 100644
--- a/sc/source/filter/lotus/tool.cxx
+++ b/sc/source/filter/lotus/tool.cxx
@@ -37,7 +37,7 @@
#include "scitems.hxx"
#include <svx/algitem.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <tools/solar.h>
#include "cell.hxx"
diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx
index 9c28cf49d729..c3650e882973 100644
--- a/sc/source/filter/rtf/eeimpars.cxx
+++ b/sc/source/filter/rtf/eeimpars.cxx
@@ -50,10 +50,10 @@
#include <svx/htmlcfg.hxx>
#include <sfx2/sfxhtml.hxx>
#include <svtools/parhtml.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <vcl/virdev.hxx>
#include <vcl/svapp.hxx>
-#include <svtools/syslocale.hxx>
+#include <unotools/syslocale.hxx>
#include <unotools/charclass.hxx>
#include "eeimport.hxx"
diff --git a/sc/source/filter/rtf/rtfexp.cxx b/sc/source/filter/rtf/rtfexp.cxx
index aee41be1a441..88611ca72283 100644
--- a/sc/source/filter/rtf/rtfexp.cxx
+++ b/sc/source/filter/rtf/rtfexp.cxx
@@ -43,7 +43,7 @@
#include <svx/udlnitem.hxx>
#include <svx/fontitem.hxx>
#include <svx/fhgtitem.hxx>
-#include <svtools/style.hxx>
+#include <svl/style.hxx>
#include <svtools/rtfout.hxx>
#include <svtools/rtfkeywd.hxx>
diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx
index e2a7d9e4d538..b54e3bb97fab 100644
--- a/sc/source/filter/starcalc/scflt.cxx
+++ b/sc/source/filter/starcalc/scflt.cxx
@@ -55,8 +55,8 @@
#include <svx/udlnitem.hxx>
#include <svx/ulspitem.hxx>
#include <svx/wghtitem.hxx>
-#include <svtools/zforlist.hxx>
-#include <svtools/PasswordHelper.hxx>
+#include <svl/zforlist.hxx>
+#include <svl/PasswordHelper.hxx>
#include <stdio.h>
#include <math.h>
#include <string.h>
diff --git a/sc/source/filter/starcalc/scfobj.cxx b/sc/source/filter/starcalc/scfobj.cxx
index a36be98b3d11..d15cb3c5a227 100644
--- a/sc/source/filter/starcalc/scfobj.cxx
+++ b/sc/source/filter/starcalc/scfobj.cxx
@@ -41,7 +41,7 @@ using namespace com::sun::star;
// INCLUDE ---------------------------------------------------------------
-#include <svtools/moduleoptions.hxx>
+#include <unotools/moduleoptions.hxx>
#include <svx/svdoole2.hxx>
#include <svx/svdpage.hxx>
#include <sfx2/objsh.hxx>
diff --git a/sc/source/filter/xcl97/XclImpChangeTrack.cxx b/sc/source/filter/xcl97/XclImpChangeTrack.cxx
index 2f546e323179..1a8480a5e758 100644
--- a/sc/source/filter/xcl97/XclImpChangeTrack.cxx
+++ b/sc/source/filter/xcl97/XclImpChangeTrack.cxx
@@ -34,7 +34,7 @@
#include "XclImpChangeTrack.hxx"
#include <tools/debug.hxx>
#include <sot/storage.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include "chgviset.hxx"
#include "cell.hxx"
#include "chgtrack.hxx"
diff --git a/sc/source/filter/xcl97/xcl97esc.cxx b/sc/source/filter/xcl97/xcl97esc.cxx
index e618e5d91fd5..db8b085f7629 100644
--- a/sc/source/filter/xcl97/xcl97esc.cxx
+++ b/sc/source/filter/xcl97/xcl97esc.cxx
@@ -44,7 +44,7 @@
#include <svx/svdoole2.hxx>
#include <svx/unoapi.hxx>
#include <svx/fmglob.hxx>
-#include <svx/msocximex.hxx>
+#include <filter/msfilter/msocximex.hxx>
#include <vcl/outdev.hxx>
#include <unotools/tempfile.hxx>
#include <unotools/ucbstreamhelper.hxx>
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index ac71dbb01fbb..45c64cca1e4f 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -37,14 +37,14 @@
#include <svx/editobj.hxx>
#include <svx/svdoole2.hxx>
#include <sot/storage.hxx>
-#include <svtools/itemset.hxx>
+#include <svl/itemset.hxx>
#include <svx/svdpage.hxx>
#include <svx/svdocapt.hxx>
#include <svx/unoapi.hxx>
#include <svx/writingmodeitem.hxx>
#include <vcl/svapp.hxx>
#include <rtl/math.hxx>
-#include <svtools/zformat.hxx>
+#include <svl/zformat.hxx>
#include "cell.hxx"
#include "drwlayer.hxx"
@@ -57,15 +57,14 @@
#include "scitems.hxx"
-#include <svtools/fltrcfg.hxx>
+#include <unotools/fltrcfg.hxx>
#include <svx/brshitem.hxx>
#include <svx/boxitem.hxx>
#include <svx/frmdiritem.hxx>
#include <svx/adjitem.hxx>
#include <svx/eeitem.hxx>
-#include <svx/msoleexp.hxx>
+#include <filter/msfilter/msoleexp.hxx>
-#include <svtools/useroptions.hxx>
#include <unotools/localedatawrapper.hxx>
#include <stdio.h>
@@ -1033,15 +1032,14 @@ void ExcEScenarioCell::SaveXml( XclExpXmlStream& rStrm )
-XclExpString ExcEScenario::sUsername;
-
-ExcEScenario::ExcEScenario( ScDocument& rDoc, SCTAB nTab )
+ExcEScenario::ExcEScenario( const XclExpRoot& rRoot, SCTAB nTab )
{
String sTmpName;
String sTmpComm;
Color aDummyCol;
USHORT nFlags;
+ ScDocument& rDoc = rRoot.GetDoc();
rDoc.GetName( nTab, sTmpName );
sName.Assign( sTmpName, EXC_STR_8BITLENGTH );
nRecLen = 8 + sName.GetBufferSize();
@@ -1052,14 +1050,8 @@ ExcEScenario::ExcEScenario( ScDocument& rDoc, SCTAB nTab )
nRecLen += sComment.GetSize();
nProtected = (nFlags & SC_SCENARIO_PROTECT) ? 1 : 0;
- if( !sUsername.Len() )
- {
- SvtUserOptions aUserOpt;
- sUsername.Assign( aUserOpt.GetLastName(), EXC_STR_DEFAULT, 255 );
- }
- if( !sUsername.Len() )
- sUsername.Assign( String::CreateFromAscii( "SC" ) );
- nRecLen += sUsername.GetSize();
+ sUserName.Assign( rRoot.GetUserName(), EXC_STR_DEFAULT, 255 );
+ nRecLen += sUserName.GetSize();
const ScRangeList* pRList = rDoc.GetScenarioRanges( nTab );
if( !pRList )
@@ -1118,11 +1110,11 @@ void ExcEScenario::SaveCont( XclExpStream& rStrm )
<< (UINT8) 0 // fHidden
<< (UINT8) sName.Len() // length of scen name
<< (UINT8) sComment.Len() // length of comment
- << (UINT8) sUsername.Len(); // length of user name
+ << (UINT8) sUserName.Len(); // length of user name
sName.WriteFlagField( rStrm );
sName.WriteBuffer( rStrm );
- rStrm << sUsername;
+ rStrm << sUserName;
if( sComment.Len() )
rStrm << sComment;
@@ -1154,7 +1146,7 @@ void ExcEScenario::SaveXml( XclExpXmlStream& rStrm )
XML_locked, XclXmlUtils::ToPsz( nProtected ),
// OOXTODO: XML_hidden,
XML_count, OString::valueOf( (sal_Int32) List::Count() ).getStr(),
- XML_user, XESTRING_TO_PSZ( sUsername ),
+ XML_user, XESTRING_TO_PSZ( sUserName ),
XML_comment, XESTRING_TO_PSZ( sComment ),
FSEND );
@@ -1167,9 +1159,10 @@ void ExcEScenario::SaveXml( XclExpXmlStream& rStrm )
-ExcEScenarioManager::ExcEScenarioManager( ScDocument& rDoc, SCTAB nTab ) :
+ExcEScenarioManager::ExcEScenarioManager( const XclExpRoot& rRoot, SCTAB nTab ) :
nActive( 0 )
{
+ ScDocument& rDoc = rRoot.GetDoc();
if( rDoc.IsScenario( nTab ) )
return;
@@ -1178,7 +1171,7 @@ ExcEScenarioManager::ExcEScenarioManager( ScDocument& rDoc, SCTAB nTab ) :
while( rDoc.IsScenario( nNewTab ) )
{
- Append( new ExcEScenario( rDoc, nNewTab ) );
+ Append( new ExcEScenario( rRoot, nNewTab ) );
if( rDoc.IsActiveScenario( nNewTab ) )
nActive = static_cast<sal_uInt16>(nNewTab - nFirstTab);
@@ -1453,67 +1446,15 @@ void XclExpFilePass::WriteBody( XclExpStream& rStrm )
// ============================================================================
-XclExpFnGroupCount::XclExpFnGroupCount() :
- XclExpRecord(0x009C, 2)
-{
-}
-
-XclExpFnGroupCount::~XclExpFnGroupCount()
-{
-}
-
-void XclExpFnGroupCount::WriteBody( XclExpStream& rStrm )
-{
- rStrm << static_cast<sal_uInt16>(14);
-}
-
-// ============================================================================
-
-XclExpInterfaceHdr::XclExpInterfaceHdr() :
- XclExpRecord(0x00E1, 2)
-{
-}
-
-XclExpInterfaceHdr::~XclExpInterfaceHdr()
+XclExpInterfaceHdr::XclExpInterfaceHdr( sal_uInt16 nCodePage ) :
+ XclExpUInt16Record( EXC_ID_INTERFACEHDR, nCodePage )
{
}
void XclExpInterfaceHdr::WriteBody( XclExpStream& rStrm )
{
- // The value must be the same value as the CODEPAGE record.
rStrm.DisableEncryption();
- rStrm << static_cast<sal_uInt16>(0x04B0);
-}
-
-// ============================================================================
-
-XclExpInterfaceEnd::XclExpInterfaceEnd() :
- XclExpRecord(0x00E2, 0)
-{
-}
-
-XclExpInterfaceEnd::~XclExpInterfaceEnd()
-{
-}
-
-void XclExpInterfaceEnd::WriteBody( XclExpStream& /*rStrm*/ )
-{
-}
-
-// ============================================================================
-
-XclExpMMS::XclExpMMS() :
- XclExpRecord(0x00C1, 2)
-{
-}
-
-XclExpMMS::~XclExpMMS()
-{
-}
-
-void XclExpMMS::WriteBody( XclExpStream& rStrm )
-{
- rStrm << static_cast<sal_uInt16>(0x0000);
+ rStrm << GetValue();
}
// ============================================================================
@@ -1552,35 +1493,25 @@ void XclExpWriteAccess::WriteBody( XclExpStream& rStrm )
// ============================================================================
-XclExpCodePage::XclExpCodePage() :
- XclExpRecord(0x0042, 2)
-{
-}
-
-XclExpCodePage::~XclExpCodePage()
-{
-}
-
-void XclExpCodePage::WriteBody( XclExpStream& rStrm )
-{
- // 0x04B0 : UTF-16 (BIFF8)
- rStrm << static_cast<sal_uInt16>(0x04B0);
-}
-
-// ============================================================================
-
-XclExpDSF::XclExpDSF() :
- XclExpRecord(0x0161, 2)
+XclExpFileSharing::XclExpFileSharing( const XclExpRoot& rRoot, sal_uInt16 nPasswordHash ) :
+ XclExpRecord( EXC_ID_FILESHARING ),
+ mnPasswordHash( nPasswordHash )
{
+ if( rRoot.GetBiff() <= EXC_BIFF5 )
+ maUserName.AssignByte( rRoot.GetUserName(), rRoot.GetTextEncoding(), EXC_STR_8BITLENGTH );
+ else
+ maUserName.Assign( rRoot.GetUserName() );
}
-XclExpDSF::~XclExpDSF()
+void XclExpFileSharing::Save( XclExpStream& rStrm )
{
+ if( mnPasswordHash != 0 )
+ XclExpRecord::Save( rStrm );
}
-void XclExpDSF::WriteBody( XclExpStream& rStrm )
+void XclExpFileSharing::WriteBody( XclExpStream& rStrm )
{
- rStrm << static_cast<sal_uInt16>(0x0000);
+ rStrm << sal_uInt16( 0 ) << mnPasswordHash << maUserName;
}
// ============================================================================
@@ -1617,21 +1548,6 @@ void XclExpProt4RevPass::WriteBody( XclExpStream& rStrm )
// ============================================================================
-XclExpExcel9File::XclExpExcel9File() :
- XclExpRecord(0x01C0, 0)
-{
-}
-
-XclExpExcel9File::~XclExpExcel9File()
-{
-}
-
-void XclExpExcel9File::WriteBody( XclExpStream& /*rStrm*/ )
-{
-}
-
-// ============================================================================
-
static const sal_uInt8 nDataRecalcId[] = {
0xC1, 0x01, 0x00, 0x00, 0x54, 0x8D, 0x01, 0x00
};
diff --git a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
index ac09f19a6dbe..da3c6c29bc30 100644
--- a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
+++ b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
@@ -45,7 +45,7 @@
#include <com/sun/star/util/DateTime.hpp>
#include <tools/debug.hxx>
#include <tools/datetime.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#define SC_CHANGE_ID_PREFIX "ct"
diff --git a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
index 2b16d33f1376..33a77df4f4dd 100644
--- a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
+++ b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
@@ -38,7 +38,7 @@
#include "rangeutl.hxx"
#include <tools/debug.hxx>
#include <tools/datetime.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <xmloff/xmluconv.hxx>
#define SC_CHANGE_ID_PREFIX "ct"
diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
index b9d9b4936961..6a182dcdc737 100644
--- a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
+++ b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
@@ -458,7 +458,7 @@ void ScXMLExportDatabaseRanges::WriteSortDescriptor(const uno::Sequence <beans::
if (aSortFields[0].IsCaseSensitive)
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_CASE_SENSITIVE, XML_TRUE);
-#ifndef PRODUCT
+#ifdef DBG_UTIL
sal_Bool bCaseSensitive(aSortFields[0].IsCaseSensitive);
for (i = 1; i < nSortFields; ++i)
{
@@ -478,7 +478,7 @@ void ScXMLExportDatabaseRanges::WriteSortDescriptor(const uno::Sequence <beans::
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_COUNTRY, aSortFields[0].CollatorLocale.Country);
if (aSortFields[0].CollatorAlgorithm.getLength())
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_ALGORITHM, aSortFields[0].CollatorAlgorithm);
-#ifndef PRODUCT
+#ifdef DBG_UTIL
rtl::OUString sLanguage(aSortFields[0].CollatorLocale.Language);
rtl::OUString sCountry(aSortFields[0].CollatorLocale.Country);
rtl::OUString sAlgorithm(aSortFields[0].CollatorAlgorithm);
diff --git a/sc/source/filter/xml/XMLTrackedChangesContext.cxx b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
index 2d8eac1dfc76..74b0518a6c62 100644
--- a/sc/source/filter/xml/XMLTrackedChangesContext.cxx
+++ b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
@@ -42,7 +42,7 @@
#include <xmloff/xmlnmspe.hxx>
#include <xmloff/nmspmap.hxx>
#include <xmloff/xmluconv.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <com/sun/star/text/XTextCursor.hpp>
#include <com/sun/star/text/ControlCharacter.hpp>
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index 6a42d505cdc8..2f3f847c6c58 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -65,12 +65,12 @@
#include <xmloff/families.hxx>
#include <xmloff/numehelp.hxx>
#include <xmloff/xmlnmspe.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <svx/svdocapt.hxx>
#include <svx/outlobj.hxx>
#include <svx/editobj.hxx>
#include <svx/unoapi.hxx>
-#include <svtools/languageoptions.hxx>
+#include <svl/languageoptions.hxx>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/text/XText.hpp>
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index df7e99955bfd..94613379a32d 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -88,7 +88,7 @@
#include <tools/debug.hxx>
#include <rtl/math.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <svx/unoshape.hxx>
#include <comphelper/extract.hxx>
#include <svx/eeitem.hxx>
@@ -1139,7 +1139,7 @@ void ScXMLExport::WriteRowContent()
{
ScMyRowFormatRange aRange;
sal_Int32 nIndex(-1);
-#ifndef PRODUCT
+#ifdef DBG_UTIL
sal_Int32 nPrevCol(0);
#endif
sal_Int32 nCols(0);
@@ -1148,7 +1148,7 @@ void ScXMLExport::WriteRowContent()
sal_Bool bIsFirst(sal_True);
while (pRowFormatRanges->GetNext(aRange))
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
DBG_ASSERT(bIsFirst || (!bIsFirst && (nPrevCol + nCols == aRange.nStartColumn)), "here are some columns missing");
#endif
if (bIsFirst)
@@ -1158,7 +1158,7 @@ void ScXMLExport::WriteRowContent()
bIsAutoStyle = aRange.bIsAutoStyle;
nCols = aRange.nRepeatColumns;
bIsFirst = sal_False;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
nPrevCol = aRange.nStartColumn;
#endif
}
@@ -1185,7 +1185,7 @@ void ScXMLExport::WriteRowContent()
bIsAutoStyle = aRange.bIsAutoStyle;
nCols = aRange.nRepeatColumns;
nPrevValidationIndex = aRange.nValidationIndex;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
nPrevCol = aRange.nStartColumn;
#endif
}
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index 8e3f4b421a6c..5d07670f53a2 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -33,7 +33,7 @@
// INCLUDE ---------------------------------------------------------------
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <xmloff/nmspmap.hxx>
#include <xmloff/xmlnmspe.hxx>
@@ -51,9 +51,9 @@
#include <xmloff/xmltoken.hxx>
#include <xmloff/xmlerror.hxx>
-#include <svtools/zforlist.hxx>
-#include <svtools/zformat.hxx>
-#include <svtools/languageoptions.hxx>
+#include <svl/zforlist.hxx>
+#include <svl/zformat.hxx>
+#include <svl/languageoptions.hxx>
#include "xmlimprt.hxx"
#include "document.hxx"
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index 7bc5396fcb5b..e5a9f4b251a8 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -45,8 +45,8 @@
#include <svx/xmlgrhlp.hxx>
#include <svtools/sfxecode.hxx>
#include <sfx2/frame.hxx>
-#include <svtools/itemset.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/itemset.hxx>
+#include <svl/stritem.hxx>
#include <sfx2/sfxsids.hrc>
#include <tools/urlobj.hxx>
#include <com/sun/star/container/XChild.hpp>
@@ -71,7 +71,7 @@
#include <svx/xmleohlp.hxx>
#include <rtl/logfile.hxx>
-#include <svtools/saveopt.hxx>
+#include <unotools/saveopt.hxx>
#include "document.hxx"
#include "xmlwrap.hxx"
@@ -737,12 +737,8 @@ sal_Bool ScXMLImportWrapper::ExportToComponent(uno::Reference<lang::XMultiServic
{
// old stream is still in this file's storage - open read-only
- SfxMedium* pSrcMed = rDoc.GetDocumentShell()->GetMedium();
- String aSrcURL = pSrcMed->GetOrigURL();
-
- // SfxMedium must not be read-only, or it will create a temp file in GetStorage
- SfxMedium aTmpMedium( aSrcURL, STREAM_READWRITE, FALSE, NULL, NULL );
- uno::Reference<embed::XStorage> xTmpStorage = aTmpMedium.GetStorage();
+ // #i106854# use the document's storage directly, without a temporary SfxMedium
+ uno::Reference<embed::XStorage> xTmpStorage = rDoc.GetDocumentShell()->GetStorage();
uno::Reference<io::XStream> xSrcStream;
uno::Reference<io::XInputStream> xSrcInput;
try
diff --git a/sc/source/ui/Accessibility/AccessibleContextBase.cxx b/sc/source/ui/Accessibility/AccessibleContextBase.cxx
index 8774ef74f86d..b611198974de 100644
--- a/sc/source/ui/Accessibility/AccessibleContextBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleContextBase.cxx
@@ -47,7 +47,7 @@
#include <unotools/accessiblestatesethelper.hxx>
#endif
#include <toolkit/helper/convert.hxx>
-#include <svtools/smplhint.hxx>
+#include <svl/smplhint.hxx>
#include <comphelper/sequence.hxx>
#include <unotools/accessiblerelationsethelper.hxx>
#include <vcl/unohelp.hxx>
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index 3ed9b4062a9d..2e6d9a256d75 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -583,7 +583,7 @@ sal_Bool ScChildrenShapes::IsSelected(sal_Int32 nIndex,
bResult = maZOrderedShapes[nIndex]->bSelected;
rShape = maZOrderedShapes[nIndex]->xShape;
-#ifndef PRODUCT // test whether it is truly selected by a slower method
+#ifdef DBG_UTIL // test whether it is truly selected by a slower method
uno::Reference< drawing::XShape > xReturnShape;
sal_Bool bDebugResult(sal_False);
uno::Reference<container::XIndexAccess> xIndexAccess;
@@ -1179,7 +1179,7 @@ sal_Bool ScChildrenShapes::FindShape(const uno::Reference<drawing::XShape>& xSha
if ((rItr != maZOrderedShapes.end()) && (*rItr != NULL) && ((*rItr)->xShape.get() == xShape.get()))
bResult = sal_True; // if the shape is found
-#ifndef PRODUCT // test whether it finds truly the correct shape (perhaps it is not really sorted)
+#ifdef DBG_UTIL // test whether it finds truly the correct shape (perhaps it is not really sorted)
SortedShapes::iterator aDebugItr = maZOrderedShapes.begin();
SortedShapes::iterator aEndItr = maZOrderedShapes.end();
sal_Bool bFound(sal_False);
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index a81f359f04c7..9801c9eeb972 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -1213,7 +1213,7 @@ void ScShapeChilds::FillShapes(const Rectangle& aPixelPaintRect, const MapMode&
//UNUSED2008-05 if (rItr->mxShape.get() == xShape.get())
//UNUSED2008-05 bResult = sal_True; // if the shape is found
//UNUSED2008-05
-//UNUSED2008-05 /*#ifndef PRODUCT // test whether it finds truly the correct shape (perhaps it is not really sorted)
+//UNUSED2008-05 /*#ifdef DBG_UTIL // test whether it finds truly the correct shape (perhaps it is not really sorted)
//UNUSED2008-05 ScShapeChildVec::iterator aDebugItr = std::find(rShapes.begin(), rShapes.end(), aShape);
//UNUSED2008-05 DBG_ASSERT(rItr == aDebugItr, "wrong Shape found");
//UNUSED2008-05 #endif*/
diff --git a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
index fdb7696f7f6c..960e58760512 100644
--- a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
@@ -52,10 +52,10 @@
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <vcl/window.hxx>
-#include <svtools/smplhint.hxx>
+#include <svl/smplhint.hxx>
#include <unotools/accessiblestatesethelper.hxx>
-#include <svtools/style.hxx>
-#include <svtools/itempool.hxx>
+#include <svl/style.hxx>
+#include <svl/itempool.hxx>
#include <svx/editobj.hxx>
#include <toolkit/helper/convert.hxx>
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
index ddb317ccc1b0..fabd1fc932cc 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
@@ -51,7 +51,7 @@
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <vcl/window.hxx>
-#include <svtools/smplhint.hxx>
+#include <svl/smplhint.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <comphelper/sequence.hxx>
#include <toolkit/helper/convert.hxx>
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
index f4196896083b..0746495ca099 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
@@ -52,7 +52,7 @@
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <vcl/window.hxx>
-#include <svtools/smplhint.hxx>
+#include <svl/smplhint.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <comphelper/sequence.hxx>
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx
index feeae8c73023..fd01269729db 100644
--- a/sc/source/ui/Accessibility/AccessibleText.cxx
+++ b/sc/source/ui/Accessibility/AccessibleText.cxx
@@ -1181,7 +1181,7 @@ ScAccessibleEditLineTextData::ScAccessibleEditLineTextData(EditView* pEditView,
ScTextWnd* pTxtWnd = (ScTextWnd*)pWin;
if (pTxtWnd)
- pTxtWnd->SetAccessibleTextData(this);
+ pTxtWnd->InsertAccessibleTextData( *this );
}
ScAccessibleEditLineTextData::~ScAccessibleEditLineTextData()
@@ -1189,7 +1189,7 @@ ScAccessibleEditLineTextData::~ScAccessibleEditLineTextData()
ScTextWnd* pTxtWnd = (ScTextWnd*)mpWindow;
if (pTxtWnd)
- pTxtWnd->SetAccessibleTextData(NULL);
+ pTxtWnd->RemoveAccessibleTextData( *this );
if (mbEditEngineCreated && mpEditEngine)
{
@@ -1210,7 +1210,7 @@ void ScAccessibleEditLineTextData::Dispose()
ScTextWnd* pTxtWnd = (ScTextWnd*)mpWindow;
if (pTxtWnd)
- pTxtWnd->SetAccessibleTextData(NULL);
+ pTxtWnd->RemoveAccessibleTextData( *this );
ResetEditMode();
mpWindow = NULL;
diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx
index 53f063db0e66..88b3d42996f6 100644
--- a/sc/source/ui/app/drwtrans.cxx
+++ b/sc/source/ui/app/drwtrans.cxx
@@ -60,8 +60,8 @@
#include <svx/svdpage.hxx>
#include <svx/svdxcgv.hxx>
#include <sfx2/docfile.hxx>
-#include <svtools/itempool.hxx>
-#include <svtools/urlbmk.hxx>
+#include <svl/itempool.hxx>
+#include <svl/urlbmk.hxx>
#include <tools/urlobj.hxx>
#include <vos/mutex.hxx>
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 46987c88636f..c6901707d2c3 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -57,7 +57,7 @@
#include <sfx2/dispatch.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/printer.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <vcl/sound.hxx>
#include <unotools/localedatawrapper.hxx>
#include <vcl/help.hxx>
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 5a3fd605b08f..a5b481d3174a 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -31,9 +31,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
-
-
-//------------------------------------------------------------------
+#include <algorithm>
#include "scitems.hxx"
#include <svx/eeitem.hxx>
@@ -54,7 +52,7 @@
#include <svx/scripttypeitem.hxx>
#include <vcl/cursor.hxx>
#include <vcl/help.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include "inputwin.hxx"
#include "scmod.hxx"
@@ -131,7 +129,7 @@ SfxChildWinInfo __EXPORT ScInputWindowWrapper::GetInfo() const
//==================================================================
-#define IMAGE(id) pImgMgr->SeekImage(id, bDark)
+#define IMAGE(id) pImgMgr->SeekImage(id, bHC)
//==================================================================
// class ScInputWindow
@@ -170,7 +168,7 @@ ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* pBind ) :
}
DBG_ASSERT( pViewSh, "no view shell for input window" );
- BOOL bDark = GetSettings().GetStyleSettings().GetFaceColor().IsDark();
+ BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
// Positionsfenster, 3 Buttons, Eingabefenster
InsertWindow ( 1, &aWndPos, 0, 0 );
@@ -558,7 +556,7 @@ void ScInputWindow::SetOkCancelMode()
SfxImageManager* pImgMgr = SfxImageManager::GetImageManager( pScMod );
if (!bIsOkCancelMode)
{
- BOOL bDark = GetSettings().GetStyleSettings().GetFaceColor().IsDark();
+ BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
RemoveItem( 3 ); // SID_INPUT_SUM und SID_INPUT_EQUAL entfernen
RemoveItem( 3 );
@@ -582,7 +580,7 @@ void ScInputWindow::SetSumAssignMode()
SfxImageManager* pImgMgr = SfxImageManager::GetImageManager( pScMod );
if (bIsOkCancelMode)
{
- BOOL bDark = GetSettings().GetStyleSettings().GetFaceColor().IsDark();
+ BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
// SID_INPUT_CANCEL, und SID_INPUT_OK entfernen
RemoveItem( 3 );
@@ -710,8 +708,8 @@ void ScInputWindow::DataChanged( const DataChangedEvent& rDCEvt )
ScModule* pScMod = SC_MOD();
SfxImageManager* pImgMgr = SfxImageManager::GetImageManager( pScMod );
- BOOL bDark = GetSettings().GetStyleSettings().GetFaceColor().IsDark();
- // IMAGE macro uses pScMod, pImgMgr, bDark
+ BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
+ // IMAGE macro uses pScMod, pImgMgr, bHC
SetItemImage( SID_INPUT_FUNCTION, IMAGE( SID_INPUT_FUNCTION ) );
if ( bIsOkCancelMode )
@@ -738,7 +736,6 @@ ScTextWnd::ScTextWnd( Window* pParent )
DragSourceHelper( this ),
pEditEngine ( NULL ),
pEditView ( NULL ),
- pAccTextData ( NULL ),
bIsInsertMode( TRUE ),
bFormulaMode ( FALSE ),
bInputMode ( FALSE )
@@ -774,8 +771,8 @@ __EXPORT ScTextWnd::~ScTextWnd()
{
delete pEditView;
delete pEditEngine;
- if (pAccTextData)
- pAccTextData->Dispose();
+ for( AccTextDataVector::reverse_iterator aIt = maAccTextDatas.rbegin(), aEnd = maAccTextDatas.rend(); aIt != aEnd; ++aIt )
+ (*aIt)->Dispose();
}
void __EXPORT ScTextWnd::Paint( const Rectangle& rRec )
@@ -1112,8 +1109,8 @@ void ScTextWnd::StartEditEngine()
pEditEngine->SetModifyHdl(LINK(this, ScTextWnd, NotifyHdl));
- if (pAccTextData)
- pAccTextData->StartEdit();
+ if (!maAccTextDatas.empty())
+ maAccTextDatas.back()->StartEdit();
// as long as EditEngine and DrawText sometimes differ for CTL text,
// repaint now to have the EditEngine's version visible
@@ -1154,8 +1151,8 @@ void ScTextWnd::StopEditEngine( BOOL bAll )
{
if (pEditView)
{
- if (pAccTextData)
- pAccTextData->EndEdit();
+ if (!maAccTextDatas.empty())
+ maAccTextDatas.back()->EndEdit();
ScModule* pScMod = SC_MOD();
@@ -1259,8 +1256,8 @@ void ScTextWnd::SetTextString( const String& rNewString )
aString = rNewString;
- if (pAccTextData)
- pAccTextData->TextChanged();
+ if (!maAccTextDatas.empty())
+ maAccTextDatas.back()->TextChanged();
bInputMode = FALSE;
}
@@ -1317,8 +1314,8 @@ void ScTextWnd::MakeDialogEditView()
if ( bIsRTL )
lcl_ModifyRTLVisArea( pEditView );
- if (pAccTextData)
- pAccTextData->StartEdit();
+ if (!maAccTextDatas.empty())
+ maAccTextDatas.back()->StartEdit();
}
void ScTextWnd::ImplInitSettings()
@@ -1343,6 +1340,22 @@ void ScTextWnd::ImplInitSettings()
rtl::OUString(String(ScResId(STR_ACC_EDITLINE_DESCR))), EditLine);
}
+void ScTextWnd::InsertAccessibleTextData( ScAccessibleEditLineTextData& rTextData )
+{
+ OSL_ENSURE( ::std::find( maAccTextDatas.begin(), maAccTextDatas.end(), &rTextData ) == maAccTextDatas.end(),
+ "ScTextWnd::InsertAccessibleTextData - passed object already registered" );
+ maAccTextDatas.push_back( &rTextData );
+}
+
+void ScTextWnd::RemoveAccessibleTextData( ScAccessibleEditLineTextData& rTextData )
+{
+ AccTextDataVector::iterator aEnd = maAccTextDatas.end();
+ AccTextDataVector::iterator aIt = ::std::find( maAccTextDatas.begin(), aEnd, &rTextData );
+ OSL_ENSURE( aIt != aEnd, "ScTextWnd::RemoveAccessibleTextData - passed object not registered" );
+ if( aIt != aEnd )
+ maAccTextDatas.erase( aIt );
+}
+
// -----------------------------------------------------------------------
void ScTextWnd::DataChanged( const DataChangedEvent& rDCEvt )
diff --git a/sc/source/ui/app/lnktrans.cxx b/sc/source/ui/app/lnktrans.cxx
index 314f051881f1..89a51cd2b2b0 100644
--- a/sc/source/ui/app/lnktrans.cxx
+++ b/sc/source/ui/app/lnktrans.cxx
@@ -35,7 +35,7 @@
-#include <svtools/urlbmk.hxx>
+#include <svl/urlbmk.hxx>
#include "lnktrans.hxx"
#include "scmod.hxx"
diff --git a/sc/source/ui/app/makefile.mk b/sc/source/ui/app/makefile.mk
index 4f3c2bdcb504..1dbac01e6a44 100644
--- a/sc/source/ui/app/makefile.mk
+++ b/sc/source/ui/app/makefile.mk
@@ -63,7 +63,8 @@ EXCEPTIONSFILES= \
$(SLO)$/drwtrans.obj \
$(SLO)$/scmod2.obj \
$(SLO)$/scmod.obj \
- $(SLO)$/client.obj
+ $(SLO)$/client.obj \
+ $(SLO)$/inputwin.obj
#LIB3TARGET=$(SLB)$/ysclib.lib
#LIB3OBJFILES=$(SLO)$/sclib.obj
diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx
index 8bae4f1762d4..2be737d9a717 100644
--- a/sc/source/ui/app/scdll.cxx
+++ b/sc/source/ui/app/scdll.cxx
@@ -328,6 +328,10 @@ void ScDLL::Init()
ScSpellDialogChildWindow ::RegisterChildWindow(FALSE, pMod);
::avmedia::MediaPlayer ::RegisterChildWindow(FALSE, pMod);
+ //<!--Added by PengYunQuan for Validity Cell Range Picker
+ ScValidityRefChildWin::RegisterChildWindow(FALSE, pMod);
+ //-->Added by PengYunQuan for Validity Cell Range Picker
+
// Edit-Engine-Felder, soweit nicht schon in OfficeApplication::Init
SvClassManager& rClassManager = SvxFieldItem::GetClassManager();
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 5afe9e11c7d5..b9d8682c412b 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -56,8 +56,8 @@
#include <svtools/ehdl.hxx>
#include <svtools/accessibilityoptions.hxx>
-#include <svtools/ctloptions.hxx>
-#include <svtools/useroptions.hxx>
+#include <svl/ctloptions.hxx>
+#include <unotools/useroptions.hxx>
#include <vcl/status.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/request.hxx>
@@ -66,7 +66,7 @@
#include <svx/langitem.hxx>
#include <svtools/colorcfg.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/whiter.hxx>
#include <svx/selctrl.hxx>
#include <svx/insctrl.hxx>
#include <svx/zoomctrl.hxx>
@@ -74,7 +74,7 @@
#include <svx/pszctrl.hxx>
#include <svx/zoomsliderctrl.hxx>
#include <vcl/msgbox.hxx>
-#include <svtools/inethist.hxx>
+#include <svl/inethist.hxx>
#include <vcl/waitobj.hxx>
#include <svx/svxerr.hxx>
@@ -217,125 +217,128 @@ ScModule::~ScModule()
}
//------------------------------------------------------------------
-
-void ScModule::Notify( SfxBroadcaster&, const SfxHint& rHint )
+void ScModule::ConfigurationChanged( utl::ConfigurationBroadcaster* p, sal_uInt32 )
{
- if ( rHint.ISA(SfxSimpleHint) )
+ if ( p == pColorConfig || p == pAccessOptions )
{
- ULONG nHintId = ((SfxSimpleHint&)rHint).GetId();
- if ( nHintId == SFX_HINT_DEINITIALIZING )
- {
- // ConfigItems must be removed before ConfigManager
- DeleteCfg();
- }
- else if ( nHintId == SFX_HINT_COLORS_CHANGED || nHintId == SFX_HINT_ACCESSIBILITY_CHANGED )
+ // Test if detective objects have to be updated with new colors
+ // (if the detective colors haven't been used yet, there's nothing to update)
+ if ( ScDetectiveFunc::IsColorsInitialized() )
{
- // Test if detective objects have to be updated with new colors
- // (if the detective colors haven't been used yet, there's nothing to update)
- if ( ScDetectiveFunc::IsColorsInitialized() )
+ const svtools::ColorConfig& rColors = GetColorConfig();
+ BOOL bArrows =
+ ( ScDetectiveFunc::GetArrowColor() != (ColorData)rColors.GetColorValue(svtools::CALCDETECTIVE).nColor ||
+ ScDetectiveFunc::GetErrorColor() != (ColorData)rColors.GetColorValue(svtools::CALCDETECTIVEERROR).nColor );
+ BOOL bComments =
+ ( ScDetectiveFunc::GetCommentColor() != (ColorData)rColors.GetColorValue(svtools::CALCNOTESBACKGROUND).nColor );
+ if ( bArrows || bComments )
{
- const svtools::ColorConfig& rColors = GetColorConfig();
- BOOL bArrows =
- ( ScDetectiveFunc::GetArrowColor() != (ColorData)rColors.GetColorValue(svtools::CALCDETECTIVE).nColor ||
- ScDetectiveFunc::GetErrorColor() != (ColorData)rColors.GetColorValue(svtools::CALCDETECTIVEERROR).nColor );
- BOOL bComments =
- ( ScDetectiveFunc::GetCommentColor() != (ColorData)rColors.GetColorValue(svtools::CALCNOTESBACKGROUND).nColor );
- if ( bArrows || bComments )
- {
- ScDetectiveFunc::InitializeColors(); // get the new colors
+ ScDetectiveFunc::InitializeColors(); // get the new colors
- // update detective objects in all open documents
- SfxObjectShell* pObjSh = SfxObjectShell::GetFirst();
- while ( pObjSh )
+ // update detective objects in all open documents
+ SfxObjectShell* pObjSh = SfxObjectShell::GetFirst();
+ while ( pObjSh )
+ {
+ if ( pObjSh->Type() == TYPE(ScDocShell) )
{
- if ( pObjSh->Type() == TYPE(ScDocShell) )
- {
- ScDocShell* pDocSh = ((ScDocShell*)pObjSh);
- if ( bArrows )
- ScDetectiveFunc( pDocSh->GetDocument(), 0 ).UpdateAllArrowColors();
- if ( bComments )
- ScDetectiveFunc::UpdateAllComments( *pDocSh->GetDocument() );
- }
- pObjSh = SfxObjectShell::GetNext( *pObjSh );
+ ScDocShell* pDocSh = ((ScDocShell*)pObjSh);
+ if ( bArrows )
+ ScDetectiveFunc( pDocSh->GetDocument(), 0 ).UpdateAllArrowColors();
+ if ( bComments )
+ ScDetectiveFunc::UpdateAllComments( *pDocSh->GetDocument() );
}
+ pObjSh = SfxObjectShell::GetNext( *pObjSh );
}
}
+ }
- // force all views to repaint, using the new options
+ // force all views to repaint, using the new options
- SfxViewShell* pViewShell = SfxViewShell::GetFirst();
- while(pViewShell)
+ SfxViewShell* pViewShell = SfxViewShell::GetFirst();
+ while(pViewShell)
+ {
+ if ( pViewShell->ISA(ScTabViewShell) )
{
- if ( pViewShell->ISA(ScTabViewShell) )
- {
- ScTabViewShell* pViewSh = (ScTabViewShell*)pViewShell;
- pViewSh->PaintGrid();
- pViewSh->PaintTop();
- pViewSh->PaintLeft();
- pViewSh->PaintExtras();
-
- ScInputHandler* pHdl = pViewSh->GetInputHandler();
- if ( pHdl )
- pHdl->ForgetLastPattern(); // EditEngine BackgroundColor may change
- }
- else if ( pViewShell->ISA(ScPreviewShell) )
- {
- Window* pWin = pViewShell->GetWindow();
- if (pWin)
- pWin->Invalidate();
- }
- pViewShell = SfxViewShell::GetNext( *pViewShell );
+ ScTabViewShell* pViewSh = (ScTabViewShell*)pViewShell;
+ pViewSh->PaintGrid();
+ pViewSh->PaintTop();
+ pViewSh->PaintLeft();
+ pViewSh->PaintExtras();
+
+ ScInputHandler* pHdl = pViewSh->GetInputHandler();
+ if ( pHdl )
+ pHdl->ForgetLastPattern(); // EditEngine BackgroundColor may change
}
+ else if ( pViewShell->ISA(ScPreviewShell) )
+ {
+ Window* pWin = pViewShell->GetWindow();
+ if (pWin)
+ pWin->Invalidate();
+ }
+ pViewShell = SfxViewShell::GetNext( *pViewShell );
}
- else if ( nHintId == SFX_HINT_CTL_SETTINGS_CHANGED )
+ }
+ else if ( p == pCTLOptions )
+ {
+ // for all documents: set digit language for printer, recalc output factor, update row heights
+ SfxObjectShell* pObjSh = SfxObjectShell::GetFirst();
+ while ( pObjSh )
{
- // for all documents: set digit language for printer, recalc output factor, update row heights
- SfxObjectShell* pObjSh = SfxObjectShell::GetFirst();
- while ( pObjSh )
+ if ( pObjSh->Type() == TYPE(ScDocShell) )
{
- if ( pObjSh->Type() == TYPE(ScDocShell) )
- {
- ScDocShell* pDocSh = ((ScDocShell*)pObjSh);
- OutputDevice* pPrinter = pDocSh->GetPrinter();
- if ( pPrinter )
- pPrinter->SetDigitLanguage( GetOptDigitLanguage() );
+ ScDocShell* pDocSh = ((ScDocShell*)pObjSh);
+ OutputDevice* pPrinter = pDocSh->GetPrinter();
+ if ( pPrinter )
+ pPrinter->SetDigitLanguage( GetOptDigitLanguage() );
- pDocSh->CalcOutputFactor();
+ pDocSh->CalcOutputFactor();
- SCTAB nTabCount = pDocSh->GetDocument()->GetTableCount();
- for (SCTAB nTab=0; nTab<nTabCount; nTab++)
- pDocSh->AdjustRowHeight( 0, MAXROW, nTab );
- }
- pObjSh = SfxObjectShell::GetNext( *pObjSh );
+ SCTAB nTabCount = pDocSh->GetDocument()->GetTableCount();
+ for (SCTAB nTab=0; nTab<nTabCount; nTab++)
+ pDocSh->AdjustRowHeight( 0, MAXROW, nTab );
}
+ pObjSh = SfxObjectShell::GetNext( *pObjSh );
+ }
- // for all views (table and preview): update digit language
- SfxViewShell* pSh = SfxViewShell::GetFirst();
- while ( pSh )
+ // for all views (table and preview): update digit language
+ SfxViewShell* pSh = SfxViewShell::GetFirst();
+ while ( pSh )
+ {
+ if ( pSh->ISA( ScTabViewShell ) )
{
- if ( pSh->ISA( ScTabViewShell ) )
- {
- ScTabViewShell* pViewSh = (ScTabViewShell*)pSh;
+ ScTabViewShell* pViewSh = (ScTabViewShell*)pSh;
- // set ref-device for EditEngine (re-evaluates digit settings)
- ScInputHandler* pHdl = GetInputHdl(pViewSh);
- if (pHdl)
- pHdl->UpdateRefDevice();
-
- pViewSh->DigitLanguageChanged();
- pViewSh->PaintGrid();
- }
- else if ( pSh->ISA( ScPreviewShell ) )
- {
- ScPreviewShell* pPreviewSh = (ScPreviewShell*)pSh;
- ScPreview* pPreview = pPreviewSh->GetPreview();
+ // set ref-device for EditEngine (re-evaluates digit settings)
+ ScInputHandler* pHdl = GetInputHdl(pViewSh);
+ if (pHdl)
+ pHdl->UpdateRefDevice();
- pPreview->SetDigitLanguage( GetOptDigitLanguage() );
- pPreview->Invalidate();
- }
+ pViewSh->DigitLanguageChanged();
+ pViewSh->PaintGrid();
+ }
+ else if ( pSh->ISA( ScPreviewShell ) )
+ {
+ ScPreviewShell* pPreviewSh = (ScPreviewShell*)pSh;
+ ScPreview* pPreview = pPreviewSh->GetPreview();
- pSh = SfxViewShell::GetNext( *pSh );
+ pPreview->SetDigitLanguage( GetOptDigitLanguage() );
+ pPreview->Invalidate();
}
+
+ pSh = SfxViewShell::GetNext( *pSh );
+ }
+ }
+}
+
+void ScModule::Notify( SfxBroadcaster&, const SfxHint& rHint )
+{
+ if ( rHint.ISA(SfxSimpleHint) )
+ {
+ ULONG nHintId = ((SfxSimpleHint&)rHint).GetId();
+ if ( nHintId == SFX_HINT_DEINITIALIZING )
+ {
+ // ConfigItems must be removed before ConfigManager
+ DeleteCfg();
}
}
}
@@ -354,17 +357,17 @@ void ScModule::DeleteCfg()
if ( pColorConfig )
{
- EndListening(*pColorConfig);
+ pColorConfig->RemoveListener(this);
DELETEZ( pColorConfig );
}
if ( pAccessOptions )
{
- EndListening(*pAccessOptions);
+ pAccessOptions->RemoveListener(this);
DELETEZ( pAccessOptions );
}
if ( pCTLOptions )
{
- EndListening(*pCTLOptions);
+ pCTLOptions->RemoveListener(this);
DELETEZ( pCTLOptions );
}
if( pUserOptions )
@@ -967,7 +970,7 @@ svtools::ColorConfig& ScModule::GetColorConfig()
if ( !pColorConfig )
{
pColorConfig = new svtools::ColorConfig;
- StartListening(*pColorConfig);
+ pColorConfig->AddListener(this);
}
return *pColorConfig;
@@ -978,7 +981,7 @@ SvtAccessibilityOptions& ScModule::GetAccessOptions()
if ( !pAccessOptions )
{
pAccessOptions = new SvtAccessibilityOptions;
- StartListening(*pAccessOptions);
+ pAccessOptions->AddListener(this);
}
return *pAccessOptions;
@@ -989,7 +992,7 @@ SvtCTLOptions& ScModule::GetCTLOptions()
if ( !pCTLOptions )
{
pCTLOptions = new SvtCTLOptions;
- StartListening(*pCTLOptions);
+ pCTLOptions->AddListener(this);
}
return *pCTLOptions;
@@ -2216,4 +2219,82 @@ IMPL_LINK( ScModule, CalcFieldValueHdl, EditFieldInfo*, pInfo )
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+BOOL ScModule::RegisterRefWindow( USHORT nSlotId, Window *pWnd )
+{
+ std::list<Window*> & rlRefWindow = m_mapRefWindow[nSlotId];
+
+ if( std::find( rlRefWindow.begin(), rlRefWindow.end(), pWnd ) == rlRefWindow.end() )
+ {
+ rlRefWindow.push_back( pWnd );
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+BOOL ScModule::UnregisterRefWindow( USHORT nSlotId, Window *pWnd )
+{
+ std::map<USHORT, std::list<Window*> >::iterator iSlot = m_mapRefWindow.find( nSlotId );
+
+ if( iSlot == m_mapRefWindow.end() )
+ return FALSE;
+
+ std::list<Window*> & rlRefWindow = iSlot->second;
+
+ std::list<Window*>::iterator i = std::find( rlRefWindow.begin(), rlRefWindow.end(), pWnd );
+
+ if( i == rlRefWindow.end() )
+ return FALSE;
+
+ rlRefWindow.erase( i );
+
+ if( !rlRefWindow.size() )
+ m_mapRefWindow.erase( nSlotId );
+
+ return TRUE;
+}
+
+BOOL ScModule::IsAliveRefDlg( USHORT nSlotId, Window *pWnd )
+{
+ std::map<USHORT, std::list<Window*> >::iterator iSlot = m_mapRefWindow.find( nSlotId );
+
+ if( iSlot == m_mapRefWindow.end() )
+ return FALSE;
+
+ std::list<Window*> & rlRefWindow = iSlot->second;
+
+ return rlRefWindow.end() != std::find( rlRefWindow.begin(), rlRefWindow.end(), pWnd );
+}
+
+Window * ScModule::Find1RefWindow( USHORT nSlotId, Window *pWndAncestor )
+{
+ std::map<USHORT, std::list<Window*> >::iterator iSlot = m_mapRefWindow.find( nSlotId );
+
+ if( iSlot == m_mapRefWindow.end() )
+ return FALSE;
+ std::list<Window*> & rlRefWindow = iSlot->second;
+
+ while( Window *pParent = pWndAncestor->GetParent() ) pWndAncestor = pParent;
+
+ for( std::list<Window*>::iterator i = rlRefWindow.begin(); i!=rlRefWindow.end(); i++ )
+ if ( pWndAncestor->IsWindowOrChild( *i, (*i)->IsSystemWindow() ) )
+ return *i;
+
+ return NULL;
+}
+
+Window * ScModule::Find1RefWindow( Window *pWndAncestor )
+{
+ while( Window *pParent = pWndAncestor->GetParent() ) pWndAncestor = pParent;
+
+ for( std::map<USHORT, std::list<Window*> >::iterator i = m_mapRefWindow.begin();
+ i!=m_mapRefWindow.end(); i++ )
+ for( std::list<Window*>::iterator j = i->second.begin(); j!=i->second.end(); j++ )
+ if ( pWndAncestor->IsWindowOrChild( *j, (*j)->IsSystemWindow() ) )
+ return *j;
+
+ return NULL;
+}
+//<!--Added by PengYunQuan for Validity Cell Range Picker
diff --git a/sc/source/ui/app/scmod2.cxx b/sc/source/ui/app/scmod2.cxx
index 4001ebe62036..7e0b43bdd156 100644
--- a/sc/source/ui/app/scmod2.cxx
+++ b/sc/source/ui/app/scmod2.cxx
@@ -36,7 +36,7 @@
//------------------------------------------------------------------
#include <svx/unolingu.hxx>
-#include <svtools/lingucfg.hxx>
+#include <unotools/lingucfg.hxx>
#include <i18npool/mslangid.hxx>
#include <com/sun/star/i18n/ScriptType.hpp>
#include <com/sun/star/linguistic2/XThesaurus.hpp>
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index 94a2cdfc3324..c37fced30109 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -66,8 +66,8 @@
#include <svx/paperinf.hxx>
#include <svx/sizeitem.hxx>
#include <svx/algitem.hxx>
-#include <svtools/intitem.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/intitem.hxx>
+#include <svl/zforlist.hxx>
#include "docsh.hxx"
#include "markdata.hxx"
#include "stlpool.hxx"
diff --git a/sc/source/ui/app/typemap.cxx b/sc/source/ui/app/typemap.cxx
index eedfab338844..1a36b8ca5125 100644
--- a/sc/source/ui/app/typemap.cxx
+++ b/sc/source/ui/app/typemap.cxx
@@ -64,8 +64,8 @@
#include <sfx2/msg.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/slstitm.hxx>
+#include <svl/stritem.hxx>
+#include <svl/slstitm.hxx>
#include <sfx2/objitem.hxx>
#include <svx/fontitem.hxx>
#include <svx/hlnkitem.hxx>
@@ -80,7 +80,7 @@
#include <svx/colritem.hxx>
#include <svx/boxitem.hxx>
#include <svx/bolnitem.hxx>
-#include <svtools/ptitem.hxx>
+#include <svl/ptitem.hxx>
#include <svx/sizeitem.hxx>
#include <svx/algitem.hxx>
#include <svx/clipfmtitem.hxx>
@@ -117,15 +117,15 @@
#include <svx/charreliefitem.hxx>
#include <svx/rotmodit.hxx>
#include <svx/drawitem.hxx>
-#include <svtools/ilstitem.hxx>
-#include <svtools/globalnameitem.hxx>
+#include <svl/ilstitem.hxx>
+#include <svl/globalnameitem.hxx>
#include <svx/chrtitem.hxx>
#include <svx/zoomslideritem.hxx>
// #i25616#
#include <svx/sdshitm.hxx>
-#include <svtools/aeitem.hxx>
+#include <svl/aeitem.hxx>
#include <avmedia/mediaitem.hxx>
#include "attrib.hxx"
diff --git a/sc/source/ui/attrdlg/attrdlg.cxx b/sc/source/ui/attrdlg/attrdlg.cxx
index 9fd600409211..05bcf624a1b3 100644
--- a/sc/source/ui/attrdlg/attrdlg.cxx
+++ b/sc/source/ui/attrdlg/attrdlg.cxx
@@ -45,7 +45,7 @@
//CHINA001 #include <svx/chardlg.hxx>
//CHINA001 #include <svx/numfmt.hxx>
//CHINA001 #include <svx/paragrph.hxx>
-#include <svtools/cjkoptions.hxx>
+#include <svl/cjkoptions.hxx>
#include "tabpages.hxx"
#include "attrdlg.hxx"
diff --git a/sc/source/ui/attrdlg/condfrmt.cxx b/sc/source/ui/attrdlg/condfrmt.cxx
index 704546d76bf6..c08f8fa2dcea 100644
--- a/sc/source/ui/attrdlg/condfrmt.cxx
+++ b/sc/source/ui/attrdlg/condfrmt.cxx
@@ -33,7 +33,7 @@
#include <sfx2/dispatch.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include "tabvwsh.hxx"
#include "reffact.hxx"
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index b4264c67a505..e5647888fff9 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -1460,13 +1460,19 @@ SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScParagraphDlg( Windo
//add for ScValidationDlg begin
SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScValidationDlg( Window* pParent,
- const SfxItemSet* pArgSet,int nId )
+//<!--Modified by PengYunQuan for Validity Cell Range Picker
+// const SfxItemSet* pArgSet,int nId )
+ const SfxItemSet* pArgSet,int nId, ScTabViewShell *pTabVwSh )
+//-->Modified by PengYunQuan for Validity Cell Range Picke
{
SfxTabDialog* pDlg=NULL;
switch ( nId )
{
case TAB_DLG_VALIDATION :
- pDlg = new ScValidationDlg( pParent, pArgSet );
+ //<!--Modified by PengYunQuan for Validity Cell Range Picker
+ //pDlg = new ScValidationDlg( pParent, pArgSet );
+ pDlg = new ScValidationDlg( pParent, pArgSet, pTabVwSh );
+ //-->Modified by PengYunQuan for Validity Cell Range Picker
break;
default:
break;
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index 2dc0f2039275..398c15f68cdf 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -561,7 +561,10 @@ public:
int nId );
virtual SfxAbstractTabDialog * CreateScValidationDlg( Window* pParent, //add for ScValidationDlg
- const SfxItemSet* pArgSet,int nId );
+ //<!--Modified by PengYunQuan for Validity Cell Range Picker
+ // const SfxItemSet* pArgSet,int nId );
+ const SfxItemSet* pArgSet,int nId, ScTabViewShell *pTabVwSh );
+ //-->Modified by PengYunQuan for Validity Cell Range Picker
virtual SfxAbstractTabDialog * CreateScSortDlg( Window* pParent, //add for ScSortDlg
const SfxItemSet* pArgSet,int nId );
diff --git a/sc/source/ui/cctrl/tbinsert.cxx b/sc/source/ui/cctrl/tbinsert.cxx
index 07505476aa16..618c7f97a881 100644
--- a/sc/source/ui/cctrl/tbinsert.cxx
+++ b/sc/source/ui/cctrl/tbinsert.cxx
@@ -40,7 +40,7 @@
// INCLUDE ---------------------------------------------------------------
#include <tools/shl.hxx>
-#include <svtools/intitem.hxx>
+#include <svl/intitem.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/viewsh.hxx>
@@ -94,7 +94,7 @@ void __EXPORT ScTbxInsertCtrl::StateChanged( USHORT /* nSID */, SfxItemState eSt
Image aImage = GetImage( m_xFrame,
aSlotURL,
hasBigImages(),
- GetToolBox().GetDisplayBackground().GetColor().IsDark() );
+ GetToolBox().GetSettings().GetStyleSettings().GetHighContrastMode() );
GetToolBox().SetItemImage(GetId(), aImage);
}
}
diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
index bf957b889d82..8e1f839c39e4 100644
--- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
+++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
@@ -48,7 +48,7 @@
#ifndef _SV_GRADIENT_HXX
#include <vcl/gradient.hxx>
#endif
-#include <svtools/itemset.hxx>
+#include <svl/itemset.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/objsh.hxx>
#include <svx/zoomslideritem.hxx>
@@ -273,10 +273,10 @@ ScZoomSliderWnd::ScZoomSliderWnd( Window* pParent, const ::com::sun::star::uno::
m_xDispatchProvider( rDispatchProvider ),
m_xFrame( _xFrame )
{
- BOOL bIsDark = GetSettings().GetStyleSettings().GetFaceColor().IsDark();
- mpImpl->maSliderButton = Image( SVX_RES( bIsDark ? RID_SVXBMP_SLIDERBUTTON_HC : RID_SVXBMP_SLIDERBUTTON ) );
- mpImpl->maIncreaseButton = Image( SVX_RES( bIsDark ? RID_SVXBMP_SLIDERINCREASE_HC : RID_SVXBMP_SLIDERINCREASE ) );
- mpImpl->maDecreaseButton = Image( SVX_RES( bIsDark ? RID_SVXBMP_SLIDERDECREASE_HC : RID_SVXBMP_SLIDERDECREASE ) );
+ BOOL bIsHC = GetSettings().GetStyleSettings().GetHighContrastMode();
+ mpImpl->maSliderButton = Image( SVX_RES( bIsHC ? RID_SVXBMP_SLIDERBUTTON_HC : RID_SVXBMP_SLIDERBUTTON ) );
+ mpImpl->maIncreaseButton = Image( SVX_RES( bIsHC ? RID_SVXBMP_SLIDERINCREASE_HC : RID_SVXBMP_SLIDERINCREASE ) );
+ mpImpl->maDecreaseButton = Image( SVX_RES( bIsHC ? RID_SVXBMP_SLIDERDECREASE_HC : RID_SVXBMP_SLIDERDECREASE ) );
Size aSliderSize = LogicToPixel( Size( aLogicalSize), MapMode( MAP_10TH_MM ) );
SetSizePixel( Size( aSliderSize.Width() * nSliderWidth-1, aSliderSize.Height() + nSliderHeight ) );
}
diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index ddbfb4426df8..e33ecde514a4 100644
--- a/sc/source/ui/dbgui/csvgrid.cxx
+++ b/sc/source/ui/dbgui/csvgrid.cxx
@@ -37,7 +37,7 @@
#include <algorithm>
#include <svtools/colorcfg.hxx>
-#include <svtools/smplhint.hxx>
+#include <svl/smplhint.hxx>
#include <tools/poly.hxx>
#include "scmod.hxx"
#include "asciiopt.hxx"
@@ -52,7 +52,7 @@
#include <svx/colritem.hxx>
#include <svx/fhgtitem.hxx>
#include <svx/fontitem.hxx>
-#include <svtools/itemset.hxx>
+#include <svl/itemset.hxx>
#include "editutil.hxx"
// *** edit engine ***
@@ -96,12 +96,12 @@ ScCsvGrid::ScCsvGrid( ScCsvControl& rParent ) :
InitColors();
InitFonts();
ImplClearSplits();
- StartListening( mrColorConfig );
+ mrColorConfig.AddListener(this);
}
ScCsvGrid::~ScCsvGrid()
{
- EndListening( mrColorConfig );
+ mrColorConfig.RemoveListener(this);
}
@@ -995,14 +995,10 @@ void ScCsvGrid::DataChanged( const DataChangedEvent& rDCEvt )
ScCsvControl::DataChanged( rDCEvt );
}
-void ScCsvGrid::Notify( SfxBroadcaster&, const SfxHint& rHint )
+void ScCsvGrid::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 )
{
- if( rHint.ISA( SfxSimpleHint ) &&
- (static_cast< const SfxSimpleHint& >( rHint ).GetId() == SFX_HINT_COLORS_CHANGED) )
- {
- InitColors();
- Repaint();
- }
+ InitColors();
+ Repaint();
}
diff --git a/sc/source/ui/dbgui/makefile.mk b/sc/source/ui/dbgui/makefile.mk
index 5d716552ca71..b495b5eabcc9 100644
--- a/sc/source/ui/dbgui/makefile.mk
+++ b/sc/source/ui/dbgui/makefile.mk
@@ -81,7 +81,8 @@ EXCEPTIONSFILES= \
$(SLO)$/csvtablebox.obj \
$(SLO)$/fieldwnd.obj \
$(SLO)$/pvlaydlg.obj \
- $(SLO)$/dapidata.obj
+ $(SLO)$/dapidata.obj \
+ $(SLO)$/validate.obj
SRS1NAME=$(TARGET)
SRC1FILES = \
diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx
index d6bd29c7fddf..8a44d512cbe6 100644
--- a/sc/source/ui/dbgui/pfiltdlg.cxx
+++ b/sc/source/ui/dbgui/pfiltdlg.cxx
@@ -55,7 +55,7 @@
#define _PFILTDLG_CXX
#include "pfiltdlg.hxx"
#undef _PFILTDLG_CXX
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
//==================================================================
diff --git a/sc/source/ui/dbgui/scendlg.cxx b/sc/source/ui/dbgui/scendlg.cxx
index 60c37ee19381..0065af288783 100644
--- a/sc/source/ui/dbgui/scendlg.cxx
+++ b/sc/source/ui/dbgui/scendlg.cxx
@@ -39,7 +39,7 @@
#include <svx/drawitem.hxx>
#include <svx/xtable.hxx>
#include <sfx2/objsh.hxx>
-#include <svtools/useroptions.hxx>
+#include <unotools/useroptions.hxx>
#include <vcl/msgbox.hxx>
#include <unotools/localedatawrapper.hxx>
diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx
index 337329acfec6..8bbc561c9e43 100644
--- a/sc/source/ui/dbgui/tpsubt.cxx
+++ b/sc/source/ui/dbgui/tpsubt.cxx
@@ -276,8 +276,8 @@ BOOL ScTpSubTotalGroup::DoFillItemSet( USHORT nGroupNo,
rArgSet.Put( ScSubTotalItem( SCITEM_SUBTDATA, &theSubTotalData ) );
- if ( pSubTotals ) delete pSubTotals;
- if ( pFunctions ) delete pFunctions;
+ if ( pSubTotals ) delete [] pSubTotals;
+ if ( pFunctions ) delete [] pFunctions;
return TRUE;
}
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index 8700c936e0f5..81e8ff35195d 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -36,10 +36,10 @@
#endif
#include <vcl/svapp.hxx>
-#include <svtools/aeitem.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/intitem.hxx>
+#include <svl/aeitem.hxx>
+#include <svl/stritem.hxx>
+#include <svl/eitem.hxx>
+#include <svl/intitem.hxx>
#include <basic/sbmeth.hxx>
#include <basic/sbstar.hxx>
#include <basic/sbmod.hxx>
@@ -53,6 +53,12 @@
#include "validate.hxx"
#include "compiler.hxx"
#include "formula/opcode.hxx" //CHINA001
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+#include "tabvwsh.hxx"
+#include <sfx2/viewfrm.hxx>
+#include <sfx2/childwin.hxx>
+#include "reffact.hxx"
+//-->Added by PengYunQuan for Validity Cell Range Picker
// ============================================================================
@@ -66,8 +72,19 @@ static USHORT pValueRanges[] =
// ============================================================================
-ScValidationDlg::ScValidationDlg( Window* pParent, const SfxItemSet* pArgSet ) :
- SfxTabDialog( pParent, ScResId( TAB_DLG_VALIDATION ), pArgSet )
+//<!--Modified by PengYunQuan for Validity Cell Range Picker
+//ScValidationDlg::ScValidationDlg( Window* pParent, const SfxItemSet* pArgSet ) :
+// SfxTabDialog( pParent, ScResId( TAB_DLG_VALIDATION ), pArgSet )
+ScValidationDlg::ScValidationDlg( Window* pParent,
+ const SfxItemSet* pArgSet,
+ ScTabViewShell *pTabViewSh,
+ SfxBindings *pB /*= NULL*/
+ ) :
+ ScValidationDlgBase( pParent ? pParent : SFX_APP()->GetTopWindow(), TAB_DLG_VALIDATION, pArgSet, pB ),
+ m_bOwnRefHdlr( false ),
+ m_pTabVwSh( pTabViewSh ),
+ m_bRefInputting( false )
+//-->Modified by PengYunQuan for Validity Cell Range Picker
{
AddTabPage( TP_VALIDATION_VALUES, ScTPValidationValue::Create, 0 );
AddTabPage( TP_VALIDATION_INPUTHELP, ScTPValidationHelp::Create, 0 );
@@ -75,8 +92,100 @@ ScValidationDlg::ScValidationDlg( Window* pParent, const SfxItemSet* pArgSet ) :
FreeResource();
}
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+void ScTPValidationValue::SetReferenceHdl( const ScRange&rRange , ScDocument* pDoc )
+{
+ if ( rRange.aStart != rRange.aEnd )
+ if ( ScValidationDlg *pValidationDlg = GetValidationDlg() )
+ if( m_pRefEdit )
+ pValidationDlg/*->GetRefHandler()*/->RefInputStart( m_pRefEdit );
+
+ if ( m_pRefEdit )
+ {
+ String aStr;
+ rRange.Format( aStr, SCR_ABS_3D, pDoc );
+ m_pRefEdit->SetRefString( aStr );
+ //m_pRefEdit->SetRefString( rRange.aStart != rRange.aEnd ? aStr : String::CreateFromAscii("=").Append( aStr ) );
+ }
+}
+
+void ScTPValidationValue:: SetActiveHdl()
+{
+ if ( m_pRefEdit ) m_pRefEdit->GrabFocus();
+
+ if ( ScValidationDlg *pValidationDlg = GetValidationDlg() )
+ if( m_pRefEdit )
+ {
+ pValidationDlg/*->GetRefHandler()*/->RefInputDone();
+ }
+}
+
+void ScTPValidationValue::RefInputStartPreHdl( ScRefEdit* pEdit, ScRefButton* pButton )
+{
+ if ( ScValidationDlg *pValidationDlg = GetValidationDlg() )
+ {
+ if( pEdit == m_pRefEdit )
+ {
+ if( Window *pPreWnd = pEdit==&maEdMax?&maFtMax:(pEdit==&maEdMin?&maFtMin:NULL) )
+ {
+ pPreWnd->SetParent( pValidationDlg );
+ pPreWnd->Hide();
+ }
+
+ m_pRefEdit->SetParent( pValidationDlg );
+ }
+
+ if( pButton == &m_btnRef )m_btnRef.SetParent( pValidationDlg );
+ }
+}
+
+void ScTPValidationValue::RefInputDonePreHdl()
+{
+
+ if( m_pRefEdit && m_pRefEdit->GetParent()!= this )
+ {
+ if( Window *pPreWnd = m_pRefEdit==&maEdMax?&maFtMax:(m_pRefEdit==&maEdMin?&maFtMin:NULL) )
+ {
+ pPreWnd->SetParent( this );
+ pPreWnd->Show();
+ }
+
+ m_pRefEdit->SetParent( this );
+
+ m_btnRef.SetParent( m_pRefEdit ); //if Edit SetParent but button not, the tab order will be incorrect, need button to setparent to anthor window and restore parent later in order to restore the tab order
+// aExample1.SetParent( m_pRefEdit ); // the aExample1's child order will affect acc key
+ }
+
+ if( m_btnRef.GetParent()!=this ) m_btnRef.SetParent( this );
+// if( aExample1.GetParent()!=this ) aExample1.SetParent( this );
+}
+
+void ScTPValidationValue::RefInputDonePostHdl()
+{
+
+
+ if( m_pRefEdit && !m_pRefEdit->HasFocus() )
+ m_pRefEdit->GrabFocus();
+
+}
+
+
+BOOL ScValidationDlg::Close()
+{
+ if( m_bOwnRefHdlr )
+ if( SfxTabPage* pPage = GetTabPage( TP_VALIDATION_VALUES ) )
+ static_cast<ScTPValidationValue*>(pPage)->RemoveRefDlg();
+
+ return ScValidationDlgBase::Close();
+}
+//-->Added by PengYunQuan for Validity Cell Range Picker
+
ScValidationDlg::~ScValidationDlg()
{
+ //<!--Added by PengYunQuan for Validity Cell Range Picker
+ if( m_bOwnRefHdlr )
+ RemoveRefDlg( FALSE );
+ //-->Added by PengYunQuan for Validity Cell Range Picker
}
@@ -236,7 +345,10 @@ ScTPValidationValue::ScTPValidationValue( Window* pParent, const SfxItemSet& rAr
maStrMax ( ScResId( SCSTR_VALID_MAXIMUM ) ),
maStrValue( ScResId( SCSTR_VALID_VALUE ) ),
maStrRange( ScResId( SCSTR_VALID_RANGE ) ),
- maStrList ( ScResId( SCSTR_VALID_LIST ) )
+ maStrList ( ScResId( SCSTR_VALID_LIST ) ),
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+ m_btnRef( this, ScResId( RB_VALIDITY_REF ) )
+//-->Added by PengYunQuan for Validity Cell Range Picker
{
Init();
FreeResource();
@@ -246,6 +358,9 @@ ScTPValidationValue::ScTPValidationValue( Window* pParent, const SfxItemSet& rAr
String aListSep = ::GetScCompilerNativeSymbol( ocSep ); //CHINA001
DBG_ASSERT( aListSep.Len() == 1, "ScTPValidationValue::ScTPValidationValue - list separator error" );
mcFmlaSep = aListSep.Len() ? aListSep.GetChar( 0 ) : ';';
+ //<!--Added by PengYunQuan for Validity Cell Range Picker
+ m_btnRef.Hide();
+ //-->Added by PengYunQuan for Validity Cell Range Picker
}
ScTPValidationValue::~ScTPValidationValue()
@@ -257,6 +372,13 @@ void ScTPValidationValue::Init()
maLbAllow.SetSelectHdl( LINK( this, ScTPValidationValue, SelectHdl ) );
maLbValue.SetSelectHdl( LINK( this, ScTPValidationValue, SelectHdl ) );
maCbShow.SetClickHdl( LINK( this, ScTPValidationValue, CheckHdl ) );
+ //<!--Added by PengYunQuan for Validity Cell Range Picker
+ maEdMin.SetGetFocusHdl( LINK( this, ScTPValidationValue, EditSetFocusHdl ) );
+ maEdMin.SetLoseFocusHdl( LINK( this, ScTPValidationValue, KillFocusHdl ) );
+ maEdMax.SetGetFocusHdl( LINK( this, ScTPValidationValue, EditSetFocusHdl ) );
+ m_btnRef.SetLoseFocusHdl( LINK( this, ScTPValidationValue, KillFocusHdl ) );
+ maEdMax.SetLoseFocusHdl( LINK( this, ScTPValidationValue, KillFocusHdl ) );
+ //-->Added by PengYunQuan for Validity Cell Range Picker
maLbAllow.SelectEntryPos( SC_VALIDDLG_ALLOW_ANY );
maLbValue.SelectEntryPos( SC_VALIDDLG_DATA_EQUAL );
@@ -374,6 +496,133 @@ void ScTPValidationValue::SetSecondFormula( const String& rFmlaStr )
maEdMax.SetText( rFmlaStr );
}
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+ScValidationDlg * ScTPValidationValue::GetValidationDlg()
+{
+ if( Window *pParent = GetParent() )
+ do{
+ if ( dynamic_cast<ScValidationDlg*>( pParent ) )
+ return static_cast< ScValidationDlg * >( pParent );
+ }while ( NULL != ( pParent = pParent->GetParent() ) );
+ return NULL;
+}
+void ScTPValidationValue::SetupRefDlg()
+{
+ if( ScValidationDlg *pValidationDlg = GetValidationDlg() )
+ if( pValidationDlg->SetupRefDlg() )
+ {
+ pValidationDlg->SetHandler( this );
+ pValidationDlg->SetSetRefHdl( (ScRefHandlerHelper::PFUNCSETREFHDLTYPE)( &ScTPValidationValue::SetReferenceHdl ) );
+ pValidationDlg->SetSetActHdl( (ScRefHandlerHelper::PCOMMONHDLTYPE)( &ScTPValidationValue::SetActiveHdl ) );
+ pValidationDlg->SetRefInputStartPreHdl( (ScRefHandlerHelper::PINPUTSTARTDLTYPE)( &ScTPValidationValue::RefInputStartPreHdl ) );
+ pValidationDlg->SetRefInputDonePreHdl( (ScRefHandlerHelper::PCOMMONHDLTYPE)( &ScTPValidationValue::RefInputDonePreHdl ) );
+ pValidationDlg->SetRefInputDonePostHdl( (ScRefHandlerHelper::PCOMMONHDLTYPE)( &ScTPValidationValue::RefInputDonePostHdl ) );
+
+ if ( maEdMax.IsVisible() ) { m_pRefEdit = &maEdMax; }
+ else if ( maEdMin.IsVisible() ) { m_pRefEdit = &maEdMin; }
+
+ if( m_pRefEdit && !m_pRefEdit->HasFocus() ) m_pRefEdit->GrabFocus();
+
+ if( m_pRefEdit ) m_pRefEdit->SetRefDialog( pValidationDlg );
+ m_btnRef.SetReferences( pValidationDlg, m_pRefEdit );
+ }
+}
+
+void ScTPValidationValue::RemoveRefDlg()
+{
+ if( ScValidationDlg *pValidationDlg = GetValidationDlg() )
+ if( pValidationDlg->RemoveRefDlg() )
+ {
+ pValidationDlg->SetHandler( NULL );
+ pValidationDlg->SetSetRefHdl( NULL );
+ pValidationDlg->SetSetActHdl( NULL );
+ pValidationDlg->SetRefInputStartPreHdl( NULL );
+ pValidationDlg->SetRefInputDonePreHdl( NULL );
+ pValidationDlg->SetRefInputDonePostHdl( NULL );
+
+ if( m_pRefEdit ) m_pRefEdit->SetRefDialog( NULL );
+ m_pRefEdit = NULL;
+
+ m_btnRef.SetReferences( NULL, NULL );
+
+#if ! defined( WNT ) && !defined( _MSC_VER )
+ TidyListBoxes();
+#endif
+ }
+}
+
+void ScTPValidationValue::TidyListBoxes()
+{
+ if ( Window *pWnd = GetChild( 0 ) )
+ {
+ bool bFindLst = false;
+ std::list<Window*> alstOrder;
+
+ do{
+ if( pWnd->GetParent() == this )
+ {
+ if ( !bFindLst )
+ {
+ try{
+ if( dynamic_cast<ListBox*>(pWnd)||dynamic_cast<ListBox*>(pWnd->GetWindow(WINDOW_CLIENT) ) )
+ bFindLst = true;
+ }
+ catch( ... )
+ {
+ if ( *(void**)pWnd == *(void**)&maLbValue )
+ bFindLst = true;
+ else if ( Window *pClient = pWnd->GetWindow( WINDOW_CLIENT ) )
+ if ( *(void**)pClient == *(void**)&maLbValue )
+ bFindLst = true;
+ }
+ }
+
+ if ( bFindLst )
+ alstOrder.push_back( pWnd->GetWindow( WINDOW_CLIENT ) );
+ }
+ }while( NULL != ( pWnd = pWnd->GetWindow( WINDOW_NEXT ) ) );
+
+ pWnd = GetChild(0);
+
+ while( std::find( alstOrder.begin(), alstOrder.end(), pWnd ) != alstOrder.end() && NULL != ( pWnd = pWnd->GetWindow( WINDOW_NEXT) ) );
+
+ if ( pWnd )
+ {
+ for ( std::list<Window*>::iterator i = alstOrder.begin(); i!=alstOrder.end(); i++ )
+ {
+ Window *pParent = (*i)->GetParent();
+ (*i)->SetParent( pWnd );
+ (*i)->SetParent( pParent );
+ }
+ }
+ }
+}
+
+IMPL_LINK( ScTPValidationValue, EditSetFocusHdl, Edit *, /*pEdit*/ )
+{
+ USHORT nPos=maLbAllow.GetSelectEntryPos();
+
+ if ( nPos == SC_VALIDDLG_ALLOW_RANGE )
+ {
+ SetupRefDlg();
+ }
+
+ return 0;
+}
+
+IMPL_LINK( ScTPValidationValue, KillFocusHdl, Window *, pWnd )
+{
+ if( pWnd == m_pRefEdit || pWnd == &m_btnRef )
+ if( ScValidationDlg *pValidationDlg = GetValidationDlg() )
+ if ( (pValidationDlg->IsActive() || pValidationDlg->IsChildFocus() ) && !pValidationDlg->IsRefInputting() )
+ if( ( !m_pRefEdit || !m_pRefEdit->HasFocus()) && !m_btnRef.HasFocus() )
+ {
+ RemoveRefDlg();
+ }
+
+ return 0;
+}
+//-->Added by PengYunQuan for Validity Cell Range Picker
// ----------------------------------------------------------------------------
@@ -427,7 +676,9 @@ IMPL_LINK( ScTPValidationValue, SelectHdl, ListBox*, EMPTYARG )
maFtMax.Show( bShowMax );
maEdMax.Show( bShowMax );
maFtHint.Show( bRange );
-
+ //<!--Added by PengYunQuan for Validity Cell Range Picker
+ m_btnRef.Show( bRange );
+ //-->Added by PengYunQuan for Validity Cell Range Picker
return 0;
}
@@ -660,3 +911,114 @@ IMPL_LINK( ScTPValidationError, ClickSearchHdl, PushButton*, EMPTYARG )
return( 0L );
}
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+bool ScValidationDlg::EnterRefStatus()
+{
+ ScTabViewShell *pTabViewShell = GetTabViewShell();
+
+ if( !pTabViewShell ) return false;
+
+ USHORT nId = SLOTID;
+ SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
+ SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+
+ if ( pWnd && pWnd->GetWindow()!= this ) pWnd = NULL;
+
+ SC_MOD()->SetRefDialog( nId, pWnd ? FALSE : TRUE );
+
+ return true;
+}
+
+bool ScValidationDlg::LeaveRefStatus()
+{
+ ScTabViewShell *pTabViewShell = GetTabViewShell();
+
+ if( !pTabViewShell ) return false;
+
+ USHORT nId = SLOTID;
+ SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
+ //SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+ if ( pViewFrm->GetChildWindow( nId ) )
+ {
+ DoClose( nId );
+ }
+ return true;
+}
+
+bool ScValidationDlg::SetupRefDlg()
+{
+ if ( m_bOwnRefHdlr ) return false;
+ if( EnterRefMode() )
+ {
+ SetModal( FALSE );
+ return /*SetChkShell( GetDocShell() ),*/ m_bOwnRefHdlr = true && EnterRefStatus();
+ }
+
+ return false;
+}
+
+bool ScValidationDlg::RemoveRefDlg( BOOL bRestoreModal /* = TRUE */ )
+{
+ bool bVisLock = false;
+ bool bFreeWindowLock = false;
+
+ ScTabViewShell *pTabVwSh = GetTabViewShell();
+
+ if( !pTabVwSh ) return false;
+
+ if ( SfxChildWindow* pWnd = pTabVwSh->GetViewFrame()->GetChildWindow( SID_VALIDITY_REFERENCE ) )
+ {
+ bVisLock = static_cast<ScValidityRefChildWin*>(pWnd)->LockVisible( true );
+ bFreeWindowLock = static_cast<ScValidityRefChildWin*>(pWnd)->LockFreeWindow( true );
+ }
+
+ if ( !m_bOwnRefHdlr ) return false;
+ if( LeaveRefStatus() && LeaveRefMode() )
+ {
+ m_bOwnRefHdlr = false;
+
+ if( bRestoreModal )
+ SetModal( TRUE );
+ }
+
+ if ( SfxChildWindow* pWnd = pTabVwSh->GetViewFrame()->GetChildWindow( SID_VALIDITY_REFERENCE ) )
+ {
+ static_cast<ScValidityRefChildWin*>(pWnd)->LockVisible( bVisLock );
+ static_cast<ScValidityRefChildWin*>(pWnd)->LockFreeWindow( bFreeWindowLock );
+ }
+
+ return true;
+}
+
+//TYPEINIT1( ScTPValidationValue, SfxTabPage )
+
+void ScTPValidationValue::ScRefButtonEx::Click()
+{
+ if( ScTPValidationValue *pParent = dynamic_cast< ScTPValidationValue*>( GetParent() ) )
+ pParent->OnClick( this );
+
+ ScRefButton::Click();
+}
+
+void ScTPValidationValue::OnClick( Button *pBtn )
+{
+ if( pBtn == &m_btnRef )
+ SetupRefDlg();
+}
+
+BOOL ScValidationDlg::IsChildFocus()
+{
+ if ( const Window *pWin = Application::GetFocusWindow() )
+ while( NULL != ( pWin = pWin->GetParent() ) )
+ if( pWin == this )
+ return TRUE;
+
+ return FALSE;
+}
+
+
+bool ScValidationDlg::IsAlive()
+{
+ return SC_MOD()->IsAliveRefDlg( SLOTID, this );
+}
+//-->Added by PengYunQuan for Validity Cell Range Picker
diff --git a/sc/source/ui/dbgui/validate.src b/sc/source/ui/dbgui/validate.src
index afd3fc213391..1f8e4b48deac 100644
--- a/sc/source/ui/dbgui/validate.src
+++ b/sc/source/ui/dbgui/validate.src
@@ -65,7 +65,9 @@ TabDialog TAB_DLG_VALIDATION
};
Text [ en-US ] = "Validity" ;
};
-
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+#define OFFSET_X 30
+//-->Added by PengYunQuan for Validity Cell Range Picker
TabPage TP_VALIDATION_VALUES
{
Hide = TRUE ;
@@ -75,13 +77,19 @@ TabPage TP_VALIDATION_VALUES
FixedText FT_ALLOW
{
Pos = MAP_APPFONT ( 6 , 16 ) ;
- Size = MAP_APPFONT ( 70 , 8 ) ;
+ //<!--Modified by PengYunQuan for Validity Cell Range Picker
+ //Size = MAP_APPFONT ( 70 , 8 ) ;
+ Size = MAP_APPFONT ( 70 - OFFSET_X , 8 ) ;
+ //-->Modified by PengYunQuan for Validity Cell Range Picker
Text [ en-US ] = "~Allow" ;
};
ListBox LB_ALLOW
{
Border = TRUE ;
- Pos = MAP_APPFONT ( 80 , 14 ) ;
+ //<!--Modified by PengYunQuan for Validity Cell Range Picker
+ //Pos = MAP_APPFONT ( 80 , 14 ) ;
+ Pos = MAP_APPFONT ( 80 - OFFSET_X , 14 ) ;
+ //-->Modified by PengYunQuan for Validity Cell Range Picker
Size = MAP_APPFONT ( 90 , 80 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
@@ -100,13 +108,19 @@ TabPage TP_VALIDATION_VALUES
FixedText FT_VALUE
{
Pos = MAP_APPFONT ( 6 , 58 ) ;
- Size = MAP_APPFONT ( 70 , 8 ) ;
+ //<!--Modified by PengYunQuan for Validity Cell Range Picker
+ //Size = MAP_APPFONT ( 70 , 8 ) ;
+ Size = MAP_APPFONT ( 70 - OFFSET_X , 8 ) ;
+ //-->Modified by PengYunQuan for Validity Cell Range Picker
Text [ en-US ] = "~Data" ;
};
ListBox LB_VALUE
{
Border = TRUE ;
- Pos = MAP_APPFONT ( 80 , 56 ) ;
+ //<!--Modified by PengYunQuan for Validity Cell Range Picker
+ //Pos = MAP_APPFONT ( 80 , 56 ) ;
+ Pos = MAP_APPFONT ( 80 - OFFSET_X , 56 ) ;
+ //-->Modified by PengYunQuan for Validity Cell Range Picker
Size = MAP_APPFONT ( 90 , 90 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
@@ -126,54 +140,81 @@ TabPage TP_VALIDATION_VALUES
FixedText FT_MIN
{
Pos = MAP_APPFONT ( 6 , 76 ) ;
- Size = MAP_APPFONT ( 70 , 8 ) ;
+ //<!--Modified by PengYunQuan for Validity Cell Range Picker
+ //Size = MAP_APPFONT ( 70 , 8 ) ;
+ Size = MAP_APPFONT ( 70 - OFFSET_X , 8 ) ;
+ //-->Modified by PengYunQuan for Validity Cell Range Picker
Text [ en-US ] = "~Minimum" ;
};
Edit EDT_MIN
{
Border = TRUE ;
- Pos = MAP_APPFONT ( 80 , 74 ) ;
- Size = MAP_APPFONT ( 174 , 12 ) ;
+ //<!--Modified by PengYunQuan for Validity Cell Range Picker
+ //Pos = MAP_APPFONT ( 80 , 74 ) ;
+ //Size = MAP_APPFONT ( 174 , 12 ) ;
+ Pos = MAP_APPFONT ( 80 - OFFSET_X , 74 ) ;
+ Size = MAP_APPFONT ( 90 , 12 ) ;
+ //-->Modified by PengYunQuan for Validity Cell Range Picker
TabStop = TRUE ;
};
MultiLineEdit EDT_LIST
{
Border = TRUE ;
- Pos = MAP_APPFONT ( 80 , 74 ) ;
- Size = MAP_APPFONT ( 174 , 105 ) ;
+ //<!--Modified by PengYunQuan for Validity Cell Range Picker
+ //Pos = MAP_APPFONT ( 80 , 74 ) ;
+ //Size = MAP_APPFONT ( 174 , 105 ) ;
+ Pos = MAP_APPFONT ( 80 - OFFSET_X , 74 ) ;
+ Size = MAP_APPFONT ( 174 + OFFSET_X , 105 ) ;
+ //-->Modified by PengYunQuan for Validity Cell Range Picker
VScroll = TRUE ;
IgnoreTab = TRUE ;
};
FixedText FT_MAX
{
Pos = MAP_APPFONT ( 6 , 92 ) ;
- Size = MAP_APPFONT ( 70 , 8 ) ;
+ //<!--Modified by PengYunQuan for Validity Cell Range Picker
+ //Size = MAP_APPFONT ( 70 , 8 ) ;
+ Size = MAP_APPFONT ( 70 - OFFSET_X , 8 ) ;
+ //-->Modified by PengYunQuan for Validity Cell Range Picker
Text [ en-US ] = "Ma~ximum" ;
};
Edit EDT_MAX
{
Border = TRUE ;
- Pos = MAP_APPFONT ( 80 , 90 ) ;
- Size = MAP_APPFONT ( 174 , 12 ) ;
+ //<!--Modified by PengYunQuan for Validity Cell Range Picker
+ //Pos = MAP_APPFONT ( 80 , 90 ) ;
+ //Size = MAP_APPFONT ( 174 , 12 ) ;
+ Pos = MAP_APPFONT ( 80 - OFFSET_X , 90 ) ;
+ Size = MAP_APPFONT ( 90 , 12 ) ;
+ //-->Modified by PengYunQuan for Validity Cell Range Picker
TabStop = TRUE ;
};
CheckBox TSB_ALLOW_BLANKS
{
- Pos = MAP_APPFONT ( 80 , 30 ) ;
+ //<!--Modified by PengYunQuan for Validity Cell Range Picker
+ //Pos = MAP_APPFONT ( 80 , 30 ) ;
+ Pos = MAP_APPFONT ( 80 - OFFSET_X , 30 ) ;
+ //-->Modified by PengYunQuan for Validity Cell Range Picker
Size = MAP_APPFONT ( 174 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Allow ~blank cells" ;
};
CheckBox CB_SHOWLIST
{
- Pos = MAP_APPFONT ( 80 , 44 ) ;
+ //<!--Modified by PengYunQuan for Validity Cell Range Picker
+ //Pos = MAP_APPFONT ( 80 , 44 ) ;
+ Pos = MAP_APPFONT ( 80 - OFFSET_X , 44 ) ;
+ //-->Modified by PengYunQuan for Validity Cell Range Picker
Size = MAP_APPFONT ( 174 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Show selection ~list" ;
};
CheckBox CB_SORTLIST
{
- Pos = MAP_APPFONT ( 90 , 58 ) ;
+ //<!--Modified by PengYunQuan for Validity Cell Range Picker
+ //Pos = MAP_APPFONT ( 90 , 58 ) ;
+ Pos = MAP_APPFONT ( 90 - OFFSET_X , 58 ) ;
+ //-->Modified by PengYunQuan for Validity Cell Range Picker
Size = MAP_APPFONT ( 164 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Sor~t entries ascending" ;
@@ -185,6 +226,15 @@ TabPage TP_VALIDATION_VALUES
WordBreak = TRUE ;
Text [ en-US ] = "A valid source can only consist of a contiguous selection of rows and columns, or a formula that results in an area or array.";
};
+ //<!--Added by PengYunQuan for Validity Cell Range Picker
+ ImageButton RB_VALIDITY_REF
+ {
+ Pos = MAP_APPFONT ( 142 , 73 ) ;
+ Size = MAP_APPFONT ( 13 , 14 ) ;
+ TabStop = TRUE ;
+ QuickHelpText [ en-US ] = "Shrink" ;
+ };
+ //-->Added by PengYunQuan for Validity Cell Range Picker
};
TabPage TP_VALIDATION_INPUTHELP
diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx
index fd3a562ecb42..fc745318b105 100644
--- a/sc/source/ui/docshell/arealink.cxx
+++ b/sc/source/ui/docshell/arealink.cxx
@@ -40,7 +40,7 @@
#include <sfx2/fcontnr.hxx>
#include <sfx2/sfxsids.hrc>
#include <svx/linkmgr.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <vcl/msgbox.hxx>
#include "arealink.hxx"
@@ -172,6 +172,10 @@ void __EXPORT ScAreaLink::Closed()
bAddUndo = FALSE; // nur einmal
}
+ SCTAB nDestTab = aDestArea.aStart.Tab();
+ if (pDoc->IsStreamValid(nDestTab))
+ pDoc->SetStreamValid(nDestTab, FALSE);
+
SvBaseLink::Closed();
}
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 2c3989a1ae1a..acc9f16e7730 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -48,8 +48,8 @@
#include <vcl/sound.hxx>
#include <vcl/virdev.hxx>
#include <vcl/waitobj.hxx>
-#include <svtools/zforlist.hxx>
-#include <svtools/PasswordHelper.hxx>
+#include <svl/zforlist.hxx>
+#include <svl/PasswordHelper.hxx>
#include <list>
@@ -3177,6 +3177,9 @@ BOOL ScDocFunc::InsertPageBreak( BOOL bColumn, const ScAddress& rPos,
pDoc->SetRowFlags( static_cast<SCROW>(nPos), nTab, nFlags );
pDoc->UpdatePageBreaks( nTab );
+ if (pDoc->IsStreamValid(nTab))
+ pDoc->SetStreamValid(nTab, FALSE);
+
if (bColumn)
{
rDocShell.PostPaint( static_cast<SCCOL>(nPos)-1, 0, nTab, MAXCOL, MAXROW, nTab, PAINT_GRID );
@@ -3233,6 +3236,9 @@ BOOL ScDocFunc::RemovePageBreak( BOOL bColumn, const ScAddress& rPos,
pDoc->SetRowFlags( static_cast<SCROW>(nPos), nTab, nFlags );
pDoc->UpdatePageBreaks( nTab );
+ if (pDoc->IsStreamValid(nTab))
+ pDoc->SetStreamValid(nTab, FALSE);
+
if (bColumn)
{
rDocShell.PostPaint( static_cast<SCCOL>(nPos)-1, 0, nTab, MAXCOL, MAXROW, nTab, PAINT_GRID );
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index f7d1e2ccae2f..17cb07ca0a49 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -42,7 +42,7 @@
#include <sot/clsids.hxx>
-#include <svtools/securityoptions.hxx>
+#include <unotools/securityoptions.hxx>
#include <tools/stream.hxx>
#include <tools/string.hxx>
#include <tools/urlobj.hxx>
@@ -51,7 +51,7 @@
#include <vcl/waitobj.hxx>
#include <svtools/ctrltool.hxx>
#include <svtools/sfxecode.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <sfx2/app.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/dinfdlg.hxx>
@@ -63,10 +63,9 @@
#include <sfx2/topfrm.hxx>
#include <sfx2/objface.hxx>
#include <svx/srchitem.hxx>
-#include <svx/svxmsbas.hxx>
-#include <svtools/fltrcfg.hxx>
-#include <svtools/documentlockfile.hxx>
-#include <svtools/sharecontrolfile.hxx>
+#include <unotools/fltrcfg.hxx>
+#include <svl/documentlockfile.hxx>
+#include <svl/sharecontrolfile.hxx>
#include <unotools/charclass.hxx>
#include <vcl/virdev.hxx>
#include "chgtrack.hxx"
@@ -128,7 +127,8 @@
#include <rtl/logfile.hxx>
#include <comphelper/processfactory.hxx>
-
+#include <basic/sbstar.hxx>
+#include <basic/basmgr.hxx>
using namespace com::sun::star;
// STATIC DATA -----------------------------------------------------------
@@ -358,6 +358,26 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet)
}
else
aDocument.SetInsertingFromOtherDoc( FALSE );
+ // add vba globals ( if they are availabl )
+ uno::Any aGlobs;
+ uno::Sequence< uno::Any > aArgs(1);
+ aArgs[ 0 ] <<= GetModel();
+ aGlobs <<= ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.excel.Globals" ) ), aArgs );
+ GetBasicManager()->SetGlobalUNOConstant( "VBAGlobals", aGlobs );
+ // Fake ThisComponent being setup by Activate ( which is a view
+ // related thing ),
+ // a) if another document is opened then in theory ThisComponent
+ // will be reset as before,
+ // b) when this document is 'really' Activated then ThisComponent
+ // again will be set as before
+ // The only wrinkle seems if this document is loaded 'InVisible'
+ // but.. I don't see that this is possible from the vba API
+ // I could be wrong though
+ // There may be implications setting the current component
+ // too early :-/ so I will just manually set the Basic Variables
+ BasicManager* pAppMgr = SFX_APP()->GetBasicManager();
+ if ( pAppMgr )
+ pAppMgr->SetGlobalUNOConstant( "ThisExcelDoc", aArgs[ 0 ] );
aDocument.SetImportingXML( FALSE );
aDocument.EnableExecuteLink( true );
@@ -2390,9 +2410,9 @@ void ScDocShell::SetDrawModified( BOOL bIsModified /* = TRUE */ )
SetModified( bIsModified );
+ SfxBindings* pBindings = GetViewBindings();
if (bUpdate)
{
- SfxBindings* pBindings = GetViewBindings();
if (pBindings)
{
pBindings->Invalidate( SID_SAVEDOC );
@@ -2402,6 +2422,16 @@ void ScDocShell::SetDrawModified( BOOL bIsModified /* = TRUE */ )
if (bIsModified)
{
+ if (pBindings)
+ {
+ // #i105960# Undo etc used to be volatile.
+ // They always have to be invalidated, including drawing layer or row height changes
+ // (but not while pPaintLockData is set).
+ pBindings->Invalidate( SID_UNDO );
+ pBindings->Invalidate( SID_REDO );
+ pBindings->Invalidate( SID_REPEAT );
+ }
+
if ( aDocument.IsChartListenerCollectionNeedsUpdate() )
{
aDocument.UpdateChartListenerCollection();
@@ -2549,3 +2579,16 @@ void ScDocShellModificator::SetDocumentModified()
pDoc->BroadcastUno( SfxSimpleHint( SFX_HINT_DATACHANGED ) );
}
}
+
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+sal_Bool ScDocShell::AcceptStateUpdate() const
+{
+ if( SfxObjectShell::AcceptStateUpdate() )
+ return sal_True;
+
+ if( SC_MOD()->Find1RefWindow( SFX_APP()->GetTopWindow() ) )
+ return sal_True;
+
+ return sal_False;
+}
+//-->Added by PengYunQuan for Validity Cell Range Picker
diff --git a/sc/source/ui/docshell/docsh2.cxx b/sc/source/ui/docshell/docsh2.cxx
index 7f213175a075..386ac8528cec 100644
--- a/sc/source/ui/docshell/docsh2.cxx
+++ b/sc/source/ui/docshell/docsh2.cxx
@@ -43,7 +43,7 @@
#include <svx/flstitem.hxx>
#include <svx/drawitem.hxx>
#include <sfx2/printer.hxx>
-#include <svtools/smplhint.hxx>
+#include <svl/smplhint.hxx>
#include <svx/svditer.hxx>
#include <svx/svdobj.hxx>
#include <svx/svdoole2.hxx>
@@ -53,7 +53,10 @@
#include <svx/unolingu.hxx>
#include <rtl/logfile.hxx>
-
+#include <comphelper/processfactory.hxx>
+#include <basic/sbstar.hxx>
+#include <basic/basmgr.hxx>
+#include <sfx2/app.hxx>
// INCLUDE ---------------------------------------------------------------
/*
@@ -102,6 +105,25 @@ BOOL __EXPORT ScDocShell::InitNew( const uno::Reference < embed::XStorage >& xSt
InitItems();
CalcOutputFactor();
+ uno::Any aGlobs;
+ uno::Sequence< uno::Any > aArgs(1);
+ aArgs[ 0 ] <<= GetModel();
+ aGlobs <<= ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.excel.Globals" ) ), aArgs );
+ GetBasicManager()->SetGlobalUNOConstant( "VBAGlobals", aGlobs );
+ // Fake ThisComponent being setup by Activate ( which is a view
+ // related thing ),
+ // a) if another document is opened then in theory ThisComponent
+ // will be reset as before,
+ // b) when this document is 'really' Activated then ThisComponent
+ // again will be set as before
+ // The only wrinkle seems if this document is loaded 'InVisible'
+ // but.. I don't see that this is possible from the vba API
+ // I could be wrong though
+ // There may be implications setting the current component
+ // too early :-/ so I will just manually set the Basic Variables
+ BasicManager* pAppMgr = SFX_APP()->GetBasicManager();
+ if ( pAppMgr )
+ pAppMgr->SetGlobalUNOConstant( "ThisExcelDoc", aArgs[ 0 ] );
return bRet;
}
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index 380f4635cdcf..1416c57f1165 100644
--- a/sc/source/ui/docshell/docsh3.cxx
+++ b/sc/source/ui/docshell/docsh3.cxx
@@ -44,13 +44,11 @@
#include <svx/pageitem.hxx>
#include <svx/paperinf.hxx>
#include <svx/postattr.hxx>
-//#include <svx/postdlg.hxx>
#include <svx/sizeitem.hxx>
-
+#include <unotools/misccfg.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/app.hxx>
#include <sfx2/docfile.hxx>
-#include <svtools/misccfg.hxx>
#include <sfx2/printer.hxx>
#include <svtools/ctrltool.hxx>
#include <vcl/virdev.hxx>
@@ -443,7 +441,7 @@ void ScDocShell::InitOptions() // Fortsetzung von InitNew (CLOOKs)
aDocOpt.SetAutoSpell( bAutoSpell );
// zweistellige Jahreszahleneingabe aus Extras->Optionen->Allgemein->Sonstiges
- aDocOpt.SetYear2000( sal::static_int_cast<USHORT>( SFX_APP()->GetMiscConfig()->GetYear2000() ) );
+ aDocOpt.SetYear2000( sal::static_int_cast<USHORT>( ::utl::MiscCfg().GetYear2000() ) );
aDocument.SetDocOptions( aDocOpt );
aDocument.SetViewOptions( aViewOpt );
@@ -968,7 +966,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
// -> wird weggelassen
//! ??? Loesch-Aktion rueckgaengig machen ???
//! ??? Aktion irgendwo anders speichern ???
-#ifndef PRODUCT
+#ifdef DBG_UTIL
String aValue;
if ( eSourceType == SC_CAT_CONTENT )
((const ScChangeActionContent*)pSourceAction)->GetNewString( aValue );
@@ -1126,7 +1124,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
ScChangeAction* pAct = pThisTrack->GetLast();
if ( pAct && pAct->GetActionNumber() > nOldActionMax )
pAct->SetComment( rComment );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
else
DBG_ERROR( "MergeDocument: wohin mit dem Kommentar?!?" );
#endif
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 80b0c76a64be..4827366d3924 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -60,7 +60,7 @@ using namespace ::com::sun::star;
#include <svx/ofaitem.hxx>
#include <sot/formats.hxx>
#include <svtools/printdlg.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/whiter.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/waitobj.hxx>
#include <tools/multisel.hxx>
@@ -73,9 +73,9 @@ using namespace ::com::sun::star;
#include <sfx2/passwd.hxx>
#include <sfx2/filedlghelper.hxx>
#include <sfx2/docinsert.hxx>
-#include <svtools/PasswordHelper.hxx>
-#include <svtools/documentlockfile.hxx>
-#include <svtools/sharecontrolfile.hxx>
+#include <svl/PasswordHelper.hxx>
+#include <svl/documentlockfile.hxx>
+#include <svl/sharecontrolfile.hxx>
#include <comphelper/processfactory.hxx>
#include "docuno.hxx"
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index b7c726deeb71..b4b5f4721900 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -42,7 +42,7 @@
#include <vcl/waitobj.hxx>
#include <sfx2/app.hxx>
#include <sfx2/bindings.hxx>
-#include <svtools/smplhint.hxx>
+#include <svl/smplhint.hxx>
#include <com/sun/star/sdbc/XResultSet.hpp>
@@ -840,8 +840,9 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec
ScDocShellModificator aModificator( *this );
// #i92477# be consistent with ScDocFunc::InsertTable: any index past the last sheet means "append"
+ // #i101139# nDestTab must be the target position, not APPEND (for CopyTabProtection etc.)
if ( nDestTab >= aDocument.GetTableCount() )
- nDestTab = SC_TAB_APPEND;
+ nDestTab = aDocument.GetTableCount();
if (bCopy)
{
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index d58777b9b5d5..174207bbf673 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -37,8 +37,8 @@
#include <stdio.h>
#include <tools/urlobj.hxx>
-#include <svtools/converter.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/converter.hxx>
+#include <svl/zforlist.hxx>
#include <comphelper/types.hxx>
#include <ucbhelper/content.hxx>
#include <unotools/sharedunocomponent.hxx>
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index 5cfc833be5dd..e18ef20d96b9 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -55,12 +55,12 @@
#include "sfx2/fcontnr.hxx"
#include "sfx2/sfxsids.hrc"
#include "sfx2/objsh.hxx"
-#include "svtools/broadcast.hxx"
-#include "svtools/smplhint.hxx"
-#include "svtools/itemset.hxx"
-#include "svtools/stritem.hxx"
-#include "svtools/urihelper.hxx"
-#include "svtools/zformat.hxx"
+#include "svl/broadcast.hxx"
+#include "svl/smplhint.hxx"
+#include "svl/itemset.hxx"
+#include "svl/stritem.hxx"
+#include "svl/urihelper.hxx"
+#include "svl/zformat.hxx"
#include "svx/linkmgr.hxx"
#include "tools/urlobj.hxx"
#include "unotools/ucbhelper.hxx"
@@ -384,11 +384,6 @@ ScExternalRefCache::TokenArrayRef ScExternalRefCache::getCellRangeData(
return TokenArrayRef();
DocItem& rDoc = itrDoc->second;
- RangeArrayMap::const_iterator itrRange = rDoc.maRangeArrays.find(rRange);
- if (itrRange != rDoc.maRangeArrays.end())
- {
- return itrRange->second;
- }
TableNameIndexMap::iterator itrTabId = rDoc.maTableNameIndex.find(
ScGlobal::pCharClass->upper(rTabName));
@@ -410,6 +405,13 @@ ScExternalRefCache::TokenArrayRef ScExternalRefCache::getCellRangeData(
// not all tables are cached.
return TokenArrayRef();
+ ScRange aCacheRange( nCol1, nRow1, static_cast<SCTAB>(nTabFirstId), nCol2, nRow2, static_cast<SCTAB>(nTabLastId));
+ RangeArrayMap::const_iterator itrRange = rDoc.maRangeArrays.find( aCacheRange);
+ if (itrRange != rDoc.maRangeArrays.end())
+ {
+ return itrRange->second;
+ }
+
TokenArrayRef pArray(new ScTokenArray);
bool bFirstTab = true;
for (size_t nTab = nTabFirstId; nTab <= nTabLastId; ++nTab)
@@ -462,7 +464,7 @@ ScExternalRefCache::TokenArrayRef ScExternalRefCache::getCellRangeData(
bFirstTab = false;
}
- rDoc.maRangeArrays.insert(RangeArrayMap::value_type(rRange, pArray));
+ rDoc.maRangeArrays.insert( RangeArrayMap::value_type( aCacheRange, pArray));
return pArray;
}
@@ -545,13 +547,13 @@ void ScExternalRefCache::setCellRangeData(sal_uInt16 nFileId, const ScRange& rRa
return;
}
- size_t nTab1 = itrTabName->second;
+ size_t nTabFirstId = itrTabName->second;
SCROW nRow1 = rRange.aStart.Row(), nRow2 = rRange.aEnd.Row();
SCCOL nCol1 = rRange.aStart.Col(), nCol2 = rRange.aEnd.Col();
vector<SingleRangeData>::const_iterator itrDataBeg = rData.begin(), itrDataEnd = rData.end();
for (vector<SingleRangeData>::const_iterator itrData = itrDataBeg; itrData != itrDataEnd; ++itrData)
{
- size_t i = nTab1 + ::std::distance(itrDataBeg, itrData);
+ size_t i = nTabFirstId + ::std::distance(itrDataBeg, itrData);
TableTypeRef& pTabData = rDoc.maTables[i];
if (!pTabData.get())
pTabData.reset(new Table);
@@ -575,7 +577,9 @@ void ScExternalRefCache::setCellRangeData(sal_uInt16 nFileId, const ScRange& rRa
}
}
- rDoc.maRangeArrays.insert(RangeArrayMap::value_type(rRange, pArray));
+ size_t nTabLastId = nTabFirstId + rRange.aEnd.Tab() - rRange.aStart.Tab();
+ ScRange aCacheRange( nCol1, nRow1, static_cast<SCTAB>(nTabFirstId), nCol2, nRow2, static_cast<SCTAB>(nTabLastId));
+ rDoc.maRangeArrays.insert( RangeArrayMap::value_type( aCacheRange, pArray));
}
bool ScExternalRefCache::isDocInitialized(sal_uInt16 nFileId)
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 1561e4c6efeb..25a1c867b0e3 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -53,9 +53,9 @@ class StarBASIC;
#include <tools/string.hxx>
#include <rtl/math.hxx>
#include <svtools/htmlout.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#define _SVSTDARR_ULONGS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <sot/formats.hxx>
#include <sfx2/mieclip.hxx>
#include <unotools/charclass.hxx>
diff --git a/sc/source/ui/docshell/olinefun.cxx b/sc/source/ui/docshell/olinefun.cxx
index 1da178aaa0c2..20ffb63f43fd 100644
--- a/sc/source/ui/docshell/olinefun.cxx
+++ b/sc/source/ui/docshell/olinefun.cxx
@@ -137,6 +137,9 @@ BOOL ScOutlineDocFunc::MakeOutline( const ScRange& rRange, BOOL bColumns, BOOL b
pUndoTab, bColumns, TRUE ) );
}
+ if (pDoc->IsStreamValid(nTab))
+ pDoc->SetStreamValid(nTab, FALSE);
+
USHORT nParts = 0; // Datenbereich nicht geaendert
if ( bColumns )
nParts |= PAINT_TOP;
@@ -200,6 +203,9 @@ BOOL ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, BOOL bColumns, BOOL
pUndoTab, bColumns, FALSE ) );
}
+ if (pDoc->IsStreamValid(nTab))
+ pDoc->SetStreamValid(nTab, FALSE);
+
USHORT nParts = 0; // Datenbereich nicht geaendert
if ( bColumns )
nParts |= PAINT_TOP;
@@ -265,6 +271,9 @@ BOOL ScOutlineDocFunc::RemoveAllOutlines( SCTAB nTab, BOOL bRecord, BOOL bApi )
pDoc->UpdatePageBreaks( nTab );
+ if (pDoc->IsStreamValid(nTab))
+ pDoc->SetStreamValid(nTab, FALSE);
+
rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab,
PAINT_GRID | PAINT_LEFT | PAINT_TOP | PAINT_SIZE );
rDocShell.SetDocumentModified();
@@ -333,6 +342,9 @@ BOOL ScOutlineDocFunc::AutoOutline( const ScRange& rRange, BOOL bRecord, BOOL bA
pUndoDoc, pUndoTab ) );
}
+ if (pDoc->IsStreamValid(nTab))
+ pDoc->SetStreamValid(nTab, FALSE);
+
rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_LEFT | PAINT_TOP | PAINT_SIZE );
rDocShell.SetDocumentModified();
lcl_InvalidateOutliner( rDocShell.GetViewBindings() );
diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx
index 570d41f7885d..c86c7591cd36 100644
--- a/sc/source/ui/docshell/tablink.cxx
+++ b/sc/source/ui/docshell/tablink.cxx
@@ -42,8 +42,8 @@
#include <sfx2/sfxsids.hrc>
#include <sfx2/app.hxx>
-#include <svtools/itemset.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/itemset.hxx>
+#include <svl/stritem.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/docfilt.hxx>
#include <sfx2/fcontnr.hxx>
diff --git a/sc/source/ui/drawfunc/chartsh.cxx b/sc/source/ui/drawfunc/chartsh.cxx
index 7bb3c92dbc9c..e4d39e21d7be 100644
--- a/sc/source/ui/drawfunc/chartsh.cxx
+++ b/sc/source/ui/drawfunc/chartsh.cxx
@@ -44,7 +44,7 @@
#include <sfx2/app.hxx>
#include <sfx2/objface.hxx>
#include <sfx2/request.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/whiter.hxx>
#include <vcl/msgbox.hxx>
#include "chartsh.hxx"
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 63f958763479..e53fea436d12 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -48,7 +48,7 @@
#include <sfx2/objsh.hxx>
#include <sfx2/request.hxx>
#include <sfx2/dispatch.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/whiter.hxx>
#include <vcl/msgbox.hxx>
#include "drawsh.hxx"
@@ -71,7 +71,7 @@
#include "userdat.hxx"
#include <sfx2/objsh.hxx>
-#include <svtools/macitem.hxx>
+#include <svl/macitem.hxx>
#include <sfx2/evntconf.hxx>
#include <sfx2/viewsh.hxx>
#include <com/sun/star/util/XModifiable.hpp>
@@ -266,7 +266,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if ( pFact )
{
- SfxAbstractTabDialog *pDlg = pFact->CreateCaptionDialog( pWin, pView, RID_SVXDLG_CAPTION );
+ SfxAbstractTabDialog *pDlg = pFact->CreateCaptionDialog( pWin, pView );
const USHORT* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() );
SfxItemSet aCombSet( *aNewAttr.GetPool(), pRange );
@@ -291,7 +291,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
- SfxAbstractTabDialog* pDlg = pFact->CreateSvxTransformTabDialog( pWin, &aNewAttr,pView, RID_SVXDLG_TRANSFORM );
+ SfxAbstractTabDialog* pDlg = pFact->CreateSvxTransformTabDialog( pWin, &aNewAttr,pView );
DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001
if (pDlg->Execute() == RET_OK)
{
@@ -398,7 +398,6 @@ void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq, USHORT nTabPage )
SfxAbstractTabDialog * pDlg = pFact->CreateSvxLineTabDialog( pViewData->GetDialogParent(),
&aNewAttr,
pViewData->GetDocument()->GetDrawLayer(),
- RID_SVXDLG_LINE,
pObj,
bHasMarked);
DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001
@@ -439,7 +438,6 @@ void ScDrawShell::ExecuteAreaDlg( SfxRequest& rReq, USHORT nTabPage )
AbstractSvxAreaTabDialog * pDlg = pFact->CreateSvxAreaTabDialog( pViewData->GetDialogParent(),
&aNewAttr,
pViewData->GetDocument()->GetDrawLayer(),
- RID_SVXDLG_AREA,
pView);
DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001
@@ -477,7 +475,7 @@ void ScDrawShell::ExecuteTextAttrDlg( SfxRequest& rReq, USHORT /* nTabPage */ )
pView->MergeAttrFromMarked( aNewAttr, FALSE );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- SfxAbstractTabDialog *pDlg = pFact->CreateTextTabDialog( pViewData->GetDialogParent(), &aNewAttr, RID_SVXDLG_TEXT, pView );
+ SfxAbstractTabDialog *pDlg = pFact->CreateTextTabDialog( pViewData->GetDialogParent(), &aNewAttr, pView );
USHORT nResult = pDlg->Execute();
diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx
index 4507bc471ebc..ad36ad72e796 100644
--- a/sc/source/ui/drawfunc/drawsh2.cxx
+++ b/sc/source/ui/drawfunc/drawsh2.cxx
@@ -42,8 +42,8 @@
#include <sfx2/app.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/viewfrm.hxx>
-#include <svtools/ptitem.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/ptitem.hxx>
+#include <svl/whiter.hxx>
#include <svx/svdobj.hxx>
#include <svx/svdouno.hxx>
#include <svx/extrusionbar.hxx>
diff --git a/sc/source/ui/drawfunc/drawsh5.cxx b/sc/source/ui/drawfunc/drawsh5.cxx
index 26e5e6cb9b2e..5d8e4cb1ca33 100644
--- a/sc/source/ui/drawfunc/drawsh5.cxx
+++ b/sc/source/ui/drawfunc/drawsh5.cxx
@@ -522,7 +522,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet fail!");
- AbstractSvxObjectNameDialog* pDlg = pFact->CreateSvxObjectNameDialog(NULL, aName, RID_SVXDLG_OBJECT_NAME);
+ AbstractSvxObjectNameDialog* pDlg = pFact->CreateSvxObjectNameDialog(NULL, aName);
OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->SetCheckNameHdl(LINK(this, ScDrawShell, NameObjectHdl));
@@ -593,7 +593,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet fail!");
- AbstractSvxObjectTitleDescDialog* pDlg = pFact->CreateSvxObjectTitleDescDialog(NULL, aTitle, aDescription, RID_SVXDLG_OBJECT_TITLE_DESC);
+ AbstractSvxObjectTitleDescDialog* pDlg = pFact->CreateSvxObjectTitleDescDialog(NULL, aTitle, aDescription);
OSL_ENSURE(pDlg, "Dialogdiet fail!");
if(RET_OK == pDlg->Execute())
diff --git a/sc/source/ui/drawfunc/drformsh.cxx b/sc/source/ui/drawfunc/drformsh.cxx
index 5e4d5640f74a..8987c9194cb2 100644
--- a/sc/source/ui/drawfunc/drformsh.cxx
+++ b/sc/source/ui/drawfunc/drformsh.cxx
@@ -45,7 +45,7 @@
#include <sfx2/app.hxx>
#include <sfx2/objface.hxx>
#include <sfx2/request.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/whiter.hxx>
#include <vcl/msgbox.hxx>
#include "drformsh.hxx"
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index d241843f9745..908eba68cee5 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -65,8 +65,8 @@
#include <sfx2/viewfrm.hxx>
#include <svtools/cliplistener.hxx>
#include <svtools/transfer.hxx>
-#include <svtools/whiter.hxx>
-#include <svtools/languageoptions.hxx>
+#include <svl/whiter.hxx>
+#include <svl/languageoptions.hxx>
#include <vcl/msgbox.hxx>
#include <svx/svxdlg.hxx>
@@ -799,7 +799,7 @@ void __EXPORT ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq )
case SID_DRAWTEXT_ATTR_DLG:
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- SfxAbstractTabDialog *pDlg = pFact->CreateTextTabDialog( pViewData->GetDialogParent(), &aEditAttr, RID_SVXDLG_TEXT, pView );
+ SfxAbstractTabDialog *pDlg = pFact->CreateTextTabDialog( pViewData->GetDialogParent(), &aEditAttr, pView );
bDone = ( RET_OK == pDlg->Execute() );
diff --git a/sc/source/ui/drawfunc/drtxtob2.cxx b/sc/source/ui/drawfunc/drtxtob2.cxx
index d05e0568c1ca..3389c362901b 100644
--- a/sc/source/ui/drawfunc/drtxtob2.cxx
+++ b/sc/source/ui/drawfunc/drtxtob2.cxx
@@ -45,7 +45,7 @@
#include <sfx2/objsh.hxx>
#include <sfx2/request.hxx>
#include <sot/formats.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/whiter.hxx>
#include "sc.hrc"
#include "drtxtob.hxx"
diff --git a/sc/source/ui/drawfunc/fuconcustomshape.cxx b/sc/source/ui/drawfunc/fuconcustomshape.cxx
index fd6fc1ff3e41..0398d5a63b43 100644
--- a/sc/source/ui/drawfunc/fuconcustomshape.cxx
+++ b/sc/source/ui/drawfunc/fuconcustomshape.cxx
@@ -36,7 +36,7 @@
#include <svx/gallery.hxx>
#include <sfx2/request.hxx>
#include <svx/fmmodel.hxx>
-#include <svtools/itempool.hxx>
+#include <svl/itempool.hxx>
#include <svx/svdpage.hxx>
#include <svx/svdoashp.hxx>
#include <svx/eeitem.hxx>
diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx
index 3274b6752c95..35d46f234182 100644
--- a/sc/source/ui/drawfunc/fuins1.cxx
+++ b/sc/source/ui/drawfunc/fuins1.cxx
@@ -39,7 +39,7 @@
#include <svx/svdpagv.hxx>
#include <svx/svdview.hxx>
#include <svtools/filter.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <vcl/msgbox.hxx>
#include <tools/urlobj.hxx>
#include <avmedia/mediawindow.hxx>
diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx
index 93abbd48c9e7..1f7534a7fcb4 100644
--- a/sc/source/ui/drawfunc/fuins2.cxx
+++ b/sc/source/ui/drawfunc/fuins2.cxx
@@ -40,16 +40,16 @@
#include <toolkit/helper/vclunohelper.hxx>
#include <sot/exchange.hxx>
-#include <svtools/globalnameitem.hxx>
+#include <svl/globalnameitem.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/docfile.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <svx/svdoole2.hxx>
#include <svx/pfiledlg.hxx>
#include <tools/urlobj.hxx>
#include <vcl/msgbox.hxx>
-#include <svtools/urihelper.hxx>
-#include <svtools/moduleoptions.hxx>
+#include <svl/urihelper.hxx>
+#include <unotools/moduleoptions.hxx>
#include <svtools/insdlg.hxx>
#include <svtools/soerr.hxx>
#include <svx/svxdlg.hxx>
diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx
index ebcb2ad30802..a96ce6c18980 100644
--- a/sc/source/ui/drawfunc/futext.cxx
+++ b/sc/source/ui/drawfunc/futext.cxx
@@ -44,7 +44,7 @@
#include <sfx2/viewfrm.hxx>
#include <svx/svxids.hrc>
#include <svx/eeitem.hxx>
-#include <svtools/itemset.hxx>
+#include <svl/itemset.hxx>
#include "futext.hxx"
#include "drwlayer.hxx"
diff --git a/sc/source/ui/drawfunc/graphsh.cxx b/sc/source/ui/drawfunc/graphsh.cxx
index 39b27609e3a8..34c32fb8bc08 100644
--- a/sc/source/ui/drawfunc/graphsh.cxx
+++ b/sc/source/ui/drawfunc/graphsh.cxx
@@ -38,7 +38,7 @@
#include <sfx2/app.hxx>
#include <sfx2/objface.hxx>
#include <sfx2/request.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/whiter.hxx>
#include <svx/svdograf.hxx>
#include <svx/grfflt.hxx>
#include <svx/grafctrl.hxx>
diff --git a/sc/source/ui/drawfunc/mediash.cxx b/sc/source/ui/drawfunc/mediash.cxx
index 16dcfd9f1cf7..9469cd43c96e 100644
--- a/sc/source/ui/drawfunc/mediash.cxx
+++ b/sc/source/ui/drawfunc/mediash.cxx
@@ -35,7 +35,7 @@
#include <sfx2/objface.hxx>
#include <sfx2/request.hxx>
#include <avmedia/mediaitem.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/whiter.hxx>
#include <svx/svdomedia.hxx>
#include <svx/sdr/contact/viewcontactofsdrmediaobj.hxx>
diff --git a/sc/source/ui/drawfunc/oleobjsh.cxx b/sc/source/ui/drawfunc/oleobjsh.cxx
index a0c5bd6d818f..c9da807019c9 100644
--- a/sc/source/ui/drawfunc/oleobjsh.cxx
+++ b/sc/source/ui/drawfunc/oleobjsh.cxx
@@ -45,7 +45,7 @@
#include <sfx2/app.hxx>
#include <sfx2/objface.hxx>
#include <sfx2/request.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/whiter.hxx>
#include <vcl/msgbox.hxx>
#include "oleobjsh.hxx"
diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx
index 8d631a9f0609..f9146b96c04c 100644
--- a/sc/source/ui/formdlg/formula.cxx
+++ b/sc/source/ui/formdlg/formula.cxx
@@ -39,8 +39,8 @@
#include <sfx2/dispatch.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/objsh.hxx>
-#include <svtools/zforlist.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/zforlist.hxx>
+#include <svl/stritem.hxx>
#include <svtools/svtreebx.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/topfrm.hxx>
diff --git a/sc/source/ui/inc/AccessibilityHints.hxx b/sc/source/ui/inc/AccessibilityHints.hxx
index 8448654014c7..e89069ade49a 100644
--- a/sc/source/ui/inc/AccessibilityHints.hxx
+++ b/sc/source/ui/inc/AccessibilityHints.hxx
@@ -33,8 +33,8 @@
#include "viewdata.hxx"
#include <com/sun/star/uno/XInterface.hpp>
-#include <svtools/smplhint.hxx>
-#include <svtools/hint.hxx>
+#include <svl/smplhint.hxx>
+#include <svl/hint.hxx>
#define SC_HINT_ACC_SIMPLE_START SFX_HINT_USER00
#define SC_HINT_ACC_TABLECHANGED SC_HINT_ACC_SIMPLE_START + 1
diff --git a/sc/source/ui/inc/AccessibleContextBase.hxx b/sc/source/ui/inc/AccessibleContextBase.hxx
index 8d312a0d13d9..98f2afc8e88d 100644
--- a/sc/source/ui/inc/AccessibleContextBase.hxx
+++ b/sc/source/ui/inc/AccessibleContextBase.hxx
@@ -50,7 +50,7 @@
#include <cppuhelper/interfacecontainer.h>
-#include <svtools/lstner.hxx>
+#include <svl/lstner.hxx>
#include <cppuhelper/compbase5.hxx>
#include <cppuhelper/implbase1.hxx>
#include <comphelper/servicehelper.hxx>
diff --git a/sc/source/ui/inc/DrawModelBroadcaster.hxx b/sc/source/ui/inc/DrawModelBroadcaster.hxx
index 7bb71854443c..fac00ea550e4 100644
--- a/sc/source/ui/inc/DrawModelBroadcaster.hxx
+++ b/sc/source/ui/inc/DrawModelBroadcaster.hxx
@@ -32,7 +32,7 @@
#define _SC_DRAWMODELBROADCASTER_HXX
-#include <svtools/lstner.hxx>
+#include <svl/lstner.hxx>
#include <cppuhelper/interfacecontainer.h>
#include <cppuhelper/implbase1.hxx>
#include <com/sun/star/document/XEventBroadcaster.hpp>
diff --git a/sc/source/ui/inc/acredlin.hxx b/sc/source/ui/inc/acredlin.hxx
index 7986935ae9c3..cdde064fc588 100644
--- a/sc/source/ui/inc/acredlin.hxx
+++ b/sc/source/ui/inc/acredlin.hxx
@@ -55,7 +55,7 @@
#ifndef _SVARRAY_HXX
#define _SVARRAY_HXX
-#include <svtools/svarray.hxx>
+#include <svl/svarray.hxx>
#endif
#include "chgtrack.hxx"
#include "chgviset.hxx"
diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx
index 9e2d833b27d0..18125076d5cf 100644
--- a/sc/source/ui/inc/anyrefdg.hxx
+++ b/sc/source/ui/inc/anyrefdg.hxx
@@ -42,19 +42,28 @@
#endif
#include <sfx2/basedlgs.hxx>
#include "address.hxx"
+#include "cell.hxx"
+#include "compiler.hxx"
#include "formula/funcutl.hxx"
#include "IAnyRefDialog.hxx"
+#include "scresid.hxx"
#include <memory>
class SfxObjectShell;
class ScRange;
class ScDocument;
class ScTabViewShell;
-class ScAnyRefDlg;
-class ScFormulaCell;
-class ScCompiler;
+//The class of ScAnyRefDlg is rewritten by PengYunQuan for Validity Cell Range Picker
+//class ScAnyRefDlg;
+class ScRefHandler;
class ScRangeList;
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+class SfxShell;
+#include "scmod.hxx"
+typedef formula::RefButton ScRefButton;
+typedef formula::RefEdit ScRefEdit;
+//-->Added by PengYunQuan for Validity Cell Range Picker
class ScFormulaReferenceHelper
{
IAnyRefDialog* m_pDlg;
@@ -104,12 +113,28 @@ public:
void ViewShellChanged( ScTabViewShell* pScViewShell );
static void enableInput(BOOL _bInput);
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+protected:
+ Window * GetWindow(){ return m_pWindow; }
+public:
+ bool CanInputStart( const ScRefEdit *pEdit ){ return !!pEdit; }
+ bool CanInputDone( BOOL bForced ){ return pRefEdit && (bForced || !pRefBtn); }
+//<!--Added by PengYunQuan for Validity Cell Range Picker
};
//============================================================================
-class ScAnyRefDlg : public SfxModelessDialog,
+//The class of ScAnyRefDlg is rewritten by PengYunQuan for Validity Cell Range Picker
+class SC_DLLPUBLIC ScRefHandler : //public SfxModelessDialog,
public IAnyRefDialog
{
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+ Window & m_rWindow;
+ bool m_bInRefMode;
+public:
+ operator Window *(){ return &m_rWindow; }
+ Window * operator ->() { return static_cast<Window *>(*this); }
+ template<class,bool> friend class ScRefHdlrImplBase;
+//-->Added by PengYunQuan for Validity Cell Range Picker
friend class formula::RefButton;
friend class formula::RefEdit;
@@ -130,7 +155,8 @@ protected:
void SetDispatcherLock( BOOL bLock );
- virtual long PreNotify( NotifyEvent& rNEvt );
+ //Overwrite TWindow will implemented by ScRefHdlrImplBase
+ //virtual long PreNotify( NotifyEvent& rNEvt );
virtual void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
virtual void RefInputDone( BOOL bForced = FALSE );
@@ -140,9 +166,9 @@ protected:
bool ParseWithNames( ScRangeList& rRanges, const String& rStr, ScDocument* pDoc );
public:
- ScAnyRefDlg( SfxBindings* pB, SfxChildWindow* pCW,
- Window* pParent, USHORT nResId);
- virtual ~ScAnyRefDlg();
+ ScRefHandler( Window &rWindow, SfxBindings* pB/*, SfxChildWindow* pCW,
+ Window* pParent, USHORT nResId*/, bool bBindRef );
+ virtual ~ScRefHandler();
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) = 0;
virtual void AddRefEntry();
@@ -159,15 +185,100 @@ public:
virtual void ViewShellChanged( ScTabViewShell* pScViewShell );
void SwitchToDocument();
- SfxBindings& GetBindings();
+ //SfxBindings& GetBindings();
virtual void SetActive() = 0;
// virtual BOOL Close();
+ //Overwrite TWindow will implemented by ScRefHdlrImplBase
+ //virtual void StateChanged( StateChangedType nStateChange );
+
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+public:
+ bool EnterRefMode();
+ bool LeaveRefMode();
+ inline bool CanInputStart( const ScRefEdit *pEdit );
+ inline bool CanInputDone( BOOL bForced );
+//-->Added by PengYunQuan for Validity Cell Range Picker
+};
+
+
+//============================================================================
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+template< class TWindow, bool bBindRef = true >
+class ScRefHdlrImplBase:public TWindow, public ScRefHandler
+{
+public:
+ //Overwrite TWindow
+ virtual long PreNotify( NotifyEvent& rNEvt );
virtual void StateChanged( StateChangedType nStateChange );
+
+private:
+ template<class TBindings, class TChildWindow, class TParentWindow, class TResId>
+ ScRefHdlrImplBase( TBindings* pB, TChildWindow* pCW,
+ TParentWindow* pParent, TResId nResId);
+
+ template<class TParentWindow, class TResId, class TArg>
+ ScRefHdlrImplBase( TParentWindow* pParent, TResId nResId, const TArg &rArg, SfxBindings *pB = NULL );
+
+ ~ScRefHdlrImplBase();
+
+ template<class, class, bool> friend struct ScRefHdlrImpl;
};
+template<class TWindow, bool bBindRef>
+template<class TBindings, class TChildWindow, class TParentWindow, class TResId>
+ScRefHdlrImplBase<TWindow, bBindRef>::ScRefHdlrImplBase( TBindings* pB, TChildWindow* pCW,
+ TParentWindow* pParent, TResId nResId):TWindow(pB, pCW, pParent, ScResId(static_cast<USHORT>( nResId ) ) ), ScRefHandler( *static_cast<TWindow*>(this), pB, bBindRef ){}
+
+template<class TWindow, bool bBindRef >
+template<class TParentWindow, class TResId, class TArg>
+ScRefHdlrImplBase<TWindow,bBindRef>::ScRefHdlrImplBase( TParentWindow* pParent, TResId nResIdP, const TArg &rArg, SfxBindings *pB /*= NULL*/ )
+:TWindow( pParent, ScResId(static_cast<USHORT>( nResIdP )), rArg ), ScRefHandler( *static_cast<TWindow*>(this), pB, bBindRef ){}
+
+template<class TWindow, bool bBindRef >
+ScRefHdlrImplBase<TWindow,bBindRef>::~ScRefHdlrImplBase(){}
//============================================================================
+template<class TDerived, class TBase, bool bBindRef = true>
+struct ScRefHdlrImpl: ScRefHdlrImplBase<TBase, bBindRef >
+{
+ enum { UNKNOWN_SLOTID = 0U, SLOTID = UNKNOWN_SLOTID };
+
+ template<class T1, class T2, class T3, class T4>
+ ScRefHdlrImpl( const T1 & rt1, const T2 & rt2, const T3 & rt3, const T4 & rt4 ):ScRefHdlrImplBase<TBase, bBindRef >(rt1, rt2, rt3, rt4 )
+ {
+ SC_MOD()->RegisterRefWindow( static_cast<USHORT>( static_cast<TDerived*>(this)->SLOTID ), this );
+ }
+
+ ~ScRefHdlrImpl()
+ {
+ SC_MOD()->UnregisterRefWindow( static_cast<USHORT>( static_cast<TDerived*>(this)->SLOTID ), this );
+ }
+};
+//============================================================================
+struct ScAnyRefDlg : ::ScRefHdlrImpl< ScAnyRefDlg, SfxModelessDialog>
+{
+ template<class T1, class T2, class T3, class T4>
+ ScAnyRefDlg( const T1 & rt1, const T2 & rt2, const T3 & rt3, const T4 & rt4 ):ScRefHdlrImpl< ScAnyRefDlg, SfxModelessDialog>(rt1, rt2, rt3, rt4){}
+};
+//============================================================================
+
+inline bool ScRefHandler::CanInputStart( const ScRefEdit *pEdit )
+{
+ return m_aHelper.CanInputStart( pEdit );
+}
+
+inline bool ScRefHandler::CanInputDone( BOOL bForced )
+{
+ return m_aHelper.CanInputDone( bForced );
+}
+
+template <> SC_DLLPUBLIC void ScRefHdlrImplBase<SfxModelessDialog,true>::StateChanged( StateChangedType nStateChange );
+template <> SC_DLLPUBLIC long ScRefHdlrImplBase<SfxModelessDialog,true>::PreNotify( NotifyEvent& rNEvt );
+#include <sfx2/tabdlg.hxx>
+template <> SC_DLLPUBLIC void ScRefHdlrImplBase<SfxTabDialog,false>::StateChanged( StateChangedType nStateChange );
+template <> SC_DLLPUBLIC long ScRefHdlrImplBase<SfxTabDialog,false>::PreNotify( NotifyEvent& rNEvt );
+//<!--Added by PengYunQuan for Validity Cell Range Picker
#endif // SC_ANYREFDG_HXX
diff --git a/sc/source/ui/inc/csvgrid.hxx b/sc/source/ui/inc/csvgrid.hxx
index c8c633060852..583c4fd2c414 100644
--- a/sc/source/ui/inc/csvgrid.hxx
+++ b/sc/source/ui/inc/csvgrid.hxx
@@ -34,10 +34,8 @@
#define _SC_CSVGRID_HXX
#include <vcl/virdev.hxx>
-#ifndef _MENU_HXX
#include <vcl/menu.hxx>
-#endif
-#include <svtools/lstner.hxx>
+#include <unotools/options.hxx>
#include <vector>
#include <memory>
@@ -100,7 +98,7 @@ typedef ::std::vector< ScCsvColState > ScCsvColStateVec;
/** A data grid control for the CSV import dialog. The design of this control
simulates a Calc spreadsheet with row and column headers. */
-class SC_DLLPUBLIC ScCsvGrid : public ScCsvControl, public SfxListener
+class SC_DLLPUBLIC ScCsvGrid : public ScCsvControl, public utl::ConfigurationListener
{
private:
typedef ::std::auto_ptr< ScEditEngineDefaulter > ScEditEnginePtr;
@@ -299,8 +297,7 @@ protected:
virtual void DataChanged( const DataChangedEvent& rDCEvt );
- using Control::Notify;
- virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+ virtual void ConfigurationChanged( ::utl::ConfigurationBroadcaster*, sal_uInt32 );
// painting ---------------------------------------------------------------
protected:
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 9556b4ad8138..548125bffd9a 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -418,7 +418,9 @@ public:
const ScOptSolverSave* GetSolverSaveData() const { return pSolverSaveData; } // may be null
void SetSolverSaveData( const ScOptSolverSave& rData );
-
+ //<!--Added by PengYunQuan for Validity Cell Range Picker
+ sal_Bool AcceptStateUpdate() const;
+ //-->Added by PengYunQuan for Validity Cell Range Picker
ScSheetSaveData* GetSheetSaveData();
};
diff --git a/sc/source/ui/inc/dwfunctr.hxx b/sc/source/ui/inc/dwfunctr.hxx
index 068a05d57711..6a468a415b44 100644
--- a/sc/source/ui/inc/dwfunctr.hxx
+++ b/sc/source/ui/inc/dwfunctr.hxx
@@ -32,7 +32,7 @@
#include <sfx2/childwin.hxx>
#include <sfx2/dockwin.hxx>
-#include <svtools/lstner.hxx>
+#include <svl/lstner.hxx>
#include <svtools/stdctrl.hxx>
#ifndef _LSTBOX_HXX //autogen
diff --git a/sc/source/ui/inc/formula.hxx b/sc/source/ui/inc/formula.hxx
index b25811eb9220..d490e37b93ca 100644
--- a/sc/source/ui/inc/formula.hxx
+++ b/sc/source/ui/inc/formula.hxx
@@ -44,7 +44,7 @@
#ifndef _SVSTDARR_STRINGS
#define _SVSTDARR_STRINGS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
#include "compiler.hxx"
diff --git a/sc/source/ui/inc/funcpage.hxx b/sc/source/ui/inc/funcpage.hxx
index 753000e290ab..fc8f1813be56 100644
--- a/sc/source/ui/inc/funcpage.hxx
+++ b/sc/source/ui/inc/funcpage.hxx
@@ -44,7 +44,7 @@
#ifndef _SVSTDARR_STRINGS
#define _SVSTDARR_STRINGS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
#include <vcl/tabctrl.hxx>
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index 48a2a41b0fbc..a5b7c4d94e5f 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -31,15 +31,11 @@
#ifndef SC_INPUTWIN_HXX
#define SC_INPUTWIN_HXX
-
-#ifndef _TOOLBOX_HXX //autogen
+#include <vector>
#include <vcl/toolbox.hxx>
-#endif
#include <sfx2/childwin.hxx>
-#include <svtools/lstner.hxx>
-#ifndef _COMBOBOX_HXX //autogen
+#include <svl/lstner.hxx>
#include <vcl/combobox.hxx>
-#endif
#include <vcl/window.hxx>
#include <svtools/transfer.hxx>
@@ -77,7 +73,8 @@ public:
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
- void SetAccessibleTextData(ScAccessibleEditLineTextData* pTextData) {pAccTextData = pTextData;}
+ void InsertAccessibleTextData( ScAccessibleEditLineTextData& rTextData );
+ void RemoveAccessibleTextData( ScAccessibleEditLineTextData& rTextData );
DECL_LINK( NotifyHdl, EENotify* );
@@ -102,11 +99,13 @@ private:
void UpdateAutoCorrFlag();
private:
+ typedef ::std::vector< ScAccessibleEditLineTextData* > AccTextDataVector;
+
String aString;
Font aTextFont;
ScEditEngineDefaulter* pEditEngine; // erst bei Bedarf angelegt
EditView* pEditView;
- ScAccessibleEditLineTextData* pAccTextData;
+ AccTextDataVector maAccTextDatas; // #i105267# text datas may be cloned, remember all copies
BOOL bIsRTL;
BOOL bIsInsertMode;
BOOL bFormulaMode;
diff --git a/sc/source/ui/inc/msgpool.hxx b/sc/source/ui/inc/msgpool.hxx
index 954d0d7a5d47..44514766601d 100644
--- a/sc/source/ui/inc/msgpool.hxx
+++ b/sc/source/ui/inc/msgpool.hxx
@@ -35,9 +35,9 @@
#include <svx/srchitem.hxx>
-#include <svtools/itempool.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/eitem.hxx>
+#include <svl/itempool.hxx>
+#include <svl/stritem.hxx>
+#include <svl/eitem.hxx>
//#include <dbitems.hxx>
#include "uiitems.hxx"
diff --git a/sc/source/ui/inc/navipi.hxx b/sc/source/ui/inc/navipi.hxx
index 54434427d459..b14e668fabd0 100644
--- a/sc/source/ui/inc/navipi.hxx
+++ b/sc/source/ui/inc/navipi.hxx
@@ -36,8 +36,8 @@
#include <vcl/field.hxx>
#include <vcl/lstbox.hxx>
#include <svtools/stdctrl.hxx>
-#include <svtools/poolitem.hxx>
-#include <svtools/lstner.hxx>
+#include <svl/poolitem.hxx>
+#include <svl/lstner.hxx>
#include <sfx2/childwin.hxx>
#include "content.hxx"
#include <svtools/svmedit.hxx>
diff --git a/sc/source/ui/inc/parawin.hxx b/sc/source/ui/inc/parawin.hxx
index 3835f94157ca..087c8937de9d 100644
--- a/sc/source/ui/inc/parawin.hxx
+++ b/sc/source/ui/inc/parawin.hxx
@@ -44,7 +44,7 @@
#ifndef _SVSTDARR_STRINGS
#define _SVSTDARR_STRINGS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
#include <vcl/tabctrl.hxx>
diff --git a/sc/source/ui/inc/privsplt.hxx b/sc/source/ui/inc/privsplt.hxx
index d3b7c9ad96b8..901fa6c87eb9 100644
--- a/sc/source/ui/inc/privsplt.hxx
+++ b/sc/source/ui/inc/privsplt.hxx
@@ -54,6 +54,7 @@ class ScPrivatSplit : public Control
short nDeltaX;
short nDeltaY;
+ using Control::ImplInitSettings;
void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
diff --git a/sc/source/ui/inc/reffact.hxx b/sc/source/ui/inc/reffact.hxx
index cbd5da901a63..bc43aedf918f 100644
--- a/sc/source/ui/inc/reffact.hxx
+++ b/sc/source/ui/inc/reffact.hxx
@@ -102,6 +102,22 @@ class ScSimpleRefDlgWrapper: public SfxChildWindow
void StartRefInput();
};
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+class SC_DLLPUBLIC ScValidityRefChildWin : public SfxChildWindow
+{
+ bool m_bVisibleLock:1;
+ bool m_bFreeWindowLock:1;
+ Window * m_pSavedWndParent;
+public:
+ ScValidityRefChildWin( Window*, USHORT, SfxBindings*, SfxChildWinInfo* );
+ SFX_DECL_CHILDWINDOW(ScValidityRefChildWin);
+ ~ScValidityRefChildWin();
+ bool LockVisible( bool bLock ){ bool bVis = m_bVisibleLock; m_bVisibleLock = bLock; return bVis; }
+ bool LockFreeWindow( bool bLock ){ bool bFreeWindow = m_bFreeWindowLock; m_bFreeWindowLock = bLock; return bFreeWindow; }
+ void Hide(){ if( !m_bVisibleLock) SfxChildWindow::Hide(); }
+ void Show( USHORT nFlags ){ if( !m_bVisibleLock ) SfxChildWindow::Show( nFlags ); }
+};
+//-->Added by PengYunQuan for Validity Cell Range Picker
//==================================================================
diff --git a/sc/source/ui/inc/servobj.hxx b/sc/source/ui/inc/servobj.hxx
index 0eca2cfafaf1..7cd6c04bc91e 100644
--- a/sc/source/ui/inc/servobj.hxx
+++ b/sc/source/ui/inc/servobj.hxx
@@ -31,8 +31,8 @@
#ifndef SC_SERVOBJ_HXX
#define SC_SERVOBJ_HXX
-#include <svtools/lstner.hxx>
-#include <svtools/listener.hxx>
+#include <svl/lstner.hxx>
+#include <svl/listener.hxx>
#include <sfx2/linksrc.hxx>
#include "global.hxx"
#include "address.hxx"
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index fe5da618e895..dab44cdf33df 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -292,7 +292,7 @@ public:
void TabChanged();
void SetZoom( const Fraction& rNewX, const Fraction& rNewY, BOOL bAll );
- void RefreshZoom();
+ SC_DLLPUBLIC void RefreshZoom();
void SetPagebreakMode( BOOL bSet );
void UpdateLayerLocks();
@@ -390,7 +390,10 @@ public:
void SetNewStartIfMarking();
- void SetTabNo( SCTAB nTab, BOOL bNew = FALSE, BOOL bExtendSelection = FALSE );
+ //<!--Added by PengYunQuan for Validity Cell Range Picker
+ //void SetTabNo( SCTAB nTab, BOOL bNew = FALSE, BOOL bExtendSelection = FALSE );
+ SC_DLLPUBLIC void SetTabNo( SCTAB nTab, BOOL bNew = FALSE, BOOL bExtendSelection = FALSE );
+ //-->Added by PengYunQuan for Validity Cell Range Picker
void SelectNextTab( short nDir, BOOL bExtendSelection = FALSE );
void ActivateView( BOOL bActivate, BOOL bFirst );
diff --git a/sc/source/ui/inc/target.hxx b/sc/source/ui/inc/target.hxx
index eb3b5f346ccb..1e65821915f3 100644
--- a/sc/source/ui/inc/target.hxx
+++ b/sc/source/ui/inc/target.hxx
@@ -31,7 +31,7 @@
#ifndef SC_TARGET_HXX
#define SC_TARGET_HXX
-#include <svtools/undo.hxx>
+#include <svl/undo.hxx>
class ScTabViewShell;
diff --git a/sc/source/ui/inc/tbzoomsliderctrl.hxx b/sc/source/ui/inc/tbzoomsliderctrl.hxx
index 0132ec844233..ba1370b1960f 100644
--- a/sc/source/ui/inc/tbzoomsliderctrl.hxx
+++ b/sc/source/ui/inc/tbzoomsliderctrl.hxx
@@ -39,7 +39,7 @@
#include <vcl/window.hxx>
#endif
#ifndef _SFXPOOLITEM_HXX //autogen
-#include <svtools/poolitem.hxx>
+#include <svl/poolitem.hxx>
#endif
#ifndef _SFXTBXCTRL_HXX //autogen
#include <sfx2/tbxctrl.hxx>
diff --git a/sc/source/ui/inc/ui_pch.hxx b/sc/source/ui/inc/ui_pch.hxx
index 335f7e917505..d9b21fd2f0d4 100644
--- a/sc/source/ui/inc/ui_pch.hxx
+++ b/sc/source/ui/inc/ui_pch.hxx
@@ -43,7 +43,7 @@
#include <tools/solar.h>
#include <tools/string.hxx>
-#include <svtools/solar.hrc>
+#include <svl/solar.hrc>
#include <tools/rtti.hxx>
#include <string.h>
#include <tools/contnr.hxx>
@@ -53,9 +53,9 @@
#include <tools/link.hxx>
#include <i18npool/lang.h>
#include <sfx2/sfx.hrc>
-#include <svtools/memberid.hrc>
+#include <svl/memberid.hrc>
#include <sfx2/sfxsids.hrc>
-#include <svtools/cntwids.hrc>
+#include <svl/cntwids.hrc>
#include <tools/resid.hxx>
#include <tools/rc.hxx>
#include <tools/resmgr.hxx>
@@ -95,28 +95,28 @@
#include <global.hxx>
#include <vcl/syswin.hxx>
#include <tools/debug.hxx>
-#include <svtools/svarray.hxx>
+#include <svl/svarray.hxx>
#include <vcl/ctrl.hxx>
-#include <svtools/hint.hxx>
-#include <svtools/poolitem.hxx>
+#include <svl/hint.hxx>
+#include <svl/poolitem.hxx>
#include <vcl/image.hxx>
#include <vcl/timer.hxx>
#include <tools/unqidx.hxx>
#include <vcl/symbol.hxx>
#include <vcl/fixed.hxx>
-#include <svtools/brdcst.hxx>
+#include <svl/brdcst.hxx>
#include <vcl/timer.hxx>
#include <sc.hrc>
#include <stdarg.h>
#include <svx/dialogs.hrc>
#include <basic/sbxdef.hxx>
-#include <svtools/lstner.hxx>
+#include <svl/lstner.hxx>
#include <sfx2/shell.hxx>
#include <vcl/window.hxx>
#include <vcl/group.hxx>
#include <tools/unqid.hxx>
#include <tools/table.hxx>
-#include <svtools/itemset.hxx>
+#include <svl/itemset.hxx>
#include <vcl/dialog.hxx>
#include <vcl/button.hxx>
#include <rangelst.hxx>
@@ -127,15 +127,15 @@
#include <vcl/spinfld.hxx>
#include <vcl/combobox.hxx>
#include <tools/pstm.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/itempool.hxx>
+#include <svl/eitem.hxx>
+#include <svl/itempool.hxx>
#include <sfx2/tabdlg.hxx>
#include <vcl/tabdlg.hxx>
#include <vcl/tabpage.hxx>
#include <vcl/tabctrl.hxx>
#include <shellids.hxx>
#include <vcl/event.hxx>
-#include <svtools/intitem.hxx>
+#include <svl/intitem.hxx>
#include <svtools/confitem.hxx>
#include <markdata.hxx>
#include <svx/optgrid.hxx>
@@ -150,7 +150,7 @@
#include <column.hxx>
#include <markarr.hxx>
#include <vcl/mapmod.hxx>
-#include <svtools/undo.hxx>
+#include <svl/undo.hxx>
#include <vcl/seleng.hxx>
#include <rsc/rscsfx.hxx>
#include <svx/zoomitem.hxx>
@@ -165,23 +165,23 @@
#include <sfx2/module.hxx>
#include <dbfunc.hxx>
#include <vcl/accel.hxx>
-#include <svtools/smplhint.hxx>
+#include <svl/smplhint.hxx>
#include <sfx2/viewfac.hxx>
#include <sot/storage.hxx>
#include <sfx2/objsh.hxx>
#include <target.hxx>
#include <tabvwsh.hxx>
-#include <svtools/inethist.hxx>
-#include <svtools/inetdef.hxx>
+#include <svl/inethist.hxx>
+#include <svl/inetdef.hxx>
#include <sfx2/sfxdefs.hxx>
-#include <svtools/cancel.hxx>
+#include <svl/cancel.hxx>
#include <svtools/compat.hxx>
-#include <svtools/inetmsg.hxx>
+#include <svl/inetmsg.hxx>
#include <sfx2/app.hxx>
#include <tools/urlobj.hxx>
#include <scdll.hxx>
#include <sfx2/msg.hxx>
-#include <svtools/ownlist.hxx>
+#include <svl/ownlist.hxx>
#include <sfx2/objface.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/frame.hxx>
@@ -207,9 +207,9 @@
#include <svx/svdtypes.hxx>
#include <vcl/btndlg.hxx>
#include <vcl/svapp.hxx>
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <vcl/edit.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <collect.hxx>
#include <svx/svdsob.hxx>
#include <vcl/imagebtn.hxx>
@@ -300,7 +300,7 @@
#include <cell.hxx>
#include <stddef.h>
#include <tools/mempool.hxx>
-#include <svtools/style.hrc>
+#include <svl/style.hrc>
#include <drawview.hxx>
#include <svx/view3d.hxx>
#include <svx/def3d.hxx>
@@ -310,7 +310,7 @@
#include <svx/svxenum.hxx>
#include <svx/xtextit0.hxx>
#include <svx/svdtrans.hxx>
-#include <svtools/style.hxx>
+#include <svl/style.hxx>
#include <reffact.hxx>
#include <svx/svdotext.hxx>
#include <svx/svdoattr.hxx>
@@ -326,7 +326,7 @@
#include <vcl/button.hxx>
#include <svx/srchitem.hxx>
#include <svx/svdorect.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/whiter.hxx>
#include <stlpool.hxx>
#include <svx/eeitem.hxx>
#include <inputhdl.hxx>
diff --git a/sc/source/ui/inc/uiitems.hxx b/sc/source/ui/inc/uiitems.hxx
index 868e772a2e68..bfa1603adb80 100644
--- a/sc/source/ui/inc/uiitems.hxx
+++ b/sc/source/ui/inc/uiitems.hxx
@@ -35,7 +35,7 @@
#include "conditio.hxx"
#include "sortparam.hxx"
#include "paramisc.hxx"
-#include <svtools/poolitem.hxx>
+#include <svl/poolitem.hxx>
class ScEditEngineDefaulter;
class EditTextObject;
diff --git a/sc/source/ui/inc/undobase.hxx b/sc/source/ui/inc/undobase.hxx
index 2d3ee1d14dd7..8398b030ed68 100644
--- a/sc/source/ui/inc/undobase.hxx
+++ b/sc/source/ui/inc/undobase.hxx
@@ -31,7 +31,7 @@
#ifndef SC_UNDOBASE_HXX
#define SC_UNDOBASE_HXX
-#include <svtools/undo.hxx>
+#include <svl/undo.hxx>
#include "global.hxx"
#include "address.hxx"
diff --git a/sc/source/ui/inc/undodraw.hxx b/sc/source/ui/inc/undodraw.hxx
index 7b5d59fbb620..5ded731d5105 100644
--- a/sc/source/ui/inc/undodraw.hxx
+++ b/sc/source/ui/inc/undodraw.hxx
@@ -31,7 +31,7 @@
#ifndef SC_UNDODRAW_HXX
#define SC_UNDODRAW_HXX
-#include <svtools/undo.hxx>
+#include <svl/undo.hxx>
class ScDocShell;
diff --git a/sc/source/ui/inc/undotab.hxx b/sc/source/ui/inc/undotab.hxx
index 40a7499208ee..e4e4911d606d 100644
--- a/sc/source/ui/inc/undotab.hxx
+++ b/sc/source/ui/inc/undotab.hxx
@@ -40,14 +40,14 @@
#ifndef _SVSTDARR_SHORTS
#define _SVSTDARR_SHORTS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
#ifndef _SVSTDARR_STRINGS
#define _SVSTDARR_STRINGS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
diff --git a/sc/source/ui/inc/validate.hrc b/sc/source/ui/inc/validate.hrc
index 0f69e6a55136..4d46d42263b2 100644
--- a/sc/source/ui/inc/validate.hrc
+++ b/sc/source/ui/inc/validate.hrc
@@ -61,6 +61,9 @@
#define CB_SORTLIST 28
#define EDT_LIST 29
#define FT_SOURCEHINT 30
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+#define RB_VALIDITY_REF 88
+//-->Added by PengYunQuan for Validity Cell Range Picker
/* Position indexes for "Allow" list box.
They do not map directly to ScValidationMode and can safely be modified to
diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx
index 2844a9f74e0f..0ac51e75b5d5 100644
--- a/sc/source/ui/inc/validate.hxx
+++ b/sc/source/ui/inc/validate.hxx
@@ -36,23 +36,164 @@
#include <vcl/fixed.hxx>
#include <vcl/lstbox.hxx>
#include <svtools/svmedit.hxx>
-
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+#include "anyrefdg.hxx"
+//-->Added by PengYunQuan for Validity Cell Range Picker
// ============================================================================
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+struct ScRefHandlerCaller{
+ virtual ~ScRefHandlerCaller(){}
+};
+class ScRefHandlerHelper
+{
+protected:
+ ScRefHandlerCaller *m_pHandler;
+ void (ScRefHandlerCaller::*m_pSetReferenceHdl)( const ScRange& , ScDocument* );
+ void (ScRefHandlerCaller::*m_pSetActiveHdl)();
+ void (ScRefHandlerCaller::*m_pRefInputStartPreHdl)( ScRefEdit* pEdit, ScRefButton* pButton );
+ void (ScRefHandlerCaller::*m_pRefInputStartPostHdl)( ScRefEdit* pEdit, ScRefButton* pButton );
+ void (ScRefHandlerCaller::*m_pRefInputDonePreHdl)();
+ void (ScRefHandlerCaller::*m_pRefInputDonePostHdl)();
+
+public:
+ typedef void (ScRefHandlerCaller::*PFUNCSETREFHDLTYPE)( const ScRange& , ScDocument* );
+ typedef void (ScRefHandlerCaller::*PCOMMONHDLTYPE)();
+ typedef void (ScRefHandlerCaller::*PINPUTSTARTDLTYPE)( ScRefEdit* pEdit, ScRefButton* pButton );
+
+ PFUNCSETREFHDLTYPE SetSetRefHdl( PFUNCSETREFHDLTYPE pNewHdl )
+ {
+ PFUNCSETREFHDLTYPE pOldHdl = m_pSetReferenceHdl;
+ m_pSetReferenceHdl = pNewHdl;
+ return pOldHdl;
+ }
+
+ PCOMMONHDLTYPE SetSetActHdl( PCOMMONHDLTYPE pNewHdl )
+ {
+ PCOMMONHDLTYPE pOldHdl = m_pSetActiveHdl;
+ m_pSetActiveHdl = pNewHdl;
+ return pOldHdl;
+ }
+
+ ScRefHandlerCaller *SetHandler( ScRefHandlerCaller *pNewHandler )
+ {
+ ScRefHandlerCaller *pOldHandler = m_pHandler;
+ m_pHandler = pNewHandler;
+ return pOldHandler;
+ }
+ void SetRefInputStartPreHdl( PINPUTSTARTDLTYPE pNewHdl ){ m_pRefInputStartPreHdl = pNewHdl; }
+ void SetRefInputDonePostHdl( void (ScRefHandlerCaller::*pNewHdl)() ){ m_pRefInputDonePostHdl = pNewHdl; }
+ void SetRefInputStartPostHdl( PINPUTSTARTDLTYPE pNewHdl ){ m_pRefInputStartPostHdl = pNewHdl; }
+ void SetRefInputDonePreHdl( void (ScRefHandlerCaller::*pNewHdl)() ){ m_pRefInputDonePreHdl = pNewHdl; }
+
+ ScRefHandlerHelper():m_pHandler(NULL), m_pSetReferenceHdl( NULL ), m_pSetActiveHdl(NULL), m_pRefInputStartPreHdl( NULL ), m_pRefInputStartPostHdl( NULL ), m_pRefInputDonePreHdl( NULL ), m_pRefInputDonePostHdl( NULL ){}
+};
+//-->Added by PengYunQuan for Validity Cell Range Picker
+
/** The "Validity" tab dialog. */
-class ScValidationDlg : public SfxTabDialog
+//<!--Modified by PengYunQuan for Validity Cell Range Picker
+//class ScValidationDlg : public SfxTabDialog
+class ScValidationDlg :public ScRefHdlrImpl<ScValidationDlg, SfxTabDialog, false>, public ScRefHandlerHelper
+//-->Modified by PengYunQuan for Validity Cell Range Picker
{
+ //<!--Added by PengYunQuan for Validity Cell Range Picker
+ typedef ScRefHdlrImpl<ScValidationDlg, SfxTabDialog, false> ScValidationDlgBase;
+
+ //Start_Moddify by liliang 03/26/2008 SODC_13677_2
+ DECL_LINK( OkHdl, Button * );
+ //End_Moddify by liliang 03/26/2008 SODC_13677_2
+ bool m_bOwnRefHdlr:1;
+
+ ScTabViewShell *m_pTabVwSh;
+ bool m_bRefInputting:1;
+ bool EnterRefStatus();
+ bool LeaveRefStatus();
+ //-->Added by PengYunQuan for Validity Cell Range Picker
public:
- explicit ScValidationDlg( Window* pParent, const SfxItemSet* pArgSet );
+ //<!--Modified by PengYunQuan for Validity Cell Range Picker
+ //explicit ScValidationDlg( Window* pParent, const SfxItemSet* pArgSet );
+ explicit ScValidationDlg( Window* pParent, const SfxItemSet* pArgSet, ScTabViewShell * pTabViewSh, SfxBindings *pB = NULL );
+ //-->Modified by PengYunQuan for Validity Cell Range Picker
+ //<!--Added by PengYunQuan for Validity Cell Range Picker
virtual ~ScValidationDlg();
+ inline static ScValidationDlg * Find1AliveObject( Window *pAncestor );
+ bool IsAlive();
+ inline ScTabViewShell * GetTabViewShell();
+
+ bool SetupRefDlg();
+ bool RemoveRefDlg( BOOL bRestoreModal = TRUE );
+
+ virtual void SetModal( BOOL bModal ){ ScValidationDlgBase::SetModalInputMode( bModal ); }
+
+ virtual void SetReference( const ScRange& rRef, ScDocument* pDoc )
+ {
+ if ( m_pHandler && m_pSetReferenceHdl )
+ (m_pHandler->*m_pSetReferenceHdl)( rRef, pDoc );
+ }
+
+ virtual void SetActive()
+ {
+ if ( m_pHandler && m_pSetActiveHdl )
+ (m_pHandler->*m_pSetActiveHdl)();
+ }
+
+ void CloseRefDialog()
+ {
+ DBG_ASSERT( false, "should not execute here!!!when the edit kill focus, should remove refhandler.\r\n" );
+
+ if ( IsInExecute() )
+ EndDialog( FALSE );
+ else if ( GetStyle() & WB_CLOSEABLE )
+ Close();
+ }
+
+ bool IsRefInputting(){ return m_bRefInputting; }
+
+ virtual void RefInputStart( ScRefEdit* pEdit, ScRefButton* pButton = NULL )
+ {
+ if( !CanInputStart( pEdit ) )
+ return;
+
+ if ( m_pHandler && m_pRefInputStartPreHdl )
+ (m_pHandler->*m_pRefInputStartPreHdl)( pEdit, pButton );
+ m_bRefInputting = true;
+ ScValidationDlgBase::RefInputStart( pEdit, pButton );
+ if ( m_pHandler && m_pRefInputStartPostHdl )
+ (m_pHandler->*m_pRefInputStartPostHdl)( pEdit, pButton );
+ }
+
+ virtual void RefInputDone( BOOL bForced = FALSE )
+ {
+ if( !CanInputDone( bForced ) )
+ return;
+
+ if ( m_pHandler && m_pRefInputDonePreHdl )
+ (m_pHandler->*m_pRefInputDonePreHdl)();
+
+ ScValidationDlgBase::RefInputDone( bForced );
+ m_bRefInputting = false;
+
+ if ( m_pHandler && m_pRefInputDonePostHdl )
+ (m_pHandler->*m_pRefInputDonePostHdl)();
+ }
+
+ BOOL IsChildFocus();
+
+ enum { SLOTID = SID_VALIDITY_REFERENCE };
+
+ BOOL Close();
+ //-->Added by PengYunQuan for Validity Cell Range Picker
};
// ============================================================================
/** The tab page "Criteria" from the Validation dialog. */
-class ScTPValidationValue : public SfxTabPage
+//<!--Modified by PengYunQuan for Validity Cell Range Picker
+//class ScTPValidationValue : public SfxTabPage
+class ScTPValidationValue : public ScRefHandlerCaller, public SfxTabPage
+//-->Modified by PengYunQuan for Validity Cell Range Picker
{
public:
explicit ScTPValidationValue( Window* pParent, const SfxItemSet& rArgSet );
@@ -84,10 +225,16 @@ private:
FixedText maFtValue;
ListBox maLbValue;
FixedText maFtMin;
- Edit maEdMin;
+ //<!--Modified by PengYunQuan for Validity Cell Range Picker
+ //Edit maEdMin;
+ ScRefEdit maEdMin;
+ //-->Modified by PengYunQuan for Validity Cell Range Picker
MultiLineEdit maEdList; /// Entries for explicit list
FixedText maFtMax;
- Edit maEdMax;
+ //<!--Modified by PengYunQuan for Validity Cell Range Picker
+ //Edit maEdMax;
+ ScRefEdit maEdMax;
+ //-->Modified by PengYunQuan for Validity Cell Range Picker
FixedText maFtHint; /// Hint text for cell range validity.
String maStrMin;
@@ -96,6 +243,33 @@ private:
String maStrRange;
String maStrList;
sal_Unicode mcFmlaSep; /// List separator in formulas.
+ //<!--Added by PengYunQuan for Validity Cell Range Picker
+ DECL_LINK( EditSetFocusHdl, Edit *);
+ DECL_LINK( KillFocusHdl, Window *);
+ void OnClick( Button *pBtn );
+ ScRefEdit *m_pRefEdit;
+ class ScRefButtonEx:public ::ScRefButton
+ {
+ void Click();
+ public:
+ ScRefButtonEx( Window* pParent, const ResId& rResId, ScRefEdit* pEdit = NULL, ScRefHandler *pRefHdlr = NULL ): ::ScRefButton( pParent, rResId, pEdit, pRefHdlr ){}
+ }m_btnRef;
+ friend class ScRefButtonEx;
+ void SetReferenceHdl( const ScRange& , ScDocument* );
+ void SetActiveHdl();
+ void RefInputStartPreHdl( ScRefEdit* pEdit, ScRefButton* pButton );
+ void RefInputDonePreHdl();
+ void RefInputDonePostHdl();
+ ScValidationDlg * GetValidationDlg();
+
+ //TYPEINFO();
+ void TidyListBoxes();
+public:
+ USHORT GetAllowEntryPos();
+ String GetMinText();
+ void SetupRefDlg();
+ void RemoveRefDlg();
+ //-->Added by PengYunQuan for Validity Cell Range Picker
};
@@ -161,6 +335,16 @@ public:
virtual void Reset ( const SfxItemSet& rArgSet );
};
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+inline ScTabViewShell *ScValidationDlg::GetTabViewShell()
+{
+ return m_pTabVwSh;
+}
+inline ScValidationDlg * ScValidationDlg::Find1AliveObject( Window *pAncestor )
+{
+ return static_cast<ScValidationDlg *>( SC_MOD()->Find1RefWindow( SLOTID, pAncestor ) );
+}
+//-->Added by PengYunQuan for Validity Cell Range Picker
#endif // SC_VALIDATE_HXX
diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
index cc5ffc650a9d..1bfab3a7b46e 100644
--- a/sc/source/ui/inc/viewdata.hxx
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -228,6 +228,7 @@ private:
SC_DLLPRIVATE void CalcPPT();
SC_DLLPRIVATE void CreateTabData( SCTAB nNewTab );
+ SC_DLLPRIVATE void CreateTabData( std::vector< SCTAB >& rvTabs );
SC_DLLPRIVATE void CreateSelectedTabData();
public:
@@ -318,6 +319,8 @@ public:
void SetPagebreakMode( BOOL bSet );
void SetZoomType( SvxZoomType eNew, BOOL bAll );
+ void SetZoomType( SvxZoomType eNew, std::vector< SCTAB >& tabs );
+ void SetZoom( const Fraction& rNewX, const Fraction& rNewY, std::vector< SCTAB >& tabs );
void SetZoom( const Fraction& rNewX, const Fraction& rNewY, BOOL bAll );
void RefreshZoom();
diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
index fbc6f1ca917f..b727d96f944b 100644
--- a/sc/source/ui/inc/viewfunc.hxx
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -36,14 +36,14 @@
#ifndef _SVSTDARR_SHORTS
#define _SVSTDARR_SHORTS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
#ifndef _SVSTDARR_STRINGS
#define _SVSTDARR_STRINGS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
#include <com/sun/star/embed/XEmbeddedObject.hpp>
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index 76330036b1f5..ab2cdaba3b69 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -35,7 +35,7 @@
-#include <svtools/undo.hxx>
+#include <svl/undo.hxx>
#include <unotools/textsearch.hxx>
#include <unotools/localedatawrapper.hxx>
#include <unotools/collatorwrapper.hxx>
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx
index befabb51a17c..0d93eb0c7a93 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -377,7 +377,10 @@ IMPL_LINK( ScFormulaReferenceHelper, AccelSelectHdl, Accelerator *, pSelAccel )
//----------------------------------------------------------------------------
void ScFormulaReferenceHelper::RefInputDone( BOOL bForced )
{
- if (pRefEdit && (bForced || !pRefBtn))
+ //<!--Modified by PengYunQuan for Validity Cell Range Picker
+ //if (pRefEdit && (bForced || !pRefBtn))
+ if ( CanInputDone( bForced ) )//if (pRefEdit && (bForced || !pRefBtn))
+ //-->Modified by PengYunQuan for Validity Cell Range Picker
{
if (bAccInserted) // Accelerator wieder abschalten
{
@@ -677,23 +680,33 @@ void lcl_HideAllReferences()
}
//============================================================================
-// class ScAnyRefDlg
+//The class of ScAnyRefDlg is rewritten by PengYunQuan for Validity Cell Range Picker
+// class ScRefHandler
//----------------------------------------------------------------------------
-ScAnyRefDlg::ScAnyRefDlg( SfxBindings* pB, SfxChildWindow* pCW,
- Window* pParent, USHORT nResId)
- : SfxModelessDialog ( pB, pCW, pParent, ScResId( nResId ) ),
+ScRefHandler::ScRefHandler( Window &rWindow, SfxBindings* pB/*, SfxChildWindow* pCW,
+ Window* pParent, USHORT nResId*/, bool bBindRef )
+ : //SfxModelessDialog ( pB, pCW, pParent, ScResId( nResId ) ),
+ m_rWindow( rWindow ),
+ m_bInRefMode( false ),
m_aHelper(this,pB),
pMyBindings( pB ),
pActiveWin(NULL)
{
- m_aHelper.SetWindow(this);
- if(GetHelpId()==0) //Hack, da im SfxModelessDialog die HelpId
- SetHelpId(GetUniqueId()); //fuer einen ModelessDialog entfernt und
+ m_aHelper.SetWindow(/*this*/&m_rWindow);
+ if(m_rWindow.GetHelpId()==0) //Hack, da im SfxModelessDialog die HelpId
+ m_rWindow.SetHelpId(m_rWindow.GetUniqueId()); //fuer einen ModelessDialog entfernt und
//in eine UniqueId gewandelt wird, machen
//wir das an dieser Stelle rueckgaengig.
aTimer.SetTimeout(200);
- aTimer.SetTimeoutHdl(LINK( this, ScAnyRefDlg, UpdateFocusHdl));
+ aTimer.SetTimeoutHdl(LINK( this, ScRefHandler, UpdateFocusHdl));
+
+ if( bBindRef ) EnterRefMode();
+}
+
+bool ScRefHandler::EnterRefMode()
+{
+ if( m_bInRefMode ) return false;
SC_MOD()->InputEnterHandler();
// ScTabViewShell* pScViewShell = ScTabViewShell::GetActiveViewShell();
@@ -740,15 +753,25 @@ ScAnyRefDlg::ScAnyRefDlg( SfxBindings* pB, SfxChildWindow* pCW,
m_aHelper.SetDispatcherLock( TRUE );
//@Test
//SFX_APPWINDOW->Disable(TRUE); //@BugID 54702
+
+ return m_bInRefMode = true;
}
//----------------------------------------------------------------------------
-ScAnyRefDlg::~ScAnyRefDlg()
+ScRefHandler::~ScRefHandler()
+{
+ LeaveRefMode();
+}
+
+bool ScRefHandler::LeaveRefMode()
{
+ if( !m_bInRefMode ) return false;
+
lcl_HideAllReferences();
- SetModalInputMode(FALSE);
+ if( Dialog *pDlg = dynamic_cast<Dialog*>( static_cast<Window*>(*this) ) )
+ pDlg->SetModalInputMode(FALSE);
SetDispatcherLock( FALSE ); //! here and in DoClose ?
ScTabViewShell* pScViewShell = ScTabViewShell::GetActiveViewShell();
@@ -757,20 +780,23 @@ ScAnyRefDlg::~ScAnyRefDlg()
//SFX_APPWINDOW->Enable(TRUE,TRUE);
lcl_InvalidateWindows();
+
+ m_bInRefMode = false;
+ return true;
}
//----------------------------------------------------------------------------
-SfxBindings& ScAnyRefDlg::GetBindings()
-{
- //! SfxModelessDialog should allow access to pBindings pointer
-
- return *pMyBindings;
-}
+//SfxBindings& ScRefHandler::GetBindings()
+//{
+// //! SfxModelessDialog should allow access to pBindings pointer
+//
+// return *pMyBindings;
+//}
//----------------------------------------------------------------------------
-void ScAnyRefDlg::SwitchToDocument()
+void ScRefHandler::SwitchToDocument()
{
ScTabViewShell* pCurrent = ScTabViewShell::GetActiveViewShell();
if (pCurrent)
@@ -800,7 +826,7 @@ void ScAnyRefDlg::SwitchToDocument()
//----------------------------------------------------------------------------
-BOOL ScAnyRefDlg::IsDocAllowed(SfxObjectShell* pDocSh) const // pDocSh may be 0
+BOOL ScRefHandler::IsDocAllowed(SfxObjectShell* pDocSh) const // pDocSh may be 0
{
// default: allow only same document (overridden in function dialog)
String aCmpName;
@@ -813,41 +839,41 @@ BOOL ScAnyRefDlg::IsDocAllowed(SfxObjectShell* pDocSh) const // pDocSh may be
//----------------------------------------------------------------------------
-BOOL __EXPORT ScAnyRefDlg::IsRefInputMode() const
+BOOL __EXPORT ScRefHandler::IsRefInputMode() const
{
- return IsVisible(); // nur wer sichtbar ist kann auch Referenzen bekommen
+ return m_rWindow.IsVisible(); // nur wer sichtbar ist kann auch Referenzen bekommen
}
//----------------------------------------------------------------------------
-BOOL __EXPORT ScAnyRefDlg::DoClose( USHORT nId )
+BOOL __EXPORT ScRefHandler::DoClose( USHORT nId )
{
m_aHelper.DoClose(nId);
return TRUE;
}
-void ScAnyRefDlg::SetDispatcherLock( BOOL bLock )
+void ScRefHandler::SetDispatcherLock( BOOL bLock )
{
m_aHelper.SetDispatcherLock( bLock );
}
//----------------------------------------------------------------------------
-void ScAnyRefDlg::ViewShellChanged(ScTabViewShell* pScViewShell )
+void ScRefHandler::ViewShellChanged(ScTabViewShell* pScViewShell )
{
m_aHelper.ViewShellChanged(pScViewShell);
}
//----------------------------------------------------------------------------
-void ScAnyRefDlg::AddRefEntry()
+void ScRefHandler::AddRefEntry()
{
// wenn nicht ueberladen, gibt es keine Mehrfach-Referenzen
}
//----------------------------------------------------------------------------
-BOOL __EXPORT ScAnyRefDlg::IsTableLocked() const
+BOOL __EXPORT ScRefHandler::IsTableLocked() const
{
// per Default kann bei Referenzeingabe auch die Tabelle umgeschaltet werden
@@ -861,48 +887,99 @@ BOOL __EXPORT ScAnyRefDlg::IsTableLocked() const
//
//----------------------------------------------------------------------------
-void ScAnyRefDlg::RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton )
+void ScRefHandler::RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton )
{
m_aHelper.RefInputStart( pEdit, pButton );
}
-void ScAnyRefDlg::ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton )
+void ScRefHandler::ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton )
{
m_aHelper.ToggleCollapsed( pEdit, pButton );
}
-long ScAnyRefDlg::PreNotify( NotifyEvent& rNEvt )
-{
- USHORT nSwitch=rNEvt.GetType();
- if(nSwitch==EVENT_GETFOCUS)
- {
- pActiveWin=rNEvt.GetWindow();
- }
- return SfxModelessDialog::PreNotify(rNEvt);
-}
-
-void ScAnyRefDlg::StateChanged( StateChangedType nStateChange )
-{
- SfxModelessDialog::StateChanged( nStateChange );
- if(nStateChange == STATE_CHANGE_VISIBLE)
- {
- if(IsVisible())
- {
- m_aHelper.enableInput( FALSE );
- m_aHelper.EnableSpreadsheets();
- m_aHelper.SetDispatcherLock( TRUE );
- aTimer.Start();
- }
- else
- {
- m_aHelper.enableInput( TRUE );
- m_aHelper.SetDispatcherLock( FALSE ); //! here and in DoClose ?
- }
- }
-}
-
-IMPL_LINK( ScAnyRefDlg, UpdateFocusHdl, Timer*, EMPTYARG )
+//The two following function is commentted out by PengYunQuan for Validity Cell Range Picker
+//long ScAnyRefDlg::PreNotify( NotifyEvent& rNEvt )
+//{
+// USHORT nSwitch=rNEvt.GetType();
+// if(nSwitch==EVENT_GETFOCUS)
+// {
+// pActiveWin=rNEvt.GetWindow();
+// }
+// return SfxModelessDialog::PreNotify(rNEvt);
+//}
+//
+//void ScAnyRefDlg::StateChanged( StateChangedType nStateChange )
+//{
+// SfxModelessDialog::StateChanged( nStateChange );
+//
+// if(nStateChange == STATE_CHANGE_VISIBLE)
+// {
+// if(IsVisible())
+// {
+// m_aHelper.enableInput( FALSE );
+// m_aHelper.EnableSpreadsheets();
+// m_aHelper.SetDispatcherLock( TRUE );
+// aTimer.Start();
+// }
+// else
+// {
+// m_aHelper.enableInput( TRUE );
+// m_aHelper.SetDispatcherLock( FALSE ); //! here and in DoClose ?
+// }
+// }
+//}
+
+#if defined( _MSC_VER )
+#define INTRODUCE_TEMPLATE
+#else
+#define INTRODUCE_TEMPLATE template <>
+#endif
+
+#define IMPL_TWINDOW_PRENOTIFY( TWindow,bBindRef ) \
+INTRODUCE_TEMPLATE long ScRefHdlrImplBase<TWindow,bBindRef>::PreNotify( NotifyEvent& rNEvt )\
+{\
+ if( bBindRef || m_bInRefMode )\
+ {\
+ USHORT nSwitch=rNEvt.GetType();\
+ if(nSwitch==EVENT_GETFOCUS)\
+ {\
+ pActiveWin=rNEvt.GetWindow();\
+ }\
+ }\
+ return TWindow::PreNotify(rNEvt);\
+}
+
+#define IMPL_TWINDOW_STATECHANGED( TWindow,bBindRef ) \
+INTRODUCE_TEMPLATE void ScRefHdlrImplBase<TWindow,bBindRef>::StateChanged( StateChangedType nStateChange )\
+{\
+ TWindow::StateChanged( nStateChange );\
+\
+ if( !bBindRef && !m_bInRefMode ) return;\
+ \
+ if(nStateChange == STATE_CHANGE_VISIBLE)\
+ {\
+ if(m_rWindow.IsVisible())\
+ {\
+ m_aHelper.enableInput( FALSE );\
+ m_aHelper.EnableSpreadsheets();\
+ m_aHelper.SetDispatcherLock( TRUE );\
+ aTimer.Start();\
+ }\
+ else\
+ {\
+ m_aHelper.enableInput( TRUE );\
+ m_aHelper.SetDispatcherLock( FALSE ); /*//! here and in DoClose ?*/\
+ }\
+ }\
+}
+
+IMPL_TWINDOW_PRENOTIFY( SfxModelessDialog, true )
+IMPL_TWINDOW_PRENOTIFY( SfxTabDialog, false )
+IMPL_TWINDOW_STATECHANGED( SfxModelessDialog, true )
+IMPL_TWINDOW_STATECHANGED( SfxTabDialog, false )
+
+IMPL_LINK( ScRefHandler, UpdateFocusHdl, Timer*, EMPTYARG )
{
if (pActiveWin)
{
@@ -911,27 +988,27 @@ IMPL_LINK( ScAnyRefDlg, UpdateFocusHdl, Timer*, EMPTYARG )
return 0;
}
// -----------------------------------------------------------------------------
-bool ScAnyRefDlg::ParseWithNames( ScRangeList& rRanges, const String& rStr, ScDocument* pDoc )
+bool ScRefHandler::ParseWithNames( ScRangeList& rRanges, const String& rStr, ScDocument* pDoc )
{
return m_aHelper.ParseWithNames( rRanges, rStr, pDoc );
}
// -----------------------------------------------------------------------------
-void ScAnyRefDlg::HideReference( BOOL bDoneRefMode )
+void ScRefHandler::HideReference( BOOL bDoneRefMode )
{
m_aHelper.HideReference( bDoneRefMode );
}
// -----------------------------------------------------------------------------
-void ScAnyRefDlg::ShowReference( const XubString& rStr )
+void ScRefHandler::ShowReference( const XubString& rStr )
{
m_aHelper.ShowReference( rStr );
}
// -----------------------------------------------------------------------------
-void ScAnyRefDlg::ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pButton )
+void ScRefHandler::ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pButton )
{
m_aHelper.ReleaseFocus( pEdit,pButton );
}
//----------------------------------------------------------------------------
-void ScAnyRefDlg::RefInputDone( BOOL bForced )
+void ScRefHandler::RefInputDone( BOOL bForced )
{
m_aHelper.RefInputDone( bForced );
}
diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx
index b4fe1f83b220..fb29b6d673ca 100644
--- a/sc/source/ui/miscdlgs/autofmt.cxx
+++ b/sc/source/ui/miscdlgs/autofmt.cxx
@@ -49,7 +49,7 @@
#include <svx/wghtitem.hxx>
#include <sfx2/topfrm.hxx>
#include <vcl/svapp.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <vcl/msgbox.hxx>
#include <comphelper/processfactory.hxx>
diff --git a/sc/source/ui/miscdlgs/filldlg.cxx b/sc/source/ui/miscdlgs/filldlg.cxx
index e6a8746a01be..f013c334bf37 100644
--- a/sc/source/ui/miscdlgs/filldlg.cxx
+++ b/sc/source/ui/miscdlgs/filldlg.cxx
@@ -37,7 +37,7 @@
//----------------------------------------------------------------------------
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <vcl/msgbox.hxx>
#include <limits.h>
diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx
index 97cc29ac3e54..8783df43d3df 100644
--- a/sc/source/ui/miscdlgs/optsolver.cxx
+++ b/sc/source/ui/miscdlgs/optsolver.cxx
@@ -37,7 +37,7 @@
#include "scitems.hxx"
#include <sfx2/bindings.hxx>
#include <sfx2/imagemgr.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/svapp.hxx>
diff --git a/sc/source/ui/miscdlgs/redcom.cxx b/sc/source/ui/miscdlgs/redcom.cxx
index af450fdcc6ab..dd1c312cd792 100644
--- a/sc/source/ui/miscdlgs/redcom.cxx
+++ b/sc/source/ui/miscdlgs/redcom.cxx
@@ -49,7 +49,7 @@ ScRedComDialog::ScRedComDialog( Window* pParent, const SfxItemSet& rCoreSet,
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
- pDlg = pFact->CreateSvxPostItDialog( pParent, rCoreSet, RID_SVXDLG_POSTIT, bPrevNext, TRUE );
+ pDlg = pFact->CreateSvxPostItDialog( pParent, rCoreSet, bPrevNext, TRUE );
DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001
pDocShell=pShell;
pDlg->DontChangeAuthor();
diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx
index e1ec71344034..32c49cf2a3ad 100644
--- a/sc/source/ui/miscdlgs/scuiautofmt.cxx
+++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx
@@ -49,7 +49,7 @@
#include <svx/shdditem.hxx>
#include <svx/udlnitem.hxx>
#include <svx/wghtitem.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <vcl/msgbox.hxx>
#include <comphelper/processfactory.hxx>
diff --git a/sc/source/ui/miscdlgs/sharedocdlg.cxx b/sc/source/ui/miscdlgs/sharedocdlg.cxx
index ec93346e1fed..f9893f1d3faa 100644
--- a/sc/source/ui/miscdlgs/sharedocdlg.cxx
+++ b/sc/source/ui/miscdlgs/sharedocdlg.cxx
@@ -34,8 +34,8 @@
//-----------------------------------------------------------------------------
#include <osl/security.hxx>
-#include <svtools/sharecontrolfile.hxx>
-#include <svtools/useroptions.hxx>
+#include <svl/sharecontrolfile.hxx>
+#include <unotools/useroptions.hxx>
#include <docsh.hxx>
diff --git a/sc/source/ui/miscdlgs/solvrdlg.cxx b/sc/source/ui/miscdlgs/solvrdlg.cxx
index b5fc7d8d322a..091329f1d03b 100644
--- a/sc/source/ui/miscdlgs/solvrdlg.cxx
+++ b/sc/source/ui/miscdlgs/solvrdlg.cxx
@@ -38,7 +38,7 @@
#include "rangelst.hxx"
#include "scitems.hxx"
#include <sfx2/dispatch.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <vcl/msgbox.hxx>
#include "uiitems.hxx"
diff --git a/sc/source/ui/miscdlgs/textdlgs.cxx b/sc/source/ui/miscdlgs/textdlgs.cxx
index c204266bbb60..a12ad4992bff 100644
--- a/sc/source/ui/miscdlgs/textdlgs.cxx
+++ b/sc/source/ui/miscdlgs/textdlgs.cxx
@@ -46,13 +46,13 @@
//CHINA001 #include <svx/paragrph.hxx>
//CHINA001 #include <svx/tabstpge.hxx>
#include <sfx2/objsh.hxx>
-#include <svtools/cjkoptions.hxx>
+#include <svl/cjkoptions.hxx>
#include "textdlgs.hxx"
#include "scresid.hxx"
#include "sc.hrc"
#include <svx/svxids.hrc> //add CHINA001
-#include <svtools/intitem.hxx> //add CHINA001
+#include <svl/intitem.hxx> //add CHINA001
#include <svx/flagsdef.hxx> //CHINA001
// -----------------------------------------------------------------------
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index af3b5f0dee5e..8198e6adb0f4 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -46,7 +46,7 @@
#include <vcl/sound.hxx>
#include <vcl/svapp.hxx>
#include <tools/urlobj.hxx>
-#include <svtools/urlbmk.hxx>
+#include <svl/urlbmk.hxx>
#include <stdlib.h>
#include "content.hxx"
diff --git a/sc/source/ui/navipi/navcitem.cxx b/sc/source/ui/navipi/navcitem.cxx
index 60f6c708e08c..c3807844270a 100644
--- a/sc/source/ui/navipi/navcitem.cxx
+++ b/sc/source/ui/navipi/navcitem.cxx
@@ -35,8 +35,8 @@
// INCLUDE ---------------------------------------------------------------
-#include <svtools/intitem.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/intitem.hxx>
+#include <svl/stritem.hxx>
#include "navcitem.hxx"
#include "global.hxx"
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index 9bba01960b32..0a216dac3709 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -41,8 +41,8 @@
#include <sfx2/event.hxx>
#include <sfx2/imgmgr.hxx>
#include <sfx2/navigat.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/urlbmk.hxx>
+#include <svl/stritem.hxx>
+#include <svl/urlbmk.hxx>
#include <vcl/sound.hxx>
#include <unotools/charclass.hxx>
#include <stdlib.h>
@@ -518,23 +518,23 @@ void CommandToolBox::UpdateButtons()
CheckItem( IID_CHANGEROOT, bRootSet );
}
- BOOL bDark = GetDisplayBackground().GetColor().IsDark();
+ BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
USHORT nImageId = 0;
switch ( rDlg.nDropMode )
{
- case SC_DROPMODE_URL: nImageId = bDark ? RID_IMG_H_DROP_URL : RID_IMG_DROP_URL; break;
- case SC_DROPMODE_LINK: nImageId = bDark ? RID_IMG_H_DROP_LINK : RID_IMG_DROP_LINK; break;
- case SC_DROPMODE_COPY: nImageId = bDark ? RID_IMG_H_DROP_COPY : RID_IMG_DROP_COPY; break;
+ case SC_DROPMODE_URL: nImageId = bHC ? RID_IMG_H_DROP_URL : RID_IMG_DROP_URL; break;
+ case SC_DROPMODE_LINK: nImageId = bHC ? RID_IMG_H_DROP_LINK : RID_IMG_DROP_LINK; break;
+ case SC_DROPMODE_COPY: nImageId = bHC ? RID_IMG_H_DROP_COPY : RID_IMG_DROP_COPY; break;
}
SetItemImage( IID_DROPMODE, Image(ScResId(nImageId)) );
}
void CommandToolBox::InitImageList()
{
- BOOL bDark = GetDisplayBackground().GetColor().IsDark();
+ BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
- ImageList& rImgLst = bDark ? rDlg.aCmdImageListH : rDlg.aCmdImageList;
+ ImageList& rImgLst = bHC ? rDlg.aCmdImageListH : rDlg.aCmdImageList;
USHORT nCount = GetItemCount();
for (USHORT i = 0; i < nCount; i++)
diff --git a/sc/source/ui/navipi/scenwnd.cxx b/sc/source/ui/navipi/scenwnd.cxx
index 55f26b682034..c03e5efc82bd 100644
--- a/sc/source/ui/navipi/scenwnd.cxx
+++ b/sc/source/ui/navipi/scenwnd.cxx
@@ -38,8 +38,8 @@
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/viewfrm.hxx>
-#include <svtools/slstitm.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/slstitm.hxx>
+#include <svl/stritem.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/svapp.hxx>
#include "navipi.hxx"
diff --git a/sc/source/ui/optdlg/tpprint.cxx b/sc/source/ui/optdlg/tpprint.cxx
index 498dbed85285..d6e8a3ae5009 100644
--- a/sc/source/ui/optdlg/tpprint.cxx
+++ b/sc/source/ui/optdlg/tpprint.cxx
@@ -33,7 +33,7 @@
#undef SC_DLLIMPLEMENTATION
-#include <svtools/eitem.hxx>
+#include <svl/eitem.hxx>
#include "tpprint.hxx"
#include "printopt.hxx"
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index 17c00948d3bd..f65105b0a687 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -37,7 +37,7 @@
#include <rangelst.hxx>
#include <sfx2/dispatch.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <vcl/msgbox.hxx>
#include <unotools/charclass.hxx>
#include <stdlib.h>
diff --git a/sc/source/ui/pagedlg/hfedtdlg.cxx b/sc/source/ui/pagedlg/hfedtdlg.cxx
index 695ede732edd..7ab719e3e10b 100644
--- a/sc/source/ui/pagedlg/hfedtdlg.cxx
+++ b/sc/source/ui/pagedlg/hfedtdlg.cxx
@@ -38,7 +38,7 @@
//------------------------------------------------------------------
#include "scitems.hxx"
-#include <svtools/eitem.hxx>
+#include <svl/eitem.hxx>
#include "hfedtdlg.hxx"
#include "global.hxx"
diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx
index 70232e2827f1..e55c8405fc34 100644
--- a/sc/source/ui/pagedlg/scuitphfedit.cxx
+++ b/sc/source/ui/pagedlg/scuitphfedit.cxx
@@ -50,9 +50,9 @@
#include <sfx2/objsh.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/svapp.hxx>
-#include <svtools/useroptions.hxx>
+#include <unotools/useroptions.hxx>
#define _SVSTDARR_USHORTS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
//CHINA001 #include "tphfedit.hxx"
#include "editutil.hxx"
diff --git a/sc/source/ui/pagedlg/tphf.cxx b/sc/source/ui/pagedlg/tphf.cxx
index 5ba7a485ede8..58e5570aa01b 100644
--- a/sc/source/ui/pagedlg/tphf.cxx
+++ b/sc/source/ui/pagedlg/tphf.cxx
@@ -40,7 +40,7 @@
#define _TPHF_CXX
#include "scitems.hxx"
#include <sfx2/basedlgs.hxx>
-#include <svtools/style.hxx>
+#include <svl/style.hxx>
#include <vcl/svapp.hxx>
#include <vcl/msgbox.hxx>
diff --git a/sc/source/ui/pagedlg/tptable.cxx b/sc/source/ui/pagedlg/tptable.cxx
index e64ef46bef87..b3640f2905c5 100644
--- a/sc/source/ui/pagedlg/tptable.cxx
+++ b/sc/source/ui/pagedlg/tptable.cxx
@@ -171,9 +171,9 @@ ScTablePage::ScTablePage( Window* pParent, const SfxItemSet& rCoreAttrs ) :
void ScTablePage::ShowImage()
{
- bool bDark = GetDisplayBackground().GetColor().IsDark();
+ bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
bool bLeftRight = aBtnLeftRight.IsChecked();
- aBmpPageDir.SetImage( bDark ?
+ aBmpPageDir.SetImage( bHC ?
(bLeftRight ? aImgLeftRightHC : aImgTopDownHC) :
(bLeftRight ? aImgLeftRight : aImgTopDown) );
}
diff --git a/sc/source/ui/src/globstr.src b/sc/source/ui/src/globstr.src
index 3da9da5101a4..7d1c2957f235 100644
--- a/sc/source/ui/src/globstr.src
+++ b/sc/source/ui/src/globstr.src
@@ -1665,7 +1665,7 @@ Resource RID_GLOBSTR
String STR_UNDO_CHINESE_TRANSLATION
{
- Text [ en-US ] = "Chinese translation";
+ Text [ en-US ] = "Chinese conversion";
};
String STR_ERR_DATAPILOT_INPUT
diff --git a/sc/source/ui/styleui/scstyles.src b/sc/source/ui/styleui/scstyles.src
index 4eead4a953f2..9c367b9daf7f 100644
--- a/sc/source/ui/styleui/scstyles.src
+++ b/sc/source/ui/styleui/scstyles.src
@@ -29,7 +29,7 @@
************************************************************************/
#include "sc.hrc"
-#include <svtools/style.hrc>
+#include <svl/style.hrc>
#define IMPL_FAMILY(family,filter) \
StyleFamily = family; \
FilterList = { filter }
diff --git a/sc/source/ui/styleui/styledlg.cxx b/sc/source/ui/styleui/styledlg.cxx
index 71066ec27ec3..ea94566b918f 100644
--- a/sc/source/ui/styleui/styledlg.cxx
+++ b/sc/source/ui/styleui/styledlg.cxx
@@ -47,8 +47,8 @@
//CHINA001 #include <svx/page.hxx>
//CHINA001 #include <svx/paragrph.hxx>
#include <sfx2/objsh.hxx>
-#include <svtools/style.hxx>
-#include <svtools/cjkoptions.hxx>
+#include <svl/style.hxx>
+#include <svl/cjkoptions.hxx>
#include "styledlg.hxx"
#include "tabpages.hxx" // Zellvorlagen
@@ -60,9 +60,9 @@
#include <svx/svxdlg.hxx> //CHINA001
#include <svx/svxids.hrc> //CHINA001
#include <svx/dialogs.hrc> //CHINA001
-#include <svtools/intitem.hxx> //CHINA001
+#include <svl/intitem.hxx> //CHINA001
#include <svx/flstitem.hxx> //CHINA001
-#include <svtools/aeitem.hxx> //CHINA001
+#include <svl/aeitem.hxx> //CHINA001
#include <svx/flagsdef.hxx> //CHINA001
//==================================================================
diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx
index eb23516cafeb..87f83ce7a932 100644
--- a/sc/source/ui/undo/undocell.cxx
+++ b/sc/source/ui/undo/undocell.cxx
@@ -35,7 +35,7 @@
#include <svx/eeitem.hxx>
#include <svx/editobj.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <sfx2/app.hxx>
#include "undocell.hxx"
diff --git a/sc/source/ui/undo/undostyl.cxx b/sc/source/ui/undo/undostyl.cxx
index 01c561e96c83..7e7f3db1d42c 100644
--- a/sc/source/ui/undo/undostyl.cxx
+++ b/sc/source/ui/undo/undostyl.cxx
@@ -35,7 +35,7 @@
// INCLUDE ---------------------------------------------------------------
-#include <svtools/itemset.hxx>
+#include <svl/itemset.hxx>
#include <vcl/virdev.hxx>
#include "undostyl.hxx"
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 22808d95ac01..41c56cadb3be 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -46,7 +46,7 @@
#include <sfx2/app.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
-#include <svtools/smplhint.hxx>
+#include <svl/smplhint.hxx>
#include "undotab.hxx"
#include "document.hxx"
diff --git a/sc/source/ui/unoobj/addruno.cxx b/sc/source/ui/unoobj/addruno.cxx
index a3b026396942..9661335bbf35 100644
--- a/sc/source/ui/unoobj/addruno.cxx
+++ b/sc/source/ui/unoobj/addruno.cxx
@@ -36,7 +36,7 @@
#include <com/sun/star/table/CellAddress.hpp>
#include <com/sun/star/table/CellRangeAddress.hpp>
-#include <svtools/itemprop.hxx>
+#include <svl/itemprop.hxx>
#include "docsh.hxx"
#include "unonames.hxx"
diff --git a/sc/source/ui/unoobj/afmtuno.cxx b/sc/source/ui/unoobj/afmtuno.cxx
index d7f1eb13c1b2..e4b9ef8a8765 100644
--- a/sc/source/ui/unoobj/afmtuno.cxx
+++ b/sc/source/ui/unoobj/afmtuno.cxx
@@ -36,7 +36,7 @@
#include "scitems.hxx"
#include <tools/debug.hxx>
#include <tools/shl.hxx>
-#include <svtools/poolitem.hxx>
+#include <svl/poolitem.hxx>
#include <svx/unomid.hxx>
#include "unowids.hxx"
#include <rtl/uuid.h>
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index f3418a84e2ef..babccf9a7053 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -50,8 +50,8 @@
#include <svx/unotext.hxx>
#include <svx/svdpage.hxx>
#include <sfx2/bindings.hxx>
-#include <svtools/zforlist.hxx>
-#include <svtools/zformat.hxx>
+#include <svl/zforlist.hxx>
+#include <svl/zformat.hxx>
#include <rtl/uuid.h>
#include <float.h> // DBL_MIN
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index bdf5317da1bc..07ed8709ab01 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -542,6 +542,14 @@ void Chart2Positioner::glueState()
meGlue = GLUETYPE_COLS;
return;
}
+ // #i103540# prevent invalid vector size
+ if ((nC <= 0) || (nR <= 0))
+ {
+ invalidateGlue();
+ mnStartCol = 0;
+ mnStartRow = 0;
+ return;
+ }
sal_uInt32 nCR = static_cast<sal_uInt32>(nC*nR);
const sal_uInt8 nHole = 0;
diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx
index 3c584a94a775..d66600df4243 100644
--- a/sc/source/ui/unoobj/chartuno.cxx
+++ b/sc/source/ui/unoobj/chartuno.cxx
@@ -44,7 +44,7 @@
#include <svx/svdpage.hxx>
#include <svx/svdundo.hxx>
#include <sfx2/app.hxx>
-#include <svtools/moduleoptions.hxx>
+#include <unotools/moduleoptions.hxx>
#include <sot/clsids.hxx>
#include <toolkit/helper/vclunohelper.hxx>
diff --git a/sc/source/ui/unoobj/cursuno.cxx b/sc/source/ui/unoobj/cursuno.cxx
index b6dacccec334..99c907113bb8 100644
--- a/sc/source/ui/unoobj/cursuno.cxx
+++ b/sc/source/ui/unoobj/cursuno.cxx
@@ -34,8 +34,8 @@
#include "scitems.hxx"
-#include <svtools/intitem.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/intitem.hxx>
+#include <svl/zforlist.hxx>
#include <rtl/uuid.h>
#include "cursuno.hxx"
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index c68baf36ba2b..ed40d2f5c96a 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -32,7 +32,7 @@
#include "precompiled_sc.hxx"
#include <algorithm>
-#include <svtools/smplhint.hxx>
+#include <svl/smplhint.hxx>
#include <rtl/uuid.h>
#include "dapiuno.hxx"
diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx
index 13f2c26c6e47..0dd364812d48 100644
--- a/sc/source/ui/unoobj/datauno.cxx
+++ b/sc/source/ui/unoobj/datauno.cxx
@@ -34,8 +34,8 @@
#include <tools/debug.hxx>
-#include <svtools/smplhint.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/smplhint.hxx>
+#include <svl/zforlist.hxx>
#include <rtl/uuid.h>
#include <com/sun/star/awt/XBitmap.hpp>
diff --git a/sc/source/ui/unoobj/defltuno.cxx b/sc/source/ui/unoobj/defltuno.cxx
index bc6f135ce174..3df667faad8c 100644
--- a/sc/source/ui/unoobj/defltuno.cxx
+++ b/sc/source/ui/unoobj/defltuno.cxx
@@ -33,8 +33,8 @@
-#include <svtools/smplhint.hxx>
-#include <svtools/itemprop.hxx>
+#include <svl/smplhint.hxx>
+#include <svl/itemprop.hxx>
#include <svx/unomid.hxx>
#include <i18npool/mslangid.hxx>
diff --git a/sc/source/ui/unoobj/dispuno.cxx b/sc/source/ui/unoobj/dispuno.cxx
index 1e2309dd2c0a..99bce5579e14 100644
--- a/sc/source/ui/unoobj/dispuno.cxx
+++ b/sc/source/ui/unoobj/dispuno.cxx
@@ -36,7 +36,7 @@
#include <sfx2/viewfrm.hxx>
#include <comphelper/uno3.hxx>
#include <svx/dataaccessdescriptor.hxx>
-#include <svtools/smplhint.hxx>
+#include <svl/smplhint.hxx>
#include <com/sun/star/frame/XDispatchProviderInterception.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index cd63adc33989..5f4f1a7aa93f 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -40,9 +40,9 @@
#include <svx/svdpage.hxx>
#include <svx/svxids.hrc>
-#include <svtools/numuno.hxx>
-#include <svtools/smplhint.hxx>
-#include <svtools/undoopt.hxx>
+#include <svl/numuno.hxx>
+#include <svl/smplhint.hxx>
+#include <unotools/undoopt.hxx>
#include <sfx2/printer.hxx>
#include <sfx2/bindings.hxx>
#include <vcl/pdfextoutdevdata.hxx>
@@ -221,7 +221,8 @@ ScModelObj::ScModelObj( ScDocShell* pDocSh ) :
aPropSet( lcl_GetDocOptPropertyMap() ),
pDocShell( pDocSh ),
pPrintFuncCache( NULL ),
- maChangesListeners( m_aMutex )
+ maChangesListeners( m_aMutex ),
+ mnXlsWriteProtPass( 0 )
{
// pDocShell may be NULL if this is the base of a ScDocOptionsObj
if ( pDocShell )
@@ -243,7 +244,8 @@ ScModelObj::~ScModelObj()
uno::Reference< uno::XAggregation> ScModelObj::GetFormatter()
{
- if ( !xNumberAgg.is() )
+ // pDocShell may be NULL if this is the base of a ScDocOptionsObj
+ if ( !xNumberAgg.is() && pDocShell )
{
// setDelegator veraendert den RefCount, darum eine Referenz selber halten
// (direkt am m_refCount, um sich beim release nicht selbst zu loeschen)
@@ -1448,6 +1450,14 @@ void SAL_CALL ScModelObj::setPropertyValue(
if ( aObjName.getLength() )
pDoc->RestoreChartListener( aObjName );
}
+ else if ( aString.EqualsAscii( "WriteProtectionPassword" ) )
+ {
+ /* This is a hack for #160550# to preserve the write-protection
+ password in an XLS roundtrip. This property MUST NOT be used
+ for any other purpose. This property will be deleted when the
+ feature "Write Protection With Password" will be implemented. */
+ aValue >>= mnXlsWriteProtPass;
+ }
if ( aNewOpt != rOldOpt )
{
@@ -1610,6 +1620,14 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const rtl::OUString& aPropertyNa
{
ScUnoHelpFunctions::SetBoolInAny( aRet, (pDocShell->GetCreateMode() == SFX_CREATE_MODE_INTERNAL) );
}
+ else if ( aString.EqualsAscii( "WriteProtectionPassword" ) )
+ {
+ /* This is a hack for #160550# to preserve the write-protection
+ password in an XLS roundtrip. This property MUST NOT be used
+ for any other purpose. This property will be deleted when the
+ feature "Write Protection With Password" will be implemented. */
+ aRet <<= mnXlsWriteProtPass;
+ }
}
return aRet;
diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx
index 94078ff91af4..8fd4bba512eb 100644
--- a/sc/source/ui/unoobj/fielduno.cxx
+++ b/sc/source/ui/unoobj/fielduno.cxx
@@ -30,7 +30,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
-#include <svtools/smplhint.hxx>
+#include <svl/smplhint.hxx>
#include <svx/eeitem.hxx>
diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx
index a50b4003b0ac..a60bb836b142 100644
--- a/sc/source/ui/unoobj/funcuno.cxx
+++ b/sc/source/ui/unoobj/funcuno.cxx
@@ -35,7 +35,7 @@
#include <tools/debug.hxx>
#include <sfx2/app.hxx>
-#include <svtools/itemprop.hxx>
+#include <svl/itemprop.hxx>
#include "funcuno.hxx"
#include "miscuno.hxx"
diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx
index 0a07b057740b..ddb5dc3b0496 100644
--- a/sc/source/ui/unoobj/linkuno.cxx
+++ b/sc/source/ui/unoobj/linkuno.cxx
@@ -33,7 +33,7 @@
-#include <svtools/smplhint.hxx>
+#include <svl/smplhint.hxx>
#include <svx/linkmgr.hxx>
#include "linkuno.hxx"
diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx
index 536e1f2a1a65..ab8576949b75 100644
--- a/sc/source/ui/unoobj/nameuno.cxx
+++ b/sc/source/ui/unoobj/nameuno.cxx
@@ -33,7 +33,7 @@
-#include <svtools/smplhint.hxx>
+#include <svl/smplhint.hxx>
#include <com/sun/star/sheet/NamedRangeFlag.hpp>
#include <com/sun/star/awt/XBitmap.hpp>
diff --git a/sc/source/ui/unoobj/notesuno.cxx b/sc/source/ui/unoobj/notesuno.cxx
index e44dab865d46..8477d1f17779 100644
--- a/sc/source/ui/unoobj/notesuno.cxx
+++ b/sc/source/ui/unoobj/notesuno.cxx
@@ -30,7 +30,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
-#include <svtools/smplhint.hxx>
+#include <svl/smplhint.hxx>
#include "rangelst.hxx"
diff --git a/sc/source/ui/unoobj/optuno.cxx b/sc/source/ui/unoobj/optuno.cxx
index 8c3deefba6d5..f7c8d2827f50 100644
--- a/sc/source/ui/unoobj/optuno.cxx
+++ b/sc/source/ui/unoobj/optuno.cxx
@@ -33,7 +33,7 @@
-#include <svtools/itemprop.hxx>
+#include <svl/itemprop.hxx>
#include <com/sun/star/util/Date.hpp>
diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx
index 6ed8181091ac..4600244cf2df 100644
--- a/sc/source/ui/unoobj/scdetect.cxx
+++ b/sc/source/ui/unoobj/scdetect.cxx
@@ -64,10 +64,10 @@
#include <svtools/parhtml.hxx>
#include <rtl/ustring.h>
#include <rtl/logfile.hxx>
-#include <svtools/itemset.hxx>
+#include <svl/itemset.hxx>
#include <vcl/window.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/eitem.hxx>
+#include <svl/stritem.hxx>
#include <tools/urlobj.hxx>
#include <vos/mutex.hxx>
#include <svtools/sfxecode.hxx>
diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx
index 71f45e6ab12b..1f51bc1646af 100644
--- a/sc/source/ui/unoobj/servuno.cxx
+++ b/sc/source/ui/unoobj/servuno.cxx
@@ -65,55 +65,71 @@ using namespace ::com::sun::star;
//------------------------------------------------------------------------
+//
+struct ProvNamesId_Type
+{
+ const char * pName;
+ sal_uInt16 nType;
+};
-static const sal_Char* __FAR_DATA aProvNames[SC_SERVICE_COUNT] =
- {
- "com.sun.star.sheet.Spreadsheet", // SC_SERVICE_SHEET
- "com.sun.star.text.TextField.URL", // SC_SERVICE_URLFIELD
- "com.sun.star.text.TextField.PageNumber", // SC_SERVICE_PAGEFIELD
- "com.sun.star.text.TextField.PageCount", // SC_SERVICE_PAGESFIELD
- "com.sun.star.text.TextField.Date", // SC_SERVICE_DATEFIELD
- "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.style.CellStyle", // SC_SERVICE_CELLSTYLE
- "com.sun.star.style.PageStyle", // SC_SERVICE_PAGESTYLE
- "com.sun.star.sheet.TableAutoFormat", // SC_SERVICE_AUTOFORMAT
- "com.sun.star.sheet.SheetCellRanges", // SC_SERVICE_CELLRANGES
- "com.sun.star.drawing.GradientTable", // SC_SERVICE_GRADTAB
- "com.sun.star.drawing.HatchTable", // SC_SERVICE_HATCHTAB
- "com.sun.star.drawing.BitmapTable", // SC_SERVICE_BITMAPTAB
- "com.sun.star.drawing.TransparencyGradientTable", // SC_SERVICE_TRGRADTAB
- "com.sun.star.drawing.MarkerTable", // SC_SERVICE_MARKERTAB
- "com.sun.star.drawing.DashTable", // SC_SERVICE_DASHTAB
- "com.sun.star.text.NumberingRules", // SC_SERVICE_NUMRULES
- "com.sun.star.sheet.Defaults", // SC_SERVICE_DOCDEFLTS
- "com.sun.star.drawing.Defaults", // SC_SERVICE_DRAWDEFLTS
- "com.sun.star.comp.SpreadsheetSettings", // SC_SERVICE_DOCSPRSETT
- "com.sun.star.document.Settings", // SC_SERVICE_DOCCONF
- "com.sun.star.image.ImageMapRectangleObject",// SC_SERVICE_IMAP_RECT
- "com.sun.star.image.ImageMapCircleObject", // SC_SERVICE_IMAP_CIRC
- "com.sun.star.image.ImageMapPolygonObject", // SC_SERVICE_IMAP_POLY
+static const ProvNamesId_Type __FAR_DATA aProvNamesId[] =
+{
+ { "com.sun.star.sheet.Spreadsheet", SC_SERVICE_SHEET },
+ { "com.sun.star.text.TextField.URL", SC_SERVICE_URLFIELD },
+ { "com.sun.star.text.TextField.PageNumber", SC_SERVICE_PAGEFIELD },
+ { "com.sun.star.text.TextField.PageCount", SC_SERVICE_PAGESFIELD },
+ { "com.sun.star.text.TextField.Date", SC_SERVICE_DATEFIELD },
+ { "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.style.CellStyle", SC_SERVICE_CELLSTYLE },
+ { "com.sun.star.style.PageStyle", SC_SERVICE_PAGESTYLE },
+ { "com.sun.star.sheet.TableAutoFormat", SC_SERVICE_AUTOFORMAT },
+ { "com.sun.star.sheet.SheetCellRanges", SC_SERVICE_CELLRANGES },
+ { "com.sun.star.drawing.GradientTable", SC_SERVICE_GRADTAB },
+ { "com.sun.star.drawing.HatchTable", SC_SERVICE_HATCHTAB },
+ { "com.sun.star.drawing.BitmapTable", SC_SERVICE_BITMAPTAB },
+ { "com.sun.star.drawing.TransparencyGradientTable", SC_SERVICE_TRGRADTAB },
+ { "com.sun.star.drawing.MarkerTable", SC_SERVICE_MARKERTAB },
+ { "com.sun.star.drawing.DashTable", SC_SERVICE_DASHTAB },
+ { "com.sun.star.text.NumberingRules", SC_SERVICE_NUMRULES },
+ { "com.sun.star.sheet.Defaults", SC_SERVICE_DOCDEFLTS },
+ { "com.sun.star.drawing.Defaults", SC_SERVICE_DRAWDEFLTS },
+ { "com.sun.star.comp.SpreadsheetSettings", SC_SERVICE_DOCSPRSETT },
+ { "com.sun.star.document.Settings", SC_SERVICE_DOCCONF },
+ { "com.sun.star.image.ImageMapRectangleObject", SC_SERVICE_IMAP_RECT },
+ { "com.sun.star.image.ImageMapCircleObject", SC_SERVICE_IMAP_CIRC },
+ { "com.sun.star.image.ImageMapPolygonObject", SC_SERVICE_IMAP_POLY },
// #100263# Support creation of GraphicObjectResolver and EmbeddedObjectResolver
- "com.sun.star.document.ExportGraphicObjectResolver", // SC_SERVICE_EXPORT_GOR
- "com.sun.star.document.ImportGraphicObjectResolver", // SC_SERVICE_IMPORT_GOR
- "com.sun.star.document.ExportEmbeddedObjectResolver", // SC_SERVICE_EXPORT_EOR
- "com.sun.star.document.ImportEmbeddedObjectResolver", // SC_SERVICE_IMPORT_EOR
-
- SC_SERVICENAME_VALBIND, // SC_SERVICE_VALBIND
- SC_SERVICENAME_LISTCELLBIND, // SC_SERVICE_LISTCELLBIND
- SC_SERVICENAME_LISTSOURCE, // SC_SERVICE_LISTSOURCE
- SC_SERVICENAME_CELLADDRESS, // SC_SERVICE_CELLADDRESS
- SC_SERVICENAME_RANGEADDRESS, // SC_SERVICE_RANGEADDRESS
-
- "com.sun.star.sheet.DocumentSettings", // SC_SERVICE_SHEETDOCSET
-
- SC_SERVICENAME_CHDATAPROV, // SC_SERVICE_CHDATAPROV
- SC_SERVICENAME_FORMULAPARS, // SC_SERVICE_FORMULAPARS
- SC_SERVICENAME_OPCODEMAPPER // SC_SERVICE_OPCODEMAPPER
- };
+ { "com.sun.star.document.ExportGraphicObjectResolver", SC_SERVICE_EXPORT_GOR },
+ { "com.sun.star.document.ImportGraphicObjectResolver", SC_SERVICE_IMPORT_GOR },
+ { "com.sun.star.document.ExportEmbeddedObjectResolver", SC_SERVICE_EXPORT_EOR },
+ { "com.sun.star.document.ImportEmbeddedObjectResolver", SC_SERVICE_IMPORT_EOR },
+
+ { SC_SERVICENAME_VALBIND, SC_SERVICE_VALBIND },
+ { SC_SERVICENAME_LISTCELLBIND, SC_SERVICE_LISTCELLBIND },
+ { SC_SERVICENAME_LISTSOURCE, SC_SERVICE_LISTSOURCE },
+ { SC_SERVICENAME_CELLADDRESS, SC_SERVICE_CELLADDRESS },
+ { SC_SERVICENAME_RANGEADDRESS, SC_SERVICE_RANGEADDRESS },
+
+ { "com.sun.star.sheet.DocumentSettings",SC_SERVICE_SHEETDOCSET },
+
+ { SC_SERVICENAME_CHDATAPROV, SC_SERVICE_CHDATAPROV },
+ { SC_SERVICENAME_FORMULAPARS, SC_SERVICE_FORMULAPARS },
+ { SC_SERVICENAME_OPCODEMAPPER, SC_SERVICE_OPCODEMAPPER },
+
+ // case-correct versions of the service names (#i102468#)
+ { "com.sun.star.text.textfield.URL", SC_SERVICE_URLFIELD },
+ { "com.sun.star.text.textfield.PageNumber", SC_SERVICE_PAGEFIELD },
+ { "com.sun.star.text.textfield.PageCount", SC_SERVICE_PAGESFIELD },
+ { "com.sun.star.text.textfield.Date", SC_SERVICE_DATEFIELD },
+ { "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 },
+};
//
// old service names that were in 567 still work in createInstance,
@@ -186,11 +202,17 @@ sal_uInt16 ScServiceProvider::GetProviderType(const String& rServiceName)
{
if (rServiceName.Len())
{
- USHORT i;
- for (i=0; i<SC_SERVICE_COUNT; i++)
- if (rServiceName.EqualsAscii( aProvNames[i] ))
- return i;
+ const sal_uInt16 nEntries =
+ sizeof(aProvNamesId) / sizeof(aProvNamesId[0]);
+ for (sal_uInt16 i = 0; i < nEntries; i++)
+ {
+ if (rServiceName.EqualsAscii( aProvNamesId[i].pName ))
+ {
+ return aProvNamesId[i].nType;
+ }
+ }
+ USHORT i;
for (i=0; i<SC_SERVICE_COUNT; i++)
{
DBG_ASSERT( aOldNames[i], "ScServiceProvider::GetProviderType: no oldname => crash");
@@ -369,10 +391,13 @@ uno::Reference<uno::XInterface> ScServiceProvider::MakeInstance(
uno::Sequence<rtl::OUString> ScServiceProvider::GetAllServiceNames()
{
- uno::Sequence<rtl::OUString> aRet(SC_SERVICE_COUNT);
+ const sal_uInt16 nEntries = sizeof(aProvNamesId) / sizeof(aProvNamesId[0]);
+ uno::Sequence<rtl::OUString> aRet(nEntries);
rtl::OUString* pArray = aRet.getArray();
- for (sal_uInt16 i = 0; i < SC_SERVICE_COUNT; i++)
- pArray[i] = rtl::OUString::createFromAscii( aProvNames[i] );
+ for (sal_uInt16 i = 0; i < nEntries; i++)
+ {
+ pArray[i] = rtl::OUString::createFromAscii( aProvNamesId[i].pName );
+ }
return aRet;
}
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index 12cbdbdde1a1..941f586a73c9 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -45,10 +45,10 @@
#include <sfx2/bindings.hxx>
#include <sfx2/printer.hxx>
#include <vcl/virdev.hxx>
-#include <svtools/itempool.hxx>
-#include <svtools/itemset.hxx>
-#include <svtools/intitem.hxx>
-#include <svtools/zformat.hxx>
+#include <svl/itempool.hxx>
+#include <svl/itemset.hxx>
+#include <svl/intitem.hxx>
+#include <svl/zformat.hxx>
#include <rtl/uuid.h>
#include <com/sun/star/table/BorderLine.hpp>
diff --git a/sc/source/ui/unoobj/targuno.cxx b/sc/source/ui/unoobj/targuno.cxx
index 0fed003b751b..7d291235559a 100644
--- a/sc/source/ui/unoobj/targuno.cxx
+++ b/sc/source/ui/unoobj/targuno.cxx
@@ -37,8 +37,8 @@
#include <vcl/virdev.hxx>
//#include <toolkit/unoiface.hxx>
#include <toolkit/unohlp.hxx>
-#include <svtools/itemprop.hxx>
-#include <svtools/smplhint.hxx>
+#include <svl/itemprop.hxx>
+#include <svl/smplhint.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
#include <com/sun/star/awt/XBitmap.hpp>
@@ -248,7 +248,7 @@ void ScLinkTargetTypeObj::SetLinkTargetBitmap( uno::Any& rRet, sal_uInt16 nType
}
if (nImgId)
{
- BOOL bHighContrast = Application::GetSettings().GetStyleSettings().GetWindowColor().IsDark();
+ BOOL bHighContrast = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
ImageList aEntryImages( ScResId( bHighContrast ? RID_IMAGELIST_H_NAVCONT : RID_IMAGELIST_NAVCONT ) );
const Image& rImage = aEntryImages.GetImage( nImgId );
rRet <<= uno::Reference< awt::XBitmap > (VCLUnoHelper::CreateBitmap( rImage.GetBitmapEx() ));
diff --git a/sc/source/ui/unoobj/tokenuno.cxx b/sc/source/ui/unoobj/tokenuno.cxx
index e6e194d7eb75..9d31b15fdf47 100644
--- a/sc/source/ui/unoobj/tokenuno.cxx
+++ b/sc/source/ui/unoobj/tokenuno.cxx
@@ -39,7 +39,7 @@
#include <com/sun/star/sheet/AddressConvention.hpp>
#include <com/sun/star/table/CellAddress.hpp>
-#include <svtools/itemprop.hxx>
+#include <svl/itemprop.hxx>
#include "miscuno.hxx"
#include "convuno.hxx"
diff --git a/sc/source/ui/unoobj/warnpassword.cxx b/sc/source/ui/unoobj/warnpassword.cxx
index 6b11ac7c6641..4bf4163aad3c 100644
--- a/sc/source/ui/unoobj/warnpassword.cxx
+++ b/sc/source/ui/unoobj/warnpassword.cxx
@@ -35,7 +35,7 @@
#include "warnpassword.hxx"
#include <com/sun/star/task/XInteractionHandler.hpp>
#include <com/sun/star/task/XInteractionRequest.hpp>
-#include <svtools/itemset.hxx>
+#include <svl/itemset.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/sfxsids.hrc>
#include <ucbhelper/simpleinteractionrequest.hxx>
diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx
new file mode 100644
index 000000000000..dd0550709b96
--- /dev/null
+++ b/sc/source/ui/vba/excelvbahelper.cxx
@@ -0,0 +1,222 @@
+/*************************************************************************
+ *
+ * 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: vbahelper.cxx,v $
+ * $Revision: 1.5.32.1 $
+ *
+ * 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 <docuno.hxx>
+#include "excelvbahelper.hxx"
+#include "tabvwsh.hxx"
+#include "transobj.hxx"
+#include "scmod.hxx"
+#include "cellsuno.hxx"
+#include <comphelper/processfactory.hxx>
+
+using namespace ::com::sun::star;
+using namespace ::ooo::vba;
+
+namespace ooo
+{
+namespace vba
+{
+namespace excel
+{
+void implSetZoom( const uno::Reference< frame::XModel >& xModel, sal_Int16 nZoom, std::vector< SCTAB >& nTabs )
+{
+ ScTabViewShell* pViewSh = excel::getBestViewShell( xModel );
+ Fraction aFract( nZoom, 100 );
+ pViewSh->GetViewData()->SetZoom( aFract, aFract, nTabs );
+ pViewSh->RefreshZoom();
+}
+bool isInPrintPreview( SfxViewFrame* pView )
+{
+ sal_uInt16 nViewNo = SID_VIEWSHELL1 - SID_VIEWSHELL0;
+ if ( pView->GetObjectShell()->GetFactory().GetViewFactoryCount() >
+nViewNo && !pView->GetObjectShell()->IsInPlaceActive() )
+ {
+ SfxViewFactory &rViewFactory =
+ pView->GetObjectShell()->GetFactory().GetViewFactory(nViewNo);
+ if ( pView->GetCurViewId() == rViewFactory.GetOrdinal() )
+ return true;
+ }
+ return false;
+}
+
+const ::rtl::OUString REPLACE_CELLS_WARNING( RTL_CONSTASCII_USTRINGPARAM( "ReplaceCellsWarning"));
+
+class PasteCellsWarningReseter
+{
+private:
+ bool bInitialWarningState;
+ static uno::Reference< beans::XPropertySet > getGlobalSheetSettings() throw ( uno::RuntimeException )
+ {
+ static uno::Reference< beans::XPropertySet > xTmpProps( ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
+ static uno::Reference<uno::XComponentContext > xContext( xTmpProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), uno::UNO_QUERY_THROW );
+ static uno::Reference<lang::XMultiComponentFactory > xServiceManager(
+ xContext->getServiceManager(), uno::UNO_QUERY_THROW );
+ static uno::Reference< beans::XPropertySet > xProps( xServiceManager->createInstanceWithContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sheet.GlobalSheetSettings" ) ) ,xContext ), uno::UNO_QUERY_THROW );
+ return xProps;
+ }
+
+ bool getReplaceCellsWarning() throw ( uno::RuntimeException )
+ {
+ sal_Bool res = sal_False;
+ getGlobalSheetSettings()->getPropertyValue( REPLACE_CELLS_WARNING ) >>= res;
+ return ( res == sal_True );
+ }
+
+ void setReplaceCellsWarning( bool bState ) throw ( uno::RuntimeException )
+ {
+ getGlobalSheetSettings()->setPropertyValue( REPLACE_CELLS_WARNING, uno::makeAny( bState ) );
+ }
+public:
+ PasteCellsWarningReseter() throw ( uno::RuntimeException )
+ {
+ bInitialWarningState = getReplaceCellsWarning();
+ if ( bInitialWarningState )
+ setReplaceCellsWarning( false );
+ }
+ ~PasteCellsWarningReseter()
+ {
+ if ( bInitialWarningState )
+ {
+ // don't allow dtor to throw
+ try
+ {
+ setReplaceCellsWarning( true );
+ }
+ catch ( uno::Exception& /*e*/ ){}
+ }
+ }
+};
+
+void
+implnPaste( const uno::Reference< frame::XModel>& xModel )
+{
+ PasteCellsWarningReseter resetWarningBox;
+ ScTabViewShell* pViewShell = getBestViewShell( xModel );
+ if ( pViewShell )
+ {
+ pViewShell->PasteFromSystem();
+ pViewShell->CellContentChanged();
+ }
+}
+
+
+void
+implnCopy( const uno::Reference< frame::XModel>& xModel )
+{
+ ScTabViewShell* pViewShell = getBestViewShell( xModel );
+ if ( pViewShell )
+ pViewShell->CopyToClip(NULL,false,false,true);
+}
+
+void
+implnCut( const uno::Reference< frame::XModel>& xModel )
+{
+ ScTabViewShell* pViewShell = getBestViewShell( xModel );
+ if ( pViewShell )
+ pViewShell->CutToClip( NULL, TRUE );
+}
+
+void implnPasteSpecial( const uno::Reference< frame::XModel>& xModel, USHORT nFlags,USHORT nFunction,sal_Bool bSkipEmpty, sal_Bool bTranspose)
+{
+ PasteCellsWarningReseter resetWarningBox;
+ sal_Bool bAsLink(sal_False), bOtherDoc(sal_False);
+ InsCellCmd eMoveMode = INS_NONE;
+
+ ScTabViewShell* pTabViewShell = getBestViewShell( xModel );
+ if ( pTabViewShell )
+ {
+ ScViewData* pView = pTabViewShell->GetViewData();
+ Window* pWin = ( pView != NULL ) ? pView->GetActiveWin() : NULL;
+ if ( pView && pWin )
+ {
+ if ( bAsLink && bOtherDoc )
+ pTabViewShell->PasteFromSystem(0);//SOT_FORMATSTR_ID_LINK
+ else
+ {
+ ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard( pWin );
+ ScDocument* pDoc = NULL;
+ if ( pOwnClip )
+ pDoc = pOwnClip->GetDocument();
+ pTabViewShell->PasteFromClip( nFlags, pDoc,
+ nFunction, bSkipEmpty, bTranspose, bAsLink,
+ eMoveMode, IDF_NONE, TRUE );
+ pTabViewShell->CellContentChanged();
+ }
+ }
+ }
+
+}
+
+ScDocShell*
+getDocShell( const css::uno::Reference< css::frame::XModel>& xModel )
+{
+ uno::Reference< uno::XInterface > xIf( xModel, uno::UNO_QUERY_THROW );
+ ScModelObj* pModel = dynamic_cast< ScModelObj* >( xIf.get() );
+ ScDocShell* pDocShell = NULL;
+ if ( pModel )
+ pDocShell = (ScDocShell*)pModel->GetEmbeddedObject();
+ return pDocShell;
+
+}
+
+ScTabViewShell*
+getBestViewShell( const css::uno::Reference< css::frame::XModel>& xModel )
+{
+ ScDocShell* pDocShell = getDocShell( xModel );
+ if ( pDocShell )
+ return pDocShell->GetBestViewShell();
+ return NULL;
+}
+
+ScTabViewShell*
+getCurrentBestViewShell( const uno::Reference< uno::XComponentContext >& xContext )
+{
+ uno::Reference< frame::XModel > xModel = getCurrentExcelDoc( xContext );
+ return getBestViewShell( xModel );
+}
+
+SfxViewFrame*
+getViewFrame( const uno::Reference< frame::XModel >& xModel )
+{
+ ScTabViewShell* pViewShell = getBestViewShell( xModel );
+ if ( pViewShell )
+ return pViewShell->GetViewFrame();
+ return NULL;
+}
+
+SfxItemSet*
+ScVbaCellRangeAccess::GetDataSet( ScCellRangeObj* pRangeObj )
+{
+ SfxItemSet* pDataSet = pRangeObj ? pRangeObj->GetCurrentDataSet( true ) : NULL ;
+ return pDataSet;
+
+}
+} //excel
+} //vba
+} //ooo
diff --git a/sc/source/ui/vba/excelvbahelper.hxx b/sc/source/ui/vba/excelvbahelper.hxx
new file mode 100644
index 000000000000..bb222688236a
--- /dev/null
+++ b/sc/source/ui/vba/excelvbahelper.hxx
@@ -0,0 +1,62 @@
+/*************************************************************************
+ *
+ * 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: vbahelper.hxx,v $
+ * $Revision: 1.5.32.1 $
+ *
+ * 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_EXCEL_VBA_HELPER_HXX
+#define SC_EXCEL_VBA_HELPER_HXX
+
+#include<vbahelper/vbahelper.hxx>
+#include <docsh.hxx>
+
+class ScCellRangeObj;
+
+namespace ooo
+{
+ namespace vba
+ {
+ 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 );
+ class ScVbaCellRangeAccess
+ {
+ public:
+ static SfxItemSet* GetDataSet( ScCellRangeObj* pRangeObj );
+ };
+}
+}
+}
+#endif
diff --git a/sc/source/ui/vba/helperdecl.hxx b/sc/source/ui/vba/helperdecl.hxx
index 95569a993b9c..9c37d418a561 100644
--- a/sc/source/ui/vba/helperdecl.hxx
+++ b/sc/source/ui/vba/helperdecl.hxx
@@ -32,107 +32,25 @@
namespace comphelper {
namespace service_decl {
-
-namespace detail {
-namespace css = ::com::sun::star;
-template <typename ImplT>
-class OwnServiceImpl
- : public ImplT,
- private ::boost::noncopyable
-{
- typedef ImplT BaseT;
-
-public:
- OwnServiceImpl(
- ServiceDecl const& rServiceDecl,
- css::uno::Sequence<css::uno::Any> const& args,
- css::uno::Reference<css::uno::XComponentContext> const& xContext )
- :BaseT(args, xContext), m_rServiceDecl(rServiceDecl) {}
- OwnServiceImpl(
- ServiceDecl const& rServiceDecl,
- css::uno::Reference<css::uno::XComponentContext> const& xContext )
- : BaseT(xContext), m_rServiceDecl(rServiceDecl) {}
-
- // XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName()
- throw (css::uno::RuntimeException) {
- return m_rServiceDecl.getImplementationName();
- }
- virtual sal_Bool SAL_CALL supportsService( ::rtl::OUString const& name )
- throw (css::uno::RuntimeException) {
- return m_rServiceDecl.supportsService(name);
- }
- virtual css::uno::Sequence< ::rtl::OUString>
- SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException) {
- return m_rServiceDecl.getSupportedServiceNames();
- }
-
-private:
- ServiceDecl const& m_rServiceDecl;
-};
-
-
-template <typename ImplT, typename WithArgsT>
-struct OwnCreateFunc;
-
-template <typename ImplT>
-struct OwnCreateFunc<ImplT, with_args<false> > {
- explicit OwnCreateFunc( )
- {}
-
- css::uno::Reference<css::uno::XInterface>
- operator()( ServiceDecl const& rServiceDecl,
- css::uno::Sequence<css::uno::Any> const&,
- css::uno::Reference<css::uno::XComponentContext>
- const& xContext ) const
- {
- return css::uno::Reference< ooo::vba::XHelperInterface >(new OwnServiceImpl<ImplT>( rServiceDecl, xContext ));
- }
-};
-
-template <typename ImplT>
-struct OwnCreateFunc<ImplT, with_args<true> > {
- explicit OwnCreateFunc( )
- {}
-
- css::uno::Reference<css::uno::XInterface>
- operator()( ServiceDecl const& rServiceDecl,
- css::uno::Sequence<css::uno::Any> const& args,
- css::uno::Reference<css::uno::XComponentContext>
- const& xContext ) const
- {
- css::uno::Reference< ooo::vba::XHelperInterface > xHelp(
- new OwnServiceImpl<ImplT>( rServiceDecl, args, xContext ) );
- css::uno::Reference< css::uno::XInterface > xIf( xHelp, css::uno::UNO_QUERY ) ;
- return xIf;
- }
-};
-
-} // namespace detail
-
-/** Defines a service implementation class.
-
- @tpl ImplT_ service implementation class
- @WithArgsT whether the implementation class ctor expects arguments
- (uno::Sequence<uno::Any>, uno::Reference<uno::XComponentContext>)
- or just (uno::Reference<uno::XComponentContext>)
-*/
template <typename ImplT_, typename WithArgsT = with_args<false> >
-struct vba_service_class_ {
- typedef ImplT_ ImplT;
- typedef detail::OwnServiceImpl<ImplT_ > ServiceImplT;
-
- detail::CreateFuncF const m_createFunc;
-
+struct vba_service_class_ : public serviceimpl_base< detail::OwnServiceImpl<ImplT_>, WithArgsT >
+{
+ typedef serviceimpl_base< detail::OwnServiceImpl<ImplT_>, WithArgsT > baseT;
/** Default ctor. Implementation class without args, expecting
component context as single argument.
*/
- vba_service_class_() : m_createFunc(
- detail::OwnCreateFunc<ImplT, WithArgsT>() ) {}
-
+ vba_service_class_() : baseT() {}
+ template <typename PostProcessFuncT>
+ /** Ctor to pass a post processing function/functor.
+
+ @tpl PostProcessDefaultT let your compiler deduce this
+ @param postProcessFunc function/functor that gets the yet unacquired
+ ImplT_ pointer returning a
+ uno::Reference<uno::XInterface>
+ */
+ explicit vba_service_class_( PostProcessFuncT const& postProcessFunc ) : baseT( postProcessFunc ) {}
};
-
} // namespace service_decl
} // namespace comphelper
diff --git a/sc/source/ui/vba/makefile.mk b/sc/source/ui/vba/makefile.mk
index 71727297d078..253d0f52ab96 100644
--- a/sc/source/ui/vba/makefile.mk
+++ b/sc/source/ui/vba/makefile.mk
@@ -64,7 +64,7 @@ SLOFILES= \
$(SLO)$/vbaworksheet.obj \
$(SLO)$/vbaoutline.obj \
$(SLO)$/vbafont.obj\
- $(SLO)$/vbahelper.obj\
+ $(SLO)$/excelvbahelper.obj\
$(SLO)$/vbainterior.obj\
$(SLO)$/vbawsfunction.obj\
$(SLO)$/vbawindow.obj\
@@ -81,28 +81,11 @@ SLOFILES= \
$(SLO)$/vbapalette.obj \
$(SLO)$/vbaborders.obj \
$(SLO)$/vbacharacters.obj \
- $(SLO)$/vbacombobox.obj \
$(SLO)$/vbavalidation.obj \
- $(SLO)$/vbacontrol.obj \
- $(SLO)$/vbacontrols.obj \
$(SLO)$/vbaoleobject.obj \
$(SLO)$/vbaoleobjects.obj \
- $(SLO)$/vbabutton.obj \
- $(SLO)$/vbalabel.obj \
- $(SLO)$/vbatextbox.obj \
$(SLO)$/vbatextboxshape.obj \
- $(SLO)$/vbaradiobutton.obj \
- $(SLO)$/vbalistbox.obj \
- $(SLO)$/vbalistcontrolhelper.obj \
- $(SLO)$/vbapropvalue.obj \
$(SLO)$/vbapane.obj \
- $(SLO)$/vbashape.obj \
- $(SLO)$/vbacolorformat.obj \
- $(SLO)$/vbashapes.obj \
- $(SLO)$/vbalineformat.obj \
- $(SLO)$/vbafillformat.obj \
- $(SLO)$/vbapictureformat.obj \
- $(SLO)$/vbashaperange.obj \
$(SLO)$/vbatextframe.obj \
$(SLO)$/vbacharttitle.obj \
$(SLO)$/vbacharts.obj \
@@ -116,24 +99,10 @@ SLOFILES= \
$(SLO)$/vbastyle.obj \
$(SLO)$/vbastyles.obj \
$(SLO)$/vbaassistant.obj \
- $(SLO)$/vbauserform.obj \
- $(SLO)$/vbacheckbox.obj \
- $(SLO)$/vbatogglebutton.obj \
- $(SLO)$/vbaframe.obj \
- $(SLO)$/vbascrollbar.obj \
- $(SLO)$/vbaprogressbar.obj \
- $(SLO)$/vbamultipage.obj \
- $(SLO)$/vbapages.obj \
- $(SLO)$/vbacommandbarcontrol.obj \
- $(SLO)$/vbacommandbarcontrols.obj \
- $(SLO)$/vbacommandbar.obj \
- $(SLO)$/vbacommandbars.obj \
$(SLO)$/vbahyperlink.obj \
$(SLO)$/vbapagesetup.obj \
$(SLO)$/vbapagebreak.obj \
$(SLO)$/vbapagebreaks.obj \
- $(SLO)$/vbaspinbutton.obj \
- $(SLO)$/vbaimage.obj \
$(SLO)$/service.obj
.ENDIF
# --- Targets ------------------------------------------------------
diff --git a/sc/source/ui/vba/service.cxx b/sc/source/ui/vba/service.cxx
index 53ed2d3bebcb..6286b6873321 100644
--- a/sc/source/ui/vba/service.cxx
+++ b/sc/source/ui/vba/service.cxx
@@ -61,11 +61,15 @@ namespace globals
{
extern sdecl::ServiceDecl const serviceDecl;
}
-namespace userform
+namespace hyperlink
{
extern sdecl::ServiceDecl const serviceDecl;
}
-namespace hyperlink
+namespace application
+{
+extern sdecl::ServiceDecl const serviceDecl;
+}
+namespace textframe
{
extern sdecl::ServiceDecl const serviceDecl;
}
@@ -83,10 +87,10 @@ extern "C"
lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey )
{
OSL_TRACE("In component_writeInfo");
-
+#if 0
// Component registration
if ( component_writeInfoHelper( pServiceManager, pRegistryKey,
- range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, userform::serviceDecl, window::serviceDecl, hyperlink::serviceDecl ) )
+ range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, window::serviceDecl, hyperlink::serviceDecl, application::serviceDecl ) )
{
// Singleton registration
try
@@ -106,6 +110,12 @@ extern "C"
}
}
return sal_False;
+#else
+ // Component registration
+ return component_writeInfoHelper( pServiceManager, pRegistryKey,
+ range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, window::serviceDecl, hyperlink::serviceDecl, application::serviceDecl ) && component_writeInfoHelper( pServiceManager, pRegistryKey, textframe::serviceDecl );
+#endif
+
}
SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
@@ -114,7 +124,9 @@ extern "C"
{
OSL_TRACE("In component_getFactory for %s", pImplName );
void* pRet = component_getFactoryHelper(
- pImplName, pServiceManager, pRegistryKey, range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, userform::serviceDecl, window::serviceDecl, hyperlink::serviceDecl );
+ pImplName, pServiceManager, pRegistryKey, range::serviceDecl, workbook::serviceDecl, worksheet::serviceDecl, globals::serviceDecl, window::serviceDecl, hyperlink::serviceDecl, application::serviceDecl );
+ if( !pRet )
+ pRet = component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey, textframe::serviceDecl );
OSL_TRACE("Ret is 0x%x", pRet);
return pRet;
}
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/ApplicationRunTest.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/ApplicationRunTest.xls
new file mode 100644
index 000000000000..a5a591c1f849
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/ApplicationRunTest.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/AutoFilter.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/AutoFilter.xls
new file mode 100644
index 000000000000..9b3a1043c5ee
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/AutoFilter.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/CalcFont.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/CalcFont.xls
new file mode 100644
index 000000000000..9ddb69600643
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/CalcFont.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/CalcZoom.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/CalcZoom.xls
new file mode 100644
index 000000000000..5db47c76dbe9
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/CalcZoom.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/FinancialFuncTests.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/FinancialFuncTests.xls
new file mode 100644
index 000000000000..d4776b98fe1d
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/FinancialFuncTests.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/FinancialFuncs.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/FinancialFuncs.xls
new file mode 100644
index 000000000000..bb8941809947
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/FinancialFuncs.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/MiscOperatorTests.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/MiscOperatorTests.xls
new file mode 100644
index 000000000000..23227ae37e24
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/MiscOperatorTests.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/MiscRangeTests.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/MiscRangeTests.xls
new file mode 100644
index 000000000000..ebd9e91b5b28
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/MiscRangeTests.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/PageBreaks.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/PageBreaks.xls
new file mode 100644
index 000000000000..b6651fa5d617
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/PageBreaks.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/Ranges-2.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/Ranges-2.xls
new file mode 100644
index 000000000000..f6e81cf933fd
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/Ranges-2.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/Ranges-3.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/Ranges-3.xls
new file mode 100644
index 000000000000..8722f6d3057e
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/Ranges-3.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/Ranges.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/Ranges.xls
new file mode 100644
index 000000000000..1c1d74d37486
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/Ranges.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/Shapes.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/Shapes.xls
new file mode 100644
index 000000000000..254f3c97756c
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/Shapes.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/StrConv-test.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/StrConv-test.xls
new file mode 100644
index 000000000000..198abbec5871
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/StrConv-test.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/Template.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/Template.xls
new file mode 100644
index 000000000000..4387231fe744
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/Template.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/TestAddress.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/TestAddress.xls
new file mode 100644
index 000000000000..48d30cbe2e9e
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/TestAddress.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/TestCalc_Rangetest.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/TestCalc_Rangetest.xls
new file mode 100644
index 000000000000..a497d4f10f3e
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/TestCalc_Rangetest.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/TestCalc_Rangetest2.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/TestCalc_Rangetest2.xls
new file mode 100644
index 000000000000..34c606fc28f5
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/TestCalc_Rangetest2.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/TestIntersection.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/TestIntersection.xls
new file mode 100644
index 000000000000..24f88db87ccc
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/TestIntersection.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/TestUnion.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/TestUnion.xls
new file mode 100644
index 000000000000..5b8f0968cf38
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/TestUnion.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/VariantTest.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/VariantTest.xls
new file mode 100644
index 000000000000..f604cfbe3975
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/VariantTest.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/Window.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/Window.xls
new file mode 100644
index 000000000000..6fb6963c2f31
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/Window.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/bytearraystring.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/bytearraystring.xls
new file mode 100644
index 000000000000..471bbc349e5b
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/bytearraystring.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/dateserial.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/dateserial.xls
new file mode 100644
index 000000000000..768fb513eba4
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/dateserial.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/datevalue.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/datevalue.xls
new file mode 100644
index 000000000000..852a51d100b8
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/datevalue.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/format.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/format.xls
new file mode 100644
index 000000000000..99ed64d38915
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/format.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/excel/AutoFilter.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/excel/AutoFilter.log
new file mode 100644
index 000000000000..1fe0cbd01fe5
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/excel/AutoFilter.log
@@ -0,0 +1,20 @@
+Test run started : 17/07/2007 17:36:22
+----------------------------------------------------------------
+TestAddress
+ TEST START : TestAddress
+ ITEM Assertion OK : test1 'starts with' string criteria
+ ITEM Assertion OK : test2 'not equal to' string criteria
+ ITEM Assertion OK : test3 'ends with' string criteria
+ ITEM Assertion OK : test4 field 'all'
+ ITEM Assertion OK : test5 numeric '<15'
+ ITEM Assertion OK : test6 numeric '>=15'
+ ITEM Assertion OK : test7 numeric '<=12'
+Test Results
+============
+
+Tests passed: 7
+Tests failed: 0
+
+END 'TestAddress
+ TEST OK : TestAddress
+Test run finished : 17/07/2007 17:36:23
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/excel/MiscRangeTests.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/excel/MiscRangeTests.log
new file mode 100644
index 000000000000..260465386d07
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/excel/MiscRangeTests.log
@@ -0,0 +1,45 @@
+Test run started : 17/07/2007 15:01:37
+----------------------------------------------------------------
+MiscRangeTests
+ TEST START : MiscRangeTests
+ ITEM Assertion OK : test 1
+ ITEM Assertion OK : test 2
+ ITEM Assertion OK : test 3
+ ITEM Assertion OK : test 4
+ ITEM Assertion OK : test 5
+ ITEM Assertion OK : test 6
+ ITEM Assertion OK : test 7
+ ITEM Assertion OK : test 8
+ ITEM Assertion OK : test 9
+ ITEM Assertion OK : test 10
+ ITEM Assertion OK : test 11
+ ITEM Assertion OK : test 12
+ ITEM Assertion OK : test 13
+ ITEM Assertion OK : test 14
+ ITEM Assertion OK : test 15
+ ITEM Assertion OK : test 16
+ ITEM Assertion OK : test 17
+ ITEM Assertion OK : test 18
+ ITEM Assertion OK : test 19
+ ITEM Assertion OK : test 20
+ ITEM Assertion OK : test 21
+ ITEM Assertion OK : test 22
+ ITEM Assertion OK : test 23
+ ITEM Assertion OK : test 24
+ ITEM Assertion OK : test 25
+ ITEM Assertion OK : test 26
+ ITEM Assertion OK : test 27
+ ITEM Assertion OK : test 28
+ ITEM Assertion OK : test 29
+ ITEM Assertion OK : test 30
+ ITEM Assertion OK : test 31
+No. tests: 31
+Summary
+=======
+Run: 31
+Passed: 31
+Failed: 0
+
+END 'MiscRangeTests
+ TEST OK : MiscRangeTests
+Test run finished : 17/07/2007 15:01:39
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/excel/Ranges-2.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/excel/Ranges-2.log
new file mode 100644
index 000000000000..736d5bbc42d0
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/excel/Ranges-2.log
@@ -0,0 +1,68 @@
+Test run started : 18/06/2007 17:50:04
+----------------------------------------------------------------
+ClearFormtsIssue
+ TEST START : ClearFormtsIssue
+ ITEM Assertion OK : Range.Font.Bold is: True
+ ITEM Assertion OK : Range.Font.Bold is: False
+END 'ClearFormtsIssue' Symbol
+ TEST OK : ClearFormtsIssue
+----------------------------------------------------------------
+VerticalAlignment-Issue
+ TEST START : VerticalAlignment-Issue
+ ITEM Assertion OK : - Range.VerticalAlignment (get)
+ ITEM Assertion OK : - Range.VerticalAlignment (set)
+ ITEM Assertion OK : - Range.VerticalAlignment (get)
+ ITEM Assertion OK : - Range.VerticalAlignment (get)
+ ITEM Assertion OK : - Range.VerticalAlignment (set)
+ ITEM Assertion OK : - Range.VerticalAlignment (get)
+ ITEM Assertion OK : - Range.VerticalAlignment (set)
+ ITEM Assertion OK : Range.VeritcalAlignment is Null
+END 'VerticalAlignment-Issue' Symbol
+ TEST OK : VerticalAlignment-Issue
+----------------------------------------------------------------
+HorizontalAlignment-Issue
+ TEST START : HorizontalAlignment-Issue
+ ITEM Assertion OK : - Range.HorizontalAlignment (get)
+ ITEM Assertion OK : - Range.HorizontalAlignment (set)
+ ITEM Assertion OK : - Range.HorizontalAlignment (get)
+ ITEM Assertion OK : - Range.HorizontalAlignment (set)
+ ITEM Assertion OK : - Range.HorizontalAlignment (get)
+ ITEM Assertion OK : - Range.HorizontalAlignment (set)
+ ITEM Assertion OK : - Range.HorizontalAlignment (get)
+ ITEM Assertion OK : - Range.HorizontalAlignment (set)
+ ITEM Assertion OK : Range.HorizontalAlignment is Null
+END 'HorizontalAlignment-Issue' Symbol
+ TEST OK : HorizontalAlignment-Issue
+----------------------------------------------------------------
+WrapText-Issue
+ TEST START : WrapText-Issue
+ ITEM Assertion OK : - Range.WrapText (get)
+ ITEM Assertion OK : - Range.WrapText (get)
+ ITEM Assertion OK : Range.WrapText is Null
+END 'WrapText-Issue' Symbol
+ TEST OK : WrapText-Issue
+----------------------------------------------------------------
+FontBorderIssues
+ TEST START : FontBorderIssues
+ ITEM Assertion OK : - = Borders.Color (getColor)
+ ITEM Assertion OK : - = Font.Color (getColor)
+END 'FontBorderIssues' Symbol
+ TEST OK : FontBorderIssues
+----------------------------------------------------------------
+RangeSizeIssues
+ TEST START : RangeSizeIssues
+ ITEM Assertion OK : Range.Left is: 114
+ ITEM Assertion OK : Range.Top is: 95.25
+ ITEM Assertion OK : Range.Width is: 216
+ ITEM Assertion OK : Range.Height is: 271.5
+END 'RangeSizeIssues' Symbol
+ TEST OK : RangeSizeIssues
+----------------------------------------------------------------
+ApplicationIssues
+ TEST START : ApplicationIssues
+ ITEM Assertion OK : Range.Address is: $E$8:$G$13,$G$13:$K$19
+ ITEM Assertion OK : Range.Address is: $E$8:$G$13,$G$13:$K$19
+ ITEM Assertion OK : Application.ActiveSheet.Name: Sheet1
+END 'ApplicationIssues' Symbol
+ TEST OK : ApplicationIssues
+Test run finished : 18/06/2007 17:50:04
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/excel/Ranges-3.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/excel/Ranges-3.log
new file mode 100644
index 000000000000..a7de979d5e13
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/excel/Ranges-3.log
@@ -0,0 +1,8 @@
+Test run started : 19/06/2007 11:21:42
+----------------------------------------------------------------
+MyGoalseek-Issue
+ TEST START : MyGoalseek-Issue
+ ITEM Assertion OK : Variable Range value: 15
+END 'MyGoalseek-Issue' Symbol
+ TEST OK : MyGoalseek-Issue
+Test run finished : 19/06/2007 11:21:42
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/excel/Ranges.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/excel/Ranges.log
new file mode 100644
index 000000000000..8c9644aac155
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/excel/Ranges.log
@@ -0,0 +1,280 @@
+Test run started : 01/06/2007 11:28:58
+----------------------------------------------------------------
+ApplicationMethods
+ TEST START : ApplicationMethods
+ ITEM Assertion OK : Name of Workbook is: Ranges.xls
+ ITEM Assertion OK : Address of Application.Columns is: $A:$A
+ ITEM Assertion OK : Address of Application.Rows is: $1:$1
+ ITEM Assertion OK : Address of Application.Range is: $1:$1,$5:$7
+ ITEM Assertion OK : Please check manually: DefaultFilePath is: C:\Documents and Settings\vituosity\My Documents
+ ITEM Assertion OK : Please check manually: Library Path is: C:\Program Files\Microsoft Office\OFFICE11\LIBRARY
+ ITEM Assertion OK : Please check manually: Template Path is: C:\Documents and Settings\vituosity\Application Data\Microsoft\Templates\
+ ITEM Assertion OK : FileSeparator is \
+ ITEM Assertion OK : Name of ActiveWorkbook is: Ranges.xls
+END 'ApplicationMethods' Symbol
+ TEST OK : ApplicationMethods
+----------------------------------------------------------------
+Insert-Issue
+ TEST START : Insert-Issue
+ ITEM Assertion OK : Insert with xlShiftToRight: 10
+END 'Insert-Issue' Symbol
+ TEST OK : Insert-Issue
+----------------------------------------------------------------
+MergeCells-Issue
+ TEST START : MergeCells-Issue
+ ITEM Assertion OK : Range.MergeCells is True
+ ITEM Assertion OK : MergeCells is null: True
+ ITEM Assertion OK : RowCount after Merge: 6
+ ITEM Assertion OK : Range.MergeCells is False
+ ITEM Assertion OK : MergeCells is null: False
+ ITEM Assertion OK : MergeCells of Second Area is null : True
+ ITEM Assertion OK : MergeCells of Ranges is Null: True
+ ITEM Assertion OK : RowCount after Merge: 7
+ ITEM Assertion OK : Range.MergeCells is False
+ ITEM Assertion OK : MergeCells is null: False
+ ITEM Assertion OK : RowCount after Merge: 7
+END 'MergeCells-Issue' Symbol
+ TEST OK : MergeCells-Issue
+----------------------------------------------------------------
+Areas-Issue
+ TEST START : Areas-Issue
+ ITEM Assertion OK : Range Areas Count is2
+ ITEM Assertion OK : First Range Address is: $E$8:$G$13
+ ITEM Assertion OK : First Row is: 8
+ ITEM Assertion OK : First Column is: 5
+ ITEM Assertion OK : EntireRow Address is: $8:$13,$13:$19
+ ITEM Assertion OK : EntireColumn Address is: $E:$G,$G:$K
+ ITEM Assertion OK : Range Count:53
+END 'Areas-Issue' Symbol
+ TEST OK : Areas-Issue
+----------------------------------------------------------------
+Fill-Methods-Issue
+ TEST START : Fill-Methods-Issue
+ ITEM Assertion OK : Range Value after FillDown: MyFillValue
+ ITEM Assertion OK : Range Value after FillDown: MyFillValue
+ ITEM Assertion OK : Range Value after FillDown: MyRightFillValue
+ ITEM Assertion OK : Range Value after FillDown: MyBottomFillValue
+END 'Fill-Methods-Issue' Symbol
+ TEST OK : Fill-Methods-Issue
+----------------------------------------------------------------
+Range/Item-Method-Issue
+ TEST START : Range/Item-Method-Issue
+ ITEM Assertion OK : Range of multiple columns is: $A:$A,$C:$C
+ ITEM Assertion OK : Range of multiple rows is: $1:$1,$5:$7
+ ITEM Assertion OK : Range of several columns is: $C:$E,$D:$D
+ ITEM Assertion OK : Range of several rows is: $5:$8,$6:$10
+ ITEM Assertion OK : Range of several single cells is: $C$5,$E$8
+ ITEM Assertion OK : Range of several named ranges is: $L$1:$M$6,$E$8:$G$13,$G$13:$K$19
+ ITEM Assertion OK : Range of a single Item Cell is: $E$21
+ ITEM Assertion OK : Range of a single Item Cell is: $F$21
+ ITEM Assertion OK : Range of a single Item Cell is: $F$10
+END 'Range/Item-Method-Issue' Symbol
+ TEST OK : Range/Item-Method-Issue
+----------------------------------------------------------------
+R1C1-Formulas-Issue
+ TEST START : R1C1-Formulas-Issue
+ ITEM Assertion OK : R1C1 Range.Formula is: =IF(OR(R[-2]C[1]=0,RC[2]="YES"),"")
+ ITEM Assertion OK : Range.Formula is: =IF(OR(J8=0,K10="YES"),"")
+END 'R1C1-Formulas-Issue' Symbol
+ TEST OK : R1C1-Formulas-Issue
+----------------------------------------------------------------
+Verify_Delete
+ TEST START : Verify_Delete
+ ITEM Assertion OK : Ranges are intersecting: $G$13
+ ITEM Assertion OK : Delete with Default: $AJ$4
+ ITEM Assertion OK : Delete with ShifttoLeft: $AJ$4
+ ITEM Assertion OK : Delete with ShiftUp: $M$22
+END 'Verify_Delete' Symbol
+ TEST OK : Verify_Delete
+----------------------------------------------------------------
+Value-Issue
+ TEST START : Value-Issue
+ ITEM Assertion OK : Value of Range is: 12.3
+ ITEM Assertion OK : Text of Range is: 12.3
+ ITEM Assertion OK : Range has Formula: False
+ ITEM Assertion OK : Cell has Formula: False
+ ITEM Assertion OK : Text of Range is null: True
+ ITEM Assertion OK : Range has Formula: True
+ ITEM Assertion OK : Cell has Formula: True
+ ITEM Assertion OK : Value of Cell is: 12
+ ITEM Assertion OK : Application.Calculation is : -4135
+ ITEM Assertion OK : Calculation is automated: True
+ ITEM Assertion OK : Range has Formula: True
+ ITEM Assertion OK : Value of Cell is: 16
+ ITEM Assertion OK : Text of Cell is: 16
+ ITEM Assertion OK : Text of Cell is: 16
+ ITEM Assertion OK : Range has Formula after 'ClearContents: False
+ ITEM Assertion OK : Text of Cell is:
+ ITEM Assertion OK : Text of Cell is:
+END 'Value-Issue' Symbol
+ TEST OK : Value-Issue
+----------------------------------------------------------------
+AutoFit issue
+ TEST START : AutoFit issue
+ ITEM Assertion OK : Columns.AutoFit: CurrentWidth is 673
+ ITEM Assertion OK : Rows.AutoFit: CurrentHeight is 612
+END 'AutoFit issue' Symbol
+ TEST OK : AutoFit issue
+----------------------------------------------------------------
+Selections
+ TEST START : Selections
+ ITEM Assertion OK : ActiveCell is : $E$8
+ ITEM Assertion OK : Active Cell is : $E$8
+ ITEM Assertion OK : Number of Cells in Range: 53
+ ITEM Assertion OK : Number of Cells in Range: 53
+ ITEM Assertion OK : Number of Cells in Range: 53
+END 'Selections' Symbol
+ TEST OK : Selections
+----------------------------------------------------------------
+Offset-Resize
+ TEST START : Offset-Resize
+ ITEM Assertion OK : Offset is : $G$10:$I$15,$I$15:$M$21
+ ITEM Assertion OK : Offset is : $G$7:$I$12,$I$12:$M$18
+ ITEM Assertion OK : Resized Range is : $A$20:$D$23
+END 'Offset-Resize' Symbol
+ TEST OK : Offset-Resize
+----------------------------------------------------------------
+Ranges-Address
+ TEST START : Ranges-Address
+ ITEM Assertion OK : Range Address is: $E$8:$G$13,$G$13:$K$19
+ ITEM Assertion OK : Range Address is: $E8:$G13,$G13:$K19
+ ITEM Assertion OK : Range Address is: E$8:G$13,G$13:K$19
+ ITEM Assertion OK : Range Address is: R8C5:R13C7,R13C7:R19C11
+ ITEM Assertion OK : Range Address is: $E$8:$G$13,$G$13:$K$19
+ ITEM Assertion OK : Range Address is: R8C5:R13C7,R13C7:R19C11
+ ITEM Assertion OK : Range Address is: R[6]C[3]:R[11]C[5],R[11]C[5]:R[17]C[9]
+ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$8:$G$13,$G$13:$K$19
+END 'Ranges-Address' Symbol
+ TEST OK : Ranges-Address
+----------------------------------------------------------------
+Range-Address
+ TEST START : Range-Address
+ ITEM Assertion OK : Range Address is: $E$8:$G$13
+ ITEM Assertion OK : Range Address is: $E8:$G13
+ ITEM Assertion OK : Range Address is: E$8:G$13
+ ITEM Assertion OK : Range Address is: R8C5:R13C7
+ ITEM Assertion OK : Range Address is: $E$8:$G$13
+ ITEM Assertion OK : Range Address is: R8C5:R13C7
+ ITEM Assertion OK : Range Address is: R[6]C[3]:R[11]C[5]
+ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$8:$G$13
+END 'Range-Address' Symbol
+ TEST OK : Range-Address
+----------------------------------------------------------------
+Column-Address
+ TEST START : Column-Address
+ ITEM Assertion OK : Range Address is: $F$8:$F$13
+ ITEM Assertion OK : Range Address is: $F8:$F13
+ ITEM Assertion OK : Range Address is: F$8:F$13
+ ITEM Assertion OK : Range Address is: R8C6:R13C6
+ ITEM Assertion OK : Range Address is: $F$8:$F$13
+ ITEM Assertion OK : Range Address is: R8C6:R13C6
+ ITEM Assertion OK : Range Address is: R[6]C[4]:R[11]C[4]
+ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$F$8:$F$13
+END 'Column-Address' Symbol
+ TEST OK : Column-Address
+----------------------------------------------------------------
+Row-Address
+ TEST START : Row-Address
+ ITEM Assertion OK : Range Address is: $E$9:$G$9
+ ITEM Assertion OK : Range Address is: $E9:$G9
+ ITEM Assertion OK : Range Address is: E$9:G$9
+ ITEM Assertion OK : Range Address is: R9C5:R9C7
+ ITEM Assertion OK : Range Address is: $E$9:$G$9
+ ITEM Assertion OK : Range Address is: R9C5:R9C7
+ ITEM Assertion OK : Range Address is: R[7]C[3]:R[7]C[5]
+ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$9:$G$9
+END 'Row-Address' Symbol
+ TEST OK : Row-Address
+----------------------------------------------------------------
+SingleCell-Address
+ TEST START : SingleCell-Address
+ ITEM Assertion OK : Range Address is: $F$9
+ ITEM Assertion OK : Range Address is: $F9
+ ITEM Assertion OK : Range Address is: F$9
+ ITEM Assertion OK : Range Address is: R9C6
+ ITEM Assertion OK : Range Address is: $F$9
+ ITEM Assertion OK : Range Address is: R9C6
+ ITEM Assertion OK : Range Address is: R[7]C[4]
+ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$F$9
+END 'SingleCell-Address' Symbol
+ TEST OK : SingleCell-Address
+----------------------------------------------------------------
+Heights and Widths
+ TEST START : Heights and Widths
+ ITEM Assertion OK : Range RowHeight is 40
+ ITEM Assertion OK : Range ColumnWidth is 50
+ ITEM Assertion OK : Range Height is 238
+ ITEM Assertion OK : Range Width is 798.75
+ ITEM Assertion OK : Range RowHeight is 50
+ ITEM Assertion OK : Range ColumnWidth is 50
+ ITEM Assertion OK : Range Height is 297
+ ITEM Assertion OK : Range Width is 798.75
+ ITEM Assertion OK : RowHeight is null: True
+ ITEM Assertion OK : ColumnWidth is null: True
+END 'Heights and Widths' Symbol
+ TEST OK : Heights and Widths
+----------------------------------------------------------------
+RangeRowColumn-Issue
+ TEST START : RangeRowColumn-Issue
+ ITEM Assertion OK : Row is: 8
+ ITEM Assertion OK : Column is: 5
+ ITEM Assertion OK : EntireRow.Columns.Count = 256
+ ITEM Assertion OK : EntireColumn.Rows.Count = 65536
+END 'RangeRowColumn-Issue' Symbol
+ TEST OK : RangeRowColumn-Issue
+----------------------------------------------------------------
+Replace-Issue
+ TEST START : Replace-Issue
+ ITEM Assertion OK : Value after Replace: YourValue
+ ITEM Assertion OK : Value after Replace: YourValue
+ ITEM Assertion OK : Value after Replace: ReplaceValue
+ ITEM Assertion OK : Value after Replace: New ReplaceValue
+ ITEM Assertion OK : Value after Replace: New ReplaceValue
+ ITEM Assertion OK : Value after Replace: New Replace
+ ITEM Assertion OK : Value after Replace:
+END 'Replace-Issue' Symbol
+ TEST OK : Replace-Issue
+----------------------------------------------------------------
+Hidden-Issue
+ TEST START : Hidden-Issue
+ ITEM Assertion OK : - Range.Rows.Hidden (set)
+ ITEM Assertion OK : - Range.Rows.Hidden (get)
+ ITEM Assertion OK : - Range.Rows.Item(1).Hidden (set)
+ ITEM Assertion OK : - Range.Rows.Item(1).Hidden (get)
+ ITEM Assertion OK : - Range.Columns.Hidden (set)
+ ITEM Assertion OK : - Range.Columns.Hidden (get)
+ ITEM Assertion OK : - Range.Columns.Item(1).Hidden (set)
+ ITEM Assertion OK : - Range.Columns.Item(1).Hidden (get)
+END 'Hidden-Issue' Symbol
+ TEST OK : Hidden-Issue
+----------------------------------------------------------------
+End issue
+ TEST START : End issue
+ ITEM Assertion OK : - = $E$48
+ ITEM Assertion OK : - = $E$1
+ ITEM Assertion OK : - = $E$3
+ ITEM Assertion OK : - = $A$8
+ ITEM Assertion OK : - = $B$8
+ ITEM Assertion OK : - = $IV$8
+ ITEM Assertion OK : - = $Z$8
+END 'End issue' Symbol
+ TEST OK : End issue
+----------------------------------------------------------------
+Outline issue
+ TEST START : Outline issue
+ ITEM Assertion OK : - Range.clearOutline - please check visually
+ ITEM Assertion OK : - Range.AutoOutline - please check visually
+ ITEM Assertion OK : - Range.AutoOutline - please check visually
+END 'Outline issue' Symbol
+ TEST OK : Outline issue
+----------------------------------------------------------------
+Validation
+ TEST START : Validation
+ ITEM Assertion OK : Validation Input Message is : Attention!
+ ITEM Assertion OK : Validation Input Message is : Enter an integer from five to ten
+ ITEM Assertion OK : Validation Error Title is : You must enter a number from five to ten
+ ITEM Assertion OK : Validation Error Message is : An Error occured
+ ITEM Assertion OK : Validation Error Title is : Microsoft Excel
+END 'Validation' Symbol
+ TEST OK : Validation
+Test run finished : 01/06/2007 11:29:00
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/excel/TestAddress.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/excel/TestAddress.log
new file mode 100644
index 000000000000..01e5503a7e62
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/excel/TestAddress.log
@@ -0,0 +1,62 @@
+Test run started : 17/07/2007 15:25:17
+----------------------------------------------------------------
+TestAddress
+ TEST START : TestAddress
+ ITEM Assertion OK : test1 Range('e3:f3') A1 style addressing
+ ITEM Assertion OK : test2 Range('e3:f3') R1C1 style addressing
+ ITEM Assertion OK : test3 Range ('e:f') A1 style addressing
+ ITEM Assertion OK : test4 Range ('e:f') R1C1 style addressing
+ ITEM Assertion OK : test5 Columns A1 style addressing
+ ITEM Assertion OK : test6 Columns R1C1 style addressing
+ ITEM Assertion OK : test7 Columns(3) A1 style addressing
+ ITEM Assertion OK : test8 Columns(3) R1C1 style addressing
+ ITEM Assertion OK : test9 Columns('e') A1 style addressing
+ ITEM Assertion OK : test10 Columns('e') R1C1 style addressing
+ ITEM Assertion OK : test11 Columns('b:d') A1 style addressing
+ ITEM Assertion OK : test12 Columns('b:d') R1C1 style addressing
+ ITEM Assertion OK : test13 Range('c1:g10').Columns A1 style addressing
+ ITEM Assertion OK : test14 Range('c1:g10').Columns R1C1 style addressing
+ ITEM Assertion OK : test15 Range('c1:g10').Columns(1) A1 style addressing
+ ITEM Assertion OK : test16 Range('c1:g10').Columns(1) R1C1 style addressing
+ ITEM Assertion OK : test17 Range('c1:g10').Columns('a') A1 style addressing
+ ITEM Assertion OK : test18 Range('c1:g10').Columns('a') R1C1 style addressing
+ ITEM Assertion OK : test19 Range('c1:g10').Columns('c') A1 style addressing
+ ITEM Assertion OK : test20 Range('c1:g10').Columns('c') R1C1 style addressing
+ ITEM Assertion OK : test21 Range('c1:g10').Columns('x:z') A1 style addressing
+ ITEM Assertion OK : test22 Range('c1:g10').Columns('x:z') R1C1 style addressing
+ ITEM Assertion OK : test23 Range('c1:g10').Columns(30) A1 style addressing
+ ITEM Assertion OK : test24 Range('c1:g10').Columns(30) R1C1 style addressing
+ ITEM Assertion OK : test25 Worksheets('Sheet2').Cells(1, 1) A1 style addressing
+ ITEM Assertion OK : test26 Worksheets('Sheet2').Cells(1, 1) A1 style addressing, RowAddressAbsolute is false
+ ITEM Assertion OK : test27 Worksheets('Sheet2').Cells(1, 1) A1 style addressing, ColAddressAbsolute is false
+ ITEM Assertion OK : test28 Worksheets('Sheet2').Cells(1, 1) R1C1 style addressing
+ ITEM Assertion OK : test29 Worksheets('Sheet2').Range('A1:E5').EntireColumn A1 style addressing
+ ITEM Assertion OK : test30 Worksheets('Sheet2').Range('A1').EntireColumn A1 style addressing
+ ITEM Assertion OK : test31 Worksheets('Sheet2').Range('A1:E5').EntireRow A1 style addressing
+ ITEM Assertion OK : test32 Worksheets('Sheet2').Range('A1') A1 style addressing
+ ITEM Assertion OK : test33 Worksheets('Sheet2').Range('IV65536').EntireRow A1 style addressing
+ ITEM Assertion OK : test34 Worksheets('Sheet2').Range('IU2:IV65536') A1 style addressing
+ ITEM Assertion OK : test35 Range('c1:g10').Columns('x:z') R1C1 style addressing
+ ITEM Assertion OK : test36 Worksheets('Sheet2').Range('A1') A1 style addressing
+ ITEM Assertion OK : test37 Worksheets('Sheet2').Range('A1:E5').EntireColumn A1 style addressing
+ ITEM Assertion OK : test38 Worksheets('Sheet2').Range('10:12') A1 style addressing
+ ITEM Assertion OK : test39 Worksheets('Sheet2').Range('10:12') R1C1 style addressing
+ ITEM Assertion OK : test40 Range('Sheet3!A1:B4') A1 style addressing
+ ITEM Assertion OK : test41 Range('Sheet3!A1,B1,D4:F20') A1 style addressing
+ ITEM Assertion OK : test42 Range('g20:h40').Columns('c:c')
+ ITEM Assertion OK : test43 Range('g20:h40').Columns('c:f')
+ ITEM Assertion OK : test44 Range('g20:h40').Columns(-1)
+ ITEM Assertion OK : test45 Range('c4:g10').Rows(-1)
+ ITEM Assertion OK : test46 Range('a2:b4').Rows('1:1')
+ ITEM Assertion OK : test47 Range('a2:b4').Rows('1:2')
+ ITEM Assertion OK : test48 Range('a2:b4').Rows('2:2')
+ ITEM Assertion OK : test49 Range('a2:b4').Rows('2:3')
+Test Results
+============
+
+Tests passed: 49
+Tests failed: 0
+
+END 'TestAddress
+ TEST OK : TestAddress
+Test run finished : 17/07/2007 15:25:19
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/excel/TestCalc_Rangetest.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/excel/TestCalc_Rangetest.log
new file mode 100644
index 000000000000..f055279ec6f4
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/excel/TestCalc_Rangetest.log
@@ -0,0 +1,60 @@
+Test run started : 30/05/2007 11:33:13
+BEGIN TestCalc
+ TEST START : RangeTest2
+ ITEM Assertion OK : - Range("D15").Row
+ ITEM Assertion OK : - WorkSheet("D15").Range.Row
+ ITEM Assertion OK : - Range("D15").Column
+ ITEM Assertion OK : - Worksheet.Range("D15").Column
+ ITEM Assertion OK : - Range("D1").EntireRow.Valuer
+ ITEM Assertion OK : - Range("D1").EntireRow.Valuer
+ ITEM Assertion OK : - Range("D1").EntireRow.Columns.Count
+ ITEM Assertion OK : - Range("D1").EntireColumn.Rows.Count
+ ITEM Assertion OK : - Range("D15").ClearContent
+ ITEM Assertion OK : - Range("M1:N2").Rows.Hidden (set)
+ ITEM Assertion OK : - Range("M1:N2").Rows.Hidden (get)
+ ITEM Assertion OK : - Range("M1:N2").Rows(1).Hidden (set)
+ ITEM Assertion OK : - Range("M1:N2").Rows(1).Hidden (get)
+ ITEM Assertion OK : - Range("M1:N2").Columns.Hidden (set)
+ ITEM Assertion OK : - Range("M1:N2").Columns.Hidden (get)
+ ITEM Assertion OK : - Range("M1:N2").Columns(1).Hidden (set)
+ ITEM Assertion OK : - Range("M1:N2").Columns(1).Hidden (get)
+ ITEM Assertion OK : - Range("B38").Orientation (get)
+ ITEM Assertion OK : - Range("B38").Orientation (set)
+ ITEM Assertion OK : - Range("B38").Orientation (set = xlDownward)
+ ITEM Assertion OK : - Range("B38").Orientation (set)
+ ITEM Assertion OK : - Range("B38").Orientation (set = xlUpward)
+ ITEM Assertion OK : - Range("B38").Orientation (set)
+ ITEM Assertion OK : - Range("B38").Orientation (set = xlVertical)
+ ITEM Assertion OK : - Range("B38").Orientation (set)
+ ITEM Assertion OK : - Range("B38").Orientation (set = xlVertical)
+ ITEM Assertion OK : - Range("B39").WrapText (get)
+ ITEM Assertion OK : - Range("B39").WrapText (set)
+ ITEM Assertion OK : - Range("B39").WrapText (set)
+ ITEM Assertion OK : - Range("E39").MergeCells (get)
+ ITEM Assertion OK : - Range("F39").MergeCells (get)
+ ITEM Assertion OK : - Range("E39").MergeCells (set)
+ ITEM Assertion OK : - Range("F39").MergeCells (set)
+ ITEM Assertion OK : - Range("E39").MergeCells (set)
+ ITEM Assertion OK : - Range("F39").MergeCells (set)
+ ITEM Assertion OK : - Range("C41:C42").Replace MatchCase:=True
+ ITEM Assertion OK : - Range("C41:C42").Replace MatchCase:=True
+ ITEM Assertion OK : - Range("D41:D42").Replace MatchCase:=False
+ ITEM Assertion OK : - Range("B39").VerticalAlignment (get)
+ ITEM Assertion OK : - Range("B39").VerticalAlignment (set)
+ ITEM Assertion OK : - Range("B39").VerticalAlignment (get)
+ ITEM Assertion OK : - Range("B39").VerticalAlignment (get)
+ ITEM Assertion OK : - Range("B39").VerticalAlignment (set)
+ ITEM Assertion OK : - Range("B39").VerticalAlignment (get)
+ ITEM Assertion OK : - Range("B39").VerticalAlignment (set)
+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (get)
+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (set)
+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (get)
+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (set)
+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (get)
+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (set)
+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (get)
+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (set)
+ ITEM OK (RangeTest2)
+ TEST succesfully completed : RangeTest2
+END TestCalc
+Test run finished : 30/05/2007 11:33:14
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/excel/TestCalc_Rangetest2.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/excel/TestCalc_Rangetest2.log
new file mode 100644
index 000000000000..19a5ba96b54a
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/excel/TestCalc_Rangetest2.log
@@ -0,0 +1,64 @@
+Test run started : 31/05/2007 11:02:10
+BEGIN TestCalc
+ TEST START : RangeTest3
+ ITEM Assertion OK : - setFormulaR1C1
+ ITEM Assertion OK : - getFormulaR1C1
+ ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
+ ITEM Assertion OK : - Range.Copy(Range("I10"))
+ ITEM Assertion OK : PasteSpecial Paste:=xlPasteValues
+ ITEM Assertion OK : PasteSpecial Paste:=xlPasteFormulas
+ ITEM Assertion OK : PasteSpecial Paste:=xlPasteFormats
+ ITEM Assertion OK : PasteSpecial
+ ITEM Assertion OK : PasteSpecial SkipBlanks:=True
+ ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationAdd
+ ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationSubtract
+ ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationMultiply
+ ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationDivide
+ ITEM Assertion OK : PasteSpecial Transpose:=True
+ ITEM Assertion OK : ActiveWorkbook.Name
+ ITEM Assertion OK : ActiveWorkbook.FullName und ActiveWorkbook.Path
+ ITEM Assertion OK : - = Range("K22").End (xlDown)
+ ITEM Assertion OK : - = Range("K22").End (xlUo)
+ ITEM Assertion OK : - = Range("K22").End (xlToLeft)
+ ITEM Assertion OK : - = Range("K22").End (xlRight)
+ ITEM Assertion OK : - ActiveSpreadsheet.Next
+ ITEM Assertion OK : - ActiveSpreadsheet.Next
+ ITEM Assertion OK : - ActiveSpreadsheet.Previous
+ ITEM Assertion OK : - ActiveSpreadsheet.Previous
+ ITEM Assertion OK : - Range("J4:J11").AutoFilter field:=1, Criteria1:="x"
+ ITEM Assertion OK : - Range("J4:J11").AutoFilter field:=1, Criteria1:="<>"
+ ITEM Assertion OK : - Range("J4:J11").AutoFilter field:=1, Criteria1:="="
+ ITEM Assertion OK : - Range("J4:J11").AutoFilter
+ ITEM Assertion OK : - ActiveSheet.Resize.Select
+ ITEM Assertion OK : - Application.GoTo Reference:="R8C2"
+ ITEM Assertion OK : - Application.GoTo Reference:="R[8]C[2]"
+ ITEM Assertion OK : - Application.GoTo Reference:="R8C2"
+ ITEM Assertion OK : - Range.Group - please check visually
+ ITEM Assertion OK : - Range.Group - please check visually
+ ITEM Assertion OK : - Range.Ungroup- please check visually
+ ITEM Assertion OK : - Range.Ungroup - please check visually
+ ITEM Assertion OK : - Range.Group - please check visually
+ ITEM Assertion OK : - Range.Group - please check visually
+ ITEM Assertion OK : - Range.clearOutline - please check visually
+ ITEM Assertion OK : - Range.AutoOutline - please check visually
+ ITEM Assertion OK : - Range.AutoOutline - please check visually
+ ITEM Assertion OK : - ActiveSheet.UsedRange.Select
+ ITEM Assertion FAIL : - Range("A13").AddIndent
+ ITEM Assertion OK : - Range("A13").IndentLevel set
+ ITEM Assertion OK : - Range("A13").IndentLevel get
+ ITEM Assertion OK : - Range("A13").IndentLevel get
+ ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
+ ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
+ ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
+ ITEM Assertion OK : - Range.Calculate
+ ITEM Assertion OK : Worksheet.Calculate
+ ITEM Assertion OK : - Application.Calculate
+ ITEM Assertion OK : Global.Calculate
+ ITEM Assertion OK : Calculation set
+ ITEM Assertion OK : - = ActiveWorkbook.Colors(3) set
+ ITEM Assertion OK : - = ActiveWorkbook.ResetColors
+ ITEM Assertion OK : - = ActiveWorkbook.Colors(3) get
+ ITEM FAIL (RangeTest3)
+ TEST Not succesfully completed : RangeTest3
+END TestCalc
+Test run finished : 31/05/2007 11:02:12
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/format.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/format.log
new file mode 100644
index 000000000000..5226a161c61a
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/format.log
@@ -0,0 +1,36 @@
+Test run started : 08/10/2008 13:08:40
+BEGIN Format
+ TEST START : Test Predefined_Number_Format_Sample function
+ ITEM Assertion OK : General Number: 562486.2356
+ ITEM Assertion OK : Fixed: 0.20
+ ITEM Assertion OK : Standard: 562,486.24
+ ITEM Assertion OK : Percent: 75.21%
+ ITEM Assertion OK : Scientific: 5.62E+05
+ ITEM Assertion OK : Scientific: -3.46E+03
+ ITEM Assertion OK : Yes/No: No
+ ITEM Assertion OK : Yes/No: Yes
+ ITEM Assertion OK : True/False: False
+ ITEM Assertion OK : True/False: True
+ ITEM Assertion OK : On/Off: Off
+ ITEM Assertion OK : On/Off: On
+ TEST OK : Test Predefined_Number_Format_Sample function
+ TEST START : Test Custom_Number_Format_Sample function
+ ITEM Assertion OK : 00.0000: 23.6750
+ ITEM Assertion OK : 00.00: 23.68
+ ITEM Assertion OK : 00000: 02658
+ ITEM Assertion OK : 00.00: 2658.00
+ ITEM Assertion OK : ##.####: 23.675
+ ITEM Assertion OK : ##.##: 23.68
+ ITEM Assertion OK : #,###.##: 12,345.25
+ ITEM Assertion OK : ##.00%: 25.00%
+ ITEM Assertion OK : #,###: 1,000,000
+ ITEM Assertion OK : ######E-###: 109838E-5
+ ITEM Assertion OK : $#,###.##: $2,345.25
+ ITEM Assertion OK : ##.###\%: .25%
+ TEST OK : Test Custom_Number_Format_Sample function
+ TEST START : Test Custom_Text_Format_Sample function
+ ITEM Assertion OK : <: vba
+ ITEM Assertion OK : >: VBA
+ TEST OK : Test Custom_Text_Format_Sample function
+END Format
+Test run finished : 08/10/2008 13:08:40
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/AutoFilter.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/AutoFilter.log
new file mode 100644
index 000000000000..55f5d9526618
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/AutoFilter.log
@@ -0,0 +1,20 @@
+Test run started : 18/07/2007 10:56:38
+----------------------------------------------------------------
+TestAddress
+ TEST START : TestAddress
+ ITEM Assertion OK : test1 'starts with' string criteria
+ ITEM Assertion OK : test2 'not equal to' string criteria
+ ITEM Assertion OK : test3 'ends with' string criteria
+ ITEM Assertion OK : test4 field 'all'
+ ITEM Assertion OK : test5 numeric '<15'
+ ITEM Assertion OK : test6 numeric '>=15'
+ ITEM Assertion OK : test7 numeric '<=12'
+Test Results
+============
+
+Tests passed: 7
+Tests failed: 0
+
+END 'TestAddress
+ TEST OK : TestAddress
+Test run finished : 18/07/2007 10:56:44
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/CalcFont.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/CalcFont.log
new file mode 100644
index 000000000000..f3583e4cbb12
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/CalcFont.log
@@ -0,0 +1,17 @@
+Test run started : 10/09/2008 02:40:17 PM
+CalcFont_Format
+ TEST START : Font_Format
+ ITEM Assertion OK : correctly set font to Bold
+ ITEM Assertion OK : correctly set font to Italic
+ ITEM Assertion OK : correctly read FontStyle
+ ITEM Assertion OK : correctly set font to Shadow
+ ITEM Assertion OK : correctly set font color
+ ITEM Assertion OK : correctly set font color index
+ ITEM Assertion OK : correctly set font name
+ ITEM Assertion OK : correctly set font outline
+ ITEM Assertion OK : correctly set font size
+ ITEM Assertion OK : correctly set font strikethrough
+ ITEM Assertion OK : correctly set font underline
+ TEST Success. : Font_Format
+CalcFont_Format
+Test run finished : 10/09/2008 02:40:17 PM
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/CalcZoom.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/CalcZoom.log
new file mode 100644
index 000000000000..f8c83531a8a2
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/CalcZoom.log
@@ -0,0 +1,18 @@
+Test run started : 15/06/2009 12:49:35
+CalcZoom
+ TEST START : CalcZoom
+ ITEM Assertion OK : test1 read window.zoom activesheet = sheet1
+ ITEM Assertion OK : test2 read window.zoom activesheet = sheet2
+ ITEM Assertion OK : test3 read window.zoom activesheet = sheet3
+ ITEM Assertion OK : test4 read window.zoom activesheet = sheet3
+ ITEM Assertion OK : test4 read window.zoom activesheet = sheet2
+ ITEM Assertion OK : test4 read window.zoom activesheet = sheet1
+ TEST Success. : CalcZoom
+CalcZoom
+Test Results
+============
+
+Tests passed: 6
+Tests failed: 0
+
+Test run finished : 15/06/2009 12:49:37
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/FinancialFuncTests.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/FinancialFuncTests.log
new file mode 100644
index 000000000000..5633a8100e08
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/FinancialFuncTests.log
@@ -0,0 +1,31 @@
+Test run started : 04/08/2009 12:42:26
+----------------------------------------------------------------
+FinancialFuncs
+ TEST START : FinancialFuncs
+ ITEM Assertion OK : DDB test
+ ITEM Assertion OK : FV test
+ ITEM Assertion OK : IPmt test
+ ITEM Assertion FAIL : IRR test
+ ITEM Assertion OK : MIRR test
+ ITEM Assertion FAIL : NPer test
+ ITEM Assertion FAIL : NPV test
+ ITEM Assertion FAIL : Pmt test
+ ITEM Assertion OK : PPmt test
+ ITEM Assertion OK : PV test
+ ITEM Assertion FAIL : Rate test
+ ITEM Assertion OK : SLN test
+ ITEM Assertion OK : SYD test
+Test Results
+============
+
+IRR test Failed: expected 35.8625323270733 got 35.8625323273411
+NPer test Failed: expected 21.5365977313406 got 21.5365977313408
+NPV test Failed: expected 3874.42183648785 got 3874.42183648784
+Pmt test Failed: expected 20276.3942884139 got 20276.3942884138
+Rate test Failed: expected 4.67819164224935E-02 got 4.67819164225E-02
+Tests passed: 8
+Tests failed: 5
+
+END 'FinancialFuncs
+ TEST OK : FinancialFuncs
+Test run finished : 04/08/2009 12:42:36
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/MiscOperatorTests.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/MiscOperatorTests.log
new file mode 100644
index 000000000000..116f9f98c7e8
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/MiscOperatorTests.log
@@ -0,0 +1,30 @@
+Test run started : 12/05/2009 12:36:15
+----------------------------------------------------------------
+TestAddress
+ TEST START : TestAddress
+ ITEM Assertion OK : test1: res = Not ( A > B )
+ ITEM Assertion OK : test2: res = Not ( B > A )
+ ITEM Assertion OK : test3: res = Not ( D )
+ ITEM Assertion OK : test4: res = Not A
+ ITEM Assertion OK : test5: res = ( A > D )
+ ITEM Assertion OK : test6: res = ( D > A )
+ ITEM Assertion OK : test7: res = ( A < D )
+ ITEM Assertion OK : test8: res = ( D < A )
+ ITEM Assertion OK : test9: res = ( A >= D )
+ ITEM Assertion OK : test10: res = ( D >= A )
+ ITEM Assertion OK : test11: res = ( A <= D )
+ ITEM Assertion OK : test12: res = ( D <= A )
+ ITEM Assertion OK : test13: res = ( D = A )
+ ITEM Assertion OK : test14: res = ( A = D )
+ ITEM Assertion OK : test15: res = ( D <> A )
+ ITEM Assertion OK : test16: res = ( A <> D )
+ ITEM Assertion OK : test17: ( A = D ) = True
+Test Results
+============
+
+Tests passed: 17
+Tests failed: 0
+
+END 'TestAddress
+ TEST OK : TestAddress
+Test run finished : 12/05/2009 12:36:15
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/MiscRangeTests.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/MiscRangeTests.log
new file mode 100644
index 000000000000..215842f9a7e6
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/MiscRangeTests.log
@@ -0,0 +1,45 @@
+Test run started : 17/07/2007 20:54:56
+----------------------------------------------------------------
+MiscRangeTests
+ TEST START : MiscRangeTests
+ ITEM Assertion OK : test 1
+ ITEM Assertion OK : test 2
+ ITEM Assertion OK : test 3
+ ITEM Assertion OK : test 4
+ ITEM Assertion OK : test 5
+ ITEM Assertion OK : test 6
+ ITEM Assertion OK : test 7
+ ITEM Assertion OK : test 8
+ ITEM Assertion OK : test 9
+ ITEM Assertion OK : test 10
+ ITEM Assertion OK : test 11
+ ITEM Assertion OK : test 12
+ ITEM Assertion OK : test 13
+ ITEM Assertion OK : test 14
+ ITEM Assertion OK : test 15
+ ITEM Assertion OK : test 16
+ ITEM Assertion OK : test 17
+ ITEM Assertion OK : test 18
+ ITEM Assertion OK : test 19
+ ITEM Assertion OK : test 20
+ ITEM Assertion OK : test 21
+ ITEM Assertion OK : test 22
+ ITEM Assertion OK : test 23
+ ITEM Assertion OK : test 24
+ ITEM Assertion OK : test 25
+ ITEM Assertion OK : test 26
+ ITEM Assertion OK : test 27
+ ITEM Assertion OK : test 28
+ ITEM Assertion OK : test 29
+ ITEM Assertion OK : test 30
+ ITEM Assertion OK : test 31
+No. tests: 31
+Summary
+=======
+Run: 31
+Passed: 31
+Failed: 0
+
+END 'MiscRangeTests
+ TEST OK : MiscRangeTests
+Test run finished : 17/07/2007 20:55:03
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/PageBreaks.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/PageBreaks.log
new file mode 100644
index 000000000000..0ff400d49e85
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/PageBreaks.log
@@ -0,0 +1,10 @@
+Test run started : 07/24/2008 05:06:12 PM
+----------------------------------------------------------------
+ TEST START : PageBreaks-Issue
+ ITEM Assertion OK : HPageBreaks.Count is 3
+ ITEM Assertion OK : HPageBreak.Type is -4135
+ ITEM Assertion OK : HPageBreak.Location: Range.Row is 5
+ ITEM Assertion OK : HPageBreak.Delete: HPageBreaks.Count is 2
+END 'PageBreaks-Issue' Symbol
+ TEST OK : PageBreaks-Issue
+Test run finished : 07/24/2008 05:06:13 PM
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/Ranges-2.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/Ranges-2.log
new file mode 100644
index 000000000000..8b7076efaea0
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/Ranges-2.log
@@ -0,0 +1,68 @@
+Test run started : 19/06/2007 11:14:01
+----------------------------------------------------------------
+ClearFormtsIssue
+ TEST START : ClearFormtsIssue
+ ITEM Assertion OK : Range.Font.Bold is: True
+ ITEM Assertion OK : Range.Font.Bold is: False
+END 'ClearFormtsIssue' Symbol
+ TEST OK : ClearFormtsIssue
+----------------------------------------------------------------
+VerticalAlignment-Issue
+ TEST START : VerticalAlignment-Issue
+ ITEM Assertion OK : - Range.VerticalAlignment (get)
+ ITEM Assertion OK : - Range.VerticalAlignment (set)
+ ITEM Assertion OK : - Range.VerticalAlignment (get)
+ ITEM Assertion OK : - Range.VerticalAlignment (get)
+ ITEM Assertion OK : - Range.VerticalAlignment (set)
+ ITEM Assertion OK : - Range.VerticalAlignment (get)
+ ITEM Assertion OK : - Range.VerticalAlignment (set)
+ ITEM Assertion OK : Range.VeritcalAlignment is Null
+END 'VerticalAlignment-Issue' Symbol
+ TEST OK : VerticalAlignment-Issue
+----------------------------------------------------------------
+HorizontalAlignment-Issue
+ TEST START : HorizontalAlignment-Issue
+ ITEM Assertion OK : - Range.HorizontalAlignment (get)
+ ITEM Assertion OK : - Range.HorizontalAlignment (set)
+ ITEM Assertion OK : - Range.HorizontalAlignment (get)
+ ITEM Assertion OK : - Range.HorizontalAlignment (set)
+ ITEM Assertion OK : - Range.HorizontalAlignment (get)
+ ITEM Assertion OK : - Range.HorizontalAlignment (set)
+ ITEM Assertion OK : - Range.HorizontalAlignment (get)
+ ITEM Assertion OK : - Range.HorizontalAlignment (set)
+ ITEM Assertion OK : Range.HorizontalAlignment is Null
+END 'HorizontalAlignment-Issue' Symbol
+ TEST OK : HorizontalAlignment-Issue
+----------------------------------------------------------------
+WrapText-Issue
+ TEST START : WrapText-Issue
+ ITEM Assertion OK : - Range.WrapText (get)
+ ITEM Assertion OK : - Range.WrapText (get)
+ ITEM Assertion OK : Range.WrapText is Null
+END 'WrapText-Issue' Symbol
+ TEST OK : WrapText-Issue
+----------------------------------------------------------------
+FontBorderIssues
+ TEST START : FontBorderIssues
+ ITEM Assertion OK : - = Borders.Color (getColor)
+ ITEM Assertion OK : - = Font.Color (getColor)
+END 'FontBorderIssues' Symbol
+ TEST OK : FontBorderIssues
+----------------------------------------------------------------
+RangeSizeIssues
+ TEST START : RangeSizeIssues
+ ITEM Assertion OK : Range.Left is: 118.8432
+ ITEM Assertion OK : Range.Top is: 92.16585
+ ITEM Assertion OK : Range.Width is: 226.2
+ ITEM Assertion OK : Range.Height is: 271.5
+END 'RangeSizeIssues' Symbol
+ TEST OK : RangeSizeIssues
+----------------------------------------------------------------
+ApplicationIssues
+ TEST START : ApplicationIssues
+ ITEM Assertion OK : Range.Address is: $E$8:$G$13,$G$13:$K$19
+ ITEM Assertion OK : Range.Address is: $E$8:$G$13,$G$13:$K$19
+ ITEM Assertion OK : Application.ActiveSheet.Name: Sheet1
+END 'ApplicationIssues' Symbol
+ TEST OK : ApplicationIssues
+Test run finished : 19/06/2007 11:14:02
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/Ranges-3.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/Ranges-3.log
new file mode 100644
index 000000000000..a130737ceb65
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/Ranges-3.log
@@ -0,0 +1,8 @@
+Test run started : 19/06/2007 11:26:09
+----------------------------------------------------------------
+MyGoalseek-Issue
+ TEST START : MyGoalseek-Issue
+ ITEM Assertion OK : Variable Range value: 15
+END 'MyGoalseek-Issue' Symbol
+ TEST OK : MyGoalseek-Issue
+Test run finished : 19/06/2007 11:26:10
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/Ranges.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/Ranges.log
new file mode 100644
index 000000000000..cdd18685e977
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/Ranges.log
@@ -0,0 +1,280 @@
+Test run started : 10/03/2008 15:15:11
+----------------------------------------------------------------
+ApplicationMethods
+ TEST START : ApplicationMethods
+ ITEM Assertion OK : Name of Workbook is: Ranges.xls
+ ITEM Assertion OK : Address of Application.Columns is: $A:$A
+ ITEM Assertion OK : Address of Application.Rows is: $1:$1
+ ITEM Assertion OK : Address of Application.Range is: $1:$1,$5:$7
+ ITEM Assertion OK : Please check manually: DefaultFilePath is: /data4/home/npower/Documents
+ ITEM Assertion OK : Please check manually: Library Path is: /data4/home/npower/.ooo-2.0/user/basic
+ ITEM Assertion OK : Please check manually: Template Path is: /data4/home/npower/.ooo-2.0/user/template
+ ITEM Assertion OK : FileSeparator is /
+ ITEM Assertion OK : Name of ActiveWorkbook is: Ranges.xls
+END 'ApplicationMethods' Symbol
+ TEST OK : ApplicationMethods
+----------------------------------------------------------------
+Insert-Issue
+ TEST START : Insert-Issue
+ ITEM Assertion OK : Insert with xlShiftToRight: 10
+END 'Insert-Issue' Symbol
+ TEST OK : Insert-Issue
+----------------------------------------------------------------
+MergeCells-Issue
+ TEST START : MergeCells-Issue
+ ITEM Assertion OK : Range.MergeCells is True
+ ITEM Assertion FAIL : MergeCells is null: False
+ ITEM Assertion OK : RowCount after Merge: 13
+ ITEM Assertion OK : Range.MergeCells is False
+ ITEM Assertion OK : MergeCells is null: False
+ ITEM Assertion FAIL : MergeCells of Second Area is null : False
+ ITEM Assertion FAIL : MergeCells of Ranges is Null: False
+ ITEM Assertion OK : RowCount after Merge: 7
+ ITEM Assertion OK : Range.MergeCells is False
+ ITEM Assertion OK : MergeCells is null: False
+ ITEM Assertion OK : RowCount after Merge: 7
+END 'MergeCells-Issue' Symbol
+ TEST OK : MergeCells-Issue
+----------------------------------------------------------------
+Areas-Issue
+ TEST START : Areas-Issue
+ ITEM Assertion OK : Range Areas Count is2
+ ITEM Assertion OK : First Range Address is: $E$8:$G$13
+ ITEM Assertion OK : First Row is: 8
+ ITEM Assertion OK : First Column is: 5
+ ITEM Assertion OK : EntireRow Address is: $8:$13,$13:$19
+ ITEM Assertion OK : EntireColumn Address is: $E:$G,$G:$K
+ ITEM Assertion OK : Range Count:53
+END 'Areas-Issue' Symbol
+ TEST OK : Areas-Issue
+----------------------------------------------------------------
+Fill-Methods-Issue
+ TEST START : Fill-Methods-Issue
+ ITEM Assertion OK : Range Value after FillDown: MyFillValue
+ ITEM Assertion OK : Range Value after FillDown: MyFillValue
+ ITEM Assertion OK : Range Value after FillDown: MyRightFillValue
+ ITEM Assertion OK : Range Value after FillDown: MyBottomFillValue
+END 'Fill-Methods-Issue' Symbol
+ TEST OK : Fill-Methods-Issue
+----------------------------------------------------------------
+Range/Item-Method-Issue
+ TEST START : Range/Item-Method-Issue
+ ITEM Assertion OK : Range of multiple columns is: $A:$A,$C:$C
+ ITEM Assertion OK : Range of multiple rows is: $1:$1,$5:$7
+ ITEM Assertion OK : Range of several columns is: $C:$E,$D:$D
+ ITEM Assertion OK : Range of several rows is: $5:$8,$6:$10
+ ITEM Assertion OK : Range of several single cells is: $C$5,$E$8
+ ITEM Assertion OK : Range of several named ranges is: $L$1:$M$6,$E$8:$G$13,$G$13:$K$19
+ ITEM Assertion OK : Range of a single Item Cell is: $E$21
+ ITEM Assertion OK : Range of a single Item Cell is: $F$21
+ ITEM Assertion OK : Range of a single Item Cell is: $F$10
+END 'Range/Item-Method-Issue' Symbol
+ TEST OK : Range/Item-Method-Issue
+----------------------------------------------------------------
+R1C1-Formulas-Issue
+ TEST START : R1C1-Formulas-Issue
+ ITEM Assertion OK : R1C1 Range.Formula is: =IF(OR(R[-2]C[1]=0,RC[2]="YES"),"")
+ ITEM Assertion OK : Range.Formula is: =IF(OR(J8=0,K10="YES"),"")
+END 'R1C1-Formulas-Issue' Symbol
+ TEST OK : R1C1-Formulas-Issue
+----------------------------------------------------------------
+Verify_Delete
+ TEST START : Verify_Delete
+ ITEM Assertion OK : Ranges are intersecting: $G$13
+ ITEM Assertion OK : Delete with Default: $AJ$4
+ ITEM Assertion OK : Delete with ShifttoLeft: $AJ$4
+ ITEM Assertion OK : Delete with ShiftUp: $M$22
+END 'Verify_Delete' Symbol
+ TEST OK : Verify_Delete
+----------------------------------------------------------------
+Value-Issue
+ TEST START : Value-Issue
+ ITEM Assertion OK : Value of Range is: 12.3
+ ITEM Assertion OK : Text of Range is: 12.3
+ ITEM Assertion OK : Range has Formula: False
+ ITEM Assertion OK : Cell has Formula: False
+ ITEM Assertion FAIL : Text of Range is null: False
+ ITEM Assertion OK : Range has Formula: True
+ ITEM Assertion OK : Cell has Formula: True
+ ITEM Assertion OK : Value of Cell is: 12
+ ITEM Assertion OK : Application.Calculation is : -4135
+ ITEM Assertion OK : Calculation is automated: True
+ ITEM Assertion OK : Range has Formula: True
+ ITEM Assertion OK : Value of Cell is: 16
+ ITEM Assertion OK : Text of Cell is: 16
+ ITEM Assertion OK : Text of Cell is: 16
+ ITEM Assertion OK : Range has Formula after 'ClearContents: False
+ ITEM Assertion OK : Text of Cell is:
+ ITEM Assertion OK : Text of Cell is:
+END 'Value-Issue' Symbol
+ TEST OK : Value-Issue
+----------------------------------------------------------------
+AutoFit issue
+ TEST START : AutoFit issue
+ ITEM Assertion OK : Columns.AutoFit: CurrentWidth is 680
+ ITEM Assertion OK : Rows.AutoFit: CurrentHeight is 554
+END 'AutoFit issue' Symbol
+ TEST OK : AutoFit issue
+----------------------------------------------------------------
+Selections
+ TEST START : Selections
+ ITEM Assertion OK : ActiveCell is : $E$8
+ ITEM Assertion OK : Active Cell is : $E$8
+ ITEM Assertion OK : Number of Cells in Range: 52
+ ITEM Assertion OK : Number of Cells in Range: 52
+ ITEM Assertion OK : Number of Cells in Range: 52
+END 'Selections' Symbol
+ TEST OK : Selections
+----------------------------------------------------------------
+Offset-Resize
+ TEST START : Offset-Resize
+ ITEM Assertion OK : Offset is : $G$10:$I$15,$I$15:$M$21
+ ITEM Assertion OK : Offset is : $G$7:$I$12,$I$12:$M$18
+ ITEM Assertion OK : Resized Range is : $A$20:$D$23
+END 'Offset-Resize' Symbol
+ TEST OK : Offset-Resize
+----------------------------------------------------------------
+Ranges-Address
+ TEST START : Ranges-Address
+ ITEM Assertion OK : Range Address is: $E$8:$G$13,$G$13:$K$19
+ ITEM Assertion OK : Range Address is: $E8:$G13,$G13:$K19
+ ITEM Assertion OK : Range Address is: E$8:G$13,G$13:K$19
+ ITEM Assertion OK : Range Address is: R8C5:R13C7,R13C7:R19C11
+ ITEM Assertion FAIL : Range Address is: R8C5:R13C7,R13C7:R19C11
+ ITEM Assertion OK : Range Address is: R8C5:R13C7,R13C7:R19C11
+ ITEM Assertion OK : Range Address is: R[6]C[3]:R[11]C[5],R[11]C[5]:R[17]C[9]
+ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$8:$G$13,$G$13:$K$19
+END 'Ranges-Address' Symbol
+ TEST OK : Ranges-Address
+----------------------------------------------------------------
+Range-Address
+ TEST START : Range-Address
+ ITEM Assertion OK : Range Address is: $E$8:$G$13
+ ITEM Assertion OK : Range Address is: $E8:$G13
+ ITEM Assertion OK : Range Address is: E$8:G$13
+ ITEM Assertion OK : Range Address is: R8C5:R13C7
+ ITEM Assertion FAIL : Range Address is: R8C5:R13C7
+ ITEM Assertion OK : Range Address is: R8C5:R13C7
+ ITEM Assertion OK : Range Address is: R[6]C[3]:R[11]C[5]
+ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$8:$G$13
+END 'Range-Address' Symbol
+ TEST OK : Range-Address
+----------------------------------------------------------------
+Column-Address
+ TEST START : Column-Address
+ ITEM Assertion OK : Range Address is: $F$8:$F$13
+ ITEM Assertion OK : Range Address is: $F8:$F13
+ ITEM Assertion OK : Range Address is: F$8:F$13
+ ITEM Assertion OK : Range Address is: R8C6:R13C6
+ ITEM Assertion FAIL : Range Address is: R8C6:R13C6
+ ITEM Assertion OK : Range Address is: R8C6:R13C6
+ ITEM Assertion OK : Range Address is: R[6]C[4]:R[11]C[4]
+ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$F$8:$F$13
+END 'Column-Address' Symbol
+ TEST OK : Column-Address
+----------------------------------------------------------------
+Row-Address
+ TEST START : Row-Address
+ ITEM Assertion OK : Range Address is: $E$9:$G$9
+ ITEM Assertion OK : Range Address is: $E9:$G9
+ ITEM Assertion OK : Range Address is: E$9:G$9
+ ITEM Assertion OK : Range Address is: R9C5:R9C7
+ ITEM Assertion FAIL : Range Address is: R9C5:R9C7
+ ITEM Assertion OK : Range Address is: R9C5:R9C7
+ ITEM Assertion OK : Range Address is: R[7]C[3]:R[7]C[5]
+ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$9:$G$9
+END 'Row-Address' Symbol
+ TEST OK : Row-Address
+----------------------------------------------------------------
+SingleCell-Address
+ TEST START : SingleCell-Address
+ ITEM Assertion OK : Range Address is: $F$9
+ ITEM Assertion OK : Range Address is: $F9
+ ITEM Assertion OK : Range Address is: F$9
+ ITEM Assertion OK : Range Address is: R9C6
+ ITEM Assertion FAIL : Range Address is: R9C6
+ ITEM Assertion OK : Range Address is: R9C6
+ ITEM Assertion OK : Range Address is: R[7]C[4]
+ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$F$9
+END 'SingleCell-Address' Symbol
+ TEST OK : SingleCell-Address
+----------------------------------------------------------------
+Heights and Widths
+ TEST START : Heights and Widths
+ ITEM Assertion OK : Range RowHeight is 40
+ ITEM Assertion OK : Range ColumnWidth is 50
+ ITEM Assertion OK : Range Height is 240
+ ITEM Assertion OK : Range Width is 795
+ ITEM Assertion OK : Range RowHeight is 50
+ ITEM Assertion OK : Range ColumnWidth is 50
+ ITEM Assertion OK : Range Height is 300
+ ITEM Assertion OK : Range Width is 795
+ ITEM Assertion OK : RowHeight is null: True
+ ITEM Assertion OK : ColumnWidth is null: True
+END 'Heights and Widths' Symbol
+ TEST OK : Heights and Widths
+----------------------------------------------------------------
+RangeRowColumn-Issue
+ TEST START : RangeRowColumn-Issue
+ ITEM Assertion OK : Row is: 8
+ ITEM Assertion OK : Column is: 5
+ ITEM Assertion OK : EntireRow.Columns.Count = 256
+ ITEM Assertion OK : EntireColumn.Rows.Count = 131072
+END 'RangeRowColumn-Issue' Symbol
+ TEST OK : RangeRowColumn-Issue
+----------------------------------------------------------------
+Replace-Issue
+ TEST START : Replace-Issue
+ ITEM Assertion OK : Value after Replace: YourValue
+ ITEM Assertion OK : Value after Replace: YourValue
+ ITEM Assertion OK : Value after Replace: ReplaceValue
+ ITEM Assertion OK : Value after Replace: New ReplaceValue
+ ITEM Assertion OK : Value after Replace: New ReplaceValue
+ ITEM Assertion OK : Value after Replace: New Replace
+ ITEM Assertion OK : Value after Replace:
+END 'Replace-Issue' Symbol
+ TEST OK : Replace-Issue
+----------------------------------------------------------------
+Hidden-Issue
+ TEST START : Hidden-Issue
+ ITEM Assertion OK : - Range.Rows.Hidden (set)
+ ITEM Assertion OK : - Range.Rows.Hidden (get)
+ ITEM Assertion OK : - Range.Rows.Item(1).Hidden (set)
+ ITEM Assertion OK : - Range.Rows.Item(1).Hidden (get)
+ ITEM Assertion OK : - Range.Columns.Hidden (set)
+ ITEM Assertion OK : - Range.Columns.Hidden (get)
+ ITEM Assertion OK : - Range.Columns.Item(1).Hidden (set)
+ ITEM Assertion OK : - Range.Columns.Item(1).Hidden (get)
+END 'Hidden-Issue' Symbol
+ TEST OK : Hidden-Issue
+----------------------------------------------------------------
+End issue
+ TEST START : End issue
+ ITEM Assertion OK : - = $E$48
+ ITEM Assertion OK : - = $E$1
+ ITEM Assertion OK : - = $E$3
+ ITEM Assertion OK : - = $A$8
+ ITEM Assertion OK : - = $B$8
+ ITEM Assertion OK : - = $IV$8
+ ITEM Assertion OK : - = $Z$8
+END 'End issue' Symbol
+ TEST OK : End issue
+----------------------------------------------------------------
+Outline issue
+ TEST START : Outline issue
+ ITEM Assertion OK : - Range.clearOutline - please check visually
+ ITEM Assertion OK : - Range.AutoOutline - please check visually
+ ITEM Assertion OK : - Range.AutoOutline - please check visually
+END 'Outline issue' Symbol
+ TEST OK : Outline issue
+----------------------------------------------------------------
+Validation
+ TEST START : Validation
+ ITEM Assertion OK : Validation Input Message is : Attention!
+ ITEM Assertion OK : Validation Input Message is : Enter an integer from five to ten
+ ITEM Assertion OK : Validation Error Title is : You must enter a number from five to ten
+ ITEM Assertion OK : Validation Error Message is : An Error occured
+ ITEM Assertion OK : Validation Error Title is : Microsoft Excel
+END 'Validation' Symbol
+ TEST OK : Validation
+Test run finished : 10/03/2008 15:15:13
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/Shapes.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/Shapes.log
new file mode 100644
index 000000000000..3193a0b1094d
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/Shapes.log
@@ -0,0 +1,77 @@
+Test run started : 10/16/2007 05:25:21 PM
+BEGIN Shapes_Collection_Behaviour
+ TEST START : Shapes_Collection_Behaviour
+ ITEM Assertion OK : Name of indexed shape should be 'Sheet2Shape1'
+ ITEM Assertion OK : Name of indexed shape should be 'Sheet2Shape2'
+ TEST Success. : Shapes_Collection_Behaviour
+END Shapes_Collection_Behaviour
+BEGIN Shapes_Select_Item
+ TEST START : Shapes_Select_Item
+ ITEM Assertion OK : Correctly selected shape through Range
+ ITEM Assertion OK : Correctly selected shape through Item
+ ITEM Assertion OK : Needs to be visually checked. Is there a line on the document?
+ ITEM Assertion OK : Needs to be visually checked. Are All Shapes Selected?
+ TEST Success. : Shapes_Select_Item
+END Shapes_Select_Item
+BEGIN Shapes_Fill
+ TEST START : Shapes_Fill
+ ITEM Assertion OK : correctly set visibility of shape fill
+ ITEM Assertion OK : correctly set transparency of shape line
+ ITEM Assertion OK : correctly set forecolor of shape fill
+ ITEM Assertion FAIL : correctly set backcolor of shape fill
+ ITEM Assertion OK : the success of the TwoColorGradient method needs to be verified visually!
+ ITEM Assertion OK : correctly set forecolor of shape fill
+ ITEM Assertion FAIL : correctly set forecolor of shape fill
+ TEST Success. : Shapes_Fill
+END Shapes_Fill
+BEGIN Shapes_Line
+ TEST START : Shapes_Line
+ ITEM Assertion FAIL : correctly set weight of shape line
+ ITEM Assertion OK : correctly set visibility of shape line
+ ITEM Assertion OK : correctly set transparency of shape line
+ ITEM Assertion OK : correctly set dash style of shape line
+ ITEM Assertion OK : correctly set dash style of shape line
+ ITEM Assertion OK : correctly set forecolor of shape line
+ ITEM Assertion FAIL : correctly set backcolor of shape line
+ TEST Success. : Shapes_Line
+END Shapes_Line
+BEGIN Shapes_TextFrame
+ TEST START : Shapes_TextFrame
+ ITEM Assertion OK : correctly set Autosize of Shape TextFrame
+ TEST Success. : Shapes_TextFrame
+END Shapes_TextFrame
+BEGIN Shapes_SimpleGeometry
+ TEST START : Shapes_SimpleGeometery
+ ITEM Assertion OK : shape height should be 47.0425168477155 and got 46.9984222363199
+ ITEM Assertion OK : shape width should be 101.467710269751 and got 101.423615658355
+ ITEM Assertion OK : shape left should be 68.5574761223637 and got 68.5417279658754
+ ITEM Assertion OK : shape top should be 42.0251943291216 and got 42.0094461726333
+ ITEM Assertion OK : shape rotation should be 0 and got 0
+ ITEM Assertion OK : shape rotation should be 25 and got 25
+ ITEM Assertion OK : shape incrementrotation should be 50 and got 50
+ ITEM Assertion OK : shape incrementleft should be 70.6834602404119 and got 70.6677120839236
+ ITEM Assertion OK : shape incrementtop should be 91.262986503119 and got 91.2472383466307
+ TEST Success. : Shapes_SimpleGeometery
+END Shapes_SimpleGeometry
+BEGIN Shapes_Range
+ TEST START : Shapes_Range
+ ITEM Assertion OK : expected Sheets(2).Shapes.Range(1) to contain 1 element, it contains 1
+ ITEM Assertion OK : expected Sheets(2).Shapes.Range(1) to return Sheet2Shape1 got Sheet2Shape1
+ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Sheet2Shape3) to contain 1 element, it contains 1
+ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Sheet2Shape3) to return Sheet2Shape3 got Sheet2Shape3
+ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array(3, 1) to contain 2 elements, it contains 2
+ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array(3, 1) to return concated element/shape names Sheet2Shape3Sheet2Shape1 and got Sheet2Shape3Sheet2Shape1
+ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array('Sheet2Shape3', 1, 'Sheet2Shape2')) to contain 3 elements, it contains 3
+ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array('Sheet2Shape3', 1, 'Sheet2Shape2')) to return concated element/shape names Sheet2Shape3Sheet2Shape1Sheet2Shape2 and got Sheet2Shape3Sheet2Shape1Sheet2Shape2
+ TEST Success. : Shapes_Range
+END Shapes_Range
+BEGIN Shapes_ShapeRange
+ TEST START : Shapes_ShapeRange
+ ITEM Assertion OK : ShapeRange.IncrementLeft shp1.left should be 90.6677120839236 and got 90.6519627935771
+ ITEM Assertion OK : ShapeRange.IncrementLeft shp2.left should be 240.02518299054 and got 240.009433700193
+ ITEM Assertion OK : ShapeRange.IncrementTop shp1.Top should be 111.247238346631 and got 111.231489056284
+ ITEM Assertion OK : ShapeRange.IncrementTop shp2.Top should be 65.0708633026228 and got 65.0551140122763
+ ITEM Assertion OK : ShapeRange.IncrementRotation shp1.Rotation should be 70 and got 70
+ ITEM Assertion OK : ShapeRange.IncrementRotation shp2.Rotation should be 20 and got 20
+END Shapes_ShapeRange
+Test run finished : 10/16/2007 05:25:22 PM
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/StrConv-test.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/StrConv-test.log
new file mode 100644
index 000000000000..c7a7d8750583
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/StrConv-test.log
@@ -0,0 +1,9 @@
+Test run started : 05/29/2008 02:51:03 PM
+BEGIN StrConv
+ TEST START : Test StrConv function
+ ITEM Assertion OK : Converts the string to uppercase characters:ABC EFG HIJ
+ ITEM Assertion OK : Converts the string to lowercase characters:abc efg hij
+ ITEM Assertion OK : Converts the first letter of every word in string to uppercase:Abc Efg Hij
+ TEST OK : Test StrConv function
+END StrConv
+Test run finished : 05/29/2008 02:51:03 PM
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/Template.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/Template.log
new file mode 100644
index 000000000000..c6376c5b3732
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/Template.log
@@ -0,0 +1,14 @@
+Test run started : 2008/07/10 11:57:05
+----------------------------------------------------------------
+TestCaseName
+ TEST START : TestCaseName
+ ITEM Assertion OK : Something has been done.
+Test Results
+============
+
+Tests passed: 1
+Tests failed: 0
+
+END 'TestCaseName
+ TEST OK : TestCaseName
+Test run finished : 2008/07/10 11:57:05
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/TestAddress.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/TestAddress.log
new file mode 100644
index 000000000000..4fa4bc820f59
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/TestAddress.log
@@ -0,0 +1,67 @@
+Test run started : 12/05/2009 11:23:35
+----------------------------------------------------------------
+TestAddress
+ TEST START : TestAddress
+ ITEM Assertion OK : test1 Range('e3:f3') A1 style addressing
+ ITEM Assertion OK : test2 Range('e3:f3') R1C1 style addressing
+ ITEM Assertion OK : test3 Range ('e:f') A1 style addressing
+ ITEM Assertion OK : test4 Range ('e:f') R1C1 style addressing
+ ITEM Assertion OK : test5 Columns A1 style addressing
+ ITEM Assertion OK : test6 Columns R1C1 style addressing
+ ITEM Assertion OK : test7 Columns(3) A1 style addressing
+ ITEM Assertion OK : test8 Columns(3) R1C1 style addressing
+ ITEM Assertion OK : test9 Columns('e') A1 style addressing
+ ITEM Assertion OK : test10 Columns('e') R1C1 style addressing
+ ITEM Assertion OK : test11 Columns('b:d') A1 style addressing
+ ITEM Assertion OK : test12 Columns('b:d') R1C1 style addressing
+ ITEM Assertion OK : test13 Range('c1:g10').Columns A1 style addressing
+ ITEM Assertion OK : test14 Range('c1:g10').Columns R1C1 style addressing
+ ITEM Assertion OK : test15 Range('c1:g10').Columns(1) A1 style addressing
+ ITEM Assertion OK : test16 Range('c1:g10').Columns(1) R1C1 style addressing
+ ITEM Assertion OK : test17 Range('c1:g10').Columns('a') A1 style addressing
+ ITEM Assertion OK : test18 Range('c1:g10').Columns('a') R1C1 style addressing
+ ITEM Assertion OK : test19 Range('c1:g10').Columns('c') A1 style addressing
+ ITEM Assertion OK : test20 Range('c1:g10').Columns('c') R1C1 style addressing
+ ITEM Assertion OK : test21 Range('c1:g10').Columns('x:z') A1 style addressing
+ ITEM Assertion OK : test22 Range('c1:g10').Columns('x:z') R1C1 style addressing
+ ITEM Assertion OK : test23 Range('c1:g10').Columns(30) A1 style addressing
+ ITEM Assertion OK : test24 Range('c1:g10').Columns(30) R1C1 style addressing
+ ITEM Assertion OK : test25 Worksheets('Sheet2').Cells(1, 1) A1 style addressing
+ ITEM Assertion OK : test26 Worksheets('Sheet2').Cells(1, 1) A1 style addressing, RowAddressAbsolute is false
+ ITEM Assertion OK : test27 Worksheets('Sheet2').Cells(1, 1) A1 style addressing, ColAddressAbsolute is false
+ ITEM Assertion OK : test28 Worksheets('Sheet2').Cells(1, 1) R1C1 style addressing
+ ITEM Assertion OK : test29 Worksheets('Sheet2').Range('A1:E5').EntireColumn A1 style addressing
+ ITEM Assertion OK : test30 Worksheets('Sheet2').Range('A1').EntireColumn A1 style addressing
+ ITEM Assertion OK : test31 Worksheets('Sheet2').Range('A1:E5').EntireRow A1 style addressing
+ ITEM Assertion OK : test32 Worksheets('Sheet2').Range('A1') A1 style addressing
+ ITEM Assertion OK : test33 Worksheets('Sheet2').Range('IV65536').EntireRow A1 style addressing
+ ITEM Assertion OK : test34 Worksheets('Sheet2').Range('IU2:IV65536') A1 style addressing
+ ITEM Assertion OK : test35 Range('c1:g10').Columns('x:z') R1C1 style addressing
+ ITEM Assertion OK : test36 Worksheets('Sheet2').Range('A1') A1 style addressing
+ ITEM Assertion OK : test37 Worksheets('Sheet2').Range('A1:E5').EntireColumn A1 style addressing
+ ITEM Assertion OK : test38 Worksheets('Sheet2').Range('10:12') A1 style addressing
+ ITEM Assertion OK : test39 Worksheets('Sheet2').Range('10:12') R1C1 style addressing
+ ITEM Assertion OK : test40 Range('Sheet3!A1:B4') A1 style addressing
+ ITEM Assertion OK : test41 Range('Sheet3!A1,B1,D4:F20') A1 style addressing
+ ITEM Assertion OK : test42 Range('g20:h40').Columns('c:c')
+ ITEM Assertion OK : test43 Range('g20:h40').Columns('c:f')
+ ITEM Assertion OK : test44 Range('g20:h40').Columns(-1)
+ ITEM Assertion OK : test45 Range('c4:g10').Rows(-1)
+ ITEM Assertion OK : test46 Range('a2:b4').Rows('1:1')
+ ITEM Assertion OK : test47 Range('a2:b4').Rows('1:2')
+ ITEM Assertion OK : test48 Range('a2:b4').Rows('2:2')
+ ITEM Assertion OK : test49 Range('a2:b4').Rows('2:3')
+ ITEM Assertion OK : test50 Range(' A2:B4 ')
+ ITEM Assertion OK : test51 Range('A 2:B 4')
+ ITEM Assertion OK : test52 Range('A2 : B4 ')
+ ITEM Assertion OK : test53 Range('Sheet1 !A2 : B4 ')
+ ITEM Assertion OK : test54 Range('Sheet1! A2 : B4 ')
+Test Results
+============
+
+Tests passed: 54
+Tests failed: 0
+
+END 'TestAddress
+ TEST OK : TestAddress
+Test run finished : 12/05/2009 11:23:35
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/TestCalc_Rangetest.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/TestCalc_Rangetest.log
new file mode 100644
index 000000000000..083819d4b64e
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/TestCalc_Rangetest.log
@@ -0,0 +1,60 @@
+Test run started : 30/05/2007 15:59:40
+BEGIN TestCalc
+ TEST START : RangeTest2
+ ITEM Assertion OK : - Range("D15").Row
+ ITEM Assertion OK : - WorkSheet("D15").Range.Row
+ ITEM Assertion OK : - Range("D15").Column
+ ITEM Assertion OK : - Worksheet.Range("D15").Column
+ ITEM Assertion OK : - Range("D1").EntireRow.Valuer
+ ITEM Assertion OK : - Range("D1").EntireRow.Valuer
+ ITEM Assertion OK : - Range("D1").EntireRow.Columns.Count
+ ITEM Assertion OK : - Range("D1").EntireColumn.Rows.Count
+ ITEM Assertion OK : - Range("D15").ClearContent
+ ITEM Assertion OK : - Range("M1:N2").Rows.Hidden (set)
+ ITEM Assertion OK : - Range("M1:N2").Rows.Hidden (get)
+ ITEM Assertion OK : - Range("M1:N2").Rows(1).Hidden (set)
+ ITEM Assertion OK : - Range("M1:N2").Rows(1).Hidden (get)
+ ITEM Assertion OK : - Range("M1:N2").Columns.Hidden (set)
+ ITEM Assertion OK : - Range("M1:N2").Columns.Hidden (get)
+ ITEM Assertion OK : - Range("M1:N2").Columns(1).Hidden (set)
+ ITEM Assertion OK : - Range("M1:N2").Columns(1).Hidden (get)
+ ITEM Assertion OK : - Range("B38").Orientation (get)
+ ITEM Assertion OK : - Range("B38").Orientation (set)
+ ITEM Assertion OK : - Range("B38").Orientation (set = xlDownward)
+ ITEM Assertion OK : - Range("B38").Orientation (set)
+ ITEM Assertion OK : - Range("B38").Orientation (set = xlUpward)
+ ITEM Assertion OK : - Range("B38").Orientation (set)
+ ITEM Assertion OK : - Range("B38").Orientation (set = xlVertical)
+ ITEM Assertion OK : - Range("B38").Orientation (set)
+ ITEM Assertion OK : - Range("B38").Orientation (set = xlVertical)
+ ITEM Assertion OK : - Range("B39").WrapText (get)
+ ITEM Assertion OK : - Range("B39").WrapText (set)
+ ITEM Assertion OK : - Range("B39").WrapText (set)
+ ITEM Assertion OK : - Range("E39").MergeCells (get)
+ ITEM Assertion OK : - Range("F39").MergeCells (get)
+ ITEM Assertion OK : - Range("E39").MergeCells (set)
+ ITEM Assertion FAIL : - Range("F39").MergeCells (set)
+ ITEM Assertion OK : - Range("E39").MergeCells (set)
+ ITEM Assertion OK : - Range("F39").MergeCells (set)
+ ITEM Assertion OK : - Range("C41:C42").Replace MatchCase:=True
+ ITEM Assertion OK : - Range("C41:C42").Replace MatchCase:=True
+ ITEM Assertion OK : - Range("D41:D42").Replace MatchCase:=False
+ ITEM Assertion OK : - Range("B39").VerticalAlignment (get)
+ ITEM Assertion OK : - Range("B39").VerticalAlignment (set)
+ ITEM Assertion OK : - Range("B39").VerticalAlignment (get)
+ ITEM Assertion OK : - Range("B39").VerticalAlignment (get)
+ ITEM Assertion OK : - Range("B39").VerticalAlignment (set)
+ ITEM Assertion OK : - Range("B39").VerticalAlignment (get)
+ ITEM Assertion OK : - Range("B39").VerticalAlignment (set)
+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (get)
+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (set)
+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (get)
+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (set)
+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (get)
+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (set)
+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (get)
+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (set)
+ ITEM FAIL (RangeTest2)
+ TEST Not succesfully completed : RangeTest2
+END TestCalc
+Test run finished : 30/05/2007 15:59:42
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/TestCalc_Rangetest2.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/TestCalc_Rangetest2.log
new file mode 100644
index 000000000000..b1573c06d90e
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/TestCalc_Rangetest2.log
@@ -0,0 +1,65 @@
+Test run started : 10/03/2008 15:15:19
+BEGIN TestCalc
+ TEST START : RangeTest3
+ ITEM Assertion OK : - setFormulaR1C1
+ ITEM Assertion OK : - getFormulaR1C1
+ ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
+ ITEM Assertion OK : - Range.Copy(Range("I10"))
+ ITEM Assertion OK : PasteSpecial Paste:=xlPasteValues
+ ITEM Assertion OK : PasteSpecial Paste:=xlPasteFormulas
+ ITEM Assertion OK : PasteSpecial Paste:=xlPasteFormats
+ ITEM Assertion OK : PasteSpecial
+ ITEM Assertion OK : PasteSpecial SkipBlanks:=True
+ ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationAdd
+ ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationSubtract
+ ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationMultiply
+ ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationDivide
+ ITEM Assertion OK : PasteSpecial Transpose:=True
+ ITEM Assertion FAIL : ActiveWorkbook.FileFormat
+ ITEM Assertion OK : ActiveWorkbook.Name
+ ITEM Assertion OK : ActiveWorkbook.FullName und ActiveWorkbook.Path
+ ITEM Assertion FAIL : - = ActiveWorkbook.Colors(3) set
+ ITEM Assertion OK : - = ActiveWorkbook.ResetColors
+ ITEM Assertion OK : - = ActiveWorkbook.Colors(3) get
+ ITEM Assertion OK : - = Range("K22").End (xlDown)
+ ITEM Assertion OK : - = Range("K22").End (xlUo)
+ ITEM Assertion OK : - = Range("K22").End (xlToLeft)
+ ITEM Assertion OK : - = Range("K22").End (xlRight)
+ ITEM Assertion OK : - ActiveSpreadsheet.Next
+ ITEM Assertion OK : - ActiveSpreadsheet.Next
+ ITEM Assertion OK : - ActiveSpreadsheet.Previous
+ ITEM Assertion OK : - ActiveSpreadsheet.Previous
+ ITEM Assertion OK : - Range("J4:J11").AutoFilter field:=1, Criteria1:="x"
+ ITEM Assertion OK : - Range("J4:J11").AutoFilter field:=1, Criteria1:="<>"
+ ITEM Assertion OK : - Range("J4:J11").AutoFilter field:=1, Criteria1:="="
+ ITEM Assertion OK : - Range("J4:J11").AutoFilter
+ ITEM Assertion OK : - ActiveSheet.Resize.Select
+ ITEM Assertion OK : - Application.GoTo Reference:="R8C2"
+ ITEM Assertion FAIL : - Application.GoTo Reference:="R[8]C[2]"
+ ITEM Assertion OK : - Application.GoTo Reference:="R8C2"
+ ITEM Assertion OK : - Range.Group - please check visually
+ ITEM Assertion OK : - Range.Group - please check visually
+ ITEM Assertion OK : - Range.Ungroup- please check visually
+ ITEM Assertion OK : - Range.Ungroup - please check visually
+ ITEM Assertion OK : - Range.Group - please check visually
+ ITEM Assertion OK : - Range.Group - please check visually
+ ITEM Assertion OK : - Range.clearOutline - please check visually
+ ITEM Assertion OK : - Range.AutoOutline - please check visually
+ ITEM Assertion OK : - Range.AutoOutline - please check visually
+ ITEM Assertion OK : - ActiveSheet.UsedRange.Select
+ ITEM Assertion OK : - Range("A13").AddIndent
+ ITEM Assertion OK : - Range("A13").IndentLevel set
+ ITEM Assertion OK : - Range("A13").IndentLevel get
+ ITEM Assertion OK : - Range("A13").IndentLevel get
+ ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
+ ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
+ ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
+ ITEM Assertion OK : - Range.Calculate
+ ITEM Assertion OK : Worksheet.Calculate
+ ITEM Assertion OK : - Application.Calculate
+ ITEM Assertion OK : Global.Calculate
+ ITEM Assertion OK : Calculation set
+ ITEM FAIL (RangeTest3)
+ TEST Not succesfully completed : RangeTest3
+END TestCalc
+Test run finished : 10/03/2008 15:15:21
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/TestIntersection.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/TestIntersection.log
new file mode 100644
index 000000000000..ea686a830cde
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/TestIntersection.log
@@ -0,0 +1,26 @@
+Test run started : 13/01/2009 14:31:43
+----------------------------------------------------------------
+TestIntersection
+ TEST START : TestIntersection
+ ITEM Assertion OK : test1 Application.Intersect( Range('A2:D10'), Range('C4:E6'))
+ ITEM Assertion OK : test2 Application.Intersect( Range('A2:D10'), Range('A4:G10'))
+ ITEM Assertion OK : test3 Application.Intersect( Range('A2:c8,d2:f8,g2:i8'), Range('A4:G10'))
+ ITEM Assertion OK : test4 Application.Intersect( Range('A4:G10'), Range('A2:c8,d2:f8,g2:i8'))
+ ITEM Assertion OK : test5 Application.Intersect( Range('A2:c8,d2:f8,g2:i8'), Range('g4:i10,A4:G10'))
+ ITEM Assertion OK : test6 Application.Intersect( Range('g4:i10,A4:G10'), Range('A2:c8,d2:f8,g2:i8'))
+ ITEM Assertion OK : test7 Application.Intersect( Range('a2:d10,b5:e10'), Range('a5:i10'))
+ ITEM Assertion OK : test8 Application.Intersect( Range('a2:c8,d2:f8'), Range('b6:e9,a6:f9'))
+ ITEM Assertion OK : test9 Application.Intersect( Range('a2:c8,e2:f8'), Range('b6:e9,a6:f9'))
+ ITEM Assertion OK : test10 Application.Intersect( Range('a1:a3,c1:c3'), Range('a2:c3'))
+ ITEM Assertion OK : test11 Application.Intersect( Range('a1:a3,b1:b3'), Range('a2:c3'))
+ ITEM Assertion OK : test12 Application.Intersect( Range('a2:d5,b3:f7,c1:g4'), Range('b2:e6'))
+ ITEM Assertion OK : test13 Range(" a2:d10,b5:e10,g13:j32 "), Range(" a5:i10,b6:e9 "), Range("b2:r5,f10:h19")
+Test Results
+============
+
+Tests passed: 13
+Tests failed: 0
+
+END 'TestIntersection
+ TEST OK : TestIntersection
+Test run finished : 13/01/2009 14:31:43
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/TestUnion.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/TestUnion.log
new file mode 100644
index 000000000000..da3cb35dedb3
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/TestUnion.log
@@ -0,0 +1,17 @@
+Test run started : 13/01/2009 14:32:16
+----------------------------------------------------------------
+TestUnion
+ TEST START : TestUnion
+ ITEM Assertion OK : test1Application.Range('A2:D10'), Range('C4:E6')
+ ITEM Assertion OK : test2Application.Range('A2:D5,a3:d4'), Range('A4:G10')
+ ITEM Assertion OK : test3Application.Range('A4:G10,A1:B6'), Range('A2:D5,A3:D4')
+ ITEM Assertion OK : test4Application.Range('A5:D10'), Range('B5:E10')
+Test Results
+============
+
+Tests passed: 4
+Tests failed: 0
+
+END 'TestUnion
+ TEST OK : TestUnion
+Test run finished : 13/01/2009 14:32:16
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/VariantTest.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/VariantTest.log
new file mode 100644
index 000000000000..a916ac4a37fd
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/VariantTest.log
@@ -0,0 +1,47 @@
+Test run started : 24/09/2008 10:58:18
+----------------------------------------------------------------
+TestAddress
+ TEST START : TestAddress
+ ITEM Assertion OK : test1: res = (aboo = '')
+ ITEM Assertion OK : test 2: res = (aboo = 'fiddlesticks')
+ ITEM Assertion OK : test 3: res = ('' = aboo)
+ ITEM Assertion OK : test 4: res = ('fiddlesticks' = aboo )
+ ITEM Assertion OK : test 5: res = (testString = '')
+ ITEM Assertion OK : test 6: res = (testString = 'fiddlesticks')
+ ITEM Assertion OK : test 7: res = ('' = testString)
+ ITEM Assertion OK : test 8: res = ('fiddlesticks' = testString )
+ ITEM Assertion OK : test 9: res = ( aboo < " )
+ ITEM Assertion OK : test 10: res = ( testString < " )
+ ITEM Assertion OK : test 11: res = ( aboo > " )
+ ITEM Assertion OK : test 12: res = ( testString > " )
+ ITEM Assertion OK : test 13: res = ( aboo <> '' )
+ ITEM Assertion OK : test 14: res = ( testString <> '' )
+ ITEM Assertion OK : test 15: res = (aboo = something/14)
+ ITEM Assertion OK : test 16: res = something + 'string'
+ ITEM Assertion OK : test 17: res = something & 'string'
+ ITEM Assertion OK : test 18: res = something MOD 10 )
+ ITEM Assertion OK : test 19: res = something AND 1 )
+ ITEM Assertion OK : test 20: res = something AND 0 )
+ ITEM Assertion OK : test 21: res = something OR 12)
+ ITEM Assertion OK : test 22: res = something OR 0 )
+ ITEM Assertion OK : test 23: res = something XOR 0 )
+ ITEM Assertion OK : test 24: res = something XOR 1 )
+ ITEM Assertion OK : test 25: res = something EQV 0 )
+ ITEM Assertion OK : test 26: res = something EQV 1 )
+ ITEM Assertion OK : test 27: res = something IMP 0 )
+ ITEM Assertion OK : test 28: res = something IMP 1 )
+ ITEM Assertion OK : test 29: res = something IMP 14 )
+ ITEM Assertion OK : test 30: res = NOT something )
+ ITEM Assertion OK : test 31: res = something + 12 )
+ ITEM Assertion OK : test 32: res = something - 12 )
+ ITEM Assertion OK : test 33: res = -something )
+ ITEM Assertion OK : test 34: res = something * 12 )
+Test Results
+============
+
+Tests passed: 34
+Tests failed: 0
+
+END 'TestAddress
+ TEST OK : TestAddress
+Test run finished : 24/09/2008 10:58:20
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/Window.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/Window.log
new file mode 100644
index 000000000000..ec9a6656113e
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/Window.log
@@ -0,0 +1,46 @@
+Test run started : 05/29/2008 02:55:00 PM
+----------------------------------------------------------------
+ TEST START : Window-Issue
+ ITEM Assertion OK : Window.Left is: 0 (Test only applies to maximized Window)
+ ITEM Assertion OK : Window.Top is: 21 (Test only applies to maximized Window)
+ ITEM Assertion OK : Window.Width is: 1280 (Test only applies to maximized Window)
+ ITEM Assertion OK : Window.Height is: 752 (Test only applies to maximized Window)
+ ITEM Assertion OK : Window.ScrollColumn is: 100
+ ITEM Assertion OK : Window.ScrollColumn is: 1
+ ITEM Assertion OK : Window.ScrollRow is: 100
+ ITEM Assertion OK : Window.ScrollRow is: 1
+ ITEM Assertion OK : Window.LargeScroll(Down): ScrollRow is: 94 (Test may only apply to maximized Window)
+ ITEM Assertion OK : Window.LargeScroll(Up): ScrollRow is: 1
+ ITEM Assertion OK : Window.LargeScroll(ToRight): ScrollColumn is: 58 (Test may only apply to maximized Window)
+ ITEM Assertion OK : Window.LargeScroll(ToLeft): ScrollColumn is: 1
+ ITEM Assertion OK : Window.SmallScroll(ToRight): ScrollColumn is: 4 (Test may only apply to maximized Window)
+ ITEM Assertion OK : Window.SmallScroll(ToLeft): ScrollColumn is: 1
+ ITEM Assertion OK : Window.DisplayWorkBookTabs is: False
+ ITEM Assertion OK : Window.DisplayWorkBookTabs is: True
+ ITEM Assertion OK : Window.DisplayVerticalScrollBar is: True
+ ITEM Assertion OK : Window.DisplayVerticalScrollBar is: False
+ ITEM Assertion OK : Window.DisplayHorizontalScrollBar is: False
+ ITEM Assertion OK : Window.DisplayHorizontalScrollBar is: True
+ ITEM Assertion OK : Window.DisplayHeadings is: False
+ ITEM Assertion OK : Window.DisplayHeadings is: True
+ ITEM Assertion OK : Window.DisplayOutline is: False
+ ITEM Assertion OK : Window.DisplayOutline is: True
+ ITEM Assertion OK : Window.Visible is: False
+ ITEM Assertion OK : Window.Visible is: True
+ ITEM Assertion OK : Window.Caption is: MyCaption
+ ITEM Assertion OK : Pane.ScrollColumn is: 100
+ ITEM Assertion OK : Pane.ScrollColumn is: 1
+ ITEM Assertion OK : Pane.ScrollRow is: 100
+ ITEM Assertion OK : Pane.ScrollRow is: 1
+ ITEM Assertion OK : Pane.LargeScroll(Down): ScrollRow is: 94 (Test may only apply to maximized Window)
+ ITEM Assertion OK : Pane.LargeScroll(Up): ScrollRow is: 1
+ ITEM Assertion OK : Pane.LargeScroll(ToRight): ScrollColumn is: 58 (Test may only apply to maximized Window)
+ ITEM Assertion OK : Pane.LargeScroll(ToLeft): ScrollColumn is: 1
+ ITEM Assertion OK : Pane.SmallScroll(ToRight): ScrollColumn is: 4 (Test may only apply to maximized Window)
+ ITEM Assertion OK : Pane.SmallScroll(ToLeft): ScrollColumn is: 1
+ ITEM Assertion OK : Window Selection: $A$2:$D$5
+ ITEM Assertion OK : ActiveSheet name of Window: Sheet1
+ ITEM Assertion OK : Window ActiveCell: $A$1
+END 'Window-Issue' Symbol
+ TEST OK : Window-Issue
+Test run finished : 05/29/2008 02:55:01 PM
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/bytearraystring.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/bytearraystring.log
new file mode 100644
index 000000000000..bd243283d8f1
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/bytearraystring.log
@@ -0,0 +1,8 @@
+Test run started : 05/29/2008 02:25:58 PM
+BEGIN Bytearray To String
+ TEST START : Test the conversion between bytearray and string
+ ITEM Assertion OK : The number of byte is:6
+ ITEM Assertion OK : the return string is: abc
+ TEST OK : Test the conversion between bytearray and string
+END Bytearray To String
+Test run finished : 05/29/2008 02:25:58 PM
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/dateserial.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/dateserial.log
new file mode 100644
index 000000000000..4dd5f53160f2
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/dateserial.log
@@ -0,0 +1,9 @@
+Test run started : 01/24/2008 01:24:50 PM
+BEGIN DateSerial
+ TEST START : Test DateSerial function
+ ITEM Assertion OK : the return date is: 06/15/1999
+ ITEM Assertion OK : the return date is: 06/15/1999
+ ITEM Assertion OK : the return date is: 06/15/1999
+ TEST OK : Test DateSerial function
+END DateSerial
+Test run finished : 01/24/2008 01:24:50 PM
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/datevalue.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/datevalue.log
new file mode 100644
index 000000000000..830d5e7b6c3e
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/datevalue.log
@@ -0,0 +1,8 @@
+Test run started : 01/24/2008 01:24:41 PM
+BEGIN DateValue
+ TEST START : Test DateValue function
+ ITEM Assertion OK : the return date is: 02/12/1969
+ ITEM Assertion OK : the return date is: 01/21/2008
+ TEST OK : Test DateValue function
+END DateValue
+Test run finished : 01/24/2008 01:24:41 PM
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/format.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/format.log
new file mode 100644
index 000000000000..96725bf7daa8
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/format.log
@@ -0,0 +1,36 @@
+Test run started : 2008/09/18 11:35:34
+BEGIN Format
+ TEST START : Test Predefined_Number_Format_Sample function
+ ITEM Assertion OK : General Number: 562486.2356
+ ITEM Assertion OK : Fixed: 0.20
+ ITEM Assertion OK : Standard: 562,486.24
+ ITEM Assertion OK : Percent: 75.21%
+ ITEM Assertion OK : Scientific: 5.62E+05
+ ITEM Assertion OK : Scientific: -3.46E+03
+ ITEM Assertion OK : Yes/No: No
+ ITEM Assertion OK : Yes/No: Yes
+ ITEM Assertion OK : True/False: False
+ ITEM Assertion OK : True/False: True
+ ITEM Assertion OK : On/Off: Off
+ ITEM Assertion OK : On/Off: On
+ TEST OK : Test Predefined_Number_Format_Sample function
+ TEST START : Test Custom_Number_Format_Sample function
+ ITEM Assertion OK : 00.0000: 23.6750
+ ITEM Assertion OK : 00.00: 23.68
+ ITEM Assertion OK : 00000: 02658
+ ITEM Assertion OK : 00.00: 2658.00
+ ITEM Assertion OK : ##.####: 23.675
+ ITEM Assertion OK : ##.##: 23.68
+ ITEM Assertion OK : #,###.##: 12,345.25
+ ITEM Assertion OK : ##.00%: 25.00%
+ ITEM Assertion OK : #,###: 1,000,000
+ ITEM Assertion OK : ######E-###: 109838E-5
+ ITEM Assertion OK : $#,###.##: $2,345.25
+ ITEM Assertion OK : ##.###\%: .25%
+ TEST OK : Test Custom_Number_Format_Sample function
+ TEST START : Test Custom_Text_Format_Sample function
+ ITEM Assertion OK : <: vba
+ ITEM Assertion OK : >: VBA
+ TEST OK : Test Custom_Text_Format_Sample function
+END Format
+Test run finished : 2008/09/18 11:35:34
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/pagesetup.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/pagesetup.log
new file mode 100644
index 000000000000..f04585c3f9e1
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/pagesetup.log
@@ -0,0 +1,77 @@
+Test run started : 07/21/2008 02:00:06 PM
+BEGIN PageSetup
+ TEST START : Sheet_PrintArea
+ ITEM Assertion OK : PrintArea has changed as expected
+ TEST OK : Sheet_PrintArea
+ TEST START : Test margins (no headers)
+ ITEM Assertion OK : PageSetup.LeftMargin set/get
+ ITEM Assertion OK : PageSetup.RightMargin set/get
+ ITEM Assertion OK : PageSetup.TopMargin set/get
+ ITEM Assertion OK : PageSetup.BottomMargin set/get
+Verify that page margins on sheet 1 are all 0.5inch
+ TEST OK : Test margins (no headers)
+ TEST START : Test margins (headers)
+ ITEM Assertion OK : PageSetup.HeaderMargin set/get
+ ITEM Assertion OK : PageSetup.FooterMargin set/get
+ ITEM Assertion OK : PageSetup.LeftMargin set/get
+ ITEM Assertion OK : PageSetup.LeftMargin set/get
+Verify that top/bottom/header/footer page margins on sheet 2 are all 0.5inch
+ TEST OK : Test margins (headers)
+ TEST START : Test header/footer text
+ ITEM Assertion OK : PageSetup.LeftHeader set
+ ITEM Assertion OK : PageSetup.LeftHeader set/get
+ ITEM Assertion OK : PageSetup.CenterHeader set
+ ITEM Assertion OK : PageSetup.CenterHeader set/get
+ ITEM Assertion OK : PageSetup.RightHeader set
+ ITEM Assertion OK : PageSetup.RightHeader set/get
+ ITEM Assertion OK : PageSetup.LeftFooter set
+ ITEM Assertion OK : PageSetup.LeftFooter set/get
+ ITEM Assertion OK : PageSetup.CenterFooter set
+ ITEM Assertion OK : PageSetup.CenterFooter set/get
+ ITEM Assertion OK : PageSetup.RightFooter set
+ ITEM Assertion OK : PageSetup.RightFooter set/get
+Verify that headers on sheet 2 are Ready,to,go
+Verify that footers on sheet 2 are This,now,Works
+ TEST OK : Test header/footer text
+ TEST START : Test zoom
+ ITEM Assertion OK : PageSetup.Zoom set
+ ITEM Assertion OK : PageSetup.Zoom set/get
+Verify that sheet 1 zoom is 10%
+ TEST OK : Test zoom
+ TEST START : Test orientation
+ ITEM Assertion OK : PageSetup.Zoom set
+ ITEM Assertion OK : PageSetup.Orientation set/get
+Verify that sheet 1 orientation is now landscape
+ TEST OK : Test orientation
+ TEST START : Test order
+ ITEM Assertion OK : PageSetup.Order get
+ ITEM Assertion OK : PageSetup.Order set/get
+Verify that order on sheet 1 is now over, then down.
+ TEST OK : Test order
+ TEST START : Test first page number
+ ITEM Assertion OK : PageSetup.FirstPageNumber get
+ ITEM Assertion OK : PageSetup.FirstPageNumber set/get
+Verify that first page number on sheet 1 is now 2.
+ TEST OK : Test first page number
+ TEST START : Test center vertically
+ ITEM Assertion OK : PageSetup.CenterVertically get
+ ITEM Assertion OK : PageSetup.CenterVertically set/get
+Verify that CenterVertically on sheet 1 is now true.
+ TEST OK : Test center vertically
+ TEST START : Test center horizontally
+ ITEM Assertion OK : PageSetup.CenterHorizontally get
+ ITEM Assertion OK : PageSetup.CenterHorizontally set/get
+Verify that CenterHorizontally on sheet 1 is now true.
+ TEST OK : Test center horizontally
+ TEST START : Test FitToPagesTall
+ ITEM Assertion OK : PageSetup.FitToPagesTall set/get
+ TEST OK : Test FitToPagesTall
+ TEST START : Test FitToPagesWide
+ ITEM Assertion OK : PageSetup.FitToPagesWide set/get
+ TEST OK : Test FitToPagesWide
+ TEST START : Test PrintHeadings
+ ITEM Assertion OK : PageSetup.PrintHeadings set/get
+ ITEM Assertion OK : PageSetup.PrintHeadings set/get
+ TEST OK : Test PrintHeadings
+END PageSetup
+Test run finished : 07/21/2008 02:00:07 PM
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/partition.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/partition.log
new file mode 100644
index 000000000000..7b4f2a01bead
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/partition.log
@@ -0,0 +1,11 @@
+Test run started : 12/10/2007 11:26:43 AM
+BEGIN Partition
+ TEST START : Test Partition function
+ ITEM Assertion OK : the number 20 occurs in the range:20:24
+ ITEM Assertion OK : the number 20 occurs in the range: 20: 20
+ ITEM Assertion OK : the number 120 occurs in the range:100:
+ ITEM Assertion OK : the number -5 occurs in the range: : -1
+ ITEM Assertion OK : the number 2 occurs in the range: 2: 3
+ TEST OK : Test Partition function
+END Partition
+Test run finished : 12/10/2007 11:26:43 AM
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/range-4.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/range-4.log
new file mode 100644
index 000000000000..fb37b6ff201b
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/range-4.log
@@ -0,0 +1,16 @@
+Test run started : 2008/06/19 17:14:57
+----------------------------------------------------------------
+ShowDetail-Issue
+ TEST START : ShowDetail-Issue
+ ITEM Assertion OK : Range.ShowDetail is True
+ ITEM Assertion OK : Range.ShowDetail is False
+END 'ShowDetail-Issue' Symbol
+ TEST OK : ShowDetail-Issue
+----------------------------------------------------------------
+RangeMerged-Issue
+ TEST START : RangeMerged-Issue
+ ITEM Assertion OK : Range.RangeMerged is $F$2:$H$5
+ ITEM Assertion OK : The first address of Range.RangeMerged is $F$2
+END 'RangeMerged-Issue' Symbol
+ TEST OK : RangeMerged-Issue
+Test run finished : 2008/06/19 17:14:57
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/replace.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/replace.log
new file mode 100644
index 000000000000..8f600faaa6b1
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/replace.log
@@ -0,0 +1,14 @@
+Test run started : 09/05/2008 10:21:46 AM
+BEGIN Replace
+ TEST START : Test Replace function
+ ITEM Assertion OK : common string:aefefdBc
+ ITEM Assertion OK : expression string:aefefdef
+ ITEM Assertion OK : binanary compare:aefefdBc
+ ITEM Assertion OK : text compare:aefefdef
+ ITEM Assertion OK : text compare:aefefdef
+ ITEM Assertion OK : start = 3:cefdBc
+ ITEM Assertion OK : count = 2: aefefdBc
+ ITEM Assertion OK : start = 1, count = 0, not support in Unix: abcbcdBc
+ TEST OK : Test Replace function
+END Replace
+Test run finished : 09/05/2008 10:21:47 AM
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/stringplusdouble.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/stringplusdouble.log
new file mode 100644
index 000000000000..6e8b8d994bd1
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/stringplusdouble.log
@@ -0,0 +1,62 @@
+Test run started : 05/29/2008 02:51:22 PM
+BEGIN String Plus Double
+ TEST START : double = string + double
+The next compute raises error: s = null, d = null, r = s + d
+ ITEM Assertion OK : s = null, d = null, r = s + d .The result is: -1
+ ITEM Assertion OK : s = null, d = null, r = s & d .The result is: 0
+The next compute raises error: s = null, d = 20, r = s + d
+ ITEM Assertion OK : s = null, d = 20, r = s + d .The result is: -1
+ ITEM Assertion OK : s = null, d = 20, r = s & d .The result is: 20
+ ITEM Assertion OK : s = '10', d = null, r = s + d .The result is: 10
+ ITEM Assertion OK : s = '10', d = null, r = s & d .The result is: 100
+ ITEM Assertion OK : s = '10', d = 20, r = s + d .The result is: 30
+ ITEM Assertion OK : s = '10', d = 20, r = s & d .The result is: 1020
+The next compute raises error: s = 'abc', d = null, r = s + d
+ ITEM Assertion OK : s = 'abc', d = null, r = s + d .The result is: -1
+The next compute raises error: s = 'abc', d = null, r = s & d
+ ITEM Assertion OK : s = 'abc', d = null, r = s & d .The result is: -1
+The next compute raises error: s = 'abc', d = 20, r = s + d
+ ITEM Assertion OK : s = 'abc', d = 20, r = s + d .The result is: -1
+The next compute raises error: s = 'abc', d = 20, r = s & d
+ ITEM Assertion OK : s = 'abc', d = 20, r = s & d .The result is: -1
+ TEST OK : double = string + double
+ TEST START : string = string + double
+The next compute raises error: s = null, d = null, r = s + d
+ ITEM Assertion OK : s = null, d = null, r = s + d .The result is: -1
+ ITEM Assertion OK : s = null, d = null, r = s & d .The result is: 0
+The next compute raises error: s = null, d = 20, r = s + d
+ ITEM Assertion OK : s = null, d = 20, r = s + d .The result is: -1
+ ITEM Assertion OK : s = null, d = 20, r = s & d .The result is: 20
+ ITEM Assertion OK : s = '10', d = null, r = s + d .The result is: 10
+ ITEM Assertion OK : s = '10', d = null, r = s & d .The result is: 100
+ ITEM Assertion OK : s = '10', d = 20, r = s + d .The result is: 30
+ ITEM Assertion OK : s = '10', d = 20, r = s & d .The result is: 1020
+The next compute raises error: s = 'abc', d = null, r = s + d
+ ITEM Assertion OK : s = 'abc', d = null, r = s + d .The result is: -1
+ ITEM Assertion OK : s = 'abc', d = null, r = s & d .The result is: abc0
+The next compute raises error: s = 'abc', d = 20, r = s + d
+ ITEM Assertion OK : s = 'abc', d = 20, r = s + d .The result is: -1
+ ITEM Assertion OK : s = 'abc', d = 20, r = s & d .The result is: abc20
+ TEST OK : string = string + double
+ TEST START : double = string + string
+The next compute raises error: s = null, d = null, r = s + d
+ ITEM Assertion OK : s = null, d = null, r = s + d .The result is: -1
+The next compute raises error: s = null, d = null, r = s & d
+ ITEM Assertion OK : s = null, d = null, r = s & d .The result is: -1
+ ITEM Assertion OK : s = null, d = 20, r = s + d .The result is: 20
+ ITEM Assertion OK : s = null, d = 20, r = s & d .The result is: 20
+ ITEM Assertion OK : s = '10', d = null, r = s + d .The result is: 10
+ ITEM Assertion OK : s = '10', d = null, r = s & d .The result is: 10
+ ITEM Assertion OK : s = '10', d = 20, r = s + d .The result is: 1020
+ ITEM Assertion OK : s = '10', d = 20, r = s & d .The result is: 1020
+The next compute raises error: s = 'abc', d = null, r = s + d
+ ITEM Assertion OK : s = 'abc', d = null, r = s + d .The result is: -1
+The next compute raises error: s = 'abc', d = null, r = s & d
+ ITEM Assertion OK : s = 'abc', d = null, r = s & d .The result is: -1
+The next compute raises error: s = 'abc', d = 20, r = s + d
+ ITEM Assertion OK : s = 'abc', d = 20, r = s + d .The result is: -1
+The next compute raises error: s = 'abc', d = 20, r = s & d
+ ITEM Assertion OK : s = 'abc', d = 20, r = s & d .The result is: -1
+ TEST OK : double = string + string
+END String Plus Double
+Test run finished : 05/29/2008 02:51:22 PM
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/window2.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/window2.log
new file mode 100644
index 000000000000..8e26d0580621
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/unix/window2.log
@@ -0,0 +1,41 @@
+Test run started : 2008/09/22 11:18:57
+BEGIN Window2
+ TEST START : Test Window.SplitRow
+ ITEM Assertion OK : Test SplitColumn: 2 (Test only applies to maximized Window and at least has 800*600 solotion)
+ ITEM Assertion OK : Test SplitRow: 2 (Test only applies to maximized Window and at least has 800*600 solotion)
+ ITEM Assertion OK : Test SplitVertical: 242.465788476212
+ ITEM Assertion OK : Test SplitHorizontal: 242.465788476212
+ ITEM Assertion OK : Test SplitRow: 4 (Test only applies to maximized Window and at least has 800*600 solotion)
+ ITEM Assertion OK : Test SplitColumn: 3 (Test only applies to maximized Window and at least has 800*600 solotion)
+ ITEM Assertion OK : Test SplitColumn: 0
+ ITEM Assertion OK : Test SplitRow: 0
+ TEST OK : Test Window.SplitRow
+ TEST START : Test Window.DisplayGridlines
+ ITEM Assertion OK : Test gridlines are on
+ ITEM Assertion OK : Test gridlines are off
+ TEST OK : Test Window.DisplayGridlines
+ TEST START : Test Window.DisplayHeadings
+ ITEM Assertion OK : Test Headings are on
+ ITEM Assertion OK : Test Headings are off
+ TEST OK : Test Window.DisplayHeadings
+ TEST START : Test Window.Visibility
+ ITEM Assertion OK : Window is visible
+ ITEM Assertion OK : Window is not visible
+ TEST OK : Test Window.Visibility
+ TEST START : Test Window.FreezePanes
+ ITEM Assertion OK : Test no panes frozen
+ ITEM Assertion OK : Test panes frozen at center
+ ITEM Assertion OK : Test panes frozen at split
+ TEST OK : Test Window.FreezePanes
+ TEST START : Test Window.View
+ TEST OK : Test Window.View
+ TEST START : Test Window.Zoom
+ ITEM Assertion OK : Test zoom=100%
+ ITEM Assertion OK : Test zoom=150%
+ TEST OK : Test Window.Zoom
+ TEST START : Test Windows.Count
+ ITEM Assertion OK : Windows Count: 1
+ ITEM Assertion OK : Application.Windows Count: 1
+ TEST OK : Test Windows.Count
+END Window2
+Test run finished : 2008/09/22 11:18:58
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/AutoFilter.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/AutoFilter.log
new file mode 100644
index 000000000000..b8d0b85a8ff9
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/AutoFilter.log
@@ -0,0 +1,20 @@
+Test run started : 16/10/2007 17:42:01
+----------------------------------------------------------------
+TestAddress
+ TEST START : TestAddress
+ ITEM Assertion OK : test1 'starts with' string criteria
+ ITEM Assertion OK : test2 'not equal to' string criteria
+ ITEM Assertion OK : test3 'ends with' string criteria
+ ITEM Assertion OK : test4 field 'all'
+ ITEM Assertion OK : test5 numeric '<15'
+ ITEM Assertion OK : test6 numeric '>=15'
+ ITEM Assertion OK : test7 numeric '<=12'
+Test Results
+============
+
+Tests passed: 7
+Tests failed: 0
+
+END 'TestAddress
+ TEST OK : TestAddress
+Test run finished : 16/10/2007 17:42:02
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/CalcFont.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/CalcFont.log
new file mode 100644
index 000000000000..e8695523a0a1
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/CalcFont.log
@@ -0,0 +1,17 @@
+Test run started : 15/01/2009 17:00:35
+CalcFont_Format
+ TEST START : Font_Format
+ ITEM Assertion OK : correctly set font to Bold
+ ITEM Assertion OK : correctly set font to Italic
+ ITEM Assertion OK : correctly read FontStyle
+ ITEM Assertion OK : correctly set font to Shadow
+ ITEM Assertion OK : correctly set font color
+ ITEM Assertion OK : correctly set font color index
+ ITEM Assertion OK : correctly set font name
+ ITEM Assertion OK : correctly set font outline
+ ITEM Assertion OK : correctly set font size
+ ITEM Assertion OK : correctly set font strikethrough
+ ITEM Assertion OK : correctly set font underline
+ TEST Success. : Font_Format
+CalcFont_Format
+Test run finished : 15/01/2009 17:00:36
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/MiscOperatorTests.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/MiscOperatorTests.log
new file mode 100644
index 000000000000..3ccec0a1577d
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/MiscOperatorTests.log
@@ -0,0 +1,29 @@
+Test run started : 15/01/2009 17:03:13
+----------------------------------------------------------------
+TestAddress
+ TEST START : TestAddress
+ ITEM Assertion OK : test1: res = Not ( A > B )
+ ITEM Assertion OK : test2: res = Not ( B > A )
+ ITEM Assertion OK : test3: res = Not ( D )
+ ITEM Assertion OK : test4: res = Not A
+ ITEM Assertion OK : test5: res = ( A > D )
+ ITEM Assertion OK : test6: res = ( D > A )
+ ITEM Assertion OK : test7: res = ( A < D )
+ ITEM Assertion OK : test8: res = ( D < A )
+ ITEM Assertion OK : test9: res = ( A >= D )
+ ITEM Assertion OK : test10: res = ( D >= A )
+ ITEM Assertion OK : test11: res = ( A <= D )
+ ITEM Assertion OK : test12: res = ( D <= A )
+ ITEM Assertion OK : test13: res = ( D = A )
+ ITEM Assertion OK : test14: res = ( A = D )
+ ITEM Assertion OK : test15: res = ( D <> A )
+ ITEM Assertion OK : test16: res = ( A <> D )
+Test Results
+============
+
+Tests passed: 16
+Tests failed: 0
+
+END 'TestAddress
+ TEST OK : TestAddress
+Test run finished : 15/01/2009 17:03:15
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/MiscRangeTests.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/MiscRangeTests.log
new file mode 100644
index 000000000000..d190abb5f645
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/MiscRangeTests.log
@@ -0,0 +1,45 @@
+Test run started : 17/07/2007 15:08:56
+----------------------------------------------------------------
+MiscRangeTests
+ TEST START : MiscRangeTests
+ ITEM Assertion OK : test 1
+ ITEM Assertion OK : test 2
+ ITEM Assertion OK : test 3
+ ITEM Assertion OK : test 4
+ ITEM Assertion OK : test 5
+ ITEM Assertion OK : test 6
+ ITEM Assertion OK : test 7
+ ITEM Assertion OK : test 8
+ ITEM Assertion OK : test 9
+ ITEM Assertion OK : test 10
+ ITEM Assertion OK : test 11
+ ITEM Assertion OK : test 12
+ ITEM Assertion OK : test 13
+ ITEM Assertion OK : test 14
+ ITEM Assertion OK : test 15
+ ITEM Assertion OK : test 16
+ ITEM Assertion OK : test 17
+ ITEM Assertion OK : test 18
+ ITEM Assertion OK : test 19
+ ITEM Assertion OK : test 20
+ ITEM Assertion OK : test 21
+ ITEM Assertion OK : test 22
+ ITEM Assertion OK : test 23
+ ITEM Assertion OK : test 24
+ ITEM Assertion OK : test 25
+ ITEM Assertion OK : test 26
+ ITEM Assertion OK : test 27
+ ITEM Assertion OK : test 28
+ ITEM Assertion OK : test 29
+ ITEM Assertion OK : test 30
+ ITEM Assertion OK : test 31
+No. tests: 31
+Summary
+=======
+Run: 31
+Passed: 31
+Failed: 0
+
+END 'MiscRangeTests
+ TEST OK : MiscRangeTests
+Test run finished : 17/07/2007 15:08:59
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/PageBreaks.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/PageBreaks.log
new file mode 100644
index 000000000000..30b6e45d1681
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/PageBreaks.log
@@ -0,0 +1,10 @@
+Test run started : 08/10/2008 12:02:12
+----------------------------------------------------------------
+ TEST START : PageBreaks-Issue
+ ITEM Assertion OK : HPageBreaks.Count is 3
+ ITEM Assertion OK : HPageBreak.Type is -4135
+ ITEM Assertion OK : HPageBreak.Location: Range.Row is 5
+ ITEM Assertion OK : HPageBreak.Delete: HPageBreaks.Count is 2
+END 'PageBreaks-Issue' Symbol
+ TEST OK : PageBreaks-Issue
+Test run finished : 08/10/2008 12:02:12
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/Ranges-2.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/Ranges-2.log
new file mode 100644
index 000000000000..b80d996e3d3f
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/Ranges-2.log
@@ -0,0 +1,68 @@
+Test run started : 10/07/2007 01:55:47
+----------------------------------------------------------------
+ClearFormtsIssue
+ TEST START : ClearFormtsIssue
+ ITEM Assertion OK : Range.Font.Bold is: True
+ ITEM Assertion OK : Range.Font.Bold is: False
+END 'ClearFormtsIssue' Symbol
+ TEST OK : ClearFormtsIssue
+----------------------------------------------------------------
+VerticalAlignment-Issue
+ TEST START : VerticalAlignment-Issue
+ ITEM Assertion OK : - Range.VerticalAlignment (get)
+ ITEM Assertion OK : - Range.VerticalAlignment (set)
+ ITEM Assertion OK : - Range.VerticalAlignment (get)
+ ITEM Assertion OK : - Range.VerticalAlignment (get)
+ ITEM Assertion OK : - Range.VerticalAlignment (set)
+ ITEM Assertion OK : - Range.VerticalAlignment (get)
+ ITEM Assertion OK : - Range.VerticalAlignment (set)
+ ITEM Assertion OK : Range.VeritcalAlignment is Null
+END 'VerticalAlignment-Issue' Symbol
+ TEST OK : VerticalAlignment-Issue
+----------------------------------------------------------------
+HorizontalAlignment-Issue
+ TEST START : HorizontalAlignment-Issue
+ ITEM Assertion OK : - Range.HorizontalAlignment (get)
+ ITEM Assertion OK : - Range.HorizontalAlignment (set)
+ ITEM Assertion OK : - Range.HorizontalAlignment (get)
+ ITEM Assertion OK : - Range.HorizontalAlignment (set)
+ ITEM Assertion OK : - Range.HorizontalAlignment (get)
+ ITEM Assertion OK : - Range.HorizontalAlignment (set)
+ ITEM Assertion OK : - Range.HorizontalAlignment (get)
+ ITEM Assertion OK : - Range.HorizontalAlignment (set)
+ ITEM Assertion OK : Range.HorizontalAlignment is Null
+END 'HorizontalAlignment-Issue' Symbol
+ TEST OK : HorizontalAlignment-Issue
+----------------------------------------------------------------
+WrapText-Issue
+ TEST START : WrapText-Issue
+ ITEM Assertion OK : - Range.WrapText (get)
+ ITEM Assertion OK : - Range.WrapText (get)
+ ITEM Assertion OK : Range.WrapText is Null
+END 'WrapText-Issue' Symbol
+ TEST OK : WrapText-Issue
+----------------------------------------------------------------
+FontBorderIssues
+ TEST START : FontBorderIssues
+ ITEM Assertion OK : - = Borders.Color (getColor)
+ ITEM Assertion OK : - = Font.Color (getColor)
+END 'FontBorderIssues' Symbol
+ TEST OK : FontBorderIssues
+----------------------------------------------------------------
+RangeSizeIssues
+ TEST START : RangeSizeIssues
+ ITEM Assertion OK : Range.Left is: 100.5291
+ ITEM Assertion OK : Range.Top is: 95.39775
+ ITEM Assertion OK : Range.Width is: 191.25
+ ITEM Assertion OK : Range.Height is: 271.5
+END 'RangeSizeIssues' Symbol
+ TEST OK : RangeSizeIssues
+----------------------------------------------------------------
+ApplicationIssues
+ TEST START : ApplicationIssues
+ ITEM Assertion OK : Range.Address is: $E$8:$G$13,$G$13:$K$19
+ ITEM Assertion OK : Range.Address is: $E$8:$G$13,$G$13:$K$19
+ ITEM Assertion OK : Application.ActiveSheet.Name: Sheet1
+END 'ApplicationIssues' Symbol
+ TEST OK : ApplicationIssues
+Test run finished : 10/07/2007 01:55:48
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/Ranges-3.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/Ranges-3.log
new file mode 100644
index 000000000000..365d126a7e2d
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/Ranges-3.log
@@ -0,0 +1,8 @@
+Test run started : 10/07/2007 01:55:51
+----------------------------------------------------------------
+MyGoalseek-Issue
+ TEST START : MyGoalseek-Issue
+ ITEM Assertion OK : Variable Range value: 15
+END 'MyGoalseek-Issue' Symbol
+ TEST OK : MyGoalseek-Issue
+Test run finished : 10/07/2007 01:55:51
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/Ranges.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/Ranges.log
new file mode 100644
index 000000000000..6491fe4173ec
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/Ranges.log
@@ -0,0 +1,280 @@
+Test run started : 08/10/2008 11:30:21
+----------------------------------------------------------------
+ApplicationMethods
+ TEST START : ApplicationMethods
+ ITEM Assertion OK : Name of Workbook is: Ranges.xls
+ ITEM Assertion OK : Address of Application.Columns is: $A:$A
+ ITEM Assertion OK : Address of Application.Rows is: $1:$1
+ ITEM Assertion OK : Address of Application.Range is: $1:$1,$5:$7
+ ITEM Assertion OK : Please check manually: DefaultFilePath is: C:\Documents and Settings\vituosity\My Documents
+ ITEM Assertion OK : Please check manually: Library Path is: C:\Documents and Settings\vituosity\Application Data\OpenOffice.org\3\user\basic
+ ITEM Assertion OK : Please check manually: Template Path is: C:\Documents and Settings\vituosity\Application Data\OpenOffice.org\3\user\template
+ ITEM Assertion OK : FileSeparator is \
+ ITEM Assertion OK : Name of ActiveWorkbook is: Ranges.xls
+END 'ApplicationMethods' Symbol
+ TEST OK : ApplicationMethods
+----------------------------------------------------------------
+Insert-Issue
+ TEST START : Insert-Issue
+ ITEM Assertion OK : Insert with xlShiftToRight: 10
+END 'Insert-Issue' Symbol
+ TEST OK : Insert-Issue
+----------------------------------------------------------------
+MergeCells-Issue
+ TEST START : MergeCells-Issue
+ ITEM Assertion OK : Range.MergeCells is True
+ ITEM Assertion FAIL : MergeCells is null: False
+ ITEM Assertion OK : RowCount after Merge: 13
+ ITEM Assertion OK : Range.MergeCells is False
+ ITEM Assertion OK : MergeCells is null: False
+ ITEM Assertion FAIL : MergeCells of Second Area is null : False
+ ITEM Assertion FAIL : MergeCells of Ranges is Null: False
+ ITEM Assertion OK : RowCount after Merge: 7
+ ITEM Assertion OK : Range.MergeCells is False
+ ITEM Assertion OK : MergeCells is null: False
+ ITEM Assertion OK : RowCount after Merge: 7
+END 'MergeCells-Issue' Symbol
+ TEST OK : MergeCells-Issue
+----------------------------------------------------------------
+Areas-Issue
+ TEST START : Areas-Issue
+ ITEM Assertion OK : Range Areas Count is2
+ ITEM Assertion OK : First Range Address is: $E$8:$G$13
+ ITEM Assertion OK : First Row is: 8
+ ITEM Assertion OK : First Column is: 5
+ ITEM Assertion OK : EntireRow Address is: $8:$13,$13:$19
+ ITEM Assertion OK : EntireColumn Address is: $E:$G,$G:$K
+ ITEM Assertion OK : Range Count:53
+END 'Areas-Issue' Symbol
+ TEST OK : Areas-Issue
+----------------------------------------------------------------
+Fill-Methods-Issue
+ TEST START : Fill-Methods-Issue
+ ITEM Assertion OK : Range Value after FillDown: MyFillValue
+ ITEM Assertion OK : Range Value after FillDown: MyFillValue
+ ITEM Assertion OK : Range Value after FillDown: MyRightFillValue
+ ITEM Assertion OK : Range Value after FillDown: MyBottomFillValue
+END 'Fill-Methods-Issue' Symbol
+ TEST OK : Fill-Methods-Issue
+----------------------------------------------------------------
+Range/Item-Method-Issue
+ TEST START : Range/Item-Method-Issue
+ ITEM Assertion OK : Range of multiple columns is: $A:$A,$C:$C
+ ITEM Assertion OK : Range of multiple rows is: $1:$1,$5:$7
+ ITEM Assertion OK : Range of several columns is: $C:$E,$D:$D
+ ITEM Assertion OK : Range of several rows is: $5:$8,$6:$10
+ ITEM Assertion OK : Range of several single cells is: $C$5,$E$8
+ ITEM Assertion OK : Range of several named ranges is: $L$1:$M$6,$E$8:$G$13,$G$13:$K$19
+ ITEM Assertion OK : Range of a single Item Cell is: $E$21
+ ITEM Assertion OK : Range of a single Item Cell is: $F$21
+ ITEM Assertion OK : Range of a single Item Cell is: $F$10
+END 'Range/Item-Method-Issue' Symbol
+ TEST OK : Range/Item-Method-Issue
+----------------------------------------------------------------
+R1C1-Formulas-Issue
+ TEST START : R1C1-Formulas-Issue
+ ITEM Assertion OK : R1C1 Range.Formula is: =IF(OR(R[-2]C[1]=0,RC[2]="YES"),"")
+ ITEM Assertion OK : Range.Formula is: =IF(OR(J8=0,K10="YES"),"")
+END 'R1C1-Formulas-Issue' Symbol
+ TEST OK : R1C1-Formulas-Issue
+----------------------------------------------------------------
+Verify_Delete
+ TEST START : Verify_Delete
+ ITEM Assertion OK : Ranges are intersecting: $G$13
+ ITEM Assertion OK : Delete with Default: $AJ$4
+ ITEM Assertion OK : Delete with ShifttoLeft: $AJ$4
+ ITEM Assertion OK : Delete with ShiftUp: $M$22
+END 'Verify_Delete' Symbol
+ TEST OK : Verify_Delete
+----------------------------------------------------------------
+Value-Issue
+ TEST START : Value-Issue
+ ITEM Assertion OK : Value of Range is: 12.3
+ ITEM Assertion OK : Text of Range is: 12.3
+ ITEM Assertion OK : Range has Formula: False
+ ITEM Assertion OK : Cell has Formula: False
+ ITEM Assertion FAIL : Text of Range is null: False
+ ITEM Assertion OK : Range has Formula: True
+ ITEM Assertion OK : Cell has Formula: True
+ ITEM Assertion OK : Value of Cell is: 12
+ ITEM Assertion OK : Application.Calculation is : -4135
+ ITEM Assertion OK : Calculation is automated: True
+ ITEM Assertion OK : Range has Formula: True
+ ITEM Assertion OK : Value of Cell is: 16
+ ITEM Assertion OK : Text of Cell is: 16
+ ITEM Assertion OK : Text of Cell is: 16
+ ITEM Assertion OK : Range has Formula after 'ClearContents: False
+ ITEM Assertion OK : Text of Cell is:
+ ITEM Assertion OK : Text of Cell is:
+END 'Value-Issue' Symbol
+ TEST OK : Value-Issue
+----------------------------------------------------------------
+AutoFit issue
+ TEST START : AutoFit issue
+ ITEM Assertion OK : Columns.AutoFit: CurrentWidth is 680
+ ITEM Assertion OK : Rows.AutoFit: CurrentHeight is 582
+END 'AutoFit issue' Symbol
+ TEST OK : AutoFit issue
+----------------------------------------------------------------
+Selections
+ TEST START : Selections
+ ITEM Assertion OK : ActiveCell is : $E$8
+ ITEM Assertion OK : Active Cell is : $E$8
+ ITEM Assertion OK : Number of Cells in Range: 52
+ ITEM Assertion OK : Number of Cells in Range: 52
+ ITEM Assertion OK : Number of Cells in Range: 52
+END 'Selections' Symbol
+ TEST OK : Selections
+----------------------------------------------------------------
+Offset-Resize
+ TEST START : Offset-Resize
+ ITEM Assertion OK : Offset is : $G$10:$I$15,$I$15:$M$21
+ ITEM Assertion OK : Offset is : $G$7:$I$12,$I$12:$M$18
+ ITEM Assertion OK : Resized Range is : $A$20:$D$23
+END 'Offset-Resize' Symbol
+ TEST OK : Offset-Resize
+----------------------------------------------------------------
+Ranges-Address
+ TEST START : Ranges-Address
+ ITEM Assertion OK : Range Address is: $E$8:$G$13,$G$13:$K$19
+ ITEM Assertion OK : Range Address is: $E8:$G13,$G13:$K19
+ ITEM Assertion OK : Range Address is: E$8:G$13,G$13:K$19
+ ITEM Assertion OK : Range Address is: R8C5:R13C7,R13C7:R19C11
+ ITEM Assertion FAIL : Range Address is: R8C5:R13C7,R13C7:R19C11
+ ITEM Assertion OK : Range Address is: R8C5:R13C7,R13C7:R19C11
+ ITEM Assertion OK : Range Address is: R[6]C[3]:R[11]C[5],R[11]C[5]:R[17]C[9]
+ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$8:$G$13,$G$13:$K$19
+END 'Ranges-Address' Symbol
+ TEST OK : Ranges-Address
+----------------------------------------------------------------
+Range-Address
+ TEST START : Range-Address
+ ITEM Assertion OK : Range Address is: $E$8:$G$13
+ ITEM Assertion OK : Range Address is: $E8:$G13
+ ITEM Assertion OK : Range Address is: E$8:G$13
+ ITEM Assertion OK : Range Address is: R8C5:R13C7
+ ITEM Assertion FAIL : Range Address is: R8C5:R13C7
+ ITEM Assertion OK : Range Address is: R8C5:R13C7
+ ITEM Assertion OK : Range Address is: R[6]C[3]:R[11]C[5]
+ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$8:$G$13
+END 'Range-Address' Symbol
+ TEST OK : Range-Address
+----------------------------------------------------------------
+Column-Address
+ TEST START : Column-Address
+ ITEM Assertion OK : Range Address is: $F$8:$F$13
+ ITEM Assertion OK : Range Address is: $F8:$F13
+ ITEM Assertion OK : Range Address is: F$8:F$13
+ ITEM Assertion OK : Range Address is: R8C6:R13C6
+ ITEM Assertion FAIL : Range Address is: R8C6:R13C6
+ ITEM Assertion OK : Range Address is: R8C6:R13C6
+ ITEM Assertion OK : Range Address is: R[6]C[4]:R[11]C[4]
+ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$F$8:$F$13
+END 'Column-Address' Symbol
+ TEST OK : Column-Address
+----------------------------------------------------------------
+Row-Address
+ TEST START : Row-Address
+ ITEM Assertion OK : Range Address is: $E$9:$G$9
+ ITEM Assertion OK : Range Address is: $E9:$G9
+ ITEM Assertion OK : Range Address is: E$9:G$9
+ ITEM Assertion OK : Range Address is: R9C5:R9C7
+ ITEM Assertion FAIL : Range Address is: R9C5:R9C7
+ ITEM Assertion OK : Range Address is: R9C5:R9C7
+ ITEM Assertion OK : Range Address is: R[7]C[3]:R[7]C[5]
+ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$E$9:$G$9
+END 'Row-Address' Symbol
+ TEST OK : Row-Address
+----------------------------------------------------------------
+SingleCell-Address
+ TEST START : SingleCell-Address
+ ITEM Assertion OK : Range Address is: $F$9
+ ITEM Assertion OK : Range Address is: $F9
+ ITEM Assertion OK : Range Address is: F$9
+ ITEM Assertion OK : Range Address is: R9C6
+ ITEM Assertion FAIL : Range Address is: R9C6
+ ITEM Assertion OK : Range Address is: R9C6
+ ITEM Assertion OK : Range Address is: R[7]C[4]
+ ITEM Assertion OK : RangeAddress is [Ranges.xls]Sheet1!$F$9
+END 'SingleCell-Address' Symbol
+ TEST OK : SingleCell-Address
+----------------------------------------------------------------
+Heights and Widths
+ TEST START : Heights and Widths
+ ITEM Assertion OK : Range RowHeight is 40
+ ITEM Assertion OK : Range ColumnWidth is 50
+ ITEM Assertion OK : Range Height is 240
+ ITEM Assertion FAIL : Range Width is 675
+ ITEM Assertion OK : Range RowHeight is 50
+ ITEM Assertion OK : Range ColumnWidth is 50
+ ITEM Assertion OK : Range Height is 300
+ ITEM Assertion FAIL : Range Width is 675
+ ITEM Assertion OK : RowHeight is null: True
+ ITEM Assertion OK : ColumnWidth is null: True
+END 'Heights and Widths' Symbol
+ TEST OK : Heights and Widths
+----------------------------------------------------------------
+RangeRowColumn-Issue
+ TEST START : RangeRowColumn-Issue
+ ITEM Assertion OK : Row is: 8
+ ITEM Assertion OK : Column is: 5
+ ITEM Assertion OK : EntireRow.Columns.Count = 1024
+ ITEM Assertion OK : EntireColumn.Rows.Count = 131072
+END 'RangeRowColumn-Issue' Symbol
+ TEST OK : RangeRowColumn-Issue
+----------------------------------------------------------------
+Replace-Issue
+ TEST START : Replace-Issue
+ ITEM Assertion OK : Value after Replace: YourValue
+ ITEM Assertion OK : Value after Replace: YourValue
+ ITEM Assertion OK : Value after Replace: ReplaceValue
+ ITEM Assertion OK : Value after Replace: New ReplaceValue
+ ITEM Assertion OK : Value after Replace: New ReplaceValue
+ ITEM Assertion OK : Value after Replace: New Replace
+ ITEM Assertion OK : Value after Replace:
+END 'Replace-Issue' Symbol
+ TEST OK : Replace-Issue
+----------------------------------------------------------------
+Hidden-Issue
+ TEST START : Hidden-Issue
+ ITEM Assertion OK : - Range.Rows.Hidden (set)
+ ITEM Assertion OK : - Range.Rows.Hidden (get)
+ ITEM Assertion OK : - Range.Rows.Item(1).Hidden (set)
+ ITEM Assertion OK : - Range.Rows.Item(1).Hidden (get)
+ ITEM Assertion OK : - Range.Columns.Hidden (set)
+ ITEM Assertion OK : - Range.Columns.Hidden (get)
+ ITEM Assertion OK : - Range.Columns.Item(1).Hidden (set)
+ ITEM Assertion OK : - Range.Columns.Item(1).Hidden (get)
+END 'Hidden-Issue' Symbol
+ TEST OK : Hidden-Issue
+----------------------------------------------------------------
+End issue
+ TEST START : End issue
+ ITEM Assertion OK : - = $E$48
+ ITEM Assertion OK : - = $E$1
+ ITEM Assertion OK : - = $E$3
+ ITEM Assertion OK : - = $A$8
+ ITEM Assertion OK : - = $B$8
+ ITEM Assertion OK : - = $AMJ$8
+ ITEM Assertion OK : - = $Z$8
+END 'End issue' Symbol
+ TEST OK : End issue
+----------------------------------------------------------------
+Outline issue
+ TEST START : Outline issue
+ ITEM Assertion OK : - Range.clearOutline - please check visually
+ ITEM Assertion OK : - Range.AutoOutline - please check visually
+ ITEM Assertion OK : - Range.AutoOutline - please check visually
+END 'Outline issue' Symbol
+ TEST OK : Outline issue
+----------------------------------------------------------------
+Validation
+ TEST START : Validation
+ ITEM Assertion OK : Validation Input Message is : Attention!
+ ITEM Assertion OK : Validation Input Message is : Enter an integer from five to ten
+ ITEM Assertion OK : Validation Error Title is : You must enter a number from five to ten
+ ITEM Assertion OK : Validation Error Message is : An Error occured
+ ITEM Assertion OK : Validation Error Title is : Microsoft Excel
+END 'Validation' Symbol
+ TEST OK : Validation
+Test run finished : 08/10/2008 11:30:24
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/Shapes.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/Shapes.log
new file mode 100644
index 000000000000..fe62ab03d3f2
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/Shapes.log
@@ -0,0 +1,77 @@
+Test run started : 16/10/2007 17:46:03
+BEGIN Shapes_Collection_Behaviour
+ TEST START : Shapes_Collection_Behaviour
+ ITEM Assertion OK : Name of indexed shape should be 'Sheet2Shape1'
+ ITEM Assertion OK : Name of indexed shape should be 'Sheet2Shape2'
+ TEST Success. : Shapes_Collection_Behaviour
+END Shapes_Collection_Behaviour
+BEGIN Shapes_Select_Item
+ TEST START : Shapes_Select_Item
+ ITEM Assertion OK : Correctly selected shape through Range
+ ITEM Assertion OK : Correctly selected shape through Item
+ ITEM Assertion OK : Needs to be visually checked. Is there a line on the document?
+ ITEM Assertion OK : Needs to be visually checked. Are All Shapes Selected?
+ TEST Success. : Shapes_Select_Item
+END Shapes_Select_Item
+BEGIN Shapes_Fill
+ TEST START : Shapes_Fill
+ ITEM Assertion OK : correctly set visibility of shape fill
+ ITEM Assertion OK : correctly set transparency of shape line
+ ITEM Assertion OK : correctly set forecolor of shape fill
+ ITEM Assertion FAIL : correctly set backcolor of shape fill
+ ITEM Assertion OK : the success of the TwoColorGradient method needs to be verified visually!
+ ITEM Assertion OK : correctly set forecolor of shape fill
+ ITEM Assertion FAIL : correctly set forecolor of shape fill
+ TEST Success. : Shapes_Fill
+END Shapes_Fill
+BEGIN Shapes_Line
+ TEST START : Shapes_Line
+ ITEM Assertion FAIL : correctly set weight of shape line
+ ITEM Assertion OK : correctly set visibility of shape line
+ ITEM Assertion OK : correctly set transparency of shape line
+ ITEM Assertion OK : correctly set dash style of shape line
+ ITEM Assertion OK : correctly set dash style of shape line
+ ITEM Assertion OK : correctly set forecolor of shape line
+ ITEM Assertion FAIL : correctly set backcolor of shape line
+ TEST Success. : Shapes_Line
+END Shapes_Line
+BEGIN Shapes_TextFrame
+ TEST START : Shapes_TextFrame
+ ITEM Assertion OK : correctly set Autosize of Shape TextFrame
+ TEST Success. : Shapes_TextFrame
+END Shapes_TextFrame
+BEGIN Shapes_SimpleGeometry
+ TEST START : Shapes_SimpleGeometery
+ ITEM Assertion OK : shape height should be 49.4519655148368 and got 49.4078709034412
+ ITEM Assertion OK : shape width should be 101.467710269751 and got 101.423615658355
+ ITEM Assertion OK : shape left should be 68.5574761223637 and got 68.5417279658754
+ ITEM Assertion OK : shape top should be 44.1511784471699 and got 44.1354302906816
+ ITEM Assertion OK : shape rotation should be 0 and got 0
+ ITEM Assertion OK : shape rotation should be 25 and got 25
+ ITEM Assertion OK : shape incrementrotation should be 50 and got 50
+ ITEM Assertion OK : shape incrementleft should be 69.7480272284707 and got 69.7322790719824
+ ITEM Assertion OK : shape incrementtop should be 93.8141674447769 and got 93.7984192882885
+ TEST Success. : Shapes_SimpleGeometery
+END Shapes_SimpleGeometry
+BEGIN Shapes_Range
+ TEST START : Shapes_Range
+ ITEM Assertion OK : expected Sheets(2).Shapes.Range(1) to contain 1 element, it contains 1
+ ITEM Assertion OK : expected Sheets(2).Shapes.Range(1) to return Sheet2Shape1 got Sheet2Shape1
+ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Sheet2Shape3) to contain 1 element, it contains 1
+ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Sheet2Shape3) to return Sheet2Shape3 got Sheet2Shape3
+ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array(3, 1) to contain 2 elements, it contains 2
+ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array(3, 1) to return concated element/shape names Sheet2Shape3Sheet2Shape1 and got Sheet2Shape3Sheet2Shape1
+ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array('Sheet2Shape3', 1, 'Sheet2Shape2')) to contain 3 elements, it contains 3
+ ITEM Assertion OK : expected Sheets(2).Shapes.Range(Array('Sheet2Shape3', 1, 'Sheet2Shape2')) to return concated element/shape names Sheet2Shape3Sheet2Shape1Sheet2Shape2 and got Sheet2Shape3Sheet2Shape1Sheet2Shape2
+ TEST Success. : Shapes_Range
+END Shapes_Range
+BEGIN Shapes_ShapeRange
+ TEST START : Shapes_ShapeRange
+ ITEM Assertion OK : ShapeRange.IncrementLeft shp1.left should be 89.7322790719824 and got 89.7165297816359
+ ITEM Assertion OK : ShapeRange.IncrementLeft shp2.left should be 240.02518299054 and got 240.009433700193
+ ITEM Assertion OK : ShapeRange.IncrementTop shp1.Top should be 113.798419288289 and got 113.782669997942
+ ITEM Assertion OK : ShapeRange.IncrementTop shp2.Top should be 67.4519655148368 and got 67.4362162244903
+ ITEM Assertion OK : ShapeRange.IncrementRotation shp1.Rotation should be 70 and got 70
+ ITEM Assertion OK : ShapeRange.IncrementRotation shp2.Rotation should be 20 and got 20
+END Shapes_ShapeRange
+Test run finished : 16/10/2007 17:46:04
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/StrConv-test.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/StrConv-test.log
new file mode 100644
index 000000000000..b1f7794234f9
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/StrConv-test.log
@@ -0,0 +1,9 @@
+Test run started : 08/10/2008 12:04:16
+BEGIN StrConv
+ TEST START : Test StrConv function
+ ITEM Assertion OK : Converts the string to uppercase characters:ABC EFG HIJ
+ ITEM Assertion OK : Converts the string to lowercase characters:abc efg hij
+ ITEM Assertion OK : Converts the first letter of every word in string to uppercase:Abc Efg Hij
+ TEST OK : Test StrConv function
+END StrConv
+Test run finished : 08/10/2008 12:04:16
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/Template.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/Template.log
new file mode 100644
index 000000000000..774994adb02c
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/Template.log
@@ -0,0 +1,14 @@
+Test run started : 08/10/2008 12:05:52
+----------------------------------------------------------------
+TestCaseName
+ TEST START : TestCaseName
+ ITEM Assertion OK : Something has been done.
+Test Results
+============
+
+Tests passed: 1
+Tests failed: 0
+
+END 'TestCaseName
+ TEST OK : TestCaseName
+Test run finished : 08/10/2008 12:05:52
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/TestAddress.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/TestAddress.log
new file mode 100644
index 000000000000..0007e6f9c958
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/TestAddress.log
@@ -0,0 +1,67 @@
+Test run started : 08/10/2008 11:30:32
+----------------------------------------------------------------
+TestAddress
+ TEST START : TestAddress
+ ITEM Assertion OK : test1 Range('e3:f3') A1 style addressing
+ ITEM Assertion OK : test2 Range('e3:f3') R1C1 style addressing
+ ITEM Assertion OK : test3 Range ('e:f') A1 style addressing
+ ITEM Assertion OK : test4 Range ('e:f') R1C1 style addressing
+ ITEM Assertion OK : test5 Columns A1 style addressing
+ ITEM Assertion OK : test6 Columns R1C1 style addressing
+ ITEM Assertion OK : test7 Columns(3) A1 style addressing
+ ITEM Assertion OK : test8 Columns(3) R1C1 style addressing
+ ITEM Assertion OK : test9 Columns('e') A1 style addressing
+ ITEM Assertion OK : test10 Columns('e') R1C1 style addressing
+ ITEM Assertion OK : test11 Columns('b:d') A1 style addressing
+ ITEM Assertion OK : test12 Columns('b:d') R1C1 style addressing
+ ITEM Assertion OK : test13 Range('c1:g10').Columns A1 style addressing
+ ITEM Assertion OK : test14 Range('c1:g10').Columns R1C1 style addressing
+ ITEM Assertion OK : test15 Range('c1:g10').Columns(1) A1 style addressing
+ ITEM Assertion OK : test16 Range('c1:g10').Columns(1) R1C1 style addressing
+ ITEM Assertion OK : test17 Range('c1:g10').Columns('a') A1 style addressing
+ ITEM Assertion OK : test18 Range('c1:g10').Columns('a') R1C1 style addressing
+ ITEM Assertion OK : test19 Range('c1:g10').Columns('c') A1 style addressing
+ ITEM Assertion OK : test20 Range('c1:g10').Columns('c') R1C1 style addressing
+ ITEM Assertion OK : test21 Range('c1:g10').Columns('x:z') A1 style addressing
+ ITEM Assertion OK : test22 Range('c1:g10').Columns('x:z') R1C1 style addressing
+ ITEM Assertion OK : test23 Range('c1:g10').Columns(30) A1 style addressing
+ ITEM Assertion OK : test24 Range('c1:g10').Columns(30) R1C1 style addressing
+ ITEM Assertion OK : test25 Worksheets('Sheet2').Cells(1, 1) A1 style addressing
+ ITEM Assertion OK : test26 Worksheets('Sheet2').Cells(1, 1) A1 style addressing, RowAddressAbsolute is false
+ ITEM Assertion OK : test27 Worksheets('Sheet2').Cells(1, 1) A1 style addressing, ColAddressAbsolute is false
+ ITEM Assertion OK : test28 Worksheets('Sheet2').Cells(1, 1) R1C1 style addressing
+ ITEM Assertion OK : test29 Worksheets('Sheet2').Range('A1:E5').EntireColumn A1 style addressing
+ ITEM Assertion OK : test30 Worksheets('Sheet2').Range('A1').EntireColumn A1 style addressing
+ ITEM Assertion OK : test31 Worksheets('Sheet2').Range('A1:E5').EntireRow A1 style addressing
+ ITEM Assertion OK : test32 Worksheets('Sheet2').Range('A1') A1 style addressing
+ ITEM Assertion OK : test33 Worksheets('Sheet2').Range('IV65536').EntireRow A1 style addressing
+ ITEM Assertion OK : test34 Worksheets('Sheet2').Range('IU2:IV65536') A1 style addressing
+ ITEM Assertion OK : test35 Range('c1:g10').Columns('x:z') R1C1 style addressing
+ ITEM Assertion OK : test36 Worksheets('Sheet2').Range('A1') A1 style addressing
+ ITEM Assertion OK : test37 Worksheets('Sheet2').Range('A1:E5').EntireColumn A1 style addressing
+ ITEM Assertion OK : test38 Worksheets('Sheet2').Range('10:12') A1 style addressing
+ ITEM Assertion OK : test39 Worksheets('Sheet2').Range('10:12') R1C1 style addressing
+ ITEM Assertion OK : test40 Range('Sheet3!A1:B4') A1 style addressing
+ ITEM Assertion OK : test41 Range('Sheet3!A1,B1,D4:F20') A1 style addressing
+ ITEM Assertion OK : test42 Range('g20:h40').Columns('c:c')
+ ITEM Assertion OK : test43 Range('g20:h40').Columns('c:f')
+ ITEM Assertion OK : test44 Range('g20:h40').Columns(-1)
+ ITEM Assertion OK : test45 Range('c4:g10').Rows(-1)
+ ITEM Assertion OK : test46 Range('a2:b4').Rows('1:1')
+ ITEM Assertion OK : test47 Range('a2:b4').Rows('1:2')
+ ITEM Assertion OK : test48 Range('a2:b4').Rows('2:2')
+ ITEM Assertion OK : test49 Range('a2:b4').Rows('2:3')
+ ITEM Assertion OK : test50 Range(' A2:B4 ')
+ ITEM Assertion OK : test51 Range('A 2:B 4')
+ ITEM Assertion OK : test52 Range('A2 : B4 ')
+ ITEM Assertion OK : test53 Range('Sheet1 !A2 : B4 ')
+ ITEM Assertion OK : test54 Range('Sheet1! A2 : B4 ')
+Test Results
+============
+
+Tests passed: 54
+Tests failed: 0
+
+END 'TestAddress
+ TEST OK : TestAddress
+Test run finished : 08/10/2008 11:30:32
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/TestCalc_Rangetest.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/TestCalc_Rangetest.log
new file mode 100644
index 000000000000..492c24bc023c
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/TestCalc_Rangetest.log
@@ -0,0 +1,60 @@
+Test run started : 10/07/2007 01:56:07
+BEGIN TestCalc
+ TEST START : RangeTest2
+ ITEM Assertion OK : - Range("D15").Row
+ ITEM Assertion OK : - WorkSheet("D15").Range.Row
+ ITEM Assertion OK : - Range("D15").Column
+ ITEM Assertion OK : - Worksheet.Range("D15").Column
+ ITEM Assertion OK : - Range("D1").EntireRow.Valuer
+ ITEM Assertion OK : - Range("D1").EntireRow.Valuer
+ ITEM Assertion OK : - Range("D1").EntireRow.Columns.Count
+ ITEM Assertion OK : - Range("D1").EntireColumn.Rows.Count
+ ITEM Assertion OK : - Range("D15").ClearContent
+ ITEM Assertion OK : - Range("M1:N2").Rows.Hidden (set)
+ ITEM Assertion OK : - Range("M1:N2").Rows.Hidden (get)
+ ITEM Assertion OK : - Range("M1:N2").Rows(1).Hidden (set)
+ ITEM Assertion OK : - Range("M1:N2").Rows(1).Hidden (get)
+ ITEM Assertion OK : - Range("M1:N2").Columns.Hidden (set)
+ ITEM Assertion OK : - Range("M1:N2").Columns.Hidden (get)
+ ITEM Assertion OK : - Range("M1:N2").Columns(1).Hidden (set)
+ ITEM Assertion OK : - Range("M1:N2").Columns(1).Hidden (get)
+ ITEM Assertion OK : - Range("B38").Orientation (get)
+ ITEM Assertion OK : - Range("B38").Orientation (set)
+ ITEM Assertion OK : - Range("B38").Orientation (set = xlDownward)
+ ITEM Assertion OK : - Range("B38").Orientation (set)
+ ITEM Assertion OK : - Range("B38").Orientation (set = xlUpward)
+ ITEM Assertion OK : - Range("B38").Orientation (set)
+ ITEM Assertion OK : - Range("B38").Orientation (set = xlVertical)
+ ITEM Assertion OK : - Range("B38").Orientation (set)
+ ITEM Assertion OK : - Range("B38").Orientation (set = xlVertical)
+ ITEM Assertion OK : - Range("B39").WrapText (get)
+ ITEM Assertion OK : - Range("B39").WrapText (set)
+ ITEM Assertion OK : - Range("B39").WrapText (set)
+ ITEM Assertion OK : - Range("E39").MergeCells (get)
+ ITEM Assertion OK : - Range("F39").MergeCells (get)
+ ITEM Assertion OK : - Range("E39").MergeCells (set)
+ ITEM Assertion FAIL : - Range("F39").MergeCells (set)
+ ITEM Assertion OK : - Range("E39").MergeCells (set)
+ ITEM Assertion OK : - Range("F39").MergeCells (set)
+ ITEM Assertion OK : - Range("C41:C42").Replace MatchCase:=True
+ ITEM Assertion OK : - Range("C41:C42").Replace MatchCase:=True
+ ITEM Assertion OK : - Range("D41:D42").Replace MatchCase:=False
+ ITEM Assertion OK : - Range("B39").VerticalAlignment (get)
+ ITEM Assertion OK : - Range("B39").VerticalAlignment (set)
+ ITEM Assertion OK : - Range("B39").VerticalAlignment (get)
+ ITEM Assertion OK : - Range("B39").VerticalAlignment (get)
+ ITEM Assertion OK : - Range("B39").VerticalAlignment (set)
+ ITEM Assertion OK : - Range("B39").VerticalAlignment (get)
+ ITEM Assertion OK : - Range("B39").VerticalAlignment (set)
+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (get)
+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (set)
+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (get)
+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (set)
+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (get)
+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (set)
+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (get)
+ ITEM Assertion OK : - Range("B39").HorizontalAlignment (set)
+ ITEM FAIL (RangeTest2)
+ TEST Not succesfully completed : RangeTest2
+END TestCalc
+Test run finished : 10/07/2007 01:56:12
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/TestCalc_Rangetest2.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/TestCalc_Rangetest2.log
new file mode 100644
index 000000000000..9159217cb442
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/TestCalc_Rangetest2.log
@@ -0,0 +1,65 @@
+Test run started : 08/10/2008 11:30:38
+BEGIN TestCalc
+ TEST START : RangeTest3
+ ITEM Assertion OK : - setFormulaR1C1
+ ITEM Assertion OK : - getFormulaR1C1
+ ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
+ ITEM Assertion OK : - Range.Copy(Range("I10"))
+ ITEM Assertion OK : PasteSpecial Paste:=xlPasteValues
+ ITEM Assertion OK : PasteSpecial Paste:=xlPasteFormulas
+ ITEM Assertion OK : PasteSpecial Paste:=xlPasteFormats
+ ITEM Assertion OK : PasteSpecial
+ ITEM Assertion OK : PasteSpecial SkipBlanks:=True
+ ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationAdd
+ ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationSubtract
+ ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationMultiply
+ ITEM Assertion OK : PasteSpecial Operation:=xlPasteSpecialOperationDivide
+ ITEM Assertion OK : PasteSpecial Transpose:=True
+ ITEM Assertion FAIL : ActiveWorkbook.FileFormat
+ ITEM Assertion OK : ActiveWorkbook.Name
+ ITEM Assertion OK : ActiveWorkbook.FullName und ActiveWorkbook.Path
+ ITEM Assertion FAIL : - = ActiveWorkbook.Colors(3) set
+ ITEM Assertion OK : - = ActiveWorkbook.ResetColors
+ ITEM Assertion OK : - = ActiveWorkbook.Colors(3) get
+ ITEM Assertion OK : - = Range("K22").End (xlDown)
+ ITEM Assertion OK : - = Range("K22").End (xlUo)
+ ITEM Assertion OK : - = Range("K22").End (xlToLeft)
+ ITEM Assertion OK : - = Range("K22").End (xlRight)
+ ITEM Assertion OK : - ActiveSpreadsheet.Next
+ ITEM Assertion OK : - ActiveSpreadsheet.Next
+ ITEM Assertion OK : - ActiveSpreadsheet.Previous
+ ITEM Assertion OK : - ActiveSpreadsheet.Previous
+ ITEM Assertion OK : - Range("J4:J11").AutoFilter field:=1, Criteria1:="x"
+ ITEM Assertion OK : - Range("J4:J11").AutoFilter field:=1, Criteria1:="<>"
+ ITEM Assertion OK : - Range("J4:J11").AutoFilter field:=1, Criteria1:="="
+ ITEM Assertion OK : - Range("J4:J11").AutoFilter
+ ITEM Assertion OK : - ActiveSheet.Resize.Select
+ ITEM Assertion OK : - Application.GoTo Reference:="R8C2"
+ ITEM Assertion FAIL : - Application.GoTo Reference:="R[8]C[2]"
+ ITEM Assertion OK : - Application.GoTo Reference:="R8C2"
+ ITEM Assertion OK : - Range.Group - please check visually
+ ITEM Assertion OK : - Range.Group - please check visually
+ ITEM Assertion OK : - Range.Ungroup- please check visually
+ ITEM Assertion OK : - Range.Ungroup - please check visually
+ ITEM Assertion OK : - Range.Group - please check visually
+ ITEM Assertion OK : - Range.Group - please check visually
+ ITEM Assertion OK : - Range.clearOutline - please check visually
+ ITEM Assertion OK : - Range.AutoOutline - please check visually
+ ITEM Assertion OK : - Range.AutoOutline - please check visually
+ ITEM Assertion OK : - ActiveSheet.UsedRange.Select
+ ITEM Assertion OK : - Range("A13").AddIndent
+ ITEM Assertion OK : - Range("A13").IndentLevel set
+ ITEM Assertion OK : - Range("A13").IndentLevel get
+ ITEM Assertion OK : - Range("A13").IndentLevel get
+ ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
+ ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
+ ITEM Assertion OK : - Range.Copy() and Range.PasteSpecial()
+ ITEM Assertion OK : - Range.Calculate
+ ITEM Assertion OK : Worksheet.Calculate
+ ITEM Assertion OK : - Application.Calculate
+ ITEM Assertion OK : Global.Calculate
+ ITEM Assertion OK : Calculation set
+ ITEM FAIL (RangeTest3)
+ TEST Not succesfully completed : RangeTest3
+END TestCalc
+Test run finished : 08/10/2008 11:30:41
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/TestIntersection.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/TestIntersection.log
new file mode 100644
index 000000000000..2cf4fe36ea6f
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/TestIntersection.log
@@ -0,0 +1,26 @@
+Test run started : 15/01/2009 17:05:08
+----------------------------------------------------------------
+TestIntersection
+ TEST START : TestIntersection
+ ITEM Assertion OK : test1 Application.Intersect( Range('A2:D10'), Range('C4:E6'))
+ ITEM Assertion OK : test2 Application.Intersect( Range('A2:D10'), Range('A4:G10'))
+ ITEM Assertion OK : test3 Application.Intersect( Range('A2:c8,d2:f8,g2:i8'), Range('A4:G10'))
+ ITEM Assertion OK : test4 Application.Intersect( Range('A4:G10'), Range('A2:c8,d2:f8,g2:i8'))
+ ITEM Assertion OK : test5 Application.Intersect( Range('A2:c8,d2:f8,g2:i8'), Range('g4:i10,A4:G10'))
+ ITEM Assertion OK : test6 Application.Intersect( Range('g4:i10,A4:G10'), Range('A2:c8,d2:f8,g2:i8'))
+ ITEM Assertion OK : test7 Application.Intersect( Range('a2:d10,b5:e10'), Range('a5:i10'))
+ ITEM Assertion OK : test8 Application.Intersect( Range('a2:c8,d2:f8'), Range('b6:e9,a6:f9'))
+ ITEM Assertion OK : test9 Application.Intersect( Range('a2:c8,e2:f8'), Range('b6:e9,a6:f9'))
+ ITEM Assertion OK : test10 Application.Intersect( Range('a1:a3,c1:c3'), Range('a2:c3'))
+ ITEM Assertion OK : test11 Application.Intersect( Range('a1:a3,b1:b3'), Range('a2:c3'))
+ ITEM Assertion OK : test12 Application.Intersect( Range('a2:d5,b3:f7,c1:g4'), Range('b2:e6'))
+ ITEM Assertion OK : test13 Range(" a2:d10,b5:e10,g13:j32 "), Range(" a5:i10,b6:e9 "), Range("b2:r5,f10:h19")
+Test Results
+============
+
+Tests passed: 13
+Tests failed: 0
+
+END 'TestIntersection
+ TEST OK : TestIntersection
+Test run finished : 15/01/2009 17:05:09
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/TestUnion.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/TestUnion.log
new file mode 100644
index 000000000000..2382db549554
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/TestUnion.log
@@ -0,0 +1,17 @@
+Test run started : 15/01/2009 17:06:07
+----------------------------------------------------------------
+TestUnion
+ TEST START : TestUnion
+ ITEM Assertion OK : test1Application.Range('A2:D10'), Range('C4:E6')
+ ITEM Assertion OK : test2Application.Range('A2:D5,a3:d4'), Range('A4:G10')
+ ITEM Assertion OK : test3Application.Range('A4:G10,A1:B6'), Range('A2:D5,A3:D4')
+ ITEM Assertion OK : test4Application.Range('A5:D10'), Range('B5:E10')
+Test Results
+============
+
+Tests passed: 4
+Tests failed: 0
+
+END 'TestUnion
+ TEST OK : TestUnion
+Test run finished : 15/01/2009 17:06:08
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/VariantTest.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/VariantTest.log
new file mode 100644
index 000000000000..d2bfeb8e14a1
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/VariantTest.log
@@ -0,0 +1,47 @@
+Test run started : 08/10/2008 12:07:24
+----------------------------------------------------------------
+TestAddress
+ TEST START : TestAddress
+ ITEM Assertion OK : test1: res = (aboo = '')
+ ITEM Assertion OK : test 2: res = (aboo = 'fiddlesticks')
+ ITEM Assertion OK : test 3: res = ('' = aboo)
+ ITEM Assertion OK : test 4: res = ('fiddlesticks' = aboo )
+ ITEM Assertion OK : test 5: res = (testString = '')
+ ITEM Assertion OK : test 6: res = (testString = 'fiddlesticks')
+ ITEM Assertion OK : test 7: res = ('' = testString)
+ ITEM Assertion OK : test 8: res = ('fiddlesticks' = testString )
+ ITEM Assertion OK : test 9: res = ( aboo < " )
+ ITEM Assertion OK : test 10: res = ( testString < " )
+ ITEM Assertion OK : test 11: res = ( aboo > " )
+ ITEM Assertion OK : test 12: res = ( testString > " )
+ ITEM Assertion OK : test 13: res = ( aboo <> '' )
+ ITEM Assertion OK : test 14: res = ( testString <> '' )
+ ITEM Assertion OK : test 15: res = (aboo = something/14)
+ ITEM Assertion OK : test 16: res = something + 'string'
+ ITEM Assertion OK : test 17: res = something & 'string'
+ ITEM Assertion OK : test 18: res = something MOD 10 )
+ ITEM Assertion OK : test 19: res = something AND 1 )
+ ITEM Assertion OK : test 20: res = something AND 0 )
+ ITEM Assertion OK : test 21: res = something OR 12)
+ ITEM Assertion OK : test 22: res = something OR 0 )
+ ITEM Assertion OK : test 23: res = something XOR 0 )
+ ITEM Assertion OK : test 24: res = something XOR 1 )
+ ITEM Assertion OK : test 25: res = something EQV 0 )
+ ITEM Assertion OK : test 26: res = something EQV 1 )
+ ITEM Assertion OK : test 27: res = something IMP 0 )
+ ITEM Assertion OK : test 28: res = something IMP 1 )
+ ITEM Assertion OK : test 29: res = something IMP 14 )
+ ITEM Assertion OK : test 30: res = NOT something )
+ ITEM Assertion OK : test 31: res = something + 12 )
+ ITEM Assertion OK : test 32: res = something - 12 )
+ ITEM Assertion OK : test 33: res = -something )
+ ITEM Assertion OK : test 34: res = something * 12 )
+Test Results
+============
+
+Tests passed: 34
+Tests failed: 0
+
+END 'TestAddress
+ TEST OK : TestAddress
+Test run finished : 08/10/2008 12:07:26
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/Window.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/Window.log
new file mode 100644
index 000000000000..178582e753c7
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/Window.log
@@ -0,0 +1,46 @@
+Test run started : 08/10/2008 12:09:50
+----------------------------------------------------------------
+ TEST START : Window-Issue
+ ITEM Assertion OK : Window.Left is: 0 (Test only applies to maximized Window)
+ ITEM Assertion OK : Window.Top is: 26 (Test only applies to maximized Window)
+ ITEM Assertion OK : Window.Width is: 1280 (Test only applies to maximized Window)
+ ITEM Assertion OK : Window.Height is: 968 (Test only applies to maximized Window)
+ ITEM Assertion OK : Window.ScrollColumn is: 100
+ ITEM Assertion OK : Window.ScrollColumn is: 1
+ ITEM Assertion OK : Window.ScrollRow is: 100
+ ITEM Assertion OK : Window.ScrollRow is: 1
+ ITEM Assertion OK : Window.LargeScroll(Down): ScrollRow is: 127 (Test may only apply to maximized Window)
+ ITEM Assertion OK : Window.LargeScroll(Up): ScrollRow is: 1
+ ITEM Assertion OK : Window.LargeScroll(ToRight): ScrollColumn is: 58 (Test may only apply to maximized Window)
+ ITEM Assertion OK : Window.LargeScroll(ToLeft): ScrollColumn is: 1
+ ITEM Assertion OK : Window.SmallScroll(ToRight): ScrollColumn is: 4 (Test may only apply to maximized Window)
+ ITEM Assertion OK : Window.SmallScroll(ToLeft): ScrollColumn is: 1
+ ITEM Assertion OK : Window.DisplayWorkBookTabs is: False
+ ITEM Assertion OK : Window.DisplayWorkBookTabs is: True
+ ITEM Assertion OK : Window.DisplayVerticalScrollBar is: True
+ ITEM Assertion OK : Window.DisplayVerticalScrollBar is: False
+ ITEM Assertion OK : Window.DisplayHorizontalScrollBar is: False
+ ITEM Assertion OK : Window.DisplayHorizontalScrollBar is: True
+ ITEM Assertion OK : Window.DisplayHeadings is: False
+ ITEM Assertion OK : Window.DisplayHeadings is: True
+ ITEM Assertion OK : Window.DisplayOutline is: False
+ ITEM Assertion OK : Window.DisplayOutline is: True
+ ITEM Assertion OK : Window.Visible is: False
+ ITEM Assertion OK : Window.Visible is: True
+ ITEM Assertion OK : Window.Caption is: MyCaption
+ ITEM Assertion OK : Pane.ScrollColumn is: 100
+ ITEM Assertion OK : Pane.ScrollColumn is: 1
+ ITEM Assertion OK : Pane.ScrollRow is: 100
+ ITEM Assertion OK : Pane.ScrollRow is: 1
+ ITEM Assertion OK : Pane.LargeScroll(Down): ScrollRow is: 127 (Test may only apply to maximized Window)
+ ITEM Assertion OK : Pane.LargeScroll(Up): ScrollRow is: 1
+ ITEM Assertion OK : Pane.LargeScroll(ToRight): ScrollColumn is: 58 (Test may only apply to maximized Window)
+ ITEM Assertion OK : Pane.LargeScroll(ToLeft): ScrollColumn is: 1
+ ITEM Assertion OK : Pane.SmallScroll(ToRight): ScrollColumn is: 4 (Test may only apply to maximized Window)
+ ITEM Assertion OK : Pane.SmallScroll(ToLeft): ScrollColumn is: 1
+ ITEM Assertion OK : Window Selection: $A$2:$D$5
+ ITEM Assertion OK : ActiveSheet name of Window: Sheet1
+ ITEM Assertion OK : Window ActiveCell: $A$1
+END 'Window-Issue' Symbol
+ TEST OK : Window-Issue
+Test run finished : 08/10/2008 12:09:50
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/bytearraystring.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/bytearraystring.log
new file mode 100644
index 000000000000..8913fc096dc2
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/bytearraystring.log
@@ -0,0 +1,8 @@
+Test run started : 08/10/2008 12:54:46
+BEGIN Bytearray To String
+ TEST START : Test the conversion between bytearray and string
+ ITEM Assertion OK : The number of byte is:6
+ ITEM Assertion OK : the return string is: abc
+ TEST OK : Test the conversion between bytearray and string
+END Bytearray To String
+Test run finished : 08/10/2008 12:54:46
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/dateserial.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/dateserial.log
new file mode 100644
index 000000000000..0b02f7b91a2c
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/dateserial.log
@@ -0,0 +1,9 @@
+Test run started : 08/10/2008 12:56:07
+BEGIN DateSerial
+ TEST START : Test DateSerial function
+ ITEM Assertion OK : the return date is: 15/06/1999
+ ITEM Assertion OK : the return date is: 15/06/1999
+ ITEM Assertion OK : the return date is: 15/06/1999
+ TEST OK : Test DateSerial function
+END DateSerial
+Test run finished : 08/10/2008 12:56:07
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/datevalue.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/datevalue.log
new file mode 100644
index 000000000000..4698463362d2
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/datevalue.log
@@ -0,0 +1,8 @@
+Test run started : 08/10/2008 13:07:49
+BEGIN DateValue
+ TEST START : Test DateValue function
+ ITEM Assertion OK : the return date is: 12/02/1969
+ ITEM Assertion OK : the return date is: 21/01/2008
+ TEST OK : Test DateValue function
+END DateValue
+Test run finished : 08/10/2008 13:07:49
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/format.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/format.log
new file mode 100644
index 000000000000..ef84cbbdb925
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/format.log
@@ -0,0 +1,36 @@
+Test run started : 15/01/2009 17:07:59
+BEGIN Format
+ TEST START : Test Predefined_Number_Format_Sample function
+ ITEM Assertion OK : General Number: 562486.2356
+ ITEM Assertion OK : Fixed: 0.20
+ ITEM Assertion OK : Standard: 562,486.24
+ ITEM Assertion OK : Percent: 75.21%
+ ITEM Assertion OK : Scientific: 5.62E+05
+ ITEM Assertion OK : Scientific: -3.46E+03
+ ITEM Assertion OK : Yes/No: No
+ ITEM Assertion OK : Yes/No: Yes
+ ITEM Assertion OK : True/False: False
+ ITEM Assertion OK : True/False: True
+ ITEM Assertion OK : On/Off: Off
+ ITEM Assertion OK : On/Off: On
+ TEST OK : Test Predefined_Number_Format_Sample function
+ TEST START : Test Custom_Number_Format_Sample function
+ ITEM Assertion OK : 00.0000: 23.6750
+ ITEM Assertion OK : 00.00: 23.68
+ ITEM Assertion OK : 00000: 02658
+ ITEM Assertion OK : 00.00: 2658.00
+ ITEM Assertion OK : ##.####: 23.675
+ ITEM Assertion OK : ##.##: 23.68
+ ITEM Assertion OK : #,###.##: 12,345.25
+ ITEM Assertion OK : ##.00%: 25.00%
+ ITEM Assertion OK : #,###: 1,000,000
+ ITEM Assertion OK : ######E-###: 109838E-5
+ ITEM Assertion OK : $#,###.##: $2,345.25
+ ITEM Assertion OK : ##.###\%: .25%
+ TEST OK : Test Custom_Number_Format_Sample function
+ TEST START : Test Custom_Text_Format_Sample function
+ ITEM Assertion OK : <: vba
+ ITEM Assertion OK : >: VBA
+ TEST OK : Test Custom_Text_Format_Sample function
+END Format
+Test run finished : 15/01/2009 17:07:59
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/pagesetup.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/pagesetup.log
new file mode 100644
index 000000000000..a1c90473ce07
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/pagesetup.log
@@ -0,0 +1,87 @@
+Test run started : 7/21/2008 10:37:24 AM
+BEGIN PageSetup
+ TEST START : Sheet_PrintArea
+ ITEM Assertion OK : PrintArea has changed as expected
+ TEST OK : Sheet_PrintArea
+ TEST START : Test margins (no headers)
+ ITEM Assertion OK : PageSetup.LeftMargin set/get
+ ITEM Assertion OK : PageSetup.RightMargin set/get
+ ITEM Assertion OK : PageSetup.TopMargin set/get
+ ITEM Assertion OK : PageSetup.BottomMargin set/get
+Verify that page margins on sheet 1 are all 0.5inch
+ TEST OK : Test margins (no headers)
+ TEST START : Test margins (headers)
+ ITEM Assertion OK : PageSetup.HeaderMargin set/get
+ ITEM Assertion OK : PageSetup.FooterMargin set/get
+ ITEM Assertion OK : PageSetup.LeftMargin set/get
+ ITEM Assertion OK : PageSetup.LeftMargin set/get
+Verify that top/bottom/header/footer page margins on sheet 2 are all 0.5inch
+ TEST OK : Test margins (headers)
+ TEST START : Test header/footer text
+ ITEM Assertion OK : PageSetup.LeftHeader set
+ ITEM Assertion OK : PageSetup.LeftHeader set/get
+ ITEM Assertion OK : PageSetup.CenterHeader set
+ ITEM Assertion OK : PageSetup.CenterHeader set/get
+ ITEM Assertion OK : PageSetup.RightHeader set
+ ITEM Assertion OK : PageSetup.RightHeader set/get
+ ITEM Assertion OK : PageSetup.LeftFooter set
+ ITEM Assertion OK : PageSetup.LeftFooter set/get
+ ITEM Assertion OK : PageSetup.CenterFooter set
+ ITEM Assertion OK : PageSetup.CenterFooter set/get
+ ITEM Assertion OK : PageSetup.RightFooter set
+ ITEM Assertion OK : PageSetup.RightFooter set/get
+Verify that headers on sheet 2 are Ready,to,go
+Verify that footers on sheet 2 are This,now,Works
+ TEST OK : Test header/footer text
+ TEST START : Test zoom
+ ITEM Assertion OK : PageSetup.Zoom set
+ ITEM Assertion OK : PageSetup.Zoom set/get
+Verify that sheet 1 zoom is 10%
+ TEST OK : Test zoom
+ TEST START : Test orientation
+ ITEM Assertion OK : PageSetup.Zoom set
+ ITEM Assertion OK : PageSetup.Orientation set/get
+Verify that sheet 1 orientation is now landscape
+ TEST OK : Test orientation
+ TEST START : Test paper size
+ ITEM Assertion OK : PageSetup.PaperSize get
+ ITEM Assertion OK : PageSetup.PaperSize set/get
+Verify that paper size on sheet 1 is now Letter
+ TEST OK : Test paper size
+ TEST START : Test order
+ ITEM Assertion OK : PageSetup.Order get
+ ITEM Assertion OK : PageSetup.Order set/get
+Verify that order on sheet 1 is now over, then down.
+ TEST OK : Test order
+ TEST START : Test first page number
+ ITEM Assertion OK : PageSetup.FirstPageNumber get
+ ITEM Assertion OK : PageSetup.FirstPageNumber set/get
+Verify that first page number on sheet 1 is now 2.
+ TEST OK : Test first page number
+ TEST START : Test center vertically
+ ITEM Assertion OK : PageSetup.CenterVertically get
+ ITEM Assertion OK : PageSetup.CenterVertically set/get
+Verify that CenterVertically on sheet 1 is now true.
+ TEST OK : Test center vertically
+ TEST START : Test center horizontally
+ ITEM Assertion OK : PageSetup.CenterHorizontally get
+ ITEM Assertion OK : PageSetup.CenterHorizontally set/get
+Verify that CenterHorizontally on sheet 1 is now true.
+ TEST OK : Test center horizontally
+ TEST START : Test FitToPagesTall
+ ITEM Assertion OK : PageSetup.FitToPagesTall set/get
+ TEST OK : Test FitToPagesTall
+ TEST START : Test FitToPagesWide
+ ITEM Assertion OK : PageSetup.FitToPagesWide set/get
+ TEST OK : Test FitToPagesWide
+ TEST START : Test PrintHeadings
+ ITEM Assertion OK : PageSetup.PrintHeadings set/get
+ ITEM Assertion OK : PageSetup.PrintHeadings set/get
+ TEST OK : Test PrintHeadings
+ TEST START : Test PrintTitleRows
+ ITEM Assertion OK : PageSetup.PrintTitleRows get
+ ITEM Assertion OK : PageSetup.PrintTitleRows set range/get
+ ITEM Assertion OK : PageSetup.PrintTitleRows set false/get
+ TEST OK : Test PrintTitleRows
+END PageSetup
+Test run finished : 7/21/2008 10:37:32 AM
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/partition.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/partition.log
new file mode 100644
index 000000000000..1ea267d641e8
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/partition.log
@@ -0,0 +1,11 @@
+Test run started : 08/10/2008 13:09:51
+BEGIN Partition
+ TEST START : Test Partition function
+ ITEM Assertion OK : the number 20 occurs in the range:20:24
+ ITEM Assertion OK : the number 20 occurs in the range: 20: 20
+ ITEM Assertion OK : the number 120 occurs in the range:100:
+ ITEM Assertion OK : the number -5 occurs in the range: : -1
+ ITEM Assertion OK : the number 2 occurs in the range: 2: 3
+ TEST OK : Test Partition function
+END Partition
+Test run finished : 08/10/2008 13:09:51
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/range-4.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/range-4.log
new file mode 100644
index 000000000000..11de80133dfa
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/range-4.log
@@ -0,0 +1,16 @@
+Test run started : 08/10/2008 11:30:16
+----------------------------------------------------------------
+ShowDetail-Issue
+ TEST START : ShowDetail-Issue
+ ITEM Assertion OK : Range.ShowDetail is True
+ ITEM Assertion OK : Range.ShowDetail is False
+END 'ShowDetail-Issue' Symbol
+ TEST OK : ShowDetail-Issue
+----------------------------------------------------------------
+RangeMerged-Issue
+ TEST START : RangeMerged-Issue
+ ITEM Assertion OK : Range.RangeMerged is $F$2:$H$5
+ ITEM Assertion OK : The first address of Range.RangeMerged is $F$2
+END 'RangeMerged-Issue' Symbol
+ TEST OK : RangeMerged-Issue
+Test run finished : 08/10/2008 11:30:16
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/replace.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/replace.log
new file mode 100644
index 000000000000..e96004e4d2a6
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/replace.log
@@ -0,0 +1,14 @@
+Test run started : 2007-11-21 11:24:04
+BEGIN Replace
+ TEST START : Test Replace function
+ ITEM Assertion OK : common string:aefefdBc
+ ITEM Assertion OK : expression string:aefefdef
+ ITEM Assertion OK : binanary compare:aefefdBc
+ ITEM Assertion OK : text compare:aefefdef
+ ITEM Assertion OK : text compare:aefefdef
+ ITEM Assertion OK : start = 3:cefdBc
+ ITEM Assertion OK : count = 2: aefefdBc
+ ITEM Assertion OK : start = 1, count = 0, not support in Unix: abcbcdBc
+ TEST OK : Test Replace function
+END Replace
+Test run finished : 2007-11-21 11:24:04
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/stringplusdouble.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/stringplusdouble.log
new file mode 100644
index 000000000000..51a958a412cf
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/stringplusdouble.log
@@ -0,0 +1,62 @@
+Test run started : 15/01/2009 17:09:03
+BEGIN String Plus Double
+ TEST START : double = string + double
+The next compute raises error: s = null, d = null, r = s + d
+ ITEM Assertion OK : s = null, d = null, r = s + d .The result is: -1
+ ITEM Assertion OK : s = null, d = null, r = s & d .The result is: 0
+The next compute raises error: s = null, d = 20, r = s + d
+ ITEM Assertion OK : s = null, d = 20, r = s + d .The result is: -1
+ ITEM Assertion OK : s = null, d = 20, r = s & d .The result is: 20
+ ITEM Assertion OK : s = '10', d = null, r = s + d .The result is: 10
+ ITEM Assertion OK : s = '10', d = null, r = s & d .The result is: 100
+ ITEM Assertion OK : s = '10', d = 20, r = s + d .The result is: 30
+ ITEM Assertion OK : s = '10', d = 20, r = s & d .The result is: 1020
+The next compute raises error: s = 'abc', d = null, r = s + d
+ ITEM Assertion OK : s = 'abc', d = null, r = s + d .The result is: -1
+The next compute raises error: s = 'abc', d = null, r = s & d
+ ITEM Assertion OK : s = 'abc', d = null, r = s & d .The result is: -1
+The next compute raises error: s = 'abc', d = 20, r = s + d
+ ITEM Assertion OK : s = 'abc', d = 20, r = s + d .The result is: -1
+The next compute raises error: s = 'abc', d = 20, r = s & d
+ ITEM Assertion OK : s = 'abc', d = 20, r = s & d .The result is: -1
+ TEST OK : double = string + double
+ TEST START : string = string + double
+The next compute raises error: s = null, d = null, r = s + d
+ ITEM Assertion OK : s = null, d = null, r = s + d .The result is: -1
+ ITEM Assertion OK : s = null, d = null, r = s & d .The result is: 0
+The next compute raises error: s = null, d = 20, r = s + d
+ ITEM Assertion OK : s = null, d = 20, r = s + d .The result is: -1
+ ITEM Assertion OK : s = null, d = 20, r = s & d .The result is: 20
+ ITEM Assertion OK : s = '10', d = null, r = s + d .The result is: 10
+ ITEM Assertion OK : s = '10', d = null, r = s & d .The result is: 100
+ ITEM Assertion OK : s = '10', d = 20, r = s + d .The result is: 30
+ ITEM Assertion OK : s = '10', d = 20, r = s & d .The result is: 1020
+The next compute raises error: s = 'abc', d = null, r = s + d
+ ITEM Assertion OK : s = 'abc', d = null, r = s + d .The result is: -1
+ ITEM Assertion OK : s = 'abc', d = null, r = s & d .The result is: abc0
+The next compute raises error: s = 'abc', d = 20, r = s + d
+ ITEM Assertion OK : s = 'abc', d = 20, r = s + d .The result is: -1
+ ITEM Assertion OK : s = 'abc', d = 20, r = s & d .The result is: abc20
+ TEST OK : string = string + double
+ TEST START : double = string + string
+The next compute raises error: s = null, d = null, r = s + d
+ ITEM Assertion OK : s = null, d = null, r = s + d .The result is: -1
+The next compute raises error: s = null, d = null, r = s & d
+ ITEM Assertion OK : s = null, d = null, r = s & d .The result is: -1
+ ITEM Assertion OK : s = null, d = 20, r = s + d .The result is: 20
+ ITEM Assertion OK : s = null, d = 20, r = s & d .The result is: 20
+ ITEM Assertion OK : s = '10', d = null, r = s + d .The result is: 10
+ ITEM Assertion OK : s = '10', d = null, r = s & d .The result is: 10
+ ITEM Assertion OK : s = '10', d = 20, r = s + d .The result is: 1020
+ ITEM Assertion OK : s = '10', d = 20, r = s & d .The result is: 1020
+The next compute raises error: s = 'abc', d = null, r = s + d
+ ITEM Assertion OK : s = 'abc', d = null, r = s + d .The result is: -1
+The next compute raises error: s = 'abc', d = null, r = s & d
+ ITEM Assertion OK : s = 'abc', d = null, r = s & d .The result is: -1
+The next compute raises error: s = 'abc', d = 20, r = s + d
+ ITEM Assertion OK : s = 'abc', d = 20, r = s + d .The result is: -1
+The next compute raises error: s = 'abc', d = 20, r = s & d
+ ITEM Assertion OK : s = 'abc', d = 20, r = s & d .The result is: -1
+ TEST OK : double = string + string
+END String Plus Double
+Test run finished : 15/01/2009 17:09:03
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/window2.log b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/window2.log
new file mode 100644
index 000000000000..01fba9c6dfa6
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/logs/win/window2.log
@@ -0,0 +1,41 @@
+Test run started : 15/01/2009 17:10:02
+BEGIN Window2
+ TEST START : Test Window.SplitRow
+ ITEM Assertion OK : Test SplitColumn: 2 (Test only applies to maximized Window and at least has 800*600 solotion)
+ ITEM Assertion FAIL : Test SplitRow: 1 (Test only applies to maximized Window and at least has 800*600 solotion)
+ ITEM Assertion OK : Test SplitVertical: 242.283803521067
+ ITEM Assertion OK : Test SplitHorizontal: 242.283803521067
+ ITEM Assertion FAIL : Test SplitRow: 3 (Test only applies to maximized Window and at least has 800*600 solotion)
+ ITEM Assertion OK : Test SplitColumn: 3 (Test only applies to maximized Window and at least has 800*600 solotion)
+ ITEM Assertion OK : Test SplitColumn: 0
+ ITEM Assertion OK : Test SplitRow: 0
+ TEST OK : Test Window.SplitRow
+ TEST START : Test Window.DisplayGridlines
+ ITEM Assertion OK : Test gridlines are on
+ ITEM Assertion OK : Test gridlines are off
+ TEST OK : Test Window.DisplayGridlines
+ TEST START : Test Window.DisplayHeadings
+ ITEM Assertion OK : Test Headings are on
+ ITEM Assertion OK : Test Headings are off
+ TEST OK : Test Window.DisplayHeadings
+ TEST START : Test Window.Visibility
+ ITEM Assertion OK : Window is visible
+ ITEM Assertion OK : Window is not visible
+ TEST OK : Test Window.Visibility
+ TEST START : Test Window.FreezePanes
+ ITEM Assertion OK : Test no panes frozen
+ ITEM Assertion OK : Test panes frozen at center
+ ITEM Assertion OK : Test panes frozen at split
+ TEST OK : Test Window.FreezePanes
+ TEST START : Test Window.View
+ TEST OK : Test Window.View
+ TEST START : Test Window.Zoom
+ ITEM Assertion OK : Test zoom=100%
+ ITEM Assertion OK : Test zoom=150%
+ TEST OK : Test Window.Zoom
+ TEST START : Test Windows.Count
+ ITEM Assertion OK : Windows Count: 1
+ ITEM Assertion OK : Application.Windows Count: 1
+ TEST OK : Test Windows.Count
+END Window2
+Test run finished : 15/01/2009 17:10:03
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/notwork/error.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/notwork/error.xls
new file mode 100644
index 000000000000..ea2095d5e3d7
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/notwork/error.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/notwork/imagecontrols.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/notwork/imagecontrols.xls
new file mode 100644
index 000000000000..0de17b403f23
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/notwork/imagecontrols.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/notwork/keyword.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/notwork/keyword.xls
new file mode 100644
index 000000000000..3bf711ed4f42
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/notwork/keyword.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/notwork/objectmodule.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/notwork/objectmodule.xls
new file mode 100644
index 000000000000..d3aff35b938c
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/notwork/objectmodule.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/notwork/stringtodouble.ods b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/notwork/stringtodouble.ods
new file mode 100644
index 000000000000..5a732a765886
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/notwork/stringtodouble.ods
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/partition.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/partition.xls
new file mode 100644
index 000000000000..5c8d12b1d54f
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/partition.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/range-4.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/range-4.xls
new file mode 100644
index 000000000000..52452369462f
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/range-4.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/replace.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/replace.xls
new file mode 100644
index 000000000000..dcf3c6e8ec06
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/replace.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/stringplusdouble.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/stringplusdouble.xls
new file mode 100644
index 000000000000..596be7f6b9bc
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/stringplusdouble.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments-ooo-build/window2.xls b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/window2.xls
new file mode 100644
index 000000000000..4d5e1cbfe944
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments-ooo-build/window2.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments/ApplicationRunTest.xls b/sc/source/ui/vba/testvba/TestDocuments/ApplicationRunTest.xls
new file mode 100644
index 000000000000..a5a591c1f849
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments/ApplicationRunTest.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments/CalcFont.xls b/sc/source/ui/vba/testvba/TestDocuments/CalcFont.xls
new file mode 100644
index 000000000000..9ddb69600643
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments/CalcFont.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments/FinancialFuncs.xls b/sc/source/ui/vba/testvba/TestDocuments/FinancialFuncs.xls
new file mode 100644
index 000000000000..bb8941809947
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments/FinancialFuncs.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments/Ranges.xls b/sc/source/ui/vba/testvba/TestDocuments/Ranges.xls
index 3abdc4620aa8..1c1d74d37486 100644
--- a/sc/source/ui/vba/testvba/TestDocuments/Ranges.xls
+++ b/sc/source/ui/vba/testvba/TestDocuments/Ranges.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments/TestAddress.xls b/sc/source/ui/vba/testvba/TestDocuments/TestAddress.xls
index 1834bd649f3d..48d30cbe2e9e 100644
--- a/sc/source/ui/vba/testvba/TestDocuments/TestAddress.xls
+++ b/sc/source/ui/vba/testvba/TestDocuments/TestAddress.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments/TestIntersection.xls b/sc/source/ui/vba/testvba/TestDocuments/TestIntersection.xls
new file mode 100644
index 000000000000..24f88db87ccc
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments/TestIntersection.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments/TestUnion.xls b/sc/source/ui/vba/testvba/TestDocuments/TestUnion.xls
new file mode 100644
index 000000000000..5b8f0968cf38
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments/TestUnion.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments/logs/unix/CalcFont.log b/sc/source/ui/vba/testvba/TestDocuments/logs/unix/CalcFont.log
new file mode 100644
index 000000000000..f3583e4cbb12
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments/logs/unix/CalcFont.log
@@ -0,0 +1,17 @@
+Test run started : 10/09/2008 02:40:17 PM
+CalcFont_Format
+ TEST START : Font_Format
+ ITEM Assertion OK : correctly set font to Bold
+ ITEM Assertion OK : correctly set font to Italic
+ ITEM Assertion OK : correctly read FontStyle
+ ITEM Assertion OK : correctly set font to Shadow
+ ITEM Assertion OK : correctly set font color
+ ITEM Assertion OK : correctly set font color index
+ ITEM Assertion OK : correctly set font name
+ ITEM Assertion OK : correctly set font outline
+ ITEM Assertion OK : correctly set font size
+ ITEM Assertion OK : correctly set font strikethrough
+ ITEM Assertion OK : correctly set font underline
+ TEST Success. : Font_Format
+CalcFont_Format
+Test run finished : 10/09/2008 02:40:17 PM
diff --git a/sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges.log b/sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges.log
index dd4fb4923209..cdd18685e977 100644
--- a/sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges.log
+++ b/sc/source/ui/vba/testvba/TestDocuments/logs/unix/Ranges.log
@@ -1,4 +1,4 @@
-Test run started : 17/12/2008 14:18:34
+Test run started : 10/03/2008 15:15:11
----------------------------------------------------------------
ApplicationMethods
TEST START : ApplicationMethods
@@ -7,8 +7,8 @@ ApplicationMethods
ITEM Assertion OK : Address of Application.Rows is: $1:$1
ITEM Assertion OK : Address of Application.Range is: $1:$1,$5:$7
ITEM Assertion OK : Please check manually: DefaultFilePath is: /data4/home/npower/Documents
- ITEM Assertion OK : Please check manually: Library Path is: /media/disk/BUILD-related/CWS/my_working_copy/INSTALL_FOR_TEST/opt/UserInstallation/user/basic
- ITEM Assertion OK : Please check manually: Template Path is: /media/disk/BUILD-related/CWS/my_working_copy/INSTALL_FOR_TEST/opt/UserInstallation/user/template
+ ITEM Assertion OK : Please check manually: Library Path is: /data4/home/npower/.ooo-2.0/user/basic
+ ITEM Assertion OK : Please check manually: Template Path is: /data4/home/npower/.ooo-2.0/user/template
ITEM Assertion OK : FileSeparator is /
ITEM Assertion OK : Name of ActiveWorkbook is: Ranges.xls
END 'ApplicationMethods' Symbol
@@ -111,8 +111,8 @@ END 'Value-Issue' Symbol
----------------------------------------------------------------
AutoFit issue
TEST START : AutoFit issue
- ITEM Assertion OK : Columns.AutoFit: CurrentWidth is 679
- ITEM Assertion OK : Rows.AutoFit: CurrentHeight is 546
+ ITEM Assertion OK : Columns.AutoFit: CurrentWidth is 680
+ ITEM Assertion OK : Rows.AutoFit: CurrentHeight is 554
END 'AutoFit issue' Symbol
TEST OK : AutoFit issue
----------------------------------------------------------------
@@ -204,11 +204,11 @@ Heights and Widths
ITEM Assertion OK : Range RowHeight is 40
ITEM Assertion OK : Range ColumnWidth is 50
ITEM Assertion OK : Range Height is 240
- ITEM Assertion OK : Range Width is 787.5
+ ITEM Assertion OK : Range Width is 795
ITEM Assertion OK : Range RowHeight is 50
ITEM Assertion OK : Range ColumnWidth is 50
ITEM Assertion OK : Range Height is 300
- ITEM Assertion OK : Range Width is 787.5
+ ITEM Assertion OK : Range Width is 795
ITEM Assertion OK : RowHeight is null: True
ITEM Assertion OK : ColumnWidth is null: True
END 'Heights and Widths' Symbol
@@ -218,7 +218,7 @@ RangeRowColumn-Issue
TEST START : RangeRowColumn-Issue
ITEM Assertion OK : Row is: 8
ITEM Assertion OK : Column is: 5
- ITEM Assertion OK : EntireRow.Columns.Count = 1024
+ ITEM Assertion OK : EntireRow.Columns.Count = 256
ITEM Assertion OK : EntireColumn.Rows.Count = 131072
END 'RangeRowColumn-Issue' Symbol
TEST OK : RangeRowColumn-Issue
@@ -255,7 +255,7 @@ End issue
ITEM Assertion OK : - = $E$3
ITEM Assertion OK : - = $A$8
ITEM Assertion OK : - = $B$8
- ITEM Assertion FAIL : - = $AMJ$8
+ ITEM Assertion OK : - = $IV$8
ITEM Assertion OK : - = $Z$8
END 'End issue' Symbol
TEST OK : End issue
@@ -277,4 +277,4 @@ Validation
ITEM Assertion OK : Validation Error Title is : Microsoft Excel
END 'Validation' Symbol
TEST OK : Validation
-Test run finished : 17/12/2008 14:18:40
+Test run finished : 10/03/2008 15:15:13
diff --git a/sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestAddress.log b/sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestAddress.log
index 42360c3ffe8a..4fa4bc820f59 100644
--- a/sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestAddress.log
+++ b/sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestAddress.log
@@ -1,4 +1,4 @@
-Test run started : 17/07/2007 20:56:04
+Test run started : 12/05/2009 11:23:35
----------------------------------------------------------------
TestAddress
TEST START : TestAddress
@@ -51,12 +51,17 @@ TestAddress
ITEM Assertion OK : test47 Range('a2:b4').Rows('1:2')
ITEM Assertion OK : test48 Range('a2:b4').Rows('2:2')
ITEM Assertion OK : test49 Range('a2:b4').Rows('2:3')
+ ITEM Assertion OK : test50 Range(' A2:B4 ')
+ ITEM Assertion OK : test51 Range('A 2:B 4')
+ ITEM Assertion OK : test52 Range('A2 : B4 ')
+ ITEM Assertion OK : test53 Range('Sheet1 !A2 : B4 ')
+ ITEM Assertion OK : test54 Range('Sheet1! A2 : B4 ')
Test Results
============
-Tests passed: 49
+Tests passed: 54
Tests failed: 0
END 'TestAddress
TEST OK : TestAddress
-Test run finished : 17/07/2007 20:56:05
+Test run finished : 12/05/2009 11:23:35
diff --git a/sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestIntersection.log b/sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestIntersection.log
new file mode 100644
index 000000000000..ea686a830cde
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestIntersection.log
@@ -0,0 +1,26 @@
+Test run started : 13/01/2009 14:31:43
+----------------------------------------------------------------
+TestIntersection
+ TEST START : TestIntersection
+ ITEM Assertion OK : test1 Application.Intersect( Range('A2:D10'), Range('C4:E6'))
+ ITEM Assertion OK : test2 Application.Intersect( Range('A2:D10'), Range('A4:G10'))
+ ITEM Assertion OK : test3 Application.Intersect( Range('A2:c8,d2:f8,g2:i8'), Range('A4:G10'))
+ ITEM Assertion OK : test4 Application.Intersect( Range('A4:G10'), Range('A2:c8,d2:f8,g2:i8'))
+ ITEM Assertion OK : test5 Application.Intersect( Range('A2:c8,d2:f8,g2:i8'), Range('g4:i10,A4:G10'))
+ ITEM Assertion OK : test6 Application.Intersect( Range('g4:i10,A4:G10'), Range('A2:c8,d2:f8,g2:i8'))
+ ITEM Assertion OK : test7 Application.Intersect( Range('a2:d10,b5:e10'), Range('a5:i10'))
+ ITEM Assertion OK : test8 Application.Intersect( Range('a2:c8,d2:f8'), Range('b6:e9,a6:f9'))
+ ITEM Assertion OK : test9 Application.Intersect( Range('a2:c8,e2:f8'), Range('b6:e9,a6:f9'))
+ ITEM Assertion OK : test10 Application.Intersect( Range('a1:a3,c1:c3'), Range('a2:c3'))
+ ITEM Assertion OK : test11 Application.Intersect( Range('a1:a3,b1:b3'), Range('a2:c3'))
+ ITEM Assertion OK : test12 Application.Intersect( Range('a2:d5,b3:f7,c1:g4'), Range('b2:e6'))
+ ITEM Assertion OK : test13 Range(" a2:d10,b5:e10,g13:j32 "), Range(" a5:i10,b6:e9 "), Range("b2:r5,f10:h19")
+Test Results
+============
+
+Tests passed: 13
+Tests failed: 0
+
+END 'TestIntersection
+ TEST OK : TestIntersection
+Test run finished : 13/01/2009 14:31:43
diff --git a/sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestUnion.log b/sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestUnion.log
new file mode 100644
index 000000000000..da3cb35dedb3
--- /dev/null
+++ b/sc/source/ui/vba/testvba/TestDocuments/logs/unix/TestUnion.log
@@ -0,0 +1,17 @@
+Test run started : 13/01/2009 14:32:16
+----------------------------------------------------------------
+TestUnion
+ TEST START : TestUnion
+ ITEM Assertion OK : test1Application.Range('A2:D10'), Range('C4:E6')
+ ITEM Assertion OK : test2Application.Range('A2:D5,a3:d4'), Range('A4:G10')
+ ITEM Assertion OK : test3Application.Range('A4:G10,A1:B6'), Range('A2:D5,A3:D4')
+ ITEM Assertion OK : test4Application.Range('A5:D10'), Range('B5:E10')
+Test Results
+============
+
+Tests passed: 4
+Tests failed: 0
+
+END 'TestUnion
+ TEST OK : TestUnion
+Test run finished : 13/01/2009 14:32:16
diff --git a/sc/source/ui/vba/testvba/TestDocuments/logs/unix/format.log b/sc/source/ui/vba/testvba/TestDocuments/logs/unix/format.log
index 50fac171544b..96725bf7daa8 100644
--- a/sc/source/ui/vba/testvba/TestDocuments/logs/unix/format.log
+++ b/sc/source/ui/vba/testvba/TestDocuments/logs/unix/format.log
@@ -1,4 +1,4 @@
-Test run started : 17/12/2008 14:15:22
+Test run started : 2008/09/18 11:35:34
BEGIN Format
TEST START : Test Predefined_Number_Format_Sample function
ITEM Assertion OK : General Number: 562486.2356
@@ -33,4 +33,4 @@ BEGIN Format
ITEM Assertion OK : >: VBA
TEST OK : Test Custom_Text_Format_Sample function
END Format
-Test run finished : 17/12/2008 14:15:22
+Test run finished : 2008/09/18 11:35:34
diff --git a/sc/source/ui/vba/testvba/TestDocuments/logs/unix/replace.log b/sc/source/ui/vba/testvba/TestDocuments/logs/unix/replace.log
index 461955dc2402..8f600faaa6b1 100644
--- a/sc/source/ui/vba/testvba/TestDocuments/logs/unix/replace.log
+++ b/sc/source/ui/vba/testvba/TestDocuments/logs/unix/replace.log
@@ -1,4 +1,4 @@
-Test run started : 17/12/2008 13:53:49
+Test run started : 09/05/2008 10:21:46 AM
BEGIN Replace
TEST START : Test Replace function
ITEM Assertion OK : common string:aefefdBc
@@ -11,4 +11,4 @@ BEGIN Replace
ITEM Assertion OK : start = 1, count = 0, not support in Unix: abcbcdBc
TEST OK : Test Replace function
END Replace
-Test run finished : 17/12/2008 13:53:49
+Test run finished : 09/05/2008 10:21:47 AM
diff --git a/sc/source/ui/vba/testvba/TestDocuments/logs/unix/window2.log b/sc/source/ui/vba/testvba/TestDocuments/logs/unix/window2.log
index 5d297f80a152..8e26d0580621 100644
--- a/sc/source/ui/vba/testvba/TestDocuments/logs/unix/window2.log
+++ b/sc/source/ui/vba/testvba/TestDocuments/logs/unix/window2.log
@@ -1,20 +1,15 @@
-Test run started : 05/29/2008 02:55:48 PM
+Test run started : 2008/09/22 11:18:57
BEGIN Window2
TEST START : Test Window.SplitRow
- ITEM Assertion OK : Test SplitColumn: 2
- ITEM Assertion FAIL : Test SplitRow: 5
- ITEM Assertion FAIL : Test SplitVertical: 64.5090003183026
- ITEM Assertion OK : Test SplitHorizontal: 502.570118758869
- ITEM Assertion OK : Test SplitVertical: 242.283803521067
- ITEM Assertion OK : Test SplitRow: 19
- ITEM Assertion OK : Test SplitHorizontal: 242.283803521067
- ITEM Assertion OK : Test SplitColumn: 1
- ITEM Assertion FAIL : Test SplitRow: 8
- ITEM Assertion OK : Test SplitColumn: 10
+ ITEM Assertion OK : Test SplitColumn: 2 (Test only applies to maximized Window and at least has 800*600 solotion)
+ ITEM Assertion OK : Test SplitRow: 2 (Test only applies to maximized Window and at least has 800*600 solotion)
+ ITEM Assertion OK : Test SplitVertical: 242.465788476212
+ ITEM Assertion OK : Test SplitHorizontal: 242.465788476212
+ ITEM Assertion OK : Test SplitRow: 4 (Test only applies to maximized Window and at least has 800*600 solotion)
+ ITEM Assertion OK : Test SplitColumn: 3 (Test only applies to maximized Window and at least has 800*600 solotion)
ITEM Assertion OK : Test SplitColumn: 0
ITEM Assertion OK : Test SplitRow: 0
TEST OK : Test Window.SplitRow
-TEST ERROR - no test begun: Test Window.SplitRow
TEST START : Test Window.DisplayGridlines
ITEM Assertion OK : Test gridlines are on
ITEM Assertion OK : Test gridlines are off
@@ -25,7 +20,8 @@ TEST ERROR - no test begun: Test Window.SplitRow
TEST OK : Test Window.DisplayHeadings
TEST START : Test Window.Visibility
ITEM Assertion OK : Window is visible
- TEST FAIL : Test Window.Visibility (hit error handler).
+ ITEM Assertion OK : Window is not visible
+ TEST OK : Test Window.Visibility
TEST START : Test Window.FreezePanes
ITEM Assertion OK : Test no panes frozen
ITEM Assertion OK : Test panes frozen at center
@@ -42,4 +38,4 @@ TEST ERROR - no test begun: Test Window.SplitRow
ITEM Assertion OK : Application.Windows Count: 1
TEST OK : Test Windows.Count
END Window2
-Test run finished : 05/29/2008 02:55:48 PM
+Test run finished : 2008/09/22 11:18:58
diff --git a/sc/source/ui/vba/testvba/TestDocuments/PageSetup.xls b/sc/source/ui/vba/testvba/TestDocuments/pagesetup.xls
index dfa1b2a8be58..dfa1b2a8be58 100755
--- a/sc/source/ui/vba/testvba/TestDocuments/PageSetup.xls
+++ b/sc/source/ui/vba/testvba/TestDocuments/pagesetup.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/TestDocuments/window2.xls b/sc/source/ui/vba/testvba/TestDocuments/window2.xls
index 1bb2cd5a67da..4d5e1cbfe944 100755
--- a/sc/source/ui/vba/testvba/TestDocuments/window2.xls
+++ b/sc/source/ui/vba/testvba/TestDocuments/window2.xls
Binary files differ
diff --git a/sc/source/ui/vba/testvba/runTests.pl b/sc/source/ui/vba/testvba/runTests.pl
index 8f8f329504c0..f5051516a9c4 100644
--- a/sc/source/ui/vba/testvba/runTests.pl
+++ b/sc/source/ui/vba/testvba/runTests.pl
@@ -20,7 +20,7 @@ my $theResult;
my $officepath = shift || die "please specify path to office installation program dir";
my $DocName = shift || "";
my $programpath = "$officepath"."3/program:$officepath/program:";
-my $basiclibrarypath = "$officepath/basis3.1/program";
+my $basiclibrarypath = "$officepath/basis3.2/program";
my $urelibpath = "$officepath/ure/lib";
my $binext = "";
my $testDocDir = "$binDir/TestDocuments";
diff --git a/sc/source/ui/vba/testvba/testclient b/sc/source/ui/vba/testvba/testclient
new file mode 100755
index 000000000000..12e9ca1659f4
--- /dev/null
+++ b/sc/source/ui/vba/testvba/testclient
Binary files differ
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index 32ed5f9e0af2..953a2aaee74e 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -57,10 +57,9 @@
#include "tabvwsh.hxx"
#include "gridwin.hxx"
#include "vbanames.hxx"
-#include "vbashape.hxx"
+#include <vbahelper/vbashape.hxx>
#include "vbatextboxshape.hxx"
#include "vbaassistant.hxx"
-#include "vbacommandbars.hxx"
#include "sc.hrc"
#include <osl/file.hxx>
@@ -85,6 +84,9 @@
#include "convuno.hxx"
#include "cellsuno.hxx"
#include "docsh.hxx"
+#include <vbahelper/helperdecl.hxx>
+#include "excelvbahelper.hxx"
+
using namespace ::ooo::vba;
using namespace ::com::sun::star;
@@ -102,20 +104,20 @@ using namespace ::com::sun::star;
#define FILE_PATH_SEPERATOR "\\"
#endif
-#define EXCELVERSION "11.0"
+uno::Any sbxToUnoValue( SbxVariable* pVar );
class ActiveWorkbook : public ScVbaWorkbook
{
protected:
virtual uno::Reference< frame::XModel > getModel()
{
- return getCurrentDocument();
+ return getCurrentExcelDoc(mxContext);
}
public:
ActiveWorkbook( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext) : ScVbaWorkbook( xParent, xContext ){}
};
-ScVbaApplication::ScVbaApplication( uno::Reference<uno::XComponentContext >& xContext ): ScVbaApplication_BASE( uno::Reference< XHelperInterface >(), xContext ), m_xCalculation( excel::XlCalculation::xlCalculationAutomatic )
+ScVbaApplication::ScVbaApplication( const uno::Reference<uno::XComponentContext >& xContext ): ScVbaApplication_BASE( xContext ), m_xCalculation( excel::XlCalculation::xlCalculationAutomatic )
{
}
@@ -123,7 +125,10 @@ ScVbaApplication::~ScVbaApplication()
{
}
-
+SfxObjectShell* ScVbaApplication::GetDocShell( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException)
+{
+ return static_cast< SfxObjectShell* >( excel::getDocShell( xModel ) );
+}
uno::Reference< excel::XWorkbook >
ScVbaApplication::getActiveWorkbook() throw (uno::RuntimeException)
@@ -143,23 +148,15 @@ ScVbaApplication::getAssistant() throw (uno::RuntimeException)
}
uno::Any SAL_CALL
-ScVbaApplication::CommandBars( const uno::Any& aIndex ) throw (uno::RuntimeException)
-{
- uno::Reference< XCommandBars > xCommandBars( new ScVbaCommandBars( this, mxContext, uno::Reference< container::XIndexAccess >() ) );
- if( aIndex.hasValue() )
- return uno::makeAny( xCommandBars->Item( aIndex, uno::Any() ) );
- return uno::makeAny( xCommandBars );
-}
-
-uno::Any SAL_CALL
ScVbaApplication::getSelection() throw (uno::RuntimeException)
{
OSL_TRACE("** ScVbaApplication::getSelection() ** ");
- uno::Reference< lang::XServiceInfo > xServiceInfo( getCurrentDocument()->getCurrentSelection(), uno::UNO_QUERY_THROW );
+ 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") )
{
- uno::Reference< drawing::XShapes > xShapes( getCurrentDocument()->getCurrentSelection(), uno::UNO_QUERY_THROW );
+ uno::Reference< drawing::XShapes > xShapes( xModel->getCurrentSelection(), 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
@@ -170,10 +167,10 @@ ScVbaApplication::getSelection() throw (uno::RuntimeException)
uno::Reference< lang::XServiceInfo > xShapeServiceInfo( xShape, uno::UNO_QUERY_THROW );
if ( xShapeServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.Text" ) ) ) )
{
- return uno::makeAny( uno::Reference< msforms::XTextBoxShape >(new ScVbaTextBoxShape( mxContext, xShape, xShapes, getCurrentDocument() ) ) );
+ return uno::makeAny( uno::Reference< msforms::XTextBoxShape >(new ScVbaTextBoxShape( mxContext, xShape, xShapes, xModel ) ) );
}
}
- return uno::makeAny( uno::Reference< msforms::XShape >(new ScVbaShape( this, mxContext, xShape, xShapes, ScVbaShape::getType( xShape ) ) ) );
+ return uno::makeAny( uno::Reference< msforms::XShape >(new ScVbaShape( this, mxContext, xShape, xShapes, xModel, ScVbaShape::getType( xShape ) ) ) );
}
else if( xServiceInfo->supportsService( rtl::OUString::createFromAscii("com.sun.star.sheet.SheetCellRange")) ||
xServiceInfo->supportsService( rtl::OUString::createFromAscii("com.sun.star.sheet.SheetCellRanges")))
@@ -199,7 +196,7 @@ ScVbaApplication::getActiveCell() throw (uno::RuntimeException )
{
uno::Reference< sheet::XSpreadsheetView > xView( getCurrentDocument()->getCurrentController(), uno::UNO_QUERY_THROW );
uno::Reference< table::XCellRange > xRange( xView->getActiveSheet(), ::uno::UNO_QUERY_THROW);
- ScTabViewShell* pViewShell = getCurrentBestViewShell();
+ ScTabViewShell* pViewShell = excel::getCurrentBestViewShell(mxContext);
if ( !pViewShell )
throw uno::RuntimeException( rtl::OUString::createFromAscii("No ViewShell available"), uno::Reference< uno::XInterface >() );
ScViewData* pTabView = pViewShell->GetViewData();
@@ -212,65 +209,6 @@ ScVbaApplication::getActiveCell() throw (uno::RuntimeException )
return new ScVbaRange( this, mxContext, xRange->getCellRangeByPosition( nCursorX, nCursorY, nCursorX, nCursorY ) );
}
-sal_Bool
-ScVbaApplication::getScreenUpdating() throw (uno::RuntimeException)
-{
- uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
- return !xModel->hasControllersLocked();
-}
-
-void
-ScVbaApplication::setScreenUpdating(sal_Bool bUpdate) throw (uno::RuntimeException)
-{
- uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
- if (bUpdate)
- xModel->unlockControllers();
- else
- xModel->lockControllers();
-}
-
-sal_Bool
-ScVbaApplication::getDisplayStatusBar() throw (uno::RuntimeException)
-{
- uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
- uno::Reference< frame::XFrame > xFrame( xModel->getCurrentController()->getFrame(), uno::UNO_QUERY_THROW );
- uno::Reference< beans::XPropertySet > xProps( xFrame, uno::UNO_QUERY_THROW );
-
- if( xProps.is() ){
- uno::Reference< frame::XLayoutManager > xLayoutManager( xProps->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LayoutManager")) ), uno::UNO_QUERY_THROW );
- rtl::OUString url(RTL_CONSTASCII_USTRINGPARAM( "private:resource/statusbar/statusbar" ));
- if( xLayoutManager.is() && xLayoutManager->isElementVisible( url ) ){
- return sal_True;
- }
- }
- return sal_False;
-}
-
-void
-ScVbaApplication::setDisplayStatusBar(sal_Bool bDisplayStatusBar) throw (uno::RuntimeException)
-{
- uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
- uno::Reference< frame::XFrame > xFrame( xModel->getCurrentController()->getFrame(), uno::UNO_QUERY_THROW );
- uno::Reference< beans::XPropertySet > xProps( xFrame, uno::UNO_QUERY_THROW );
-
- if( xProps.is() ){
- uno::Reference< frame::XLayoutManager > xLayoutManager( xProps->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LayoutManager")) ), uno::UNO_QUERY_THROW );
- rtl::OUString url(RTL_CONSTASCII_USTRINGPARAM( "private:resource/statusbar/statusbar" ));
- if( xLayoutManager.is() ){
- if( bDisplayStatusBar && !xLayoutManager->isElementVisible( url ) ){
- if( !xLayoutManager->showElement( url ) )
- xLayoutManager->createElement( url );
- return;
- }
- else if( !bDisplayStatusBar && xLayoutManager->isElementVisible( url ) ){
- xLayoutManager->hideElement( url );
- return;
- }
- }
- }
- return;
-}
-
uno::Any SAL_CALL
ScVbaApplication::Workbooks( const uno::Any& aIndex ) throw (uno::RuntimeException)
{
@@ -319,7 +257,7 @@ ScVbaApplication::Evaluate( const ::rtl::OUString& Name ) throw (uno::RuntimeExc
uno::Any
ScVbaApplication::Dialogs( const uno::Any &aIndex ) throw (uno::RuntimeException)
{
- uno::Reference< excel::XDialogs > xDialogs( new ScVbaDialogs( uno::Reference< XHelperInterface >( ScVbaGlobals::getGlobalsImpl( mxContext )->getApplication(), uno::UNO_QUERY_THROW ), mxContext ) );
+ uno::Reference< excel::XDialogs > xDialogs( new ScVbaDialogs( uno::Reference< XHelperInterface >( this ), mxContext, getCurrentDocument() ) );
if( !aIndex.hasValue() )
return uno::Any( xDialogs );
return uno::Any( xDialogs->Item( aIndex ) );
@@ -341,12 +279,6 @@ ScVbaApplication::getCutCopyMode() throw (uno::RuntimeException)
return result;
}
-::rtl::OUString
-ScVbaApplication::getVersion() throw (uno::RuntimeException)
-{
- return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(EXCELVERSION));
-}
-
void SAL_CALL
ScVbaApplication::setCutCopyMode( const uno::Any& /*_cutcopymode*/ ) throw (uno::RuntimeException)
{
@@ -432,7 +364,7 @@ ScVbaApplication::setCalculation( ::sal_Int32 _calculation ) throw (uno::Runtime
uno::Any SAL_CALL
ScVbaApplication::Windows( const uno::Any& aIndex ) throw (uno::RuntimeException)
{
- uno::Reference< XCollection > xWindows = ScVbaWindows::Windows( mxContext );
+ uno::Reference< excel::XWindows > xWindows( new ScVbaWindows( this, mxContext ) );
if ( aIndex.getValueTypeClass() == uno::TypeClass_VOID )
return uno::Any( xWindows );
return uno::Any( xWindows->Item( aIndex, uno::Any() ) );
@@ -543,11 +475,11 @@ ScVbaApplication::GoTo( const uno::Any& Reference, const uno::Any& Scroll ) thro
xModel->getCurrentController(), uno::UNO_QUERY_THROW );
uno::Reference< sheet::XSpreadsheet > xDoc = xSpreadsheet->getActiveSheet();
- ScTabViewShell* pShell = getCurrentBestViewShell();
+ ScTabViewShell* pShell = excel::getCurrentBestViewShell( mxContext );
ScGridWindow* gridWindow = (ScGridWindow*)pShell->GetWindow();
try
{
- uno::Reference< excel::XRange > xVbaSheetRange = ScVbaRange::getRangeObjectForName( mxContext, sRangeName, getDocShell( xModel ), formula::FormulaGrammar::CONV_XL_R1C1 );
+ uno::Reference< excel::XRange > xVbaSheetRange = ScVbaRange::getRangeObjectForName( mxContext, sRangeName, excel::getDocShell( xModel ), formula::FormulaGrammar::CONV_XL_R1C1 );
;
if( bScroll )
{
@@ -585,7 +517,7 @@ ScVbaApplication::GoTo( const uno::Any& Reference, const uno::Any& Scroll ) thro
if( Reference >>= xRange )
{
uno::Reference< excel::XRange > xVbaRange( Reference, uno::UNO_QUERY );
- ScTabViewShell* pShell = getCurrentBestViewShell();
+ ScTabViewShell* pShell = excel::getCurrentBestViewShell( mxContext );
ScGridWindow* gridWindow = (ScGridWindow*)pShell->GetWindow();
if ( xVbaRange.is() )
{
@@ -615,38 +547,10 @@ ScVbaApplication::GoTo( const uno::Any& Reference, const uno::Any& Scroll ) thro
uno::Reference< uno::XInterface >() );
}
-namespace
-{
- static uno::Reference< frame::XController > lcl_getCurrentController()
- {
- const uno::Reference< frame::XModel > xWorkingDoc( SfxObjectShell::GetCurrentComponent(), uno::UNO_QUERY );
- uno::Reference< frame::XController > xController;
- if ( xWorkingDoc.is() )
- xController.set( xWorkingDoc->getCurrentController(), uno::UNO_SET_THROW );
- else
- xController.set( SfxObjectShell::GetCurrentComponent(), uno::UNO_QUERY_THROW );
- return xController;
- }
-}
-
sal_Int32 SAL_CALL
ScVbaApplication::getCursor() throw (uno::RuntimeException)
{
- sal_Int32 nPointerStyle( POINTER_ARROW );
- try
- {
- const uno::Reference< frame::XController > xController( lcl_getCurrentController(), uno::UNO_SET_THROW );
- const uno::Reference< frame::XFrame > xFrame ( xController->getFrame(), uno::UNO_SET_THROW );
- const uno::Reference< awt::XWindow > xWindow ( xFrame->getContainerWindow(), uno::UNO_SET_THROW );
- // why the heck isn't there an XWindowPeer::getPointer, but a setPointer only?
- const Window* pWindow = VCLUnoHelper::GetWindow( xWindow );
- if ( pWindow )
- nPointerStyle = pWindow->GetSystemWindow()->GetPointer().GetStyle();
- }
- catch( const uno::Exception& )
- {
- DBG_UNHANDLED_EXCEPTION();
- }
+ sal_Int32 nPointerStyle = getPointerStyle(getCurrentDocument());
switch( nPointerStyle )
{
@@ -668,81 +572,34 @@ ScVbaApplication::setCursor( sal_Int32 _cursor ) throw (uno::RuntimeException)
{
try
{
- ::std::vector< uno::Reference< frame::XController > > aControllers;
-
- const uno::Reference< frame::XModel2 > xModel2( SfxObjectShell::GetCurrentComponent(), uno::UNO_QUERY );
- if ( xModel2.is() )
- {
- const uno::Reference< container::XEnumeration > xEnumControllers( xModel2->getControllers(), uno::UNO_SET_THROW );
- while ( xEnumControllers->hasMoreElements() )
- {
- const uno::Reference< frame::XController > xController( xEnumControllers->nextElement(), uno::UNO_QUERY_THROW );
- aControllers.push_back( xController );
- }
- }
- else
+ uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
+ switch( _cursor )
{
- const uno::Reference< frame::XModel > xModel( SfxObjectShell::GetCurrentComponent(), uno::UNO_QUERY );
- if ( xModel.is() )
+ case excel::XlMousePointer::xlNorthwestArrow:
{
- const uno::Reference< frame::XController > xController( xModel->getCurrentController(), uno::UNO_SET_THROW );
- aControllers.push_back( xController );
+ const Pointer& rPointer( POINTER_ARROW );
+ setCursorHelper( xModel, rPointer, sal_False );
+ break;
}
- else
+ case excel::XlMousePointer::xlWait:
+ case excel::XlMousePointer::xlIBeam:
{
- const uno::Reference< frame::XController > xController( SfxObjectShell::GetCurrentComponent(), uno::UNO_QUERY_THROW );
- aControllers.push_back( xController );
+ const Pointer& rPointer( static_cast< PointerStyle >( _cursor ) );
+ //It will set the edit window, toobar and statusbar's mouse pointer.
+ setCursorHelper( xModel, rPointer, sal_True );
+ break;
}
- }
-
- for ( ::std::vector< uno::Reference< frame::XController > >::const_iterator controller = aControllers.begin();
- controller != aControllers.end();
- ++controller
- )
- {
- const uno::Reference< frame::XFrame > xFrame ( (*controller)->getFrame(), uno::UNO_SET_THROW );
- const uno::Reference< awt::XWindow > xWindow ( xFrame->getContainerWindow(), uno::UNO_SET_THROW );
-
- Window* pWindow = VCLUnoHelper::GetWindow( xWindow );
- OSL_ENSURE( pWindow, "ScVbaApplication::setCursor: no window!" );
- if ( !pWindow )
- continue;
-
- switch( _cursor )
+ case excel::XlMousePointer::xlDefault:
{
- case excel::XlMousePointer::xlNorthwestArrow:
- {
- const Pointer& rPointer( POINTER_ARROW );
- pWindow->GetSystemWindow()->SetPointer( rPointer );
- pWindow->GetSystemWindow()->EnableChildPointerOverwrite( sal_False );
- break;
- }
- case excel::XlMousePointer::xlWait:
- case excel::XlMousePointer::xlIBeam:
- {
- const Pointer& rPointer( static_cast< PointerStyle >( _cursor ) );
- //It will set the edit window, toobar and statusbar's mouse pointer.
- pWindow->GetSystemWindow()->SetPointer( rPointer );
- pWindow->GetSystemWindow()->EnableChildPointerOverwrite( sal_True );
- //It only set the edit window's mouse pointer
- //pWindow->.SetPointer( rPointer );
- //pWindow->.EnableChildPointerOverwrite( sal_True );
- //printf("\nset Cursor...%d\n", pWindow->.GetType());
- break;
- }
- case excel::XlMousePointer::xlDefault:
- {
- const Pointer& rPointer( POINTER_NULL );
- pWindow->GetSystemWindow()->SetPointer( rPointer );
- pWindow->GetSystemWindow()->EnableChildPointerOverwrite( sal_False );
- break;
- }
- default:
- throw uno::RuntimeException( rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("Unknown value for Cursor pointer")), uno::Reference< uno::XInterface >() );
- // TODO: isn't this a flaw in the API? It should be allowed to throw an
- // IllegalArgumentException, or so
+ const Pointer& rPointer( POINTER_NULL );
+ setCursorHelper( xModel, rPointer, sal_False );
+ break;
}
+ default:
+ throw uno::RuntimeException( rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("Unknown value for Cursor pointer")), uno::Reference< uno::XInterface >() );
+ // TODO: isn't this a flaw in the API? It should be allowed to throw an
+ // IllegalArgumentException, or so
}
}
catch( const uno::Exception& )
@@ -1117,7 +974,7 @@ ScVbaApplication::Intersect( const uno::Reference< excel::XRange >& Arg1, const
}
uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
- ScDocShell* pDocShell = getDocShell( xModel );
+ ScDocShell* pDocShell = excel::getDocShell( xModel );
if ( aCellRanges.Count() == 1 )
{
xRefRange = new ScVbaRange( uno::Reference< XHelperInterface >(), mxContext, new ScCellRangeObj( pDocShell, *aCellRanges.First() ) );
@@ -1206,7 +1063,7 @@ ScVbaApplication::Union( const uno::Reference< excel::XRange >& Arg1, const uno:
aCellRanges.Append( *it );
uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
- ScDocShell* pDocShell = getDocShell( xModel );
+ ScDocShell* pDocShell = excel::getDocShell( xModel );
if ( aCellRanges.Count() == 1 )
{
// normal range
@@ -1228,29 +1085,17 @@ ScVbaApplication::Volatile( const uno::Any& aVolatile ) throw ( uno::RuntimeExc
sal_Bool bVolatile = sal_True;
aVolatile >>= bVolatile;
return;
-/*
- if ( bVolatile )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Volatile - not supported" ) ), uno::Reference< uno::XInterface >() );
- // bVoloatile is false - currently this only would make sense if
- // the autocalculate mode is set to be true.
-
- // so really this is crap, #TODO try and understand how ( or if )
- // the calculation mode and volatile interoperate
- if ( ! getCalculation() == excel::XlCalculation::xlCalculationAutomatic )
- setCalculation( excel::XlCalculation::xlCalculationAutomatic );
-*/
}
void SAL_CALL
ScVbaApplication::DoEvents() throw ( uno::RuntimeException )
{
}
-
::sal_Bool SAL_CALL
ScVbaApplication::getDisplayFormulaBar() throw ( css::uno::RuntimeException )
{
sal_Bool bRes = sal_False;
- ScTabViewShell* pViewShell = getCurrentBestViewShell();
+ ScTabViewShell* pViewShell = excel::getCurrentBestViewShell( mxContext );
if ( pViewShell )
{
SfxBoolItem sfxFormBar( FID_TOGGLEINPUTLINE);
@@ -1268,7 +1113,7 @@ ScVbaApplication::getDisplayFormulaBar() throw ( css::uno::RuntimeException )
void SAL_CALL
ScVbaApplication::setDisplayFormulaBar( ::sal_Bool _displayformulabar ) throw ( css::uno::RuntimeException )
{
- ScTabViewShell* pViewShell = getCurrentBestViewShell();
+ ScTabViewShell* pViewShell = excel::getCurrentBestViewShell( mxContext );
if ( pViewShell && ( _displayformulabar != getDisplayFormulaBar() ) )
{
SfxBoolItem sfxFormBar( FID_TOGGLEINPUTLINE, _displayformulabar);
@@ -1278,6 +1123,31 @@ ScVbaApplication::setDisplayFormulaBar( ::sal_Bool _displayformulabar ) throw (
}
}
+uno::Any SAL_CALL
+ScVbaApplication::Caller( const uno::Any& /*aIndex*/ ) throw ( uno::RuntimeException )
+{
+ StarBASIC* pBasic = SFX_APP()->GetBasic();
+ SFX_APP()->EnterBasicCall();
+ SbMethod* pMeth = (SbMethod*)pBasic->GetRtl()->Find( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FuncCaller") ), SbxCLASS_METHOD );
+ uno::Any aRet;
+ if ( pMeth )
+ {
+ SbxVariableRef refTemp = pMeth;
+ // forces a broadcast
+ SbxVariableRef pNew = new SbxMethod( *((SbxMethod*)pMeth));
+ OSL_TRACE("pNew has type %d and string value %s", pNew->GetType(), rtl::OUStringToOString( pNew->GetString(), RTL_TEXTENCODING_UTF8 ).getStr() );
+ aRet = sbxToUnoValue( pNew );
+ }
+ SFX_APP()->LeaveBasicCall();
+ return aRet;
+}
+
+uno::Reference< frame::XModel >
+ScVbaApplication::getCurrentDocument() throw (css::uno::RuntimeException)
+{
+ return getCurrentExcelDoc(mxContext);
+}
+
rtl::OUString&
ScVbaApplication::getServiceImplName()
{
@@ -1296,3 +1166,13 @@ ScVbaApplication::getServiceNames()
}
return aServiceNames;
}
+
+namespace application
+{
+namespace sdecl = comphelper::service_decl;
+sdecl::vba_service_class_<ScVbaApplication, sdecl::with_args<false> > serviceImpl;
+extern sdecl::ServiceDecl const serviceDecl(
+ serviceImpl,
+ "ScVbaApplication",
+ "ooo.vba.excel.Application" );
+}
diff --git a/sc/source/ui/vba/vbaapplication.hxx b/sc/source/ui/vba/vbaapplication.hxx
index dd828298fe2a..8d5f4a3b2354 100644
--- a/sc/source/ui/vba/vbaapplication.hxx
+++ b/sc/source/ui/vba/vbaapplication.hxx
@@ -35,21 +35,25 @@
#include <ooo/vba/excel/XApplication.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include "vbahelperinterface.hxx"
+#include <vbahelper/vbahelperinterface.hxx>
+#include <vbahelper/vbaapplicationbase.hxx>
+#include <cppuhelper/implbase1.hxx>
-typedef InheritedHelperInterfaceImpl1< ov::excel::XApplication > ScVbaApplication_BASE;
+//typedef InheritedHelperInterfaceImpl1< ov::excel::XApplication > ScVbaApplication_BASE;
+typedef cppu::ImplInheritanceHelper1< VbaApplicationBase, ov::excel::XApplication > ScVbaApplication_BASE;
class ScVbaApplication : public ScVbaApplication_BASE
{
private:
sal_Int32 m_xCalculation;
rtl::OUString getOfficePath( const rtl::OUString& sPath ) throw ( css::uno::RuntimeException );
+protected:
+ virtual css::uno::Reference< css::frame::XModel > getCurrentDocument() throw (css::uno::RuntimeException);
public:
- ScVbaApplication( css::uno::Reference< css::uno::XComponentContext >& m_xContext );
+ ScVbaApplication( const css::uno::Reference< css::uno::XComponentContext >& m_xContext );
virtual ~ScVbaApplication();
- // XHelperInterface ( parent is itself )
- virtual css::uno::Reference< ov::XHelperInterface > SAL_CALL getParent( ) throw (css::script::BasicErrorException, css::uno::RuntimeException) { return this; }
+ virtual SfxObjectShell* GetDocShell( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException);
// XApplication
virtual ::rtl::OUString SAL_CALL PathSeparator( ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
@@ -68,15 +72,10 @@ public:
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL getActiveCell() throw ( css::uno::RuntimeException);
virtual css::uno::Reference< ov::excel::XWindow > SAL_CALL getActiveWindow() throw (css::uno::RuntimeException);
virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL getActiveSheet() throw (css::uno::RuntimeException);
- virtual sal_Bool SAL_CALL getScreenUpdating() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setScreenUpdating(sal_Bool bUpdate) throw (css::uno::RuntimeException);
- virtual sal_Bool SAL_CALL getDisplayStatusBar() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setDisplayStatusBar(sal_Bool bDisplayStatusBar) throw (css::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL getDisplayFormulaBar() throw ( css::uno::RuntimeException );
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::Any SAL_CALL CommandBars( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
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);
@@ -85,7 +84,6 @@ public:
virtual css::uno::Any SAL_CALL Dialogs( const css::uno::Any& DialogIndex ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL getCutCopyMode() throw (css::uno::RuntimeException);
virtual void SAL_CALL setCutCopyMode( const css::uno::Any& _cutcopymode ) throw (css::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getVersion() throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL getStatusBar() throw (css::uno::RuntimeException);
virtual void SAL_CALL setStatusBar( const css::uno::Any& _statusbar ) throw (css::uno::RuntimeException);
virtual ::sal_Int32 SAL_CALL getCursor() throw (css::uno::RuntimeException);
@@ -103,6 +101,7 @@ public:
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);
// XHelperInterface
virtual rtl::OUString& getServiceImplName();
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
diff --git a/sc/source/ui/vba/vbaassistant.hxx b/sc/source/ui/vba/vbaassistant.hxx
index a91d1bfd9c39..fa811f548430 100644
--- a/sc/source/ui/vba/vbaassistant.hxx
+++ b/sc/source/ui/vba/vbaassistant.hxx
@@ -40,8 +40,8 @@
#include <sfx2/sfxhelp.hxx>
-#include "vbahelper.hxx"
-#include "vbahelperinterface.hxx"
+#include "excelvbahelper.hxx"
+#include <vbahelper/vbahelperinterface.hxx>
typedef ::cppu::WeakImplHelper1< ov::XAssistant > Assistant;
typedef InheritedHelperInterfaceImpl< Assistant > ScVbaAssistantImpl_BASE;
diff --git a/sc/source/ui/vba/vbaaxes.hxx b/sc/source/ui/vba/vbaaxes.hxx
index e0bfbe350acb..62be9ba97a39 100644
--- a/sc/source/ui/vba/vbaaxes.hxx
+++ b/sc/source/ui/vba/vbaaxes.hxx
@@ -32,7 +32,7 @@
#include <ooo/vba/excel/XAxes.hpp>
#include <ooo/vba/excel/XAxis.hpp>
#include <ooo/vba/excel/XChart.hpp>
-#include "vbacollectionimpl.hxx"
+#include <vbahelper/vbacollectionimpl.hxx>
typedef CollTestImplHelper< ov::excel::XAxes > ScVbaAxes_BASE;
class ScVbaAxes : public ScVbaAxes_BASE
diff --git a/sc/source/ui/vba/vbaaxis.hxx b/sc/source/ui/vba/vbaaxis.hxx
index b8fafed82ee1..72ff614805e4 100644
--- a/sc/source/ui/vba/vbaaxis.hxx
+++ b/sc/source/ui/vba/vbaaxis.hxx
@@ -32,8 +32,8 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <ooo/vba/excel/XAxis.hpp>
#include <ooo/vba/excel/XChart.hpp>
-#include "vbahelperinterface.hxx"
-
+#include <vbahelper/vbahelperinterface.hxx>
+#include <memory>
typedef InheritedHelperInterfaceImpl1< ov::excel::XAxis > ScVbaAxis_BASE;
class ScVbaChart;
class ScVbaAxis : public ScVbaAxis_BASE
diff --git a/sc/source/ui/vba/vbaborders.hxx b/sc/source/ui/vba/vbaborders.hxx
index bcaecff05aff..ec7deed20ebe 100644
--- a/sc/source/ui/vba/vbaborders.hxx
+++ b/sc/source/ui/vba/vbaborders.hxx
@@ -38,7 +38,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
-#include "vbacollectionimpl.hxx"
+#include <vbahelper/vbacollectionimpl.hxx>
typedef CollTestImplHelper< ov::excel::XBorders > ScVbaBorders_BASE;
class ScVbaPalette;
diff --git a/sc/source/ui/vba/vbabutton.cxx b/sc/source/ui/vba/vbabutton.cxx
deleted file mode 100644
index 4c21c70c88b5..000000000000
--- a/sc/source/ui/vba/vbabutton.cxx
+++ /dev/null
@@ -1,74 +0,0 @@
-/*************************************************************************
- *
- * 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: vbabutton.cxx,v $
- * $Revision: 1.3 $
- *
- * 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 "vbabutton.hxx"
-#include <vector>
-
-using namespace com::sun::star;
-using namespace ooo::vba;
-
-
-const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
-ScVbaButton::ScVbaButton( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ButtonImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
-{
-}
-
-// Attributes
-rtl::OUString SAL_CALL
-ScVbaButton::getCaption() throw (css::uno::RuntimeException)
-{
- rtl::OUString Label;
- m_xProps->getPropertyValue( LABEL ) >>= Label;
- return Label;
-}
-
-void SAL_CALL
-ScVbaButton::setCaption( const rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
-{
- m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
-}
-
-rtl::OUString&
-ScVbaButton::getServiceImplName()
-{
- static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaButton") );
- return sImplName;
-}
-
-uno::Sequence< rtl::OUString >
-ScVbaButton::getServiceNames()
-{
- static uno::Sequence< rtl::OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
- {
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.Button" ) );
- }
- return aServiceNames;
-}
diff --git a/sc/source/ui/vba/vbabutton.hxx b/sc/source/ui/vba/vbabutton.hxx
deleted file mode 100644
index a2ce28b3ba53..000000000000
--- a/sc/source/ui/vba/vbabutton.hxx
+++ /dev/null
@@ -1,51 +0,0 @@
-/*************************************************************************
- *
- * 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: vbabutton.hxx,v $
- * $Revision: 1.3 $
- *
- * 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_BUTTON_HXX
-#define SC_VBA_BUTTON_HXX
-#include <cppuhelper/implbase1.hxx>
-#include <ooo/vba/msforms/XButton.hpp>
-
-#include "vbacontrol.hxx"
-#include "vbahelper.hxx"
-
-typedef cppu::ImplInheritanceHelper1< ScVbaControl, ov::msforms::XButton > ButtonImpl_BASE;
-
-class ScVbaButton : public ButtonImpl_BASE
-{
-public:
- ScVbaButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper );
- // Attributes
- virtual rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setCaption( const rtl::OUString& _caption ) throw (css::uno::RuntimeException);
- //XHelperInterface
- virtual rtl::OUString& getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-};
-#endif //SC_VBA_BUTTON_HXX
diff --git a/sc/source/ui/vba/vbacharacters.hxx b/sc/source/ui/vba/vbacharacters.hxx
index 10fcfc5bbddf..092d80a91e02 100644
--- a/sc/source/ui/vba/vbacharacters.hxx
+++ b/sc/source/ui/vba/vbacharacters.hxx
@@ -36,7 +36,7 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/text/XSimpleText.hpp>
-#include "vbahelperinterface.hxx"
+#include <vbahelper/vbahelperinterface.hxx>
#include "vbapalette.hxx"
typedef InheritedHelperInterfaceImpl1< ov::excel::XCharacters > ScVbaCharacters_BASE;
diff --git a/sc/source/ui/vba/vbachart.hxx b/sc/source/ui/vba/vbachart.hxx
index 19efc430f2fd..3ec8e77c4dc5 100644
--- a/sc/source/ui/vba/vbachart.hxx
+++ b/sc/source/ui/vba/vbachart.hxx
@@ -41,7 +41,7 @@
#include <ooo/vba/excel/XChart.hpp>
#include <ooo/vba/excel/XDataLabels.hpp>
#include <ooo/vba/excel/XSeries.hpp>
-#include "vbahelperinterface.hxx"
+#include <vbahelper/vbahelperinterface.hxx>
typedef InheritedHelperInterfaceImpl1<ov::excel::XChart > ChartImpl_BASE;
diff --git a/sc/source/ui/vba/vbachartobject.cxx b/sc/source/ui/vba/vbachartobject.cxx
index feecb7182d97..85104ff20cde 100644
--- a/sc/source/ui/vba/vbachartobject.cxx
+++ b/sc/source/ui/vba/vbachartobject.cxx
@@ -120,10 +120,11 @@ ScVbaChartObject::Activate() throw ( script::BasicErrorException )
{
try
{
- // #TODO #FIXME should be ThisWorkbook or equivelant
- // XModel
+ // #TODO #FIXME should be ThisWorkbook or equivelant, or in
+ // fact probably the chart object should be created with
+ // the XModel owner
//uno::Reference< view::XSelectionSupplier > xSelectionSupplier( getXModel().getCurrentController());
- uno::Reference< view::XSelectionSupplier > xSelectionSupplier( getCurrentDocument()->getCurrentController(), uno::UNO_QUERY_THROW );
+ uno::Reference< view::XSelectionSupplier > xSelectionSupplier( getCurrentExcelDoc(mxContext)->getCurrentController(), uno::UNO_QUERY_THROW );
xSelectionSupplier->select(uno::makeAny(xShape));
}
catch (uno::Exception& )
diff --git a/sc/source/ui/vba/vbachartobject.hxx b/sc/source/ui/vba/vbachartobject.hxx
index 3b2b6b3469ec..c7bfbd15c4c1 100644
--- a/sc/source/ui/vba/vbachartobject.hxx
+++ b/sc/source/ui/vba/vbachartobject.hxx
@@ -36,7 +36,7 @@
#include <com/sun/star/container/XNamed.hpp>
#include <com/sun/star/document/XEmbeddedObjectSupplier.hpp>
#include <ooo/vba/excel/XChartObject.hpp>
-#include "vbahelperinterface.hxx"
+#include <vbahelper/vbahelperinterface.hxx>
#include <memory>
typedef InheritedHelperInterfaceImpl1<ov::excel::XChartObject > ChartObjectImpl_BASE;
diff --git a/sc/source/ui/vba/vbachartobjects.hxx b/sc/source/ui/vba/vbachartobjects.hxx
index a966dbb66518..5a11e92e8dbc 100644
--- a/sc/source/ui/vba/vbachartobjects.hxx
+++ b/sc/source/ui/vba/vbachartobjects.hxx
@@ -36,8 +36,8 @@
#include <com/sun/star/table/XTableCharts.hpp>
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
#include <com/sun/star/container/XEnumerationAccess.hpp>
-#include"vbacollectionimpl.hxx"
-#include "vbahelper.hxx"
+#include <vbahelper/vbacollectionimpl.hxx>
+#include "excelvbahelper.hxx"
#include <hash_map>
typedef CollTestImplHelper< ov::excel::XChartObjects > ChartObjects_BASE;
diff --git a/sc/source/ui/vba/vbacharts.cxx b/sc/source/ui/vba/vbacharts.cxx
index 73be2b84e6c6..4c21720ca7f3 100644
--- a/sc/source/ui/vba/vbacharts.cxx
+++ b/sc/source/ui/vba/vbacharts.cxx
@@ -35,11 +35,9 @@ using namespace ::com::sun::star;
using namespace ::ooo::vba;
-ScVbaCharts::ScVbaCharts( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext ) : Charts_BASE(_xParent, _xContext, uno::Reference< container::XIndexAccess >() )
+ScVbaCharts::ScVbaCharts( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const uno::Reference< frame::XModel >& xModel ) : Charts_BASE(_xParent, _xContext, uno::Reference< container::XIndexAccess >())
{
- // #TODO #FIXME surely this is wrong, you should never use the
- // currently documement ( it could be anything )
- xComponent.set( getCurrentDocument(), uno::UNO_QUERY_THROW );
+ xComponent.set( xModel, uno::UNO_QUERY_THROW );
xSpreadsheetDocument.set( xComponent, uno::UNO_QUERY_THROW );
}
diff --git a/sc/source/ui/vba/vbacharts.hxx b/sc/source/ui/vba/vbacharts.hxx
index f3bbf80f8d16..ac804e5ac873 100644
--- a/sc/source/ui/vba/vbacharts.hxx
+++ b/sc/source/ui/vba/vbacharts.hxx
@@ -31,8 +31,8 @@
#define SC_VBA_CHARTS_HXX
#include <ooo/vba/excel/XCharts.hpp>
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
-#include"vbacollectionimpl.hxx"
-#include "vbahelper.hxx"
+#include <vbahelper/vbacollectionimpl.hxx>
+#include "excelvbahelper.hxx"
#include <hash_map>
typedef CollTestImplHelper< ov::excel::XCharts > Charts_BASE;
@@ -43,7 +43,7 @@ class ScVbaCharts : public Charts_BASE
css::uno::Reference< css::sheet::XSpreadsheetDocument > xSpreadsheetDocument;
css::uno::Reference< css::lang::XComponent > xComponent;
public:
- ScVbaCharts( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext );
+ ScVbaCharts( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::frame::XModel >& xModel );
// XCharts
virtual css::uno::Any SAL_CALL Add() throw (css::script::BasicErrorException, css::uno::RuntimeException);
virtual css::uno::Reference< ov::excel::XChart > SAL_CALL getActiveChart( ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
diff --git a/sc/source/ui/vba/vbacheckbox.cxx b/sc/source/ui/vba/vbacheckbox.cxx
deleted file mode 100644
index 0a53d05f985f..000000000000
--- a/sc/source/ui/vba/vbacheckbox.cxx
+++ /dev/null
@@ -1,110 +0,0 @@
-/*************************************************************************
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile$
- *
- * $Revision$
- *
- * last change: $Author$ $Date$
- *
- * 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 2005 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
- *
- ************************************************************************/
-#include "vbacheckbox.hxx"
-#include <vector>
-
-using namespace com::sun::star;
-using namespace ooo::vba;
-
-
-const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
-const static rtl::OUString STATE( RTL_CONSTASCII_USTRINGPARAM("State") );
-ScVbaCheckbox::ScVbaCheckbox( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper ) : CheckBoxImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
-{
-}
-
-// Attributes
-rtl::OUString SAL_CALL
-ScVbaCheckbox::getCaption() throw (css::uno::RuntimeException)
-{
- rtl::OUString Label;
- m_xProps->getPropertyValue( LABEL ) >>= Label;
- return Label;
-}
-
-void SAL_CALL
-ScVbaCheckbox::setCaption( const rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
-{
- m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
-}
-
-uno::Any SAL_CALL
-ScVbaCheckbox::getValue() throw (css::uno::RuntimeException)
-{
- sal_Int16 nValue = -1;
- m_xProps->getPropertyValue( STATE ) >>= nValue;
- if( nValue != 0 )
- nValue = -1;
-// return uno::makeAny( nValue );
-// I must be missing something MSO says value should be -1 if selected, 0 if not
-// selected
- return uno::makeAny( ( nValue == -1 ) ? sal_True : sal_False );
-}
-
-void SAL_CALL
-ScVbaCheckbox::setValue( const uno::Any& _value ) throw (css::uno::RuntimeException)
-{
- sal_Int16 nValue = 0;
- sal_Bool bValue = false;
- if( _value >>= nValue )
- {
- if( nValue == -1)
- nValue = 1;
- }
- else if ( _value >>= bValue )
- {
- if ( bValue )
- nValue = 1;
- }
- m_xProps->setPropertyValue( STATE, uno::makeAny( nValue ) );
-}
-rtl::OUString&
-ScVbaCheckbox::getServiceImplName()
-{
- static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaCheckbox") );
- return sImplName;
-}
-
-uno::Sequence< rtl::OUString >
-ScVbaCheckbox::getServiceNames()
-{
- static uno::Sequence< rtl::OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
- {
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.CheckBox" ) );
- }
- return aServiceNames;
-}
diff --git a/sc/source/ui/vba/vbacheckbox.hxx b/sc/source/ui/vba/vbacheckbox.hxx
deleted file mode 100644
index 58805c6b4b7c..000000000000
--- a/sc/source/ui/vba/vbacheckbox.hxx
+++ /dev/null
@@ -1,60 +0,0 @@
-/*************************************************************************
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile$
- *
- * $Revision$
- *
- * last change: $Author$ $Date$
- *
- * 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 2005 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
- *
- ************************************************************************/
-#ifndef SC_VBA_CHECKBOX_HXX
-#define SC_VBA_CHECKBOX_HXX
-#include <cppuhelper/implbase2.hxx>
-#include <ooo/vba/msforms/XRadioButton.hpp>
-
-#include "vbacontrol.hxx"
-#include "vbahelper.hxx"
-
-typedef cppu::ImplInheritanceHelper2< ScVbaControl, ov::msforms::XRadioButton, css::script::XDefaultProperty > CheckBoxImpl_BASE;
-
-class ScVbaCheckbox : public CheckBoxImpl_BASE
-{
-public:
- ScVbaCheckbox( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper );
- // Attributes
- virtual rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setCaption( const rtl::OUString& _caption ) throw (css::uno::RuntimeException);
- virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
- // XDefaultProperty
- rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
- //XHelperInterface
- virtual rtl::OUString& getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-};
-#endif //SC_VBA_CHECKBOX_HXX
diff --git a/sc/source/ui/vba/vbacollectionimpl.cxx b/sc/source/ui/vba/vbacollectionimpl.cxx
deleted file mode 100644
index fdf7a2ebc976..000000000000
--- a/sc/source/ui/vba/vbacollectionimpl.cxx
+++ /dev/null
@@ -1,136 +0,0 @@
-/*************************************************************************
- *
- * 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: vbacollectionimpl.cxx,v $
- * $Revision: 1.3 $
- *
- * 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 <vbacollectionimpl.hxx>
-#include "vbaglobals.hxx"
-using namespace ::com::sun::star;
-using namespace ::ooo::vba;
-
-
-ScVbaCollectionBaseImpl::ScVbaCollectionBaseImpl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess ) throw (uno::RuntimeException) : m_xContext( xContext ), m_xIndexAccess( xIndexAccess )
-{
- m_xNameAccess.set( xIndexAccess, uno::UNO_QUERY );
-}
-
-uno::Any
-ScVbaCollectionBaseImpl::getItemByStringIndex( const rtl::OUString& sIndex ) throw (::uno::RuntimeException)
-{
- if ( !m_xNameAccess.is() )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScVbaCollectionBaseImpl string index access not supported by this object") ), uno::Reference< uno::XInterface >() );
-
- return createCollectionObject( m_xNameAccess->getByName( sIndex ) );
-}
-
-uno::Any
-ScVbaCollectionBaseImpl::getItemByIntIndex( const sal_Int32 nIndex ) throw (uno::RuntimeException)
-{
- if ( !m_xIndexAccess.is() )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScVbaCollectionBaseImpl numeric index access not supported by this object") ), uno::Reference< uno::XInterface >() );
- if ( nIndex <= 0 )
- {
- throw lang::IndexOutOfBoundsException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "index is 0 or negative" ) ),
- uno::Reference< uno::XInterface >() );
- }
- // need to adjust for vba index ( for which first element is 1 )
- return createCollectionObject( m_xIndexAccess->getByIndex( nIndex - 1 ) );
-}
-
-::sal_Int32 SAL_CALL
-ScVbaCollectionBaseImpl::getCount() throw (uno::RuntimeException)
-{
- return m_xIndexAccess->getCount();
-}
-
-uno::Any SAL_CALL
-ScVbaCollectionBaseImpl::getParent() throw (uno::RuntimeException)
-{
- // #TODO #FIXME investigate whether this makes sense
- uno::Reference< excel::XApplication > xApplication =
- ScVbaGlobals::getGlobalsImpl( m_xContext )->getApplication();
- uno::Reference< excel::XWorkbook > xWorkbook;
- if ( xApplication.is() )
- {
- xWorkbook = xApplication->getActiveWorkbook();
- }
- return uno::Any( xWorkbook );
-}
-
-::sal_Int32 SAL_CALL ScVbaCollectionBaseImpl::getCreator() throw (uno::RuntimeException)
-{
- // #TODO #FIXE some sort of implementation
- //SC_VBA_STUB();
- return 0;
-}
-uno::Reference< excel::XApplication > SAL_CALL ScVbaCollectionBaseImpl::getApplication() throw (uno::RuntimeException)
-{
- // #TODO #FIXME investigate whether this makes sense
- uno::Reference< excel::XApplication > xApplication =
- ScVbaGlobals::getGlobalsImpl( m_xContext )->getApplication();
- return xApplication;
-}
-
-uno::Any SAL_CALL ScVbaCollectionBaseImpl::Item( const uno::Any& aIndex ) throw (uno::RuntimeException)
-{
- if ( aIndex.getValueTypeClass() != uno::TypeClass_STRING )
- {
- sal_Int32 nIndex = 0;
-
- if ( ( aIndex >>= nIndex ) != sal_True )
- {
- rtl::OUString message;
- message = rtl::OUString::createFromAscii(
- "Couldn't convert index to Int32");
- throw lang::IndexOutOfBoundsException( message,
- uno::Reference< uno::XInterface >() );
- }
- return getItemByIntIndex( nIndex );
- }
- rtl::OUString aStringSheet;
-
- aIndex >>= aStringSheet;
- return getItemByStringIndex( aStringSheet );
-}
-
-::rtl::OUString SAL_CALL
-ScVbaCollectionBaseImpl::getDefaultMethodName( ) throw (css::uno::RuntimeException)
-{
- const static rtl::OUString sName( RTL_CONSTASCII_USTRINGPARAM("Item") );
- return sName;
-}
-
- // XElementAccess
-
-::sal_Bool SAL_CALL ScVbaCollectionBaseImpl::hasElements() throw (uno::RuntimeException)
-{
- return ( m_xIndexAccess->getCount() > 0 );
-}
-
-
diff --git a/sc/source/ui/vba/vbacollectionimpl.hxx b/sc/source/ui/vba/vbacollectionimpl.hxx
deleted file mode 100644
index 14fceb1b5f71..000000000000
--- a/sc/source/ui/vba/vbacollectionimpl.hxx
+++ /dev/null
@@ -1,259 +0,0 @@
-/*************************************************************************
- *
- * 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: vbacollectionimpl.hxx,v $
- * $Revision: 1.5 $
- *
- * 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_COLLECTION_IMPL_HXX
-#define SC_VBA_COLLECTION_IMPL_HXX
-
-#include <ooo/vba/XCollection.hpp>
-//#include <ooo/vba/XCollectionTest.hpp>
-#include <com/sun/star/container/XEnumerationAccess.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/script/XDefaultMethod.hpp>
-#include <com/sun/star/container/XIndexAccess.hpp>
-#include <com/sun/star/container/XNameAccess.hpp>
-#include <com/sun/star/container/XNamed.hpp>
-
-#include <cppuhelper/implbase3.hxx>
-#include <cppuhelper/implbase2.hxx>
-#include <cppuhelper/implbase1.hxx>
-
-#include "vbahelper.hxx"
-#include "vbahelperinterface.hxx"
-#include "vbaglobals.hxx"
-
-#include <vector>
-
-typedef ::cppu::WeakImplHelper1< css::container::XEnumeration > EnumerationHelper_BASE;
-
-class EnumerationHelperImpl : public EnumerationHelper_BASE
-{
-protected:
- css::uno::Reference< css::uno::XComponentContext > m_xContext;
- css::uno::Reference< css::container::XEnumeration > m_xEnumeration;
-public:
-
- EnumerationHelperImpl( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XEnumeration >& xEnumeration ) throw ( css::uno::RuntimeException ) : m_xContext( xContext ), m_xEnumeration( xEnumeration ) { }
- virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (css::uno::RuntimeException) { return m_xEnumeration->hasMoreElements(); }
-};
-
-// a wrapper class for a providing a XIndexAccess, XNameAccess, XEnumerationAccess impl based on providing a vector of interfaces
-// only requirement is the object needs to implement XName
-
-
-
-typedef ::cppu::WeakImplHelper3< css::container::XNameAccess, css::container::XIndexAccess, css::container::XEnumerationAccess > XNamedCollectionHelper_BASE;
-
-template< typename Ifc1 >
-class XNamedObjectCollectionHelper : public XNamedCollectionHelper_BASE
-{
-public:
-typedef std::vector< css::uno::Reference< Ifc1 > > XNamedVec;
-private:
-
- class XNamedEnumerationHelper : public EnumerationHelper_BASE
- {
- XNamedVec mXNamedVec;
- typename XNamedVec::iterator mIt;
- public:
- XNamedEnumerationHelper( const XNamedVec& sMap ) : mXNamedVec( sMap ), mIt( mXNamedVec.begin() ) {}
-
- virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (css::uno::RuntimeException)
- {
- return ( mIt != mXNamedVec.end() );
- }
-
- virtual css::uno::Any SAL_CALL nextElement( ) throw (css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException)
- {
- if ( hasMoreElements() )
- return css::uno::makeAny( *mIt++ );
- throw css::container::NoSuchElementException();
- }
- };
-
-protected:
- XNamedVec mXNamedVec;
- typename XNamedVec::iterator cachePos;
-public:
- XNamedObjectCollectionHelper( const XNamedVec& sMap ) : mXNamedVec( sMap ), cachePos(mXNamedVec.begin()) {}
- // XElementAccess
- virtual css::uno::Type SAL_CALL getElementType( ) throw (css::uno::RuntimeException) { return Ifc1::static_type(0); }
- virtual ::sal_Bool SAL_CALL hasElements( ) throw (css::uno::RuntimeException) { return ( mXNamedVec.size() > 0 ); }
- // XNameAcess
- virtual css::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException)
- {
- if ( !hasByName(aName) )
- throw css::container::NoSuchElementException();
- return css::uno::makeAny( *cachePos );
- }
- virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw (css::uno::RuntimeException)
- {
- css::uno::Sequence< rtl::OUString > sNames( mXNamedVec.size() );
- rtl::OUString* pString = sNames.getArray();
- typename XNamedVec::iterator it = mXNamedVec.begin();
- typename XNamedVec::iterator it_end = mXNamedVec.end();
-
- for ( ; it != it_end; ++it, ++pString )
- {
- css::uno::Reference< css::container::XNamed > xName( *it, css::uno::UNO_QUERY_THROW );
- *pString = xName->getName();
- }
- return sNames;
- }
- virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (css::uno::RuntimeException)
- {
- cachePos = mXNamedVec.begin();
- typename XNamedVec::iterator it_end = mXNamedVec.end();
- for ( ; cachePos != it_end; ++cachePos )
- {
- css::uno::Reference< css::container::XNamed > xName( *cachePos, css::uno::UNO_QUERY_THROW );
- if ( aName.equals( xName->getName() ) )
- break;
- }
- return ( cachePos != it_end );
- }
-
- // XElementAccess
- virtual ::sal_Int32 SAL_CALL getCount( ) throw (css::uno::RuntimeException) { return mXNamedVec.size(); }
- virtual css::uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (css::lang::IndexOutOfBoundsException, css::lang::WrappedTargetException, css::uno::RuntimeException )
- {
- if ( Index < 0 || Index >= getCount() )
- throw css::lang::IndexOutOfBoundsException();
-
- return css::uno::makeAny( mXNamedVec[ Index ] );
-
- }
- // XEnumerationAccess
- virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration( ) throw (css::uno::RuntimeException)
- {
- return new XNamedEnumerationHelper( mXNamedVec );
- }
-};
-
-// including a HelperInterface implementation
-template< typename Ifc1 >
-class ScVbaCollectionBase : public InheritedHelperInterfaceImpl< Ifc1 >
-{
-typedef InheritedHelperInterfaceImpl< Ifc1 > BaseColBase;
-protected:
- css::uno::Reference< css::container::XIndexAccess > m_xIndexAccess;
- css::uno::Reference< css::container::XNameAccess > m_xNameAccess;
-
- virtual css::uno::Any getItemByStringIndex( const rtl::OUString& sIndex ) throw (css::uno::RuntimeException)
- {
- if ( !m_xNameAccess.is() )
- throw css::uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScVbaCollectionBase string index access not supported by this object") ), css::uno::Reference< css::uno::XInterface >() );
-
- return createCollectionObject( m_xNameAccess->getByName( sIndex ) );
- }
-
- virtual css::uno::Any getItemByIntIndex( const sal_Int32 nIndex ) throw (css::uno::RuntimeException)
- {
- if ( !m_xIndexAccess.is() )
- throw css::uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScVbaCollectionBase numeric index access not supported by this object") ), css::uno::Reference< css::uno::XInterface >() );
- if ( nIndex <= 0 )
- {
- throw css::lang::IndexOutOfBoundsException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "index is 0 or negative" ) ),
- css::uno::Reference< css::uno::XInterface >() );
- }
- // need to adjust for vba index ( for which first element is 1 )
- return createCollectionObject( m_xIndexAccess->getByIndex( nIndex - 1 ) );
- }
-public:
- ScVbaCollectionBase( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess ) : BaseColBase( xParent, xContext ), m_xIndexAccess( xIndexAccess ){ m_xNameAccess.set(m_xIndexAccess, css::uno::UNO_QUERY); }
- //XCollection
- virtual ::sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException)
- {
- return m_xIndexAccess->getCount();
- }
-
- virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index1, const css::uno::Any& /*not processed in this base class*/ ) throw (css::uno::RuntimeException)
- {
- if ( Index1.getValueTypeClass() != css::uno::TypeClass_STRING )
- {
- sal_Int32 nIndex = 0;
-
- if ( ( Index1 >>= nIndex ) != sal_True )
- {
- rtl::OUString message;
- message = rtl::OUString::createFromAscii(
- "Couldn't convert index to Int32");
- throw css::lang::IndexOutOfBoundsException( message,
- css::uno::Reference< css::uno::XInterface >() );
- }
- return getItemByIntIndex( nIndex );
- }
- rtl::OUString aStringSheet;
-
- Index1 >>= aStringSheet;
- return getItemByStringIndex( aStringSheet );
- }
- // XDefaultMethod
- ::rtl::OUString SAL_CALL getDefaultMethodName( ) throw (css::uno::RuntimeException)
- {
- const static rtl::OUString sName( RTL_CONSTASCII_USTRINGPARAM("Item") );
- return sName;
- }
- // XEnumerationAccess
- virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException) = 0;
-
- // XElementAccess
- virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException) = 0;
- // XElementAccess
- virtual ::sal_Bool SAL_CALL hasElements() throw (css::uno::RuntimeException)
- {
- return ( m_xIndexAccess->getCount() > 0 );
- }
- virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ) = 0;
-
-};
-
-typedef ::cppu::WeakImplHelper1<ov::XCollection> XCollection_InterfacesBASE;
-
-typedef ScVbaCollectionBase< XCollection_InterfacesBASE > CollImplBase1;
-// compatible with the old collections ( pre XHelperInterface base class ) ( some internal objects still use this )
-class ScVbaCollectionBaseImpl : public CollImplBase1
-{
-public:
- ScVbaCollectionBaseImpl( const css::uno::Reference< ov::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess ) throw( css::uno::RuntimeException ) : CollImplBase1( xParent, xContext, xIndexAccess){}
-
-};
-
-template <typename Ifc> // where Ifc must implement XCollectionTest
-class CollTestImplHelper : public ScVbaCollectionBase< ::cppu::WeakImplHelper1< Ifc > >
-{
-typedef ScVbaCollectionBase< ::cppu::WeakImplHelper1< Ifc > > ImplBase1;
-
-public:
- CollTestImplHelper( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess ) throw( css::uno::RuntimeException ) : ImplBase1( xParent, xContext, xIndexAccess ) {}
-};
-
-
-#endif //SC_VBA_COLLECTION_IMPL_HXX
diff --git a/sc/source/ui/vba/vbacolorformat.cxx b/sc/source/ui/vba/vbacolorformat.cxx
deleted file mode 100644
index df918e9d15fc..000000000000
--- a/sc/source/ui/vba/vbacolorformat.cxx
+++ /dev/null
@@ -1,190 +0,0 @@
-/*************************************************************************
- *
- * 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: vbacolorformat.cxx,v $
- * $Revision: 1.3.146.1 $
- *
- * 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 <com/sun/star/beans/XPropertySet.hpp>
-#include <ooo/vba/msforms/XLineFormat.hpp>
-#include "vbacolorformat.hxx"
-
-using namespace ooo::vba;
-using namespace com::sun::star;
-
-sal_Int32
-MsoColorIndizes::getColorIndex( sal_Int32 nIndex )
-{
- const static sal_Int32 COLORINDIZES[56] =
- { HAPICOLOR_BLACK, HAPICOLOR_WITHE, HAPICOLOR_RED, HAPICOLOR_BRIGHTGREEN, HAPICOLOR_BLUE, HAPICOLOR_YELLOW, HAPICOLOR_PINK,
- HAPICOLOR_TURQUOISE, HAPICOLOR_DARKRED, HAPICOLOR_GREEN, HAPICOLOR_DARKBLUE, HAPICOLOR_DARKYELLOW, HAPICOLOR_VIOLET,
- HAPICOLOR_TEAL, HAPICOLOR_GRAY_25_PERCENT, HAPICOLOR_GRAY_50_PERCENT, HAPICOLOR_PERIWINCKLE, HAPICOLOR_PLUM,
- HAPICOLOR_IVORY, HAPICOLOR_LIGHTTURQUOISE, HAPICOLOR_DARKPRUPLE, HAPICOLOR_CORAL, HAPICOLOR_OCEANBLUE, HAPICOLOR_ICEBLUE,
- HAPICOLOR_GREEN, HAPICOLOR_PINK, HAPICOLOR_YELLOW, HAPICOLOR_TURQUOISE, HAPICOLOR_VIOLET, HAPICOLOR_DARKRED, HAPICOLOR_TEAL,
- HAPICOLOR_BLUE, HAPICOLOR_SKYBLUE, HAPICOLOR_LIGHTTURQUOISE, HAPICOLOR_LIGHTGREEN, HAPICOLOR_LIGHTYELLOW, HAPICOLOR_PALEBLUE,
- HAPICOLOR_ROSE, HAPICOLOR_LAVENDER, HAPICOLOR_TAN, HAPICOLOR_LIGHTBLUE, HAPICOLOR_AQUA, HAPICOLOR_LIME, HAPICOLOR_GOLD,
- HAPICOLOR_LIGHTORANGE, HAPICOLOR_ORANGE, HAPICOLOR_BLUEGRAY, HAPICOLOR_GRAY_40_PERCENT, HAPICOLOR_DARKTEAL,
- HAPICOLOR_SEAGREEN, HAPICOLOR_NONAME, HAPICOLOR_OLIVEGREEN, HAPICOLOR_BROWN, HAPICOLOR_PLUM, HAPICOLOR_INDIGO,
- HAPICOLOR_GRAY_80_PERCENT
- };
- return COLORINDIZES[nIndex];
-}
-ScVbaColorFormat::ScVbaColorFormat( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< XHelperInterface > xInternalParent, const uno::Reference< drawing::XShape > xShape, const sal_Int16 nColorFormatType ) : ScVbaColorFormat_BASE( xParent, xContext ), m_xInternalParent( xInternalParent ), m_xShape( xShape ), m_nColorFormatType( nColorFormatType )
-{
- m_xPropertySet.set( xShape, uno::UNO_QUERY_THROW );
- m_nFillFormatBackColor = 0;
- try
- {
- uno::Reference< ov::msforms::XFillFormat > xFillFormat( xInternalParent, uno::UNO_QUERY_THROW );
- m_pFillFormat = ( ScVbaFillFormat* )( xFillFormat.get() );
- }catch ( uno::RuntimeException e )
- {
- m_pFillFormat = NULL;
- }
-}
-
-void
-ScVbaColorFormat::setColorFormat( sal_Int16 _ntype )
-{
- m_nColorFormatType = _ntype;
-}
-
-// Attribute
-sal_Int32 SAL_CALL
-ScVbaColorFormat::getRGB() throw (uno::RuntimeException)
-{
- sal_Int32 nRGB = 0;
- switch( m_nColorFormatType )
- {
- case ColorFormatType::LINEFORMAT_FORECOLOR:
- m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("LineColor") ) >>= nRGB;
- break;
- case ColorFormatType::LINEFORMAT_BACKCOLOR:
- //TODO BackColor not supported
- // m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii("Color"), uno::makeAny( nRGB ) );
- break;
- case ColorFormatType::FILLFORMAT_FORECOLOR:
- m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("FillColor") ) >>= nRGB;
- break;
- case ColorFormatType::FILLFORMAT_BACKCOLOR:
- nRGB = m_nFillFormatBackColor;
- break;
- default:
- throw uno::RuntimeException( rtl::OUString::createFromAscii("Second parameter of ColorFormat is wrong."), uno::Reference< uno::XInterface >() );
- }
- nRGB = OORGBToXLRGB( nRGB );
- return nRGB;
-}
-
-void SAL_CALL
-ScVbaColorFormat::setRGB( sal_Int32 _rgb ) throw (uno::RuntimeException)
-{
- sal_Int32 nRGB = XLRGBToOORGB( _rgb );
- switch( m_nColorFormatType )
- {
- case ColorFormatType::LINEFORMAT_FORECOLOR:
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "LineColor" ), uno::makeAny( nRGB ) );
- break;
- case ColorFormatType::LINEFORMAT_BACKCOLOR:
- // TODO BackColor not supported
- break;
- case ColorFormatType::FILLFORMAT_FORECOLOR:
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "FillColor" ), uno::makeAny( nRGB ) );
- if( m_pFillFormat )
- {
- m_pFillFormat->setForeColorAndInternalStyle(nRGB);
- }
- break;
- case ColorFormatType::FILLFORMAT_BACKCOLOR:
- m_nFillFormatBackColor = nRGB;
- if( m_pFillFormat )
- {
- m_pFillFormat->setForeColorAndInternalStyle(nRGB);
- }
- break;
- default:
- throw uno::RuntimeException( rtl::OUString::createFromAscii("Second parameter of ColorFormat is wrong."), uno::Reference< uno::XInterface >() );
- }
-}
-
-sal_Int32 SAL_CALL
-ScVbaColorFormat::getSchemeColor() throw (uno::RuntimeException)
-{
- sal_Int32 nColor = getRGB();
- // #TODO I guess the number of elements is determined by the correct scheme
- // the implementation here seems to be a rehash of color index ( which seems to be a
- // different thing ) - I would guess we need to know/import etc. the correct color scheme
- // or at least find out a little more
- sal_Int32 i = 0;
- for( ; i < 56; i++ )
- {
- if( nColor == MsoColorIndizes::getColorIndex(i) )
- break;
- }
-
- if( i == 56 ) // this is most likely an error condition
- --i;
- return i;
- // #TODO figure out what craziness is this,
- // the 56 colors seems incorrect, as in default XL ( 2003 ) there are 80 colors
-/*
- if( i == 56 )
- {
- i = -2;
- }
-
- return ( i + 2 );
-*/
-}
-
-void SAL_CALL
-ScVbaColorFormat::setSchemeColor( sal_Int32 _schemecolor ) throw (uno::RuntimeException)
-{
- // the table is 0 based
- sal_Int32 nColor = MsoColorIndizes::getColorIndex( _schemecolor );
- // nColor is already xl RGB
- setRGB( nColor );
-}
-
-
-rtl::OUString&
-ScVbaColorFormat::getServiceImplName()
-{
- static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaColorFormat") );
- return sImplName;
-}
-
-uno::Sequence< rtl::OUString >
-ScVbaColorFormat::getServiceNames()
-{
- static uno::Sequence< rtl::OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
- {
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.ColorFormat" ) );
- }
- return aServiceNames;
-}
-
diff --git a/sc/source/ui/vba/vbacolorformat.hxx b/sc/source/ui/vba/vbacolorformat.hxx
deleted file mode 100644
index cff4f7c3719d..000000000000
--- a/sc/source/ui/vba/vbacolorformat.hxx
+++ /dev/null
@@ -1,128 +0,0 @@
-/*************************************************************************
- *
- * 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: vbacolorformat.hxx,v $
- * $Revision: 1.3.146.1 $
- *
- * 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_XCOLORFORMAT_HXX
-#define SC_VBA_XCOLORFORMAT_HXX
-
-#include <com/sun/star/drawing/XShape.hpp>
-#include <ooo/vba/msforms/XColorFormat.hpp>
-#include <ooo/vba/msforms/XFillFormat.hpp>
-#include "vbahelperinterface.hxx"
-#include "vbafillformat.hxx"
-
-typedef InheritedHelperInterfaceImpl1< ov::msforms::XColorFormat > ScVbaColorFormat_BASE;
-
-class ColorFormatType
-{
-public:
- const static sal_Int16 LINEFORMAT_FORECOLOR = 1;
- const static sal_Int16 LINEFORMAT_BACKCOLOR = 2;
- const static sal_Int16 FILLFORMAT_FORECOLOR = 3;
- const static sal_Int16 FILLFORMAT_BACKCOLOR = 4;
- const static sal_Int16 THREEDFORMAT_EXTRUSIONCOLOR = 5;
-};
-
-struct MsoColorIndizes
-{
- const static sal_Int32 HAPICOLOR_BLACK = 0;
- const static sal_Int32 HAPICOLOR_WITHE = 16777215;
- const static sal_Int32 HAPICOLOR_RED = 16711680;
- const static sal_Int32 HAPICOLOR_BRIGHTGREEN = 65280;
- const static sal_Int32 HAPICOLOR_BLUE = 255;
- const static sal_Int32 HAPICOLOR_YELLOW = 16776960;
- const static sal_Int32 HAPICOLOR_PINK = 16711935;
- const static sal_Int32 HAPICOLOR_TURQUOISE = 65535;
- const static sal_Int32 HAPICOLOR_DARKRED = 8388608;
- const static sal_Int32 HAPICOLOR_GREEN = 32768;
- const static sal_Int32 HAPICOLOR_DARKBLUE = 128;
- const static sal_Int32 HAPICOLOR_DARKYELLOW = 8421376;
- const static sal_Int32 HAPICOLOR_VIOLET = 8388736;
- const static sal_Int32 HAPICOLOR_TEAL = 32896;
- const static sal_Int32 HAPICOLOR_GRAY_25_PERCENT = 12632256;
- const static sal_Int32 HAPICOLOR_GRAY_50_PERCENT = 8421504;
- const static sal_Int32 HAPICOLOR_PERIWINCKLE = 10066431;
- const static sal_Int32 HAPICOLOR_PLUM = 10040166;
- const static sal_Int32 HAPICOLOR_IVORY = 16777164;
- const static sal_Int32 HAPICOLOR_LIGHTTURQUOISE = 13434879;
- const static sal_Int32 HAPICOLOR_DARKPRUPLE = 6684774;
- const static sal_Int32 HAPICOLOR_CORAL = 16744576;
- const static sal_Int32 HAPICOLOR_OCEANBLUE = 26316;
- const static sal_Int32 HAPICOLOR_ICEBLUE = 13421823;
- const static sal_Int32 HAPICOLOR_SKYBLUE = 52479;
- const static sal_Int32 HAPICOLOR_LIGHTGREEN = 13434828;
- const static sal_Int32 HAPICOLOR_LIGHTYELLOW = 16777113;
- const static sal_Int32 HAPICOLOR_PALEBLUE = 10079487;
- const static sal_Int32 HAPICOLOR_ROSE = 16751052;
- const static sal_Int32 HAPICOLOR_LAVENDER = 13408767;
- const static sal_Int32 HAPICOLOR_TAN = 16764057;
- const static sal_Int32 HAPICOLOR_LIGHTBLUE = 3368703;
- const static sal_Int32 HAPICOLOR_AQUA = 3394764;
- const static sal_Int32 HAPICOLOR_LIME = 10079232;
- const static sal_Int32 HAPICOLOR_GOLD = 16763904;
- const static sal_Int32 HAPICOLOR_LIGHTORANGE = 16750848;
- const static sal_Int32 HAPICOLOR_ORANGE = 16737792;
- const static sal_Int32 HAPICOLOR_BLUEGRAY = 6710937;
- const static sal_Int32 HAPICOLOR_GRAY_40_PERCENT = 9868950;
- const static sal_Int32 HAPICOLOR_DARKTEAL = 13158;
- const static sal_Int32 HAPICOLOR_SEAGREEN = 3381606;
- const static sal_Int32 HAPICOLOR_NONAME = 13056;
- const static sal_Int32 HAPICOLOR_OLIVEGREEN = 3355392;
- const static sal_Int32 HAPICOLOR_BROWN = 10040064;
- const static sal_Int32 HAPICOLOR_INDIGO = 3355545;
- const static sal_Int32 HAPICOLOR_GRAY_80_PERCENT = 3355443;
-
- static sal_Int32 getColorIndex( sal_Int32 nIndex );
-
-};
-
-class ScVbaColorFormat : public ScVbaColorFormat_BASE
-{
-private:
- css::uno::Reference< ov::XHelperInterface > m_xInternalParent;
- css::uno::Reference< css::drawing::XShape > m_xShape;
- css::uno::Reference< css::beans::XPropertySet > m_xPropertySet;
- ScVbaFillFormat *m_pFillFormat;
- sal_Int16 m_nColorFormatType;
- sal_Int32 m_nFillFormatBackColor;
-protected:
- virtual rtl::OUString& getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
- void setColorFormat( sal_Int16 nType );
-public:
- ScVbaColorFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< ov::XHelperInterface > xInternalParent, const css::uno::Reference< css::drawing::XShape > xShape, const sal_Int16 nColorFormatType );
-
- // Attributes
- virtual sal_Int32 SAL_CALL getRGB() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setRGB( sal_Int32 _rgb ) throw (css::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getSchemeColor() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setSchemeColor( sal_Int32 _schemecolor ) throw (css::uno::RuntimeException);
-
-};
-
-#endif//SC_VBA_XCOLORFORMAT_HXX
diff --git a/sc/source/ui/vba/vbacombobox.cxx b/sc/source/ui/vba/vbacombobox.cxx
deleted file mode 100644
index e13ab7d7bf2d..000000000000
--- a/sc/source/ui/vba/vbacombobox.cxx
+++ /dev/null
@@ -1,175 +0,0 @@
-/*************************************************************************
- *
- * 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: vbacombobox.cxx,v $
- * $Revision: 1.4 $
- *
- * 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 "vbacombobox.hxx"
-#include <vector>
-
-using namespace com::sun::star;
-using namespace ooo::vba;
-
-
-//SelectedItems list of integer indexes
-//StringItemList list of items
-
-const static rtl::OUString TEXT( RTL_CONSTASCII_USTRINGPARAM("Text") );
-const static rtl::OUString SELECTEDITEMS( RTL_CONSTASCII_USTRINGPARAM("SelectedItems") );
-const static rtl::OUString ITEMS( RTL_CONSTASCII_USTRINGPARAM("StringItemList") );
-const static rtl::OUString CONTROLSOURCEPROP( RTL_CONSTASCII_USTRINGPARAM("DataFieldProperty") );
-
-ScVbaComboBox::ScVbaComboBox( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper, bool bDialogType ) : ComboBoxImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper ), mbDialogType( bDialogType )
-{
- mpListHelper.reset( new ListControlHelper( m_xProps ) );
- // grab the default value property name
- m_xProps->getPropertyValue( CONTROLSOURCEPROP ) >>= sSourceName;
-}
-
-// Attributes
-
-
-// Value, [read] e.g. getValue returns the value of ooo Text propery e.g. the value in
-// the drop down
-uno::Any SAL_CALL
-ScVbaComboBox::getValue() throw (uno::RuntimeException)
-{
- return m_xProps->getPropertyValue( sSourceName );
-}
-
-void SAL_CALL
-ScVbaComboBox::setListIndex( const uno::Any& _value ) throw (uno::RuntimeException)
-{
- uno::Sequence< sal_Int16 > sSelection(1);
- _value >>= sSelection[ 0 ];
- m_xProps->setPropertyValue( SELECTEDITEMS, uno::makeAny( sSelection ) );
-}
-
-uno::Any SAL_CALL
-ScVbaComboBox::getListIndex() throw (uno::RuntimeException)
-{
- uno::Sequence< rtl::OUString > sItems;
- m_xProps->getPropertyValue( ITEMS ) >>= sItems;
- // should really return the item that has focus regardless of
- // it been selected
- if ( sItems.getLength() > 0 )
- {
- rtl::OUString sText = getText();
- sal_Int32 nLen = sItems.getLength();
- for ( sal_Int32 index = 0; sText.getLength() && index < nLen; ++index )
- {
- if ( sItems[ index ].equals( sText ) )
- {
- OSL_TRACE("getListIndex returning %d", index );
- return uno::makeAny( index );
- }
-
- }
- }
- OSL_TRACE("getListIndex returning %d", -1 );
- return uno::makeAny( sal_Int32( -1 ) );
-}
-
-// Value, [write]e.g. setValue sets the value in the drop down, and if the value is one
-// of the values in the list then the selection is also set
-void SAL_CALL
-ScVbaComboBox::setValue( const uno::Any& _value ) throw (uno::RuntimeException)
-{
- m_xProps->setPropertyValue( sSourceName, _value );
-}
-
-// see Value
-
-::rtl::OUString SAL_CALL
-ScVbaComboBox::getText() throw (uno::RuntimeException)
-{
- rtl::OUString result;
- getValue() >>= result;
- return result;
-}
-
-void SAL_CALL
-ScVbaComboBox::setText( const ::rtl::OUString& _text ) throw (uno::RuntimeException)
-{
- setValue( uno::makeAny( _text ) ); // seems the same
-}
-
-// Methods
-void SAL_CALL
-ScVbaComboBox::AddItem( const uno::Any& pvargItem, const uno::Any& pvargIndex ) throw (uno::RuntimeException)
-{
- mpListHelper->AddItem( pvargItem, pvargIndex );
-}
-
-void SAL_CALL
-ScVbaComboBox::removeItem( const uno::Any& index ) throw (uno::RuntimeException)
- {
- mpListHelper->removeItem( index );
-}
-
-void SAL_CALL
-ScVbaComboBox::Clear( ) throw (uno::RuntimeException)
- {
- mpListHelper->Clear();
- }
-
-void SAL_CALL
-ScVbaComboBox::setRowSource( const rtl::OUString& _rowsource ) throw (css::uno::RuntimeException)
-{
- ScVbaControl::setRowSource( _rowsource );
- mpListHelper->setRowSource( _rowsource );
- }
-
-sal_Int32 SAL_CALL
-ScVbaComboBox::getListCount() throw (uno::RuntimeException)
-{
- return mpListHelper->getListCount();
-}
-
-uno::Any SAL_CALL
-ScVbaComboBox::List( const ::uno::Any& pvargIndex, const uno::Any& pvarColumn ) throw (uno::RuntimeException)
-{
- return mpListHelper->List( pvargIndex, pvarColumn );
- }
-
-rtl::OUString&
-ScVbaComboBox::getServiceImplName()
-{
- static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaComboBox") );
- return sImplName;
-}
-
-uno::Sequence< rtl::OUString >
-ScVbaComboBox::getServiceNames()
-{
- static uno::Sequence< rtl::OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
- {
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.ComboBox" ) );
- }
- return aServiceNames;
-}
diff --git a/sc/source/ui/vba/vbacombobox.hxx b/sc/source/ui/vba/vbacombobox.hxx
deleted file mode 100644
index d1cf47c9c7b2..000000000000
--- a/sc/source/ui/vba/vbacombobox.hxx
+++ /dev/null
@@ -1,80 +0,0 @@
-/*************************************************************************
- *
- * 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: vbacombobox.hxx,v $
- * $Revision: 1.4 $
- *
- * 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_COMBOBOX_HXX
-#define SC_VBA_COMBOBOX_HXX
-#include <cppuhelper/implbase2.hxx>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/script/XDefaultProperty.hpp>
-#include <ooo/vba/msforms/XComboBox.hpp>
-#include <comphelper/proparrhlp.hxx>
-#include <comphelper/propertycontainer.hxx>
-#include <com/sun/star/beans/PropertyAttribute.hpp>
-
-#include "vbacontrol.hxx"
-#include "vbalistcontrolhelper.hxx"
-#include "vbahelper.hxx"
-
-typedef cppu::ImplInheritanceHelper2<ScVbaControl, ov::msforms::XComboBox, css::script::XDefaultProperty > ComboBoxImpl_BASE;
-class ScVbaComboBox : public ComboBoxImpl_BASE
-{
- std::auto_ptr< ListControlHelper > mpListHelper;
- rtl::OUString sSourceName;
- rtl::OUString msDftPropName;
- bool mbDialogType;
-
-public:
- ScVbaComboBox( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper, bool bDialogType = false );
-
- // Attributes
- virtual css::uno::Any SAL_CALL getListIndex() throw (css::uno::RuntimeException);
- virtual ::sal_Int32 SAL_CALL getListCount() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setListIndex( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
- virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setText( const ::rtl::OUString& _text ) throw (css::uno::RuntimeException);
-
- // Methods
- virtual void SAL_CALL AddItem( const css::uno::Any& pvargItem, const css::uno::Any& pvargIndex ) throw (css::uno::RuntimeException);
- virtual void SAL_CALL removeItem( const css::uno::Any& index ) throw (css::uno::RuntimeException);
- virtual void SAL_CALL Clear( ) throw (css::uno::RuntimeException);
- virtual css::uno::Any SAL_CALL List( const css::uno::Any& pvargIndex, const css::uno::Any& pvarColumn ) throw (css::uno::RuntimeException);
- // XControl
- virtual void SAL_CALL setRowSource( const rtl::OUString& _rowsource ) throw (css::uno::RuntimeException);
-
- // XDefaultProperty
- ::rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
- //XHelperInterface
- virtual rtl::OUString& getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-};
-
-#endif //
diff --git a/sc/source/ui/vba/vbacommandbar.cxx b/sc/source/ui/vba/vbacommandbar.cxx
deleted file mode 100644
index ca463a4f746b..000000000000
--- a/sc/source/ui/vba/vbacommandbar.cxx
+++ /dev/null
@@ -1,329 +0,0 @@
-/*************************************************************************
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile$
- *
- * $Revision$
- *
- * last change: $Author$ $Date$
- *
- * 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 2005 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
- *
- ************************************************************************/
-#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
-#include <com/sun/star/frame/XFrame.hpp>
-#include <com/sun/star/frame/XDesktop.hpp>
-#include <com/sun/star/frame/XLayoutManager.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-
-#include "vbacommandbar.hxx"
-#include "vbacommandbarcontrols.hxx"
-#include "vbahelper.hxx"
-
-
-using namespace com::sun::star;
-using namespace ooo::vba;
-
-ScVbaCommandBar::ScVbaCommandBar( const uno::Reference< XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext, sal_Int32 nModuleType ) throw (uno::RuntimeException) : CommandBar_BASE( xParent, xContext )
-{
- // it's a menu bar
- // only supporting factory menus ( no custom menus )
- m_xParentHardRef.set( xParent, uno::UNO_QUERY_THROW );
- initCommandBar();
- switch( nModuleType )
- {
- case 0:
- m_sMenuModuleName = rtl::OUString::createFromAscii( "com.sun.star.sheet.SpreadsheetDocument" );
- break;
- case 1:
- m_sMenuModuleName = rtl::OUString::createFromAscii( "com.sun.star.text.TextDocument" );
- break;
- default:
- m_sMenuModuleName = rtl::OUString::createFromAscii( "com.sun.star.text.TextDocument" );
- }
- getMenuSettings();
- m_bIsMenu = sal_True;
- m_bCustom = sal_False;
-}
-ScVbaCommandBar::ScVbaCommandBar( const uno::Reference< XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext, rtl::OUString sToolBarName, sal_Bool bTemporary, sal_Bool bCreate ) throw (uno::RuntimeException) : CommandBar_BASE( xParent, xContext )
-{
- // it's a tool bar
- m_xParentHardRef.set( xParent, uno::UNO_QUERY_THROW );
- initCommandBar();
- m_bTemporary = bTemporary;
- m_bCreate = bCreate;
- // get OOo ToolBarName
- CommandBarNameMap::const_iterator iter = mCommandBarNameMap.find( sToolBarName.toAsciiLowerCase() );
- if( iter != mCommandBarNameMap.end() )
- {
- m_sToolBarName = iter->second;
- }
- else
- {
- m_sToolBarName = sToolBarName;
- }
- m_sUIName = m_sToolBarName;
- m_bIsMenu = sal_False;
- getToolBarSettings( m_sToolBarName );
-}
-void
-ScVbaCommandBar::initCommandBar() throw (uno::RuntimeException)
-{
- m_pScVbaCommandBars = dynamic_cast< ScVbaCommandBars* >( m_xParentHardRef.get() );
- if ( !m_pScVbaCommandBars )
- throw uno::RuntimeException( rtl::OUString::createFromAscii( "Parent needs to be a ScVbaCommandBars"), uno::Reference< uno::XInterface >() );
- m_bIsMenu = sal_False;
- m_bCustom = sal_False;
- m_bTemporary = sal_True;
- m_sToolBarName = rtl::OUString::createFromAscii("");
- m_sUIName = rtl::OUString::createFromAscii("");
- m_sMenuModuleName = rtl::OUString::createFromAscii( "com.sun.star.sheet.SpreadsheetDocument" );
-}
-void
-ScVbaCommandBar::getToolBarSettings( rtl::OUString sToolBarName ) throw( uno::RuntimeException )
-{
- rtl::OUString sFactoryToolBar = rtl::OUString::createFromAscii("private:resource/toolbar/") + sToolBarName.toAsciiLowerCase();
- rtl::OUString sCustomToolBar = rtl::OUString::createFromAscii("private:resource/toolbar/custom_toolbar_") + sToolBarName;
- uno::Reference< lang::XMultiServiceFactory > xMSF( mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
- uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xUICfgManagerSup( xMSF->createInstance(rtl::OUString::createFromAscii("com.sun.star.ui.ModuleUIConfigurationManagerSupplier") ), uno::UNO_QUERY_THROW );
- m_xUICfgManager.set( xUICfgManagerSup->getUIConfigurationManager( m_pScVbaCommandBars->GetModuleName() ), uno::UNO_QUERY_THROW );
- m_xUICfgPers.set( m_xUICfgManager, uno::UNO_QUERY_THROW );
- if( m_xUICfgManager->hasSettings( sFactoryToolBar ) )
- {
- // exsiting standard ToolBar
- m_xBarSettings.set( m_xUICfgManager->getSettings( sFactoryToolBar, sal_True ), uno::UNO_QUERY_THROW );
- m_sToolBarName = sFactoryToolBar;
- }
- else if( m_xUICfgManager->hasSettings( sCustomToolBar ) )
- {
- // exisiting custom ToolBar
- m_xBarSettings.set( m_xUICfgManager->getSettings( sCustomToolBar, sal_True ), uno::UNO_QUERY_THROW );
- m_sToolBarName = sCustomToolBar;
- m_bCustom = sal_True;
- }
- else if( m_bCreate )
- {
- // new custom ToolBar
- m_xBarSettings.set( m_xUICfgManager->createSettings(), uno::UNO_QUERY_THROW );
- m_sToolBarName = sCustomToolBar;
- m_bCustom = sal_True;
- addCustomBar();
- }
- else
- throw uno::RuntimeException( rtl::OUString::createFromAscii("ToolBar do not exist"), uno::Reference< uno::XInterface >() );
- if( m_pScVbaCommandBars->GetWindows()->hasByName( m_sToolBarName ) )
- {
- uno::Any aToolBar = m_pScVbaCommandBars->GetWindows()->getByName( m_sToolBarName );
- aToolBar >>= m_aToolBar;
- }
-}
-void
-ScVbaCommandBar::addCustomBar()
-{
- uno::Reference< beans::XPropertySet > xPropertySet( m_xBarSettings, uno::UNO_QUERY_THROW );
- xPropertySet->setPropertyValue(rtl::OUString::createFromAscii("UIName"), uno::makeAny( m_sUIName ));
-
- if( m_xUICfgManager->hasSettings(m_sToolBarName) )
- {
- m_xUICfgManager->replaceSettings( m_sToolBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
- }
- else
- {
- m_xUICfgManager->insertSettings( m_sToolBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
- }
- if( !m_bTemporary )
- {
- m_xUICfgPers->store();
- }
-}
-void
-ScVbaCommandBar::getMenuSettings()
-{
- try
- {
- rtl::OUString sMenuBar = rtl::OUString::createFromAscii( "private:resource/menubar/menubar" );
- uno::Reference< lang::XMultiServiceFactory > xMSF( mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
- uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xUICfgManagerSup( xMSF->createInstance(rtl::OUString::createFromAscii("com.sun.star.ui.ModuleUIConfigurationManagerSupplier") ), uno::UNO_QUERY_THROW );
- m_xUICfgManager.set( xUICfgManagerSup->getUIConfigurationManager( m_sMenuModuleName ), uno::UNO_QUERY_THROW );
- m_xUICfgPers.set( m_xUICfgManager, uno::UNO_QUERY_THROW );
- m_xBarSettings.set( m_xUICfgManager->getSettings( sMenuBar, sal_True ), uno::UNO_QUERY_THROW );
- }
- catch ( uno::Exception e)
- {
- OSL_TRACE( "getMenuSetting got a error\n" );
- }
-}
-::rtl::OUString SAL_CALL
-ScVbaCommandBar::getName() throw ( uno::RuntimeException )
-{
- // This will get a "NULL length string" when Name is not set.
- uno::Reference< beans::XPropertySet > xPropertySet( m_xBarSettings, uno::UNO_QUERY_THROW );
- uno::Any aName = xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("UIName") );
- rtl::OUString sName;
- aName >>= sName;
- if( sName.getLength() < 1 && !m_bIsMenu )
- {
- uno::Reference< container::XNameAccess > xNameAccess( m_pScVbaCommandBars->GetWindows(), uno::UNO_QUERY_THROW );
- if( xNameAccess->hasByName( m_sToolBarName ) )
- {
- beans::PropertyValues aToolBar;
- xNameAccess->getByName( m_sToolBarName ) >>= aToolBar;
- sal_Int32 nCount = aToolBar.getLength();
- beans::PropertyValue aPropertyValue;
- for( sal_Int32 i = 0; i < nCount; i++ )
- {
- aPropertyValue = aToolBar[i];
- if( aPropertyValue.Name.equals( rtl::OUString::createFromAscii("UIName") ) )
- {
- aPropertyValue.Value >>= sName;
- return sName;
- }
- }
- }
- }
- return sName;
-}
-void SAL_CALL
-ScVbaCommandBar::setName( const ::rtl::OUString& _name ) throw (uno::RuntimeException)
-{
- uno::Reference< beans::XPropertySet > xPropertySet( m_xBarSettings, uno::UNO_QUERY_THROW );
- xPropertySet->setPropertyValue( rtl::OUString::createFromAscii("UIName"), uno::makeAny( _name ) );
- uno::Reference< container::XIndexAccess > xIndexAccess( m_xBarSettings, uno::UNO_QUERY_THROW );
-
- if( m_xUICfgManager->hasSettings( m_sToolBarName ) )
- {
- m_xUICfgManager->replaceSettings( m_sToolBarName, xIndexAccess );
- }
- else
- {
- // toolbar not found
- }
- if( !m_bTemporary )
- {
- m_xUICfgPers->store();
- }
-}
-::sal_Bool SAL_CALL
-ScVbaCommandBar::getVisible() throw (uno::RuntimeException)
-{
- sal_Bool bVisible = sal_False;
- try
- {
- sal_Int32 i = 0;
- while( !m_aToolBar[i].Name.equals( rtl::OUString::createFromAscii( "Visible" ) ) )
- {
- i++;
- }
- m_aToolBar[i].Value >>= bVisible;
- }
- catch ( uno::Exception e )
- {
- }
- return bVisible;
-}
-void SAL_CALL
-ScVbaCommandBar::setVisible( ::sal_Bool _visible ) throw (uno::RuntimeException)
-{
- try
- {
- uno::Reference< frame::XFrame > xFrame( getCurrentDocument()->getCurrentController()->getFrame(), uno::UNO_QUERY_THROW );
- uno::Reference< beans::XPropertySet > xPropertySet( xFrame, uno::UNO_QUERY_THROW );
- uno::Reference< frame::XLayoutManager > xLayoutManager( xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("LayoutManager") ), uno::UNO_QUERY_THROW );
- if( _visible )
- {
- xLayoutManager->createElement( m_sToolBarName );
- xLayoutManager->showElement( m_sToolBarName );
- }
- else
- {
- xLayoutManager->hideElement( m_sToolBarName );
- xLayoutManager->destroyElement( m_sToolBarName );
- }
- }
- catch( uno::Exception e )
- {
- OSL_TRACE( "SetVisible get an exception\n" );
- }
-}
-void SAL_CALL
-ScVbaCommandBar::Delete( ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
-{
- if( m_bCustom )
- {
- if( m_xUICfgManager->hasSettings( m_sToolBarName ) )
- {
- m_xUICfgManager->removeSettings(m_sToolBarName);
- // make it permanent
- if( !m_bTemporary )
- {
- m_xUICfgPers->store();
- }
- }
- else
- {
- // toolbar not found
- // TODO throw Error
- }
- uno::Reference< container::XNameContainer > xNameContainer( m_pScVbaCommandBars->GetWindows(), uno::UNO_QUERY_THROW );
- if( xNameContainer->hasByName( m_sToolBarName ) )
- {
- xNameContainer->removeByName( m_sToolBarName );
- }
- }
-}
-uno::Any SAL_CALL
-ScVbaCommandBar::Controls( const uno::Any& aIndex ) throw (script::BasicErrorException, uno::RuntimeException)
-{
- sal_Int32 nIndex;
- uno::Reference< XCommandBarControls > xCommandBarControls( new ScVbaCommandBarControls( this, mxContext, uno::Reference< container::XIndexAccess >() ) );
- if( aIndex.hasValue() )
- {
- if( aIndex >>= nIndex )
- {
- uno::Reference< XCommandBarControl > xCommandBarControl( xCommandBarControls->Item( aIndex, uno::Any() ), uno::UNO_QUERY_THROW );
- return uno::makeAny( xCommandBarControl );
- }
- else
- throw uno::RuntimeException( rtl::OUString::createFromAscii( "invalid index" ), uno::Reference< uno::XInterface >() );
- }
- return uno::makeAny( xCommandBarControls );
-}
-rtl::OUString&
-ScVbaCommandBar::getServiceImplName()
-{
- static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaCommandBar") );
- return sImplName;
-}
-uno::Sequence<rtl::OUString>
-ScVbaCommandBar::getServiceNames()
-{
- static uno::Sequence< rtl::OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
- {
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.CommandBar" ) );
- }
- return aServiceNames;
-}
diff --git a/sc/source/ui/vba/vbacommandbar.hxx b/sc/source/ui/vba/vbacommandbar.hxx
deleted file mode 100644
index 303dc0ada798..000000000000
--- a/sc/source/ui/vba/vbacommandbar.hxx
+++ /dev/null
@@ -1,105 +0,0 @@
-/*************************************************************************
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile$
- *
- * $Revision$
- *
- * last change: $Author$ $Date$
- *
- * 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 2005 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
- *
- ************************************************************************/
-#ifndef SC_VBA_COMMANDBAR_HXX
-#define SC_VBA_COMMANDBAR_HXX
-
-#include <ooo/vba/XCommandBar.hpp>
-#include <com/sun/star/ui/XUIConfigurationManager.hpp>
-#include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
-#include <com/sun/star/container/XIndexContainer.hpp>
-#include <com/sun/star/beans/PropertyValues.hpp>
-
-#include "vbahelperinterface.hxx"
-#include "vbacommandbars.hxx"
-
-#include <map>
-typedef std::map< const rtl::OUString, rtl::OUString > CommandBarNameMap;
-typedef std::pair< const rtl::OUString, rtl::OUString > CommandBarNamePair;
-const CommandBarNamePair namePair[] = {
- CommandBarNamePair( rtl::OUString::createFromAscii("standard"), rtl::OUString::createFromAscii("standardbar") ),
- CommandBarNamePair( rtl::OUString::createFromAscii("formatting"), rtl::OUString::createFromAscii("formatobjectbar") ),
-};
-static const CommandBarNameMap mCommandBarNameMap( namePair, ( namePair + sizeof(namePair) / sizeof(namePair[0]) ) );
-
-
-typedef InheritedHelperInterfaceImpl1< ov::XCommandBar > CommandBar_BASE;
-
-class ScVbaCommandBar : public CommandBar_BASE
-{
-private:
- rtl::OUString m_sToolBarName;
- rtl::OUString m_sMenuModuleName;
- rtl::OUString m_sUIName;
- sal_Bool m_bTemporary;
- sal_Bool m_bIsMenu;
- sal_Bool m_bCustom;
- sal_Bool m_bCreate;
- ScVbaCommandBars* m_pScVbaCommandBars;
- css::beans::PropertyValues m_aToolBar;
- // hard reference for parent
- css::uno::Reference< ov::XHelperInterface > m_xParentHardRef;
- css::uno::Reference< css::ui::XUIConfigurationManager > m_xUICfgManager;
- css::uno::Reference< css::ui::XUIConfigurationPersistence > m_xUICfgPers;
- css::uno::Reference< css::container::XIndexContainer > m_xBarSettings;
- void initCommandBar() throw( css::uno::RuntimeException );
-protected:
- void getToolBarSettings( rtl::OUString sToolBarName ) throw( css::uno::RuntimeException );
- void getMenuSettings();
- void addCustomBar();
-public:
- ScVbaCommandBar( const css::uno::Reference< ov::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext > xContext, sal_Int32 nModuleType ) throw( css::uno::RuntimeException );
- ScVbaCommandBar( const css::uno::Reference< ov::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext > xContext, rtl::OUString sToolBarName, sal_Bool bTemporary, sal_Bool bCreate ) throw( css::uno::RuntimeException );
-
- sal_Bool IsMenu() { return m_bIsMenu; };
- css::uno::Reference< css::ui::XUIConfigurationManager > GetUICfgManager() { return m_xUICfgManager; };
- css::uno::Reference< css::ui::XUIConfigurationPersistence > GetUICfgPers() { return m_xUICfgPers; };
- css::uno::Reference< css::container::XIndexContainer > GetBarSettings() { return m_xBarSettings; };
- rtl::OUString GetToolBarName() { return m_sToolBarName; };
-
- // Attributes
- virtual ::rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setName( const ::rtl::OUString& _name ) throw (css::uno::RuntimeException);
- virtual ::sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setVisible( ::sal_Bool _visible ) throw (css::uno::RuntimeException);
-
- // Methods
- virtual void SAL_CALL Delete( ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
- virtual css::uno::Any SAL_CALL Controls( 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_COMMANDBAR_HXX
diff --git a/sc/source/ui/vba/vbacommandbarcontrol.cxx b/sc/source/ui/vba/vbacommandbarcontrol.cxx
deleted file mode 100644
index 74e38bffb81c..000000000000
--- a/sc/source/ui/vba/vbacommandbarcontrol.cxx
+++ /dev/null
@@ -1,403 +0,0 @@
-/*************************************************************************
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile$
- *
- * $Revision$
- *
- * last change: $Author$ $Date$
- *
- * 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 2005 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
- *
- ************************************************************************/
-#include "vbacommandbarcontrol.hxx"
-
-using namespace com::sun::star;
-using namespace ooo::vba;
-
-uno::Any lcl_getPropertyValue( beans::PropertyValues aPropertyValues, rtl::OUString sPropertyName )
-{
- sal_Int32 nCount = aPropertyValues.getLength();
- for( sal_Int32 i = 0; i < nCount; i++ )
- {
- if( aPropertyValues[i].Name.equalsIgnoreAsciiCase( sPropertyName ) )
- {
- return aPropertyValues[i].Value;
- }
- }
- return uno::Any();
-}
-
-beans::PropertyValues lcl_repalcePropertyValue( beans::PropertyValues aPropertyValues, rtl::OUString sPropertyName, uno::Any aValue )
-{
- sal_Int32 nCount = aPropertyValues.getLength();
- for( sal_Int32 i = 0; i < nCount; i++ )
- {
- if( aPropertyValues[i].Name.equalsIgnoreAsciiCase( sPropertyName ) )
- {
- aPropertyValues[i].Value = aValue;
- return aPropertyValues;
- }
- }
- return aPropertyValues;
-}
-
-ScVbaCommandBarControl::ScVbaCommandBarControl( const uno::Reference< XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext, rtl::OUString sName ) throw (uno::RuntimeException) : CommandBarControl_BASE( xParent, xContext ), m_sName( sName )
-{
- // exsiting CommandBarBarControl
- m_xParentHardRef.set( xParent, uno::UNO_QUERY_THROW );
- initObjects();
- if( m_xBarSettings->hasElements() )
- {
- ScVbaCommandBarControl* pParentCommandBarControl = m_pCommandBarControls->GetParentCommandBarControl();
- if( pParentCommandBarControl )
- {
- beans::PropertyValues aPropertyValues;
- pParentCommandBarControl->GetCurrentSettings()->getByIndex( pParentCommandBarControl->GetPosition() ) >>= aPropertyValues;
- pParentCommandBarControl->SetPropertyValues( aPropertyValues );
- m_xCurrentSettings.set( lcl_getPropertyValue( pParentCommandBarControl->GetPropertyValues(), rtl::OUString::createFromAscii( "ItemDescriptorContainer" ) ), uno::UNO_QUERY_THROW );
- }
- if( !m_xCurrentSettings.is() )
- {
- m_xCurrentSettings.set( m_xUICfgManager->getSettings( m_pCommandBarControls->GetParentToolBarName(), sal_True ), uno::UNO_QUERY_THROW );
- }
- for( sal_Int32 i = 0; i < m_xCurrentSettings->getCount(); i++ )
- {
- beans::PropertyValues aPropertyValuesTemp;
- m_xCurrentSettings->getByIndex( i ) >>= aPropertyValuesTemp;
- // Label always empty in OOo
- rtl::OUString sLabel;
- lcl_getPropertyValue( aPropertyValuesTemp, rtl::OUString::createFromAscii( "Label" ) ) >>= sLabel;
- if( sLabel.equalsIgnoreAsciiCase( sName ) )
- {
- m_nPosition = i;
- break;
- }
- // using CammandURL to find
- rtl::OUString sCommandURL;
- lcl_getPropertyValue( aPropertyValuesTemp, rtl::OUString::createFromAscii( "CommandURL" ) ) >>= sCommandURL;
- sal_Int32 nLastIndex = sCommandURL.lastIndexOf( rtl::OUString::createFromAscii(":") );
- if( ( nLastIndex != -1 ) && ( ( nLastIndex + 1 ) < sCommandURL.getLength() ) )
- {
- sCommandURL = sCommandURL.copy( nLastIndex + 1 );
- }
- if( sCommandURL.equalsIgnoreAsciiCase( sName ) )
- {
- m_nPosition = i;
- break;
- }
- }
- if( m_nPosition == -1 )
- throw uno::RuntimeException( rtl::OUString::createFromAscii("The CommandBarControl do not exist"), uno::Reference< uno::XInterface >() );
- }
- if( m_bIsMenu )
- {
- m_sBarName = rtl::OUString::createFromAscii("private:resource/menubar/menubar");
- }
- else
- {
- m_sBarName = m_pCommandBarControls->GetParentToolBarName();
- }
- m_bTemporary = sal_True;
-}
-ScVbaCommandBarControl::ScVbaCommandBarControl( const uno::Reference< XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext, rtl::OUString sName, rtl::OUString sCommand, sal_Int32 nPosition, sal_Bool bTemporary ) throw (uno::RuntimeException) : CommandBarControl_BASE( xParent, xContext ), m_nPosition( nPosition ), m_bTemporary( bTemporary )
-{
- m_xParentHardRef.set( xParent, uno::UNO_QUERY_THROW );
- initObjects();
- if( sName.getLength() > 0 )
- {
- m_sName = sName;
- }
- if( sCommand.getLength() > 0 )
- {
- m_sCommand = sCommand;
- }
- else
- {
- m_sCommand = rtl::OUString::createFromAscii("vnd.openoffice.org:") + sName;
- }
- if( m_bIsMenu )
- {
- m_sBarName = rtl::OUString::createFromAscii("private:resource/menubar/menubar");
- createNewMenuBarControl();
- }
- else
- {
- m_sBarName = m_pCommandBarControls->GetParentToolBarName();
- createNewToolBarControl();
- }
-}
-
-void
-ScVbaCommandBarControl::initObjects() throw (uno::RuntimeException)
-{
- m_pCommandBarControls = dynamic_cast< ScVbaCommandBarControls* >( m_xParentHardRef.get() );
- if( !m_pCommandBarControls )
- throw uno::RuntimeException( rtl::OUString::createFromAscii( "Parent needs to be a ScVbaCommandBarControls"), uno::Reference< uno::XInterface >() );
- m_xUICfgManager.set( m_pCommandBarControls->GetUICfgManager(), uno::UNO_QUERY_THROW );
- m_xUICfgPers.set( m_pCommandBarControls->GetUICfgPers(), uno::UNO_QUERY_THROW );
- m_xBarSettings.set( m_pCommandBarControls->GetBarSettings(), uno::UNO_QUERY_THROW );
- m_bIsMenu = m_pCommandBarControls->IsMenu();
- m_sName = rtl::OUString::createFromAscii( "Custom" );
- m_nPosition = -1;
-}
-
-void
-ScVbaCommandBarControl::createNewMenuBarControl()
-{
- uno::Sequence< beans::PropertyValue > aPropertys(4);
- aPropertys[0].Name = rtl::OUString::createFromAscii("CommandURL");
- aPropertys[0].Value <<= m_sCommand;
- aPropertys[1].Name = rtl::OUString::createFromAscii("Label");
- aPropertys[1].Value <<= m_sName;
- aPropertys[2].Name = rtl::OUString::createFromAscii("Type");
- aPropertys[2].Value <<= m_nType;
- aPropertys[3].Name = rtl::OUString::createFromAscii("ItemDescriptorContainer");
-
- m_xBarSettings->insertByIndex( m_nPosition, uno::makeAny( aPropertys ) );
- uno::Reference< beans::XPropertySet > xPropertySet( m_xBarSettings, uno::UNO_QUERY_THROW );
- rtl::OUString sUIName;
- xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("UIName") ) >>= sUIName;
-
- uno::Reference< lang::XSingleComponentFactory > xMenuMSF( m_xBarSettings, uno::UNO_QUERY_THROW );
- if( m_pCommandBarControls->GetParentCommandBar() != NULL )
- {
- // create a new menu
- m_xBarSettings->insertByIndex( m_nPosition, uno::makeAny( aPropertys ) );
- m_xCurrentSettings.set( m_xBarSettings, uno::UNO_QUERY_THROW );
- }
- else if( m_pCommandBarControls->GetParentCommandBarControl() != NULL )
- {
- // create a new menu entry
- // change the parent MenuItem to a PopupMenu
- ScVbaCommandBarControl* pPc = m_pCommandBarControls->GetParentCommandBarControl();
- beans::PropertyValues aPropertyValues;
- pPc->GetCurrentSettings()->getByIndex( pPc->GetPosition() ) >>= aPropertyValues;
- pPc->SetPropertyValues( aPropertyValues );
-
- // has the property already been set?
- if( lcl_getPropertyValue( pPc->GetPropertyValues(), rtl::OUString::createFromAscii("ItemDescriptorContainer") ).hasValue() )
- {
- lcl_repalcePropertyValue( pPc->GetPropertyValues(), rtl::OUString::createFromAscii("ItemDescriptorContainer"), uno::makeAny( xMenuMSF->createInstanceWithContext( mxContext ) ) );
- pPc->GetCurrentSettings()->replaceByIndex( pPc->GetPosition(), uno::makeAny( pPc->GetPropertyValues() ) );
- }
- m_xCurrentSettings.set( lcl_getPropertyValue( pPc->GetPropertyValues(), rtl::OUString::createFromAscii("ItemDescriptorContainer") ), uno::UNO_QUERY_THROW );
- m_xCurrentSettings->insertByIndex( m_nPosition, uno::makeAny( m_aPropertyValues ) );
- }
- if( m_xUICfgManager->hasSettings( m_sBarName ) )
- {
- m_xUICfgManager->replaceSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
- }
- else
- {
- m_xUICfgManager->insertSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
- }
- if( !m_bTemporary )
- {
- m_xUICfgPers->store();
- }
-}
-
-void
-ScVbaCommandBarControl::createNewToolBarControl()
-{
- uno::Sequence< beans::PropertyValue > aPropertys(4);
- aPropertys[0].Name = rtl::OUString::createFromAscii("CommandURL");
- aPropertys[0].Value <<= m_sCommand;
- aPropertys[1].Name = rtl::OUString::createFromAscii("Label");
- aPropertys[1].Value <<= m_sName;
- aPropertys[2].Name = rtl::OUString::createFromAscii("Type");
- aPropertys[2].Value <<= m_nType;
- aPropertys[3].Name = rtl::OUString::createFromAscii("IsVisible");
- aPropertys[3].Value <<= sal_True;
-
- m_xBarSettings->insertByIndex( m_nPosition, uno::makeAny( aPropertys ) );
- uno::Reference< beans::XPropertySet > xPropertySet( m_xBarSettings, uno::UNO_QUERY_THROW );
- rtl::OUString sUIName;
- xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("UIName") ) >>= sUIName;
-
- m_xCurrentSettings.set( m_xBarSettings, uno::UNO_QUERY_THROW );
- if( m_xUICfgManager->hasSettings( m_sBarName ) )
- {
- m_xUICfgManager->replaceSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
- }
- else
- {
- m_xUICfgManager->insertSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
- }
- if( !m_bTemporary )
- {
- m_xUICfgPers->store();
- }
-}
-
-::rtl::OUString SAL_CALL
-ScVbaCommandBarControl::getCaption() throw ( uno::RuntimeException )
-{
- // "Label" always empty
- rtl::OUString sCaption;
- beans::PropertyValues aPropertyValues;
- if( m_xCurrentSettings.is() )
- {
- m_xCurrentSettings->getByIndex( m_nPosition ) >>= aPropertyValues;
- lcl_getPropertyValue( aPropertyValues, rtl::OUString::createFromAscii("Label") ) >>= sCaption;
- }
- else if( m_xBarSettings.is() )
- {
- m_xBarSettings->getByIndex( m_nPosition ) >>= aPropertyValues;
- lcl_getPropertyValue( aPropertyValues, rtl::OUString::createFromAscii("Label") ) >>= sCaption;
- }
- return sCaption;
-}
-void SAL_CALL
-ScVbaCommandBarControl::setCaption( const ::rtl::OUString& _caption ) throw (uno::RuntimeException)
-{
- if( m_xCurrentSettings.is() )
- {
- beans::PropertyValues aPropertyValues;
- m_xCurrentSettings->getByIndex( m_nPosition ) >>= aPropertyValues;
- beans::PropertyValues aNewPropertyValues;
- aNewPropertyValues = lcl_repalcePropertyValue( aPropertyValues, rtl::OUString::createFromAscii("Label"), uno::makeAny( _caption ) );
- m_xCurrentSettings->replaceByIndex( m_nPosition, uno::makeAny( aNewPropertyValues ) );
- if( m_xUICfgManager->hasSettings( m_sBarName ) )
- {
- m_xUICfgManager->replaceSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
- }
- else
- {
- m_xUICfgManager->insertSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
- }
- // make it permanent
- if( !m_bTemporary )
- {
- m_xUICfgPers->store();
- }
- }
-}
-::rtl::OUString SAL_CALL
-ScVbaCommandBarControl::getOnAction() throw (uno::RuntimeException)
-{
- if( m_xCurrentSettings.is() )
- {
- beans::PropertyValues aPropertyValues;
- m_xCurrentSettings->getByIndex( m_nPosition ) >>= aPropertyValues;
- rtl::OUString sCommandURL;
- lcl_getPropertyValue( aPropertyValues, rtl::OUString::createFromAscii( "CommandURL" ) ) >>= sCommandURL;
- return sCommandURL;
- }
- return ::rtl::OUString();
-}
-void SAL_CALL
-ScVbaCommandBarControl::setOnAction( const ::rtl::OUString& _onaction ) throw (uno::RuntimeException)
-{
- if( m_xCurrentSettings.is() )
- {
- beans::PropertyValues aPropertyValues;
- m_xCurrentSettings->getByIndex( m_nPosition ) >>= aPropertyValues;
- beans::PropertyValues aNewPropertyValues;
- aNewPropertyValues = lcl_repalcePropertyValue( aPropertyValues, rtl::OUString::createFromAscii("CommandURL"), uno::makeAny( _onaction ) );
- m_xCurrentSettings->replaceByIndex( m_nPosition, uno::makeAny( aNewPropertyValues ) );
- if( m_xUICfgManager->hasSettings( m_sBarName ) )
- {
- m_xUICfgManager->replaceSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
- }
- else
- {
- m_xUICfgManager->insertSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
- }
- // make it permanent
- if( !m_bTemporary )
- {
- m_xUICfgPers->store();
- }
- }
-}
-::sal_Bool SAL_CALL
-ScVbaCommandBarControl::getVisible() throw (uno::RuntimeException)
-{
- // not possible in UNO?
- return sal_True;
-}
-void SAL_CALL
-ScVbaCommandBarControl::setVisible( ::sal_Bool /*_visible*/ ) throw (uno::RuntimeException)
-{
- // "IsVisilbe"
-}
-void SAL_CALL
-ScVbaCommandBarControl::Delete( ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
-{
- if( m_xCurrentSettings.is() )
- {
- m_xCurrentSettings->removeByIndex( m_nPosition );
-
- if( m_xUICfgManager->hasSettings( m_sBarName ) )
- {
- m_xUICfgManager->replaceSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
- }
- else
- {
- m_xUICfgManager->insertSettings( m_sBarName, uno::Reference< container::XIndexAccess > (m_xBarSettings, uno::UNO_QUERY_THROW ) );
- }
- // make it permanent
- if( !m_bTemporary )
- {
- m_xUICfgPers->store();
- }
- }
-}
-uno::Any SAL_CALL
-ScVbaCommandBarControl::Controls( const uno::Any& aIndex ) throw (script::BasicErrorException, uno::RuntimeException)
-{
- sal_Int32 nIndex;
- uno::Reference< XCommandBarControls > xCommandBarControls( new ScVbaCommandBarControls( this, mxContext, uno::Reference< container::XIndexAccess >() ) );
- if( aIndex.hasValue() )
- {
- if( aIndex >>= nIndex )
- {
- uno::Reference< XCommandBarControl > xCommandBarControl( xCommandBarControls->Item( aIndex, uno::Any() ), uno::UNO_QUERY_THROW );
- return uno::makeAny( xCommandBarControl );
- }
- else
- throw uno::RuntimeException( rtl::OUString::createFromAscii( "invalid index" ), uno::Reference< uno::XInterface >() );
- }
- return uno::makeAny( xCommandBarControls );
-}
-rtl::OUString&
-ScVbaCommandBarControl::getServiceImplName()
-{
- static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaCommandBarControl") );
- return sImplName;
-}
-uno::Sequence<rtl::OUString>
-ScVbaCommandBarControl::getServiceNames()
-{
- static uno::Sequence< rtl::OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
- {
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.CommandBarControl" ) );
- }
- return aServiceNames;
-}
diff --git a/sc/source/ui/vba/vbacommandbarcontrol.hxx b/sc/source/ui/vba/vbacommandbarcontrol.hxx
deleted file mode 100644
index a77c4b64b56f..000000000000
--- a/sc/source/ui/vba/vbacommandbarcontrol.hxx
+++ /dev/null
@@ -1,90 +0,0 @@
-/*************************************************************************
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile$
- *
- * $Revision$
- *
- * last change: $Author$ $Date$
- *
- * 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 2005 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
- *
- ************************************************************************/
-#ifndef SC_VBA_COMMANDBARCONTROL_HXX
-#define SC_VBA_COMMANDBARCONTROL_HXX
-
-#include <ooo/vba/XCommandBarControl.hpp>
-
-#include "vbahelperinterface.hxx"
-#include "vbacommandbarcontrols.hxx"
-
-typedef InheritedHelperInterfaceImpl1< ov::XCommandBarControl > CommandBarControl_BASE;
-
-class ScVbaCommandBarControl : public CommandBarControl_BASE
-{
-private:
- rtl::OUString m_sName;
- rtl::OUString m_sBarName;
- rtl::OUString m_sCommand;
- sal_Int32 m_nType;
- sal_Int32 m_nPosition;
- sal_Bool m_bTemporary;
- sal_Bool m_bIsMenu;
- ScVbaCommandBarControls* m_pCommandBarControls;
- css::uno::Reference< ov::XHelperInterface > m_xParentHardRef;
- css::uno::Reference< css::ui::XUIConfigurationManager > m_xUICfgManager;
- css::uno::Reference< css::ui::XUIConfigurationPersistence > m_xUICfgPers;
- css::uno::Reference< css::container::XIndexContainer > m_xBarSettings;
- css::uno::Reference< css::container::XIndexContainer > m_xCurrentSettings;
- css::beans::PropertyValues m_aPropertyValues;
-
- void initObjects() throw (css::uno::RuntimeException);
- void createNewMenuBarControl();
- void createNewToolBarControl();
-public:
- ScVbaCommandBarControl( const css::uno::Reference< ov::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext > xContext, rtl::OUString sName ) throw (css::uno::RuntimeException);
- ScVbaCommandBarControl( const css::uno::Reference< ov::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext > xContext, rtl::OUString sName, rtl::OUString sCommand, sal_Int32 nPosition, sal_Bool bTemporary ) throw (css::uno::RuntimeException);
- sal_Int32 GetPosition() { return m_nPosition; };
- css::uno::Reference< css::container::XIndexContainer > GetCurrentSettings() { return m_xCurrentSettings; };
- css::beans::PropertyValues GetPropertyValues() { return m_aPropertyValues; };
- void SetPropertyValues( css::beans::PropertyValues aPropertyValues ) { m_aPropertyValues = aPropertyValues; };
-
- // Attributes
- 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 ::sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setVisible( ::sal_Bool _visible ) throw (css::uno::RuntimeException);
-
- // Methods
- virtual void SAL_CALL Delete( ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
- virtual css::uno::Any SAL_CALL Controls( 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_COMMANDBARCONTROL_HXX
diff --git a/sc/source/ui/vba/vbacommandbarcontrols.cxx b/sc/source/ui/vba/vbacommandbarcontrols.cxx
deleted file mode 100644
index f40636369d95..000000000000
--- a/sc/source/ui/vba/vbacommandbarcontrols.cxx
+++ /dev/null
@@ -1,246 +0,0 @@
-/*************************************************************************
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile$
- *
- * $Revision$
- *
- * last change: $Author$ $Date$
- *
- * 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 2005 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
- *
- ************************************************************************/
-#include "vbacommandbarcontrols.hxx"
-#include "vbacommandbarcontrol.hxx"
-
-using namespace com::sun::star;
-using namespace ooo::vba;
-
-typedef ::cppu::WeakImplHelper1< container::XEnumeration > CommandBarControlEnumeration_BASE;
-class CommandBarControlEnumeration : public CommandBarControlEnumeration_BASE
-{
- //uno::Reference< uno::XComponentContext > m_xContext;
- ScVbaCommandBarControls* m_pCommandBarControls;
- sal_Int32 m_nCurrentPosition;
-public:
- CommandBarControlEnumeration( ScVbaCommandBarControls* pCommandBarControls ) : m_pCommandBarControls( pCommandBarControls ), m_nCurrentPosition( 0 ) {}
- virtual sal_Bool SAL_CALL hasMoreElements() throw ( uno::RuntimeException )
- {
- if( m_nCurrentPosition < m_pCommandBarControls->getCount() )
- return sal_True;
- return sal_False;
- }
- virtual uno::Any SAL_CALL nextElement() throw ( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException )
- {
- if( hasMoreElements() )
- {
- rtl::OUString sName = m_pCommandBarControls->GetControlNameByIndex( m_nCurrentPosition );
- m_nCurrentPosition = m_nCurrentPosition + 1;
- if( sName.getLength() > 0 )
- return m_pCommandBarControls->createCollectionObject( uno::makeAny( sName ) );
- else
- return nextElement();
- }
- else
- throw container::NoSuchElementException();
- }
-};
-
-ScVbaCommandBarControls::ScVbaCommandBarControls( const uno::Reference< XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext, const uno::Reference< container::XIndexAccess> xIndexAccess ) throw (uno::RuntimeException) : CommandBarControls_BASE( xParent, xContext, xIndexAccess )
-{
- m_bIsMenu = sal_False;
- m_bHasElements = sal_False;
- m_xParentHardRef.set( xParent, uno::UNO_QUERY_THROW );
- m_pCommandBar = dynamic_cast< ScVbaCommandBar* >( m_xParentHardRef.get() );
- m_pCommandBarControl = dynamic_cast< ScVbaCommandBarControl* >( m_xParentHardRef.get() );
- if( m_pCommandBar )
- {
- m_xUICfgManager.set( m_pCommandBar->GetUICfgManager(), uno::UNO_QUERY_THROW );
- m_xUICfgPers.set( m_pCommandBar->GetUICfgPers(), uno::UNO_QUERY_THROW );
- m_xBarSettings.set( m_pCommandBar->GetBarSettings(), uno::UNO_QUERY_THROW );
- m_bIsMenu = m_pCommandBar->IsMenu();
- if( m_xBarSettings->hasElements() )
- {
- m_bHasElements = sal_True;
- }
- }
- else if( m_pCommandBarControl )
- {
- }
- else
- {
- throw uno::RuntimeException( rtl::OUString::createFromAscii("Parent needs to be a ScVbaCommandBar or a ScVbaCommandBarControl"), uno::Reference< uno::XInterface >() );
- }
-}
-rtl::OUString
-ScVbaCommandBarControls::GetControlNameByIndex( const sal_Int32 nIndex ) throw ( uno::RuntimeException )
-{
- sal_Int32 nCount = 0;
- if( m_bHasElements )
- {
- sal_Int32 nBarSettingsCount = m_xBarSettings->getCount();
- for( sal_Int32 i = 0; i < nBarSettingsCount; i++ )
- {
- beans::PropertyValues aMenuValues;
- m_xBarSettings->getByIndex( i ) >>= aMenuValues;
- for( sal_Int32 j = 0; j < aMenuValues.getLength(); j++ )
- {
- if( aMenuValues[j].Name.equalsIgnoreAsciiCase( rtl::OUString::createFromAscii( "CommandURL" ) ) )
- {
- nCount++;
- if( nIndex == nCount )
- {
- rtl::OUString sCommandURL;
- aMenuValues[j].Value >>= sCommandURL;
- sal_Int32 nLastIndex = sCommandURL.lastIndexOf( rtl::OUString::createFromAscii(":") );
- if( ( nLastIndex != -1 ) && ( ( nLastIndex +1 ) < sCommandURL.getLength() ) )
- {
- sCommandURL = sCommandURL.copy( nLastIndex + 1 );
- return sCommandURL;
- }
- }
- }
- }
- }
- }
- else
- throw uno::RuntimeException( rtl::OUString::createFromAscii( "Out of bound" ), uno::Reference< uno::XInterface >() );
- return rtl::OUString();
-}
-
-// Attributes
-sal_Int32 SAL_CALL
-ScVbaCommandBarControls::getCount() throw (uno::RuntimeException)
-{
- sal_Int32 nCount = 0;
- if( m_bHasElements )
- {
- sal_Int32 nBarSettingsCount = m_xBarSettings->getCount();
- for( sal_Int32 i = 0; i < nBarSettingsCount; i++ )
- {
- beans::PropertyValues aMenuValues;
- m_xBarSettings->getByIndex( i ) >>= aMenuValues;
- for( sal_Int32 j = 0; j < aMenuValues.getLength(); j++ )
- {
- if( aMenuValues[j].Name.equalsIgnoreAsciiCase( rtl::OUString::createFromAscii( "CommandURL" ) ) )
- {
- nCount++;
- }
- }
- }
- }
- return nCount;
-}
-// XEnumerationAccess
-uno::Type SAL_CALL
-ScVbaCommandBarControls::getElementType() throw ( uno::RuntimeException )
-{
- return XCommandBarControls::static_type( 0 );
-}
-uno::Reference< container::XEnumeration >
-ScVbaCommandBarControls::createEnumeration() throw ( uno::RuntimeException )
-{
- return uno::Reference< container::XEnumeration >( new CommandBarControlEnumeration( this ) );
-}
-uno::Any
-ScVbaCommandBarControls::createCollectionObject( const uno::Any& aSource )
-{
- // only surport the aSource as a name string, because this class is a API wrapper
- rtl::OUString sName;
- if( aSource >>= sName )
- return uno::makeAny( uno::Reference< XCommandBarControl > ( new ScVbaCommandBarControl( this, mxContext, sName ) ) );
- return uno::Any();
-}
-
-// Methods
-uno::Any SAL_CALL
-ScVbaCommandBarControls::Item( const uno::Any& aIndex, const uno::Any& /*aIndex*/ ) throw (uno::RuntimeException)
-{
- if( aIndex.getValueTypeClass() == uno::TypeClass_STRING )
- {
- return createCollectionObject( aIndex );
- }
- sal_Int32 nIndex = 0;
- if( aIndex >>= nIndex )
- {
- return createCollectionObject( uno::makeAny( GetControlNameByIndex( nIndex ) ) );
- }
-
- return uno::Any();
-}
-uno::Reference< XCommandBarControl > SAL_CALL
-ScVbaCommandBarControls::Add( const uno::Any& Type, const uno::Any& Id, const uno::Any& /*Parameter*/, const uno::Any& Before, const uno::Any& Temporary ) throw (script::BasicErrorException, uno::RuntimeException)
-{
- // Parameter is not supported
- // the following name needs to be individually created;
- rtl::OUString sCaption( rtl::OUString::createFromAscii("custom Control") );
- rtl::OUString sCommand( rtl::OUString::createFromAscii("macro:///Standard.Module1.Test()") );
- sal_Int32 nType =0;
- sal_Int32 nPosition = 0;
- sal_Int32 nId;
- sal_Bool bTemporary = sal_True;
-
- if( Type.hasValue() )
- if( Type >>= nType )
- {
- // evalute the type of the new control
- }
- if( Id.hasValue() )
- if( Id >>= nId )
- {
- // evalute the action of the new control
- }
- if( Before.hasValue() )
- if( Before >>= nPosition )
- {
- // evalute the position of the new Control
- }
- if( Temporary.hasValue() )
- if( Temporary >>= bTemporary )
- {
- // evalute the temporary of the new Control
- }
- return uno::Reference< XCommandBarControl > ( new ScVbaCommandBarControl( this, mxContext, sCaption, sCommand, nPosition, bTemporary ) );
-}
-
-// XHelperInterface
-rtl::OUString&
-ScVbaCommandBarControls::getServiceImplName()
-{
- static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaCommandBarControls") );
- return sImplName;
-}
-uno::Sequence<rtl::OUString>
-ScVbaCommandBarControls::getServiceNames()
-{
- static uno::Sequence< rtl::OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
- {
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.CommandBarControls" ) );
- }
- return aServiceNames;
-}
-
diff --git a/sc/source/ui/vba/vbacommandbarcontrols.hxx b/sc/source/ui/vba/vbacommandbarcontrols.hxx
deleted file mode 100644
index 9243d55697d7..000000000000
--- a/sc/source/ui/vba/vbacommandbarcontrols.hxx
+++ /dev/null
@@ -1,90 +0,0 @@
-/*************************************************************************
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile$
- *
- * $Revision$
- *
- * last change: $Author$ $Date$
- *
- * 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 2005 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
- *
- ************************************************************************/
-#ifndef SC_VBA_COMMANDBARCONTROLS_HXX
-#define SC_VBA_COMMANDBARCONTROLS_HXX
-
-#include <ooo/vba/XCommandBarControls.hpp>
-
-#include "vbahelperinterface.hxx"
-#include "vbacommandbar.hxx"
-#include "vbacollectionimpl.hxx"
-
-class ScVbaCommandBarControl;
-
-typedef CollTestImplHelper< ov::XCommandBarControls > CommandBarControls_BASE;
-
-class ScVbaCommandBarControls : public CommandBarControls_BASE
-{
-private:
- sal_Bool m_bIsMenu;
- sal_Bool m_bHasElements;
- ScVbaCommandBar* m_pCommandBar;
- ScVbaCommandBarControl* m_pCommandBarControl;
- css::uno::Reference< ov::XHelperInterface > m_xParentHardRef;
- css::uno::Reference< css::ui::XUIConfigurationManager > m_xUICfgManager;
- css::uno::Reference< css::ui::XUIConfigurationPersistence > m_xUICfgPers;
- css::uno::Reference< css::container::XIndexContainer > m_xBarSettings;
-
-public:
- ScVbaCommandBarControls( const css::uno::Reference< ov::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext > xContext, const css::uno::Reference< css::container::XIndexAccess > xIndexAccess ) throw( css::uno::RuntimeException );
- css::uno::Reference< css::ui::XUIConfigurationManager > GetUICfgManager() { return m_xUICfgManager; };
- css::uno::Reference< css::ui::XUIConfigurationPersistence > GetUICfgPers() { return m_xUICfgPers; };
- css::uno::Reference< css::container::XIndexContainer > GetBarSettings() { return m_xBarSettings; };
- sal_Bool IsMenu() { return m_bIsMenu; };
- ScVbaCommandBar* GetParentCommandBar() { return m_pCommandBar; };
- ScVbaCommandBarControl* GetParentCommandBarControl() { return m_pCommandBarControl; };
- rtl::OUString GetParentToolBarName()
- {
- if( m_pCommandBar ) return m_pCommandBar->GetToolBarName();
- else return rtl::OUString();
- }
- rtl::OUString GetControlNameByIndex( const sal_Int32 nIndex ) throw ( css::uno::RuntimeException );
-
- // Attributes
- virtual ::sal_Int32 SAL_CALL getCount() 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 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::XCommandBarControl > SAL_CALL Add( const css::uno::Any& Type, const css::uno::Any& Id, const css::uno::Any& Parameter, const css::uno::Any& Before, const css::uno::Any& Temporary ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
- // XHelperInterface
- virtual rtl::OUString& getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-};
-
-#endif//SC_VBA_COMMANDBARCONTROLS_HXX
diff --git a/sc/source/ui/vba/vbacommandbars.cxx b/sc/source/ui/vba/vbacommandbars.cxx
deleted file mode 100644
index 101b62902460..000000000000
--- a/sc/source/ui/vba/vbacommandbars.cxx
+++ /dev/null
@@ -1,247 +0,0 @@
-/*************************************************************************
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile$
- *
- * $Revision$
- *
- * last change: $Author$ $Date$
- *
- * 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 2005 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
- *
- ************************************************************************/
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/frame/XDesktop.hpp>
-#include <com/sun/star/container/XNameAccess.hpp>
-
-#include "vbacommandbars.hxx"
-#include "vbacommandbar.hxx"
-
-using namespace com::sun::star;
-using namespace ooo::vba;
-
-typedef ::cppu::WeakImplHelper1< container::XEnumeration > CommandBarEnumeration_BASE;
-
-static rtl::OUString sSpreadsheetDocumentUrl( rtl::OUString::createFromAscii( "com.sun.star.sheet.SpreadsheetDocument" ) );
-static rtl::OUString sTextDocumentUrl( rtl::OUString::createFromAscii( "com.sun.star.text.TextDocument" ) );
-static rtl::OUString sWindowStateConfUrl( rtl::OUString::createFromAscii( "com.sun.star.ui.WindowStateConfiguration" ) );
-
-class CommandBarEnumeration : public CommandBarEnumeration_BASE
-{
- uno::Reference< uno::XComponentContext > m_xContext;
- uno::Reference< XCommandBars > m_xCommandBars;
- uno::Sequence< rtl::OUString > m_sNames;
- sal_Int32 m_nCurrentPosition;
-public:
- CommandBarEnumeration( const uno::Reference< uno::XComponentContext > xContext, const uno::Reference< XCommandBars > xCommandBars, const uno::Sequence< rtl::OUString > sNames ) : m_xContext( xContext ), m_xCommandBars( xCommandBars ), m_sNames( sNames ), m_nCurrentPosition( 0 )
- {
- }
- virtual sal_Bool SAL_CALL hasMoreElements() throw ( uno::RuntimeException )
- {
- if( m_nCurrentPosition < m_sNames.getLength() )
- return sal_True;
- return sal_False;
- }
- virtual uno::Any SAL_CALL nextElement() throw ( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException )
- {
- if( hasMoreElements() )
- {
- rtl::OUString sName( m_sNames[ m_nCurrentPosition ] );
- m_nCurrentPosition = m_nCurrentPosition + 1;
- if( sName.indexOf( rtl::OUString::createFromAscii("private:resource/toolbar/") ) != -1 )
- {
- sal_Int32 nLastIndex = sName.lastIndexOf( rtl::OUString::createFromAscii( "/" ) );
- if( ( nLastIndex != -1 ) && ( ( nLastIndex + 1 ) < sName.getLength() ) )
- {
- sName = sName.copy( nLastIndex + 1);
- if( sName.getLength() > 0 )
- {
- uno::Reference< XHelperInterface > xHelperInterface( m_xCommandBars, uno::UNO_QUERY_THROW );
- uno::Reference< XCommandBar > xCommandBar( new ScVbaCommandBar( xHelperInterface, m_xContext, sName, sal_True, sal_False ) );
- if( xCommandBar.is() )
- return uno::makeAny( xCommandBar );
- else
- return nextElement();
- }
- else
- return nextElement();
- }
- }
- else
- return nextElement();
- }
- else
- throw container::NoSuchElementException();
- return uno::Any();
- }
-};
-
-
-ScVbaCommandBars::ScVbaCommandBars( const uno::Reference< XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext, const uno::Reference< container::XIndexAccess > xIndexAccess ) : CommandBars_BASE( xParent, xContext, xIndexAccess )
-{
- retrieveObjects();
-}
-void
-ScVbaCommandBars::retrieveObjects() throw ( uno::RuntimeException )
-{
- uno::Reference< lang::XServiceInfo > xServiceInfo( getCurrentDocument(), uno::UNO_QUERY_THROW );
- if( xServiceInfo->supportsService( sSpreadsheetDocumentUrl ) )
- {
- m_sModuleName = sSpreadsheetDocumentUrl;
- }
- else if( xServiceInfo->supportsService( sTextDocumentUrl ) )
- {
- m_sModuleName = sTextDocumentUrl;
- }
- else
- throw uno::RuntimeException( rtl::OUString::createFromAscii( "Unsupported Document" ), uno::Reference< uno::XInterface >() );
-
- uno::Reference < lang::XMultiServiceFactory > xMSF( mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
- uno::Reference < container::XNameAccess > xNameAccess( xMSF->createInstance( sWindowStateConfUrl ), uno::UNO_QUERY_THROW );
- m_xNameAccess.set( xNameAccess->getByName( m_sModuleName ), uno::UNO_QUERY_THROW );
-}
-
-// XEnumerationAccess
-uno::Type SAL_CALL
-ScVbaCommandBars::getElementType() throw ( uno::RuntimeException )
-{
- return XCommandBars::static_type( 0 );
-}
-uno::Reference< container::XEnumeration >
-ScVbaCommandBars::createEnumeration() throw ( uno::RuntimeException )
-{
- return uno::Reference< container::XEnumeration >( new CommandBarEnumeration( mxContext, this, m_xNameAccess->getElementNames() ) );
-}
-
-uno::Any
-ScVbaCommandBars::createCollectionObject( const uno::Any& aSource )
-{
- // aSource should be a name at this time, because of the class is API wrapper.
- rtl::OUString sToolBarName;
- if( aSource >>= sToolBarName )
- {
- sToolBarName = sToolBarName.toAsciiLowerCase();
- if( sToolBarName.equalsIgnoreAsciiCase( rtl::OUString::createFromAscii("Worksheet Menu Bar") ) )
- {
- return uno::makeAny( uno::Reference< XCommandBar > ( new ScVbaCommandBar( this, mxContext, 0 ) ) );
- }
- else if( sToolBarName.equalsIgnoreAsciiCase( rtl::OUString::createFromAscii("Menu Bar") ) )
- {
- return uno::makeAny( uno::Reference< XCommandBar > ( new ScVbaCommandBar( this, mxContext, 1 ) ) );
- }
- else if( checkToolBarExist( sToolBarName ) )
- {
- return uno::makeAny( uno::Reference< XCommandBar > (new ScVbaCommandBar( this, mxContext, sToolBarName, sal_True, sal_False ) ) );
- }
- }
- return uno::Any();
-}
-
-// XCommandBars
-uno::Reference< XCommandBar > SAL_CALL
-ScVbaCommandBars::Add( const css::uno::Any& Name, const css::uno::Any& /*Position*/, const css::uno::Any& /*MenuBar*/, const css::uno::Any& Temporary ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
-{
- // Position - MsoBar MenuBar - sal_Bool
- // Currently only the Name is supported.
- rtl::OUString sName;
- if( !( Name >>= sName ) )
- {
- sName = rtl::OUString::createFromAscii("Custom1");
- }
- sal_Bool bTemporary = false;
- if( !( Temporary >>= bTemporary ) )
- {
- bTemporary = sal_True;
- }
- return uno::Reference< XCommandBar >( new ScVbaCommandBar( this, mxContext, sName.toAsciiLowerCase(), bTemporary, sal_True ) );
-}
-sal_Int32 SAL_CALL
-ScVbaCommandBars::getCount() throw(css::uno::RuntimeException)
-{
- // Filter out all toolbars from the window collection
- sal_Int32 nCount = 0;
- uno::Sequence< ::rtl::OUString > allNames = m_xNameAccess->getElementNames();
- for( sal_Int32 i = 0; i < allNames.getLength(); i++ )
- {
- if(allNames[i].indexOf( rtl::OUString::createFromAscii("private:resource/toolbar/") ) != -1 )
- {
- nCount++;
- }
- }
- return nCount;
-}
-
-// ScVbaCollectionBaseImpl
-uno::Any SAL_CALL
-ScVbaCommandBars::Item( const uno::Any& aIndex, const uno::Any& /*aIndex2*/ ) throw( uno::RuntimeException )
-{
- if( aIndex.getValueTypeClass() == uno::TypeClass_STRING )
- {
- return createCollectionObject( aIndex );
- }
- return uno::Any();
-}
-
-sal_Bool
-ScVbaCommandBars::checkToolBarExist( rtl::OUString sToolBarName )
-{
- CommandBarNameMap::const_iterator iter = mCommandBarNameMap.find( sToolBarName.toAsciiLowerCase() );
- if( iter != mCommandBarNameMap.end() )
- {
- return sal_True;
- }
- uno::Sequence< ::rtl::OUString > allNames = m_xNameAccess->getElementNames();
- for( sal_Int32 i = 0; i < allNames.getLength(); i++ )
- {
- if(allNames[i].indexOf( rtl::OUString::createFromAscii("private:resource/toolbar/") ) != -1 )
- {
- if( allNames[i].indexOf( sToolBarName ) != -1 )
- {
- return sal_True;
- }
- }
- }
- return sal_False;
-}
-
-// XHelperInterface
-rtl::OUString&
-ScVbaCommandBars::getServiceImplName()
-{
- static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaCommandBars") );
- return sImplName;
-}
-uno::Sequence<rtl::OUString>
-ScVbaCommandBars::getServiceNames()
-{
- static uno::Sequence< rtl::OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
- {
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.CommandBars" ) );
- }
- return aServiceNames;
-}
-
diff --git a/sc/source/ui/vba/vbacommandbars.hxx b/sc/source/ui/vba/vbacommandbars.hxx
deleted file mode 100644
index b9de44ee79d6..000000000000
--- a/sc/source/ui/vba/vbacommandbars.hxx
+++ /dev/null
@@ -1,79 +0,0 @@
-/*************************************************************************
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile$
- *
- * $Revision$
- *
- * last change: $Author$ $Date$
- *
- * 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 2005 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
- *
- ************************************************************************/
-#ifndef SC_VBA_COMMANDBARS_HXX
-#define SC_VBA_COMMANDBARS_HXX
-
-#include <ooo/vba/XCommandBar.hpp>
-#include <ooo/vba/XCommandBars.hpp>
-#include <com/sun/star/container/XNameAccess.hpp>
-
-#include <cppuhelper/implbase1.hxx>
-
-#include "vbahelperinterface.hxx"
-#include "vbacollectionimpl.hxx"
-
-typedef CollTestImplHelper< ov::XCommandBars > CommandBars_BASE;
-
-class ScVbaCommandBars : public CommandBars_BASE
-{
-private:
- css::uno::Reference< css::container::XNameAccess > m_xNameAccess;
- rtl::OUString m_sModuleName;
- void retrieveObjects() throw( css::uno::RuntimeException );
-public:
- ScVbaCommandBars( const css::uno::Reference< ov::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext > xContext, const css::uno::Reference< css::container::XIndexAccess > xIndexAccess );
-
- sal_Bool checkToolBarExist( rtl::OUString sToolBarName );
- rtl::OUString GetModuleName(){ return m_sModuleName; };
- css::uno::Reference< css::container::XNameAccess > GetWindows()
- {
- retrieveObjects();
- return m_xNameAccess;
- };
- // XCommandBars
- virtual css::uno::Reference< ov::XCommandBar > SAL_CALL Add( const css::uno::Any& Name, const css::uno::Any& Position, const css::uno::Any& MenuBar, const css::uno::Any& Temporary ) throw (css::script::BasicErrorException, 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 );
-
- 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_COMMANDBARS_HXX
diff --git a/sc/source/ui/vba/vbacomment.hxx b/sc/source/ui/vba/vbacomment.hxx
index 6676d09bd660..8601fa303844 100644
--- a/sc/source/ui/vba/vbacomment.hxx
+++ b/sc/source/ui/vba/vbacomment.hxx
@@ -39,7 +39,7 @@
#include <com/sun/star/table/XCellRange.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include "vbahelperinterface.hxx"
+#include <vbahelper/vbahelperinterface.hxx>
typedef InheritedHelperInterfaceImpl1< ov::excel::XComment > ScVbaComment_BASE;
diff --git a/sc/source/ui/vba/vbacomments.hxx b/sc/source/ui/vba/vbacomments.hxx
index 098dfd5153a3..be876ab2f76e 100644
--- a/sc/source/ui/vba/vbacomments.hxx
+++ b/sc/source/ui/vba/vbacomments.hxx
@@ -34,8 +34,8 @@
#include <ooo/vba/excel/XComments.hpp>
-#include "vbahelper.hxx"
-#include "vbacollectionimpl.hxx"
+#include "excelvbahelper.hxx"
+#include <vbahelper/vbacollectionimpl.hxx>
#include "vbacomment.hxx"
typedef CollTestImplHelper< ov::excel::XComments > ScVbaComments_BASE;
diff --git a/sc/source/ui/vba/vbacondition.hxx b/sc/source/ui/vba/vbacondition.hxx
index ac44130e5127..823e889ae298 100644
--- a/sc/source/ui/vba/vbacondition.hxx
+++ b/sc/source/ui/vba/vbacondition.hxx
@@ -31,7 +31,7 @@
#define SC_VBA_CONDITION_HXX
#include <com/sun/star/sheet/XSheetCondition.hpp>
#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
-#include "vbahelperinterface.hxx"
+#include <vbahelper/vbahelperinterface.hxx>
#include <com/sun/star/sheet/ConditionOperator.hpp>
template< typename Ifc1 >
diff --git a/sc/source/ui/vba/vbacontrol.cxx b/sc/source/ui/vba/vbacontrol.cxx
index eaf9365016ec..e69de29bb2d1 100644
--- a/sc/source/ui/vba/vbacontrol.cxx
+++ b/sc/source/ui/vba/vbacontrol.cxx
@@ -1,468 +0,0 @@
-/*************************************************************************
- *
- * 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: vbacontrol.cxx,v $
- * $Revision: 1.3 $
- *
- * 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 <com/sun/star/form/FormComponentType.hpp>
-#include <com/sun/star/awt/XControlModel.hpp>
-#include <com/sun/star/awt/XControl.hpp>
-#include <com/sun/star/awt/XWindow2.hpp>
-#include <com/sun/star/lang/XEventListener.hpp>
-#include <com/sun/star/drawing/XShape.hpp>
-#include <com/sun/star/frame/XModel.hpp>
-#include <com/sun/star/view/XControlAccess.hpp>
-#include <com/sun/star/container/XChild.hpp>
-#include <com/sun/star/form/binding/XBindableValue.hpp>
-#include <com/sun/star/form/binding/XListEntrySink.hpp>
-#include <com/sun/star/table/CellAddress.hpp>
-#include <com/sun/star/table/CellRangeAddress.hpp>
-#ifdef VBA_OOBUILD_HACK
-#include <svtools/bindablecontrolhelper.hxx>
-#endif
-#include"vbacontrol.hxx"
-#include"vbacombobox.hxx"
-#include "vbabutton.hxx"
-#include "vbalabel.hxx"
-#include "vbatextbox.hxx"
-#include "vbaradiobutton.hxx"
-#include "vbalistbox.hxx"
-#include "vbatogglebutton.hxx"
-#include "vbacheckbox.hxx"
-#include "vbaframe.hxx"
-#include "vbascrollbar.hxx"
-#include "vbaprogressbar.hxx"
-#include "vbamultipage.hxx"
-#include "vbaspinbutton.hxx"
-#include "vbaimage.hxx"
-
-
-using namespace com::sun::star;
-using namespace ooo::vba;
-
-uno::Reference< css::awt::XWindowPeer >
-ScVbaControl::getWindowPeer() throw (uno::RuntimeException)
-{
- uno::Reference< drawing::XControlShape > xControlShape( m_xControl, uno::UNO_QUERY );
-
- uno::Reference< awt::XControlModel > xControlModel;
- uno::Reference< css::awt::XWindowPeer > xWinPeer;
- if ( !xControlShape.is() )
- {
- // would seem to be a Userform control
- uno::Reference< awt::XControl > xControl( m_xControl, uno::UNO_QUERY_THROW );
- xWinPeer = xControl->getPeer();
- return xWinPeer;
- }
- // form control
- xControlModel.set( xControlShape->getControl(), uno::UNO_QUERY_THROW );
-
- uno::Reference< view::XControlAccess > xControlAccess( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW );
- try
- {
- uno::Reference< awt::XControl > xControl( xControlAccess->getControl( xControlModel ), uno::UNO_QUERY );
- xWinPeer = xControl->getPeer();
- }
- catch( uno::Exception )
- {
- throw uno::RuntimeException( rtl::OUString::createFromAscii( "The Control does not exsit" ),
- uno::Reference< uno::XInterface >() );
- }
- return xWinPeer;
-}
-
-//ScVbaControlListener
-class ScVbaControlListener: public cppu::WeakImplHelper1< lang::XEventListener >
-{
-private:
- ScVbaControl *pControl;
-public:
- ScVbaControlListener( ScVbaControl *pTmpControl );
- virtual ~ScVbaControlListener();
- virtual void SAL_CALL disposing( const lang::EventObject& rEventObject ) throw( uno::RuntimeException );
-};
-
-ScVbaControlListener::ScVbaControlListener( ScVbaControl *pTmpControl ): pControl( pTmpControl )
-{
-}
-
-ScVbaControlListener::~ScVbaControlListener()
-{
-}
-
-void SAL_CALL
-ScVbaControlListener::disposing( const lang::EventObject& ) throw( uno::RuntimeException )
-{
- if( pControl )
- {
- pControl->removeResouce();
- pControl = NULL;
- }
-}
-
-//ScVbaControl
-
-ScVbaControl::ScVbaControl( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< ::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ControlImpl_BASE( xParent, xContext ), m_xControl( xControl ), m_xModel( xModel )
-{
- //add listener
- m_xEventListener.set( new ScVbaControlListener( this ) );
- setGeometryHelper( pGeomHelper );
- uno::Reference< lang::XComponent > xComponent( m_xControl, uno::UNO_QUERY_THROW );
- xComponent->addEventListener( m_xEventListener );
-
- //init m_xProps
- uno::Reference< drawing::XControlShape > xControlShape( m_xControl, uno::UNO_QUERY ) ;
- uno::Reference< awt::XControl> xUserFormControl( m_xControl, uno::UNO_QUERY ) ;
- if ( xControlShape.is() ) // form control
- m_xProps.set( xControlShape->getControl(), uno::UNO_QUERY_THROW );
- else if ( xUserFormControl.is() ) // userform control
- m_xProps.set( xUserFormControl->getModel(), uno::UNO_QUERY_THROW );
-}
-
-ScVbaControl::~ScVbaControl()
-{
- if( m_xControl.is() )
-{
- uno::Reference< lang::XComponent > xComponent( m_xControl, uno::UNO_QUERY_THROW );
- xComponent->removeEventListener( m_xEventListener );
-}
-}
-
-void
-ScVbaControl::setGeometryHelper( AbstractGeometryAttributes* pHelper )
-{
- mpGeometryHelper.reset( pHelper );
-}
-
-void ScVbaControl::removeResouce() throw( uno::RuntimeException )
-{
- uno::Reference< lang::XComponent > xComponent( m_xControl, uno::UNO_QUERY_THROW );
- xComponent->removeEventListener( m_xEventListener );
- m_xControl= NULL;
- m_xProps = NULL;
-}
-
-//In design model has different behavior
-sal_Bool SAL_CALL ScVbaControl::getEnabled() throw (uno::RuntimeException)
-{
- uno::Any aValue = m_xProps->getPropertyValue
- (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Enabled" ) ) );
- sal_Bool bRet = false;
- aValue >>= bRet;
- return bRet;
-}
-
-void SAL_CALL ScVbaControl::setEnabled( sal_Bool bVisible ) throw (uno::RuntimeException)
-{
- uno::Any aValue( bVisible );
- m_xProps->setPropertyValue
- (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Enabled" ) ), aValue);
-
-}
-
-sal_Bool SAL_CALL ScVbaControl::getVisible() throw (uno::RuntimeException)
-{
- sal_Bool bVisible = sal_False;
- m_xProps->getPropertyValue(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EnableVisible" ) ) ) >>= bVisible;
- return bVisible;
-}
-
-void SAL_CALL ScVbaControl::setVisible( sal_Bool bVisible ) throw (uno::RuntimeException)
-{
- m_xProps->setPropertyValue
- (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EnableVisible" ) ), uno::makeAny( bVisible ) );
-}
-double SAL_CALL ScVbaControl::getHeight() throw (uno::RuntimeException)
-{
- return mpGeometryHelper->getHeight();
-}
-void SAL_CALL ScVbaControl::setHeight( double _height ) throw (uno::RuntimeException)
-{
- mpGeometryHelper->setHeight( _height );
-}
-
-double SAL_CALL ScVbaControl::getWidth() throw (uno::RuntimeException)
-{
- return mpGeometryHelper->getWidth();
-}
-void SAL_CALL ScVbaControl::setWidth( double _width ) throw (uno::RuntimeException)
-{
- mpGeometryHelper->setWidth( _width );
-}
-
-double SAL_CALL
-ScVbaControl::getLeft() throw (uno::RuntimeException)
-{
- return mpGeometryHelper->getLeft();
-}
-
-void SAL_CALL
-ScVbaControl::setLeft( double _left ) throw (uno::RuntimeException)
-{
- mpGeometryHelper->setLeft( _left );
-
-}
-
-double SAL_CALL
-ScVbaControl::getTop() throw (uno::RuntimeException)
-{
- return mpGeometryHelper->getTop();
-}
-
-void SAL_CALL
-ScVbaControl::setTop( double _top ) throw (uno::RuntimeException)
-{
- mpGeometryHelper->setTop( _top );
-}
-
-uno::Reference< uno::XInterface > SAL_CALL
-ScVbaControl::getObject() throw (uno::RuntimeException)
-{
- uno::Reference< msforms::XControl > xRet( this );
- return xRet;
-}
-
-void SAL_CALL ScVbaControl::SetFocus() throw (uno::RuntimeException)
-{
- uno::Reference< awt::XWindow > xWin( m_xControl, uno::UNO_QUERY_THROW );
- xWin->setFocus();
-}
-
-rtl::OUString SAL_CALL
-ScVbaControl::getControlSource() throw (uno::RuntimeException)
-{
-// #FIXME I *hate* having these upstream differences
-// but this is necessary until I manage to upstream other
-// dependant parts
-#ifdef VBA_OOBUILD_HACK
- rtl::OUString sControlSource;
- uno::Reference< form::binding::XBindableValue > xBindable( m_xProps, uno::UNO_QUERY );
- if ( xBindable.is() )
- {
- try
- {
- uno::Reference< lang::XMultiServiceFactory > xFac( m_xModel, uno::UNO_QUERY_THROW );
- uno::Reference< beans::XPropertySet > xConvertor( xFac->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.table.CellAddressConversion" ))), uno::UNO_QUERY );
- uno::Reference< beans::XPropertySet > xProps( xBindable->getValueBinding(), uno::UNO_QUERY_THROW );
- table::CellAddress aAddress;
- xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BoundCell") ) ) >>= aAddress;
- xConvertor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Address") ), uno::makeAny( aAddress ) );
- xConvertor->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("XL_A1_Representation") ) ) >>= sControlSource;
- }
- catch( uno::Exception& )
- {
- }
- }
- return sControlSource;
-#else
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("getControlSource not supported") ), uno::Reference< uno::XInterface >()); // not supported
-#endif
-}
-
-void SAL_CALL
-ScVbaControl::setControlSource( const rtl::OUString& _controlsource ) throw (uno::RuntimeException)
-{
-#ifdef VBA_OOBUILD_HACK
- rtl::OUString sEmpty;
- svt::BindableControlHelper::ApplyListSourceAndBindableData( m_xModel, m_xProps, _controlsource, sEmpty );
-#else
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("setControlSource not supported ") ).concat( _controlsource ), uno::Reference< uno::XInterface >()); // not supported
-#endif
-}
-
-rtl::OUString SAL_CALL
-ScVbaControl::getRowSource() throw (uno::RuntimeException)
-{
-#ifdef VBA_OOBUILD_HACK
- rtl::OUString sRowSource;
- uno::Reference< form::binding::XListEntrySink > xListSink( m_xProps, uno::UNO_QUERY );
- if ( xListSink.is() )
- {
- try
- {
- uno::Reference< lang::XMultiServiceFactory > xFac( m_xModel, uno::UNO_QUERY_THROW );
- uno::Reference< beans::XPropertySet > xConvertor( xFac->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.table.CellRangeAddressConversion" ))), uno::UNO_QUERY );
-
- uno::Reference< beans::XPropertySet > xProps( xListSink->getListEntrySource(), uno::UNO_QUERY_THROW );
- table::CellRangeAddress aAddress;
- xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CellRange") ) ) >>= aAddress;
- xConvertor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Address")), uno::makeAny( aAddress ) );
- xConvertor->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("XL_A1_Representation") ) ) >>= sRowSource;
- }
- catch( uno::Exception& )
- {
- }
- }
- return sRowSource;
-#else
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("getRowSource not supported") ), uno::Reference< uno::XInterface >()); // not supported
-#endif
-}
-
-void SAL_CALL
-ScVbaControl::setRowSource( const rtl::OUString& _rowsource ) throw (uno::RuntimeException)
-{
-#ifdef VBA_OOBUILD_HACK
- rtl::OUString sEmpty;
- svt::BindableControlHelper::ApplyListSourceAndBindableData( m_xModel, m_xProps, sEmpty, _rowsource );
-#else
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("setRowSource not supported ") ).concat( _rowsource ), uno::Reference< uno::XInterface >()); // not supported
-#endif
-}
-
-rtl::OUString SAL_CALL
-ScVbaControl::getName() throw (uno::RuntimeException)
-{
- rtl::OUString sName;
- m_xProps->getPropertyValue
- (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Name" ) ) ) >>= sName;
- return sName;
-
-}
-
-void SAL_CALL
-ScVbaControl::setName( const rtl::OUString& _name ) throw (uno::RuntimeException)
-{
- m_xProps->setPropertyValue
- (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Name" ) ), uno::makeAny( _name ) );
- }
-//ScVbaControlFactory
-
-ScVbaControlFactory::ScVbaControlFactory( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel ): m_xContext( xContext ), m_xControl( xControl ), m_xModel( xModel )
-{
-}
-
-ScVbaControl* ScVbaControlFactory::createControl() throw (uno::RuntimeException)
-{
- return createControl( m_xModel );
-}
-ScVbaControl* ScVbaControlFactory::createControl( const uno::Reference< uno::XInterface >& xParent ) throw (uno::RuntimeException)
-{
- uno::Reference< drawing::XControlShape > xControlShape( m_xControl, uno::UNO_QUERY );
- if ( xControlShape.is() ) // form controls
- return createControl( xControlShape, xParent );
- uno::Reference< awt::XControl > xControl( m_xControl, uno::UNO_QUERY );
- if ( !xControl.is() )
- throw uno::RuntimeException(); // really we should be more informative
- return createControl( xControl, xParent );
-
-}
-
-ScVbaControl* ScVbaControlFactory::createControl(const uno::Reference< drawing::XControlShape >& xControlShape, const uno::Reference< uno::XInterface >& /*xParent*/ ) throw (uno::RuntimeException)
-{
- uno::Reference< beans::XPropertySet > xProps( xControlShape->getControl(), uno::UNO_QUERY_THROW );
- sal_Int32 nClassId = -1;
- const static rtl::OUString sClassId( RTL_CONSTASCII_USTRINGPARAM("ClassId") );
- xProps->getPropertyValue( sClassId ) >>= nClassId;
- uno::Reference< XHelperInterface > xVbaParent; // #FIXME - should be worksheet I guess
- switch( nClassId )
- {
- case form::FormComponentType::COMBOBOX:
- return new ScVbaComboBox( xVbaParent, m_xContext, xControlShape, m_xModel, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
- case form::FormComponentType::COMMANDBUTTON:
- return new ScVbaButton( xVbaParent, m_xContext, xControlShape, m_xModel, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
- case form::FormComponentType::FIXEDTEXT:
- return new ScVbaLabel( xVbaParent, m_xContext, xControlShape, m_xModel, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
- case form::FormComponentType::TEXTFIELD:
- return new ScVbaTextBox( xVbaParent, m_xContext, xControlShape, m_xModel, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
- case form::FormComponentType::RADIOBUTTON:
- return new ScVbaRadioButton( xVbaParent, m_xContext, xControlShape, m_xModel, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
- case form::FormComponentType::LISTBOX:
- return new ScVbaListBox( xVbaParent, m_xContext, xControlShape, m_xModel, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
- case form::FormComponentType::SPINBUTTON:
- return new ScVbaSpinButton( xVbaParent, m_xContext, xControlShape, m_xModel, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
- case form::FormComponentType::IMAGECONTROL:
- return new ScVbaImage( xVbaParent, m_xContext, xControlShape, m_xModel, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
- default:
- throw uno::RuntimeException( rtl::OUString::createFromAscii(
- "Donot support this Control Type." ), uno::Reference< uno::XInterface >() );
- }
-}
-
-ScVbaControl* ScVbaControlFactory::createControl( const uno::Reference< awt::XControl >& xControl, const uno::Reference< uno::XInterface >& xParent ) throw (uno::RuntimeException)
-{
- uno::Reference< beans::XPropertySet > xProps( xControl->getModel(), uno::UNO_QUERY_THROW );
- uno::Reference< lang::XServiceInfo > xServiceInfo( xProps, uno::UNO_QUERY_THROW );
- ScVbaControl* pControl = NULL;
- uno::Reference< XHelperInterface > xVbaParent; // #FIXME - should be worksheet I guess
- if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlCheckBoxModel") ) ) )
- pControl = new ScVbaCheckbox( xVbaParent, m_xContext, xControl, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ) );
- else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlRadioButtonModel") ) ) )
- pControl = new ScVbaRadioButton( xVbaParent, m_xContext, xControl, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ) );
- else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlEditModel") ) ) )
- pControl = new ScVbaTextBox( xVbaParent, m_xContext, xControl, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ), true );
- else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlButtonModel") ) ) )
- {
- sal_Bool bToggle = sal_False;
- xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Toggle") ) ) >>= bToggle;
- if ( bToggle )
- pControl = new ScVbaToggleButton( xVbaParent, m_xContext, xControl, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ) );
- else
- pControl = new ScVbaButton( xVbaParent, m_xContext, xControl, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ) );
- }
- else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlComboBoxModel") ) ) )
- pControl = new ScVbaComboBox( xVbaParent, m_xContext, xControl, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ), true );
- else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlListBoxModel") ) ) )
- pControl = new ScVbaListBox( xVbaParent, m_xContext, xControl, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ) );
- else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlFixedTextModel") ) ) )
- pControl = new ScVbaLabel( xVbaParent, m_xContext, xControl, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ) );
- else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlImageControlModel") ) ) )
- pControl = new ScVbaImage( xVbaParent, m_xContext, xControl, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ) );
- else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlProgressBarModel") ) ) )
- pControl = new ScVbaProgressBar( xVbaParent, m_xContext, xControl, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ) );
- else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlGroupBoxModel") ) ) )
- pControl = new ScVbaFrame( xVbaParent, m_xContext, xControl, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ) );
- else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlScrollBarModel") ) ) )
- pControl = new ScVbaScrollBar( xVbaParent, m_xContext, xControl, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ) );
- else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoMultiPageModel") ) ) )
- pControl = new ScVbaMultiPage( xVbaParent, m_xContext, xControl, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ), xParent );
- else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlSpinButtonModel") ) ) )
- pControl = new ScVbaSpinButton( xVbaParent, m_xContext, xControl, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ) );
- else
- throw uno::RuntimeException( rtl::OUString::createFromAscii("Unsupported control " ), uno::Reference< uno::XInterface >() );
- return pControl;
-}
-
-rtl::OUString&
-ScVbaControl::getServiceImplName()
-{
- static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaControl") );
- return sImplName;
-}
-
-uno::Sequence< rtl::OUString >
-ScVbaControl::getServiceNames()
-{
- static uno::Sequence< rtl::OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
- {
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Control" ) );
- }
- return aServiceNames;
-}
-
-
diff --git a/sc/source/ui/vba/vbacontrol.hxx b/sc/source/ui/vba/vbacontrol.hxx
deleted file mode 100644
index 02f340ac05ee..000000000000
--- a/sc/source/ui/vba/vbacontrol.hxx
+++ /dev/null
@@ -1,111 +0,0 @@
-/*************************************************************************
- *
- * 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: vbacontrol.hxx,v $
- * $Revision: 1.3 $
- *
- * 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_CONTROL_HXX
-#define SC_VBA_CONTROL_HXX
-
-#include <cppuhelper/implbase1.hxx>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/script/XDefaultProperty.hpp>
-#include <com/sun/star/drawing/XControlShape.hpp>
-#include <com/sun/star/awt/XControl.hpp>
-#include <com/sun/star/awt/XWindowPeer.hpp>
-#include <ooo/vba/msforms/XControl.hpp>
-
-#include "vbahelper.hxx"
-#include "vbahelperinterface.hxx"
-
-//typedef ::cppu::WeakImplHelper1< ov::msforms::XControl > ControlImpl_BASE;
-typedef InheritedHelperInterfaceImpl1< ov::msforms::XControl > ControlImpl_BASE;
-
-class ScVbaControl : public ControlImpl_BASE
-{
-private:
- com::sun::star::uno::Reference< com::sun::star::lang::XEventListener > m_xEventListener;
-protected:
- std::auto_ptr< ov::AbstractGeometryAttributes > mpGeometryHelper;
- css::uno::Reference< css::beans::XPropertySet > m_xProps;
- css::uno::Reference< css::uno::XInterface > m_xControl;
- css::uno::Reference< css::frame::XModel > m_xModel;
-
- virtual css::uno::Reference< css::awt::XWindowPeer > getWindowPeer() throw (css::uno::RuntimeException);
-public:
- ScVbaControl( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,
- const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pHelper );
- virtual ~ScVbaControl();
- // This class will own the helper, so make sure it is allocated from
- // the heap
- void setGeometryHelper( ov::AbstractGeometryAttributes* pHelper );
- // XControl
- virtual sal_Bool SAL_CALL getEnabled() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setEnabled( sal_Bool _enabled ) throw (css::uno::RuntimeException);
- virtual sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setVisible( sal_Bool _visible ) throw (css::uno::RuntimeException);
- virtual double SAL_CALL getHeight() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setHeight( double _height ) throw (css::uno::RuntimeException);
- virtual double SAL_CALL getWidth() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setWidth( double _width ) throw (css::uno::RuntimeException);
- virtual double SAL_CALL getLeft() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setLeft( double _left ) throw (css::uno::RuntimeException);
- virtual double SAL_CALL getTop() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setTop( double _top ) throw (css::uno::RuntimeException);
- virtual void SAL_CALL SetFocus( ) throw (css::uno::RuntimeException);
-
- virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getObject() throw (css::uno::RuntimeException);
- virtual rtl::OUString SAL_CALL getControlSource() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setControlSource( const rtl::OUString& _controlsource ) throw (css::uno::RuntimeException);
- virtual rtl::OUString SAL_CALL getRowSource() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setRowSource( const rtl::OUString& _rowsource ) throw (css::uno::RuntimeException);
- virtual rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setName( const rtl::OUString& _name ) throw (css::uno::RuntimeException);
- //remove resouce because ooo.vba.excel.XControl is a wrapper of com.sun.star.drawing.XControlShape
- virtual void removeResouce() throw( css::uno::RuntimeException );
- //XHelperInterface
- virtual rtl::OUString& getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-};
-
-
-class ScVbaControlFactory
-{
-public:
- ScVbaControlFactory( const css::uno::Reference< css::uno::XComponentContext >& xContext,
- const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel );
- ScVbaControl* createControl() throw ( css::uno::RuntimeException );
- ScVbaControl* createControl( const css::uno::Reference< css::uno::XInterface >& xParent ) throw ( css::uno::RuntimeException );
-private:
- ScVbaControl* createControl( const css::uno::Reference< css::awt::XControl >&, const css::uno::Reference< css::uno::XInterface >& ) throw ( css::uno::RuntimeException );
- ScVbaControl* createControl( const css::uno::Reference< css::drawing::XControlShape >&, const css::uno::Reference< css::uno::XInterface >& ) throw ( css::uno::RuntimeException );
- css::uno::Reference< css::uno::XComponentContext > m_xContext;
- css::uno::Reference< css::uno::XInterface > m_xControl;
- css::uno::Reference< css::frame::XModel > m_xModel;
-};
-
-#endif//SC_VBA_CONTROL_HXX
diff --git a/sc/source/ui/vba/vbacontrols.cxx b/sc/source/ui/vba/vbacontrols.cxx
deleted file mode 100644
index 6faf418df206..000000000000
--- a/sc/source/ui/vba/vbacontrols.cxx
+++ /dev/null
@@ -1,227 +0,0 @@
-/*************************************************************************
- *
- * 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$
- * $Revision$
- *
- * 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 "vbacontrols.hxx"
-#include "vbacontrol.hxx"
-#include <cppuhelper/implbase2.hxx>
-#include <com/sun/star/awt/XControlContainer.hpp>
-#include <hash_map>
-
-using namespace com::sun::star;
-using namespace ooo::vba;
-
-
-typedef ::cppu::WeakImplHelper2< container::XNameAccess, container::XIndexAccess > ArrayWrapImpl;
-
-typedef std::hash_map< rtl::OUString, sal_Int32, ::rtl::OUStringHash,
- ::std::equal_to< ::rtl::OUString > > ControlIndexMap;
-typedef std::vector< uno::Reference< awt::XControl > > ControlVec;
-
-class ControlArrayWrapper : public ArrayWrapImpl
-{
- uno::Reference< awt::XControlContainer > mxDialog;
- uno::Sequence< ::rtl::OUString > msNames;
- ControlVec mControls;
- ControlIndexMap mIndices;
-
- rtl::OUString getControlName( const uno::Reference< awt::XControl >& xCtrl )
- {
- uno::Reference< beans::XPropertySet > xProp( xCtrl->getModel(), uno::UNO_QUERY );
- rtl::OUString sName;
- xProp->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Name" ) ) ) >>= sName;
- return sName;
- }
-
-public:
-
- ControlArrayWrapper( const uno::Reference< awt::XControl >& xDialog )
- {
- mxDialog.set( xDialog, uno::UNO_QUERY_THROW );
- uno::Sequence< uno::Reference< awt::XControl > > sXControls = mxDialog->getControls();
-
- msNames.realloc( sXControls.getLength() );
- for ( sal_Int32 i = 0; i < sXControls.getLength(); ++i )
- {
- uno::Reference< awt::XControl > xCtrl = sXControls[ i ];
- msNames[ i ] = getControlName( xCtrl );
- mControls.push_back( xCtrl );
- mIndices[ msNames[ i ] ] = i;
- }
- }
-
- // XElementAccess
- virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException)
- {
- return awt::XControl::static_type(0);
- }
-
- virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException)
- {
- return ( mControls.size() > 0 );
- }
-
- // XNameAcess
- virtual uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
- {
- if ( !hasByName( aName ) )
- throw container::NoSuchElementException();
- return getByIndex( mIndices[ aName ] );
- }
-
- virtual uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw (uno::RuntimeException)
- {
- return msNames;
- }
-
- virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (css::uno::RuntimeException)
- {
- ControlIndexMap::iterator it = mIndices.find( aName );
- return it != mIndices.end();
- }
-
- // XElementAccess
- virtual ::sal_Int32 SAL_CALL getCount( ) throw (css::uno::RuntimeException)
- {
- return mControls.size();
- }
-
- virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException )
- {
- if ( Index < 0 || Index >= static_cast< sal_Int32 >( mControls.size() ) )
- throw lang::IndexOutOfBoundsException();
- return uno::makeAny( mControls[ Index ] );
- }
-};
-
-
-class ControlsEnumWrapper : public EnumerationHelper_BASE
-{
- uno::Reference<XHelperInterface > m_xParent;
- uno::Reference<uno::XComponentContext > m_xContext;
- uno::Reference<container::XIndexAccess > m_xIndexAccess;
- uno::Reference<awt::XControl > m_xDlg;
- sal_Int32 nIndex;
-
-public:
-
- ControlsEnumWrapper( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess, const uno::Reference< awt::XControl >& xDlg ) : m_xParent( xParent ), m_xContext( xContext), m_xIndexAccess( xIndexAccess ), m_xDlg( xDlg ), nIndex( 0 ) {}
-
- virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException)
- {
- return ( nIndex < m_xIndexAccess->getCount() );
- }
-
- virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
- {
- if ( nIndex < m_xIndexAccess->getCount() )
- {
- uno::Reference< frame::XModel > xModel;
- uno::Reference< uno::XInterface > xControl;
- m_xIndexAccess->getByIndex( nIndex++ ) >>= xControl;
- // Create control from awt::XControl
- ScVbaControlFactory aFac( m_xContext, xControl, xModel );
- uno::Reference< msforms::XControl > xVBAControl( aFac.createControl( m_xDlg->getModel() ) );
- return uno::makeAny( xVBAControl );
- }
- throw container::NoSuchElementException();
- }
-
-};
-
-
-uno::Reference<container::XIndexAccess >
-lcl_controlsWrapper( const uno::Reference< awt::XControl >& xDlg )
-{
- return new ControlArrayWrapper( xDlg );
-}
-
-ScVbaControls::ScVbaControls( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext,
- const css::uno::Reference< awt::XControl >& xDialog )
- : ControlsImpl_BASE( xParent, xContext, lcl_controlsWrapper( xDialog ) )
-{
- mxDialog.set( xDialog, uno::UNO_QUERY_THROW );
-}
-
-uno::Reference< container::XEnumeration >
-ScVbaControls::createEnumeration() throw (uno::RuntimeException)
-{
- uno::Reference< container::XEnumeration > xEnum( new ControlsEnumWrapper( mxParent, mxContext, m_xIndexAccess, mxDialog ) );
- if ( !xEnum.is() )
- throw uno::RuntimeException();
- return xEnum;
-}
-
-uno::Any
-ScVbaControls::createCollectionObject( const css::uno::Any& aSource )
-{
- // Create control from awt::XControl
- uno::Reference< awt::XControl > xControl;
- aSource >>= xControl;
- uno::Reference< frame::XModel > xModel;
- ScVbaControlFactory aFac( mxContext, xControl, xModel );
- uno::Reference< msforms::XControl > xVBAControl( aFac.createControl( mxDialog->getModel() ) );
- return uno::makeAny( xVBAControl );
-}
-
-void SAL_CALL
-ScVbaControls::Move( double cx, double cy ) throw (uno::RuntimeException)
-{
- uno::Reference< container::XEnumeration > xEnum( createEnumeration() );
- while ( xEnum->hasMoreElements() )
- {
- uno::Reference< msforms::XControl > xControl( xEnum->nextElement(), uno::UNO_QUERY_THROW );
- xControl->setLeft( xControl->getLeft() + cx );
- xControl->setTop( xControl->getTop() + cy );
- }
-}
-
-uno::Type
-ScVbaControls::getElementType() throw (uno::RuntimeException)
-{
- return ooo::vba::msforms::XControl::static_type(0);
-}
-rtl::OUString&
-ScVbaControls::getServiceImplName()
-{
- static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaControls") );
- return sImplName;
-}
-
-uno::Sequence< rtl::OUString >
-ScVbaControls::getServiceNames()
-{
- static uno::Sequence< rtl::OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
- {
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Controls" ) );
- }
- return aServiceNames;
-}
diff --git a/sc/source/ui/vba/vbacontrols.hxx b/sc/source/ui/vba/vbacontrols.hxx
deleted file mode 100644
index bdb25ff3d5d2..000000000000
--- a/sc/source/ui/vba/vbacontrols.hxx
+++ /dev/null
@@ -1,62 +0,0 @@
-/*************************************************************************
- *
- * 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$
- * $Revision$
- *
- * 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_CONTROLS_HXX
-#define SC_VBA_CONTROLS_HXX
-
-#include <cppuhelper/implbase1.hxx>
-#include <ooo/vba/msforms/XControls.hpp>
-#include <com/sun/star/awt/XControl.hpp>
-
-#include "vbacollectionimpl.hxx"
-#include "vbahelper.hxx"
-
-typedef CollTestImplHelper< ov::msforms::XControls > ControlsImpl_BASE;
-
-class ScVbaControls : public ControlsImpl_BASE
-{
- css::uno::Reference< css::awt::XControl > mxDialog;
-protected:
- virtual rtl::OUString& getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-public:
- ScVbaControls( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,
- const css::uno::Reference< css::awt::XControl >& xDialog );
- // XControls
- virtual void SAL_CALL Move( double cx, double cy ) 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);
-
- // ScVbaCollectionBaseImpl
- virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
-
-};
-#endif //SC_VBA_OLEOBJECTS_HXX
-
diff --git a/sc/source/ui/vba/vbadialog.cxx b/sc/source/ui/vba/vbadialog.cxx
index eb0cdfa6386e..06faebc3a37b 100644
--- a/sc/source/ui/vba/vbadialog.cxx
+++ b/sc/source/ui/vba/vbadialog.cxx
@@ -27,39 +27,11 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#include <comphelper/processfactory.hxx>
-
-#include <com/sun/star/lang/XMultiComponentFactory.hpp>
-#include <com/sun/star/frame/XModel.hpp>
-#include <ooo/vba/excel/XApplication.hpp>
-
-#include <tools/string.hxx>
-
-#include "vbahelper.hxx"
#include "vbadialog.hxx"
-#include "vbaglobals.hxx"
using namespace ::ooo::vba;
using namespace ::com::sun::star;
-// fails silently
-void
-ScVbaDialog::Show() throw(uno::RuntimeException)
-{
- rtl::OUString aURL;
- uno::Reference< frame::XModel > xModel = getCurrentDocument();
- if ( xModel.is() )
- {
- aURL = mapIndexToName( mnIndex );
- if( aURL.getLength() )
- throw uno::RuntimeException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " Unable to open the specified dialog " ) ),
- uno::Reference< XInterface > () );
- dispatchRequests( xModel, aURL );
- }
-}
-
-
static const rtl::OUString aStringList[]=
{
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Open" ) ),
@@ -102,7 +74,7 @@ ScVbaDialog::mapIndexToName( sal_Int32 nIndex )
rtl::OUString&
ScVbaDialog::getServiceImplName()
{
- static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaPivotTable") );
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaDialog") );
return sImplName;
}
@@ -113,7 +85,7 @@ ScVbaDialog::getServiceNames()
if ( aServiceNames.getLength() == 0 )
{
aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.PivotTable" ) );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Dialog" ) );
}
return aServiceNames;
}
diff --git a/sc/source/ui/vba/vbadialog.hxx b/sc/source/ui/vba/vbadialog.hxx
index 8b488abebb19..77be9341f7f3 100644
--- a/sc/source/ui/vba/vbadialog.hxx
+++ b/sc/source/ui/vba/vbadialog.hxx
@@ -31,27 +31,20 @@
#define SC_VBA_DIALOG_HXX
#include <cppuhelper/implbase1.hxx>
-
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <ooo/vba/XGlobals.hpp>
-#include <ooo/vba/excel/XApplication.hpp>
#include <ooo/vba/excel/XDialog.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <vbahelper/vbadialogbase.hxx>
-#include "vbahelperinterface.hxx"
-#include "vbadialog.hxx"
-
-typedef InheritedHelperInterfaceImpl1< ov::excel::XDialog > ScVbaDialog_BASE;
+typedef cppu::ImplInheritanceHelper1< VbaDialogBase, ov::excel::XDialog > ScVbaDialog_BASE;
class ScVbaDialog : public ScVbaDialog_BASE
{
- sal_Int32 mnIndex;
public:
- ScVbaDialog( const css::uno::Reference< ov::XHelperInterface >& xParent, sal_Int32 nIndex, const css::uno::Reference< css::uno::XComponentContext > xContext ):ScVbaDialog_BASE( xParent, xContext ), mnIndex( nIndex ) {}
+ ScVbaDialog( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > xContext, const css::uno::Reference< css::frame::XModel >& xModel, sal_Int32 nIndex ):ScVbaDialog_BASE( xParent, xContext, xModel, nIndex ) {}
virtual ~ScVbaDialog() {}
// Methods
- virtual void SAL_CALL Show() throw (css::uno::RuntimeException);
- rtl::OUString mapIndexToName( sal_Int32 nIndex );
+ virtual rtl::OUString mapIndexToName( sal_Int32 nIndex );
// XHelperInterface
virtual rtl::OUString& getServiceImplName();
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
diff --git a/sc/source/ui/vba/vbadialogs.cxx b/sc/source/ui/vba/vbadialogs.cxx
index 1dca41d5d1e1..aa2161f33c21 100644
--- a/sc/source/ui/vba/vbadialogs.cxx
+++ b/sc/source/ui/vba/vbadialogs.cxx
@@ -27,18 +27,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#include <comphelper/processfactory.hxx>
-
-#include <com/sun/star/lang/XMultiComponentFactory.hpp>
-#include <com/sun/star/frame/XModel.hpp>
-#include <ooo/vba/excel/XApplication.hpp>
#include <ooo/vba/excel/XDialog.hpp>
-
-#include <tools/string.hxx>
-
-#include "vbahelper.hxx"
#include "vbadialogs.hxx"
-#include "vbaglobals.hxx"
#include "vbadialog.hxx"
using namespace ::ooo::vba;
@@ -49,26 +39,19 @@ ScVbaDialogs::Dummy() throw (uno::RuntimeException)
{
}
-::sal_Int32
-ScVbaDialogs::getCount() throw (uno::RuntimeException)
-{
- //#TODO #FIXEME
- //SC_VBA_STUB();
- return 0;
-}
-
uno::Any
ScVbaDialogs::Item( const uno::Any &aItem ) throw (uno::RuntimeException)
{
sal_Int32 nIndex = 0;
aItem >>= nIndex;
- uno::Reference< excel::XDialog > aDialog( new ScVbaDialog( uno::Reference< XHelperInterface >( ScVbaGlobals::getGlobalsImpl( mxContext )->getApplication(), uno::UNO_QUERY_THROW ), nIndex, mxContext ) );
+ uno::Reference< excel::XDialog > aDialog( new ScVbaDialog( uno::Reference< XHelperInterface >( Application(),uno::UNO_QUERY_THROW ), mxContext, m_xModel, nIndex ) );
return uno::Any( aDialog );
}
+
rtl::OUString&
ScVbaDialogs::getServiceImplName()
{
- static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaWorksheet") );
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaDialogs") );
return sImplName;
}
@@ -79,7 +62,7 @@ ScVbaDialogs::getServiceNames()
if ( aServiceNames.getLength() == 0 )
{
aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Worksheet" ) );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Dialogs" ) );
}
return aServiceNames;
}
diff --git a/sc/source/ui/vba/vbadialogs.hxx b/sc/source/ui/vba/vbadialogs.hxx
index 40eeb78663a2..a1785defc255 100644
--- a/sc/source/ui/vba/vbadialogs.hxx
+++ b/sc/source/ui/vba/vbadialogs.hxx
@@ -30,25 +30,22 @@
#ifndef SC_VBA_DIALOGS_HXX
#define SC_VBA_DIALOGS_HXX
-#include <cppuhelper/implbase1.hxx>
-
#include <com/sun/star/uno/XComponentContext.hpp>
#include <ooo/vba/excel/XDialogs.hpp>
#include <ooo/vba/XCollection.hpp>
-#include "vbahelperinterface.hxx"
-
-class ScModelObj;
+#include <vbahelper/vbahelperinterface.hxx>
+#include <vbahelper/vbadialogsbase.hxx>
+#include <cppuhelper/implbase1.hxx>
-typedef InheritedHelperInterfaceImpl1< ov::excel::XDialogs > ScVbaDialogs_BASE;
+typedef cppu::ImplInheritanceHelper1< VbaDialogsBase, ov::excel::XDialogs > ScVbaDialogs_BASE;
class ScVbaDialogs : public ScVbaDialogs_BASE
{
public:
- ScVbaDialogs( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext ): ScVbaDialogs_BASE( xParent, xContext ) {}
+ ScVbaDialogs( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, const css::uno::Reference< css::frame::XModel >& xModel ): ScVbaDialogs_BASE( xParent, xContext, xModel ) {}
virtual ~ScVbaDialogs() {}
// XCollection
- virtual ::sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index ) throw (css::uno::RuntimeException);
// XDialogs
diff --git a/sc/source/ui/vba/vbafillformat.cxx b/sc/source/ui/vba/vbafillformat.cxx
deleted file mode 100644
index 3b25efcb614a..000000000000
--- a/sc/source/ui/vba/vbafillformat.cxx
+++ /dev/null
@@ -1,202 +0,0 @@
-/*************************************************************************
- *
- * 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: vbafillformat.cxx,v $
- * $Revision: 1.3 $
- *
- * 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 <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/awt/Gradient.hpp>
-#include <com/sun/star/awt/GradientStyle.hpp>
-#include <ooo/vba/office/MsoGradientStyle.hpp>
-#include "vbafillformat.hxx"
-#include "vbacolorformat.hxx"
-
-using namespace ooo::vba;
-using namespace com::sun::star;
-
-ScVbaFillFormat::ScVbaFillFormat( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape > xShape ) : ScVbaFillFormat_BASE( xParent, xContext ), m_xShape( xShape )
-{
- m_xPropertySet.set( xShape, uno::UNO_QUERY_THROW );
- m_nFillStyle = drawing::FillStyle_SOLID;
- m_nForeColor = 0;
- m_nBackColor = 0;
- m_nGradientAngle = 0;
-}
-
-void
-ScVbaFillFormat::setFillStyle( drawing::FillStyle nFillStyle ) throw (uno::RuntimeException)
-{
- m_nFillStyle = nFillStyle;
- if( m_nFillStyle == drawing::FillStyle_GRADIENT )
- {
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii("FillStyle"), uno::makeAny( drawing::FillStyle_GRADIENT ) );
- awt::Gradient aGradient;
- // AXIAL
- // RADIAL
- // ELLIPTICAL
- // SQUARE
- // RECT
- aGradient.Style = awt::GradientStyle_LINEAR;
- aGradient.StartColor = ForeColor()->getRGB();
- aGradient.EndColor = BackColor()->getRGB();
- aGradient.Angle = m_nGradientAngle;
- aGradient.Border = 0;
- aGradient.XOffset = 0;
- aGradient.YOffset = 0;
- aGradient.StartIntensity = 100;
- aGradient.EndIntensity = 100;
- aGradient.StepCount = 1;
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii("FillGradient"), uno::makeAny( aGradient ) );
- }
- else if( m_nFillStyle == drawing::FillStyle_SOLID )
- {
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii("FillStyle"), uno::makeAny(drawing::FillStyle_SOLID) );
- }
-}
-
-void
-ScVbaFillFormat::setForeColorAndInternalStyle( sal_Int32 nForeColor ) throw (css::uno::RuntimeException)
-{
- m_nForeColor = nForeColor;
- setFillStyle( m_nFillStyle );
-}
-
-// Attributes
-sal_Bool SAL_CALL
-ScVbaFillFormat::getVisible() throw (uno::RuntimeException)
-{
- drawing::FillStyle nFillStyle;
- m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("FillStyle") ) >>= nFillStyle;
- if( nFillStyle == drawing::FillStyle_NONE )
- return sal_False;
- return sal_True;
-}
-
-void SAL_CALL
-ScVbaFillFormat::setVisible( sal_Bool _visible ) throw (uno::RuntimeException)
-{
- drawing::FillStyle aFillStyle;
- m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("FillStyle") ) >>= aFillStyle;
- if( !_visible )
- {
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii("FillStyle"), uno::makeAny( drawing::FillStyle_NONE ) );
- }
- else
- {
- if( aFillStyle == drawing::FillStyle_NONE )
- {
- setFillStyle( m_nFillStyle );
- }
- }
-}
-
-double SAL_CALL
-ScVbaFillFormat::getTransparency() throw (uno::RuntimeException)
-{
- sal_Int16 nTransparence = 0;
- double dTransparence = 0;
- m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii( "FillTransparence" ) ) >>= nTransparence;
- dTransparence = static_cast<double>( nTransparence );
- dTransparence /= 100;
- return dTransparence;
-}
-
-void SAL_CALL
-ScVbaFillFormat::setTransparency( double _transparency ) throw (uno::RuntimeException)
-{
- sal_Int16 nTransparence = static_cast< sal_Int16 >( _transparency * 100 );
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "FillTransparence" ), uno::makeAny( nTransparence ) );
-}
-
-
-// Methods
-void SAL_CALL
-ScVbaFillFormat::Solid() throw (uno::RuntimeException)
-{
- setFillStyle( drawing::FillStyle_SOLID );
-}
-
-void SAL_CALL
-ScVbaFillFormat::TwoColorGradient( sal_Int32 style, sal_Int32 /*variant*/ ) throw (uno::RuntimeException)
-{
- if( style == office::MsoGradientStyle::msoGradientHorizontal )
- {
- m_nGradientAngle = 0;
- setFillStyle( drawing::FillStyle_GRADIENT );
- }
- else if( style == office::MsoGradientStyle::msoGradientVertical )
- {
- m_nGradientAngle = 900;
- setFillStyle( drawing::FillStyle_GRADIENT );
- }
- else if( style == office::MsoGradientStyle::msoGradientDiagonalDown )
- {
- m_nGradientAngle = 450;
- setFillStyle( drawing::FillStyle_GRADIENT );
- }
- else if( style == office::MsoGradientStyle::msoGradientDiagonalUp )
- {
- m_nGradientAngle = 900 + 450;
- setFillStyle( drawing::FillStyle_GRADIENT );
- }
-}
-
-uno::Reference< msforms::XColorFormat > SAL_CALL
-ScVbaFillFormat::BackColor() throw (uno::RuntimeException)
-{
- if( !m_xColorFormat.is() )
- m_xColorFormat.set( new ScVbaColorFormat( getParent(), mxContext, this, m_xShape, ColorFormatType::FILLFORMAT_BACKCOLOR ) );
- return m_xColorFormat;
-}
-
-uno::Reference< msforms::XColorFormat > SAL_CALL
-ScVbaFillFormat::ForeColor() throw (uno::RuntimeException)
-{
- if( !m_xColorFormat.is() )
- m_xColorFormat.set( new ScVbaColorFormat( getParent(), mxContext, this, m_xShape, ColorFormatType::FILLFORMAT_FORECOLOR ) );
- return m_xColorFormat;
-}
-
-
-rtl::OUString&
-ScVbaFillFormat::getServiceImplName()
-{
- static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaFillFormat") );
- return sImplName;
-}
-
-uno::Sequence< rtl::OUString >
-ScVbaFillFormat::getServiceNames()
-{
- static uno::Sequence< rtl::OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
- {
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.FillFormat" ) );
- }
- return aServiceNames;
-}
-
diff --git a/sc/source/ui/vba/vbafillformat.hxx b/sc/source/ui/vba/vbafillformat.hxx
deleted file mode 100644
index 03029c89dbe4..000000000000
--- a/sc/source/ui/vba/vbafillformat.hxx
+++ /dev/null
@@ -1,74 +0,0 @@
-/*************************************************************************
- *
- * 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: vbafillformat.hxx,v $
- * $Revision: 1.3 $
- *
- * 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_XFILLFORMAT_HXX
-#define SC_VBA_XFILLFORMAT_HXX
-
-#include <com/sun/star/drawing/XShape.hpp>
-#include <com/sun/star/drawing/FillStyle.hpp>
-#include <ooo/vba/msforms/XFillFormat.hpp>
-#include "vbahelperinterface.hxx"
-
-typedef InheritedHelperInterfaceImpl1< ov::msforms::XFillFormat > ScVbaFillFormat_BASE;
-
-class ScVbaFillFormat : public ScVbaFillFormat_BASE
-{
-private:
- css::uno::Reference< css::drawing::XShape > m_xShape;
- css::uno::Reference< css::beans::XPropertySet > m_xPropertySet;
- css::uno::Reference< ov::msforms::XColorFormat > m_xColorFormat;
- css::drawing::FillStyle m_nFillStyle;
- sal_Int32 m_nForeColor;
- sal_Int32 m_nBackColor;
- sal_Int16 m_nGradientAngle;
-private:
- void setFillStyle( css::drawing::FillStyle nFillStyle ) throw (css::uno::RuntimeException);
-protected:
- virtual rtl::OUString& getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-
-public:
- ScVbaFillFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape > xShape );
-
- void setForeColorAndInternalStyle( sal_Int32 nForeColor ) throw (css::uno::RuntimeException);
- // Attributes
- virtual sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setVisible( sal_Bool _visible ) throw (css::uno::RuntimeException);
- virtual double SAL_CALL getTransparency() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setTransparency( double _transparency ) throw (css::uno::RuntimeException);
-
- // Methods
- virtual void SAL_CALL Solid() throw (css::uno::RuntimeException);
- virtual void SAL_CALL TwoColorGradient( sal_Int32 style, sal_Int32 variant ) throw (css::uno::RuntimeException);
- virtual css::uno::Reference< ov::msforms::XColorFormat > SAL_CALL BackColor() throw (css::uno::RuntimeException);
- virtual css::uno::Reference< ov::msforms::XColorFormat > SAL_CALL ForeColor() throw (css::uno::RuntimeException);
-
-};
-
-#endif//SC_VBA_XFILLFORMAT_HXX
diff --git a/sc/source/ui/vba/vbafont.cxx b/sc/source/ui/vba/vbafont.cxx
index 9855d5e056af..cb54532384b5 100644
--- a/sc/source/ui/vba/vbafont.cxx
+++ b/sc/source/ui/vba/vbafont.cxx
@@ -38,7 +38,7 @@
#include <com/sun/star/table/XColumnRowRange.hpp>
#include <ooo/vba/excel/XlColorIndex.hpp>
#include <ooo/vba/excel/XlUnderlineStyle.hpp>
-#include <svtools/itemset.hxx>
+#include <svl/itemset.hxx>
#include "vbafont.hxx"
#include "scitems.hxx"
#include "cellsuno.hxx"
@@ -46,37 +46,14 @@
using namespace ::ooo::vba;
using namespace ::com::sun::star;
-// use local constants there is no need to expose these constants
-// externally. Looking at the Format->Character dialog it seem that
-// these may infact be even be calculated. Leave hardcoded for now
-// #FIXEME #TBD investigate the code for dialog mentioned above
-
-// The font baseline is not specified.
-const short NORMAL = 0;
-
-// specifies a superscripted.
-const short SUPERSCRIPT = 33;
-
-// specifies a subscripted.
-const short SUBSCRIPT = -33;
-
-// specifies a hight of superscripted font
- const sal_Int8 SUPERSCRIPTHEIGHT = 58;
-
-// specifies a hight of subscripted font
-const sal_Int8 SUBSCRIPTHEIGHT = 58;
-
-// specifies a hight of normal font
-const short NORMALHEIGHT = 100;
-
-ScVbaFont::ScVbaFont( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const ScVbaPalette& dPalette, uno::Reference< beans::XPropertySet > xPropertySet, ScCellRangeObj* pRangeObj ) throw ( uno::RuntimeException ) : ScVbaFont_BASE( xParent, xContext ), mxFont( xPropertySet, css::uno::UNO_QUERY_THROW ), mPalette( dPalette ), mpRangeObj( pRangeObj )
+ScVbaFont::ScVbaFont( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const ScVbaPalette& dPalette, uno::Reference< beans::XPropertySet > xPropertySet, ScCellRangeObj* pRangeObj ) throw ( uno::RuntimeException ) : ScVbaFont_BASE( xParent, xContext, dPalette.getPalette(), xPropertySet ), mPalette( dPalette ), mpRangeObj( pRangeObj )
{
}
SfxItemSet*
ScVbaFont::GetDataSet()
{
- SfxItemSet* pDataSet = ScVbaCellRangeAccess::GetDataSet( mpRangeObj );
+ SfxItemSet* pDataSet = excel::ScVbaCellRangeAccess::GetDataSet( mpRangeObj );
return pDataSet;
}
@@ -243,19 +220,13 @@ ScVbaFont::getSubscript() throw ( uno::RuntimeException )
return uno::makeAny( ( nValue == SUBSCRIPT ) );
}
-void SAL_CALL
-ScVbaFont::setSize( const uno::Any& aValue ) throw( uno::RuntimeException )
-{
- mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharHeight" ) ), aValue );
-}
-
uno::Any SAL_CALL
ScVbaFont::getSize() throw ( uno::RuntimeException )
{
if ( GetDataSet() )
if ( GetDataSet()->GetItemState( ATTR_FONT_HEIGHT, TRUE, NULL) == SFX_ITEM_DONTCARE )
return aNULL();
- return mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharHeight" ) ) );
+ return ScVbaFont_BASE::getSize();
}
void SAL_CALL
@@ -267,43 +238,22 @@ ScVbaFont::setColorIndex( const uno::Any& _colorindex ) throw( uno::RuntimeExcep
// handled properly here
if ( !nIndex || ( nIndex == excel::XlColorIndex::xlColorIndexAutomatic ) )
+ {
nIndex = 1; // check defualt ( assume black )
- --nIndex; // OOo indices are zero bases
- uno::Reference< container::XIndexAccess > xIndex = mPalette.getPalette();
- // setColor expects colors in XL RGB values
- // #FIXME this is daft we convert OO RGB val to XL RGB val and
- // then back again to OO RGB value
- setColor( OORGBToXLRGB(xIndex->getByIndex( nIndex )) );
+ ScVbaFont_BASE::setColorIndex( uno::makeAny( nIndex ) );
+ }
+ else
+ ScVbaFont_BASE::setColorIndex( _colorindex );
}
uno::Any SAL_CALL
ScVbaFont::getColorIndex() throw ( uno::RuntimeException )
{
- sal_Int32 nColor = 0;
if ( GetDataSet() )
if ( GetDataSet()->GetItemState( ATTR_FONT_COLOR, TRUE, NULL) == SFX_ITEM_DONTCARE )
return aNULL();
-
- // getColor returns Xl ColorValue, need to convert it to OO val
- // as the palette deals with OO RGB values
- // #FIXME this is daft in getColor we convert OO RGB val to XL RGB val
- // and then back again to OO RGB value
- XLRGBToOORGB( getColor() ) >>= nColor;
- uno::Reference< container::XIndexAccess > xIndex = mPalette.getPalette();
- sal_Int32 nElems = xIndex->getCount();
- sal_Int32 nIndex = -1;
- for ( sal_Int32 count=0; count<nElems; ++count )
- {
- sal_Int32 nPaletteColor = 0;
- xIndex->getByIndex( count ) >>= nPaletteColor;
- if ( nPaletteColor == nColor )
- {
- nIndex = count + 1; // 1 based
- break;
- }
- }
- return uno::makeAny( nIndex );
+ return ScVbaFont_BASE::getColorIndex();
}
//////////////////////////////////////////////////////////////////////////////////////////
@@ -396,28 +346,13 @@ ScVbaFont::getFontStyle() throw ( uno::RuntimeException )
return uno::makeAny( aStyles.makeStringAndClear() );
}
-void SAL_CALL
-ScVbaFont::setBold( const uno::Any& aValue ) throw( uno::RuntimeException )
-{
- sal_Bool bValue = sal_False;
- aValue >>= bValue;
- double fBoldValue = awt::FontWeight::NORMAL;
- if( bValue )
- fBoldValue = awt::FontWeight::BOLD;
- mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharWeight" ) ), ( uno::Any )fBoldValue );
-
-}
-
uno::Any SAL_CALL
ScVbaFont::getBold() throw ( uno::RuntimeException )
{
if ( GetDataSet() )
if ( GetDataSet()->GetItemState( ATTR_FONT_WEIGHT, TRUE, NULL) == SFX_ITEM_DONTCARE )
return aNULL();
-
- double fValue = 0.0;
- mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharWeight" ) ) ) >>= fValue;
- return uno::makeAny( fValue == awt::FontWeight::BOLD );
+ return ScVbaFont_BASE::getBold();
}
void SAL_CALL
@@ -481,32 +416,13 @@ ScVbaFont::getUnderline() throw ( uno::RuntimeException )
return uno::makeAny( nValue );
}
-void SAL_CALL
-ScVbaFont::setStrikethrough( const uno::Any& aValue ) throw ( uno::RuntimeException )
-{
- sal_Bool bValue = sal_False;
- aValue >>= bValue;
- short nValue = awt::FontStrikeout::NONE;
- if( bValue )
- nValue = awt::FontStrikeout::SINGLE;
- mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharStrikeout" ) ), ( uno::Any )nValue );
-}
-
uno::Any SAL_CALL
ScVbaFont::getStrikethrough() throw ( uno::RuntimeException )
{
if ( GetDataSet() )
if ( GetDataSet()->GetItemState( ATTR_FONT_CROSSEDOUT, TRUE, NULL) == SFX_ITEM_DONTCARE )
return aNULL();
- short nValue = 0;
- mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharStrikeout" ) ) ) >>= nValue;
- return uno::Any( nValue == awt::FontStrikeout::SINGLE );
-}
-
-void SAL_CALL
-ScVbaFont::setShadow( const uno::Any& aValue ) throw ( uno::RuntimeException )
-{
- mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharShadowed" ) ), aValue );
+ return ScVbaFont_BASE::getStrikethrough();
}
uno::Any SAL_CALL
@@ -515,18 +431,7 @@ ScVbaFont::getShadow() throw (uno::RuntimeException)
if ( GetDataSet() )
if ( GetDataSet()->GetItemState( ATTR_FONT_SHADOWED, TRUE, NULL) == SFX_ITEM_DONTCARE )
return aNULL();
- return mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharShadowed" ) ) );
-}
-
-void SAL_CALL
-ScVbaFont::setItalic( const uno::Any& aValue ) throw ( uno::RuntimeException )
-{
- sal_Bool bValue = sal_False;
- aValue >>= bValue;
- short nValue = awt::FontSlant_NONE;
- if( bValue )
- nValue = awt::FontSlant_ITALIC;
- mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharPosture" ) ), ( uno::Any )nValue );
+ return ScVbaFont_BASE::getShadow();
}
uno::Any SAL_CALL
@@ -536,17 +441,7 @@ ScVbaFont::getItalic() throw ( uno::RuntimeException )
if ( GetDataSet()->GetItemState( ATTR_FONT_POSTURE, TRUE, NULL) == SFX_ITEM_DONTCARE )
return aNULL();
- awt::FontSlant aFS;
- mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharPosture" ) ) ) >>= aFS;
- return uno::makeAny( aFS == awt::FontSlant_ITALIC );
-}
-
-void SAL_CALL
-ScVbaFont::setName( const uno::Any& aValue ) throw ( uno::RuntimeException )
-{
- rtl::OUString sString;
- aValue >>= sString;
- mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharFontName" ) ), aValue);
+ return ScVbaFont_BASE::getItalic();
}
uno::Any SAL_CALL
@@ -555,22 +450,17 @@ ScVbaFont::getName() throw ( uno::RuntimeException )
if ( GetDataSet() )
if ( GetDataSet()->GetItemState( ATTR_FONT, TRUE, NULL) == SFX_ITEM_DONTCARE )
return aNULL();
- return mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharFontName" ) ) );
+ return ScVbaFont_BASE::getName();
}
uno::Any
ScVbaFont::getColor() throw (uno::RuntimeException)
{
+ // #TODO #FIXME - behave like getXXX above ( wrt. GetDataSet )
uno::Any aAny;
aAny = OORGBToXLRGB( mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharColor" ) ) ) );
return aAny;
}
-void
-ScVbaFont::setColor( const uno::Any& _color ) throw (uno::RuntimeException)
-{
- mxFont->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharColor" ) ) , XLRGBToOORGB(_color));
-}
-
void SAL_CALL
ScVbaFont::setOutlineFont( const uno::Any& aValue ) throw ( uno::RuntimeException )
{
diff --git a/sc/source/ui/vba/vbafont.hxx b/sc/source/ui/vba/vbafont.hxx
index a0b9b2ebf140..625985564cda 100644
--- a/sc/source/ui/vba/vbafont.hxx
+++ b/sc/source/ui/vba/vbafont.hxx
@@ -32,19 +32,19 @@
#include <cppuhelper/implbase1.hxx>
-#include <ooo/vba/excel/XFont.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include "vbahelperinterface.hxx"
+#include <ooo/vba/excel/XFont.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <vbahelper/vbafontbase.hxx>
#include "vbapalette.hxx"
class ScTableSheetsObj;
class ScCellRangeObj;
-typedef InheritedHelperInterfaceImpl1< ov::excel::XFont > ScVbaFont_BASE;
+typedef cppu::ImplInheritanceHelper1< VbaFontBase, ov::excel::XFont > ScVbaFont_BASE;
class ScVbaFont : public ScVbaFont_BASE
{
- css::uno::Reference< css::beans::XPropertySet > mxFont;
ScVbaPalette mPalette;
ScCellRangeObj* mpRangeObj;
SfxItemSet* GetDataSet();
@@ -54,7 +54,6 @@ public:
// Attributes
virtual css::uno::Any SAL_CALL getSize() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setSize( const css::uno::Any& _size ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL getStandardFontSize() throw (css::uno::RuntimeException);
virtual void SAL_CALL setStandardFontSize( const css::uno::Any& _standardfontsize ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL getStandardFont() throw (css::uno::RuntimeException);
@@ -64,23 +63,17 @@ public:
virtual css::uno::Any SAL_CALL getColorIndex() throw (css::uno::RuntimeException);
virtual void SAL_CALL setColorIndex( const css::uno::Any& _colorindex ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL getBold() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setBold( const css::uno::Any& _bold ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL getUnderline() throw (css::uno::RuntimeException);
virtual void SAL_CALL setUnderline( const css::uno::Any& _underline ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL getStrikethrough() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setStrikethrough( const css::uno::Any& _strikethrough ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL getShadow() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setShadow( const css::uno::Any& _shadow ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL getItalic() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setItalic( const css::uno::Any& _italic ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL getSubscript() throw (css::uno::RuntimeException);
virtual void SAL_CALL setSubscript( const css::uno::Any& _subscript ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL getSuperscript() throw (css::uno::RuntimeException);
virtual void SAL_CALL setSuperscript( const css::uno::Any& _superscript ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL getName() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setName( const css::uno::Any& _name ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL getColor() throw (css::uno::RuntimeException) ;
- virtual void SAL_CALL setColor( const css::uno::Any& _color ) throw (css::uno::RuntimeException) ;
virtual css::uno::Any SAL_CALL getOutlineFont() throw (css::uno::RuntimeException) ;
virtual void SAL_CALL setOutlineFont( const css::uno::Any& _outlinefont ) throw (css::uno::RuntimeException) ;
// XHelperInterface
diff --git a/sc/source/ui/vba/vbaformat.cxx b/sc/source/ui/vba/vbaformat.cxx
index a627ed3a4d92..1d30f92e1c6c 100644
--- a/sc/source/ui/vba/vbaformat.cxx
+++ b/sc/source/ui/vba/vbaformat.cxx
@@ -33,6 +33,7 @@
#include <ooo/vba/excel/XlHAlign.hpp>
#include <ooo/vba/excel/XlOrientation.hpp>
#include <ooo/vba/excel/Constants.hpp>
+#include <ooo/vba/excel/XRange.hpp>
#include <com/sun/star/table/CellVertJustify.hpp>
#include <com/sun/star/table/CellHoriJustify.hpp>
#include <com/sun/star/table/CellOrientation.hpp>
@@ -341,7 +342,7 @@ template< typename Ifc1 >
uno::Any SAL_CALL
ScVbaFormat<Ifc1>::Borders( const uno::Any& Index ) throw (script::BasicErrorException, uno::RuntimeException )
{
- ScVbaPalette aPalette( getDocShell( mxModel ) );
+ ScVbaPalette aPalette( excel::getDocShell( mxModel ) );
uno::Reference< XCollection > xColl = new ScVbaBorders( thisHelperIface(), ScVbaFormat_BASE::mxContext, uno::Reference< table::XCellRange >( mxPropertySet, uno::UNO_QUERY_THROW ), aPalette );
if ( Index.hasValue() )
@@ -355,7 +356,7 @@ template< typename Ifc1 >
uno::Reference< excel::XFont > SAL_CALL
ScVbaFormat<Ifc1>::Font( ) throw (script::BasicErrorException, uno::RuntimeException)
{
- ScVbaPalette aPalette( getDocShell( mxModel ) );
+ ScVbaPalette aPalette( excel::getDocShell( mxModel ) );
return new ScVbaFont( thisHelperIface(), ScVbaFormat_BASE::mxContext, aPalette, mxPropertySet );
}
diff --git a/sc/source/ui/vba/vbaformat.hxx b/sc/source/ui/vba/vbaformat.hxx
index afb5e5a45c29..cb33ad818f59 100644
--- a/sc/source/ui/vba/vbaformat.hxx
+++ b/sc/source/ui/vba/vbaformat.hxx
@@ -39,7 +39,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
-#include "vbahelperinterface.hxx"
+#include <vbahelper/vbahelperinterface.hxx>
template< typename Ifc1 >
class ScVbaFormat : public InheritedHelperInterfaceImpl1< Ifc1 >
diff --git a/sc/source/ui/vba/vbaformatconditions.cxx b/sc/source/ui/vba/vbaformatconditions.cxx
index 06067d470177..1048cd91d2d3 100644
--- a/sc/source/ui/vba/vbaformatconditions.cxx
+++ b/sc/source/ui/vba/vbaformatconditions.cxx
@@ -36,6 +36,7 @@
#include "vbaformatcondition.hxx"
#include "vbaworkbook.hxx"
#include "vbastyles.hxx"
+#include "vbaglobals.hxx"
using namespace ::ooo::vba;
using namespace ::com::sun::star;
@@ -50,7 +51,7 @@ static rtl::OUString sStyleNamePrefix( RTL_CONSTASCII_USTRINGPARAM("Excel_CondFo
ScVbaFormatConditions::ScVbaFormatConditions( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< sheet::XSheetConditionalEntries >& _xSheetConditionalEntries, const uno::Reference< frame::XModel >& xModel ) : ScVbaFormatConditions_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( _xSheetConditionalEntries, uno::UNO_QUERY_THROW ) ), mxSheetConditionalEntries( _xSheetConditionalEntries )
{
mxRangeParent.set( xParent, uno::UNO_QUERY_THROW );
- uno::Reference< excel::XWorkbook > xWorkbook = new ScVbaWorkbook( uno::Reference< XHelperInterface >( ScVbaGlobals::getGlobalsImpl( xContext )->getApplication(), uno::UNO_QUERY_THROW ), xContext, xModel );
+ uno::Reference< excel::XWorkbook > xWorkbook = new ScVbaWorkbook( uno::Reference< XHelperInterface >( Application(), uno::UNO_QUERY_THROW ), xContext, xModel );
mxStyles.set( xWorkbook->Styles( uno::Any() ), uno::UNO_QUERY_THROW );
uno::Reference< sheet::XCellRangeAddressable > xCellRange( mxRangeParent->getCellRange(), uno::UNO_QUERY_THROW );
mxParentRangePropertySet.set( xCellRange, uno::UNO_QUERY_THROW );
diff --git a/sc/source/ui/vba/vbaformatconditions.hxx b/sc/source/ui/vba/vbaformatconditions.hxx
index e5524a746638..177ddd168f35 100644
--- a/sc/source/ui/vba/vbaformatconditions.hxx
+++ b/sc/source/ui/vba/vbaformatconditions.hxx
@@ -35,7 +35,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/table/CellAddress.hpp>
#include <com/sun/star/sheet/XSheetConditionalEntries.hpp>
-#include "vbacollectionimpl.hxx"
+#include <vbahelper/vbacollectionimpl.hxx>
typedef CollTestImplHelper< ov::excel::XFormatConditions > ScVbaFormatConditions_BASE;
class ScVbaFormatConditions: public ScVbaFormatConditions_BASE
diff --git a/sc/source/ui/vba/vbaframe.cxx b/sc/source/ui/vba/vbaframe.cxx
deleted file mode 100644
index 24f8884e4d3b..000000000000
--- a/sc/source/ui/vba/vbaframe.cxx
+++ /dev/null
@@ -1,93 +0,0 @@
-/*************************************************************************
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile$
- *
- * $Revision$
- *
- * last change: $Author$ $Date$
- *
- * 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 2005 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
- *
- ************************************************************************/
-#include "vbaframe.hxx"
-#include <vector>
-
-using namespace com::sun::star;
-using namespace ooo::vba;
-
-
-const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
-ScVbaFrame::ScVbaFrame( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper ) : FrameImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
-{
-}
-
-// Attributes
-rtl::OUString SAL_CALL
-ScVbaFrame::getCaption() throw (css::uno::RuntimeException)
-{
- rtl::OUString Label;
- m_xProps->getPropertyValue( LABEL ) >>= Label;
- return Label;
-}
-
-void SAL_CALL
-ScVbaFrame::setCaption( const rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
-{
- m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
-}
-
-uno::Any SAL_CALL
-ScVbaFrame::getValue() throw (css::uno::RuntimeException)
-{
- return uno::makeAny( getCaption() );
-}
-
-void SAL_CALL
-ScVbaFrame::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException)
-{
- rtl::OUString sCaption;
- _value >>= sCaption;
- setCaption( sCaption );
-}
-
-rtl::OUString&
-ScVbaFrame::getServiceImplName()
-{
- static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaFrame") );
- return sImplName;
-}
-
-uno::Sequence< rtl::OUString >
-ScVbaFrame::getServiceNames()
-{
- static uno::Sequence< rtl::OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
- {
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.Frame" ) );
- }
- return aServiceNames;
-}
diff --git a/sc/source/ui/vba/vbaframe.hxx b/sc/source/ui/vba/vbaframe.hxx
deleted file mode 100644
index 60204571c749..000000000000
--- a/sc/source/ui/vba/vbaframe.hxx
+++ /dev/null
@@ -1,58 +0,0 @@
-/*************************************************************************
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile$
- *
- * $Revision$
- *
- * last change: $Author$ $Date$
- *
- * 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 2005 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
- *
- ************************************************************************/
-#ifndef SC_VBA_FRAME_HXX
-#define SC_VBA_FRAME_HXX
-#include <cppuhelper/implbase1.hxx>
-#include <ooo/vba/msforms/XLabel.hpp>
-
-#include "vbacontrol.hxx"
-#include "vbahelper.hxx"
-
-typedef cppu::ImplInheritanceHelper1< ScVbaControl, ov::msforms::XLabel > FrameImpl_BASE;
-
-class ScVbaFrame : public FrameImpl_BASE
-{
-public:
- ScVbaFrame( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper );
- // Attributes
- virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setValue( const css::uno::Any& _value ) 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);
- //XHelperInterface
- virtual rtl::OUString& getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-};
-#endif //SC_VBA_LABEL_HXX
diff --git a/sc/source/ui/vba/vbaglobals.cxx b/sc/source/ui/vba/vbaglobals.cxx
index 216a8a3d1f70..982289f0002e 100644
--- a/sc/source/ui/vba/vbaglobals.cxx
+++ b/sc/source/ui/vba/vbaglobals.cxx
@@ -27,13 +27,14 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#include "helperdecl.hxx"
+#include <vbahelper/helperdecl.hxx>
#include "vbaglobals.hxx"
#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"
@@ -49,11 +50,20 @@ using namespace ::ooo::vba;
// ScVbaGlobals
// =============================================================================
-ScVbaGlobals::ScVbaGlobals( css::uno::Reference< css::uno::XComponentContext >const& rxContext )
- :m_xContext( rxContext )
+//ScVbaGlobals::ScVbaGlobals( css::uno::Reference< css::uno::XComponentContext >const& rxContext, ) : ScVbaGlobals_BASE( uno::Reference< XHelperInterface >(), rxContext )
+rtl::OUString sDocCtxName( RTL_CONSTASCII_USTRINGPARAM("ExcelDocumentContext") );
+
+ScVbaGlobals::ScVbaGlobals( uno::Sequence< uno::Any > const& aArgs, uno::Reference< uno::XComponentContext >const& rxContext ) : ScVbaGlobals_BASE( uno::Reference< XHelperInterface >(), rxContext, sDocCtxName )
{
OSL_TRACE("ScVbaGlobals::ScVbaGlobals()");
- mxApplication = uno::Reference< excel::XApplication > ( new ScVbaApplication( m_xContext) );
+
+ uno::Sequence< beans::PropertyValue > aInitArgs( 2 );
+ aInitArgs[ 0 ].Name = rtl::OUString::createFromAscii("Application");
+ aInitArgs[ 0 ].Value = uno::makeAny( getApplication() );
+ aInitArgs[ 1 ].Name = sDocCtxName;
+ aInitArgs[ 1 ].Value = uno::makeAny( getXSomethingFromArgs< frame::XModel >( aArgs, 0 ) );
+
+ init( aInitArgs );
}
ScVbaGlobals::~ScVbaGlobals()
@@ -61,23 +71,6 @@ ScVbaGlobals::~ScVbaGlobals()
OSL_TRACE("ScVbaGlobals::~ScVbaGlobals");
}
-// Will throw if singleton can't be accessed
-uno::Reference< XGlobals >
-ScVbaGlobals::getGlobalsImpl( const uno::Reference< uno::XComponentContext >& xContext ) throw ( uno::RuntimeException )
-{
- uno::Reference< XGlobals > xGlobals(
- xContext->getValueByName( ::rtl::OUString::createFromAscii(
- "/singletons/ooo.vba.theGlobals") ), uno::UNO_QUERY);
-
- if ( !xGlobals.is() )
- {
- throw uno::RuntimeException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": Couldn't access Globals" ) ),
- uno::Reference< XInterface >() );
- }
- return xGlobals;
-}
-
// =============================================================================
// XGlobals
// =============================================================================
@@ -85,14 +78,16 @@ uno::Reference<excel::XApplication >
ScVbaGlobals::getApplication() throw (uno::RuntimeException)
{
// OSL_TRACE("In ScVbaGlobals::getApplication");
- return mxApplication;
+ if ( !mxApplication.is() )
+ mxApplication.set( new ScVbaApplication( mxContext) );
+ return mxApplication;
}
uno::Reference< excel::XWorkbook > SAL_CALL
ScVbaGlobals::getActiveWorkbook() throw (uno::RuntimeException)
{
// OSL_TRACE("In ScVbaGlobals::getActiveWorkbook");
- uno::Reference< excel::XWorkbook > xWorkbook( mxApplication->getActiveWorkbook(), uno::UNO_QUERY);
+ uno::Reference< excel::XWorkbook > xWorkbook( getApplication()->getActiveWorkbook(), uno::UNO_QUERY);
if ( xWorkbook.is() )
{
return xWorkbook;
@@ -103,22 +98,28 @@ ScVbaGlobals::getActiveWorkbook() throw (uno::RuntimeException)
}
+uno::Reference< excel::XWindow > SAL_CALL
+ScVbaGlobals::getActiveWindow() throw (uno::RuntimeException)
+{
+ return getApplication()->getActiveWindow();
+}
+
uno::Reference< excel::XWorksheet > SAL_CALL
ScVbaGlobals::getActiveSheet() throw (uno::RuntimeException)
{
- return mxApplication->getActiveSheet();
+ return getApplication()->getActiveSheet();
}
uno::Any SAL_CALL
ScVbaGlobals::WorkBooks( const uno::Any& aIndex ) throw (uno::RuntimeException)
{
- return uno::Any( mxApplication->Workbooks(aIndex) );
+ return uno::Any( getApplication()->Workbooks(aIndex) );
}
uno::Any SAL_CALL
ScVbaGlobals::WorkSheets(const uno::Any& aIndex) throw (uno::RuntimeException)
{
- return mxApplication->Worksheets( aIndex );
+ return getApplication()->Worksheets( aIndex );
}
uno::Any SAL_CALL
ScVbaGlobals::Sheets( const uno::Any& aIndex ) throw (uno::RuntimeException)
@@ -126,26 +127,6 @@ ScVbaGlobals::Sheets( const uno::Any& aIndex ) throw (uno::RuntimeException)
return WorkSheets( aIndex );
}
-::uno::Sequence< ::uno::Any > SAL_CALL
-ScVbaGlobals::getGlobals( ) throw (::uno::RuntimeException)
-{
- sal_uInt32 nMax = 0;
- uno::Sequence< uno::Any > maGlobals(4);
- maGlobals[ nMax++ ] <<= ScVbaGlobals::getGlobalsImpl(m_xContext);
- maGlobals[ nMax++ ] <<= mxApplication;
-
- uno::Reference< excel::XWorkbook > xWorkbook = mxApplication->getActiveWorkbook();
- if( xWorkbook.is() )
- {
- maGlobals[ nMax++ ] <<= xWorkbook;
- uno::Reference< excel::XWorksheet > xWorksheet = xWorkbook->getActiveSheet();
- if( xWorksheet.is() )
- maGlobals[ nMax++ ] <<= xWorksheet;
- }
- maGlobals.realloc( nMax );
- return maGlobals;
-}
-
uno::Any SAL_CALL
ScVbaGlobals::Range( const uno::Any& Cell1, const uno::Any& Cell2 ) throw (uno::RuntimeException)
{
@@ -158,13 +139,140 @@ ScVbaGlobals::Names( const css::uno::Any& aIndex ) throw ( uno::RuntimeException
return getApplication()->Names( aIndex );
}
+uno::Reference< excel::XRange > SAL_CALL
+ScVbaGlobals::getActiveCell() throw (uno::RuntimeException)
+{
+ return getApplication()->getActiveCell();
+}
+
+uno::Reference< XAssistant > SAL_CALL
+ScVbaGlobals::getAssistant() throw (uno::RuntimeException)
+{
+ return getApplication()->getAssistant();
+}
+
+uno::Any SAL_CALL
+ScVbaGlobals::getSelection() throw (uno::RuntimeException)
+{
+ return getApplication()->getSelection();
+}
+
+uno::Reference< excel::XWorkbook > SAL_CALL
+ScVbaGlobals::getThisWorkbook() throw (uno::RuntimeException)
+{
+ return getApplication()->getThisWorkbook();
+}
+void SAL_CALL
+ScVbaGlobals::Calculate() throw (::com::sun::star::script::BasicErrorException, ::com::sun::star::uno::RuntimeException)
+{
+ return getApplication()->Calculate();
+}
+
+uno::Reference< excel::XRange > SAL_CALL
+ScVbaGlobals::Cells( const uno::Any& RowIndex, const uno::Any& ColumnIndex ) throw (uno::RuntimeException)
+{
+ return getApplication()->getActiveSheet()->Cells( RowIndex, ColumnIndex );
+}
+uno::Reference< excel::XRange > SAL_CALL
+ScVbaGlobals::Columns( const uno::Any& aIndex ) throw (uno::RuntimeException)
+{
+ return getApplication()->getActiveSheet()->Columns( aIndex );
+}
+
+uno::Any SAL_CALL
+ScVbaGlobals::CommandBars( const uno::Any& aIndex ) throw (uno::RuntimeException)
+{
+ uno::Reference< XApplicationBase > xBase( getApplication(), uno::UNO_QUERY_THROW );
+ return xBase->CommandBars( aIndex );
+}
+
+css::uno::Reference< ov::excel::XRange > SAL_CALL
+ScVbaGlobals::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)
+{
+ return getApplication()->Union( Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9, Arg10, Arg11, Arg12, Arg13, Arg14, Arg15, Arg16, Arg17, Arg18, Arg19, Arg20, Arg21, Arg22, Arg23, Arg24, Arg25, Arg26, Arg27, Arg28, Arg29, Arg30 );
+}
+css::uno::Reference< ov::excel::XRange > SAL_CALL
+ScVbaGlobals::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)
+{
+ return getApplication()->Intersect( Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9, Arg10, Arg11, Arg12, Arg13, Arg14, Arg15, Arg16, Arg17, Arg18, Arg19, Arg20, Arg21, Arg22, Arg23, Arg24, Arg25, Arg26, Arg27, Arg28, Arg29, Arg30 );
+}
+
+uno::Any SAL_CALL
+ScVbaGlobals::Evaluate( const ::rtl::OUString& Name ) throw (uno::RuntimeException)
+{
+ return getApplication()->Evaluate( Name );
+}
+
+css::uno::Any SAL_CALL
+ScVbaGlobals::WorksheetFunction( ) throw (css::uno::RuntimeException)
+{
+ return getApplication()->WorksheetFunction();
+}
+
+uno::Any SAL_CALL
+ScVbaGlobals::Windows( const uno::Any& aIndex ) throw (uno::RuntimeException)
+{
+ return getApplication()->Windows( aIndex );
+}
+
+uno::Reference< excel::XRange > SAL_CALL
+ScVbaGlobals::Rows( const uno::Any& aIndex ) throw (uno::RuntimeException)
+{
+ return getApplication()->getActiveSheet()->Rows( aIndex );
+
+}
+
+uno::Sequence< ::rtl::OUString > SAL_CALL
+ScVbaGlobals::getAvailableServiceNames( ) throw (uno::RuntimeException)
+{
+ static bool bInit = false;
+ static uno::Sequence< rtl::OUString > serviceNames( ScVbaGlobals_BASE::getAvailableServiceNames() );
+ if ( !bInit )
+ {
+ rtl::OUString names[] = {
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "ooo.vba.excel.Range" ) ),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "ooo.vba.excel.Workbook" ) ),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "ooo.vba.excel.Window" ) ),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "ooo.vba.excel.Worksheet" ) ),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "ooo.vba.excel.Application" ) ),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "ooo.vba.excel.Hyperlink" ) ),
+ };
+ sal_Int32 nExcelServices = ( sizeof( names )/ sizeof( names[0] ) );
+ sal_Int32 startIndex = serviceNames.getLength();
+ serviceNames.realloc( serviceNames.getLength() + nExcelServices );
+ for ( sal_Int32 index = 0; index < nExcelServices; ++index )
+ serviceNames[ startIndex + index ] = names[ index ];
+ bInit = true;
+ }
+ return serviceNames;
+}
+
+rtl::OUString&
+ScVbaGlobals::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaGlobals") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+ScVbaGlobals::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Globals" ) );
+ }
+ return aServiceNames;
+}
+
namespace globals
{
namespace sdecl = comphelper::service_decl;
-sdecl::class_<ScVbaGlobals, sdecl::with_args<false> > serviceImpl;
+sdecl::vba_service_class_<ScVbaGlobals, sdecl::with_args<true> > serviceImpl;
extern sdecl::ServiceDecl const serviceDecl(
serviceImpl,
"ScVbaGlobals",
- "ooo.vba.Globals" );
+ "ooo.vba.excel.Globals" );
}
diff --git a/sc/source/ui/vba/vbaglobals.hxx b/sc/source/ui/vba/vbaglobals.hxx
index f24032d14ad9..25d36af55c8d 100644
--- a/sc/source/ui/vba/vbaglobals.hxx
+++ b/sc/source/ui/vba/vbaglobals.hxx
@@ -33,43 +33,65 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <ooo/vba/XGlobals.hpp>
+#include <ooo/vba/excel/XGlobals.hpp>
+#include <ooo/vba/excel/XApplication.hpp>
#include <cppuhelper/implbase1.hxx>
-#include "vbahelper.hxx"
+#include "excelvbahelper.hxx"
+#include <vbahelper/vbaglobalbase.hxx>
// =============================================================================
// class ScVbaGlobals
// =============================================================================
- typedef ::cppu::WeakImplHelper1<
- ov::XGlobals > ScVbaGlobals_BASE;
-
+typedef ::cppu::ImplInheritanceHelper1< VbaGlobalsBase, ov::excel::XGlobals > ScVbaGlobals_BASE;
class ScVbaGlobals : public ScVbaGlobals_BASE
{
- private:
- css::uno::Reference< css::uno::XComponentContext > m_xContext;
- css::uno::Reference< ov::excel::XApplication > mxApplication;
+ css::uno::Reference< ov::excel::XApplication > mxApplication;
+ virtual css::uno::Reference<
+ ov::excel::XApplication > SAL_CALL getApplication()
+ throw (css::uno::RuntimeException);
public:
- ScVbaGlobals(
+ ScVbaGlobals( css::uno::Sequence< css::uno::Any > const& aArgs,
css::uno::Reference< css::uno::XComponentContext >const& rxContext );
+ //ScVbaGlobals(
+ // css::uno::Reference< css::uno::XComponentContext >const& rxContext, );
virtual ~ScVbaGlobals();
- static css::uno::Reference< ov::XGlobals > getGlobalsImpl(const css::uno::Reference< css::uno::XComponentContext >& ) throw (css::uno::RuntimeException);
-
// XGlobals
- virtual css::uno::Reference<
- ov::excel::XApplication > SAL_CALL getApplication()
- throw (css::uno::RuntimeException);
virtual css::uno::Reference< ov::excel::XWorkbook > SAL_CALL getActiveWorkbook() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ov::excel::XWindow > SAL_CALL getActiveWindow() throw (css::uno::RuntimeException);
virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL getActiveSheet() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ov::XAssistant > SAL_CALL getAssistant() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL Calculate( ) throw (::com::sun::star::script::BasicErrorException, ::com::sun::star::uno::RuntimeException);
+
+ virtual css::uno::Any SAL_CALL getSelection() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ov::excel::XRange > SAL_CALL getActiveCell() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ov::excel::XWorkbook > SAL_CALL getThisWorkbook() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Cells( const css::uno::Any& RowIndex, const css::uno::Any& ColumnIndex ) throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Columns( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL CommandBars( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Evaluate( const ::rtl::OUString& Name ) throw (css::uno::RuntimeException);
+
virtual css::uno::Any SAL_CALL WorkSheets(const css::uno::Any& aIndex ) 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 WorksheetFunction( ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Windows( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL Sheets( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
- virtual css::uno::Sequence< css::uno::Any > SAL_CALL getGlobals( ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL Range( const css::uno::Any& Cell1, const css::uno::Any& Cell2 ) throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< ::ooo::vba::excel::XRange > SAL_CALL Rows( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL Names( const css::uno::Any& aIndex ) throw ( css::uno::RuntimeException );
+ 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);
+
+
+
+ // XMultiServiceFactory
+ virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getAvailableServiceNames( ) throw (css::uno::RuntimeException);
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
};
#endif //
diff --git a/sc/source/ui/vba/vbahelper.cxx b/sc/source/ui/vba/vbahelper.cxx
index 353c036393c2..e010d1cf10f3 100644
--- a/sc/source/ui/vba/vbahelper.cxx
+++ b/sc/source/ui/vba/vbahelper.cxx
@@ -45,7 +45,7 @@
#include <sfx2/viewfrm.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/app.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <docuno.hxx>
@@ -826,3 +826,5 @@ ScVbaCellRangeAccess::GetDataSet( ScCellRangeObj* pRangeObj )
} // openoffice
} //org
+=======
+>>>>>>> other
diff --git a/sc/source/ui/vba/vbahelper.hxx b/sc/source/ui/vba/vbahelper.hxx
deleted file mode 100644
index 3def6b078096..000000000000
--- a/sc/source/ui/vba/vbahelper.hxx
+++ /dev/null
@@ -1,352 +0,0 @@
-/*************************************************************************
- *
- * 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: vbahelper.hxx,v $
- * $Revision: 1.5.32.1 $
- *
- * 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_HELPER_HXX
-#define SC_VBA_HELPER_HXX
-
-#include <com/sun/star/drawing/XShape.hpp>
-#include <com/sun/star/beans/XIntrospectionAccess.hpp>
-#include <com/sun/star/script/BasicErrorException.hpp>
-#include <com/sun/star/script/XTypeConverter.hpp>
-#include <com/sun/star/lang/IllegalArgumentException.hpp>
-#include <com/sun/star/awt/XControl.hpp>
-#include <com/sun/star/awt/XDevice.hpp>
-#include <basic/sberrors.hxx>
-#include <cppuhelper/implbase1.hxx>
-#include <com/sun/star/frame/XModel.hpp>
-#include <docsh.hxx>
-#include <sfx2/dispatch.hxx>
-#include <ooo/vba/msforms/XShape.hpp>
-#include "cellsuno.hxx"
-
-namespace css = ::com::sun::star;
-
-namespace ooo
-{
- namespace vba
- {
- template < class T >
- css::uno::Reference< T > getXSomethingFromArgs( css::uno::Sequence< css::uno::Any > const & args, sal_Int32 nPos, bool bCanBeNull = true ) throw (css::lang::IllegalArgumentException)
- {
- if ( args.getLength() < ( nPos + 1) )
- throw css::lang::IllegalArgumentException();
- css::uno::Reference< T > aSomething( args[ nPos ], css::uno::UNO_QUERY );
- if ( !bCanBeNull && !aSomething.is() )
- throw css::lang::IllegalArgumentException();
- return aSomething;
- }
- css::uno::Reference< css::beans::XIntrospectionAccess > getIntrospectionAccess( const css::uno::Any& aObject ) throw (css::uno::RuntimeException);
- css::uno::Reference< css::script::XTypeConverter > getTypeConverter( const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw (css::uno::RuntimeException);
-
- void dispatchRequests (css::uno::Reference< css::frame::XModel>& xModel,rtl::OUString & aUrl) ;
- void dispatchRequests (css::uno::Reference< css::frame::XModel>& xModel,rtl::OUString & aUrl, css::uno::Sequence< css::beans::PropertyValue >& sProps ) ;
- void dispatchExecute(css::uno::Reference< css::frame::XModel>& xModel, USHORT nSlot, SfxCallMode nCall = SFX_CALLMODE_SYNCHRON );
- void implnCopy();
- void implnPaste();
- void implnCut();
- void implnPasteSpecial(sal_uInt16 nFlags,sal_uInt16 nFunction,sal_Bool bSkipEmpty, sal_Bool bTranspose);
- css::uno::Reference< css::frame::XModel >
- getCurrentDocument() throw (css::uno::RuntimeException);
- ScTabViewShell* getBestViewShell( css::uno::Reference< css::frame::XModel>& xModel ) ;
- ScDocShell* getDocShell( css::uno::Reference< css::frame::XModel>& xModel ) ;
- ScTabViewShell* getCurrentBestViewShell();
- SfxViewFrame* getCurrentViewFrame();
- sal_Int32 OORGBToXLRGB( sal_Int32 );
- sal_Int32 XLRGBToOORGB( sal_Int32 );
- css::uno::Any OORGBToXLRGB( const css::uno::Any& );
- css::uno::Any XLRGBToOORGB( const css::uno::Any& );
- // provide a NULL object that can be passed as variant so that
- // the object when passed to IsNull will return true. aNULL
- // contains an empty object reference
- const css::uno::Any& aNULL();
- void PrintOutHelper( const css::uno::Any& From, const css::uno::Any& To, const css::uno::Any& Copies, const css::uno::Any& Preview, const css::uno::Any& ActivePrinter, const css::uno::Any& PrintToFile, const css::uno::Any& Collate, const css::uno::Any& PrToFileName, css::uno::Reference< css::frame::XModel >& xModel, sal_Bool bSelection );
- void PrintPreviewHelper( const css::uno::Any& EnableChanges, css::uno::Reference< css::frame::XModel >& xModel );
-
- rtl::OUString getAnyAsString( const css::uno::Any& pvargItem ) throw ( css::uno::RuntimeException );
- rtl::OUString VBAToRegexp(const rtl::OUString &rIn, bool bForLike = false); // needs to be in an uno service ( already this code is duplicated in basic )
- double getPixelTo100thMillimeterConversionFactor( css::uno::Reference< css::awt::XDevice >& xDevice, sal_Bool bVertical);
- double PointsToPixels( css::uno::Reference< css::awt::XDevice >& xDevice, double fPoints, sal_Bool bVertical);
- double PixelsToPoints( css::uno::Reference< css::awt::XDevice >& xDevice, double fPoints, sal_Bool bVertical);
-
-
-class ScVbaCellRangeAccess
-{
-public:
- static SfxItemSet* GetDataSet( ScCellRangeObj* pRangeObj );
-};
-
-class Millimeter
-{
-//Factor to translate between points and hundredths of millimeters:
-private:
- static const double factor;
-
- double m_nMillimeter;
-
-public:
- Millimeter():m_nMillimeter(0) {}
-
- Millimeter(double mm):m_nMillimeter(mm) {}
-
- void set(double mm) { m_nMillimeter = mm; }
- void setInPoints(double points)
- {
- m_nMillimeter = points * 0.352777778;
- // 25.4mm / 72
- }
-
- void setInHundredthsOfOneMillimeter(double hmm)
- {
- m_nMillimeter = hmm / 100;
- }
-
- double get()
- {
- return m_nMillimeter;
- }
- double getInHundredthsOfOneMillimeter()
- {
- return m_nMillimeter * 100;
- }
- double getInPoints()
- {
- return m_nMillimeter * 2.834645669; // 72 / 25.4mm
- }
-
- static sal_Int32 getInHundredthsOfOneMillimeter(double points)
- {
- sal_Int32 mm = static_cast<sal_Int32>(points * factor);
- return mm;
- }
-
- static double getInPoints(int _hmm)
- {
- double points = double( static_cast<double>(_hmm) / factor);
- return points;
- }
-};
-
-class AbstractGeometryAttributes // probably should replace the ShapeHelper below
-{
-public:
- virtual ~AbstractGeometryAttributes() {}
- virtual double getLeft() = 0;
- virtual void setLeft( double ) = 0;
- virtual double getTop() = 0;
- virtual void setTop( double ) = 0;
- virtual double getHeight() = 0;
- virtual void setHeight( double ) = 0;
- virtual double getWidth() = 0;
- virtual void setWidth( double ) = 0;
-};
-
-class ConcreteXShapeGeometryAttributes : public AbstractGeometryAttributes
-{
-public:
- css::uno::Reference< ooo::vba::msforms::XShape > m_xShape;
- ConcreteXShapeGeometryAttributes( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& xShape );
- virtual double getLeft()
- {
- return m_xShape->getLeft();
- }
- virtual void setLeft( double nLeft )
- {
- m_xShape->setLeft( nLeft );
- }
- virtual double getTop()
- {
- return m_xShape->getTop();
- }
- virtual void setTop( double nTop )
- {
- m_xShape->setTop( nTop );
- }
-
- virtual double getHeight()
- {
- return m_xShape->getHeight();
- }
- virtual void setHeight( double nHeight )
- {
- m_xShape->setHeight( nHeight );
- }
- virtual double getWidth()
- {
- return m_xShape->getWidth();
- }
- virtual void setWidth( double nWidth)
- {
- m_xShape->setHeight( nWidth );
- }
-
-
-};
-#define VBA_LEFT "PositionX"
-#define VBA_TOP "PositionY"
-class UserFormGeometryHelper : public AbstractGeometryAttributes
-{
-
- css::uno::Reference< css::beans::XPropertySet > mxModel;
-public:
- UserFormGeometryHelper( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::awt::XControl >& xControl );
- virtual double getLeft();
- virtual void setLeft( double nLeft );
- virtual double getTop();
- virtual void setTop( double nTop );
- virtual double getHeight();
- virtual void setHeight( double nHeight );
- virtual double getWidth();
- virtual void setWidth( double nWidth);
-};
-
-class ShapeHelper
-{
-protected:
- css::uno::Reference< css::drawing::XShape > xShape;
-public:
- ShapeHelper( const css::uno::Reference< css::drawing::XShape >& _xShape) throw (css::script::BasicErrorException ) : xShape( _xShape )
- {
- if( !xShape.is() )
- throw css::uno::RuntimeException( rtl::OUString::createFromAscii("No valid shape for helper"), css::uno::Reference< css::uno::XInterface >() );
- }
-
- double getHeight()
- {
- return Millimeter::getInPoints(xShape->getSize().Height);
- }
-
-
- void setHeight(double _fheight) throw ( css::script::BasicErrorException )
- {
- try
- {
- css::awt::Size aSize = xShape->getSize();
- aSize.Height = Millimeter::getInHundredthsOfOneMillimeter(_fheight);
- xShape->setSize(aSize);
- }
- catch ( css::uno::Exception& /*e*/)
- {
- throw css::script::BasicErrorException( rtl::OUString(), css::uno::Reference< css::uno::XInterface >(), SbERR_METHOD_FAILED, rtl::OUString() );
- }
- }
-
-
- double getWidth()
- {
- return Millimeter::getInPoints(xShape->getSize().Width);
- }
-
- void setWidth(double _fWidth) throw ( css::script::BasicErrorException )
- {
- try
- {
- css::awt::Size aSize = xShape->getSize();
- aSize.Width = Millimeter::getInHundredthsOfOneMillimeter(_fWidth);
- xShape->setSize(aSize);
- }
- catch (css::uno::Exception& /*e*/)
- {
- throw css::script::BasicErrorException( rtl::OUString(), css::uno::Reference< css::uno::XInterface >(), SbERR_METHOD_FAILED, rtl::OUString() );
- }
- }
-
-
- double getLeft()
- {
- return Millimeter::getInPoints(xShape->getPosition().X);
- }
-
-
- void setLeft(double _fLeft)
- {
- css::awt::Point aPoint = xShape->getPosition();
- aPoint.X = Millimeter::getInHundredthsOfOneMillimeter(_fLeft);
- xShape->setPosition(aPoint);
- }
-
-
- double getTop()
- {
- return Millimeter::getInPoints(xShape->getPosition().Y);
- }
-
-
- void setTop(double _fTop)
- {
- css::awt::Point aPoint = xShape->getPosition();
- aPoint.Y = Millimeter::getInHundredthsOfOneMillimeter(_fTop);
- xShape->setPosition(aPoint);
- }
-
-};
-
-class ContainerUtilities
-{
-
-public:
- static rtl::OUString getUniqueName( const css::uno::Sequence< ::rtl::OUString >& _slist, const rtl::OUString& _sElementName, const ::rtl::OUString& _sSuffixSeparator);
- static rtl::OUString getUniqueName( const css::uno::Sequence< rtl::OUString >& _slist, const rtl::OUString _sElementName, const rtl::OUString& _sSuffixSeparator, sal_Int32 _nStartSuffix );
-
- static sal_Int32 FieldInList( const css::uno::Sequence< rtl::OUString >& SearchList, const rtl::OUString& SearchString );
-};
-
-// really just a a place holder to ease the porting pain
-class DebugHelper
-{
-public:
- static void exception( const rtl::OUString& DetailedMessage, const css::uno::Exception& ex, int err, const rtl::OUString& /*additionalArgument*/ ) throw( css::script::BasicErrorException )
- {
- // #TODO #FIXME ( do we want to support additionalArg here )
- throw css::script::BasicErrorException( DetailedMessage.concat( rtl::OUString::createFromAscii(" ") ).concat( ex.Message ), css::uno::Reference< css::uno::XInterface >(), err, rtl::OUString() );
- }
-
- static void exception( int err, const rtl::OUString& additionalArgument ) throw( css::script::BasicErrorException )
- {
- exception( rtl::OUString(), css::uno::Exception(), err, additionalArgument );
- }
-
- static void exception( css::uno::Exception& ex ) throw( css::script::BasicErrorException )
- {
- exception( rtl::OUString(), ex, SbERR_INTERNAL_ERROR, rtl::OUString() );
- }
-};
- } // openoffice
-} // org
-
-namespace ov = ooo::vba;
-
-#ifdef DEBUG
-# define SC_VBA_FIXME(a) OSL_TRACE( a )
-# define SC_VBA_STUB() SC_VBA_FIXME(( "%s - stubbed\n", __FUNCTION__ ))
-#else
-# define SC_VBA_FIXME(a)
-# define SC_VBA_STUB()
-#endif
-
-#endif
diff --git a/sc/source/ui/vba/vbahelperinterface.hxx b/sc/source/ui/vba/vbahelperinterface.hxx
deleted file mode 100644
index 567741cfafbc..000000000000
--- a/sc/source/ui/vba/vbahelperinterface.hxx
+++ /dev/null
@@ -1,116 +0,0 @@
-/*************************************************************************
- *
- * 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: vbahelperinterface.hxx,v $
- * $Revision: 1.3 $
- *
- * 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_HELPERINTERFACE_HXX
-#define SC_VBA_HELPERINTERFACE_HXX
-
-#include <cppuhelper/implbase1.hxx>
-#include <ooo/vba/XHelperInterface.hpp>
-#include "vbahelper.hxx"
-#include "vbaglobals.hxx"
-
-// use this class when you have an a object like
-// interface XAnInterface which contains XHelperInterface in its inheritance hierarchy
-// interface XAnInterface
-// {
-// interface XHelperInterface;
-// [attribute, string] name;
-// }
-// or
-// interface XAnInterface : XHelperInterface;
-// {
-// [attribute, string] name;
-// }
-//
-// then this class can provide a default implementation of XHelperInterface,
-// you can use it like this
-// typedef InheritedHelperInterfaceImpl< XAnInterface > > AnInterfaceImpl_BASE;
-// class AnInterfaceImpl : public AnInterfaceImpl_BASE
-// {
-// public:
-// AnInterface( const Reference< HelperInterface >& xParent ) : AnInterfaceImpl_BASE( xParent ) {}
-// // implement XAnInterface methods only, no need to implement the XHelperInterface
-// // methods
-// virtual void setName( const OUString& );
-// virtual OUString getName();
-// }
-//
-const ::rtl::OUString sHelperServiceName( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.HelperServiceBase" ) );
-
-template< typename Ifc1 >
-class InheritedHelperInterfaceImpl : public Ifc1
-{
-protected:
- css::uno::WeakReference< ov::XHelperInterface > mxParent;
- css::uno::Reference< css::uno::XComponentContext > mxContext;
-public:
- InheritedHelperInterfaceImpl() {}
- InheritedHelperInterfaceImpl( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext ) : mxParent( xParent ), mxContext( xContext ) {}
- virtual rtl::OUString& getServiceImplName() = 0;
- virtual css::uno::Sequence<rtl::OUString> getServiceNames() = 0;
-
- // XHelperInterface Methods
- virtual ::sal_Int32 SAL_CALL getCreator() throw (css::script::BasicErrorException, css::uno::RuntimeException)
- {
- return 0x53756E4F;
- }
- virtual css::uno::Reference< ov::XHelperInterface > SAL_CALL getParent( ) throw (css::script::BasicErrorException, css::uno::RuntimeException) { return mxParent; }
-
- virtual css::uno::Any SAL_CALL Application( ) throw (css::script::BasicErrorException, css::uno::RuntimeException) { return css::uno::makeAny( ScVbaGlobals::getGlobalsImpl( mxContext )->getApplication() ); }
-
-
- // XServiceInfo Methods
- virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (css::uno::RuntimeException) { return getServiceImplName(); }
- virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (css::uno::RuntimeException)
- {
- css::uno::Sequence< rtl::OUString > sServices = getSupportedServiceNames();
- const rtl::OUString* pStart = sServices.getConstArray();
- const rtl::OUString* pEnd = pStart + sServices.getLength();
- for ( ; pStart != pEnd ; ++pStart )
- if ( (*pStart).equals( ServiceName ) )
- return sal_True;
- return sal_False;
- }
- virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (css::uno::RuntimeException)
- {
- css::uno::Sequence< rtl::OUString > aNames = getServiceNames();;
- return aNames;
- }
- };
-
-template< typename Ifc1 >
-class InheritedHelperInterfaceImpl1 : public InheritedHelperInterfaceImpl< ::cppu::WeakImplHelper1< Ifc1 > >
-
-{
-typedef InheritedHelperInterfaceImpl< ::cppu::WeakImplHelper1< Ifc1 > > Base;
-public:
- InheritedHelperInterfaceImpl1< Ifc1 > ( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext ) : Base( xParent, xContext ) {}
-
-};
-#endif
diff --git a/sc/source/ui/vba/vbahyperlink.cxx b/sc/source/ui/vba/vbahyperlink.cxx
index 27bcfaa28145..f6aa8cf8c4cb 100644
--- a/sc/source/ui/vba/vbahyperlink.cxx
+++ b/sc/source/ui/vba/vbahyperlink.cxx
@@ -32,7 +32,7 @@
* MA 02111-1307 USA
*
************************************************************************/
-#include "helperdecl.hxx"
+#include <vbahelper/helperdecl.hxx>
#include "vbahyperlink.hxx"
#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/text/XTextFieldsSupplier.hpp>
diff --git a/sc/source/ui/vba/vbahyperlink.hxx b/sc/source/ui/vba/vbahyperlink.hxx
index 2789b4d133b2..a72eeb325ac6 100644
--- a/sc/source/ui/vba/vbahyperlink.hxx
+++ b/sc/source/ui/vba/vbahyperlink.hxx
@@ -40,7 +40,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <ooo/vba/excel/XRange.hpp>
-#include "vbahelperinterface.hxx"
+#include <vbahelper/vbahelperinterface.hxx>
typedef InheritedHelperInterfaceImpl1< ov::excel::XHyperlink > HyperlinkImpl_BASE;
diff --git a/sc/source/ui/vba/vbaimage.cxx b/sc/source/ui/vba/vbaimage.cxx
deleted file mode 100644
index 7e6cd34c191e..000000000000
--- a/sc/source/ui/vba/vbaimage.cxx
+++ /dev/null
@@ -1,59 +0,0 @@
-/*************************************************************************
- *
- * 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$
- * $Revision$
- *
- * 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 "vbaimage.hxx"
-#include <vector>
-
-using namespace com::sun::star;
-using namespace ooo::vba;
-
-
-const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
-ScVbaImage::ScVbaImage( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ImageImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
-{
-}
-
-rtl::OUString&
-ScVbaImage::getServiceImplName()
-{
- static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaImage") );
- return sImplName;
-}
-
-uno::Sequence< rtl::OUString >
-ScVbaImage::getServiceNames()
-{
- static uno::Sequence< rtl::OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
- {
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.Image" ) );
- }
- return aServiceNames;
-}
diff --git a/sc/source/ui/vba/vbaimage.hxx b/sc/source/ui/vba/vbaimage.hxx
deleted file mode 100644
index 9d4b33818663..000000000000
--- a/sc/source/ui/vba/vbaimage.hxx
+++ /dev/null
@@ -1,48 +0,0 @@
-/*************************************************************************
- *
- * 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$
- * $Revision$
- *
- * 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_IMAGE_HXX
-#define SC_VBA_IMAGE_HXX
-#include <cppuhelper/implbase1.hxx>
-#include <ooo/vba/msforms/XImage.hpp>
-
-#include "vbacontrol.hxx"
-#include "vbahelper.hxx"
-
-typedef cppu::ImplInheritanceHelper1< ScVbaControl, ov::msforms::XImage > ImageImpl_BASE;
-
-class ScVbaImage : public ImageImpl_BASE
-{
-public:
- ScVbaImage( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper );
- //XHelperInterface
- virtual rtl::OUString& getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-};
-#endif //SC_VBA_IMAGE_HXX
diff --git a/sc/source/ui/vba/vbainterior.cxx b/sc/source/ui/vba/vbainterior.cxx
index bb85b6c21922..9c309c997ed3 100644
--- a/sc/source/ui/vba/vbainterior.cxx
+++ b/sc/source/ui/vba/vbainterior.cxx
@@ -163,10 +163,18 @@ ScVbaInterior::setColorIndex( const css::uno::Any& _colorindex ) throw (css::uno
sal_Int32 nIndex = 0;
_colorindex >>= nIndex;
- // setColor expects colors in XL RGB values
- // #FIXME this is daft we convert OO RGB val to XL RGB val and
- // then back again to OO RGB value
- setColor( OORGBToXLRGB( GetIndexColor( nIndex ) ) );
+ // hackly for excel::XlColorIndex::xlColorIndexNone
+ if( nIndex == excel::XlColorIndex::xlColorIndexNone )
+ {
+ m_xProps->setPropertyValue( BACKCOLOR, uno::makeAny( sal_Int32( -1 ) ) );
+ }
+ else
+ {
+ // setColor expects colors in XL RGB values
+ // #FIXME this is daft we convert OO RGB val to XL RGB val and
+ // then back again to OO RGB value
+ setColor( OORGBToXLRGB( GetIndexColor( nIndex ) ) );
+ }
}
uno::Any
ScVbaInterior::GetIndexColor( const sal_Int32& nColorIndex )
@@ -204,13 +212,21 @@ uno::Any SAL_CALL
ScVbaInterior::getColorIndex() throw ( css::uno::RuntimeException )
{
sal_Int32 nColor = 0;
+ // hackly for excel::XlColorIndex::xlColorIndexNone
+ uno::Any aColor = m_xProps->getPropertyValue( BACKCOLOR );
+ if( ( aColor >>= nColor ) && ( nColor == -1 ) )
+ {
+ nColor = excel::XlColorIndex::xlColorIndexNone;
+ return uno::makeAny( nColor );
+ }
+
// getColor returns Xl ColorValue, need to convert it to OO val
// as the palette deals with OO RGB values
// #FIXME this is daft in getColor we convert OO RGB val to XL RGB val
// and then back again to OO RGB value
XLRGBToOORGB( getColor() ) >>= nColor;
- return uno::makeAny( GetIndexColor( nColor ) );
+ return uno::makeAny( GetColorIndex( nColor ) );
}
Color
ScVbaInterior::GetPatternColor( const Color& rPattColor, const Color& rBackColor, sal_uInt32 nXclPattern )
diff --git a/sc/source/ui/vba/vbainterior.hxx b/sc/source/ui/vba/vbainterior.hxx
index 1184d33e6cd9..d3ca677d4890 100644
--- a/sc/source/ui/vba/vbainterior.hxx
+++ b/sc/source/ui/vba/vbainterior.hxx
@@ -34,9 +34,10 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/script/XInvocation.hpp>
-#include "vbahelperinterface.hxx"
+#include <vbahelper/vbahelperinterface.hxx>
class ScDocument;
diff --git a/sc/source/ui/vba/vbalabel.cxx b/sc/source/ui/vba/vbalabel.cxx
deleted file mode 100644
index 0a7614ee4eb0..000000000000
--- a/sc/source/ui/vba/vbalabel.cxx
+++ /dev/null
@@ -1,88 +0,0 @@
-/*************************************************************************
- *
- * 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: vbalabel.cxx,v $
- * $Revision: 1.3 $
- *
- * 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 "vbalabel.hxx"
-#include <vector>
-
-using namespace com::sun::star;
-using namespace ooo::vba;
-
-
-const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
-ScVbaLabel::ScVbaLabel( const css::uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper ) : LabelImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
-{
-}
-
-// Attributes
-rtl::OUString SAL_CALL
-ScVbaLabel::getCaption() throw (css::uno::RuntimeException)
-{
- rtl::OUString Label;
- m_xProps->getPropertyValue( LABEL ) >>= Label;
- return Label;
-}
-
-void SAL_CALL
-ScVbaLabel::setCaption( const rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
-{
- m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
-}
-uno::Any SAL_CALL
-ScVbaLabel::getValue() throw (css::uno::RuntimeException)
-{
- return uno::makeAny( getCaption() );
-}
-
-void SAL_CALL
-ScVbaLabel::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException)
-{
- rtl::OUString sCaption;
- _value >>= sCaption;
- setCaption( sCaption );
-}
-
-
-rtl::OUString&
-ScVbaLabel::getServiceImplName()
-{
- static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaLabel") );
- return sImplName;
-}
-
-uno::Sequence< rtl::OUString >
-ScVbaLabel::getServiceNames()
-{
- static uno::Sequence< rtl::OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
- {
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.Label" ) );
- }
- return aServiceNames;
-}
diff --git a/sc/source/ui/vba/vbalabel.hxx b/sc/source/ui/vba/vbalabel.hxx
deleted file mode 100644
index 7ced8b65f731..000000000000
--- a/sc/source/ui/vba/vbalabel.hxx
+++ /dev/null
@@ -1,56 +0,0 @@
-/*************************************************************************
- *
- * 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: vbalabel.hxx,v $
- * $Revision: 1.3 $
- *
- * 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_LABEL_HXX
-#define SC_VBA_LABEL_HXX
-#include <cppuhelper/implbase1.hxx>
-#include <ooo/vba/msforms/XLabel.hpp>
-
-#include "vbacontrol.hxx"
-#include "vbahelper.hxx"
-#include <cppuhelper/implbase2.hxx>
-
-typedef cppu::ImplInheritanceHelper2< ScVbaControl, ov::msforms::XLabel, css::script::XDefaultProperty > LabelImpl_BASE;
-
-class ScVbaLabel : public LabelImpl_BASE
-{
-public:
- ScVbaLabel( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper );
- // Attributes
- virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setValue( const css::uno::Any& _value ) 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);
- //XHelperInterface
- virtual rtl::OUString& getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
- // XDefaultProperty
- rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
-};
-#endif //SC_VBA_LABEL_HXX
diff --git a/sc/source/ui/vba/vbalineformat.cxx b/sc/source/ui/vba/vbalineformat.cxx
deleted file mode 100644
index 8e99086f74da..000000000000
--- a/sc/source/ui/vba/vbalineformat.cxx
+++ /dev/null
@@ -1,458 +0,0 @@
-/*************************************************************************
- *
- * 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: vbalineformat.cxx,v $
- * $Revision: 1.4 $
- *
- * 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 <ooo/vba/office/MsoArrowheadStyle.hpp>
-#include <ooo/vba/office/MsoArrowheadLength.hpp>
-#include <ooo/vba/office/MsoArrowheadWidth.hpp>
-#include <ooo/vba/office/MsoLineDashStyle.hpp>
-#include <com/sun/star/drawing/LineStyle.hpp>
-#include <com/sun/star/drawing/LineDash.hpp>
-#include "vbalineformat.hxx"
-#include "vbacolorformat.hxx"
-
-using namespace ooo::vba;
-using namespace com::sun::star;
-
-ScVbaLineFormat::ScVbaLineFormat( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape > xShape ) : ScVbaLineFormat_BASE( xParent, xContext ), m_xShape( xShape )
-{
- m_xPropertySet.set( xShape, uno::UNO_QUERY_THROW );
- m_nLineDashStyle = office::MsoLineDashStyle::msoLineSolid;
- m_nLineWeight = 1;
-}
-
-sal_Int32
-ScVbaLineFormat::calculateArrowheadSize()
-{
- return 0;
-}
-
-sal_Int32
-ScVbaLineFormat::convertLineStartEndNameToArrowheadStyle( rtl::OUString sLineName )
-{
- sal_Int32 nLineType = office::MsoArrowheadStyle::msoArrowheadNone;
- if (sLineName.equals(rtl::OUString::createFromAscii("Small Arrow")) ||
- sLineName.equals(rtl::OUString::createFromAscii("Arrow")) ||
- sLineName.equals(rtl::OUString::createFromAscii("msArrowEnd")) ||
- sLineName.equals(rtl::OUString::createFromAscii("Double Arrow")))
- {
- // msoArrowheadTriangle
- nLineType = office::MsoArrowheadStyle::msoArrowheadTriangle;
- }
- else if (sLineName.equals(rtl::OUString::createFromAscii("Square 45")) ||
- sLineName.equals(rtl::OUString::createFromAscii("Square")) ||
- sLineName.equals(rtl::OUString::createFromAscii("msArrowDiamondEnd")))
- {
- // msoArrowheadDiamond
- nLineType = office::MsoArrowheadStyle::msoArrowheadDiamond;
- }
- else if (sLineName.equals(rtl::OUString::createFromAscii("Circle")) ||
- sLineName.equals(rtl::OUString::createFromAscii("msArrowOvalEnd")) ||
- sLineName.equals(rtl::OUString::createFromAscii("Dimension Lines")) )
- {
- // msoArrowheadOval
- nLineType = office::MsoArrowheadStyle::msoArrowheadOval;
- }
- else if (sLineName.equals(rtl::OUString::createFromAscii("Arrow concave")) ||
- sLineName.equals(rtl::OUString::createFromAscii("msArrowStealthEnd")))
- {
- // msoArrowheadStealth
- nLineType = office::MsoArrowheadStyle::msoArrowheadStealth;
- }
- else if (sLineName.equals(rtl::OUString::createFromAscii("Rounded short Arrow")) ||
- sLineName.equals(rtl::OUString::createFromAscii("Rounded large Arrow")) ||
- sLineName.equals(rtl::OUString::createFromAscii("Symmetric Arrow")) ||
- sLineName.equals(rtl::OUString::createFromAscii("msArrowOpenEnd")) ||
- sLineName.equals(rtl::OUString::createFromAscii("Line Arrow")))
- {
- // msoArrowheadOpen
- nLineType = office::MsoArrowheadStyle::msoArrowheadOpen;
- }
- else
- {
- // msoArrowheadNone
- nLineType = office::MsoArrowheadStyle::msoArrowheadNone;
- }
- return nLineType;
-}
-
-rtl::OUString
-ScVbaLineFormat::convertArrowheadStyleToLineStartEndName( sal_Int32 nArrowheadStyle ) throw (uno::RuntimeException)
-{
- switch( nArrowheadStyle )
- {
- case office::MsoArrowheadStyle::msoArrowheadNone:
- return rtl::OUString(rtl::OUString::createFromAscii( "" ) );
- case office::MsoArrowheadStyle::msoArrowheadStealth:
- return rtl::OUString::createFromAscii( "Arrow concave" );
- case office::MsoArrowheadStyle::msoArrowheadOpen:
- return rtl::OUString::createFromAscii("Line Arrow" );
- case office::MsoArrowheadStyle::msoArrowheadOval:
- return rtl::OUString::createFromAscii("Circle" );
- case office::MsoArrowheadStyle::msoArrowheadDiamond:
- return rtl::OUString::createFromAscii( "Square 45" );
- case office::MsoArrowheadStyle::msoArrowheadTriangle:
- return rtl::OUString::createFromAscii( "Arrow" );
- default:
- throw uno::RuntimeException( rtl::OUString::createFromAscii("Invalid Arrow Style!"), uno::Reference< uno::XInterface >() );
- }
-}
-
-// Attributes
-sal_Int32 SAL_CALL
-ScVbaLineFormat::getBeginArrowheadStyle() throw (uno::RuntimeException)
-{
- sal_Int32 nLineType = office::MsoArrowheadStyle::msoArrowheadNone;
- rtl::OUString sLineName;
- m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii( "LineStartName" ) ) >>= sLineName;
- if( ( sLineName.getLength() > 7 ) && ( sLineName.indexOf( rtl::OUString::createFromAscii( "msArray" ) ) ) != -1 )
- {
- sal_Int32 nIndex = sLineName.indexOf( rtl::OUString::createFromAscii(" ") );
- rtl::OUString sName = sLineName.copy( 0, nIndex );
- //sal_Int32 nSize = sLineName.copy( nIndex + 1 ).toInt32();
- nLineType = convertLineStartEndNameToArrowheadStyle( sName );
- }
- else
- {
- nLineType = convertLineStartEndNameToArrowheadStyle( sLineName );
- }
- return nLineType;
-}
-
-void SAL_CALL
-ScVbaLineFormat::setBeginArrowheadStyle( sal_Int32 _beginarrowheadstyle ) throw (uno::RuntimeException)
-{
- rtl::OUString sArrayName = convertArrowheadStyleToLineStartEndName( _beginarrowheadstyle );
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "LineStartName" ), uno::makeAny( sArrayName ) );
-}
-
-sal_Int32 SAL_CALL
-ScVbaLineFormat::getBeginArrowheadLength() throw (uno::RuntimeException)
-{
- throw uno::RuntimeException( rtl::OUString::createFromAscii("Property 'EndArrowheadWidth' is not supported."), uno::Reference< uno::XInterface >() );
-}
-
-void SAL_CALL
-ScVbaLineFormat::setBeginArrowheadLength( sal_Int32 /*_beginarrowheadlength*/ ) throw (uno::RuntimeException)
-{
- throw uno::RuntimeException( rtl::OUString::createFromAscii("Property 'EndArrowheadWidth' is not supported."), uno::Reference< uno::XInterface >() );
-}
-
-sal_Int32 SAL_CALL
-ScVbaLineFormat::getBeginArrowheadWidth() throw (uno::RuntimeException)
-{
- throw uno::RuntimeException( rtl::OUString::createFromAscii("Property 'EndArrowheadWidth' is not supported."), uno::Reference< uno::XInterface >() );
-}
-
-void SAL_CALL
-ScVbaLineFormat::setBeginArrowheadWidth( sal_Int32 /*_beginarrowheadwidth*/ ) throw (uno::RuntimeException)
-{
- throw uno::RuntimeException( rtl::OUString::createFromAscii("Property 'EndArrowheadWidth' is not supported."), uno::Reference< uno::XInterface >() );
-}
-
-sal_Int32 SAL_CALL
-ScVbaLineFormat::getEndArrowheadStylel() throw (uno::RuntimeException)
-{
- return 0;
-}
-
-void SAL_CALL
-ScVbaLineFormat::setEndArrowheadStylel( sal_Int32 /*_endarrowheadstylel*/ ) throw (uno::RuntimeException)
-{
-}
-
-sal_Int32 SAL_CALL
-ScVbaLineFormat::getEndArrowheadLength() throw (uno::RuntimeException)
-{
- throw uno::RuntimeException( rtl::OUString::createFromAscii("Property 'EndArrowheadWidth' is not supported."), uno::Reference< uno::XInterface >() );
-}
-
-void SAL_CALL
-ScVbaLineFormat::setEndArrowheadLength( sal_Int32 /*_endarrowheadlength*/ ) throw (uno::RuntimeException)
-{
- throw uno::RuntimeException( rtl::OUString::createFromAscii("Property 'EndArrowheadWidth' is not supported."), uno::Reference< uno::XInterface >() );
-}
-
-sal_Int32 SAL_CALL
-ScVbaLineFormat::getEndArrowheadWidth() throw (uno::RuntimeException)
-{
- throw uno::RuntimeException( rtl::OUString::createFromAscii("Property 'EndArrowheadWidth' is not supported."), uno::Reference< uno::XInterface >() );
-}
-
-void SAL_CALL
-ScVbaLineFormat::setEndArrowheadWidth( sal_Int32 /*_endarrowheadwidth*/ ) throw (uno::RuntimeException)
-{
- throw uno::RuntimeException( rtl::OUString::createFromAscii("Property 'EndArrowheadWidth' is not supported."), uno::Reference< uno::XInterface >() );
-}
-
-double SAL_CALL
-ScVbaLineFormat::getWeight() throw (uno::RuntimeException)
-{
- sal_Int32 nLineWidth=0;
- m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii( "LineWidth") ) >>= nLineWidth;
- double dLineWidth = Millimeter::getInPoints( nLineWidth );
- return dLineWidth;
-}
-
-void SAL_CALL
-ScVbaLineFormat::setWeight( double _weight ) throw (uno::RuntimeException)
-{
- if( _weight < 0 )
- throw uno::RuntimeException( rtl::OUString::createFromAscii("Parameter: Must be positv."), uno::Reference< uno::XInterface >() );
- if( _weight == 0 )
- _weight = 0.5;
- m_nLineWeight = _weight;
- Millimeter aMillimeter;
- aMillimeter.setInPoints( _weight );
-
- sal_Int32 nLineWidth = static_cast<sal_Int32>( aMillimeter.getInHundredthsOfOneMillimeter() );
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "LineWidth" ), uno::makeAny( nLineWidth ) );
- setDashStyle( m_nLineDashStyle );
-}
-
-sal_Bool SAL_CALL
-ScVbaLineFormat::getVisible() throw (uno::RuntimeException)
-{
- drawing::LineStyle aLineStyle;
- m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii( "LineStyle" ) ) >>= aLineStyle;
- if( aLineStyle == drawing::LineStyle_NONE )
- {
- return sal_False;
- }
- return sal_True;
-}
-
-void SAL_CALL
-ScVbaLineFormat::setVisible( sal_Bool _visible ) throw (uno::RuntimeException)
-{
- drawing::LineStyle aLineStyle;
- m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii( "LineStyle" ) ) >>= aLineStyle;
- if( !_visible )
- {
- aLineStyle = drawing::LineStyle_NONE;
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "LineStyle" ), uno::makeAny( aLineStyle ) );
- }
- else
- {
- if( aLineStyle == drawing::LineStyle_NONE )
- {
- setDashStyle( m_nLineDashStyle );
- }
- }
-}
-
-double SAL_CALL
-ScVbaLineFormat::getTransparency() throw (uno::RuntimeException)
-{
- sal_Int16 nTransparency = 0;
- m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii( "LineTransparence" ) ) >>= nTransparency;
- double fTransparency = static_cast<double>( nTransparency );
- return fTransparency / 100;
-}
-
-void SAL_CALL
-ScVbaLineFormat::setTransparency( double _transparency ) throw (uno::RuntimeException)
-{
- sal_Int16 nTransparency = static_cast<sal_Int16>( _transparency * 100 );
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "LineTransparence" ), uno::makeAny( nTransparency ) );
-}
-
-sal_Int16 SAL_CALL
-ScVbaLineFormat::getStyle() throw (uno::RuntimeException)
-{
- //OpenOffice.org only supports one LineStyle (other than the DashStyles)
- //Therefore we can only return the SingleLine
- return 1;
-}
-
-void SAL_CALL
-ScVbaLineFormat::setStyle( sal_Int16 /*_style */) throw (uno::RuntimeException)
-{
- //OpenOffice.org only supports one LineStyle (other than the DashStyles)
- //Therefore we do not set the LineStyle, because it maybe is already set
- //to Dashed or Single Line. Setting the 'Visible' or 'DashStyle' properties
- //will be done with the according methods.
-}
-
-sal_Int32 SAL_CALL
-ScVbaLineFormat::getDashStyle() throw (uno::RuntimeException)
-{
- drawing::LineStyle eLineStyle;
- //LineStyle integer in Xray
- m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii( "LineStyle" ) ) >>= eLineStyle;
- if( eLineStyle == drawing::LineStyle_SOLID )
- m_nLineDashStyle = office::MsoLineDashStyle::msoLineSolid;
- else
- {
- drawing::LineDash aLineDash;
- m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii( "LineDash" ) ) >>= aLineDash;
- if( aLineDash.Dots == 0 )
- {
- //LineDash
- //LineLongDash
- m_nLineDashStyle = office::MsoLineDashStyle::msoLineDash;
- if( aLineDash.Distance > 0 && ( aLineDash.DashLen / aLineDash.Distance > 1 ) )
- {
- m_nLineDashStyle = office::MsoLineDashStyle::msoLineLongDash;
- }
- }
- else if( aLineDash.Dots == 1 )
- {
- // LineDashDot
- // LineLongDashDot
- // LineSquareDot
- // LineRoundDot ! not supported
- m_nLineDashStyle = office::MsoLineDashStyle::msoLineDashDot;
- if( aLineDash.Dashes == 0 )
- {
- m_nLineDashStyle = office::MsoLineDashStyle::msoLineSquareDot;
- }
- else
- {
- if( aLineDash.Distance > 0 && ( aLineDash.DashLen / aLineDash.Distance > 1 ) )
- {
- m_nLineDashStyle = office::MsoLineDashStyle::msoLineLongDashDot;
- }
- }
- }
- else if( aLineDash.Dots == 2 )
- {
- // LineDashDotDot
- m_nLineDashStyle = office::MsoLineDashStyle::msoLineDashDotDot;
- }
- }
-
- return m_nLineDashStyle;
-}
-
-void SAL_CALL
-ScVbaLineFormat::setDashStyle( sal_Int32 _dashstyle ) throw (uno::RuntimeException)
-{
- m_nLineDashStyle = _dashstyle;
- if( _dashstyle == office::MsoLineDashStyle::msoLineSolid )
- {
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "LineStyle" ), uno::makeAny( drawing::LineStyle_SOLID ));
- }
- else
- {
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "LineStyle" ), uno::makeAny( drawing::LineStyle_DASH ) );
- drawing::LineDash pLineDash;
- Millimeter aMillimeter( m_nLineWeight );
- sal_Int32 nPixel = static_cast< sal_Int32 >( aMillimeter.getInHundredthsOfOneMillimeter() );
- switch( _dashstyle )
- {
- case office::MsoLineDashStyle::msoLineDashDot:
- pLineDash.Dots = 1;
- pLineDash.DotLen = nPixel;
- pLineDash.Dashes = 1;
- pLineDash.DashLen = 5 * nPixel;
- pLineDash.Distance = 4 * nPixel;
- break;
- case office::MsoLineDashStyle::msoLineLongDashDot:
- pLineDash.Dots = 1;
- pLineDash.DotLen = nPixel;
- pLineDash.Dashes = 1;
- pLineDash.DashLen = 10 * nPixel;
- pLineDash.Distance = 4 * nPixel;
- break;
- case office::MsoLineDashStyle::msoLineDash:
- pLineDash.Dots = 0;
- pLineDash.DotLen = 0;
- pLineDash.Dashes = 1;
- pLineDash.DashLen = 6 * nPixel;
- pLineDash.Distance = 4 * nPixel;
- break;
- case office::MsoLineDashStyle::msoLineDashDotDot:
- pLineDash.Dots = 2;
- pLineDash.DotLen = nPixel;
- pLineDash.Dashes = 1;
- pLineDash.DashLen = 10 * nPixel;
- pLineDash.Distance = 3 * nPixel;
- break;
- case office::MsoLineDashStyle::msoLineLongDash:
- pLineDash.Dots = 0;
- pLineDash.DotLen = 0;
- pLineDash.Dashes = 1;
- pLineDash.DashLen = 10 * nPixel;
- pLineDash.Distance = 4 * nPixel;
- break;
- case office::MsoLineDashStyle::msoLineSquareDot:
- pLineDash.Dots = 1;
- pLineDash.DotLen = nPixel;
- pLineDash.Dashes = 0;
- pLineDash.DashLen = 0;
- pLineDash.Distance = nPixel;
- break;
- case office::MsoLineDashStyle::msoLineRoundDot:
- pLineDash.Dots = 1;
- pLineDash.DotLen = nPixel;
- pLineDash.Dashes = 0;
- pLineDash.DashLen = 0;
- pLineDash.Distance = nPixel;
- break;
- default:
- throw uno::RuntimeException( rtl::OUString::createFromAscii("this MsoLineDashStyle is not supported."), uno::Reference< uno::XInterface >() );
- }
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "LineDash" ), uno::makeAny( pLineDash ) );
- }
-}
-
-// Methods
-uno::Reference< msforms::XColorFormat > SAL_CALL
-ScVbaLineFormat::BackColor() throw (uno::RuntimeException)
-{
- return uno::Reference< msforms::XColorFormat >( new ScVbaColorFormat( getParent(), mxContext, this, m_xShape, ::ColorFormatType::LINEFORMAT_BACKCOLOR ) );
-}
-
-uno::Reference< msforms::XColorFormat > SAL_CALL
-ScVbaLineFormat::ForeColor() throw (uno::RuntimeException)
-{
- return uno::Reference< msforms::XColorFormat >( new ScVbaColorFormat( getParent(), mxContext, this, m_xShape, ::ColorFormatType::LINEFORMAT_FORECOLOR ) );
-}
-
-
-rtl::OUString&
-ScVbaLineFormat::getServiceImplName()
-{
- static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaLineFormat") );
- return sImplName;
-}
-
-uno::Sequence< rtl::OUString >
-ScVbaLineFormat::getServiceNames()
-{
- static uno::Sequence< rtl::OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
- {
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msform.LineFormat" ) );
- }
- return aServiceNames;
-}
-
-
diff --git a/sc/source/ui/vba/vbalineformat.hxx b/sc/source/ui/vba/vbalineformat.hxx
deleted file mode 100644
index 70a950ebb2a1..000000000000
--- a/sc/source/ui/vba/vbalineformat.hxx
+++ /dev/null
@@ -1,85 +0,0 @@
-/*************************************************************************
- *
- * 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: vbalineformat.hxx,v $
- * $Revision: 1.3 $
- *
- * 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_XLINEFORMAT_HXX
-#define SC_VBA_XLINEFORMAT_HXX
-
-#include <com/sun/star/drawing/XShape.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <ooo/vba/msforms/XLineFormat.hpp>
-#include "vbahelperinterface.hxx"
-
-typedef InheritedHelperInterfaceImpl1< ov::msforms::XLineFormat > ScVbaLineFormat_BASE;
-
-class ScVbaLineFormat : public ScVbaLineFormat_BASE
-{
-private:
- css::uno::Reference< css::drawing::XShape > m_xShape;
- css::uno::Reference< css::beans::XPropertySet > m_xPropertySet;
- sal_Int32 m_nLineDashStyle;
- double m_nLineWeight;
-protected:
- virtual rtl::OUString& getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
- sal_Int32 convertLineStartEndNameToArrowheadStyle( rtl::OUString sLineName );
- rtl::OUString convertArrowheadStyleToLineStartEndName( sal_Int32 nArrowheadStyle ) throw (css::uno::RuntimeException);
- sal_Int32 calculateArrowheadSize();
-public:
- ScVbaLineFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape > xShape );
-
- // Attributes
- virtual sal_Int32 SAL_CALL getBeginArrowheadStyle() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setBeginArrowheadStyle( sal_Int32 _beginarrowheadstyle ) throw (css::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getBeginArrowheadLength() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setBeginArrowheadLength( sal_Int32 _beginarrowheadlength ) throw (css::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getBeginArrowheadWidth() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setBeginArrowheadWidth( sal_Int32 _beginarrowheadwidth ) throw (css::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getEndArrowheadStylel() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setEndArrowheadStylel( sal_Int32 _endarrowheadstylel ) throw (css::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getEndArrowheadLength() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setEndArrowheadLength( sal_Int32 _endarrowheadlength ) throw (css::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getEndArrowheadWidth() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setEndArrowheadWidth( sal_Int32 _endarrowheadwidth ) throw (css::uno::RuntimeException);
- virtual double SAL_CALL getWeight() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setWeight( double _weight ) throw (css::uno::RuntimeException);
- virtual sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setVisible( sal_Bool _visible ) throw (css::uno::RuntimeException);
- virtual double SAL_CALL getTransparency() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setTransparency( double _transparency ) throw (css::uno::RuntimeException);
- virtual sal_Int16 SAL_CALL getStyle() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setStyle( sal_Int16 _style ) throw (css::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getDashStyle() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setDashStyle( sal_Int32 _dashstyle ) throw (css::uno::RuntimeException);
-
- // Methods
- virtual css::uno::Reference< ov::msforms::XColorFormat > SAL_CALL BackColor() throw (css::uno::RuntimeException);
- virtual css::uno::Reference< ov::msforms::XColorFormat > SAL_CALL ForeColor() throw (css::uno::RuntimeException);
-};
-
-#endif//SC_VBA_XLINEFORMAT_HXX
diff --git a/sc/source/ui/vba/vbalistbox.cxx b/sc/source/ui/vba/vbalistbox.cxx
deleted file mode 100644
index d50653ebb844..000000000000
--- a/sc/source/ui/vba/vbalistbox.cxx
+++ /dev/null
@@ -1,289 +0,0 @@
-/*************************************************************************
- *
- * 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: vbalistbox.cxx,v $
- * $Revision: 1.4 $
- *
- * 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 <com/sun/star/form/validation/XValidatableFormComponent.hpp>
-
-#include "vbalistbox.hxx"
-#include "vbapropvalue.hxx"
-#include <vector>
-#include <comphelper/anytostring.hxx>
-#include <com/sun/star/script/ArrayWrapper.hpp>
-
-using namespace com::sun::star;
-using namespace ooo::vba;
-
-const static rtl::OUString TEXT( RTL_CONSTASCII_USTRINGPARAM("Text") );
-const static rtl::OUString SELECTEDITEMS( RTL_CONSTASCII_USTRINGPARAM("SelectedItems") );
-const static rtl::OUString ITEMS( RTL_CONSTASCII_USTRINGPARAM("StringItemList") );
-
-
-ScVbaListBox::ScVbaListBox( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ListBoxImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
-{
- mpListHelper.reset( new ListControlHelper( m_xProps ) );
-}
-
-// Attributes
-void SAL_CALL
-ScVbaListBox::setListIndex( const uno::Any& _value ) throw (uno::RuntimeException)
-{
- sal_Int32 nIndex = 0;
- _value >>= nIndex;
- Selected( nIndex );
-}
-
-uno::Any SAL_CALL
-ScVbaListBox::getListIndex() throw (uno::RuntimeException)
-{
- uno::Sequence< sal_Int16 > sSelection;
- m_xProps->getPropertyValue( SELECTEDITEMS ) >>= sSelection;
- if ( sSelection.getLength() == 0 )
- return uno::Any( sal_Int32( -1 ) );
- return uno::Any( sSelection[ 0 ] );
-}
-
-uno::Any SAL_CALL
-ScVbaListBox::getValue() throw (uno::RuntimeException)
-{
- uno::Sequence< sal_Int16 > sSelection;
- uno::Sequence< rtl::OUString > sItems;
- m_xProps->getPropertyValue( SELECTEDITEMS ) >>= sSelection;
- m_xProps->getPropertyValue( ITEMS ) >>= sItems;
- if( getMultiSelect() )
- throw uno::RuntimeException( rtl::OUString::createFromAscii(
- "Attribute use invalid." ), uno::Reference< uno::XInterface >() );
- uno::Any aRet;
- if ( sSelection.getLength() )
- aRet = uno::makeAny( sItems[ sSelection[ 0 ] ] );
- return aRet;
-}
-
-void SAL_CALL
-ScVbaListBox::setValue( const uno::Any& _value ) throw (uno::RuntimeException)
-{
- if( getMultiSelect() )
- {
- throw uno::RuntimeException( rtl::OUString::createFromAscii(
- "Attribute use invalid." ), uno::Reference< uno::XInterface >() );
- }
- rtl::OUString sValue = getAnyAsString( _value );
- uno::Sequence< rtl::OUString > sList;
- m_xProps->getPropertyValue( ITEMS ) >>= sList;
- uno::Sequence< sal_Int16 > nList;
- sal_Int16 nLength = static_cast<sal_Int16>( sList.getLength() );
- sal_Int16 nValue = -1;
- sal_Int16 i = 0;
- for( i = 0; i < nLength; i++ )
- {
- if( sList[i].equals( sValue ) )
- {
- nValue = i;
- break;
- }
- }
- if( nValue == -1 )
- throw uno::RuntimeException( rtl::OUString::createFromAscii(
- "Attribute use invalid." ), uno::Reference< uno::XInterface >() );
-
- uno::Sequence< sal_Int16 > nSelectedIndices(1);
- nSelectedIndices[ 0 ] = nValue;
- m_xProps->setPropertyValue( SELECTEDITEMS, uno::makeAny( nSelectedIndices ) );
- m_xProps->setPropertyValue( TEXT, uno::makeAny( sValue ) );
-}
-
-::rtl::OUString SAL_CALL
-ScVbaListBox::getText() throw (uno::RuntimeException)
-{
- rtl::OUString result;
- getValue() >>= result;
- return result;
-}
-
-void SAL_CALL
-ScVbaListBox::setText( const ::rtl::OUString& _text ) throw (uno::RuntimeException)
-{
- setValue( uno::makeAny( _text ) ); // seems the same
-}
-
-sal_Bool SAL_CALL
-ScVbaListBox::getMultiSelect() throw (css::uno::RuntimeException)
-{
- sal_Bool bMultiSelect = sal_False;
- m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MultiSelection" ) ) ) >>= bMultiSelect;
- return bMultiSelect;
-}
-
-void SAL_CALL
-ScVbaListBox::setMultiSelect( sal_Bool _multiselect ) throw (css::uno::RuntimeException)
-{
- m_xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MultiSelection" ) ), uno::makeAny( _multiselect ) );
-}
-
-css::uno::Any SAL_CALL
-ScVbaListBox::Selected( sal_Int32 index ) throw (css::uno::RuntimeException)
-{
- uno::Sequence< rtl::OUString > sList;
- m_xProps->getPropertyValue( ITEMS ) >>= sList;
- sal_Int16 nLength = static_cast< sal_Int16 >( sList.getLength() );
- // no choice but to do a horror cast as internally
- // the indices are but sal_Int16
- sal_Int16 nIndex = static_cast< sal_Int16 >( index );
- if( nIndex < 0 || nIndex >= nLength )
- throw uno::RuntimeException( rtl::OUString::createFromAscii(
- "Error Number." ), uno::Reference< uno::XInterface >() );
- m_nIndex = nIndex;
- return uno::makeAny( uno::Reference< XPropValue > ( new ScVbaPropValue( this ) ) );
-}
-
-// Methods
-void SAL_CALL
-ScVbaListBox::AddItem( const uno::Any& pvargItem, const uno::Any& pvargIndex ) throw (uno::RuntimeException)
-{
- mpListHelper->AddItem( pvargItem, pvargIndex );
- }
-
-void SAL_CALL
-ScVbaListBox::removeItem( const uno::Any& index ) throw (uno::RuntimeException)
-{
- mpListHelper->removeItem( index );
-}
-
-void SAL_CALL
-ScVbaListBox::Clear( ) throw (uno::RuntimeException)
-{
- mpListHelper->Clear();
-}
-
-// this is called when something like the following vba code is used
-// to set the selected state of particular entries in the Listbox
-// ListBox1.Selected( 3 ) = false
-//PropListener
-void
-ScVbaListBox::setValueEvent( const uno::Any& value )
-{
- sal_Bool bValue = sal_False;
- if( !(value >>= bValue) )
- throw uno::RuntimeException( rtl::OUString::createFromAscii(
- "Invalid type\n. need boolean." ), uno::Reference< uno::XInterface >() );
- uno::Sequence< sal_Int16 > nList;
- m_xProps->getPropertyValue( SELECTEDITEMS ) >>= nList;
- sal_Int16 nLength = static_cast<sal_Int16>( nList.getLength() );
- sal_Int16 nIndex = m_nIndex;
- for( sal_Int16 i = 0; i < nLength; i++ )
- {
- if( nList[i] == nIndex )
- {
- if( bValue )
- return;
- else
- {
- for( ; i < nLength - 1; i++ )
- {
- nList[i] = nList[i + 1];
- }
- nList.realloc( nLength - 1 );
- //m_xProps->setPropertyValue( sSourceName, uno::makeAny( nList ) );
- m_xProps->setPropertyValue( SELECTEDITEMS, uno::makeAny( nList ) );
- return;
- }
- }
- }
- if( bValue )
- {
- if( getMultiSelect() )
- {
- nList.realloc( nLength + 1 );
- nList[nLength] = nIndex;
- }
- else
- {
- nList.realloc( 1 );
- nList[0] = nIndex;
- }
- m_xProps->setPropertyValue( sSourceName, uno::makeAny( nList ) );
- }
-}
-
-// this is called when something like the following vba code is used
-// to determine the selected state of particular entries in the Listbox
-// msgbox ListBox1.Selected( 3 )
-
-css::uno::Any
-ScVbaListBox::getValueEvent()
-{
- uno::Sequence< sal_Int16 > nList;
- m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SelectedItems" ) ) ) >>= nList;
- sal_Int32 nLength = nList.getLength();
- sal_Int32 nIndex = m_nIndex;
-
- for( sal_Int32 i = 0; i < nLength; i++ )
- {
- if( nList[i] == nIndex )
- return uno::makeAny( sal_True );
- }
-
- return uno::makeAny( sal_False );
-}
-
-void SAL_CALL
-ScVbaListBox::setRowSource( const rtl::OUString& _rowsource ) throw (uno::RuntimeException)
-{
- ScVbaControl::setRowSource( _rowsource );
- mpListHelper->setRowSource( _rowsource );
-}
-
-sal_Int32 SAL_CALL
-ScVbaListBox::getListCount() throw (uno::RuntimeException)
-{
- return mpListHelper->getListCount();
-}
-
-uno::Any SAL_CALL
-ScVbaListBox::List( const ::uno::Any& pvargIndex, const uno::Any& pvarColumn ) throw (uno::RuntimeException)
-{
- return mpListHelper->List( pvargIndex, pvarColumn );
-}
-
-rtl::OUString&
-ScVbaListBox::getServiceImplName()
-{
- static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaListBox") );
- return sImplName;
-}
-
-uno::Sequence< rtl::OUString >
-ScVbaListBox::getServiceNames()
-{
- static uno::Sequence< rtl::OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
- {
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.ScVbaListBox" ) );
- }
- return aServiceNames;
-}
diff --git a/sc/source/ui/vba/vbalistbox.hxx b/sc/source/ui/vba/vbalistbox.hxx
deleted file mode 100644
index 69697d3ae623..000000000000
--- a/sc/source/ui/vba/vbalistbox.hxx
+++ /dev/null
@@ -1,90 +0,0 @@
-/*************************************************************************
- *
- * 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: vbalistbox.hxx,v $
- * $Revision: 1.3 $
- *
- * 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_LISTBOX_HXX
-#define SC_VBA_LISTBOX_HXX
-#include <cppuhelper/implbase2.hxx>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/script/XDefaultProperty.hpp>
-#include <ooo/vba/msforms/XListBox.hpp>
-#include <com/sun/star/beans/PropertyAttribute.hpp>
-
-#include "vbacontrol.hxx"
-#include "vbapropvalue.hxx"
-#include "vbalistcontrolhelper.hxx"
-#include "vbahelper.hxx"
-
-typedef cppu::ImplInheritanceHelper2<ScVbaControl, ov::msforms::XListBox, css::script::XDefaultProperty > ListBoxImpl_BASE;
-class ScVbaListBox : public ListBoxImpl_BASE
- ,public PropListener
-{
- std::auto_ptr< ListControlHelper > mpListHelper;
- rtl::OUString sSourceName;
- rtl::OUString msDftPropName;
-
- sal_Int16 m_nIndex;
-
-public:
- ScVbaListBox( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper );
-
- // Attributes
- virtual css::uno::Any SAL_CALL getListIndex() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setListIndex( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
- virtual ::sal_Int32 SAL_CALL getListCount() throw (css::uno::RuntimeException);
- virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
- virtual rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setText( const ::rtl::OUString& _text ) throw (css::uno::RuntimeException);
- virtual sal_Bool SAL_CALL getMultiSelect() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setMultiSelect( sal_Bool _multiselect ) throw (css::uno::RuntimeException);
- virtual css::uno::Any SAL_CALL Selected( ::sal_Int32 index ) throw (css::uno::RuntimeException);
-
- // Methods
- virtual void SAL_CALL AddItem( const css::uno::Any& pvargItem, const css::uno::Any& pvargIndex ) throw (css::uno::RuntimeException);
- virtual void SAL_CALL removeItem( const css::uno::Any& index ) throw (css::uno::RuntimeException);
- virtual void SAL_CALL Clear( ) throw (css::uno::RuntimeException);
- virtual css::uno::Any SAL_CALL List( const css::uno::Any& pvargIndex, const css::uno::Any& pvarColumn ) throw (css::uno::RuntimeException);
- // XControl
- virtual void SAL_CALL setRowSource( const rtl::OUString& _rowsource ) throw (css::uno::RuntimeException);
-
- // XDefaultProperty
- rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
-
- //XHelperInterface
- virtual rtl::OUString& getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-
- //PropListener
- virtual void setValueEvent( const css::uno::Any& value );
- virtual css::uno::Any getValueEvent();
-
-
-};
-
-#endif //
diff --git a/sc/source/ui/vba/vbalistcontrolhelper.cxx b/sc/source/ui/vba/vbalistcontrolhelper.cxx
deleted file mode 100644
index e51b751290ac..000000000000
--- a/sc/source/ui/vba/vbalistcontrolhelper.cxx
+++ /dev/null
@@ -1,145 +0,0 @@
-#include <vbalistcontrolhelper.hxx>
-
-using namespace com::sun::star;
-using namespace ooo::vba;
-
-const static rtl::OUString ITEMS( RTL_CONSTASCII_USTRINGPARAM("StringItemList") );
-
-void SAL_CALL
-ListControlHelper::AddItem( const uno::Any& pvargItem, const uno::Any& pvargIndex ) throw (uno::RuntimeException)
-{
- if ( pvargItem.hasValue() )
- {
- uno::Sequence< rtl::OUString > sList;
- m_xProps->getPropertyValue( ITEMS ) >>= sList;
-
- sal_Int32 nIndex = sList.getLength();
-
- if ( pvargIndex.hasValue() )
- pvargIndex >>= nIndex;
-
- rtl::OUString sString = getAnyAsString( pvargItem );
-
- // if no index specified or item is to be appended to end of
- // list just realloc the array and set the last item
- if ( nIndex == sList.getLength() )
- {
- sal_Int32 nOldSize = sList.getLength();
- sList.realloc( nOldSize + 1 );
- sList[ nOldSize ] = sString;
- }
- else
- {
- // just copy those elements above the one to be inserted
- std::vector< rtl::OUString > sVec;
- // reserve just the amount we need to copy
- sVec.reserve( sList.getLength() - nIndex );
-
- // point at first element to copy
- rtl::OUString* pString = sList.getArray() + nIndex;
- const rtl::OUString* pEndString = sList.getArray() + sList.getLength();
- // insert the new element
- sVec.push_back( sString );
- // copy elements
- for ( ; pString != pEndString; ++pString )
- sVec.push_back( *pString );
-
- sList.realloc( sList.getLength() + 1 );
-
- // point at first element to be overwritten
- pString = sList.getArray() + nIndex;
- pEndString = sList.getArray() + sList.getLength();
- std::vector< rtl::OUString >::iterator it = sVec.begin();
- for ( ; pString != pEndString; ++pString, ++it)
- *pString = *it;
- //
- }
-
- m_xProps->setPropertyValue( ITEMS, uno::makeAny( sList ) );
-
- }
-}
-
-void SAL_CALL
-ListControlHelper::removeItem( const uno::Any& index ) throw (uno::RuntimeException)
-{
- sal_Int32 nIndex = 0;
- // for int index
- if ( index >>= nIndex )
- {
- uno::Sequence< rtl::OUString > sList;
- m_xProps->getPropertyValue( ITEMS ) >>= sList;
- if( nIndex < 0 || nIndex > ( sList.getLength() - 1 ) )
- throw uno::RuntimeException( rtl::OUString::createFromAscii( "Invalid index" ), uno::Reference< uno::XInterface > () );
- if( sList.hasElements() )
- {
- if( sList.getLength() == 1 )
- {
- Clear();
- return;
- }
- for( sal_Int32 i = nIndex; i < ( sList.getLength()-1 ); i++ )
- {
- sList[i] = sList[i+1];
- }
- sList.realloc( sList.getLength() - 1 );
- }
-
- m_xProps->setPropertyValue( ITEMS, uno::makeAny( sList ) );
- }
-}
-
-void SAL_CALL
-ListControlHelper::Clear( ) throw (uno::RuntimeException)
-{
- // urk, setValue doesn't seem to work !!
- //setValue( uno::makeAny( sal_Int16() ) );
- m_xProps->setPropertyValue( ITEMS, uno::makeAny( uno::Sequence< rtl::OUString >() ) );
-}
-
-void SAL_CALL
-ListControlHelper::setRowSource( const rtl::OUString& _rowsource ) throw (uno::RuntimeException)
-{
- if ( _rowsource.getLength() == 0 )
- Clear();
-}
-
-sal_Int32 SAL_CALL
-ListControlHelper::getListCount() throw (uno::RuntimeException)
-{
- uno::Sequence< rtl::OUString > sList;
- m_xProps->getPropertyValue( ITEMS ) >>= sList;
- return sList.getLength();
-}
-
-uno::Any SAL_CALL
-ListControlHelper::List( const ::uno::Any& pvargIndex, const uno::Any& pvarColumn ) throw (uno::RuntimeException)
-{
- uno::Sequence< rtl::OUString > sList;
- m_xProps->getPropertyValue( ITEMS ) >>= sList;
- sal_Int16 nLength = static_cast< sal_Int16 >( sList.getLength() );
- uno::Any aRet;
- if ( pvargIndex.hasValue() )
- {
- sal_Int16 nIndex = -1;
- pvargIndex >>= nIndex;
- if( nIndex < 0 || nIndex >= nLength )
- throw uno::RuntimeException( rtl::OUString::createFromAscii(
- "Bad row Index" ), uno::Reference< uno::XInterface >() );
- aRet <<= sList[ nIndex ];
- }
- else if ( pvarColumn.hasValue() ) // pvarColumn on its own would be bad
- throw uno::RuntimeException( rtl::OUString::createFromAscii(
- "Bad column Index" ), uno::Reference< uno::XInterface >() );
- else // List() ( e.g. no args )
- {
- uno::Sequence< uno::Sequence< rtl::OUString > > sReturnArray( nLength );
- for ( sal_Int32 i = 0; i < nLength; ++i )
- {
- sReturnArray[ i ].realloc( 10 );
- sReturnArray[ i ][ 0 ] = sList[ i ];
- }
- aRet = uno::makeAny( sReturnArray );
- }
- return aRet;
-}
diff --git a/sc/source/ui/vba/vbalistcontrolhelper.hxx b/sc/source/ui/vba/vbalistcontrolhelper.hxx
deleted file mode 100644
index f1ebe117733f..000000000000
--- a/sc/source/ui/vba/vbalistcontrolhelper.hxx
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef SC_VBA_LISTCONTROLHELPER
-#define SC_VBA_LISTCONTROLHELPER
-
-#include "vbahelper.hxx"
-
-class ListControlHelper
-{
- css::uno::Reference< css::beans::XPropertySet > m_xProps;
-
-public:
- ListControlHelper( const css::uno::Reference< css::beans::XPropertySet >& rxControl ) : m_xProps( rxControl ){}
- virtual ~ListControlHelper() {}
- virtual void SAL_CALL AddItem( const css::uno::Any& pvargItem, const css::uno::Any& pvargIndex ) throw (css::uno::RuntimeException);
- virtual void SAL_CALL removeItem( const css::uno::Any& index ) throw (css::uno::RuntimeException);
- virtual void SAL_CALL setRowSource( const rtl::OUString& _rowsource ) throw (css::uno::RuntimeException);
- virtual ::sal_Int32 SAL_CALL getListCount() throw (css::uno::RuntimeException);
- virtual css::uno::Any SAL_CALL List( const css::uno::Any& pvargIndex, const css::uno::Any& pvarColumn ) throw (css::uno::RuntimeException);
- virtual void SAL_CALL Clear( ) throw (css::uno::RuntimeException);
-};
-#endif
diff --git a/sc/source/ui/vba/vbamultipage.cxx b/sc/source/ui/vba/vbamultipage.cxx
deleted file mode 100644
index 69410dbadc64..000000000000
--- a/sc/source/ui/vba/vbamultipage.cxx
+++ /dev/null
@@ -1,132 +0,0 @@
-/*************************************************************************
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile$
- *
- * $Revision$
- *
- * last change: $Author$ $Date$
- *
- * 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 2005 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
- *
- ************************************************************************/
-#include "vbamultipage.hxx"
-#include <ooo/vba/XCollection.hpp>
-#include "vbapages.hxx"
-#include <vector>
-
-using namespace com::sun::star;
-using namespace ooo::vba;
-
-// uno servicename com.sun.star.awt.UnoControlProgressBarMode
-const rtl::OUString SVALUE( RTL_CONSTASCII_USTRINGPARAM("ProgressValue") );
-const rtl::OUString SVALUEMAX( RTL_CONSTASCII_USTRINGPARAM("ProgressValueMax") );
-const rtl::OUString SSTEP( RTL_CONSTASCII_USTRINGPARAM("Step") );
-
-typedef cppu::WeakImplHelper1< container::XIndexAccess > PagesImpl_Base;
-class PagesImpl : public PagesImpl_Base
-{
- sal_Int32 mnPages;
-public:
- PagesImpl( sal_Int32 nPages ) : mnPages( nPages ) {}
- virtual ::sal_Int32 SAL_CALL getCount() throw (uno::RuntimeException) { return mnPages; }
- virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, ::uno::RuntimeException)
- {
- if ( Index < 0 || Index > mnPages )
- throw lang::IndexOutOfBoundsException();
- return uno::makeAny( uno::Reference< uno::XInterface >() );
- }
- // XElementAccess
- virtual uno::Type SAL_CALL getElementType() throw (uno::RuntimeException)
- {
- // no Pages object yet #FIXME
- //return msforms::XPage::static_type(0);
- return uno::XInterface::static_type(0);
- }
- virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException)
- {
- return ( mnPages > 0 );
- }
-};
-uno::Reference< container::XIndexAccess >
-ScVbaMultiPage::getPages( sal_Int32 nPages )
-{
- return new PagesImpl( nPages );
-}
-
-ScVbaMultiPage::ScVbaMultiPage( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper, const uno::Reference< uno::XInterface >& xDialog ) : MultiPageImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
-{
- mxDialogProps.set( xDialog, uno::UNO_QUERY_THROW );
- // set dialog step to value of multipage pseudo model
- setValue(getValue());
-}
-
-// Attributes
-sal_Int32 SAL_CALL
-ScVbaMultiPage::getValue() throw (css::uno::RuntimeException)
-{
- sal_Int32 nValue = 0;
- m_xProps->getPropertyValue( SVALUE ) >>= nValue;
- return nValue;
-}
-
-void SAL_CALL
-ScVbaMultiPage::setValue( const sal_Int32 _value ) throw (::com::sun::star::uno::RuntimeException)
-{
- // track change in dialog ( dialog value is 1 based, 0 is a special value )
- m_xProps->setPropertyValue( SVALUE, uno::makeAny( _value ) );
- mxDialogProps->setPropertyValue( SSTEP, uno::makeAny( _value + 1) );
-}
-
-
-rtl::OUString&
-ScVbaMultiPage::getServiceImplName()
-{
- static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaMultiPage") );
- return sImplName;
-}
-
-uno::Any SAL_CALL
-ScVbaMultiPage::Pages( const uno::Any& index ) throw (uno::RuntimeException)
-{
- sal_Int32 nValue = 0;
- m_xProps->getPropertyValue( SVALUEMAX ) >>= nValue;
- uno::Reference< XCollection > xColl( new ScVbaPages( this, mxContext, getPages( nValue ) ) );
- if ( !index.hasValue() )
- return uno::makeAny( xColl );
- return xColl->Item( uno::makeAny( index ), uno::Any() );
-}
-
-uno::Sequence< rtl::OUString >
-ScVbaMultiPage::getServiceNames()
-{
- static uno::Sequence< rtl::OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
- {
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.MultiPage" ) );
- }
- return aServiceNames;
-}
diff --git a/sc/source/ui/vba/vbamultipage.hxx b/sc/source/ui/vba/vbamultipage.hxx
deleted file mode 100644
index 03db35dff790..000000000000
--- a/sc/source/ui/vba/vbamultipage.hxx
+++ /dev/null
@@ -1,65 +0,0 @@
-/*************************************************************************
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile$
- *
- * $Revision$
- *
- * last change: $Author$ $Date$
- *
- * 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 2005 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
- *
- ************************************************************************/
-#ifndef SC_VBA_MULTIPAGE_HXX
-#define SC_VBA_MULTIPAGE_HXX
-#include <cppuhelper/implbase1.hxx>
-#include <ooo/vba/msforms/XMultiPage.hpp>
-#include <com/sun/star/container/XIndexAccess.hpp>
-
-#include "vbacontrol.hxx"
-#include "vbahelper.hxx"
-//#include <cppuhelper/implbase2.hxx>
-#include <cppuhelper/implbase1.hxx>
-
-typedef cppu::ImplInheritanceHelper1< ScVbaControl, ov::msforms::XMultiPage > MultiPageImpl_BASE;
-
-class ScVbaMultiPage : public MultiPageImpl_BASE
-{
- css::uno::Reference< css::container::XIndexAccess > getPages( sal_Int32 nPages );
- css::uno::Reference< css::beans::XPropertySet > mxDialogProps;
-public:
- ScVbaMultiPage( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper, const css::uno::Reference< css::uno::XInterface >& xDialog );
- // Attributes
- virtual sal_Int32 SAL_CALL getValue() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setValue( sal_Int32 _value ) throw (css::uno::RuntimeException);
- virtual css::uno::Any SAL_CALL Pages( const css::uno::Any& index ) throw (css::uno::RuntimeException);
-
- //XHelperInterface
- virtual rtl::OUString& getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
- // XDefaultProperty
- rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
-};
-#endif //SC_VBA_LABEL_HXX
diff --git a/sc/source/ui/vba/vbaname.cxx b/sc/source/ui/vba/vbaname.cxx
index 72ef5afb3b7f..0d82f4ee45f8 100644
--- a/sc/source/ui/vba/vbaname.cxx
+++ b/sc/source/ui/vba/vbaname.cxx
@@ -27,7 +27,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#include "helperdecl.hxx"
+#include <vbahelper/helperdecl.hxx>
#include <com/sun/star/table/XCellRange.hpp>
#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
@@ -64,7 +64,8 @@ ScVbaName::~ScVbaName()
css::uno::Reference< ov::excel::XWorksheet >
ScVbaName::getWorkSheet() throw (css::uno::RuntimeException)
{
- return ScVbaGlobals::getGlobalsImpl( mxContext )->getActiveSheet();
+ uno::Reference< excel::XApplication > xApplication( Application(), uno::UNO_QUERY_THROW );
+ return xApplication->getActiveSheet();
}
::rtl::OUString
@@ -234,7 +235,7 @@ ScVbaName::setRefersToR1C1Local( const ::rtl::OUString & rRefersTo ) throw (css:
css::uno::Reference< ov::excel::XRange >
ScVbaName::getRefersToRange() throw (css::uno::RuntimeException)
{
- uno::Reference< ov::excel::XRange > xRange = ScVbaRange::getRangeObjectForName( mxContext, mxNamedRange->getName(), getDocShell( mxModel ), formula::FormulaGrammar::CONV_XL_R1C1 );
+ uno::Reference< ov::excel::XRange > xRange = ScVbaRange::getRangeObjectForName( mxContext, mxNamedRange->getName(), excel::getDocShell( mxModel ), formula::FormulaGrammar::CONV_XL_R1C1 );
return xRange;
}
diff --git a/sc/source/ui/vba/vbaname.hxx b/sc/source/ui/vba/vbaname.hxx
index 691a882cb3e1..6fb585100d4c 100644
--- a/sc/source/ui/vba/vbaname.hxx
+++ b/sc/source/ui/vba/vbaname.hxx
@@ -34,7 +34,9 @@
#include <com/sun/star/sheet/XNamedRange.hpp>
#include <com/sun/star/sheet/XNamedRanges.hpp>
-#include "vbahelperinterface.hxx"
+#include <vbahelper/vbahelperinterface.hxx>
+
+class ScDocument;
typedef InheritedHelperInterfaceImpl1< ov::excel::XName > NameImpl_BASE;
diff --git a/sc/source/ui/vba/vbanames.cxx b/sc/source/ui/vba/vbanames.cxx
index 1bd3a2359377..043e7d386f15 100644
--- a/sc/source/ui/vba/vbanames.cxx
+++ b/sc/source/ui/vba/vbanames.cxx
@@ -27,7 +27,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#include "helperdecl.hxx"
+#include <vbahelper/helperdecl.hxx>
#include <com/sun/star/table/XCellRange.hpp>
#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
@@ -81,7 +81,7 @@ ScDocument *
ScVbaNames::getScDocument()
{
uno::Reference< frame::XModel > xModel( getModel() , uno::UNO_QUERY_THROW );
- ScTabViewShell * pTabViewShell = getBestViewShell( xModel );
+ ScTabViewShell * pTabViewShell = excel::getBestViewShell( xModel );
if ( !pTabViewShell )
throw uno::RuntimeException( rtl::OUString::createFromAscii("No ViewShell available"), uno::Reference< uno::XInterface >() );
ScViewData* pViewData = pTabViewShell->GetViewData();
diff --git a/sc/source/ui/vba/vbanames.hxx b/sc/source/ui/vba/vbanames.hxx
index 02a86da325b5..524277bdc0bd 100644
--- a/sc/source/ui/vba/vbanames.hxx
+++ b/sc/source/ui/vba/vbanames.hxx
@@ -34,7 +34,10 @@
#include <ooo/vba/XCollection.hpp>
#include <com/sun/star/container/XEnumerationAccess.hpp>
#include <com/sun/star/sheet/XNamedRanges.hpp>
-#include "vbacollectionimpl.hxx"
+#include <vbahelper/vbacollectionimpl.hxx>
+
+class ScDocument;
+class ScDocShell;
typedef CollTestImplHelper< ov::excel::XNames > ScVbaNames_BASE;
diff --git a/sc/source/ui/vba/vbaoleobject.cxx b/sc/source/ui/vba/vbaoleobject.cxx
index 455141cf03fd..64e5f05f90e1 100644
--- a/sc/source/ui/vba/vbaoleobject.cxx
+++ b/sc/source/ui/vba/vbaoleobject.cxx
@@ -33,6 +33,7 @@
#include <com/sun/star/view/XControlAccess.hpp>
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/drawing/XShape.hpp>
+#include <ooo/vba/XControlProvider.hpp>
#include "vbaoleobject.hxx"
@@ -61,8 +62,9 @@ ScVbaOLEObject::ScVbaOLEObject( const uno::Reference< XHelperInterface >& xParen
xChild.set( xChild->getParent(), uno::UNO_QUERY_THROW );
xChild.set( xChild->getParent(), uno::UNO_QUERY_THROW );
css::uno::Reference< css::frame::XModel > xModel( xChild->getParent(), uno::UNO_QUERY_THROW );
- css::uno::Reference< css::view::XControlAccess > xControlAccess( xModel->getCurrentController(), css::uno::UNO_QUERY_THROW );
- m_xWindowPeer = xControlAccess->getControl( xControlModel )->getPeer();
+ uno::Reference<lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
+ uno::Reference< XControlProvider > xControlProvider( xServiceManager->createInstanceWithContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.ControlProvider" ) ), mxContext ), uno::UNO_QUERY_THROW );
+ m_xControl.set( xControlProvider->createControl( xControlShape, xModel ) );
}
uno::Reference< uno::XInterface > SAL_CALL
@@ -74,98 +76,76 @@ ScVbaOLEObject::getObject() throw (uno::RuntimeException)
sal_Bool SAL_CALL
ScVbaOLEObject::getEnabled() throw (uno::RuntimeException)
{
- uno::Reference< css::awt::XWindow2 > xWindow2( m_xWindowPeer, css::uno::UNO_QUERY_THROW );
- return xWindow2->isEnabled();
+ return m_xControl->getEnabled();
}
void SAL_CALL
ScVbaOLEObject::setEnabled( sal_Bool _enabled ) throw (uno::RuntimeException)
{
- uno::Reference< css::awt::XWindow2 > xWindow2( m_xWindowPeer, css::uno::UNO_QUERY_THROW );
- xWindow2->setEnable( _enabled );
+ m_xControl->setEnabled( _enabled );
}
sal_Bool SAL_CALL
ScVbaOLEObject::getVisible() throw (uno::RuntimeException)
{
- uno::Reference< css::awt::XWindow2 > xWindow2( m_xWindowPeer, css::uno::UNO_QUERY_THROW );
- return xWindow2->isVisible();
+ OSL_TRACE("OleObject %s returning visible %s", rtl::OUStringToOString( m_xControl->getName(), RTL_TEXTENCODING_UTF8 ).getStr(), m_xControl->getVisible() ? "true" : "false" );
+ return m_xControl->getVisible();
}
void SAL_CALL
ScVbaOLEObject::setVisible( sal_Bool _visible ) throw (uno::RuntimeException)
{
- uno::Reference< css::awt::XWindow2 > xWindow2( m_xWindowPeer, css::uno::UNO_QUERY_THROW );
- xWindow2->setVisible( _visible );
+ OSL_TRACE("OleObject %s set visible %s", rtl::OUStringToOString( m_xControl->getName(), RTL_TEXTENCODING_UTF8 ).getStr(), _visible ? "true" : "false" );
+ m_xControl->setVisible( _visible );
}
double SAL_CALL
ScVbaOLEObject::getLeft() throw (uno::RuntimeException)
{
- uno::Reference< drawing::XShape > xShape( m_xControlShape, uno::UNO_QUERY_THROW );
- return mm2pt( xShape->getPosition().X / 100 );
+ return m_xControl->getLeft();
}
void SAL_CALL
ScVbaOLEObject::setLeft( double _left ) throw (uno::RuntimeException)
{
- awt::Point oldPosition;
- uno::Reference< drawing::XShape > xShape( m_xControlShape, uno::UNO_QUERY_THROW );
- oldPosition = xShape->getPosition();
- oldPosition.X = pt2mm( _left ) * 100;
- xShape->setPosition( oldPosition );
+ m_xControl->setLeft( _left );
}
double SAL_CALL
ScVbaOLEObject::getTop() throw (uno::RuntimeException)
{
- uno::Reference< drawing::XShape > xShape( m_xControlShape, uno::UNO_QUERY_THROW );
- return mm2pt( xShape->getPosition().Y / 100 );
+ return m_xControl->getTop();
}
void SAL_CALL
ScVbaOLEObject::setTop( double _top ) throw (uno::RuntimeException)
{
- awt::Point oldPosition;
- uno::Reference< drawing::XShape > xShape( m_xControlShape, uno::UNO_QUERY_THROW );
- oldPosition = xShape->getPosition();
- oldPosition.Y = pt2mm( _top ) * 100;;
- xShape->setPosition( oldPosition );
+ m_xControl->setTop( _top );
}
double SAL_CALL
ScVbaOLEObject::getHeight() throw (uno::RuntimeException)
{
- uno::Reference< drawing::XShape > xShape( m_xControlShape, uno::UNO_QUERY_THROW );
- return mm2pt( xShape->getSize().Height / 100 );//1pt = 1/72in
+ return m_xControl->getHeight();
}
void SAL_CALL
ScVbaOLEObject::setHeight( double _height ) throw (uno::RuntimeException)
{
- awt::Size oldSize;
- uno::Reference< drawing::XShape > xShape( m_xControlShape, uno::UNO_QUERY_THROW );
- oldSize = xShape->getSize();
- oldSize.Height = pt2mm( _height ) * 100;
- xShape->setSize( oldSize );
+ m_xControl->setHeight( _height );
}
double SAL_CALL
ScVbaOLEObject::getWidth() throw (uno::RuntimeException)
{
- uno::Reference< drawing::XShape > xShape( m_xControlShape, uno::UNO_QUERY_THROW );
- return mm2pt ( xShape->getSize().Width / 100 );
+ return m_xControl->getWidth();
}
void SAL_CALL
ScVbaOLEObject::setWidth( double _width ) throw (uno::RuntimeException)
{
- awt::Size oldSize;
- uno::Reference< drawing::XShape > xShape( m_xControlShape, uno::UNO_QUERY_THROW );
- oldSize = xShape->getSize();
- oldSize.Width = pt2mm( _width ) * 100;
- xShape->setSize( oldSize );
+ m_xControl->setWidth( _width );
}
rtl::OUString&
ScVbaOLEObject::getServiceImplName()
diff --git a/sc/source/ui/vba/vbaoleobject.hxx b/sc/source/ui/vba/vbaoleobject.hxx
index 1b900aacf916..9ad6d6acc2b6 100644
--- a/sc/source/ui/vba/vbaoleobject.hxx
+++ b/sc/source/ui/vba/vbaoleobject.hxx
@@ -32,20 +32,20 @@
#include <cppuhelper/implbase1.hxx>
#include <com/sun/star/drawing/XControlShape.hpp>
-#include <com/sun/star/awt/XWindowPeer.hpp>
#include <ooo/vba/excel/XOLEObject.hpp>
+#include <ooo/vba/msforms/XControl.hpp>
-#include "vbahelperinterface.hxx"
+#include <vbahelper/vbahelperinterface.hxx>
typedef InheritedHelperInterfaceImpl1< ov::excel::XOLEObject > OLEObjectImpl_BASE;
class ScVbaOLEObject : public OLEObjectImpl_BASE
{
- css::uno::Reference< css::awt::XWindowPeer > m_xWindowPeer;
protected:
css::uno::Reference< css::drawing::XControlShape > m_xControlShape;
virtual rtl::OUString& getServiceImplName();
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+ css::uno::Reference< ov::msforms::XControl> m_xControl;
public:
ScVbaOLEObject( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,
css::uno::Reference< css::drawing::XControlShape > xControlShape );
diff --git a/sc/source/ui/vba/vbaoleobjects.hxx b/sc/source/ui/vba/vbaoleobjects.hxx
index 3d2c1b82c6a5..6372a1d2acf3 100644
--- a/sc/source/ui/vba/vbaoleobjects.hxx
+++ b/sc/source/ui/vba/vbaoleobjects.hxx
@@ -33,8 +33,8 @@
#include <cppuhelper/implbase1.hxx>
#include <ooo/vba/excel/XOLEObjects.hpp>
-#include "vbacollectionimpl.hxx"
-#include "vbahelper.hxx"
+#include <vbahelper/vbacollectionimpl.hxx>
+#include "excelvbahelper.hxx"
typedef CollTestImplHelper< ov::excel::XOLEObjects > OLEObjectsImpl_BASE;
diff --git a/sc/source/ui/vba/vbaoutline.hxx b/sc/source/ui/vba/vbaoutline.hxx
index 346ca973f021..423b97a34671 100644
--- a/sc/source/ui/vba/vbaoutline.hxx
+++ b/sc/source/ui/vba/vbaoutline.hxx
@@ -34,7 +34,7 @@
#include <cppuhelper/implbase1.hxx>
#include <ooo/vba/excel/XOutline.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include "vbahelperinterface.hxx"
+#include <vbahelper/vbahelperinterface.hxx>
typedef InheritedHelperInterfaceImpl1< ov::excel::XOutline > ScVbaOutline_BASE;
diff --git a/sc/source/ui/vba/vbapagebreak.cxx b/sc/source/ui/vba/vbapagebreak.cxx
index 83fd0687c4c7..6e8357be7a8c 100644
--- a/sc/source/ui/vba/vbapagebreak.cxx
+++ b/sc/source/ui/vba/vbapagebreak.cxx
@@ -139,3 +139,37 @@ ScVbaHPageBreak::getServiceNames()
return aServiceNames;
}
+template class ScVbaPageBreak< excel::XVPageBreak >;
+
+/* class ScVbaVPageBreak */
+ScVbaVPageBreak::ScVbaVPageBreak( const css::uno::Reference< ov::XHelperInterface >& xParent,
+ const css::uno::Reference< css::uno::XComponentContext >& xContext,
+ css::uno::Reference< css::beans::XPropertySet >& xProps,
+ css::sheet::TablePageBreakData aTablePageBreakData ) throw ( css::uno::RuntimeException )
+: ScVbaVPageBreak_BASE( xParent, xContext, xProps, aTablePageBreakData )
+{
+}
+
+ScVbaVPageBreak::~ScVbaVPageBreak()
+{
+}
+
+rtl::OUString&
+ScVbaVPageBreak::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaVPageBreak") );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+ScVbaVPageBreak::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.excel.VPageBreak" ) );
+ }
+ return aServiceNames;
+}
+
diff --git a/sc/source/ui/vba/vbapagebreak.hxx b/sc/source/ui/vba/vbapagebreak.hxx
index 0b05c8895711..2e83d3d9b6d6 100644
--- a/sc/source/ui/vba/vbapagebreak.hxx
+++ b/sc/source/ui/vba/vbapagebreak.hxx
@@ -33,12 +33,13 @@
#include <cppuhelper/implbase1.hxx>
#include <ooo/vba/excel/XPageBreak.hpp>
#include <ooo/vba/excel/XHPageBreak.hpp>
+#include <ooo/vba/excel/XVPageBreak.hpp>
#include <ooo/vba/excel/XRange.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/script/BasicErrorException.hpp>
#include <com/sun/star/sheet/TablePageBreakData.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include "vbahelperinterface.hxx"
+#include <vbahelper/vbahelperinterface.hxx>
template< typename Ifc1 >
class ScVbaPageBreak : public InheritedHelperInterfaceImpl1< Ifc1 >
@@ -84,4 +85,22 @@ public:
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
};
+//VPageBreak
+typedef ScVbaPageBreak < ov::excel::XVPageBreak > ScVbaVPageBreak_BASE;
+
+class ScVbaVPageBreak : public ScVbaVPageBreak_BASE
+{
+public:
+ ScVbaVPageBreak( const css::uno::Reference< ov::XHelperInterface >& xParent,
+ const css::uno::Reference< css::uno::XComponentContext >& xContext,
+ css::uno::Reference< css::beans::XPropertySet >& xProps,
+ css::sheet::TablePageBreakData aTablePageBreakData) throw (css::uno::RuntimeException);
+
+ virtual ~ScVbaVPageBreak();
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
#endif
diff --git a/sc/source/ui/vba/vbapagebreaks.cxx b/sc/source/ui/vba/vbapagebreaks.cxx
index 7e04b982b530..c3b86b77d0bd 100644
--- a/sc/source/ui/vba/vbapagebreaks.cxx
+++ b/sc/source/ui/vba/vbapagebreaks.cxx
@@ -90,8 +90,8 @@ public:
virtual uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException);
virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException)
{
- //if( m_bColumn )
- // return excel::XVPageBreak::static_type(0);
+ if( m_bColumn )
+ return excel::XVPageBreak::static_type(0);
return excel::XHPageBreak::static_type(0);
}
virtual sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException)
@@ -137,8 +137,8 @@ uno::Any SAL_CALL RangePageBreaks::getByIndex( sal_Int32 Index ) throw (lang::In
if( (nPos < xIndexAccess->getCount()) && (nPos > -1) )
{
uno::Reference< beans::XPropertySet > xRowColPropertySet( xIndexAccess->getByIndex(nPos), uno::UNO_QUERY_THROW );
- //if( m_bColumn )
- // return uno::makeAny( uno::Reference< excel::XVPageBreak >( new ScVbaVPageBreak( mxParent, mxContext, xRowColPropertySet, aTablePageBreakData) ));
+ if( m_bColumn )
+ return uno::makeAny( uno::Reference< excel::XVPageBreak >( new ScVbaVPageBreak( mxParent, mxContext, xRowColPropertySet, aTablePageBreakData) ));
return uno::makeAny( uno::Reference< excel::XHPageBreak >( new ScVbaHPageBreak( mxParent, mxContext, xRowColPropertySet, aTablePageBreakData) ));
}
}
@@ -187,8 +187,8 @@ uno::Any RangePageBreaks::Add( const css::uno::Any& Before ) throw ( css::script
sheet::TablePageBreakData aTablePageBreakData;
aTablePageBreakData.ManualBreak = sal_True;
aTablePageBreakData.Position = nAPIRowColIndex;
- //if( m_bColumn )
- // return uno::makeAny( uno::Reference< excel::XVPageBreak >( new ScVbaVPageBreak( mxParent, mxContext, xRowColPropertySet, aTablePageBreakData) ));
+ if( m_bColumn )
+ return uno::makeAny( uno::Reference< excel::XVPageBreak >( new ScVbaVPageBreak( mxParent, mxContext, xRowColPropertySet, aTablePageBreakData) ));
return uno::makeAny( uno::Reference< excel::XHPageBreak >( new ScVbaHPageBreak( mxParent, mxContext, xRowColPropertySet, aTablePageBreakData) ));
}
@@ -267,3 +267,64 @@ ScVbaHPageBreaks::getServiceNames()
return aServiceNames;
}
+//VPageBreak
+ScVbaVPageBreaks::ScVbaVPageBreaks( const uno::Reference< XHelperInterface >& xParent,
+ const uno::Reference< uno::XComponentContext >& xContext,
+ uno::Reference< sheet::XSheetPageBreak >& xSheetPageBreak ) throw ( uno::RuntimeException )
+: ScVbaVPageBreaks_BASE( xParent, xContext, new RangePageBreaks( xParent, xContext, xSheetPageBreak, sal_True ) ),
+ mxSheetPageBreak( xSheetPageBreak )
+{
+}
+
+ScVbaVPageBreaks::~ScVbaVPageBreaks()
+{
+}
+
+uno::Any SAL_CALL
+ScVbaVPageBreaks::Add( const uno::Any& Before ) throw ( script::BasicErrorException, uno::RuntimeException )
+{
+ RangePageBreaks* pPageBreaks = dynamic_cast< RangePageBreaks* >( m_xIndexAccess.get() );
+ if( pPageBreaks )
+ {
+ return pPageBreaks->Add( Before );
+ }
+ return uno::Any();
+}
+
+uno::Reference< container::XEnumeration >
+ScVbaVPageBreaks::createEnumeration() throw ( uno::RuntimeException )
+{
+ return new RangePageBreaksEnumWrapper( m_xIndexAccess );
+}
+
+uno::Any
+ScVbaVPageBreaks::createCollectionObject( const css::uno::Any& aSource )
+{
+ return aSource; // its already a pagebreak object
+}
+
+uno::Type
+ScVbaVPageBreaks::getElementType() throw ( uno::RuntimeException )
+{
+ return excel::XVPageBreak::static_type( 0 );
+}
+
+rtl::OUString&
+ScVbaVPageBreaks::getServiceImplName()
+{
+ static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM( "ScVbaVPageBreaks" ) );
+ return sImplName;
+}
+
+uno::Sequence< rtl::OUString >
+ScVbaVPageBreaks::getServiceNames()
+{
+ static uno::Sequence< rtl::OUString > aServiceNames;
+ if ( aServiceNames.getLength() == 0 )
+ {
+ aServiceNames.realloc( 1 );
+ aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.excel.VPageBreaks" ) );
+ }
+ return aServiceNames;
+}
+
diff --git a/sc/source/ui/vba/vbapagebreaks.hxx b/sc/source/ui/vba/vbapagebreaks.hxx
index 26d3e6961297..5c90745d61ff 100644
--- a/sc/source/ui/vba/vbapagebreaks.hxx
+++ b/sc/source/ui/vba/vbapagebreaks.hxx
@@ -33,6 +33,8 @@
#include <cppuhelper/implbase1.hxx>
#include <ooo/vba/excel/XHPageBreaks.hpp>
#include <ooo/vba/excel/XHPageBreak.hpp>
+#include <ooo/vba/excel/XVPageBreaks.hpp>
+#include <ooo/vba/excel/XVPageBreak.hpp>
#include <ooo/vba/excel/XRange.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/script/BasicErrorException.hpp>
@@ -41,8 +43,8 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/table/XColumnRowRange.hpp>
-#include "vbahelperinterface.hxx"
-#include "vbacollectionimpl.hxx"
+#include <vbahelper/vbahelperinterface.hxx>
+#include <vbahelper/vbacollectionimpl.hxx>
typedef CollTestImplHelper< ov::excel::XHPageBreaks > ScVbaHPageBreaks_BASE;
@@ -68,4 +70,31 @@ public:
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
};
+//VPageBreaks
+typedef CollTestImplHelper< ov::excel::XVPageBreaks > ScVbaVPageBreaks_BASE;
+
+class ScVbaVPageBreaks : public ScVbaVPageBreaks_BASE
+{
+ css::uno::Reference< css::sheet::XSheetPageBreak > mxSheetPageBreak;
+
+public:
+ ScVbaVPageBreaks( const css::uno::Reference< ov::XHelperInterface >& xParent,
+ const css::uno::Reference< css::uno::XComponentContext >& xContext,
+ css::uno::Reference< css::sheet::XSheetPageBreak >& xSheetPageBreak ) throw ( css::uno::RuntimeException );
+
+ virtual ~ScVbaVPageBreaks();
+
+ // XVPageBreaks
+ virtual css::uno::Any SAL_CALL Add( const css::uno::Any& Before ) throw ( css::script::BasicErrorException, 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& );
+
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+};
+
#endif
diff --git a/sc/source/ui/vba/vbapages.cxx b/sc/source/ui/vba/vbapages.cxx
deleted file mode 100644
index 19f89aaefeed..000000000000
--- a/sc/source/ui/vba/vbapages.cxx
+++ /dev/null
@@ -1,81 +0,0 @@
-/*************************************************************************
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile$
- *
- * $Revision$
- *
- * last change: $Author$ $Date$
- *
- * 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 2005 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
- *
- ************************************************************************/
-#include "vbapages.hxx"
-
-using namespace ::ooo::vba;
-using namespace ::com::sun::star;
-using namespace ::vos;
-
-ScVbaPages::ScVbaPages( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess >& xPages ) throw( lang::IllegalArgumentException ) : ScVbaPages_BASE( xParent, xContext, xPages )
-{
-}
-
-uno::Type SAL_CALL
-ScVbaPages::getElementType() throw (uno::RuntimeException)
-{
- // return msforms::XPage::static_type(0);
- return uno::XInterface::static_type(0);
-}
-
-uno::Any
-ScVbaPages::createCollectionObject( const css::uno::Any& aSource )
-{
- return aSource;
-}
-
-rtl::OUString&
-ScVbaPages::getServiceImplName()
-{
- static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaPages") );
- return sImplName;
-}
-
-uno::Reference< container::XEnumeration > SAL_CALL
-ScVbaPages::createEnumeration() throw (uno::RuntimeException)
-{
- return uno::Reference< container::XEnumeration >();
-}
-
-uno::Sequence< rtl::OUString >
-ScVbaPages::getServiceNames()
-{
- static uno::Sequence< rtl::OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
- {
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msform.Pages" ) );
- }
- return aServiceNames;
-}
diff --git a/sc/source/ui/vba/vbapages.hxx b/sc/source/ui/vba/vbapages.hxx
deleted file mode 100644
index 45ad882d759c..000000000000
--- a/sc/source/ui/vba/vbapages.hxx
+++ /dev/null
@@ -1,64 +0,0 @@
-/*************************************************************************
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile$
- *
- * $Revision$
- *
- * last change: $Author$ $Date$
- *
- * 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 2005 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
- *
- ************************************************************************/
-#ifndef SC_VBA_PAGES_HXX
-#define SC_VBA_PAGES_HXX
-
-#include <ooo/vba/office/MsoShapeType.hpp>
-#include <com/sun/star/lang/XEventListener.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <ooo/vba/msforms/XPages.hpp>
-#include <cppuhelper/implbase2.hxx>
-#include <cppuhelper/implbase1.hxx>
-
-#include "vbacollectionimpl.hxx"
-typedef CollTestImplHelper<
-ov::msforms::XPages > ScVbaPages_BASE;
-
-class ScVbaPages : public ScVbaPages_BASE
-{
-protected:
- virtual rtl::OUString& getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-public:
- ScVbaPages( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xPages ) throw ( css::lang::IllegalArgumentException );
- virtual ~ScVbaPages() {}
- // 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);
- // ScVbaPages_BASE
- virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
-
-};
-#endif//SC_VBA_SHAPE_HXX
diff --git a/sc/source/ui/vba/vbapagesetup.cxx b/sc/source/ui/vba/vbapagesetup.cxx
index 2e7dd57a7afd..cbc9360db523 100644
--- a/sc/source/ui/vba/vbapagesetup.cxx
+++ b/sc/source/ui/vba/vbapagesetup.cxx
@@ -31,6 +31,7 @@
#include "cellsuno.hxx"
#include "convuno.hxx"
#include "rangelst.hxx"
+#include "excelvbahelper.hxx"
#include <com/sun/star/sheet/XPrintAreas.hpp>
#include <com/sun/star/sheet/XHeaderFooterContent.hpp>
#include <com/sun/star/text/XText.hpp>
@@ -52,10 +53,10 @@ ScVbaPageSetup::ScVbaPageSetup(const uno::Reference< XHelperInterface >& xParent
const uno::Reference< uno::XComponentContext >& xContext,
const uno::Reference< sheet::XSpreadsheet >& xSheet,
const uno::Reference< frame::XModel >& xModel) throw (uno::RuntimeException):
- ScVbaPageSetup_BASE( xParent, xContext ),
- mxSheet( xSheet ), mxModel( xModel )
+ ScVbaPageSetup_BASE( xParent, xContext ), mxSheet( xSheet )
{
// query for current page style
+ mxModel.set( xModel, uno::UNO_QUERY_THROW );
uno::Reference< beans::XPropertySet > xSheetProps( mxSheet, uno::UNO_QUERY_THROW );
uno::Any aValue = xSheetProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageStyle" )));
rtl::OUString aStyleName;
@@ -65,6 +66,8 @@ ScVbaPageSetup::ScVbaPageSetup(const uno::Reference< XHelperInterface >& xParent
uno::Reference< container::XNameAccess > xStyleFamilies = xStyleFamiliesSup->getStyleFamilies();
uno::Reference< container::XNameAccess > xPageStyle( xStyleFamilies->getByName(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageStyles"))), uno::UNO_QUERY_THROW );
mxPageProps.set( xPageStyle->getByName(aStyleName), uno::UNO_QUERY_THROW );
+ mnOrientLandscape = excel::XlPageOrientation::xlLandscape;
+ mnOrientPortrait = excel::XlPageOrientation::xlPortrait;
}
rtl::OUString SAL_CALL ScVbaPageSetup::getPrintArea() throw (css::uno::RuntimeException)
@@ -85,7 +88,7 @@ rtl::OUString SAL_CALL ScVbaPageSetup::getPrintArea() throw (css::uno::RuntimeEx
ScUnoConversion::FillScRange( aRange, aSeq[i] );
aRangeList.Append( aRange );
}
- ScDocument* pDoc = getDocShell( mxModel )->GetDocument();
+ ScDocument* pDoc = excel::getDocShell( mxModel )->GetDocument();
aRangeList.Format( aPrintArea, nFlags, pDoc, formula::FormulaGrammar::CONV_XL_A1, ',' );
}
@@ -106,7 +109,7 @@ void SAL_CALL ScVbaPageSetup::setPrintArea( const rtl::OUString& rAreas ) throw
{
ScRangeList aCellRanges;
ScRange aRange;
- if( getScRangeListForAddress( rAreas, getDocShell( mxModel ) , aRange, aCellRanges ) )
+ if( getScRangeListForAddress( rAreas, excel::getDocShell( mxModel ) , aRange, aCellRanges ) )
{
uno::Sequence< table::CellRangeAddress > aSeq( aCellRanges.Count() );
USHORT i=0;
@@ -121,290 +124,24 @@ void SAL_CALL ScVbaPageSetup::setPrintArea( const rtl::OUString& rAreas ) throw
}
}
-double SAL_CALL ScVbaPageSetup::getTopMargin() throw (css::uno::RuntimeException)
-{
- sal_Bool headerOn = sal_False;
- sal_Int32 topMargin = 0;
- sal_Int32 headerHeight = 0;
-
- try
- {
- uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn")));
- aValue >>= headerOn;
-
- aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin")));
- aValue >>= topMargin;
-
- if( headerOn )
- {
- aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderHeight")));
- aValue >>= headerHeight;
- topMargin += headerHeight;
- }
- }
- catch( uno::Exception& )
- {
- }
-
- return Millimeter::getInPoints( topMargin );
-}
-
-void SAL_CALL ScVbaPageSetup::setTopMargin( double margin ) throw (css::uno::RuntimeException)
-{
- sal_Int32 topMargin = Millimeter::getInHundredthsOfOneMillimeter( margin );
- sal_Bool headerOn = sal_False;
- sal_Int32 headerHeight = 0;
-
- try
- {
- uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn")));
- aValue >>= headerOn;
-
- if( headerOn )
- {
- aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderHeight")));
- aValue >>= headerHeight;
- topMargin -= headerHeight;
- }
-
- aValue <<= topMargin;
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin")), aValue );
- }
- catch( uno::Exception& )
- {
- }
-}
-
-double SAL_CALL ScVbaPageSetup::getBottomMargin() throw (css::uno::RuntimeException)
-{
- sal_Bool footerOn = sal_False;
- sal_Int32 bottomMargin = 0;
- sal_Int32 footerHeight = 0;
-
- try
- {
- uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsOn")));
- aValue >>= footerOn;
-
- aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin")));
- aValue >>= bottomMargin;
-
- if( footerOn )
- {
- aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterHeight")));
- aValue >>= footerHeight;
- bottomMargin += footerHeight;
- }
- }
- catch( uno::Exception& )
- {
- }
-
- return Millimeter::getInPoints( bottomMargin );
-}
-
-void SAL_CALL ScVbaPageSetup::setBottomMargin( double margin ) throw (css::uno::RuntimeException)
-{
- sal_Int32 bottomMargin = Millimeter::getInHundredthsOfOneMillimeter( margin );
- sal_Bool footerOn = sal_False;
- sal_Int32 footerHeight = 0;
-
- try
- {
- uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsOn")));
- aValue >>= footerOn;
-
- if( footerOn )
- {
- aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterHeight")));
- aValue >>= footerHeight;
- bottomMargin -= footerHeight;
- }
-
- aValue <<= bottomMargin;
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin")), aValue );
- }
- catch( uno::Exception& )
- {
- }
-}
-
-double SAL_CALL ScVbaPageSetup::getRightMargin() throw (css::uno::RuntimeException)
-{
- sal_Int32 rightMargin = 0;
- try
- {
- uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightMargin")));
- aValue >>= rightMargin;
- }
- catch( uno::Exception& )
- {
- }
-
- return Millimeter::getInPoints( rightMargin );;
-}
-
-void SAL_CALL ScVbaPageSetup::setRightMargin( double margin ) throw (css::uno::RuntimeException)
-{
- sal_Int32 rightMargin = Millimeter::getInHundredthsOfOneMillimeter( margin );
- try
- {
- uno::Any aValue;
- aValue <<= rightMargin;
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightMargin")), aValue );
- }
- catch( uno::Exception& )
- {
- }
-
-}
-
-double SAL_CALL ScVbaPageSetup::getLeftMargin() throw (css::uno::RuntimeException)
-{
- sal_Int32 leftMargin = 0;
- try
- {
- uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LeftMargin")));
- aValue >>= leftMargin;
- }
- catch( uno::Exception& )
- {
- }
-
- return Millimeter::getInPoints( leftMargin );;
-}
-
-void SAL_CALL ScVbaPageSetup::setLeftMargin( double margin ) throw (css::uno::RuntimeException)
-{
- sal_Int32 leftMargin = Millimeter::getInHundredthsOfOneMillimeter( margin );
- try
- {
- uno::Any aValue;
- aValue <<= leftMargin;
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LeftMargin")), aValue );
- }
- catch( uno::Exception& )
- {
- }
-}
-
double SAL_CALL ScVbaPageSetup::getHeaderMargin() throw (css::uno::RuntimeException)
{
- sal_Int32 headerMargin = 0;
- try
- {
- uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin")));
- aValue >>= headerMargin;
- }
- catch( uno::Exception& )
- {
- }
-
- return Millimeter::getInPoints( headerMargin );;
+ return VbaPageSetupBase::getHeaderMargin();
}
void SAL_CALL ScVbaPageSetup::setHeaderMargin( double margin ) throw (css::uno::RuntimeException)
{
- sal_Int32 headerMargin = Millimeter::getInHundredthsOfOneMillimeter( margin );
- try
- {
- uno::Any aValue;
- aValue <<= headerMargin;
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin")), aValue );
- }
- catch( uno::Exception& )
- {
- }
+ VbaPageSetupBase::setHeaderMargin( margin );
}
double SAL_CALL ScVbaPageSetup::getFooterMargin() throw (css::uno::RuntimeException)
{
- sal_Int32 footerMargin = 0;
- try
- {
- uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin")));
- aValue >>= footerMargin;
- }
- catch( uno::Exception& )
- {
- }
-
- return Millimeter::getInPoints( footerMargin );;
+ return VbaPageSetupBase::getFooterMargin();
}
void SAL_CALL ScVbaPageSetup::setFooterMargin( double margin ) throw (css::uno::RuntimeException)
{
- sal_Int32 footerMargin = Millimeter::getInHundredthsOfOneMillimeter( margin );
- try
- {
- uno::Any aValue;
- aValue <<= footerMargin;
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin")), aValue );
- }
- catch( uno::Exception& )
- {
- }
-}
-
-sal_Int32 SAL_CALL ScVbaPageSetup::getOrientation() throw (css::uno::RuntimeException)
-{
- sal_Int32 orientation = excel::XlPageOrientation::xlPortrait;
- try
- {
- sal_Bool isLandscape = sal_False;
- uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsLandscape")));
- aValue >>= isLandscape;
-
- if( isLandscape )
- {
- orientation = excel::XlPageOrientation::xlLandscape;
- }
- }
- catch( uno::Exception& )
- {
- }
- return orientation;
-}
-
-void SAL_CALL ScVbaPageSetup::setOrientation( sal_Int32 orientation ) throw (css::uno::RuntimeException)
-{
- if( ( orientation != excel::XlPageOrientation::xlPortrait ) &&
- ( orientation != excel::XlPageOrientation::xlLandscape ) )
- {
- DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
- }
-
- try
- {
- sal_Bool isLandscape = sal_False;
- uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsLandscape")));
- aValue >>= isLandscape;
-
- sal_Bool switchOrientation = sal_False;
- if(( isLandscape && orientation != excel::XlPageOrientation::xlLandscape ) ||
- ( !isLandscape && orientation != excel::XlPageOrientation::xlPortrait ))
- {
- switchOrientation = sal_True;
- }
-
- if( switchOrientation )
- {
- aValue <<= !isLandscape;
- uno::Any aHeight = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Height")));
- uno::Any aWidth = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Width")));
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsLandscape")), aValue );
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Width")), aHeight );
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Height")), aWidth );
- }
-
- if( isLandscape )
- {
- orientation = excel::XlPageOrientation::xlLandscape;
- }
- }
- catch( uno::Exception& )
- {
- }
+ VbaPageSetupBase::setFooterMargin( margin );
}
uno::Any SAL_CALL ScVbaPageSetup::getFitToPagesTall() throw (css::uno::RuntimeException)
diff --git a/sc/source/ui/vba/vbapagesetup.hxx b/sc/source/ui/vba/vbapagesetup.hxx
index e3cafc9fb78d..2b8b1fffde43 100644
--- a/sc/source/ui/vba/vbapagesetup.hxx
+++ b/sc/source/ui/vba/vbapagesetup.hxx
@@ -35,39 +35,28 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/sheet/XSpreadsheet.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include "vbahelperinterface.hxx"
+#include <vbahelper/vbahelperinterface.hxx>
+#include <vbahelper/vbapagesetupbase.hxx>
-typedef InheritedHelperInterfaceImpl1< ov::excel::XPageSetup > ScVbaPageSetup_BASE;
+typedef cppu::ImplInheritanceHelper1< VbaPageSetupBase, ov::excel::XPageSetup > ScVbaPageSetup_BASE;
class ScVbaPageSetup : public ScVbaPageSetup_BASE
{
css::uno::Reference< css::sheet::XSpreadsheet > mxSheet;
- css::uno::Reference< css::beans::XPropertySet > mxPageProps;
- css::uno::Reference< css::frame::XModel > mxModel;
public:
ScVbaPageSetup( const css::uno::Reference< ov::XHelperInterface >& xParent,
const css::uno::Reference< css::uno::XComponentContext >& xContext,
const css::uno::Reference< css::sheet::XSpreadsheet>& xSheet,
- const css::uno::Reference< css::frame::XModel >& xModlel) throw (css::uno::RuntimeException);
+ const css::uno::Reference< css::frame::XModel >& xModel) throw (css::uno::RuntimeException);
virtual ~ScVbaPageSetup(){}
// Attribute
virtual rtl::OUString SAL_CALL getPrintArea() throw (css::uno::RuntimeException);
virtual void SAL_CALL setPrintArea( const rtl::OUString& rAreas ) throw (css::uno::RuntimeException);
- virtual double SAL_CALL getTopMargin() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setTopMargin( double margin ) throw (css::uno::RuntimeException);
- virtual double SAL_CALL getBottomMargin() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setBottomMargin( double margin ) throw (css::uno::RuntimeException);
- virtual double SAL_CALL getRightMargin() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setRightMargin( double margin ) throw (css::uno::RuntimeException);
- virtual double SAL_CALL getLeftMargin() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setLeftMargin( double margin ) throw (css::uno::RuntimeException);
virtual double SAL_CALL getHeaderMargin() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setHeaderMargin( double margin ) throw (css::uno::RuntimeException);
- virtual double SAL_CALL getFooterMargin() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setFooterMargin( double margin ) throw (css::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getOrientation() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setOrientation( sal_Int32 orientation ) throw (css::uno::RuntimeException);
+ void SAL_CALL setHeaderMargin( double margin ) throw (css::uno::RuntimeException);
+ double SAL_CALL getFooterMargin() throw (css::uno::RuntimeException);
+ void SAL_CALL setFooterMargin( double margin ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL getFitToPagesTall() throw (css::uno::RuntimeException);
virtual void SAL_CALL setFitToPagesTall( const css::uno::Any& fitToPagesTall ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL getFitToPagesWide() throw (css::uno::RuntimeException);
diff --git a/sc/source/ui/vba/vbapalette.cxx b/sc/source/ui/vba/vbapalette.cxx
index d3bbbd6ae121..f9afaa00c191 100644
--- a/sc/source/ui/vba/vbapalette.cxx
+++ b/sc/source/ui/vba/vbapalette.cxx
@@ -92,7 +92,7 @@ ScVbaPalette::getDefaultPalette()
}
uno::Reference< container::XIndexAccess >
-ScVbaPalette::getPalette()
+ScVbaPalette::getPalette() const
{
uno::Reference< container::XIndexAccess > xIndex;
uno::Reference< beans::XPropertySet > xProps;
diff --git a/sc/source/ui/vba/vbapalette.hxx b/sc/source/ui/vba/vbapalette.hxx
index aa1c8eb27d6c..388fd5908b6b 100644
--- a/sc/source/ui/vba/vbapalette.hxx
+++ b/sc/source/ui/vba/vbapalette.hxx
@@ -30,7 +30,7 @@
#ifndef SC_VBAPALETTE_HXX
#define SC_VBAPALETTE_HXX
-#include "vbahelper.hxx"
+#include "excelvbahelper.hxx"
#include <document.hxx>
#include <com/sun/star/container/XIndexAccess.hpp>
@@ -42,7 +42,7 @@ public:
ScVbaPalette( SfxObjectShell* pShell = NULL ) : m_pShell( pShell ){}
// if no palette available e.g. because the document doesn't have a
// palette defined then a default palette will be returned.
- css::uno::Reference< css::container::XIndexAccess > getPalette();
+ css::uno::Reference< css::container::XIndexAccess > getPalette() const;
static css::uno::Reference< css::container::XIndexAccess > getDefaultPalette();
};
diff --git a/sc/source/ui/vba/vbapane.hxx b/sc/source/ui/vba/vbapane.hxx
index 0f67bbf6038c..97eb3e8f366c 100644
--- a/sc/source/ui/vba/vbapane.hxx
+++ b/sc/source/ui/vba/vbapane.hxx
@@ -34,7 +34,7 @@
#include<com/sun/star/sheet/XViewPane.hpp>
#include<ooo/vba/excel/XPane.hpp>
-#include"vbahelper.hxx"
+#include"excelvbahelper.hxx"
typedef cppu::WeakImplHelper1< ov::excel::XPane > PaneImpl_Base;
diff --git a/sc/source/ui/vba/vbapictureformat.cxx b/sc/source/ui/vba/vbapictureformat.cxx
deleted file mode 100644
index 0d79fc173d50..000000000000
--- a/sc/source/ui/vba/vbapictureformat.cxx
+++ /dev/null
@@ -1,147 +0,0 @@
-/*************************************************************************
- *
- * 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: vbapictureformat.cxx,v $
- * $Revision: 1.3 $
- *
- * 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 "vbapictureformat.hxx"
-
-using namespace ooo::vba;
-using namespace com::sun::star;
-
-ScVbaPictureFormat::ScVbaPictureFormat( const css::uno::Reference< ov::XHelperInterface >& xParent,
- const css::uno::Reference< css::uno::XComponentContext >& xContext,
- uno::Reference< drawing::XShape > xShape )
- throw( lang::IllegalArgumentException ) : ScVbaPictureFormat_BASE( xParent, xContext ), m_xShape( xShape )
-{
- m_xPropertySet.set( m_xShape, uno::UNO_QUERY_THROW );
-}
-
-void
-ScVbaPictureFormat::checkParameterRangeInDouble( double nRange, double nMin, double nMax ) throw (css::uno::RuntimeException)
-{
- if( nRange < nMin )
- {
- throw uno::RuntimeException( rtl::OUString::createFromAscii("Parameter out of range, value is too small.") , uno::Reference< uno::XInterface >() );
- }
- if( nRange > nMax )
- {
- throw uno::RuntimeException( rtl::OUString::createFromAscii("Parameter out of range, value is too high.") , uno::Reference< uno::XInterface >() );
- }
-}
-
-// Attributes
-double SAL_CALL
-ScVbaPictureFormat::getBrightness() throw (uno::RuntimeException)
-{
- sal_Int16 nLuminance = 0;
- m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("AdjustLuminance") ) >>= nLuminance;
- double fBrightness = static_cast< double >( nLuminance );
- fBrightness = ( fBrightness +100 ) / 200;
- return fBrightness;
-}
-
-void SAL_CALL
-ScVbaPictureFormat::setBrightness( double _brightness ) throw (uno::RuntimeException)
-{
- checkParameterRangeInDouble( _brightness, 0.0, 1.0 );
- double fLuminance = _brightness * 200 - 100;
- sal_Int16 nLuminance = static_cast< sal_Int16 >( fLuminance );
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii("AdjustLuminance"), uno::makeAny( nLuminance ) );
-}
-
-double SAL_CALL
-ScVbaPictureFormat::getContrast() throw (uno::RuntimeException)
-{
- sal_Int16 nContrast = 0;
- m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("AdjustContrast") ) >>= nContrast;
- double fContrast = static_cast< double >( nContrast );
- fContrast = ( fContrast + 100 ) / 200;
- return fContrast;
-}
-
-void SAL_CALL
-ScVbaPictureFormat::setContrast( double _contrast ) throw (uno::RuntimeException)
-{
- checkParameterRangeInDouble( _contrast, 0.0, 1.0 );
- double fContrast = _contrast * 200 - 100;
- sal_Int16 nContrast = static_cast< sal_Int16 >( fContrast );
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii("AdjustContrast"), uno::makeAny( nContrast ) );
-}
-
-
-// Methods
-void SAL_CALL
-ScVbaPictureFormat::IncrementBrightness( double increment ) throw (uno::RuntimeException)
-{
- double fBrightness = getBrightness();
- fBrightness += increment;
- if( fBrightness < 0 )
- {
- fBrightness = 0.0;
- }
- if( fBrightness > 1 )
- {
- fBrightness = 1;
- }
- setBrightness( fBrightness );
-}
-
-void SAL_CALL
-ScVbaPictureFormat::IncrementContrast( double increment ) throw (uno::RuntimeException)
-{
- double nContrast = getContrast();
- nContrast += increment;
- if( increment < 0 )
- {
- increment = 0.0;
- }
- if( increment > 1 )
- {
- increment = 1.0;
- }
- setContrast( nContrast );
-}
-
-
-rtl::OUString&
-ScVbaPictureFormat::getServiceImplName()
-{
- static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaPictureFormat") );
- return sImplName;
-}
-
-uno::Sequence< rtl::OUString >
-ScVbaPictureFormat::getServiceNames()
-{
- static uno::Sequence< rtl::OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
- {
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msform.PictureFormat" ) );
- }
- return aServiceNames;
-}
diff --git a/sc/source/ui/vba/vbapictureformat.hxx b/sc/source/ui/vba/vbapictureformat.hxx
deleted file mode 100644
index f7b63f94fcbd..000000000000
--- a/sc/source/ui/vba/vbapictureformat.hxx
+++ /dev/null
@@ -1,64 +0,0 @@
-/*************************************************************************
- *
- * 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: vbapictureformat.hxx,v $
- * $Revision: 1.3 $
- *
- * 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_PICTUREFORMAT_HXX
-#define SC_VBA_PICTUREFORMAT_HXX
-
-#include <com/sun/star/drawing/XShape.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <ooo/vba/msforms/XPictureFormat.hpp>
-#include "vbahelperinterface.hxx"
-
-typedef InheritedHelperInterfaceImpl1< ov::msforms::XPictureFormat > ScVbaPictureFormat_BASE;
-
-class ScVbaPictureFormat : public ScVbaPictureFormat_BASE
-{
-private:
- css::uno::Reference< css::drawing::XShape > m_xShape;
- css::uno::Reference< css::beans::XPropertySet > m_xPropertySet;
-protected:
- virtual rtl::OUString& getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-private:
- void checkParameterRangeInDouble( double nRange, double nMin, double nMax ) throw (css::uno::RuntimeException);
-public:
- ScVbaPictureFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::drawing::XShape > xShape ) throw( css::lang::IllegalArgumentException );
-
- // Attributes
- virtual double SAL_CALL getBrightness() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setBrightness( double _brightness ) throw (css::uno::RuntimeException);
- virtual double SAL_CALL getContrast() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setContrast( double _contrast ) throw (css::uno::RuntimeException);
-
- // Methods
- virtual void SAL_CALL IncrementBrightness( double increment ) throw (css::uno::RuntimeException);
- virtual void SAL_CALL IncrementContrast( double increment ) throw (css::uno::RuntimeException);
-};
-
-#endif//SC_VBA_PICTUREFORMAT_HXX
diff --git a/sc/source/ui/vba/vbapivotcache.hxx b/sc/source/ui/vba/vbapivotcache.hxx
index 8a57401d2ff9..6e98344d115e 100644
--- a/sc/source/ui/vba/vbapivotcache.hxx
+++ b/sc/source/ui/vba/vbapivotcache.hxx
@@ -34,7 +34,7 @@
#include <com/sun/star/sheet/XDataPilotTable.hpp>
#include <ooo/vba/excel/XPivotCache.hpp>
-#include "vbahelperinterface.hxx"
+#include <vbahelper/vbahelperinterface.hxx>
typedef InheritedHelperInterfaceImpl1<ov::excel::XPivotCache > PivotCacheImpl_BASE;
diff --git a/sc/source/ui/vba/vbapivottable.hxx b/sc/source/ui/vba/vbapivottable.hxx
index 55f32a36e60d..7fccada818fc 100644
--- a/sc/source/ui/vba/vbapivottable.hxx
+++ b/sc/source/ui/vba/vbapivottable.hxx
@@ -33,8 +33,8 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/sheet/XDataPilotTable.hpp>
#include <ooo/vba/excel/XPivotTable.hpp>
-#include "vbahelper.hxx"
-#include "vbahelperinterface.hxx"
+#include "excelvbahelper.hxx"
+#include <vbahelper/vbahelperinterface.hxx>
typedef InheritedHelperInterfaceImpl1< ov::excel::XPivotTable > PivotTableImpl_BASE;
diff --git a/sc/source/ui/vba/vbapivottables.hxx b/sc/source/ui/vba/vbapivottables.hxx
index 6a6d5afb67a5..b2f71cdc3ff0 100644
--- a/sc/source/ui/vba/vbapivottables.hxx
+++ b/sc/source/ui/vba/vbapivottables.hxx
@@ -36,9 +36,9 @@
#include <com/sun/star/container/XEnumerationAccess.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include "vbahelper.hxx"
-#include "vbahelperinterface.hxx"
-#include "vbacollectionimpl.hxx"
+#include "excelvbahelper.hxx"
+#include <vbahelper/vbahelperinterface.hxx>
+#include <vbahelper/vbacollectionimpl.hxx>
typedef CollTestImplHelper< ov::excel::XPivotTables > ScVbaPivotTables_BASE;
diff --git a/sc/source/ui/vba/vbaprogressbar.cxx b/sc/source/ui/vba/vbaprogressbar.cxx
deleted file mode 100644
index 27f425f9b808..000000000000
--- a/sc/source/ui/vba/vbaprogressbar.cxx
+++ /dev/null
@@ -1,78 +0,0 @@
-/*************************************************************************
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile$
- *
- * $Revision$
- *
- * last change: $Author$ $Date$
- *
- * 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 2005 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
- *
- ************************************************************************/
-#include "vbaprogressbar.hxx"
-#include <vector>
-
-using namespace com::sun::star;
-using namespace ooo::vba;
-
-// uno servicename com.sun.star.awt.UnoControlProgressBarMode
-const rtl::OUString SVALUE( RTL_CONSTASCII_USTRINGPARAM("ProgressValue") );
-
-ScVbaProgressBar::ScVbaProgressBar( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ProgressBarImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
-{
-}
-
-// Attributes
-uno::Any SAL_CALL
-ScVbaProgressBar::getValue() throw (css::uno::RuntimeException)
-{
- return m_xProps->getPropertyValue( SVALUE );
-}
-
-void SAL_CALL
-ScVbaProgressBar::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException)
-{
- m_xProps->setPropertyValue( SVALUE, _value );
-}
-
-rtl::OUString&
-ScVbaProgressBar::getServiceImplName()
-{
- static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaProgressBar") );
- return sImplName;
-}
-
-uno::Sequence< rtl::OUString >
-ScVbaProgressBar::getServiceNames()
-{
- static uno::Sequence< rtl::OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
- {
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.Label" ) );
- }
- return aServiceNames;
-}
diff --git a/sc/source/ui/vba/vbaprogressbar.hxx b/sc/source/ui/vba/vbaprogressbar.hxx
deleted file mode 100644
index d040f08f98d6..000000000000
--- a/sc/source/ui/vba/vbaprogressbar.hxx
+++ /dev/null
@@ -1,59 +0,0 @@
-/*************************************************************************
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile$
- *
- * $Revision$
- *
- * last change: $Author$ $Date$
- *
- * 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 2005 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
- *
- ************************************************************************/
-#ifndef SC_VBA_PROGRESSBAR_HXX
-#define SC_VBA_PROGRESSBAR_HXX
-#include <cppuhelper/implbase1.hxx>
-#include <ooo/vba/msforms/XProgressBar.hpp>
-
-#include "vbacontrol.hxx"
-#include "vbahelper.hxx"
-#include <cppuhelper/implbase2.hxx>
-
-typedef cppu::ImplInheritanceHelper2< ScVbaControl, ov::msforms::XProgressBar, css::script::XDefaultProperty > ProgressBarImpl_BASE;
-
-class ScVbaProgressBar : public ProgressBarImpl_BASE
-{
-public:
- ScVbaProgressBar( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper );
- // Attributes
- virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
- //XHelperInterface
- virtual rtl::OUString& getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
- // XDefaultProperty
- rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
-};
-#endif //SC_VBA_LABEL_HXX
diff --git a/sc/source/ui/vba/vbapropvalue.hxx b/sc/source/ui/vba/vbapropvalue.hxx
index d6ddb33505e1..f521212f2ceb 100644
--- a/sc/source/ui/vba/vbapropvalue.hxx
+++ b/sc/source/ui/vba/vbapropvalue.hxx
@@ -32,7 +32,7 @@
#include <ooo/vba/XPropValue.hpp>
#include <cppuhelper/implbase1.hxx>
-#include "vbahelper.hxx"
+#include "excelvbahelper.hxx"
typedef ::cppu::WeakImplHelper1< ov::XPropValue > PropValueImpl_BASE;
diff --git a/sc/source/ui/vba/vbaradiobutton.cxx b/sc/source/ui/vba/vbaradiobutton.cxx
deleted file mode 100644
index 3ce00bfd862b..000000000000
--- a/sc/source/ui/vba/vbaradiobutton.cxx
+++ /dev/null
@@ -1,107 +0,0 @@
-/*************************************************************************
- *
- * 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: vbaradiobutton.cxx,v $
- * $Revision: 1.3 $
- *
- * 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 "vbaradiobutton.hxx"
-#include <vector>
-
-using namespace com::sun::star;
-using namespace ooo::vba;
-
-
-const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
-const static rtl::OUString STATE( RTL_CONSTASCII_USTRINGPARAM("State") );
-ScVbaRadioButton::ScVbaRadioButton( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : RadioButtonImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
-{
-}
-
-// Attributes
-rtl::OUString SAL_CALL
-ScVbaRadioButton::getCaption() throw (css::uno::RuntimeException)
-{
- rtl::OUString Label;
- m_xProps->getPropertyValue( LABEL ) >>= Label;
- return Label;
-}
-
-void SAL_CALL
-ScVbaRadioButton::setCaption( const rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
-{
- m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
-}
-
-uno::Any SAL_CALL
-ScVbaRadioButton::getValue() throw (css::uno::RuntimeException)
-{
- sal_Int16 nValue = -1;
- m_xProps->getPropertyValue( STATE ) >>= nValue;
- if( nValue != 0 )
- nValue = -1;
-// return uno::makeAny( nValue );
-// I must be missing something MSO says value should be -1 if selected, 0 if not
-// selected
- return uno::makeAny( ( nValue == -1 ) ? sal_True : sal_False );
-
-}
-
-void SAL_CALL
-ScVbaRadioButton::setValue( const uno::Any& _value ) throw (uno::RuntimeException)
-{
- sal_Int16 nValue = 0;
- sal_Bool bValue = sal_False;
- if( _value >>= nValue )
- {
- if( nValue == -1)
- nValue = 1;
- }
- else if ( _value >>= bValue )
- {
- if ( bValue )
- nValue = 1;
- }
- m_xProps->setPropertyValue( STATE, uno::makeAny( nValue ) );
-}
-
-rtl::OUString&
-ScVbaRadioButton::getServiceImplName()
-{
- static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaRadioButton") );
- return sImplName;
-}
-
-uno::Sequence< rtl::OUString >
-ScVbaRadioButton::getServiceNames()
-{
- static uno::Sequence< rtl::OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
- {
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.RadioButton" ) );
- }
- return aServiceNames;
-}
diff --git a/sc/source/ui/vba/vbaradiobutton.hxx b/sc/source/ui/vba/vbaradiobutton.hxx
deleted file mode 100644
index f840030863dc..000000000000
--- a/sc/source/ui/vba/vbaradiobutton.hxx
+++ /dev/null
@@ -1,55 +0,0 @@
-/*************************************************************************
- *
- * 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: vbaradiobutton.hxx,v $
- * $Revision: 1.3 $
- *
- * 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_RADIOBUTTON_HXX
-#define SC_VBA_RADIOBUTTON_HXX
-#include <ooo/vba/msforms/XRadioButton.hpp>
-#include "vbacontrol.hxx"
-#include "vbahelper.hxx"
-#include <cppuhelper/implbase2.hxx>
-
-typedef cppu::ImplInheritanceHelper2< ScVbaControl, ov::msforms::XRadioButton, css::script::XDefaultProperty > RadioButtonImpl_BASE;
-
-class ScVbaRadioButton : public RadioButtonImpl_BASE
-{
-public:
- ScVbaRadioButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper );
- // Attributes
- virtual rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setCaption( const rtl::OUString& _caption ) throw (css::uno::RuntimeException);
- virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setValue(const com::sun::star::uno::Any&) throw (css::uno::RuntimeException);
- //XHelperInterface
- virtual rtl::OUString& getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
- // XDefaultProperty
- rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
-
-};
-#endif //SC_VBA_RADIOBUTTON_HXX
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index d1ac4504ce96..f6c58c23f79a 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -27,7 +27,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#include "helperdecl.hxx"
+#include <vbahelper/helperdecl.hxx>
#include <comphelper/unwrapargs.hxx>
#include <comphelper/processfactory.hxx>
@@ -149,7 +149,6 @@
#include "rangelst.hxx"
#include "convuno.hxx"
#include "compiler.hxx"
-#include "formula/grammar.hxx"
#include "attrib.hxx"
#include "undodat.hxx"
#include "dbdocfun.hxx"
@@ -162,7 +161,7 @@
#include "vbaglobals.hxx"
#include "vbastyle.hxx"
#include <vector>
-#include <vbacollectionimpl.hxx>
+#include <vbahelper/vbacollectionimpl.hxx>
// begin test includes
#include <com/sun/star/sheet/FunctionArgument.hpp>
// end test includes
@@ -256,7 +255,7 @@ ScCellRangeObj* ScVbaRange::getCellRangeObj() throw ( uno::RuntimeException )
SfxItemSet* ScVbaRange::getCurrentDataSet( ) throw ( uno::RuntimeException )
{
ScCellRangeObj* pUnoCellRange = getCellRangeObj();
- SfxItemSet* pDataSet = ScVbaCellRangeAccess::GetDataSet( pUnoCellRange );
+ SfxItemSet* pDataSet = excel::ScVbaCellRangeAccess::GetDataSet( pUnoCellRange );
if ( !pDataSet )
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Can't access Itemset for range" ) ), uno::Reference< uno::XInterface >() );
return pDataSet;
@@ -473,7 +472,7 @@ public:
if ( pUnoCellRange )
{
- SfxItemSet* pDataSet = ScVbaCellRangeAccess::GetDataSet( pUnoCellRange );
+ SfxItemSet* pDataSet = excel::ScVbaCellRangeAccess::GetDataSet( pUnoCellRange );
SfxItemState eState = pDataSet->GetItemState( ATTR_VALUE_FORMAT, TRUE, NULL);
// one of the cells in the range is not like the other ;-)
// so return a zero length format to indicate that
@@ -1979,7 +1978,7 @@ ScVbaRange::Select() throw (uno::RuntimeException)
// ThisComponent.CurrentController.Frame.getContainerWindow.SetFocus
try
{
- uno::Reference< frame::XController > xController( getCurrentDocument()->getCurrentController(), uno::UNO_QUERY_THROW );
+ uno::Reference< frame::XController > xController( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
uno::Reference< frame::XFrame > xFrame( xController->getFrame(), uno::UNO_QUERY_THROW );
uno::Reference< awt::XWindow > xWin( xFrame->getContainerWindow(), uno::UNO_QUERY_THROW );
xWin->setFocus();
@@ -1999,9 +1998,9 @@ bool cellInRange( const table::CellRangeAddress& rAddr, const sal_Int32& nCol, c
return false;
}
-void setCursor( const SCCOL& nCol, const SCROW& nRow, bool bInSel = true )
+void setCursor( const SCCOL& nCol, const SCROW& nRow, const uno::Reference< frame::XModel >& xModel, bool bInSel = true )
{
- ScTabViewShell* pShell = getCurrentBestViewShell();
+ ScTabViewShell* pShell = excel::getBestViewShell( xModel );
if ( pShell )
{
if ( bInSel )
@@ -2027,11 +2026,19 @@ ScVbaRange::Activate() throw (uno::RuntimeException)
RangeHelper thisRange( xCellRange );
uno::Reference< sheet::XCellRangeAddressable > xThisRangeAddress = thisRange.getCellRangeAddressable();
table::CellRangeAddress thisRangeAddress = xThisRangeAddress->getRangeAddress();
+ uno::Reference< frame::XModel > xModel;
+ ScDocShell* pShell = getScDocShell();
+
+ if ( pShell )
+ xModel = pShell->GetModel();
+
+ if ( !xModel.is() )
+ throw uno::RuntimeException();
// get current selection
- uno::Reference< sheet::XCellRangeAddressable > xRange( getCurrentDocument()->getCurrentSelection(), ::uno::UNO_QUERY);
+ uno::Reference< sheet::XCellRangeAddressable > xRange( xModel->getCurrentSelection(), ::uno::UNO_QUERY);
- uno::Reference< sheet::XSheetCellRanges > xRanges( getCurrentDocument()->getCurrentSelection(), ::uno::UNO_QUERY);
+ uno::Reference< sheet::XSheetCellRanges > xRanges( xModel->getCurrentSelection(), ::uno::UNO_QUERY);
if ( xRanges.is() )
{
@@ -2040,7 +2047,7 @@ ScVbaRange::Activate() throw (uno::RuntimeException)
{
if ( cellInRange( nAddrs[index], thisRangeAddress.StartColumn, thisRangeAddress.StartRow ) )
{
- setCursor( static_cast< SCCOL >( thisRangeAddress.StartColumn ), static_cast< SCROW >( thisRangeAddress.StartRow ) );
+ setCursor( static_cast< SCCOL >( thisRangeAddress.StartColumn ), static_cast< SCROW >( thisRangeAddress.StartRow ), xModel );
return;
}
@@ -2048,7 +2055,7 @@ ScVbaRange::Activate() throw (uno::RuntimeException)
}
if ( xRange.is() && cellInRange( xRange->getRangeAddress(), thisRangeAddress.StartColumn, thisRangeAddress.StartRow ) )
- setCursor( static_cast< SCCOL >( thisRangeAddress.StartColumn ), static_cast< SCROW >( thisRangeAddress.StartRow ) );
+ setCursor( static_cast< SCCOL >( thisRangeAddress.StartColumn ), static_cast< SCROW >( thisRangeAddress.StartRow ), xModel );
else
{
// if this range is multi cell select the range other
@@ -2056,7 +2063,7 @@ ScVbaRange::Activate() throw (uno::RuntimeException)
if ( isSingleCellRange() )
// This top-leftmost cell of this Range is not in the current
// selection so just select this range
- setCursor( static_cast< SCCOL >( thisRangeAddress.StartColumn ), static_cast< SCROW >( thisRangeAddress.StartRow ), false );
+ setCursor( static_cast< SCCOL >( thisRangeAddress.StartColumn ), static_cast< SCROW >( thisRangeAddress.StartRow ), xModel, false );
else
Select();
}
@@ -2211,8 +2218,9 @@ ScVbaRange::Copy(const ::uno::Any& Destination) throw (uno::RuntimeException)
}
else
{
+ uno::Reference< frame::XModel > xModel = getModelFromRange( mxRange );
Select();
- implnCopy();
+ excel::implnCopy( xModel );
}
}
@@ -2235,8 +2243,9 @@ ScVbaRange::Cut(const ::uno::Any& Destination) throw (uno::RuntimeException)
xMover->moveRange( xDestination->getCellAddress(), xSource->getRangeAddress() );
}
{
+ uno::Reference< frame::XModel > xModel = getModelFromRange( mxRange );
Select();
- implnCut();
+ excel::implnCut( xModel );
}
}
@@ -2544,9 +2553,12 @@ ScVbaRange::PasteSpecial( const uno::Any& Paste, const uno::Any& Operation, cons
{
if ( m_Areas->getCount() > 1 )
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("That command cannot be used on multiple selections" ) ), uno::Reference< uno::XInterface >() );
- uno::Reference< view::XSelectionSupplier > xSelection( getCurrentDocument()->getCurrentController(), uno::UNO_QUERY_THROW );
+ ScDocShell* pShell = getScDocShell();
+
+ 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( getCurrentDocument()->getCurrentSelection() );
+ uno::Reference< uno::XInterface > xSel( xModel->getCurrentSelection() );
// select this range
xSelection->select( uno::makeAny( mxRange ) );
// set up defaults
@@ -2566,7 +2578,7 @@ ScVbaRange::PasteSpecial( const uno::Any& Paste, const uno::Any& Operation, cons
USHORT nFlags = getPasteFlags(nPaste);
USHORT nFormulaBits = getPasteFormulaBits(nOperation);
- implnPasteSpecial(nFlags,nFormulaBits,bSkipBlanks,bTranspose);
+ excel::implnPasteSpecial(pShell->GetModel(), nFlags,nFormulaBits,bSkipBlanks,bTranspose);
// restore selection
xSelection->select( uno::makeAny( xSel ) );
}
@@ -3235,13 +3247,15 @@ ScVbaRange::End( ::sal_Int32 Direction ) throw (uno::RuntimeException)
// Save ActiveCell pos ( to restore later )
uno::Any aDft;
- rtl::OUString sActiveCell = ScVbaGlobals::getGlobalsImpl(
- mxContext )->getApplication()->getActiveCell()->Address(aDft, aDft, aDft, aDft, 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();
- SfxViewFrame* pViewFrame = getCurrentViewFrame();
+ uno::Reference< frame::XModel > xModel = getModelFromRange( mxRange );
+
+ SfxViewFrame* pViewFrame = excel::getViewFrame( xModel );
if ( pViewFrame )
{
SfxAllItemSet aArgs( SFX_APP()->GetPool() );
@@ -3277,18 +3291,17 @@ ScVbaRange::End( ::sal_Int32 Direction ) throw (uno::RuntimeException)
}
// result is the ActiveCell
- rtl::OUString sMoved = ScVbaGlobals::getGlobalsImpl(
- mxContext )->getApplication()->getActiveCell()->Address(aDft, aDft, aDft, aDft, aDft );
+ rtl::OUString sMoved = xApplication->getActiveCell()->Address(aDft, aDft, aDft, aDft, aDft );
// restore old ActiveCell
uno::Any aVoid;
- uno::Reference< excel::XRange > xOldActiveCell( ScVbaGlobals::getGlobalsImpl(
- mxContext )->getActiveSheet()->Range( uno::makeAny( sActiveCell ), aVoid ), uno::UNO_QUERY_THROW );
+
+ 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( ScVbaGlobals::getGlobalsImpl(
- mxContext )->getActiveSheet()->Range( uno::makeAny( sMoved ), aVoid ), uno::UNO_QUERY_THROW );
+
+ resultCell.set( xApplication->getActiveSheet()->Range( uno::makeAny( sMoved ), aVoid ), uno::UNO_QUERY_THROW );
// return result
@@ -3321,7 +3334,6 @@ ScVbaRange::characters( const uno::Any& Start, const uno::Any& Length ) throw (u
void SAL_CALL
ScVbaRange::Delete( const uno::Any& Shift ) throw (uno::RuntimeException)
{
-
if ( m_Areas->getCount() > 1 )
{
sal_Int32 nItems = m_Areas->getCount();
@@ -3333,6 +3345,8 @@ ScVbaRange::Delete( const uno::Any& Shift ) throw (uno::RuntimeException)
return;
}
sheet::CellDeleteMode mode = sheet::CellDeleteMode_NONE ;
+ RangeHelper thisRange( mxRange );
+ table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
if ( Shift.hasValue() )
{
sal_Int32 nShift = 0;
@@ -3350,13 +3364,17 @@ ScVbaRange::Delete( const uno::Any& Shift ) throw (uno::RuntimeException)
}
}
else
- if ( getRow() > getColumn() )
+ {
+ bool bFullRow = ( thisAddress.StartColumn == 0 && thisAddress.EndColumn == MAXCOL );
+ sal_Int32 nCols = thisAddress.EndColumn - thisAddress.StartColumn;
+ sal_Int32 nRows = thisAddress.EndRow - thisAddress.StartRow;
+ if ( mbIsRows || bFullRow || ( nCols >= nRows ) )
mode = sheet::CellDeleteMode_UP;
else
mode = sheet::CellDeleteMode_LEFT;
- RangeHelper thisRange( mxRange );
+ }
uno::Reference< sheet::XCellRangeMovement > xCellRangeMove( thisRange.getSpreadSheet(), uno::UNO_QUERY_THROW );
- xCellRangeMove->removeRange( thisRange.getCellRangeAddressable()->getRangeAddress(), mode );
+ xCellRangeMove->removeRange( thisAddress, mode );
}
@@ -3394,7 +3412,7 @@ ScVbaRange::createEnumeration() throw (uno::RuntimeException)
::rtl::OUString SAL_CALL
ScVbaRange::getDefaultMethodName( ) throw (uno::RuntimeException)
{
- const static rtl::OUString sName( RTL_CONSTASCII_USTRINGPARAM("Cells") );
+ const static rtl::OUString sName( RTL_CONSTASCII_USTRINGPARAM("Item") );
return sName;
}
@@ -3751,7 +3769,7 @@ ScVbaRange::setPageBreak( const uno::Any& _pagebreak) throw (uno::RuntimeExcepti
uno::Reference< frame::XModel > xModel = pShell->GetModel();
if ( xModel.is() )
{
- ScTabViewShell* pViewShell = getBestViewShell( xModel );
+ ScTabViewShell* pViewShell = excel::getBestViewShell( xModel );
if ( nPageBreak == excel::XlPageBreak::xlPageBreakManual )
pViewShell->InsertPageBreak( bColumn, TRUE, &aAddr);
else if ( nPageBreak == excel::XlPageBreak::xlPageBreakNone )
@@ -3881,7 +3899,7 @@ ScVbaRange::ApplicationRange( const uno::Reference< uno::XComponentContext >& xC
if ( Cell1.hasValue() && !Cell2.hasValue() && sRangeName.getLength() )
{
const static rtl::OUString sNamedRanges( RTL_CONSTASCII_USTRINGPARAM("NamedRanges"));
- uno::Reference< beans::XPropertySet > xPropSet( getCurrentDocument(), uno::UNO_QUERY_THROW );
+ uno::Reference< beans::XPropertySet > xPropSet( getCurrentExcelDoc(xContext), uno::UNO_QUERY_THROW );
uno::Reference< container::XNameAccess > xNamed( xPropSet->getPropertyValue( sNamedRanges ), uno::UNO_QUERY_THROW );
uno::Reference< sheet::XCellRangeReferrer > xReferrer;
@@ -3904,7 +3922,7 @@ ScVbaRange::ApplicationRange( const uno::Reference< uno::XComponentContext >& xC
}
}
}
- uno::Reference< sheet::XSpreadsheetView > xView( getCurrentDocument()->getCurrentController(), uno::UNO_QUERY );
+ 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( uno::Reference< XHelperInterface >(), xContext, xSheetRange );
uno::Reference< excel::XRange > xVbSheetRange( pRange );
@@ -4351,8 +4369,10 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
}
void SAL_CALL
-ScVbaRange::Insert( const uno::Any& Shift, const uno::Any& /*CopyOrigin*/ ) throw (uno::RuntimeException)
+ScVbaRange::Insert( const uno::Any& Shift, const uno::Any& CopyOrigin ) throw (uno::RuntimeException)
{
+ sal_Bool bCopyOrigin = sal_True;
+ CopyOrigin >>= bCopyOrigin;
// It appears ( from the web ) that the undocumented CopyOrigin
// param should contain member of enum XlInsertFormatOrigin
// which can have values xlFormatFromLeftOrAbove or xlFormatFromRightOrBelow
@@ -4384,8 +4404,17 @@ ScVbaRange::Insert( const uno::Any& Shift, const uno::Any& /*CopyOrigin*/ ) thro
mode = sheet::CellInsertMode_RIGHT;
}
RangeHelper thisRange( mxRange );
+ table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
uno::Reference< sheet::XCellRangeMovement > xCellRangeMove( thisRange.getSpreadSheet(), uno::UNO_QUERY_THROW );
- xCellRangeMove->insertCells( thisRange.getCellRangeAddressable()->getRangeAddress(), mode );
+ xCellRangeMove->insertCells( thisAddress, mode );
+ if ( bCopyOrigin )
+ {
+ // 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< excel::XRange > xVbaRange( new ScVbaRange( getParent(), mxContext, xRange, mbIsRows, mbIsColumns ) );
+ xVbaRange->PasteSpecial( uno::Any(), uno::Any(), uno::Any(), uno::Any() );
+ }
}
void SAL_CALL
@@ -4720,7 +4749,7 @@ ScVbaRange::PrintOut( const uno::Any& From, const uno::Any& To, const uno::Any&
{
xPrintAreas->setPrintAreas( printAreas );
uno::Reference< frame::XModel > xModel = pShell->GetModel();
- PrintOutHelper( From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName, xModel, sal_True );
+ PrintOutHelper( excel::getBestViewShell( xModel ), From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName, sal_True );
}
}
}
@@ -5034,6 +5063,7 @@ ScVbaRange::getStyle() throw (uno::RuntimeException)
}
uno::Reference< beans::XPropertySet > xProps( mxRange, uno::UNO_QUERY_THROW );
rtl::OUString sStyleName;
+ xProps->getPropertyValue(CELLSTYLE) >>= sStyleName;
ScDocShell* pShell = getScDocShell();
uno::Reference< frame::XModel > xModel( pShell->GetModel() );
uno::Reference< excel::XStyle > xStyle = new ScVbaStyle( this, mxContext, sStyleName, xModel );
diff --git a/sc/source/ui/vba/vbarange.hxx b/sc/source/ui/vba/vbarange.hxx
index abc2f608bb62..1d2d82442be3 100644
--- a/sc/source/ui/vba/vbarange.hxx
+++ b/sc/source/ui/vba/vbarange.hxx
@@ -53,12 +53,15 @@
#include <com/sun/star/sheet/XSpreadsheet.hpp>
#include <com/sun/star/sheet/XSheetCellRangeContainer.hpp>
-//#include "vbahelperinterface.hxx"
+//#include <vbahelper/vbahelperinterface.hxx>
#include "vbaformat.hxx"
+#include <formula/grammar.hxx>
class ScTableSheetsObj;
class ScCellRangesBase;
class ScCellRangeObj;
+class ScDocShell;
+class ScDocument;
//typedef InheritedHelperInterfaceImpl1< ov::excel::XRange > ScVbaRange_BASE;
typedef ScVbaFormat< ov::excel::XRange > ScVbaRange_BASE;
diff --git a/sc/source/ui/vba/vbascrollbar.cxx b/sc/source/ui/vba/vbascrollbar.cxx
deleted file mode 100644
index 3da3230a8761..000000000000
--- a/sc/source/ui/vba/vbascrollbar.cxx
+++ /dev/null
@@ -1,139 +0,0 @@
-/*************************************************************************
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile$
- *
- * $Revision$
- *
- * last change: $Author$ $Date$
- *
- * 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 2005 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
- *
- ************************************************************************/
-#include "vbascrollbar.hxx"
-#include <vector>
-
-using namespace com::sun::star;
-using namespace ooo::vba;
-
-
-const static rtl::OUString LARGECHANGE( RTL_CONSTASCII_USTRINGPARAM("BlockIncrement") );
-const static rtl::OUString SMALLCHANGE( RTL_CONSTASCII_USTRINGPARAM("LineIncrement") );
-const static rtl::OUString ORIENTATION( RTL_CONSTASCII_USTRINGPARAM("Orientation") );
-const static rtl::OUString SCROLLVALUE( RTL_CONSTASCII_USTRINGPARAM("ScrollValue") );
-const static rtl::OUString SCROLLMAX( RTL_CONSTASCII_USTRINGPARAM("ScrollValueMax") );
-const static rtl::OUString SCROLLMIN( RTL_CONSTASCII_USTRINGPARAM("ScrollValueMin") );
-
-ScVbaScrollBar::ScVbaScrollBar( const css::uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ScrollBarImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
-{
-}
-
-// Attributes
-uno::Any SAL_CALL
-ScVbaScrollBar::getValue() throw (css::uno::RuntimeException)
-{
- return m_xProps->getPropertyValue( SCROLLVALUE );
-}
-
-void SAL_CALL
-ScVbaScrollBar::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException)
-{
- m_xProps->setPropertyValue( SCROLLVALUE, _value );
-}
-
-::sal_Int32 SAL_CALL
-ScVbaScrollBar::getMax() throw (uno::RuntimeException)
-{
- sal_Int32 nMax = 0;
- m_xProps->getPropertyValue( SCROLLMAX ) >>= nMax;
- return nMax;
-}
-
-void SAL_CALL
-ScVbaScrollBar::setMax( sal_Int32 nVal ) throw (uno::RuntimeException)
-{
- m_xProps->setPropertyValue( SCROLLMAX, uno::makeAny( nVal ) );
-}
-
-::sal_Int32 SAL_CALL
-ScVbaScrollBar::getMin() throw (uno::RuntimeException)
-{
- sal_Int32 nVal = 0;
- m_xProps->getPropertyValue( SCROLLMIN ) >>= nVal;
- return nVal;
-}
-
-void SAL_CALL
-ScVbaScrollBar::setMin( sal_Int32 nVal ) throw (uno::RuntimeException)
-{
- m_xProps->setPropertyValue( SCROLLMIN, uno::makeAny( nVal ) );
-}
-
-void SAL_CALL
-ScVbaScrollBar::setLargeChange( ::sal_Int32 _largechange ) throw (uno::RuntimeException)
-{
- m_xProps->setPropertyValue( LARGECHANGE, uno::makeAny( _largechange ) );
-}
-
-::sal_Int32 SAL_CALL
-ScVbaScrollBar::getLargeChange() throw (uno::RuntimeException)
-{
- sal_Int32 nVal = 0;
- m_xProps->getPropertyValue( LARGECHANGE ) >>= nVal;
- return nVal;
-}
-
-::sal_Int32 SAL_CALL
-ScVbaScrollBar::getSmallChange() throw (uno::RuntimeException)
-{
- sal_Int32 nSmallChange = 0;
- m_xProps->getPropertyValue( SMALLCHANGE ) >>= nSmallChange;
- return nSmallChange;
-}
-
-void SAL_CALL
-ScVbaScrollBar::setSmallChange( ::sal_Int32 _smallchange ) throw (uno::RuntimeException)
-{
- m_xProps->setPropertyValue( SMALLCHANGE, uno::makeAny( _smallchange ) );
-}
-
-rtl::OUString&
-ScVbaScrollBar::getServiceImplName()
-{
- static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaScrollBar") );
- return sImplName;
-}
-
-uno::Sequence< rtl::OUString >
-ScVbaScrollBar::getServiceNames()
-{
- static uno::Sequence< rtl::OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
- {
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.Frame" ) );
- }
- return aServiceNames;
-}
diff --git a/sc/source/ui/vba/vbascrollbar.hxx b/sc/source/ui/vba/vbascrollbar.hxx
deleted file mode 100644
index 04c4853cdbe4..000000000000
--- a/sc/source/ui/vba/vbascrollbar.hxx
+++ /dev/null
@@ -1,66 +0,0 @@
-/*************************************************************************
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile$
- *
- * $Revision$
- *
- * last change: $Author$ $Date$
- *
- * 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 2005 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
- *
- ************************************************************************/
-#ifndef SC_VBA_SCROLLBAR_HXX
-#define SC_VBA_SCROLLBAR_HXX
-#include <cppuhelper/implbase1.hxx>
-#include <ooo/vba/msforms/XScrollBar.hpp>
-
-#include "vbacontrol.hxx"
-#include "vbahelper.hxx"
-
-typedef cppu::ImplInheritanceHelper1< ScVbaControl, ov::msforms::XScrollBar > ScrollBarImpl_BASE;
-
-class ScVbaScrollBar : public ScrollBarImpl_BASE
-{
-public:
- ScVbaScrollBar( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper );
- // Attributes
- virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
- virtual ::sal_Int32 SAL_CALL getMax() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setMax( ::sal_Int32 _max ) throw (css::uno::RuntimeException);
- virtual ::sal_Int32 SAL_CALL getMin() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setMin( ::sal_Int32 _min ) throw (css::uno::RuntimeException);
- virtual ::sal_Int32 SAL_CALL getLargeChange() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setLargeChange( ::sal_Int32 _largechange ) throw (css::uno::RuntimeException);
- virtual ::sal_Int32 SAL_CALL getSmallChange() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setSmallChange( ::sal_Int32 _smallchange ) throw (css::uno::RuntimeException);
-
-
- //XHelperInterface
- virtual rtl::OUString& getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-};
-#endif //SC_VBA_LABEL_HXX
diff --git a/sc/source/ui/vba/vbaseriescollection.hxx b/sc/source/ui/vba/vbaseriescollection.hxx
index ccd544fe4f26..48ec78025d79 100644
--- a/sc/source/ui/vba/vbaseriescollection.hxx
+++ b/sc/source/ui/vba/vbaseriescollection.hxx
@@ -31,9 +31,9 @@
#define SC_VBA_SERIESCOLLECTION_HXX
#include <ooo/vba/excel/XSeriesCollection.hpp>
-#include "vbahelperinterface.hxx"
-#include "vbacollectionimpl.hxx"
-#include "vbahelper.hxx"
+#include <vbahelper/vbahelperinterface.hxx>
+#include <vbahelper/vbacollectionimpl.hxx>
+#include "excelvbahelper.hxx"
typedef CollTestImplHelper< ov::excel::XSeriesCollection > SeriesCollection_BASE;
diff --git a/sc/source/ui/vba/vbashape.cxx b/sc/source/ui/vba/vbashape.cxx
deleted file mode 100644
index 7b81682cb393..000000000000
--- a/sc/source/ui/vba/vbashape.cxx
+++ /dev/null
@@ -1,480 +0,0 @@
-/*************************************************************************
- *
- * 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: vbashape.cxx,v $
- * $Revision: 1.4 $
- *
- * 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<ooo/vba/office/MsoZOrderCmd.hpp>
-#include<ooo/vba/office/MsoScaleFrom.hpp>
-#include<com/sun/star/container/XNamed.hpp>
-#include<com/sun/star/drawing/ConnectorType.hpp>
-#include <com/sun/star/lang/XEventListener.hpp>
-#include<com/sun/star/drawing/XDrawPagesSupplier.hpp>
-#include<com/sun/star/drawing/XDrawPages.hpp>
-
-#include <vos/mutex.hxx>
-#include <vcl/svapp.hxx>
-#include <svx/unopage.hxx>
-#include <svx/unoshape.hxx>
-
-#include "vbashape.hxx"
-#include "vbatextframe.hxx"
-#include "vbalineformat.hxx"
-#include "vbafillformat.hxx"
-#include "vbapictureformat.hxx"
-
-using namespace ::ooo::vba;
-using namespace ::com::sun::star;
-using namespace ::vos;
-
-ScVbaShape::ScVbaShape( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape >& xShape, const uno::Reference< drawing::XShapes >& xShapes, sal_Int32 nType ) throw( lang::IllegalArgumentException ) : ScVbaShape_BASE( xParent, xContext ), m_xShape( xShape ), m_xShapes( xShapes ), m_nType( nType )
-{
- m_xPropertySet.set( m_xShape, uno::UNO_QUERY_THROW );
- addListeners();
-}
-
-ScVbaShape::ScVbaShape( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape >& xShape ) throw( lang::IllegalArgumentException ) : ScVbaShape_BASE( uno::Reference< XHelperInterface >(), xContext ), m_xShape( xShape )
-{
- // add listener
- addListeners();
-}
-
-ScVbaShape::~ScVbaShape()
-{
- // dtor must never ever throw
- try
- {
- removeShapeListener();
- removeShapesListener();
- }
- catch( uno::Exception& )
- {
- }
-}
-
-void SAL_CALL
-ScVbaShape::disposing( const lang::EventObject& rEventObject ) throw( uno::RuntimeException )
-{
- uno::Reference< drawing::XShapes > xShapes( rEventObject.Source, uno::UNO_QUERY );
- uno::Reference< drawing::XShape > xShape( rEventObject.Source, uno::UNO_QUERY );
- if ( xShapes.is() )
- removeShapesListener();
- if ( xShape.is() )
- removeShapeListener();
-}
-
-
-void ScVbaShape::addListeners()
-{
- uno::Reference< lang::XComponent > xComponent( m_xShape, uno::UNO_QUERY );
- if ( xComponent.is() )
- xComponent->addEventListener( this );
-
- xComponent.set( m_xShapes, uno::UNO_QUERY );
- if ( xComponent.is() )
- xComponent->addEventListener( this );
-}
-
-void
-ScVbaShape::removeShapeListener() throw( uno::RuntimeException )
-{
- if( m_xShape.is() )
- {
- uno::Reference< lang::XComponent > xComponent( m_xShape, uno::UNO_QUERY_THROW );
- xComponent->removeEventListener( this );
- }
- m_xShape = NULL;
- m_xPropertySet = NULL;
-}
-
-void
-ScVbaShape::removeShapesListener() throw( uno::RuntimeException )
-{
- if( m_xShapes.is() )
- {
- uno::Reference< lang::XComponent > xComponent( m_xShapes, uno::UNO_QUERY_THROW );
- xComponent->removeEventListener( this );
- }
- m_xShapes = NULL;
-}
-
-sal_Int32
-ScVbaShape::getType( const css::uno::Reference< drawing::XShape > xShape ) throw (uno::RuntimeException)
-{
- rtl::OUString sShapeType;
- uno::Reference< drawing::XShapeDescriptor > xShapeDescriptor( xShape, uno::UNO_QUERY_THROW );
- sShapeType = xShapeDescriptor->getShapeType();
- // office::MsoShapeType::msoDiagram to "com.sun.star.drawing.GroupShape"
- if( sShapeType.equals( rtl::OUString::createFromAscii( "com.sun.star.drawing.GroupShape" ) ) )
- return office::MsoShapeType::msoGroup;
- else if( sShapeType.equals( rtl::OUString::createFromAscii( "com.sun.star.drawing.GraphicObjectShape" ) ) )
- return office::MsoShapeType::msoPicture;
- else if( sShapeType.equals( rtl::OUString::createFromAscii( "com.sun.star.drawing.ControlShape" ) ) )
- return office::MsoShapeType::msoOLEControlObject;
- // OOo don't support office::MsoShapeType::msoComment as a Shape.
- else if( sShapeType.equals( rtl::OUString::createFromAscii( "com.sun.star.drawing.OLE2Shape" ) ) )
- return office::MsoShapeType::msoChart;
- // Art characters office::MsoShapeType::msoTextEffect, in OOo corresponding to "com.sun.star.drawing.CustomShape"
- else if( sShapeType.equals( rtl::OUString::createFromAscii( "com.sun.star.drawing.ConnectorShape" ) ) )
- {
- enum drawing::ConnectorType connectorType;
- uno::Reference< beans::XPropertySet > xPropertySet( xShape, uno::UNO_QUERY_THROW );
- xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("EdgeKind")) >>= connectorType;
- if( connectorType == drawing::ConnectorType_CURVE )
- return office::MsoShapeType::msoFreeform;
- else if( connectorType == drawing::ConnectorType_LINE )
- return office::MsoShapeType::msoLine;
- else
- return office::MsoShapeType::msoAutoShape;
- }
- else if( sShapeType.equals( rtl::OUString::createFromAscii( "com.sun.star.drawing.LineShape" ) ) )
- return office::MsoShapeType::msoLine;
- else if( sShapeType.equals( rtl::OUString::createFromAscii( "com.sun.star.drawing.CustomShape" ) ) ||
- sShapeType.equals( rtl::OUString::createFromAscii( "com.sun.star.drawing.RectangleShape") ) )
- return office::MsoShapeType::msoAutoShape;
- else
- throw uno::RuntimeException( rtl::OUString::createFromAscii( "the shape type do not be surppored: " ) + sShapeType, uno::Reference< uno::XInterface >() );
-}
-
-// Attributes
-rtl::OUString SAL_CALL
-ScVbaShape::getName() throw (uno::RuntimeException)
-{
- rtl::OUString sName;
- uno::Reference< container::XNamed > xNamed( m_xShape, uno::UNO_QUERY_THROW );
- sName = xNamed->getName();
- return sName;
-}
-
-void SAL_CALL
-ScVbaShape::setName( const rtl::OUString& _name ) throw (uno::RuntimeException)
-{
- uno::Reference< container::XNamed > xNamed( m_xShape, uno::UNO_QUERY_THROW );
- xNamed->setName( _name );
-}
-
-double SAL_CALL
-ScVbaShape::getHeight() throw (uno::RuntimeException)
-{
- return Millimeter::getInPoints( m_xShape->getSize().Height );
-}
-
-void SAL_CALL
-ScVbaShape::setHeight( double _height ) throw (uno::RuntimeException)
-{
- awt::Size aSize( m_xShape->getSize() );
- aSize.Height = Millimeter::getInHundredthsOfOneMillimeter( _height );
- m_xShape->setSize( aSize );
-}
-
-double SAL_CALL
-ScVbaShape::getWidth() throw (uno::RuntimeException)
-{
- return Millimeter::getInPoints( m_xShape->getSize().Width );
-}
-
-void SAL_CALL
-ScVbaShape::setWidth( double _width ) throw (uno::RuntimeException)
-{
- awt::Size aSize( m_xShape->getSize() );
- aSize.Width = Millimeter::getInHundredthsOfOneMillimeter( _width );
- m_xShape->setSize( aSize );
-}
-
-double SAL_CALL
-ScVbaShape::getLeft() throw (uno::RuntimeException)
-{
- return Millimeter::getInPoints( m_xShape->getPosition().X );
-}
-
-void SAL_CALL
-ScVbaShape::setLeft( double _left ) throw (uno::RuntimeException)
-{
- awt::Point oldPosition;
- oldPosition = m_xShape->getPosition();
- oldPosition.X = Millimeter::getInHundredthsOfOneMillimeter( _left );
- m_xShape->setPosition( oldPosition );
-}
-
-double SAL_CALL
-ScVbaShape::getTop() throw (uno::RuntimeException)
-{
- return Millimeter::getInPoints( m_xShape->getPosition().Y );
-}
-
-void SAL_CALL
-ScVbaShape::setTop( double _top ) throw (uno::RuntimeException)
-{
- awt::Point oldPosition;
- oldPosition = m_xShape->getPosition();
- oldPosition.Y = Millimeter::getInHundredthsOfOneMillimeter( _top );
- m_xShape->setPosition( oldPosition );
-}
-
-sal_Bool SAL_CALL
-ScVbaShape::getVisible() throw (uno::RuntimeException)
-{
- //UNO Shapes are always visible
- return sal_True;
-}
-
-void SAL_CALL
-ScVbaShape::setVisible( sal_Bool /*_visible*/ ) throw (uno::RuntimeException)
-{
- //UNO Shapes are always visible
-}
-
-sal_Int32 SAL_CALL
-ScVbaShape::getZOrderPosition() throw (uno::RuntimeException)
-{
- sal_Int32 nZOrderPosition = 0;
- uno::Any aZOrderPosition = m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii( "ZOrder" ) );
- aZOrderPosition >>= nZOrderPosition;
- return nZOrderPosition + 1;
-}
-
-sal_Int32 SAL_CALL
-ScVbaShape::getType() throw (uno::RuntimeException)
-{
- return m_nType;
-}
-
-double SAL_CALL
-ScVbaShape::getRotation() throw (uno::RuntimeException)
-{
- double dRotation = 0;
- sal_Int32 nRotation = 0;
- m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii( "RotateAngle" ) ) >>= nRotation;
- dRotation = static_cast< double >( nRotation /100 );
- return dRotation;
-}
-
-void SAL_CALL
-ScVbaShape::setRotation( double _rotation ) throw (uno::RuntimeException)
-{
- sal_Int32 nRotation = static_cast < sal_Int32 > ( _rotation * 100 );
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "RotateAngle" ), uno::makeAny( nRotation ) );
-}
-
-uno::Reference< msforms::XLineFormat > SAL_CALL
-ScVbaShape::getLine() throw (uno::RuntimeException)
-{
- // TODO should ongly return line
- return uno::Reference< msforms::XLineFormat >( new ScVbaLineFormat( this, mxContext, m_xShape ) );
-}
-
-uno::Reference< msforms::XFillFormat > SAL_CALL
-ScVbaShape::getFill() throw (uno::RuntimeException)
-{
- return uno::Reference< msforms::XFillFormat >( new ScVbaFillFormat( this, mxContext, m_xShape ) );
-}
-
-uno::Reference< msforms::XPictureFormat > SAL_CALL
-ScVbaShape::getPictureFormat() throw (uno::RuntimeException)
-{
- return uno::Reference< msforms::XPictureFormat >( new ScVbaPictureFormat( this, mxContext, m_xShape ) );
-}
-
-// Methods
-uno::Reference< excel::XTextFrame > SAL_CALL
-ScVbaShape::TextFrame() throw (uno::RuntimeException)
-{
- return uno::Reference< excel::XTextFrame >(new ScVbaTextFrame( getParent(), mxContext, m_xShape ) );
-}
-
-void SAL_CALL
-ScVbaShape::Delete() throw (uno::RuntimeException)
-{
- OGuard aGuard( Application::GetSolarMutex() );
- m_xShapes->remove( m_xShape );
-}
-
-void SAL_CALL
-ScVbaShape::ZOrder( sal_Int32 ZOrderCmd ) throw (uno::RuntimeException)
-{
- sal_Int32 nOrderPositon;
- uno::Any aOrderPostion = m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii( "ZOrder" ) );
- aOrderPostion >>= nOrderPositon;
- switch( ZOrderCmd )
- {
- case office::MsoZOrderCmd::msoBringToFront:
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "ZOrder" ), uno::makeAny( SAL_MAX_INT32 ) );
- break;
- case office::MsoZOrderCmd::msoSendToBack:
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "ZOrder" ), uno::makeAny( (sal_Int32)0 ) );
- break;
- case office::MsoZOrderCmd::msoBringForward:
- nOrderPositon += 1;
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "ZOrder" ), uno::makeAny( nOrderPositon ) );
- break;
- case office::MsoZOrderCmd::msoSendBackward:
- if( nOrderPositon > 0 )
- {
- nOrderPositon -= 1;
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "ZOrder" ), uno::makeAny( nOrderPositon ) );
- }
- break;
- // below two commands use with Writer for text and image object.
- case office::MsoZOrderCmd::msoBringInFrontOfText:
- case office::MsoZOrderCmd::msoSendBehindText:
- throw uno::RuntimeException( rtl::OUString::createFromAscii( "This ZOrderCmd is not implemented, it is use with writer." ), uno::Reference< uno::XInterface >() );
- default:
- throw uno::RuntimeException( rtl::OUString::createFromAscii( "Invalid Parameter." ), uno::Reference< uno::XInterface >() );
- }
-}
-
-void SAL_CALL
-ScVbaShape::IncrementRotation( double Increment ) throw (uno::RuntimeException)
-{
- double nCurrentRotation = getRotation();
- nCurrentRotation += Increment;
- setRotation(nCurrentRotation);
-}
-
-void SAL_CALL
-ScVbaShape::IncrementLeft( double Increment ) throw (uno::RuntimeException)
-{
- double nCurrentLeft = getLeft();
- nCurrentLeft += Increment;
- setLeft(nCurrentLeft);
-}
-
-void SAL_CALL
-ScVbaShape::IncrementTop( double Increment ) throw (uno::RuntimeException)
-{
- double nCurrentTop = getTop();
- nCurrentTop += Increment;
- setTop(nCurrentTop);
-}
-
-void SAL_CALL
-ScVbaShape::ScaleHeight( double Factor, sal_Bool /*RelativeToOriginalSize*/, sal_Int32 Scale ) throw (uno::RuntimeException)
-{
- double nHeight = getHeight();
- double nNewHeight = nHeight * Factor;
- if( Scale == office::MsoScaleFrom::msoScaleFromTopLeft )
- {
- setHeight(nNewHeight);
- }
- else if( Scale == office::MsoScaleFrom::msoScaleFromBottomRight )
- {
- double nDeltaHeight = nNewHeight - nHeight;
- double nNewTop = getTop() - nDeltaHeight;
- setTop(nNewTop);
- setHeight(nNewHeight);
- }
- else if( Scale == office::MsoScaleFrom::msoScaleFromMiddle )
- {
- double nDeltaHeight = (nNewHeight - nHeight) / 2;
- double nNewTop = getTop() - nDeltaHeight;
- setTop(nNewTop);
- setHeight(nNewHeight);
- }
- else
- {
- throw uno::RuntimeException( rtl::OUString::createFromAscii( "ScaleHeight.Scale wrong value is given." ) , uno::Reference< uno::XInterface >() );
- }
-}
-
-void SAL_CALL
-ScVbaShape::ScaleWidth( double Factor, sal_Bool /*RelativeToOriginalSize*/, sal_Int32 Scale ) throw (uno::RuntimeException)
-{
- double nWidth = getWidth();
- double nNewWidth = nWidth * Factor;
- if( Scale == office::MsoScaleFrom::msoScaleFromTopLeft )
- {
- setWidth(nNewWidth);
- }
- else if( Scale == office::MsoScaleFrom::msoScaleFromBottomRight )
- {
- double nDeltaWidth = nNewWidth - nWidth;
- double nNewLeft = getLeft() - nDeltaWidth;
- setLeft(nNewLeft);
- setWidth(nNewWidth);
- }
- else if( Scale == office::MsoScaleFrom::msoScaleFromMiddle )
- {
- double nDeltaWidth = (nNewWidth - nWidth) / 2;
- double nNewLeft = getLeft() - nDeltaWidth;
- setLeft(nNewLeft);
- setWidth(nNewWidth);
- }
- else
- {
- throw uno::RuntimeException( rtl::OUString::createFromAscii( "ScaleHeight.Scale wrong value is given." ) , uno::Reference< uno::XInterface >() );
- }
-}
-
-void SAL_CALL
-ScVbaShape::Select( const uno::Any& /*Replace*/ ) throw ( uno::RuntimeException )
-{
- uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
- uno::Reference< view::XSelectionSupplier > xSelectSupp( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
- xSelectSupp->select( uno::makeAny( m_xShape ) );
-}
-
-// This method should not be part of Shape, what we reall need to do is...
-// dynamically create the appropriate objects e.g. TextBox, Oval, Picture etc.
-// ( e.g. the ones that really do have ShapeRange as an attribute )
-#include "vbashaperange.hxx"
-
-uno::Any SAL_CALL
-ScVbaShape::ShapeRange( const uno::Any& index ) throw ( uno::RuntimeException )
-{
- // perhaps we should store a reference to the Shapes Collection
- // in this class
- // but anyway this method should not even be in this class
- // #TODO not sure what the parent of the Shapes collection should be
-
- XNamedObjectCollectionHelper< drawing::XShape >::XNamedVec aVec;
- aVec.push_back( m_xShape );
- uno::Reference< container::XIndexAccess > xIndexAccess( new XNamedObjectCollectionHelper< drawing::XShape >( aVec ) );
- uno::Reference< container::XChild > xChild( m_xShape, uno::UNO_QUERY_THROW );
- // #FIXME for want of a better parent, setting this
- uno::Reference< msforms::XShapeRange > xShapeRange( new ScVbaShapeRange( mxParent, mxContext, xIndexAccess, uno::Reference< drawing::XDrawPage >( xChild->getParent(), uno::UNO_QUERY_THROW ) ) );
- if ( index.hasValue() )
- return xShapeRange->Item( index, uno::Any() );
- return uno::makeAny( xShapeRange );
-}
-
-rtl::OUString&
-ScVbaShape::getServiceImplName()
-{
- static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaShape") );
- return sImplName;
-}
-
-uno::Sequence< rtl::OUString >
-ScVbaShape::getServiceNames()
-{
- static uno::Sequence< rtl::OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
- {
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msform.Shape" ) );
- }
- return aServiceNames;
-}
diff --git a/sc/source/ui/vba/vbashape.hxx b/sc/source/ui/vba/vbashape.hxx
deleted file mode 100644
index 5ae35500381d..000000000000
--- a/sc/source/ui/vba/vbashape.hxx
+++ /dev/null
@@ -1,108 +0,0 @@
-/*************************************************************************
- *
- * 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: vbashape.hxx,v $
- * $Revision: 1.3 $
- *
- * 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_SHAPE_HXX
-#define SC_VBA_SHAPE_HXX
-
-#include <ooo/vba/office/MsoShapeType.hpp>
-#include <com/sun/star/drawing/XShape.hpp>
-#include <com/sun/star/drawing/XShapes.hpp>
-#include <com/sun/star/lang/XEventListener.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <ooo/vba/msforms/XShape.hpp>
-#include <ooo/vba/msforms/XLineFormat.hpp>
-#include <cppuhelper/implbase2.hxx>
-
-#include "vbahelperinterface.hxx"
-
-typedef ::cppu::WeakImplHelper2< ov::msforms::XShape, css::lang::XEventListener > ListeningShape;
-
-typedef InheritedHelperInterfaceImpl< ListeningShape > ScVbaShape_BASE;
-
-class ScVbaShape : public ScVbaShape_BASE
-{
-friend class ConcreteXShapeHelper; // perhaps an accessor would be better
-private:
-protected:
- css::uno::Reference< css::drawing::XShape > m_xShape;
- css::uno::Reference< css::drawing::XShapes > m_xShapes;
- css::uno::Reference< css::beans::XPropertySet > m_xPropertySet;
- sal_Int32 m_nType;
- css::uno::Any m_aRange;
- virtual void addListeners();
- virtual void removeShapeListener() throw( css::uno::RuntimeException );
- virtual void removeShapesListener() throw( css::uno::RuntimeException );
- virtual rtl::OUString& getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-public:
- ScVbaShape( 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< css::drawing::XShapes >& xShapes, sal_Int32 nType ) throw ( css::lang::IllegalArgumentException );
- ScVbaShape( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& xShape ) throw ( css::lang::IllegalArgumentException );
- virtual ~ScVbaShape();
- css::uno::Any getRange() { return m_aRange; };
- void setRange( css::uno::Any aRange ) { m_aRange = aRange; };
-
- static sal_Int32 getType( const css::uno::Reference< css::drawing::XShape > xShape ) throw (css::uno::RuntimeException);
-
- // Attributes
- virtual rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setName( const rtl::OUString& _name ) throw (css::uno::RuntimeException);
- virtual double SAL_CALL getHeight() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setHeight( double _height ) throw (css::uno::RuntimeException);
- virtual double SAL_CALL getWidth() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setWidth( double _width ) throw (css::uno::RuntimeException);
- virtual double SAL_CALL getLeft() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setLeft( double _left ) throw (css::uno::RuntimeException);
- virtual double SAL_CALL getTop() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setTop( double _top ) throw (css::uno::RuntimeException);
- virtual sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setVisible( sal_Bool _visible ) throw (css::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getZOrderPosition() throw (css::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getType() throw (css::uno::RuntimeException);
- virtual double SAL_CALL getRotation() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setRotation( double _rotation ) throw (css::uno::RuntimeException);
- virtual css::uno::Reference< ov::msforms::XLineFormat > SAL_CALL getLine() throw (css::uno::RuntimeException);
- virtual css::uno::Reference< ov::msforms::XFillFormat > SAL_CALL getFill() throw (css::uno::RuntimeException);
- virtual css::uno::Reference< ov::msforms::XPictureFormat > SAL_CALL getPictureFormat() throw (css::uno::RuntimeException);
-
- // Methods
- virtual css::uno::Reference< ov::excel::XTextFrame > SAL_CALL TextFrame( ) throw (css::uno::RuntimeException);
- virtual void SAL_CALL Delete() throw (css::uno::RuntimeException);
- virtual void SAL_CALL ZOrder( sal_Int32 ZOrderCmd ) throw (css::uno::RuntimeException);
- virtual void SAL_CALL IncrementRotation( double Increment ) throw (css::uno::RuntimeException);
- virtual void SAL_CALL IncrementLeft( double Increment ) throw (css::uno::RuntimeException);
- virtual void SAL_CALL IncrementTop( double Increment ) throw (css::uno::RuntimeException);
- virtual void SAL_CALL ScaleHeight( double Factor, sal_Bool RelativeToOriginalSize, sal_Int32 Scale ) throw (css::uno::RuntimeException);
- virtual void SAL_CALL ScaleWidth( double Factor, sal_Bool RelativeToOriginalSize, sal_Int32 Scale ) throw (css::uno::RuntimeException);
- // Replace??
- virtual void SAL_CALL Select( const css::uno::Any& Replace ) throw (css::uno::RuntimeException);
- virtual css::uno::Any SAL_CALL ShapeRange( const css::uno::Any& index ) throw ( css::uno::RuntimeException );
- // XEventListener
- virtual void SAL_CALL disposing( const css::lang::EventObject& rEventObject ) throw( css::uno::RuntimeException );
-};
-#endif//SC_VBA_SHAPE_HXX
diff --git a/sc/source/ui/vba/vbashaperange.cxx b/sc/source/ui/vba/vbashaperange.cxx
deleted file mode 100644
index 2298c65bae6f..000000000000
--- a/sc/source/ui/vba/vbashaperange.cxx
+++ /dev/null
@@ -1,170 +0,0 @@
-/*************************************************************************
- *
- * 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: vbashaperange.cxx,v $
- * $Revision: 1.3 $
- *
- * 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 <com/sun/star/drawing/XShapeGrouper.hpp>
-#include <com/sun/star/drawing/XDrawPage.hpp>
-
-#include "vbashaperange.hxx"
-#include "vbashape.hxx"
-
-using namespace ::ooo::vba;
-using namespace ::com::sun::star;
-
-class VbShapeRangeEnumHelper : public EnumerationHelper_BASE
-{
- uno::Reference< XCollection > m_xParent;
- uno::Reference<container::XIndexAccess > m_xIndexAccess;
- sal_Int32 nIndex;
-public:
- VbShapeRangeEnumHelper( const uno::Reference< XCollection >& xParent, const uno::Reference< container::XIndexAccess >& xIndexAccess ) : m_xParent( xParent ), m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {}
- virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException)
- {
- return ( nIndex < m_xIndexAccess->getCount() );
- }
- virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
- {
- ScVbaShapeRange* pCollectionImpl = dynamic_cast< ScVbaShapeRange* >(m_xParent.get());
- if ( pCollectionImpl && hasMoreElements() )
- return pCollectionImpl->createCollectionObject( m_xIndexAccess->getByIndex( nIndex++ ) );
- throw container::NoSuchElementException();
- }
-
-};
-
-ScVbaShapeRange::ScVbaShapeRange( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess >& xShapes, const uno::Reference< drawing::XDrawPage >& xDrawPage ) : ScVbaShapeRange_BASE( xParent, xContext, xShapes ), m_xDrawPage( xDrawPage ), m_nShapeGroupCount(0)
-{
-}
-
-// Methods
-void SAL_CALL
-ScVbaShapeRange::Select( ) throw (uno::RuntimeException)
-{
- uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
- uno::Reference< view::XSelectionSupplier > xSelectSupp( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
- xSelectSupp->select( uno::makeAny( getShapes() ) );
-}
-
-uno::Reference< msforms::XShape > SAL_CALL
-ScVbaShapeRange::Group() throw (uno::RuntimeException)
-{
- uno::Reference< drawing::XShapeGrouper > xShapeGrouper( m_xDrawPage, uno::UNO_QUERY_THROW );
- uno::Reference< drawing::XShapeGroup > xShapeGroup( xShapeGrouper->group( getShapes() ), uno::UNO_QUERY_THROW );
- uno::Reference< drawing::XShape > xShape( xShapeGroup, uno::UNO_QUERY_THROW );
- return uno::Reference< msforms::XShape >( new ScVbaShape( getParent(), mxContext, xShape, getShapes(), office::MsoShapeType::msoGroup ) );
-}
-
-uno::Reference< drawing::XShapes >
-ScVbaShapeRange::getShapes() throw (uno::RuntimeException)
-{
- if ( !m_xShapes.is() )
- {
- uno::Reference< lang::XMultiServiceFactory > xMSF( mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
- m_xShapes.set( xMSF->createInstance( rtl::OUString::createFromAscii( "com.sun.star.drawing.ShapeCollection" ) ), uno::UNO_QUERY_THROW );
- sal_Int32 nLen = m_xIndexAccess->getCount();
- for ( sal_Int32 index = 0; index < nLen; ++index )
- m_xShapes->add( uno::Reference< drawing::XShape >( m_xIndexAccess->getByIndex( index ), uno::UNO_QUERY_THROW ) );
-
- }
- return m_xShapes;
-}
-
-
-void SAL_CALL
-ScVbaShapeRange::IncrementRotation( double Increment ) throw (uno::RuntimeException)
-{
- sal_Int32 nLen = getCount();
- for ( sal_Int32 index = 1; index <= nLen; ++index )
- {
- uno::Reference< msforms::XShape > xShape( Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
- xShape->IncrementRotation( Increment );
- }
-}
-
-void SAL_CALL
-ScVbaShapeRange::IncrementLeft( double Increment ) throw (uno::RuntimeException)
-{
- sal_Int32 nLen = getCount();
- for ( sal_Int32 index = 1; index <= nLen; ++index )
- {
- uno::Reference< msforms::XShape > xShape( Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
- xShape->IncrementLeft( Increment );
- }
-}
-
-void SAL_CALL
-ScVbaShapeRange::IncrementTop( double Increment ) throw (uno::RuntimeException)
-{
- sal_Int32 nLen = getCount();
- for ( sal_Int32 index = 1; index <= nLen; ++index )
- {
- uno::Reference< msforms::XShape > xShape( Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
- xShape->IncrementTop( Increment );
- }
-}
-
-uno::Type SAL_CALL
-ScVbaShapeRange::getElementType() throw (uno::RuntimeException)
-{
- return msforms::XShape::static_type(0);
-}
-
-uno::Reference< container::XEnumeration > SAL_CALL
-ScVbaShapeRange::createEnumeration() throw (uno::RuntimeException)
-{
- return new VbShapeRangeEnumHelper( this, m_xIndexAccess );
-}
-
-uno::Any
-ScVbaShapeRange:: createCollectionObject( const css::uno::Any& aSource )
-{
- uno::Reference< drawing::XShape > xShape( aSource, uno::UNO_QUERY_THROW );
- // #TODO #FIXME Shape parent should always be the sheet the shapes belong
- // to
- uno::Reference< msforms::XShape > xVbShape( new ScVbaShape( uno::Reference< XHelperInterface >(), mxContext, xShape, getShapes(), ScVbaShape::getType( xShape ) ) );
- return uno::makeAny( xVbShape );
-}
-
-rtl::OUString&
-ScVbaShapeRange::getServiceImplName()
-{
- static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaShapeRange") );
- return sImplName;
-}
-
-uno::Sequence< rtl::OUString >
-ScVbaShapeRange::getServiceNames()
-{
- static uno::Sequence< rtl::OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
- {
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msform.ShapeRange" ) );
- }
- return aServiceNames;
-}
diff --git a/sc/source/ui/vba/vbashaperange.hxx b/sc/source/ui/vba/vbashaperange.hxx
deleted file mode 100644
index 27915d559e85..000000000000
--- a/sc/source/ui/vba/vbashaperange.hxx
+++ /dev/null
@@ -1,66 +0,0 @@
-/*************************************************************************
- *
- * 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: vbashaperange.hxx,v $
- * $Revision: 1.3 $
- *
- * 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_SHAPERANGE_HXX
-#define SC_VBA_SHAPERANGE_HXX
-
-#include <com/sun/star/drawing/XShapes.hpp>
-#include <ooo/vba/msforms/XShapeRange.hpp>
-
-#include "vbacollectionimpl.hxx"
-
-typedef CollTestImplHelper< ov::msforms::XShapeRange > ScVbaShapeRange_BASE;
-
-class ScVbaShapeRange : public ScVbaShapeRange_BASE
-{
-private:
- css::uno::Reference< css::drawing::XDrawPage > m_xDrawPage;
- css::uno::Reference< css::drawing::XShapes > m_xShapes;
- sal_Int32 m_nShapeGroupCount;
-protected:
- virtual rtl::OUString& getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
- css::uno::Reference< css::drawing::XShapes > getShapes() throw (css::uno::RuntimeException) ;
-public:
- ScVbaShapeRange( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xShapes, const css::uno::Reference< css::drawing::XDrawPage>& xDrawShape );
-
- // Methods
- virtual void SAL_CALL Select( ) throw (css::uno::RuntimeException);
- virtual css::uno::Reference< ::ooo::vba::msforms::XShape > SAL_CALL Group() throw (css::uno::RuntimeException);
- virtual void SAL_CALL IncrementRotation( double Increment ) throw (css::uno::RuntimeException);
- virtual void SAL_CALL IncrementLeft( double Increment ) throw (css::uno::RuntimeException) ;
- virtual void SAL_CALL IncrementTop( double Increment ) 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);
- // ScVbaCollectionBaseImpl
- virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
-};
-
-#endif//SC_VBA_SHAPERANGE_HXX
diff --git a/sc/source/ui/vba/vbashapes.cxx b/sc/source/ui/vba/vbashapes.cxx
deleted file mode 100644
index 8aac090d0337..000000000000
--- a/sc/source/ui/vba/vbashapes.cxx
+++ /dev/null
@@ -1,394 +0,0 @@
-/*************************************************************************
- *
- * 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: vbashapes.cxx,v $
- * $Revision: 1.3.32.1 $
- *
- * 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 <com/sun/star/container/XNamed.hpp>
-#include <com/sun/star/view/XSelectionSupplier.hpp>
-#include <com/sun/star/text/WrapTextMode.hpp>
-#include <ooo/vba/msforms/XShapeRange.hpp>
-#include <ooo/vba/office/MsoAutoShapeType.hpp>
-
-#include "vbashapes.hxx"
-#include "vbashape.hxx"
-#include "vbashaperange.hxx"
-
-using namespace ::ooo::vba;
-using namespace ::com::sun::star;
-
-class VbShapeEnumHelper : public EnumerationHelper_BASE
-{
- uno::Reference<msforms::XShapes > m_xParent;
- uno::Reference<container::XIndexAccess > m_xIndexAccess;
- sal_Int32 nIndex;
-public:
- VbShapeEnumHelper( const uno::Reference< msforms::XShapes >& xParent, const uno::Reference< container::XIndexAccess >& xIndexAccess ) : m_xParent( xParent ), m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {}
- virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException)
- {
- return ( nIndex < m_xIndexAccess->getCount() );
- }
- virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
- {
- ScVbaShapes* pShapes = dynamic_cast< ScVbaShapes* >(m_xParent.get());
- if ( pShapes && hasMoreElements() )
- return pShapes->createCollectionObject( m_xIndexAccess->getByIndex( nIndex++ ) );
- throw container::NoSuchElementException();
- }
-
-};
-
-void ScVbaShapes::initBaseCollection()
-{
- if ( m_xNameAccess.is() ) // already has NameAccess
- return;
- // no NameAccess then use ShapeCollectionHelper
- XNamedObjectCollectionHelper< drawing::XShape >::XNamedVec mShapes;
- sal_Int32 nLen = m_xIndexAccess->getCount();
- mShapes.reserve( nLen );
- for ( sal_Int32 index=0; index<nLen; ++index )
- mShapes.push_back( uno::Reference< drawing::XShape >( m_xIndexAccess->getByIndex( index ) , uno::UNO_QUERY ) );
- uno::Reference< container::XIndexAccess > xShapes( new XNamedObjectCollectionHelper< drawing::XShape >( mShapes ) );
- m_xIndexAccess.set( xShapes, uno::UNO_QUERY );
- m_xNameAccess.set( xShapes, uno::UNO_QUERY );
-}
-
-ScVbaShapes::ScVbaShapes( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess > xShapes ): ScVbaShapes_BASE( xParent, xContext, xShapes ), m_nNewShapeCount(0)
-{
- m_xShapes.set( xShapes, uno::UNO_QUERY_THROW );
- m_xDrawPage.set( xShapes, uno::UNO_QUERY_THROW );
- initBaseCollection();
-}
-
-uno::Reference< container::XEnumeration >
-ScVbaShapes::createEnumeration() throw (uno::RuntimeException)
-{
- return new VbShapeEnumHelper( this, m_xIndexAccess );
-}
-
-uno::Any
-ScVbaShapes::createCollectionObject( const css::uno::Any& aSource )
-{
- if( aSource.hasValue() )
- {
- uno::Reference< drawing::XShape > xShape( aSource, uno::UNO_QUERY_THROW );
- return uno::makeAny( uno::Reference< msforms::XShape >( new ScVbaShape( getParent(), mxContext, xShape, m_xShapes, ScVbaShape::getType( xShape ) ) ) );
- }
- return uno::Any();
-}
-
-uno::Type
-ScVbaShapes::getElementType() throw (uno::RuntimeException)
-{
- return ooo::vba::msforms::XShape::static_type(0);
-}
-rtl::OUString&
-ScVbaShapes::getServiceImplName()
-{
- static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaShapes") );
- return sImplName;
-}
-
-uno::Sequence< rtl::OUString >
-ScVbaShapes::getServiceNames()
-{
- static uno::Sequence< rtl::OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
- {
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msform.Shapes" ) );
- }
- return aServiceNames;
-}
-
-css::uno::Reference< css::container::XIndexAccess >
-ScVbaShapes::getShapesByArrayIndices( const uno::Any& Index ) throw (uno::RuntimeException)
-{
- if ( Index.getValueTypeClass() != uno::TypeClass_SEQUENCE )
- throw uno::RuntimeException();
-
- uno::Reference< script::XTypeConverter > xConverter = getTypeConverter(mxContext);
- uno::Any aConverted;
- aConverted = xConverter->convertTo( Index, getCppuType((uno::Sequence< uno::Any >*)0) );
-
- uno::Sequence< uno::Any > sIndices;
- aConverted >>= sIndices;
- XNamedObjectCollectionHelper< drawing::XShape >::XNamedVec mShapes;
- sal_Int32 nElems = sIndices.getLength();
- for( sal_Int32 index = 0; index < nElems; ++index )
- {
- uno::Reference< drawing::XShape > xShape;
- if ( sIndices[ index ].getValueTypeClass() == uno::TypeClass_STRING )
- {
- rtl::OUString sName;
- sIndices[ index ] >>= sName;
- xShape.set( m_xNameAccess->getByName( sName ), uno::UNO_QUERY );
- }
- else
- {
- sal_Int32 nIndex = 0;
- sIndices[ index ] >>= nIndex;
- // adjust for 1 based mso indexing
- xShape.set( m_xIndexAccess->getByIndex( nIndex - 1 ), uno::UNO_QUERY );
-
- }
- // populate map with drawing::XShapes
- if ( xShape.is() )
- mShapes.push_back( xShape );
- }
- uno::Reference< container::XIndexAccess > xIndexAccess( new XNamedObjectCollectionHelper< drawing::XShape >( mShapes ) );
- return xIndexAccess;
-}
-
-uno::Any SAL_CALL
-ScVbaShapes::Item( const uno::Any& Index, const uno::Any& Index2 ) throw (uno::RuntimeException)
-{
- // I don't think we need to support Array of indices for shapes
-/*
- if ( Index.getValueTypeClass() == uno::TypeClass_SEQUENCE )
- {
- uno::Reference< container::XIndexAccess > xIndexAccess( getShapesByArrayIndices( Index ) );
- // return new collection instance
- uno::Reference< XCollection > xShapesCollection( new ScVbaShapes( this->getParent(), mxContext, xIndexAccess ) );
- return uno::makeAny( xShapesCollection );
- }
-*/
- return ScVbaShapes_BASE::Item( Index, Index2 );
-}
-
-uno::Reference< msforms::XShapeRange > SAL_CALL
-ScVbaShapes::Range( const uno::Any& shapes ) throw (css::uno::RuntimeException)
-{
- // shapes, can be an index or an array of indices
- uno::Reference< container::XIndexAccess > xShapes;
- if ( shapes.getValueTypeClass() == uno::TypeClass_SEQUENCE )
- xShapes = getShapesByArrayIndices( shapes );
- else
- {
- // wrap single index into a sequence
- uno::Sequence< uno::Any > sIndices(1);
- sIndices[ 0 ] = shapes;
- uno::Any aIndex;
- aIndex <<= sIndices;
- xShapes = getShapesByArrayIndices( aIndex );
- }
- return new ScVbaShapeRange( getParent(), mxContext, xShapes, m_xDrawPage );
-}
-
-void SAL_CALL
-ScVbaShapes::SelectAll() throw (uno::RuntimeException)
-{
- uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
- uno::Reference< view::XSelectionSupplier > xSelectSupp( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
- try
- {
- xSelectSupp->select( uno::makeAny( m_xShapes ) );
- }
- // viewuno.cxx ScTabViewObj::select will throw IllegalArgumentException
- // if one of the shapes is no 'markable' e.g. a button
- // the method still works
- catch( lang::IllegalArgumentException& )
- {
- }
-}
-
-uno::Reference< drawing::XShape >
-ScVbaShapes::createShape( rtl::OUString service ) throw (css::uno::RuntimeException)
-{
- uno::Reference< lang::XMultiServiceFactory > xMSF( getCurrentDocument(), uno::UNO_QUERY_THROW );
- uno::Reference< drawing::XShape > xShape( xMSF->createInstance( service ), uno::UNO_QUERY_THROW );
- return xShape;
-}
-
-uno::Any
-ScVbaShapes::AddRectangle( sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth, sal_Int32 nLineHeight, uno::Any aRange ) throw (css::uno::RuntimeException)
-{
- rtl::OUString sCreateShapeName( rtl::OUString::createFromAscii( "com.sun.star.drawing.RectangleShape" ) );
- sal_Int32 nXPos = Millimeter::getInHundredthsOfOneMillimeter( startX );
- sal_Int32 nYPos = Millimeter::getInHundredthsOfOneMillimeter( startY );
- sal_Int32 nWidth = Millimeter::getInHundredthsOfOneMillimeter( nLineWidth );
- sal_Int32 nHeight = Millimeter::getInHundredthsOfOneMillimeter( nLineHeight );
-
- uno::Reference< drawing::XShape > xShape( createShape( sCreateShapeName ), uno::UNO_QUERY_THROW );
- m_xShapes->add( xShape );
-
- rtl::OUString sName = createName( rtl::OUString::createFromAscii( "Rectangle" ) );
- setDefaultShapeProperties( xShape );
- setShape_NameProperty( xShape, sName );
-
- awt::Point aMovePositionIfRange(0, 0);
- awt::Point position;
- position.X = nXPos - aMovePositionIfRange.X;
- position.Y = nYPos - aMovePositionIfRange.Y;
- xShape->setPosition( position );
-
- awt::Size size;
- size.Height = nHeight;
- size.Width = nWidth;
- xShape->setSize( size );
-
- ScVbaShape *pScVbaShape = new ScVbaShape( getParent(), mxContext, xShape, m_xShapes, ScVbaShape::getType( xShape ) );
- pScVbaShape->setRange( aRange );
- return uno::makeAny( uno::Reference< msforms::XShape > ( pScVbaShape ) );
-}
-
-uno::Any
-ScVbaShapes::AddEllipse( sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth, sal_Int32 nLineHeight, uno::Any aRange ) throw (css::uno::RuntimeException)
-{
- rtl::OUString sCreateShapeName( rtl::OUString::createFromAscii( "com.sun.star.drawing.EllipseShape" ) );
- sal_Int32 nXPos = Millimeter::getInHundredthsOfOneMillimeter( startX );
- sal_Int32 nYPos = Millimeter::getInHundredthsOfOneMillimeter( startY );
- sal_Int32 nWidth = Millimeter::getInHundredthsOfOneMillimeter( nLineWidth );
- sal_Int32 nHeight = Millimeter::getInHundredthsOfOneMillimeter( nLineHeight );
-
- uno::Reference< drawing::XShape > xShape( createShape( sCreateShapeName ), uno::UNO_QUERY_THROW );
- m_xShapes->add( xShape );
-
- awt::Point aMovePositionIfRange( 0, 0 );
- //TODO helperapi using a writer document
- /*
- XDocument xDocument = (XDocument)getParent();
- if (AnyConverter.isVoid(_aRange))
- {
- _aRange = xDocument.Range(new Integer(0), new Integer(1));
- // Top&Left in Word is Top&Left of the paper and not the writeable area.
- aMovePositionIfRange = calculateTopLeftMargin((HelperInterfaceAdaptor)xDocument);
- }
-
- setShape_AnchorTypeAndRangeProperty(xShape, _aRange);
- */
- rtl::OUString name = createName( rtl::OUString::createFromAscii( "Oval" ));
- setDefaultShapeProperties(xShape);
- setShape_NameProperty(xShape, name);
-
- awt::Point position;
- position.X = nXPos - aMovePositionIfRange.X;
- position.Y = nYPos - aMovePositionIfRange.Y;
- xShape->setPosition(position);
-
- awt::Size size;
- size.Height = nHeight;
- size.Width = nWidth;
- xShape->setSize(size);
-
- ScVbaShape *pScVbaShape = new ScVbaShape( getParent(), mxContext, xShape, m_xShapes, ScVbaShape::getType( xShape ) );
- pScVbaShape->setRange( aRange );
- return uno::makeAny( uno::Reference< msforms::XShape > ( pScVbaShape ) );
-}
-
-//helpeapi calc
-uno::Any SAL_CALL
-ScVbaShapes::AddLine( sal_Int32 StartX, sal_Int32 StartY, sal_Int32 endX, sal_Int32 endY ) throw (uno::RuntimeException)
-{
- sal_Int32 nLineWidth = endX - StartX;
- sal_Int32 nLineHeight = endY - StartY;
-
- sal_Int32 nHeight = Millimeter::getInHundredthsOfOneMillimeter( nLineHeight );
- sal_Int32 nWidth = Millimeter::getInHundredthsOfOneMillimeter( nLineWidth );
- sal_Int32 nXPos = Millimeter::getInHundredthsOfOneMillimeter( StartX );
- sal_Int32 nYPos = Millimeter::getInHundredthsOfOneMillimeter( StartY );
-
- uno::Reference< drawing::XShape > xShape( createShape( rtl::OUString::createFromAscii("com.sun.star.drawing.LineShape") ), uno::UNO_QUERY_THROW );
- m_xShapes->add( xShape );
-
- awt::Point aMovePositionIfRange( 0, 0 );
-
- rtl::OUString name = createName( rtl::OUString::createFromAscii( "Line" ) );
- setDefaultShapeProperties(xShape);
- setShape_NameProperty(xShape, name);
-
- awt::Point position;
- position.X = nXPos - aMovePositionIfRange.X;
- position.Y = nYPos - aMovePositionIfRange.Y;
- xShape->setPosition(position);
-
- awt::Size size;
- size.Height = nHeight;
- size.Width = nWidth;
- xShape->setSize(size);
-
- ScVbaShape *pScVbaShape = new ScVbaShape( getParent(), mxContext, xShape, m_xShapes, ScVbaShape::getType( xShape ) );
- return uno::makeAny( uno::Reference< msforms::XShape > ( pScVbaShape ) );
-}
-
-uno::Any SAL_CALL
-ScVbaShapes::AddShape( sal_Int32 _nType, sal_Int32 _nLeft, sal_Int32 _nTop, sal_Int32 _nWidth, sal_Int32 _nHeight ) throw (uno::RuntimeException)
-{
- uno::Any _aAnchor;
- if (_nType == office::MsoAutoShapeType::msoShapeRectangle)
- {
- return AddRectangle(_nLeft, _nTop, _nWidth, _nHeight, _aAnchor);
- }
- else if (_nType == office::MsoAutoShapeType::msoShapeOval)
- {
- return AddEllipse(_nLeft, _nTop, _nWidth, _nHeight, _aAnchor);
- }
- return uno::Any();
-}
-
-void
-ScVbaShapes::setDefaultShapeProperties( uno::Reference< drawing::XShape > xShape ) throw (uno::RuntimeException)
-{
- uno::Reference< beans::XPropertySet > xPropertySet( xShape, uno::UNO_QUERY_THROW );
- xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "FillStyle" ), uno::makeAny( rtl::OUString::createFromAscii( "SOLID" ) ) );
- xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "FillColor"), uno::makeAny( sal_Int32(0xFFFFFF) ) );
- xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "TextWordWrap"), uno::makeAny( text::WrapTextMode_THROUGHT ) );
- //not find in OOo2.3
- //xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "Opaque"), uno::makeAny( sal_True ) );
-}
-
-void
-ScVbaShapes::setShape_NameProperty( uno::Reference< css::drawing::XShape > xShape, rtl::OUString sName )
-{
- uno::Reference< beans::XPropertySet > xPropertySet( xShape, uno::UNO_QUERY_THROW );
- try
- {
- xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "Name" ), uno::makeAny( sName ) );
- }
- catch( script::BasicErrorException e )
- {
- }
-}
-
-rtl::OUString
-ScVbaShapes::createName( rtl::OUString sName )
-{
- sal_Int32 nActNumber = 1 + m_nNewShapeCount;
- m_nNewShapeCount++;
- sName += rtl::OUString::valueOf( nActNumber );
- return sName;
-}
-
-#if 0
-//TODO helperapi using a writer document
-awt::Point
-calculateTopLeftMargin( uno::Reference< XHelperInterface > xDocument )
-{
- awt::Point aPoint( 0, 0 );
- uno::Reference< frame::XModel > xModel( xDocument, uno::UNO_QUERY_THROW );
- return awt::Point();
-}
-#endif
diff --git a/sc/source/ui/vba/vbashapes.hxx b/sc/source/ui/vba/vbashapes.hxx
deleted file mode 100644
index 94f68ff6718b..000000000000
--- a/sc/source/ui/vba/vbashapes.hxx
+++ /dev/null
@@ -1,80 +0,0 @@
-/*************************************************************************
- *
- * 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: vbashapes.hxx,v $
- * $Revision: 1.3.32.1 $
- *
- * 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_SHAPES_HXX
-#define SC_VBA_SHAPES_HXX
-
-#include <com/sun/star/drawing/XShapes.hpp>
-#include <com/sun/star/drawing/XDrawPage.hpp>
-#include <com/sun/star/container/XIndexAccess.hpp>
-#include <ooo/vba/msforms/XShapes.hpp>
-
-#include "vbahelperinterface.hxx"
-
-#include "vbacollectionimpl.hxx"
-
-typedef CollTestImplHelper< ov::msforms::XShapes > ScVbaShapes_BASE;
-
-class ScVbaShapes : public ScVbaShapes_BASE
-{
-private:
- css::uno::Reference< css::drawing::XShapes > m_xShapes;
- css::uno::Reference< css::drawing::XDrawPage > m_xDrawPage;
- sal_Int32 m_nNewShapeCount;
- void initBaseCollection();
-protected:
- virtual rtl::OUString& getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
- virtual css::uno::Reference< css::container::XIndexAccess > getShapesByArrayIndices( const css::uno::Any& Index ) throw (css::uno::RuntimeException);
- css::uno::Reference< css::drawing::XShape > createShape( rtl::OUString service ) throw (css::uno::RuntimeException);
- css::uno::Any AddRectangle( sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth, sal_Int32 nLineHeight, css::uno::Any aRange ) throw (css::uno::RuntimeException);
- css::uno::Any AddEllipse( sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth, sal_Int32 nLineHeight, css::uno::Any aRange ) throw (css::uno::RuntimeException);
- rtl::OUString createName( rtl::OUString sName );
- //TODO helperapi using a writer document
- //css::awt::Point calculateTopLeftMargin( css::uno::Reference< ov::XHelperInterface > xDocument );
-
-public:
- ScVbaShapes( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess > xShapes );
- static void setDefaultShapeProperties( css::uno::Reference< css::drawing::XShape > xShape ) throw (css::uno::RuntimeException);
- static void setShape_NameProperty( css::uno::Reference< css::drawing::XShape > xShape, rtl::OUString sName );
- //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 void SAL_CALL SelectAll() throw (css::uno::RuntimeException);
- //helper::calc
- virtual css::uno::Any SAL_CALL AddLine( sal_Int32 StartX, sal_Int32 StartY, sal_Int32 endX, sal_Int32 endY ) throw (css::uno::RuntimeException);
- virtual css::uno::Any SAL_CALL AddShape( sal_Int32 _nType, sal_Int32 _nLeft, sal_Int32 _nTop, sal_Int32 _nWidth, sal_Int32 _nHeight ) throw (css::uno::RuntimeException);
- virtual css::uno::Reference< ov::msforms::XShapeRange > SAL_CALL Range( const css::uno::Any& shapes ) throw (css::uno::RuntimeException);
- // ScVbaCollectionBaseImpl
- virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
- virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index1, const css::uno::Any& Index2 ) throw (css::uno::RuntimeException);
-};
-
-#endif//SC_VBA_SHAPES_HXX
diff --git a/sc/source/ui/vba/vbaspinbutton.cxx b/sc/source/ui/vba/vbaspinbutton.cxx
deleted file mode 100644
index c9da8cf8827c..000000000000
--- a/sc/source/ui/vba/vbaspinbutton.cxx
+++ /dev/null
@@ -1,109 +0,0 @@
-/*************************************************************************
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile$
- *
- * $Revision$
- *
- * last change: $Author$ $Date$
- *
- * 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 2005 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
- *
- ************************************************************************/
-#include "vbaspinbutton.hxx"
-#include <vector>
-
-using namespace com::sun::star;
-using namespace ooo::vba;
-
-
-const static rtl::OUString ORIENTATION( RTL_CONSTASCII_USTRINGPARAM("Orientation") );
-const static rtl::OUString SPINVALUE( RTL_CONSTASCII_USTRINGPARAM("SpinValue") );
-const static rtl::OUString SPINMAX( RTL_CONSTASCII_USTRINGPARAM("SpinValueMax") );
-const static rtl::OUString SPINMIN( RTL_CONSTASCII_USTRINGPARAM("SpinValueMin") );
-
-ScVbaSpinButton::ScVbaSpinButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : SpinButtonImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
-{
-}
-
-// Attributes
-uno::Any SAL_CALL
-ScVbaSpinButton::getValue() throw (css::uno::RuntimeException)
-{
- return m_xProps->getPropertyValue( SPINVALUE );
-}
-
-void SAL_CALL
-ScVbaSpinButton::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::RuntimeException)
-{
- m_xProps->setPropertyValue( SPINVALUE, _value );
-}
-
-::sal_Int32 SAL_CALL
-ScVbaSpinButton::getMax() throw (uno::RuntimeException)
-{
- sal_Int32 nMax = 0;
- m_xProps->getPropertyValue( SPINMAX ) >>= nMax;
- return nMax;
-}
-
-void SAL_CALL
-ScVbaSpinButton::setMax( sal_Int32 nVal ) throw (uno::RuntimeException)
-{
- m_xProps->setPropertyValue( SPINMAX, uno::makeAny( nVal ) );
-}
-
-::sal_Int32 SAL_CALL
-ScVbaSpinButton::getMin() throw (uno::RuntimeException)
-{
- sal_Int32 nVal = 0;
- m_xProps->getPropertyValue( SPINMIN ) >>= nVal;
- return nVal;
-}
-
-void SAL_CALL
-ScVbaSpinButton::setMin( sal_Int32 nVal ) throw (uno::RuntimeException)
-{
- m_xProps->setPropertyValue( SPINMIN, uno::makeAny( nVal ) );
-}
-
-rtl::OUString&
-ScVbaSpinButton::getServiceImplName()
-{
- static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaSpinButton") );
- return sImplName;
-}
-
-uno::Sequence< rtl::OUString >
-ScVbaSpinButton::getServiceNames()
-{
- static uno::Sequence< rtl::OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
- {
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.Frame" ) );
- }
- return aServiceNames;
-}
diff --git a/sc/source/ui/vba/vbaspinbutton.hxx b/sc/source/ui/vba/vbaspinbutton.hxx
deleted file mode 100644
index 338d71f34dec..000000000000
--- a/sc/source/ui/vba/vbaspinbutton.hxx
+++ /dev/null
@@ -1,61 +0,0 @@
-/*************************************************************************
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile$
- *
- * $Revision$
- *
- * last change: $Author$ $Date$
- *
- * 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 2005 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
- *
- ************************************************************************/
-#ifndef SC_VBA_SPINBUTTON_HXX
-#define SC_VBA_SPINBUTTON_HXX
-#include <cppuhelper/implbase1.hxx>
-#include <ooo/vba/msforms/XSpinButton.hpp>
-
-#include "vbacontrol.hxx"
-#include "vbahelper.hxx"
-
-typedef cppu::ImplInheritanceHelper1< ScVbaControl, ov::msforms::XSpinButton > SpinButtonImpl_BASE;
-
-class ScVbaSpinButton : public SpinButtonImpl_BASE
-{
-public:
- ScVbaSpinButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper );
- // Attributes
- virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
- virtual ::sal_Int32 SAL_CALL getMax() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setMax( ::sal_Int32 _max ) throw (css::uno::RuntimeException);
- virtual ::sal_Int32 SAL_CALL getMin() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setMin( ::sal_Int32 _min ) throw (css::uno::RuntimeException);
-
- //XHelperInterface
- virtual rtl::OUString& getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-};
-#endif //SC_VBA_SPINBUTTON_HXX
diff --git a/sc/source/ui/vba/vbastyle.cxx b/sc/source/ui/vba/vbastyle.cxx
index fbcfb0b97f65..8b7731c2d358 100644
--- a/sc/source/ui/vba/vbastyle.cxx
+++ b/sc/source/ui/vba/vbastyle.cxx
@@ -71,7 +71,7 @@ void ScVbaStyle::initialise() throw ( uno::RuntimeException )
}
-ScVbaStyle::ScVbaStyle( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const rtl::OUString& sStyleName, const uno::Reference< frame::XModel >& _xModel ) throw ( script::BasicErrorException, uno::RuntimeException ) : ScVbaStyle_BASE( xParent, xContext, lcl_getStyleProps( sStyleName, _xModel ), _xModel, false )
+ScVbaStyle::ScVbaStyle( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const rtl::OUString& sStyleName, const uno::Reference< frame::XModel >& _xModel ) throw ( script::BasicErrorException, uno::RuntimeException ) : ScVbaStyle_BASE( xParent, xContext, lcl_getStyleProps( sStyleName, _xModel ), _xModel, false ), mxModel( _xModel )
{
try
{
@@ -83,7 +83,7 @@ ScVbaStyle::ScVbaStyle( const uno::Reference< ov::XHelperInterface >& xParent, c
}
}
-ScVbaStyle::ScVbaStyle( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet, const uno::Reference< frame::XModel >& _xModel ) throw ( script::BasicErrorException, uno::RuntimeException ) : ScVbaStyle_BASE( xParent, xContext, _xPropertySet, _xModel, false )
+ScVbaStyle::ScVbaStyle( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet, const uno::Reference< frame::XModel >& _xModel ) throw ( script::BasicErrorException, uno::RuntimeException ) : ScVbaStyle_BASE( xParent, xContext, _xPropertySet, _xModel, false ), mxModel( _xModel )
{
try
{
diff --git a/sc/source/ui/vba/vbastyles.cxx b/sc/source/ui/vba/vbastyles.cxx
index 18111fc5eae7..6cb35d19a67e 100644
--- a/sc/source/ui/vba/vbastyles.cxx
+++ b/sc/source/ui/vba/vbastyles.cxx
@@ -29,6 +29,7 @@
************************************************************************/
#include "vbastyles.hxx"
#include "vbastyle.hxx"
+#include <ooo/vba/excel/XRange.hpp>
using namespace ::ooo::vba;
using namespace ::com::sun::star;
diff --git a/sc/source/ui/vba/vbastyles.hxx b/sc/source/ui/vba/vbastyles.hxx
index 4ad8980fe201..1e238a9d1c13 100644
--- a/sc/source/ui/vba/vbastyles.hxx
+++ b/sc/source/ui/vba/vbastyles.hxx
@@ -31,7 +31,7 @@
#define SC_VBA_STYLES_HXX
#include <ooo/vba/excel/XStyles.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
-#include "vbacollectionimpl.hxx"
+#include <vbahelper/vbacollectionimpl.hxx>
typedef CollTestImplHelper< ov::excel::XStyles > ScVbaStyles_BASE;
class ScVbaStyles: public ScVbaStyles_BASE
diff --git a/sc/source/ui/vba/vbatextbox.cxx b/sc/source/ui/vba/vbatextbox.cxx
deleted file mode 100644
index f6574550c0c9..000000000000
--- a/sc/source/ui/vba/vbatextbox.cxx
+++ /dev/null
@@ -1,137 +0,0 @@
-/*************************************************************************
- *
- * 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: vbatextbox.cxx,v $
- * $Revision: 1.3 $
- *
- * 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 <com/sun/star/text/XTextRange.hpp>
-
-#include "vbatextbox.hxx"
-#include <vector>
-
-using namespace com::sun::star;
-using namespace ooo::vba;
-
-
-
-ScVbaTextBox::ScVbaTextBox( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper, bool bDialog ) : TextBoxImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper ), mbDialog( bDialog )
-{
-}
-
-// Attributes
-uno::Any SAL_CALL
-ScVbaTextBox::getValue() throw (css::uno::RuntimeException)
-{
- return uno::makeAny( getText() );
-}
-
-void SAL_CALL
-ScVbaTextBox::setValue( const uno::Any& _value ) throw (css::uno::RuntimeException)
-{
- rtl::OUString sVal = getAnyAsString( _value );
- setText( sVal );
-}
-
-//getString() will cause some imfo lose.
-rtl::OUString SAL_CALL
-ScVbaTextBox::getText() throw (css::uno::RuntimeException)
-{
- uno::Any aValue;
- aValue = m_xProps->getPropertyValue
- (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Text" ) ) );
- rtl::OUString sString;
- aValue >>= sString;
- return sString;
-}
-
-void SAL_CALL
-ScVbaTextBox::setText( const rtl::OUString& _text ) throw (css::uno::RuntimeException)
-{
- if ( !mbDialog )
- {
- uno::Reference< text::XTextRange > xTextRange( m_xProps, uno::UNO_QUERY_THROW );
- xTextRange->setString( _text );
-}
- else
- m_xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Text") ), uno::makeAny( _text ) );
-}
-
-sal_Int32 SAL_CALL
-ScVbaTextBox::getMaxLength() throw (css::uno::RuntimeException)
-{
- uno::Any aValue;
- aValue = m_xProps->getPropertyValue
- (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MaxTextLen" ) ) );
- sal_Int32 nMaxLength = 0;
- aValue >>= nMaxLength;
- return nMaxLength;
-}
-
-void SAL_CALL
-ScVbaTextBox::setMaxLength( sal_Int32 _maxlength ) throw (css::uno::RuntimeException)
-{
- uno::Any aValue( _maxlength );
- m_xProps->setPropertyValue
- (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MaxTextLen" ) ), aValue);
-}
-
-sal_Bool SAL_CALL
-ScVbaTextBox::getMultiline() throw (css::uno::RuntimeException)
-{
- uno::Any aValue;
- aValue = m_xProps->getPropertyValue
- (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MultiLine" ) ) );
- sal_Bool bRet = false;
- aValue >>= bRet;
- return bRet;
-}
-
-void SAL_CALL
-ScVbaTextBox::setMultiline( sal_Bool _multiline ) throw (css::uno::RuntimeException)
-{
- uno::Any aValue( _multiline );
- m_xProps->setPropertyValue
- (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MultiLine" ) ), aValue);
-}
-
-rtl::OUString&
-ScVbaTextBox::getServiceImplName()
-{
- static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaTextBox") );
- return sImplName;
-}
-
-uno::Sequence< rtl::OUString >
-ScVbaTextBox::getServiceNames()
-{
- static uno::Sequence< rtl::OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
- {
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.TextBox" ) );
- }
- return aServiceNames;
-}
diff --git a/sc/source/ui/vba/vbatextbox.hxx b/sc/source/ui/vba/vbatextbox.hxx
deleted file mode 100644
index b9d22ced414c..000000000000
--- a/sc/source/ui/vba/vbatextbox.hxx
+++ /dev/null
@@ -1,57 +0,0 @@
-/*************************************************************************
- *
- * 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: vbatextbox.hxx,v $
- * $Revision: 1.3 $
- *
- * 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_TEXTBOX_HXX
-#define SC_VBA_TEXTBOX_HXX
-#include <cppuhelper/implbase1.hxx>
-#include <ooo/vba/msforms/XTextBox.hpp>
-#include "vbacontrol.hxx"
-#include "vbahelper.hxx"
-
-typedef cppu::ImplInheritanceHelper1< ScVbaControl, ov::msforms::XTextBox > TextBoxImpl_BASE;
-
-class ScVbaTextBox : public TextBoxImpl_BASE
-{
- bool mbDialog;
-public:
- ScVbaTextBox( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper, bool bDialog = false );
- // Attributes
- virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
- virtual rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setText( const rtl::OUString& _text ) throw (css::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getMaxLength() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setMaxLength( sal_Int32 _maxlength ) throw (css::uno::RuntimeException);
- virtual sal_Bool SAL_CALL getMultiline() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setMultiline( sal_Bool _multiline ) throw (css::uno::RuntimeException);
- //XHelperInterface
- virtual rtl::OUString& getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-};
-#endif //SC_VBA_TEXTBOX_HXX
diff --git a/sc/source/ui/vba/vbatextboxshape.cxx b/sc/source/ui/vba/vbatextboxshape.cxx
index 82af63e5754e..b8148e129220 100644
--- a/sc/source/ui/vba/vbatextboxshape.cxx
+++ b/sc/source/ui/vba/vbatextboxshape.cxx
@@ -41,7 +41,7 @@
using namespace com::sun::star;
using namespace ooo::vba;
-ScVbaTextBoxShape::ScVbaTextBoxShape( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape >& xShape, const uno::Reference< drawing::XShapes >& xShapes, const uno::Reference< frame::XModel >& xModel ) : TextBoxShapeImpl_BASE( uno::Reference< XHelperInterface >(), xContext, xShape, xShapes, ScVbaShape::getType( xShape ) )
+ScVbaTextBoxShape::ScVbaTextBoxShape( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape >& xShape, const uno::Reference< drawing::XShapes >& xShapes, const uno::Reference< frame::XModel >& xModel ) : TextBoxShapeImpl_BASE( uno::Reference< XHelperInterface >(), xContext, xShape, xShapes, xModel, ScVbaShape::getType( xShape ) )
{
m_xTextRange.set( xShape , uno::UNO_QUERY_THROW );
m_xModel.set( xModel );
@@ -62,7 +62,7 @@ ScVbaTextBoxShape::setText( const rtl::OUString& _text ) throw (css::uno::Runtim
uno::Reference< excel::XCharacters > SAL_CALL
ScVbaTextBoxShape::characters( const uno::Any& Start, const uno::Any& Length ) throw (uno::RuntimeException)
{
- ScDocShell* pDocShell = getDocShell( m_xModel );
+ ScDocShell* pDocShell = excel::getDocShell( m_xModel );
ScDocument* pDoc = pDocShell ? pDocShell->GetDocument() : NULL;
if ( !pDoc )
diff --git a/sc/source/ui/vba/vbatextboxshape.hxx b/sc/source/ui/vba/vbatextboxshape.hxx
index c8c79b626069..733849e6be12 100644
--- a/sc/source/ui/vba/vbatextboxshape.hxx
+++ b/sc/source/ui/vba/vbatextboxshape.hxx
@@ -37,8 +37,8 @@
#include <cppuhelper/implbase1.hxx>
#include <com/sun/star/text/XTextRange.hpp>
#include <ooo/vba/msforms/XTextBoxShape.hpp>
-#include "vbashape.hxx"
-#include "vbahelper.hxx"
+#include <vbahelper/vbashape.hxx>
+#include "excelvbahelper.hxx"
#include "vbacharacters.hxx"
typedef cppu::ImplInheritanceHelper1< ScVbaShape, ov::msforms::XTextBoxShape > TextBoxShapeImpl_BASE;
diff --git a/sc/source/ui/vba/vbatextframe.cxx b/sc/source/ui/vba/vbatextframe.cxx
index f66d83c22c2d..81a8f0b5654c 100644
--- a/sc/source/ui/vba/vbatextframe.cxx
+++ b/sc/source/ui/vba/vbatextframe.cxx
@@ -27,6 +27,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
+#include <vbahelper/helperdecl.hxx>
#include <com/sun/star/drawing/TextFitToSizeType.hpp>
#include <com/sun/star/text/XText.hpp>
#include "vbatextframe.hxx"
@@ -35,121 +36,19 @@
using namespace ::ooo::vba;
using namespace ::com::sun::star;
-ScVbaTextFrame::ScVbaTextFrame( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, uno::Reference< drawing::XShape > xShape ) : ScVbaTextFrame_BASE( xParent, xContext ), m_xShape( xShape )
+ScVbaTextFrame::ScVbaTextFrame( uno::Sequence< uno::Any> const & args, uno::Reference< uno::XComponentContext> const & xContext ) throw ( lang::IllegalArgumentException ) : ScVbaTextFrame_BASE( getXSomethingFromArgs< XHelperInterface >( args, 0 ), xContext, getXSomethingFromArgs< drawing::XShape >( args, 1, false ) )
{
- m_xPropertySet.set( m_xShape, uno::UNO_QUERY_THROW );
}
-void
-ScVbaTextFrame::setAsMSObehavior()
-{
- //set property TextWordWrap default as False.
- // TextFitToSize control the text content. it seems we should set the default as False.
- // com.sun.star.drawing.TextFitToSizeType.NONE
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "TextWordWrap" ), uno::makeAny( sal_False ) );
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "TextFitToSize" ), uno::makeAny( drawing::TextFitToSizeType_NONE ) );
-}
-
-sal_Int32 ScVbaTextFrame::getMargin( rtl::OUString sMarginType )
-{
- sal_Int32 nMargin = 0;
- uno::Any aMargin = m_xPropertySet->getPropertyValue( sMarginType );
- aMargin >>= nMargin;
- return nMargin;
-}
-
-void ScVbaTextFrame::setMargin( rtl::OUString sMarginType, float fMargin )
-{
- sal_Int32 nMargin = Millimeter::getInHundredthsOfOneMillimeter( fMargin );
- m_xPropertySet->setPropertyValue( sMarginType, uno::makeAny( nMargin ) );
-}
-
-// Attributes
-sal_Bool SAL_CALL
-ScVbaTextFrame::getAutoSize() throw (uno::RuntimeException)
-{
- // I don't know why, but in OOo, TextAutoGrowHeight is the property control autosize. not TextFitToSize.
- // TextFitToSize control the text content.
- // and in mso, there isnot option TextWordWrap which means auto wrap. the default is False.
- sal_Bool bAutosize = sal_False;
- uno::Any aTextAutoGrowHeight = m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii( "TextAutoGrowHeight" ) );
- aTextAutoGrowHeight >>= bAutosize;
- return bAutosize;
-}
-
-void SAL_CALL
-ScVbaTextFrame::setAutoSize( sal_Bool _autosize ) throw (uno::RuntimeException)
-{
- setAsMSObehavior();
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "TextAutoGrowHeight" ), uno::makeAny( _autosize ) );
-}
-
-float SAL_CALL
-ScVbaTextFrame::getMarginBottom() throw (uno::RuntimeException)
-{
- sal_Int32 nMargin = getMargin( rtl::OUString::createFromAscii( "TextLowerDistance" ) );
- float fMargin = (float)Millimeter::getInPoints( nMargin );
- return fMargin;
-}
-
-void SAL_CALL
-ScVbaTextFrame::setMarginBottom( float _marginbottom ) throw (uno::RuntimeException)
-{
- setMargin( rtl::OUString::createFromAscii( "TextLowerDistance" ), _marginbottom );
-}
-
-float SAL_CALL
-ScVbaTextFrame::getMarginTop() throw (uno::RuntimeException)
-{
- sal_Int32 nMargin = getMargin( rtl::OUString::createFromAscii( "TextUpperDistance" ) );
- float fMargin = (float)Millimeter::getInPoints( nMargin );
- return fMargin;
-}
-
-void SAL_CALL
-ScVbaTextFrame::setMarginTop( float _margintop ) throw (uno::RuntimeException)
-{
- setMargin( rtl::OUString::createFromAscii( "TextUpperDistance" ), _margintop );
-}
-
-float SAL_CALL
-ScVbaTextFrame::getMarginLeft() throw (uno::RuntimeException)
-{
- sal_Int32 nMargin = getMargin( rtl::OUString::createFromAscii( "TextLeftDistance" ) );
- float fMargin = (float)Millimeter::getInPoints( nMargin );
- return fMargin;
-}
-
-void SAL_CALL
-ScVbaTextFrame::setMarginLeft( float _marginleft ) throw (uno::RuntimeException)
-{
- setMargin( rtl::OUString::createFromAscii( "TextLeftDistance" ), _marginleft );
-}
-
-float SAL_CALL
-ScVbaTextFrame::getMarginRight() throw (uno::RuntimeException)
-{
- sal_Int32 nMargin = getMargin( rtl::OUString::createFromAscii( "TextRightDistance" ) );
- float fMargin = (float)Millimeter::getInPoints( nMargin );
- return fMargin;
-}
-
-void SAL_CALL
-ScVbaTextFrame::setMarginRight( float _marginright ) throw (uno::RuntimeException)
-{
- setMargin( rtl::OUString::createFromAscii( "TextRightDistance" ), _marginright );
-}
-
-
// Methods
-uno::Reference< ov::excel::XCharacters > SAL_CALL
+uno::Any SAL_CALL
ScVbaTextFrame::Characters() throw (uno::RuntimeException)
{
uno::Reference< text::XSimpleText > xSimpleText( m_xShape, uno::UNO_QUERY_THROW );
ScVbaPalette aPalette( SfxObjectShell::Current() );
uno::Any aStart( sal_Int32( 1 ) );
uno::Any aLength(sal_Int32( -1 ) );
- return uno::Reference< ov::excel::XCharacters >( new ScVbaCharacters( this, mxContext, aPalette, xSimpleText, aStart, aLength, sal_True ) );
+ return uno::makeAny( uno::Reference< ov::excel::XCharacters >( new ScVbaCharacters( this, mxContext, aPalette, xSimpleText, aStart, aLength, sal_True ) ) );
}
rtl::OUString&
@@ -171,3 +70,12 @@ ScVbaTextFrame::getServiceNames()
return aServiceNames;
}
+namespace textframe
+{
+namespace sdecl = comphelper::service_decl;
+sdecl::vba_service_class_<ScVbaTextFrame, sdecl::with_args<true> > serviceImpl;
+extern sdecl::ServiceDecl const serviceDecl(
+ serviceImpl,
+ "ScVbaTextFrame",
+ "ooo.vba.excel.TextFrame" );
+}
diff --git a/sc/source/ui/vba/vbatextframe.hxx b/sc/source/ui/vba/vbatextframe.hxx
index 6bb75551c00c..8aa85f34be09 100644
--- a/sc/source/ui/vba/vbatextframe.hxx
+++ b/sc/source/ui/vba/vbatextframe.hxx
@@ -29,45 +29,23 @@
************************************************************************/
#ifndef SC_VBA_TEXTFRAME_HXX
#define SC_VBA_TEXTFRAME_HXX
-#include <com/sun/star/drawing/XShape.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <ooo/vba/excel/XCharacters.hpp>
#include <ooo/vba/excel/XTextFrame.hpp>
+#include <vbahelper/vbahelperinterface.hxx>
+#include <vbahelper/vbatextframe.hxx>
-#include "vbahelperinterface.hxx"
-#include "vbapalette.hxx"
-
-typedef InheritedHelperInterfaceImpl1< ov::excel::XTextFrame > ScVbaTextFrame_BASE;
+//typedef InheritedHelperInterfaceImpl1< ov::excel::XTextFrame > ScVbaTextFrame_BASE;
+typedef cppu::ImplInheritanceHelper1< VbaTextFrame, ov::excel::XTextFrame > ScVbaTextFrame_BASE;
class ScVbaTextFrame : public ScVbaTextFrame_BASE
{
-private:
- css::uno::Reference< ov::excel::XCharacters > m_xCharacters;
- css::uno::Reference< css::drawing::XShape > m_xShape;
- css::uno::Reference< css::beans::XPropertySet > m_xPropertySet;
-protected:
- virtual rtl::OUString& getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
- virtual void setAsMSObehavior();
- sal_Int32 getMargin( rtl::OUString sMarginType );
- void setMargin( rtl::OUString sMarginType, float fMargin );
public:
- ScVbaTextFrame( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext , css::uno::Reference< css::drawing::XShape > xShape);
+ ScVbaTextFrame( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext > const& xContext ) throw ( css::lang::IllegalArgumentException );
virtual ~ScVbaTextFrame() {}
- // Attributes
- virtual sal_Bool SAL_CALL getAutoSize() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setAutoSize( sal_Bool _autosize ) throw (css::uno::RuntimeException);
- virtual float SAL_CALL getMarginBottom() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setMarginBottom( float _marginbottom ) throw (css::uno::RuntimeException);
- virtual float SAL_CALL getMarginTop() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setMarginTop( float _margintop ) throw (css::uno::RuntimeException);
- virtual float SAL_CALL getMarginLeft() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setMarginLeft( float _marginleft ) throw (css::uno::RuntimeException);
- virtual float SAL_CALL getMarginRight() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setMarginRight( float _marginright ) throw (css::uno::RuntimeException);
-
// Methods
- virtual css::uno::Reference< ov::excel::XCharacters > SAL_CALL Characters( ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Characters( ) throw (css::uno::RuntimeException);
+ // XHelperInterface
+ virtual rtl::OUString& getServiceImplName();
+ virtual css::uno::Sequence<rtl::OUString> getServiceNames();
};
diff --git a/sc/source/ui/vba/vbatitle.hxx b/sc/source/ui/vba/vbatitle.hxx
index 3d6c597bc67a..e696640d757f 100644
--- a/sc/source/ui/vba/vbatitle.hxx
+++ b/sc/source/ui/vba/vbatitle.hxx
@@ -30,14 +30,15 @@
#ifndef SC_VBA_TITLE_HXX
#define SC_VBA_TITLE_HXX
-#include "vbahelperinterface.hxx"
-#include "vbahelper.hxx"
+#include <vbahelper/vbahelperinterface.hxx>
+#include "excelvbahelper.hxx"
#include "vbainterior.hxx"
#include "vbafont.hxx"
#include "vbapalette.hxx"
#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <ooo/vba/excel/XTitle.hpp>
+#include <ooo/vba/excel/XCharacters.hpp>
#include <basic/sberrors.hxx>
#include <memory>
diff --git a/sc/source/ui/vba/vbatogglebutton.cxx b/sc/source/ui/vba/vbatogglebutton.cxx
deleted file mode 100644
index d49b2e89affe..000000000000
--- a/sc/source/ui/vba/vbatogglebutton.cxx
+++ /dev/null
@@ -1,108 +0,0 @@
-/*************************************************************************
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile$
- *
- * $Revision$
- *
- * last change: $Author$ $Date$
- *
- * 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 2005 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
- *
- ************************************************************************/
-#include "vbatogglebutton.hxx"
-#include <vector>
-
-using namespace com::sun::star;
-using namespace ooo::vba;
-
-
-const static rtl::OUString LABEL( RTL_CONSTASCII_USTRINGPARAM("Label") );
-const static rtl::OUString TOGGLE( RTL_CONSTASCII_USTRINGPARAM("Toggle") );
-const static rtl::OUString STATE( RTL_CONSTASCII_USTRINGPARAM("State") );
-ScVbaToggleButton::ScVbaToggleButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper ) : ToggleButtonImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
-{
- OSL_TRACE("ScVbaToggleButton(ctor)");
- m_xProps->setPropertyValue( TOGGLE, uno::makeAny( sal_True ) );
-}
-
-ScVbaToggleButton::~ScVbaToggleButton()
-{
- OSL_TRACE("~ScVbaToggleButton(dtor)");
-}
-
-// Attributes
-rtl::OUString SAL_CALL
-ScVbaToggleButton::getCaption() throw (css::uno::RuntimeException)
-{
- rtl::OUString Label;
- m_xProps->getPropertyValue( LABEL ) >>= Label;
- return Label;
-}
-
-void SAL_CALL
-ScVbaToggleButton::setCaption( const rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
-{
- m_xProps->setPropertyValue( LABEL, uno::makeAny( _caption ) );
-}
-
-uno::Any SAL_CALL
-ScVbaToggleButton::getValue() throw (uno::RuntimeException)
-{
- sal_Int16 nState = 0;
- m_xProps->getPropertyValue( STATE ) >>= nState;
- return uno::makeAny( nState ? sal_Int16( -1 ) : sal_Int16( 0 ) );
-}
-
-void SAL_CALL
-ScVbaToggleButton::setValue( const uno::Any& _value ) throw (uno::RuntimeException)
-{
- sal_Int16 nState = 0;
- _value >>= nState;
- OSL_TRACE( "nState - %d", nState );
- nState = ( nState == -1 ) ? 1 : 0;
- OSL_TRACE( "nState - %d", nState );
- m_xProps->setPropertyValue( STATE, uno::makeAny( nState ) );
-}
-
-rtl::OUString&
-ScVbaToggleButton::getServiceImplName()
-{
- static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaToggleButton") );
- return sImplName;
-}
-
-uno::Sequence< rtl::OUString >
-ScVbaToggleButton::getServiceNames()
-{
- static uno::Sequence< rtl::OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
- {
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.ToggleButton" ) );
- }
- return aServiceNames;
-}
-
diff --git a/sc/source/ui/vba/vbatogglebutton.hxx b/sc/source/ui/vba/vbatogglebutton.hxx
deleted file mode 100644
index 752eac718b18..000000000000
--- a/sc/source/ui/vba/vbatogglebutton.hxx
+++ /dev/null
@@ -1,63 +0,0 @@
-/*************************************************************************
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile$
- *
- * $Revision$
- *
- * last change: $Author$ $Date$
- *
- * 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 2005 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
- *
- ************************************************************************/
-#ifndef SC_VBA_TOGGLEBUTTON_HXX
-#define SC_VBA_TOGGLEBUTTON_HXX
-#include <cppuhelper/implbase2.hxx>
-#include <ooo/vba/msforms/XToggleButton.hpp>
-
-#include "vbacontrol.hxx"
-#include "vbahelper.hxx"
-
-typedef cppu::ImplInheritanceHelper2< ScVbaControl, ov::msforms::XToggleButton, css::script::XDefaultProperty > ToggleButtonImpl_BASE;
-
-class ScVbaToggleButton : public ToggleButtonImpl_BASE
-{
- rtl::OUString msDftPropName;
-public:
- ScVbaToggleButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper );
- ~ScVbaToggleButton();
- // Attributes
- virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setValue( const css::uno::Any& _value ) 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);
- //XHelperInterface
- virtual rtl::OUString& getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
- // XDefaultProperty
- rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
-};
-#endif //SC_VBA_TOGGLEBUTTON_HXX
diff --git a/sc/source/ui/vba/vbauserform.cxx b/sc/source/ui/vba/vbauserform.cxx
deleted file mode 100644
index 9c50347ad839..000000000000
--- a/sc/source/ui/vba/vbauserform.cxx
+++ /dev/null
@@ -1,228 +0,0 @@
-/*************************************************************************
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile$
- *
- * $Revision$
- *
- * last change: $Author$ $Date$
- *
- * 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 2005 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
- *
- ************************************************************************/
-#include "helperdecl.hxx"
-#include "vbauserform.hxx"
-#include <com/sun/star/awt/XControl.hpp>
-#include <com/sun/star/awt/XControlContainer.hpp>
-#include <com/sun/star/beans/PropertyConcept.hpp>
-#include <basic/sbx.hxx>
-#include <basic/sbstar.hxx>
-#include <basic/sbmeth.hxx>
-#include "unonames.hxx"
-#include "vbacontrols.hxx"
-
-using namespace ::ooo::vba;
-using namespace ::com::sun::star;
-
-// some little notes
-// XDialog implementation has the following interesting bits
-// a Controls property ( which is an array of the container controls )
-// each item in the controls array is a XControl, where the model is
-// basically a property bag
-// additionally the XDialog instance has itself a model
-// this model has a ControlModels ( array of models ) property
-// the models in ControlModels can be accessed by name
-// also the XDialog is a XControl ( to access the model above
-
-ScVbaUserForm::ScVbaUserForm( uno::Sequence< uno::Any > const& aArgs, uno::Reference< uno::XComponentContext >const& xContext ) throw ( lang::IllegalArgumentException ) : ScVbaUserForm_BASE( getXSomethingFromArgs< XHelperInterface >( aArgs, 0 ), xContext, getXSomethingFromArgs< uno::XInterface >( aArgs, 1 ), getXSomethingFromArgs< frame::XModel >( aArgs, 2 ), static_cast< ooo::vba::AbstractGeometryAttributes* >(0) ), m_pDocShell( 0 ), mbDispose( true )
-{
- m_xDialog.set( m_xControl, uno::UNO_QUERY_THROW );
- uno::Reference< awt::XControl > xControl( m_xDialog, uno::UNO_QUERY_THROW );
- m_pDocShell = getDocShell( m_xModel );
- m_xProps.set( xControl->getModel(), uno::UNO_QUERY_THROW );
- setGeometryHelper( new UserFormGeometryHelper( xContext, xControl ) );
-}
-
-ScVbaUserForm::~ScVbaUserForm()
-{
-}
-
-void SAL_CALL
-ScVbaUserForm::Show( ) throw (uno::RuntimeException)
-{
- OSL_TRACE("ScVbaUserForm::Show( )");
- short aRet = 0;
- if ( m_xDialog.is() )
- aRet = m_xDialog->execute();
- OSL_TRACE("ScVbaUserForm::Show() execute returned %d", aRet);
- if ( mbDispose )
- {
- try
- {
- uno::Reference< lang::XComponent > xComp( m_xDialog, uno::UNO_QUERY_THROW );
- m_xDialog = NULL;
- xComp->dispose();
- mbDispose = false;
- }
- catch( uno::Exception& )
- {
- }
- }
-}
-
-rtl::OUString SAL_CALL
-ScVbaUserForm::getCaption() throw (::com::sun::star::uno::RuntimeException)
-{
- rtl::OUString sCaption;
- m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Title") ) ) >>= sCaption;
- return sCaption;
-}
-void
-ScVbaUserForm::setCaption( const ::rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException)
-{
- m_xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Title") ), uno::makeAny( _caption ) );
-}
-
-void SAL_CALL
-ScVbaUserForm::Hide( ) throw (uno::RuntimeException)
-{
- mbDispose = false; // hide not dispose
- if ( m_xDialog.is() )
- m_xDialog->endExecute();
-}
-
-void SAL_CALL
-ScVbaUserForm::RePaint( ) throw (uno::RuntimeException)
-{
- // do nothing
-}
-
-void SAL_CALL
-ScVbaUserForm::UnloadObject( ) throw (uno::RuntimeException)
-{
- mbDispose = true;
- if ( m_xDialog.is() )
- m_xDialog->endExecute();
-}
-
-rtl::OUString&
-ScVbaUserForm::getServiceImplName()
-{
- static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaUserForm") );
- return sImplName;
-}
-
-uno::Sequence< rtl::OUString >
-ScVbaUserForm::getServiceNames()
-{
- static uno::Sequence< rtl::OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
- {
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.UserForm" ) );
- }
- return aServiceNames;
-}
-
-uno::Reference< beans::XIntrospectionAccess > SAL_CALL
-ScVbaUserForm::getIntrospection( ) throw (uno::RuntimeException)
-{
- return uno::Reference< beans::XIntrospectionAccess >();
-}
-
-uno::Any SAL_CALL
-ScVbaUserForm::invoke( const ::rtl::OUString& /*aFunctionName*/, const uno::Sequence< uno::Any >& /*aParams*/, uno::Sequence< ::sal_Int16 >& /*aOutParamIndex*/, uno::Sequence< uno::Any >& /*aOutParam*/ ) throw (lang::IllegalArgumentException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException)
-{
- throw uno::RuntimeException(); // unsupported operation
-}
-
-void SAL_CALL
-ScVbaUserForm::setValue( const ::rtl::OUString& aPropertyName, const uno::Any& aValue ) throw (beans::UnknownPropertyException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException)
-{
- uno::Any aObject = getValue( aPropertyName );
- // The Object *must* support XDefaultProperty here because getValue will
- // only return properties that are Objects ( e.g. controls )
- // e.g. Userform1.aControl = something
- // 'aControl' has to support XDefaultProperty to make sense here
- uno::Reference< script::XDefaultProperty > xDfltProp( aObject, uno::UNO_QUERY_THROW );
- rtl::OUString aDfltPropName = xDfltProp->getDefaultPropertyName();
- uno::Reference< beans::XIntrospectionAccess > xUnoAccess( getIntrospectionAccess( aObject ) );
- uno::Reference< beans::XPropertySet > xPropSet( xUnoAccess->queryAdapter( ::getCppuType( (const uno::Reference< beans::XPropertySet > *)0 ) ), uno::UNO_QUERY_THROW );
- xPropSet->setPropertyValue( aDfltPropName, aValue );
-}
-
-uno::Any SAL_CALL
-ScVbaUserForm::getValue( const ::rtl::OUString& aPropertyName ) throw (beans::UnknownPropertyException, uno::RuntimeException)
-{
- uno::Reference< awt::XControl > xDialogControl( m_xDialog, uno::UNO_QUERY_THROW );
- uno::Reference< awt::XControlContainer > xContainer( m_xDialog, uno::UNO_QUERY_THROW );
- uno::Reference< awt::XControl > xControl = xContainer->getControl( aPropertyName );
- ScVbaControlFactory aFac( mxContext, xControl, m_xModel );
- uno::Reference< msforms::XControl > xVBAControl( aFac.createControl( xDialogControl->getModel() ) );
- ScVbaControl* pControl = dynamic_cast< ScVbaControl* >( xVBAControl.get() );
- pControl->setGeometryHelper( new UserFormGeometryHelper( mxContext, xControl ) );
- return uno::makeAny( xVBAControl );
-}
-
-::sal_Bool SAL_CALL
-ScVbaUserForm::hasMethod( const ::rtl::OUString& /*aName*/ ) throw (uno::RuntimeException)
-{
- return sal_False;
-}
-uno::Any SAL_CALL
-ScVbaUserForm::Controls( const uno::Any& index ) throw (uno::RuntimeException)
-{
- uno::Reference< awt::XControl > xDialogControl( m_xDialog, uno::UNO_QUERY_THROW );
- uno::Reference< XCollection > xControls( new ScVbaControls( this, mxContext, xDialogControl ) );
- if ( index.hasValue() )
- return uno::makeAny( xControls->Item( index, uno::Any() ) );
- return uno::makeAny( xControls );
-}
-
-::sal_Bool SAL_CALL
-ScVbaUserForm::hasProperty( const ::rtl::OUString& aName ) throw (uno::RuntimeException)
-{
- uno::Reference< awt::XControl > xControl( m_xDialog, uno::UNO_QUERY );
- OSL_TRACE("ScVbaUserForm::hasProperty(%s) %d", rtl::OUStringToOString( aName, RTL_TEXTENCODING_UTF8 ).getStr(), xControl.is() );
- if ( xControl.is() )
- {
- uno::Reference< container::XNameAccess > xNameAccess( xControl->getModel(), uno::UNO_QUERY_THROW );
- sal_Bool bRes = xNameAccess->hasByName( aName );
- OSL_TRACE("ScVbaUserForm::hasProperty(%s) %d ---> %d", rtl::OUStringToOString( aName, RTL_TEXTENCODING_UTF8 ).getStr(), xControl.is(), bRes );
- return bRes;
- }
- return sal_False;
-}
-
-namespace userform
-{
-namespace sdecl = comphelper::service_decl;
-sdecl::vba_service_class_<ScVbaUserForm, sdecl::with_args<true> > serviceImpl;
-extern sdecl::ServiceDecl const serviceDecl(
- serviceImpl,
- "ScVbaUserForm",
- "ooo.vba.excel.UserForm" );
-}
-
diff --git a/sc/source/ui/vba/vbauserform.hxx b/sc/source/ui/vba/vbauserform.hxx
deleted file mode 100644
index 2c8a1b72f728..000000000000
--- a/sc/source/ui/vba/vbauserform.hxx
+++ /dev/null
@@ -1,78 +0,0 @@
-/*************************************************************************
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile$
- *
- * $Revision$
- *
- * last change: $Author$ $Date$
- *
- * 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 2005 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
- *
- ************************************************************************/
-#ifndef SC_VBA_USERFORM_HXX
-#define SC_VBA_USERFORM_HXX
-
-#include <cppuhelper/implbase1.hxx>
-#include <ooo/vba/msforms/XUserForm.hpp>
-#include <com/sun/star/awt/XDialog.hpp>
-#include <com/sun/star/frame/XModel.hpp>
-
-#include "vbahelperinterface.hxx"
-#include "vbacontrol.hxx"
-
-//typedef InheritedHelperInterfaceImpl1< ov::msforms::XUserForm > ScVbaUserForm_BASE;
-typedef cppu::ImplInheritanceHelper1< ScVbaControl, ov::msforms::XUserForm > ScVbaUserForm_BASE;
-
-class ScVbaUserForm : public ScVbaUserForm_BASE
-{
-private:
- css::uno::Reference< css::awt::XDialog > m_xDialog;
- ScDocShell* m_pDocShell;
- bool mbDispose;
-protected:
-public:
- ScVbaUserForm( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext ) throw ( css::lang::IllegalArgumentException );
- virtual ~ScVbaUserForm();
- // XUserForm
- virtual void SAL_CALL RePaint( ) throw (css::uno::RuntimeException);
- virtual void SAL_CALL Show( ) throw (css::uno::RuntimeException);
- // XIntrospection
- virtual css::uno::Reference< css::beans::XIntrospectionAccess > SAL_CALL getIntrospection( ) throw (css::uno::RuntimeException);
- virtual css::uno::Any SAL_CALL invoke( const ::rtl::OUString& aFunctionName, const css::uno::Sequence< css::uno::Any >& aParams, css::uno::Sequence< ::sal_Int16 >& aOutParamIndex, css::uno::Sequence< css::uno::Any >& aOutParam ) throw (css::lang::IllegalArgumentException, css::script::CannotConvertException, css::reflection::InvocationTargetException, css::uno::RuntimeException);
- virtual void SAL_CALL setValue( const ::rtl::OUString& aPropertyName, const css::uno::Any& aValue ) throw (css::beans::UnknownPropertyException, css::script::CannotConvertException, css::reflection::InvocationTargetException, css::uno::RuntimeException);
- virtual css::uno::Any SAL_CALL getValue( const ::rtl::OUString& aPropertyName ) throw (css::beans::UnknownPropertyException, css::uno::RuntimeException);
- virtual ::sal_Bool SAL_CALL hasMethod( const ::rtl::OUString& aName ) throw (css::uno::RuntimeException);
- virtual ::sal_Bool SAL_CALL hasProperty( const ::rtl::OUString& aName ) throw (css::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getCaption() throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setCaption( const ::rtl::OUString& _caption ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL Hide( ) throw (css::uno::RuntimeException);
- virtual void SAL_CALL UnloadObject( ) throw (css::uno::RuntimeException);
- virtual css::uno::Any SAL_CALL Controls( const css::uno::Any& index ) throw (css::uno::RuntimeException);
- //XHelperInterface
- virtual rtl::OUString& getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
-};
-#endif
diff --git a/sc/source/ui/vba/vbavalidation.hxx b/sc/source/ui/vba/vbavalidation.hxx
index 60d24ac0c6c5..cef989aa3cea 100644
--- a/sc/source/ui/vba/vbavalidation.hxx
+++ b/sc/source/ui/vba/vbavalidation.hxx
@@ -33,7 +33,7 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <ooo/vba/excel/XValidation.hpp>
#include <com/sun/star/table/XCellRange.hpp>
-#include "vbahelperinterface.hxx"
+#include <vbahelper/vbahelperinterface.hxx>
typedef InheritedHelperInterfaceImpl1<ov::excel::XValidation > ValidationImpl_BASE;
diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx
index a38ba7c9ed46..d782fb95dc70 100644
--- a/sc/source/ui/vba/vbawindow.cxx
+++ b/sc/source/ui/vba/vbawindow.cxx
@@ -27,10 +27,11 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#include "helperdecl.hxx"
+#include <vbahelper/helperdecl.hxx>
#include "vbawindow.hxx"
#include "vbaworksheets.hxx"
#include "vbaworksheet.hxx"
+#include "vbaglobals.hxx"
#include "vbapane.hxx"
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <com/sun/star/sheet/XSpreadsheet.hpp>
@@ -57,6 +58,9 @@ using namespace ::com::sun::star;
using namespace ::ooo::vba;
using namespace ::ooo::vba::excel::XlWindowState;
+// nameExists defined in vbaworksheet.cxx
+bool nameExists( uno::Reference <sheet::XSpreadsheetDocument>& xSpreadDoc, ::rtl::OUString & name, SCTAB& nTab ) throw ( lang::IllegalArgumentException );
+
typedef std::hash_map< rtl::OUString,
SCTAB, ::rtl::OUStringHash,
::std::equal_to< ::rtl::OUString > > NameIndexHash;
@@ -118,7 +122,7 @@ public:
ScDocShell* pDocShell = (ScDocShell*)pModel->GetEmbeddedObject();
if ( !pDocShell )
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cannot obtain docshell" ) ), uno::Reference< uno::XInterface >() );
- ScTabViewShell* pViewShell = getBestViewShell( m_xModel );
+ ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel );
if ( !pViewShell )
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cannot obtain view shell" ) ), uno::Reference< uno::XInterface >() );
@@ -202,14 +206,13 @@ public:
};
-ScVbaWindow::ScVbaWindow( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ) : WindowImpl_BASE( xParent, xContext ), m_xModel( xModel )
+ScVbaWindow::ScVbaWindow( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ) : WindowImpl_BASE( xParent, xContext, xModel )
{
init();
}
ScVbaWindow::ScVbaWindow( uno::Sequence< uno::Any > const & args, uno::Reference< uno::XComponentContext > const & xContext )
- : WindowImpl_BASE( getXSomethingFromArgs< XHelperInterface >( args, 0 ), xContext ),
- m_xModel( getXSomethingFromArgs< frame::XModel >( args, 1 ) )
+ : WindowImpl_BASE( args, xContext )
{
init();
}
@@ -306,8 +309,7 @@ ScVbaWindow::getCaption() throw (uno::RuntimeException)
if ( ( nCrudLen + nCrudIndex ) == sTitle.getLength() )
{
sTitle = sTitle.copy( 0, nCrudIndex );
- uno::Reference< ov::XGlobals > xTemp( ScVbaGlobals::getGlobalsImpl( mxContext )); // temporary needed for g++ 3.3.5
- ScVbaWorkbook workbook( uno::Reference< XHelperInterface >( xTemp->getApplication(), uno::UNO_QUERY_THROW ), mxContext, m_xModel );
+ ScVbaWorkbook workbook( uno::Reference< XHelperInterface >( Application(), uno::UNO_QUERY_THROW ), mxContext, m_xModel );
rtl::OUString sName = workbook.getName();
// rather bizare hack to make sure the name behavior
// is like XL
@@ -343,7 +345,7 @@ uno::Any SAL_CALL
ScVbaWindow::getScrollRow() throw (uno::RuntimeException)
{
sal_Int32 nValue = 0;
- ScTabViewShell* pViewShell = getBestViewShell( m_xModel );
+ ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel );
if ( pViewShell )
{
ScSplitPos eWhich = pViewShell->GetViewData()->GetActivePart();
@@ -356,7 +358,7 @@ ScVbaWindow::getScrollRow() throw (uno::RuntimeException)
void SAL_CALL
ScVbaWindow::setScrollRow( const uno::Any& _scrollrow ) throw (uno::RuntimeException)
{
- ScTabViewShell* pViewShell = getBestViewShell( m_xModel );
+ ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel );
if ( pViewShell )
{
sal_Int32 scrollRow = 0;
@@ -371,7 +373,7 @@ uno::Any SAL_CALL
ScVbaWindow::getScrollColumn() throw (uno::RuntimeException)
{
sal_Int32 nValue = 0;
- ScTabViewShell* pViewShell = getBestViewShell( m_xModel );
+ ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel );
if ( pViewShell )
{
ScSplitPos eWhich = pViewShell->GetViewData()->GetActivePart();
@@ -384,7 +386,7 @@ ScVbaWindow::getScrollColumn() throw (uno::RuntimeException)
void SAL_CALL
ScVbaWindow::setScrollColumn( const uno::Any& _scrollcolumn ) throw (uno::RuntimeException)
{
- ScTabViewShell* pViewShell = getBestViewShell( m_xModel );
+ ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel );
if ( pViewShell )
{
sal_Int32 scrollColumn = 0;
@@ -399,7 +401,7 @@ uno::Any SAL_CALL
ScVbaWindow::getWindowState() throw (uno::RuntimeException)
{
sal_Int32 nwindowState = xlNormal;
- ScTabViewShell* pViewShell = getBestViewShell( m_xModel );
+ ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel );
SfxViewFrame* pViewFrame = pViewShell -> GetViewFrame();
SfxTopViewFrame *pTop= PTR_CAST( SfxTopViewFrame, pViewFrame -> GetTopViewFrame() );
if ( pTop )
@@ -421,7 +423,7 @@ ScVbaWindow::setWindowState( const uno::Any& _windowstate ) throw (uno::RuntimeE
{
sal_Int32 nwindowState = xlMaximized;
_windowstate >>= nwindowState;
- ScTabViewShell* pViewShell = getBestViewShell( m_xModel );
+ ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel );
SfxViewFrame* pViewFrame = pViewShell -> GetViewFrame();
SfxTopViewFrame *pTop= PTR_CAST( SfxTopViewFrame, pViewFrame -> GetTopViewFrame() );
if ( pTop )
@@ -444,8 +446,7 @@ ScVbaWindow::setWindowState( const uno::Any& _windowstate ) throw (uno::RuntimeE
void
ScVbaWindow::Activate() throw (css::uno::RuntimeException)
{
- uno::Reference< ov::XGlobals > xTemp( ScVbaGlobals::getGlobalsImpl( mxContext )); // temporary needed for g++ 3.3.5
- ScVbaWorkbook workbook( uno::Reference< XHelperInterface >( xTemp->getApplication(), uno::UNO_QUERY_THROW ), mxContext, m_xModel );
+ ScVbaWorkbook workbook( uno::Reference< XHelperInterface >( Application(), uno::UNO_QUERY_THROW ), mxContext, m_xModel );
workbook.Activate();
}
@@ -453,8 +454,7 @@ ScVbaWindow::Activate() throw (css::uno::RuntimeException)
void
ScVbaWindow::Close( const uno::Any& SaveChanges, const uno::Any& FileName, const uno::Any& RouteWorkBook ) throw (uno::RuntimeException)
{
- uno::Reference< ov::XGlobals > xTemp( ScVbaGlobals::getGlobalsImpl( mxContext )); // temporary needed for g++ 3.3.5
- ScVbaWorkbook workbook( uno::Reference< XHelperInterface >( xTemp->getApplication(), uno::UNO_QUERY_THROW ), mxContext, m_xModel );
+ ScVbaWorkbook workbook( uno::Reference< XHelperInterface >( Application(), uno::UNO_QUERY_THROW ), mxContext, m_xModel );
workbook.Close(SaveChanges, FileName, RouteWorkBook );
}
@@ -467,13 +467,15 @@ ScVbaWindow::ActivePane() throw (script::BasicErrorException, uno::RuntimeExcept
uno::Reference< excel::XRange > SAL_CALL
ScVbaWindow::ActiveCell( ) throw (script::BasicErrorException, uno::RuntimeException)
{
- return ScVbaGlobals::getGlobalsImpl( mxContext )->getApplication()->getActiveCell();
+ uno::Reference< excel::XApplication > xApplication( Application(), uno::UNO_QUERY_THROW );
+ return xApplication->getActiveCell();
}
uno::Any SAL_CALL
ScVbaWindow::Selection( ) throw (script::BasicErrorException, uno::RuntimeException)
{
- return ScVbaGlobals::getGlobalsImpl( mxContext )->getApplication()->getSelection();
+ uno::Reference< excel::XApplication > xApplication( Application(), uno::UNO_QUERY_THROW );
+ return xApplication->getSelection();
}
::sal_Bool SAL_CALL
@@ -736,30 +738,25 @@ ScVbaWindow::getZoom() throw (uno::RuntimeException)
void SAL_CALL
ScVbaWindow::setZoom( const uno::Any& _zoom ) throw (uno::RuntimeException)
{
- uno::Reference< beans::XPropertySet > xProps( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW );
- rtl::OUString sZoomType( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_ZOOMTYPE ) );
- sal_Int16 nZoomType = view::DocumentZoomType::PAGE_WIDTH;
- if( _zoom.getValueTypeClass() == uno::TypeClass_BOOLEAN )
- {
- //zoom type is PAGE_WIDTH_EXACT in helperapi, it seems that there is a issue for this zoom type in current OOo.
- // so PAGE_WIDTH is used.
- xProps->setPropertyValue(sZoomType, uno::makeAny( nZoomType ));
- }
- else
- {
- nZoomType = view::DocumentZoomType::BY_VALUE;
- rtl::OUString sZoomValue( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_ZOOMVALUE ));
- sal_Int16 nZoomValue = 100;
- _zoom >>= nZoomValue;
- xProps->setPropertyValue( sZoomType, uno::makeAny( nZoomType ));
- xProps->setPropertyValue( sZoomValue, uno::makeAny( nZoomValue ));
- }
+ sal_Int16 nZoom = 100;
+ _zoom >>= nZoom;
+ uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( m_xModel, uno::UNO_QUERY_THROW );
+ uno::Reference< excel::XWorksheet > xActiveSheet = ActiveSheet();
+ SCTAB nTab = 0;
+ rtl::OUString sName = xActiveSheet->getName();
+ bool bSheetExists = nameExists (xSpreadDoc, sName, nTab);
+ if ( !bSheetExists )
+ throw uno::RuntimeException();
+ std::vector< SCTAB > vTabs;
+ vTabs.push_back( nTab );
+ excel::implSetZoom( m_xModel, nZoom, vTabs );
}
uno::Reference< excel::XWorksheet > SAL_CALL
ScVbaWindow::ActiveSheet( ) throw (script::BasicErrorException, uno::RuntimeException)
{
- return ScVbaGlobals::getGlobalsImpl(mxContext)->getApplication()->getActiveSheet();
+ uno::Reference< excel::XApplication > xApplication( Application(), uno::UNO_QUERY_THROW );
+ return xApplication->getActiveSheet();
}
uno::Any SAL_CALL
@@ -787,121 +784,9 @@ ScVbaWindow::setView( const uno::Any& _view) throw (uno::RuntimeException)
default:
DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
}
- dispatchExecute( m_xModel, nSlot );
-}
-
-sal_Bool SAL_CALL
-ScVbaWindow::getVisible() throw (uno::RuntimeException)
-{
- sal_Bool bVisible = sal_True;
- uno::Reference< frame::XController > xController( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW );
- uno::Reference< css::awt::XWindow > xWindow (xController->getFrame()->getContainerWindow(), uno::UNO_QUERY_THROW );
- uno::Reference< css::awt::XWindow2 > xWindow2 (xWindow, uno::UNO_QUERY_THROW );
- if( xWindow2.is() )
- {
- bVisible = xWindow2->isVisible();
- }
- return bVisible;
-}
-
-void SAL_CALL
-ScVbaWindow::setVisible(sal_Bool _visible) throw (uno::RuntimeException)
-{
- uno::Reference< frame::XController > xController( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW );
- uno::Reference< css::awt::XWindow > xWindow (xController->getFrame()->getContainerWindow(), uno::UNO_QUERY_THROW );
- if( xWindow.is() )
- {
- xWindow->setVisible( _visible );
- }
-}
-
-css::awt::Rectangle getPosSize( const uno::Reference< frame::XModel >& xModel )
-{
- css::awt::Rectangle aRect;
- uno::Reference< frame::XController > xController( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
- uno::Reference< css::awt::XWindow > xWindow (xController->getFrame()->getContainerWindow(), uno::UNO_QUERY_THROW );
- if( xWindow.is() )
- {
- aRect = xWindow->getPosSize();
- }
- return aRect;
-}
-
-void setPosSize( const uno::Reference< frame::XModel >& xModel, sal_Int32 nValue, USHORT nFlag )
-{
- uno::Reference< frame::XController > xController( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
- uno::Reference< css::awt::XWindow > xWindow (xController->getFrame()->getContainerWindow(), uno::UNO_QUERY_THROW );
- if( xWindow.is() )
- {
- css::awt::Rectangle aRect = xWindow->getPosSize();
- switch( nFlag )
- {
- case css::awt::PosSize::X:
- xWindow->setPosSize( nValue, aRect.Y, 0, 0, css::awt::PosSize::X );
- break;
- case css::awt::PosSize::Y:
- xWindow->setPosSize( aRect.X, nValue, 0, 0, css::awt::PosSize::Y );
- break;
- case css::awt::PosSize::WIDTH:
- xWindow->setPosSize( 0, 0, nValue, aRect.Height, css::awt::PosSize::WIDTH );
- break;
- case css::awt::PosSize::HEIGHT:
- xWindow->setPosSize( 0, 0, aRect.Width, nValue, css::awt::PosSize::HEIGHT );
- break;
- default:
- break;
- }
- }
-}
-
-sal_Int32 SAL_CALL
-ScVbaWindow::getHeight() throw (uno::RuntimeException)
-{
- css::awt::Rectangle aRect = getPosSize(m_xModel);
- return aRect.Height;
-}
-
-void SAL_CALL
-ScVbaWindow::setHeight( sal_Int32 _height ) throw (uno::RuntimeException)
-{
- setPosSize(m_xModel, _height, css::awt::PosSize::HEIGHT);
-}
-
-sal_Int32 SAL_CALL
-ScVbaWindow::getLeft() throw (uno::RuntimeException)
-{
- css::awt::Rectangle aRect = getPosSize(m_xModel);
- return aRect.X;
-}
-
-void SAL_CALL
-ScVbaWindow::setLeft( sal_Int32 _left ) throw (uno::RuntimeException)
-{
- setPosSize(m_xModel, _left, css::awt::PosSize::X);
-}
-sal_Int32 SAL_CALL
-ScVbaWindow::getTop() throw (uno::RuntimeException)
-{
- css::awt::Rectangle aRect = getPosSize(m_xModel);
- return aRect.Y;
-}
-
-void SAL_CALL
-ScVbaWindow::setTop( sal_Int32 _top ) throw (uno::RuntimeException)
-{
- setPosSize(m_xModel, _top, css::awt::PosSize::Y);
-}
-sal_Int32 SAL_CALL
-ScVbaWindow::getWidth() throw (uno::RuntimeException)
-{
- css::awt::Rectangle aRect = getPosSize(m_xModel);
- return aRect.Width;
-}
-
-void SAL_CALL
-ScVbaWindow::setWidth( sal_Int32 _width ) throw (uno::RuntimeException)
-{
- setPosSize(m_xModel, _width, css::awt::PosSize::WIDTH);
+ ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel );
+ if ( pViewShell )
+ dispatchExecute( pViewShell, nSlot );
}
sal_Int32 SAL_CALL
@@ -924,14 +809,14 @@ void SAL_CALL
ScVbaWindow::PrintOut( const css::uno::Any& From, const css::uno::Any&To, const css::uno::Any& Copies, const css::uno::Any& Preview, const css::uno::Any& ActivePrinter, const css::uno::Any& PrintToFile, const css::uno::Any& Collate, const css::uno::Any& PrToFileName ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
{
// need test, print current active sheet
- PrintOutHelper( From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName, m_xModel, sal_True );
+ PrintOutHelper( excel::getBestViewShell( m_xModel ), From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName, sal_True );
}
void SAL_CALL
ScVbaWindow::PrintPreview( const css::uno::Any& EnableChanges ) throw (css::script::BasicErrorException, css::uno::RuntimeException)
{
// need test, print preview current active sheet
- PrintPreviewHelper( EnableChanges, m_xModel );
+ PrintPreviewHelper( EnableChanges, excel::getBestViewShell( m_xModel ) );
}
rtl::OUString&
diff --git a/sc/source/ui/vba/vbawindow.hxx b/sc/source/ui/vba/vbawindow.hxx
index b32f3b99398a..968d258961c8 100644
--- a/sc/source/ui/vba/vbawindow.hxx
+++ b/sc/source/ui/vba/vbawindow.hxx
@@ -39,15 +39,16 @@
#include <ooo/vba/excel/XPane.hpp>
#include <com/sun/star/awt/XDevice.hpp>
-#include "vbahelperinterface.hxx"
+#include <vbahelper/vbahelperinterface.hxx>
+#include <vbahelper/vbawindowbase.hxx>
#include "vbaworkbook.hxx"
-typedef InheritedHelperInterfaceImpl1<ov::excel::XWindow > WindowImpl_BASE;
+//typedef InheritedHelperInterfaceImpl1<ov::excel::XWindow > WindowImpl_BASE;
+typedef cppu::ImplInheritanceHelper1< VbaWindowBase, ov::excel::XWindow > WindowImpl_BASE;
class ScVbaWindow : public WindowImpl_BASE
{
private:
- css::uno::Reference< css::frame::XModel > m_xModel;
css::uno::Reference< css::sheet::XViewPane > m_xViewPane;
css::uno::Reference< css::sheet::XViewFreezable > m_xViewFreezable;
css::uno::Reference< css::sheet::XViewSplitable > m_xViewSplitable;
@@ -82,10 +83,6 @@ public:
virtual void SAL_CALL setDisplayWorkbookTabs( ::sal_Bool _bDisplayWorkbookTabs ) throw (css::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL getFreezePanes() throw (css::uno::RuntimeException);
virtual void SAL_CALL setFreezePanes( ::sal_Bool _bFreezePanes ) throw (css::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getHeight() throw (css::uno::RuntimeException) ;
- virtual void SAL_CALL setHeight( sal_Int32 _height ) throw (css::uno::RuntimeException) ;
- virtual sal_Int32 SAL_CALL getLeft() throw (css::uno::RuntimeException) ;
- virtual void SAL_CALL setLeft( sal_Int32 _left ) throw (css::uno::RuntimeException) ;
virtual ::sal_Bool SAL_CALL getSplit() throw (css::uno::RuntimeException);
virtual void SAL_CALL setSplit( ::sal_Bool _bSplit ) throw (css::uno::RuntimeException);
virtual sal_Int32 SAL_CALL getSplitColumn() throw (css::uno::RuntimeException) ;
@@ -100,14 +97,8 @@ public:
virtual void SAL_CALL setScrollRow( const css::uno::Any& _scrollrow ) throw (css::uno::RuntimeException) ;
virtual css::uno::Any SAL_CALL getScrollColumn() throw (css::uno::RuntimeException) ;
virtual void SAL_CALL setScrollColumn( const css::uno::Any& _scrollcolumn ) throw (css::uno::RuntimeException) ;
- virtual sal_Int32 SAL_CALL getTop() throw (css::uno::RuntimeException) ;
- virtual void SAL_CALL setTop( sal_Int32 _top ) throw (css::uno::RuntimeException) ;
virtual css::uno::Any SAL_CALL getView() throw (css::uno::RuntimeException);
virtual void SAL_CALL setView( const css::uno::Any& _view ) throw (css::uno::RuntimeException);
- virtual sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setVisible( sal_Bool _visible ) throw (css::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getWidth() throw (css::uno::RuntimeException) ;
- virtual void SAL_CALL setWidth( sal_Int32 _width ) throw (css::uno::RuntimeException) ;
virtual css::uno::Any SAL_CALL getWindowState() throw (css::uno::RuntimeException);
virtual void SAL_CALL setWindowState( const css::uno::Any& _windowstate ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL getZoom() throw (css::uno::RuntimeException);
diff --git a/sc/source/ui/vba/vbawindows.cxx b/sc/source/ui/vba/vbawindows.cxx
index b14a31c7c42c..ae16efdebcf4 100644
--- a/sc/source/ui/vba/vbawindows.cxx
+++ b/sc/source/ui/vba/vbawindows.cxx
@@ -37,6 +37,7 @@
#include <tools/urlobj.hxx>
#include "vbawindow.hxx"
+#include "vbaglobals.hxx"
//#include "vbaworkbook.hxx"
using namespace ::com::sun::star;
@@ -47,15 +48,15 @@ sal_Int32, ::rtl::OUStringHash,
::std::equal_to< ::rtl::OUString > > NameIndexHash;
-uno::Reference< XHelperInterface > lcl_createWorkbookHIParent( const uno::Reference< frame::XModel >& xModel, const uno::Reference< uno::XComponentContext >& xContext )
+uno::Reference< XHelperInterface > lcl_createWorkbookHIParent( const uno::Reference< frame::XModel >& xModel, const uno::Reference< uno::XComponentContext >& xContext, const uno::Any& aApplication )
{
- return new ScVbaWorkbook( uno::Reference< XHelperInterface >( ScVbaGlobals::getGlobalsImpl( xContext )->getApplication(), uno::UNO_QUERY_THROW ), xContext, xModel );
+ return new ScVbaWorkbook( uno::Reference< XHelperInterface >( aApplication, uno::UNO_QUERY_THROW ), xContext, xModel );
}
-uno::Any ComponentToWindow( const uno::Any& aSource, uno::Reference< uno::XComponentContext > & xContext )
+uno::Any ComponentToWindow( const uno::Any& aSource, uno::Reference< uno::XComponentContext > & xContext, const uno::Any& aApplication )
{
uno::Reference< frame::XModel > xModel( aSource, uno::UNO_QUERY_THROW );
- uno::Reference< excel::XWindow > xWin( new ScVbaWindow( lcl_createWorkbookHIParent( xModel, xContext ), xContext,xModel ) );
+ uno::Reference< excel::XWindow > xWin( new ScVbaWindow( lcl_createWorkbookHIParent( xModel, xContext, aApplication ), xContext,xModel ) );
return uno::makeAny( xWin );
}
@@ -108,12 +109,13 @@ public:
class WindowEnumImpl : public WindowComponentEnumImpl
{
+ uno::Any m_aApplication;
public:
- WindowEnumImpl(const uno::Reference< uno::XComponentContext >& xContext, const Components& components ):WindowComponentEnumImpl( xContext, components ) {}
- WindowEnumImpl( const uno::Reference< uno::XComponentContext >& xContext ): WindowComponentEnumImpl( xContext ) {}
+ WindowEnumImpl(const uno::Reference< uno::XComponentContext >& xContext, const Components& components, const uno::Any& aApplication ):WindowComponentEnumImpl( xContext, components ), m_aApplication( aApplication ){}
+ WindowEnumImpl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Any& aApplication ): WindowComponentEnumImpl( xContext ), m_aApplication( aApplication ) {}
virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
- return ComponentToWindow( WindowComponentEnumImpl::nextElement(), m_xContext );
+ return ComponentToWindow( WindowComponentEnumImpl::nextElement(), m_xContext, m_aApplication );
}
};
@@ -212,16 +214,19 @@ ScVbaWindows::ScVbaWindows( const uno::Reference< ov::XHelperInterface >& xParen
{
}
+ScVbaWindows::ScVbaWindows( const uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext ) : ScVbaWindows_BASE( xParent, xContext, uno::Reference< container::XIndexAccess > ( new WindowsAccessImpl( xContext ) ) )
+{
+}
uno::Reference< container::XEnumeration >
ScVbaWindows::createEnumeration() throw (uno::RuntimeException)
{
- return new WindowEnumImpl( mxContext );
+ return new WindowEnumImpl( mxContext, Application() );
}
uno::Any
ScVbaWindows::createCollectionObject( const css::uno::Any& aSource )
{
- return ComponentToWindow( aSource, mxContext );
+ return ComponentToWindow( aSource, mxContext, Application() );
}
uno::Type
@@ -230,12 +235,6 @@ ScVbaWindows::getElementType() throw (uno::RuntimeException)
return excel::XWindows::static_type(0);
}
-uno::Reference< XCollection >
-ScVbaWindows::Windows( const css::uno::Reference< css::uno::XComponentContext >& xContext )
-{
- uno::Reference< container::XIndexAccess > xIndex( new WindowsAccessImpl( xContext ) );
- return new ScVbaWindows( uno::Reference< XHelperInterface >( ScVbaGlobals::getGlobalsImpl( xContext )->getApplication(), uno::UNO_QUERY_THROW ), xContext , xIndex );
-}
void SAL_CALL
ScVbaWindows::Arrange( ::sal_Int32 /*ArrangeStyle*/, const uno::Any& /*ActiveWorkbook*/, const uno::Any& /*SyncHorizontal*/, const uno::Any& /*SyncVertical*/ ) throw (uno::RuntimeException)
diff --git a/sc/source/ui/vba/vbawindows.hxx b/sc/source/ui/vba/vbawindows.hxx
index 3c828d4e3355..5aff0094ebf3 100644
--- a/sc/source/ui/vba/vbawindows.hxx
+++ b/sc/source/ui/vba/vbawindows.hxx
@@ -35,8 +35,8 @@
#include <com/sun/star/uno/XComponentContext.hpp>
-#include "vbahelper.hxx"
-#include "vbacollectionimpl.hxx"
+#include "excelvbahelper.hxx"
+#include <vbahelper/vbacollectionimpl.hxx>
typedef CollTestImplHelper< ov::excel::XWindows > ScVbaWindows_BASE;
@@ -45,6 +45,7 @@ class ScVbaWindows : public ScVbaWindows_BASE
{
public:
ScVbaWindows( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess );
+ ScVbaWindows( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext );
virtual ~ScVbaWindows() {}
// XEnumerationAccess
@@ -57,8 +58,6 @@ public:
// ScVbaCollectionBaseImpl
virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
- static css::uno::Reference< ov::XCollection > Windows( const css::uno::Reference< css::uno::XComponentContext >& xContext );
-
// XHelperInterface
virtual rtl::OUString& getServiceImplName();
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
diff --git a/sc/source/ui/vba/vbaworkbook.cxx b/sc/source/ui/vba/vbaworkbook.cxx
index c89de4c2a10a..498d77e79a14 100644
--- a/sc/source/ui/vba/vbaworkbook.cxx
+++ b/sc/source/ui/vba/vbaworkbook.cxx
@@ -27,7 +27,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#include "helperdecl.hxx"
+#include <vbahelper/helperdecl.hxx>
#include <tools/urlobj.hxx>
#include <comphelper/unwrapargs.hxx>
@@ -46,12 +46,13 @@
#include "vbaworkbook.hxx"
#include "vbawindows.hxx"
#include "vbastyles.hxx"
-#include "vbahelper.hxx"
+#include "excelvbahelper.hxx"
#include "vbapalette.hxx"
#include <osl/file.hxx>
#include <stdio.h>
#include "vbanames.hxx" // Amelia Wang
#include "nameuno.hxx"
+#include "docoptio.hxx"
// Much of the impl. for the equivalend UNO module is
// sc/source/ui/unoobj/docuno.cxx, viewuno.cxx
@@ -64,7 +65,7 @@ class ActiveSheet : public ScVbaWorksheet
protected:
virtual uno::Reference< frame::XModel > getModel()
{
- return getCurrentDocument();
+ return getCurrentExcelDoc( mxContext );
}
virtual uno::Reference< sheet::XSpreadsheet > getSheet()
{
@@ -192,7 +193,7 @@ ScVbaWorkbook::init()
if ( !ColorData.getLength() )
ResetColors();
}
-ScVbaWorkbook::ScVbaWorkbook( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext) :ScVbaWorkbook_BASE( xParent, xContext ), mxModel(NULL)
+ScVbaWorkbook::ScVbaWorkbook( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext) :ScVbaWorkbook_BASE( xParent, xContext )
{
//#FIXME this persists the color data per office instance and
// not per workbook instance, need to hook the data into XModel
@@ -203,58 +204,27 @@ ScVbaWorkbook::ScVbaWorkbook( const css::uno::Reference< ov::XHelperInterface
init();
}
-ScVbaWorkbook::ScVbaWorkbook( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::frame::XModel > xModel ) : ScVbaWorkbook_BASE( xParent, xContext ), mxModel( xModel )
+ScVbaWorkbook::ScVbaWorkbook( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::frame::XModel > xModel ) : ScVbaWorkbook_BASE( xParent, xContext, xModel )
{
init();
}
ScVbaWorkbook::ScVbaWorkbook( uno::Sequence< uno::Any> const & args,
- uno::Reference< uno::XComponentContext> const & xContext ) : ScVbaWorkbook_BASE( getXSomethingFromArgs< XHelperInterface >( args, 0 ), xContext ), mxModel( getXSomethingFromArgs< frame::XModel >( args, 1 ) )
+ uno::Reference< uno::XComponentContext> const & xContext ) : ScVbaWorkbook_BASE( args, xContext )
{
init();
}
-::rtl::OUString
-ScVbaWorkbook::getName() throw (uno::RuntimeException)
-{
- rtl::OUString sName = getModel()->getURL();
- if ( sName.getLength() )
- {
-
- INetURLObject aURL( getModel()->getURL() );
- ::osl::File::getSystemPathFromFileURL( aURL.GetLastName(), sName );
- }
- else
- {
- const static rtl::OUString sTitle( RTL_CONSTASCII_USTRINGPARAM("Title" ) );
- // process "UntitledX - $(PRODUCTNAME)"
- uno::Reference< frame::XFrame > xFrame( getModel()->getCurrentController()->getFrame(), uno::UNO_QUERY_THROW );
- uno::Reference< beans::XPropertySet > xProps( xFrame, uno::UNO_QUERY_THROW );
- xProps->getPropertyValue(sTitle ) >>= sName;
- sal_Int32 pos = 0;
- sName = sName.getToken(0,' ',pos);
- }
- return sName;
-}
-::rtl::OUString
-ScVbaWorkbook::getPath() throw (uno::RuntimeException)
-{
- INetURLObject aURL( getModel()->getURL() );
- aURL.CutLastName();
- return aURL.GetURLPath();
-}
-
-::rtl::OUString
-ScVbaWorkbook::getFullName() throw (uno::RuntimeException)
-{
- INetURLObject aURL( getModel()->getURL() );
- return aURL.GetURLPath();
-}
uno::Reference< excel::XWorksheet >
ScVbaWorkbook::getActiveSheet() throw (uno::RuntimeException)
{
- return new ActiveSheet( this, mxContext );
+ uno::Reference< frame::XModel > xModel( getCurrentExcelDoc( mxContext ) );
+ uno::Reference< sheet::XSpreadsheet > xSheet;
+ uno::Reference< sheet::XSpreadsheetView > xView( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
+ if ( xView.is() )
+ xSheet = xView->getActiveSheet();
+ return new ScVbaWorksheet( this, mxContext, xSheet, xModel );
}
uno::Any SAL_CALL
ScVbaWorkbook::Sheets( const uno::Any& aIndex ) throw (uno::RuntimeException)
@@ -281,89 +251,17 @@ ScVbaWorkbook::Worksheets( const uno::Any& aIndex ) throw (uno::RuntimeException
uno::Any SAL_CALL
ScVbaWorkbook::Windows( const uno::Any& aIndex ) throw (uno::RuntimeException)
{
- uno::Reference< XCollection > xWindows = ScVbaWindows::Windows( mxContext );
+
+ uno::Reference< excel::XWindows > xWindows( new ScVbaWindows( getParent(), mxContext ) );
if ( aIndex.getValueTypeClass() == uno::TypeClass_VOID )
return uno::Any( xWindows );
return uno::Any( xWindows->Item( aIndex, uno::Any() ) );
}
-void
-ScVbaWorkbook::Close( const uno::Any &rSaveArg, const uno::Any &rFileArg,
- const uno::Any &rRouteArg ) throw (uno::RuntimeException)
-{
- sal_Bool bSaveChanges = sal_False;
- rtl::OUString aFileName;
- sal_Bool bRouteWorkbook = sal_True;
-
- rSaveArg >>= bSaveChanges;
- sal_Bool bFileName = ( rFileArg >>= aFileName );
- rRouteArg >>= bRouteWorkbook;
- uno::Reference< frame::XStorable > xStorable( getModel(), uno::UNO_QUERY_THROW );
- uno::Reference< util::XModifiable > xModifiable( getModel(), uno::UNO_QUERY_THROW );
-
- if( bSaveChanges )
- {
- if( xStorable->isReadonly() )
- {
- throw uno::RuntimeException(::rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "Unable to save to a read only file ") ),
- uno::Reference< XInterface >() );
- }
- if( bFileName )
- xStorable->storeAsURL( aFileName, uno::Sequence< beans::PropertyValue >(0) );
- else
- xStorable->store();
- }
- else
- xModifiable->setModified( false );
-
- uno::Reference< util::XCloseable > xCloseable( getModel(), uno::UNO_QUERY );
-
- if( xCloseable.is() )
- // use close(boolean DeliverOwnership)
- // The boolean parameter DeliverOwnership tells objects vetoing the close process that they may
- // assume ownership if they object the closure by throwing a CloseVetoException
- // Here we give up ownership. To be on the safe side, catch possible veto exception anyway.
- xCloseable->close(sal_True);
- // If close is not supported by this model - try to dispose it.
- // But if the model disagree with a reset request for the modify state
- // we shouldn't do so. Otherwhise some strange things can happen.
- else
- {
- uno::Reference< lang::XComponent > xDisposable ( getCurrentDocument(), uno::UNO_QUERY );
- if ( xDisposable.is() )
- xDisposable->dispose();
- }
-}
-
-void
-ScVbaWorkbook::Protect( const uno::Any &aPassword ) throw (uno::RuntimeException)
+void SAL_CALL
+ScVbaWorkbook::Activate() throw (uno::RuntimeException)
{
- rtl::OUString rPassword;
- uno::Reference< util::XProtectable > xProt( getModel(), uno::UNO_QUERY_THROW );
- SC_VBA_FIXME(("Workbook::Protect stub"));
- if( aPassword >>= rPassword )
- xProt->protect( rPassword );
- else
- xProt->protect( rtl::OUString() );
-}
-
-void
-ScVbaWorkbook::Unprotect( const uno::Any &aPassword ) throw (uno::RuntimeException)
-{
- rtl::OUString rPassword;
- uno::Reference< util::XProtectable > xProt( getModel(), uno::UNO_QUERY_THROW );
- if( !getProtectStructure() )
- throw uno::RuntimeException(::rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "File is already unprotected" ) ),
- uno::Reference< XInterface >() );
- else
- {
- if( aPassword >>= rPassword )
- xProt->unprotect( rPassword );
- else
- xProt->unprotect( rtl::OUString() );
- }
+ VbaDocumentBase::Activate();
}
::sal_Bool
@@ -373,26 +271,20 @@ ScVbaWorkbook::getProtectStructure() throw (uno::RuntimeException)
return xProt->isProtected();
}
-void
-ScVbaWorkbook::setSaved( sal_Bool bSave ) throw (uno::RuntimeException)
+::sal_Bool SAL_CALL ScVbaWorkbook::getPrecisionAsDisplayed() throw (uno::RuntimeException)
{
- uno::Reference< util::XModifiable > xModifiable( getModel(), uno::UNO_QUERY_THROW );
- xModifiable->setModified( bSave );
-}
-
-sal_Bool
-ScVbaWorkbook::getSaved() throw (uno::RuntimeException)
-{
- uno::Reference< util::XModifiable > xModifiable( getModel(), uno::UNO_QUERY_THROW );
- return xModifiable->isModified();
+ uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_QUERY_THROW );
+ ScDocument* pDoc = excel::getDocShell( xModel )->GetDocument();
+ return pDoc->GetDocOptions().IsCalcAsShown();
}
-void
-ScVbaWorkbook::Save() throw (uno::RuntimeException)
+void SAL_CALL ScVbaWorkbook::setPrecisionAsDisplayed( sal_Bool _precisionAsDisplayed ) throw (uno::RuntimeException)
{
- rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(".uno:Save"));
- uno::Reference< frame::XModel > xModel = getModel();
- dispatchRequests(xModel,url);
+ uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_QUERY_THROW );
+ ScDocument* pDoc = excel::getDocShell( xModel )->GetDocument();
+ ScDocOptions aOpt = pDoc->GetDocOptions();
+ aOpt.SetCalcAsShown( _precisionAsDisplayed );
+ pDoc->SetDocOptions( aOpt );
}
void
@@ -407,13 +299,6 @@ ScVbaWorkbook::SaveCopyAs( const rtl::OUString& sFileName ) throw ( uno::Runtime
xStor->storeToURL( aURL, storeProps );
}
-void
-ScVbaWorkbook::Activate() throw (uno::RuntimeException)
-{
- uno::Reference< frame::XFrame > xFrame( getModel()->getCurrentController()->getFrame(), uno::UNO_QUERY_THROW );
- xFrame->activate();
-}
-
css::uno::Any SAL_CALL
ScVbaWorkbook::Styles( const::uno::Any& Item ) throw (uno::RuntimeException)
{
@@ -465,7 +350,7 @@ ScVbaWorkbook::getCodeName() throw (css::uno::RuntimeException)
{
#ifdef VBA_OOBUILD_HACK
uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_QUERY_THROW );
- ScDocument* pDoc = getDocShell( xModel )->GetDocument();
+ ScDocument* pDoc = excel::getDocShell( xModel )->GetDocument();
ScExtDocOptions* pExtOptions = pDoc->GetExtDocOptions();
ScExtDocSettings pExtSettings = pExtOptions->GetDocSettings();
::rtl::OUString sGlobCodeName = pExtSettings.maGlobCodeName;
@@ -479,7 +364,7 @@ void SAL_CALL
ScVbaWorkbook::setCodeName( const ::rtl::OUString& sGlobCodeName ) throw (css::uno::RuntimeException)
{
uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_QUERY_THROW );
- ScDocument* pDoc = getDocShell( xModel )->GetDocument();
+ ScDocument* pDoc = excel::getDocShell( xModel )->GetDocument();
ScExtDocOptions* pExtOptions = pDoc->GetExtDocOptions();
ScExtDocSettings pExtSettings = pExtOptions->GetDocSettings();
pExtSettings.maGlobCodeName = sGlobCodeName;
diff --git a/sc/source/ui/vba/vbaworkbook.hxx b/sc/source/ui/vba/vbaworkbook.hxx
index 67d14dac148c..cf221fd934a0 100644
--- a/sc/source/ui/vba/vbaworkbook.hxx
+++ b/sc/source/ui/vba/vbaworkbook.hxx
@@ -32,21 +32,20 @@
#include <com/sun/star/frame/XModel.hpp>
#include <ooo/vba/excel/XWorkbook.hpp>
-#include "vbahelperinterface.hxx"
+#include <vbahelper/vbahelperinterface.hxx>
+#include <vbahelper/vbadocumentbase.hxx>
class ScModelObj;
-typedef InheritedHelperInterfaceImpl1< ov::excel::XWorkbook > ScVbaWorkbook_BASE;
+typedef cppu::ImplInheritanceHelper1< VbaDocumentBase, ov::excel::XWorkbook > ScVbaWorkbook_BASE;
class ScVbaWorkbook : public ScVbaWorkbook_BASE
{
- css::uno::Reference< css::frame::XModel > mxModel;
static css::uno::Sequence< sal_Int32 > ColorData;
void initColorData( const css::uno::Sequence< sal_Int32 >& sColors );
void init();
protected:
- virtual css::uno::Reference< css::frame::XModel > getModel() { return mxModel; }
ScVbaWorkbook( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext);
public:
ScVbaWorkbook( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,
@@ -55,24 +54,15 @@ public:
virtual ~ScVbaWorkbook() {}
// Attributes
- virtual ::rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getPath() throw (css::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getFullName() throw (css::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL getProtectStructure() throw (css::uno::RuntimeException);
virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL getActiveSheet() throw (css::uno::RuntimeException);
- virtual sal_Bool SAL_CALL getSaved() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setSaved( sal_Bool bSave ) throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getPrecisionAsDisplayed() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setPrecisionAsDisplayed( sal_Bool _precisionAsDisplayed ) throw (css::uno::RuntimeException);
// Methods
virtual css::uno::Any SAL_CALL Worksheets( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
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 Close( const css::uno::Any &bSaveChanges,
- const css::uno::Any &aFileName,
- const css::uno::Any &bRouteWorkbook ) throw (css::uno::RuntimeException);
- virtual void SAL_CALL Protect( const css::uno::Any & aPassword ) throw (css::uno::RuntimeException);
- virtual void SAL_CALL Unprotect( const css::uno::Any &aPassword ) throw (css::uno::RuntimeException);
- virtual void SAL_CALL Save() throw (css::uno::RuntimeException);
virtual void SAL_CALL Activate() throw (css::uno::RuntimeException);
// Amelia Wang
virtual css::uno::Any SAL_CALL Names( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
diff --git a/sc/source/ui/vba/vbaworkbooks.cxx b/sc/source/ui/vba/vbaworkbooks.cxx
index 40c8370f4aec..b2f194bff6c5 100644
--- a/sc/source/ui/vba/vbaworkbooks.cxx
+++ b/sc/source/ui/vba/vbaworkbooks.cxx
@@ -56,7 +56,7 @@
#include "vbaglobals.hxx"
#include "vbaworkbook.hxx"
#include "vbaworkbooks.hxx"
-#include "vbahelper.hxx"
+#include <vbahelper/vbahelper.hxx>
#include <hash_map>
#include <osl/file.hxx>
@@ -65,180 +65,33 @@ using namespace ::com::sun::star;
const sal_Int16 CUSTOM_CHAR = 5;
-typedef std::hash_map< rtl::OUString,
-sal_Int32, ::rtl::OUStringHash,
-::std::equal_to< ::rtl::OUString > > NameIndexHash;
-
-typedef std::vector < uno::Reference< sheet::XSpreadsheetDocument > > WorkBooks;
-
-typedef ::cppu::WeakImplHelper1< container::XEnumeration > SpreadSheetDocEnumImpl_BASE;
-
static uno::Any
-getWorkbook( uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< sheet::XSpreadsheetDocument > &xDoc )
+getWorkbook( uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< sheet::XSpreadsheetDocument > &xDoc, const uno::Any& aApplication )
{
// FIXME: fine as long as ScVbaWorkbook is stateless ...
uno::Reference< frame::XModel > xModel( xDoc, uno::UNO_QUERY );
if( !xModel.is() )
return uno::Any();
- ScVbaWorkbook *pWb = new ScVbaWorkbook( uno::Reference< XHelperInterface >( ScVbaGlobals::getGlobalsImpl( xContext )->getApplication(), uno::UNO_QUERY_THROW ), xContext, xModel );
+ ScVbaWorkbook *pWb = new ScVbaWorkbook( uno::Reference< XHelperInterface >( aApplication, uno::UNO_QUERY_THROW ), xContext, xModel );
return uno::Any( uno::Reference< excel::XWorkbook > (pWb) );
}
-
-// #FIXME clearly this is a candidate for some sort of helper base class as
-// this is a copy of SelectedSheetsEnum ( vbawindow.cxx )
-
-class SpreadSheetDocEnumImpl : public SpreadSheetDocEnumImpl_BASE
-{
- uno::Reference< uno::XComponentContext > m_xContext;
- WorkBooks m_books;
- WorkBooks::const_iterator m_it;
-
-public:
- SpreadSheetDocEnumImpl( const uno::Reference< uno::XComponentContext >& xContext, const WorkBooks& books ) throw ( uno::RuntimeException ) : m_xContext( xContext ), m_books( books )
- {
- m_it = m_books.begin();
- }
- SpreadSheetDocEnumImpl( const uno::Reference< uno::XComponentContext >& xContext ) throw ( uno::RuntimeException ) : m_xContext( xContext )
- {
- uno::Reference< lang::XMultiComponentFactory > xSMgr(
- m_xContext->getServiceManager(), uno::UNO_QUERY_THROW );
-
- uno::Reference< frame::XDesktop > xDesktop
- (xSMgr->createInstanceWithContext(::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop"), m_xContext), uno::UNO_QUERY_THROW );
- uno::Reference< container::XEnumeration > mxComponents = xDesktop->getComponents()->createEnumeration();
- while( mxComponents->hasMoreElements() )
- {
- uno::Reference< sheet::XSpreadsheetDocument > xNext( mxComponents->nextElement(), uno::UNO_QUERY );
- if ( xNext.is() )
- m_books.push_back( xNext );
- }
- m_it = m_books.begin();
- }
- // XEnumeration
- virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException)
- {
- return m_it != m_books.end();
- }
-
- virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
- {
- if ( !hasMoreElements() )
- {
- throw container::NoSuchElementException();
- }
- return makeAny( *(m_it++) );
- }
-};
-
class WorkBookEnumImpl : public EnumerationHelperImpl
{
+ uno::Any m_aApplication;
public:
- WorkBookEnumImpl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xContext, xEnumeration ){}
+ WorkBookEnumImpl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Any& aApplication ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xContext, xEnumeration ), m_aApplication( aApplication ) {}
virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
uno::Reference< sheet::XSpreadsheetDocument > xDoc( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW );
- return getWorkbook( m_xContext, xDoc );
- }
-
-};
-
-// #FIXME clearly this is also a candidate for some sort of helper base class as
-// a very similar one is used in vbawindow ( SelectedSheetsEnumAccess )
-// Maybe a template base class that does all of the operations on the hashmap
-// and vector only, and the sub-class does everything else
-// => ctor, createEnumeration & factory method need be defined ( to be called
-// by getByIndex, getByName )
-typedef ::cppu::WeakImplHelper3< container::XEnumerationAccess
- , com::sun::star::container::XIndexAccess
- , com::sun::star::container::XNameAccess
- > WorkBooksAccessImpl_BASE;
-
-class WorkBooksAccessImpl : public WorkBooksAccessImpl_BASE
-{
- uno::Reference< uno::XComponentContext > m_xContext;
- WorkBooks m_books;
- NameIndexHash namesToIndices;
-public:
- WorkBooksAccessImpl( const uno::Reference< uno::XComponentContext >& xContext ):m_xContext( xContext )
- {
- uno::Reference< container::XEnumeration > xEnum = new SpreadSheetDocEnumImpl( m_xContext );
- sal_Int32 nIndex=0;
- while( xEnum->hasMoreElements() )
- {
- uno::Reference< sheet::XSpreadsheetDocument > xNext( xEnum->nextElement(), uno::UNO_QUERY );
- if ( xNext.is() )
- {
- m_books.push_back( xNext );
- uno::Reference< frame::XModel > xModel( xNext, uno::UNO_QUERY_THROW ); // that the spreadsheetdocument is a xmodel is a given
- INetURLObject aURL( xModel->getURL() );
- namesToIndices[ aURL.GetLastName() ] = nIndex++;
- }
- }
-
- }
-
- //XEnumerationAccess
- virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) throw (uno::RuntimeException)
- {
- return new SpreadSheetDocEnumImpl( m_xContext, m_books );
- }
- // XIndexAccess
- virtual ::sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException)
- {
- return m_books.size();
- }
- virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw ( lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
- {
- if ( Index < 0
- || static_cast< WorkBooks::size_type >(Index) >= m_books.size() )
- throw lang::IndexOutOfBoundsException();
- return makeAny( m_books[ Index ] ); // returns xspreadsheetdoc
- }
-
- //XElementAccess
- virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException)
- {
- return sheet::XSpreadsheetDocument::static_type(0);
- }
-
- virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException)
- {
- return (m_books.size() > 0);
- }
-
- //XNameAccess
- virtual uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
- {
- NameIndexHash::const_iterator it = namesToIndices.find( aName );
- if ( it == namesToIndices.end() )
- throw container::NoSuchElementException();
- return makeAny( m_books[ it->second ] );
-
- }
-
- virtual uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw (uno::RuntimeException)
- {
- uno::Sequence< ::rtl::OUString > names( namesToIndices.size() );
- ::rtl::OUString* pString = names.getArray();
- NameIndexHash::const_iterator it = namesToIndices.begin();
- NameIndexHash::const_iterator it_end = namesToIndices.end();
- for ( ; it != it_end; ++it, ++pString )
- *pString = it->first;
- return names;
- }
-
- virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (uno::RuntimeException)
- {
- NameIndexHash::const_iterator it = namesToIndices.find( aName );
- return (it != namesToIndices.end());
+ return getWorkbook( m_xContext, xDoc, m_aApplication );
}
};
-ScVbaWorkbooks::ScVbaWorkbooks( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< css::uno::XComponentContext >& xContext ) : ScVbaWorkbooks_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( new WorkBooksAccessImpl( xContext ) ) )
+ScVbaWorkbooks::ScVbaWorkbooks( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< css::uno::XComponentContext >& xContext ) : ScVbaWorkbooks_BASE( xParent, xContext, VbaDocumentsBase::EXCEL_DOCUMENT )
{
}
// XEnumerationAccess
@@ -254,46 +107,32 @@ ScVbaWorkbooks::createEnumeration() throw (uno::RuntimeException)
// the state of this object ( although it should ) would be
// safer to create an enumeration based on this objects state
// rather than one effectively based of the desktop component
- return new WorkBookEnumImpl( mxContext, uno::Reference< container::XEnumeration >( new SpreadSheetDocEnumImpl(mxContext) ) );
+ uno::Reference< container::XEnumerationAccess > xEnumerationAccess( m_xIndexAccess, uno::UNO_QUERY_THROW );
+ return new WorkBookEnumImpl( mxContext, xEnumerationAccess->createEnumeration(), Application() );
}
uno::Any
ScVbaWorkbooks::createCollectionObject( const css::uno::Any& aSource )
{
- uno::Reference< sheet::XSpreadsheetDocument > xDoc( aSource, uno::UNO_QUERY );
- return getWorkbook( mxContext, xDoc );
+ uno::Reference< sheet::XSpreadsheetDocument > xDoc( aSource, uno::UNO_QUERY_THROW );
+ return getWorkbook( mxContext, xDoc, Application() );
}
uno::Any SAL_CALL
ScVbaWorkbooks::Add() throw (uno::RuntimeException)
{
- uno::Reference< lang::XMultiComponentFactory > xSMgr(
- mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
-
- uno::Reference< frame::XComponentLoader > xLoader(
- xSMgr->createInstanceWithContext(
- ::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop"),
- mxContext), uno::UNO_QUERY_THROW );
- uno::Reference< lang::XComponent > xComponent = xLoader->loadComponentFromURL(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("private:factory/scalc") ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("_blank") ), 0,
- uno::Sequence< beans::PropertyValue >(0) );
- uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( xComponent, uno::UNO_QUERY_THROW );
+ uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( VbaDocumentsBase::Add() , uno::UNO_QUERY_THROW );
if( xSpreadDoc.is() )
- return getWorkbook( mxContext, xSpreadDoc );
+ return getWorkbook( mxContext, xSpreadDoc, Application() );
return uno::Any();
}
void
ScVbaWorkbooks::Close() throw (uno::RuntimeException)
{
- uno::Reference< lang::XMultiComponentFactory > xSMgr(
- mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
- uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
- rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:CloseDoc"));
- dispatchRequests(xModel,url);
+ VbaDocumentsBase::Close();
}
bool
@@ -337,24 +176,15 @@ uno::Any
ScVbaWorkbooks::Open( const rtl::OUString& rFileName, const uno::Any& /*UpdateLinks*/, const uno::Any& ReadOnly, const uno::Any& Format, const uno::Any& /*Password*/, const uno::Any& /*WriteResPassword*/, const uno::Any& /*IgnoreReadOnlyRecommended*/, const uno::Any& /*Origin*/, const uno::Any& Delimiter, const uno::Any& /*Editable*/, const uno::Any& /*Notify*/, const uno::Any& /*Converter*/, const uno::Any& /*AddToMru*/ ) throw (uno::RuntimeException)
{
// we need to detect if this is a URL, if not then assume its a file path
- rtl::OUString aURL;
- INetURLObject aObj;
+ rtl::OUString aURL;
+ INetURLObject aObj;
aObj.SetURL( rFileName );
bool bIsURL = aObj.GetProtocol() != INET_PROT_NOT_VALID;
if ( bIsURL )
aURL = rFileName;
else
osl::FileBase::getFileURLFromSystemPath( rFileName, aURL );
- uno::Reference< lang::XMultiComponentFactory > xSMgr(
- mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
- uno::Reference< frame::XDesktop > xDesktop
- (xSMgr->createInstanceWithContext(::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop") , mxContext),
- uno::UNO_QUERY_THROW );
- uno::Reference< frame::XComponentLoader > xLoader(
- xSMgr->createInstanceWithContext(
- ::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop"),
- mxContext),
- uno::UNO_QUERY_THROW );
+
uno::Sequence< beans::PropertyValue > sProps(0);
sal_Int32 nIndex = 0;
@@ -421,30 +251,20 @@ ScVbaWorkbooks::Open( const rtl::OUString& rFileName, const uno::Any& /*UpdateLi
else if ( !isSpreadSheetFile( sType ) )
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Bad Format")), uno::Reference< uno::XInterface >() );
- if ( ReadOnly.hasValue() )
- {
- sal_Bool bIsReadOnly = sal_False; ReadOnly >>= bIsReadOnly;
- if ( bIsReadOnly )
- {
- static const rtl::OUString sReadOnly( RTL_CONSTASCII_USTRINGPARAM("ReadOnly") );
- sProps.realloc( sProps.getLength() + 1 );
- sProps[ nIndex ].Name = sReadOnly;
- sProps[ nIndex++ ].Value = uno::makeAny( (sal_Bool)sal_True );
- }
- }
-
- uno::Reference< lang::XComponent > xComponent = xLoader->loadComponentFromURL( aURL,
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("_default") ),
- frame::FrameSearchFlag::CREATE,
- sProps);
- uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( xComponent, uno::UNO_QUERY_THROW );
- uno::Any aRet = getWorkbook( mxContext, xSpreadDoc );
+ uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( VbaDocumentsBase::Open( rFileName, ReadOnly, sProps ), uno::UNO_QUERY_THROW );
+ uno::Any aRet = getWorkbook( mxContext, xSpreadDoc, Application() );
uno::Reference< excel::XWorkbook > xWBook( aRet, uno::UNO_QUERY );
if ( xWBook.is() )
xWBook->Activate();
return aRet;
}
+uno::Any
+ScVbaWorkbooks::Open( const rtl::OUString& Filename, const uno::Any& ReadOnly, const uno::Sequence< beans::PropertyValue >& rProps ) throw (css::uno::RuntimeException)
+{
+ return VbaDocumentsBase::Open( Filename, ReadOnly, rProps );
+}
+
rtl::OUString&
ScVbaWorkbooks::getServiceImplName()
{
diff --git a/sc/source/ui/vba/vbaworkbooks.hxx b/sc/source/ui/vba/vbaworkbooks.hxx
index cf766b04e688..891a8a333695 100644
--- a/sc/source/ui/vba/vbaworkbooks.hxx
+++ b/sc/source/ui/vba/vbaworkbooks.hxx
@@ -31,21 +31,20 @@
#define SC_VBA_WORKBOOKS_HXX
-#include "vbacollectionimpl.hxx"
-#include <ooo/vba/XGlobals.hpp>
+#include <vbahelper/vbacollectionimpl.hxx>
#include <ooo/vba/excel/XWorkbooks.hpp>
#include <com/sun/star/container/XEnumerationAccess.hpp>
-#include "vbahelper.hxx"
+#include <vbahelper/vbadocumentsbase.hxx>
+#include "excelvbahelper.hxx"
class ScModelObj;
-typedef CollTestImplHelper< ov::excel::XWorkbooks > ScVbaWorkbooks_BASE;
+typedef cppu::ImplInheritanceHelper1< VbaDocumentsBase, ov::excel::XWorkbooks > ScVbaWorkbooks_BASE;
class ScVbaWorkbooks : public ScVbaWorkbooks_BASE
{
private:
- css::uno::Reference< ov::XGlobals > getGlobals() throw (css::uno::RuntimeException);
rtl::OUString getFileFilterType( const rtl::OUString& rString );
bool isTextFile( const rtl::OUString& rString );
bool isSpreadSheetFile( const rtl::OUString& rString );
@@ -68,6 +67,8 @@ public:
virtual void SAL_CALL Close( ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL Open( const ::rtl::OUString& Filename, const css::uno::Any& UpdateLinks, const css::uno::Any& ReadOnly, const css::uno::Any& Format, const css::uno::Any& Password, const css::uno::Any& WriteResPassword, const css::uno::Any& IgnoreReadOnlyRecommended, const css::uno::Any& Origin, const css::uno::Any& Delimiter, const css::uno::Any& Editable, const css::uno::Any& Notify, const css::uno::Any& Converter, const css::uno::Any& AddToMru ) throw (css::uno::RuntimeException);
+ // VbaDocumentsBase / XDocumentsBase (to avoid warning C4266 for hiding function on wntmsci)
+ virtual css::uno::Any SAL_CALL Open( const ::rtl::OUString& Filename, const css::uno::Any& ReadOnly, const css::uno::Sequence< css::beans::PropertyValue >& rProps ) throw (css::uno::RuntimeException);
};
#endif /* SC_VBA_WORKBOOKS_HXX */
diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx
index cd75ebd9af40..c382ffeb8afe 100644
--- a/sc/source/ui/vba/vbaworksheet.cxx
+++ b/sc/source/ui/vba/vbaworksheet.cxx
@@ -27,11 +27,12 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#include "helperdecl.hxx"
+#include <vbahelper/helperdecl.hxx>
#include <cppuhelper/queryinterface.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XIntrospectionAccess.hpp>
+#include <com/sun/star/beans/XIntrospection.hpp>
#include <com/sun/star/container/XNamed.hpp>
#include <com/sun/star/util/XProtectable.hpp>
#include <com/sun/star/table/XCellRange.hpp>
@@ -58,6 +59,8 @@
#include <com/sun/star/drawing/XControlShape.hpp>
#include <com/sun/star/form/FormComponentType.hpp>
#include <com/sun/star/form/XFormsSupplier.hpp>
+#include <ooo/vba/excel/XlEnableSelection.hpp>
+#include <ooo/vba/XControlProvider.hpp>
#include <comphelper/processfactory.hxx>
@@ -82,10 +85,9 @@
#include "vbaworksheet.hxx"
#include "vbachartobjects.hxx"
#include "vbapivottables.hxx"
-#include "vbacombobox.hxx"
#include "vbaoleobject.hxx"
#include "vbaoleobjects.hxx"
-#include "vbashapes.hxx"
+#include <vbahelper/vbashapes.hxx>
#include "vbapagesetup.hxx"
#include "vbapagebreaks.hxx"
@@ -94,7 +96,7 @@
#define DOESNOTEXIST -1
using namespace com::sun::star;
using namespace ooo::vba;
-static bool
+bool
nameExists( uno::Reference <sheet::XSpreadsheetDocument>& xSpreadDoc, ::rtl::OUString & name, SCTAB& nTab ) throw ( lang::IllegalArgumentException )
{
if (!xSpreadDoc.is())
@@ -257,6 +259,83 @@ ScVbaWorksheet::getIndex() throw (uno::RuntimeException)
return getSheetID() + 1;
}
+sal_Int32
+ScVbaWorksheet::getEnableSelection() throw (uno::RuntimeException)
+{
+ uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( getModel(), uno::UNO_QUERY_THROW );
+ SCTAB nTab = 0;
+ rtl::OUString aSheetName = getName();
+ bool bSheetExists = 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);
+ sal_Bool bLockedCells = sal_False;
+ sal_Bool bUnlockedCells = sal_False;
+ if( pProtect )
+ {
+ bLockedCells = pProtect->isOptionEnabled(ScTableProtection::SELECT_LOCKED_CELLS);
+ bUnlockedCells = pProtect->isOptionEnabled(ScTableProtection::SELECT_UNLOCKED_CELLS);
+ }
+ if( bLockedCells )
+ return excel::XlEnableSelection::xlNoRestrictions;
+ if( bUnlockedCells )
+ return excel::XlEnableSelection::xlUnlockedCells;
+ return excel::XlEnableSelection::xlNoSelection;
+ }
+ else
+ throw uno::RuntimeException(::rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM( "Sheet Name does not exist. ") ),
+ uno::Reference< XInterface >() );
+ return excel::XlEnableSelection::xlNoSelection;
+}
+
+
+void
+ScVbaWorksheet::setEnableSelection( sal_Int32 nSelection ) throw (uno::RuntimeException)
+{
+ if( (nSelection != excel::XlEnableSelection::xlNoRestrictions) &&
+ (nSelection != excel::XlEnableSelection::xlUnlockedCells) &&
+ (nSelection != excel::XlEnableSelection::xlNoSelection) )
+ {
+ DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
+ }
+
+ uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( getModel(), uno::UNO_QUERY_THROW );
+ SCTAB nTab = 0;
+ rtl::OUString aSheetName = getName();
+ bool bSheetExists = 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);
+ // default is xlNoSelection
+ sal_Bool bLockedCells = sal_False;
+ sal_Bool bUnlockedCells = sal_False;
+ if( nSelection == excel::XlEnableSelection::xlNoRestrictions )
+ {
+ bLockedCells = sal_True;
+ bUnlockedCells = sal_True;
+ }
+ else if( nSelection == excel::XlEnableSelection::xlUnlockedCells )
+ {
+ bUnlockedCells = sal_True;
+ }
+ if( pProtect )
+ {
+ pProtect->setOption( ScTableProtection::SELECT_LOCKED_CELLS, bLockedCells );
+ pProtect->setOption( ScTableProtection::SELECT_UNLOCKED_CELLS, bUnlockedCells );
+ }
+ }
+ else
+ throw uno::RuntimeException(::rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM( "Sheet Name does not exist. ") ),
+ uno::Reference< XInterface >() );
+
+}
+
uno::Reference< excel::XRange >
ScVbaWorksheet::getUsedRange() throw (uno::RuntimeException)
{
@@ -292,6 +371,16 @@ ScVbaWorksheet::HPageBreaks( const uno::Any& aIndex ) throw (uno::RuntimeExcepti
return uno::makeAny( xHPageBreaks );
}
+uno::Any
+ScVbaWorksheet::VPageBreaks( const uno::Any& aIndex ) throw ( uno::RuntimeException )
+{
+ uno::Reference< sheet::XSheetPageBreak > xSheetPageBreak( getSheet(), uno::UNO_QUERY_THROW );
+ uno::Reference< excel::XVPageBreaks > xVPageBreaks( new ScVbaVPageBreaks( this, mxContext, xSheetPageBreak ) );
+ if( aIndex.hasValue() )
+ return xVPageBreaks->Item( aIndex, uno::Any());
+ return uno::makeAny( xVPageBreaks );
+}
+
sal_Int32
ScVbaWorksheet::getStandardWidth() throw (uno::RuntimeException)
{
@@ -353,11 +442,11 @@ ScVbaWorksheet::Move( const uno::Any& Before, const uno::Any& After ) throw (uno
uno::Reference<excel::XRange> xRange = new ScVbaRange( this, mxContext, xRange1);
if (xRange.is())
xRange->Select();
- implnCopy();
+ excel::implnCopy(mxModel);
uno::Reference<frame::XModel> xModel = openNewDoc(aCurrSheetName);
if (xModel.is())
{
- implnPaste();
+ excel::implnPaste(xModel);
Delete();
}
return ;
@@ -391,11 +480,11 @@ ScVbaWorksheet::Copy( const uno::Any& Before, const uno::Any& After ) throw (uno
uno::Reference<excel::XRange> xRange = new ScVbaRange( this, mxContext, xRange1);
if (xRange.is())
xRange->Select();
- implnCopy();
+ excel::implnCopy(mxModel);
uno::Reference<frame::XModel> xModel = openNewDoc(aCurrSheetName);
if (xModel.is())
{
- implnPaste();
+ excel::implnPaste(xModel);
}
return;
}
@@ -424,7 +513,7 @@ ScVbaWorksheet::Paste( const uno::Any& Destination, const uno::Any& /*Link*/ ) t
uno::Reference<excel::XRange> xRange( Destination, uno::UNO_QUERY );
if ( xRange.is() )
xRange->Select();
- implnPaste();
+ excel::implnPaste( mxModel );
}
void
@@ -624,7 +713,7 @@ ScVbaWorksheet::Shapes( const uno::Any& aIndex ) throw (uno::RuntimeException)
uno::Reference< drawing::XShapes > xShapes( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW );
uno::Reference< container::XIndexAccess > xIndexAccess( xShapes, uno::UNO_QUERY_THROW );
- uno::Reference< msforms::XShapes> xVbaShapes( new ScVbaShapes( this, mxContext, xIndexAccess ) );
+ uno::Reference< msforms::XShapes> xVbaShapes( new ScVbaShapes( this, mxContext, xIndexAccess, getModel() ) );
if ( aIndex.hasValue() )
return xVbaShapes->Item( aIndex, uno::Any() );
return uno::makeAny( xVbaShapes );
@@ -635,7 +724,7 @@ ScVbaWorksheet::ShowDataForm( ) throw (uno::RuntimeException)
{
#ifdef VBA_OOBUILD_HACK
uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_QUERY_THROW );
- ScTabViewShell* pTabViewShell = getBestViewShell( xModel );
+ ScTabViewShell* pTabViewShell = excel::getBestViewShell( xModel );
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "ScAbstractFactory create fail!");//CHINA001
@@ -676,16 +765,18 @@ ScVbaWorksheet::invoke( const ::rtl::OUString& aFunctionName, const uno::Sequenc
}
void SAL_CALL
-ScVbaWorksheet::setValue( const ::rtl::OUString& /*aPropertyName*/, const uno::Any& /*aValue*/ ) throw (beans::UnknownPropertyException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException)
+ScVbaWorksheet::setValue( const ::rtl::OUString& aPropertyName, const uno::Any& aValue ) throw (beans::UnknownPropertyException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException)
{
- throw uno::RuntimeException(); // unsupported operation
+ setDefaultPropByIntrospection( uno::makeAny( getValue( aPropertyName ) ), aValue );
}
uno::Any SAL_CALL
ScVbaWorksheet::getValue( const ::rtl::OUString& aPropertyName ) throw (beans::UnknownPropertyException, uno::RuntimeException)
{
uno::Reference< drawing::XControlShape > xControlShape( getControlShape( aPropertyName ), uno::UNO_QUERY_THROW );
- ScVbaControlFactory controlFactory( mxContext, xControlShape, getModel() );
- uno::Reference< msforms::XControl > xControl( controlFactory.createControl( getModel() ) );
+
+ uno::Reference<lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
+ uno::Reference< XControlProvider > xControlProvider( xServiceManager->createInstanceWithContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.ControlProvider" ) ), mxContext ), uno::UNO_QUERY_THROW );
+ uno::Reference< msforms::XControl > xControl( xControlProvider->createControl( xControlShape, getModel() ) );
return uno::makeAny( xControl );
}
@@ -869,10 +960,9 @@ ScVbaWorksheet::PrintOut( const uno::Any& From, const uno::Any& To, const uno::A
bSelection = sal_True;
uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_QUERY_THROW );
- PrintOutHelper( From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName, xModel, bSelection );
+ PrintOutHelper( excel::getBestViewShell( xModel ), From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName, bSelection );
}
-
namespace worksheet
{
namespace sdecl = comphelper::service_decl;
diff --git a/sc/source/ui/vba/vbaworksheet.hxx b/sc/source/ui/vba/vbaworksheet.hxx
index 8fdee639c7c1..da88e1c4b06f 100644
--- a/sc/source/ui/vba/vbaworksheet.hxx
+++ b/sc/source/ui/vba/vbaworksheet.hxx
@@ -44,9 +44,11 @@
#include <ooo/vba/excel/XOutline.hpp>
#include <ooo/vba/excel/XPageSetup.hpp>
#include <ooo/vba/excel/XHPageBreaks.hpp>
+#include <ooo/vba/excel/XVPageBreaks.hpp>
#include <ooo/vba/excel/XChartObjects.hpp>
-#include "vbahelperinterface.hxx"
+#include <vbahelper/vbahelperinterface.hxx>
+#include "address.hxx"
typedef InheritedHelperInterfaceImpl1< ov::excel::XWorksheet > WorksheetImpl_BASE;
@@ -93,9 +95,12 @@ public:
virtual css::uno::Reference< ov::excel::XOutline > SAL_CALL Outline( ) throw (css::uno::RuntimeException);
virtual css::uno::Reference< ov::excel::XPageSetup > SAL_CALL PageSetup( ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL HPageBreaks( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL VPageBreaks( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL getNext() throw (css::uno::RuntimeException);
virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL getPrevious() throw (css::uno::RuntimeException);
virtual sal_Int16 SAL_CALL getIndex() throw (css::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getEnableSelection() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setEnableSelection( sal_Int32 nSelection ) throw (css::uno::RuntimeException);
// Methods
virtual void SAL_CALL Activate() throw (css::uno::RuntimeException);
diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx
index 546eda854056..dca004a74e65 100644
--- a/sc/source/ui/vba/vbaworksheets.cxx
+++ b/sc/source/ui/vba/vbaworksheets.cxx
@@ -35,8 +35,8 @@
#include <sfx2/request.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/itemwrapper.hxx>
-#include <svtools/itemset.hxx>
-#include <svtools/eitem.hxx>
+#include <svl/itemset.hxx>
+#include <svl/eitem.hxx>
#include <comphelper/processfactory.hxx>
#include <cppuhelper/implbase3.hxx>
@@ -209,16 +209,29 @@ ScVbaWorksheets::Add( const uno::Any& Before, const uno::Any& After,
Count >>= nNewSheets;
Type >>= nType;
SCTAB nCount = 0;
- Before >>= aStringSheet;
- if (!aStringSheet.getLength())
+
+ uno::Reference< excel::XWorksheet > xBeforeAfterSheet;
+
+ if ( Before.hasValue() )
{
- After >>= aStringSheet;
+ if ( Before >>= xBeforeAfterSheet )
+ aStringSheet = xBeforeAfterSheet->getName();
+ else
+ Before >>= aStringSheet;
+ }
+
+ if (!aStringSheet.getLength() && After.hasValue() )
+ {
+ if ( After >>= xBeforeAfterSheet )
+ aStringSheet = xBeforeAfterSheet->getName();
+ else
+ After >>= aStringSheet;
bBefore = sal_False;
}
if (!aStringSheet.getLength())
{
- aStringSheet = ScVbaGlobals::getGlobalsImpl(
- mxContext )->getApplication()->getActiveWorkbook()->getActiveSheet()->getName();
+ uno::Reference< excel::XApplication > xApplication( Application(), uno::UNO_QUERY_THROW );
+ aStringSheet = xApplication->getActiveWorkbook()->getActiveSheet()->getName();
bBefore = sal_True;
}
nCount = static_cast< SCTAB >( m_xIndexAccess->getCount() );
@@ -252,7 +265,9 @@ ScVbaWorksheets::Add( const uno::Any& Before, const uno::Any& After,
m_xSheets->insertNewByName(aStringName, nSheetIndex + i);
result = getItemByStringIndex( aStringName );
}
-
+ uno::Reference< excel::XWorksheet > xNewSheet( result, uno::UNO_QUERY );
+ if ( xNewSheet.is() )
+ xNewSheet->Activate();
return result;
}
@@ -295,7 +310,7 @@ ScVbaWorksheets::PrintOut( const uno::Any& From, const uno::Any& To, const uno::
if ( isSelectedSheets() )
bSelection = sal_True;
- PrintOutHelper( From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName, mxModel, bSelection );
+ PrintOutHelper( excel::getBestViewShell( mxModel ), From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName, bSelection );
}
uno::Any SAL_CALL
@@ -336,7 +351,7 @@ ScVbaWorksheets::setVisible( const uno::Any& _visible ) throw (uno::RuntimeExcep
void SAL_CALL
ScVbaWorksheets::Select( const uno::Any& Replace ) throw (uno::RuntimeException)
{
- ScTabViewShell* pViewShell = getBestViewShell( mxModel );
+ ScTabViewShell* pViewShell = excel::getBestViewShell( mxModel );
if ( !pViewShell )
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cannot obtain view shell" ) ), uno::Reference< uno::XInterface >() );
diff --git a/sc/source/ui/vba/vbaworksheets.hxx b/sc/source/ui/vba/vbaworksheets.hxx
index 0cb2a4f33971..e816e8ecf212 100644
--- a/sc/source/ui/vba/vbaworksheets.hxx
+++ b/sc/source/ui/vba/vbaworksheets.hxx
@@ -36,9 +36,8 @@
#include <com/sun/star/sheet/XSpreadsheets.hpp>
#include <com/sun/star/container/XEnumerationAccess.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <ooo/vba/XGlobals.hpp>
-#include "vbacollectionimpl.hxx"
+#include <vbahelper/vbacollectionimpl.hxx>
class ScModelObj;
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index c2d0f68fc6ef..e9116b19c87b 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -35,10 +35,10 @@
#include "scitems.hxx"
-#include <svtools/slstitm.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/whiter.hxx>
-#include <svtools/moduleoptions.hxx>
+#include <svl/slstitm.hxx>
+#include <svl/stritem.hxx>
+#include <svl/whiter.hxx>
+#include <unotools/moduleoptions.hxx>
#include <svtools/cliplistener.hxx>
#include <svtools/insdlg.hxx>
#include <sot/formats.hxx>
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index f610e28b3fc5..6bdf172b9fb5 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -55,10 +55,10 @@
#include <sfx2/viewfrm.hxx>
#define _ZFORLIST_DECLARE_TABLE
-#include <svtools/stritem.hxx>
-#include <svtools/whiter.hxx>
-#include <svtools/zforlist.hxx>
-#include <svtools/zformat.hxx>
+#include <svl/stritem.hxx>
+#include <svl/whiter.hxx>
+#include <svl/zforlist.hxx>
+#include <svl/zformat.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/request.hxx>
#include <vcl/msgbox.hxx>
@@ -70,7 +70,7 @@
#include <sfx2/passwd.hxx>
#include <svx/hlnkitem.hxx>
#include <basic/sbxcore.hxx>
-#include <svtools/useroptions.hxx>
+#include <unotools/useroptions.hxx>
#include <vcl/waitobj.hxx>
#include <unotools/localedatawrapper.hxx>
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 039e4dc256ba..cf64a07a2d95 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -41,14 +41,14 @@
#include <sfx2/viewfrm.hxx>
#include <sfx2/app.hxx>
#include <sfx2/request.hxx>
-#include <svtools/aeitem.hxx>
+#include <svl/aeitem.hxx>
#include <basic/sbxcore.hxx>
-#include <svtools/whiter.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/whiter.hxx>
+#include <svl/zforlist.hxx>
#include <vcl/msgbox.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/visitem.hxx>
-#include <svtools/moduleoptions.hxx>
+#include <svl/stritem.hxx>
+#include <svl/visitem.hxx>
+#include <unotools/moduleoptions.hxx>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
#include <com/sun/star/sdbc/XResultSet.hpp>
@@ -209,6 +209,18 @@ BOOL lcl_GetSortParam( const ScViewData* pData, ScSortParam& rSortParam )
return bSort;
}
+//<!-- Added by PengYunQuan for Validity Cell Range Picker
+//after end execute from !IsModalInputMode, it is safer to delay deleting
+namespace
+{
+ long DelayDeleteAbstractDialog( void *pAbstractDialog, void * /*pArg*/ )
+ {
+ delete reinterpret_cast<VclAbstractDialog*>( pAbstractDialog );
+ return 0;
+ }
+}
+//--> Added by PengYunQuan for Validity Cell Range Picker
+
void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
@@ -1060,10 +1072,18 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
//CHINA001 ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
//CHINA001 DBG_ASSERT(pFact, "ScAbstractFactory create fail!");//CHINA001
- SfxAbstractTabDialog* pDlg = pFact->CreateScValidationDlg( NULL, &aArgSet, TAB_DLG_VALIDATION );
+ //<!--Modified by PengYunQuan for Validity Cell Range Picker
+ //SfxAbstractTabDialog* pDlg = pFact->CreateScValidationDlg( NULL, &aArgSet, TAB_DLG_VALIDATION );
+ SfxAbstractTabDialog* pDlg = pFact->CreateScValidationDlg( NULL, &aArgSet, TAB_DLG_VALIDATION, pTabViewShell );
+ //-->Modified by PengYunQuan for Validity Cell Range Picker
DBG_ASSERT(pDlg, "Dialog create fail!");//CHINA001
- if ( pDlg->Execute() == RET_OK )
+ //<!--Modified by PengYunQuan for Validity Cell Range Picker
+ //if ( pDlg->Execute() == RET_OK )
+ short nResult = pDlg->Execute();
+ pTabViewShell->SetTabNo( nTab );//When picking Cell Range ,other Tab may be switched. Need restore the correct tab
+ if ( nResult == RET_OK )
+ //-->Modified by PengYunQuan for Validity Cell Range Picker
{
const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
@@ -1142,7 +1162,11 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
pTabViewShell->SetValidation( aData );
rReq.Done( *pOutSet );
}
- delete pDlg;
+ //<!-- Modified by PengYunQuan for Validity Cell Range Picker
+ //after end execute from !IsModalInputMode, it is safer to delay deleting
+ //delete pDlg;
+ Application::PostUserEvent( Link( pDlg, &DelayDeleteAbstractDialog ) );
+ //--> Modified by PengYunQuan for Validity Cell Range Picker
}
}
break;
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index dd79bb52a112..2f96aec815fb 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -40,7 +40,7 @@
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/request.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <vcl/msgbox.hxx>
#include <sfx2/app.hxx>
#include "globstr.hrc"
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index 36667ee43c0f..5fd4a5f470f5 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -42,7 +42,7 @@
#include <vcl/msgbox.hxx>
#include <vcl/sound.hxx>
#include <vcl/waitobj.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <sfx2/app.hxx>
#include <com/sun/star/sheet/DataPilotFieldOrientation.hpp>
#include <com/sun/star/sheet/DataPilotFieldSortMode.hpp>
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 022eabdc11cf..b0f2197ad826 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -64,12 +64,12 @@
#include <sfx2/viewfrm.hxx>
#include <sot/exchange.hxx>
#include <svtools/cliplistener.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/whiter.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/sound.hxx>
#include <sot/formats.hxx>
#include <svtools/transfer.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#define _EDITSH_CXX
#include "editsh.hxx"
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 36f6c682832f..fb83ed5624d6 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -60,13 +60,13 @@
#include <sfx2/viewfrm.hxx>
#include <sfx2/objface.hxx>
#include <sfx2/request.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/whiter.hxx>
#include <vcl/msgbox.hxx>
#define _ZFORLIST_DECLARE_TABLE
-#include <svtools/stritem.hxx>
-#include <svtools/zformat.hxx>
-#include <svtools/languageoptions.hxx>
+#include <svl/stritem.hxx>
+#include <svl/zformat.hxx>
+#include <svl/languageoptions.hxx>
#include <svx/boxitem.hxx>
#include <svx/langitem.hxx>
#include <svx/numinf.hxx>
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index de2b962f3272..aca88c554317 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -45,10 +45,10 @@
#include <sfx2/dispatch.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/docfile.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <svtools/svlbox.hxx>
#include <svtools/svtabbx.hxx>
-#include <svtools/urlbmk.hxx>
+#include <svl/urlbmk.hxx>
#include <tools/urlobj.hxx>
#include <vcl/cursor.hxx>
#include <vcl/sound.hxx>
diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx
index 5d87806076ab..6683a75e777b 100644
--- a/sc/source/ui/view/gridwin3.cxx
+++ b/sc/source/ui/view/gridwin3.cxx
@@ -39,7 +39,7 @@
#include <svx/svdpagv.hxx>
#include <svx/sizeitem.hxx>
#include <sfx2/bindings.hxx>
-#include <svtools/ptitem.hxx>
+#include <svl/ptitem.hxx>
#include "tabvwsh.hxx"
#include "gridwin.hxx"
diff --git a/sc/source/ui/view/makefile.mk b/sc/source/ui/view/makefile.mk
index 466ab5dc8627..d8f45c8a754f 100644
--- a/sc/source/ui/view/makefile.mk
+++ b/sc/source/ui/view/makefile.mk
@@ -161,7 +161,8 @@ EXCEPTIONSFILES= \
$(SLO)$/tabvwshb.obj \
$(SLO)$/viewdata.obj \
$(SLO)$/viewfun5.obj \
- $(SLO)$/viewfun7.obj
+ $(SLO)$/viewfun7.obj \
+ $(SLO)$/reffact.obj
# goal seek -O2
diff --git a/sc/source/ui/view/notemark.cxx b/sc/source/ui/view/notemark.cxx
index 2c50a8eb0a81..419124596147 100644
--- a/sc/source/ui/view/notemark.cxx
+++ b/sc/source/ui/view/notemark.cxx
@@ -36,8 +36,8 @@
#include <svx/svdpage.hxx>
#include <svx/svdocapt.hxx>
#include <sfx2/printer.hxx>
-#include <svtools/pathoptions.hxx>
-#include <svtools/itempool.hxx>
+#include <unotools/pathoptions.hxx>
+#include <svl/itempool.hxx>
#include <vcl/svapp.hxx>
#include "notemark.hxx"
diff --git a/sc/source/ui/view/olinewin.cxx b/sc/source/ui/view/olinewin.cxx
index 5ac563987e65..6e5535361653 100644
--- a/sc/source/ui/view/olinewin.cxx
+++ b/sc/source/ui/view/olinewin.cxx
@@ -167,7 +167,7 @@ void ScOutlineWindow::InitSettings()
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
SetBackground( rStyleSettings.GetFaceColor() );
maLineColor = rStyleSettings.GetButtonTextColor();
- mpSymbols = ScGlobal::GetOutlineSymbols( !!GetBackground().GetColor().IsDark() );
+ mpSymbols = ScGlobal::GetOutlineSymbols( rStyleSettings.GetHighContrastMode() );
Invalidate();
}
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index f5688171b145..700c32e4698f 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -55,7 +55,7 @@
#include <svx/scripttypeitem.hxx>
#include <svx/udlnitem.hxx>
#include <svx/unolingu.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <vcl/svapp.hxx>
#include <vcl/metric.hxx>
#include <vcl/outdev.hxx>
@@ -63,7 +63,7 @@
#ifndef _SVSTDARR_USHORTS
#define _SVSTDARR_USHORTS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
#include "output.hxx"
diff --git a/sc/source/ui/view/output3.cxx b/sc/source/ui/view/output3.cxx
index 648573bbb21c..c4c51fb3f02a 100644
--- a/sc/source/ui/view/output3.cxx
+++ b/sc/source/ui/view/output3.cxx
@@ -50,10 +50,6 @@
#include "tabvwsh.hxx"
#include "fillinfo.hxx"
-
-#ifdef IRIX
-#include <basic/sbx.hxx>
-#endif
#include <svx/fmview.hxx>
// STATIC DATA -----------------------------------------------------------
diff --git a/sc/source/ui/view/pgbrksh.cxx b/sc/source/ui/view/pgbrksh.cxx
index 421e76eaa8ce..3ab72f37ac35 100644
--- a/sc/source/ui/view/pgbrksh.cxx
+++ b/sc/source/ui/view/pgbrksh.cxx
@@ -41,7 +41,7 @@
#include <sfx2/objface.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/request.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/whiter.hxx>
#include "pgbrksh.hxx"
#include "tabvwsh.hxx"
diff --git a/sc/source/ui/view/pivotsh.cxx b/sc/source/ui/view/pivotsh.cxx
index 273b8965451e..2039934a6e45 100644
--- a/sc/source/ui/view/pivotsh.cxx
+++ b/sc/source/ui/view/pivotsh.cxx
@@ -41,7 +41,7 @@
#include <sfx2/objface.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/request.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/whiter.hxx>
#include <vcl/msgbox.hxx>
#include "sc.hrc"
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index b94837fc1793..31121f35aa1b 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -47,7 +47,7 @@
#include <sfx2/viewfrm.hxx>
#include <sfx2/dispatch.hxx>
#include <svtools/accessibilityoptions.hxx>
-#include <svtools/itemset.hxx>
+#include <svl/itemset.hxx>
#include <tools/multisel.hxx>
#include <vcl/waitobj.hxx>
#include <vcl/sound.hxx>
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 360c05e2f84a..ebe58f5a0efc 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -49,8 +49,8 @@
#include <sfx2/request.hxx>
#include <sfx2/topfrm.hxx>
#include <svtools/printdlg.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/stritem.hxx>
+#include <svl/whiter.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/help.hxx>
#include <tools/urlobj.hxx>
@@ -705,7 +705,7 @@ void __EXPORT ScPreviewShell::Execute( SfxRequest& rReq )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
- AbstractSvxZoomDialog* pDlg = pFact->CreateSvxZoomDialog(NULL, aSet, RID_SVXDLG_ZOOM);
+ AbstractSvxZoomDialog* pDlg = pFact->CreateSvxZoomDialog(NULL, aSet);
DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001
pDlg->SetLimits( 20, 400 );
pDlg->HideButton( ZOOMBTN_OPTIMAL );
diff --git a/sc/source/ui/view/prevwsh2.cxx b/sc/source/ui/view/prevwsh2.cxx
index 157f4bffa4ec..58dc2d913c58 100644
--- a/sc/source/ui/view/prevwsh2.cxx
+++ b/sc/source/ui/view/prevwsh2.cxx
@@ -300,7 +300,7 @@
// INCLUDE ---------------------------------------------------------------
#include <svx/svdmodel.hxx>
-#include <svtools/smplhint.hxx>
+#include <svl/smplhint.hxx>
#include "prevwsh.hxx"
#include "docsh.hxx"
diff --git a/sc/source/ui/view/reffact.cxx b/sc/source/ui/view/reffact.cxx
index 66f9cb88fb2c..8b36ae6a480e 100644
--- a/sc/source/ui/view/reffact.cxx
+++ b/sc/source/ui/view/reffact.cxx
@@ -47,6 +47,9 @@
#include "acredlin.hxx"
#include "simpref.hxx"
#include "scmod.hxx"
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+#include "validate.hxx"
+//<!--Added by PengYunQuan for Validity Cell Range Picker
// -----------------------------------------------------------------------
@@ -71,6 +74,27 @@ SFX_IMPL_CHILDWINDOW(ScFunctionDlgWrapper, SID_OPENDLG_FUNCTION )
SFX_IMPL_CHILDWINDOW(ScEditFunctionDlgWrapper, SID_OPENDLG_EDITFUNCTION )
SFX_IMPL_CHILDWINDOW(ScArgumentDlgWrapper, SID_OPENDLG_ARGUMENT )
*/
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+//SFX_IMPL_MODELESSDIALOG(ScValidityRefChildWin, SID_VALIDITY_REFERENCE )
+SFX_IMPL_CHILDWINDOW(ScValidityRefChildWin, SID_VALIDITY_REFERENCE)
+SfxChildWinInfo __EXPORT ScValidityRefChildWin::GetInfo() const
+{
+ SfxChildWinInfo anInfo = SfxChildWindow::GetInfo();
+
+ if( Window *pWnd = GetWindow() )
+ {
+ anInfo.aSize = pWnd->GetSizePixel();
+
+ if( pWnd->IsDialog() )
+ if ( static_cast<Dialog*>(pWnd)->IsRollUp() )
+ anInfo.nFlags |= SFX_CHILDWIN_ZOOMIN;
+ }
+
+ return anInfo;
+}
+
+namespace { ScTabViewShell * lcl_GetTabViewShell( SfxBindings *pBindings ); }
+//<!--Added by PengYunQuan for Validity Cell Range Picker
#define IMPL_CHILD_CTOR(Class,sid) \
Class::Class( Window* pParentP, \
@@ -79,8 +103,17 @@ SFX_IMPL_CHILDWINDOW(ScArgumentDlgWrapper, SID_OPENDLG_ARGUMENT )
SfxChildWinInfo* pInfo ) \
: SfxChildWindow(pParentP, nId) \
{ \
- ScTabViewShell* pViewShell = \
- PTR_CAST( ScTabViewShell, SfxViewShell::Current() ); \
+ /*//<!--Added by PengYunQuan for Validity Cell Range Picker*/\
+ /************************************************************************************/\
+ /* When a new document is creating, the SfxViewFrame may be ready, */\
+ /* But the ScTabViewShell may have not been activated yet. In this */\
+ /* situation, SfxViewShell::Current() does not get the correct shell, */\
+ /* and we should lcl_GetTabViewShell( p ) instead of SfxViewShell::Current() */\
+ /************************************************************************************/\
+ ScTabViewShell* pViewShell = lcl_GetTabViewShell( p ); \
+ /*//-->Added by PengYunQuan for Validity Cell Range Picker*/\
+ if (!pViewShell) \
+ pViewShell = PTR_CAST( ScTabViewShell, SfxViewShell::Current() ); \
DBG_ASSERT( pViewShell, "missing view shell :-(" ); \
pWindow = pViewShell ? \
pViewShell->CreateRefDialog( p, this, pInfo, pParentP, sid ) : NULL; \
@@ -355,3 +388,50 @@ IMPL_CHILD_CTOR( ScHighlightChgDlgWrapper, FID_CHG_SHOW )
/*------------------------------------------------------------------------*/
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+namespace
+{
+ ScTabViewShell * lcl_GetTabViewShell( SfxBindings *pBindings )
+ {
+ if( pBindings )
+ if( SfxDispatcher* pDisp = pBindings ->GetDispatcher() )
+ if( SfxViewFrame *pFrm = pDisp->GetFrame() )
+ if( SfxViewShell* pViewSh = pFrm->GetViewShell() )
+ return dynamic_cast<ScTabViewShell*>( pViewSh );
+
+ return NULL;
+ }
+}
+
+ScValidityRefChildWin::ScValidityRefChildWin( Window* pParentP, \
+ USHORT nId, \
+ SfxBindings* p, \
+ SfxChildWinInfo* /*pInfo*/ ) \
+ : SfxChildWindow(pParentP, nId),
+ m_bVisibleLock( false ),
+ m_bFreeWindowLock( false ),
+ m_pSavedWndParent( NULL )
+{
+ SetWantsFocus( FALSE );\
+ ScTabViewShell* pViewShell = \
+ NULL != ( pWindow = ScValidationDlg::Find1AliveObject( pParentP ) ) ? static_cast<ScValidationDlg*>(pWindow)->GetTabViewShell() :
+ lcl_GetTabViewShell( p );
+ if (!pViewShell)
+ pViewShell = PTR_CAST( ScTabViewShell, SfxViewShell::Current() );
+ DBG_ASSERT( pViewShell, "missing view shell :-(" ); \
+ if (pViewShell && !pWindow) \
+ pViewShell->GetViewFrame()->SetChildWindow( nId, FALSE ); \
+ else if( pWindow /*&& pWindow->ISA(ScValidationDlg)*/ )
+ {}//pWindow = new Window( pParentP, WB_HIDE );
+
+ if( pWindow ) m_pSavedWndParent = pWindow->GetParent();
+}
+
+ScValidityRefChildWin::~ScValidityRefChildWin()
+{
+ if( pWindow ) pWindow->SetParent( m_pSavedWndParent );
+
+ if( m_bFreeWindowLock )
+ pWindow = NULL;
+}
+//-->Added by PengYunQuan for Validity Cell Range Picker
diff --git a/sc/source/ui/view/tabvwsh.cxx b/sc/source/ui/view/tabvwsh.cxx
index 497eb65fc76f..4c73d14d51be 100644
--- a/sc/source/ui/view/tabvwsh.cxx
+++ b/sc/source/ui/view/tabvwsh.cxx
@@ -96,6 +96,10 @@ SFX_IMPL_INTERFACE(ScTabViewShell,SfxViewShell,ScResId(SCSTR_TABVIEWSHELL))
SFX_CHILDWINDOW_REGISTRATION(GalleryChildWindow::GetChildWindowId());
SFX_CHILDWINDOW_REGISTRATION(ScSpellDialogChildWindow::GetChildWindowId());
SFX_CHILDWINDOW_REGISTRATION( ::avmedia::MediaPlayer::GetChildWindowId() );
+
+ //<!--Added by PengYunQuan for Validity Cell Range Picker
+ SFX_CHILDWINDOW_REGISTRATION(ScValidityRefChildWin::GetChildWindowId());
+ //-->Added by PengYunQuan for Validity Cell Range Picker
}
SFX_IMPL_VIEWFACTORY( ScTabViewShell, ScResId(STR_NONAME) )
diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index db6ee302a792..08b7f5f4ad85 100644
--- a/sc/source/ui/view/tabvwsh2.cxx
+++ b/sc/source/ui/view/tabvwsh2.cxx
@@ -41,10 +41,10 @@
#include <sfx2/bindings.hxx>
#include <sfx2/viewfrm.hxx>
-#include <svtools/aeitem.hxx>
-#include <svtools/whiter.hxx>
-#include <svtools/moduleoptions.hxx>
-#include <svtools/languageoptions.hxx>
+#include <svl/aeitem.hxx>
+#include <svl/whiter.hxx>
+#include <unotools/moduleoptions.hxx>
+#include <svl/languageoptions.hxx>
#include <sfx2/dispatch.hxx>
#include "tabvwsh.hxx"
@@ -67,7 +67,7 @@
// #98185# Create default drawing objects via keyboard
#include <svx/svdpagv.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <svx/svdpage.hxx>
#include <fuconcustomshape.hxx>
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index 525ea1f14578..c2812fdc4446 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -45,8 +45,8 @@
#include <sfx2/passwd.hxx>
#include <sfx2/request.hxx>
#include <sfx2/topfrm.hxx>
-#include <svtools/ptitem.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/ptitem.hxx>
+#include <svl/stritem.hxx>
#include <tools/urlobj.hxx>
#include <vcl/msgbox.hxx>
@@ -78,9 +78,9 @@
#include "tabprotection.hxx"
#include "protectiondlg.hxx"
-#include <svtools/ilstitem.hxx>
+#include <svl/ilstitem.hxx>
#define _SVSTDARR_ULONGS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <svx/zoomslideritem.hxx>
#include <svx/svxdlg.hxx> //CHINA001
@@ -693,7 +693,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
- pDlg = pFact->CreateSvxZoomDialog(GetDialogParent(), aSet, RID_SVXDLG_ZOOM);
+ pDlg = pFact->CreateSvxZoomDialog(GetDialogParent(), aSet );
DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001
}
pDlg->SetLimits( MINZOOM, MAXZOOM );
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index e34741ba4c6b..359c34ec3685 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -51,8 +51,8 @@
#include <sfx2/printer.hxx>
#include <sfx2/dispatch.hxx>
#include <svtools/printdlg.hxx>
-#include <svtools/whiter.hxx>
-#include <svtools/moduleoptions.hxx>
+#include <svl/whiter.hxx>
+#include <unotools/moduleoptions.hxx>
#include <rtl/logfile.hxx>
#include <tools/urlobj.hxx>
#include <sfx2/docfile.hxx>
diff --git a/sc/source/ui/view/tabvwsh5.cxx b/sc/source/ui/view/tabvwsh5.cxx
index 92cf03cdf5d6..a870171450ad 100644
--- a/sc/source/ui/view/tabvwsh5.cxx
+++ b/sc/source/ui/view/tabvwsh5.cxx
@@ -36,8 +36,8 @@
// INCLUDE ---------------------------------------------------------------
#define _ZFORLIST_DECLARE_TABLE
#include "scitems.hxx"
-#include <svtools/smplhint.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/smplhint.hxx>
+#include <svl/zforlist.hxx>
#include <svx/numfmtsh.hxx>
#include <svx/numinf.hxx>
#include <svx/svxids.hrc>
diff --git a/sc/source/ui/view/tabvwsh9.cxx b/sc/source/ui/view/tabvwsh9.cxx
index 7562e7d592a0..d3020756bbb5 100644
--- a/sc/source/ui/view/tabvwsh9.cxx
+++ b/sc/source/ui/view/tabvwsh9.cxx
@@ -44,7 +44,7 @@
#include <sfx2/request.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/dispatch.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/whiter.hxx>
#include <avmedia/mediaplayer.hxx>
#include "tabvwsh.hxx"
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index 9e844f970909..63f876cccf34 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -37,10 +37,10 @@
#define _ZFORLIST_DECLARE_TABLE
#include "scitems.hxx"
-#include <svtools/slstitm.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/whiter.hxx>
-#include <svtools/zformat.hxx>
+#include <svl/slstitm.hxx>
+#include <svl/stritem.hxx>
+#include <svl/whiter.hxx>
+#include <svl/zformat.hxx>
#include <svx/boxitem.hxx>
#include <svx/numinf.hxx>
#include <svx/srchitem.hxx>
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index 37dc2c11da7f..72ffe6d5ab10 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -63,9 +63,9 @@
#include <sfx2/dispatch.hxx>
#include <sfx2/viewfrm.hxx>
#include <svtools/soerr.hxx>
-#include <svtools/rectitem.hxx>
-#include <svtools/whiter.hxx>
-#include <svtools/moduleoptions.hxx>
+#include <svl/rectitem.hxx>
+#include <svl/whiter.hxx>
+#include <unotools/moduleoptions.hxx>
#include <sot/exchange.hxx>
#include "tabvwsh.hxx"
diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx
index 8eafd476d00d..9866a5aa0a0a 100644
--- a/sc/source/ui/view/tabvwshe.cxx
+++ b/sc/source/ui/view/tabvwshe.cxx
@@ -45,7 +45,7 @@
#include <sfx2/viewfrm.hxx>
#include <sfx2/request.hxx>
#include <sfx2/objface.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <vcl/sound.hxx>
#include "tabvwsh.hxx"
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index 5a2471c8fc05..4d877178fe0b 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -39,9 +39,9 @@
#include <sfx2/request.hxx>
#include <basic/sbstar.hxx>
#include <layout/layout.hxx>
-#include <svtools/languageoptions.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/languageoptions.hxx>
+#include <svl/stritem.hxx>
+#include <svl/whiter.hxx>
#include <vcl/msgbox.hxx>
#include "tabvwsh.hxx"
diff --git a/sc/source/ui/view/tabvwshh.cxx b/sc/source/ui/view/tabvwshh.cxx
index 7526a3de19bd..2d3ffc75340b 100644
--- a/sc/source/ui/view/tabvwshh.cxx
+++ b/sc/source/ui/view/tabvwshh.cxx
@@ -42,7 +42,7 @@
#include <sfx2/objsh.hxx>
#include <sfx2/request.hxx>
#include <basic/sbxcore.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/whiter.hxx>
#include <vcl/msgbox.hxx>
#include "tabvwsh.hxx"
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 288e52fa7668..c59aabab3796 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -640,68 +640,147 @@ void ScViewData::SetViewShell( ScTabViewShell* pViewSh )
pView = NULL;
}
}
+void ScViewData::CreateTabData( std::vector< SCTAB >& rvTabs )
+{
+ std::vector< SCTAB >::iterator it_end = rvTabs.end();
+ for ( std::vector< SCTAB >::iterator it = rvTabs.begin(); it != it_end; ++it )
+ if ( !pTabData[*it] )
+ CreateTabData( *it );
+}
-void ScViewData::SetZoomType( SvxZoomType eNew, BOOL bAll )
+void ScViewData::SetZoomType( SvxZoomType eNew, std::vector< SCTAB >& tabs )
{
- if ( !bAll )
- CreateSelectedTabData(); // if zoom is set for a table, it must be stored
+ BOOL bAll = ( tabs.size() == 0 );
- for ( SCTAB i = 0; i <= MAXTAB; i++ )
- if ( pTabData[i] && ( bAll || aMarkData.GetTableSelect(i) ) )
- pTabData[i]->eZoomType = eNew;
+ if ( !bAll ) // create associated table data
+ CreateTabData( tabs );
if ( bAll )
+ {
+ for ( SCTAB i = 0; i <= MAXTAB; ++i )
+ {
+ if ( pTabData[i] )
+ pTabData[i]->eZoomType = eNew;
+ }
eDefZoomType = eNew;
+ }
+ else
+ {
+ std::vector< SCTAB >::iterator it_end = tabs.end();
+ std::vector< SCTAB >::iterator it = tabs.begin();
+ for ( ; it != it_end; ++it )
+ {
+ SCTAB i = *it;
+ if ( pTabData[i] )
+ pTabData[i]->eZoomType = eNew;
+ }
+ }
}
-void ScViewData::SetZoom( const Fraction& rNewX, const Fraction& rNewY, BOOL bAll )
+void ScViewData::SetZoomType( SvxZoomType eNew, BOOL bAll )
{
- if ( !bAll )
- CreateSelectedTabData(); // if zoom is set for a table, it must be stored
+ std::vector< SCTAB > vTabs; // Empty for all tabs
+ if ( !bAll ) // get selected tabs
+ {
+ SCTAB nTabCount = pDoc->GetTableCount();
+ for (SCTAB i=0; i<nTabCount; i++)
+ {
+ if ( aMarkData.GetTableSelect(i) )
+ vTabs.push_back( i );
+ }
+ }
+ SetZoomType( eNew, vTabs );
+}
+void ScViewData::SetZoom( const Fraction& rNewX, const Fraction& rNewY, std::vector< SCTAB >& tabs )
+{
+ BOOL bAll = ( tabs.size() == 0 );
+ if ( !bAll ) // create associated table data
+ CreateTabData( tabs );
Fraction aFrac20( 1,5 );
Fraction aFrac400( 4,1 );
Fraction aValidX = rNewX;
- if (aValidX<aFrac20) aValidX = aFrac20;
- if (aValidX>aFrac400) aValidX = aFrac400;
+ if (aValidX<aFrac20)
+ aValidX = aFrac20;
+ if (aValidX>aFrac400)
+ aValidX = aFrac400;
Fraction aValidY = rNewY;
- if (aValidY<aFrac20) aValidY = aFrac20;
- if (aValidY>aFrac400) aValidY = aFrac400;
+ if (aValidY<aFrac20)
+ aValidY = aFrac20;
+ if (aValidY>aFrac400)
+ aValidY = aFrac400;
- if ( bPagebreak )
+ if ( bAll )
{
- for ( SCTAB i = 0; i <= MAXTAB; i++ )
- if ( pTabData[i] && ( bAll || aMarkData.GetTableSelect(i) ) )
+ for ( SCTAB i = 0; i <= MAXTAB; ++i )
+ {
+ if ( pTabData[i] )
{
- pTabData[i]->aPageZoomX = aValidX;
- pTabData[i]->aPageZoomY = aValidY;
+ if ( bPagebreak )
+ {
+ pTabData[i]->aPageZoomX = aValidX;
+ pTabData[i]->aPageZoomY = aValidY;
+ }
+ else
+ {
+ pTabData[i]->aZoomX = aValidX;
+ pTabData[i]->aZoomY = aValidY;
+ }
}
- if ( bAll )
+ }
+ if ( bPagebreak )
{
aDefPageZoomX = aValidX;
aDefPageZoomY = aValidY;
}
+ else
+ {
+ aDefZoomX = aValidX;
+ aDefZoomY = aValidY;
+ }
}
else
{
- for ( SCTAB i = 0; i <= MAXTAB; i++ )
- if ( pTabData[i] && ( bAll || aMarkData.GetTableSelect(i) ) )
+ std::vector< SCTAB >::iterator it_end = tabs.end();
+ std::vector< SCTAB >::iterator it = tabs.begin();
+ for ( ; it != it_end; ++it )
+ {
+ SCTAB i = *it;
+ if ( pTabData[i] )
{
- pTabData[i]->aZoomX = aValidX;
- pTabData[i]->aZoomY = aValidY;
+ if ( bPagebreak )
+ {
+ pTabData[i]->aPageZoomX = aValidX;
+ pTabData[i]->aPageZoomY = aValidY;
+ }
+ else
+ {
+ pTabData[i]->aZoomX = aValidX;
+ pTabData[i]->aZoomY = aValidY;
+ }
}
- if ( bAll )
- {
- aDefZoomX = aValidX;
- aDefZoomY = aValidY;
}
}
-
RefreshZoom();
}
+void ScViewData::SetZoom( const Fraction& rNewX, const Fraction& rNewY, BOOL bAll )
+{
+ std::vector< SCTAB > vTabs;
+ if ( !bAll ) // get selected tabs
+ {
+ SCTAB nTabCount = pDoc->GetTableCount();
+ for (SCTAB i=0; i<nTabCount; i++)
+ {
+ if ( aMarkData.GetTableSelect(i) )
+ vTabs.push_back( i );
+ }
+ }
+ SetZoom( rNewX, rNewY, vTabs );
+}
+
void ScViewData::RefreshZoom()
{
// recalculate zoom-dependent values (only for current sheet)
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index db6023c86f47..68ce5049217b 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -50,9 +50,9 @@
#include <sfx2/docfile.hxx>
#include <sfx2/objitem.hxx>
#include <sfx2/viewfrm.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/zforlist.hxx>
-#include <svtools/svstdarr.hxx>
+#include <svl/stritem.hxx>
+#include <svl/zforlist.hxx>
+#include <svl/svstdarr.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/sound.hxx>
#include <vcl/waitobj.hxx>
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 3065aa2fd4e1..3327ea3fe88d 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -173,9 +173,9 @@
#include <svx/svdetc.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/docfile.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/ptitem.hxx>
-#include <svtools/urlbmk.hxx>
+#include <svl/stritem.hxx>
+#include <svl/ptitem.hxx>
+#include <svl/urlbmk.hxx>
#include <sot/clsids.hxx>
#include <sot/formats.hxx>
#include <vcl/graph.hxx>
diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx
index 578f6c1fe733..b57653af5f9b 100644
--- a/sc/source/ui/view/viewfun4.cxx
+++ b/sc/source/ui/view/viewfun4.cxx
@@ -54,9 +54,9 @@
#include <sfx2/fcontnr.hxx>
#include <svtools/langtab.hxx>
#include <svtools/filter.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <svtools/transfer.hxx>
-#include <svtools/urlbmk.hxx>
+#include <svl/urlbmk.hxx>
#include <vcl/msgbox.hxx>
#include <avmedia/mediawindow.hxx>
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index 35af3ee2a2e3..0b429a21b6d3 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -53,9 +53,9 @@
#include <sot/clsids.hxx>
#include <sot/formats.hxx>
#include <sot/filelist.hxx>
-#include <svtools/pathoptions.hxx>
-#include <svtools/ptitem.hxx>
-#include <svtools/stritem.hxx>
+#include <unotools/pathoptions.hxx>
+#include <svl/ptitem.hxx>
+#include <svl/stritem.hxx>
#include <svtools/transfer.hxx>
#include <vcl/graph.hxx>
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 79343c31f85b..a3e695e7a3f8 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -48,8 +48,8 @@
#include <svx/langitem.hxx>
#include <svx/scripttypeitem.hxx>
#include <sfx2/bindings.hxx>
-#include <svtools/zforlist.hxx>
-#include <svtools/zformat.hxx>
+#include <svl/zforlist.hxx>
+#include <svl/zformat.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/sound.hxx>
#include <vcl/virdev.hxx>
diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx
index d0a6f2acf015..cc51c48f67ed 100644
--- a/sc/source/ui/view/viewutil.cxx
+++ b/sc/source/ui/view/viewutil.cxx
@@ -43,17 +43,17 @@
#include <svx/fontitem.hxx>
#include <svx/langitem.hxx>
#include <svx/scripttypeitem.hxx>
-#include <svtools/itempool.hxx>
-#include <svtools/itemset.hxx>
-#include <svtools/cjkoptions.hxx>
-#include <svtools/ctloptions.hxx>
+#include <svl/itempool.hxx>
+#include <svl/itemset.hxx>
+#include <svl/cjkoptions.hxx>
+#include <svl/ctloptions.hxx>
#include <vcl/svapp.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/wrkwin.hxx>
#include <sfx2/request.hxx>
#include <sfx2/objsh.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/eitem.hxx>
+#include <svl/stritem.hxx>
+#include <svl/eitem.hxx>
#include <com/sun/star/i18n/TransliterationModules.hpp>
diff --git a/sc/util/makefile.mk b/sc/util/makefile.mk
index b3b438b8f345..f9280629f9a0 100644
--- a/sc/util/makefile.mk
+++ b/sc/util/makefile.mk
@@ -41,10 +41,6 @@ USE_DEFFILE=TRUE
.INCLUDE : settings.mk
-.IF "$(OS)"=="IRIX"
-LINKFLAGS+=-Wl,-LD_LAYOUT:lgot_buffer=30
-.ENDIF
-
# --- Resourcen ----------------------------------------------------
RESLIB1LIST=\
@@ -78,6 +74,7 @@ SHL1IMPLIB= sci
# dynamic libraries
SHL1STDLIBS= \
+ $(VBAHELPERLIB) \
$(BASICLIB) \
$(SFXLIB) \
$(SVTOOLLIB) \
@@ -189,7 +186,7 @@ SHL6STDLIBS= \
$(SVTOOLLIB) \
$(SVLLIB) \
$(SVXCORELIB) \
- $(SVXMSFILTERLIB) \
+ $(MSFILTERLIB) \
$(SVXLIB) \
$(BASEGFXLIB) \
$(DRAWINGLAYERLIB) \
@@ -229,8 +226,9 @@ SHL8STDLIBS= \
$(I18NISOLANGLIB) \
$(COMPHELPERLIB) \
$(CPPULIB) \
- $(SALLIB)
-
+ $(SALLIB) \
+ $(FORLIB) \
+ $(FORUILIB)
.IF "$(ENABLE_LAYOUT)" == "TRUE"
SHL8STDLIBS+=$(TKLIB)
.ENDIF # ENABLE_LAYOUT == TRUE
@@ -301,6 +299,7 @@ SHL9RPATH=OOO
.ENDIF
SHL9STDLIBS= \
+ $(VBAHELPERLIB) \
$(CPPUHELPERLIB) \
$(VCLLIB) \
$(CPPULIB) \
@@ -316,6 +315,7 @@ SHL9STDLIBS= \
$(ISCLIB) \
$(VCLLIB) \
$(TKLIB) \
+ $(SVXMSFILTERLIB) \
$(FORLIB)
SHL9DEPN=$(SHL1TARGETN) $(SHL8TARGETN)
diff --git a/sc/workben/addin.cxx b/sc/workben/addin.cxx
index 8520fb1337fe..527ae01b5c01 100644
--- a/sc/workben/addin.cxx
+++ b/sc/workben/addin.cxx
@@ -39,7 +39,7 @@
#include <vcl/svapp.hxx>
#include <tools/debug.hxx>
#include <tools/date.hxx>
-#include <svtools/itemprop.hxx>
+#include <svl/itemprop.hxx>
#include <usr/proptypehlp.hxx>
#include <cppuhelper/factory.hxx>
#include <uno/lbnames.h>
diff --git a/sc/workben/result.hxx b/sc/workben/result.hxx
index 15b04a386399..9b901f93db22 100644
--- a/sc/workben/result.hxx
+++ b/sc/workben/result.hxx
@@ -31,7 +31,7 @@
#ifndef SC_RESULT_HXX
#define SC_RESULT_HXX
-#include <svtools/svarray.hxx>
+#include <svl/svarray.hxx>
#include <vcl/timer.hxx>
#include <tools/string.hxx>