summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/Library_sc.mk1
-rw-r--r--sc/Library_scfilt.mk1
-rw-r--r--sc/UIConfig_scalc.mk1
-rw-r--r--sc/functions_setup.mk1
-rw-r--r--sc/inc/ChartTools.hxx4
-rw-r--r--sc/inc/FilterData.hxx8
-rw-r--r--sc/inc/calcmacros.hxx3
-rw-r--r--sc/inc/colorscale.hxx4
-rw-r--r--sc/inc/dbdata.hxx26
-rw-r--r--sc/inc/document.hxx14
-rw-r--r--sc/inc/docuno.hxx3
-rw-r--r--sc/inc/editutil.hxx8
-rw-r--r--sc/inc/global.hxx1
-rw-r--r--sc/inc/globstr.hrc1
-rw-r--r--sc/inc/kahan.hxx6
-rw-r--r--sc/inc/patattr.hxx6
-rw-r--r--sc/inc/scextopt.hxx1
-rw-r--r--sc/inc/textuno.hxx4
-rw-r--r--sc/qa/uitest/autofilter/tdf164014.py156
-rw-r--r--sc/qa/uitest/calc_tests8/tdf125051.py11
-rw-r--r--sc/qa/uitest/calc_tests9/tdf133629.py3
-rw-r--r--sc/qa/uitest/chart2/tdf167859.py54
-rw-r--r--sc/qa/uitest/chart2/tdf167988.py49
-rw-r--r--sc/qa/uitest/conditional_format/tdf117899.py3
-rw-r--r--sc/qa/uitest/data/autofilter/tdf164014.odsbin0 -> 11858 bytes
-rw-r--r--sc/qa/uitest/data/tdf167859.odsbin0 -> 18272 bytes
-rw-r--r--sc/qa/uitest/data/tdf167988.odsbin0 -> 37232 bytes
-rw-r--r--sc/qa/unit/data/fods/lookup_source.fods656
-rw-r--r--sc/qa/unit/data/fods/lookup_target.fods1488
-rw-r--r--sc/qa/unit/data/functions/spreadsheet/fods/xmatch.fods236
-rw-r--r--sc/qa/unit/data/ods/tdf108244.odsbin0 -> 8039 bytes
-rw-r--r--sc/qa/unit/data/xlsb/tdf94627.xlsbbin0 -> 8129 bytes
-rw-r--r--sc/qa/unit/data/xlsx/tdf118668.xlsxbin0 -> 26753 bytes
-rw-r--r--sc/qa/unit/data/xlsx/tdf122336.xlsxbin0 -> 2561 bytes
-rw-r--r--sc/qa/unit/data/xlsx/tdf167689_xmlMaps_and_xmlColumnPr.xlsxbin0 -> 6042 bytes
-rw-r--r--sc/qa/unit/helper/csv_handler.hxx2
-rw-r--r--sc/qa/unit/helper/qahelper.cxx41
-rw-r--r--sc/qa/unit/helper/sctestviewcallback.cxx2
-rw-r--r--sc/qa/unit/helper/sctiledrenderingtest.cxx2
-rw-r--r--sc/qa/unit/pivottable_filters_test.cxx69
-rw-r--r--sc/qa/unit/subsequent_export_test.cxx104
-rw-r--r--sc/qa/unit/subsequent_export_test3.cxx96
-rw-r--r--sc/qa/unit/subsequent_export_test4.cxx37
-rw-r--r--sc/qa/unit/subsequent_filters_test2.cxx4
-rw-r--r--sc/qa/unit/subsequent_filters_test5.cxx174
-rw-r--r--sc/qa/unit/tiledrendering/tiledrendering.cxx107
-rw-r--r--sc/qa/unit/tiledrendering/tiledrendering2.cxx2
-rw-r--r--sc/qa/unit/ucalc.cxx106
-rw-r--r--sc/qa/unit/ucalc_DocumentThemes.cxx4
-rw-r--r--sc/qa/unit/ucalc_condformat.cxx4
-rw-r--r--sc/qa/unit/ucalc_copypaste.cxx41
-rw-r--r--sc/qa/unit/ucalc_formula.cxx61
-rw-r--r--sc/qa/unit/ucalc_formula2.cxx33
-rw-r--r--sc/qa/unit/ucalc_sharedformula.cxx11
-rw-r--r--sc/qa/unit/ucalc_sort.cxx27
-rw-r--r--sc/qa/unit/uicalc/data/tdf140027.odsbin0 -> 18065 bytes
-rw-r--r--sc/qa/unit/uicalc/uicalc.cxx26
-rw-r--r--sc/qa/unit/uicalc/uicalc2.cxx24
-rw-r--r--sc/sdi/docsh.sdi2
-rw-r--r--sc/sdi/drawsh.sdi2
-rw-r--r--sc/sdi/drtxtob.sdi1
-rw-r--r--sc/sdi/editsh.sdi1
-rw-r--r--sc/sdi/scalc.sdi2
-rw-r--r--sc/sdi/tabvwsh.sdi30
-rw-r--r--sc/source/core/data/PivotTableFormatOutput.cxx2
-rw-r--r--sc/source/core/data/attarray.cxx45
-rw-r--r--sc/source/core/data/clipcontext.cxx6
-rw-r--r--sc/source/core/data/colorscale.cxx15
-rw-r--r--sc/source/core/data/column.cxx8
-rw-r--r--sc/source/core/data/column2.cxx48
-rw-r--r--sc/source/core/data/column3.cxx20
-rw-r--r--sc/source/core/data/column4.cxx4
-rw-r--r--sc/source/core/data/dociter.cxx12
-rw-r--r--sc/source/core/data/documen2.cxx11
-rw-r--r--sc/source/core/data/documen3.cxx7
-rw-r--r--sc/source/core/data/documen5.cxx2
-rw-r--r--sc/source/core/data/documen8.cxx2
-rw-r--r--sc/source/core/data/document.cxx14
-rw-r--r--sc/source/core/data/document10.cxx18
-rw-r--r--sc/source/core/data/dpcache.cxx32
-rw-r--r--sc/source/core/data/dpfilteredcache.cxx37
-rw-r--r--sc/source/core/data/dpgroup.cxx23
-rw-r--r--sc/source/core/data/dpnumgroupinfo.cxx16
-rw-r--r--sc/source/core/data/dpobject.cxx18
-rw-r--r--sc/source/core/data/dpoutput.cxx13
-rw-r--r--sc/source/core/data/dpoutputgeometry.cxx14
-rw-r--r--sc/source/core/data/dpsave.cxx53
-rw-r--r--sc/source/core/data/dpsdbtab.cxx1
-rw-r--r--sc/source/core/data/dpshttab.cxx1
-rw-r--r--sc/source/core/data/dptabdat.cxx7
-rw-r--r--sc/source/core/data/dptabres.cxx50
-rw-r--r--sc/source/core/data/dptabsrc.cxx17
-rw-r--r--sc/source/core/data/drwlayer.cxx4
-rw-r--r--sc/source/core/data/formulacell.cxx33
-rw-r--r--sc/source/core/data/global.cxx5
-rw-r--r--sc/source/core/data/patattr.cxx80
-rw-r--r--sc/source/core/data/pivot2.cxx11
-rw-r--r--sc/source/core/data/poolcach.cxx4
-rw-r--r--sc/source/core/data/poolhelp.cxx11
-rw-r--r--sc/source/core/data/segmenttree.cxx4
-rw-r--r--sc/source/core/data/stlpool.cxx2
-rw-r--r--sc/source/core/data/table2.cxx9
-rw-r--r--sc/source/core/data/table3.cxx5
-rw-r--r--sc/source/core/data/table4.cxx18
-rw-r--r--sc/source/core/data/table5.cxx21
-rw-r--r--sc/source/core/data/tabprotection.cxx17
-rw-r--r--sc/source/core/inc/poolhelp.hxx2
-rw-r--r--sc/source/core/opencl/formulagroupcl.cxx2
-rw-r--r--sc/source/core/tool/chartarr.cxx6
-rw-r--r--sc/source/core/tool/chartlis.cxx10
-rw-r--r--sc/source/core/tool/compiler.cxx13
-rw-r--r--sc/source/core/tool/detfunc.cxx7
-rw-r--r--sc/source/core/tool/doubleref.cxx9
-rw-r--r--sc/source/core/tool/editutil.cxx16
-rw-r--r--sc/source/core/tool/interpr1.cxx35
-rw-r--r--sc/source/core/tool/interpr2.cxx32
-rw-r--r--sc/source/core/tool/interpr3.cxx79
-rw-r--r--sc/source/core/tool/interpr4.cxx3
-rw-r--r--sc/source/core/tool/interpr5.cxx45
-rw-r--r--sc/source/core/tool/interpr6.cxx6
-rw-r--r--sc/source/core/tool/interpr8.cxx2
-rw-r--r--sc/source/core/tool/rangelst.cxx5
-rw-r--r--sc/source/core/tool/rangenam.cxx3
-rw-r--r--sc/source/core/tool/reftokenhelper.cxx18
-rw-r--r--sc/source/core/tool/scmatrix.cxx19
-rw-r--r--sc/source/core/tool/subtotal.cxx3
-rw-r--r--sc/source/core/tool/token.cxx1
-rw-r--r--sc/source/filter/dif/difimp.cxx2
-rw-r--r--sc/source/filter/excel/excdoc.cxx76
-rw-r--r--sc/source/filter/excel/excform.cxx4
-rw-r--r--sc/source/filter/excel/excform8.cxx4
-rw-r--r--sc/source/filter/excel/impop.cxx2
-rw-r--r--sc/source/filter/excel/xedbdata.cxx23
-rw-r--r--sc/source/filter/excel/xelink.cxx6
-rw-r--r--sc/source/filter/excel/xepage.cxx9
-rw-r--r--sc/source/filter/excel/xestream.cxx15
-rw-r--r--sc/source/filter/excel/xestyle.cxx2
-rw-r--r--sc/source/filter/excel/xeview.cxx4
-rw-r--r--sc/source/filter/excel/xichart.cxx58
-rw-r--r--sc/source/filter/excel/xicontent.cxx23
-rw-r--r--sc/source/filter/excel/xiescher.cxx4
-rw-r--r--sc/source/filter/excel/xilink.cxx3
-rw-r--r--sc/source/filter/excel/xipivot.cxx15
-rw-r--r--sc/source/filter/excel/xistream.cxx2
-rw-r--r--sc/source/filter/excel/xistyle.cxx13
-rw-r--r--sc/source/filter/excel/xlformula.cxx1
-rw-r--r--sc/source/filter/excel/xlroot.cxx1
-rw-r--r--sc/source/filter/excel/xltoolbar.cxx6
-rw-r--r--sc/source/filter/html/htmlexp.cxx2
-rw-r--r--sc/source/filter/inc/condformatbuffer.hxx2
-rw-r--r--sc/source/filter/inc/excimp8.hxx2
-rw-r--r--sc/source/filter/inc/excrecds.hxx40
-rw-r--r--sc/source/filter/inc/exp_op.hxx2
-rw-r--r--sc/source/filter/inc/export/SparklineExt.hxx4
-rw-r--r--sc/source/filter/inc/externallinkbuffer.hxx6
-rw-r--r--sc/source/filter/inc/externallinkfragment.hxx4
-rw-r--r--sc/source/filter/inc/extlstcontext.hxx14
-rw-r--r--sc/source/filter/inc/htmlexp.hxx2
-rw-r--r--sc/source/filter/inc/orcus_utils.hxx16
-rw-r--r--sc/source/filter/inc/orcusinterface.hxx2
-rw-r--r--sc/source/filter/inc/tablecolumnsbuffer.hxx7
-rw-r--r--sc/source/filter/lotus/filter.cxx2
-rw-r--r--sc/source/filter/lotus/lotattr.cxx2
-rw-r--r--sc/source/filter/lotus/lotfilter.hxx4
-rw-r--r--sc/source/filter/lotus/op.cxx2
-rw-r--r--sc/source/filter/lotus/optab.cxx4
-rw-r--r--sc/source/filter/oox/PivotTableFormat.cxx4
-rw-r--r--sc/source/filter/oox/sheetdatacontext.cxx18
-rw-r--r--sc/source/filter/oox/stylesbuffer.cxx6
-rw-r--r--sc/source/filter/oox/tablecolumnsbuffer.cxx28
-rw-r--r--sc/source/filter/oox/tablecolumnscontext.cxx9
-rw-r--r--sc/source/filter/oox/workbookfragment.cxx30
-rw-r--r--sc/source/filter/oox/workbookhelper.cxx1
-rw-r--r--sc/source/filter/oox/worksheetbuffer.cxx2
-rw-r--r--sc/source/filter/oox/worksheethelper.cxx16
-rw-r--r--sc/source/filter/oox/worksheetsettings.cxx2
-rw-r--r--sc/source/filter/orcus/autofilter.cxx6
-rw-r--r--sc/source/filter/orcus/interface.cxx15
-rw-r--r--sc/source/filter/orcus/orcusfiltersimpl.cxx12
-rw-r--r--sc/source/filter/orcus/utils.cxx20
-rw-r--r--sc/source/filter/orcus/xmlcontext.cxx6
-rw-r--r--sc/source/filter/qpro/qprostyle.cxx2
-rw-r--r--sc/source/filter/rtf/eeimpars.cxx4
-rw-r--r--sc/source/filter/rtf/expbase.cxx2
-rw-r--r--sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx4
-rw-r--r--sc/source/filter/xml/XMLExportDatabaseRanges.cxx2
-rw-r--r--sc/source/filter/xml/XMLStylesExportHelper.cxx3
-rw-r--r--sc/source/filter/xml/XMLStylesImportHelper.cxx2
-rw-r--r--sc/source/filter/xml/XMLTableShapeResizer.cxx3
-rw-r--r--sc/source/filter/xml/XMLTrackedChangesContext.cxx3
-rw-r--r--sc/source/filter/xml/xmlcelli.cxx2
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx24
-rw-r--r--sc/source/filter/xml/xmlfonte.cxx2
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx5
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx22
-rw-r--r--sc/source/ui/Accessibility/AccessibleEditObject.cxx36
-rw-r--r--sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx6
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewCell.cxx6
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx6
-rw-r--r--sc/source/ui/Accessibility/AccessibleText.cxx6
-rw-r--r--sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx12
-rw-r--r--sc/source/ui/app/drwtrans.cxx2
-rw-r--r--sc/source/ui/app/inputhdl.cxx2
-rw-r--r--sc/source/ui/app/inputwin.cxx13
-rw-r--r--sc/source/ui/app/transobj.cxx17
-rw-r--r--sc/source/ui/app/typemap.cxx1
-rw-r--r--sc/source/ui/attrdlg/attrdlg.cxx45
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.cxx6
-rw-r--r--sc/source/ui/attrdlg/tabpages.cxx26
-rw-r--r--sc/source/ui/cctrl/dpcontrol.cxx3
-rw-r--r--sc/source/ui/condformat/condformatmgr.cxx2
-rw-r--r--sc/source/ui/dataprovider/csvdataprovider.cxx3
-rw-r--r--sc/source/ui/dataprovider/xmldataprovider.cxx9
-rw-r--r--sc/source/ui/dbgui/PivotLayoutDialog.cxx6
-rw-r--r--sc/source/ui/dbgui/csvcontrol.cxx3
-rw-r--r--sc/source/ui/dbgui/csvtablebox.cxx16
-rw-r--r--sc/source/ui/dbgui/dbnamdlg.cxx3
-rw-r--r--sc/source/ui/dbgui/filtdlg.cxx4
-rw-r--r--sc/source/ui/dbgui/pvfundlg.cxx9
-rw-r--r--sc/source/ui/dbgui/sfiltdlg.cxx3
-rw-r--r--sc/source/ui/dbgui/sortdlg.cxx8
-rw-r--r--sc/source/ui/dbgui/sortkeydlg.cxx4
-rw-r--r--sc/source/ui/dbgui/subtdlg.cxx16
-rw-r--r--sc/source/ui/dbgui/tpsort.cxx2
-rw-r--r--sc/source/ui/dbgui/validate.cxx15
-rw-r--r--sc/source/ui/docshell/arealink.cxx4
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx2
-rw-r--r--sc/source/ui/docshell/dbdocimp.cxx2
-rw-r--r--sc/source/ui/docshell/docfunc.cxx23
-rw-r--r--sc/source/ui/docshell/docsh.cxx13
-rw-r--r--sc/source/ui/docshell/docsh4.cxx148
-rw-r--r--sc/source/ui/docshell/docsh5.cxx17
-rw-r--r--sc/source/ui/docshell/docsh8.cxx10
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx133
-rw-r--r--sc/source/ui/docshell/impex.cxx7
-rw-r--r--sc/source/ui/docshell/macromgr.cxx16
-rw-r--r--sc/source/ui/drawfunc/drawsh.cxx4
-rw-r--r--sc/source/ui/drawfunc/drawsh2.cxx6
-rw-r--r--sc/source/ui/drawfunc/drtxtob.cxx9
-rw-r--r--sc/source/ui/drawfunc/fuconrec.cxx107
-rw-r--r--sc/source/ui/drawfunc/fudraw.cxx1
-rw-r--r--sc/source/ui/formdlg/dwfunctr.cxx87
-rw-r--r--sc/source/ui/formdlg/formula.cxx11
-rw-r--r--sc/source/ui/inc/AccessibleCell.hxx2
-rw-r--r--sc/source/ui/inc/AccessibleCsvControl.hxx6
-rw-r--r--sc/source/ui/inc/AccessibleDocument.hxx2
-rw-r--r--sc/source/ui/inc/AccessibleDocumentPagePreview.hxx2
-rw-r--r--sc/source/ui/inc/AccessibleEditObject.hxx6
-rw-r--r--sc/source/ui/inc/AccessiblePageHeader.hxx2
-rw-r--r--sc/source/ui/inc/AccessiblePageHeaderArea.hxx2
-rw-r--r--sc/source/ui/inc/AccessiblePreviewCell.hxx2
-rw-r--r--sc/source/ui/inc/AccessiblePreviewHeaderCell.hxx2
-rw-r--r--sc/source/ui/inc/PivotLayoutDialog.hxx2
-rw-r--r--sc/source/ui/inc/SparklineRenderer.hxx4
-rw-r--r--sc/source/ui/inc/anyrefdg.hxx5
-rw-r--r--sc/source/ui/inc/areasdlg.hxx4
-rw-r--r--sc/source/ui/inc/crnrdlg.hxx1
-rw-r--r--sc/source/ui/inc/dbfunc.hxx2
-rw-r--r--sc/source/ui/inc/dbnamdlg.hxx1
-rw-r--r--sc/source/ui/inc/dwfunctr.hxx6
-rw-r--r--sc/source/ui/inc/filtdlg.hxx1
-rw-r--r--sc/source/ui/inc/formula.hxx3
-rw-r--r--sc/source/ui/inc/gridwin.hxx2
-rw-r--r--sc/source/ui/inc/hfedtdlg.hxx14
-rw-r--r--sc/source/ui/inc/output.hxx96
-rw-r--r--sc/source/ui/inc/preview.hxx2
-rw-r--r--sc/source/ui/inc/sortkeydlg.hxx8
-rw-r--r--sc/source/ui/inc/tabpages.hxx2
-rw-r--r--sc/source/ui/inc/tabvwsh.hxx7
-rw-r--r--sc/source/ui/inc/tpsort.hxx2
-rw-r--r--sc/source/ui/inc/transobj.hxx2
-rw-r--r--sc/source/ui/inc/validate.hxx2
-rw-r--r--sc/source/ui/inc/viewdata.hxx5
-rw-r--r--sc/source/ui/inc/viewfunc.hxx2
-rw-r--r--sc/source/ui/miscdlgs/anyrefdg.cxx39
-rw-r--r--sc/source/ui/miscdlgs/autofmt.cxx6
-rw-r--r--sc/source/ui/miscdlgs/conflictsdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/crnrdlg.cxx3
-rw-r--r--sc/source/ui/miscdlgs/datafdlg.cxx4
-rw-r--r--sc/source/ui/miscdlgs/highred.cxx2
-rw-r--r--sc/source/ui/miscdlgs/optsolver.cxx10
-rw-r--r--sc/source/ui/miscdlgs/retypepassdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/textdlgs.cxx32
-rw-r--r--sc/source/ui/pagedlg/areasdlg.cxx9
-rw-r--r--sc/source/ui/pagedlg/hfedtdlg.cxx146
-rw-r--r--sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx2
-rw-r--r--sc/source/ui/sidebar/CellLineStyleValueSet.cxx4
-rw-r--r--sc/source/ui/sidebar/ScPanelFactory.cxx2
-rw-r--r--sc/source/ui/sparklines/SparklineList.cxx4
-rw-r--r--sc/source/ui/styleui/styledlg.cxx94
-rw-r--r--sc/source/ui/theme/ThemeColorChanger.cxx2
-rw-r--r--sc/source/ui/undo/undoblk.cxx8
-rw-r--r--sc/source/ui/undo/undoblk3.cxx2
-rw-r--r--sc/source/ui/undo/undocell.cxx2
-rw-r--r--sc/source/ui/undo/undodat.cxx8
-rw-r--r--sc/source/ui/undo/undotab.cxx22
-rw-r--r--sc/source/ui/unoobj/ChartTools.cxx6
-rw-r--r--sc/source/ui/unoobj/TablePivotChart.cxx4
-rw-r--r--sc/source/ui/unoobj/TablePivotCharts.cxx14
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx27
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx234
-rw-r--r--sc/source/ui/unoobj/chartuno.cxx14
-rw-r--r--sc/source/ui/unoobj/dapiuno.cxx2
-rw-r--r--sc/source/ui/unoobj/docuno.cxx13
-rw-r--r--sc/source/ui/unoobj/funcuno.cxx4
-rw-r--r--sc/source/ui/unoobj/linkuno.cxx9
-rw-r--r--sc/source/ui/unoobj/servuno.cxx4
-rw-r--r--sc/source/ui/unoobj/targuno.cxx4
-rw-r--r--sc/source/ui/unoobj/textuno.cxx13
-rw-r--r--sc/source/ui/vba/vbarange.cxx5
-rw-r--r--sc/source/ui/view/cellsh1.cxx120
-rw-r--r--sc/source/ui/view/cellsh2.cxx378
-rw-r--r--sc/source/ui/view/cellsh3.cxx22
-rw-r--r--sc/source/ui/view/dbfunc.cxx5
-rw-r--r--sc/source/ui/view/dbfunc3.cxx7
-rw-r--r--sc/source/ui/view/editsh.cxx16
-rw-r--r--sc/source/ui/view/formatsh.cxx49
-rw-r--r--sc/source/ui/view/gridwin.cxx10
-rw-r--r--sc/source/ui/view/gridwin2.cxx16
-rw-r--r--sc/source/ui/view/gridwin4.cxx114
-rw-r--r--sc/source/ui/view/gridwin5.cxx3
-rw-r--r--sc/source/ui/view/output.cxx897
-rw-r--r--sc/source/ui/view/output2.cxx1680
-rw-r--r--sc/source/ui/view/output3.cxx52
-rw-r--r--sc/source/ui/view/preview.cxx2
-rw-r--r--sc/source/ui/view/spelleng.cxx4
-rw-r--r--sc/source/ui/view/tabsplit.cxx4
-rw-r--r--sc/source/ui/view/tabview.cxx4
-rw-r--r--sc/source/ui/view/tabview3.cxx6
-rw-r--r--sc/source/ui/view/tabvwsh2.cxx56
-rw-r--r--sc/source/ui/view/tabvwsh3.cxx122
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx1
-rw-r--r--sc/source/ui/view/tabvwshc.cxx69
-rw-r--r--sc/source/ui/view/tabvwshf.cxx1
-rw-r--r--sc/source/ui/view/viewdata.cxx11
-rw-r--r--sc/source/ui/view/viewfun2.cxx25
-rw-r--r--sc/source/ui/view/viewfun3.cxx6
-rw-r--r--sc/source/ui/view/viewfun4.cxx1
-rw-r--r--sc/source/ui/view/viewfun5.cxx125
-rw-r--r--sc/source/ui/view/viewfun6.cxx8
-rw-r--r--sc/source/ui/view/viewfunc.cxx421
-rw-r--r--sc/source/ui/xmlsource/xmlsourcedlg.cxx4
-rw-r--r--sc/ucalc_setup.mk1
-rw-r--r--sc/uiconfig/scalc/menubar/menubar.xml1
-rw-r--r--sc/uiconfig/scalc/popupmenu/celledit.xml1
-rw-r--r--sc/uiconfig/scalc/popupmenu/draw.xml1
-rw-r--r--sc/uiconfig/scalc/popupmenu/drawtext.xml1
-rw-r--r--sc/uiconfig/scalc/popupmenu/graphic.xml1
-rw-r--r--sc/uiconfig/scalc/popupmenu/media.xml1
-rw-r--r--sc/uiconfig/scalc/toolbar/connectorsbar.xml55
-rw-r--r--sc/uiconfig/scalc/toolbar/drawbar.xml1
-rw-r--r--sc/uiconfig/scalc/ui/allheaderfooterdialog.ui94
-rw-r--r--sc/uiconfig/scalc/ui/chardialog.ui211
-rw-r--r--sc/uiconfig/scalc/ui/drawtemplatedialog.ui803
-rw-r--r--sc/uiconfig/scalc/ui/footerdialog.ui185
-rw-r--r--sc/uiconfig/scalc/ui/formatcellsdialog.ui427
-rw-r--r--sc/uiconfig/scalc/ui/headerdialog.ui185
-rw-r--r--sc/uiconfig/scalc/ui/headerfooterdialog.ui46
-rw-r--r--sc/uiconfig/scalc/ui/leftfooterdialog.ui22
-rw-r--r--sc/uiconfig/scalc/ui/leftheaderdialog.ui22
-rw-r--r--sc/uiconfig/scalc/ui/notebookbar.ui14
-rw-r--r--sc/uiconfig/scalc/ui/notebookbar_compact.ui10
-rw-r--r--sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui10
-rw-r--r--sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui10
-rw-r--r--sc/uiconfig/scalc/ui/optdlg.ui48
-rw-r--r--sc/uiconfig/scalc/ui/pagetemplatedialog.ui371
-rw-r--r--sc/uiconfig/scalc/ui/paradialog.ui211
-rw-r--r--sc/uiconfig/scalc/ui/paratemplatedialog.ui479
-rw-r--r--sc/uiconfig/scalc/ui/rightfooterdialog.ui22
-rw-r--r--sc/uiconfig/scalc/ui/rightheaderdialog.ui22
-rw-r--r--sc/uiconfig/scalc/ui/sharedfirstfooterdialog.ui141
-rw-r--r--sc/uiconfig/scalc/ui/sharedfirstheaderdialog.ui141
-rw-r--r--sc/uiconfig/scalc/ui/sharedfooterdialog.ui70
-rw-r--r--sc/uiconfig/scalc/ui/sharedheaderdialog.ui70
-rw-r--r--sc/uiconfig/scalc/ui/sharedleftfooterdialog.ui137
-rw-r--r--sc/uiconfig/scalc/ui/sharedleftheaderdialog.ui137
-rw-r--r--sc/uiconfig/scalc/ui/sortdialog.ui46
-rw-r--r--sc/uiconfig/scalc/ui/statisticsinfopage.ui87
-rw-r--r--sc/uiconfig/scalc/ui/subtotaldialog.ui94
-rw-r--r--sc/uiconfig/scalc/ui/validationdialog.ui70
380 files changed, 7830 insertions, 7949 deletions
diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index 6fed08771625..c1bfa620e75d 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -55,6 +55,7 @@ $(eval $(call gb_Library_use_externals,sc,\
icuuc \
libxml2 \
mdds_headers \
+ md4c \
))
ifneq ($(SYSTEM_LIBORCUS),)
diff --git a/sc/Library_scfilt.mk b/sc/Library_scfilt.mk
index e2cd534226d9..5c265503df12 100644
--- a/sc/Library_scfilt.mk
+++ b/sc/Library_scfilt.mk
@@ -240,6 +240,7 @@ $(eval $(call gb_Library_add_exception_objects,scfilt,\
sc/source/filter/orcus/orcusfiltersimpl \
sc/source/filter/orcus/xmlcontext \
sc/source/filter/orcus/filterdetect \
+ sc/source/filter/orcus/utils \
))
# vim: set noet sw=4 ts=4:
diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index 2be15a1a6618..84ff69d9bc3e 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -56,6 +56,7 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/scalc,\
sc/uiconfig/scalc/toolbar/calloutshapes \
sc/uiconfig/scalc/toolbar/classificationbar \
sc/uiconfig/scalc/toolbar/colorbar \
+ sc/uiconfig/scalc/toolbar/connectorsbar \
sc/uiconfig/scalc/toolbar/datastreams \
sc/uiconfig/scalc/toolbar/drawbar \
sc/uiconfig/scalc/toolbar/drawobjectbar \
diff --git a/sc/functions_setup.mk b/sc/functions_setup.mk
index 1c82249ab5fd..2a0c78c8fca9 100644
--- a/sc/functions_setup.mk
+++ b/sc/functions_setup.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,sc_$(1)_functions_test, \
$(eval $(call gb_CppunitTest_use_externals,sc_$(1)_functions_test, \
boost_headers \
mdds_headers \
+ md4c \
))
$(eval $(call gb_CppunitTest_use_libraries,sc_$(1)_functions_test, \
diff --git a/sc/inc/ChartTools.hxx b/sc/inc/ChartTools.hxx
index dbb69e2e8f7a..bcb91b31fe4c 100644
--- a/sc/inc/ChartTools.hxx
+++ b/sc/inc/ChartTools.hxx
@@ -21,7 +21,7 @@
class ScDocShell;
class SdrOle2Obj;
-namespace sc::tools {
+namespace sctools {
enum class ChartSourceType
{
@@ -48,6 +48,6 @@ SdrOle2Obj* getChartByIndex(ScDocShell* pDocShell, SCTAB nTab,
std::vector<SdrOle2Obj*> getAllPivotChartsConnectedTo(std::u16string_view sPivotTableName, ScDocShell& rDocShell);
-} // end sc::tools
+} // end sctools
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/FilterData.hxx b/sc/inc/FilterData.hxx
index fd75350de0d5..82e161738087 100644
--- a/sc/inc/FilterData.hxx
+++ b/sc/inc/FilterData.hxx
@@ -26,6 +26,14 @@ class ScFlatBoolRowSegments;
class ScFlatBoolColSegments;
class ScTable;
+/** Stores and handles which columns and rows are hidden or filtered in a sheet.
+ *
+ * Filtered are the rows or columns that get hidden (filtered) when using the
+ * auto-filter functionality. Hidden is when the user hides the column or row,
+ * manually from the UI or otherwise.
+ *
+ * Note that it is also set as hidden when it is filtered.
+ **/
class FilterData
{
private:
diff --git a/sc/inc/calcmacros.hxx b/sc/inc/calcmacros.hxx
index ebe96654804a..47ac2a97de1f 100644
--- a/sc/inc/calcmacros.hxx
+++ b/sc/inc/calcmacros.hxx
@@ -27,9 +27,6 @@
DUMP_COLUMN_STORAGE || DEBUG_COLUMN_STORAGE || \
DEBUG_FORMULA_COMPILER
#include <iostream>
-using std::cout;
-using std::cerr;
-using std::endl;
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/colorscale.hxx b/sc/inc/colorscale.hxx
index 52425a8d0658..0d1810b9a854 100644
--- a/sc/inc/colorscale.hxx
+++ b/sc/inc/colorscale.hxx
@@ -23,7 +23,7 @@
class ScFormulaCell;
class ScTokenArray;
struct ScDataBarInfo;
-class BitmapEx;
+class Bitmap;
// don't change the order
// they are also used in the dialog to determine the position
@@ -388,7 +388,7 @@ public:
SC_DLLPUBLIC static OUString getIconSetName( ScIconSetType eType );
static sal_Int32 getIconSetElements( ScIconSetType eType );
static OUString getIconName(ScIconSetType eType, sal_Int32 nIndex);
- static BitmapEx& getBitmap(sc::IconSetBitmapMap& rBitmapMap, ScIconSetType eType, sal_Int32 nIndex);
+ static Bitmap& getBitmap(sc::IconSetBitmapMap& rBitmapMap, ScIconSetType eType, sal_Int32 nIndex);
typedef ScIconSetFormatData::Entries_t::iterator iterator;
typedef ScIconSetFormatData::Entries_t::const_iterator const_iterator;
diff --git a/sc/inc/dbdata.hxx b/sc/inc/dbdata.hxx
index 5a587c982b19..ef03c84f227a 100644
--- a/sc/inc/dbdata.hxx
+++ b/sc/inc/dbdata.hxx
@@ -48,6 +48,26 @@ struct TableColumnAttributes
std::optional<OUString> maTotalsFunction = std::nullopt;
};
+// xmlColumnPr attributes
+struct XmlColumnPrModel
+{
+ sal_uInt32 mnMapId;
+ OUString msXpath;
+ OUString msXmlDataType;
+ bool mbDenormalized;
+
+ explicit XmlColumnPrModel();
+};
+
+struct TableColumnModel
+{
+ typedef std::unique_ptr<XmlColumnPrModel> XmlColumnPrModelPtr;
+ XmlColumnPrModelPtr mxXmlColumnPr; // Special settings for XML Column Properties.
+ XmlColumnPrModel& createXmlColumnPr();
+
+ explicit TableColumnModel();
+};
+
/** Container base class to provide selected access for ScDBData. */
class ScDBDataContainerBase
{
@@ -99,6 +119,7 @@ private:
::std::vector< OUString > maTableColumnNames; ///< names of table columns
::std::vector< TableColumnAttributes > maTableColumnAttributes; ///< attributes of table columns
+ ::std::vector< TableColumnModel > maTableColumnModel;
bool mbTableColumnNamesDirty;
SCSIZE nFilteredRowCount;
@@ -155,6 +176,11 @@ public:
SC_DLLPUBLIC const ::std::vector< OUString >& GetTableColumnNames() const { return maTableColumnNames; }
SC_DLLPUBLIC void SetTableColumnAttributes( ::std::vector< TableColumnAttributes >&& rAttributes );
SC_DLLPUBLIC const ::std::vector< TableColumnAttributes >& GetTableColumnAttributes() const { return maTableColumnAttributes; }
+ SC_DLLPUBLIC void SetTableColumnModel( TableColumnModel& rModel )
+ {
+ maTableColumnModel.push_back(std::move(rModel));
+ }
+ SC_DLLPUBLIC const ::std::vector< TableColumnModel >& GetTableColumnModel() const { return maTableColumnModel; }
bool AreTableColumnNamesDirty() const { return mbTableColumnNamesDirty; }
/** Refresh/update the column names with the header row's cell contents. */
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 6c25687ef774..43a8db78c6d0 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -207,6 +207,7 @@ class ScHint;
class SvtBroadcaster;
enum class ScDBDataPortion;
enum class ScSheetEventId;
+class Bitmap;
class BitmapEx;
class ScColumnsRange;
struct ScFilterEntries;
@@ -216,7 +217,7 @@ enum class ScConditionMode;
namespace sc {
-typedef std::map<OUString, BitmapEx> IconSetBitmapMap;
+typedef std::map<OUString, Bitmap> IconSetBitmapMap;
}
@@ -613,6 +614,8 @@ private:
bool mbConnectionXml = false;
bool mbCustomXml = false;
OUString aCustomXmlFragmentPath;
+ bool mbXmlMapsXml = false;
+ std::string sXmlMapsContent;
public:
bool IsCellInChangeTrack(const ScAddress &cell,Color *pColCellBorder);
@@ -629,6 +632,14 @@ public:
const OUString & getCustomXmlItems() { return aCustomXmlFragmentPath; }
bool hasCustomXml() { return mbCustomXml; }
+ void setHasXmlMaps(bool bUse, const std::string& sContent)
+ {
+ mbXmlMapsXml = bUse;
+ sXmlMapsContent = sContent;
+ }
+ const std::string& getXmlMapsItem() { return sXmlMapsContent; }
+ bool hasXmlMaps() { return mbXmlMapsXml; }
+
bool IsEmbedFonts() const { return mbEmbedFonts; }
bool IsEmbedUsedFontsOnly() const { return mbEmbedUsedFontsOnly; }
bool IsEmbedFontScriptLatin() const { return mbEmbedFontScriptLatin; }
@@ -2594,7 +2605,6 @@ public:
void SetInLinkUpdate(bool bSet); // TableLink or AreaLink
bool IsInLinkUpdate() const; // including DdeLink
- SC_DLLPUBLIC SfxItemPool* GetEditTextObjectPool() const;
SC_DLLPUBLIC SfxItemPool* GetEditEnginePool() const;
SC_DLLPUBLIC ScFieldEditEngine& GetEditEngine();
SC_DLLPUBLIC ScNoteEditEngine& GetNoteEngine();
diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx
index 94b6044b2951..5d62c5a13a35 100644
--- a/sc/inc/docuno.hxx
+++ b/sc/inc/docuno.hxx
@@ -364,6 +364,9 @@ public:
/// @see vcl::ITiledRenderable::setClientZoom().
virtual void setClientZoom(int nTilePixelWidth, int nTilePixelHeight, int nTileTwipWidth, int nTileTwipHeight) override;
+ /// @see vcl::ITiledRenderable::setExportZoom().
+ virtual void setExportZoom(int nExportZoom) override;
+
/// @see vcl::ITiledRenderable::setOutlineState().
virtual void setOutlineState(bool bColumn, int nLevel, int nIndex, bool bHidden) override;
diff --git a/sc/inc/editutil.hxx b/sc/inc/editutil.hxx
index 368690019913..b580a811d4da 100644
--- a/sc/inc/editutil.hxx
+++ b/sc/inc/editutil.hxx
@@ -178,8 +178,7 @@ private:
public:
ScFieldEditEngine(
- ScDocument* pDoc, SfxItemPool* pEnginePool, SfxItemPool* pTextObjectPool = nullptr,
- bool bDeleteEnginePool = false);
+ ScDocument* pDoc, SfxItemPool* pEnginePool, bool bDeleteEnginePool = false);
void SetExecuteURL(bool bSet) { bExecuteURL = bSet; }
@@ -195,8 +194,7 @@ private:
public:
ScTabEditEngine( ScDocument& rDoc ); // Default
ScTabEditEngine(const ScPatternAttr& rPattern,
- SfxItemPool *pEngineItemPool, ScDocument& rDoc,
- SfxItemPool* pTextObjectPool = nullptr );
+ SfxItemPool *pEngineItemPool, ScDocument& rDoc );
};
struct ScHeaderFieldData
@@ -232,7 +230,7 @@ class ScNoteEditEngine final : public ScEditEngineDefaulter
{
public:
- ScNoteEditEngine( SfxItemPool* pEnginePool, SfxItemPool* pTextObjectPool );
+ ScNoteEditEngine( SfxItemPool* pEnginePool );
};
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index 7a29f97eb7b6..2bd3d499bef7 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -587,7 +587,6 @@ public:
std::u16string_view rTabName );
SC_DLLPUBLIC static sal_uInt32 GetStandardFormat( ScInterpreterContext&, sal_uInt32 nFormat, SvNumFormatType nType );
- SC_DLLPUBLIC static sal_uInt16 GetStandardRowHeight();
/// Horizontal pixel per twips factor.
SC_DLLPUBLIC static double nScreenPPTX;
/// Vertical pixel per twips factor.
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index f5c88c82be06..e0fddcc07a4a 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -350,7 +350,6 @@
#define STR_SCATTR_PAGE_SCALE_HEIGHT NC_("STR_SCATTR_PAGE_SCALE_HEIGHT", "Height")
#define STR_SCATTR_PAGE_SCALE_PAGES NNC_("STR_SCATTR_PAGE_SCALE_PAGES", "One page", "%1 pages")
#define STR_SCATTR_PAGE_SCALE_AUTO NC_("STR_SCATTR_PAGE_SCALE_AUTO", "automatic")
-#define STR_DOC_STAT NC_("STR_DOC_STAT", "Statistics")
#define STR_LINKERROR NC_("STR_LINKERROR", "The link could not be updated.")
#define STR_LINKERRORFILE NC_("STR_LINKERRORFILE", "File:")
#define STR_LINKERRORTAB NC_("STR_LINKERRORTAB", "Sheet:")
diff --git a/sc/inc/kahan.hxx b/sc/inc/kahan.hxx
index c2560635fbdf..9616a6e9e76b 100644
--- a/sc/inc/kahan.hxx
+++ b/sc/inc/kahan.hxx
@@ -9,6 +9,7 @@
#pragma once
+#include <o3tl/untaint.hxx>
#include <rtl/math.hxx>
#include <cmath>
@@ -215,7 +216,10 @@ public:
inline KahanSum operator*(double fTimes) const { return get() * fTimes; }
- inline KahanSum operator/(const KahanSum& fDivides) const { return get() / fDivides.get(); }
+ inline KahanSum operator/(const KahanSum& fDivides) const
+ {
+ return o3tl::div_allow_zero(get(), fDivides.get());
+ }
inline KahanSum operator/(double fDivides) const { return get() / fDivides; }
diff --git a/sc/inc/patattr.hxx b/sc/inc/patattr.hxx
index e818df60a197..f08c29710267 100644
--- a/sc/inc/patattr.hxx
+++ b/sc/inc/patattr.hxx
@@ -157,7 +157,10 @@ public:
CellAttributeHelper& getCellAttributeHelper() const { return *pCellAttributeHelper; }
const SfxItemSet& GetItemSet() const { return maLocalSfxItemSet; }
- SfxItemSet& GetItemSet() { return maLocalSfxItemSet; }
+ SC_DLLPUBLIC SfxItemSet& GetItemSetWritable();
+ SC_DLLPUBLIC void ItemSetPut(const SfxPoolItem& rItem);
+ void ItemSetPut(std::unique_ptr<SfxPoolItem> xItem);
+ void ItemSetClearItem(sal_uInt16 nWhich);
const SfxPoolItem& GetItem(sal_uInt16 nWhichP) const
{
@@ -281,6 +284,7 @@ private:
sal_uInt32 GetNumberFormatKey() const;
LanguageType GetLanguageType() const;
void InvalidateCaches();
+ void InvalidateCacheFor(sal_uInt16 nWhich);
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/scextopt.hxx b/sc/inc/scextopt.hxx
index 843dfa6ebab0..4a71fdd7dd30 100644
--- a/sc/inc/scextopt.hxx
+++ b/sc/inc/scextopt.hxx
@@ -57,6 +57,7 @@ struct ScExtTabSettings
Color maGridColor; ///< Grid color.
tools::Long mnNormalZoom; ///< Zoom in percent for normal view.
tools::Long mnPageZoom; ///< Zoom in percent for pagebreak preview.
+ std::optional<sal_uInt16> moExportZoom; ///< Zoom in percent - use when NormalZoom isn't accurate
bool mbSelected; ///< true = Sheet is selected.
bool mbFrozenPanes; ///< true = Frozen panes; false = Normal splits.
bool mbPageMode; ///< true = Pagebreak mode; false = Normal view mode.
diff --git a/sc/inc/textuno.hxx b/sc/inc/textuno.hxx
index 87faca864992..673b66d36994 100644
--- a/sc/inc/textuno.hxx
+++ b/sc/inc/textuno.hxx
@@ -298,7 +298,7 @@ class ScSimpleEditSourceHelper
std::unique_ptr<ScSimpleEditSource> pOriginalSource;
public:
- ScSimpleEditSourceHelper();
+ ScSimpleEditSourceHelper(SfxItemPool* pEditEnginePool);
~ScSimpleEditSourceHelper();
ScSimpleEditSource* GetOriginalSource() const { return pOriginalSource.get(); }
@@ -308,7 +308,7 @@ public:
class ScEditEngineTextObj final : public ScSimpleEditSourceHelper, public SvxUnoText
{
public:
- ScEditEngineTextObj();
+ ScEditEngineTextObj(SfxItemPool* pEditEngineItemPool);
virtual ~ScEditEngineTextObj() noexcept override;
void SetText( const EditTextObject& rTextObject );
diff --git a/sc/qa/uitest/autofilter/tdf164014.py b/sc/qa/uitest/autofilter/tdf164014.py
new file mode 100644
index 000000000000..6b536f9135b0
--- /dev/null
+++ b/sc/qa/uitest/autofilter/tdf164014.py
@@ -0,0 +1,156 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from libreoffice.calc.document import is_row_hidden
+from uitest.uihelper.calc import enter_text_to_cell
+from tempfile import TemporaryDirectory
+from org.libreoffice.unotest import systemPathToFileUrl
+import os.path
+
+class AutofilterTest(UITestCase):
+
+ def click_clear_filter_button(self, xMenu):
+ xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
+ xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
+ xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
+ xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
+ xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
+
+ self.assertEqual("Clear Filter", get_state_as_dict(xMenu)['SelectEntryText'])
+ xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"RETURN"}))
+
+ def test_tdf164014(self):
+
+ with TemporaryDirectory() as tempdir:
+ xFilePath = os.path.join(tempdir, "tdf164014-tmp.ods")
+
+ with self.ui_test.load_file(get_url_for_data_file("tdf164014.ods")) as doc:
+
+ self.assertFalse(is_row_hidden(doc, 0))
+
+ for row in range(1, 25):
+ if row == 21 or row == 22:
+ self.assertFalse(is_row_hidden(doc, row))
+ else:
+ self.assertTrue(is_row_hidden(doc, row))
+
+ xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window")
+ xGridWin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", "COL": "0", "ROW": "0"}))
+
+ xFloatWindow = self.xUITest.getFloatWindow()
+ xCheckListMenu = xFloatWindow.getChild("FilterDropDown")
+
+ xTreeList = xCheckListMenu.getChild("check_list_box")
+ self.assertEqual(24, len(xTreeList.getChildren()))
+
+ xEntry1 = xTreeList.getChild(0)
+ self.assertEqual("uutdmtlbwk", get_state_as_dict(xEntry1)['Text'])
+ self.assertEqual("true", get_state_as_dict(xEntry1)['IsChecked'])
+ self.assertEqual("false", get_state_as_dict(xEntry1)['IsSemiTransparent'])
+
+ xEntry2 = xTreeList.getChild(1)
+ self.assertEqual("vsjhgdgzka", get_state_as_dict(xEntry2)['Text'])
+ self.assertEqual("true", get_state_as_dict(xEntry2)['IsChecked'])
+ self.assertEqual("false", get_state_as_dict(xEntry2)['IsSemiTransparent'])
+
+ for it in range(2, 24):
+ xEntry = xTreeList.getChild(it)
+ self.assertEqual("false", get_state_as_dict(xEntry)['IsChecked'])
+ self.assertEqual("true", get_state_as_dict(xEntry)['IsSemiTransparent'])
+
+ xEntry1.executeAction("CLICK", tuple())
+
+ xOkBtn = xFloatWindow.getChild("ok")
+ xOkBtn.executeAction("CLICK", tuple())
+
+ for row in range(1, 25):
+ if row == 21:
+ self.assertFalse(is_row_hidden(doc, row))
+ else:
+ self.assertTrue(is_row_hidden(doc, row))
+
+ with self.ui_test.execute_dialog_through_command(".uno:SaveAs", close_button="open") as xSaveDialog:
+ xFileName = xSaveDialog.getChild("file_name")
+ xFileName.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"}))
+ xFileName.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"}))
+ xFileName.executeAction("TYPE", mkPropertyValues({"TEXT": xFilePath}))
+
+ with self.ui_test.load_file(systemPathToFileUrl(xFilePath)) as doc:
+
+ for row in range(1, 25):
+ if row == 21:
+ self.assertFalse(is_row_hidden(doc, row))
+ else:
+ self.assertTrue(is_row_hidden(doc, row))
+
+ xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window")
+ xGridWin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", "COL": "0", "ROW": "0"}))
+
+ xFloatWindow = self.xUITest.getFloatWindow()
+ xCheckListMenu = xFloatWindow.getChild("FilterDropDown")
+
+ xTreeList = xCheckListMenu.getChild("check_list_box")
+ self.assertEqual(24, len(xTreeList.getChildren()))
+
+ xEntry1 = xTreeList.getChild(0)
+ self.assertEqual("uutdmtlbwk", get_state_as_dict(xEntry1)['Text'])
+ self.assertEqual("false", get_state_as_dict(xEntry1)['IsChecked'])
+ self.assertEqual("false", get_state_as_dict(xEntry1)['IsSemiTransparent'])
+
+ xEntry2 = xTreeList.getChild(1)
+ self.assertEqual("vsjhgdgzka", get_state_as_dict(xEntry2)['Text'])
+ self.assertEqual("true", get_state_as_dict(xEntry2)['IsChecked'])
+ self.assertEqual("false", get_state_as_dict(xEntry2)['IsSemiTransparent'])
+
+ for it in range(2, 24):
+ xEntry = xTreeList.getChild(it)
+ self.assertEqual("false", get_state_as_dict(xEntry)['IsChecked'])
+ self.assertEqual("true", get_state_as_dict(xEntry)['IsSemiTransparent'])
+
+ self.click_clear_filter_button(xFloatWindow.getChild("menu"))
+
+ for row in range(1, 25):
+ if row == 21 or row == 22:
+ self.assertFalse(is_row_hidden(doc, row))
+ else:
+ self.assertTrue(is_row_hidden(doc, row))
+
+ xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window")
+ xGridWin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", "COL": "1", "ROW": "0"}))
+
+ xFloatWindow = self.xUITest.getFloatWindow()
+ xCheckListMenu = xFloatWindow.getChild("FilterDropDown")
+
+ xTreeList = xCheckListMenu.getChild("check_list_box")
+ self.assertEqual(7, len(xTreeList.getChildren()))
+
+ xEntry1 = xTreeList.getChild(0)
+ self.assertEqual("8", get_state_as_dict(xEntry1)['Text'])
+ self.assertEqual("false", get_state_as_dict(xEntry1)['IsChecked'])
+ self.assertEqual("false", get_state_as_dict(xEntry1)['IsSemiTransparent'])
+
+ xEntry2 = xTreeList.getChild(1)
+ self.assertEqual("16", get_state_as_dict(xEntry2)['Text'])
+ self.assertEqual("true", get_state_as_dict(xEntry2)['IsChecked'])
+ self.assertEqual("false", get_state_as_dict(xEntry2)['IsSemiTransparent'])
+
+ for it in range(2, 7):
+ xEntry = xTreeList.getChild(it)
+ self.assertEqual("false", get_state_as_dict(xEntry)['IsChecked'])
+ self.assertEqual("false", get_state_as_dict(xEntry)['IsSemiTransparent'])
+
+ self.click_clear_filter_button(xFloatWindow.getChild("menu"))
+
+ for row in range(25):
+ self.assertFalse(is_row_hidden(doc, row))
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/calc_tests8/tdf125051.py b/sc/qa/uitest/calc_tests8/tdf125051.py
index abf9836e97f9..97b7dbdbb9a4 100644
--- a/sc/qa/uitest/calc_tests8/tdf125051.py
+++ b/sc/qa/uitest/calc_tests8/tdf125051.py
@@ -16,7 +16,18 @@ from libreoffice.uno.propertyvalue import mkPropertyValues
# Bug 125051 - EDITING: CRASH when start SpellCheck
class tdf125051(UITestCase):
+ def hasExtension(self, identifier):
+ m = self.xContext.getByName("/singletons/com.sun.star.deployment.ExtensionManager")
+ # Only check bundled extensions for now; it doesn't seem useful to check user and shared ones in UITests
+ p = (i for i in m.getDeployedExtensions("bundled", None, None) if i.getIdentifier().Value == identifier)
+ return any(r.IsPresent and not r.Value.IsAmbiguous and r.Value.Value for r in (i.isRegistered(None, None) for i in p))
+
def test_tdf125051_crash_spelling_dialog(self):
+ # Check if English spellchecker is installed and active
+ if not self.hasExtension("org.openoffice.en.hunspell.dictionaries"):
+ print("Skipping test_tdf125051_crash_spelling_dialog: English spellchecker is unavailable")
+ return # can't test without English spell checker
+
with self.ui_test.create_doc_in_start_center("calc") as document:
xCalcDoc = self.xUITest.getTopFocusWindow()
gridwin = xCalcDoc.getChild("grid_window")
diff --git a/sc/qa/uitest/calc_tests9/tdf133629.py b/sc/qa/uitest/calc_tests9/tdf133629.py
index 8b28fcb991fd..65ac53c83b4b 100644
--- a/sc/qa/uitest/calc_tests9/tdf133629.py
+++ b/sc/qa/uitest/calc_tests9/tdf133629.py
@@ -30,7 +30,8 @@ class tdf133629(UITestCase):
select_pos(xTabs, "5")
xPresets = xDialog.getChild("presets")
- xPresets.executeAction("CHOOSE", mkPropertyValues({"POS": "4"}))
+ element4 = xPresets.getChild("3")
+ element4.executeAction("SELECT", mkPropertyValues({}))
# Change width
xLineWidth = xDialog.getChild("linewidthmf")
diff --git a/sc/qa/uitest/chart2/tdf167859.py b/sc/qa/uitest/chart2/tdf167859.py
new file mode 100644
index 000000000000..816d61aa252c
--- /dev/null
+++ b/sc/qa/uitest/chart2/tdf167859.py
@@ -0,0 +1,54 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+from uitest.uihelper.common import select_pos
+
+from libreoffice.uno.propertyvalue import mkPropertyValues
+
+
+class tdf167859(UITestCase):
+
+ def test_tdf167859(self):
+ with self.ui_test.load_file(get_url_for_data_file("tdf167859.ods")):
+ xCalcDoc = self.xUITest.getTopFocusWindow()
+ gridwin = xCalcDoc.getChild("grid_window")
+
+ gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"}))
+ gridwin.executeAction("ACTIVATE", tuple())
+ xChartMainTop = self.xUITest.getTopFocusWindow()
+ xChartMain = xChartMainTop.getChild("chart_window")
+ xSeriesObj = xChartMain.getChild("CID/D=0:CS=0:CT=0:Series=0")
+
+ # Without the fix in place, this would have crashed here
+ with self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "DiagramAxisA"})) as xDialog:
+
+ #Click on tab "Scale".
+ tabcontrol = xDialog.getChild("tabcontrol")
+ select_pos(tabcontrol, "0")
+
+ xReverse = xDialog.getChild("CBX_REVERSE")
+ self.assertEqual("false", get_state_as_dict(xReverse)["Selected"])
+
+ xLogarithmicScale = xDialog.getChild("CBX_LOGARITHM")
+ self.assertEqual("false", get_state_as_dict(xLogarithmicScale)["Selected"])
+
+ with self.ui_test.execute_dialog_through_action(xSeriesObj, "COMMAND", mkPropertyValues({"COMMAND": "DiagramAxisB"})) as xDialog:
+
+ #Click on tab "Positioning".
+ tabcontrol = xDialog.getChild("tabcontrol")
+ select_pos(tabcontrol, "1")
+
+ xAxisAt = xDialog.getChild("LB_CROSSES_OTHER_AXIS_AT")
+ self.assertEqual("End", get_state_as_dict(xAxisAt)["DisplayText"])
+
+ xPlaceLabels = xDialog.getChild("LB_PLACE_LABELS")
+ self.assertEqual("Near axis", get_state_as_dict(xPlaceLabels)["DisplayText"])
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/chart2/tdf167988.py b/sc/qa/uitest/chart2/tdf167988.py
new file mode 100644
index 000000000000..a89cf052e6f9
--- /dev/null
+++ b/sc/qa/uitest/chart2/tdf167988.py
@@ -0,0 +1,49 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+
+from libreoffice.uno.propertyvalue import mkPropertyValues
+
+
+class tdf167988(UITestCase):
+
+ def test_tdf167988(self):
+ with self.ui_test.load_file(get_url_for_data_file("tdf167988.ods")) as calc_doc:
+ xCalcDoc = self.xUITest.getTopFocusWindow()
+ gridwin = xCalcDoc.getChild("grid_window")
+
+ xChart = calc_doc.Sheets[0].Charts[0]
+ xDataSeries = xChart.getEmbeddedObject().getFirstDiagram().CoordinateSystems[0].ChartTypes[0].DataSeries
+ self.assertEqual(3, len(xDataSeries))
+
+ gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"}))
+ gridwin.executeAction("ACTIVATE", tuple())
+ xChartMainTop = self.xUITest.getTopFocusWindow()
+ xChartMain = xChartMainTop.getChild("chart_window")
+
+ xMean = xChartMain.getChild("CID/D=0:CS=0:CT=0:Series=2:Average=0")
+ xMean.executeAction("SELECT", tuple())
+
+ # Without the fix in place, this test would have crashed here
+ xChartMain.executeAction("TYPE", mkPropertyValues({"KEYCODE": "DELETE"}))
+
+ xTrend = xChartMain.getChild("CID/D=0:CS=0:CT=0:Series=1:Curve=0")
+ xTrend.executeAction("SELECT", tuple())
+ xChartMain.executeAction("TYPE", mkPropertyValues({"KEYCODE": "DELETE"}))
+
+ xSeries = xChartMain.getChild("CID/D=0:CS=0:CT=0:Series=2")
+ xSeries.executeAction("SELECT", tuple())
+ xChartMain.executeAction("TYPE", mkPropertyValues({"KEYCODE": "DELETE"}))
+
+ xDataSeries = xChart.getEmbeddedObject().getFirstDiagram().CoordinateSystems[0].ChartTypes[0].DataSeries
+ print(dir(xDataSeries[1]))
+ self.assertEqual(2, len(xDataSeries))
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/conditional_format/tdf117899.py b/sc/qa/uitest/conditional_format/tdf117899.py
index 81c270cc895f..bd6da6d7a46e 100644
--- a/sc/qa/uitest/conditional_format/tdf117899.py
+++ b/sc/qa/uitest/conditional_format/tdf117899.py
@@ -40,7 +40,8 @@ class Tdf117899(UITestCase):
self.xUITest.executeCommand(".uno:Copy")
- with self.ui_test.load_empty_file("writer"):
+ with self.ui_test.set_config('/org.openoffice.Office.Writer/Cursor/Option/SelectPastedAnchoredObject', True):
+ with self.ui_test.load_empty_file("writer"):
self.xUITest.getTopFocusWindow()
diff --git a/sc/qa/uitest/data/autofilter/tdf164014.ods b/sc/qa/uitest/data/autofilter/tdf164014.ods
new file mode 100644
index 000000000000..36ff4eff0748
--- /dev/null
+++ b/sc/qa/uitest/data/autofilter/tdf164014.ods
Binary files differ
diff --git a/sc/qa/uitest/data/tdf167859.ods b/sc/qa/uitest/data/tdf167859.ods
new file mode 100644
index 000000000000..c590b7a1c58f
--- /dev/null
+++ b/sc/qa/uitest/data/tdf167859.ods
Binary files differ
diff --git a/sc/qa/uitest/data/tdf167988.ods b/sc/qa/uitest/data/tdf167988.ods
new file mode 100644
index 000000000000..a5d0bae896f6
--- /dev/null
+++ b/sc/qa/uitest/data/tdf167988.ods
Binary files differ
diff --git a/sc/qa/unit/data/fods/lookup_source.fods b/sc/qa/unit/data/fods/lookup_source.fods
new file mode 100644
index 000000000000..b3c69b356a19
--- /dev/null
+++ b/sc/qa/unit/data/fods/lookup_source.fods
@@ -0,0 +1,656 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" office:version="1.4" office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ <office:meta>
+ <meta:generator>LibreOfficeDev/26.2.0.0.alpha0$Windows_X86_64 LibreOffice_project/82422b77ea625878d4a444d4aff625430953cd56
+ </meta:generator>
+ <meta:document-statistic meta:table-count="1" meta:object-count="0" meta:cell-count="61"/>
+ </office:meta>
+ <office:settings>
+ <config:config-item-set config:name="ooo:view-settings">
+ <config:config-item config:name="VisibleAreaTop" config:type="int">0</config:config-item>
+ <config:config-item config:name="VisibleAreaLeft" config:type="int">0</config:config-item>
+ <config:config-item config:name="VisibleAreaWidth" config:type="int">33694</config:config-item>
+ <config:config-item config:name="VisibleAreaHeight" config:type="int">16713</config:config-item>
+ <config:config-item-map-indexed config:name="Views">
+ <config:config-item-map-entry>
+ <config:config-item config:name="ViewId" config:type="string">view1</config:config-item>
+ <config:config-item-map-named config:name="Tables">
+ <config:config-item-map-entry config:name="Data">
+ <config:config-item config:name="CursorPositionX" config:type="int">9</config:config-item>
+ <config:config-item config:name="CursorPositionY" config:type="int">1</config:config-item>
+ <config:config-item config:name="ActiveSplitRange" config:type="short">2</config:config-item>
+ <config:config-item config:name="PositionLeft" config:type="int">0</config:config-item>
+ <config:config-item config:name="PositionRight" config:type="int">0</config:config-item>
+ <config:config-item config:name="PositionTop" config:type="int">0</config:config-item>
+ <config:config-item config:name="PositionBottom" config:type="int">0</config:config-item>
+ <config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
+ <config:config-item config:name="ZoomValue" config:type="int">100</config:config-item>
+ <config:config-item config:name="PageViewZoomValue" config:type="int">60</config:config-item>
+ <config:config-item config:name="ShowGrid" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AnchoredTextOverflowLegacy" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="LegacySingleLineFontwork" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ConnectorUseSnapRect" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IgnoreBreakAfterMultilineField" config:type="boolean">false</config:config-item>
+ </config:config-item-map-entry>
+ </config:config-item-map-named>
+ <config:config-item config:name="ActiveTable" config:type="string">Data</config:config-item>
+ <config:config-item config:name="HorizontalScrollbarWidth" config:type="int">1357</config:config-item>
+ <config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
+ <config:config-item config:name="ZoomValue" config:type="int">100</config:config-item>
+ <config:config-item config:name="PageViewZoomValue" config:type="int">60</config:config-item>
+ <config:config-item config:name="ShowPageBreakPreview" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ShowZeroValues" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ShowNotes" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ShowNoteAuthor" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ShowFormulasMarks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ShowGrid" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="GridColor" config:type="int">12632256</config:config-item>
+ <config:config-item config:name="ShowPageBreaks" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="HasColumnRowHeaders" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="HasSheetTabs" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="IsOutlineSymbolsSet" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="IsValueHighlightingEnabled" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IsSnapToRaster" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RasterIsVisible" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RasterResolutionX" config:type="int">1000</config:config-item>
+ <config:config-item config:name="RasterResolutionY" config:type="int">1000</config:config-item>
+ <config:config-item config:name="RasterSubdivisionX" config:type="int">1</config:config-item>
+ <config:config-item config:name="RasterSubdivisionY" config:type="int">1</config:config-item>
+ <config:config-item config:name="IsRasterAxisSynchronized" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="FormulaBarHeight" config:type="short">1</config:config-item>
+ <config:config-item config:name="AnchoredTextOverflowLegacy" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="LegacySingleLineFontwork" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ConnectorUseSnapRect" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IgnoreBreakAfterMultilineField" config:type="boolean">false</config:config-item>
+ </config:config-item-map-entry>
+ </config:config-item-map-indexed>
+ </config:config-item-set>
+ <config:config-item-set config:name="ooo:configuration-settings">
+ <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AutoCalculate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item>
+ <config:config-item config:name="EmbedAsianScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmbedComplexScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmbedFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedLatinScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmbedOnlyUsedFonts" config:type="boolean">false</config:config-item>
+ <config:config-item-map-indexed config:name="ForbiddenCharacters">
+ <config:config-item-map-entry>
+ <config:config-item config:name="Language" config:type="string">de</config:config-item>
+ <config:config-item config:name="Country" config:type="string">DE</config:config-item>
+ <config:config-item config:name="Variant" config:type="string"/>
+ <config:config-item config:name="BeginLine" config:type="string"/>
+ <config:config-item config:name="EndLine" config:type="string"/>
+ </config:config-item-map-entry>
+ <config:config-item-map-entry>
+ <config:config-item config:name="Language" config:type="string">en</config:config-item>
+ <config:config-item config:name="Country" config:type="string">US</config:config-item>
+ <config:config-item config:name="Variant" config:type="string"/>
+ <config:config-item config:name="BeginLine" config:type="string"/>
+ <config:config-item config:name="EndLine" config:type="string"/>
+ </config:config-item-map-entry>
+ </config:config-item-map-indexed>
+ <config:config-item config:name="GridColor" config:type="int">12632256</config:config-item>
+ <config:config-item config:name="HasColumnRowHeaders" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="HasSheetTabs" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ImagePreferredDPI" config:type="int">0</config:config-item>
+ <config:config-item config:name="IsDocumentShared" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IsOutlineSymbolsSet" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="IsRasterAxisSynchronized" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="IsSnapToRaster" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="LinkUpdateMode" config:type="short">3</config:config-item>
+ <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrinterPaperFromSetup" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RasterIsVisible" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RasterResolutionX" config:type="int">1000</config:config-item>
+ <config:config-item config:name="RasterResolutionY" config:type="int">1000</config:config-item>
+ <config:config-item config:name="RasterSubdivisionX" config:type="int">1</config:config-item>
+ <config:config-item config:name="RasterSubdivisionY" config:type="int">1</config:config-item>
+ <config:config-item config:name="SaveThumbnail" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ShowFormulasMarks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ShowGrid" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ShowNoteAuthor" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ShowNotes" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ShowPageBreaks" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ShowZeroValues" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="SyntaxStringRef" config:type="short">7</config:config-item>
+ <config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item>
+ <config:config-item-map-named config:name="ScriptConfiguration">
+ <config:config-item-map-entry config:name="Data">
+ <config:config-item config:name="CodeName" config:type="string">Sheet1</config:config-item>
+ </config:config-item-map-entry>
+ </config:config-item-map-named>
+ </config:config-item-set>
+ </office:settings>
+ <office:scripts>
+ <office:script script:language="ooo:Basic">
+ <ooo:libraries xmlns:ooo="http://openoffice.org/2004/office" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <ooo:library-embedded ooo:name="Standard"/>
+ </ooo:libraries>
+ </office:script>
+ </office:scripts>
+ <office:font-face-decls>
+ <style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Lucida Sans" svg:font-family="&apos;Lucida Sans&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Microsoft YaHei" svg:font-family="&apos;Microsoft YaHei&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="table-cell">
+ <style:paragraph-properties style:tab-stop-distance="1.25cm"/>
+ <style:text-properties style:font-name="Liberation Sans" fo:font-size="10pt" fo:language="de" fo:country="DE" style:font-name-asian="Microsoft YaHei" style:font-size-asian="10pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lucida Sans" style:font-size-complex="10pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" style:writing-mode="page"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:punctuation-wrap="simple" style:line-break="strict" loext:tab-stop-distance="0cm" style:writing-mode="page" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" fo:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-family-asian="&apos;Segoe UI&apos;" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="12pt" style:language-asian="zh" style:country-asian="CN" style:font-family-complex="Tahoma" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ <style:style style:name="Default" style:family="graphic"/>
+ <style:style style:name="Note" style:family="graphic" style:parent-style-name="Default">
+ <style:graphic-properties draw:stroke="solid" draw:marker-start="Arrowheads_20_1" draw:marker-start-width="0.2cm" draw:marker-start-center="false" draw:fill="solid" draw:fill-color="#ffffc0" draw:auto-grow-height="true" draw:auto-grow-width="false" fo:padding-top="0.1cm" fo:padding-bottom="0.1cm" fo:padding-left="0.1cm" fo:padding-right="0.1cm" draw:shadow="visible" draw:shadow-offset-x="0.1cm" draw:shadow-offset-y="0.1cm"/>
+ <style:text-properties style:font-name="Liberation Sans" fo:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="10pt" style:font-name-asian="Microsoft YaHei" style:font-family-asian="&apos;Microsoft YaHei&apos;" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="10pt" style:font-name-complex="Lucida Sans" style:font-family-complex="&apos;Lucida Sans&apos;" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="10pt"/>
+ </style:style>
+ <number:number-style style:name="N0">
+ <number:number number:min-integer-digits="1"/>
+ </number:number-style>
+ <number:currency-style style:name="N114P0" style:volatile="true">
+ <number:number number:decimal-places="2" number:min-decimal-places="2" number:min-integer-digits="1" number:grouping="true"/>
+ <number:text> </number:text>
+ <number:currency-symbol number:language="de" number:country="DE">€</number:currency-symbol>
+ </number:currency-style>
+ <number:currency-style style:name="N114">
+ <style:text-properties fo:color="#ff0000"/>
+ <number:text>-</number:text>
+ <number:number number:decimal-places="2" number:min-decimal-places="2" number:min-integer-digits="1" number:grouping="true"/>
+ <number:text> </number:text>
+ <number:currency-symbol number:language="de" number:country="DE">€</number:currency-symbol>
+ <style:map style:condition="value()&gt;=0" style:apply-style-name="N114P0"/>
+ </number:currency-style>
+ <style:style style:name="Default" style:family="table-cell"/>
+ <style:style style:name="Heading" style:family="table-cell" style:parent-style-name="Default">
+ <style:table-cell-properties fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ <style:text-properties fo:font-size="24pt" fo:font-style="normal" fo:font-weight="bold" style:font-size-asian="24pt" style:font-style-asian="normal" style:font-weight-asian="bold" style:font-size-complex="24pt" style:font-style-complex="normal" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="Heading_20_1" style:display-name="Heading 1" style:family="table-cell" style:parent-style-name="Heading">
+ <style:table-cell-properties fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ <style:text-properties fo:font-size="18pt" style:font-size-asian="18pt" style:font-size-complex="18pt"/>
+ </style:style>
+ <style:style style:name="Heading_20_2" style:display-name="Heading 2" style:family="table-cell" style:parent-style-name="Heading">
+ <style:table-cell-properties fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ <style:text-properties fo:font-size="12pt" style:font-size-asian="12pt" style:font-size-complex="12pt"/>
+ </style:style>
+ <style:style style:name="Text" style:family="table-cell" style:parent-style-name="Default">
+ <style:table-cell-properties fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ </style:style>
+ <style:style style:name="Note" style:family="table-cell" style:parent-style-name="Text">
+ <style:table-cell-properties fo:background-color="#ffffcc" style:diagonal-bl-tr="none" style:diagonal-tl-br="none" fo:wrap-option="no-wrap" fo:border="0.74pt solid #808080" style:shrink-to-fit="false"/>
+ <style:text-properties fo:color="#333333"/>
+ </style:style>
+ <style:style style:name="Footnote" style:family="table-cell" style:parent-style-name="Text">
+ <style:table-cell-properties fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ <style:text-properties fo:color="#808080" fo:font-style="italic" style:font-style-asian="italic" style:font-style-complex="italic"/>
+ </style:style>
+ <style:style style:name="Hyperlink" style:family="table-cell" style:parent-style-name="Text">
+ <style:table-cell-properties fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ <style:text-properties fo:color="#0000ee" style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="#0000ee"/>
+ </style:style>
+ <style:style style:name="Status" style:family="table-cell" style:parent-style-name="Default">
+ <style:table-cell-properties fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ </style:style>
+ <style:style style:name="Good" style:family="table-cell" style:parent-style-name="Status">
+ <style:table-cell-properties fo:background-color="#ccffcc" fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ <style:text-properties fo:color="#006600"/>
+ </style:style>
+ <style:style style:name="Neutral" style:family="table-cell" style:parent-style-name="Status">
+ <style:table-cell-properties fo:background-color="#ffffcc" fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ <style:text-properties fo:color="#996600"/>
+ </style:style>
+ <style:style style:name="Bad" style:family="table-cell" style:parent-style-name="Status">
+ <style:table-cell-properties fo:background-color="#ffcccc" fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ <style:text-properties fo:color="#cc0000"/>
+ </style:style>
+ <style:style style:name="Warning" style:family="table-cell" style:parent-style-name="Status">
+ <style:table-cell-properties fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ <style:text-properties fo:color="#cc0000"/>
+ </style:style>
+ <style:style style:name="Error" style:family="table-cell" style:parent-style-name="Status">
+ <style:table-cell-properties fo:background-color="#cc0000" fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ <style:text-properties fo:color="#ffffff" fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="Accent" style:family="table-cell" style:parent-style-name="Default">
+ <style:table-cell-properties fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ <style:text-properties fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="Accent_20_1" style:display-name="Accent 1" style:family="table-cell" style:parent-style-name="Accent">
+ <style:table-cell-properties fo:background-color="#000000" fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ <style:text-properties fo:color="#ffffff"/>
+ </style:style>
+ <style:style style:name="Accent_20_2" style:display-name="Accent 2" style:family="table-cell" style:parent-style-name="Accent">
+ <style:table-cell-properties fo:background-color="#808080" fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ <style:text-properties fo:color="#ffffff"/>
+ </style:style>
+ <style:style style:name="Accent_20_3" style:display-name="Accent 3" style:family="table-cell" style:parent-style-name="Accent">
+ <style:table-cell-properties fo:background-color="#dddddd" fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ </style:style>
+ <style:style style:name="Result" style:family="table-cell" style:parent-style-name="Default">
+ <style:table-cell-properties fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ <style:text-properties fo:font-style="italic" style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color" fo:font-weight="bold" style:font-style-asian="italic" style:font-weight-asian="bold" style:font-style-complex="italic" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="Untitled1" style:family="table-cell" style:parent-style-name="Default">
+ <style:table-cell-properties fo:background-color="#ff3333"/>
+ </style:style>
+ <style:style style:name="Untitled2" style:family="table-cell" style:parent-style-name="Default">
+ <style:table-cell-properties fo:background-color="#99ff66"/>
+ </style:style>
+ <draw:marker draw:name="Arrowheads_20_1" draw:display-name="Arrowheads 1" svg:viewBox="0 0 20 30" svg:d="M10 0l-10 30h20z"/>
+ <loext:theme loext:name="Office">
+ <loext:theme-colors loext:name="LibreOffice">
+ <loext:color loext:name="dark1" loext:color="#000000"/>
+ <loext:color loext:name="light1" loext:color="#ffffff"/>
+ <loext:color loext:name="dark2" loext:color="#000000"/>
+ <loext:color loext:name="light2" loext:color="#ffffff"/>
+ <loext:color loext:name="accent1" loext:color="#18a303"/>
+ <loext:color loext:name="accent2" loext:color="#0369a3"/>
+ <loext:color loext:name="accent3" loext:color="#a33e03"/>
+ <loext:color loext:name="accent4" loext:color="#8e03a3"/>
+ <loext:color loext:name="accent5" loext:color="#c99c00"/>
+ <loext:color loext:name="accent6" loext:color="#c9211e"/>
+ <loext:color loext:name="hyperlink" loext:color="#0000ee"/>
+ <loext:color loext:name="followed-hyperlink" loext:color="#551a8b"/>
+ </loext:theme-colors>
+ </loext:theme>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="co1" style:family="table-column">
+ <style:table-column-properties fo:break-before="auto" style:column-width="2.258cm"/>
+ </style:style>
+ <style:style style:name="co2" style:family="table-column">
+ <style:table-column-properties fo:break-before="auto" style:column-width="13.374cm"/>
+ </style:style>
+ <style:style style:name="ro1" style:family="table-row">
+ <style:table-row-properties style:row-height="2.263cm" fo:break-before="auto" style:use-optimal-row-height="true"/>
+ </style:style>
+ <style:style style:name="ro2" style:family="table-row">
+ <style:table-row-properties style:row-height="0.452cm" fo:break-before="auto" style:use-optimal-row-height="true"/>
+ </style:style>
+ <style:style style:name="ta1" style:family="table" style:master-page-name="Default">
+ <style:table-properties table:display="true" style:writing-mode="lr-tb"/>
+ </style:style>
+ <number:number-style style:name="N2">
+ <number:number number:decimal-places="2" number:min-decimal-places="2" number:min-integer-digits="1"/>
+ </number:number-style>
+ <style:style style:name="ce4" style:family="table-cell" style:parent-style-name="Default">
+ <style:table-cell-properties fo:wrap-option="wrap" fo:border="0.74pt solid #ff0000"/>
+ <style:text-properties fo:color="#8b0000" fo:font-size="14pt" fo:language="en" fo:country="US" fo:font-weight="bold" style:font-size-asian="14pt" style:font-size-complex="14pt"/>
+ </style:style>
+ <style:style style:name="ce60" style:family="table-cell" style:parent-style-name="Default">
+ <style:text-properties fo:color="#0000ff"/>
+ </style:style>
+ <style:style style:name="ce61" style:family="table-cell" style:parent-style-name="Default">
+ <style:text-properties fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="ce5" style:family="table-cell" style:parent-style-name="Default">
+ <style:text-properties fo:color="#0000ff"/>
+ </style:style>
+ <style:style style:name="ce6" style:family="table-cell" style:parent-style-name="Default">
+ <style:text-properties fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="ce7" style:family="table-cell" style:parent-style-name="Default">
+ <style:table-cell-properties fo:wrap-option="wrap" fo:border="0.74pt solid #ff0000"/>
+ <style:text-properties fo:color="#8b0000" fo:font-size="14pt" fo:language="en" fo:country="US" fo:font-weight="bold" style:font-size-asian="14pt" style:font-size-complex="14pt"/>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties style:writing-mode="lr-tb"/>
+ <style:header-style>
+ <style:header-footer-properties fo:min-height="0.75cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="0.25cm"/>
+ </style:header-style>
+ <style:footer-style>
+ <style:header-footer-properties fo:min-height="0.75cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0.25cm"/>
+ </style:footer-style>
+ </style:page-layout>
+ <style:page-layout style:name="pm2">
+ <style:page-layout-properties style:writing-mode="lr-tb"/>
+ <style:header-style>
+ <style:header-footer-properties fo:min-height="0.75cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="0.25cm" fo:border="1.5pt solid #000000" fo:padding="0.018cm" fo:background-color="#c0c0c0">
+ <style:background-image/>
+ </style:header-footer-properties>
+ </style:header-style>
+ <style:footer-style>
+ <style:header-footer-properties fo:min-height="0.75cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0.25cm" fo:border="1.5pt solid #000000" fo:padding="0.018cm" fo:background-color="#c0c0c0">
+ <style:background-image/>
+ </style:header-footer-properties>
+ </style:footer-style>
+ </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Default" style:page-layout-name="pm1">
+ <style:header>
+ <text:p><text:sheet-name>???</text:sheet-name></text:p>
+ </style:header>
+ <style:header-left style:display="false"/>
+ <style:header-first style:display="false"/>
+ <style:footer>
+ <text:p>Page <text:page-number>1</text:page-number></text:p>
+ </style:footer>
+ <style:footer-left style:display="false"/>
+ <style:footer-first style:display="false"/>
+ </style:master-page>
+ <style:master-page style:name="Report" style:page-layout-name="pm2">
+ <style:header>
+ <style:region-left>
+ <text:p><text:sheet-name>???</text:sheet-name><text:s/>(<text:title>???</text:title>)</text:p>
+ </style:region-left>
+ <style:region-right>
+ <text:p><text:date style:data-style-name="N2" text:date-value="2025-08-02">00.00.0000</text:date>, <text:time style:data-style-name="N2" text:time-value="23:28:31.908528000">00:00:00</text:time></text:p>
+ </style:region-right>
+ </style:header>
+ <style:header-left style:display="false"/>
+ <style:header-first style:display="false"/>
+ <style:footer>
+ <text:p>Page <text:page-number>1</text:page-number><text:s/>/ <text:page-count>99</text:page-count></text:p>
+ </style:footer>
+ <style:footer-left style:display="false"/>
+ <style:footer-first style:display="false"/>
+ </style:master-page>
+ </office:master-styles>
+ <office:body>
+ <office:spreadsheet>
+ <table:calculation-settings table:automatic-find-labels="false" table:use-regular-expressions="false" table:use-wildcards="true"/>
+ <table:table table:name="Data" table:style-name="ta1">
+ <table:table-column table:style-name="co1" table:number-columns-repeated="9" table:default-cell-style-name="Default"/>
+ <table:table-column table:style-name="co2" table:default-cell-style-name="Default"/>
+ <table:table-row table:style-name="ro1">
+ <table:table-cell table:style-name="ce5" office:value-type="string" calcext:value-type="string">
+ <text:p>Equal orientation vertical</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="8"/>
+ <table:table-cell table:style-name="ce7" office:value-type="string" calcext:value-type="string">
+ <text:p>The sheet “Data” serves as source for formulas with external references in test file “lookup_target.fods”. Make sure the files “lookup_source.fods” and “lookup_target.ods” are placed in the same folder.</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:style-name="ce6" office:value-type="string" calcext:value-type="string">
+ <text:p>key</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce6"/>
+ <table:table-cell table:style-name="ce6" office:value-type="string" calcext:value-type="string">
+ <text:p>value</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="7"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell office:value-type="float" office:value="3" calcext:value-type="float">
+ <text:p>3</text:p>
+ </table:table-cell>
+ <table:table-cell/>
+ <table:table-cell office:value-type="float" office:value="11" calcext:value-type="float">
+ <text:p>11</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="7"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell office:value-type="float" office:value="10" calcext:value-type="float">
+ <text:p>10</text:p>
+ </table:table-cell>
+ <table:table-cell/>
+ <table:table-cell office:value-type="float" office:value="22" calcext:value-type="float">
+ <text:p>22</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="7"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell office:value-type="string" calcext:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ <table:table-cell/>
+ <table:table-cell office:value-type="float" office:value="33" calcext:value-type="float">
+ <text:p>33</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="7"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell office:value-type="string" calcext:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ <table:table-cell/>
+ <table:table-cell office:value-type="float" office:value="44" calcext:value-type="float">
+ <text:p>44</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="7"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell office:value-type="string" calcext:value-type="string">
+ <text:p>T</text:p>
+ </table:table-cell>
+ <table:table-cell/>
+ <table:table-cell office:value-type="float" office:value="55" calcext:value-type="float">
+ <text:p>55</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="7"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell office:value-type="string" calcext:value-type="string">
+ <text:p>W</text:p>
+ </table:table-cell>
+ <table:table-cell/>
+ <table:table-cell office:value-type="float" office:value="66" calcext:value-type="float">
+ <text:p>66</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="7"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:number-columns-repeated="10"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:style-name="ce5" office:value-type="string" calcext:value-type="string">
+ <text:p>Equal orientation horizontal</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:style-name="ce6" office:value-type="string" calcext:value-type="string">
+ <text:p>key</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="3" calcext:value-type="float">
+ <text:p>3</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="10" calcext:value-type="float">
+ <text:p>10</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="2" office:value-type="string" calcext:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="string" calcext:value-type="string">
+ <text:p>T</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="string" calcext:value-type="string">
+ <text:p>W</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="3"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:style-name="ce6"/>
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:style-name="ce6" office:value-type="string" calcext:value-type="string">
+ <text:p>value</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="11" calcext:value-type="float">
+ <text:p>11</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="22" calcext:value-type="float">
+ <text:p>22</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="33" calcext:value-type="float">
+ <text:p>33</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="44" calcext:value-type="float">
+ <text:p>44</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="55" calcext:value-type="float">
+ <text:p>55</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="66" calcext:value-type="float">
+ <text:p>66</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="3"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:number-columns-repeated="10"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:style-name="ce5" office:value-type="string" calcext:value-type="string">
+ <text:p>Mixed orientation, key vertical</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:style-name="ce6" office:value-type="string" calcext:value-type="string">
+ <text:p>key</text:p>
+ </table:table-cell>
+ <table:table-cell/>
+ <table:table-cell table:style-name="ce6" office:value-type="string" calcext:value-type="string">
+ <text:p>value</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="11" calcext:value-type="float">
+ <text:p>11</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="22" calcext:value-type="float">
+ <text:p>22</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="33" calcext:value-type="float">
+ <text:p>33</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="44" calcext:value-type="float">
+ <text:p>44</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="55" calcext:value-type="float">
+ <text:p>55</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="66" calcext:value-type="float">
+ <text:p>66</text:p>
+ </table:table-cell>
+ <table:table-cell/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell office:value-type="float" office:value="3" calcext:value-type="float">
+ <text:p>3</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell office:value-type="float" office:value="10" calcext:value-type="float">
+ <text:p>10</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell office:value-type="string" calcext:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell office:value-type="string" calcext:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell office:value-type="string" calcext:value-type="string">
+ <text:p>T</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell office:value-type="string" calcext:value-type="string">
+ <text:p>W</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:number-columns-repeated="10"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:style-name="ce5" office:value-type="string" calcext:value-type="string">
+ <text:p>Mixed orientation, key horizontal</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:style-name="ce6" office:value-type="string" calcext:value-type="string">
+ <text:p>key</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="3" calcext:value-type="float">
+ <text:p>3</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="10" calcext:value-type="float">
+ <text:p>10</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="2" office:value-type="string" calcext:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="string" calcext:value-type="string">
+ <text:p>T</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="string" calcext:value-type="string">
+ <text:p>W</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="3"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:number-columns-repeated="10"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:style-name="ce6" office:value-type="string" calcext:value-type="string">
+ <text:p>value</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell office:value-type="float" office:value="11" calcext:value-type="float">
+ <text:p>11</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell office:value-type="float" office:value="22" calcext:value-type="float">
+ <text:p>22</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell office:value-type="float" office:value="33" calcext:value-type="float">
+ <text:p>33</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell office:value-type="float" office:value="44" calcext:value-type="float">
+ <text:p>44</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell office:value-type="float" office:value="55" calcext:value-type="float">
+ <text:p>55</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell office:value-type="float" office:value="66" calcext:value-type="float">
+ <text:p>66</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ </table:table>
+ <table:named-expressions/>
+ </office:spreadsheet>
+ </office:body>
+</office:document> \ No newline at end of file
diff --git a/sc/qa/unit/data/fods/lookup_target.fods b/sc/qa/unit/data/fods/lookup_target.fods
new file mode 100644
index 000000000000..d91c21dd28c7
--- /dev/null
+++ b/sc/qa/unit/data/fods/lookup_target.fods
@@ -0,0 +1,1488 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" office:version="1.4" office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ <office:meta>
+ <meta:generator>LibreOfficeDev/26.2.0.0.alpha0$Windows_X86_64 LibreOffice_project/36d2b5d4cec0ac3408b33a1b3e938a5ce9daf897
+ </meta:generator>
+ <meta:document-statistic meta:table-count="1" meta:object-count="0" meta:cell-count="130"/>
+ </office:meta>
+ <office:settings>
+ <config:config-item-set config:name="ooo:view-settings">
+ <config:config-item config:name="VisibleAreaTop" config:type="int">0</config:config-item>
+ <config:config-item config:name="VisibleAreaLeft" config:type="int">0</config:config-item>
+ <config:config-item config:name="VisibleAreaWidth" config:type="int">31186</config:config-item>
+ <config:config-item config:name="VisibleAreaHeight" config:type="int">13801</config:config-item>
+ <config:config-item-map-indexed config:name="Views">
+ <config:config-item-map-entry>
+ <config:config-item config:name="ViewId" config:type="string">view1</config:config-item>
+ <config:config-item-map-named config:name="Tables">
+ <config:config-item-map-entry config:name="LOOKUP_test">
+ <config:config-item config:name="CursorPositionX" config:type="int">1</config:config-item>
+ <config:config-item config:name="CursorPositionY" config:type="int">7</config:config-item>
+ <config:config-item config:name="ActiveSplitRange" config:type="short">2</config:config-item>
+ <config:config-item config:name="PositionLeft" config:type="int">0</config:config-item>
+ <config:config-item config:name="PositionRight" config:type="int">0</config:config-item>
+ <config:config-item config:name="PositionTop" config:type="int">0</config:config-item>
+ <config:config-item config:name="PositionBottom" config:type="int">0</config:config-item>
+ <config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
+ <config:config-item config:name="ZoomValue" config:type="int">100</config:config-item>
+ <config:config-item config:name="PageViewZoomValue" config:type="int">60</config:config-item>
+ <config:config-item config:name="ShowGrid" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AnchoredTextOverflowLegacy" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="LegacySingleLineFontwork" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ConnectorUseSnapRect" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IgnoreBreakAfterMultilineField" config:type="boolean">false</config:config-item>
+ </config:config-item-map-entry>
+ </config:config-item-map-named>
+ <config:config-item config:name="ActiveTable" config:type="string">LOOKUP_test</config:config-item>
+ <config:config-item config:name="HorizontalScrollbarWidth" config:type="int">1386</config:config-item>
+ <config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
+ <config:config-item config:name="ZoomValue" config:type="int">100</config:config-item>
+ <config:config-item config:name="PageViewZoomValue" config:type="int">60</config:config-item>
+ <config:config-item config:name="ShowPageBreakPreview" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ShowZeroValues" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ShowNotes" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ShowNoteAuthor" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ShowFormulasMarks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ShowGrid" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="GridColor" config:type="int">12632256</config:config-item>
+ <config:config-item config:name="ShowPageBreaks" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="HasColumnRowHeaders" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="HasSheetTabs" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="IsOutlineSymbolsSet" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="IsValueHighlightingEnabled" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IsSnapToRaster" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RasterIsVisible" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RasterResolutionX" config:type="int">1000</config:config-item>
+ <config:config-item config:name="RasterResolutionY" config:type="int">1000</config:config-item>
+ <config:config-item config:name="RasterSubdivisionX" config:type="int">1</config:config-item>
+ <config:config-item config:name="RasterSubdivisionY" config:type="int">1</config:config-item>
+ <config:config-item config:name="IsRasterAxisSynchronized" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="FormulaBarHeight" config:type="short">1</config:config-item>
+ <config:config-item config:name="AnchoredTextOverflowLegacy" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="LegacySingleLineFontwork" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ConnectorUseSnapRect" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IgnoreBreakAfterMultilineField" config:type="boolean">false</config:config-item>
+ </config:config-item-map-entry>
+ </config:config-item-map-indexed>
+ </config:config-item-set>
+ <config:config-item-set config:name="ooo:configuration-settings">
+ <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AutoCalculate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item>
+ <config:config-item config:name="EmbedAsianScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmbedComplexScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmbedFonts" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="EmbedLatinScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmbedOnlyUsedFonts" config:type="boolean">false</config:config-item>
+ <config:config-item-map-indexed config:name="ForbiddenCharacters">
+ <config:config-item-map-entry>
+ <config:config-item config:name="Language" config:type="string">de</config:config-item>
+ <config:config-item config:name="Country" config:type="string">DE</config:config-item>
+ <config:config-item config:name="Variant" config:type="string"/>
+ <config:config-item config:name="BeginLine" config:type="string"/>
+ <config:config-item config:name="EndLine" config:type="string"/>
+ </config:config-item-map-entry>
+ <config:config-item-map-entry>
+ <config:config-item config:name="Language" config:type="string">en</config:config-item>
+ <config:config-item config:name="Country" config:type="string">US</config:config-item>
+ <config:config-item config:name="Variant" config:type="string"/>
+ <config:config-item config:name="BeginLine" config:type="string"/>
+ <config:config-item config:name="EndLine" config:type="string"/>
+ </config:config-item-map-entry>
+ </config:config-item-map-indexed>
+ <config:config-item config:name="GridColor" config:type="int">12632256</config:config-item>
+ <config:config-item config:name="HasColumnRowHeaders" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="HasSheetTabs" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ImagePreferredDPI" config:type="int">0</config:config-item>
+ <config:config-item config:name="IsDocumentShared" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IsOutlineSymbolsSet" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="IsRasterAxisSynchronized" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="IsSnapToRaster" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="LinkUpdateMode" config:type="short">3</config:config-item>
+ <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrinterPaperFromSetup" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RasterIsVisible" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RasterResolutionX" config:type="int">1000</config:config-item>
+ <config:config-item config:name="RasterResolutionY" config:type="int">1000</config:config-item>
+ <config:config-item config:name="RasterSubdivisionX" config:type="int">1</config:config-item>
+ <config:config-item config:name="RasterSubdivisionY" config:type="int">1</config:config-item>
+ <config:config-item config:name="SaveThumbnail" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ShowFormulasMarks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ShowGrid" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ShowNoteAuthor" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ShowNotes" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ShowPageBreaks" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ShowZeroValues" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="SyntaxStringRef" config:type="short">7</config:config-item>
+ <config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item>
+ <config:config-item-map-named config:name="ScriptConfiguration">
+ <config:config-item-map-entry config:name="LOOKUP_test">
+ <config:config-item config:name="CodeName" config:type="string">Sheet1</config:config-item>
+ </config:config-item-map-entry>
+ </config:config-item-map-named>
+ </config:config-item-set>
+ </office:settings>
+ <office:scripts>
+ <office:script script:language="ooo:Basic">
+ <ooo:libraries xmlns:ooo="http://openoffice.org/2004/office" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <ooo:library-embedded ooo:name="Standard"/>
+ </ooo:libraries>
+ </office:script>
+ </office:scripts>
+ <office:font-face-decls>
+ <style:font-face style:name="Calibri" svg:font-family="Calibri" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Droid Sans Devanagari" svg:font-family="&apos;Droid Sans Devanagari&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Droid Sans Fallback" svg:font-family="&apos;Droid Sans Fallback&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Lucida Sans" svg:font-family="&apos;Lucida Sans&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Microsoft YaHei" svg:font-family="&apos;Microsoft YaHei&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="table-cell">
+ <style:paragraph-properties style:tab-stop-distance="1.25cm"/>
+ <style:text-properties style:font-name="Liberation Sans" fo:font-size="10pt" fo:language="en" fo:country="US" style:font-name-asian="Microsoft YaHei" style:font-size-asian="10pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lucida Sans" style:font-size-complex="10pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" style:writing-mode="page"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:punctuation-wrap="simple" style:line-break="strict" loext:tab-stop-distance="0cm" style:writing-mode="page" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" fo:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-family-asian="&apos;Segoe UI&apos;" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="12pt" style:language-asian="zh" style:country-asian="CN" style:font-family-complex="Tahoma" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ <style:style style:name="Default" style:family="graphic"/>
+ <style:style style:name="Note" style:family="graphic" style:parent-style-name="Default">
+ <style:graphic-properties draw:stroke="solid" draw:marker-start="Arrowheads_20_1" draw:marker-start-width="0.2cm" draw:marker-start-center="false" draw:fill="solid" draw:fill-color="#ffffc0" draw:auto-grow-height="true" draw:auto-grow-width="false" fo:padding-top="0.1cm" fo:padding-bottom="0.1cm" fo:padding-left="0.1cm" fo:padding-right="0.1cm" draw:shadow="visible" draw:shadow-offset-x="0.1cm" draw:shadow-offset-y="0.1cm"/>
+ <style:text-properties style:font-name="Liberation Sans" fo:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="10pt" style:font-name-asian="Microsoft YaHei" style:font-family-asian="&apos;Microsoft YaHei&apos;" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="10pt" style:font-name-complex="Lucida Sans" style:font-family-complex="&apos;Lucida Sans&apos;" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="10pt"/>
+ </style:style>
+ <number:number-style style:name="N0">
+ <number:number number:min-integer-digits="1"/>
+ </number:number-style>
+ <number:currency-style style:name="N114P0" style:volatile="true">
+ <number:number number:decimal-places="2" number:min-decimal-places="2" number:min-integer-digits="1" number:grouping="true"/>
+ <number:text> </number:text>
+ <number:currency-symbol number:language="de" number:country="DE">€</number:currency-symbol>
+ </number:currency-style>
+ <number:currency-style style:name="N114">
+ <style:text-properties fo:color="#ff0000"/>
+ <number:text>-</number:text>
+ <number:number number:decimal-places="2" number:min-decimal-places="2" number:min-integer-digits="1" number:grouping="true"/>
+ <number:text> </number:text>
+ <number:currency-symbol number:language="de" number:country="DE">€</number:currency-symbol>
+ <style:map style:condition="value()&gt;=0" style:apply-style-name="N114P0"/>
+ </number:currency-style>
+ <style:style style:name="Default" style:family="table-cell"/>
+ <style:style style:name="Heading" style:family="table-cell" style:parent-style-name="Default">
+ <style:table-cell-properties fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ <style:text-properties fo:font-size="24pt" fo:font-style="normal" fo:font-weight="bold" style:font-size-asian="24pt" style:font-style-asian="normal" style:font-weight-asian="bold" style:font-size-complex="24pt" style:font-style-complex="normal" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="Heading_20_1" style:display-name="Heading 1" style:family="table-cell" style:parent-style-name="Heading">
+ <style:table-cell-properties fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ <style:text-properties fo:font-size="18pt" style:font-size-asian="18pt" style:font-size-complex="18pt"/>
+ </style:style>
+ <style:style style:name="Heading_20_2" style:display-name="Heading 2" style:family="table-cell" style:parent-style-name="Heading">
+ <style:table-cell-properties fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ <style:text-properties fo:font-size="12pt" style:font-size-asian="12pt" style:font-size-complex="12pt"/>
+ </style:style>
+ <style:style style:name="Text" style:family="table-cell" style:parent-style-name="Default">
+ <style:table-cell-properties fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ </style:style>
+ <style:style style:name="Note" style:family="table-cell" style:parent-style-name="Text">
+ <style:table-cell-properties fo:background-color="#ffffcc" style:diagonal-bl-tr="none" style:diagonal-tl-br="none" fo:wrap-option="no-wrap" fo:border="0.74pt solid #808080" style:shrink-to-fit="false"/>
+ <style:text-properties fo:color="#333333"/>
+ </style:style>
+ <style:style style:name="Footnote" style:family="table-cell" style:parent-style-name="Text">
+ <style:table-cell-properties fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ <style:text-properties fo:color="#808080" fo:font-style="italic" style:font-style-asian="italic" style:font-style-complex="italic"/>
+ </style:style>
+ <style:style style:name="Hyperlink" style:family="table-cell" style:parent-style-name="Text">
+ <style:table-cell-properties fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ <style:text-properties fo:color="#0000ee" style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="#0000ee"/>
+ </style:style>
+ <style:style style:name="Status" style:family="table-cell" style:parent-style-name="Default">
+ <style:table-cell-properties fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ </style:style>
+ <style:style style:name="Good" style:family="table-cell" style:parent-style-name="Status">
+ <style:table-cell-properties fo:background-color="#ccffcc" fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ <style:text-properties fo:color="#006600"/>
+ </style:style>
+ <style:style style:name="Neutral" style:family="table-cell" style:parent-style-name="Status">
+ <style:table-cell-properties fo:background-color="#ffffcc" fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ <style:text-properties fo:color="#996600"/>
+ </style:style>
+ <style:style style:name="Bad" style:family="table-cell" style:parent-style-name="Status">
+ <style:table-cell-properties fo:background-color="#ffcccc" fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ <style:text-properties fo:color="#cc0000"/>
+ </style:style>
+ <style:style style:name="Warning" style:family="table-cell" style:parent-style-name="Status">
+ <style:table-cell-properties fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ <style:text-properties fo:color="#cc0000"/>
+ </style:style>
+ <style:style style:name="Error" style:family="table-cell" style:parent-style-name="Status">
+ <style:table-cell-properties fo:background-color="#cc0000" fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ <style:text-properties fo:color="#ffffff" fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="Accent" style:family="table-cell" style:parent-style-name="Default">
+ <style:table-cell-properties fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ <style:text-properties fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="Accent_20_1" style:display-name="Accent 1" style:family="table-cell" style:parent-style-name="Accent">
+ <style:table-cell-properties fo:background-color="#000000" fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ <style:text-properties fo:color="#ffffff"/>
+ </style:style>
+ <style:style style:name="Accent_20_2" style:display-name="Accent 2" style:family="table-cell" style:parent-style-name="Accent">
+ <style:table-cell-properties fo:background-color="#808080" fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ <style:text-properties fo:color="#ffffff"/>
+ </style:style>
+ <style:style style:name="Accent_20_3" style:display-name="Accent 3" style:family="table-cell" style:parent-style-name="Accent">
+ <style:table-cell-properties fo:background-color="#dddddd" fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ </style:style>
+ <style:style style:name="Result" style:family="table-cell" style:parent-style-name="Default">
+ <style:table-cell-properties fo:wrap-option="no-wrap" style:shrink-to-fit="false"/>
+ <style:text-properties fo:font-style="italic" style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color" fo:font-weight="bold" style:font-style-asian="italic" style:font-weight-asian="bold" style:font-style-complex="italic" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="Untitled1" style:family="table-cell" style:parent-style-name="Default">
+ <style:table-cell-properties fo:background-color="#ff3333"/>
+ </style:style>
+ <style:style style:name="Untitled2" style:family="table-cell" style:parent-style-name="Default">
+ <style:table-cell-properties fo:background-color="#99ff66"/>
+ </style:style>
+ <draw:marker draw:name="Arrowheads_20_1" draw:display-name="Arrowheads 1" svg:viewBox="0 0 20 30" svg:d="M10 0l-10 30h20z"/>
+ <loext:theme loext:name="Office">
+ <loext:theme-colors loext:name="LibreOffice">
+ <loext:color loext:name="dark1" loext:color="#000000"/>
+ <loext:color loext:name="light1" loext:color="#ffffff"/>
+ <loext:color loext:name="dark2" loext:color="#000000"/>
+ <loext:color loext:name="light2" loext:color="#ffffff"/>
+ <loext:color loext:name="accent1" loext:color="#18a303"/>
+ <loext:color loext:name="accent2" loext:color="#0369a3"/>
+ <loext:color loext:name="accent3" loext:color="#a33e03"/>
+ <loext:color loext:name="accent4" loext:color="#8e03a3"/>
+ <loext:color loext:name="accent5" loext:color="#c99c00"/>
+ <loext:color loext:name="accent6" loext:color="#c9211e"/>
+ <loext:color loext:name="hyperlink" loext:color="#0000ee"/>
+ <loext:color loext:name="followed-hyperlink" loext:color="#551a8b"/>
+ </loext:theme-colors>
+ </loext:theme>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="co1" style:family="table-column">
+ <style:table-column-properties fo:break-before="auto" style:column-width="4.972cm"/>
+ </style:style>
+ <style:style style:name="co2" style:family="table-column">
+ <style:table-column-properties fo:break-before="auto" style:column-width="3.544cm"/>
+ </style:style>
+ <style:style style:name="co3" style:family="table-column">
+ <style:table-column-properties fo:break-before="auto" style:column-width="2.618cm"/>
+ </style:style>
+ <style:style style:name="co4" style:family="table-column">
+ <style:table-column-properties fo:break-before="auto" style:column-width="8.024cm"/>
+ </style:style>
+ <style:style style:name="co5" style:family="table-column">
+ <style:table-column-properties fo:break-before="auto" style:column-width="12.028cm"/>
+ </style:style>
+ <style:style style:name="co6" style:family="table-column">
+ <style:table-column-properties fo:break-before="auto" style:column-width="2.258cm"/>
+ </style:style>
+ <style:style style:name="ro1" style:family="table-row">
+ <style:table-row-properties style:row-height="2.06cm" fo:break-before="auto" style:use-optimal-row-height="true"/>
+ </style:style>
+ <style:style style:name="ro2" style:family="table-row">
+ <style:table-row-properties style:row-height="0.452cm" fo:break-before="auto" style:use-optimal-row-height="true"/>
+ </style:style>
+ <style:style style:name="ta1" style:family="table" style:master-page-name="Default">
+ <style:table-properties table:display="true" style:writing-mode="lr-tb"/>
+ </style:style>
+ <number:number-style style:name="N2">
+ <number:number number:decimal-places="2" number:min-decimal-places="2" number:min-integer-digits="1"/>
+ </number:number-style>
+ <number:boolean-style style:name="N99">
+ <number:boolean/>
+ </number:boolean-style>
+ <style:style style:name="ce1" style:family="table-cell" style:parent-style-name="Default"/>
+ <style:style style:name="ce2" style:family="table-cell" style:parent-style-name="Default">
+ <style:table-cell-properties style:vertical-align="top"/>
+ <style:text-properties fo:font-size="14pt" fo:font-weight="bold" style:font-size-asian="14pt" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="ce35" style:family="table-cell" style:parent-style-name="Default">
+ <style:table-cell-properties style:text-align-source="fix" style:repeat-content="false"/>
+ <style:paragraph-properties fo:text-align="center" fo:margin-left="0cm"/>
+ <style:text-properties fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="ce37" style:family="table-cell" style:parent-style-name="Default">
+ <style:text-properties style:use-window-font-color="true" fo:font-size="10pt" style:font-size-asian="10pt" style:font-size-complex="10pt"/>
+ </style:style>
+ <style:style style:name="ce38" style:family="table-cell" style:parent-style-name="Default">
+ <style:text-properties style:text-outline="false" style:text-line-through-style="none" style:text-line-through-type="none" style:font-name="Calibri" fo:font-size="10pt" fo:language="en" fo:country="US" fo:font-style="normal" fo:text-shadow="none" style:text-underline-style="none" fo:font-weight="normal" style:text-underline-mode="continuous" style:text-overline-mode="continuous" style:text-line-through-mode="continuous" style:font-name-asian="Droid Sans Fallback" style:font-size-asian="10pt" style:language-asian="zh" style:country-asian="CN" style:font-style-asian="normal" style:font-weight-asian="normal" style:font-name-complex="Droid Sans Devanagari" style:font-size-complex="10pt" style:language-complex="hi" style:country-complex="IN" style:font-style-complex="normal" style:font-weight-complex="normal" style:text-emphasize="none" style:font-relief="none" style:text-overline-style="none" style:text-overline-color="font-color"/>
+ </style:style>
+ <style:style style:name="ce39" style:family="table-cell" style:parent-style-name="Default">
+ <style:table-cell-properties fo:border-bottom="0.74pt solid #000000" fo:border-left="none" fo:border-right="none" fo:border-top="none"/>
+ <style:text-properties fo:color="#000000" style:text-outline="false" style:text-line-through-style="none" style:text-line-through-type="none" style:font-name="Calibri" fo:font-size="10pt" fo:language="en" fo:country="US" fo:font-style="normal" fo:text-shadow="none" style:text-underline-style="none" fo:font-weight="normal" style:text-underline-mode="continuous" style:text-overline-mode="continuous" style:text-line-through-mode="continuous" style:font-name-asian="Droid Sans Fallback" style:font-size-asian="10pt" style:language-asian="zh" style:country-asian="CN" style:font-style-asian="normal" style:font-weight-asian="normal" style:font-name-complex="Droid Sans Devanagari" style:font-size-complex="10pt" style:language-complex="hi" style:country-complex="IN" style:font-style-complex="normal" style:font-weight-complex="normal" style:text-emphasize="none" style:font-relief="none" style:text-overline-style="none" style:text-overline-color="font-color"/>
+ </style:style>
+ <style:style style:name="ce40" style:family="table-cell" style:parent-style-name="Default">
+ <style:table-cell-properties fo:border-bottom="0.74pt solid #000000" fo:border-left="none" fo:border-right="none" fo:border-top="none"/>
+ </style:style>
+ <style:style style:name="ce41" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N0"/>
+ <style:style style:name="ce11" style:family="table-cell" style:parent-style-name="Default">
+ <style:table-cell-properties style:vertical-align="middle"/>
+ <style:text-properties fo:font-size="12pt" fo:font-weight="bold" style:font-size-asian="12pt" style:font-weight-asian="bold" style:font-size-complex="12pt" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="ce17" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N99">
+ <style:table-cell-properties fo:border-bottom="0.74pt solid #000000" style:text-align-source="fix" style:repeat-content="false" fo:border-left="none" fo:border-right="none" fo:border-top="none"/>
+ <style:paragraph-properties fo:text-align="center" fo:margin-left="0cm"/>
+ <style:map style:condition="cell-content()=&quot;&quot;" style:apply-style-name="Default" style:base-cell-address="LOOKUP_test.C1"/>
+ <style:map style:condition="cell-content()=0" style:apply-style-name="Untitled1" style:base-cell-address="LOOKUP_test.C1"/>
+ <style:map style:condition="cell-content()=1" style:apply-style-name="Untitled2" style:base-cell-address="LOOKUP_test.C1"/>
+ </style:style>
+ <style:style style:name="ce16" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N99">
+ <style:table-cell-properties style:text-align-source="fix" style:repeat-content="false"/>
+ <style:paragraph-properties fo:text-align="center" fo:margin-left="0cm"/>
+ <style:map style:condition="cell-content()=&quot;&quot;" style:apply-style-name="Default" style:base-cell-address="LOOKUP_test.C1"/>
+ <style:map style:condition="cell-content()=0" style:apply-style-name="Untitled1" style:base-cell-address="LOOKUP_test.C1"/>
+ <style:map style:condition="cell-content()=1" style:apply-style-name="Untitled2" style:base-cell-address="LOOKUP_test.C1"/>
+ </style:style>
+ <style:style style:name="ce14" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N99">
+ <style:table-cell-properties fo:border-bottom="0.74pt solid #000000" style:text-align-source="fix" style:repeat-content="false" fo:border-left="none" fo:border-right="none" fo:border-top="none"/>
+ <style:paragraph-properties fo:text-align="center" fo:margin-left="0cm"/>
+ <style:map style:condition="cell-content()=&quot;&quot;" style:apply-style-name="Default" style:base-cell-address="LOOKUP_test.C1"/>
+ <style:map style:condition="cell-content()=0" style:apply-style-name="Untitled1" style:base-cell-address="LOOKUP_test.C1"/>
+ <style:map style:condition="cell-content()=1" style:apply-style-name="Untitled2" style:base-cell-address="LOOKUP_test.C1"/>
+ </style:style>
+ <style:style style:name="ce20" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N99">
+ <style:table-cell-properties fo:border-bottom="0.74pt solid #000000" style:text-align-source="fix" style:repeat-content="false" fo:border-left="none" fo:border-right="none" fo:border-top="none"/>
+ <style:paragraph-properties fo:text-align="center" fo:margin-left="0cm"/>
+ <style:map style:condition="cell-content()=&quot;&quot;" style:apply-style-name="Default" style:base-cell-address="LOOKUP_test.C1"/>
+ <style:map style:condition="cell-content()=0" style:apply-style-name="Untitled1" style:base-cell-address="LOOKUP_test.C1"/>
+ <style:map style:condition="cell-content()=1" style:apply-style-name="Untitled2" style:base-cell-address="LOOKUP_test.C1"/>
+ </style:style>
+ <style:style style:name="ce45" style:family="table-cell" style:parent-style-name="Default">
+ <style:text-properties fo:language="en" fo:country="US"/>
+ </style:style>
+ <style:style style:name="ce19" style:family="table-cell" style:parent-style-name="Default">
+ <style:table-cell-properties style:text-align-source="fix" style:repeat-content="false"/>
+ <style:paragraph-properties fo:text-align="center" fo:margin-left="0cm"/>
+ <style:map style:condition="cell-content()=&quot;&quot;" style:apply-style-name="Default" style:base-cell-address="LOOKUP_test.C1"/>
+ <style:map style:condition="cell-content()=0" style:apply-style-name="Untitled1" style:base-cell-address="LOOKUP_test.C1"/>
+ <style:map style:condition="cell-content()=1" style:apply-style-name="Untitled2" style:base-cell-address="LOOKUP_test.C1"/>
+ </style:style>
+ <style:style style:name="ce25" style:family="table-cell" style:parent-style-name="Default">
+ <style:table-cell-properties style:text-align-source="fix" style:repeat-content="false"/>
+ <style:paragraph-properties fo:text-align="center" fo:margin-left="0cm"/>
+ </style:style>
+ <style:style style:name="ce21" style:family="table-cell" style:parent-style-name="Default">
+ <style:table-cell-properties fo:wrap-option="wrap" fo:border="0.74pt solid #ff0000"/>
+ <style:text-properties fo:color="#3333ff" fo:font-size="10pt" fo:language="en" fo:country="US" fo:font-weight="bold" style:font-size-asian="10pt" style:font-size-complex="10pt"/>
+ </style:style>
+ <style:style style:name="ce54" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N0">
+ <style:table-cell-properties style:text-align-source="fix" style:repeat-content="false"/>
+ <style:paragraph-properties fo:text-align="center" fo:margin-left="0cm"/>
+ <style:map style:condition="cell-content()=&quot;&quot;" style:apply-style-name="Default" style:base-cell-address="LOOKUP_test.C1"/>
+ <style:map style:condition="cell-content()=0" style:apply-style-name="Untitled1" style:base-cell-address="LOOKUP_test.C1"/>
+ <style:map style:condition="cell-content()=1" style:apply-style-name="Untitled2" style:base-cell-address="LOOKUP_test.C1"/>
+ </style:style>
+ <style:style style:name="ce42" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N99">
+ <style:table-cell-properties fo:border-bottom="0.74pt solid #000000" style:text-align-source="fix" style:repeat-content="false" fo:border-left="none" fo:border-right="none" fo:border-top="none"/>
+ <style:paragraph-properties fo:text-align="center" fo:margin-left="0cm"/>
+ <style:map style:condition="cell-content()=&quot;&quot;" style:apply-style-name="Default" style:base-cell-address="LOOKUP_test.C1"/>
+ <style:map style:condition="cell-content()=0" style:apply-style-name="Untitled1" style:base-cell-address="LOOKUP_test.C1"/>
+ <style:map style:condition="cell-content()=1" style:apply-style-name="Untitled2" style:base-cell-address="LOOKUP_test.C1"/>
+ </style:style>
+ <style:style style:name="ta_extref" style:family="table">
+ <style:table-properties table:display="false"/>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties style:writing-mode="lr-tb"/>
+ <style:header-style>
+ <style:header-footer-properties fo:min-height="0.75cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="0.25cm"/>
+ </style:header-style>
+ <style:footer-style>
+ <style:header-footer-properties fo:min-height="0.75cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0.25cm"/>
+ </style:footer-style>
+ </style:page-layout>
+ <style:page-layout style:name="pm2">
+ <style:page-layout-properties style:writing-mode="lr-tb"/>
+ <style:header-style>
+ <style:header-footer-properties fo:min-height="0.75cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="0.25cm" fo:border="1.5pt solid #000000" fo:padding="0.018cm" fo:background-color="#c0c0c0">
+ <style:background-image/>
+ </style:header-footer-properties>
+ </style:header-style>
+ <style:footer-style>
+ <style:header-footer-properties fo:min-height="0.75cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0.25cm" fo:border="1.5pt solid #000000" fo:padding="0.018cm" fo:background-color="#c0c0c0">
+ <style:background-image/>
+ </style:header-footer-properties>
+ </style:footer-style>
+ </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Default" style:page-layout-name="pm1">
+ <style:header>
+ <text:p><text:sheet-name>???</text:sheet-name></text:p>
+ </style:header>
+ <style:header-left style:display="false"/>
+ <style:header-first style:display="false"/>
+ <style:footer style:display="false">
+ <text:p>Page <text:page-number>1</text:page-number></text:p>
+ </style:footer>
+ <style:footer-left style:display="false"/>
+ <style:footer-first style:display="false"/>
+ </style:master-page>
+ <style:master-page style:name="Report" style:page-layout-name="pm2">
+ <style:header>
+ <style:region-left>
+ <text:p><text:sheet-name>???</text:sheet-name><text:s/>(<text:title>???</text:title>)</text:p>
+ </style:region-left>
+ <style:region-right>
+ <text:p><text:date style:data-style-name="N2" text:date-value="2025-08-04">00.00.0000</text:date>, <text:time style:data-style-name="N2" text:time-value="00:37:35.676817400">00:00:00</text:time></text:p>
+ </style:region-right>
+ </style:header>
+ <style:header-left style:display="false"/>
+ <style:header-first style:display="false"/>
+ <style:footer>
+ <text:p>Page <text:page-number>1</text:page-number><text:s/>/ <text:page-count>99</text:page-count></text:p>
+ </style:footer>
+ <style:footer-left style:display="false"/>
+ <style:footer-first style:display="false"/>
+ </style:master-page>
+ </office:master-styles>
+ <office:body>
+ <office:spreadsheet>
+ <table:calculation-settings table:automatic-find-labels="false" table:use-regular-expressions="false" table:use-wildcards="true"/>
+ <table:table table:name="LOOKUP_test" table:style-name="ta1">
+ <table:table-column table:style-name="co1" table:default-cell-style-name="Default"/>
+ <table:table-column table:style-name="co2" table:default-cell-style-name="Default"/>
+ <table:table-column table:style-name="co3" table:default-cell-style-name="ce25"/>
+ <table:table-column table:style-name="co4" table:default-cell-style-name="ce25"/>
+ <table:table-column table:style-name="co5" table:default-cell-style-name="Default"/>
+ <table:table-row table:style-name="ro1">
+ <table:table-cell table:style-name="ce2" office:value-type="string" calcext:value-type="string">
+ <text:p>LOOKUP function</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce11" office:value-type="string" calcext:value-type="string">
+ <text:p>test summary</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce17" table:formula="of:=AND([.C4:.C27])" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>WAHR</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce21" office:value-type="string" calcext:value-type="string">
+ <text:p>This test contains references to the sheet “Data” in file “lookup_source.fods”. Make sure the files “lookup_source.fods” and “lookup_target.fods” are placed in the same directory.</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=FORMULA([.C1])" office:value-type="string" office:string-value="=AND(C4:C27)" calcext:value-type="string">
+ <text:p>=AND(C4:C27)</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:style-name="ce35" table:number-columns-repeated="5"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:style-name="ce35" office:value-type="string" calcext:value-type="string">
+ <text:p>Function</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce35" office:value-type="string" calcext:value-type="string">
+ <text:p>Expected</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce35" office:value-type="string" calcext:value-type="string">
+ <text:p>Correct</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce35" office:value-type="string" calcext:value-type="string">
+ <text:p>Comment</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce35" office:value-type="string" calcext:value-type="string">
+ <text:p>FunctionString</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:style-name="ce37" table:formula="of:=LOOKUP(0;[&apos;lookup_source.fods&apos;#$Data.A3:.A8];[&apos;lookup_source.fods&apos;#$Data.C3:.C8])" office:value-type="string" office:string-value="" calcext:value-type="error">
+ <text:p>#N/A</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=NA()" office:value-type="string" office:string-value="" calcext:value-type="error">
+ <text:p>#N/A</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" table:formula="of:=AND(ISERROR([.A4]);ISNA([.B4]))" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>WAHR</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" office:value-type="string" calcext:value-type="string">
+ <text:p>criterion smaller than smallest key</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=FORMULA([.A4])" office:value-type="string" office:string-value="=LOOKUP(0;&apos;lookup_source.fods&apos;#$Data.A3:A8;&apos;lookup_source.fods&apos;#$Data.C3:C8)" calcext:value-type="string">
+ <text:p>=LOOKUP(0;&apos;lookup_source.fods&apos;#$Data.A3:A8;&apos;lookup_source.fods&apos;#$Data.C3:C8)</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:style-name="ce38" table:formula="of:=LOOKUP(5;[&apos;lookup_source.fods&apos;#$Data.A3:.A8];[&apos;lookup_source.fods&apos;#$Data.C3:.C8])" office:value-type="float" office:value="11" calcext:value-type="float">
+ <text:p>11</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="11" calcext:value-type="float">
+ <text:p>11</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" table:formula="of:=[.A5]=[.B5]" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>WAHR</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce54" office:value-type="string" calcext:value-type="string">
+ <text:p>criterion between keys, take lower</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=FORMULA([.A5])" office:value-type="string" office:string-value="=LOOKUP(5;&apos;lookup_source.fods&apos;#$Data.A3:A8;&apos;lookup_source.fods&apos;#$Data.C3:C8)" calcext:value-type="string">
+ <text:p>=LOOKUP(5;&apos;lookup_source.fods&apos;#$Data.A3:A8;&apos;lookup_source.fods&apos;#$Data.C3:C8)</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:style-name="ce38" table:formula="of:=LOOKUP(10;[&apos;lookup_source.fods&apos;#$Data.A3:.A8];[&apos;lookup_source.fods&apos;#$Data.C3:.C8])" office:value-type="float" office:value="22" calcext:value-type="float">
+ <text:p>22</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="22" calcext:value-type="float">
+ <text:p>22</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" table:formula="of:=[.A6]=[.B6]" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>WAHR</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" office:value-type="string" calcext:value-type="string">
+ <text:p>exact <text:s/>match</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=FORMULA([.A6])" office:value-type="string" office:string-value="=LOOKUP(10;&apos;lookup_source.fods&apos;#$Data.A3:A8;&apos;lookup_source.fods&apos;#$Data.C3:C8)" calcext:value-type="string">
+ <text:p>=LOOKUP(10;&apos;lookup_source.fods&apos;#$Data.A3:A8;&apos;lookup_source.fods&apos;#$Data.C3:C8)</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:style-name="ce38" table:formula="of:=LOOKUP(&quot;A&quot;;[&apos;lookup_source.fods&apos;#$Data.A3:.A8];[&apos;lookup_source.fods&apos;#$Data.C3:.C8])" office:value-type="string" office:string-value="" calcext:value-type="error">
+ <text:p>#N/A</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=NA()" office:value-type="string" office:string-value="" calcext:value-type="error">
+ <text:p>#N/A</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" table:formula="of:=AND(ISERROR([.A7]);ISNA([.B7]))" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>WAHR</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" office:value-type="string" calcext:value-type="string">
+ <text:p>criterion text, but match is number</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=FORMULA([.A7])" office:value-type="string" office:string-value="=LOOKUP(&quot;A&quot;;&apos;lookup_source.fods&apos;#$Data.A3:A8;&apos;lookup_source.fods&apos;#$Data.C3:C8)" calcext:value-type="string">
+ <text:p>=LOOKUP(&quot;A&quot;;&apos;lookup_source.fods&apos;#$Data.A3:A8;&apos;lookup_source.fods&apos;#$Data.C3:C8)</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:style-name="ce38" table:formula="of:=LOOKUP(&quot;D&quot;;[&apos;lookup_source.fods&apos;#$Data.A3:.A8];[&apos;lookup_source.fods&apos;#$Data.C3:.C8])" office:value-type="float" office:value="44" calcext:value-type="float">
+ <text:p>44</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="44" calcext:value-type="float">
+ <text:p>44</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" table:formula="of:=[.A8]=[.B8]" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>WAHR</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" office:value-type="string" calcext:value-type="string">
+ <text:p>two exact matches, take upper</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=FORMULA([.A8])" office:value-type="string" office:string-value="=LOOKUP(&quot;D&quot;;&apos;lookup_source.fods&apos;#$Data.A3:A8;&apos;lookup_source.fods&apos;#$Data.C3:C8)" calcext:value-type="string">
+ <text:p>=LOOKUP(&quot;D&quot;;&apos;lookup_source.fods&apos;#$Data.A3:A8;&apos;lookup_source.fods&apos;#$Data.C3:C8)</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:style-name="ce39" table:formula="of:=LOOKUP(&quot;W&quot;;[&apos;lookup_source.fods&apos;#$Data.A3:.A8];[&apos;lookup_source.fods&apos;#$Data.C3:.C4])" office:value-type="string" office:string-value="" calcext:value-type="error">
+ <text:p>#N/A</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce40" table:formula="of:=NA()" office:value-type="string" office:string-value="" calcext:value-type="error">
+ <text:p>#N/A</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce14" table:formula="of:=AND(ISERROR([.A9]);ISNA([.B9]))" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>WAHR</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce42" office:value-type="string" calcext:value-type="string">
+ <text:p>external result vector is not expanded</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce40" table:formula="of:=FORMULA([.A9])" office:value-type="string" office:string-value="=LOOKUP(&quot;W&quot;;&apos;lookup_source.fods&apos;#$Data.A3:A8;&apos;lookup_source.fods&apos;#$Data.C3:C4)" calcext:value-type="string">
+ <text:p>=LOOKUP(&quot;W&quot;;&apos;lookup_source.fods&apos;#$Data.A3:A8;&apos;lookup_source.fods&apos;#$Data.C3:C4)</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:style-name="ce38" table:formula="of:=LOOKUP(0;[&apos;lookup_source.fods&apos;#$Data.B11:.G11];[&apos;lookup_source.fods&apos;#$Data.B13:.G13])" office:value-type="string" office:string-value="" calcext:value-type="error">
+ <text:p>#N/A</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=NA()" office:value-type="string" office:string-value="" calcext:value-type="error">
+ <text:p>#N/A</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" table:formula="of:=AND(ISERROR([.A10]);ISNA([.A10]))" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>WAHR</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" office:value-type="string" calcext:value-type="string">
+ <text:p>criterion smaller than smallest key</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=FORMULA([.A10])" office:value-type="string" office:string-value="=LOOKUP(0;&apos;lookup_source.fods&apos;#$Data.B11:G11;&apos;lookup_source.fods&apos;#$Data.B13:G13)" calcext:value-type="string">
+ <text:p>=LOOKUP(0;&apos;lookup_source.fods&apos;#$Data.B11:G11;&apos;lookup_source.fods&apos;#$Data.B13:G13)</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:formula="of:=LOOKUP(5;[&apos;lookup_source.fods&apos;#$Data.B11:.G11];[&apos;lookup_source.fods&apos;#$Data.B13:.G13])" office:value-type="float" office:value="11" calcext:value-type="float">
+ <text:p>11</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="11" calcext:value-type="float">
+ <text:p>11</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" table:formula="of:=[.A11]=[.B11]" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>WAHR</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce54" office:value-type="string" calcext:value-type="string">
+ <text:p>criterion between keys, take lower</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=FORMULA([.A11])" office:value-type="string" office:string-value="=LOOKUP(5;&apos;lookup_source.fods&apos;#$Data.B11:G11;&apos;lookup_source.fods&apos;#$Data.B13:G13)" calcext:value-type="string">
+ <text:p>=LOOKUP(5;&apos;lookup_source.fods&apos;#$Data.B11:G11;&apos;lookup_source.fods&apos;#$Data.B13:G13)</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:formula="of:=LOOKUP(10;[&apos;lookup_source.fods&apos;#$Data.B11:.G11];[&apos;lookup_source.fods&apos;#$Data.B13:.G13])" office:value-type="float" office:value="22" calcext:value-type="float">
+ <text:p>22</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="22" calcext:value-type="float">
+ <text:p>22</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" table:formula="of:=[.A12]=[.B12]" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>WAHR</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" office:value-type="string" calcext:value-type="string">
+ <text:p>exact <text:s/>match</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=FORMULA([.A12])" office:value-type="string" office:string-value="=LOOKUP(10;&apos;lookup_source.fods&apos;#$Data.B11:G11;&apos;lookup_source.fods&apos;#$Data.B13:G13)" calcext:value-type="string">
+ <text:p>=LOOKUP(10;&apos;lookup_source.fods&apos;#$Data.B11:G11;&apos;lookup_source.fods&apos;#$Data.B13:G13)</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:formula="of:=LOOKUP(&quot;A&quot;;[&apos;lookup_source.fods&apos;#$Data.B11:.G11];[&apos;lookup_source.fods&apos;#$Data.B13:.G13])" office:value-type="string" office:string-value="" calcext:value-type="error">
+ <text:p>#N/A</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=NA()" office:value-type="string" office:string-value="" calcext:value-type="error">
+ <text:p>#N/A</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" table:formula="of:=AND(ISERROR([.A13]);ISNA([.B13]))" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>WAHR</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" office:value-type="string" calcext:value-type="string">
+ <text:p>criterion text, but match is number</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=FORMULA([.A13])" office:value-type="string" office:string-value="=LOOKUP(&quot;A&quot;;&apos;lookup_source.fods&apos;#$Data.B11:G11;&apos;lookup_source.fods&apos;#$Data.B13:G13)" calcext:value-type="string">
+ <text:p>=LOOKUP(&quot;A&quot;;&apos;lookup_source.fods&apos;#$Data.B11:G11;&apos;lookup_source.fods&apos;#$Data.B13:G13)</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:formula="of:=LOOKUP(&quot;D&quot;;[&apos;lookup_source.fods&apos;#$Data.B11:.G11];[&apos;lookup_source.fods&apos;#$Data.B13:.G13])" office:value-type="float" office:value="44" calcext:value-type="float">
+ <text:p>44</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="44" calcext:value-type="float">
+ <text:p>44</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" table:formula="of:=[.A14]=[.B14]" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>WAHR</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" office:value-type="string" calcext:value-type="string">
+ <text:p>two exact matches, take upper</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=FORMULA([.A14])" office:value-type="string" office:string-value="=LOOKUP(&quot;D&quot;;&apos;lookup_source.fods&apos;#$Data.B11:G11;&apos;lookup_source.fods&apos;#$Data.B13:G13)" calcext:value-type="string">
+ <text:p>=LOOKUP(&quot;D&quot;;&apos;lookup_source.fods&apos;#$Data.B11:G11;&apos;lookup_source.fods&apos;#$Data.B13:G13)</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:style-name="ce40" table:formula="of:=LOOKUP(&quot;W&quot;;[&apos;lookup_source.fods&apos;#$Data.B11:.G11];[&apos;lookup_source.fods&apos;#$Data.B13:.C13])" office:value-type="string" office:string-value="" calcext:value-type="error">
+ <text:p>#N/A</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce40" table:formula="of:=NA()" office:value-type="string" office:string-value="" calcext:value-type="error">
+ <text:p>#N/A</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce14" table:formula="of:=AND(ISERROR([.A15]);ISNA([.B15]))" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>WAHR</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce42" office:value-type="string" calcext:value-type="string">
+ <text:p>external result vector is not expanded</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce40" table:formula="of:=FORMULA([.A15])" office:value-type="string" office:string-value="=LOOKUP(&quot;W&quot;;&apos;lookup_source.fods&apos;#$Data.B11:G11;&apos;lookup_source.fods&apos;#$Data.B13:C13)" calcext:value-type="string">
+ <text:p>=LOOKUP(&quot;W&quot;;&apos;lookup_source.fods&apos;#$Data.B11:G11;&apos;lookup_source.fods&apos;#$Data.B13:C13)</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:formula="of:=LOOKUP(0;[&apos;lookup_source.fods&apos;#$Data.A17:.A22];[&apos;lookup_source.fods&apos;#$Data.D16:.I16])" office:value-type="string" office:string-value="" calcext:value-type="error">
+ <text:p>#N/A</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=NA()" office:value-type="string" office:string-value="" calcext:value-type="error">
+ <text:p>#N/A</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" table:formula="of:=AND(ISERROR([.A16]);ISNA([.B16]))" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>WAHR</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" office:value-type="string" calcext:value-type="string">
+ <text:p>criterion smaller than smallest key</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=FORMULA([.A16])" office:value-type="string" office:string-value="=LOOKUP(0;&apos;lookup_source.fods&apos;#$Data.A17:A22;&apos;lookup_source.fods&apos;#$Data.D16:I16)" calcext:value-type="string">
+ <text:p>=LOOKUP(0;&apos;lookup_source.fods&apos;#$Data.A17:A22;&apos;lookup_source.fods&apos;#$Data.D16:I16)</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:formula="of:=LOOKUP(5;[&apos;lookup_source.fods&apos;#$Data.A17:.A22];[&apos;lookup_source.fods&apos;#$Data.D16:.I16])" office:value-type="float" office:value="11" calcext:value-type="float">
+ <text:p>11</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="11" calcext:value-type="float">
+ <text:p>11</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" table:formula="of:=[.A17]=[.B17]" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>WAHR</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce54" office:value-type="string" calcext:value-type="string">
+ <text:p>criterion between keys, take lower</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=FORMULA([.A17])" office:value-type="string" office:string-value="=LOOKUP(5;&apos;lookup_source.fods&apos;#$Data.A17:A22;&apos;lookup_source.fods&apos;#$Data.D16:I16)" calcext:value-type="string">
+ <text:p>=LOOKUP(5;&apos;lookup_source.fods&apos;#$Data.A17:A22;&apos;lookup_source.fods&apos;#$Data.D16:I16)</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:formula="of:=LOOKUP(10;[&apos;lookup_source.fods&apos;#$Data.A17:.A22];[&apos;lookup_source.fods&apos;#$Data.D16:.I16])" office:value-type="float" office:value="22" calcext:value-type="float">
+ <text:p>22</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="22" calcext:value-type="float">
+ <text:p>22</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" table:formula="of:=[.A18]=[.B18]" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>WAHR</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" office:value-type="string" calcext:value-type="string">
+ <text:p>exact <text:s/>match</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=FORMULA([.A18])" office:value-type="string" office:string-value="=LOOKUP(10;&apos;lookup_source.fods&apos;#$Data.A17:A22;&apos;lookup_source.fods&apos;#$Data.D16:I16)" calcext:value-type="string">
+ <text:p>=LOOKUP(10;&apos;lookup_source.fods&apos;#$Data.A17:A22;&apos;lookup_source.fods&apos;#$Data.D16:I16)</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:formula="of:=LOOKUP(&quot;A&quot;;[&apos;lookup_source.fods&apos;#$Data.A17:.A22];[&apos;lookup_source.fods&apos;#$Data.D16:.H16])" office:value-type="string" office:string-value="" calcext:value-type="error">
+ <text:p>#N/A</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=NA()" office:value-type="string" office:string-value="" calcext:value-type="error">
+ <text:p>#N/A</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" table:formula="of:=AND(ISERROR([.A19]);ISNA([.B19]))" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>WAHR</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" office:value-type="string" calcext:value-type="string">
+ <text:p>criterion text, but match is number</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=FORMULA([.A19])" office:value-type="string" office:string-value="=LOOKUP(&quot;A&quot;;&apos;lookup_source.fods&apos;#$Data.A17:A22;&apos;lookup_source.fods&apos;#$Data.D16:H16)" calcext:value-type="string">
+ <text:p>=LOOKUP(&quot;A&quot;;&apos;lookup_source.fods&apos;#$Data.A17:A22;&apos;lookup_source.fods&apos;#$Data.D16:H16)</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:formula="of:=LOOKUP(&quot;D&quot;;[&apos;lookup_source.fods&apos;#$Data.A17:.A22];[&apos;lookup_source.fods&apos;#$Data.D16:.I16])" office:value-type="float" office:value="44" calcext:value-type="float">
+ <text:p>44</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="44" calcext:value-type="float">
+ <text:p>44</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" table:formula="of:=[.A20]=[.B20]" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>WAHR</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" office:value-type="string" calcext:value-type="string">
+ <text:p>two exact matches, take upper</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=FORMULA([.A20])" office:value-type="string" office:string-value="=LOOKUP(&quot;D&quot;;&apos;lookup_source.fods&apos;#$Data.A17:A22;&apos;lookup_source.fods&apos;#$Data.D16:I16)" calcext:value-type="string">
+ <text:p>=LOOKUP(&quot;D&quot;;&apos;lookup_source.fods&apos;#$Data.A17:A22;&apos;lookup_source.fods&apos;#$Data.D16:I16)</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:style-name="ce40" table:formula="of:=LOOKUP(&quot;W&quot;;[&apos;lookup_source.fods&apos;#$Data.A17:.A22];[&apos;lookup_source.fods&apos;#$Data.D16:.E16])" office:value-type="string" office:string-value="" calcext:value-type="error">
+ <text:p>#N/A</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce40" table:formula="of:=NA()" office:value-type="string" office:string-value="" calcext:value-type="error">
+ <text:p>#N/A</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce17" table:formula="of:=AND(ISERROR([.A21]);ISNA([.B21]))" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>WAHR</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce42" office:value-type="string" calcext:value-type="string">
+ <text:p>external result vector is not expanded</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce40" table:formula="of:=FORMULA([.A21])" office:value-type="string" office:string-value="=LOOKUP(&quot;W&quot;;&apos;lookup_source.fods&apos;#$Data.A17:A22;&apos;lookup_source.fods&apos;#$Data.D16:E16)" calcext:value-type="string">
+ <text:p>=LOOKUP(&quot;W&quot;;&apos;lookup_source.fods&apos;#$Data.A17:A22;&apos;lookup_source.fods&apos;#$Data.D16:E16)</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:formula="of:=LOOKUP(0;[&apos;lookup_source.fods&apos;#$Data.B25:.G25];[&apos;lookup_source.fods&apos;#$Data.A28:.A33])" office:value-type="string" office:string-value="" calcext:value-type="error">
+ <text:p>#N/A</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=NA()" office:value-type="string" office:string-value="" calcext:value-type="error">
+ <text:p>#N/A</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" table:formula="of:=AND(ISERROR([.A22]);ISNA([.A22]))" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>WAHR</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" office:value-type="string" calcext:value-type="string">
+ <text:p>criterion smaller than smallest key</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=FORMULA([.A22])" office:value-type="string" office:string-value="=LOOKUP(0;&apos;lookup_source.fods&apos;#$Data.B25:G25;&apos;lookup_source.fods&apos;#$Data.A28:A33)" calcext:value-type="string">
+ <text:p>=LOOKUP(0;&apos;lookup_source.fods&apos;#$Data.B25:G25;&apos;lookup_source.fods&apos;#$Data.A28:A33)</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:formula="of:=LOOKUP(5;[&apos;lookup_source.fods&apos;#$Data.B25:.G25];[&apos;lookup_source.fods&apos;#$Data.A28:.A33])" office:value-type="float" office:value="11" calcext:value-type="float">
+ <text:p>11</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="11" calcext:value-type="float">
+ <text:p>11</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" table:formula="of:=[.A23]=[.B23]" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>WAHR</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce54" office:value-type="string" calcext:value-type="string">
+ <text:p>criterion between keys, take lower</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=FORMULA([.A23])" office:value-type="string" office:string-value="=LOOKUP(5;&apos;lookup_source.fods&apos;#$Data.B25:G25;&apos;lookup_source.fods&apos;#$Data.A28:A33)" calcext:value-type="string">
+ <text:p>=LOOKUP(5;&apos;lookup_source.fods&apos;#$Data.B25:G25;&apos;lookup_source.fods&apos;#$Data.A28:A33)</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:formula="of:=LOOKUP(10;[&apos;lookup_source.fods&apos;#$Data.B25:.G25];[&apos;lookup_source.fods&apos;#$Data.A28:.A33])" office:value-type="float" office:value="22" calcext:value-type="float">
+ <text:p>22</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="22" calcext:value-type="float">
+ <text:p>22</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" table:formula="of:=[.A24]=[.B24]" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>WAHR</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" office:value-type="string" calcext:value-type="string">
+ <text:p>exact <text:s/>match</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=FORMULA([.A24])" office:value-type="string" office:string-value="=LOOKUP(10;&apos;lookup_source.fods&apos;#$Data.B25:G25;&apos;lookup_source.fods&apos;#$Data.A28:A33)" calcext:value-type="string">
+ <text:p>=LOOKUP(10;&apos;lookup_source.fods&apos;#$Data.B25:G25;&apos;lookup_source.fods&apos;#$Data.A28:A33)</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:formula="of:=LOOKUP(&quot;A&quot;;[&apos;lookup_source.fods&apos;#$Data.B25:.G25];[&apos;lookup_source.fods&apos;#$Data.A28:.A33])" office:value-type="string" office:string-value="" calcext:value-type="error">
+ <text:p>#N/A</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=NA()" office:value-type="string" office:string-value="" calcext:value-type="error">
+ <text:p>#N/A</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" table:formula="of:=AND(ISERROR([.A25]);ISNA([.B25]))" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>WAHR</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" office:value-type="string" calcext:value-type="string">
+ <text:p>criterion text, but match is number</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=FORMULA([.A25])" office:value-type="string" office:string-value="=LOOKUP(&quot;A&quot;;&apos;lookup_source.fods&apos;#$Data.B25:G25;&apos;lookup_source.fods&apos;#$Data.A28:A33)" calcext:value-type="string">
+ <text:p>=LOOKUP(&quot;A&quot;;&apos;lookup_source.fods&apos;#$Data.B25:G25;&apos;lookup_source.fods&apos;#$Data.A28:A33)</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:style-name="ce41" table:formula="of:=LOOKUP(&quot;D&quot;;[&apos;lookup_source.fods&apos;#$Data.B25:.G25];[&apos;lookup_source.fods&apos;#$Data.A28:.A33])" office:value-type="float" office:value="44" calcext:value-type="float">
+ <text:p>44</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="44" calcext:value-type="float">
+ <text:p>44</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" table:formula="of:=[.A26]=[.B26]" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>WAHR</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce16" office:value-type="string" calcext:value-type="string">
+ <text:p>two exact matches, take upper</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=FORMULA([.A26])" office:value-type="string" office:string-value="=LOOKUP(&quot;D&quot;;&apos;lookup_source.fods&apos;#$Data.B25:G25;&apos;lookup_source.fods&apos;#$Data.A28:A33)" calcext:value-type="string">
+ <text:p>=LOOKUP(&quot;D&quot;;&apos;lookup_source.fods&apos;#$Data.B25:G25;&apos;lookup_source.fods&apos;#$Data.A28:A33)</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:style-name="ce40" table:formula="of:=LOOKUP(&quot;W&quot;;[&apos;lookup_source.fods&apos;#$Data.B25:.G25];[&apos;lookup_source.fods&apos;#$Data.A28:.A29])" office:value-type="string" office:string-value="" calcext:value-type="error">
+ <text:p>#N/A</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce40" table:formula="of:=NA()" office:value-type="string" office:string-value="" calcext:value-type="error">
+ <text:p>#N/A</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce20" table:formula="of:=AND(ISERROR([.A27]);ISNA([.B27]))" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>WAHR</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce42" office:value-type="string" calcext:value-type="string">
+ <text:p>external result vector is not expanded</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce40" table:formula="of:=FORMULA([.A27])" office:value-type="string" office:string-value="=LOOKUP(&quot;W&quot;;&apos;lookup_source.fods&apos;#$Data.B25:G25;&apos;lookup_source.fods&apos;#$Data.A28:A29)" calcext:value-type="string">
+ <text:p>=LOOKUP(&quot;W&quot;;&apos;lookup_source.fods&apos;#$Data.B25:G25;&apos;lookup_source.fods&apos;#$Data.A28:A29)</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:number-columns-repeated="2"/>
+ <table:table-cell table:style-name="ce45"/>
+ <table:table-cell table:style-name="Default"/>
+ <table:table-cell/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2" table:number-rows-repeated="731">
+ <table:table-cell table:number-columns-repeated="2"/>
+ <table:table-cell table:style-name="Default" table:number-columns-repeated="2"/>
+ <table:table-cell/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2" table:number-rows-repeated="2963">
+ <table:table-cell table:number-columns-repeated="2"/>
+ <table:table-cell table:style-name="ce19" table:number-columns-repeated="2"/>
+ <table:table-cell/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2" table:number-rows-repeated="1044853">
+ <table:table-cell table:number-columns-repeated="5"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:number-columns-repeated="5"/>
+ </table:table-row>
+ <calcext:conditional-formats>
+ <calcext:conditional-format calcext:target-range-address="LOOKUP_test.C760:LOOKUP_test.D3722 LOOKUP_test.C4:LOOKUP_test.D27 LOOKUP_test.C1:LOOKUP_test.C1">
+ <calcext:condition calcext:apply-style-name="Default" calcext:value="=&quot;&quot;" calcext:base-cell-address="LOOKUP_test.C1"/>
+ <calcext:condition calcext:apply-style-name="Untitled1" calcext:value="=0" calcext:base-cell-address="LOOKUP_test.C1"/>
+ <calcext:condition calcext:apply-style-name="Untitled2" calcext:value="=1" calcext:base-cell-address="LOOKUP_test.C1"/>
+ </calcext:conditional-format>
+ </calcext:conditional-formats>
+ </table:table>
+ <table:table table:name="&apos;lookup_target.fods/lookup_target.fods/lookup_target.fods/lookup_target.fods/lookup_target.fods/lookup_source.fods&apos;#Data" table:print="false" table:style-name="ta_extref">
+ <table:table-source xlink:type="simple" xlink:href="../../../../../TempLO/lookup_target.fods/lookup_target.fods/lookup_target.fods/lookup_target.fods/lookup_target.fods/lookup_source.fods" table:table-name="Data" table:filter-name="OpenDocument Spreadsheet Flat XML" table:mode="copy-results-only"/>
+ <table:table-column table:number-columns-repeated="9"/>
+ <table:table-row table:number-rows-repeated="2">
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>Result</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:number-rows-repeated="3">
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>Sheet</text:p>
+ </table:table-cell>
+ <table:table-cell/>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>Description</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="2">
+ <text:p>2</text:p>
+ </table:table-cell>
+ <table:table-cell/>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>Same formulas as in file “lookup_target.fods” but with local references</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:number-rows-repeated="2">
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:number-columns-repeated="3"/>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>T</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>W</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:number-columns-repeated="3"/>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="33">
+ <text:p>33</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="44">
+ <text:p>44</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="55">
+ <text:p>55</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="66">
+ <text:p>66</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:number-rows-repeated="2">
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:number-columns-repeated="3"/>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="11">
+ <text:p>11</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="22">
+ <text:p>22</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="33">
+ <text:p>33</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="44">
+ <text:p>44</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="55">
+ <text:p>55</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="66">
+ <text:p>66</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:number-rows-repeated="8">
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:number-columns-repeated="3"/>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>T</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>W</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <table:table table:name="&apos;lookup_target.fods/lookup_source.fods&apos;#Data" table:print="false" table:style-name="ta_extref">
+ <table:table-source xlink:type="simple" xlink:href="../../../../../TempLO/lookup_target.fods/lookup_source.fods" table:table-name="Data" table:filter-name="OpenDocument Spreadsheet Flat XML" table:mode="copy-results-only"/>
+ <table:table-column table:number-columns-repeated="9"/>
+ <table:table-row table:number-rows-repeated="2">
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="3">
+ <text:p>3</text:p>
+ </table:table-cell>
+ <table:table-cell/>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="11">
+ <text:p>11</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="10">
+ <text:p>10</text:p>
+ </table:table-cell>
+ <table:table-cell/>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="22">
+ <text:p>22</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ <table:table-cell/>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="33">
+ <text:p>33</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ <table:table-cell/>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="44">
+ <text:p>44</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>T</text:p>
+ </table:table-cell>
+ <table:table-cell/>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="55">
+ <text:p>55</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>W</text:p>
+ </table:table-cell>
+ <table:table-cell/>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="66">
+ <text:p>66</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:number-rows-repeated="2">
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell/>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="3">
+ <text:p>3</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="10">
+ <text:p>10</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>T</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>W</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell/>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="11">
+ <text:p>11</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="22">
+ <text:p>22</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="33">
+ <text:p>33</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="44">
+ <text:p>44</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="55">
+ <text:p>55</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="66">
+ <text:p>66</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:number-rows-repeated="2">
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:number-columns-repeated="3"/>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="11">
+ <text:p>11</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="22">
+ <text:p>22</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="33">
+ <text:p>33</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="44">
+ <text:p>44</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="55">
+ <text:p>55</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="66">
+ <text:p>66</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="3">
+ <text:p>3</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="10">
+ <text:p>10</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>T</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>W</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:number-rows-repeated="2">
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell/>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="3">
+ <text:p>3</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="10">
+ <text:p>10</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>T</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>W</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:number-rows-repeated="2">
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="11">
+ <text:p>11</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="22">
+ <text:p>22</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="33">
+ <text:p>33</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="44">
+ <text:p>44</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="55">
+ <text:p>55</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="66">
+ <text:p>66</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <table:table table:name="&apos;lookup_source.fods&apos;#Data" table:print="false" table:style-name="ta_extref">
+ <table:table-source xlink:type="simple" xlink:href="../../../../../TempLO/lookup_source.fods" table:table-name="Data" table:filter-name="OpenDocument Spreadsheet Flat XML" table:mode="copy-results-only"/>
+ <table:table-column table:number-columns-repeated="9"/>
+ <table:table-row table:number-rows-repeated="2">
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="3">
+ <text:p>3</text:p>
+ </table:table-cell>
+ <table:table-cell/>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="11">
+ <text:p>11</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="10">
+ <text:p>10</text:p>
+ </table:table-cell>
+ <table:table-cell/>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="22">
+ <text:p>22</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ <table:table-cell/>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="33">
+ <text:p>33</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ <table:table-cell/>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="44">
+ <text:p>44</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>T</text:p>
+ </table:table-cell>
+ <table:table-cell/>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="55">
+ <text:p>55</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>W</text:p>
+ </table:table-cell>
+ <table:table-cell/>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="66">
+ <text:p>66</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:number-rows-repeated="2">
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell/>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="3">
+ <text:p>3</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="10">
+ <text:p>10</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>T</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>W</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell/>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="11">
+ <text:p>11</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="22">
+ <text:p>22</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="33">
+ <text:p>33</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="44">
+ <text:p>44</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="55">
+ <text:p>55</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="66">
+ <text:p>66</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:number-rows-repeated="2">
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:number-columns-repeated="3"/>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="11">
+ <text:p>11</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="22">
+ <text:p>22</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="33">
+ <text:p>33</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="44">
+ <text:p>44</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="55">
+ <text:p>55</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="66">
+ <text:p>66</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="3">
+ <text:p>3</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="10">
+ <text:p>10</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>T</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>W</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:number-rows-repeated="2">
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell/>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="3">
+ <text:p>3</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="10">
+ <text:p>10</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>D</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>T</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce1" office:value-type="string">
+ <text:p>W</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row table:number-rows-repeated="2">
+ <table:table-cell table:number-columns-repeated="9"/>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="11">
+ <text:p>11</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="22">
+ <text:p>22</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="33">
+ <text:p>33</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="44">
+ <text:p>44</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="55">
+ <text:p>55</text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="ce1" office:value-type="float" office:value="66">
+ <text:p>66</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <table:named-expressions/>
+ </office:spreadsheet>
+ </office:body>
+</office:document>
diff --git a/sc/qa/unit/data/functions/spreadsheet/fods/xmatch.fods b/sc/qa/unit/data/functions/spreadsheet/fods/xmatch.fods
index c5156957acde..fa17e53c03cc 100644
--- a/sc/qa/unit/data/functions/spreadsheet/fods/xmatch.fods
+++ b/sc/qa/unit/data/functions/spreadsheet/fods/xmatch.fods
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" office:version="1.4" office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
- <office:meta><meta:creation-date>2024-01-16T18:30:06.278000000</meta:creation-date><meta:editing-duration>PT3H3M8S</meta:editing-duration><meta:editing-cycles>58</meta:editing-cycles><meta:generator>LibreOfficeDev/25.2.0.0.alpha0$Windows_X86_64 LibreOffice_project/a379e033425053885724b163147892f21830bca0</meta:generator><dc:date>2024-11-03T18:27:19.548583300</dc:date><meta:document-statistic meta:table-count="2" meta:cell-count="305" meta:object-count="0"/></office:meta>
+ <office:meta><meta:creation-date>2024-01-16T18:30:06.278000000</meta:creation-date><meta:editing-duration>PT3H22M31S</meta:editing-duration><meta:editing-cycles>63</meta:editing-cycles><meta:generator>LibreOfficeDev/26.2.0.0.alpha0$Windows_X86_64 LibreOffice_project/f6b6eff1b754de1a9f5f6a79b7aad53604c87cf5</meta:generator><dc:date>2025-07-17T17:30:05.339473200</dc:date><meta:document-statistic meta:table-count="2" meta:cell-count="337" meta:object-count="0"/></office:meta>
<office:settings>
<config:config-item-set config:name="ooo:view-settings">
<config:config-item config:name="VisibleAreaTop" config:type="int">0</config:config-item>
<config:config-item config:name="VisibleAreaLeft" config:type="int">0</config:config-item>
- <config:config-item config:name="VisibleAreaWidth" config:type="int">15882</config:config-item>
- <config:config-item config:name="VisibleAreaHeight" config:type="int">5013</config:config-item>
+ <config:config-item config:name="VisibleAreaWidth" config:type="int">54095</config:config-item>
+ <config:config-item config:name="VisibleAreaHeight" config:type="int">19417</config:config-item>
<config:config-item-map-indexed config:name="Views">
<config:config-item-map-entry>
<config:config-item config:name="ViewId" config:type="string">view1</config:config-item>
@@ -31,7 +31,7 @@
</config:config-item-map-entry>
<config:config-item-map-entry config:name="Sheet2">
<config:config-item config:name="CursorPositionX" config:type="int">3</config:config-item>
- <config:config-item config:name="CursorPositionY" config:type="int">37</config:config-item>
+ <config:config-item config:name="CursorPositionY" config:type="int">43</config:config-item>
<config:config-item config:name="ActiveSplitRange" config:type="short">2</config:config-item>
<config:config-item config:name="PositionLeft" config:type="int">0</config:config-item>
<config:config-item config:name="PositionRight" config:type="int">0</config:config-item>
@@ -59,7 +59,7 @@
<config:config-item config:name="ShowFormulasMarks" config:type="boolean">false</config:config-item>
<config:config-item config:name="ShowGrid" config:type="boolean">true</config:config-item>
<config:config-item config:name="GridColor" config:type="int">12632256</config:config-item>
- <config:config-item config:name="FormulaBarHeight" config:type="short">1</config:config-item>
+ <config:config-item config:name="ShowPageBreaks" config:type="boolean">true</config:config-item>
<config:config-item config:name="HasColumnRowHeaders" config:type="boolean">true</config:config-item>
<config:config-item config:name="HasSheetTabs" config:type="boolean">true</config:config-item>
<config:config-item config:name="IsOutlineSymbolsSet" config:type="boolean">true</config:config-item>
@@ -71,6 +71,7 @@
<config:config-item config:name="RasterSubdivisionX" config:type="int">1</config:config-item>
<config:config-item config:name="RasterSubdivisionY" config:type="int">1</config:config-item>
<config:config-item config:name="IsRasterAxisSynchronized" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="FormulaBarHeight" config:type="short">1</config:config-item>
<config:config-item config:name="AnchoredTextOverflowLegacy" config:type="boolean">false</config:config-item>
<config:config-item config:name="LegacySingleLineFontwork" config:type="boolean">false</config:config-item>
<config:config-item config:name="ConnectorUseSnapRect" config:type="boolean">false</config:config-item>
@@ -79,34 +80,15 @@
</config:config-item-map-indexed>
</config:config-item-set>
<config:config-item-set config:name="ooo:configuration-settings">
- <config:config-item config:name="ShowZeroValues" config:type="boolean">true</config:config-item>
- <config:config-item config:name="ShowNotes" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="AutoCalculate" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item>
+ <config:config-item config:name="EmbedAsianScriptFonts" config:type="boolean">true</config:config-item>
<config:config-item config:name="EmbedComplexScriptFonts" config:type="boolean">true</config:config-item>
- <config:config-item config:name="ShowNoteAuthor" config:type="boolean">true</config:config-item>
- <config:config-item config:name="ShowFormulasMarks" config:type="boolean">false</config:config-item>
- <config:config-item config:name="PrinterSetup" config:type="base64Binary">bBb+/01pY3Jvc29mdCBQcmludCB0byBQREYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATWljcm9zb2Z0IFByaW50IFRvIFBERgAAAAAAAAAAAAAWAAEAPhUAAAAAAAAEAAhSAAAEdAAAM1ROVwAAAAAKAE0AaQBjAHIAbwBzAG8AZgB0ACAAUAByAGkAbgB0ACAAdABvACAAUABEAEYAAAAAAAAAAAAAAAAAAAAAAAAAAAABBAMG3ABYFAMtAQABAAkAmgs0CGQAAQAPAFgCAgABAFgCAwABAEEANAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAIAAAABAAAA/////0dJUzQAAAAAAAAAAAAAAABESU5VIgDQACwDLBHiXo1TAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAABkAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAAFNNVEoAAAAAEADAAHsAMAA4ADQARgAwADEARgBBAC0ARQA2ADMANAAtADQARAA3ADcALQA4ADMARQBFAC0AMAA3ADQAOAAxADcAQwAwADMANQA4ADEAfQAAAFJFU0RMTABVbmlyZXNETEwAUGFwZXJTaXplAEE0AE9yaWVudGF0aW9uAFBPUlRSQUlUAFJlc29sdXRpb24AUmVzT3B0aW9uMQBDb2xvck1vZGUAQ29sb3IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwRAABWNERNAQAAAAAAAACcCnAiHAAAAOwAAAADAAAA+gFPCDTmd02D7gdIF8A1gdAAAABMAAAAAwAAAAAIAAAAAAAAAAAAAAMAAAAACAAAKgAAAAAIAAADAAAAQAAAAFYAAAAAEAAARABvAGMAdQBtAGUAbgB0AFUAcwBlAHIAUABhAHMAcwB3AG8AcgBkAAAARABvAGMAdQBtAGUAbgB0AE8AdwBuAGUAcgBQAGEAcwBzAHcAbwByAGQAAABEAG8AYwB1AG0AZQBuAHQAQwByAHkAcAB0AFMAZQBjAHUAcgBpAHQAeQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASAENPTVBBVF9EVVBMRVhfTU9ERRMARHVwbGV4TW9kZTo6VW5rbm93bgwAUFJJTlRFUl9OQU1FFgBNaWNyb3NvZnQgUHJpbnQgdG8gUERGCwBEUklWRVJfTkFNRRYATWljcm9zb2Z0IFByaW50IFRvIFBERg==</config:config-item>
- <config:config-item config:name="ShowGrid" config:type="boolean">true</config:config-item>
- <config:config-item config:name="GridColor" config:type="int">12632256</config:config-item>
- <config:config-item config:name="ShowPageBreaks" config:type="boolean">true</config:config-item>
- <config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
- <config:config-item config:name="LinkUpdateMode" config:type="short">3</config:config-item>
- <config:config-item config:name="HasColumnRowHeaders" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmbedFonts" config:type="boolean">false</config:config-item>
<config:config-item config:name="EmbedLatinScriptFonts" config:type="boolean">true</config:config-item>
- <config:config-item config:name="HasSheetTabs" config:type="boolean">true</config:config-item>
- <config:config-item config:name="IsOutlineSymbolsSet" config:type="boolean">true</config:config-item>
- <config:config-item config:name="IsSnapToRaster" config:type="boolean">false</config:config-item>
- <config:config-item config:name="RasterIsVisible" config:type="boolean">false</config:config-item>
- <config:config-item config:name="RasterResolutionX" config:type="int">1270</config:config-item>
- <config:config-item config:name="RasterResolutionY" config:type="int">1270</config:config-item>
- <config:config-item config:name="RasterSubdivisionX" config:type="int">1</config:config-item>
- <config:config-item config:name="RasterSubdivisionY" config:type="int">1</config:config-item>
- <config:config-item config:name="IsRasterAxisSynchronized" config:type="boolean">true</config:config-item>
- <config:config-item config:name="AutoCalculate" config:type="boolean">true</config:config-item>
- <config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item>
- <config:config-item config:name="PrinterName" config:type="string">Microsoft Print to PDF</config:config-item>
- <config:config-item config:name="ImagePreferredDPI" config:type="int">0</config:config-item>
- <config:config-item config:name="PrinterPaperFromSetup" config:type="boolean">false</config:config-item>
- <config:config-item config:name="SaveThumbnail" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="EmbedOnlyUsedFonts" config:type="boolean">false</config:config-item>
<config:config-item-map-indexed config:name="ForbiddenCharacters">
<config:config-item-map-entry>
<config:config-item config:name="Language" config:type="string">de</config:config-item>
@@ -123,16 +105,35 @@
<config:config-item config:name="EndLine" config:type="string"/>
</config:config-item-map-entry>
</config:config-item-map-indexed>
- <config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item>
- <config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
- <config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item>
- <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
- <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="GridColor" config:type="int">12632256</config:config-item>
+ <config:config-item config:name="HasColumnRowHeaders" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="HasSheetTabs" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ImagePreferredDPI" config:type="int">0</config:config-item>
<config:config-item config:name="IsDocumentShared" config:type="boolean">false</config:config-item>
- <config:config-item config:name="EmbedFonts" config:type="boolean">false</config:config-item>
- <config:config-item config:name="EmbedOnlyUsedFonts" config:type="boolean">false</config:config-item>
- <config:config-item config:name="EmbedAsianScriptFonts" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="IsOutlineSymbolsSet" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="IsRasterAxisSynchronized" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="IsSnapToRaster" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="LinkUpdateMode" config:type="short">3</config:config-item>
+ <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrinterName" config:type="string">Microsoft Print to PDF</config:config-item>
+ <config:config-item config:name="PrinterPaperFromSetup" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="PrinterSetup" config:type="base64Binary">bBb+/01pY3Jvc29mdCBQcmludCB0byBQREYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATWljcm9zb2Z0IFByaW50IFRvIFBERgAAAAAAAAAAAAAWAAEAPhUAAAAAAAAEAAhSAAAEdAAAM1ROVwAAAAAKAE0AaQBjAHIAbwBzAG8AZgB0ACAAUAByAGkAbgB0ACAAdABvACAAUABEAEYAAAAAAAAAAAAAAAAAAAAAAAAAAAABBAMG3ABYFAMtAQABAAkAmgs0CGQAAQAPAFgCAgABAFgCAwABAEEANAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAIAAAABAAAA/////0dJUzQAAAAAAAAAAAAAAABESU5VIgDQACwDLBHiXo1TAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAABkAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAAFNNVEoAAAAAEADAAHsAMAA4ADQARgAwADEARgBBAC0ARQA2ADMANAAtADQARAA3ADcALQA4ADMARQBFAC0AMAA3ADQAOAAxADcAQwAwADMANQA4ADEAfQAAAFJFU0RMTABVbmlyZXNETEwAUGFwZXJTaXplAEE0AE9yaWVudGF0aW9uAFBPUlRSQUlUAFJlc29sdXRpb24AUmVzT3B0aW9uMQBDb2xvck1vZGUAQ29sb3IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwRAABWNERNAQAAAAAAAACcCnAiHAAAAOwAAAADAAAA+gFPCDTmd02D7gdIF8A1gdAAAABMAAAAAwAAAAAIAAAAAAAAAAAAAAMAAAAACAAAKgAAAAAIAAADAAAAQAAAAFYAAAAAEAAARABvAGMAdQBtAGUAbgB0AFUAcwBlAHIAUABhAHMAcwB3AG8AcgBkAAAARABvAGMAdQBtAGUAbgB0AE8AdwBuAGUAcgBQAGEAcwBzAHcAbwByAGQAAABEAG8AYwB1AG0AZQBuAHQAQwByAHkAcAB0AFMAZQBjAHUAcgBpAHQAeQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASAENPTVBBVF9EVVBMRVhfTU9ERRMARHVwbGV4TW9kZTo6VW5rbm93bgwAUFJJTlRFUl9OQU1FFgBNaWNyb3NvZnQgUHJpbnQgdG8gUERGCwBEUklWRVJfTkFNRRYATWljcm9zb2Z0IFByaW50IFRvIFBERg==</config:config-item>
+ <config:config-item config:name="RasterIsVisible" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="RasterResolutionX" config:type="int">1270</config:config-item>
+ <config:config-item config:name="RasterResolutionY" config:type="int">1270</config:config-item>
+ <config:config-item config:name="RasterSubdivisionX" config:type="int">1</config:config-item>
+ <config:config-item config:name="RasterSubdivisionY" config:type="int">1</config:config-item>
+ <config:config-item config:name="SaveThumbnail" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ShowFormulasMarks" config:type="boolean">false</config:config-item>
+ <config:config-item config:name="ShowGrid" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ShowNoteAuthor" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ShowNotes" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ShowPageBreaks" config:type="boolean">true</config:config-item>
+ <config:config-item config:name="ShowZeroValues" config:type="boolean">true</config:config-item>
<config:config-item config:name="SyntaxStringRef" config:type="short">7</config:config-item>
+ <config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item>
<config:config-item-map-named config:name="ScriptConfiguration">
<config:config-item-map-entry config:name="Sheet1">
<config:config-item config:name="CodeName" config:type="string">Sheet1</config:config-item>
@@ -145,9 +146,7 @@
</office:settings>
<office:scripts>
<office:script script:language="ooo:Basic">
- <ooo:libraries xmlns:ooo="http://openoffice.org/2004/office" xmlns:xlink="http://www.w3.org/1999/xlink">
- <ooo:library-embedded ooo:name="Standard"/>
- </ooo:libraries>
+ <ooo:libraries xmlns:ooo="http://openoffice.org/2004/office" xmlns:xlink="http://www.w3.org/1999/xlink"/>
</office:script>
</office:scripts>
<office:font-face-decls>
@@ -3006,21 +3005,21 @@
<number:boolean-style style:name="N99">
<number:boolean/>
</number:boolean-style>
- <style:style style:name="ce17" style:family="table-cell" style:parent-style-name="Default">
+ <style:style style:name="ce9" style:family="table-cell" style:parent-style-name="Default">
<style:table-cell-properties fo:wrap-option="wrap"/>
<style:text-properties fo:font-size="20pt" fo:font-weight="bold" style:font-size-asian="20pt" style:font-weight-asian="bold" style:font-size-complex="20pt" style:font-weight-complex="bold"/>
</style:style>
- <style:style style:name="ce18" style:family="table-cell" style:parent-style-name="Default">
+ <style:style style:name="ce11" style:family="table-cell" style:parent-style-name="Default">
<style:table-cell-properties style:text-align-source="fix" style:repeat-content="false"/>
<style:paragraph-properties fo:text-align="center" fo:margin-left="0cm"/>
<style:text-properties fo:font-size="14pt" fo:font-weight="bold" style:font-size-asian="14pt" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-weight-complex="bold"/>
</style:style>
- <style:style style:name="ce19" style:family="table-cell" style:parent-style-name="Default">
+ <style:style style:name="ce12" style:family="table-cell" style:parent-style-name="Default">
<style:table-cell-properties style:text-align-source="fix" style:repeat-content="false"/>
<style:paragraph-properties fo:text-align="center" fo:margin-left="0cm"/>
<style:text-properties fo:font-size="12pt" fo:font-weight="bold" style:font-size-asian="12pt" style:font-weight-asian="bold" style:font-size-complex="12pt" style:font-weight-complex="bold"/>
</style:style>
- <style:style style:name="ce20" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N99">
+ <style:style style:name="ce14" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N99">
<style:table-cell-properties style:text-align-source="fix" style:repeat-content="false"/>
<style:paragraph-properties fo:text-align="center" fo:margin-left="0cm"/>
<style:map style:condition="cell-content()=&quot;&quot;" style:apply-style-name="Default" style:base-cell-address="Sheet1.B3"/>
@@ -3032,7 +3031,7 @@
<style:map style:condition="cell-content()=1" style:apply-style-name="true" style:base-cell-address="Sheet1.B3"/>
<style:map style:condition="cell-content()=0" style:apply-style-name="false" style:base-cell-address="Sheet1.B3"/>
</style:style>
- <style:style style:name="ce22" style:family="table-cell" style:parent-style-name="Default">
+ <style:style style:name="ce16" style:family="table-cell" style:parent-style-name="Default">
<style:table-cell-properties style:text-align-source="fix" style:repeat-content="false"/>
<style:paragraph-properties fo:text-align="center" fo:margin-left="0cm"/>
<style:text-properties fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
@@ -3040,12 +3039,12 @@
<style:map style:condition="cell-content()=1" style:apply-style-name="true" style:base-cell-address="Sheet1.B3"/>
<style:map style:condition="cell-content()=0" style:apply-style-name="false" style:base-cell-address="Sheet1.B3"/>
</style:style>
- <style:style style:name="ce23" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N99">
+ <style:style style:name="ce21" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N99">
<style:map style:condition="cell-content()=&quot;&quot;" style:apply-style-name="Default" style:base-cell-address="Sheet1.B3"/>
<style:map style:condition="cell-content()=1" style:apply-style-name="true" style:base-cell-address="Sheet1.B3"/>
<style:map style:condition="cell-content()=0" style:apply-style-name="false" style:base-cell-address="Sheet1.B3"/>
</style:style>
- <style:style style:name="ce24" style:family="table-cell" style:parent-style-name="Default">
+ <style:style style:name="ce25" style:family="table-cell" style:parent-style-name="Default">
<style:table-cell-properties style:text-align-source="fix" style:repeat-content="false"/>
<style:paragraph-properties fo:text-align="center" fo:margin-left="0cm"/>
</style:style>
@@ -3105,7 +3104,7 @@
<text:p><text:sheet-name>???</text:sheet-name><text:s/>(<text:title>???</text:title>)</text:p>
</style:region-left>
<style:region-right>
- <text:p><text:date style:data-style-name="N2" text:date-value="2024-11-03">0000.00.00</text:date>, <text:time style:data-style-name="N2" text:time-value="18:24:50.951358300">00:00:00</text:time></text:p>
+ <text:p><text:date style:data-style-name="N2" text:date-value="2025-07-17">0000.00.00</text:date>, <text:time style:data-style-name="N2" text:time-value="17:26:18.652955100">00:00:00</text:time></text:p>
</style:region-right>
</style:header>
<style:header-left style:display="false"/>
@@ -3125,7 +3124,7 @@
<table:table-column table:style-name="co2" table:default-cell-style-name="ce5"/>
<table:table-column table:style-name="co3" table:default-cell-style-name="Default"/>
<table:table-row table:style-name="ro1">
- <table:table-cell table:style-name="ce17" office:value-type="string" calcext:value-type="string">
+ <table:table-cell table:style-name="ce9" office:value-type="string" calcext:value-type="string">
<text:p>XMATCH Function</text:p>
</table:table-cell>
<table:table-cell table:style-name="Default"/>
@@ -3137,10 +3136,10 @@
<table:table-cell/>
</table:table-row>
<table:table-row table:style-name="ro3">
- <table:table-cell table:style-name="ce18" office:value-type="string" calcext:value-type="string">
+ <table:table-cell table:style-name="ce11" office:value-type="string" calcext:value-type="string">
<text:p>Result</text:p>
</table:table-cell>
- <table:table-cell table:style-name="ce20" table:formula="of:=AND([.B8:.B95])" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <table:table-cell table:style-name="ce14" table:formula="of:=AND([.B8:.B95])" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
<text:p>IGAZ</text:p>
</table:table-cell>
<table:table-cell/>
@@ -3149,13 +3148,13 @@
<table:table-cell table:number-columns-repeated="3"/>
</table:table-row>
<table:table-row table:style-name="ro4">
- <table:table-cell table:style-name="ce19" office:value-type="string" calcext:value-type="string">
+ <table:table-cell table:style-name="ce12" office:value-type="string" calcext:value-type="string">
<text:p>Sheet</text:p>
</table:table-cell>
- <table:table-cell table:style-name="ce22" office:value-type="string" calcext:value-type="string">
+ <table:table-cell table:style-name="ce16" office:value-type="string" calcext:value-type="string">
<text:p>Result</text:p>
</table:table-cell>
- <table:table-cell table:style-name="ce19" office:value-type="string" calcext:value-type="string">
+ <table:table-cell table:style-name="ce12" office:value-type="string" calcext:value-type="string">
<text:p>Description</text:p>
</table:table-cell>
</table:table-row>
@@ -3163,16 +3162,16 @@
<table:table-cell office:value-type="float" office:value="2" calcext:value-type="float">
<text:p>2</text:p>
</table:table-cell>
- <table:table-cell table:style-name="ce20" table:formula="of:=AND([Sheet2.C2:.C202])" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <table:table-cell table:style-name="ce14" table:formula="of:=AND([Sheet2.C2:.C202])" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
<text:p>IGAZ</text:p>
</table:table-cell>
- <table:table-cell table:style-name="ce24" office:value-type="string" calcext:value-type="string">
+ <table:table-cell table:style-name="ce25" office:value-type="string" calcext:value-type="string">
<text:p>Simple XMATCH formulas with local references and values</text:p>
</table:table-cell>
</table:table-row>
<table:table-row table:style-name="ro2" table:number-rows-repeated="20">
<table:table-cell/>
- <table:table-cell table:style-name="ce23"/>
+ <table:table-cell table:style-name="ce21"/>
<table:table-cell/>
</table:table-row>
<table:table-row table:style-name="ro2" table:number-rows-repeated="21">
@@ -4264,10 +4263,123 @@
</table:table-cell>
<table:table-cell table:number-columns-repeated="16"/>
</table:table-row>
- <table:table-row table:style-name="ro2" table:number-rows-repeated="6">
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:formula="of:=COM.MICROSOFT.XMATCH(1;ISNUMBER([.$F38:.$I38]);0;-1)" office:value-type="float" office:value="4" calcext:value-type="float">
+ <text:p>4</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="4" calcext:value-type="float">
+ <text:p>4</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce10" table:formula="of:=[.A38]=[.B38]" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>IGAZ</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=FORMULA([.A38])" office:value-type="string" office:string-value="=XMATCH(1;ISNUMBER($F38:$I38);0;-1)" calcext:value-type="string">
+ <text:p>=XMATCH(1;ISNUMBER($F38:$I38);0;-1)</text:p>
+ </table:table-cell>
+ <table:table-cell/>
+ <table:table-cell office:value-type="float" office:value="1" calcext:value-type="float">
+ <text:p>1</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="2" calcext:value-type="float">
+ <text:p>2</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="3" calcext:value-type="float">
+ <text:p>3</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="4" calcext:value-type="float">
+ <text:p>4</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="11"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:formula="of:=COM.MICROSOFT.XMATCH(1;ISNUMBER([.$F39:.$I39]);0;-1)" office:value-type="float" office:value="2" calcext:value-type="float">
+ <text:p>2</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="2" calcext:value-type="float">
+ <text:p>2</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce10" table:formula="of:=[.A39]=[.B39]" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>IGAZ</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=FORMULA([.A39])" office:value-type="string" office:string-value="=XMATCH(1;ISNUMBER($F39:$I39);0;-1)" calcext:value-type="string">
+ <text:p>=XMATCH(1;ISNUMBER($F39:$I39);0;-1)</text:p>
+ </table:table-cell>
+ <table:table-cell/>
+ <table:table-cell office:value-type="float" office:value="2" calcext:value-type="float">
+ <text:p>2</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="3" calcext:value-type="float">
+ <text:p>3</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="13"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:formula="of:=COM.MICROSOFT.XMATCH(1;ISNUMBER([.$F40:.$I40]);0;-1)" office:value-type="float" office:value="2" calcext:value-type="float">
+ <text:p>2</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="2" calcext:value-type="float">
+ <text:p>2</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce10" table:formula="of:=[.A40]=[.B40]" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>IGAZ</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=FORMULA([.A40])" office:value-type="string" office:string-value="=XMATCH(1;ISNUMBER($F40:$I40);0;-1)" calcext:value-type="string">
+ <text:p>=XMATCH(1;ISNUMBER($F40:$I40);0;-1)</text:p>
+ </table:table-cell>
<table:table-cell table:number-columns-repeated="2"/>
- <table:table-cell table:style-name="ce10"/>
- <table:table-cell table:number-columns-repeated="17"/>
+ <table:table-cell office:value-type="float" office:value="3" calcext:value-type="float">
+ <text:p>3</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="13"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:formula="of:=COM.MICROSOFT.XMATCH(1;ISNUMBER([.$F41:.$I41]);0;-1)" office:value-type="float" office:value="1" calcext:value-type="float">
+ <text:p>1</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="1" calcext:value-type="float">
+ <text:p>1</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce10" table:formula="of:=[.A41]=[.B41]" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>IGAZ</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=FORMULA([.A41])" office:value-type="string" office:string-value="=XMATCH(1;ISNUMBER($F41:$I41);0;-1)" calcext:value-type="string">
+ <text:p>=XMATCH(1;ISNUMBER($F41:$I41);0;-1)</text:p>
+ </table:table-cell>
+ <table:table-cell/>
+ <table:table-cell office:value-type="float" office:value="2" calcext:value-type="float">
+ <text:p>2</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="14"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:formula="of:=COM.MICROSOFT.XMATCH(1;ISNUMBER([.$F42:.$I42]);0;-1)" office:value-type="string" office:string-value="" calcext:value-type="error">
+ <text:p>#N/A</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=NA()" office:value-type="string" office:string-value="" calcext:value-type="error">
+ <text:p>#N/A</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce10" table:formula="of:=ISERROR([.B42])" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>IGAZ</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=FORMULA([.A42])" office:value-type="string" office:string-value="=XMATCH(1;ISNUMBER($F42:$I42);0;-1)" calcext:value-type="string">
+ <text:p>=XMATCH(1;ISNUMBER($F42:$I42);0;-1)</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="16"/>
+ </table:table-row>
+ <table:table-row table:style-name="ro2">
+ <table:table-cell table:formula="of:=COM.MICROSOFT.XMATCH(1;ISNUMBER([.$F43:.$I43]);0;-1)" office:value-type="string" office:string-value="" calcext:value-type="error">
+ <text:p>#N/A</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=NA()" office:value-type="string" office:string-value="" calcext:value-type="error">
+ <text:p>#N/A</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce10" table:formula="of:=ISERROR([.B43])" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <text:p>IGAZ</text:p>
+ </table:table-cell>
+ <table:table-cell table:formula="of:=FORMULA([.A43])" office:value-type="string" office:string-value="=XMATCH(1;ISNUMBER($F43:$I43);0;-1)" calcext:value-type="string">
+ <text:p>=XMATCH(1;ISNUMBER($F43:$I43);0;-1)</text:p>
+ </table:table-cell>
+ <table:table-cell table:number-columns-repeated="16"/>
</table:table-row>
<table:table-row table:style-name="ro2">
<table:table-cell table:number-columns-repeated="2"/>
diff --git a/sc/qa/unit/data/ods/tdf108244.ods b/sc/qa/unit/data/ods/tdf108244.ods
new file mode 100644
index 000000000000..7e6e3a06eb56
--- /dev/null
+++ b/sc/qa/unit/data/ods/tdf108244.ods
Binary files differ
diff --git a/sc/qa/unit/data/xlsb/tdf94627.xlsb b/sc/qa/unit/data/xlsb/tdf94627.xlsb
new file mode 100644
index 000000000000..273085f7a2a0
--- /dev/null
+++ b/sc/qa/unit/data/xlsb/tdf94627.xlsb
Binary files differ
diff --git a/sc/qa/unit/data/xlsx/tdf118668.xlsx b/sc/qa/unit/data/xlsx/tdf118668.xlsx
new file mode 100644
index 000000000000..bc4bbc43e68a
--- /dev/null
+++ b/sc/qa/unit/data/xlsx/tdf118668.xlsx
Binary files differ
diff --git a/sc/qa/unit/data/xlsx/tdf122336.xlsx b/sc/qa/unit/data/xlsx/tdf122336.xlsx
new file mode 100644
index 000000000000..2bf34bbb8cb2
--- /dev/null
+++ b/sc/qa/unit/data/xlsx/tdf122336.xlsx
Binary files differ
diff --git a/sc/qa/unit/data/xlsx/tdf167689_xmlMaps_and_xmlColumnPr.xlsx b/sc/qa/unit/data/xlsx/tdf167689_xmlMaps_and_xmlColumnPr.xlsx
new file mode 100644
index 000000000000..afa63e3236e4
--- /dev/null
+++ b/sc/qa/unit/data/xlsx/tdf167689_xmlMaps_and_xmlColumnPr.xlsx
Binary files differ
diff --git a/sc/qa/unit/helper/csv_handler.hxx b/sc/qa/unit/helper/csv_handler.hxx
index 3cb43bead360..439bcee308e8 100644
--- a/sc/qa/unit/helper/csv_handler.hxx
+++ b/sc/qa/unit/helper/csv_handler.hxx
@@ -100,6 +100,8 @@ public:
else if (meStringType == StringType::PureString)
{
OUString aCSVString(p, n, RTL_TEXTENCODING_UTF8);
+ if (aCSVString.endsWith("\n"))
+ aCSVString = aCSVString.copy(0, aCSVString.getLength()-1);
OUString aString = mpDoc->GetString(mnCol, mnRow, mnTab);
#if DEBUG_CSV_HANDLER
diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index ff635f4f12b7..21fa1a74a098 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -51,9 +51,6 @@
using namespace com::sun::star;
using namespace ::com::sun::star::uno;
-using ::std::cout;
-using ::std::cerr;
-using ::std::endl;
FormulaGrammarSwitch::FormulaGrammarSwitch(ScDocument* pDoc, formula::FormulaGrammar::Grammar eGrammar) :
mpDoc(pDoc), meOldGrammar(pDoc->GetGrammar())
@@ -363,33 +360,33 @@ const SdrOle2Obj* ScModelTestBase::getSingleOleObject(ScDocument& rDoc, sal_uInt
ScDrawLayer* pDrawLayer = rDoc.GetDrawLayer();
if (!pDrawLayer)
{
- cout << "Failed to retrieve the drawing layer object." << endl;
+ std::cout << "Failed to retrieve the drawing layer object." << std::endl;
return nullptr;
}
const SdrPage* pPage = pDrawLayer->GetPage(nPage);
if (!pPage)
{
- cout << "Failed to retrieve the page object." << endl;
+ std::cout << "Failed to retrieve the page object." << std::endl;
return nullptr;
}
if (pPage->GetObjCount() != 1)
{
- cout << "This page should contain one drawing object." << endl;
+ std::cout << "This page should contain one drawing object." << std::endl;
return nullptr;
}
const SdrObject* pObj = pPage->GetObj(0);
if (!pObj)
{
- cout << "Failed to retrieve the drawing object." << endl;
+ std::cout << "Failed to retrieve the drawing object." << std::endl;
return nullptr;
}
if (pObj->GetObjIdentifier() != SdrObjKind::OLE2)
{
- cout << "This is not an OLE2 object." << endl;
+ std::cout << "This is not an OLE2 object." << std::endl;
return nullptr;
}
@@ -405,7 +402,7 @@ const SdrOle2Obj* ScModelTestBase::getSingleChartObject(ScDocument& rDoc, sal_uI
if (!pObj->IsChart())
{
- cout << "This should be a chart object." << endl;
+ std::cout << "This should be a chart object." << std::endl;
return nullptr;
}
@@ -420,35 +417,35 @@ static std::vector<OUString> getChartRangeRepresentations(const SdrOle2Obj& rCha
Reference<frame::XModel> xModel = rChartObj.getXModel();
if (!xModel.is())
{
- cout << "Failed to get the embedded object interface." << endl;
+ std::cout << "Failed to get the embedded object interface." << std::endl;
return aRangeReps;
}
Reference<chart2::XChartDocument> xChartDoc(xModel, UNO_QUERY);
if (!xChartDoc.is())
{
- cout << "Failed to get the chart document interface." << endl;
+ std::cout << "Failed to get the chart document interface." << std::endl;
return aRangeReps;
}
Reference<chart2::data::XDataSource> xDataSource(xChartDoc, UNO_QUERY);
if (!xDataSource.is())
{
- cout << "Failed to get the data source interface." << endl;
+ std::cout << "Failed to get the data source interface." << std::endl;
return aRangeReps;
}
Sequence<Reference<chart2::data::XLabeledDataSequence> > xDataSeqs = xDataSource->getDataSequences();
if (!xDataSeqs.hasElements())
{
- cout << "There should be at least one data sequences." << endl;
+ std::cout << "There should be at least one data sequences." << std::endl;
return aRangeReps;
}
Reference<chart2::data::XDataReceiver> xDataRec(xChartDoc, UNO_QUERY);
if (!xDataRec.is())
{
- cout << "Failed to get the data receiver interface." << endl;
+ std::cout << "Failed to get the data receiver interface." << std::endl;
return aRangeReps;
}
@@ -644,7 +641,7 @@ void ScModelTestBase::miscRowHeightsTest( TestParam const * aTestValues, unsigne
SCTAB nTab = aTestValues[ index ].pData[ i ].nTab;
int nExpectedHeight = aTestValues[ index ].pData[ i ].nExpectedHeight;
if ( nExpectedHeight == -1 )
- nExpectedHeight = convertTwipToMm100(ScGlobal::GetStandardRowHeight());
+ nExpectedHeight = convertTwipToMm100(ScGlobal::nStdRowHeight);
bool bCheckOpt = ( ( aTestValues[ index ].pData[ i ].nCheck & CHECK_OPTIMAL ) == CHECK_OPTIMAL );
for ( ; nRow <= nEndRow; ++nRow )
{
@@ -869,7 +866,7 @@ bool ScUcalcTestBase::insertRangeNames(
bool bSuccess = pNames->insert(pNew);
if (!bSuccess)
{
- cerr << "Insertion failed." << endl;
+ std::cerr << "Insertion failed." << std::endl;
return false;
}
}
@@ -888,9 +885,9 @@ OUString ScUcalcTestBase::getRangeByName(ScDocument* pDoc, const OUString& aRang
void ScUcalcTestBase::printFormula(ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab, const char* pCaption)
{
if (pCaption != nullptr)
- cout << pCaption << ", ";
- cout << nCol << "/" << nRow << ": " << pDoc->GetFormula(nCol, nRow, nTab);
- cout << endl;
+ std::cout << pCaption << ", ";
+ std::cout << nCol << "/" << nRow << ": " << pDoc->GetFormula(nCol, nRow, nTab);
+ std::cout << std::endl;
}
#else
// Avoid unused parameter warning
@@ -944,14 +941,14 @@ bool ScUcalcTestBase::checkFormulaPosition(ScDocument& rDoc, const ScAddress& rP
const ScFormulaCell* pFC = rDoc.GetFormulaCell(rPos);
if (!pFC)
{
- cerr << "Formula cell expected at " << aStr << " but not found." << endl;
+ std::cerr << "Formula cell expected at " << aStr << " but not found." << std::endl;
return false;
}
if (pFC->aPos != rPos)
{
OUString aStr2(pFC->aPos.Format(ScRefFlags::VALID));
- cerr << "Formula cell at " << aStr << " has incorrect position of " << aStr2 << endl;
+ std::cerr << "Formula cell at " << aStr << " has incorrect position of " << aStr2 << std::endl;
return false;
}
@@ -970,7 +967,7 @@ bool ScUcalcTestBase::checkFormulaPositions(
if (!checkFormulaPosition(rDoc, aPos))
{
OUString aStr(aPos.Format(ScRefFlags::VALID));
- cerr << "Formula cell position failed at " << aStr << "." << endl;
+ std::cerr << "Formula cell position failed at " << aStr << "." << std::endl;
return false;
}
}
diff --git a/sc/qa/unit/helper/sctestviewcallback.cxx b/sc/qa/unit/helper/sctestviewcallback.cxx
index f590c79879cf..9006de61289f 100644
--- a/sc/qa/unit/helper/sctestviewcallback.cxx
+++ b/sc/qa/unit/helper/sctestviewcallback.cxx
@@ -153,7 +153,7 @@ ScTestViewCallback::ScTestViewCallback(bool bDeleteListenerOnDestruct)
{
mpViewShell = SfxViewShell::Current();
mpViewShell->setLibreOfficeKitViewCallback(&m_callbackWrapper);
- mnView = SfxLokHelper::getView();
+ mnView = SfxLokHelper::getCurrentView();
m_callbackWrapper.setLOKViewId(mnView);
if (!bDeleteListenerOnDestruct)
mpViewShell = nullptr;
diff --git a/sc/qa/unit/helper/sctiledrenderingtest.cxx b/sc/qa/unit/helper/sctiledrenderingtest.cxx
index 7d835209dd9b..b20122038889 100644
--- a/sc/qa/unit/helper/sctiledrenderingtest.cxx
+++ b/sc/qa/unit/helper/sctiledrenderingtest.cxx
@@ -65,7 +65,7 @@ ScModelObj* ScTiledRenderingTest::createDoc(const char* pName)
void ScTiledRenderingTest::setupLibreOfficeKitViewCallback(SfxViewShell* pViewShell)
{
pViewShell->setLibreOfficeKitViewCallback(&m_callbackWrapper);
- m_callbackWrapper.setLOKViewId(SfxLokHelper::getView(pViewShell));
+ m_callbackWrapper.setLOKViewId(SfxLokHelper::getView(*pViewShell));
}
void ScTiledRenderingTest::callback(int nType, const char* pPayload, void* pData)
diff --git a/sc/qa/unit/pivottable_filters_test.cxx b/sc/qa/unit/pivottable_filters_test.cxx
index 1c17f569deec..f3b0222c0572 100644
--- a/sc/qa/unit/pivottable_filters_test.cxx
+++ b/sc/qa/unit/pivottable_filters_test.cxx
@@ -31,9 +31,6 @@
#include <com/sun/star/sheet/DataPilotFieldGroupBy.hpp>
using namespace ::com::sun::star;
-using ::std::cerr;
-using ::std::cout;
-using ::std::endl;
class ScPivotTableFiltersTest : public ScModelTestBase
{
@@ -1012,14 +1009,14 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableXLSX)
{
if (!rDoc.HasPivotTable())
{
- cerr << "The document should have pivot table." << endl;
+ std::cerr << "The document should have pivot table." << std::endl;
return false;
}
const ScDPCollection* pDPs = rDoc.GetDPCollection();
if (!pDPs)
{
- cerr << "Pivot table container should exist." << endl;
+ std::cerr << "Pivot table container should exist." << std::endl;
return false;
}
@@ -1027,7 +1024,8 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableXLSX)
const ScDPCache* pCache = pDPs->GetSheetCaches().getExistingCache(aSrcRange);
if (!pCache)
{
- cerr << "The document should have a pivot cache for A1:J3 on Sheet1." << endl;
+ std::cerr << "The document should have a pivot cache for A1:J3 on Sheet1."
+ << std::endl;
return false;
}
@@ -1038,7 +1036,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableXLSX)
size_t nCount = pCache->GetFieldCount();
if (nCount != SAL_N_ELEMENTS(pNames))
{
- cout << "Incorrect number of fields in pivot cache." << endl;
+ std::cout << "Incorrect number of fields in pivot cache." << std::endl;
return false;
}
@@ -1047,8 +1045,8 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableXLSX)
OUString aCacheName = pCache->GetDimensionName(i);
if (aCacheName != OUString::createFromAscii(pNames[i]))
{
- cerr << "Field " << i << " has label '" << aCacheName << "' but expected '"
- << pNames[i] << "'" << endl;
+ std::cerr << "Field " << i << " has label '" << aCacheName << "' but expected '"
+ << pNames[i] << "'" << std::endl;
return false;
}
}
@@ -1056,7 +1054,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableXLSX)
const ScDPObject* pDPObj = rDoc.GetDPAtCursor(0, 10, 0); // A11
if (!pDPObj)
{
- cerr << "A pivot table should exist over A11." << endl;
+ std::cerr << "A pivot table should exist over A11." << std::endl;
return false;
}
@@ -1064,7 +1062,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableXLSX)
ScRange aOutRange = pDPObj->GetOutRange();
if (ScRange(0, 7, 0, 3, 14, 0) != aOutRange)
{
- cerr << "Incorrect output range." << endl;
+ std::cerr << "Incorrect output range." << std::endl;
return false;
}
@@ -1076,7 +1074,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableXLSX)
const ScDPSaveData* pSaveData = pDPObj->GetSaveData();
if (!pSaveData)
{
- cerr << "Save data should exist in each pivot table object." << endl;
+ std::cerr << "Save data should exist in each pivot table object." << std::endl;
return false;
}
@@ -1084,7 +1082,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableXLSX)
pSaveData->GetAllDimensionsByOrientation(sheet::DataPilotFieldOrientation_ROW, aDims);
if (aDims.size() != 1 || aDims[0]->GetName() != "F1")
{
- cerr << "Pivot table should have one row field labelled 'F1'" << endl;
+ std::cerr << "Pivot table should have one row field labelled 'F1'" << std::endl;
return false;
}
@@ -1092,30 +1090,31 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableXLSX)
aDims);
if (aDims.size() != 1 || aDims[0]->GetName() != "F4")
{
- cerr << "Pivot table should have one column field labelled 'F4'" << endl;
+ std::cerr << "Pivot table should have one column field labelled 'F4'" << std::endl;
return false;
}
pSaveData->GetAllDimensionsByOrientation(sheet::DataPilotFieldOrientation_PAGE, aDims);
if (aDims.size() != 2 || aDims[0]->GetName() != "F7" || aDims[1]->GetName() != "F6")
{
- cerr << "Pivot table should have two page fields labelled 'F7' and 'F6' in this "
- "order."
- << endl;
+ std::cerr
+ << "Pivot table should have two page fields labelled 'F7' and 'F6' in this "
+ "order."
+ << std::endl;
return false;
}
pSaveData->GetAllDimensionsByOrientation(sheet::DataPilotFieldOrientation_DATA, aDims);
if (aDims.size() != 1 || aDims[0]->GetName() != "F10")
{
- cerr << "Pivot table should have one data field labelled 'F10'" << endl;
+ std::cerr << "Pivot table should have one data field labelled 'F10'" << std::endl;
return false;
}
const ScDPSaveDimension* pDim = aDims[0];
if (pDim->GetFunction() != ScGeneralFunction::SUM)
{
- cerr << "Data field should have SUM function." << endl;
+ std::cerr << "Data field should have SUM function." << std::endl;
return false;
}
@@ -1147,14 +1146,14 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableTwoDataFieldsXLSX)
{
if (!rDoc.HasPivotTable())
{
- cerr << "The document should have pivot table." << endl;
+ std::cerr << "The document should have pivot table." << std::endl;
return false;
}
const ScDPCollection* pDPs = rDoc.GetDPCollection();
if (!pDPs)
{
- cerr << "Pivot table container should exist." << endl;
+ std::cerr << "Pivot table container should exist." << std::endl;
return false;
}
@@ -1162,7 +1161,8 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableTwoDataFieldsXLSX)
const ScDPCache* pCache = pDPs->GetSheetCaches().getExistingCache(aSrcRange);
if (!pCache)
{
- cerr << "The document should have a pivot cache for B2:C9 on 'Src'." << endl;
+ std::cerr << "The document should have a pivot cache for B2:C9 on 'Src'."
+ << std::endl;
return false;
}
@@ -1172,14 +1172,14 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableTwoDataFieldsXLSX)
size_t nCount = pCache->GetFieldCount();
if (nCount != SAL_N_ELEMENTS(pNames))
{
- cout << "Incorrect number of fields in pivot cache." << endl;
+ std::cout << "Incorrect number of fields in pivot cache." << std::endl;
return false;
}
const ScDPObject* pDPObj = rDoc.GetDPAtCursor(0, 2, 0); // A3
if (!pDPObj)
{
- cerr << "A pivot table should exist over A3." << endl;
+ std::cerr << "A pivot table should exist over A3." << std::endl;
return false;
}
@@ -1187,14 +1187,14 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableTwoDataFieldsXLSX)
ScRange aOutRange = pDPObj->GetOutRange();
if (ScRange(0, 2, 0, 2, 11, 0) != aOutRange)
{
- cerr << "Incorrect output range." << endl;
+ std::cerr << "Incorrect output range." << std::endl;
return false;
}
const ScDPSaveData* pSaveData = pDPObj->GetSaveData();
if (!pSaveData)
{
- cerr << "Save data should exist in each pivot table object." << endl;
+ std::cerr << "Save data should exist in each pivot table object." << std::endl;
return false;
}
@@ -1202,7 +1202,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableTwoDataFieldsXLSX)
pSaveData->GetAllDimensionsByOrientation(sheet::DataPilotFieldOrientation_ROW, aDims);
if (aDims.size() != 1 || aDims[0]->GetName() != "Name")
{
- cerr << "Pivot table should have one row field labelled 'Name'" << endl;
+ std::cerr << "Pivot table should have one row field labelled 'Name'" << std::endl;
return false;
}
@@ -1211,21 +1211,21 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableTwoDataFieldsXLSX)
|| ScDPUtil::getSourceDimensionName(aDims[0]->GetName()) != "Value"
|| ScDPUtil::getSourceDimensionName(aDims[1]->GetName()) != "Value")
{
- cerr << "Pivot table should have two duplicated data fields both of which are "
- "named 'Value'."
- << endl;
+ std::cerr << "Pivot table should have two duplicated data fields both of which are "
+ "named 'Value'."
+ << std::endl;
return false;
}
if (aDims[0]->GetFunction() != ScGeneralFunction::SUM)
{
- cerr << "First data field should be SUM." << endl;
+ std::cerr << "First data field should be SUM." << std::endl;
return false;
}
if (aDims[1]->GetFunction() != ScGeneralFunction::COUNT)
{
- cerr << "First data field should be COUNT." << endl;
+ std::cerr << "First data field should be COUNT." << std::endl;
return false;
}
@@ -1233,8 +1233,9 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFiltersTest, testPivotTableTwoDataFieldsXLSX)
aDims);
if (aDims.size() != 1 || !aDims[0]->IsDataLayout())
{
- cerr << "Pivot table should have one column field which is a data layout field."
- << endl;
+ std::cerr
+ << "Pivot table should have one column field which is a data layout field."
+ << std::endl;
return false;
}
diff --git a/sc/qa/unit/subsequent_export_test.cxx b/sc/qa/unit/subsequent_export_test.cxx
index 0e4e495a0e19..9601d4638e86 100644
--- a/sc/qa/unit/subsequent_export_test.cxx
+++ b/sc/qa/unit/subsequent_export_test.cxx
@@ -989,6 +989,108 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testLandscapeOrientationXLSX)
assertXPath(pSheet, "/x:worksheet/x:pageSetup", "orientation", u"landscape");
}
+CPPUNIT_TEST_FIXTURE(ScExportTest, testTdf162963)
+{
+ //tests xlsx -> ods -> ods of property "TotalsRow"
+ createScDoc("xlsx/tdf162963_TableWithTotalsEnabled.xlsx");
+
+ static constexpr OUString sDBName(u"myData"_ustr);
+ static constexpr OUString sPropName(u"TotalsRow"_ustr);
+
+ // Make sure the database range "myData" has TotalsRow TRUE after import from xlsx.
+ {
+ uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> xDocPropSet(xDoc, UNO_QUERY_THROW);
+ uno::Reference<container::XNameAccess> xNameAccess(
+ xDocPropSet->getPropertyValue(u"DatabaseRanges"_ustr), UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> xDBRangePropSet(xNameAccess->getByName(sDBName),
+ UNO_QUERY_THROW);
+ bool bTotalsRow = false;
+ xDBRangePropSet->getPropertyValue(sPropName) >>= bTotalsRow;
+ CPPUNIT_ASSERT_MESSAGE("xlsx-import", bTotalsRow);
+ }
+ // Make sure TotalsRow is still TRUE after save to ods and reload.
+ // The error was, that the property "TotalsRow" was not written to ods at all.
+ // With fix it is written as calcext:contains-footer.
+ {
+ saveAndReload(u"calc8"_ustr);
+ uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> xDocPropSet(xDoc, UNO_QUERY_THROW);
+ uno::Reference<container::XNameAccess> xNameAccess(
+ xDocPropSet->getPropertyValue(u"DatabaseRanges"_ustr), UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> xDBRangePropSet(xNameAccess->getByName(sDBName),
+ UNO_QUERY_THROW);
+ bool bTotalsRow = true;
+ xDBRangePropSet->getPropertyValue(sPropName) >>= bTotalsRow;
+ CPPUNIT_ASSERT_MESSAGE("save ods, reload", bTotalsRow);
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(ScExportTest, testTdf162963_ODF)
+{
+ Resetter resetter([]() { SetODFDefaultVersion(SvtSaveOptions::ODFVER_LATEST); });
+
+ // Verify, that calcext:contains-footer is only written in extended file format versions.
+ // The parameter in DefaultVersion::set need to be adapted, when attribute contains-footer
+ // is included in ODF strict, see issue OFFICE-4169 at OASIS.
+ createScDoc("fods/tdf162963_DatabaseRange.fods");
+
+ // enable TotalsRow
+ uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> xDocPropSet(xDoc, UNO_QUERY_THROW);
+ uno::Reference<container::XNameAccess> xNameAccess(
+ xDocPropSet->getPropertyValue(u"DatabaseRanges"_ustr), UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> xDBRangePropSet(xNameAccess->getByName(u"myData"_ustr),
+ UNO_QUERY_THROW);
+ xDBRangePropSet->setPropertyValue(u"TotalsRow"_ustr, uno::Any(true));
+
+ // Save to ODF 1.3 extended.
+ // Adapt to a concrete version when attribute contains-footer is available in ODF strict.
+ // Make sure attribute is written in calcext namespace
+ save(u"calc8"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
+ assertXPath(pXmlDoc,
+ "/office:document-content/office:body/office:spreadsheet/"
+ "table:database-ranges/table:database-range[@calcext:contains-footer='true']"_ostr);
+
+ // Save to ODF 1.3 strict. Make sure attribute is not written.
+ // Adapt to ODF 1.4 strict, when it is available.
+ SetODFDefaultVersion(SvtSaveOptions::ODFDefaultVersion::ODFVER_013);
+ save(u"calc8"_ustr); // this saves to .ods not to .fods
+ pXmlDoc = parseExport(u"content.xml"_ustr);
+ assertXPath(pXmlDoc,
+ "/office:document-content/office:body/office:spreadsheet/"
+ "table:database-ranges/table:database-range/contains-footer",
+ 0);
+}
+
+CPPUNIT_TEST_FIXTURE(ScExportTest, testTdf162177_EastersundayODF14)
+{
+ // EASTERSUNDAY was added to ODFF in ODF 1.4. LibreOffice has written it as
+ // ORG.OPENOFFICE.EASTERSUNDAY for ODF 1.2 and ODF 1.3.
+ Resetter resetter([]() { SetODFDefaultVersion(SvtSaveOptions::ODFVER_LATEST); });
+ createScDoc("fods/tdf162177_Eastersunday.fods");
+
+ // File has it as ORG.OPENOFFICE.EASTERSUNDAY in ODF 1.3. Test, that it is read correctly.
+ ScDocument* pDoc = getScDoc();
+ OUString aFormula = pDoc->GetFormula(0, 0, 0);
+ CPPUNIT_ASSERT_EQUAL(u"=EASTERSUNDAY(2024)"_ustr, aFormula);
+
+ // Verify that saving to ODF1.3 produces ORG.OPENOFFICE.EASTERSUNDAY
+ SetODFDefaultVersion(SvtSaveOptions::ODFDefaultVersion::ODFVER_013);
+ save(u"calc8"_ustr); // this saves to .ods not to .fods
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
+ const OString sPath = "/office:document-content/office:body/office:spreadsheet/table:table/"
+ "table:table-row/table:table-cell"_ostr;
+ assertXPath(pXmlDoc, sPath, "formula", u"of:=ORG.OPENOFFICE.EASTERSUNDAY(2024)");
+
+ // Verify that saving to ODF1.4 produces EASTERSUNDAY
+ SetODFDefaultVersion(SvtSaveOptions::ODFDefaultVersion::ODFVER_014);
+ save(u"calc8"_ustr); // this saves to .ods not to .fods
+ pXmlDoc = parseExport(u"content.xml"_ustr);
+ assertXPath(pXmlDoc, sPath, "formula", u"of:=EASTERSUNDAY(2024)");
+}
+
CPPUNIT_TEST_FIXTURE(ScExportTest, testMiscRowHeightExport)
{
static const TestParam::RowData DfltRowData[] = {
@@ -1610,7 +1712,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest, testRichTextExportODS)
CPPUNIT_ASSERT_MESSAGE("Incorrect B9 value.", aCheckFunc.checkB9(pEditText));
ScPatternAttr aCellFontColor(pDoc->getCellAttributeHelper());
- aCellFontColor.GetItemSet().Put(SvxColorItem(COL_BLUE, ATTR_FONT_COLOR));
+ aCellFontColor.ItemSetPut(SvxColorItem(COL_BLUE, ATTR_FONT_COLOR));
// Set font color of B10 to blue.
pDoc->ApplyPattern(1, 9, 0, aCellFontColor);
pEE->Clear();
diff --git a/sc/qa/unit/subsequent_export_test3.cxx b/sc/qa/unit/subsequent_export_test3.cxx
index efc5cd7ea231..a4bcb98758ff 100644
--- a/sc/qa/unit/subsequent_export_test3.cxx
+++ b/sc/qa/unit/subsequent_export_test3.cxx
@@ -35,8 +35,6 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
-using ::std::cerr;
-using ::std::endl;
class ScExportTest3 : public ScModelTestBase
{
@@ -333,14 +331,14 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testTrackChangesSimpleXLSX)
ScChangeTrack* pCT = rDoc.GetChangeTrack();
if (!pCT)
{
- cerr << "Change track instance doesn't exist." << endl;
+ std::cerr << "Change track instance doesn't exist." << std::endl;
return false;
}
sal_uLong nActionMax = pCT->GetActionMax();
if (nActionMax != 13)
{
- cerr << "Unexpected highest action ID value." << endl;
+ std::cerr << "Unexpected highest action ID value." << std::endl;
return false;
}
@@ -350,13 +348,14 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testTrackChangesSimpleXLSX)
const ScChangeAction* pAction = pCT->GetAction(nActId);
if (!pAction)
{
- cerr << "No action for action number " << nActId << " found." << endl;
+ std::cerr << "No action for action number " << nActId << " found." << std::endl;
return false;
}
if (pAction->GetType() != aChecks[i].meType)
{
- cerr << "Unexpected action type for action number " << nActId << "." << endl;
+ std::cerr << "Unexpected action type for action number " << nActId << "."
+ << std::endl;
return false;
}
@@ -367,9 +366,9 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testTrackChangesSimpleXLSX)
if (!checkRange(pAction->GetType(), aCheck, rRange))
{
- cerr << "Unexpected range for action number " << nActId
- << ": expected=" << toString(aCheck) << " actual=" << toString(rRange)
- << endl;
+ std::cerr << "Unexpected range for action number " << nActId
+ << ": expected=" << toString(aCheck) << " actual=" << toString(rRange)
+ << std::endl;
return false;
}
@@ -380,8 +379,8 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testTrackChangesSimpleXLSX)
const ScChangeActionIns* p = static_cast<const ScChangeActionIns*>(pAction);
if (p->IsEndOfList() != aChecks[i].mbRowInsertedAtBottom)
{
- cerr << "Unexpected end-of-list flag for action number " << nActId
- << "." << endl;
+ std::cerr << "Unexpected end-of-list flag for action number " << nActId
+ << "." << std::endl;
return false;
}
}
@@ -398,21 +397,21 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testTrackChangesSimpleXLSX)
ScChangeTrack* pCT = rDoc.GetChangeTrack();
if (!pCT)
{
- cerr << "Change track instance doesn't exist." << endl;
+ std::cerr << "Change track instance doesn't exist." << std::endl;
return false;
}
ScChangeAction* pAction = pCT->GetLast();
if (pAction->GetUser() != "Kohei Yoshida")
{
- cerr << "Wrong user name." << endl;
+ std::cerr << "Wrong user name." << std::endl;
return false;
}
DateTime aDT = pAction->GetDateTime();
if (aDT.GetYear() != 2014 || aDT.GetMonth() != 7 || aDT.GetDay() != 11)
{
- cerr << "Wrong time stamp." << endl;
+ std::cerr << "Wrong time stamp." << std::endl;
return false;
}
@@ -423,22 +422,23 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testTrackChangesSimpleXLSX)
pAction = pCT->GetLast();
if (!pAction)
{
- cerr << "Failed to retrieve last revision." << endl;
+ std::cerr << "Failed to retrieve last revision." << std::endl;
return false;
}
if (rOwnerName != pAction->GetUser())
{
- cerr << "Wrong user name." << endl;
+ std::cerr << "Wrong user name." << std::endl;
return false;
}
DateTime aDTNew = pAction->GetDateTime();
if (aDTNew <= aDT)
{
- cerr << "Time stamp of the new revision should be more recent than that of the "
- "last revision."
- << endl;
+ std::cerr
+ << "Time stamp of the new revision should be more recent than that of the "
+ "last revision."
+ << std::endl;
return false;
}
@@ -504,7 +504,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testSheetTabColorsXLSX)
// green, red, blue, yellow (from left to right).
if (aTabNames.size() != 4)
{
- cerr << "There should be exactly 4 sheets." << endl;
+ std::cerr << "There should be exactly 4 sheets." << std::endl;
return false;
}
@@ -514,8 +514,8 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testSheetTabColorsXLSX)
OUString aExpected = OUString::createFromAscii(pNames[i]);
if (aExpected != aTabNames[i])
{
- cerr << "incorrect sheet name: expected='" << aExpected << "', actual='"
- << aTabNames[i] << "'" << endl;
+ std::cerr << "incorrect sheet name: expected='" << aExpected << "', actual='"
+ << aTabNames[i] << "'" << std::endl;
return false;
}
}
@@ -531,7 +531,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testSheetTabColorsXLSX)
{
if (aXclColors[i] != rDoc.GetTabBgColor(i))
{
- cerr << "wrong sheet color for sheet " << i << endl;
+ std::cerr << "wrong sheet color for sheet " << i << std::endl;
return false;
}
}
@@ -638,8 +638,8 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testSharedFormulaExportXLS)
OUString aExpected = u"Response"_ustr;
if (aActual != aExpected)
{
- cerr << "Wrong content in A2: expected='" << aExpected << "', actual='" << aActual
- << "'" << endl;
+ std::cerr << "Wrong content in A2: expected='" << aExpected << "', actual='"
+ << aActual << "'" << std::endl;
return false;
}
@@ -647,8 +647,8 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testSharedFormulaExportXLS)
aExpected = "Response";
if (aActual != aExpected)
{
- cerr << "Wrong content in B2: expected='" << aExpected << "', actual='" << aActual
- << "'" << endl;
+ std::cerr << "Wrong content in B2: expected='" << aExpected << "', actual='"
+ << aActual << "'" << std::endl;
return false;
}
@@ -660,8 +660,8 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testSharedFormulaExportXLS)
double fActual = rDoc.GetValue(aPos);
if (fExpected != fActual)
{
- cerr << "Wrong value in A" << (i + 2) << ": expected=" << fExpected
- << ", actual=" << fActual << endl;
+ std::cerr << "Wrong value in A" << (i + 2) << ": expected=" << fExpected
+ << ", actual=" << fActual << std::endl;
return false;
}
@@ -669,7 +669,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testSharedFormulaExportXLS)
ScFormulaCell* pFC = rDoc.GetFormulaCell(aPos);
if (!pFC)
{
- cerr << "B" << (i + 2) << " should be a formula cell." << endl;
+ std::cerr << "B" << (i + 2) << " should be a formula cell." << std::endl;
return false;
}
@@ -677,16 +677,16 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testSharedFormulaExportXLS)
aExpected = "Coefficients!RC[-1]";
if (aFormula != aExpected)
{
- cerr << "Wrong formula in B" << (i + 2) << ": expected='" << aExpected
- << "', actual='" << aFormula << "'" << endl;
+ std::cerr << "Wrong formula in B" << (i + 2) << ": expected='" << aExpected
+ << "', actual='" << aFormula << "'" << std::endl;
return false;
}
fActual = rDoc.GetValue(aPos);
if (fExpected != fActual)
{
- cerr << "Wrong value in B" << (i + 2) << ": expected=" << fExpected
- << ", actual=" << fActual << endl;
+ std::cerr << "Wrong value in B" << (i + 2) << ": expected=" << fExpected
+ << ", actual=" << fActual << std::endl;
return false;
}
}
@@ -721,8 +721,8 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testSharedFormulaExportXLSX)
SCTAB nTabCount = rDoc.GetTableCount();
if (nTabCount != 2)
{
- cerr << "Document should have exactly 2 sheets. " << nTabCount << " found."
- << endl;
+ std::cerr << "Document should have exactly 2 sheets. " << nTabCount << " found."
+ << std::endl;
return false;
}
@@ -732,8 +732,8 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testSharedFormulaExportXLSX)
Color aTabBgColor = rDoc.GetTabBgColor(i);
if (aTabBgColor != COL_AUTO)
{
- cerr << "The tab color of Sheet " << (i + 1) << " should not be explicitly set."
- << endl;
+ std::cerr << "The tab color of Sheet " << (i + 1)
+ << " should not be explicitly set." << std::endl;
return false;
}
}
@@ -746,8 +746,8 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testSharedFormulaExportXLSX)
double fVal = rDoc.GetValue(aPos);
if (fVal != fExpected)
{
- cerr << "Wrong value in B" << (i + 1) << ": expected=" << fExpected
- << ", actual=" << fVal << endl;
+ std::cerr << "Wrong value in B" << (i + 1) << ": expected=" << fExpected
+ << ", actual=" << fVal << std::endl;
return false;
}
}
@@ -760,8 +760,8 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testSharedFormulaExportXLSX)
double fVal = rDoc.GetValue(aPos);
if (fVal != fExpected)
{
- cerr << "Wrong value in C" << (i + 1) << ": expected=" << fExpected
- << ", actual=" << fVal << endl;
+ std::cerr << "Wrong value in C" << (i + 1) << ": expected=" << fExpected
+ << ", actual=" << fVal << std::endl;
return false;
}
}
@@ -774,8 +774,8 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testSharedFormulaExportXLSX)
double fVal = rDoc.GetValue(aPos);
if (fVal != fExpected)
{
- cerr << "Wrong value in D" << (i + 1) << ": expected=" << fExpected
- << ", actual=" << fVal << endl;
+ std::cerr << "Wrong value in D" << (i + 1) << ": expected=" << fExpected
+ << ", actual=" << fVal << std::endl;
return false;
}
}
@@ -822,8 +822,8 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testSharedFormulaStringResultExportXLSX)
OUString aExpected = OUString::createFromAscii(expected[i]);
if (aStr != aExpected)
{
- cerr << "Wrong value in B" << (i + 2) << ": expected='" << aExpected
- << "', actual='" << aStr << "'" << endl;
+ std::cerr << "Wrong value in B" << (i + 2) << ": expected='" << aExpected
+ << "', actual='" << aStr << "'" << std::endl;
return false;
}
}
@@ -839,8 +839,8 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testSharedFormulaStringResultExportXLSX)
OUString aExpected = OUString::createFromAscii(expected[i]);
if (aStr != aExpected)
{
- cerr << "Wrong value in C" << (i + 2) << ": expected='" << aExpected
- << "', actual='" << aStr << "'" << endl;
+ std::cerr << "Wrong value in C" << (i + 2) << ": expected='" << aExpected
+ << "', actual='" << aStr << "'" << std::endl;
return false;
}
}
diff --git a/sc/qa/unit/subsequent_export_test4.cxx b/sc/qa/unit/subsequent_export_test4.cxx
index 6342d4dde16c..b1a90b9f7517 100644
--- a/sc/qa/unit/subsequent_export_test4.cxx
+++ b/sc/qa/unit/subsequent_export_test4.cxx
@@ -230,8 +230,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf143979)
SvNumberFormatter* pFormatter = pDoc->GetFormatTable();
pFormatter->PutEntry(aCode, nCheckPos, nType, nFormat);
ScPatternAttr aNewAttrs(pDoc->getCellAttributeHelper());
- SfxItemSet& rSet = aNewAttrs.GetItemSet();
- rSet.Put(SfxUInt32Item(ATTR_VALUE_FORMAT, nFormat));
+ aNewAttrs.ItemSetPut(SfxUInt32Item(ATTR_VALUE_FORMAT, nFormat));
pDoc->ApplyPattern(0, 0, 0, aNewAttrs);
pDoc->SetString(ScAddress(0, 0, 0), u"08/30/2021"_ustr);
CPPUNIT_ASSERT_EQUAL(u"2021-08Aug-30Mon"_ustr, pDoc->GetString(ScAddress(0, 0, 0)));
@@ -1455,7 +1454,7 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testWholeRowBold)
// Make entire second row bold.
ScPatternAttr boldAttr(pDoc->getCellAttributeHelper());
- boldAttr.GetItemSet().Put(SvxWeightItem(WEIGHT_BOLD, ATTR_FONT_WEIGHT));
+ boldAttr.ItemSetPut(SvxWeightItem(WEIGHT_BOLD, ATTR_FONT_WEIGHT));
pDoc->ApplyPatternAreaTab(0, 1, pDoc->MaxCol(), 1, 0, boldAttr);
}
@@ -1647,6 +1646,28 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTotalsRowFunction)
}
}
+CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf167689_xmlMaps_and_xmlColumnPr)
+{
+ createScDoc("xlsx/tdf167689_xmlMaps_and_xmlColumnPr.xlsx");
+ save(u"Calc Office Open XML"_ustr);
+
+ // xl/xmlMaps.xml
+ xmlDocUniquePtr pDocXml = parseExport(u"xl/xmlMaps.xml"_ustr);
+ CPPUNIT_ASSERT(pDocXml);
+
+ assertXPath(pDocXml,
+ "/x:MapInfo/Schema/xsd:schema/xsd:element/xsd:complexType/xsd:sequence/xsd:element/"
+ "xsd:complexType/xsd:sequence/xsd:element[3]/xsd:complexType/xsd:sequence/"
+ "xsd:element[1]",
+ "name", u"Code");
+
+ // test <xmlColumnPr> of xl/tables/table1.xml
+ xmlDocUniquePtr pDocXmlTables = parseExport(u"xl/tables/table1.xml"_ustr);
+ CPPUNIT_ASSERT(pDocXmlTables);
+ assertXPath(pDocXmlTables, "/x:table/x:tableColumns/x:tableColumn[1]/x:xmlColumnPr", "xpath",
+ u"/DataList/TransactionTypeList/TransactionType/Code");
+}
+
CPPUNIT_TEST_FIXTURE(ScExportTest4, testAutofilterHiddenButton)
{
createScDoc("xlsx/hiddenButton.xlsx");
@@ -2213,6 +2234,16 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf166939_1)
assertXPath(pXmlDoc, "//table:table/table:table-row[2]", "style-name", u"r_2");
}
+CPPUNIT_TEST_FIXTURE(ScExportTest4, testTdf108244)
+{
+ createScDoc("ods/tdf108244.ods");
+ save(u"OpenDocument Spreadsheet Flat XML"_ustr);
+ xmlDocUniquePtr pXmlDoc = parseExportedFile();
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ CPPUNIT_ASSERT_EQUAL(u"1"_ustr, getXPathContent(pXmlDoc, "count(//office:annotation)"));
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/qa/unit/subsequent_filters_test2.cxx b/sc/qa/unit/subsequent_filters_test2.cxx
index 0f72c945b828..91101037f918 100644
--- a/sc/qa/unit/subsequent_filters_test2.cxx
+++ b/sc/qa/unit/subsequent_filters_test2.cxx
@@ -1719,10 +1719,10 @@ CPPUNIT_TEST_FIXTURE(ScFiltersTest2, testBackColorFilter)
ScDocument* pDoc = getScDoc();
ScPatternAttr aPattern1(pDoc->getCellAttributeHelper());
- aPattern1.GetItemSet().Put(SvxBrushItem(aBackColor1, ATTR_BACKGROUND));
+ aPattern1.ItemSetPut(SvxBrushItem(aBackColor1, ATTR_BACKGROUND));
ScPatternAttr aPattern2(pDoc->getCellAttributeHelper());
- aPattern2.GetItemSet().Put(SvxBrushItem(aBackColor2, ATTR_BACKGROUND));
+ aPattern2.ItemSetPut(SvxBrushItem(aBackColor2, ATTR_BACKGROUND));
// Apply the pattern to cell A1:A2
pDoc->ApplyPatternAreaTab(0, 0, 0, 1, 0, aPattern1);
diff --git a/sc/qa/unit/subsequent_filters_test5.cxx b/sc/qa/unit/subsequent_filters_test5.cxx
index 3cc0a534da3a..30563b7bffb2 100644
--- a/sc/qa/unit/subsequent_filters_test5.cxx
+++ b/sc/qa/unit/subsequent_filters_test5.cxx
@@ -9,16 +9,7 @@
*/
// core, please keep it alphabetically ordered
-#include <comphelper/configuration.hxx>
#include "helper/qahelper.hxx"
-#include <test/unoapi_test.hxx>
-#include <unotools/saveopt.hxx>
-
-// API, please keep it alphabetically ordered
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/container/XNameAccess.hpp>
-#include <com/sun/star/sheet/XDatabaseRange.hpp>
-#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <dbdata.hxx>
@@ -36,108 +27,6 @@ public:
}
};
-CPPUNIT_TEST_FIXTURE(ScFiltersTest5, testTdf162963)
-{
- //tests xlsx -> ods -> ods of property "TotalsRow"
- createScDoc("xlsx/tdf162963_TableWithTotalsEnabled.xlsx");
-
- static constexpr OUString sDBName(u"myData"_ustr);
- static constexpr OUString sPropName(u"TotalsRow"_ustr);
-
- // Make sure the database range "myData" has TotalsRow TRUE after import from xlsx.
- {
- uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, UNO_QUERY_THROW);
- uno::Reference<beans::XPropertySet> xDocPropSet(xDoc, UNO_QUERY_THROW);
- uno::Reference<container::XNameAccess> xNameAccess(
- xDocPropSet->getPropertyValue(u"DatabaseRanges"_ustr), UNO_QUERY_THROW);
- uno::Reference<beans::XPropertySet> xDBRangePropSet(xNameAccess->getByName(sDBName),
- UNO_QUERY_THROW);
- bool bTotalsRow = false;
- xDBRangePropSet->getPropertyValue(sPropName) >>= bTotalsRow;
- CPPUNIT_ASSERT_MESSAGE("xlsx-import", bTotalsRow);
- }
- // Make sure TotalsRow is still TRUE after save to ods and reload.
- // The error was, that the property "TotalsRow" was not written to ods at all.
- // With fix it is written as calcext:contains-footer.
- {
- saveAndReload(u"calc8"_ustr);
- uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, UNO_QUERY_THROW);
- uno::Reference<beans::XPropertySet> xDocPropSet(xDoc, UNO_QUERY_THROW);
- uno::Reference<container::XNameAccess> xNameAccess(
- xDocPropSet->getPropertyValue(u"DatabaseRanges"_ustr), UNO_QUERY_THROW);
- uno::Reference<beans::XPropertySet> xDBRangePropSet(xNameAccess->getByName(sDBName),
- UNO_QUERY_THROW);
- bool bTotalsRow = true;
- xDBRangePropSet->getPropertyValue(sPropName) >>= bTotalsRow;
- CPPUNIT_ASSERT_MESSAGE("save ods, reload", bTotalsRow);
- }
-}
-
-CPPUNIT_TEST_FIXTURE(ScFiltersTest5, testTdf162963_ODF)
-{
- Resetter resetter([]() { SetODFDefaultVersion(SvtSaveOptions::ODFVER_LATEST); });
-
- // Verify, that calcext:contains-footer is only written in extended file format versions.
- // The parameter in DefaultVersion::set need to be adapted, when attribute contains-footer
- // is included in ODF strict, see issue OFFICE-4169 at OASIS.
- createScDoc("fods/tdf162963_DatabaseRange.fods");
-
- // enable TotalsRow
- uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, UNO_QUERY_THROW);
- uno::Reference<beans::XPropertySet> xDocPropSet(xDoc, UNO_QUERY_THROW);
- uno::Reference<container::XNameAccess> xNameAccess(
- xDocPropSet->getPropertyValue(u"DatabaseRanges"_ustr), UNO_QUERY_THROW);
- uno::Reference<beans::XPropertySet> xDBRangePropSet(xNameAccess->getByName(u"myData"_ustr),
- UNO_QUERY_THROW);
- xDBRangePropSet->setPropertyValue(u"TotalsRow"_ustr, uno::Any(true));
-
- // Save to ODF 1.3 extended.
- // Adapt to a concrete version when attribute contains-footer is available in ODF strict.
- // Make sure attribute is written in calcext namespace
- save(u"calc8"_ustr);
- xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
- assertXPath(pXmlDoc,
- "/office:document-content/office:body/office:spreadsheet/"
- "table:database-ranges/table:database-range[@calcext:contains-footer='true']"_ostr);
-
- // Save to ODF 1.3 strict. Make sure attribute is not written.
- // Adapt to ODF 1.4 strict, when it is available.
- SetODFDefaultVersion(SvtSaveOptions::ODFDefaultVersion::ODFVER_013);
- save(u"calc8"_ustr); // this saves to .ods not to .fods
- pXmlDoc = parseExport(u"content.xml"_ustr);
- assertXPath(pXmlDoc,
- "/office:document-content/office:body/office:spreadsheet/"
- "table:database-ranges/table:database-range/contains-footer",
- 0);
-}
-
-CPPUNIT_TEST_FIXTURE(ScFiltersTest5, testTdf162177_EastersundayODF14)
-{
- // EASTERSUNDAY was added to ODFF in ODF 1.4. LibreOffice has written it as
- // ORG.OPENOFFICE.EASTERSUNDAY for ODF 1.2 and ODF 1.3.
- Resetter resetter([]() { SetODFDefaultVersion(SvtSaveOptions::ODFVER_LATEST); });
- createScDoc("fods/tdf162177_Eastersunday.fods");
-
- // File has it as ORG.OPENOFFICE.EASTERSUNDAY in ODF 1.3. Test, that it is read correctly.
- ScDocument* pDoc = getScDoc();
- OUString aFormula = pDoc->GetFormula(0, 0, 0);
- CPPUNIT_ASSERT_EQUAL(u"=EASTERSUNDAY(2024)"_ustr, aFormula);
-
- // Verify that saving to ODF1.3 produces ORG.OPENOFFICE.EASTERSUNDAY
- SetODFDefaultVersion(SvtSaveOptions::ODFDefaultVersion::ODFVER_013);
- save(u"calc8"_ustr); // this saves to .ods not to .fods
- xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
- const OString sPath = "/office:document-content/office:body/office:spreadsheet/table:table/"
- "table:table-row/table:table-cell"_ostr;
- assertXPath(pXmlDoc, sPath, "formula", u"of:=ORG.OPENOFFICE.EASTERSUNDAY(2024)");
-
- // Verify that saving to ODF1.4 produces EASTERSUNDAY
- SetODFDefaultVersion(SvtSaveOptions::ODFDefaultVersion::ODFVER_014);
- save(u"calc8"_ustr); // this saves to .ods not to .fods
- pXmlDoc = parseExport(u"content.xml"_ustr);
- assertXPath(pXmlDoc, sPath, "formula", u"of:=EASTERSUNDAY(2024)");
-}
-
CPPUNIT_TEST_FIXTURE(ScFiltersTest5, testTdf157689)
{
// testing the correct import of autofilter on multiple sheets
@@ -180,6 +69,69 @@ CPPUNIT_TEST_FIXTURE(ScFiltersTest5, testTdf151505)
CPPUNIT_ASSERT(nFlag & ScMF::Auto);
}
+CPPUNIT_TEST_FIXTURE(ScFiltersTest5, testTdf167134_LOOKUP_extRef)
+{
+ // testing the correct handling of external references in LOOKUP parameters
+ // The file lookup_target.fods uses external links to file lookup_source.fods
+ // The test requires that both are located in directory sc/qa/unit/data/fods;
+ createScDoc("fods/lookup_target.fods");
+
+ ScDocument* pDoc = getScDoc();
+ ScDocShell* pDocSh = getScDocShell();
+ pDocSh->ReloadAllLinks();
+ pDocSh->DoHardRecalc();
+
+ // compare the data loaded from external links (column 0)
+ // with the expected result stored in the test file (column 1)
+ for (SCROW nRow = 3; nRow <= 26; nRow++)
+ {
+ OUString aResult = pDoc->GetString(ScAddress(0, nRow, 0));
+ OUString aExpected = pDoc->GetString(ScAddress(1, nRow, 0));
+ CPPUNIT_ASSERT_EQUAL(aExpected, aResult);
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(ScFiltersTest5, testTdf122336)
+{
+ createScDoc("xlsx/tdf122336.xlsx");
+
+ ScDocument* pDoc = getScDoc();
+ // Without the fix in place, this test would have failed with
+ // - Expected: Uitvoeringsdatum
+ // - Actual :
+ CPPUNIT_ASSERT_EQUAL(u"Uitvoeringsdatum"_ustr, pDoc->GetString(0, 0, 0));
+ CPPUNIT_ASSERT_EQUAL(u"12/25/2018"_ustr, pDoc->GetString(0, 1, 0));
+}
+
+CPPUNIT_TEST_FIXTURE(ScFiltersTest5, testTdf118668)
+{
+ createScDoc("xlsx/tdf118668.xlsx");
+
+ ScDocument* pDoc = getScDoc();
+ CPPUNIT_ASSERT_EQUAL(static_cast<SCTAB>(2), pDoc->GetTableCount());
+ CPPUNIT_ASSERT(pDoc->IsVisible(0));
+
+ //Without the fix in place, this test would have failed here
+ CPPUNIT_ASSERT(pDoc->IsVisible(1));
+}
+
+CPPUNIT_TEST_FIXTURE(ScFiltersTest5, testTdf94627)
+{
+ createScDoc("xlsb/tdf94627.xlsb");
+
+ ScDocument* pDoc = getScDoc();
+
+ ScRangeName* pRangeName = pDoc->GetRangeName();
+ ScRangeData* pRangeData = pRangeName->findByUpperName("NAME1");
+ CPPUNIT_ASSERT(pRangeData);
+
+ OUString aFormula = pRangeData->GetSymbol();
+ CPPUNIT_ASSERT_EQUAL(u"$Sheet1.$A$1"_ustr, aFormula);
+
+ double fVal = pDoc->GetValue(0, 3, 0);
+ ASSERT_DOUBLES_EQUAL(2, fVal);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index e4966adc2f4a..90a68ae7d49a 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -18,6 +18,7 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/propertysequence.hxx>
#include <comphelper/servicehelper.hxx>
+#include <comphelper/SetFlagContextHelper.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/viewfrm.hxx>
#include <svl/stritem.hxx>
@@ -226,7 +227,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testViewCursors)
pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::DOWN);
pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::DOWN);
Scheduler::ProcessEventsToIdle();
- SfxLokHelper::destroyView(SfxLokHelper::getView());
+ SfxLokHelper::destroyView(SfxLokHelper::getCurrentView());
CPPUNIT_ASSERT(aView1.m_bViewCursorInvalidated);
}
@@ -405,7 +406,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testUndoShells)
ScUndoManager* pUndoManager = rDoc.GetUndoManager();
CPPUNIT_ASSERT(pUndoManager);
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pUndoManager->GetUndoActionCount());
- sal_Int32 nView1 = SfxLokHelper::getView();
+ sal_Int32 nView1 = SfxLokHelper::getCurrentView();
// This was -1: ScSimpleUndo did not remember what view shell created it.
CPPUNIT_ASSERT_EQUAL(ViewShellId(nView1), pUndoManager->GetUndoAction()->GetViewShellId());
}
@@ -463,7 +464,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testTextEditViewInvalidations)
CPPUNIT_ASSERT(pViewData);
// view #1
- int nView1 = SfxLokHelper::getView();
+ int nView1 = SfxLokHelper::getCurrentView();
ScTestViewCallback aView1;
CPPUNIT_ASSERT(!lcl_hasEditView(*pViewData));
@@ -533,7 +534,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testCreateViewGraphicSelection)
CPPUNIT_ASSERT(aView1.m_bGraphicSelection);
// Create a second view.
- int nView1 = SfxLokHelper::getView();
+ int nView1 = SfxLokHelper::getCurrentView();
SfxLokHelper::createView();
pModelObj->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
ScTestViewCallback aView2;
@@ -725,7 +726,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testCommentCallback)
{
ScModelObj* pModelObj = createDoc("small.ods");
ScTestViewCallback aView1;
- int nView1 = SfxLokHelper::getView();
+ int nView1 = SfxLokHelper::getCurrentView();
// Create a 2nd view
SfxLokHelper::createView();
@@ -833,12 +834,12 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testUndoLimiting)
CPPUNIT_ASSERT(pUndoManager);
// view #1
- int nView1 = SfxLokHelper::getView();
+ int nView1 = SfxLokHelper::getCurrentView();
ScTestViewCallback aView1;
// view #2
SfxLokHelper::createView();
- int nView2 = SfxLokHelper::getView();
+ int nView2 = SfxLokHelper::getCurrentView();
pModelObj->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
ScTestViewCallback aView2;
@@ -891,12 +892,12 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testUndoRepairDispatch)
CPPUNIT_ASSERT(pUndoManager);
// view #1
- int nView1 = SfxLokHelper::getView();
+ int nView1 = SfxLokHelper::getCurrentView();
ScTestViewCallback aView1;
// view #2
SfxLokHelper::createView();
- int nView2 = SfxLokHelper::getView();
+ int nView2 = SfxLokHelper::getCurrentView();
pModelObj->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
ScTestViewCallback aView2;
@@ -982,7 +983,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testDocumentSizeWithTwoViews)
Scheduler::ProcessEventsToIdle();
// Create a new view
- int nView1 = SfxLokHelper::getView();
+ int nView1 = SfxLokHelper::getCurrentView();
SfxLokHelper::createView();
std::vector<unsigned char> aBuffer2(nCanvasWidth * nCanvasHeight * 4);
@@ -1006,12 +1007,12 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testDisableUndoRepair)
CPPUNIT_ASSERT(pModelObj);
// view #1
- int nView1 = SfxLokHelper::getView();
+ int nView1 = SfxLokHelper::getCurrentView();
SfxViewShell* pView1 = SfxViewShell::Current();
// view #2
SfxLokHelper::createView();
- int nView2 = SfxLokHelper::getView();
+ int nView2 = SfxLokHelper::getCurrentView();
SfxViewShell* pView2 = SfxViewShell::Current();
CPPUNIT_ASSERT(pView1 != pView2);
@@ -1082,10 +1083,10 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testDocumentRepair)
SfxViewShell* pView1 = SfxViewShell::Current();
// view #2
- int nView1 = SfxLokHelper::getView();
+ int nView1 = SfxLokHelper::getCurrentView();
SfxLokHelper::createView();
SfxViewShell* pView2 = SfxViewShell::Current();
- int nView2 = SfxLokHelper::getView();
+ int nView2 = SfxLokHelper::getCurrentView();
CPPUNIT_ASSERT(pView1 != pView2);
{
std::unique_ptr<SfxBoolItem> pItem1;
@@ -1133,7 +1134,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testLanguageStatus)
SfxViewShell* pView1 = SfxViewShell::Current();
// view #2
- int nView1 = SfxLokHelper::getView();
+ int nView1 = SfxLokHelper::getCurrentView();
SfxLokHelper::createView();
SfxViewShell* pView2 = SfxViewShell::Current();
CPPUNIT_ASSERT(pView1 != pView2);
@@ -1191,7 +1192,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testMultiViewCopyPaste)
pView1->GetViewData().GetActiveWin()->SetClipboard(css::datatransfer::clipboard::LokClipboard::create(comphelper::getProcessComponentContext()));
// view #2
- int nView1 = SfxLokHelper::getView();
+ int nView1 = SfxLokHelper::getCurrentView();
SfxLokHelper::createView();
ScTabViewShell* pView2 = dynamic_cast<ScTabViewShell*>(SfxViewShell::Current());
// emulate clipboard
@@ -1261,7 +1262,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testFilterDlg)
// view #1
SfxViewShell* pView1 = SfxViewShell::Current();
- int nView1 = SfxLokHelper::getView();
+ int nView1 = SfxLokHelper::getCurrentView();
// view #2
SfxLokHelper::createView();
@@ -1297,7 +1298,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testFunctionDlg)
// view #1
SfxViewShell* pView1 = SfxViewShell::Current();
- int nView1 = SfxLokHelper::getView();
+ int nView1 = SfxLokHelper::getCurrentView();
{
pView1->GetViewFrame().GetDispatcher()->Execute(SID_OPENDLG_FUNCTION,
SfxCallMode::SLOT|SfxCallMode::RECORD);
@@ -1385,7 +1386,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testPageDownInvalidation)
ScViewData* pViewData = ScDocShell::GetViewData();
CPPUNIT_ASSERT(pViewData);
- int nView1 = SfxLokHelper::getView();
+ int nView1 = SfxLokHelper::getCurrentView();
ScTestViewCallback aView1;
CPPUNIT_ASSERT(!lcl_hasEditView(*pViewData));
@@ -1404,6 +1405,7 @@ static Bitmap getTile(ScModelObj* pModelObj, int nTilePosX, int nTilePosY, tools
{
size_t nCanvasSize = 1024;
size_t nTileSize = 256;
+ // BGRA format data
std::vector<unsigned char> aPixmap(nCanvasSize * nCanvasSize * 4, 0);
ScopedVclPtrInstance<VirtualDevice> xDevice(DeviceFormat::WITHOUT_ALPHA);
xDevice->SetBackground(Wallpaper(COL_TRANSPARENT));
@@ -1430,7 +1432,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testSheetChangeNoInvalidation)
ScTabViewShell* pView = dynamic_cast<ScTabViewShell*>(SfxViewShell::Current());
CPPUNIT_ASSERT(pView);
- int nView1 = SfxLokHelper::getView();
+ int nView1 = SfxLokHelper::getCurrentView();
ScTestViewCallback aView1;
CPPUNIT_ASSERT(!lcl_hasEditView(*pViewData));
@@ -1498,7 +1500,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testInsertDeletePageInvalidation)
ScViewData* pViewData = ScDocShell::GetViewData();
CPPUNIT_ASSERT(pViewData);
- int nView1 = SfxLokHelper::getView();
+ int nView1 = SfxLokHelper::getCurrentView();
ScTestViewCallback aView1;
CPPUNIT_ASSERT(!lcl_hasEditView(*pViewData));
@@ -1539,7 +1541,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testGetRowColumnHeadersInvalidation)
ScViewData* pViewData = ScDocShell::GetViewData();
CPPUNIT_ASSERT(pViewData);
- int nView1 = SfxLokHelper::getView();
+ int nView1 = SfxLokHelper::getCurrentView();
ScTestViewCallback aView1;
CPPUNIT_ASSERT(!lcl_hasEditView(*pViewData));
@@ -1583,7 +1585,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testJumpHorizontallyInvalidation)
ScViewData* pViewData = ScDocShell::GetViewData();
CPPUNIT_ASSERT(pViewData);
- int nView1 = SfxLokHelper::getView();
+ int nView1 = SfxLokHelper::getCurrentView();
ScTestViewCallback aView1;
CPPUNIT_ASSERT(!lcl_hasEditView(*pViewData));
@@ -1607,7 +1609,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testJumpToLastRowInvalidation)
ScViewData* pViewData = ScDocShell::GetViewData();
CPPUNIT_ASSERT(pViewData);
- int nView1 = SfxLokHelper::getView();
+ int nView1 = SfxLokHelper::getCurrentView();
ScTestViewCallback aView1;
CPPUNIT_ASSERT(!lcl_hasEditView(*pViewData));
@@ -1632,12 +1634,12 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testRowColumnHeaders)
// view #1
ScTestViewCallback aView1;
- int nView1 = SfxLokHelper::getView();
+ int nView1 = SfxLokHelper::getCurrentView();
CPPUNIT_ASSERT(!lcl_hasEditView(*pViewData));
// view #2
SfxLokHelper::createView();
- int nView2 = SfxLokHelper::getView();
+ int nView2 = SfxLokHelper::getCurrentView();
ScTestViewCallback aView2;
pModelObj->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
@@ -1873,11 +1875,11 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testSheetGeometryDataInvariance)
// view #1
ScTestViewCallback aView1;
- int nView1 = SfxLokHelper::getView();
+ int nView1 = SfxLokHelper::getCurrentView();
// view #2
SfxLokHelper::createView();
- int nView2 = SfxLokHelper::getView();
+ int nView2 = SfxLokHelper::getCurrentView();
ScTestViewCallback aView2;
pModelObj->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
@@ -2354,7 +2356,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testSheetViewDataCrash)
ScModelObj* pModelObj = createDoc("empty.ods");
// view #1
- int nView1 = SfxLokHelper::getView();
+ int nView1 = SfxLokHelper::getCurrentView();
SfxLokHelper::setView(nView1);
// Imitate online while creating a new sheet on empty.ods.
@@ -2417,7 +2419,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testCommentCellCopyPaste)
{
ScModelObj* pModelObj = createDoc("empty.ods");
ScTestViewCallback aView;
- int nView = SfxLokHelper::getView();
+ int nView = SfxLokHelper::getCurrentView();
SfxLokHelper::setView(nView);
@@ -2509,7 +2511,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testInvalidEntrySave)
pModelObj->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
const ScDocument* pDoc = pModelObj->GetDocument();
ScTestViewCallback aView;
- int nView = SfxLokHelper::getView();
+ int nView = SfxLokHelper::getCurrentView();
SfxLokHelper::setView(nView);
@@ -2548,12 +2550,12 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testUndoReordering)
CPPUNIT_ASSERT(pUndoManager);
// view #1
- int nView1 = SfxLokHelper::getView();
+ int nView1 = SfxLokHelper::getCurrentView();
ScTestViewCallback aView1;
// view #2
SfxLokHelper::createView();
- int nView2 = SfxLokHelper::getView();
+ int nView2 = SfxLokHelper::getCurrentView();
pModelObj->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
ScTestViewCallback aView2;
@@ -2608,13 +2610,13 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testUndoReorderingRedo)
CPPUNIT_ASSERT_EQUAL(std::size_t(0), pUndoManager->GetUndoActionCount());
// view #1
- int nView1 = SfxLokHelper::getView();
+ int nView1 = SfxLokHelper::getCurrentView();
SfxViewShell* pView1 = SfxViewShell::Current();
ScTestViewCallback aView1;
// view #2
SfxLokHelper::createView();
- int nView2 = SfxLokHelper::getView();
+ int nView2 = SfxLokHelper::getCurrentView();
SfxViewShell* pView2 = SfxViewShell::Current();
pModelObj->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
ScTestViewCallback aView2;
@@ -2698,12 +2700,12 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testUndoReorderingMulti)
CPPUNIT_ASSERT_EQUAL(std::size_t(0), pUndoManager->GetUndoActionCount());
// view #1
- int nView1 = SfxLokHelper::getView();
+ int nView1 = SfxLokHelper::getCurrentView();
ScTestViewCallback aView1;
// view #2
SfxLokHelper::createView();
- int nView2 = SfxLokHelper::getView();
+ int nView2 = SfxLokHelper::getCurrentView();
pModelObj->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
ScTestViewCallback aView2;
@@ -2764,7 +2766,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testGetViewRenderState)
aColorConfig.AddScheme(u"Light"_ustr);
ScModelObj* pModelObj = createDoc("empty.ods");
- int nFirstViewId = SfxLokHelper::getView();
+ int nFirstViewId = SfxLokHelper::getCurrentView();
ScTestViewCallback aView1;
CPPUNIT_ASSERT_EQUAL("S;Default"_ostr, pModelObj->getViewRenderState());
@@ -2880,7 +2882,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testOpenURL)
{
// Given a document that has 2 views:
createDoc("empty.ods");
- int nView1 = SfxLokHelper::getView();
+ int nView1 = SfxLokHelper::getCurrentView();
ScTestViewCallback aView1;
SfxLokHelper::createView();
ScTestViewCallback aView2;
@@ -3042,13 +3044,13 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testCellInvalidationDocWithExistingZo
Scheduler::ProcessEventsToIdle();
- int nView1 = SfxLokHelper::getView();
+ int nView1 = SfxLokHelper::getCurrentView();
// register to track View #1 invalidations
ScTestViewCallback aView1;
// Create a View #2
SfxLokHelper::createView();
- int nView2 = SfxLokHelper::getView();
+ int nView2 = SfxLokHelper::getCurrentView();
pModelObj->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
// register to track View #1 invalidations
ScTestViewCallback aView2;
@@ -3104,6 +3106,23 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testCellInvalidationDocWithExistingZo
CPPUNIT_ASSERT_RECTANGLE_EQUAL_WITH_TOLERANCE(aView2.m_aInvalidations[0],
aView1.m_aInvalidations[0],
50);
+ // cool#4250: zoom values
+ pModelObj->setExportZoom(150);
+
+ {
+ uno::ContextLayer aLayer(comphelper::NewFlagContext(u"IsLOKExport"_ustr));
+ save(u"calc8"_ustr); // .ODS
+ }
+ xmlDocUniquePtr pSettingsXml = parseExport(u"settings.xml"_ustr);
+ // Multi-user export: don't save every user's view into the exported file
+ // assertXPath(pSettingsXml, "//config:config-item[@config:name='ViewId']", 1);
+ // Use view's logic (not technical) zoom level for export
+ assertXPathContent(pSettingsXml, "//config:config-item[@config:name='ZoomValue'][1]", u"150");
+
+ save(u"Calc Office Open XML"_ustr); // .XLSX
+ xmlDocUniquePtr pSheet1Xml = parseExport(u"xl/worksheets/sheet1.xml"_ustr);
+ // Use view's logic (not technical) zoom level for export
+ assertXPath(pSheet1Xml, "//x:sheetViews/x:sheetView", "zoomScale", u"150");
}
CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testInputHandlerSyncedZoom)
@@ -3178,7 +3197,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testStatusBarLocale)
{
// Given 2 views, the second's locale is set to German:
createDoc("empty.ods");
- int nView1 = SfxLokHelper::getView();
+ int nView1 = SfxLokHelper::getCurrentView();
ScTestViewCallback aView1;
SfxLokHelper::createView();
ScTestViewCallback aView2;
@@ -3277,7 +3296,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testLongFirstColumnMouseClick)
// Setup view #2
SfxLokHelper::createView();
- int nView2 = SfxLokHelper::getView();
+ int nView2 = SfxLokHelper::getCurrentView();
ScTestViewCallback aView2;
// Set client rect to 2000 x 2000 pixels
pModelObj->setClientVisibleArea(tools::Rectangle(0, 0, 2000 / nPPTX, 2000 / nPPTY));
@@ -3403,7 +3422,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testNumberFormatLocaleMultiUser)
pModelObj->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
ScDocument* pDoc = pModelObj->GetDocument();
- int nViewFR = SfxLokHelper::getView();
+ int nViewFR = SfxLokHelper::getCurrentView();
ScTestViewCallback aView1;
SfxViewShell* pViewFR = SfxViewShell::Current();
pViewFR->SetLOKLocale(u"fr-FR"_ustr);
diff --git a/sc/qa/unit/tiledrendering/tiledrendering2.cxx b/sc/qa/unit/tiledrendering/tiledrendering2.cxx
index ff6ed1881542..b9df067e40dc 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering2.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering2.cxx
@@ -27,7 +27,7 @@ using namespace com::sun::star;
CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testSidebarLocale)
{
ScModelObj* pModelObj = createDoc("chart.ods");
- int nView1 = SfxLokHelper::getView();
+ int nView1 = SfxLokHelper::getCurrentView();
ScTestViewCallback aView1;
SfxViewShell* pView1 = SfxViewShell::Current();
pView1->SetLOKLocale(u"en-US"_ustr);
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 76ec832b8c5e..4377a3cca636 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -69,8 +69,6 @@
class ScUndoPaste;
class ScUndoCut;
-using ::std::cerr;
-using ::std::endl;
namespace {
@@ -124,7 +122,7 @@ CPPUNIT_TEST_FIXTURE(Test, testUndoBackgroundColorInsertRow)
// Add patterns
ScPatternAttr aCellBlueColor(m_pDoc->getCellAttributeHelper());
- aCellBlueColor.GetItemSet().Put(SvxBrushItem(COL_BLUE, ATTR_BACKGROUND));
+ aCellBlueColor.ItemSetPut(SvxBrushItem(COL_BLUE, ATTR_BACKGROUND));
m_pDoc->ApplyPatternAreaTab(0, 3, m_pDoc->MaxCol(), 3, 0, aCellBlueColor);
// Insert a new row at row 3
@@ -165,7 +163,7 @@ CPPUNIT_TEST_FIXTURE(Test, testUndoBackgroundColorInsertColumn)
// Add patterns
ScPatternAttr aCellBlueColor(m_pDoc->getCellAttributeHelper());
- aCellBlueColor.GetItemSet().Put(SvxBrushItem(COL_BLUE, ATTR_BACKGROUND));
+ aCellBlueColor.ItemSetPut(SvxBrushItem(COL_BLUE, ATTR_BACKGROUND));
m_pDoc->ApplyPatternAreaTab(3, 0, 3, m_pDoc->MaxRow(), 0, aCellBlueColor);
// Insert a new column at column 3
@@ -332,7 +330,7 @@ CPPUNIT_TEST_FIXTURE(Test, testBackgroundColorDeleteColumn)
// Add patterns
ScPatternAttr aCellBlueColor(m_pDoc->getCellAttributeHelper());
- aCellBlueColor.GetItemSet().Put(SvxBrushItem(COL_BLUE, ATTR_BACKGROUND));
+ aCellBlueColor.ItemSetPut(SvxBrushItem(COL_BLUE, ATTR_BACKGROUND));
m_pDoc->ApplyPatternAreaTab(3, 0, 3, m_pDoc->MaxRow(), 0, aCellBlueColor);
// Delete column 10
@@ -369,7 +367,7 @@ CPPUNIT_TEST_FIXTURE(Test, testBackgroundColorDeleteRow)
// Add patterns
ScPatternAttr aCellBlueColor(m_pDoc->getCellAttributeHelper());
- aCellBlueColor.GetItemSet().Put(SvxBrushItem(COL_BLUE, ATTR_BACKGROUND));
+ aCellBlueColor.ItemSetPut(SvxBrushItem(COL_BLUE, ATTR_BACKGROUND));
m_pDoc->ApplyPatternAreaTab(0, 3, m_pDoc->MaxCol(), 3, 0, aCellBlueColor);
// Delete row 10
@@ -414,8 +412,8 @@ CPPUNIT_TEST_FIXTURE(Test, testSharedStringPoolUndoDoc)
svl::SharedString aSS2 = rCopyDoc.GetSharedString(aPos);
if (aSS1.getDataIgnoreCase() != aSS2.getDataIgnoreCase())
{
- cerr << "String hash values are not equal at row " << (i+1)
- << " for string '" << aSS1.getString() << "'" << endl;
+ std::cerr << "String hash values are not equal at row " << (i+1)
+ << " for string '" << aSS1.getString() << "'" << std::endl;
return false;
}
}
@@ -1165,27 +1163,27 @@ bool Test::checkHorizontalIterator(ScDocument& rDoc, const std::vector<std::vect
{
if (i >= nCheckCount)
{
- cerr << "hit invalid check " << i << " of " << nCheckCount << endl;
+ std::cerr << "hit invalid check " << i << " of " << nCheckCount << std::endl;
CPPUNIT_FAIL("Iterator claims there is more data than there should be.");
return false;
}
if (pChecks[i].nCol != nCol)
{
- cerr << "Column mismatch " << pChecks[i].nCol << " vs. " << nCol << endl;
+ std::cerr << "Column mismatch " << pChecks[i].nCol << " vs. " << nCol << std::endl;
return false;
}
if (pChecks[i].nRow != nRow)
{
- cerr << "Row mismatch " << pChecks[i].nRow << " vs. " << nRow << endl;
+ std::cerr << "Row mismatch " << pChecks[i].nRow << " vs. " << nRow << std::endl;
return false;
}
if (OUString::createFromAscii(pChecks[i].pVal) != pCell->getString(rDoc))
{
- cerr << "String mismatch " << pChecks[i].pVal << " vs. " <<
- pCell->getString(rDoc) << endl;
+ std::cerr << "String mismatch " << pChecks[i].pVal << " vs. " <<
+ pCell->getString(rDoc) << std::endl;
return false;
}
}
@@ -1379,7 +1377,7 @@ CPPUNIT_TEST_FIXTURE(Test, testHorizontalAttrIterator)
// Set the background color of B2:C3,D2,E3,C4:D4,B5:D5 to blue
ScPatternAttr aCellBackColor(m_pDoc->getCellAttributeHelper());
- aCellBackColor.GetItemSet().Put(SvxBrushItem(COL_BLUE, ATTR_BACKGROUND));
+ aCellBackColor.ItemSetPut(SvxBrushItem(COL_BLUE, ATTR_BACKGROUND));
m_pDoc->ApplyPatternAreaTab(1, 1, 2, 2, 0, aCellBackColor);
m_pDoc->ApplyPatternAreaTab(3, 1, 3, 1, 0, aCellBackColor);
m_pDoc->ApplyPatternAreaTab(4, 2, 4, 2, 0, aCellBackColor);
@@ -1427,7 +1425,7 @@ CPPUNIT_TEST_FIXTURE(Test, testIteratorsUnallocatedColumnsAttributes)
// Make entire second row and third row bold.
ScPatternAttr boldAttr(m_pDoc->getCellAttributeHelper());
- boldAttr.GetItemSet().Put(SvxWeightItem(WEIGHT_BOLD, ATTR_FONT_WEIGHT));
+ boldAttr.ItemSetPut(SvxWeightItem(WEIGHT_BOLD, ATTR_FONT_WEIGHT));
m_pDoc->ApplyPatternAreaTab(0, 1, m_pDoc->MaxCol(), 2, 0, boldAttr);
// That shouldn't need allocating more columns, just changing the default attribute.
@@ -1485,7 +1483,7 @@ CPPUNIT_TEST_FIXTURE(Test, testIteratorsDefPattern)
SCCOL firstCol = 100;
SCCOL lastCol = 103;
ScPatternAttr boldAttr(m_pDoc->getCellAttributeHelper());
- boldAttr.GetItemSet().Put(SvxWeightItem(WEIGHT_BOLD, ATTR_FONT_WEIGHT));
+ boldAttr.ItemSetPut(SvxWeightItem(WEIGHT_BOLD, ATTR_FONT_WEIGHT));
m_pDoc->ApplyPattern(100, 0, 0, boldAttr);
m_pDoc->ApplyPattern(102, 0, 0, boldAttr);
@@ -1549,14 +1547,14 @@ bool broadcasterShifted(const ScDocument& rDoc, const ScAddress& rFrom, const Sc
const SvtBroadcaster* pBC = rDoc.GetBroadcaster(rFrom);
if (pBC)
{
- cerr << "Broadcaster shouldn't be here." << endl;
+ std::cerr << "Broadcaster shouldn't be here." << std::endl;
return false;
}
pBC = rDoc.GetBroadcaster(rTo);
if (!pBC)
{
- cerr << "Broadcaster should be here." << endl;
+ std::cerr << "Broadcaster should be here." << std::endl;
return false;
}
return true;
@@ -1567,21 +1565,21 @@ formula::FormulaToken* getSingleRefToken(ScDocument& rDoc, const ScAddress& rPos
ScFormulaCell* pFC = rDoc.GetFormulaCell(rPos);
if (!pFC)
{
- cerr << "Formula cell expected, but not found." << endl;
+ std::cerr << "Formula cell expected, but not found." << std::endl;
return nullptr;
}
ScTokenArray* pTokens = pFC->GetCode();
if (!pTokens)
{
- cerr << "Token array is not present." << endl;
+ std::cerr << "Token array is not present." << std::endl;
return nullptr;
}
formula::FormulaToken* pToken = pTokens->FirstToken();
if (!pToken || pToken->GetType() != formula::svSingleRef)
{
- cerr << "Not a single reference token." << endl;
+ std::cerr << "Not a single reference token." << std::endl;
return nullptr;
}
@@ -1597,13 +1595,13 @@ bool checkRelativeRefToken(ScDocument& rDoc, const ScAddress& rPos, SCCOL nRelCo
ScSingleRefData& rRef = *pToken->GetSingleRef();
if (!rRef.IsColRel() || rRef.Col() != nRelCol)
{
- cerr << "Unexpected relative column address." << endl;
+ std::cerr << "Unexpected relative column address." << std::endl;
return false;
}
if (!rRef.IsRowRel() || rRef.Row() != nRelRow)
{
- cerr << "Unexpected relative row address." << endl;
+ std::cerr << "Unexpected relative row address." << std::endl;
return false;
}
@@ -1619,7 +1617,7 @@ bool checkDeletedRefToken(ScDocument& rDoc, const ScAddress& rPos)
ScSingleRefData& rRef = *pToken->GetSingleRef();
if (!rRef.IsDeleted())
{
- cerr << "Deleted reference is expected, but it's still a valid reference." << endl;
+ std::cerr << "Deleted reference is expected, but it's still a valid reference." << std::endl;
return false;
}
@@ -3246,36 +3244,32 @@ CPPUNIT_TEST_FIXTURE(Test, testGraphicsInGroup)
rtl::Reference<SdrRectObj> pObj = new SdrRectObj(*pDrawLayer, aOrigRect);
pPage->InsertObject(pObj.get());
const tools::Rectangle &rNewRect = pObj->GetLogicRect();
- CPPUNIT_ASSERT_EQUAL_MESSAGE("must have equal position and size",
- const_cast<const tools::Rectangle &>(aOrigRect), rNewRect);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("must have equal position and size", aOrigRect, rNewRect);
ScDrawLayer::SetPageAnchored(*pObj);
//Use a range of rows guaranteed to include all of the square
m_pDoc->ShowRows(0, 100, 0, false);
m_pDoc->SetDrawPageSize(0);
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Should not change when page anchored",
- const_cast<const tools::Rectangle &>(aOrigRect), rNewRect);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should not change when page anchored", aOrigRect, rNewRect);
m_pDoc->ShowRows(0, 100, 0, true);
m_pDoc->SetDrawPageSize(0);
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Should not change when page anchored",
- const_cast<const tools::Rectangle &>(aOrigRect), rNewRect);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should not change when page anchored", aOrigRect, rNewRect);
ScDrawLayer::SetCellAnchoredFromPosition(*pObj, *m_pDoc, 0, true);
CPPUNIT_ASSERT_EQUAL_MESSAGE("That shouldn't change size or positioning",
- const_cast<const tools::Rectangle &>(aOrigRect), rNewRect);
+ aOrigRect, rNewRect);
m_pDoc->ShowRows(0, 100, 0, false);
m_pDoc->SetDrawPageSize(0);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Hiding should not change the logic rectangle",
- const_cast<const tools::Rectangle &>(aOrigRect), rNewRect);
+ aOrigRect, rNewRect);
CPPUNIT_ASSERT_MESSAGE("Hiding should make invisible", !pObj->IsVisible());
m_pDoc->ShowRows(0, 100, 0, true);
m_pDoc->SetDrawPageSize(0);
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Should not change when cell anchored",
- const_cast<const tools::Rectangle &>(aOrigRect), rNewRect);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Should not change when cell anchored", aOrigRect, rNewRect);
CPPUNIT_ASSERT_MESSAGE("Show should make visible", pObj->IsVisible());
}
@@ -3286,11 +3280,11 @@ CPPUNIT_TEST_FIXTURE(Test, testGraphicsInGroup)
pPage->InsertObject(pObj.get());
const tools::Rectangle& rNewRect = pObj->GetLogicRect();
CPPUNIT_ASSERT_EQUAL_MESSAGE("Position and size of the circle shouldn't change when inserted into the page.",
- const_cast<const tools::Rectangle &>(aOrigRect), rNewRect);
+ aOrigRect, rNewRect);
ScDrawLayer::SetCellAnchoredFromPosition(*pObj, *m_pDoc, 0, false);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Size changed when cell anchored. Not good.",
- const_cast<const tools::Rectangle &>(aOrigRect), rNewRect);
+ aOrigRect, rNewRect);
// Insert 2 rows at the top. This should push the circle object down.
m_pDoc->InsertRow(0, 0, m_pDoc->MaxCol(), 0, 0, 2);
@@ -3304,7 +3298,7 @@ CPPUNIT_TEST_FIXTURE(Test, testGraphicsInGroup)
m_pDoc->DeleteRow(0, 0, m_pDoc->MaxCol(), 0, 0, 2);
m_pDoc->SetDrawPageSize(0);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Failed to move back to its original position.",
- const_cast<const tools::Rectangle &>(aOrigRect), rNewRect);
+ aOrigRect, rNewRect);
}
{
@@ -3318,19 +3312,18 @@ CPPUNIT_TEST_FIXTURE(Test, testGraphicsInGroup)
pObj->NbcSetLogicRect(aOrigRect);
pPage->InsertObject(pObj.get());
const tools::Rectangle& rNewRect = pObj->GetLogicRect();
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Size differ.",
- const_cast<const tools::Rectangle &>(aOrigRect), rNewRect);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Size differ.", aOrigRect, rNewRect);
ScDrawLayer::SetCellAnchoredFromPosition(*pObj, *m_pDoc, 0, false);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Size changed when cell-anchored. Not good.",
- const_cast<const tools::Rectangle &>(aOrigRect), rNewRect);
+ aOrigRect, rNewRect);
// Insert 2 rows at the top and delete them immediately.
m_pDoc->InsertRow(0, 0, m_pDoc->MaxCol(), 0, 0, 2);
m_pDoc->DeleteRow(0, 0, m_pDoc->MaxCol(), 0, 0, 2);
m_pDoc->SetDrawPageSize(0);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Size of a line object changed after row insertion and removal.",
- const_cast<const tools::Rectangle &>(aOrigRect), rNewRect);
+ aOrigRect, rNewRect);
sal_Int32 n = pObj->GetPointCount();
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be exactly 2 points in a line object.", static_cast<sal_Int32>(2), n);
@@ -3697,8 +3690,7 @@ CPPUNIT_TEST_FIXTURE(Test, testAutoFilterTimeValue)
SvNumberFormatter* pFormatter = m_pDoc->GetFormatTable();
sal_uInt32 nFormat = pFormatter->GetFormatIndex(NF_TIME_HH_MMSS, LANGUAGE_ENGLISH_US);
ScPatternAttr aNewAttrs(m_pDoc->getCellAttributeHelper());
- SfxItemSet& rSet = aNewAttrs.GetItemSet();
- rSet.Put(SfxUInt32Item(ATTR_VALUE_FORMAT, nFormat));
+ aNewAttrs.ItemSetPut(SfxUInt32Item(ATTR_VALUE_FORMAT, nFormat));
m_pDoc->ApplyPatternAreaTab(0, 1, 0, 2, 0, aNewAttrs); // apply it to A2:A3.
@@ -3850,8 +3842,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf76441)
pFormatter->PutEntry( aCode, nCheckPos, nType, nFormat );
ScPatternAttr aNewAttrs(m_pDoc->getCellAttributeHelper());
- SfxItemSet& rSet = aNewAttrs.GetItemSet();
- rSet.Put(SfxUInt32Item(ATTR_VALUE_FORMAT, nFormat));
+ aNewAttrs.ItemSetPut(SfxUInt32Item(ATTR_VALUE_FORMAT, nFormat));
{
// First insert the string, then the format
m_pDoc->SetString(ScAddress(0,0,0), u"01:20"_ustr);
@@ -3888,8 +3879,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf76836)
pFormatter->PutEntry( aCode, nCheckPos, nType, nFormat );
ScPatternAttr aNewAttrs(m_pDoc->getCellAttributeHelper());
- SfxItemSet& rSet = aNewAttrs.GetItemSet();
- rSet.Put(SfxUInt32Item(ATTR_VALUE_FORMAT, nFormat));
+ aNewAttrs.ItemSetPut(SfxUInt32Item(ATTR_VALUE_FORMAT, nFormat));
m_pDoc->ApplyPattern(0, 0, 0, aNewAttrs);
m_pDoc->SetValue(0,0,0, 10.0);
@@ -3935,8 +3925,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf142186)
pFormatter->PutEntry( aCode, nCheckPos, nType, nFormat );
ScPatternAttr aNewAttrs(m_pDoc->getCellAttributeHelper());
- SfxItemSet& rSet = aNewAttrs.GetItemSet();
- rSet.Put(SfxUInt32Item(ATTR_VALUE_FORMAT, nFormat));
+ aNewAttrs.ItemSetPut(SfxUInt32Item(ATTR_VALUE_FORMAT, nFormat));
{
// First insert the string, then the format
m_pDoc->SetString(ScAddress(0,0,0), u"123.45"_ustr);
@@ -3989,8 +3978,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf164124)
pFormatter->PutEntry( aCode, nCheckPos, nType, nFormat );
ScPatternAttr aNewAttrs(m_pDoc->getCellAttributeHelper());
- SfxItemSet& rSet = aNewAttrs.GetItemSet();
- rSet.Put(SfxUInt32Item(ATTR_VALUE_FORMAT, nFormat));
+ aNewAttrs.ItemSetPut(SfxUInt32Item(ATTR_VALUE_FORMAT, nFormat));
m_pDoc->ApplyPattern(0, 0, 0, aNewAttrs);
m_pDoc->SetString(ScAddress(0,0,0), u"2021-6/1"_ustr);
@@ -4015,8 +4003,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf126342)
pFormatter->PutEntry( aCode, nCheckPos, nType, nFormat );
ScPatternAttr aNewAttrs(m_pDoc->getCellAttributeHelper());
- SfxItemSet& rSet = aNewAttrs.GetItemSet();
- rSet.Put(SfxUInt32Item(ATTR_VALUE_FORMAT, nFormat));
+ aNewAttrs.ItemSetPut(SfxUInt32Item(ATTR_VALUE_FORMAT, nFormat));
m_pDoc->ApplyPattern(0, 0, 0, aNewAttrs);
m_pDoc->SetString(ScAddress(0,0,0), u"11/7/19"_ustr);
@@ -4148,8 +4135,7 @@ CPPUNIT_TEST_FIXTURE(Test, testDateFilterContains)
SvNumberFormatter* pFormatter = m_pDoc->GetFormatTable();
sal_uInt32 nFormat = pFormatter->GetFormatIndex(NF_DATE_DIN_YYMMDD, LANGUAGE_ENGLISH_US);
ScPatternAttr aNewAttrs(m_pDoc->getCellAttributeHelper());
- SfxItemSet& rSet = aNewAttrs.GetItemSet();
- rSet.Put(SfxUInt32Item(ATTR_VALUE_FORMAT, nFormat));
+ aNewAttrs.ItemSetPut(SfxUInt32Item(ATTR_VALUE_FORMAT, nFormat));
m_pDoc->ApplyPatternAreaTab(0, 1, 0, 5, 0, aNewAttrs); // apply it to A1:A6
ScDBData* pDBData = new ScDBData(u"NONAME"_ustr, 0, 0, 0, nCols, nRows);
@@ -6917,7 +6903,7 @@ CPPUNIT_TEST_FIXTURE(Test, testProtectedSheetEditByRow)
{
// Remove protected flags from rows 2-5.
ScPatternAttr aAttr(m_pDoc->getCellAttributeHelper());
- aAttr.GetItemSet().Put(ScProtectionAttr(false));
+ aAttr.ItemSetPut(ScProtectionAttr(false));
m_pDoc->ApplyPatternAreaTab(0, 1, m_pDoc->MaxCol(), 4, 0, aAttr);
// Protect the sheet without any options.
@@ -6993,7 +6979,7 @@ CPPUNIT_TEST_FIXTURE(Test, testProtectedSheetEditByColumn)
{
// Remove protected flags from columns B to E.
ScPatternAttr aAttr(m_pDoc->getCellAttributeHelper());
- aAttr.GetItemSet().Put(ScProtectionAttr(false));
+ aAttr.ItemSetPut(ScProtectionAttr(false));
m_pDoc->ApplyPatternAreaTab(1, 0, 4, m_pDoc->MaxRow(), 0, aAttr);
// Protect the sheet without any options.
@@ -7127,8 +7113,7 @@ CPPUNIT_TEST_FIXTURE(Test, testDocumentModelAccessor_getDocumentCurrencies)
CPPUNIT_ASSERT_EQUAL(SvNumFormatType::CURRENCY, eType);
ScPatternAttr aNewAttrs(m_pDoc->getCellAttributeHelper());
- SfxItemSet& rSet = aNewAttrs.GetItemSet();
- rSet.Put(SfxUInt32Item(ATTR_VALUE_FORMAT, nFormat));
+ aNewAttrs.ItemSetPut(SfxUInt32Item(ATTR_VALUE_FORMAT, nFormat));
m_pDoc->ApplyPattern(0, 0, 0, aNewAttrs); // A1.
CPPUNIT_ASSERT_EQUAL(u"2,00€"_ustr, m_pDoc->GetString(ScAddress(0, 0, 0)));
@@ -7157,8 +7142,7 @@ CPPUNIT_TEST_FIXTURE(Test, testDocumentModelAccessor_getDocumentCurrencies)
CPPUNIT_ASSERT_EQUAL(SvNumFormatType::CURRENCY, eType);
ScPatternAttr aNewAttrs(m_pDoc->getCellAttributeHelper());
- SfxItemSet& rSet = aNewAttrs.GetItemSet();
- rSet.Put(SfxUInt32Item(ATTR_VALUE_FORMAT, nFormat));
+ aNewAttrs.ItemSetPut(SfxUInt32Item(ATTR_VALUE_FORMAT, nFormat));
m_pDoc->ApplyPattern(1, 1, 0, aNewAttrs); // B2.
m_pDoc->ApplyPattern(2, 2, 0, aNewAttrs); // C3.
diff --git a/sc/qa/unit/ucalc_DocumentThemes.cxx b/sc/qa/unit/ucalc_DocumentThemes.cxx
index 83878d02186d..73f8bab6efca 100644
--- a/sc/qa/unit/ucalc_DocumentThemes.cxx
+++ b/sc/qa/unit/ucalc_DocumentThemes.cxx
@@ -58,13 +58,13 @@ CPPUNIT_TEST_FIXTURE(DocumentThemesTest, testChangeTheme)
model::ComplexColor aComplexColor;
aComplexColor.setThemeColor(eBackgroundThemeType);
Color aColor = pTheme->getColorSet()->resolveColor(aComplexColor);
- aNewPattern.GetItemSet().Put(SvxBrushItem(aColor, aComplexColor, ATTR_BACKGROUND));
+ aNewPattern.ItemSetPut(SvxBrushItem(aColor, aComplexColor, ATTR_BACKGROUND));
}
{
model::ComplexColor aComplexColor;
aComplexColor.setThemeColor(eCellTextThemeType);
Color aColor = pTheme->getColorSet()->resolveColor(aComplexColor);
- aNewPattern.GetItemSet().Put(SvxColorItem(aColor, aComplexColor, ATTR_FONT_COLOR));
+ aNewPattern.ItemSetPut(SvxColorItem(aColor, aComplexColor, ATTR_FONT_COLOR));
}
// Apply the pattern to cells C3:E5 (2,2 - 4,4) on the first sheet
diff --git a/sc/qa/unit/ucalc_condformat.cxx b/sc/qa/unit/ucalc_condformat.cxx
index e470fe8f5400..1dd7477729d6 100644
--- a/sc/qa/unit/ucalc_condformat.cxx
+++ b/sc/qa/unit/ucalc_condformat.cxx
@@ -201,8 +201,8 @@ CPPUNIT_TEST_FIXTURE(TestCondformat, testCondFormatInsertDeleteSheets)
// Make sure this conditional format entry is really there.
ScConditionalFormatList* pList = m_pDoc->GetCondFormList(0);
CPPUNIT_ASSERT(pList);
- const ScConditionalFormat* pCheck = pList->GetFormat(nKey);
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong conditional format instance.", pCheck, const_cast<const ScConditionalFormat*>(pFormatTmp));
+ ScConditionalFormat* pCheck = pList->GetFormat(nKey);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong conditional format instance.", pCheck, pFormatTmp);
// ... and its range is B2:B4.
ScRangeList aCheckRange = pCheck->GetRange();
diff --git a/sc/qa/unit/ucalc_copypaste.cxx b/sc/qa/unit/ucalc_copypaste.cxx
index 810d9a45a2af..499abdaf22bb 100644
--- a/sc/qa/unit/ucalc_copypaste.cxx
+++ b/sc/qa/unit/ucalc_copypaste.cxx
@@ -31,9 +31,6 @@
#include <memory>
-using ::std::cerr;
-using ::std::endl;
-
class TestCopyPaste : public ScUcalcTestBase
{
protected:
@@ -1615,7 +1612,7 @@ void TestCopyPaste::executeCopyPasteSpecial(const SCTAB srcSheet, const SCTAB de
// add patterns
ScPatternAttr aCellBlueColor(m_pDoc->getCellAttributeHelper());
- aCellBlueColor.GetItemSet().Put(SvxBrushItem(COL_BLUE, ATTR_BACKGROUND));
+ aCellBlueColor.ItemSetPut(SvxBrushItem(COL_BLUE, ATTR_BACKGROUND));
m_pDoc->ApplyPatternAreaTab(1, 2, 1, 4, srcSheet, aCellBlueColor);
// Check pattern precondition
@@ -1630,12 +1627,12 @@ void TestCopyPaste::executeCopyPasteSpecial(const SCTAB srcSheet, const SCTAB de
// row 2 on empty cell
ScPatternAttr aCellGreenColor(m_pDoc->getCellAttributeHelper());
- aCellGreenColor.GetItemSet().Put(SvxBrushItem(COL_GREEN, ATTR_BACKGROUND));
+ aCellGreenColor.ItemSetPut(SvxBrushItem(COL_GREEN, ATTR_BACKGROUND));
m_pDoc->ApplyPatternAreaTab(5, 4, 5, 4, srcSheet, aCellGreenColor);
// row 4 for multi range row selection
ScPatternAttr aCellRedColor(m_pDoc->getCellAttributeHelper());
- aCellRedColor.GetItemSet().Put(SvxBrushItem(COL_RED, ATTR_BACKGROUND));
+ aCellRedColor.ItemSetPut(SvxBrushItem(COL_RED, ATTR_BACKGROUND));
m_pDoc->ApplyPatternAreaTab(3, 6, 4, 6, srcSheet, aCellRedColor);
// add borders
@@ -9225,15 +9222,16 @@ CPPUNIT_TEST_FIXTURE(TestCopyPaste, testCopyPasteSkipEmpty)
{
if (!mpDoc->GetString(aPos).equalsAscii(p->mpStr))
{
- cerr << aPosStr << ": incorrect string value: expected='" << p->mpStr
- << "' actual='" << mpDoc->GetString(aPos) << endl;
+ std::cerr << aPosStr << ": incorrect string value: expected='" << p->mpStr
+ << "' actual='" << mpDoc->GetString(aPos) << std::endl;
return false;
}
const SvxBrushItem* pBrush = mpDoc->GetAttr(aPos, ATTR_BACKGROUND);
if (!pBrush)
{
- cerr << aPosStr << ": failed to get brush item from the cell." << endl;
+ std::cerr << aPosStr << ": failed to get brush item from the cell."
+ << std::endl;
return false;
}
@@ -9241,13 +9239,13 @@ CPPUNIT_TEST_FIXTURE(TestCopyPaste, testCopyPasteSkipEmpty)
{
Color aExpected = p->maColor;
Color aActual = pBrush->GetColor();
- cerr << aPosStr << ": incorrect cell background color: expected=("
- << static_cast<int>(aExpected.GetRed()) << ","
- << static_cast<int>(aExpected.GetGreen()) << ","
- << static_cast<int>(aExpected.GetBlue()) << "), actual=("
- << static_cast<int>(aActual.GetRed()) << ","
- << static_cast<int>(aActual.GetGreen()) << ","
- << static_cast<int>(aActual.GetBlue()) << ")" << endl;
+ std::cerr << aPosStr << ": incorrect cell background color: expected=("
+ << static_cast<int>(aExpected.GetRed()) << ","
+ << static_cast<int>(aExpected.GetGreen()) << ","
+ << static_cast<int>(aExpected.GetBlue()) << "), actual=("
+ << static_cast<int>(aActual.GetRed()) << ","
+ << static_cast<int>(aActual.GetGreen()) << ","
+ << static_cast<int>(aActual.GetBlue()) << ")" << std::endl;
return false;
}
@@ -9255,11 +9253,12 @@ CPPUNIT_TEST_FIXTURE(TestCopyPaste, testCopyPasteSkipEmpty)
bool bHasNote = mpDoc->HasNote(aPos);
if (bHasNote != p->mbHasNote)
{
- cerr << aPosStr << ": ";
+ std::cerr << aPosStr << ": ";
if (p->mbHasNote)
- cerr << "this cell should have a cell note, but doesn't." << endl;
+ std::cerr << "this cell should have a cell note, but doesn't." << std::endl;
else
- cerr << "this cell should NOT have a cell note, but one is found." << endl;
+ std::cerr << "this cell should NOT have a cell note, but one is found."
+ << std::endl;
return false;
}
@@ -9288,7 +9287,7 @@ CPPUNIT_TEST_FIXTURE(TestCopyPaste, testCopyPasteSkipEmpty)
// Set the background color of B1:B5 to blue.
ScPatternAttr aCellBackColor(m_pDoc->getCellAttributeHelper());
- aCellBackColor.GetItemSet().Put(SvxBrushItem(COL_BLUE, ATTR_BACKGROUND));
+ aCellBackColor.ItemSetPut(SvxBrushItem(COL_BLUE, ATTR_BACKGROUND));
m_pDoc->ApplyPatternAreaTab(1, 0, 1, 4, 0, aCellBackColor);
// Insert notes to B1:B5.
@@ -9308,7 +9307,7 @@ CPPUNIT_TEST_FIXTURE(TestCopyPaste, testCopyPasteSkipEmpty)
aClipDoc.SetString(ScAddress(0, 4, 0), u"Clip3"_ustr);
// Set the background color of A1:A5 to yellow.
- aCellBackColor.GetItemSet().Put(SvxBrushItem(COL_YELLOW, ATTR_BACKGROUND));
+ aCellBackColor.ItemSetPut(SvxBrushItem(COL_YELLOW, ATTR_BACKGROUND));
aClipDoc.ApplyPatternAreaTab(0, 0, 0, 4, 0, aCellBackColor);
CPPUNIT_ASSERT_EQUAL(CELLTYPE_STRING, aClipDoc.GetCellType(ScAddress(0, 0, 0)));
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 4dd944fb1774..fc521cd966b3 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -30,8 +30,6 @@
#include <vector>
using namespace formula;
-using ::std::cerr;
-using ::std::endl;
namespace {
void setExpandRefs(bool bExpand)
@@ -246,8 +244,8 @@ bool equals( const formula::VectorRefArray& rArray, size_t nPos, const OUString&
bool bEquals = OUString(rArray.mpStringArray[nPos]).equalsIgnoreAsciiCase(rVal);
if (!bEquals)
{
- cerr << "Expected: " << rVal.toAsciiUpperCase() << " (upcased)" << endl;
- cerr << "Actual: " << OUString(rArray.mpStringArray[nPos]) << " (upcased)" << endl;
+ std::cerr << "Expected: " << rVal.toAsciiUpperCase() << " (upcased)" << std::endl;
+ std::cerr << "Actual: " << OUString(rArray.mpStringArray[nPos]) << " (upcased)" << std::endl;
}
return bEquals;
}
@@ -885,7 +883,7 @@ CPPUNIT_TEST_FIXTURE(TestFormula, testFormulaTokenEquality)
{
std::ostringstream os;
os << "These two formulas should be evaluated equal: '"
- << aTests[i].mpFormula1 << "' vs '" << aTests[i].mpFormula2 << "'" << endl;
+ << aTests[i].mpFormula1 << "' vs '" << aTests[i].mpFormula2 << "'" << std::endl;
CPPUNIT_FAIL(os.str());
}
}
@@ -895,7 +893,7 @@ CPPUNIT_TEST_FIXTURE(TestFormula, testFormulaTokenEquality)
{
std::ostringstream os;
os << "These two formulas should be evaluated non-equal: '"
- << aTests[i].mpFormula1 << "' vs '" << aTests[i].mpFormula2 << "'" << endl;
+ << aTests[i].mpFormula1 << "' vs '" << aTests[i].mpFormula2 << "'" << std::endl;
CPPUNIT_FAIL(os.str());
}
}
@@ -4218,7 +4216,7 @@ CPPUNIT_TEST_FIXTURE(TestFormula, testFormulaRefUpdateValidity)
if (rList.size() != nCheckSize)
{
- cerr << "List size is not what is expected." << endl;
+ std::cerr << "List size is not what is expected." << std::endl;
return false;
}
@@ -4228,8 +4226,8 @@ CPPUNIT_TEST_FIXTURE(TestFormula, testFormulaRefUpdateValidity)
{
if (aExpected[i] != rList[i].GetValue())
{
- cerr << "Incorrect value at position " << i
- << ": expected=" << aExpected[i] << ", actual=" << rList[i].GetValue() << endl;
+ std::cerr << "Incorrect value at position " << i
+ << ": expected=" << aExpected[i] << ", actual=" << rList[i].GetValue() << std::endl;
return false;
}
}
@@ -4258,7 +4256,7 @@ CPPUNIT_TEST_FIXTURE(TestFormula, testFormulaRefUpdateValidity)
SfxUInt32Item aItem(ATTR_VALIDDATA, nIndex);
ScPatternAttr aNewAttrs(m_pDoc->getCellAttributeHelper());
- aNewAttrs.GetItemSet().Put(aItem);
+ aNewAttrs.ItemSetPut(aItem);
m_pDoc->ApplyPattern(0, 1, 0, aNewAttrs);
@@ -4970,7 +4968,7 @@ CPPUNIT_TEST_FIXTURE(TestFormula, testFuncN)
bool bGood = result == checks1[i];
if (!bGood)
{
- cerr << "row " << (i+1) << ": expected=" << checks1[i] << " actual=" << result << endl;
+ std::cerr << "row " << (i+1) << ": expected=" << checks1[i] << " actual=" << result << std::endl;
CPPUNIT_ASSERT_MESSAGE("Unexpected result for N", false);
}
}
@@ -4983,7 +4981,7 @@ CPPUNIT_TEST_FIXTURE(TestFormula, testFuncN)
bool bGood = result == checks2[i];
if (!bGood)
{
- cerr << "row " << (i+2+1) << ": expected=" << checks2[i] << " actual=" << result << endl;
+ std::cerr << "row " << (i+2+1) << ": expected=" << checks2[i] << " actual=" << result << std::endl;
CPPUNIT_ASSERT_MESSAGE("Unexpected result for N", false);
}
}
@@ -5053,8 +5051,8 @@ CPPUNIT_TEST_FIXTURE(TestFormula, testFuncCOUNTIF)
bool bGood = result == aChecks[i].fResult;
if (!bGood)
{
- cerr << "row " << (nRow+1) << ": formula" << aChecks[i].pFormula
- << " expected=" << aChecks[i].fResult << " actual=" << result << endl;
+ std::cerr << "row " << (nRow+1) << ": formula" << aChecks[i].pFormula
+ << " expected=" << aChecks[i].fResult << " actual=" << result << std::endl;
CPPUNIT_ASSERT_MESSAGE("Unexpected result for COUNTIF", false);
}
}
@@ -5109,6 +5107,41 @@ CPPUNIT_TEST_FIXTURE(TestFormula, testFuncCOUNTIF)
m_pDoc->DeleteTab(0);
}
+CPPUNIT_TEST_FIXTURE(TestFormula, testInsertRowColLabel)
+{
+ CPPUNIT_ASSERT_MESSAGE ("failed to insert sheet",
+ m_pDoc->InsertTab (0, u"foo"_ustr));
+
+ // Clear the area first.
+ clearRange(m_pDoc, ScRange(0, 0, 0, 1, 20, 0));
+
+ m_pDoc->SetString(0, 2, 0, u"COL1"_ustr);
+ m_pDoc->SetValue(0, 3, 0, 2);
+ m_pDoc->SetValue(0, 4, 0, 3);
+ m_pDoc->SetString(0, 0, 0, u"=AVERAGE('COL1')"_ustr);
+
+ // Calculate and check the results.
+ m_pDoc->CalcAll();
+
+ double result = m_pDoc->GetValue(0, 0, 0);
+
+ ASSERT_DOUBLES_EQUAL(2.5, result);
+
+ m_pDoc->InsertRow(0, 0, m_pDoc->MaxCol(), 0, 3, 2);
+
+ m_pDoc->SetValue(0, 3, 0, 5);
+ m_pDoc->SetValue(0, 4, 0, 6);
+
+ // Calculate and check the results.
+ m_pDoc->CalcAll();
+
+ result = m_pDoc->GetValue(0, 0, 0);
+
+ ASSERT_DOUBLES_EQUAL(4.0, result);
+
+ m_pDoc->DeleteTab(0);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/qa/unit/ucalc_formula2.cxx b/sc/qa/unit/ucalc_formula2.cxx
index 0416e6c25845..5ab27fab9e8e 100644
--- a/sc/qa/unit/ucalc_formula2.cxx
+++ b/sc/qa/unit/ucalc_formula2.cxx
@@ -31,9 +31,6 @@
#include <vector>
using namespace formula;
-using ::std::vector;
-using ::std::cerr;
-using ::std::endl;
namespace
{
@@ -41,12 +38,12 @@ ScRange getCachedRange(const ScExternalRefCache::TableTypeRef& pCacheTab)
{
ScRange aRange;
- vector<SCROW> aRows;
+ std::vector<SCROW> aRows;
pCacheTab->getAllRows(aRows);
bool bFirst = true;
for (const SCROW nRow : aRows)
{
- vector<SCCOL> aCols;
+ std::vector<SCCOL> aCols;
pCacheTab->getAllCols(nRow, aCols);
for (const SCCOL nCol : aCols)
{
@@ -643,8 +640,9 @@ CPPUNIT_TEST_FIXTURE(TestFormula2, testFuncVLOOKUP)
bool bGood = aRes.equalsAscii(aChecks[i].pRes);
if (!bGood)
{
- cerr << "row " << (i + 1) << ": lookup value='" << aChecks[i].pLookup << "' expected='"
- << aChecks[i].pRes << "' actual='" << aRes << "'" << endl;
+ std::cerr << "row " << (i + 1) << ": lookup value='" << aChecks[i].pLookup
+ << "' expected='" << aChecks[i].pRes << "' actual='" << aRes << "'"
+ << std::endl;
CPPUNIT_ASSERT_MESSAGE("Unexpected result for VLOOKUP", false);
}
}
@@ -750,10 +748,11 @@ void TestFormula2::runTestMATCH(ScDocument* pDoc, const char* aData[DataSize],
OUString aStr = pDoc->GetString(2, i, 0);
if (!aStr.equalsAscii(aChecks[i].pRes))
{
- cerr << "row " << (i + 1) << ": expected='" << aChecks[i].pRes << "' actual='" << aStr
- << "'"
- " criterion='"
- << aChecks[i].pVal << "'" << endl;
+ std::cerr << "row " << (i + 1) << ": expected='" << aChecks[i].pRes << "' actual='"
+ << aStr
+ << "'"
+ " criterion='"
+ << aChecks[i].pVal << "'" << std::endl;
CPPUNIT_ASSERT_MESSAGE("Unexpected result for MATCH", false);
}
}
@@ -787,11 +786,11 @@ void TestFormula2::runTestHorizontalMATCH(ScDocument* pDoc, const char* aData[Da
OUString aStr = pDoc->GetString(i, 2, 0);
if (!aStr.equalsAscii(aChecks[i].pRes))
{
- cerr << "column " << char('A' + i) << ": expected='" << aChecks[i].pRes << "' actual='"
- << aStr
- << "'"
- " criterion='"
- << aChecks[i].pVal << "'" << endl;
+ std::cerr << "column " << char('A' + i) << ": expected='" << aChecks[i].pRes
+ << "' actual='" << aStr
+ << "'"
+ " criterion='"
+ << aChecks[i].pVal << "'" << std::endl;
CPPUNIT_ASSERT_MESSAGE("Unexpected result for horizontal MATCH", false);
}
}
@@ -1608,7 +1607,7 @@ CPPUNIT_TEST_FIXTURE(TestFormula2, testExternalRef)
// that the first 3 are what we expect.
ScExternalRefManager* pRefMgr = m_pDoc->GetExternalRefManager();
sal_uInt16 nFileId = pRefMgr->getExternalFileId(aExtDocName);
- vector<OUString> aTabNames;
+ std::vector<OUString> aTabNames;
pRefMgr->getAllCachedTableNames(nFileId, aTabNames);
CPPUNIT_ASSERT_MESSAGE("There should be at least 3 sheets.", aTabNames.size() >= 3);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Unexpected sheet name.", aTabNames[0], aExtSh1Name);
diff --git a/sc/qa/unit/ucalc_sharedformula.cxx b/sc/qa/unit/ucalc_sharedformula.cxx
index 9c6da4e28398..37ea7d8ecb2c 100644
--- a/sc/qa/unit/ucalc_sharedformula.cxx
+++ b/sc/qa/unit/ucalc_sharedformula.cxx
@@ -26,9 +26,6 @@
#include <memory>
#include <string_view>
-using ::std::cerr;
-using ::std::endl;
-
class TestSharedFormula : public ScUcalcTestBase
{
};
@@ -873,7 +870,7 @@ CPPUNIT_TEST_FIXTURE(TestSharedFormula, testSharedFormulasInsertRow)
ScFormulaCell* pFC = pDoc->GetFormulaCell(ScAddress(1,0,0));
if (!pFC || pFC->GetSharedTopRow() != 0 || pFC->GetSharedLength() != 2)
{
- cerr << "B1:B2 should be grouped." << endl;
+ std::cerr << "B1:B2 should be grouped." << std::endl;
return false;
}
@@ -881,7 +878,7 @@ CPPUNIT_TEST_FIXTURE(TestSharedFormula, testSharedFormulasInsertRow)
pFC = pDoc->GetFormulaCell(ScAddress(1,3,0));
if (!pFC || pFC->GetSharedTopRow() != 3 || pFC->GetSharedLength() != 2)
{
- cerr << "B4:B5 should be grouped." << endl;
+ std::cerr << "B4:B5 should be grouped." << std::endl;
return false;
}
@@ -899,7 +896,7 @@ CPPUNIT_TEST_FIXTURE(TestSharedFormula, testSharedFormulasInsertRow)
// Ensure that B5 is empty.
if (pDoc->GetCellType(ScAddress(1,4,0)) != CELLTYPE_NONE)
{
- cerr << "B5 should be empty." << endl;
+ std::cerr << "B5 should be empty." << std::endl;
return false;
}
@@ -907,7 +904,7 @@ CPPUNIT_TEST_FIXTURE(TestSharedFormula, testSharedFormulasInsertRow)
ScFormulaCell* pFC = pDoc->GetFormulaCell(ScAddress(1,0,0));
if (!pFC || pFC->GetSharedTopRow() != 0 || pFC->GetSharedLength() != 4)
{
- cerr << "B1:B4 should be grouped." << endl;
+ std::cerr << "B1:B4 should be grouped." << std::endl;
return false;
}
diff --git a/sc/qa/unit/ucalc_sort.cxx b/sc/qa/unit/ucalc_sort.cxx
index 6853794b0ec6..0c24b4b8063b 100644
--- a/sc/qa/unit/ucalc_sort.cxx
+++ b/sc/qa/unit/ucalc_sort.cxx
@@ -31,9 +31,6 @@
#include <svx/svdpage.hxx>
#include <rtl/math.hxx>
-using ::std::cerr;
-using ::std::endl;
-
class TestSort : public ScUcalcTestBase
{
protected:
@@ -546,14 +543,14 @@ CPPUNIT_TEST_FIXTURE(TestSort, testSortWithCellFormats)
{
if (!pPat)
{
- cerr << "Pattern is NULL!" << endl;
+ std::cerr << "Pattern is NULL!" << std::endl;
return false;
}
const SfxPoolItem* pItem = nullptr;
if (!pPat->GetItemSet().HasItem(ATTR_FONT_WEIGHT, &pItem))
{
- cerr << "Pattern does not have a font weight item, but it should." << endl;
+ std::cerr << "Pattern does not have a font weight item, but it should." << std::endl;
return false;
}
@@ -561,7 +558,7 @@ CPPUNIT_TEST_FIXTURE(TestSort, testSortWithCellFormats)
if (pItem->StaticWhichCast(ATTR_FONT_WEIGHT).GetWeight() != WEIGHT_BOLD)
{
- cerr << "Font weight should be bold." << endl;
+ std::cerr << "Font weight should be bold." << std::endl;
return false;
}
@@ -572,14 +569,14 @@ CPPUNIT_TEST_FIXTURE(TestSort, testSortWithCellFormats)
{
if (!pPat)
{
- cerr << "Pattern is NULL!" << endl;
+ std::cerr << "Pattern is NULL!" << std::endl;
return false;
}
const SfxPoolItem* pItem = nullptr;
if (!pPat->GetItemSet().HasItem(ATTR_FONT_POSTURE, &pItem))
{
- cerr << "Pattern does not have a font posture item, but it should." << endl;
+ std::cerr << "Pattern does not have a font posture item, but it should." << std::endl;
return false;
}
@@ -587,7 +584,7 @@ CPPUNIT_TEST_FIXTURE(TestSort, testSortWithCellFormats)
if (pItem->StaticWhichCast(ATTR_FONT_POSTURE).GetPosture() != ITALIC_NORMAL)
{
- cerr << "Italic should be applied.." << endl;
+ std::cerr << "Italic should be applied.." << std::endl;
return false;
}
@@ -598,7 +595,7 @@ CPPUNIT_TEST_FIXTURE(TestSort, testSortWithCellFormats)
{
if (!pPat)
{
- cerr << "Pattern is NULL!" << endl;
+ std::cerr << "Pattern is NULL!" << std::endl;
return false;
}
@@ -608,7 +605,7 @@ CPPUNIT_TEST_FIXTURE(TestSort, testSortWithCellFormats)
// Check if the font weight is applied.
if (pItem->StaticWhichCast(ATTR_FONT_WEIGHT).GetWeight() == WEIGHT_BOLD)
{
- cerr << "This cell is bold, but shouldn't." << endl;
+ std::cerr << "This cell is bold, but shouldn't." << std::endl;
return false;
}
}
@@ -618,7 +615,7 @@ CPPUNIT_TEST_FIXTURE(TestSort, testSortWithCellFormats)
// Check if the italics is applied.
if (pItem->StaticWhichCast(ATTR_FONT_POSTURE).GetPosture() == ITALIC_NORMAL)
{
- cerr << "This cell is italic, but shouldn't." << endl;
+ std::cerr << "This cell is italic, but shouldn't." << std::endl;
return false;
}
}
@@ -641,8 +638,7 @@ CPPUNIT_TEST_FIXTURE(TestSort, testSortWithCellFormats)
CPPUNIT_ASSERT(pPat);
{
ScPatternAttr aNewPat(*pPat);
- SfxItemSet& rSet = aNewPat.GetItemSet();
- rSet.Put(SvxWeightItem(WEIGHT_BOLD, ATTR_FONT_WEIGHT));
+ aNewPat.ItemSetPut(SvxWeightItem(WEIGHT_BOLD, ATTR_FONT_WEIGHT));
m_pDoc->ApplyPattern(0, 2, 0, aNewPat);
// Make sure it's really in.
@@ -654,8 +650,7 @@ CPPUNIT_TEST_FIXTURE(TestSort, testSortWithCellFormats)
CPPUNIT_ASSERT(pPat);
{
ScPatternAttr aNewPat(*pPat);
- SfxItemSet& rSet = aNewPat.GetItemSet();
- rSet.Put(SvxPostureItem(ITALIC_NORMAL, ATTR_FONT_POSTURE));
+ aNewPat.ItemSetPut(SvxPostureItem(ITALIC_NORMAL, ATTR_FONT_POSTURE));
m_pDoc->ApplyPattern(0, 3, 0, aNewPat);
bool bGood = aCheck.isItalic(m_pDoc->GetPattern(ScAddress(0,3,0)));
diff --git a/sc/qa/unit/uicalc/data/tdf140027.ods b/sc/qa/unit/uicalc/data/tdf140027.ods
new file mode 100644
index 000000000000..35cc3089dbfa
--- /dev/null
+++ b/sc/qa/unit/uicalc/data/tdf140027.ods
Binary files differ
diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index 0ecc7df641ed..b378a61121c5 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -2334,6 +2334,32 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf166767)
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), xPage->getCount());
}
+CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf167901)
+{
+ createScDoc();
+
+ ScDocument* pDoc = getScDoc();
+
+ insertNewSheet(*pDoc);
+
+ insertStringToCell(u"A1"_ustr, u"Test");
+
+ goToCell(u"A1"_ustr);
+
+ dispatchCommand(mxComponent, u".uno:Copy"_ustr, {});
+
+ uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence(
+ { { "SelectedFormat", uno::Any(static_cast<sal_uInt32>(SotClipboardFormatId::BITMAP)) } });
+
+ // Without the fix in place, this test would have crashed
+ dispatchCommand(mxComponent, u".uno:ClipboardFormatItems"_ustr, aPropertyValues);
+
+ ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(mxComponent);
+ uno::Reference<drawing::XDrawPage> xPage(pModelObj->getDrawPages()->getByIndex(1),
+ uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), xPage->getCount());
+}
+
CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf159174)
{
createScDoc();
diff --git a/sc/qa/unit/uicalc/uicalc2.cxx b/sc/qa/unit/uicalc/uicalc2.cxx
index 253fb35c4b9d..d228ee82717a 100644
--- a/sc/qa/unit/uicalc/uicalc2.cxx
+++ b/sc/qa/unit/uicalc/uicalc2.cxx
@@ -1654,6 +1654,30 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest2, testTdf154044)
}
}
+CPPUNIT_TEST_FIXTURE(ScUiCalcTest2, testTdf140027)
+{
+ // testing the correct import of autofilter from XLSB
+ createScDoc("tdf140027.ods");
+
+ goToCell(u"A1"_ustr);
+
+ ScDocShell* pDocSh = getScDocShell();
+ lcl_AssertCurrentCursorPosition(*pDocSh, u"A1");
+
+ dispatchCommand(mxComponent, u".uno:SelectRow"_ustr, {});
+ dispatchCommand(mxComponent, u".uno:InsertRowsBefore"_ustr, {});
+
+ // check we have no any unnecessary flags
+ ScDocument* pDoc = getScDoc();
+ auto nFlag = pDoc->GetAttr(0, 0, 1, ATTR_MERGE_FLAG)->GetValue();
+ CPPUNIT_ASSERT_EQUAL(ScMF::NONE, nFlag);
+
+ const ScPatternAttr* pPattern = pDoc->GetPattern(1, 0, 1);
+ const ScPatternAttr aDefPattern = pPattern->getCellAttributeHelper().getDefaultCellAttribute();
+ // check that the default pattern is not changed
+ CPPUNIT_ASSERT(ScPatternAttr::areSame(pPattern, &aDefPattern));
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/sdi/docsh.sdi b/sc/sdi/docsh.sdi
index 2d9a50ccb8ae..38799c3761da 100644
--- a/sc/sdi/docsh.sdi
+++ b/sc/sdi/docsh.sdi
@@ -83,6 +83,8 @@ interface TableDocument
SID_REFRESH_VIEW [ ExecMethod = Execute; StateMethod = GetState; ]
SID_PROTECTPOS [ ExecMethod = Execute; StateMethod = GetState; ]
SID_PROTECTSIZE [ ExecMethod = Execute; StateMethod = GetState; ];
+
+ SID_ATTR_PAGE_ORIENTATION [ ExecMethod = Execute; StateMethod = GetState; ]
}
diff --git a/sc/sdi/drawsh.sdi b/sc/sdi/drawsh.sdi
index cf840a07be43..35e8093ba3b7 100644
--- a/sc/sdi/drawsh.sdi
+++ b/sc/sdi/drawsh.sdi
@@ -90,6 +90,7 @@ interface TableDraw
SID_ATTRIBUTES_AREA [ ExecMethod = ExecDrawAttr; StateMethod = GetAttrFuncState; ]
SID_ATTRIBUTES_LINE [ ExecMethod = ExecDrawAttr; StateMethod = GetAttrFuncState; ]
SID_MEASURE_DLG [ ExecMethod = ExecDrawAttr; StateMethod = GetAttrFuncState; ]
+ SID_CONNECTION_DLG [ ExecMethod = ExecDrawAttr; StateMethod = GetAttrFuncState; ]
SID_ATTR_TRANSFORM [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; ]
// For the sidebar
@@ -212,6 +213,7 @@ interface TableDraw
SID_FONTWORK_KERN_CHARACTER_PAIRS [ ExecMethod = ExecDrawFunc ; StateMethod = GetDrawFuncState ; ]
SID_FONTWORK_CHARACTER_SPACING_DIALOG [ ExecMethod = ExecDrawFunc ; StateMethod = GetDrawFuncState ; ]
+ SID_INSERT_HYPERLINK [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; ]
SID_EDIT_HYPERLINK [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; ]
SID_REMOVE_HYPERLINK [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; ]
SID_OPEN_HYPERLINK [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; ]
diff --git a/sc/sdi/drtxtob.sdi b/sc/sdi/drtxtob.sdi
index a4df9af69108..5302b5bf1b63 100644
--- a/sc/sdi/drtxtob.sdi
+++ b/sc/sdi/drtxtob.sdi
@@ -116,6 +116,7 @@ interface TableDrawText
SID_HYPERLINK_SETLINK [ ExecMethod = Execute; ]
SID_HYPERLINK_GETLINK [ StateMethod = GetState; ]
SID_OPEN_HYPERLINK [ ExecMethod = Execute; StateMethod = GetState; ]
+ SID_INSERT_HYPERLINK [ ExecMethod = Execute; StateMethod = GetState; ]
SID_EDIT_HYPERLINK [ ExecMethod = Execute; StateMethod = GetState; ]
SID_COPY_HYPERLINK_LOCATION [ ExecMethod = Execute; StateMethod = GetState; ]
SID_REMOVE_HYPERLINK [ ExecMethod = Execute; StateMethod = GetState; ]
diff --git a/sc/sdi/editsh.sdi b/sc/sdi/editsh.sdi
index 5dd18e81f3a4..aee93910dce5 100644
--- a/sc/sdi/editsh.sdi
+++ b/sc/sdi/editsh.sdi
@@ -74,6 +74,7 @@ interface TableText
SID_HYPERLINK_SETLINK [ ExecMethod = Execute; ]
SID_HYPERLINK_GETLINK [ StateMethod = GetState; ]
+ SID_INSERT_HYPERLINK [ ExecMethod = Execute; StateMethod = GetState; ]
SID_EDIT_HYPERLINK [ ExecMethod = Execute; StateMethod = GetState; ]
SID_COPY_HYPERLINK_LOCATION [ ExecMethod = Execute; StateMethod = GetState; ]
SID_REMOVE_HYPERLINK [ ExecMethod = Execute; StateMethod = GetState; ]
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index e93e78e125e2..76678e70d94a 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -3217,7 +3217,7 @@ SfxVoidItem InsertFile FID_INSERT_FILE
SfxVoidItem InsertFunction SID_INS_FUNCTION
-()
+(SfxStringItem FunctionName FN_PARAM_1,SfxInt16Item FunctionCategory FN_PARAM_2,SfxStringItem FunctionId FN_PARAM_3)
[
AutoUpdate = FALSE,
FastCall = FALSE,
diff --git a/sc/sdi/tabvwsh.sdi b/sc/sdi/tabvwsh.sdi
index af9f3458b0d1..6caab24fd665 100644
--- a/sc/sdi/tabvwsh.sdi
+++ b/sc/sdi/tabvwsh.sdi
@@ -125,6 +125,36 @@ interface BaseSelection
SID_DRAWTBX_CS_STAR [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
SID_DRAW_CS_ID [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_DRAWTBX_CONNECTORS [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_TOOL_CONNECTOR [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_CONNECTOR_ARROW_START [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_CONNECTOR_ARROW_END [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_CONNECTOR_ARROWS [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_CONNECTOR_CIRCLE_START [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_CONNECTOR_CIRCLE_END [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_CONNECTOR_CIRCLES [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_CONNECTOR_LINE [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_CONNECTOR_LINE_ARROW_START [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_CONNECTOR_LINE_ARROW_END [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_CONNECTOR_LINE_ARROWS [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_CONNECTOR_LINE_CIRCLE_START [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_CONNECTOR_LINE_CIRCLE_END [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_CONNECTOR_LINE_CIRCLES [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_CONNECTOR_CURVE [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_CONNECTOR_CURVE_ARROW_START [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_CONNECTOR_CURVE_ARROW_END [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_CONNECTOR_CURVE_ARROWS [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_CONNECTOR_CURVE_CIRCLE_START [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_CONNECTOR_CURVE_CIRCLE_END [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_CONNECTOR_CURVE_CIRCLES [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_CONNECTOR_LINES [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_CONNECTOR_LINES_ARROW_START [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_CONNECTOR_LINES_ARROW_END [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_CONNECTOR_LINES_ARROWS [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_CONNECTOR_LINES_CIRCLE_START [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_CONNECTOR_LINES_CIRCLE_END [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_CONNECTOR_LINES_CIRCLES [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+
SID_FM_CREATE_CONTROL [ ExecMethod = ExecDraw ; ]
SID_LINKS [ ExecMethod = ExecDrawIns; StateMethod = GetDrawInsState; ]
SID_DRAW_CHART [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
diff --git a/sc/source/core/data/PivotTableFormatOutput.cxx b/sc/source/core/data/PivotTableFormatOutput.cxx
index c9073d6be07b..2eef2b311e62 100644
--- a/sc/source/core/data/PivotTableFormatOutput.cxx
+++ b/sc/source/core/data/PivotTableFormatOutput.cxx
@@ -207,7 +207,7 @@ void FormatOutput::prepare(SCTAB nTab, std::vector<ScDPOutLevelData> const& rCol
rFormat, aNameResolver);
}
- maFormatOutputEntries.push_back(aEntry);
+ maFormatOutputEntries.push_back(std::move(aEntry));
}
}
}
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 852db370cf54..0fbccbda8f21 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -309,21 +309,21 @@ void ScAttrArray::AddCondFormat( SCROW nStartRow, SCROW nEndRow, sal_uInt32 nInd
aNewCondFormatData.insert(nIndex);
ScCondFormatItem aItem( std::move(aNewCondFormatData) );
pNewPattern.reset( new ScPatternAttr(*pPattern) );
- pNewPattern->GetItemSet().Put( aItem );
+ pNewPattern->ItemSetPut(aItem);
}
}
else
{
ScCondFormatItem aItem(nIndex);
pNewPattern.reset( new ScPatternAttr(*pPattern) );
- pNewPattern->GetItemSet().Put( aItem );
+ pNewPattern->ItemSetPut(aItem);
}
}
else
{
pNewPattern.reset( new ScPatternAttr( rDocument.getCellAttributeHelper() ) );
ScCondFormatItem aItem(nIndex);
- pNewPattern->GetItemSet().Put( aItem );
+ pNewPattern->ItemSetPut(aItem);
nTempEndRow = nEndRow;
}
@@ -366,7 +366,7 @@ void ScAttrArray::RemoveCondFormat( SCROW nStartRow, SCROW nEndRow, sal_uInt32 n
{
ScCondFormatItem aItem;
ScPatternAttr* pTemp(new ScPatternAttr(*pPattern));
- pTemp->GetItemSet().Put( aItem );
+ pTemp->ItemSetPut(aItem);
SetPatternArea( nTempStartRow, nTempEndRow, CellAttributeHolder(pTemp, true) );
}
else
@@ -379,7 +379,7 @@ void ScAttrArray::RemoveCondFormat( SCROW nStartRow, SCROW nEndRow, sal_uInt32 n
aNewCondFormatData.erase_at(std::distance(rCondFormatData.begin(), itr));
ScCondFormatItem aItem( std::move(aNewCondFormatData) );
ScPatternAttr* pTemp(new ScPatternAttr(*pPattern));
- pTemp->GetItemSet().Put( aItem );
+ pTemp->ItemSetPut(aItem);
SetPatternArea( nTempStartRow, nTempEndRow, CellAttributeHolder(pTemp, true) );
}
}
@@ -736,7 +736,6 @@ void ScAttrArray::ApplyLineStyleArea( SCROW nStartRow, SCROW nEndRow,
if ( pBoxItem || pTLBRItem || pBLTRItem )
{
std::unique_ptr<ScPatternAttr> pNewPattern(new ScPatternAttr(*pOldPattern));
- SfxItemSet& rNewSet = pNewPattern->GetItemSet();
SCROW nY1 = nStart;
SCROW nY2 = mvData[nPos].nEndRow;
@@ -792,9 +791,9 @@ void ScAttrArray::ApplyLineStyleArea( SCROW nStartRow, SCROW nEndRow,
SetLine( pNewBLTRItem->GetLine(), pLine );
}
}
- if( pNewBoxItem ) rNewSet.Put( std::move(pNewBoxItem) );
- if( pNewTLBRItem ) rNewSet.Put( std::move(pNewTLBRItem) );
- if( pNewBLTRItem ) rNewSet.Put( std::move(pNewBLTRItem) );
+ if (pNewBoxItem) pNewPattern->ItemSetPut(std::move(pNewBoxItem));
+ if (pNewTLBRItem) pNewPattern->ItemSetPut(std::move(pNewTLBRItem));
+ if (pNewBLTRItem) pNewPattern->ItemSetPut(std::move(pNewBLTRItem));
nStart = mvData[nPos].nEndRow + 1;
@@ -1536,8 +1535,7 @@ void ScAttrArray::RemoveAreaMerge(SCROW nStartRow, SCROW nEndRow)
rDocument.ApplyAttr( nThisCol, nThisRow, nTab, *pAttr );
ScPatternAttr aNewPattern( rDocument.getCellAttributeHelper() );
- SfxItemSet* pSet = &aNewPattern.GetItemSet();
- pSet->Put( *pFlagAttr );
+ aNewPattern.ItemSetPut(*pFlagAttr);
rDocument.ApplyPatternAreaTab( nThisCol, nThisStart, nMergeEndCol, nMergeEndRow,
nTab, aNewPattern );
@@ -1580,7 +1578,7 @@ void ScAttrArray::SetPatternAreaSafe(SCROW nStartRow, SCROW nEndRow, const CellA
// Instead, the document's getCellAttributeHelper().getDefaultCellAttribute() is copied. Since it is passed as
// pWantedPattern, no special treatment of default is needed here anymore.
ScPatternAttr* pNewPattern(new ScPatternAttr(*rWantedPattern.getScPatternAttr()));
- pNewPattern->GetItemSet().Put( *pItem );
+ pNewPattern->ItemSetPut(*pItem);
SetPatternArea( nThisRow, nAttrRow, CellAttributeHolder(pNewPattern, true) );
}
else
@@ -1620,7 +1618,7 @@ bool ScAttrArray::ApplyFlags( SCROW nStartRow, SCROW nEndRow, ScMF nFlags )
nRow = mvData[nIndex].nEndRow;
SCROW nAttrRow = std::min( nRow, nEndRow );
ScPatternAttr* pNewPattern(new ScPatternAttr(*pOldPattern));
- pNewPattern->GetItemSet().Put( ScMergeFlagAttr( nOldValue | nFlags ) );
+ pNewPattern->ItemSetPut(ScMergeFlagAttr(nOldValue | nFlags));
SetPatternArea( nThisRow, nAttrRow, CellAttributeHolder(pNewPattern, true) );
Search( nThisRow, nIndex ); // data changed
bChanged = true;
@@ -1657,7 +1655,7 @@ bool ScAttrArray::RemoveFlags( SCROW nStartRow, SCROW nEndRow, ScMF nFlags )
nRow = mvData[nIndex].nEndRow;
SCROW nAttrRow = std::min( nRow, nEndRow );
ScPatternAttr* pNewPattern(new ScPatternAttr(*pOldPattern));
- pNewPattern->GetItemSet().Put( ScMergeFlagAttr( nOldValue & ~nFlags ) );
+ pNewPattern->ItemSetPut(ScMergeFlagAttr(nOldValue & ~nFlags));
SetPatternArea( nThisRow, nAttrRow, CellAttributeHolder(pNewPattern, true) );
Search( nThisRow, nIndex ); // data changed
bChanged = true;
@@ -1747,9 +1745,9 @@ void ScAttrArray::ChangeIndent( SCROW nStartRow, SCROW nEndRow, bool bIncrement
SCROW nThisEnd = mvData[nIndex].nEndRow;
SCROW nAttrRow = std::min( nThisEnd, nEndRow );
ScPatternAttr* pNewPattern(new ScPatternAttr(*pOldPattern));
- pNewPattern->GetItemSet().Put( ScIndentItem( nNewValue ) );
+ pNewPattern->ItemSetPut(ScIndentItem(nNewValue));
if ( bNeedJust )
- pNewPattern->GetItemSet().Put(
+ pNewPattern->ItemSetPut(
SvxHorJustifyItem( SvxCellHorJustify::Left, ATTR_HOR_JUSTIFY ) );
SetPatternArea( nThisStart, nAttrRow, CellAttributeHolder(pNewPattern, true) );
@@ -2255,7 +2253,13 @@ void ScAttrArray::InsertRow( SCROW nStartRow, SCSIZE nSize )
// Don't duplicate the merge flags in the inserted row.
// #i108488# ScMF::Scenario has to be allowed.
- RemoveFlags( nStartRow, nStartRow+nSize-1, ScMF::Hor | ScMF::Ver | ScMF::Auto | ScMF::Button );
+ RemoveFlags(nStartRow, nStartRow + nSize - 1, (ScMF::All & ~ScMF::Scenario));
+ // tdf#140027: set new default attributes if we insert very first rows.
+ if (nStartRow == 0)
+ {
+ const CellAttributeHolder aDefHolder(&rDocument.getCellAttributeHelper().getDefaultCellAttribute());
+ SetPatternArea(nStartRow, nStartRow + nSize - 1, aDefHolder);
+ }
}
void ScAttrArray::DeleteRow( SCROW nStartRow, SCSIZE nSize )
@@ -2349,10 +2353,9 @@ void ScAttrArray::DeleteHardAttr(SCROW nStartRow, SCROW nEndRow)
SCROW nAttrRow = std::min( nRow, nEndRow );
ScPatternAttr* pNewPattern(new ScPatternAttr(*pOldPattern));
- SfxItemSet& rSet = pNewPattern->GetItemSet();
for (sal_uInt16 nId = ATTR_PATTERN_START; nId <= ATTR_PATTERN_END; nId++)
if (nId != ATTR_MERGE && nId != ATTR_MERGE_FLAG)
- rSet.ClearItem(nId);
+ pNewPattern->ItemSetClearItem(nId);
if ( *pNewPattern == *aDefHolder.getScPatternAttr() )
{
@@ -2432,9 +2435,9 @@ void ScAttrArray::CopyArea(
nNewFlags = pTmpPattern->GetItem(ATTR_MERGE_FLAG).GetValue() & ~nStripFlags;
if ( nNewFlags != ScMF::NONE )
- pTmpPattern->GetItemSet().Put( ScMergeFlagAttr( nNewFlags ) );
+ pTmpPattern->ItemSetPut(ScMergeFlagAttr(nNewFlags));
else
- pTmpPattern->GetItemSet().ClearItem( ATTR_MERGE_FLAG );
+ pTmpPattern->ItemSetClearItem(ATTR_MERGE_FLAG);
if (bSameCellAttributeHelper)
aNewPattern.setScPatternAttr(pTmpPattern, true);
diff --git a/sc/source/core/data/clipcontext.cxx b/sc/source/core/data/clipcontext.cxx
index 579f7928b57e..d1a439ba9ffa 100644
--- a/sc/source/core/data/clipcontext.cxx
+++ b/sc/source/core/data/clipcontext.cxx
@@ -151,9 +151,9 @@ public:
void CopyFromClipContext::startListeningFormulas()
{
- const auto pSet = std::make_shared<sc::ColumnBlockPositionSet>(mrDestDoc);
- sc::StartListeningContext aStartCxt(mrDestDoc, pSet);
- sc::EndListeningContext aEndCxt(mrDestDoc, pSet, nullptr);
+ auto xSet = std::make_shared<sc::ColumnBlockPositionSet>(mrDestDoc);
+ sc::StartListeningContext aStartCxt(mrDestDoc, xSet);
+ sc::EndListeningContext aEndCxt(mrDestDoc, std::move(xSet), nullptr);
StartListeningAction aAction(mrDestDoc, aStartCxt, aEndCxt);
maListeningFormulaSpans.executeAction(mrDestDoc, aAction);
diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx
index 736f2c76582d..75f163c270dd 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -613,13 +613,15 @@ double GetPercentile( const std::vector<double>& rArray, double fPercentile )
SAL_WARN_IF(fPercentile < 0, "sc", "negative percentile");
if (fPercentile < 0)
return rArray.front();
- assert(fPercentile <= 1);
+
+ fPercentile = std::min(1.0, fPercentile);
+
size_t nSize = rArray.size();
double fFloor = ::rtl::math::approxFloor(fPercentile * (nSize-1));
size_t nIndex = static_cast<size_t>(fFloor);
double fDiff = fPercentile * (nSize-1) - fFloor;
std::vector<double>::const_iterator iter = rArray.begin() + nIndex;
- if (fDiff == 0.0)
+ if (fDiff == 0.0 || nIndex == nSize - 1)
return *iter;
else
{
@@ -1545,18 +1547,17 @@ OUString ScIconSetFormat::getIconName(ScIconSetType const eType, sal_Int32 const
return sBitmap;
}
-BitmapEx& ScIconSetFormat::getBitmap(sc::IconSetBitmapMap & rIconSetBitmapMap,
+Bitmap& ScIconSetFormat::getBitmap(sc::IconSetBitmapMap & rIconSetBitmapMap,
ScIconSetType const eType, sal_Int32 const nIndex)
{
OUString sBitmap(ScIconSetFormat::getIconName(eType, nIndex));
- std::map<OUString, BitmapEx>::iterator itr = rIconSetBitmapMap.find(sBitmap);
+ std::map<OUString, Bitmap>::iterator itr = rIconSetBitmapMap.find(sBitmap);
if (itr != rIconSetBitmapMap.end())
return itr->second;
- BitmapEx aBitmap(sBitmap);
- std::pair<OUString, BitmapEx> aPair(sBitmap, aBitmap);
- std::pair<std::map<OUString, BitmapEx>::iterator, bool> itrNew = rIconSetBitmapMap.insert(aPair);
+ Bitmap aBitmap(sBitmap);
+ auto itrNew = rIconSetBitmapMap.emplace(sBitmap, aBitmap);
assert(itrNew.second);
return itrNew.first->second;
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 4ef8dff3d01c..0996250e4d49 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -559,7 +559,7 @@ void ScColumn::ApplyAttr( SCROW nRow, const SfxPoolItem& rAttr )
const ScPatternAttr* pOldPattern(pAttrArray->GetPattern(nRow));
ScPatternAttr* pNewPattern(new ScPatternAttr(*pOldPattern));
- pNewPattern->GetItemSet().Put(rAttr);
+ pNewPattern->ItemSetPut(rAttr);
if (!ScPatternAttr::areSame( pNewPattern, pOldPattern ))
pAttrArray->SetPattern( nRow, CellAttributeHolder(pNewPattern, true) );
@@ -2173,9 +2173,9 @@ class UpdateRefOnNonCopy
// Make sure that the start and end listening contexts share the
// same block position set, else an invalid iterator may ensue.
- const auto pPosSet = std::make_shared<sc::ColumnBlockPositionSet>(mpCxt->mrDoc);
- sc::StartListeningContext aStartCxt(mpCxt->mrDoc, pPosSet);
- sc::EndListeningContext aEndCxt(mpCxt->mrDoc, pPosSet, &aOldCode);
+ auto xPosSet = std::make_shared<sc::ColumnBlockPositionSet>(mpCxt->mrDoc);
+ sc::StartListeningContext aStartCxt(mpCxt->mrDoc, xPosSet);
+ sc::EndListeningContext aEndCxt(mpCxt->mrDoc, std::move(xPosSet), &aOldCode);
aEndCxt.setPositionDelta(
ScAddress(-mpCxt->mnColDelta, -mpCxt->mnRowDelta, -mpCxt->mnTabDelta));
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index c3bf713ad2f4..dc09a0066669 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -59,7 +59,6 @@
#include <svl/numformat.hxx>
#include <svl/zforlist.hxx>
#include <svl/broadcast.hxx>
-#include <utility>
#include <vcl/outdev.hxx>
#include <formula/errorcodes.hxx>
#include <formula/vectortoken.hxx>
@@ -68,6 +67,7 @@
#include <limits>
#include <memory>
#include <numeric>
+#include <utility>
// factor from font size to optimal cell height (text width)
#define SC_ROT_BREAK_FACTOR 6
@@ -1210,7 +1210,7 @@ public:
// test for attributes
if (!mpEngine)
{
- mpEngine.reset(new ScFieldEditEngine(&mrDoc, mrDoc.GetEditTextObjectPool()));
+ mpEngine.reset(new ScFieldEditEngine(&mrDoc, mrDoc.GetEditEnginePool()));
// EEControlBits::ONLINESPELLING if there are errors already
mpEngine->SetControlWord(mpEngine->GetControlWord() | EEControlBits::ONLINESPELLING);
mrDoc.ApplyAsianEditSettings(*mpEngine);
@@ -1718,12 +1718,12 @@ void ScColumn::CellStorageModified()
{
if (itCell->position != itAttr->position || itCell->size != itAttr->size)
{
- cout << "ScColumn::CellStorageModified: Cell array and cell text attribute array are out of sync." << endl;
- cout << "-- cell array" << endl;
- maCells.dump_blocks(cout);
- cout << "-- attribute array" << endl;
- maCellTextAttrs.dump_blocks(cout);
- cout.flush();
+ std::cout << "ScColumn::CellStorageModified: Cell array and cell text attribute array are out of sync." << std::endl;
+ std::cout << "-- cell array" << std::endl;
+ maCells.dump_blocks(std::cout);
+ std::cout << "-- attribute array" << endl;
+ maCellTextAttrs.dump_blocks(std::cout);
+ std::cout.flush();
abort();
}
@@ -1754,28 +1754,28 @@ struct ColumnStorageDumper
switch (rNode.type)
{
case sc::element_type_numeric:
- cout << " * numeric block (pos=" << rNode.position << ", length=" << rNode.size << ")" << endl;
+ std::cout << " * numeric block (pos=" << rNode.position << ", length=" << rNode.size << ")" << std::endl;
break;
case sc::element_type_string:
- cout << " * string block (pos=" << rNode.position << ", length=" << rNode.size << ")" << endl;
+ std::cout << " * string block (pos=" << rNode.position << ", length=" << rNode.size << ")" << std::endl;
break;
case sc::element_type_edittext:
- cout << " * edit-text block (pos=" << rNode.position << ", length=" << rNode.size << ")" << endl;
+ std::cout << " * edit-text block (pos=" << rNode.position << ", length=" << rNode.size << ")" << std::endl;
break;
case sc::element_type_formula:
dumpFormulaBlock(rNode);
break;
case sc::element_type_empty:
- cout << " * empty block (pos=" << rNode.position << ", length=" << rNode.size << ")" << endl;
+ std::cout << " * empty block (pos=" << rNode.position << ", length=" << rNode.size << ")" << std::endl;
break;
default:
- cout << " * unknown block" << endl;
+ std::cout << " * unknown block" << std::endl;
}
}
void dumpFormulaBlock(const sc::CellStoreType::value_type& rNode) const
{
- cout << " * formula block (pos=" << rNode.position << ", length=" << rNode.size << ")" << endl;
+ std::cout << " * formula block (pos=" << rNode.position << ", length=" << rNode.size << ")" << std::endl;
sc::formula_block::const_iterator it = sc::formula_block::begin(*rNode.data);
sc::formula_block::const_iterator itEnd = sc::formula_block::end(*rNode.data);
@@ -1784,7 +1784,7 @@ struct ColumnStorageDumper
const ScFormulaCell* pCell = *it;
if (!pCell->IsShared())
{
- cout << " * row " << pCell->aPos.Row() << " not shared" << endl;
+ std::cout << " * row " << pCell->aPos.Row() << " not shared" << std::endl;
printFormula(pCell);
printResult(pCell);
continue;
@@ -1792,14 +1792,14 @@ struct ColumnStorageDumper
if (pCell->GetSharedTopRow() != pCell->aPos.Row())
{
- cout << " * row " << pCell->aPos.Row() << " shared with top row "
+ std::cout << " * row " << pCell->aPos.Row() << " shared with top row "
<< pCell->GetSharedTopRow() << " with length " << pCell->GetSharedLength()
- << endl;
+ << std::endl;
continue;
}
SCROW nLen = pCell->GetSharedLength();
- cout << " * group: start=" << pCell->aPos.Row() << ", length=" << nLen << endl;
+ std::cout << " * group: start=" << pCell->aPos.Row() << ", length=" << nLen << std::endl;
printFormula(pCell);
printResult(pCell);
@@ -1818,14 +1818,14 @@ struct ColumnStorageDumper
{
sc::TokenStringContext aCxt(mrDoc, mrDoc.GetGrammar());
OUString aFormula = pCell->GetCode()->CreateString(aCxt, pCell->aPos);
- cout << " * formula: " << aFormula << endl;
+ std::cout << " * formula: " << aFormula << std::endl;
}
#if DUMP_FORMULA_RESULTS
void printResult(const ScFormulaCell* pCell) const
{
sc::FormulaResultValue aRes = pCell->GetResult();
- cout << " * result: ";
+ std::cout << " * result: ";
switch (aRes.meType)
{
case sc::FormulaResultValue::Value:
@@ -1842,7 +1842,7 @@ struct ColumnStorageDumper
break;
}
- cout << endl;
+ std::cout << std::endl;
}
#else
void printResult(const ScFormulaCell*) const
@@ -1856,9 +1856,9 @@ struct ColumnStorageDumper
void ScColumn::DumpColumnStorage() const
{
- cout << "-- table: " << nTab << "; column: " << nCol << endl;
+ std::cout << "-- table: " << nTab << "; column: " << nCol << std::endl;
std::for_each(maCells.begin(), maCells.end(), ColumnStorageDumper(GetDoc()));
- cout << "--" << endl;
+ std::cout << "--" << std::endl;
}
#endif
@@ -2226,7 +2226,7 @@ const ScPostIt* ScColumn::GetCellNote( sc::ColumnBlockConstPosition& rBlockPos,
ScPostIt* ScColumn::GetCellNote( sc::ColumnBlockConstPosition& rBlockPos, SCROW nRow )
{
- return const_cast<ScPostIt*>(const_cast<const ScColumn*>(this)->GetCellNote( rBlockPos, nRow ));
+ return const_cast<ScPostIt*>(std::as_const(*this).GetCellNote( rBlockPos, nRow ));
}
void ScColumn::SetCellNote(SCROW nRow, std::unique_ptr<ScPostIt> pNote)
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 6c685d2061bb..a50226db8415 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -437,9 +437,9 @@ void ScColumn::StartListeningUnshared( const std::vector<SCROW>& rNewSharedRows
if (rNewSharedRows.empty() || rDoc.IsDelayedFormulaGrouping())
return;
- const auto pPosSet = std::make_shared<sc::ColumnBlockPositionSet>(rDoc);
- sc::StartListeningContext aStartCxt(rDoc, pPosSet);
- sc::EndListeningContext aEndCxt(rDoc, pPosSet);
+ auto xPosSet = std::make_shared<sc::ColumnBlockPositionSet>(rDoc);
+ sc::StartListeningContext aStartCxt(rDoc, xPosSet);
+ sc::EndListeningContext aEndCxt(rDoc, std::move(xPosSet));
if (rNewSharedRows.size() >= 2)
{
if(!rDoc.CanDelayStartListeningFormulaCells( this, rNewSharedRows[0], rNewSharedRows[1]))
@@ -580,7 +580,6 @@ void ScColumn::AttachFormulaCells( sc::StartListeningContext& rCxt, SCROW nRow1,
{
nRow1 = std::min( nRow1, rCell.GetSharedTopRow());
SCROW nCellLen = rCell.GetSharedLength();
- // coverity[ tainted_data_return : FALSE ] version 2023.12.2
const auto nEndRow = rCell.GetSharedTopRow() + nCellLen;
if (nRow2 < nEndRow)
{
@@ -711,9 +710,9 @@ void ScColumn::AttachNewFormulaCell(
{
case sc::ConvertToGroupListening:
{
- const auto pPosSet = std::make_shared<sc::ColumnBlockPositionSet>(rDocument);
- sc::StartListeningContext aStartCxt(rDocument, pPosSet);
- sc::EndListeningContext aEndCxt(rDocument, pPosSet);
+ auto xPosSet = std::make_shared<sc::ColumnBlockPositionSet>(rDocument);
+ sc::StartListeningContext aStartCxt(rDocument, xPosSet);
+ sc::EndListeningContext aEndCxt(rDocument, std::move(xPosSet));
SCROW nStartRow, nEndRow;
nStartRow = nEndRow = aPos.first->position + aPos.second;
for (const SCROW nR : rNewSharedRows)
@@ -2099,8 +2098,7 @@ void applyTextNumFormat( ScColumn& rCol, SCROW nRow, SvNumberFormatter* pFormatt
{
sal_uInt32 nFormat = pFormatter->GetStandardFormat(SvNumFormatType::TEXT);
ScPatternAttr aNewAttrs(rCol.GetDoc().getCellAttributeHelper());
- SfxItemSet& rSet = aNewAttrs.GetItemSet();
- rSet.Put(SfxUInt32Item(ATTR_VALUE_FORMAT, nFormat));
+ aNewAttrs.ItemSetPut(SfxUInt32Item(ATTR_VALUE_FORMAT, nFormat));
rCol.ApplyPattern(nRow, aNewAttrs);
}
@@ -2394,7 +2392,7 @@ void ScColumn::SetEditText( sc::ColumnBlockPosition& rBlockPos, SCROW nRow, std:
void ScColumn::SetEditText( sc::ColumnBlockPosition& rBlockPos, SCROW nRow, const EditTextObject& rEditText )
{
- if (GetDoc().GetEditTextObjectPool() == rEditText.GetPool())
+ if (GetDoc().GetEditEnginePool() == rEditText.GetPool())
{
SetEditText(rBlockPos, nRow, rEditText.Clone());
return;
@@ -2410,7 +2408,7 @@ void ScColumn::SetEditText( sc::ColumnBlockPosition& rBlockPos, SCROW nRow, cons
void ScColumn::SetEditText( SCROW nRow, const EditTextObject& rEditText, const SfxItemPool* pEditPool )
{
- if (pEditPool && GetDoc().GetEditTextObjectPool() == pEditPool)
+ if (pEditPool && GetDoc().GetEditEnginePool() == pEditPool)
{
SetEditText(nRow, rEditText.Clone());
return;
diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx
index 452786cfbf87..999cd804c13f 100644
--- a/sc/source/core/data/column4.cxx
+++ b/sc/source/core/data/column4.cxx
@@ -134,7 +134,7 @@ void ScColumn::DeleteBeforeCopyFromClip(
if (rCxt.isTableProtected())
{
ScPatternAttr aPattern(rDocument.getCellAttributeHelper());
- aPattern.GetItemSet().Put(ScProtectionAttr(false));
+ aPattern.ItemSetPut(ScProtectionAttr(false));
ApplyPatternArea(aRange.mnRow1, aRange.mnRow2, aPattern);
}
@@ -229,7 +229,7 @@ void ScColumn::DeleteBeforeCopyFromClip(
if (rCxt.isTableProtected())
{
ScPatternAttr aPattern(rDocument.getCellAttributeHelper());
- aPattern.GetItemSet().Put(ScProtectionAttr(false));
+ aPattern.ItemSetPut(ScProtectionAttr(false));
ApplyPatternArea(nRow1, nRow2, aPattern);
}
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index fa72e915010a..fc5635c291c3 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -52,10 +52,6 @@
#include <limits>
#include <vector>
-using ::rtl::math::approxEqual;
-using ::std::vector;
-using ::std::set;
-
// iterators have very high frequency use -> custom debug.
// #define debugiter(...) fprintf(stderr, __VA_ARGS__)
#define debugiter(...)
@@ -602,7 +598,7 @@ bool isQueryByString(const ScQueryEntry& rEntry, const ScQueryEntry::Item& rItem
bool ScDBQueryDataIterator::DataAccessMatrix::isValidQuery(SCROW nRow, const ScMatrix& rMat) const
{
SCSIZE nEntryCount = mpParam->GetEntryCount();
- vector<bool> aResults;
+ std::vector<bool> aResults;
aResults.reserve(nEntryCount);
const CollatorWrapper& rCollator = ScGlobal::GetCollator(mpParam->bCaseSens);
@@ -637,7 +633,7 @@ bool ScDBQueryDataIterator::DataAccessMatrix::isValidQuery(SCROW nRow, const ScM
{
// By value
double fMatVal = rMat.GetDouble(nField, nRow);
- bool bEqual = approxEqual(fMatVal, rItem.mfVal);
+ bool bEqual = rtl::math::approxEqual(fMatVal, rItem.mfVal);
switch (rEntry.eOp)
{
case SC_EQUAL:
@@ -1620,7 +1616,7 @@ ScDocRowHeightUpdater::TabRanges::TabRanges(SCTAB nTab, SCROW nMaxRow) :
{
}
-ScDocRowHeightUpdater::ScDocRowHeightUpdater(ScDocument& rDoc, OutputDevice* pOutDev, double fPPTX, double fPPTY, const vector<TabRanges>* pTabRangesArray) :
+ScDocRowHeightUpdater::ScDocRowHeightUpdater(ScDocument& rDoc, OutputDevice* pOutDev, double fPPTX, double fPPTY, const std::vector<TabRanges>* pTabRangesArray) :
mrDoc(rDoc), mpOutDev(pOutDev), mfPPTX(fPPTX), mfPPTY(fPPTY), mpTabRangesArray(pTabRangesArray)
{
}
@@ -1766,7 +1762,7 @@ const ScPatternAttr* ScAttrRectIterator::GetNext( SCCOL& rCol1, SCCOL& rCol2,
return nullptr; // Nothing anymore
}
-ScRowBreakIterator::ScRowBreakIterator(set<SCROW>& rBreaks) :
+ScRowBreakIterator::ScRowBreakIterator(std::set<SCROW>& rBreaks) :
mrBreaks(rBreaks),
maItr(rBreaks.begin()), maEnd(rBreaks.end())
{
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 87a236dff2a6..dba7aaa821a7 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -486,11 +486,6 @@ SvNumberFormatter* ScDocument::GetFormatTable() const
return mxPoolHelper->GetFormTable();
}
-SfxItemPool* ScDocument::GetEditTextObjectPool() const
-{
- return mxPoolHelper->GetEditTextObjectPool();
-}
-
SfxItemPool* ScDocument::GetEditEnginePool() const
{
return mxPoolHelper->GetEditEnginePool();
@@ -500,7 +495,7 @@ ScFieldEditEngine& ScDocument::GetEditEngine()
{
if ( !mpEditEngine )
{
- mpEditEngine.reset( new ScFieldEditEngine(this, GetEditEnginePool(), GetEditTextObjectPool()) );
+ mpEditEngine.reset( new ScFieldEditEngine(this, GetEditEnginePool()) );
mpEditEngine->SetUpdateLayout( false );
mpEditEngine->EnableUndo( false );
mpEditEngine->SetRefMapMode(MapMode(MapUnit::Map100thMM));
@@ -514,7 +509,7 @@ ScNoteEditEngine& ScDocument::GetNoteEngine()
if ( !mpNoteEngine )
{
ScMutationGuard aGuard(*this, ScMutationGuardFlags::CORE);
- mpNoteEngine.reset( new ScNoteEditEngine( GetEditEnginePool(), GetEditTextObjectPool() ) );
+ mpNoteEngine.reset( new ScNoteEditEngine( GetEditEnginePool() ) );
mpNoteEngine->SetUpdateLayout( false );
mpNoteEngine->EnableUndo( false );
mpNoteEngine->SetRefMapMode(MapMode(MapUnit::Map100thMM));
@@ -1211,7 +1206,7 @@ std::unique_ptr<ScFieldEditEngine> ScDocument::CreateFieldEditEngine()
if (!pCacheFieldEditEngine)
{
pNewEditEngine.reset( new ScFieldEditEngine(
- this, GetEditEnginePool(), GetEditTextObjectPool(), false) );
+ this, GetEditEnginePool(), false) );
}
else
{
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index ced75f3cb4dc..2d0442c44682 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -76,6 +76,7 @@
#include <globalnames.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <comphelper/lok.hxx>
+#include <comphelper/flagguard.hxx>
#include <config_fuzzers.h>
#include <memory>
@@ -1442,10 +1443,10 @@ void ScDocument::Sort(
{
if (ScTable* pTable = FetchTable(nTab))
{
- bool bOldEnableIdle = IsIdleEnabled();
- EnableIdle(false);
+ // Set idle enabled to "false" (if not already)
+ // out-of-scope will reset the value to the initial state
+ comphelper::FlagRestorationGuard aGuard(mbIdleEnabled, false);
pTable->Sort(rSortParam, bKeepQuery, bUpdateRefs, pProgress, pUndo);
- EnableIdle(bOldEnableIdle);
}
}
diff --git a/sc/source/core/data/documen5.cxx b/sc/source/core/data/documen5.cxx
index ebf92ef634e7..f0e08eaa1a21 100644
--- a/sc/source/core/data/documen5.cxx
+++ b/sc/source/core/data/documen5.cxx
@@ -177,7 +177,7 @@ void ScDocument::GetChartRanges( std::u16string_view rChartName, ::std::vector<
{
ScRangeList aRanges;
aRanges.Parse( aRangeString, rSheetNameDoc, rSheetNameDoc.GetAddressConvention() );
- rRangesVector.push_back(aRanges);
+ rRangesVector.push_back(std::move(aRanges));
}
}
}
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index 1208ed0f3cd3..8d4d70eb4437 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -1241,7 +1241,7 @@ void ScDocument::TransliterateText( const ScMarkData& rMultiMark, Transliteratio
( nType == TransliterationFlags::SENTENCE_CASE || nType == TransliterationFlags::TITLE_CASE)))
{
if (!pEngine)
- pEngine.reset(new ScFieldEditEngine(this, GetEditEnginePool(), GetEditTextObjectPool()));
+ pEngine.reset(new ScFieldEditEngine(this, GetEditEnginePool()));
// defaults from cell attributes must be set so right language is used
const ScPatternAttr* pPattern = GetPattern( nCol, nRow, nTab );
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 97cff73ddd7a..e4eb11cc165c 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -21,6 +21,7 @@
#include <editeng/boxitem.hxx>
#include <editeng/editobj.hxx>
+#include <o3tl/untaint.hxx>
#include <svx/svditer.hxx>
#include <sfx2/docfile.hxx>
#include <svl/numformat.hxx>
@@ -108,7 +109,6 @@ using namespace ::com::sun::star;
namespace WritingMode2 = ::com::sun::star::text::WritingMode2;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::sheet::TablePageBreakData;
-using ::std::set;
namespace {
@@ -2646,9 +2646,9 @@ void ScDocument::StartListeningFromClip( SCCOL nCol1, SCROW nRow1,
if (!(nInsFlag & InsertDeleteFlags::CONTENTS))
return;
- const auto pSet = std::make_shared<sc::ColumnBlockPositionSet>(*this);
- sc::StartListeningContext aStartCxt(*this, pSet);
- sc::EndListeningContext aEndCxt(*this, pSet, nullptr);
+ auto xSet = std::make_shared<sc::ColumnBlockPositionSet>(*this);
+ sc::StartListeningContext aStartCxt(*this, xSet);
+ sc::EndListeningContext aEndCxt(*this, std::move(xSet), nullptr);
for (SCTAB nTab : rMark)
StartListeningFromClip(aStartCxt, aEndCxt, nTab, nCol1, nRow1, nCol2, nRow2);
@@ -4398,13 +4398,13 @@ CRFlags ScDocument::GetRowFlags( SCROW nRow, SCTAB nTab ) const
return CRFlags::NONE;
}
-void ScDocument::GetAllRowBreaks(set<SCROW>& rBreaks, SCTAB nTab, bool bPage, bool bManual) const
+void ScDocument::GetAllRowBreaks(std::set<SCROW>& rBreaks, SCTAB nTab, bool bPage, bool bManual) const
{
if (const ScTable* pTable = FetchTable(nTab))
pTable->GetAllRowBreaks(rBreaks, bPage, bManual);
}
-void ScDocument::GetAllColBreaks(set<SCCOL>& rBreaks, SCTAB nTab, bool bPage, bool bManual) const
+void ScDocument::GetAllColBreaks(std::set<SCCOL>& rBreaks, SCTAB nTab, bool bPage, bool bManual) const
{
if (const ScTable* pTable = FetchTable(nTab))
pTable->GetAllColBreaks(rBreaks, bPage, bManual);
@@ -6409,7 +6409,7 @@ bool lcl_hasDirtyRange(const ScDocument& rDoc, ScFormulaCell* pCell, const ScRan
void ScDocument::SetSubTotalCellsDirty(const ScRange& rDirtyRange)
{
// to update the list by skipping cells that no longer contain subtotal function.
- set<ScFormulaCell*> aNewSet;
+ std::set<ScFormulaCell*> aNewSet;
bool bOldRecalc = GetAutoCalc();
SetAutoCalc(false);
diff --git a/sc/source/core/data/document10.cxx b/sc/source/core/data/document10.cxx
index 0ae557e49ea1..cf6cae5d296f 100644
--- a/sc/source/core/data/document10.cxx
+++ b/sc/source/core/data/document10.cxx
@@ -225,9 +225,9 @@ void ScDocument::SwapNonEmpty( sc::TableValues& rValues )
if (!rRange.IsValid())
return;
- const auto pPosSet = std::make_shared<sc::ColumnBlockPositionSet>(*this);
- sc::StartListeningContext aStartCxt(*this, pPosSet);
- sc::EndListeningContext aEndCxt(*this, pPosSet);
+ auto xPosSet = std::make_shared<sc::ColumnBlockPositionSet>(*this);
+ sc::StartListeningContext aStartCxt(*this, xPosSet);
+ sc::EndListeningContext aEndCxt(*this, std::move(xPosSet));
for (SCTAB nTab = rRange.aStart.Tab(); nTab <= rRange.aEnd.Tab(); ++nTab)
{
@@ -409,9 +409,9 @@ void ScDocument::EnableDelayStartListeningFormulaCells( ScColumn* column, bool d
{
if( it->second.first != -1 )
{
- const auto pPosSet = std::make_shared<sc::ColumnBlockPositionSet>(*this);
- sc::StartListeningContext aStartCxt(*this, pPosSet);
- sc::EndListeningContext aEndCxt(*this, pPosSet);
+ auto xPosSet = std::make_shared<sc::ColumnBlockPositionSet>(*this);
+ sc::StartListeningContext aStartCxt(*this, xPosSet);
+ sc::EndListeningContext aEndCxt(*this, std::move(xPosSet));
column->StartListeningFormulaCells(aStartCxt, aEndCxt, it->second.first, it->second.second);
}
pDelayedStartListeningFormulaCells.erase( it );
@@ -563,9 +563,9 @@ void ScDocument::StartAllListeners( const ScRange& rRange )
if (IsClipOrUndo() || GetNoListening())
return;
- const auto pPosSet = std::make_shared<sc::ColumnBlockPositionSet>(*this);
- sc::StartListeningContext aStartCxt(*this, pPosSet);
- sc::EndListeningContext aEndCxt(*this, pPosSet);
+ auto xPosSet = std::make_shared<sc::ColumnBlockPositionSet>(*this);
+ sc::StartListeningContext aStartCxt(*this, xPosSet);
+ sc::EndListeningContext aEndCxt(*this, std::move(xPosSet));
for (SCTAB nTab = rRange.aStart.Tab(); nTab <= rRange.aEnd.Tab(); ++nTab)
{
diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx
index e364d27cb8d0..098bcafa8dc5 100644
--- a/sc/source/core/data/dpcache.cxx
+++ b/sc/source/core/data/dpcache.cxx
@@ -178,14 +178,12 @@ struct Bucket
#if DEBUG_PIVOT_TABLE
#include <iostream>
-using std::cout;
-using std::endl;
struct PrintBucket
{
void operator() (const Bucket& v) const
{
- cout << "value: " << v.maValue.GetValue() << " order index: " << v.mnOrderIndex << " data index: " << v.mnDataIndex << endl;
+ std::cout << "value: " << v.maValue.GetValue() << " order index: " << v.mnOrderIndex << " data index: " << v.mnDataIndex << std::endl;
}
};
@@ -1405,13 +1403,13 @@ namespace {
void dumpItems(const ScDPCache& rCache, tools::Long nDim, const ScDPCache::ScDPItemDataVec& rItems, size_t nOffset)
{
for (size_t i = 0; i < rItems.size(); ++i)
- cout << " " << (i+nOffset) << ": " << rCache.GetFormattedString(nDim, rItems[i], false) << endl;
+ std::cout << " " << (i+nOffset) << ": " << rCache.GetFormattedString(nDim, rItems[i], false) << std::endl;
}
void dumpSourceData(const ScDPCache& rCache, tools::Long nDim, const ScDPCache::ScDPItemDataVec& rItems, const ScDPCache::IndexArrayType& rArray)
{
for (const auto& rIndex : rArray)
- cout << " '" << rCache.GetFormattedString(nDim, rItems[rIndex], false) << "'" << endl;
+ std::cout << " '" << rCache.GetFormattedString(nDim, rItems[rIndex], false) << "'" << std::endl;
}
const char* getGroupTypeName(sal_Int32 nType)
@@ -1444,27 +1442,27 @@ void ScDPCache::Dump() const
bool bDumpItems = false;
bool bDumpSourceData = false;
- cout << "--- pivot cache dump" << endl;
+ std::cout << "--- pivot cache dump" << std::endl;
{
size_t i = 0;
for (const auto& rxField : maFields)
{
const Field& fld = *rxField;
- cout << "* source dimension: " << GetDimensionName(i) << " (ID = " << i << ")" << endl;
- cout << " item count: " << fld.maItems.size() << endl;
+ std::cout << "* source dimension: " << GetDimensionName(i) << " (ID = " << i << ")" << std::endl;
+ std::cout << " item count: " << fld.maItems.size() << std::endl;
if (bDumpItems)
dumpItems(*this, i, fld.maItems, 0);
if (fld.mpGroup)
{
- cout << " group item count: " << fld.mpGroup->maItems.size() << endl;
- cout << " group type: " << getGroupTypeName(fld.mpGroup->mnGroupType) << endl;
+ std::cout << " group item count: " << fld.mpGroup->maItems.size() << std::endl;
+ std::cout << " group type: " << getGroupTypeName(fld.mpGroup->mnGroupType) << std::endl;
if (bDumpItems)
dumpItems(*this, i, fld.mpGroup->maItems, fld.maItems.size());
}
if (bDumpSourceData)
{
- cout << " source data (re-constructed):" << endl;
+ std::cout << " source data (re-constructed):" << std::endl;
dumpSourceData(*this, i, fld.maItems, fld.maData);
}
@@ -1477,9 +1475,9 @@ void ScDPCache::Dump() const
for (const auto& rxGroupField : maGroupFields)
{
const GroupItems& gi = *rxGroupField;
- cout << "* group dimension: (unnamed) (ID = " << i << ")" << endl;
- cout << " item count: " << gi.maItems.size() << endl;
- cout << " group type: " << getGroupTypeName(gi.mnGroupType) << endl;
+ std::cout << "* group dimension: (unnamed) (ID = " << i << ")" << std::endl;
+ std::cout << " item count: " << gi.maItems.size() << std::endl;
+ std::cout << " group type: " << getGroupTypeName(gi.mnGroupType) << std::endl;
if (bDumpItems)
dumpItems(*this, i, gi.maItems, 0);
++i;
@@ -1488,7 +1486,7 @@ void ScDPCache::Dump() const
{
struct { SCROW start; SCROW end; bool empty; } aRange;
- cout << "* empty rows: " << endl;
+ std::cout << "* empty rows: " << std::endl;
mdds::flat_segment_tree<SCROW, bool>::const_iterator it = maEmptyRows.begin(), itEnd = maEmptyRows.end();
if (it != itEnd)
{
@@ -1498,14 +1496,14 @@ void ScDPCache::Dump() const
for (++it; it != itEnd; ++it)
{
aRange.end = it->first-1;
- cout << " rows " << aRange.start << "-" << aRange.end << ": " << (aRange.empty ? "empty" : "not-empty") << endl;
+ std::cout << " rows " << aRange.start << "-" << aRange.end << ": " << (aRange.empty ? "empty" : "not-empty") << std::endl;
aRange.start = it->first;
aRange.empty = it->second;
}
}
}
- cout << "---" << endl;
+ std::cout << "---" << std::endl;
}
#endif
diff --git a/sc/source/core/data/dpfilteredcache.cxx b/sc/source/core/data/dpfilteredcache.cxx
index d1c6b38b06d2..c93c45a44937 100644
--- a/sc/source/core/data/dpfilteredcache.cxx
+++ b/sc/source/core/data/dpfilteredcache.cxx
@@ -27,7 +27,6 @@
#include <osl/diagnose.h>
#include <algorithm>
-using ::std::vector;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Any;
@@ -229,7 +228,7 @@ bool ScDPFilteredCache::isRowActive(sal_Int32 nRow, sal_Int32* pLastRow) const
return bFilter && bPage;
}
-void ScDPFilteredCache::filterByPageDimension(const vector<Criterion>& rCriteria, const std::unordered_set<sal_Int32>& rRepeatIfEmptyDims)
+void ScDPFilteredCache::filterByPageDimension(const std::vector<Criterion>& rCriteria, const std::unordered_set<sal_Int32>& rRepeatIfEmptyDims)
{
SCROW nRowSize = getRowSize();
SCROW nDataSize = mrCache.GetDataSize();
@@ -276,18 +275,18 @@ const OUString & ScDPFilteredCache::getFieldName(SCCOL nIndex) const
return mrCache.GetDimensionName(nIndex);
}
-const ::std::vector<SCROW>& ScDPFilteredCache::getFieldEntries( sal_Int32 nColumn ) const
+const std::vector<SCROW>& ScDPFilteredCache::getFieldEntries( sal_Int32 nColumn ) const
{
if (nColumn < 0 || o3tl::make_unsigned(nColumn) >= maFieldEntries.size())
{
// index out of bound. Hopefully this code will never be reached.
- static const ::std::vector<SCROW> emptyEntries{};
+ static const std::vector<SCROW> emptyEntries{};
return emptyEntries;
}
return maFieldEntries[nColumn];
}
-void ScDPFilteredCache::filterTable(const vector<Criterion>& rCriteria, Sequence< Sequence<Any> >& rTabData,
+void ScDPFilteredCache::filterTable(const std::vector<Criterion>& rCriteria, Sequence< Sequence<Any> >& rTabData,
const std::unordered_set<sal_Int32>& rRepeatIfEmptyDims)
{
sal_Int32 nRowSize = getRowSize();
@@ -298,7 +297,7 @@ void ScDPFilteredCache::filterTable(const vector<Criterion>& rCriteria, Sequence
return;
// Row first, then column.
- vector< Sequence<Any> > tableData;
+ std::vector< Sequence<Any> > tableData;
tableData.reserve(nRowSize+1);
// Header first.
@@ -365,7 +364,7 @@ bool ScDPFilteredCache::empty() const
return maFieldEntries.empty();
}
-bool ScDPFilteredCache::isRowQualified(sal_Int32 nRow, const vector<Criterion>& rCriteria,
+bool ScDPFilteredCache::isRowQualified(sal_Int32 nRow, const std::vector<Criterion>& rCriteria,
const std::unordered_set<sal_Int32>& rRepeatIfEmptyDims) const
{
sal_Int32 nColSize = getColSize();
@@ -395,7 +394,7 @@ void ScDPFilteredCache::dumpRowFlag( const RowFlagType& rFlag )
for (++it; it != itEnd; ++it)
{
SCROW nRow2 = it->first;
- cout << " * range " << nRow1 << "-" << nRow2 << ": " << (bShow ? "on" : "off") << endl;
+ std::cout << " * range " << nRow1 << "-" << nRow2 << ": " << (bShow ? "on" : "off") << std::endl;
bShow = it->second;
nRow1 = nRow2;
}
@@ -403,27 +402,27 @@ void ScDPFilteredCache::dumpRowFlag( const RowFlagType& rFlag )
void ScDPFilteredCache::dump() const
{
- cout << "--- pivot filtered cache dump" << endl;
+ std::cout << "--- pivot filtered cache dump" << std::endl;
- cout << endl;
- cout << "* show by filter" << endl;
+ std::cout << std::endl;
+ std::cout << "* show by filter" << std::endl;
dumpRowFlag(maShowByFilter);
- cout << endl;
- cout << "* show by page dimensions" << endl;
+ std::cout << std::endl;
+ std::cout << "* show by page dimensions" << std::endl;
dumpRowFlag(maShowByPage);
- cout << endl;
- cout << "* field entries" << endl;
+ std::cout << std::endl;
+ std::cout << "* field entries" << std::endl;
size_t nFieldCount = maFieldEntries.size();
for (size_t i = 0; i < nFieldCount; ++i)
{
- const vector<SCROW>& rField = maFieldEntries[i];
- cout << " * field " << i << endl;
+ const std::vector<SCROW>& rField = maFieldEntries[i];
+ std::cout << " * field " << i << std::endl;
for (size_t j = 0, n = rField.size(); j < n; ++j)
- cout << " ID: " << rField[j] << endl;
+ std::cout << " ID: " << rField[j] << std::endl;
}
- cout << "---" << endl;
+ std::cout << "---" << std::endl;
}
#endif
diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx
index 336388a36daf..4476ddfa966e 100644
--- a/sc/source/core/data/dpgroup.cxx
+++ b/sc/source/core/data/dpgroup.cxx
@@ -40,9 +40,6 @@ using namespace ::com::sun::star;
using ::com::sun::star::uno::Any;
using ::com::sun::star::uno::Sequence;
-using ::std::vector;
-using ::std::shared_ptr;
-
const sal_uInt16 SC_DP_LEAPYEAR = 1648; // arbitrary leap year for date calculations
namespace {
@@ -462,7 +459,7 @@ const std::vector<SCROW>& ScDPNumGroupDimension::GetNumEntries(
return maMemberEntries;
}
-ScDPGroupTableData::ScDPGroupTableData( const shared_ptr<ScDPTableData>& pSource, ScDocument* pDocument ) :
+ScDPGroupTableData::ScDPGroupTableData( const std::shared_ptr<ScDPTableData>& pSource, ScDocument* pDocument ) :
ScDPTableData(pDocument),
pSourceData( pSource ),
pDoc( pDocument )
@@ -638,7 +635,7 @@ public:
}
-void ScDPGroupTableData::ModifyFilterCriteria(vector<ScDPFilteredCache::Criterion>& rCriteria)
+void ScDPGroupTableData::ModifyFilterCriteria(std::vector<ScDPFilteredCache::Criterion>& rCriteria)
{
// Build dimension ID to object map for group dimensions.
typedef std::unordered_map<tools::Long, const ScDPGroupDimension*> GroupFieldMapType;
@@ -649,7 +646,7 @@ void ScDPGroupTableData::ModifyFilterCriteria(vector<ScDPFilteredCache::Criterio
aGroupFieldIds.emplace(rGroup.GetGroupDim(), &rGroup);
}
- vector<ScDPFilteredCache::Criterion> aNewCriteria;
+ std::vector<ScDPFilteredCache::Criterion> aNewCriteria;
aNewCriteria.reserve(rCriteria.size() + aGroups.size());
// Go through all the filtered field names and process them appropriately.
@@ -689,7 +686,7 @@ void ScDPGroupTableData::ModifyFilterCriteria(vector<ScDPFilteredCache::Criterio
std::make_shared<ScDPGroupNumFilter>(std::move(aMatchValues), *pNumInfo);
}
- aNewCriteria.push_back(aCri);
+ aNewCriteria.push_back(std::move(aCri));
}
else
{
@@ -715,7 +712,7 @@ void ScDPGroupTableData::ModifyFilterCriteria(vector<ScDPFilteredCache::Criterio
std::make_shared<ScDPGroupDateFilter>(
std::move(aMatchValues), pDoc->GetFormatTable()->GetNullDate(), *pNumInfo);
- aNewCriteria.push_back(aCri);
+ aNewCriteria.push_back(std::move(aCri));
}
else
{
@@ -741,7 +738,7 @@ void ScDPGroupTableData::ModifyFilterCriteria(vector<ScDPFilteredCache::Criterio
pGrpItem->FillGroupFilter(*pGrpFilter);
}
- aNewCriteria.push_back(aCri);
+ aNewCriteria.push_back(std::move(aCri));
}
}
}
@@ -801,7 +798,7 @@ void ScDPGroupTableData::ReloadCacheTable()
pSourceData->ReloadCacheTable();
}
-void ScDPGroupTableData::FillGroupValues(vector<SCROW>& rItems, const vector<sal_Int32>& rDims)
+void ScDPGroupTableData::FillGroupValues(std::vector<SCROW>& rItems, const std::vector<sal_Int32>& rDims)
{
sal_Int32 nGroupedColumns = aGroups.size();
@@ -1017,14 +1014,14 @@ sal_Int32 ScDPGroupTableData::Compare(sal_Int32 nDim, sal_Int32 nDataId1, sal_In
void ScDPGroupTableData::Dump() const
{
- cout << "--- ScDPGroupTableData" << endl;
+ std::cout << "--- ScDPGroupTableData" << std::endl;
for (tools::Long i = 0; i < nSourceCount; ++i)
{
- cout << "* dimension: " << i << endl;
+ std::cout << "* dimension: " << i << std::endl;
const ScDPNumGroupDimension& rGrp = pNumGroups[i];
rGrp.GetInfo().Dump();
}
- cout << "---" << endl;
+ std::cout << "---" << std::endl;
}
#endif
diff --git a/sc/source/core/data/dpnumgroupinfo.cxx b/sc/source/core/data/dpnumgroupinfo.cxx
index f57822e163bf..a1d01ff099b1 100644
--- a/sc/source/core/data/dpnumgroupinfo.cxx
+++ b/sc/source/core/data/dpnumgroupinfo.cxx
@@ -21,14 +21,14 @@ ScDPNumGroupInfo::ScDPNumGroupInfo() :
void ScDPNumGroupInfo::Dump() const
{
- cout << "--- ScDPNumGroupInfo" << endl;
- cout << " enabled: " << mbEnable << endl;
- cout << " auto start: " << mbAutoStart << endl;
- cout << " auto end: " << mbAutoEnd << endl;
- cout << " start: " << mfStart << endl;
- cout << " end: " << mfEnd << endl;
- cout << " step: " << mfStep << endl;
- cout << "---" << endl;
+ std::cout << "--- ScDPNumGroupInfo" << std::endl;
+ std::cout << " enabled: " << mbEnable << std::endl;
+ std::cout << " auto start: " << mbAutoStart << std::endl;
+ std::cout << " auto end: " << mbAutoEnd << std::endl;
+ std::cout << " start: " << mfStart << std::endl;
+ std::cout << " end: " << mfEnd << std::endl;
+ std::cout << " step: " << mfStep << std::endl;
+ std::cout << "---" << std::endl;
}
#endif
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 9727deaaf831..3c1cfaa7250a 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -82,8 +82,6 @@
#include <algorithm>
using namespace com::sun::star;
-using ::std::vector;
-using ::std::shared_ptr;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::UNO_QUERY;
@@ -688,7 +686,7 @@ ScDPTableData* ScDPObject::GetTableData()
{
if (!mpTableData)
{
- shared_ptr<ScDPTableData> pData;
+ std::shared_ptr<ScDPTableData> pData;
const ScDPDimensionSaveData* pDimData = mpSaveData ? mpSaveData->GetExistingDimensionData() : nullptr;
if (mpImportDescription)
@@ -847,7 +845,7 @@ void ScDPObject::ReloadGroupTableData()
{
// This is already a group table data. Salvage the source data and
// re-create a new group data.
- const shared_ptr<ScDPTableData>& pSource = pData->GetSourceTableData();
+ const std::shared_ptr<ScDPTableData>& pSource = pData->GetSourceTableData();
auto pGroupData = std::make_shared<ScDPGroupTableData>(pSource, mpDocument);
pDimData->WriteToData(*pGroupData);
mpTableData = pGroupData;
@@ -1005,7 +1003,7 @@ bool ScDPObject::SyncAllDimensionMembers()
bool ScDPObject::GetMemberNames( sal_Int32 nDim, Sequence<OUString>& rNames )
{
- vector<ScDPLabelData::Member> aMembers;
+ std::vector<ScDPLabelData::Member> aMembers;
if (!GetMembers(nDim, GetUsedHierarchy(nDim), aMembers))
return false;
@@ -1018,7 +1016,7 @@ bool ScDPObject::GetMemberNames( sal_Int32 nDim, Sequence<OUString>& rNames )
return true;
}
-bool ScDPObject::GetMembers( sal_Int32 nDim, sal_Int32 nHier, vector<ScDPLabelData::Member>& rMembers )
+bool ScDPObject::GetMembers( sal_Int32 nDim, sal_Int32 nHier, std::vector<ScDPLabelData::Member>& rMembers )
{
Reference< sheet::XMembersAccess > xMembersNA;
if (!GetMembersNA( nDim, nHier, xMembersNA ))
@@ -1026,7 +1024,7 @@ bool ScDPObject::GetMembers( sal_Int32 nDim, sal_Int32 nHier, vector<ScDPLabelDa
Reference<container::XIndexAccess> xMembersIA( new ScNameToIndexAccess(xMembersNA) );
sal_Int32 nCount = xMembersIA->getCount();
- vector<ScDPLabelData::Member> aMembers;
+ std::vector<ScDPLabelData::Member> aMembers;
aMembers.reserve(nCount);
for (sal_Int32 i = 0; i < nCount; ++i)
@@ -1161,7 +1159,7 @@ bool ScDPObject::GetDataFieldPositionData(
{
CreateOutput();
- vector<sheet::DataPilotFieldFilter> aFilters;
+ std::vector<sheet::DataPilotFieldFilter> aFilters;
if (!mpOutput->GetDataResultPositionData(aFilters, rPos))
return false;
@@ -2183,7 +2181,7 @@ static void lcl_FillOldFields( ScPivotFieldVector& rFields,
//TODO: merge multiple occurrences (data field with different functions)
//TODO: force data field in one dimension
- vector<tools::Long> aPos;
+ std::vector<tools::Long> aPos;
uno::Reference<container::XNameAccess> xDimsName = xSource->getDimensions();
uno::Reference<container::XIndexAccess> xDims = new ScNameToIndexAccess( xDimsName );
@@ -2629,7 +2627,7 @@ OUString lcl_GetDimName( const uno::Reference<sheet::XDimensionsSupplier>& xSour
return aName;
}
-bool hasFieldColumn(const vector<ScPivotField>* pRefFields, SCCOL nCol)
+bool hasFieldColumn(const std::vector<ScPivotField>* pRefFields, SCCOL nCol)
{
if (!pRefFields)
return false;
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index 1c6a0c102438..4cdf3d6f834f 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -71,7 +71,6 @@
#include <iostream>
using namespace com::sun::star;
-using ::std::vector;
using ::com::sun::star::beans::XPropertySet;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::UNO_QUERY;
@@ -100,11 +99,11 @@ class ScDPOutputImpl
{
ScDocument* mpDoc;
sal_uInt16 mnTab;
- ::std::vector< bool > mbNeedLineCols;
- ::std::vector< SCCOL > mnCols;
+ std::vector< bool > mbNeedLineCols;
+ std::vector< SCCOL > mnCols;
- ::std::vector< bool > mbNeedLineRows;
- ::std::vector< SCROW > mnRows;
+ std::vector< bool > mbNeedLineRows;
+ std::vector< SCROW > mnRows;
SCCOL mnTabStartCol;
SCROW mnTabStartRow;
@@ -1508,7 +1507,7 @@ void ScDPOutput::GetPositionData(const ScAddress& rPos, DataPilotTablePositionDa
{
case DataPilotTablePositionType::RESULT:
{
- vector<DataPilotFieldFilter> aFilters;
+ std::vector<DataPilotFieldFilter> aFilters;
GetDataResultPositionData(aFilters, rPos);
DataPilotTableResultData aResData;
@@ -1596,7 +1595,7 @@ void ScDPOutput::GetPositionData(const ScAddress& rPos, DataPilotTablePositionDa
}
}
-bool ScDPOutput::GetDataResultPositionData(vector<sheet::DataPilotFieldFilter>& rFilters, const ScAddress& rPos)
+bool ScDPOutput::GetDataResultPositionData(std::vector<sheet::DataPilotFieldFilter>& rFilters, const ScAddress& rPos)
{
// Check to make sure there is at least one data field.
Reference<beans::XPropertySet> xPropSet(mxSource, UNO_QUERY);
diff --git a/sc/source/core/data/dpoutputgeometry.cxx b/sc/source/core/data/dpoutputgeometry.cxx
index 0c5307258c9b..d9dd87217341 100644
--- a/sc/source/core/data/dpoutputgeometry.cxx
+++ b/sc/source/core/data/dpoutputgeometry.cxx
@@ -22,8 +22,6 @@
#include <vector>
-using ::std::vector;
-
ScDPOutputGeometry::ScDPOutputGeometry(const ScRange& rOutRange, bool bShowFilter) :
maOutRange(rOutRange),
mnRowFields(0),
@@ -72,12 +70,12 @@ void ScDPOutputGeometry::setCompactMode(bool bCompactMode)
mbCompactMode = bCompactMode;
}
-void ScDPOutputGeometry::getColumnFieldPositions(vector<ScAddress>& rAddrs) const
+void ScDPOutputGeometry::getColumnFieldPositions(std::vector<ScAddress>& rAddrs) const
{
sal_uInt32 nColumnFields, nRowFields;
adjustFieldsForDataLayout(nColumnFields, nRowFields);
- vector<ScAddress> aAddrs;
+ std::vector<ScAddress> aAddrs;
if (!nColumnFields)
{
rAddrs.swap(aAddrs);
@@ -107,12 +105,12 @@ void ScDPOutputGeometry::getColumnFieldPositions(vector<ScAddress>& rAddrs) cons
rAddrs.swap(aAddrs);
}
-void ScDPOutputGeometry::getRowFieldPositions(vector<ScAddress>& rAddrs) const
+void ScDPOutputGeometry::getRowFieldPositions(std::vector<ScAddress>& rAddrs) const
{
sal_uInt32 nColumnFields, nRowFields;
adjustFieldsForDataLayout(nColumnFields, nRowFields);
- vector<ScAddress> aAddrs;
+ std::vector<ScAddress> aAddrs;
if (!nRowFields)
{
rAddrs.swap(aAddrs);
@@ -132,9 +130,9 @@ void ScDPOutputGeometry::getRowFieldPositions(vector<ScAddress>& rAddrs) const
rAddrs.swap(aAddrs);
}
-void ScDPOutputGeometry::getPageFieldPositions(vector<ScAddress>& rAddrs) const
+void ScDPOutputGeometry::getPageFieldPositions(std::vector<ScAddress>& rAddrs) const
{
- vector<ScAddress> aAddrs;
+ std::vector<ScAddress> aAddrs;
if (!mnPageFields)
{
rAddrs.swap(aAddrs);
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index 79cdc86e5af7..fce29e78358a 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -52,7 +52,6 @@
using namespace com::sun::star;
using namespace com::sun::star::sheet;
-using ::std::unique_ptr;
#define SC_DPSAVEMODE_DONTKNOW 2
@@ -162,21 +161,21 @@ void ScDPSaveMember::WriteToSource( const uno::Reference<uno::XInterface>& xMemb
void ScDPSaveMember::Dump(int nIndent) const
{
std::string aIndent(nIndent*4, ' ');
- cout << aIndent << "* member name: '" << aName << "'" << endl;
+ std::cout << aIndent << "* member name: '" << aName << "'" << std::endl;
- cout << aIndent << " + layout name: ";
+ std::cout << aIndent << " + layout name: ";
if (mpLayoutName)
- cout << "'" << *mpLayoutName << "'";
+ std::cout << "'" << *mpLayoutName << "'";
else
- cout << "(none)";
- cout << endl;
+ std::cout << "(none)";
+ std::cout << std::endl;
- cout << aIndent << " + visibility: ";
+ std::cout << aIndent << " + visibility: ";
if (nVisibleMode == SC_DPSAVEMODE_DONTKNOW)
- cout << "(unknown)";
+ std::cout << "(unknown)";
else
- cout << (nVisibleMode ? "visible" : "hidden");
- cout << endl;
+ std::cout << (nVisibleMode ? "visible" : "hidden");
+ std::cout << std::endl;
}
#endif
@@ -652,38 +651,38 @@ void ScDPSaveDimension::Dump(int nIndent) const
static const char* const pOrientNames[] = { "hidden", "column", "row", "page", "data" };
std::string aIndent(nIndent*4, ' ');
- cout << aIndent << "* dimension name: '" << aName << "'" << endl;
+ std::cout << aIndent << "* dimension name: '" << aName << "'" << std::endl;
- cout << aIndent << " + orientation: ";
+ std::cout << aIndent << " + orientation: ";
if (nOrientation <= DataPilotFieldOrientation_DATA)
- cout << pOrientNames[static_cast<int>(nOrientation)];
+ std::cout << pOrientNames[static_cast<int>(nOrientation)];
else
- cout << "(invalid)";
- cout << endl;
+ std::cout << "(invalid)";
+ std::cout << std::endl;
- cout << aIndent << " + layout name: ";
+ std::cout << aIndent << " + layout name: ";
if (mpLayoutName)
- cout << "'" << *mpLayoutName << "'";
+ std::cout << "'" << *mpLayoutName << "'";
else
- cout << "(none)";
- cout << endl;
+ std::cout << "(none)";
+ std::cout << std::endl;
- cout << aIndent << " + subtotal name: ";
+ std::cout << aIndent << " + subtotal name: ";
if (mpSubtotalName)
- cout << "'" << *mpSubtotalName << "'";
+ std::cout << "'" << *mpSubtotalName << "'";
else
- cout << "(none)";
- cout << endl;
+ std::cout << "(none)";
+ std::cout << std::endl;
- cout << aIndent << " + is data layout: " << (bIsDataLayout ? "yes" : "no") << endl;
- cout << aIndent << " + is duplicate: " << (bDupFlag ? "yes" : "no") << endl;
+ std::cout << aIndent << " + is data layout: " << (bIsDataLayout ? "yes" : "no") << std::endl;
+ std::cout << aIndent << " + is duplicate: " << (bDupFlag ? "yes" : "no") << std::endl;
for (ScDPSaveMember* pMem : maMemberList)
{
pMem->Dump(nIndent+1);
}
- cout << endl; // blank line
+ std::cout << std::endl; // blank line
}
#endif
@@ -1265,7 +1264,7 @@ void ScDPSaveData::BuildAllDimensionMembers(ScDPTableData* pData)
// this member instance already exists. nothing to do.
continue;
- unique_ptr<ScDPSaveMember> pNewMember(new ScDPSaveMember(aMemName));
+ std::unique_ptr<ScDPSaveMember> pNewMember(new ScDPSaveMember(aMemName));
pNewMember->SetIsVisible(true);
iter->AddMember(std::move(pNewMember));
}
diff --git a/sc/source/core/data/dpsdbtab.cxx b/sc/source/core/data/dpsdbtab.cxx
index b56217c27f43..a212d26c976f 100644
--- a/sc/source/core/data/dpsdbtab.cxx
+++ b/sc/source/core/data/dpsdbtab.cxx
@@ -28,7 +28,6 @@
using namespace com::sun::star;
-using ::std::vector;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Any;
diff --git a/sc/source/core/data/dpshttab.cxx b/sc/source/core/data/dpshttab.cxx
index ae9407a6a64c..f8cfa6de61e9 100644
--- a/sc/source/core/data/dpshttab.cxx
+++ b/sc/source/core/data/dpshttab.cxx
@@ -38,7 +38,6 @@
using namespace ::com::sun::star;
using ::com::sun::star::uno::Any;
using ::com::sun::star::uno::Sequence;
-using ::std::vector;
ScSheetDPData::ScSheetDPData(const ScDocument* pD, const ScSheetSourceDesc& rDesc, const ScDPCache& rCache) :
ScDPTableData(pD),
diff --git a/sc/source/core/data/dptabdat.cxx b/sc/source/core/data/dptabdat.cxx
index 7b3c80712404..d9706f961e2d 100644
--- a/sc/source/core/data/dptabdat.cxx
+++ b/sc/source/core/data/dptabdat.cxx
@@ -27,7 +27,6 @@
using namespace ::com::sun::star;
-using ::std::vector;
ScDPTableData::CalcInfo::CalcInfo() :
pInitState( nullptr ),
@@ -187,7 +186,7 @@ void ScDPTableData::ProcessRowData(CalcInfo& rInfo, const CalcRowData& rData, bo
//TODO: single process method with ColMembers, RowMembers and data !!!
if (rInfo.pColRoot->GetChildDimension())
{
- vector<SCROW> aEmptyData;
+ std::vector<SCROW> aEmptyData;
rInfo.pColRoot->GetChildDimension()->ProcessData(rData.aColData, nullptr, aEmptyData, rData.aValues);
}
@@ -215,7 +214,7 @@ void ScDPTableData::CalcResultsFromCacheTable(const ScDPFilteredCache& rCacheTab
}
void ScDPTableData::GetItemData(const ScDPFilteredCache& rCacheTable, sal_Int32 nRow,
- const vector<sal_Int32>& rDims, vector<SCROW>& rItemData)
+ const std::vector<sal_Int32>& rDims, std::vector<SCROW>& rItemData)
{
sal_Int32 nDimSize = rDims.size();
rItemData.reserve(rItemData.size() + nDimSize);
@@ -250,7 +249,7 @@ const ScDPItemData* ScDPTableData::GetMemberByIndex( sal_Int32 nDim, sal_Int32 n
if ( nIndex >= GetMembersCount( nDim ) )
return nullptr;
- const ::std::vector<SCROW>& nMembers = GetCacheTable().getFieldEntries( nDim );
+ const std::vector<SCROW>& nMembers = GetCacheTable().getFieldEntries( nDim );
return GetCacheTable().getCache().GetItemDataById( static_cast<SCCOL>(nDim), static_cast<SCROW>(nMembers[nIndex]) );
}
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index d074343dcc01..b32d419919eb 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -53,8 +53,6 @@
#include <com/sun/star/sheet/GeneralFunction2.hpp>
using namespace com::sun::star;
-using ::std::vector;
-using ::std::pair;
using ::com::sun::star::uno::Sequence;
namespace {
@@ -1017,7 +1015,7 @@ bool ScDPResultMember::IsNamedItem( SCROW nIndex ) const
return false;
}
-bool ScDPResultMember::IsValidEntry( const vector< SCROW >& aMembers ) const
+bool ScDPResultMember::IsValidEntry( const std::vector< SCROW >& aMembers ) const
{
if ( !IsValid() )
return false;
@@ -1028,15 +1026,15 @@ bool ScDPResultMember::IsValidEntry( const vector< SCROW >& aMembers ) const
if (aMembers.size() < 2)
return false;
- vector<SCROW>::const_iterator itr = aMembers.begin();
- vector<SCROW> aChildMembers(++itr, aMembers.end());
+ std::vector<SCROW>::const_iterator itr = aMembers.begin();
+ std::vector<SCROW> aChildMembers(++itr, aMembers.end());
return pChildDim->IsValidEntry(aChildMembers);
}
else
return true;
}
-void ScDPResultMember::InitFrom( const vector<ScDPDimension*>& ppDim, const vector<ScDPLevel*>& ppLev,
+void ScDPResultMember::InitFrom( const std::vector<ScDPDimension*>& ppDim, const std::vector<ScDPLevel*>& ppLev,
size_t nPos, ScDPInitState& rInitState ,
bool bInitChild )
{
@@ -1081,7 +1079,7 @@ void ScDPResultMember::InitFrom( const vector<ScDPDimension*>& ppDim, const vect
}
void ScDPResultMember::LateInitFrom(
- LateInitParams& rParams, const vector<SCROW>& pItemData, size_t nPos, ScDPInitState& rInitState)
+ LateInitParams& rParams, const std::vector<SCROW>& pItemData, size_t nPos, ScDPInitState& rInitState)
{
// without LateInit, everything has already been initialized
if ( !pResultData->IsLateInit() )
@@ -1254,8 +1252,8 @@ tools::Long ScDPResultMember::GetSubTotalCount( tools::Long* pUserSubStart ) con
return 0;
}
-void ScDPResultMember::ProcessData( const vector< SCROW >& aChildMembers, const ScDPResultDimension* pDataDim,
- const vector< SCROW >& aDataMembers, const vector<ScDPValue>& aValues )
+void ScDPResultMember::ProcessData( const std::vector< SCROW >& aChildMembers, const ScDPResultDimension* pDataDim,
+ const std::vector< SCROW >& aDataMembers, const std::vector<ScDPValue>& aValues )
{
SetHasElements();
@@ -1910,7 +1908,7 @@ static tools::Long lcl_GetSubTotalPos( const ScDPSubTotalState& rSubState )
return nRet;
}
-void ScDPDataMember::UpdateValues( const vector<ScDPValue>& aValues, const ScDPSubTotalState& rSubState )
+void ScDPDataMember::UpdateValues( const std::vector<ScDPValue>& aValues, const ScDPSubTotalState& rSubState )
{
//TODO: find out how many and which subtotals are used
@@ -1934,7 +1932,7 @@ void ScDPDataMember::UpdateValues( const vector<ScDPValue>& aValues, const ScDPS
}
}
-void ScDPDataMember::ProcessData( const vector< SCROW >& aChildMembers, const vector<ScDPValue>& aValues,
+void ScDPDataMember::ProcessData( const std::vector< SCROW >& aChildMembers, const std::vector<ScDPValue>& aValues,
const ScDPSubTotalState& rSubState )
{
if ( pResultData->IsLateInit() && !pChildDimension && pResultMember && pResultMember->GetChildDimension() )
@@ -2797,7 +2795,7 @@ ScDPResultMember *ScDPResultDimension::FindMember( SCROW iData ) const
}
void ScDPResultDimension::InitFrom(
- const vector<ScDPDimension*>& ppDim, const vector<ScDPLevel*>& ppLev,
+ const std::vector<ScDPDimension*>& ppDim, const std::vector<ScDPLevel*>& ppLev,
size_t nPos, ScDPInitState& rInitState, bool bInitChild )
{
if (nPos >= ppDim.size() || nPos >= ppLev.size())
@@ -2865,7 +2863,7 @@ void ScDPResultDimension::InitFrom(
}
void ScDPResultDimension::LateInitFrom(
- LateInitParams& rParams, const vector<SCROW>& pItemData, size_t nPos, ScDPInitState& rInitState)
+ LateInitParams& rParams, const std::vector<SCROW>& pItemData, size_t nPos, ScDPInitState& rInitState)
{
if ( rParams.IsEnd( nPos ) )
return;
@@ -3004,7 +3002,7 @@ tools::Long ScDPResultDimension::GetSize(tools::Long nMeasure) const
return nTotal;
}
-bool ScDPResultDimension::IsValidEntry( const vector< SCROW >& aMembers ) const
+bool ScDPResultDimension::IsValidEntry( const std::vector< SCROW >& aMembers ) const
{
if (aMembers.empty())
return false;
@@ -3018,10 +3016,10 @@ bool ScDPResultDimension::IsValidEntry( const vector< SCROW >& aMembers ) const
return false;
}
-void ScDPResultDimension::ProcessData( const vector< SCROW >& aMembers,
+void ScDPResultDimension::ProcessData( const std::vector< SCROW >& aMembers,
const ScDPResultDimension* pDataDim,
- const vector< SCROW >& aDataMembers,
- const vector<ScDPValue>& aValues ) const
+ const std::vector< SCROW >& aDataMembers,
+ const std::vector<ScDPValue>& aValues ) const
{
if (aMembers.empty())
return;
@@ -3029,10 +3027,10 @@ void ScDPResultDimension::ProcessData( const vector< SCROW >& aMembers,
ScDPResultMember* pMember = FindMember( aMembers[0] );
if ( nullptr != pMember )
{
- vector<SCROW> aChildMembers;
+ std::vector<SCROW> aChildMembers;
if (aMembers.size() > 1)
{
- vector<SCROW>::const_iterator itr = aMembers.begin();
+ std::vector<SCROW>::const_iterator itr = aMembers.begin();
aChildMembers.insert(aChildMembers.begin(), ++itr, aMembers.end());
}
pMember->ProcessData( aChildMembers, pDataDim, aDataMembers, aValues );
@@ -3578,7 +3576,7 @@ void ScDPDataDimension::InitFrom( const ScDPResultDimension* pDim )
}
}
-void ScDPDataDimension::ProcessData( const vector< SCROW >& aDataMembers, const vector<ScDPValue>& aValues,
+void ScDPDataDimension::ProcessData( const std::vector< SCROW >& aDataMembers, const std::vector<ScDPValue>& aValues,
const ScDPSubTotalState& rSubState )
{
// the ScDPItemData array must contain enough entries for all dimensions - this isn't checked
@@ -3591,10 +3589,10 @@ void ScDPDataDimension::ProcessData( const vector< SCROW >& aDataMembers, const
// always first member for data layout dim
if ( bIsDataLayout || ( !aDataMembers.empty() && pMember->IsNamedItem(aDataMembers[0]) ) )
{
- vector<SCROW> aChildDataMembers;
+ std::vector<SCROW> aChildDataMembers;
if (aDataMembers.size() > 1)
{
- vector<SCROW>::const_iterator itr = aDataMembers.begin();
+ std::vector<SCROW>::const_iterator itr = aDataMembers.begin();
aChildDataMembers.insert(aChildDataMembers.begin(), ++itr, aDataMembers.end());
}
pMember->ProcessData( aChildDataMembers, aValues, rSubState );
@@ -3907,7 +3905,7 @@ void ScDPResultVisibilityData::addVisibleMember(const OUString& rDimName, const
DimMemberType::iterator itr = maDimensions.find(rDimName);
if (itr == maDimensions.end())
{
- pair<DimMemberType::iterator, bool> r = maDimensions.emplace(
+ std::pair<DimMemberType::iterator, bool> r = maDimensions.emplace(
rDimName, VisibleMemberType());
if (!r.second)
@@ -3920,7 +3918,7 @@ void ScDPResultVisibilityData::addVisibleMember(const OUString& rDimName, const
rMem.insert(rMemberItem);
}
-void ScDPResultVisibilityData::fillFieldFilters(vector<ScDPFilteredCache::Criterion>& rFilters) const
+void ScDPResultVisibilityData::fillFieldFilters(std::vector<ScDPFilteredCache::Criterion>& rFilters) const
{
typedef std::unordered_map<OUString, tools::Long> FieldNameMapType;
FieldNameMapType aFieldNames;
@@ -3956,7 +3954,7 @@ void ScDPResultVisibilityData::fillFieldFilters(vector<ScDPFilteredCache::Criter
ScDPMembers* pMembers = pDim->GetHierarchiesObject()->getByIndex(0)->
GetLevelsObject()->getByIndex(0)->GetMembersObject();
if (pGrpFilter->getMatchItemCount() < o3tl::make_unsigned(pMembers->getCount()))
- rFilters.push_back(aCri);
+ rFilters.push_back(std::move(aCri));
}
}
@@ -4071,7 +4069,7 @@ ResultMembers::~ResultMembers()
}
LateInitParams::LateInitParams(
- const vector<ScDPDimension*>& ppDim, const vector<ScDPLevel*>& ppLev, bool bRow ) :
+ const std::vector<ScDPDimension*>& ppDim, const std::vector<ScDPLevel*>& ppLev, bool bRow ) :
mppDim( ppDim ),
mppLev( ppLev ),
mbRow( bRow ),
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index 61123f89cd8a..ba8f3d55ab78 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -56,7 +56,6 @@
#include <com/sun/star/i18n/CalendarDisplayIndex.hpp>
using namespace com::sun::star;
-using ::std::vector;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Any;
using ::com::sun::star::sheet::DataPilotFieldAutoShowInfo;
@@ -421,7 +420,7 @@ Sequence< Sequence<Any> > SAL_CALL ScDPSource::getDrillDownData(const Sequence<s
{
sal_Int32 nColumnCount = GetData()->GetColumnCount();
- vector<ScDPFilteredCache::Criterion> aFilterCriteria;
+ std::vector<ScDPFilteredCache::Criterion> aFilterCriteria;
for (const sheet::DataPilotFieldFilter& rFilter : aFilters)
{
const OUString& aFieldName = rFilter.FieldName;
@@ -516,7 +515,7 @@ void ScDPSource::disposeData()
mbResultOverflow = false;
}
-static tools::Long lcl_CountMinMembers(const vector<ScDPDimension*>& ppDim, const vector<ScDPLevel*>& ppLevel, tools::Long nLevels )
+static tools::Long lcl_CountMinMembers(const std::vector<ScDPDimension*>& ppDim, const std::vector<ScDPLevel*>& ppLevel, tools::Long nLevels )
{
// Calculate the product of the member count for those consecutive levels that
// have the "show all" flag, one following level, and the data layout dimension.
@@ -673,7 +672,7 @@ void ScDPSource::FilterCacheByPageDimensions()
}
// filter table by page dimensions.
- vector<ScDPFilteredCache::Criterion> aCriteria;
+ std::vector<ScDPFilteredCache::Criterion> aCriteria;
for (const auto& rDimIndex : maPageDims)
{
ScDPDimension* pDim = GetDimensionsObject()->getByIndex(rDimIndex);
@@ -699,7 +698,7 @@ void ScDPSource::FilterCacheByPageDimensions()
}
if (pGrpFilter->getMatchItemCount() < o3tl::make_unsigned(nMemCount))
// there is at least one invisible item. Add this filter criterion to the mix.
- aCriteria.push_back(aFilter);
+ aCriteria.push_back(std::move(aFilter));
if (!pDim->HasSelectedPage())
continue;
@@ -736,10 +735,10 @@ void ScDPSource::CreateRes_Impl()
// TODO: Aggregate pDataNames, pDataRefValues, nDataRefOrient, and
// eDataFunctions into a structure and use vector instead of static
// or pointer arrays.
- vector<OUString> aDataNames;
- vector<sheet::DataPilotFieldReference> aDataRefValues;
- vector<ScSubTotalFunc> aDataFunctions;
- vector<sheet::DataPilotFieldOrientation> aDataRefOrient;
+ std::vector<OUString> aDataNames;
+ std::vector<sheet::DataPilotFieldReference> aDataRefValues;
+ std::vector<ScSubTotalFunc> aDataFunctions;
+ std::vector<sheet::DataPilotFieldOrientation> aDataRefOrient;
ScDPTableData::CalcInfo aInfo;
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index d41f21e86d71..88103e4ed20a 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -317,14 +317,14 @@ ScDrawLayer::ScDrawLayer( ScDocument* pDocument, OUString _aName ) :
rHitOutliner.SetStyleSheetPool(static_cast<SfxStyleSheetPool*>(GetStyleSheetPool()));
// set FontHeight pool defaults without changing static SdrEngineDefaults
- SfxItemPool* pOutlinerPool = rOutliner.GetEditTextObjectPool();
+ SfxItemPool* pOutlinerPool = rOutliner.GetEditEnginePool();
if ( pOutlinerPool )
{
m_pItemPool->SetUserDefaultItem(SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT )); // 12Pt
m_pItemPool->SetUserDefaultItem(SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT_CJK )); // 12Pt
m_pItemPool->SetUserDefaultItem(SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT_CTL )); // 12Pt
}
- SfxItemPool* pHitOutlinerPool = rHitOutliner.GetEditTextObjectPool();
+ SfxItemPool* pHitOutlinerPool = rHitOutliner.GetEditEnginePool();
if ( pHitOutlinerPool )
{
pHitOutlinerPool->SetUserDefaultItem(SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT )); // 12Pt
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 832c0db8843c..e17e0d69a2de 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -3261,10 +3261,9 @@ bool ScFormulaCell::UpdateReferenceOnShift(
// Check presence of any references or column row names.
bool bHasRefs = pCode->HasReferences();
- bool bHasColRowNames = false;
+ bool bHasColRowNames = (formula::FormulaTokenArrayPlainIterator(*pCode).GetNextColRowName() != nullptr);
if (!bHasRefs)
{
- bHasColRowNames = (formula::FormulaTokenArrayPlainIterator(*pCode).GetNextColRowName() != nullptr);
bHasRefs = bHasColRowNames;
}
bool bOnRefMove = pCode->IsRecalcModeOnRefMove();
@@ -5621,48 +5620,48 @@ void ScFormulaCell::SyncSharedCode()
void ScFormulaCell::Dump() const
{
- cout << "-- formula cell (" << aPos.Format(ScRefFlags::VALID | ScRefFlags::TAB_3D, &rDocument) << ")" << endl;
- cout << " * shared: " << (mxGroup ? "true" : "false") << endl;
+ std::cout << "-- formula cell (" << aPos.Format(ScRefFlags::VALID | ScRefFlags::TAB_3D, &rDocument) << ")" << std::endl;
+ std::cout << " * shared: " << (mxGroup ? "true" : "false") << std::endl;
if (mxGroup)
{
- cout << " * shared length: " << mxGroup->mnLength << endl;
- cout << " * shared calc state: " << mxGroup->meCalcState << endl;
+ std::cout << " * shared length: " << mxGroup->mnLength << std::endl;
+ std::cout << " * shared calc state: " << mxGroup->meCalcState << std::endl;
}
sc::TokenStringContext aCxt(rDocument, rDocument.GetGrammar());
- cout << " * code: " << pCode->CreateString(aCxt, aPos) << endl;
+ std::cout << " * code: " << pCode->CreateString(aCxt, aPos) << std::endl;
FormulaError nErrCode = pCode->GetCodeError();
- cout << " * code error: ";
+ std::cout << " * code error: ";
if (nErrCode == FormulaError::NONE)
- cout << "(none)";
+ std::cout << "(none)";
else
{
OUString aStr = ScGlobal::GetErrorString(nErrCode);
- cout << " * code error: " << aStr << " (" << int(nErrCode) << ")";
+ std::cout << " * code error: " << aStr << " (" << int(nErrCode) << ")";
}
- cout << endl;
+ std::cout << std::endl;
- cout << " * result: ";
+ std::cout << " * result: ";
sc::FormulaResultValue aRV = aResult.GetResult();
switch (aRV.meType)
{
case sc::FormulaResultValue::Value:
- cout << aRV.mfValue << " (value)";
+ std::cout << aRV.mfValue << " (value)";
break;
case sc::FormulaResultValue::String:
- cout << aRV.maString.getString() << " (string)";
+ std::cout << aRV.maString.getString() << " (string)";
break;
case sc::FormulaResultValue::Error:
- cout << ScGlobal::GetErrorString(aRV.mnError) << " (error: " << int(aRV.mnError) << ")";
+ std::cout << ScGlobal::GetErrorString(aRV.mnError) << " (error: " << int(aRV.mnError) << ")";
break;
case sc::FormulaResultValue::Invalid:
- cout << "(invalid)";
+ std::cout << "(invalid)";
break;
default:
;
}
- cout << endl;
+ std::cout << std::endl;
}
#endif
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 1ef9ba071c18..e0a7ac4a4288 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -164,11 +164,6 @@ sal_uInt32 ScGlobal::GetStandardFormat( ScInterpreterContext& rContext,
return rContext.NFGetStandardFormat( nType, eLnge );
}
-sal_uInt16 ScGlobal::GetStandardRowHeight()
-{
- return nStdRowHeight;
-}
-
SvNumberFormatter* ScGlobal::GetEnglishFormatter()
{
assert(!bThreadedGroupCalcInProgress);
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index ceff826a43ca..08b28d8dbd7c 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -418,7 +418,9 @@ ScPatternAttr::ScPatternAttr(CellAttributeHelper& rHelper, const SfxItemSet* pIt
ScPatternAttr::ScPatternAttr(const ScPatternAttr& rPatternAttr)
: maLocalSfxItemSet(rPatternAttr.maLocalSfxItemSet)
, moName(rPatternAttr.moName)
-, mxVisible()
+, mxVisible(rPatternAttr.mxVisible)
+, mxNumberFormatKey(rPatternAttr.mxNumberFormatKey)
+, mxLanguageType(rPatternAttr.mxLanguageType)
, pStyle(rPatternAttr.pStyle)
, pCellAttributeHelper(rPatternAttr.pCellAttributeHelper)
, mnPAKey(rPatternAttr.mnPAKey)
@@ -1286,7 +1288,7 @@ void ScPatternAttr::GetFromEditItemSet( const SfxItemSet* pEditSet )
{
if( !pEditSet )
return;
- GetFromEditItemSet( GetItemSet(), *pEditSet );
+ GetFromEditItemSet(maLocalSfxItemSet, *pEditSet);
InvalidateCaches();
}
@@ -1312,7 +1314,6 @@ void ScPatternAttr::FillEditParaItems( SfxItemSet* pEditSet ) const
void ScPatternAttr::DeleteUnchanged( const ScPatternAttr* pOldAttrs )
{
- SfxItemSet& rThisSet = GetItemSet();
const SfxItemSet& rOldSet = pOldAttrs->GetItemSet();
const SfxPoolItem* pThisItem;
@@ -1321,7 +1322,7 @@ void ScPatternAttr::DeleteUnchanged( const ScPatternAttr* pOldAttrs )
for ( sal_uInt16 nSubWhich=ATTR_PATTERN_START; nSubWhich<=ATTR_PATTERN_END; nSubWhich++ )
{
// only items that are set are interesting
- if ( rThisSet.GetItemState( nSubWhich, false, &pThisItem ) == SfxItemState::SET )
+ if ( maLocalSfxItemSet.GetItemState( nSubWhich, false, &pThisItem ) == SfxItemState::SET )
{
SfxItemState eOldState = rOldSet.GetItemState( nSubWhich, true, &pOldItem );
if ( eOldState == SfxItemState::SET )
@@ -1329,16 +1330,16 @@ void ScPatternAttr::DeleteUnchanged( const ScPatternAttr* pOldAttrs )
// item is set in OldAttrs (or its parent) -> compare pointers
if (SfxPoolItem::areSame( pThisItem, pOldItem ))
{
- rThisSet.ClearItem( nSubWhich );
+ maLocalSfxItemSet.ClearItem( nSubWhich );
InvalidateCaches();
}
}
else if ( eOldState != SfxItemState::INVALID )
{
// not set in OldAttrs -> compare item value to default item
- if ( *pThisItem == rThisSet.GetPool()->GetUserOrPoolDefaultItem( nSubWhich ) )
+ if ( *pThisItem == maLocalSfxItemSet.GetPool()->GetUserOrPoolDefaultItem( nSubWhich ) )
{
- rThisSet.ClearItem( nSubWhich );
+ maLocalSfxItemSet.ClearItem( nSubWhich );
InvalidateCaches();
}
}
@@ -1348,18 +1349,16 @@ void ScPatternAttr::DeleteUnchanged( const ScPatternAttr* pOldAttrs )
bool ScPatternAttr::HasItemsSet( const sal_uInt16* pWhich ) const
{
- const SfxItemSet& rSet = GetItemSet();
for (sal_uInt16 i=0; pWhich[i]; i++)
- if ( rSet.GetItemState( pWhich[i], false ) == SfxItemState::SET )
+ if ( maLocalSfxItemSet.GetItemState( pWhich[i], false ) == SfxItemState::SET )
return true;
return false;
}
void ScPatternAttr::ClearItems( const sal_uInt16* pWhich )
{
- SfxItemSet& rSet = GetItemSet();
for (sal_uInt16 i=0; pWhich[i]; i++)
- rSet.ClearItem(pWhich[i]);
+ maLocalSfxItemSet.ClearItem(pWhich[i]);
InvalidateCaches();
}
@@ -1426,7 +1425,7 @@ CellAttributeHolder ScPatternAttr::MigrateToDocument( ScDocument* pDestDoc, ScDo
{
const SfxItemSet* pSrcSet = &GetItemSet();
ScPatternAttr* pDestPattern(new ScPatternAttr(pDestDoc->getCellAttributeHelper()));
- SfxItemSet* pDestSet(&pDestPattern->GetItemSet());
+ SfxItemSet* pDestSet(&pDestPattern->GetItemSetWritable());
// Copy cell pattern style to other document:
if ( pDestDoc != pSrcDoc )
@@ -1559,7 +1558,6 @@ void ScPatternAttr::SetStyleSheet( ScStyleSheet* pNewStyle, bool bClearDirectFor
{
if (pNewStyle)
{
- SfxItemSet& rPatternSet = GetItemSet();
const SfxItemSet& rStyleSet = pNewStyle->GetItemSet();
if (bClearDirectFormat)
@@ -1567,17 +1565,17 @@ void ScPatternAttr::SetStyleSheet( ScStyleSheet* pNewStyle, bool bClearDirectFor
for (sal_uInt16 i=ATTR_PATTERN_START; i<=ATTR_PATTERN_END; i++)
{
if (rStyleSet.GetItemState(i) == SfxItemState::SET)
- rPatternSet.ClearItem(i);
+ maLocalSfxItemSet.ClearItem(i);
}
}
- rPatternSet.SetParent(&pNewStyle->GetItemSet());
+ maLocalSfxItemSet.SetParent(&pNewStyle->GetItemSet());
pStyle = pNewStyle;
moName.reset();
}
else
{
OSL_FAIL( "ScPatternAttr::SetStyleSheet( NULL ) :-|" );
- GetItemSet().SetParent(nullptr);
+ maLocalSfxItemSet.SetParent(nullptr);
pStyle = nullptr;
}
InvalidateCaches();
@@ -1601,7 +1599,7 @@ bool ScPatternAttr::UpdateStyleSheet(const ScDocument& rDoc)
if (pStyle)
{
- GetItemSet().SetParent(&pStyle->GetItemSet());
+ maLocalSfxItemSet.SetParent(&pStyle->GetItemSet());
moName.reset();
}
}
@@ -1622,7 +1620,7 @@ void ScPatternAttr::StyleToName()
{
moName = pStyle->GetName();
pStyle = nullptr;
- GetItemSet().SetParent( nullptr );
+ maLocalSfxItemSet.SetParent( nullptr );
InvalidateCaches();
}
}
@@ -1801,4 +1799,50 @@ void ScPatternAttr::InvalidateCaches()
mxLanguageType.reset();
}
+SfxItemSet& ScPatternAttr::GetItemSetWritable()
+{
+ // Generally have to assume that caches are invalid
+ // after this is used.
+ InvalidateCaches();
+ return maLocalSfxItemSet;
+}
+
+void ScPatternAttr::InvalidateCacheFor(sal_uInt16 nWhich)
+{
+ switch (nWhich)
+ {
+ case ATTR_LANGUAGE_FORMAT:
+ mxLanguageType.reset();
+ break;
+ case ATTR_VALUE_FORMAT:
+ mxNumberFormatKey.reset();
+ break;
+ case ATTR_BACKGROUND:
+ case ATTR_BORDER:
+ case ATTR_BORDER_TLBR:
+ case ATTR_BORDER_BLTR:
+ case ATTR_SHADOW:
+ mxVisible.reset();
+ break;
+ }
+}
+
+void ScPatternAttr::ItemSetPut(const SfxPoolItem& rItem)
+{
+ InvalidateCacheFor(rItem.Which());
+ maLocalSfxItemSet.Put(rItem);
+}
+
+void ScPatternAttr::ItemSetPut(std::unique_ptr<SfxPoolItem> xItem)
+{
+ InvalidateCacheFor(xItem->Which());
+ maLocalSfxItemSet.Put(std::move(xItem));
+}
+
+void ScPatternAttr::ItemSetClearItem(sal_uInt16 nWhich)
+{
+ InvalidateCacheFor(nWhich);
+ maLocalSfxItemSet.ClearItem(nWhich);
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/pivot2.cxx b/sc/source/core/data/pivot2.cxx
index c854b452c20e..29308dfeb29e 100644
--- a/sc/source/core/data/pivot2.cxx
+++ b/sc/source/core/data/pivot2.cxx
@@ -20,13 +20,6 @@
#include <pivot.hxx>
#include <utility>
-#if DEBUG_PIVOT_TABLE
-using std::cout;
-using std::endl;
-#endif
-
-
-
// ScDPName
ScDPName::ScDPName() : mnDupCount(0)
@@ -153,9 +146,9 @@ ScPivotFuncData::ScPivotFuncData( SCCOL nCol, PivotFunc nFuncMask ) :
#if DEBUG_PIVOT_TABLE
void ScPivotFuncData::Dump() const
{
- cout << "ScPivotFuncData: (col=" << mnCol << ", original dim=" << mnOriginalDim
+ std::cout << "ScPivotFuncData: (col=" << mnCol << ", original dim=" << mnOriginalDim
<< ", func mask=" << static_cast<int>(mnFuncMask) << ", duplicate count=" << static_cast<int>(mnDupCount)
- << ")" << endl;
+ << ")" << std::endl;
}
#endif
diff --git a/sc/source/core/data/poolcach.cxx b/sc/source/core/data/poolcach.cxx
index 6db714bb7c12..4107dd89f180 100644
--- a/sc/source/core/data/poolcach.cxx
+++ b/sc/source/core/data/poolcach.cxx
@@ -64,11 +64,11 @@ const CellAttributeHolder& ScItemPoolCache::ApplyTo(const CellAttributeHolder& r
if (nullptr != aItemToPut.getItem())
{
- pNewItem->GetItemSet().Put(*aItemToPut.getItem());
+ pNewItem->ItemSetPut(*aItemToPut.getItem());
}
else
{
- pNewItem->GetItemSet().Put(*pSetToPut);
+ pNewItem->GetItemSetWritable().Put(*pSetToPut);
}
m_aCache.emplace_back(rOrigItem, CellAttributeHolder(pNewItem, true));
diff --git a/sc/source/core/data/poolhelp.cxx b/sc/source/core/data/poolhelp.cxx
index 829c3f69e27d..21384dac1683 100644
--- a/sc/source/core/data/poolhelp.cxx
+++ b/sc/source/core/data/poolhelp.cxx
@@ -35,23 +35,12 @@ ScPoolHelper::ScPoolHelper( ScDocument& rSourceDoc )
ScPoolHelper::~ScPoolHelper()
{
- mpEditTextObjectPool.clear();
mpEditEnginePool.clear();
pFormTable.reset();
mxStylePool.clear();
pDocPool.clear();
}
-SfxItemPool* ScPoolHelper::GetEditTextObjectPool() const
-{
- if ( !mpEditTextObjectPool )
- {
- mpEditTextObjectPool = EditEngine::CreatePool();
- mpEditTextObjectPool->SetDefaultMetric( MapUnit::Map100thMM );
- }
- return mpEditTextObjectPool.get();
-}
-
SfxItemPool* ScPoolHelper::GetEditEnginePool() const
{
if ( !mpEditEnginePool )
diff --git a/sc/source/core/data/segmenttree.cxx b/sc/source/core/data/segmenttree.cxx
index 470cc90ff2f4..e3962aa510fc 100644
--- a/sc/source/core/data/segmenttree.cxx
+++ b/sc/source/core/data/segmenttree.cxx
@@ -27,8 +27,6 @@
#include <global.hxx>
#include <rtl/strbuf.hxx>
-using ::std::numeric_limits;
-
namespace {
template<typename ValueType_, typename ExtValueType_ = ValueType_>
@@ -289,7 +287,7 @@ void ScFlatSegmentsImpl<ValueType_, ExtValueType_>::insertSegment(SCCOLROW nPos,
template<typename ValueType_, typename ExtValueType_>
SCCOLROW ScFlatSegmentsImpl<ValueType_, ExtValueType_>::findLastTrue(ValueType nValue) const
{
- SCCOLROW nPos = numeric_limits<SCCOLROW>::max(); // position not found.
+ SCCOLROW nPos = std::numeric_limits<SCCOLROW>::max(); // position not found.
typename fst_type::const_reverse_iterator itr = maSegments.rbegin(), itrEnd = maSegments.rend();
// Note that when searching in reverse direction, we need to skip the first
// node, since the right-most leaf node does not store a valid value.
diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx
index 2dde31f721ef..bc7225d4e06d 100644
--- a/sc/source/core/data/stlpool.cxx
+++ b/sc/source/core/data/stlpool.cxx
@@ -263,7 +263,7 @@ void ScStyleSheetPool::CreateStandardStyles()
const OUString aHelpFile;//which text???
SfxItemSet* pSet = nullptr;
SfxItemSet* pHFSet = nullptr;
- ScEditEngineDefaulter aEdEngine( EditEngine::CreatePool().get(), true );
+ ScEditEngineDefaulter aEdEngine( pDoc->GetEditEnginePool(), true );
aEdEngine.SetUpdateLayout( false );
std::unique_ptr<EditTextObject> pEmptyTxtObj = aEdEngine.CreateTextObject();
std::unique_ptr<EditTextObject> pTxtObj;
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 25c5d94c87c7..1d2455c57deb 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -1099,7 +1099,6 @@ void ScTable::TransposeColPatterns(ScTable* pTransClip, SCCOL nCol1, SCCOL nCol,
{
// transpose borders and merge values, remove merge flags (refreshed after pasting)
ScPatternAttr aNewPattern( *pPattern );
- SfxItemSet& rNewSet = aNewPattern.GetItemSet();
const SvxBoxItem& rOldBox = rSet.Get(ATTR_BORDER);
if ( rOldBox.GetTop() || rOldBox.GetBottom() || rOldBox.GetLeft() || rOldBox.GetRight() )
@@ -1113,12 +1112,12 @@ void ScTable::TransposeColPatterns(ScTable* pTransClip, SCCOL nCol1, SCCOL nCol,
aNew.SetDistance( rOldBox.GetDistance( SvxBoxItemLine::LEFT ), SvxBoxItemLine::TOP );
aNew.SetDistance( rOldBox.GetDistance( SvxBoxItemLine::BOTTOM ), SvxBoxItemLine::RIGHT );
aNew.SetDistance( rOldBox.GetDistance( SvxBoxItemLine::RIGHT ), SvxBoxItemLine::BOTTOM );
- rNewSet.Put( aNew );
+ aNewPattern.ItemSetPut(aNew);
}
const ScMergeAttr& rOldMerge = rSet.Get(ATTR_MERGE);
if (rOldMerge.IsMerged())
- rNewSet.Put( ScMergeAttr( std::min(
+ aNewPattern.ItemSetPut( ScMergeAttr( std::min(
static_cast<SCCOL>(rOldMerge.GetRowMerge()),
static_cast<SCCOL>(rDocument.MaxCol()+1 - (nAttrRow2-nRow1))),
std::min(
@@ -1129,9 +1128,9 @@ void ScTable::TransposeColPatterns(ScTable* pTransClip, SCCOL nCol1, SCCOL nCol,
{
ScMF nNewFlags = rOldFlag.GetValue() & ~ScMF( ScMF::Hor | ScMF::Ver );
if ( nNewFlags != ScMF::NONE )
- rNewSet.Put( ScMergeFlagAttr( nNewFlags ) );
+ aNewPattern.ItemSetPut(ScMergeFlagAttr(nNewFlags));
else
- rNewSet.ClearItem( ATTR_MERGE_FLAG );
+ aNewPattern.ItemSetClearItem(ATTR_MERGE_FLAG);
}
// Set pattern in cells from nAttrRow1 to nAttrRow2
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 39decdf6e027..055617dfec14 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -1927,9 +1927,8 @@ static void lcl_RemoveNumberFormat( ScTable* pTab, SCCOL nCol, SCROW nRow )
== SfxItemState::SET )
{
ScPatternAttr* pNewPattern(new ScPatternAttr( *pPattern ));
- SfxItemSet& rSet = pNewPattern->GetItemSet();
- rSet.ClearItem( ATTR_VALUE_FORMAT );
- rSet.ClearItem( ATTR_LANGUAGE_FORMAT );
+ pNewPattern->ItemSetClearItem(ATTR_VALUE_FORMAT);
+ pNewPattern->ItemSetClearItem(ATTR_LANGUAGE_FORMAT);
pTab->SetPattern( nCol, nRow, CellAttributeHolder(pNewPattern, true) );
}
}
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index d667824394e8..ae641dea45cc 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -161,7 +161,6 @@ void setSuffixCell(
}
EditEngine aEngine(rDoc.GetEditEnginePool());
- aEngine.SetEditTextObjectPool(rDoc.GetEditTextObjectPool());
SfxItemSet aAttr = aEngine.GetEmptyItemSet();
aAttr.Put( SvxEscapementItem( SvxEscapement::Superscript, EE_CHAR_ESCAPEMENT));
@@ -988,11 +987,10 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if ( nOldValue != nOldValueMerge )
{
pNewPattern.reset(new ScPatternAttr(*pSrcPattern));
- SfxItemSet& rNewSet = pNewPattern->GetItemSet();
- if ( nOldValueMerge == ScMF::NONE )
- rNewSet.ClearItem(ATTR_MERGE_FLAG);
+ if (nOldValueMerge == ScMF::NONE)
+ pNewPattern->ItemSetClearItem(ATTR_MERGE_FLAG);
else
- rNewSet.Put(ScMergeFlagAttr(nOldValueMerge));
+ pNewPattern->ItemSetPut(ScMergeFlagAttr(nOldValueMerge));
}
else
pNewPattern.reset();
@@ -1255,7 +1253,7 @@ void ScTable::FillSparkline(bool bVertical, SCCOLROW nFixed,
{
auto pSparkline = bVertical ? GetSparkline(nFixed, nCurrent) : GetSparkline(nCurrent, nFixed);
bHasSparklines = bHasSparklines || pSparkline;
- aSparklineSeries.push_back(pSparkline);
+ aSparklineSeries.push_back(std::move(pSparkline));
}
if (bHasSparklines)
@@ -1808,9 +1806,9 @@ void ScTable::FillFormulaVertical(
aCol[nCol].DeleteRanges(aSpans, InsertDeleteFlags::VALUE | InsertDeleteFlags::DATETIME | InsertDeleteFlags::STRING | InsertDeleteFlags::FORMULA | InsertDeleteFlags::OUTLINE);
aCol[nCol].CloneFormulaCell(rSrcCell, sc::CellTextAttr(), aSpans);
- const auto pSet = std::make_shared<sc::ColumnBlockPositionSet>(rDocument);
- sc::StartListeningContext aStartCxt(rDocument, pSet);
- sc::EndListeningContext aEndCxt(rDocument, pSet);
+ auto xSet = std::make_shared<sc::ColumnBlockPositionSet>(rDocument);
+ sc::StartListeningContext aStartCxt(rDocument, xSet);
+ sc::EndListeningContext aEndCxt(rDocument, std::move(xSet));
SCROW nStartRow = aSpans.front().mnRow1;
SCROW nEndRow = aSpans.back().mnRow2;
@@ -2699,7 +2697,7 @@ void ScTable::AutoFormat( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW
for (sal_uInt8 i = 0; i < 16; ++i)
{
pPatternAttrs[i].reset(new ScPatternAttr(rDocument.getCellAttributeHelper()));
- pData->FillToItemSet(i, pPatternAttrs[i]->GetItemSet(), rDocument);
+ pData->FillToItemSet(i, pPatternAttrs[i]->GetItemSetWritable(), rDocument);
}
// Important special case: when the whole rows are selected. Then applying autoformat to right
diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx
index 8067cb248bd8..1536cb39e778 100644
--- a/sc/source/core/data/table5.cxx
+++ b/sc/source/core/data/table5.cxx
@@ -53,7 +53,6 @@
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::sheet::TablePageBreakData;
-using ::std::set;
void ScTable::UpdatePageBreaks(const ScRange* pUserArea)
{
@@ -322,21 +321,21 @@ bool ScTable::HasManualBreaks() const
return !maRowManualBreaks.empty() || !maColManualBreaks.empty();
}
-void ScTable::SetRowManualBreaks(::std::set<SCROW>&& rBreaks)
+void ScTable::SetRowManualBreaks(std::set<SCROW>&& rBreaks)
{
maRowManualBreaks = std::move(rBreaks);
InvalidatePageBreaks();
SetStreamValid(false);
}
-void ScTable::SetColManualBreaks(::std::set<SCCOL>&& rBreaks)
+void ScTable::SetColManualBreaks(std::set<SCCOL>&& rBreaks)
{
maColManualBreaks = std::move(rBreaks);
InvalidatePageBreaks();
SetStreamValid(false);
}
-void ScTable::GetAllRowBreaks(set<SCROW>& rBreaks, bool bPage, bool bManual) const
+void ScTable::GetAllRowBreaks(std::set<SCROW>& rBreaks, bool bPage, bool bManual) const
{
if (bPage)
rBreaks = maRowPageBreaks;
@@ -348,7 +347,7 @@ void ScTable::GetAllRowBreaks(set<SCROW>& rBreaks, bool bPage, bool bManual) con
}
}
-void ScTable::GetAllColBreaks(set<SCCOL>& rBreaks, bool bPage, bool bManual) const
+void ScTable::GetAllColBreaks(std::set<SCCOL>& rBreaks, bool bPage, bool bManual) const
{
if (bPage)
rBreaks = maColPageBreaks;
@@ -394,7 +393,7 @@ bool ScTable::HasColManualBreak(SCCOL nCol) const
SCROW ScTable::GetNextManualBreak(SCROW nRow) const
{
- set<SCROW>::const_iterator itr = maRowManualBreaks.lower_bound(nRow);
+ std::set<SCROW>::const_iterator itr = maRowManualBreaks.lower_bound(nRow);
return itr == maRowManualBreaks.end() ? -1 : *itr;
}
@@ -403,8 +402,8 @@ void ScTable::RemoveRowPageBreaks(SCROW nStartRow, SCROW nEndRow)
if (!ValidRow(nStartRow) || !ValidRow(nEndRow))
return;
- set<SCROW>::iterator low = maRowPageBreaks.lower_bound(nStartRow);
- set<SCROW>::iterator high = maRowPageBreaks.upper_bound(nEndRow);
+ std::set<SCROW>::iterator low = maRowPageBreaks.lower_bound(nStartRow);
+ std::set<SCROW>::iterator high = maRowPageBreaks.upper_bound(nEndRow);
maRowPageBreaks.erase(low, high);
}
@@ -470,11 +469,9 @@ void ScTable::SetColBreak(SCCOL nCol, bool bPage, bool bManual)
Sequence<TablePageBreakData> ScTable::GetRowBreakData() const
{
- using ::std::inserter;
-
- set<SCROW> aRowBreaks = maRowPageBreaks;
+ std::set<SCROW> aRowBreaks = maRowPageBreaks;
copy(maRowManualBreaks.begin(), maRowManualBreaks.end(),
- inserter(aRowBreaks, aRowBreaks.begin()));
+ std::inserter(aRowBreaks, aRowBreaks.begin()));
Sequence<TablePageBreakData> aSeq(aRowBreaks.size());
std::transform(aRowBreaks.begin(), aRowBreaks.end(), aSeq.getArray(), [this](const SCROW nRow) {
diff --git a/sc/source/core/data/tabprotection.cxx b/sc/source/core/data/tabprotection.cxx
index c98176defac9..e2229e75a5fb 100644
--- a/sc/source/core/data/tabprotection.cxx
+++ b/sc/source/core/data/tabprotection.cxx
@@ -36,7 +36,6 @@ constexpr OUString URI_XLS_LEGACY = u"http://docs.oasis-open.org/office/ns/table
using namespace ::com::sun::star;
using ::com::sun::star::uno::Sequence;
-using ::std::vector;
bool ScPassHashHelper::needsPassHashRegen(const ScDocument& rDoc, ScPasswordHash eHash1, ScPasswordHash eHash2)
{
@@ -137,8 +136,8 @@ public:
bool isOptionEnabled(SCSIZE nOptId) const;
void setOption(SCSIZE nOptId, bool bEnabled);
- void setEnhancedProtection( ::std::vector< ScEnhancedProtection > && rProt );
- const ::std::vector< ScEnhancedProtection > & getEnhancedProtection() const { return maEnhancedProtection;}
+ void setEnhancedProtection(std::vector< ScEnhancedProtection > && rProt );
+ const std::vector< ScEnhancedProtection > & getEnhancedProtection() const { return maEnhancedProtection;}
bool updateReference( UpdateRefMode, const ScDocument&, const ScRange& rWhere, SCCOL nDx, SCROW nDy, SCTAB nDz );
bool isBlockEditable( const ScRange& rRange ) const;
bool isSelectionEditable( const ScRangeList& rRangeList ) const;
@@ -146,13 +145,13 @@ public:
private:
OUString maPassText;
css::uno::Sequence<sal_Int8> maPassHash;
- ::std::vector<bool> maOptions;
+ std::vector<bool> maOptions;
bool mbEmptyPass;
bool mbProtected;
ScPasswordHash meHash1;
ScPasswordHash meHash2;
ScOoxPasswordHash maPasswordHash;
- ::std::vector< ScEnhancedProtection > maEnhancedProtection;
+ std::vector< ScEnhancedProtection > maEnhancedProtection;
};
Sequence<sal_Int8> ScTableProtectionImpl::hashPassword(std::u16string_view aPassText, ScPasswordHash eHash)
@@ -187,7 +186,7 @@ Sequence<sal_Int8> ScTableProtectionImpl::hashPassword(
// TODO: Right now, we only support double-hash by SHA1.
if (eHash == PASSHASH_SHA1)
{
- auto aChars = comphelper::sequenceToContainer<vector<char>>(rPassHash);
+ auto aChars = comphelper::sequenceToContainer<std::vector<char>>(rPassHash);
Sequence<sal_Int8> aNewHash;
SvPasswordHelper::GetHashPassword(aNewHash, aChars.data(), aChars.size());
@@ -423,7 +422,7 @@ void ScTableProtectionImpl::setOption(SCSIZE nOptId, bool bEnabled)
maOptions[nOptId] = bEnabled;
}
-void ScTableProtectionImpl::setEnhancedProtection( ::std::vector< ScEnhancedProtection > && rProt )
+void ScTableProtectionImpl::setEnhancedProtection(std::vector< ScEnhancedProtection > && rProt )
{
maEnhancedProtection = std::move(rProt);
}
@@ -697,12 +696,12 @@ void ScTableProtection::setOption(Option eOption, bool bEnabled)
mpImpl->setOption(eOption, bEnabled);
}
-void ScTableProtection::setEnhancedProtection( ::std::vector< ScEnhancedProtection > && rProt )
+void ScTableProtection::setEnhancedProtection(std::vector< ScEnhancedProtection > && rProt )
{
mpImpl->setEnhancedProtection(std::move(rProt));
}
-const ::std::vector< ScEnhancedProtection > & ScTableProtection::getEnhancedProtection() const
+const std::vector< ScEnhancedProtection > & ScTableProtection::getEnhancedProtection() const
{
return mpImpl->getEnhancedProtection();
}
diff --git a/sc/source/core/inc/poolhelp.hxx b/sc/source/core/inc/poolhelp.hxx
index f8f3777a8bd2..32ac4031fb4d 100644
--- a/sc/source/core/inc/poolhelp.hxx
+++ b/sc/source/core/inc/poolhelp.hxx
@@ -39,7 +39,6 @@ private:
rtl::Reference<ScDocumentPool> pDocPool;
rtl::Reference< ScStyleSheetPool > mxStylePool;
mutable std::unique_ptr<SvNumberFormatter> pFormTable;
- mutable rtl::Reference<SfxItemPool> mpEditTextObjectPool; // EditTextObjectPool
mutable rtl::Reference<SfxItemPool> mpEditEnginePool; // EditEnginePool
public:
@@ -53,7 +52,6 @@ public:
ScDocumentPool* GetDocPool() const { return pDocPool.get(); }
ScStyleSheetPool* GetStylePool() const { return mxStylePool.get(); }
SvNumberFormatter* GetFormTable() const;
- SfxItemPool* GetEditTextObjectPool() const;
SfxItemPool* GetEditEnginePool() const;
void SetFormTableOpt(const ScDocOptions& rOpt);
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index 1a88b55c961c..38b49abdeb76 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -2789,7 +2789,7 @@ std::shared_ptr<DynamicKernel> DynamicKernel::create( const ScCalcConfig& rConfi
{
FormulaTreeNodeRef pChildTreeNode =
std::make_shared<FormulaTreeNode>(pTempFormula);
- pCurNode->Children.push_back(pChildTreeNode);
+ pCurNode->Children.push_back(std::move(pChildTreeNode));
}
}
std::reverse(pCurNode->Children.begin(), pCurNode->Children.end());
diff --git a/sc/source/core/tool/chartarr.cxx b/sc/source/core/tool/chartarr.cxx
index 86976db2382c..1b475ff67777 100644
--- a/sc/source/core/tool/chartarr.cxx
+++ b/sc/source/core/tool/chartarr.cxx
@@ -32,8 +32,6 @@
#include <memory>
#include <vector>
-using ::std::vector;
-
ScMemChart::ScMemChart(SCCOL nCols, SCROW nRows)
{
nRowCnt = nRows;
@@ -152,7 +150,7 @@ std::unique_ptr<ScMemChart> ScChartArray::CreateMemChartSingle()
}
SCSIZE nTotalCols = ( nCol1 <= nCol2 ? nCol2 - nCol1 + 1 : 0 );
- vector<SCCOL> aCols;
+ std::vector<SCCOL> aCols;
aCols.reserve(nTotalCols);
for (SCSIZE i=0; i<nTotalCols; i++)
{
@@ -163,7 +161,7 @@ std::unique_ptr<ScMemChart> ScChartArray::CreateMemChartSingle()
SCSIZE nColCount = aCols.size();
SCSIZE nTotalRows = ( nRow1 <= nRow2 ? nRow2 - nRow1 + 1 : 0 );
- vector<SCROW> aRows;
+ std::vector<SCROW> aRows;
aRows.reserve(nTotalRows);
if (nRow1 <= nRow2)
{
diff --git a/sc/source/core/tool/chartlis.cxx b/sc/source/core/tool/chartlis.cxx
index 361c3d0d3e7f..91477b2407c7 100644
--- a/sc/source/core/tool/chartlis.cxx
+++ b/sc/source/core/tool/chartlis.cxx
@@ -29,8 +29,6 @@
#include <com/sun/star/chart/XChartDataChangeEventListener.hpp>
using namespace com::sun::star;
-using ::std::vector;
-using ::std::for_each;
// Update chart listeners quickly, to get a similar behavior to loaded charts
// which register UNO listeners.
@@ -106,7 +104,7 @@ ScChartListener::ScChartListener( OUString aName, ScDocument& rDocP,
ScRefTokenHelper::getTokensFromRangeList(&rDocP, maTokens, *rRangeList);
}
-ScChartListener::ScChartListener( OUString aName, ScDocument& rDocP, vector<ScTokenRef> aTokens ) :
+ScChartListener::ScChartListener( OUString aName, ScDocument& rDocP, std::vector<ScTokenRef> aTokens ) :
maTokens(std::move(aTokens)),
maName(std::move(aName)),
mrDoc( rDocP ),
@@ -192,7 +190,7 @@ ScRangeListRef ScChartListener::GetRangeList() const
void ScChartListener::SetRangeList( const ScRangeListRef& rNew )
{
- vector<ScTokenRef> aTokens;
+ std::vector<ScTokenRef> aTokens;
ScRefTokenHelper::getTokensFromRangeList(&mrDoc, aTokens, *rNew);
maTokens.swap(aTokens);
}
@@ -267,7 +265,7 @@ void ScChartListener::StartListeningTo()
// no references to listen to.
return;
- for_each(maTokens.begin(), maTokens.end(), StartEndListening(mrDoc, *this, true));
+ std::for_each(maTokens.begin(), maTokens.end(), StartEndListening(mrDoc, *this, true));
}
void ScChartListener::EndListeningTo()
@@ -276,7 +274,7 @@ void ScChartListener::EndListeningTo()
// no references to listen to.
return;
- for_each(maTokens.begin(), maTokens.end(), StartEndListening(mrDoc, *this, false));
+ std::for_each(maTokens.begin(), maTokens.end(), StartEndListening(mrDoc, *this, false));
}
void ScChartListener::ChangeListening( const ScRangeListRef& rRangeListRef,
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 147c2220e039..67661a994825 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -79,7 +79,6 @@
using namespace formula;
using namespace ::com::sun::star;
-using ::std::vector;
const CharClass* ScCompiler::pCharClassEnglish = nullptr;
const CharClass* ScCompiler::pCharClassLocalized = nullptr;
@@ -777,14 +776,14 @@ static OUString lcl_makeExternalNameStr(const OUString& rFile, const OUString& r
}
static bool lcl_getLastTabName( OUString& rTabName2, const OUString& rTabName1,
- const vector<OUString>& rTabNames, const ScRange& rRef )
+ const std::vector<OUString>& rTabNames, const ScRange& rRef )
{
SCTAB nTabSpan = rRef.aEnd.Tab() - rRef.aStart.Tab();
if (nTabSpan > 0)
{
size_t nCount = rTabNames.size();
- vector<OUString>::const_iterator itrBeg = rTabNames.begin(), itrEnd = rTabNames.end();
- vector<OUString>::const_iterator itr = ::std::find(itrBeg, itrEnd, rTabName1);
+ std::vector<OUString>::const_iterator itrBeg = rTabNames.begin(), itrEnd = rTabNames.end();
+ std::vector<OUString>::const_iterator itr = ::std::find(itrBeg, itrEnd, rTabName1);
if (itr == rTabNames.end())
{
rTabName2 = ScResId(STR_NO_REF_TABLE);
@@ -1284,7 +1283,7 @@ struct ConventionXL
}
static void makeExternalTabNameRange( OUStringBuffer& rBuf, const OUString& rTabName,
- const vector<OUString>& rTabNames,
+ const std::vector<OUString>& rTabNames,
const ScRange& rRef )
{
OUString aLastTabName;
@@ -5426,7 +5425,7 @@ void ScCompiler::CreateStringFromExternal( OUStringBuffer& rBuffer, const Formul
break;
case svExternalDoubleRef:
{
- vector<OUString> aTabNames;
+ std::vector<OUString> aTabNames;
pRefMgr->getAllCachedTableNames(nFileId, aTabNames);
// No sheet names is a valid case if external sheets were not
// cached in this document and external document is not reachable,
@@ -5688,7 +5687,7 @@ FormulaTokenRef ScCompiler::ExtendRangeReference( FormulaToken & rTok1, FormulaT
return extendRangeReference( rDoc.GetSheetLimits(), rTok1, rTok2, aPos, true/*bReuseDoubleRef*/ );
}
-void ScCompiler::fillAddInToken(::std::vector< css::sheet::FormulaOpCodeMapEntry >& _rVec,bool _bIsEnglish) const
+void ScCompiler::fillAddInToken(std::vector< css::sheet::FormulaOpCodeMapEntry >& _rVec,bool _bIsEnglish) const
{
// All known AddIn functions.
sheet::FormulaOpCodeMapEntry aEntry;
diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index 4dea3d545b5e..024d6b7c193b 100644
--- a/sc/source/core/tool/detfunc.cxx
+++ b/sc/source/core/tool/detfunc.cxx
@@ -74,7 +74,6 @@
#include <vector>
#include <memory>
-using ::std::vector;
using namespace com::sun::star;
namespace {
@@ -1331,7 +1330,7 @@ bool ScDetectiveFunc::MarkInvalid(bool& rOverflow)
}
void ScDetectiveFunc::GetAllPreds(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- vector<ScTokenRef>& rRefTokens)
+ std::vector<ScTokenRef>& rRefTokens)
{
ScCellIterator aIter(rDoc, ScRange(nCol1, nRow1, nTab, nCol2, nRow2, nTab));
for (bool bHas = aIter.first(); bHas; bHas = aIter.next())
@@ -1350,9 +1349,9 @@ void ScDetectiveFunc::GetAllPreds(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW n
}
void ScDetectiveFunc::GetAllSuccs(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- vector<ScTokenRef>& rRefTokens)
+ std::vector<ScTokenRef>& rRefTokens)
{
- vector<ScTokenRef> aSrcRange;
+ std::vector<ScTokenRef> aSrcRange;
aSrcRange.push_back(
ScRefTokenHelper::createRefToken(rDoc, ScRange(nCol1, nRow1, nTab, nCol2, nRow2, nTab)));
diff --git a/sc/source/core/tool/doubleref.cxx b/sc/source/core/tool/doubleref.cxx
index 66ecea4a108d..6c34f4e2698a 100644
--- a/sc/source/core/tool/doubleref.cxx
+++ b/sc/source/core/tool/doubleref.cxx
@@ -35,9 +35,6 @@
#include <utility>
#include <vector>
-using ::std::unique_ptr;
-using ::std::vector;
-
namespace {
void lcl_uppercase(OUString& rStr)
@@ -154,7 +151,7 @@ bool lcl_createExcelQuery(
bool bValid = true;
SCCOL nCols = pQueryRef->getColSize();
SCROW nRows = pQueryRef->getRowSize();
- vector<SCCOL> aFields(nCols);
+ std::vector<SCCOL> aFields(nCols);
SCCOL nCol = 0;
while (bValid && (nCol < nCols))
{
@@ -360,7 +357,7 @@ SCCOL ScDBInternalRange::findFieldColumn(const OUString& rStr, FormulaError* pEr
std::unique_ptr<ScDBQueryParamBase> ScDBInternalRange::createQueryParam(const ScDBRangeBase* pQueryRef) const
{
- unique_ptr<ScDBQueryParamInternal> pParam(new ScDBQueryParamInternal);
+ std::unique_ptr<ScDBQueryParamInternal> pParam(new ScDBQueryParamInternal);
// Set the database range first.
const ScAddress& s = maRange.aStart;
@@ -455,7 +452,7 @@ SCCOL ScDBExternalRange::findFieldColumn(const OUString& rStr, FormulaError* pEr
std::unique_ptr<ScDBQueryParamBase> ScDBExternalRange::createQueryParam(const ScDBRangeBase* pQueryRef) const
{
- unique_ptr<ScDBQueryParamMatrix> pParam(new ScDBQueryParamMatrix);
+ std::unique_ptr<ScDBQueryParamMatrix> pParam(new ScDBQueryParamMatrix);
pParam->mpMatrix = mpMatrix;
fillQueryOptions(pParam.get());
diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index 7dbbea06cb6e..89a4622f8f41 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -732,17 +732,14 @@ void ScEditEngineDefaulter::RemoveParaAttribs()
ScTabEditEngine::ScTabEditEngine( ScDocument& rDoc )
: ScFieldEditEngine( &rDoc, rDoc.GetEditEnginePool() )
{
- SetEditTextObjectPool( rDoc.GetEditTextObjectPool() );
const ScPatternAttr& rScPatternAttr(rDoc.getCellAttributeHelper().getDefaultCellAttribute());
Init(rScPatternAttr);
}
ScTabEditEngine::ScTabEditEngine( const ScPatternAttr& rPattern,
- SfxItemPool* pEngineItemPool, ScDocument& rDoc, SfxItemPool* pTextObjectPool )
- : ScFieldEditEngine( &rDoc, pEngineItemPool, pTextObjectPool )
+ SfxItemPool* pEngineItemPool, ScDocument& rDoc )
+ : ScFieldEditEngine( &rDoc, pEngineItemPool )
{
- if ( pTextObjectPool )
- SetEditTextObjectPool( pTextObjectPool );
Init( rPattern );
}
@@ -887,12 +884,10 @@ OUString ScHeaderEditEngine::CalcFieldValue( const SvxFieldItem& rField,
ScFieldEditEngine::ScFieldEditEngine(
ScDocument* pDoc, SfxItemPool* pEnginePoolP,
- SfxItemPool* pTextObjectPool, bool bDeleteEnginePoolP) :
+ bool bDeleteEnginePoolP) :
ScEditEngineDefaulter( pEnginePoolP, bDeleteEnginePoolP ),
mpDoc(pDoc), bExecuteURL(true)
{
- if ( pTextObjectPool )
- SetEditTextObjectPool( pTextObjectPool );
SetControlWord( EEControlBits(GetControlWord() | EEControlBits::MARKFIELDS) & ~EEControlBits::RTFSTYLESHEETS );
}
@@ -922,12 +917,9 @@ bool ScFieldEditEngine::FieldClicked( const SvxFieldItem& rField )
return false;
}
-ScNoteEditEngine::ScNoteEditEngine( SfxItemPool* pEnginePoolP,
- SfxItemPool* pTextObjectPool ) :
+ScNoteEditEngine::ScNoteEditEngine( SfxItemPool* pEnginePoolP ) :
ScEditEngineDefaulter( pEnginePoolP, false/*bDeleteEnginePoolP*/ )
{
- if ( pTextObjectPool )
- SetEditTextObjectPool( pTextObjectPool );
SetControlWord( EEControlBits(GetControlWord() | EEControlBits::MARKFIELDS) & ~EEControlBits::RTFSTYLESHEETS );
}
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index effa02dcbd81..2470ff0623ab 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -83,7 +83,6 @@ const sal_uInt64 n2power48 = SAL_CONST_UINT64( 281474976710656); // 2^48
ScCalcConfig *ScInterpreter::mpGlobalConfig = nullptr;
using namespace formula;
-using ::std::unique_ptr;
void ScInterpreter::ScIfJump()
{
@@ -6915,11 +6914,8 @@ void ScInterpreter::ScLookup()
PushIllegalParameter();
return;
}
- if (eResArrayType == svMatrix) // inline-array
- {
- nResCol2 = nC - 1;
- nResRow2 = nR - 1;
- }
+ nResCol2 = nC - 1;
+ nResRow2 = nR - 1;
}
break;
case svDouble:
@@ -6974,11 +6970,8 @@ void ScInterpreter::ScLookup()
pDataMat->GetDimensions(nC, nR);
bVertical = (nR >= nC);
nLenMajor = bVertical ? nR : nC;
- if (eDataArrayType == svMatrix) // inline array
- {
- nCol2 = nC - 1;
- nRow2 = nR - 1;
- }
+ nCol2 = nC - 1;
+ nRow2 = nR - 1;
}
break;
case svDouble:
@@ -9665,7 +9658,7 @@ void ScInterpreter::ScTextSplit()
{
std::vector<OUString> aColStrs = lcl_SplitText(rRow, aColDelimiters, bIgnoreEmpty, bMatchMode);
nCols = std::max(nCols, aColStrs.size());
- aRes.push_back(aColStrs);
+ aRes.push_back(std::move(aColStrs));
}
ScMatrixRef pResMat = GetNewMat(nCols, nRows, /*bEmpty*/true);
@@ -10426,7 +10419,7 @@ std::unique_ptr<ScDBQueryParamBase> ScInterpreter::GetDBParams( bool& rMissingFi
if (nGlobalError != FormulaError::NONE)
return nullptr;
- unique_ptr<ScDBRangeBase> pDBRef( PopDBDoubleRef() );
+ std::unique_ptr<ScDBRangeBase> pDBRef( PopDBDoubleRef() );
if (nGlobalError != FormulaError::NONE || !pDBRef)
return nullptr;
@@ -10458,7 +10451,7 @@ std::unique_ptr<ScDBQueryParamBase> ScInterpreter::GetDBParams( bool& rMissingFi
if (!mrDoc.ValidCol(nField))
return nullptr;
- unique_ptr<ScDBQueryParamBase> pParam( pDBRef->createQueryParam(pQueryRef.get()) );
+ std::unique_ptr<ScDBQueryParamBase> pParam( pDBRef->createQueryParam(pQueryRef.get()) );
if (pParam)
{
@@ -10498,7 +10491,7 @@ void ScInterpreter::DBIterator( ScIterFunc eFunc )
KahanSum fErg = 0;
sal_uLong nCount = 0;
bool bMissingField = false;
- unique_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
+ std::unique_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
if (pQueryParam)
{
if (!pQueryParam->IsValidFieldIndex())
@@ -10567,7 +10560,7 @@ void ScInterpreter::ScDBSum()
void ScInterpreter::ScDBCount()
{
bool bMissingField = true;
- unique_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
+ std::unique_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
if (pQueryParam)
{
sal_uLong nCount = 0;
@@ -10625,7 +10618,7 @@ void ScInterpreter::ScDBCount()
void ScInterpreter::ScDBCount2()
{
bool bMissingField = true;
- unique_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
+ std::unique_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
if (pQueryParam)
{
if (!pQueryParam->IsValidFieldIndex())
@@ -10680,7 +10673,7 @@ void ScInterpreter::GetDBStVarParams( double& rVal, double& rValCount )
rValCount = 0.0;
bool bMissingField = false;
- unique_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
+ std::unique_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
if (pQueryParam)
{
if (!pQueryParam->IsValidFieldIndex())
@@ -12778,11 +12771,11 @@ bool ScInterpreter::SearchMatrixForValue( VectorSearchArguments& vsa, const ScQu
case wildcard :
// simple serial search for equality mode (source data doesn't
// need to be sorted).
- for ( SCSIZE i = nMatCount - 1; i > 0; i-- )
+ for ( SCSIZE i = nMatCount; i > 0; i-- )
{
- if (lcl_CompareMatrix2Query(i, aMatAcc, rParam, rEntry, bMatchWholeCell) == 0)
+ if (lcl_CompareMatrix2Query(i - 1, aMatAcc, rParam, rEntry, bMatchWholeCell) == 0)
{
- vsa.nHitIndex = i + 1; // found !
+ vsa.nHitIndex = i; // found !
break;
}
}
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index a2edd03c9188..1744d3473951 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -52,7 +52,6 @@
#include <string.h>
-using ::std::vector;
using namespace com::sun::star;
using namespace formula;
@@ -344,12 +343,12 @@ void ScInterpreter::ScEasterSunday()
}
FormulaError ScInterpreter::GetWeekendAndHolidayMasks(
- const sal_uInt8 nParamCount, const sal_Int32 nNullDate, vector< double >& rSortArray,
+ const sal_uInt8 nParamCount, const sal_Int32 nNullDate, std::vector< double >& rSortArray,
bool bWeekendMask[ 7 ] )
{
if ( nParamCount == 4 )
{
- vector< double > nWeekendDays;
+ std::vector< double > nWeekendDays;
GetNumberSequenceArray( 1, nWeekendDays, false );
if ( nGlobalError != FormulaError::NONE )
return nGlobalError;
@@ -384,7 +383,7 @@ FormulaError ScInterpreter::GetWeekendAndHolidayMasks(
}
FormulaError ScInterpreter::GetWeekendAndHolidayMasks_MS(
- const sal_uInt8 nParamCount, const sal_Int32 nNullDate, vector< double >& rSortArray,
+ const sal_uInt8 nParamCount, const sal_Int32 nNullDate, std::vector< double >& rSortArray,
bool bWeekendMask[ 7 ], bool bWorkdayFunction )
{
FormulaError nErr = FormulaError::NONE;
@@ -506,7 +505,7 @@ void ScInterpreter::ScNetWorkdays( bool bOOXML_Version )
if ( !MustHaveParamCount( nParamCount, 2, 4 ) )
return;
- vector<double> nSortArray;
+ std::vector<double> nSortArray;
bool bWeekendMask[ 7 ];
const Date& rNullDate = mrContext.NFGetNullDate();
sal_Int32 nNullDate = rNullDate.GetAsNormalizedDays();
@@ -563,7 +562,7 @@ void ScInterpreter::ScWorkday_MS()
return;
nFuncFmtType = SvNumFormatType::DATE;
- vector<double> nSortArray;
+ std::vector<double> nSortArray;
bool bWeekendMask[ 7 ];
const Date& rNullDate = mrContext.NFGetNullDate();
sal_Int32 nNullDate = rNullDate.GetAsNormalizedDays();
@@ -1506,7 +1505,7 @@ void ScInterpreter::ScIRR()
}
SetError(nIterError);
}
- double xNew = x - fNom.get() / fDenom.get(); // x(i+1) = x(i)-f(x(i))/f'(x(i))
+ double xNew = x - o3tl::div_allow_zero(fNom.get(), fDenom.get()); // x(i+1) = x(i)-f(x(i))/f'(x(i))
nItCount++;
fEps = std::abs(xNew - x);
x = xNew;
@@ -1636,7 +1635,7 @@ void ScInterpreter::ScMIRR()
PushError( nGlobalError );
else
{
- double fResult = -fNPV_reinvest.get() / fNPV_invest.get();
+ double fResult = -o3tl::div_allow_zero(fNPV_reinvest.get(), fNPV_invest.get());
fResult *= pow( fRate1_reinvest, static_cast<double>( nCount - 1 ) );
fResult = pow( fResult, div( 1.0, (nCount - 1)) );
PushDouble( fResult - 1.0 );
@@ -1656,7 +1655,7 @@ void ScInterpreter::ScISPMT()
if( nGlobalError != FormulaError::NONE )
PushError( nGlobalError);
else
- PushDouble( fInvest * fRate * (fPeriod / fTotal - 1.0) );
+ PushDouble( fInvest * fRate * (o3tl::div_allow_zero(fPeriod, fTotal) - 1.0) );
}
}
@@ -1704,8 +1703,8 @@ void ScInterpreter::ScSYD()
double fLife = GetDouble();
double fSalvage = GetDouble();
double fCost = GetDouble();
- double fSyd = ((fCost - fSalvage) * (fLife - fPer + 1.0)) /
- ((fLife * (fLife + 1.0)) / 2.0);
+ double fSyd = o3tl::div_allow_zero((fCost - fSalvage) * (fLife - fPer + 1.0),
+ (fLife * (fLife + 1.0)) / 2.0);
PushDouble(fSyd);
}
}
@@ -1714,7 +1713,7 @@ double ScInterpreter::ScGetDDB(double fCost, double fSalvage, double fLife,
double fPeriod, double fFactor)
{
double fDdb, fRate, fOldValue, fNewValue;
- fRate = fFactor / fLife;
+ fRate = o3tl::div_allow_zero(fFactor, fLife);
if (fRate >= 1.0)
{
fRate = 1.0;
@@ -1941,7 +1940,7 @@ double ScInterpreter::ScGetPMT(double fRate, double fNper, double fPv,
{
double fPayment;
if (fRate == 0.0)
- fPayment = (fPv + fFv) / fNper;
+ fPayment = o3tl::div_allow_zero(fPv + fFv, fNper);
else
{
if (bPayInAdvance) // payment in advance
@@ -2029,9 +2028,9 @@ void ScInterpreter::ScNper()
if ( fPV + fFV == 0.0 )
PushDouble( 0.0 );
else if (fRate == 0.0)
- PushDouble(-(fPV + fFV)/fPmt);
+ PushDouble(-o3tl::div_allow_zero(fPV + fFV, fPmt));
else if (bPayInAdvance)
- PushDouble(log(-(fRate*fFV-fPmt*(1.0+fRate))/(fRate*fPV+fPmt*(1.0+fRate)))
+ PushDouble(log(-o3tl::div_allow_zero(fRate*fFV-fPmt*(1.0+fRate), (fRate*fPV+fPmt*(1.0+fRate))))
/ std::log1p(fRate));
else
PushDouble(log(-(fRate*fFV-fPmt)/(fRate*fPV+fPmt)) / std::log1p(fRate));
@@ -3299,7 +3298,8 @@ static bool lclConvertMoney( std::u16string_view aSearchUnit, double& rfRate, in
{ "EEK", 15.6466, 2 },
{ "LVL", 0.702804, 2 },
{ "LTL", 3.45280, 2 },
- { "HRK", 7.53450, 2 }
+ { "HRK", 7.53450, 2 },
+ { "BLN", 1.95583, 2 }
};
for (const auto & i : aConvertTable)
diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx
index 505f551d73db..9598e4452fd8 100644
--- a/sc/source/core/tool/interpr3.cxx
+++ b/sc/source/core/tool/interpr3.cxx
@@ -39,7 +39,6 @@
#include <o3tl/float_int_conversion.hxx>
#include <osl/diagnose.h>
-using ::std::vector;
using namespace formula;
/// Two columns of data should be sortable with GetSortArray() and QuickSort()
@@ -257,7 +256,7 @@ double ScInterpreter::gauss(double x)
else
{
static const double asympt[] = { -1.0, 1.0, -3.0, 15.0, -105.0 };
- nVal = 0.5 + phi(xAbs) * taylor(asympt, 4, 1.0 / (xAbs * xAbs)) / xAbs;
+ nVal = 0.5 + phi(xAbs) * o3tl::div_allow_zero(taylor(asympt, 4, o3tl::div_allow_zero(1.0, xAbs * xAbs)), xAbs);
}
if (x < 0.0)
return -nVal;
@@ -812,7 +811,7 @@ double ScInterpreter::GetBeta(double fAlpha, double fBeta)
fA = fBeta; fB = fAlpha;
}
if (fA+fB < fMaxGammaArgument) // simple case
- return GetGamma(fA)/GetGamma(fA+fB)*GetGamma(fB);
+ return o3tl::div_allow_zero(GetGamma(fA), GetGamma(fA+fB)) * GetGamma(fB);
// need logarithm
// GetLogGamma is not accurate enough, back to Lanczos for all three
// GetGamma and arrange factors newly.
@@ -1834,7 +1833,7 @@ void ScInterpreter::ScPoissonDist( bool bODFF )
/** Local function used in the calculation of the hypergeometric distribution.
*/
-static void lcl_PutFactorialElements( ::std::vector< double >& cn, double fLower, double fUpper, double fBase )
+static void lcl_PutFactorialElements(std::vector< double >& cn, double fLower, double fUpper, double fBase )
{
for ( double i = fLower; i <= fUpper; ++i )
{
@@ -3019,7 +3018,7 @@ void ScInterpreter::ScHarMean()
}
}
if (nGlobalError == FormulaError::NONE)
- PushDouble( nValCount / nVal.get() );
+ PushDouble( o3tl::div_allow_zero(nValCount, nVal.get()) );
else
PushError( nGlobalError);
}
@@ -3191,7 +3190,7 @@ void ScInterpreter::ScGeoMean()
}
}
if (nGlobalError == FormulaError::NONE)
- PushDouble(exp(nVal.get() / nValCount));
+ PushDouble(exp(o3tl::div_allow_zero(nVal.get(), nValCount)));
else
PushError( nGlobalError);
}
@@ -3366,7 +3365,7 @@ void ScInterpreter::ScSkewp()
CalculateSkewOrSkewp( true );
}
-double ScInterpreter::GetMedian( vector<double> & rArray )
+double ScInterpreter::GetMedian( std::vector<double> & rArray )
{
size_t nSize = rArray.size();
if (nSize == 0 || nGlobalError != FormulaError::NONE)
@@ -3377,7 +3376,7 @@ double ScInterpreter::GetMedian( vector<double> & rArray )
// Upper median.
size_t nMid = nSize / 2;
- vector<double>::iterator iMid = rArray.begin() + nMid;
+ std::vector<double>::iterator iMid = rArray.begin() + nMid;
::std::nth_element( rArray.begin(), iMid, rArray.end());
if (nSize & 1)
return *iMid; // Lower and upper median are equal.
@@ -3395,12 +3394,12 @@ void ScInterpreter::ScMedian()
sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCountMin( nParamCount, 1 ) )
return;
- vector<double> aArray;
+ std::vector<double> aArray;
GetNumberSequenceArray( nParamCount, aArray, false );
PushDouble( GetMedian( aArray));
}
-double ScInterpreter::GetPercentile( vector<double> & rArray, double fPercentile )
+double ScInterpreter::GetPercentile(std::vector<double> & rArray, double fPercentile )
{
size_t nSize = rArray.size();
if (nSize == 1)
@@ -3410,7 +3409,7 @@ double ScInterpreter::GetPercentile( vector<double> & rArray, double fPercentile
size_t nIndex = static_cast<size_t>(::rtl::math::approxFloor( fPercentile * (nSize-1)));
double fDiff = fPercentile * (nSize-1) - ::rtl::math::approxFloor( fPercentile * (nSize-1));
OSL_ENSURE(nIndex < nSize, "GetPercentile: wrong index(1)");
- vector<double>::iterator iter = rArray.begin() + nIndex;
+ std::vector<double>::iterator iter = rArray.begin() + nIndex;
::std::nth_element( rArray.begin(), iter, rArray.end());
if (fDiff <= 0.0)
{
@@ -3429,7 +3428,7 @@ double ScInterpreter::GetPercentile( vector<double> & rArray, double fPercentile
}
}
-double ScInterpreter::GetPercentileExclusive( vector<double> & rArray, double fPercentile )
+double ScInterpreter::GetPercentileExclusive(std::vector<double> & rArray, double fPercentile )
{
size_t nSize1 = rArray.size() + 1;
if ( rArray.empty() || nSize1 == 1 || nGlobalError != FormulaError::NONE)
@@ -3446,7 +3445,7 @@ double ScInterpreter::GetPercentileExclusive( vector<double> & rArray, double fP
size_t nIndex = static_cast<size_t>(::rtl::math::approxFloor( fPercentile * nSize1 - 1 ));
double fDiff = fPercentile * nSize1 - 1 - ::rtl::math::approxFloor( fPercentile * nSize1 - 1 );
OSL_ENSURE(nIndex < ( nSize1 - 1 ), "GetPercentile: wrong index(1)");
- vector<double>::iterator iter = rArray.begin() + nIndex;
+ std::vector<double>::iterator iter = rArray.begin() + nIndex;
::std::nth_element( rArray.begin(), iter, rArray.end());
if (fDiff == 0.0)
return *iter;
@@ -3469,7 +3468,7 @@ void ScInterpreter::ScPercentile( bool bInclusive )
PushIllegalArgument();
return;
}
- vector<double> aArray;
+ std::vector<double> aArray;
GetNumberSequenceArray( 1, aArray, false );
if ( aArray.empty() || nGlobalError != FormulaError::NONE )
{
@@ -3492,7 +3491,7 @@ void ScInterpreter::ScQuartile( bool bInclusive )
PushIllegalArgument();
return;
}
- vector<double> aArray;
+ std::vector<double> aArray;
GetNumberSequenceArray( 1, aArray, false );
if ( aArray.empty() || nGlobalError != FormulaError::NONE )
{
@@ -3510,7 +3509,7 @@ void ScInterpreter::ScModalValue()
sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCountMin( nParamCount, 1 ) )
return;
- vector<double> aSortArray;
+ std::vector<double> aSortArray;
GetSortArray( nParamCount, aSortArray, nullptr, false, false );
SCSIZE nSize = aSortArray.size();
if (nSize == 0 || nGlobalError != FormulaError::NONE)
@@ -3554,9 +3553,9 @@ void ScInterpreter::ScModalValue_MS( bool bSingle )
sal_uInt8 nParamCount = GetByte();
if ( !MustHaveParamCountMin( nParamCount, 1 ) )
return;
- vector<double> aArray;
+ std::vector<double> aArray;
GetNumberSequenceArray( nParamCount, aArray, false );
- vector< double > aSortArray( aArray );
+ std::vector< double > aSortArray( aArray );
QuickSort( aSortArray, nullptr );
SCSIZE nSize = aSortArray.size();
if ( nSize == 0 || nGlobalError != FormulaError::NONE )
@@ -3565,7 +3564,7 @@ void ScInterpreter::ScModalValue_MS( bool bSingle )
{
SCSIZE nMax = 1, nCount = 1;
double nOldVal = aSortArray[ 0 ];
- vector< double > aResultArray( 1 );
+ std::vector< double > aResultArray( 1 );
SCSIZE i;
for ( i = 1; i < nSize; i++ )
{
@@ -3579,7 +3578,7 @@ void ScInterpreter::ScModalValue_MS( bool bSingle )
{
nMax = nCount;
if ( aResultArray.size() != 1 )
- vector< double >( 1 ).swap( aResultArray );
+ std::vector< double >( 1 ).swap( aResultArray );
aResultArray[ 0 ] = nOldVal;
}
else
@@ -3592,7 +3591,7 @@ void ScInterpreter::ScModalValue_MS( bool bSingle )
if ( nCount >= nMax && nCount > 1 )
{
if ( nCount > nMax )
- vector< double >().swap( aResultArray );
+ std::vector< double >().swap( aResultArray );
aResultArray.emplace_back( nOldVal );
}
if ( nMax == 1 && nCount == 1 )
@@ -3602,8 +3601,8 @@ void ScInterpreter::ScModalValue_MS( bool bSingle )
else
{
// sort resultArray according to ordering of aArray
- vector< vector< double > > aOrder;
- aOrder.resize( aResultArray.size(), vector< double >( 2 ) );
+ std::vector<std::vector<double>> aOrder;
+ aOrder.resize( aResultArray.size(), std::vector< double >( 2 ) );
for ( i = 0; i < aResultArray.size(); i++ )
{
for ( SCSIZE j = 0; j < nSize; j++ )
@@ -3661,7 +3660,7 @@ void ScInterpreter::CalculateSmallLarge(bool bSmall)
return static_cast<SCSIZE>(f);
});
- vector<double> aSortArray;
+ std::vector<double> aSortArray;
GetNumberSequenceArray(1, aSortArray, false );
const SCSIZE nSize = aSortArray.size();
if (nSize == 0 || nGlobalError != FormulaError::NONE)
@@ -3678,7 +3677,7 @@ void ScInterpreter::CalculateSmallLarge(bool bSmall)
}
else
{
- vector<double>::iterator iPos = aSortArray.begin() + (bSmall ? k-1 : nSize-k);
+ std::vector<double>::iterator iPos = aSortArray.begin() + (bSmall ? k-1 : nSize-k);
::std::nth_element( aSortArray.begin(), iPos, aSortArray.end());
PushDouble( *iPos);
}
@@ -3746,7 +3745,7 @@ void ScInterpreter::ScPercentrank( bool bInclusive )
return;
}
double fNum = GetDouble();
- vector<double> aSortArray;
+ std::vector<double> aSortArray;
GetSortArray( 1, aSortArray, nullptr, false, false );
SCSIZE nSize = aSortArray.size();
if ( nSize == 0 || nGlobalError != FormulaError::NONE )
@@ -3772,7 +3771,7 @@ void ScInterpreter::ScPercentrank( bool bInclusive )
}
}
-double ScInterpreter::GetPercentrank( ::std::vector<double> & rArray, double fVal, bool bInclusive )
+double ScInterpreter::GetPercentrank(std::vector<double> & rArray, double fVal, bool bInclusive )
{
SCSIZE nSize = rArray.size();
double fRes;
@@ -3839,7 +3838,7 @@ void ScInterpreter::ScTrimMean()
PushIllegalArgument();
return;
}
- vector<double> aSortArray;
+ std::vector<double> aSortArray;
GetSortArray( 1, aSortArray, nullptr, false, false );
SCSIZE nSize = aSortArray.size();
if (nSize == 0 || nGlobalError != FormulaError::NONE)
@@ -3960,7 +3959,7 @@ std::vector<double> ScInterpreter::GetRankNumberArray( SCSIZE& rCol, SCSIZE& rRo
return aArray;
}
-void ScInterpreter::GetNumberSequenceArray( sal_uInt8 nParamCount, vector<double>& rArray, bool bConvertTextInArray )
+void ScInterpreter::GetNumberSequenceArray( sal_uInt8 nParamCount, std::vector<double>& rArray, bool bConvertTextInArray )
{
ScAddress aAdr;
ScRange aRange;
@@ -4588,7 +4587,7 @@ short ScInterpreter::CompareMatrixCell( const ScMatrixRef& pMatSrc, sal_uInt16 n
return nRes;
}
-void ScInterpreter::GetSortArray( sal_uInt8 nParamCount, vector<double>& rSortArray, vector<tools::Long>* pIndexOrder, bool bConvertTextInArray, bool bAllowEmptyArray )
+void ScInterpreter::GetSortArray( sal_uInt8 nParamCount, std::vector<double>& rSortArray, std::vector<tools::Long>* pIndexOrder, bool bConvertTextInArray, bool bAllowEmptyArray )
{
GetNumberSequenceArray( nParamCount, rSortArray, bConvertTextInArray );
if (rSortArray.size() > MAX_COUNT_DOUBLE_FOR_SORT(mrDoc.GetSheetLimits()))
@@ -4604,19 +4603,17 @@ void ScInterpreter::GetSortArray( sal_uInt8 nParamCount, vector<double>& rSortAr
QuickSort( rSortArray, pIndexOrder);
}
-static void lcl_QuickSort( tools::Long nLo, tools::Long nHi, vector<double>& rSortArray, vector<tools::Long>* pIndexOrder )
+static void lcl_QuickSort( tools::Long nLo, tools::Long nHi, std::vector<double>& rSortArray, std::vector<tools::Long>* pIndexOrder )
{
// If pIndexOrder is not NULL, we assume rSortArray.size() == pIndexOrder->size().
- using ::std::swap;
-
if (nHi - nLo == 1)
{
if (rSortArray[nLo] > rSortArray[nHi])
{
- swap(rSortArray[nLo], rSortArray[nHi]);
+ std::swap(rSortArray[nLo], rSortArray[nHi]);
if (pIndexOrder)
- swap(pIndexOrder->at(nLo), pIndexOrder->at(nHi));
+ std::swap(pIndexOrder->at(nLo), pIndexOrder->at(nHi));
}
return;
}
@@ -4632,9 +4629,9 @@ static void lcl_QuickSort( tools::Long nLo, tools::Long nHi, vector<double>& rSo
{
if (ni != nj)
{
- swap(rSortArray[ni], rSortArray[nj]);
+ std::swap(rSortArray[ni], rSortArray[nj]);
if (pIndexOrder)
- swap(pIndexOrder->at(ni), pIndexOrder->at(nj));
+ std::swap(pIndexOrder->at(ni), pIndexOrder->at(nj));
}
++ni;
@@ -4655,7 +4652,7 @@ static void lcl_QuickSort( tools::Long nLo, tools::Long nHi, vector<double>& rSo
}
}
-void ScInterpreter::QuickSort( vector<double>& rSortArray, vector<tools::Long>* pIndexOrder )
+void ScInterpreter::QuickSort(std::vector<double>& rSortArray, std::vector<tools::Long>* pIndexOrder )
{
tools::Long n = static_cast<tools::Long>(rSortArray.size());
@@ -4674,9 +4671,9 @@ void ScInterpreter::QuickSort( vector<double>& rSortArray, vector<tools::Long>*
for (size_t i = 0; (i + 4) <= nValCount-1; i += 4)
{
size_t nInd = comphelper::rng::uniform_size_distribution(0, nValCount-2);
- ::std::swap( rSortArray[i], rSortArray[nInd]);
+ std::swap( rSortArray[i], rSortArray[nInd]);
if (pIndexOrder)
- ::std::swap( pIndexOrder->at(i), pIndexOrder->at(nInd));
+ std::swap( pIndexOrder->at(i), pIndexOrder->at(nInd));
}
lcl_QuickSort(0, n-1, rSortArray, pIndexOrder);
@@ -4693,7 +4690,7 @@ void ScInterpreter::ScRank( bool bAverage )
else
bAscending = false;
- vector<double> aSortArray;
+ std::vector<double> aSortArray;
GetSortArray( 1, aSortArray, nullptr, false, false );
double fVal = GetDouble();
SCSIZE nSize = aSortArray.size();
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index d72f645afba1..7342222d3e04 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -77,7 +77,6 @@
using namespace com::sun::star;
using namespace formula;
-using ::std::unique_ptr;
#define ADDIN_MAXSTRLEN 256
@@ -2504,7 +2503,7 @@ svl::SharedString ScInterpreter::GetStringFromDouble( double fVal )
void ScInterpreter::ScDBGet()
{
bool bMissingField = false;
- unique_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
+ std::unique_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
if (!pQueryParam)
{
// Failed to create query param.
diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index 15f013f33fb1..19a81324b1f0 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -43,7 +43,6 @@
#include <vector>
-using ::std::vector;
using namespace formula;
namespace {
@@ -763,11 +762,11 @@ void ScInterpreter::MEMat(const ScMatrixRef& mM, SCSIZE n)
* the product of the diagonal elements of the LU matrix.
*/
static int lcl_LUP_decompose( ScMatrix* mA, const SCSIZE n,
- ::std::vector< SCSIZE> & P )
+ std::vector< SCSIZE> & P )
{
int nSign = 1;
// Find scale of each row.
- ::std::vector< double> aScale(n);
+ std::vector< double> aScale(n);
for (SCSIZE i=0; i < n; ++i)
{
double fMax = 0.0;
@@ -864,8 +863,8 @@ static int lcl_LUP_decompose( ScMatrix* mA, const SCSIZE n,
* return the solution vector.
*/
static void lcl_LUP_solve( const ScMatrix* mLU, const SCSIZE n,
- const ::std::vector< SCSIZE> & P, const ::std::vector< double> & B,
- ::std::vector< double> & X )
+ const std::vector< SCSIZE> & P, const std::vector< double> & B,
+ std::vector< double> & X )
{
SCSIZE nFirst = SCSIZE_MAX;
// Ax=b => PAx=Pb, with decomposition LUx=Pb.
@@ -932,7 +931,7 @@ void ScInterpreter::ScMatDet()
PushError( FormulaError::CodeOverflow);
else
{
- ::std::vector< SCSIZE> P(nR);
+ std::vector< SCSIZE> P(nR);
int nDetSign = lcl_LUP_decompose( xLU.get(), nR, P);
if (!nDetSign)
PushInt(0); // singular matrix
@@ -996,15 +995,15 @@ void ScInterpreter::ScMatInv()
PushError( FormulaError::CodeOverflow);
else
{
- ::std::vector< SCSIZE> P(nR);
+ std::vector< SCSIZE> P(nR);
int nDetSign = lcl_LUP_decompose( xLU.get(), nR, P);
if (!nDetSign)
PushIllegalArgument();
else
{
// Solve equation for each column.
- ::std::vector< double> B(nR);
- ::std::vector< double> X(nR);
+ std::vector< double> B(nR);
+ std::vector< double> X(nR);
for (SCSIZE j=0; j < nR; ++j)
{
for (SCSIZE i=0; i < nR; ++i)
@@ -1882,8 +1881,8 @@ void ScInterpreter::ScFrequency()
if ( !MustHaveParamCount( GetByte(), 2 ) )
return;
- vector<double> aBinArray;
- vector<tools::Long> aBinIndexOrder;
+ std::vector<double> aBinArray;
+ std::vector<tools::Long> aBinIndexOrder;
GetSortArray( 1, aBinArray, &aBinIndexOrder, false, false );
SCSIZE nBinSize = aBinArray.size();
@@ -1893,7 +1892,7 @@ void ScInterpreter::ScFrequency()
return;
}
- vector<double> aDataArray;
+ std::vector<double> aDataArray;
GetSortArray( 1, aDataArray, nullptr, false, false );
SCSIZE nDataSize = aDataArray.size();
@@ -2041,7 +2040,7 @@ double lcl_GetSign(double fValue)
* errors singularity is often not detected.
*/
bool lcl_CalculateQRdecomposition(const ScMatrixRef& pMatA,
- ::std::vector< double>& pVecR, SCSIZE nK, SCSIZE nN)
+ std::vector< double>& pVecR, SCSIZE nK, SCSIZE nN)
{
// ScMatrix matrices are zero based, index access (column,row)
for (SCSIZE col = 0; col <nK; col++)
@@ -2075,7 +2074,7 @@ bool lcl_CalculateQRdecomposition(const ScMatrixRef& pMatA,
// same with transposed matrix A, N is count of columns, K count of rows
bool lcl_TCalculateQRdecomposition(const ScMatrixRef& pMatA,
- ::std::vector< double>& pVecR, SCSIZE nK, SCSIZE nN)
+ std::vector< double>& pVecR, SCSIZE nK, SCSIZE nN)
{
double fSum ;
// ScMatrix matrices are zero based, index access (column,row)
@@ -2121,7 +2120,7 @@ void lcl_ApplyHouseholderTransformation(const ScMatrixRef& pMatA, SCSIZE nC,
// ScMatrix matrices are zero based, index access (column,row)
double fDenominator = lcl_GetColumnSumProduct(pMatA, nC, pMatA, nC, nC, nN);
double fNumerator = lcl_GetColumnSumProduct(pMatA, nC, pMatY, 0, nC, nN);
- double fFactor = 2.0 * (fNumerator/fDenominator);
+ double fFactor = 2.0 * o3tl::div_allow_zero(fNumerator, fDenominator);
for (SCSIZE row = nC; row < nN; row++)
pMatY->PutDouble(
pMatY->GetDouble(row) - fFactor * pMatA->GetDouble(nC,row), row);
@@ -2134,7 +2133,7 @@ void lcl_TApplyHouseholderTransformation(const ScMatrixRef& pMatA, SCSIZE nR,
// ScMatrix matrices are zero based, index access (column,row)
double fDenominator = lcl_TGetColumnSumProduct(pMatA, nR, pMatA, nR, nR, nN);
double fNumerator = lcl_TGetColumnSumProduct(pMatA, nR, pMatY, 0, nR, nN);
- double fFactor = 2.0 * (fNumerator/fDenominator);
+ double fFactor = 2.0 * o3tl::div_allow_zero(fNumerator, fDenominator);
for (SCSIZE col = nR; col < nN; col++)
pMatY->PutDouble(
pMatY->GetDouble(col) - fFactor * pMatA->GetDouble(col,nR), col);
@@ -2147,7 +2146,7 @@ void lcl_TApplyHouseholderTransformation(const ScMatrixRef& pMatA, SCSIZE nR,
* elements, no check is done.
*/
void lcl_SolveWithUpperRightTriangle(const ScMatrixRef& pMatA,
- ::std::vector< double>& pVecR, const ScMatrixRef& pMatS,
+ std::vector< double>& pVecR, const ScMatrixRef& pMatS,
SCSIZE nK, bool bIsTransposed)
{
// ScMatrix matrices are zero based, index access (column,row)
@@ -2173,7 +2172,7 @@ void lcl_SolveWithUpperRightTriangle(const ScMatrixRef& pMatA,
* zero elements, no check is done.
*/
void lcl_SolveWithLowerLeftTriangle(const ScMatrixRef& pMatA,
- ::std::vector< double>& pVecR, const ScMatrixRef& pMatT,
+ std::vector< double>& pVecR, const ScMatrixRef& pMatT,
SCSIZE nK, bool bIsTransposed)
{
// ScMatrix matrices are zero based, index access (column,row)
@@ -2198,7 +2197,7 @@ void lcl_SolveWithLowerLeftTriangle(const ScMatrixRef& pMatA,
* not used.
*/
void lcl_ApplyUpperRightTriangle(const ScMatrixRef& pMatA,
- ::std::vector< double>& pVecR, const ScMatrixRef& pMatB,
+ std::vector< double>& pVecR, const ScMatrixRef& pMatB,
const ScMatrixRef& pMatZ, SCSIZE nK, bool bIsTransposed)
{
// ScMatrix matrices are zero based, index access (column,row)
@@ -2606,7 +2605,7 @@ void ScInterpreter::CalculateRGPRKP(bool _bRKP)
// becomes B = R^(-1) * Q' * Y
if (nCase ==2) // Y is column
{
- ::std::vector< double> aVecR(N); // for QR decomposition
+ std::vector< double> aVecR(N); // for QR decomposition
// Enough memory for needed matrices?
ScMatrixRef pMeans = GetNewMat(K, 1, /*bEmpty*/true); // mean of each column
ScMatrixRef pMatZ; // for Q' * Y , inter alia
@@ -2761,7 +2760,7 @@ void ScInterpreter::CalculateRGPRKP(bool _bRKP)
}
else // nCase == 3, Y is row, all matrices are transposed
{
- ::std::vector< double> aVecR(N); // for QR decomposition
+ std::vector< double> aVecR(N); // for QR decomposition
// Enough memory for needed matrices?
ScMatrixRef pMeans = GetNewMat(1, K, /*bEmpty*/true); // mean of each row
ScMatrixRef pMatZ; // for Q' * Y , inter alia
@@ -3108,7 +3107,7 @@ void ScInterpreter::CalculateTrendGrowth(bool _bGrowth)
{
if (nCase ==2) // Y is column
{
- ::std::vector< double> aVecR(N); // for QR decomposition
+ std::vector< double> aVecR(N); // for QR decomposition
// Enough memory for needed matrices?
ScMatrixRef pMeans = GetNewMat(K, 1, /*bEmpty*/true); // mean of each column
ScMatrixRef pSlopes = GetNewMat(1,K, /*bEmpty*/true); // from b1 to bK
@@ -3167,7 +3166,7 @@ void ScInterpreter::CalculateTrendGrowth(bool _bGrowth)
else
{ // nCase == 3, Y is row, all matrices are transposed
- ::std::vector< double> aVecR(N); // for QR decomposition
+ std::vector< double> aVecR(N); // for QR decomposition
// Enough memory for needed matrices?
ScMatrixRef pMeans = GetNewMat(1, K, /*bEmpty*/true); // mean of each row
ScMatrixRef pSlopes = GetNewMat(K,1, /*bEmpty*/true); // row from b1 to bK
diff --git a/sc/source/core/tool/interpr6.cxx b/sc/source/core/tool/interpr6.cxx
index 2d6a38a3c6b1..6d9889841a97 100644
--- a/sc/source/core/tool/interpr6.cxx
+++ b/sc/source/core/tool/interpr6.cxx
@@ -96,7 +96,7 @@ double ScInterpreter::GetGammaContFraction( double fA, double fX )
double ScInterpreter::GetGammaSeries( double fA, double fX )
{
double fDenomfactor = fA;
- double fSummand = 1.0/fA;
+ double fSummand = o3tl::div_allow_zero(1.0, fA);
double fSum = fSummand;
int nCount=1;
do
@@ -171,7 +171,7 @@ double ScInterpreter::GetGammaDistPDF( double fX, double fAlpha, double fLambda
const double fLogDblMax = log( ::std::numeric_limits<double>::max());
if (log(fXr) * (fAlpha-1.0) < fLogDblMax && fAlpha < fMaxGammaArgument)
{
- return pow( fXr, fAlpha-1.0) * exp(-fXr) / fLambda / GetGamma(fAlpha);
+ return o3tl::div_allow_zero(pow( fXr, fAlpha-1.0) * exp(-fXr) / fLambda, GetGamma(fAlpha));
}
else
{
@@ -182,7 +182,7 @@ double ScInterpreter::GetGammaDistPDF( double fX, double fAlpha, double fLambda
{
if (fAlpha<fMaxGammaArgument)
{
- return pow( fXr, fAlpha-1.0) * exp(-fXr) / fLambda / GetGamma(fAlpha);
+ return o3tl::div_allow_zero(pow( fXr, fAlpha-1.0) * exp(-fXr) / fLambda, GetGamma(fAlpha));
}
else
{
diff --git a/sc/source/core/tool/interpr8.cxx b/sc/source/core/tool/interpr8.cxx
index 1c53c7ba4932..05e38e0f19c1 100644
--- a/sc/source/core/tool/interpr8.cxx
+++ b/sc/source/core/tool/interpr8.cxx
@@ -521,7 +521,7 @@ void ScETSForecastCalculation::calcAccuracyIndicators()
int nCalcCount = mnCount - 1;
mfMAE = fSumAbsErr.get() / nCalcCount;
- mfMASE = fSumAbsErr.get() / ( nCalcCount * fSumDivisor.get() / ( nCalcCount - 1 ) );
+ mfMASE = o3tl::div_allow_zero(fSumAbsErr.get(), nCalcCount * fSumDivisor.get() / ( nCalcCount - 1 ));
mfMSE = fSumErrSq.get() / nCalcCount;
mfRMSE = sqrt( mfMSE );
mfSMAPE = fSumAbsPercErr.get() * 2.0 / nCalcCount;
diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx
index 45795c9df792..e96185da0ef4 100644
--- a/sc/source/core/tool/rangelst.cxx
+++ b/sc/source/core/tool/rangelst.cxx
@@ -29,9 +29,6 @@
#include <algorithm>
#include <memory>
-using ::std::vector;
-using ::std::find_if;
-using ::std::for_each;
using ::formula::FormulaGrammar;
namespace {
@@ -1087,7 +1084,7 @@ bool ScRangeList::Contains( const ScRange& rRange ) const
sal_uInt64 ScRangeList::GetCellCount() const
{
CountCells func;
- return for_each(maRanges.begin(), maRanges.end(), func).getCellCount();
+ return std::for_each(maRanges.begin(), maRanges.end(), func).getCellCount();
}
void ScRangeList::Remove(size_t nPos)
diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx
index 051b0a5e77ac..4fc30e71d508 100644
--- a/sc/source/core/tool/rangenam.cxx
+++ b/sc/source/core/tool/rangenam.cxx
@@ -38,7 +38,6 @@
#include <formula/errorcodes.hxx>
using namespace formula;
-using ::std::pair;
// ScRangeData
@@ -830,7 +829,7 @@ bool ScRangeName::insert( ScRangeData* p, bool bReuseFreeIndex )
OUString aName(p->GetUpperName());
erase(aName); // ptr_map won't insert it if a duplicate name exists.
- pair<DataType::iterator, bool> r =
+ std::pair<DataType::iterator, bool> r =
m_Data.insert(std::make_pair(aName, std::unique_ptr<ScRangeData>(p)));
if (r.second)
{
diff --git a/sc/source/core/tool/reftokenhelper.cxx b/sc/source/core/tool/reftokenhelper.cxx
index a4992485ee66..03bf88f19df1 100644
--- a/sc/source/core/tool/reftokenhelper.cxx
+++ b/sc/source/core/tool/reftokenhelper.cxx
@@ -31,10 +31,8 @@
using namespace formula;
-using ::std::vector;
-
void ScRefTokenHelper::compileRangeRepresentation(
- vector<ScTokenRef>& rRefTokens, const OUString& rRangeStr, ScDocument& rDoc,
+ std::vector<ScTokenRef>& rRefTokens, const OUString& rRangeStr, ScDocument& rDoc,
const sal_Unicode cSep, FormulaGrammar::Grammar eGrammar, bool bOnly3DRef)
{
// #i107275# ignore parentheses
@@ -177,7 +175,7 @@ bool ScRefTokenHelper::getRangeFromToken(
}
void ScRefTokenHelper::getRangeListFromTokens(
- const ScDocument* pDoc, ScRangeList& rRangeList, const vector<ScTokenRef>& rTokens, const ScAddress& rPos)
+ const ScDocument* pDoc, ScRangeList& rRangeList, const std::vector<ScTokenRef>& rTokens, const ScAddress& rPos)
{
for (const auto& rToken : rTokens)
{
@@ -200,9 +198,9 @@ void ScRefTokenHelper::getTokenFromRange(const ScDocument* pDoc, ScTokenRef& pTo
pToken.reset(new ScDoubleRefToken(pDoc->GetSheetLimits(), aData));
}
-void ScRefTokenHelper::getTokensFromRangeList(const ScDocument* pDoc, vector<ScTokenRef>& pTokens, const ScRangeList& rRanges)
+void ScRefTokenHelper::getTokensFromRangeList(const ScDocument* pDoc, std::vector<ScTokenRef>& pTokens, const ScRangeList& rRanges)
{
- vector<ScTokenRef> aTokens;
+ std::vector<ScTokenRef> aTokens;
size_t nCount = rRanges.size();
aTokens.reserve(nCount);
for (size_t i = 0; i < nCount; ++i)
@@ -245,7 +243,7 @@ bool ScRefTokenHelper::isExternalRef(const ScTokenRef& pToken)
bool ScRefTokenHelper::intersects(
const ScDocument* pDoc,
- const vector<ScTokenRef>& rTokens, const ScTokenRef& pToken, const ScAddress& rPos)
+ const std::vector<ScTokenRef>& rTokens, const ScTokenRef& pToken, const ScAddress& rPos)
{
if (!isRef(pToken))
return false;
@@ -289,7 +287,7 @@ public:
* @param rTokens existing list of reference tokens
* @param rToken new token
*/
- void operator() (const ScDocument* pDoc, vector<ScTokenRef>& rTokens, const ScTokenRef& pToken, const ScAddress& rPos)
+ void operator() (const ScDocument* pDoc, std::vector<ScTokenRef>& rTokens, const ScTokenRef& pToken, const ScAddress& rPos)
{
join(pDoc, rTokens, pToken, rPos);
}
@@ -324,7 +322,7 @@ private:
return true;
}
- void join(const ScDocument* pDoc, vector<ScTokenRef>& rTokens, const ScTokenRef& pToken, const ScAddress& rPos)
+ void join(const ScDocument* pDoc, std::vector<ScTokenRef>& rTokens, const ScTokenRef& pToken, const ScAddress& rPos)
{
// Normalize the token to a double reference.
ScComplexRefData aData;
@@ -436,7 +434,7 @@ private:
}
-void ScRefTokenHelper::join(const ScDocument* pDoc, vector<ScTokenRef>& rTokens, const ScTokenRef& pToken, const ScAddress& rPos)
+void ScRefTokenHelper::join(const ScDocument* pDoc, std::vector<ScTokenRef>& rTokens, const ScTokenRef& pToken, const ScAddress& rPos)
{
JoinRefTokenRanges join;
join(pDoc, rTokens, pToken, rPos);
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index 90782fc5d5d1..63acabf4b646 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -46,13 +46,8 @@
#if DEBUG_MATRIX
#include <iostream>
-using std::cout;
-using std::endl;
#endif
-using ::std::pair;
-using ::std::advance;
-
namespace {
/**
@@ -2742,33 +2737,33 @@ void ScMatrixImpl::ExecuteOperation(const std::pair<size_t, size_t>& rStartPos,
void ScMatrixImpl::Dump() const
{
- cout << "-- matrix content" << endl;
+ std::cout << "-- matrix content" << std::endl;
SCSIZE nCols, nRows;
GetDimensions(nCols, nRows);
for (SCSIZE nRow = 0; nRow < nRows; ++nRow)
{
for (SCSIZE nCol = 0; nCol < nCols; ++nCol)
{
- cout << " row=" << nRow << ", col=" << nCol << " : ";
+ std::cout << " row=" << nRow << ", col=" << nCol << " : ";
switch (maMat.get_type(nRow, nCol))
{
case mdds::mtm::element_string:
- cout << "string (" << maMat.get_string(nRow, nCol).getString() << ")";
+ std::cout << "string (" << maMat.get_string(nRow, nCol).getString() << ")";
break;
case mdds::mtm::element_numeric:
- cout << "numeric (" << maMat.get_numeric(nRow, nCol) << ")";
+ std::cout << "numeric (" << maMat.get_numeric(nRow, nCol) << ")";
break;
case mdds::mtm::element_boolean:
- cout << "boolean (" << maMat.get_boolean(nRow, nCol) << ")";
+ std::cout << "boolean (" << maMat.get_boolean(nRow, nCol) << ")";
break;
case mdds::mtm::element_empty:
- cout << "empty";
+ std::cout << "empty";
break;
default:
;
}
- cout << endl;
+ std::cout << std::endl;
}
}
}
diff --git a/sc/source/core/tool/subtotal.cxx b/sc/source/core/tool/subtotal.cxx
index 4c213893b14d..498e94f4f0f6 100644
--- a/sc/source/core/tool/subtotal.cxx
+++ b/sc/source/core/tool/subtotal.cxx
@@ -18,6 +18,7 @@
*/
#include <subtotal.hxx>
+#include <o3tl/untaint.hxx>
#include <sal/mathconf.h>
#include <cfloat>
@@ -54,7 +55,7 @@ bool SubTotal::SafeDiv(double& fVal1, double fVal2)
{
bool bOk = true;
SAL_MATH_FPEXCEPTIONS_OFF();
- fVal1 /= fVal2;
+ fVal1 = o3tl::div_allow_zero(fVal1, fVal2);
if (!std::isfinite(fVal1))
{
bOk = false;
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index d2d57372a91b..082a591cc032 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -56,7 +56,6 @@
#include <o3tl/safeint.hxx>
#include <o3tl/sorted_vector.hxx>
-using ::std::vector;
using namespace formula;
using namespace com::sun::star;
diff --git a/sc/source/filter/dif/difimp.cxx b/sc/source/filter/dif/difimp.cxx
index d26b7276a3de..626b76005988 100644
--- a/sc/source/filter/dif/difimp.cxx
+++ b/sc/source/filter/dif/difimp.cxx
@@ -625,7 +625,7 @@ void DifColumn::NewEntry( const SCROW nPos, const sal_uInt32 nNumFormat )
void DifColumn::Apply( ScDocument& rDoc, const SCCOL nCol, const SCTAB nTab )
{
ScPatternAttr aAttr(rDoc.getCellAttributeHelper());
- SfxItemSet &rItemSet = aAttr.GetItemSet();
+ SfxItemSet &rItemSet = aAttr.GetItemSetWritable();
for (const auto& rEntry : maEntries)
{
diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx
index 00f23be6e292..84490825ffb5 100644
--- a/sc/source/filter/excel/excdoc.cxx
+++ b/sc/source/filter/excel/excdoc.cxx
@@ -1115,7 +1115,7 @@ void ExcDocument::WriteXml( XclExpXmlStream& rStrm )
= sax_fastparser::FastSerializerHelper::createAttrList();
// <tables count="<xsd:unsignedInt>">
- if (rModel.mxWebPr->mnCount >= 0)
+ if (rModel.mxWebPr->mnCount >= 0 && !rModel.mxWebPr->maTables.empty())
{
pAttrListTables->add(XML_count,
OUString::number(rModel.mxWebPr->mnCount));
@@ -1223,35 +1223,34 @@ void ExcDocument::WriteXml( XclExpXmlStream& rStrm )
}
}
- { // export <extLst>
- if (rModel.mxExtensionList)
- {
- // put <extLst>, it has no attributes
- rStrm.GetCurrentStream()->startElement(XML_extLst);
-
- // export uri attribute of <ext> element
- for (auto& uriValue : rModel.mxExtensionList->vExtension)
- {
- // export <ext> with uri attribute.
- rStrm.GetCurrentStream()->startElement(XML_ext, XML_uri, uriValue);
+ // export <extLst>
+ if (rModel.mxExtensionList)
+ {
+ // put <extLst>, it has no attributes
+ rStrm.GetCurrentStream()->startElement(XML_extLst);
- /*
- TODO: export child elements of <ext>. We should export "any element in any namespace", which seems challenging.
+ // export uri attribute of <ext> element
+ for (auto& uriValue : rModel.mxExtensionList->vExtension)
+ {
+ // export <ext> with uri attribute.
+ rStrm.GetCurrentStream()->startElement(XML_ext, XML_uri, uriValue);
- <extLst>
- <ext>
- (Any element in any namespace)
- </ext>
- </extLst>
- */
+ /*
+ TODO: export child elements of <ext>. We should export "any element in any namespace", which seems challenging.
- // put </ext>
- rStrm.GetCurrentStream()->endElement(XML_ext);
- }
+ <extLst>
+ <ext>
+ (Any element in any namespace)
+ </ext>
+ </extLst>
+ */
- // put </extLst>
- rStrm.GetCurrentStream()->endElement(XML_extLst);
+ // put </ext>
+ rStrm.GetCurrentStream()->endElement(XML_ext);
}
+
+ // put </extLst>
+ rStrm.GetCurrentStream()->endElement(XML_extLst);
}
// put </connection>
@@ -1275,6 +1274,33 @@ void ExcDocument::WriteXml( XclExpXmlStream& rStrm )
oox::getRelationship(Relationship::CUSTOMXML), sCustomXmlPath);
}
+ if (rDoc.hasXmlMaps())
+ {
+ // save xl/xmlMaps.xml relationship into xl/_rels/workbook.xml.rels
+ // save xl/xmlMaps.xml reference into [Content_Types].xml and open stream to xl/xmlMaps.xml
+ sax_fastparser::FSHelperPtr aXmlMapsXml = rStrm.CreateOutputStream(
+ "xl/xmlMaps.xml", u"xmlMaps.xml", rStrm.GetCurrentStream()->getOutputStream(),
+ "application/xml", oox::getRelationship(Relationship::XMLMAPS));
+
+ // start exporting xl/xmlMaps.xml
+ /* this adds <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+ XML declaration automatically at the top of the file. */
+ rStrm.PushStream(aXmlMapsXml);
+
+ // get xmlMaps.xml content as string
+ std::string sXmlMapsContent = rDoc.getXmlMapsItem();
+
+ /* we should remove <?xml version="1.0" encoding="UTF-8"?>
+ XML declaration from the string as rStrm.PushStream() already adds it. */
+ sal_uInt32 nXmlDeclarationLocation = sXmlMapsContent.find(">");
+ sXmlMapsContent = sXmlMapsContent.substr(nXmlDeclarationLocation + 1);
+
+ // write contents into xl/xmlMaps.xml
+ rStrm.GetCurrentStream()->write(sXmlMapsContent);
+
+ rStrm.PopStream();
+ }
+
// write if it has been read|imported or explicitly changed
// or if ref syntax isn't what would be native for our file format
// i.e. ExcelA1 in this case
diff --git a/sc/source/filter/excel/excform.cxx b/sc/source/filter/excel/excform.cxx
index e9e59b5fe6da..3a7d87c61cf3 100644
--- a/sc/source/filter/excel/excform.cxx
+++ b/sc/source/filter/excel/excform.cxx
@@ -36,8 +36,6 @@
#include <xistyle.hxx>
#include <documentimport.hxx>
-using ::std::vector;
-
const sal_uInt16 ExcelToSc::nRowMask = 0x3FFF;
void ImportExcel::Formula25()
@@ -1301,7 +1299,7 @@ ConvErr ExcelToSc::Convert( ScRangeListTabs& rRangeList, XclImpStream& aIn, std:
}
void ExcelToSc::ConvertExternName( std::unique_ptr<ScTokenArray>& /*rpArray*/, XclImpStream& /*rStrm*/, std::size_t /*nFormulaLen*/,
- const OUString& /*rUrl*/, const vector<OUString>& /*rTabNames*/ )
+ const OUString& /*rUrl*/, const std::vector<OUString>& /*rTabNames*/ )
{
}
diff --git a/sc/source/filter/excel/excform8.cxx b/sc/source/filter/excel/excform8.cxx
index 48f4d0c3ad97..18b2bdd41850 100644
--- a/sc/source/filter/excel/excform8.cxx
+++ b/sc/source/filter/excel/excform8.cxx
@@ -34,8 +34,6 @@
#include <o3tl/safeint.hxx>
-using ::std::vector;
-
namespace {
/**
@@ -1265,7 +1263,7 @@ ConvErr ExcelToSc8::Convert( ScRangeListTabs& rRangeList, XclImpStream& aIn, std
}
void ExcelToSc8::ConvertExternName( std::unique_ptr<ScTokenArray>& rpArray, XclImpStream& rStrm, std::size_t nFormulaLen,
- const OUString& rUrl, const vector<OUString>& rTabNames )
+ const OUString& rUrl, const std::vector<OUString>& rTabNames )
{
if( !GetDocShell() )
return;
diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx
index 173049091223..d6faaa731f35 100644
--- a/sc/source/filter/excel/impop.cxx
+++ b/sc/source/filter/excel/impop.cxx
@@ -24,7 +24,7 @@
#include <scitems.hxx>
-#include <o3tl/safeint.hxx>
+#include <o3tl/untaint.hxx>
#include <sfx2/docfile.hxx>
#include <svx/svxids.hrc>
#include <svl/numformat.hxx>
diff --git a/sc/source/filter/excel/xedbdata.cxx b/sc/source/filter/excel/xedbdata.cxx
index 5bea87e72b96..128e145ac51d 100644
--- a/sc/source/filter/excel/xedbdata.cxx
+++ b/sc/source/filter/excel/xedbdata.cxx
@@ -13,6 +13,7 @@
#include <document.hxx>
#include <oox/export/utils.hxx>
#include <oox/token/namespaces.hxx>
+#include <sax/fastattribs.hxx>
using namespace oox;
@@ -222,6 +223,7 @@ void XclExpTables::SaveTableXml( XclExpXmlStream& rStrm, const Entry& rEntry )
const std::vector< OUString >& rColNames = rData.GetTableColumnNames();
const std::vector< TableColumnAttributes >& rColAttributes = rData.GetTableColumnAttributes();
+ const std::vector< TableColumnModel >& rTableColumnModel = rData.GetTableColumnModel();
if (!rColNames.empty())
{
pTableStrm->startElement(XML_tableColumns,
@@ -235,7 +237,7 @@ void XclExpTables::SaveTableXml( XclExpXmlStream& rStrm, const Entry& rEntry )
// OOXTODO: write <totalsRowFormula> once we support it.
- pTableStrm->singleElement( XML_tableColumn,
+ pTableStrm->startElement( XML_tableColumn,
XML_id, OString::number(i+1),
XML_name, rColNames[i].toUtf8(),
XML_totalsRowFunction, (i < rColAttributes.size() ? rColAttributes[i].maTotalsFunction : std::nullopt)
@@ -249,6 +251,25 @@ void XclExpTables::SaveTableXml( XclExpXmlStream& rStrm, const Entry& rEntry )
// OOXTODO: XML_totalsRowLabel, ...,
// OOXTODO: XML_uniqueName, ...
);
+
+ if (i < rTableColumnModel.size() && rTableColumnModel[i].mxXmlColumnPr)
+ {
+ // export <xmlColumnPr>
+ rtl::Reference<sax_fastparser::FastAttributeList> pXmlColumnPrAttrList
+ = sax_fastparser::FastSerializerHelper::createAttrList();
+
+ XmlColumnPrModel* rXmlColRef = rTableColumnModel[i].mxXmlColumnPr.get();
+
+ pXmlColumnPrAttrList->add(XML_mapId, OUString::number(rXmlColRef->mnMapId));
+ pXmlColumnPrAttrList->add(XML_xpath, rXmlColRef->msXpath);
+ pXmlColumnPrAttrList->add(XML_xmlDataType, rXmlColRef->msXmlDataType);
+ pXmlColumnPrAttrList->add(XML_denormalized, ToPsz10(rXmlColRef->mbDenormalized));
+
+ pTableStrm->singleElement(XML_xmlColumnPr, pXmlColumnPrAttrList);
+ }
+
+ // put </tableColumn>
+ pTableStrm->endElement(XML_tableColumn);
}
pTableStrm->endElement( XML_tableColumns);
diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx
index 4374b0bc3ef7..fe9612053400 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -42,8 +42,6 @@
#include <memory>
#include <string_view>
-using ::std::unique_ptr;
-using ::std::vector;
using ::com::sun::star::uno::Any;
using namespace oox;
@@ -122,7 +120,7 @@ private:
private:
const XclExpSupbook& mrSupbook;
- unique_ptr<ScTokenArray> mpArray;
+ std::unique_ptr<ScTokenArray> mpArray;
};
// List of external names =====================================================
@@ -2090,7 +2088,7 @@ void XclExpSupbookBuffer::SaveXml( XclExpXmlStream& rStrm )
// Unused external references are not saved, only kept in memory.
// Those that are saved must be indexed from 1, so indexes must be reordered
ScExternalRefManager* pRefMgr = GetDoc().GetExternalRefManager();
- vector<sal_uInt16> aExternFileIds;
+ std::vector<sal_uInt16> aExternFileIds;
for (size_t nPos = 0, nSize = maSupbookList.GetSize(); nPos < nSize; ++nPos)
{
XclExpSupbookRef xRef(maSupbookList.GetRecord(nPos));
diff --git a/sc/source/filter/excel/xepage.cxx b/sc/source/filter/excel/xepage.cxx
index 06af615d0e56..4a2a80e3076a 100644
--- a/sc/source/filter/excel/xepage.cxx
+++ b/sc/source/filter/excel/xepage.cxx
@@ -43,9 +43,6 @@
using namespace ::oox;
-using ::std::set;
-using ::std::numeric_limits;
-
// Page settings records ======================================================
// Header/footer --------------------------------------------------------------
@@ -368,10 +365,10 @@ XclExpPageSettings::XclExpPageSettings( const XclExpRoot& rRoot ) :
// *** page breaks ***
- set<SCROW> aRowBreaks;
+ std::set<SCROW> aRowBreaks;
rDoc.GetAllRowBreaks(aRowBreaks, nScTab, false, true);
- SCROW const nMaxRow = numeric_limits<sal_uInt16>::max();
+ SCROW const nMaxRow = std::numeric_limits<sal_uInt16>::max();
for (const SCROW nRow : aRowBreaks)
{
if (nRow > nMaxRow)
@@ -388,7 +385,7 @@ XclExpPageSettings::XclExpPageSettings( const XclExpRoot& rRoot ) :
maData.maHorPageBreaks.erase(itr, maData.maHorPageBreaks.end());
}
- set<SCCOL> aColBreaks;
+ std::set<SCCOL> aColBreaks;
rDoc.GetAllColBreaks(aColBreaks, nScTab, false, true);
for (const auto& rColBreak : aColBreaks)
maData.maVerPageBreaks.push_back(rColBreak);
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index 2dc780e35684..0540c779f40d 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -79,7 +79,6 @@
#define DEBUG_XL_ENCRYPTION 0
using ::com::sun::star::uno::XInterface;
-using ::std::vector;
using namespace com::sun::star;
using namespace ::com::sun::star::beans;
@@ -239,7 +238,7 @@ std::size_t XclExpStream::Write( const void* pData, std::size_t nBytes )
if (mbUseEncrypter && HasValidEncrypter())
{
OSL_ENSURE(nWriteLen > 0, "XclExpStream::Write: write length is 0!");
- vector<sal_uInt8> aBytes(nWriteLen);
+ std::vector<sal_uInt8> aBytes(nWriteLen);
memcpy(aBytes.data(), pBuffer, nWriteLen);
mxEncrypter->EncryptBytes(mrStrm, aBytes);
// TODO: How do I check if all the bytes have been successfully written ?
@@ -498,13 +497,13 @@ void XclExpBiff8Encrypter::GetDocId( sal_uInt8 pnDocId[16] ) const
void XclExpBiff8Encrypter::Encrypt( SvStream& rStrm, sal_uInt8 nData )
{
- vector<sal_uInt8> aByte { nData };
+ std::vector<sal_uInt8> aByte { nData };
EncryptBytes(rStrm, aByte);
}
void XclExpBiff8Encrypter::Encrypt( SvStream& rStrm, sal_uInt16 nData )
{
- ::std::vector<sal_uInt8> pnBytes
+ std::vector<sal_uInt8> pnBytes
{
o3tl::narrowing<sal_uInt8>(nData & 0xFF),
o3tl::narrowing<sal_uInt8>((nData >> 8) & 0xFF)
@@ -514,7 +513,7 @@ void XclExpBiff8Encrypter::Encrypt( SvStream& rStrm, sal_uInt16 nData )
void XclExpBiff8Encrypter::Encrypt( SvStream& rStrm, sal_uInt32 nData )
{
- ::std::vector<sal_uInt8> pnBytes
+ std::vector<sal_uInt8> pnBytes
{
o3tl::narrowing<sal_uInt8>(nData & 0xFF),
o3tl::narrowing<sal_uInt8>((nData >> 8) & 0xFF),
@@ -526,14 +525,14 @@ void XclExpBiff8Encrypter::Encrypt( SvStream& rStrm, sal_uInt32 nData )
void XclExpBiff8Encrypter::Encrypt( SvStream& rStrm, float fValue )
{
- ::std::vector<sal_uInt8> pnBytes(4);
+ std::vector<sal_uInt8> pnBytes(4);
memcpy(pnBytes.data(), &fValue, 4);
EncryptBytes(rStrm, pnBytes);
}
void XclExpBiff8Encrypter::Encrypt( SvStream& rStrm, double fValue )
{
- ::std::vector<sal_uInt8> pnBytes(8);
+ std::vector<sal_uInt8> pnBytes(8);
memcpy(pnBytes.data(), &fValue, 8);
EncryptBytes(rStrm, pnBytes);
}
@@ -589,7 +588,7 @@ sal_uInt16 XclExpBiff8Encrypter::GetOffsetInBlock( std::size_t nStrmPos )
return static_cast< sal_uInt16 >( nStrmPos % EXC_ENCR_BLOCKSIZE );
}
-void XclExpBiff8Encrypter::EncryptBytes( SvStream& rStrm, vector<sal_uInt8>& aBytes )
+void XclExpBiff8Encrypter::EncryptBytes( SvStream& rStrm, std::vector<sal_uInt8>& aBytes )
{
sal_uInt64 nStrmPos = rStrm.Tell();
sal_uInt16 nBlockOffset = GetOffsetInBlock(nStrmPos);
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index 53797143e578..4fce1d001825 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -3171,7 +3171,7 @@ XclExpDxfs::XclExpDxfs( const XclExpRoot& rRoot )
if (!rFormat.pPattern)
continue;
- SfxItemSet& rItemSet = rFormat.pPattern->GetItemSet();
+ SfxItemSet& rItemSet = rFormat.pPattern->GetItemSetWritable();
fillDxfFrom(rItemSet, xFormatter);
maPatternToDxfId.emplace(rFormat.pPattern.get(), nDxfId);
nDxfId++;
diff --git a/sc/source/filter/excel/xeview.cxx b/sc/source/filter/excel/xeview.cxx
index 5280f234eed8..eb73aa67af96 100644
--- a/sc/source/filter/excel/xeview.cxx
+++ b/sc/source/filter/excel/xeview.cxx
@@ -383,7 +383,9 @@ XclExpTabViewSettings::XclExpTabViewSettings( const XclExpRoot& rRoot, SCTAB nSc
// view mode and zoom
maData.mbPageMode = (GetBiff() == EXC_BIFF8) && rTabSett.mbPageMode;
- maData.mnNormalZoom = lclGetXclZoom( rTabSett.mnNormalZoom, EXC_WIN2_NORMALZOOM_DEF );
+ const tools::Long nNormalZoom
+ = rTabSett.moExportZoom ? *rTabSett.moExportZoom : rTabSett.mnNormalZoom;
+ maData.mnNormalZoom = lclGetXclZoom(nNormalZoom, EXC_WIN2_NORMALZOOM_DEF);
maData.mnPageZoom = lclGetXclZoom( rTabSett.mnPageZoom, EXC_WIN2_PAGEZOOM_DEF );
maData.mnCurrentZoom = maData.mbPageMode ? maData.mnPageZoom : maData.mnNormalZoom;
}
diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx
index 06505c35fad3..c97d1de3e1b5 100644
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -125,7 +125,6 @@ using ::com::sun::star::chart2::data::LabeledDataSequence;
using ::formula::FormulaToken;
using ::formula::FormulaTokenArrayPlainIterator;
-using ::std::unique_ptr;
namespace cssc = ::com::sun::star::chart;
namespace cssc2 = ::com::sun::star::chart2;
@@ -1206,22 +1205,21 @@ void XclImpChText::ConvertTitlePosition( const XclChTextKey& rTitleKey ) const
try
{
Reference< XShape > xTitleShape( GetTitleShape( rTitleKey ), UNO_SET_THROW );
- // the call to XShape.getSize() may recalc the chart view
- css::awt::Size aTitleSize = xTitleShape->getSize();
// rotated titles need special handling...
Degree100 nScRot = XclTools::GetScRotation( GetRotation(), 0_deg100 );
double fRad = toRadians(nScRot);
double fSin = fabs( sin( fRad ) );
// calculate the title position from the values in the CHTEXT record
- css::awt::Point aTitlePos(
- CalcHmmFromChartX( maData.maRect.mnX ),
- CalcHmmFromChartY( maData.maRect.mnY ) );
- // add part of height to X direction, if title is rotated down (clockwise)
+ css::awt::Rectangle aTitleRect = CalcHmmFromChartRect(maData.maRect);
+ css::awt::Point aTitlePos(aTitleRect.X, aTitleRect.Y);
+ // add part of width to X direction, if title is rotated down (clockwise)
if( nScRot > 18000_deg100 )
- aTitlePos.X += static_cast< sal_Int32 >( fSin * aTitleSize.Height + 0.5 );
- // add part of width to Y direction, if title is rotated up (counterclockwise)
+ {
+ aTitlePos.X += static_cast< sal_Int32 >( fSin * aTitleRect.Width + 0.5 );
+ }
+ // add part of height to Y direction, if title is rotated up (counterclockwise)
else if( nScRot > 0_deg100 )
- aTitlePos.Y += static_cast< sal_Int32 >( fSin * aTitleSize.Width + 0.5 );
+ aTitlePos.Y += static_cast< sal_Int32 >( fSin * aTitleRect.Height + 0.5 );
// set the resulting position at the title shape
xTitleShape->setPosition( aTitlePos );
}
@@ -2127,10 +2125,10 @@ void XclImpChSeries::ReadChSourceLink( XclImpStream& rStrm )
xSrcLink->ReadChSourceLink( rStrm );
switch( xSrcLink->GetDestType() )
{
- case EXC_CHSRCLINK_TITLE: mxTitleLink = xSrcLink; break;
- case EXC_CHSRCLINK_VALUES: mxValueLink = xSrcLink; break;
- case EXC_CHSRCLINK_CATEGORY: mxCategLink = xSrcLink; break;
- case EXC_CHSRCLINK_BUBBLES: mxBubbleLink = xSrcLink; break;
+ case EXC_CHSRCLINK_TITLE: mxTitleLink = std::move(xSrcLink); break;
+ case EXC_CHSRCLINK_VALUES: mxValueLink = std::move(xSrcLink); break;
+ case EXC_CHSRCLINK_CATEGORY: mxCategLink = std::move(xSrcLink); break;
+ case EXC_CHSRCLINK_BUBBLES: mxBubbleLink = std::move(xSrcLink); break;
}
}
@@ -2154,12 +2152,12 @@ void XclImpChSeries::ReadChSerTrendLine( XclImpStream& rStrm )
{
XclImpChSerTrendLineRef xTrendLine = std::make_shared<XclImpChSerTrendLine>( GetChRoot() );
xTrendLine->ReadChSerTrendLine( rStrm );
- maTrendLines.push_back( xTrendLine );
+ maTrendLines.push_back(std::move(xTrendLine));
}
void XclImpChSeries::ReadChSerErrorBar( XclImpStream& rStrm )
{
- unique_ptr<XclImpChSerErrorBar> pErrorBar(new XclImpChSerErrorBar(GetChRoot()));
+ std::unique_ptr<XclImpChSerErrorBar> pErrorBar(new XclImpChSerErrorBar(GetChRoot()));
pErrorBar->ReadChSerErrorBar(rStrm);
sal_uInt8 nBarType = pErrorBar->GetBarType();
m_ErrorBars.insert(std::make_pair(nBarType, std::move(pErrorBar)));
@@ -2831,13 +2829,13 @@ void XclImpChTypeGroup::ReadChDropBar( XclImpStream& rStrm )
{
if (m_DropBars.find(EXC_CHDROPBAR_UP) == m_DropBars.end())
{
- unique_ptr<XclImpChDropBar> p(new XclImpChDropBar(EXC_CHDROPBAR_UP));
+ std::unique_ptr<XclImpChDropBar> p(new XclImpChDropBar(EXC_CHDROPBAR_UP));
p->ReadRecordGroup(rStrm);
m_DropBars.insert(std::make_pair(EXC_CHDROPBAR_UP, std::move(p)));
}
else if (m_DropBars.find(EXC_CHDROPBAR_DOWN) == m_DropBars.end())
{
- unique_ptr<XclImpChDropBar> p(new XclImpChDropBar(EXC_CHDROPBAR_DOWN));
+ std::unique_ptr<XclImpChDropBar> p(new XclImpChDropBar(EXC_CHDROPBAR_DOWN));
p->ReadRecordGroup(rStrm);
m_DropBars.insert(std::make_pair(EXC_CHDROPBAR_DOWN, std::move(p)));
}
@@ -3692,9 +3690,9 @@ void XclImpChAxesSet::ReadChAxis( XclImpStream& rStrm )
switch( xAxis->GetAxisType() )
{
- case EXC_CHAXIS_X: mxXAxis = xAxis; break;
- case EXC_CHAXIS_Y: mxYAxis = xAxis; break;
- case EXC_CHAXIS_Z: mxZAxis = xAxis; break;
+ case EXC_CHAXIS_X: mxXAxis = std::move(xAxis); break;
+ case EXC_CHAXIS_Y: mxYAxis = std::move(xAxis); break;
+ case EXC_CHAXIS_Z: mxZAxis = std::move(xAxis); break;
}
}
@@ -3705,9 +3703,9 @@ void XclImpChAxesSet::ReadChText( XclImpStream& rStrm )
switch( xText->GetLinkTarget() )
{
- case EXC_CHOBJLINK_XAXIS: mxXAxisTitle = xText; break;
- case EXC_CHOBJLINK_YAXIS: mxYAxisTitle = xText; break;
- case EXC_CHOBJLINK_ZAXIS: mxZAxisTitle = xText; break;
+ case EXC_CHOBJLINK_XAXIS: mxXAxisTitle = std::move(xText); break;
+ case EXC_CHOBJLINK_YAXIS: mxYAxisTitle = std::move(xText); break;
+ case EXC_CHOBJLINK_ZAXIS: mxZAxisTitle = std::move(xText); break;
}
}
@@ -3912,7 +3910,7 @@ void XclImpChChart::ReadChDefaultText( XclImpStream& rStrm )
sal_uInt16 nTextId = rStrm.ReaduInt16();
if( (rStrm.GetNextRecId() == EXC_ID_CHTEXT) && rStrm.StartNextRecord() )
{
- unique_ptr<XclImpChText> pText(new XclImpChText(GetChRoot()));
+ std::unique_ptr<XclImpChText> pText(new XclImpChText(GetChRoot()));
pText->ReadRecordGroup(rStrm);
m_DefTexts.insert(std::make_pair(nTextId, std::move(pText)));
}
@@ -4069,7 +4067,7 @@ void XclImpChChart::Convert( const Reference<XChartDocument>& xChartDoc,
rxSeries->FillAllSourceLinks( aRefTokens );
if( !aRefTokens.empty() )
{
- ::std::unique_ptr< ScChartListener > xListener( new ScChartListener( rObjName, rDoc, std::move(aRefTokens) ) );
+ std::unique_ptr< ScChartListener > xListener( new ScChartListener( rObjName, rDoc, std::move(aRefTokens) ) );
xListener->SetUsed( true );
xListener->StartListeningTo();
pChartCollection->insert( xListener.release() );
@@ -4081,7 +4079,7 @@ void XclImpChChart::ReadChSeries( XclImpStream& rStrm )
sal_uInt16 nNewSeriesIdx = static_cast< sal_uInt16 >( maSeries.size() );
XclImpChSeriesRef xSeries = std::make_shared<XclImpChSeries>( GetChRoot(), nNewSeriesIdx );
xSeries->ReadRecordGroup( rStrm );
- maSeries.push_back( xSeries );
+ maSeries.push_back(std::move(xSeries));
}
void XclImpChChart::ReadChProperties( XclImpStream& rStrm )
@@ -4096,8 +4094,8 @@ void XclImpChChart::ReadChAxesSet( XclImpStream& rStrm )
xAxesSet->ReadRecordGroup( rStrm );
switch( xAxesSet->GetAxesSetId() )
{
- case EXC_CHAXESSET_PRIMARY: mxPrimAxesSet = xAxesSet; break;
- case EXC_CHAXESSET_SECONDARY: mxSecnAxesSet = xAxesSet; break;
+ case EXC_CHAXESSET_PRIMARY: mxPrimAxesSet = std::move(xAxesSet); break;
+ case EXC_CHAXESSET_SECONDARY: mxSecnAxesSet = std::move(xAxesSet); break;
}
}
@@ -4108,7 +4106,7 @@ void XclImpChChart::ReadChText( XclImpStream& rStrm )
switch( xText->GetLinkTarget() )
{
case EXC_CHOBJLINK_TITLE:
- mxTitle = xText;
+ mxTitle = std::move(xText);
break;
case EXC_CHOBJLINK_DATA:
{
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx
index f81d1f6b3455..6bad00d2bc8e 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -63,7 +63,6 @@
#include <sal/log.hxx>
using ::com::sun::star::uno::Sequence;
-using ::std::unique_ptr;
// Shared string table ========================================================
@@ -88,7 +87,7 @@ void XclImpSst::ReadSst( XclImpStream& rStrm )
{
XclImpString aString;
aString.Read( rStrm );
- maStrings.push_back( aString );
+ maStrings.push_back(std::move(aString));
--nStrCount;
}
}
@@ -245,9 +244,9 @@ OUString XclImpHyperlink::ReadEmbeddedData( XclImpStream& rStrm )
OSL_ENSURE( aGuid == XclTools::maGuidStdLink, "XclImpHyperlink::ReadEmbeddedData - unknown header GUID" );
- ::std::unique_ptr< OUString > xLongName; // link / file name
- ::std::unique_ptr< OUString > xShortName; // 8.3-representation of file name
- ::std::unique_ptr< OUString > xTextMark; // text mark
+ std::unique_ptr< OUString > xLongName; // link / file name
+ std::unique_ptr< OUString > xShortName; // 8.3-representation of file name
+ std::unique_ptr< OUString > xTextMark; // text mark
// description (ignore)
if( ::get_flag( nFlags, EXC_HLINK_DESCR ) )
@@ -654,7 +653,7 @@ void XclImpCondFormat::ReadCF( XclImpStream& rStrm )
const ScAddress& rPos = maRanges.front().aStart; // assured above that maRanges is not empty
ExcelToSc& rFmlaConv = GetOldFmlaConverter();
- ::std::unique_ptr< ScTokenArray > xTokArr1;
+ std::unique_ptr< ScTokenArray > xTokArr1;
if( nFmlaSize1 > 0 )
{
std::unique_ptr<ScTokenArray> pTokArr;
@@ -668,7 +667,7 @@ void XclImpCondFormat::ReadCF( XclImpStream& rStrm )
}
}
- ::std::unique_ptr< ScTokenArray > xTokArr2;
+ std::unique_ptr< ScTokenArray > xTokArr2;
if( nFmlaSize2 > 0 )
{
std::unique_ptr<ScTokenArray> pTokArr;
@@ -793,7 +792,7 @@ void XclImpValidationManager::ReadDV( XclImpStream& rStrm )
// first formula
// string list is single tStr token with NUL separators -> replace them with LF
rStrm.SetNulSubstChar( '\n' );
- ::std::unique_ptr< ScTokenArray > xTokArr1;
+ std::unique_ptr< ScTokenArray > xTokArr1;
// We can't import the formula directly because we need the range
sal_uInt16 nLenFormula1 = rStrm.ReaduInt16();
@@ -803,7 +802,7 @@ void XclImpValidationManager::ReadDV( XclImpStream& rStrm )
rStrm.Ignore(nLenFormula1);
// second formula
- ::std::unique_ptr< ScTokenArray > xTokArr2;
+ std::unique_ptr< ScTokenArray > xTokArr2;
sal_uInt16 nLenFormula2 = rStrm.ReaduInt16();
rStrm.Ignore( 2 );
@@ -943,7 +942,7 @@ void XclImpValidationManager::Apply()
// set the handle ID
sal_uInt32 nHandle = rDoc.AddValidationEntry( rItem.maValidData );
ScPatternAttr aPattern(rDoc.getCellAttributeHelper());
- aPattern.GetItemSet().Put( SfxUInt32Item( ATTR_VALIDDATA, nHandle ) );
+ aPattern.ItemSetPut(SfxUInt32Item(ATTR_VALIDDATA, nHandle));
// apply all ranges
for ( size_t i = 0, nRanges = rItem.maRanges.size(); i < nRanges; ++i, ++nPatterns )
@@ -1306,7 +1305,7 @@ void XclImpDocProtectBuffer::Apply() const
// If neither is set then the document is not protected at all.
return;
- unique_ptr<ScDocProtection> pProtect(new ScDocProtection);
+ std::unique_ptr<ScDocProtection> pProtect(new ScDocProtection);
pProtect->setProtected(true);
if (mnPassHash)
@@ -1396,7 +1395,7 @@ void XclImpSheetProtectBuffer::Apply() const
// This sheet is (for whatever reason) not protected.
continue;
- unique_ptr<ScTableProtection> pProtect(new ScTableProtection);
+ std::unique_ptr<ScTableProtection> pProtect(new ScTableProtection);
pProtect->setProtected(true);
// 16-bit hash password
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index 81edde0ac3cb..4889ed08ea01 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -750,14 +750,14 @@ void XclImpDrawObjBase::ConvertFillStyle( SdrObject& rSdrObj, const XclObjFillDa
Bitmap aBitmap;
(void)ReadDIB(aBitmap, aMemStrm, false);
- XOBitmap aXOBitmap(( BitmapEx(aBitmap) ));
+ XOBitmap aXOBitmap( aBitmap );
aXOBitmap.Bitmap2Array();
if( aXOBitmap.GetBackgroundColor() == COL_BLACK )
::std::swap( aPattColor, aBackColor );
aXOBitmap.SetPixelColor( aPattColor );
aXOBitmap.SetBackgroundColor( aBackColor );
aXOBitmap.Array2Bitmap();
- aBitmap = aXOBitmap.GetBitmap().GetBitmap();
+ aBitmap = aXOBitmap.GetBitmap();
rSdrObj.SetMergedItem(XFillStyleItem(drawing::FillStyle_BITMAP));
rSdrObj.SetMergedItem(XFillBitmapItem(OUString(), Graphic(BitmapEx(aBitmap))));
diff --git a/sc/source/filter/excel/xilink.cxx b/sc/source/filter/excel/xilink.cxx
index c37e1ecb1488..0bae231e7741 100644
--- a/sc/source/filter/excel/xilink.cxx
+++ b/sc/source/filter/excel/xilink.cxx
@@ -567,8 +567,7 @@ XclImpSupbookTab::XclImpSupbookTab( OUString aTabName ) :
void XclImpSupbookTab::ReadCrn( XclImpStream& rStrm, const XclAddress& rXclPos )
{
- XclImpCrnRef crnRef = std::make_shared<XclImpCrn>(rStrm, rXclPos);
- maCrnList.push_back( crnRef );
+ maCrnList.push_back(std::make_shared<XclImpCrn>(rStrm, rXclPos));
}
void XclImpSupbookTab::LoadCachedValues( const ScExternalRefCache::TableTypeRef& pCacheTable,
diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx
index fb14ec4d07eb..78602724ce88 100644
--- a/sc/source/filter/excel/xipivot.cxx
+++ b/sc/source/filter/excel/xipivot.cxx
@@ -61,7 +61,6 @@ using ::com::sun::star::sheet::DataPilotFieldSortInfo;
using ::com::sun::star::sheet::DataPilotFieldAutoShowInfo;
using ::com::sun::star::sheet::DataPilotFieldLayoutInfo;
using ::com::sun::star::sheet::DataPilotFieldReference;
-using ::std::vector;
// Pivot cache
@@ -353,16 +352,16 @@ void XclImpPCField::ReadItem( XclImpStream& rStrm )
{
// there are 3 items after SXNUMGROUP that contain grouping limits and step count
if( maNumGroupItems.size() < 3 )
- maNumGroupItems.push_back( xItem );
+ maNumGroupItems.push_back(std::move(xItem));
else
- maOrigItems.push_back( xItem );
+ maOrigItems.push_back(std::move(xItem));
}
else if( HasInlineItems() || HasPostponedItems() )
{
maItems.push_back( xItem );
// visible item is original item in standard fields
if( IsStandardField() )
- maOrigItems.push_back( xItem );
+ maOrigItems.push_back(std::move(xItem));
}
}
@@ -1528,8 +1527,8 @@ void XclImpPivotTable::ApplyMergeFlags(const ScRange& rOutRange, const ScDPSaveD
ScDocument& rDoc = GetDoc();
- vector<const ScDPSaveDimension*> aFieldDims;
- vector<ScAddress> aFieldBtns;
+ std::vector<const ScDPSaveDimension*> aFieldDims;
+ std::vector<ScAddress> aFieldBtns;
aGeometry.getPageFieldPositions(aFieldBtns);
for (const auto& rFieldBtn : aFieldBtns)
@@ -1548,7 +1547,7 @@ void XclImpPivotTable::ApplyMergeFlags(const ScRange& rOutRange, const ScDPSaveD
rSaveData.GetAllDimensionsByOrientation(sheet::DataPilotFieldOrientation_COLUMN, aFieldDims);
if (aFieldBtns.size() == aFieldDims.size())
{
- vector<const ScDPSaveDimension*>::const_iterator itDim = aFieldDims.begin();
+ std::vector<const ScDPSaveDimension*>::const_iterator itDim = aFieldDims.begin();
for (const auto& rFieldBtn : aFieldBtns)
{
ScMF nMFlag = ScMF::Button;
@@ -1567,7 +1566,7 @@ void XclImpPivotTable::ApplyMergeFlags(const ScRange& rOutRange, const ScDPSaveD
if (!((aFieldBtns.size() == aFieldDims.size()) || (maPTAddlInfo.mbCompactMode && aFieldBtns.size() == 1)))
return;
- vector<const ScDPSaveDimension*>::const_iterator itDim = aFieldDims.begin();
+ std::vector<const ScDPSaveDimension*>::const_iterator itDim = aFieldDims.begin();
for (const auto& rFieldBtn : aFieldBtns)
{
ScMF nMFlag = ScMF::Button;
diff --git a/sc/source/filter/excel/xistream.cxx b/sc/source/filter/excel/xistream.cxx
index c4aa3c2b502f..ebb927ae8137 100644
--- a/sc/source/filter/excel/xistream.cxx
+++ b/sc/source/filter/excel/xistream.cxx
@@ -19,7 +19,7 @@
#include <comphelper/docpasswordhelper.hxx>
#include <comphelper/sequenceashashmap.hxx>
-#include <o3tl/safeint.hxx>
+#include <o3tl/untaint.hxx>
#include <osl/thread.h>
#include <osl/diagnose.h>
#include <sal/log.hxx>
diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx
index caa55afd7edb..4e4f094aae03 100644
--- a/sc/source/filter/excel/xistyle.cxx
+++ b/sc/source/filter/excel/xistyle.cxx
@@ -80,7 +80,6 @@
#include <svl/numformat.hxx>
#include <o3tl/string_view.hxx>
-using ::std::vector;
using namespace ::com::sun::star;
typedef ::cppu::WeakImplHelper< container::XIndexAccess > XIndexAccess_BASE;
@@ -1250,7 +1249,7 @@ const ScPatternAttr& XclImpXF::CreatePattern( bool bSkipPoolDefs )
// create new pattern attribute set
mpPattern.reset( new ScPatternAttr(GetDoc().getCellAttributeHelper()) );
- SfxItemSet& rItemSet = mpPattern->GetItemSet();
+ SfxItemSet& rItemSet = mpPattern->GetItemSetWritable();
XclImpXF* pParentXF = IsCellXF() ? GetXFBuffer().GetXF( mnParent ) : nullptr;
// parent cell style
@@ -1377,8 +1376,8 @@ void XclImpXF::ApplyPatternToAttrVector(
if (nForceScNumFmt != NUMBERFORMAT_ENTRY_NOT_FOUND)
{
ScPatternAttr aNumPat(rDoc.getCellAttributeHelper());
- GetNumFmtBuffer().FillScFmtToItemSet(aNumPat.GetItemSet(), nForceScNumFmt);
- rPat.GetItemSet().Put(aNumPat.GetItemSet());
+ GetNumFmtBuffer().FillScFmtToItemSet(aNumPat.GetItemSetWritable(), nForceScNumFmt);
+ rPat.GetItemSetWritable().Put(aNumPat.GetItemSet());
}
// Make sure we skip unnamed styles.
@@ -1400,13 +1399,13 @@ void XclImpXF::ApplyPatternToAttrVector(
ScAttrEntry aEntry;
aEntry.nEndRow = nRow1 - 1;
aEntry.setScPatternAttr(&rDoc.getCellAttributeHelper().getDefaultCellAttribute());
- rAttrs.push_back(aEntry);
+ rAttrs.push_back(std::move(aEntry));
}
ScAttrEntry aEntry;
aEntry.nEndRow = nRow2;
aEntry.setScPatternAttr(&rPat, false);
- rAttrs.push_back(aEntry);
+ rAttrs.push_back(std::move(aEntry));
}
void XclImpXF::ApplyPattern(
@@ -2023,7 +2022,7 @@ void XclImpXFRangeBuffer::Finalize()
ScAttrEntry aEntry;
aEntry.nEndRow = rDoc.MaxRow();
aEntry.setScPatternAttr(&rDoc.getCellAttributeHelper().getDefaultCellAttribute());
- aAttrs.push_back(aEntry);
+ aAttrs.push_back(std::move(aEntry));
}
aAttrs.shrink_to_fit();
diff --git a/sc/source/filter/excel/xlformula.cxx b/sc/source/filter/excel/xlformula.cxx
index 2f8b2756d6c9..742557f0f822 100644
--- a/sc/source/filter/excel/xlformula.cxx
+++ b/sc/source/filter/excel/xlformula.cxx
@@ -26,6 +26,7 @@
#include <xlroot.hxx>
#include <comphelper/string.hxx>
+#include <o3tl/untaint.hxx>
#include <svl/sharedstringpool.hxx>
using namespace ::formula;
diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx
index 71089d10ec8f..7dea69cc1384 100644
--- a/sc/source/filter/excel/xlroot.cxx
+++ b/sc/source/filter/excel/xlroot.cxx
@@ -368,7 +368,6 @@ ScEditEngineDefaulter& XclRoot::GetEditEngine() const
mrData.mxEditEngine = std::make_shared<ScEditEngineDefaulter>( GetDoc().GetEditEnginePool() );
ScEditEngineDefaulter& rEE = *mrData.mxEditEngine;
rEE.SetRefMapMode(MapMode(MapUnit::Map100thMM));
- rEE.SetEditTextObjectPool( GetDoc().GetEditTextObjectPool() );
rEE.SetUpdateLayout( false );
rEE.EnableUndo( false );
rEE.SetControlWord( rEE.GetControlWord() & ~EEControlBits::ALLOWBIGOBJS );
diff --git a/sc/source/filter/excel/xltoolbar.cxx b/sc/source/filter/excel/xltoolbar.cxx
index 33de884957b1..1e81a94df0cd 100644
--- a/sc/source/filter/excel/xltoolbar.cxx
+++ b/sc/source/filter/excel/xltoolbar.cxx
@@ -8,7 +8,7 @@
*/
#include "xltoolbar.hxx"
#include <sal/log.hxx>
-#include <o3tl/safeint.hxx>
+#include <o3tl/untaint.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
@@ -119,7 +119,7 @@ bool ScCTB::Read( SvStream &rS )
{
ScTBC aTBC;
aTBC.Read( rS );
- rTBC.push_back( aTBC );
+ rTBC.push_back(std::move(aTBC));
}
}
@@ -384,7 +384,7 @@ ScCTBWrapper::Read( SvStream &rS)
ScCTB aCTB( ctbSet.ctbViews );
if ( !aCTB.Read( rS ) )
return false;
- rCTB.push_back( aCTB );
+ rCTB.push_back(std::move(aCTB));
}
return true;
}
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index 07591c2ad2aa..8dfc5c02bddb 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -109,7 +109,7 @@ const sal_uInt16 ScHTMLExport::nDefaultFontSize[SC_HTML_FONTSIZES] =
sal_uInt16 ScHTMLExport::nFontSize[SC_HTML_FONTSIZES] = { 0 };
-const char* ScHTMLExport::pFontSizeCss[SC_HTML_FONTSIZES] =
+const char* const ScHTMLExport::pFontSizeCss[SC_HTML_FONTSIZES] =
{
"xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large"
};
diff --git a/sc/source/filter/inc/condformatbuffer.hxx b/sc/source/filter/inc/condformatbuffer.hxx
index 0551a6441c06..867cbf3540ca 100644
--- a/sc/source/filter/inc/condformatbuffer.hxx
+++ b/sc/source/filter/inc/condformatbuffer.hxx
@@ -259,7 +259,7 @@ struct ExCfRuleModel
bool mbIsLower; // Cfvo
};
-class ExtCfDataBarRule : public WorksheetHelper
+class ExtCfDataBarRule final : public WorksheetHelper
{
enum RuleType
{
diff --git a/sc/source/filter/inc/excimp8.hxx b/sc/source/filter/inc/excimp8.hxx
index 4096ca068245..e6924e1047fe 100644
--- a/sc/source/filter/inc/excimp8.hxx
+++ b/sc/source/filter/inc/excimp8.hxx
@@ -27,7 +27,7 @@
class ScDBData;
class XclImpStream;
-class ImportExcel8 : public ImportExcel
+class ImportExcel8 final : public ImportExcel
{
public:
ImportExcel8( XclImpRootData& rImpData, SvStream& rStrm );
diff --git a/sc/source/filter/inc/excrecds.hxx b/sc/source/filter/inc/excrecds.hxx
index 11035354bd45..17a99f57105e 100644
--- a/sc/source/filter/inc/excrecds.hxx
+++ b/sc/source/filter/inc/excrecds.hxx
@@ -108,7 +108,7 @@ public:
//-------------------------------------------------------------- class ExcBof -
// Header Record for WORKSHEETS
-class ExcBof : public ExcBof_Base
+class ExcBof final : public ExcBof_Base
{
private:
virtual void SaveCont( XclExpStream& rStrm ) override;
@@ -122,7 +122,7 @@ public:
//------------------------------------------------------------- class ExcBofW -
// Header Record for WORKBOOKS
-class ExcBofW : public ExcBof_Base
+class ExcBofW final : public ExcBof_Base
{
private:
virtual void SaveCont( XclExpStream& rStrm ) override;
@@ -135,7 +135,7 @@ public:
//-------------------------------------------------------------- class ExcEof -
-class ExcEof : public ExcRecord
+class ExcEof final : public ExcRecord
{
private:
public:
@@ -146,7 +146,7 @@ public:
//--------------------------------------------------------- class ExcDummy_00 -
// INTERFACEHDR to FNGROUPCOUNT (see excrecds.cxx)
-class ExcDummy_00 : public ExcDummyRec
+class ExcDummy_00 final : public ExcDummyRec
{
private:
static const sal_uInt8 pMyData[];
@@ -157,7 +157,7 @@ public:
};
// EXC_ID_WINDOWPROTECTION
-class XclExpWindowProtection : public XclExpBoolRecord
+class XclExpWindowProtection final : public XclExpBoolRecord
{
public:
XclExpWindowProtection(bool bValue);
@@ -172,7 +172,7 @@ class XclExpProtection : public XclExpBoolRecord
XclExpProtection(bool bValue);
};
-class XclExpSheetProtection : public XclExpProtection
+class XclExpSheetProtection final : public XclExpProtection
{
SCTAB mnTab;
public:
@@ -180,7 +180,7 @@ class XclExpSheetProtection : public XclExpProtection
virtual void SaveXml( XclExpXmlStream& rStrm ) override;
};
-class XclExpPassHash : public XclExpRecord
+class XclExpPassHash final : public XclExpRecord
{
public:
XclExpPassHash(const css::uno::Sequence<sal_Int8>& aHash);
@@ -196,7 +196,7 @@ private:
//-------------------------------------------------------- class ExcDummy_04x -
// PASSWORD to BOOKBOOL (see excrecds.cxx), no 1904
-class ExcDummy_040 : public ExcDummyRec
+class ExcDummy_040 final : public ExcDummyRec
{
private:
static const sal_uInt8 pMyData[];
@@ -206,7 +206,7 @@ public:
virtual const sal_uInt8* GetData() const override;
};
-class ExcDummy_041 : public ExcDummyRec
+class ExcDummy_041 final : public ExcDummyRec
{
private:
static const sal_uInt8 pMyData[];
@@ -218,7 +218,7 @@ public:
//------------------------------------------------------------- class Exc1904 -
-class Exc1904 : public ExcBoolRecord
+class Exc1904 final : public ExcBoolRecord
{
public:
Exc1904( const ScDocument& rDoc );
@@ -250,7 +250,7 @@ public:
virtual sal_uInt16 GetNum() const override;
};
-class ExcBundlesheet : public ExcBundlesheetBase
+class ExcBundlesheet final : public ExcBundlesheetBase
{
private:
OString aName;
@@ -265,7 +265,7 @@ public:
//--------------------------------------------------------- class ExcDummy_02 -
// sheet dummies: CALCMODE to SETUP
-class ExcDummy_02a : public ExcDummyRec
+class ExcDummy_02a final : public ExcDummyRec
{
private:
static const sal_uInt8 pMyData[];
@@ -276,7 +276,7 @@ public:
};
/** This record contains the Windows country IDs for the UI and document language. */
-class XclExpCountry : public XclExpRecord
+class XclExpCountry final : public XclExpRecord
{
public:
explicit XclExpCountry( const XclExpRoot& rRoot );
@@ -291,7 +291,7 @@ private:
// XclExpWsbool ===============================================================
-class XclExpWsbool : public XclExpUInt16Record
+class XclExpWsbool final : public XclExpUInt16Record
{
public:
explicit XclExpWsbool( bool bFitToPages );
@@ -300,7 +300,7 @@ public:
/**
* Save sheetPr element and its children for xlsx export.
*/
-class XclExpXmlSheetPr : public XclExpRecordBase
+class XclExpXmlSheetPr final : public XclExpRecordBase
{
public:
explicit XclExpXmlSheetPr(
@@ -316,13 +316,13 @@ private:
bool mbSummaryBelow;
};
-class XclExpFiltermode : public XclExpEmptyRecord
+class XclExpFiltermode final : public XclExpEmptyRecord
{
public:
explicit XclExpFiltermode();
};
-class XclExpAutofilterinfo : public XclExpUInt16Record
+class XclExpAutofilterinfo final : public XclExpUInt16Record
{
public:
explicit XclExpAutofilterinfo( const ScAddress& rStartPos, SCCOL nScCol );
@@ -357,7 +357,7 @@ public:
void SaveText( XclExpStream& rStrm );
};
-class XclExpAutofilter : public XclExpRecord, protected XclExpRoot
+class XclExpAutofilter final : public XclExpRecord, protected XclExpRoot
{
private:
enum FilterType
@@ -398,7 +398,7 @@ public:
virtual void SaveXml( XclExpXmlStream& rStrm ) override;
};
-class ExcAutoFilterRecs : public XclExpRecordBase, protected XclExpRoot
+class ExcAutoFilterRecs final : public XclExpRecordBase, protected XclExpRoot
{
public:
/** @param pDefinedData
@@ -434,7 +434,7 @@ private:
};
/** Sheet filter manager. Contains auto filters or advanced filters from all sheets. */
-class XclExpFilterManager : protected XclExpRoot
+class XclExpFilterManager final : protected XclExpRoot
{
public:
explicit XclExpFilterManager( const XclExpRoot& rRoot );
diff --git a/sc/source/filter/inc/exp_op.hxx b/sc/source/filter/inc/exp_op.hxx
index 87ed95b2eed0..791ff1eb9dbb 100644
--- a/sc/source/filter/inc/exp_op.hxx
+++ b/sc/source/filter/inc/exp_op.hxx
@@ -52,7 +52,7 @@ public:
ErrCode Write() override;
};
-class ExportBiff8 : public ExportBiff5
+class ExportBiff8 final : public ExportBiff5
{
public:
ExportBiff8( XclExpRootData& rExpData, SvStream& rStrm );
diff --git a/sc/source/filter/inc/export/SparklineExt.hxx b/sc/source/filter/inc/export/SparklineExt.hxx
index 16559d1c5b76..14d482dc9253 100644
--- a/sc/source/filter/inc/export/SparklineExt.hxx
+++ b/sc/source/filter/inc/export/SparklineExt.hxx
@@ -25,7 +25,7 @@
namespace xcl::exp
{
/** Export for sparkline type of <ext> element - top sparkline element. */
-class SparklineExt : public XclExpExt
+class SparklineExt final : public XclExpExt
{
public:
SparklineExt(const XclExpRoot& rRoot);
@@ -44,7 +44,7 @@ public:
};
/** Determines if sparklines needs to be exported and initiates the export. */
-class SparklineBuffer : public XclExpRecordBase, protected XclExpRoot
+class SparklineBuffer final : public XclExpRecordBase, protected XclExpRoot
{
public:
explicit SparklineBuffer(const XclExpRoot& rRoot, const XclExtLstRef& xExtLst);
diff --git a/sc/source/filter/inc/externallinkbuffer.hxx b/sc/source/filter/inc/externallinkbuffer.hxx
index 374a54b38ccd..2f2727a7b673 100644
--- a/sc/source/filter/inc/externallinkbuffer.hxx
+++ b/sc/source/filter/inc/externallinkbuffer.hxx
@@ -52,7 +52,7 @@ struct ExternalNameModel
class ExternalLink;
-class ExternalName : public DefinedNameBase
+class ExternalName final : public DefinedNameBase
{
public:
explicit ExternalName( const ExternalLink& rParentLink );
@@ -187,7 +187,7 @@ inline std::basic_ostream<charT, traits> & operator <<(
}
}
-class ExternalLink : public WorkbookHelper
+class ExternalLink final : public WorkbookHelper
{
public:
explicit ExternalLink( const WorkbookHelper& rHelper );
@@ -298,7 +298,7 @@ struct RefSheetsModel
void readBiff12Data( SequenceInputStream& rStrm );
};
-class ExternalLinkBuffer : public WorkbookHelper
+class ExternalLinkBuffer final : public WorkbookHelper
{
public:
explicit ExternalLinkBuffer( const WorkbookHelper& rHelper );
diff --git a/sc/source/filter/inc/externallinkfragment.hxx b/sc/source/filter/inc/externallinkfragment.hxx
index f14ba0b0af5e..f5479b89be81 100644
--- a/sc/source/filter/inc/externallinkfragment.hxx
+++ b/sc/source/filter/inc/externallinkfragment.hxx
@@ -29,7 +29,7 @@ namespace oox::xls {
The sheetData element embedded in the externalBook element contains cached
cells from externally linked sheets.
*/
-class ExternalSheetDataContext : public WorkbookContextBase
+class ExternalSheetDataContext final : public WorkbookContextBase
{
public:
explicit ExternalSheetDataContext(
@@ -67,7 +67,7 @@ private:
sal_Int32 mnCurrType; /// Data type of current cell.
};
-class ExternalLinkFragment : public WorkbookFragmentBase
+class ExternalLinkFragment final : public WorkbookFragmentBase
{
public:
explicit ExternalLinkFragment(
diff --git a/sc/source/filter/inc/extlstcontext.hxx b/sc/source/filter/inc/extlstcontext.hxx
index b3016103d0f9..7c5704c22386 100644
--- a/sc/source/filter/inc/extlstcontext.hxx
+++ b/sc/source/filter/inc/extlstcontext.hxx
@@ -24,7 +24,7 @@ namespace oox::xls { class WorksheetFragment; }
namespace oox::xls {
-class ExtCfRuleContext : public WorksheetContextBase
+class ExtCfRuleContext final : public WorksheetContextBase
{
public:
explicit ExtCfRuleContext( WorksheetContextBase& rFragment, ScDataBarFormatData* pDataBar );
@@ -48,7 +48,7 @@ struct ExtCondFormatRuleModel
OUString aStyle;
};
-class ExtConditionalFormattingContext : public WorksheetContextBase
+class ExtConditionalFormattingContext final : public WorksheetContextBase
{
public:
explicit ExtConditionalFormattingContext(WorksheetContextBase& rFragment);
@@ -79,7 +79,7 @@ private:
*
* ExtLstLocalContext is for the entry in the datastructure that needs to be extended
*/
-class ExtLstLocalContext : public WorksheetContextBase
+class ExtLstLocalContext final : public WorksheetContextBase
{
public:
explicit ExtLstLocalContext( WorksheetContextBase& rFragment, ScDataBarFormatData* pTarget ); // until now a ExtLst always extends an existing entry
@@ -96,7 +96,7 @@ private:
/**
* A single ext entry. Will be skipped until the actual entry with the correct uri is found
*/
-class ExtGlobalContext : public WorksheetContextBase
+class ExtGlobalContext final : public WorksheetContextBase
{
public:
explicit ExtGlobalContext( WorksheetContextBase& rFragment );
@@ -112,7 +112,7 @@ private:
* Used for the actual ExtLst containing the new extended definition.
* Uses the saved data from the ExtLstLocalContext
*/
-class ExtLstGlobalContext : public WorksheetContextBase
+class ExtLstGlobalContext final : public WorksheetContextBase
{
public:
explicit ExtLstGlobalContext( WorksheetFragment& rFragment );
@@ -121,7 +121,7 @@ protected:
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
};
-class ExtGlobalWorkbookContext : public WorkbookContextBase
+class ExtGlobalWorkbookContext final : public WorkbookContextBase
{
public:
explicit ExtGlobalWorkbookContext( WorkbookContextBase& rFragment );
@@ -133,7 +133,7 @@ protected:
private:
};
-class ExtLstGlobalWorkbookContext : public WorkbookContextBase
+class ExtLstGlobalWorkbookContext final : public WorkbookContextBase
{
public:
explicit ExtLstGlobalWorkbookContext( WorkbookFragment& rFragment );
diff --git a/sc/source/filter/inc/htmlexp.hxx b/sc/source/filter/inc/htmlexp.hxx
index 3cb47c03221b..14f2f43d5b1e 100644
--- a/sc/source/filter/inc/htmlexp.hxx
+++ b/sc/source/filter/inc/htmlexp.hxx
@@ -102,7 +102,7 @@ class ScHTMLExport : public ScExportBase
static const sal_uInt16 nDefaultFontSize[SC_HTML_FONTSIZES];
// HtmlFontSz[1-7] in s*3.ini [user]
static sal_uInt16 nFontSize[SC_HTML_FONTSIZES];
- static const char* pFontSizeCss[SC_HTML_FONTSIZES];
+ static const char* const pFontSizeCss[SC_HTML_FONTSIZES];
static const sal_uInt16 nCellSpacing;
static const char sIndentSource[];
diff --git a/sc/source/filter/inc/orcus_utils.hxx b/sc/source/filter/inc/orcus_utils.hxx
new file mode 100644
index 000000000000..ca7e73db59f2
--- /dev/null
+++ b/sc/source/filter/inc/orcus_utils.hxx
@@ -0,0 +1,16 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include <rtl/ustring.hxx>
+
+#include <orcus/stream.hpp>
+
+orcus::file_content toFileContent(const OUString& rPath);
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx
index 7d15b68c18c9..e3f666bb4cef 100644
--- a/sc/source/filter/inc/orcusinterface.hxx
+++ b/sc/source/filter/inc/orcusinterface.hxx
@@ -385,6 +385,8 @@ public:
std::string_view value) override;
virtual void set_string(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col,
orcus::spreadsheet::string_id_t sindex) override;
+ virtual void set_string(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col,
+ std::string_view s) override;
virtual void set_value(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col,
double value) override;
virtual void set_bool(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col,
diff --git a/sc/source/filter/inc/tablecolumnsbuffer.hxx b/sc/source/filter/inc/tablecolumnsbuffer.hxx
index efcfd979b219..b85a9f4d9927 100644
--- a/sc/source/filter/inc/tablecolumnsbuffer.hxx
+++ b/sc/source/filter/inc/tablecolumnsbuffer.hxx
@@ -22,6 +22,7 @@
#include <oox/helper/refvector.hxx>
#include <dbdata.hxx>
#include "workbookhelper.hxx"
+#include <osl/diagnose.h>
namespace oox { class AttributeList; }
namespace oox { class SequenceInputStream; }
@@ -43,12 +44,18 @@ public:
const OUString& getName() const;
/** Gets the attributes of this column. */
const TableColumnAttributes& getColumnAttributes() const;
+ /** Imports XML column properties for the xmlColumnPr element. */
+ void importXmlColumnPr(const AttributeList& rAttribs);
+ /** Returns access to the table column model data. */
+ TableColumnModel& getModel() { return maModel; }
private:
OUString maName;
sal_Int32 mnId;
sal_Int32 mnDataDxfId;
TableColumnAttributes maColumnAttributes;
+
+ TableColumnModel maModel;
};
class TableColumns : public WorkbookHelper
diff --git a/sc/source/filter/lotus/filter.cxx b/sc/source/filter/lotus/filter.cxx
index 0546c46d772a..e5108e3def84 100644
--- a/sc/source/filter/lotus/filter.cxx
+++ b/sc/source/filter/lotus/filter.cxx
@@ -38,7 +38,7 @@ static ErrCode
generate_Opcodes(LotusContext &rContext, SvStream& aStream,
ScfStreamProgressBar& aPrgrsBar)
{
- OPCODE_FKT *pOps = nullptr;
+ const OPCODE_FKT *pOps = nullptr;
int nOps = 0;
ErrCode nErr = ERRCODE_NONE;
diff --git a/sc/source/filter/lotus/lotattr.cxx b/sc/source/filter/lotus/lotattr.cxx
index 933380ad7b96..410cac7ba242 100644
--- a/sc/source/filter/lotus/lotattr.cxx
+++ b/sc/source/filter/lotus/lotattr.cxx
@@ -88,7 +88,7 @@ const ScPatternAttr& LotAttrCache::GetPattAttr( const LotAttrWK3& rAttr )
// generate new Pattern Attribute
ScPatternAttr* pNewPatt = new ScPatternAttr(mrContext.rDoc.getCellAttributeHelper());
- SfxItemSet& rItemSet = pNewPatt->GetItemSet();
+ SfxItemSet& rItemSet = pNewPatt->GetItemSetWritable();
ENTRY *pCurrent = new ENTRY( std::unique_ptr<ScPatternAttr>(pNewPatt) );
pCurrent->nHash0 = nRefHash;
diff --git a/sc/source/filter/lotus/lotfilter.hxx b/sc/source/filter/lotus/lotfilter.hxx
index 596b9a9de742..81c443d2af81 100644
--- a/sc/source/filter/lotus/lotfilter.hxx
+++ b/sc/source/filter/lotus/lotfilter.hxx
@@ -35,8 +35,8 @@ class FormCache;
struct LotusContext
{
static const sal_uInt16 nBOF = 0x0000;
- static OPCODE_FKT pOpFkt[ FKT_LIMIT ];
- static OPCODE_FKT pOpFkt123[ FKT_LIMIT123 ]; // -> optab.cxx; table of possible Opcodes
+ static const OPCODE_FKT pOpFkt[ FKT_LIMIT ];
+ static const OPCODE_FKT pOpFkt123[ FKT_LIMIT123 ]; // -> optab.cxx; table of possible Opcodes
WKTYP eTyp; // type of file being processed
bool bEOF; // shows end of file
diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx
index e1c46643bd55..8cd3717dffc5 100644
--- a/sc/source/filter/lotus/op.cxx
+++ b/sc/source/filter/lotus/op.cxx
@@ -536,7 +536,7 @@ void OP_CreatePattern123(LotusContext& rContext, SvStream& r, sal_uInt16 n)
sal_uInt16 nCode;
ScPatternAttr aPattern(rContext.rDoc.getCellAttributeHelper());
- SfxItemSet& rItemSet = aPattern.GetItemSet();
+ SfxItemSet& rItemSet = aPattern.GetItemSetWritable();
r.ReadUInt16( nCode );
n -= std::min<sal_uInt16>(n, 2);
diff --git a/sc/source/filter/lotus/optab.cxx b/sc/source/filter/lotus/optab.cxx
index b4cbaff91a9d..6d356492c2a6 100644
--- a/sc/source/filter/lotus/optab.cxx
+++ b/sc/source/filter/lotus/optab.cxx
@@ -22,7 +22,7 @@
#include "lotfilter.hxx"
// edit function char *X( char * )
-OPCODE_FKT LotusContext::pOpFkt[ FKT_LIMIT ] =
+const OPCODE_FKT LotusContext::pOpFkt[ FKT_LIMIT ] =
{ // Code
OP_BOF, // 0
OP_EOF, // 1
@@ -127,7 +127,7 @@ OPCODE_FKT LotusContext::pOpFkt[ FKT_LIMIT ] =
OP_HiddenCols, // 100
};
-OPCODE_FKT LotusContext::pOpFkt123[ FKT_LIMIT123 ] =
+const OPCODE_FKT LotusContext::pOpFkt123[ FKT_LIMIT123 ] =
{ // Code
OP_BOF123, // 0
OP_EOF123, // 1
diff --git a/sc/source/filter/oox/PivotTableFormat.cxx b/sc/source/filter/oox/PivotTableFormat.cxx
index 8072d680ddda..48410d01ceda 100644
--- a/sc/source/filter/oox/PivotTableFormat.cxx
+++ b/sc/source/filter/oox/PivotTableFormat.cxx
@@ -79,7 +79,9 @@ void PivotTableFormat::finalizeImport()
auto pPattern = std::make_shared<ScPatternAttr>(getScDocument().getCellAttributeHelper());
if (DxfRef pDxf = getStyles().getDxf(mnDxfId))
- pDxf->fillToItemSet(pPattern->GetItemSet());
+ {
+ pDxf->fillToItemSet(pPattern->GetItemSetWritable());
+ }
ScDPObject* pDPObj = mrPivotTable.getDPObject();
ScDPSaveData* pSaveData = pDPObj->GetSaveData();
diff --git a/sc/source/filter/oox/sheetdatacontext.cxx b/sc/source/filter/oox/sheetdatacontext.cxx
index b90f1fc5eb52..920f64dd6149 100644
--- a/sc/source/filter/oox/sheetdatacontext.cxx
+++ b/sc/source/filter/oox/sheetdatacontext.cxx
@@ -322,22 +322,24 @@ void SheetDataContext::importRow( const AttributeList& rAttribs )
bool SheetDataContext::importCell( const AttributeList& rAttribs )
{
- bool bValid = true;
+ bool bValid = false;
std::string_view p = rAttribs.getView(XML_r);
- if (p.empty())
+ if (!p.empty())
+ {
+ bValid = mrAddressConv.convertToCellAddress(maCellData.maCellAddr, OUString::fromUtf8(p),
+ mnSheet, true);
+ if (bValid)
+ mnCol = maCellData.maCellAddr.Col();
+ }
+
+ if (!bValid)
{
++mnCol;
ScAddress aAddress( mnCol, mnRow, mnSheet );
bValid = mrAddressConv.checkCellAddress( aAddress, true );
maCellData.maCellAddr = aAddress;
}
- else
- {
- bValid = mrAddressConv.convertToCellAddress(maCellData.maCellAddr, OUString::fromUtf8(p),
- mnSheet, true);
- mnCol = maCellData.maCellAddr.Col();
- }
if( bValid )
{
diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx
index 72ed6cd59882..15547d4b4e22 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -2232,8 +2232,8 @@ void Xf::applyPatternToAttrList( AttrList& rAttrs, SCROW nRow1, SCROW nRow2, sal
if ( !pCachedPattern && nNumFmtId >= 0 )
{
ScPatternAttr aNumPat(rDoc.getCellAttributeHelper());
- mnScNumFmt = getStyles().writeNumFmtToItemSet( aNumPat.GetItemSet(), nNumFmtId, false );
- rPat.GetItemSet().Put(aNumPat.GetItemSet());
+ mnScNumFmt = getStyles().writeNumFmtToItemSet( aNumPat.GetItemSetWritable(), nNumFmtId, false );
+ rPat.GetItemSetWritable().Put(aNumPat.GetItemSet());
}
if (!pCachedPattern && !rDocImport.isLatinScript(mnScNumFmt))
@@ -2310,7 +2310,7 @@ Xf::createPattern( bool bSkipPoolDefs )
if( mpPattern )
return *mpPattern;
mpPattern.reset( new ::ScPatternAttr(getScDocument().getCellAttributeHelper()) );
- SfxItemSet& rItemSet = mpPattern->GetItemSet();
+ SfxItemSet& rItemSet = mpPattern->GetItemSetWritable();
/* Enables the used flags, if the formatting attributes differ from the
style XF. In cell XFs Excel uses the cell attributes, if they differ
from the parent style XF (even if the used flag is switched off).
diff --git a/sc/source/filter/oox/tablecolumnsbuffer.cxx b/sc/source/filter/oox/tablecolumnsbuffer.cxx
index 4baa7f1bde8a..55112f7be7d2 100644
--- a/sc/source/filter/oox/tablecolumnsbuffer.cxx
+++ b/sc/source/filter/oox/tablecolumnsbuffer.cxx
@@ -23,6 +23,23 @@
#include <oox/helper/attributelist.hxx>
#include <oox/token/tokens.hxx>
+XmlColumnPrModel::XmlColumnPrModel() :
+ mnMapId( 1 ),
+ msXpath( OUString() ),
+ msXmlDataType( OUString() ),
+ mbDenormalized( false )
+{
+}
+
+TableColumnModel::TableColumnModel() {}
+
+XmlColumnPrModel& TableColumnModel::createXmlColumnPr()
+{
+ OSL_ENSURE( !mxXmlColumnPr, "TableColumnModel::createXmlColumnPr - multiple call" );
+ mxXmlColumnPr.reset( new XmlColumnPrModel );
+ return *mxXmlColumnPr;
+}
+
namespace oox::xls {
TableColumn::TableColumn( const WorkbookHelper& rHelper ) :
@@ -57,6 +74,16 @@ const TableColumnAttributes& TableColumn::getColumnAttributes() const
return maColumnAttributes;
}
+void TableColumn::importXmlColumnPr(const AttributeList& rAttribs)
+{
+ XmlColumnPrModel& rXmlColumnPr = maModel.createXmlColumnPr();
+
+ rXmlColumnPr.mnMapId = rAttribs.getInteger(XML_mapId, 0);
+ rXmlColumnPr.msXpath = rAttribs.getXString(XML_xpath, OUString());
+ rXmlColumnPr.msXmlDataType = rAttribs.getXString(XML_xmlDataType, OUString());
+ rXmlColumnPr.mbDenormalized = rAttribs.getBool(XML_denormalized, false);
+}
+
TableColumns::TableColumns( const WorkbookHelper& rHelper ) :
WorkbookHelper( rHelper ),
mnCount(0)
@@ -95,6 +122,7 @@ bool TableColumns::finalizeImport( ScDBData* pDBData )
{
aNames[i] = rxTableColumn->getName();
aAttributesVector[i] = rxTableColumn->getColumnAttributes();
+ pDBData->SetTableColumnModel( rxTableColumn->getModel() );
++i;
}
pDBData->SetTableColumnNames( std::move(aNames) );
diff --git a/sc/source/filter/oox/tablecolumnscontext.cxx b/sc/source/filter/oox/tablecolumnscontext.cxx
index 270f544bd503..1129bcd22f7d 100644
--- a/sc/source/filter/oox/tablecolumnscontext.cxx
+++ b/sc/source/filter/oox/tablecolumnscontext.cxx
@@ -32,9 +32,14 @@ TableColumnContext::TableColumnContext( WorksheetContextBase& rParent, TableColu
{
}
-ContextHandlerRef TableColumnContext::onCreateContext( sal_Int32 /*nElement*/, const AttributeList& /*rAttribs*/ )
+ContextHandlerRef TableColumnContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
{
- /* no known child elements */
+ switch (nElement)
+ {
+ case XLS_TOKEN(xmlColumnPr):
+ mrTableColumn.importXmlColumnPr( rAttribs );
+ break;
+ }
return nullptr;
}
diff --git a/sc/source/filter/oox/workbookfragment.cxx b/sc/source/filter/oox/workbookfragment.cxx
index 91025369aad2..18eed29be335 100644
--- a/sc/source/filter/oox/workbookfragment.cxx
+++ b/sc/source/filter/oox/workbookfragment.cxx
@@ -78,6 +78,7 @@
#include <officecfg/Office/Calc.hxx>
#include <xestream.hxx>
+#include <ucbhelper/content.hxx>
namespace oox::xls {
@@ -399,6 +400,35 @@ void WorkbookFragment::finalizeImport()
if (!aCustomXmlFragmentPath.isEmpty())
getScDocument().setHasCustomXml(true, aCustomXmlFragmentPath);
+ // read the xmlMaps substream (from xl/_rels/workbook.xml.rels)
+ OUString aXmlMapsFragmentPath = getFragmentPathFromFirstTypeFromOfficeDoc( u"xmlMaps" );
+ if (!aXmlMapsFragmentPath.isEmpty())
+ {
+ // read xmlMaps.xml
+ std::string sXmlMapsContent;
+ size_t nBufferSize = 4096;
+
+ Reference<XInputStream> xXmlMapsInputStream(
+ getBaseFilter().openInputStream(aXmlMapsFragmentPath), UNO_SET_THROW);
+
+ std::ostringstream aStrmBuf;
+ Sequence<sal_Int8> aBytes;
+ size_t nBytesRead = 0;
+
+ do
+ {
+ nBytesRead = xXmlMapsInputStream->readBytes(aBytes, nBufferSize);
+ const sal_Int8* p = aBytes.getConstArray();
+ aStrmBuf << std::string(p, p + nBytesRead);
+ } while (nBytesRead == nBufferSize);
+
+ // put raw content of xmlMaps.xml into sXmlMapsContent
+ sXmlMapsContent = aStrmBuf.str();
+
+ if (!sXmlMapsContent.empty())
+ getScDocument().setHasXmlMaps(true, sXmlMapsContent);
+ }
+
xGlobalSegment->setPosition( 1.0 );
/* Create fragments for all sheets, before importing them. Needed to do
diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx
index b99fa5f4b089..a8b534fe9032 100644
--- a/sc/source/filter/oox/workbookhelper.cxx
+++ b/sc/source/filter/oox/workbookhelper.cxx
@@ -606,7 +606,6 @@ void WorkbookGlobals::initialize()
ScDocument& rDoc = getScDocument();
mxEditEngine.reset( new ScEditEngineDefaulter( rDoc.GetEditEnginePool() ) );
mxEditEngine->SetRefMapMode(MapMode(MapUnit::Map100thMM));
- mxEditEngine->SetEditTextObjectPool( rDoc.GetEditTextObjectPool() );
mxEditEngine->SetUpdateLayout( false );
mxEditEngine->EnableUndo( false );
mxEditEngine->SetControlWord( mxEditEngine->GetControlWord() & ~EEControlBits::ALLOWBIGOBJS );
diff --git a/sc/source/filter/oox/worksheetbuffer.cxx b/sc/source/filter/oox/worksheetbuffer.cxx
index 0783c27a147e..241474359f44 100644
--- a/sc/source/filter/oox/worksheetbuffer.cxx
+++ b/sc/source/filter/oox/worksheetbuffer.cxx
@@ -243,7 +243,7 @@ void WorksheetBuffer::finalizeImport( sal_Int16 nActiveSheet )
if ( aSheetInfo->mnCalcSheet == nActiveSheet)
rDoc.SetVisible( aSheetInfo->mnCalcSheet, true );
else
- rDoc.SetVisible( aSheetInfo->mnCalcSheet, aSheetInfo->mnState == XML_visible );
+ rDoc.SetVisible( aSheetInfo->mnCalcSheet, aSheetInfo->mnState != XML_hidden && aSheetInfo->mnState != XML_veryHidden);
}
}
diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx
index a7bf39b6cfb9..3b24f22a81ab 100644
--- a/sc/source/filter/oox/worksheethelper.cxx
+++ b/sc/source/filter/oox/worksheethelper.cxx
@@ -905,12 +905,16 @@ void WorksheetGlobals::initializeWorksheetImport()
// set default cell style for unused cells
ScDocumentImport& rDoc = getDocImport();
- ScStyleSheet* pStyleSheet =
- static_cast<ScStyleSheet*>(rDoc.getDoc().GetStyleSheetPool()->Find(
- getStyles().getDefaultStyleName(), SfxStyleFamily::Para));
-
- if (pStyleSheet)
- rDoc.setCellStyleToSheet(getSheetIndex(), *pStyleSheet);
+ ScStyleSheetPool* pStylePool = rDoc.getDoc().GetStyleSheetPool();
+ SAL_WARN_IF(!pStylePool, "sc.filter", "Unusual lack of style pool");
+ if (pStylePool)
+ {
+ ScStyleSheet* pStyleSheet =
+ static_cast<ScStyleSheet*>(pStylePool->Find(
+ getStyles().getDefaultStyleName(), SfxStyleFamily::Para));
+ if (pStyleSheet)
+ rDoc.setCellStyleToSheet(getSheetIndex(), *pStyleSheet);
+ }
/* Remember the current sheet index in global data, needed by global
objects, e.g. the chart converter. */
diff --git a/sc/source/filter/oox/worksheetsettings.cxx b/sc/source/filter/oox/worksheetsettings.cxx
index 46d633044115..9cc98952049f 100644
--- a/sc/source/filter/oox/worksheetsettings.cxx
+++ b/sc/source/filter/oox/worksheetsettings.cxx
@@ -160,7 +160,7 @@ void WorksheetSettings::importProtectedRange( const AttributeList& rAttribs )
aProt.maRangeList = xRangeList.release();
}
}
- maSheetProt.maEnhancedProtections.push_back( aProt);
+ maSheetProt.maEnhancedProtections.push_back(std::move(aProt));
}
void WorksheetSettings::importChartProtection( const AttributeList& rAttribs )
diff --git a/sc/source/filter/orcus/autofilter.cxx b/sc/source/filter/orcus/autofilter.cxx
index 02f976423162..52eb305cfdde 100644
--- a/sc/source/filter/orcus/autofilter.cxx
+++ b/sc/source/filter/orcus/autofilter.cxx
@@ -161,7 +161,7 @@ void ScOrcusAutoFilterNode::append_item(os::col_t field, os::auto_filter_op_t op
aEntry.GetQueryItem().meType = ScQueryEntry::ByValue;
aEntry.GetQueryItem().mfVal = value;
- maEntries.push_back(aEntry);
+ maEntries.push_back(std::move(aEntry));
}
void ScOrcusAutoFilterNode::append_item(os::col_t field, os::auto_filter_op_t op,
@@ -176,7 +176,7 @@ void ScOrcusAutoFilterNode::append_item(os::col_t field, os::auto_filter_op_t op
OUString aStr(value.data(), value.size(), mrGlobalSettings.getTextEncoding());
aEntry.GetQueryItem().maString = mrDoc.GetSharedStringPool().intern(aStr);
- maEntries.push_back(aEntry);
+ maEntries.push_back(std::move(aEntry));
if (regex)
mbHasRegex = true;
@@ -189,7 +189,7 @@ void ScOrcusAutoFilterNode::append_item(os::col_t field, os::auto_filter_op_t op
aEntry.eConnect = meConn;
setQueryOp(aEntry, op);
- maEntries.push_back(aEntry);
+ maEntries.push_back(std::move(aEntry));
}
os::iface::import_auto_filter_node* ScOrcusAutoFilterNode::start_node(os::auto_filter_node_op_t op)
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index ce03a417bba1..9481226689ab 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -1108,6 +1108,11 @@ void ScOrcusSheet::set_string(os::row_t row, os::col_t col, os::string_id_t sind
cellInserted();
}
+void ScOrcusSheet::set_string(os::row_t /*row*/, os::col_t /*col*/, std::string_view /*s*/)
+{
+ SAL_WARN("sc.orcus.sheet", "set_string() with non-indexed string is ignored for now");
+}
+
void ScOrcusSheet::set_value(os::row_t row, os::col_t col, double value)
{
mrFactory.pushCellStoreToken(ScAddress(col, row, mnTab), value);
@@ -1146,7 +1151,7 @@ void ScOrcusSheet::set_format(os::row_t row, os::col_t col, size_t xf_index)
SAL_INFO("sc.orcus.style", "set format: " << xf_index);
ScPatternAttr aPattern(mrDoc.getDoc().getCellAttributeHelper());
- mrStyles.applyXfToItemSet(aPattern.GetItemSet(), xf_index);
+ mrStyles.applyXfToItemSet(aPattern.GetItemSetWritable(), xf_index);
mrDoc.getDoc().ApplyPattern(col, row, mnTab, aPattern);
}
@@ -1155,15 +1160,14 @@ void ScOrcusSheet::set_format(os::row_t row_start, os::col_t col_start, os::row_
{
SAL_INFO("sc.orcus.style", "set format range: " << xf_index);
ScPatternAttr aPattern(mrDoc.getDoc().getCellAttributeHelper());
- mrStyles.applyXfToItemSet(aPattern.GetItemSet(), xf_index);
+ mrStyles.applyXfToItemSet(aPattern.GetItemSetWritable(), xf_index);
mrDoc.getDoc().ApplyPatternAreaTab(col_start, row_start, col_end, row_end, mnTab, aPattern);
}
void ScOrcusSheet::set_column_format(os::col_t col, os::col_t col_span, std::size_t xf_index)
{
ScPatternAttr aPattern(mrDoc.getDoc().getCellAttributeHelper());
- mrStyles.applyXfToItemSet(aPattern.GetItemSet(), xf_index);
-
+ mrStyles.applyXfToItemSet(aPattern.GetItemSetWritable(), xf_index);
mrDoc.getDoc().ApplyPatternAreaTab(col, 0, col + col_span - 1, mrDoc.getDoc().MaxRow(), mnTab,
aPattern);
}
@@ -1171,8 +1175,7 @@ void ScOrcusSheet::set_column_format(os::col_t col, os::col_t col_span, std::siz
void ScOrcusSheet::set_row_format(os::row_t row, std::size_t xf_index)
{
ScPatternAttr aPattern(mrDoc.getDoc().getCellAttributeHelper());
- mrStyles.applyXfToItemSet(aPattern.GetItemSet(), xf_index);
-
+ mrStyles.applyXfToItemSet(aPattern.GetItemSetWritable(), xf_index);
mrDoc.getDoc().ApplyPatternAreaTab(0, row, mrDoc.getDoc().MaxCol(), row, mnTab, aPattern);
}
diff --git a/sc/source/filter/orcus/orcusfiltersimpl.cxx b/sc/source/filter/orcus/orcusfiltersimpl.cxx
index acb391f6e3a1..85a04df3ea2a 100644
--- a/sc/source/filter/orcus/orcusfiltersimpl.cxx
+++ b/sc/source/filter/orcus/orcusfiltersimpl.cxx
@@ -9,6 +9,7 @@
#include <orcusfiltersimpl.hxx>
#include <orcusinterface.hxx>
+#include <orcus_utils.hxx>
#include <tokenarray.hxx>
#include <osl/thread.hxx>
@@ -58,7 +59,7 @@ public:
maTemp.CloseStream();
}
- OString getFileName() const { return maTemp.GetFileName().toUtf8(); }
+ OUString getFileName() const { return maTemp.GetFileName(); }
};
uno::Reference<task::XStatusIndicator> getStatusIndicator(const SfxMedium& rMedium)
@@ -81,7 +82,7 @@ bool loadFileContent(SfxMedium& rMedium, orcus::iface::import_filter& filter)
{
// memory-map the temp file and start the import
CopiedTempStream aTemp(*pSrc);
- orcus::file_content input(aTemp.getFileName());
+ auto input = toFileContent(aTemp.getFileName());
filter.read_stream(input.str());
}
catch (const std::exception& e)
@@ -130,12 +131,7 @@ bool ScOrcusFiltersImpl::importODS_Styles(ScDocument& rDoc, OUString& aPath) con
{
try
{
-#if defined _WIN32
- OString aPath8 = OUStringToOString(aPath, RTL_TEXTENCODING_UTF8);
-#else
- OString aPath8 = OUStringToOString(aPath, osl_getThreadTextEncoding());
-#endif
- orcus::file_content content(aPath8);
+ auto content = toFileContent(aPath);
ScOrcusFactory aFactory(rDoc);
ScOrcusStyles aStyles(aFactory);
orcus::import_ods::read_styles(content.str(), &aStyles);
diff --git a/sc/source/filter/orcus/utils.cxx b/sc/source/filter/orcus/utils.cxx
new file mode 100644
index 000000000000..d3df1513cc5c
--- /dev/null
+++ b/sc/source/filter/orcus/utils.cxx
@@ -0,0 +1,20 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <orcus_utils.hxx>
+#include <osl/thread.hxx>
+
+orcus::file_content toFileContent(const OUString& rPath)
+{
+#ifdef _WIN32
+ return orcus::file_content(rPath);
+#else
+ return orcus::file_content(OUStringToOString(rPath, osl_getThreadTextEncoding()));
+#endif
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/orcus/xmlcontext.cxx b/sc/source/filter/orcus/xmlcontext.cxx
index 8a15a52ad3a4..cda6546de0fc 100644
--- a/sc/source/filter/orcus/xmlcontext.cxx
+++ b/sc/source/filter/orcus/xmlcontext.cxx
@@ -9,6 +9,7 @@
#include <orcusfiltersimpl.hxx>
#include <orcusinterface.hxx>
+#include <orcus_utils.hxx>
#include <orcusxml.hxx>
#include <document.hxx>
#include <tokenarray.hxx>
@@ -216,9 +217,6 @@ void ScOrcusXMLContextImpl::importXML(const ScOrcusImportXMLParam& rParam)
if (osl::FileBase::getSystemPathFromFileURL(maPath, aSysPath) != osl::FileBase::E_None)
return;
- OString aOSysPath = OUStringToOString(aSysPath, RTL_TEXTENCODING_UTF8);
- const char* path = aOSysPath.getStr();
-
try
{
orcus::orcus_xml filter(maNsRepo, &aFactory, nullptr);
@@ -264,7 +262,7 @@ void ScOrcusXMLContextImpl::importXML(const ScOrcusImportXMLParam& rParam)
filter.commit_range();
}
- orcus::file_content content(path);
+ orcus::file_content content = toFileContent(aSysPath);
filter.read_stream(content.str());
aFactory.finalize();
diff --git a/sc/source/filter/qpro/qprostyle.cxx b/sc/source/filter/qpro/qprostyle.cxx
index 5cd64c817447..e6d2ca927353 100644
--- a/sc/source/filter/qpro/qprostyle.cxx
+++ b/sc/source/filter/qpro/qprostyle.cxx
@@ -41,7 +41,7 @@ void ScQProStyle::SetFormat( ScDocument *pDoc, sal_uInt8 nCol, sal_uInt16 nRow,
return;
ScPatternAttr aPattern(pDoc->getCellAttributeHelper());
- SfxItemSet& rItemSet = aPattern.GetItemSet();
+ SfxItemSet& rItemSet = aPattern.GetItemSetWritable();
sal_uInt8 nTmp = maAlign[ nStyle ];
sal_uInt8 nHor = ( nTmp & 0x07 );
diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx
index eb58054289f4..38122bfc6669 100644
--- a/sc/source/filter/rtf/eeimpars.cxx
+++ b/sc/source/filter/rtf/eeimpars.cxx
@@ -65,7 +65,7 @@ ScEEImport::ScEEImport( ScDocument& rDoc, const ScRange& rRange ) :
{
const ScPatternAttr* pPattern = mrDoc.GetPattern(
maRange.aStart.Col(), maRange.aStart.Row(), maRange.aStart.Tab() );
- mpEngine.reset( new ScTabEditEngine(*pPattern, mrDoc.GetEditTextObjectPool(), mrDoc, mrDoc.GetEditTextObjectPool()) );
+ mpEngine.reset( new ScTabEditEngine(*pPattern, mrDoc.GetEditEnginePool(), mrDoc) );
mpEngine->SetUpdateLayout( false );
mpEngine->EnableUndo( false );
}
@@ -219,7 +219,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu
// Set attributes
ScPatternAttr* pAttr(new ScPatternAttr(mrDoc.getCellAttributeHelper()));
pAttr->GetFromEditItemSet( &aSet );
- SfxItemSet* pAttrItemSet = &pAttr->GetItemSet();
+ SfxItemSet* pAttrItemSet = &pAttr->GetItemSetWritable();
if (!aNumStr.isEmpty())
{
pAttrItemSet->Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNumForm ) );
diff --git a/sc/source/filter/rtf/expbase.cxx b/sc/source/filter/rtf/expbase.cxx
index e33d547cf448..c1dec52d3897 100644
--- a/sc/source/filter/rtf/expbase.cxx
+++ b/sc/source/filter/rtf/expbase.cxx
@@ -68,7 +68,7 @@ bool ScExportBase::IsEmptyTable( SCTAB nTab ) const
ScFieldEditEngine& ScExportBase::GetEditEngine() const
{
if ( !pEditEngine )
- const_cast<ScExportBase*>(this)->pEditEngine.reset( new ScFieldEditEngine(pDoc, pDoc->GetEditTextObjectPool()) );
+ const_cast<ScExportBase*>(this)->pEditEngine.reset( new ScFieldEditEngine(pDoc, pDoc->GetEditEnginePool()) );
return *pEditEngine;
}
diff --git a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
index 36374e96509d..9f15084a466e 100644
--- a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
+++ b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
@@ -295,7 +295,7 @@ void ScChangeTrackingExportHelper::WriteEditCell(const ScCellValue& rCell)
if (rCell.getEditText() && !sString.isEmpty())
{
if (!pEditTextObj)
- pEditTextObj = new ScEditEngineTextObj();
+ pEditTextObj = new ScEditEngineTextObj(m_rDoc.GetEditEnginePool());
pEditTextObj->SetText(*rCell.getEditText());
rExport.GetTextParagraphExport()->exportText(pEditTextObj, false, false);
}
@@ -598,7 +598,7 @@ void ScChangeTrackingExportHelper::CollectCellAutoStyles(const ScCellValue& rCel
return;
if (!pEditTextObj)
- pEditTextObj = new ScEditEngineTextObj();
+ pEditTextObj = new ScEditEngineTextObj(m_rDoc.GetEditEnginePool());
pEditTextObj->SetText(*rCell.getEditText());
rExport.GetTextParagraphExport()->collectTextAutoStyles(pEditTextObj, false, false);
diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
index 5089bea2ca6b..7310a5a83097 100644
--- a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
+++ b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
@@ -474,7 +474,7 @@ private:
else
{
mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DATA_TYPE, XML_NUMBER);
- mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_VALUE, rItem.maString.getString());
+ mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_VALUE, OUString::number(rItem.mfVal));
}
mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_OPERATOR, getOperatorXML(rEntry, eSearchType));
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index afa0e9b87a71..4daac20f73df 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -940,8 +940,7 @@ void ScColumnStyles::AddNewTable(const sal_Int32 nTable, const sal_Int32 nFields
if (nTable > nSize)
for (sal_Int32 i = nSize; i < nTable; ++i)
{
- ScMyColumnStyleVec aFieldsVec(nFields + 1, ScColumnStyle());
- aTables.push_back(aFieldsVec);
+ aTables.emplace_back(nFields + 1, ScColumnStyle());
}
}
diff --git a/sc/source/filter/xml/XMLStylesImportHelper.cxx b/sc/source/filter/xml/XMLStylesImportHelper.cxx
index d2d71aa7994a..4da7bb904acc 100644
--- a/sc/source/filter/xml/XMLStylesImportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesImportHelper.cxx
@@ -115,7 +115,7 @@ void ScMyStyleRanges::AddCurrencyRange(const ScRange& rRange, const std::optiona
ScMyCurrencyStyle aStyle;
if (pCurrency)
aStyle.sCurrency = *pCurrency;
- auto itPair = pCurrencyList->insert(aStyle);
+ auto itPair = pCurrencyList->insert(std::move(aStyle));
itPair.first->mpRanges->AddAndPartialCombine(rRange);
}
diff --git a/sc/source/filter/xml/XMLTableShapeResizer.cxx b/sc/source/filter/xml/XMLTableShapeResizer.cxx
index 52392ef0d492..214062cffb4a 100644
--- a/sc/source/filter/xml/XMLTableShapeResizer.cxx
+++ b/sc/source/filter/xml/XMLTableShapeResizer.cxx
@@ -34,7 +34,6 @@
#include <vector>
using namespace ::com::sun::star;
-using ::std::vector;
ScMyOLEFixer::ScMyOLEFixer(ScXMLImport& rTempImport)
: rImport(rTempImport),
@@ -75,7 +74,7 @@ void ScMyOLEFixer::CreateChartListener(ScDocument& rDoc,
if (!pCollection)
return;
- vector<ScTokenRef> aRefTokens;
+ std::vector<ScTokenRef> aRefTokens;
const sal_Unicode cSep = ScCompiler::GetNativeSymbolChar(ocSep);
ScRefTokenHelper::compileRangeRepresentation(
aRefTokens, aRangeStr, rDoc, cSep, rDoc.GetGrammar());
diff --git a/sc/source/filter/xml/XMLTrackedChangesContext.cxx b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
index 2cbc2a499807..3984abca5f2c 100644
--- a/sc/source/filter/xml/XMLTrackedChangesContext.cxx
+++ b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
@@ -828,8 +828,7 @@ void ScXMLChangeCellContext::CreateTextPContext(bool bIsNewParagraph)
if (!pDoc)
return;
- mpEditTextObj = new ScEditEngineTextObj();
- mpEditTextObj->GetEditEngine()->SetEditTextObjectPool(pDoc->GetEditTextObjectPool());
+ mpEditTextObj = new ScEditEngineTextObj(pDoc->GetEditEnginePool());
uno::Reference<text::XTextCursor> xTextCursor(mpEditTextObj->createTextCursor());
if (bIsNewParagraph)
{
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index 5d1003d3f470..de7a16928f62 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -808,7 +808,7 @@ void ScXMLTableRowCellContext::SetContentValidation( const ScRange& rScRange )
sal_uInt32 nIndex = pDoc->AddValidationEntry( aScValidationData );
ScPatternAttr aPattern(pDoc->getCellAttributeHelper());
- aPattern.GetItemSet().Put( SfxUInt32Item( ATTR_VALIDDATA, nIndex ) );
+ aPattern.ItemSetPut(SfxUInt32Item(ATTR_VALIDDATA, nIndex));
if( rScRange.aStart == rScRange.aEnd ) //for a single cell
{
pDoc->ApplyPattern( rScRange.aStart.Col(), rScRange.aStart.Row(),
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 0bf76547bead..314f85bd6d23 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -187,7 +187,6 @@ constexpr OUString SC_LAYERID = u"LayerID"_ustr;
using namespace formula;
using namespace com::sun::star;
using namespace xmloff::token;
-using ::std::vector;
using ::com::sun::star::uno::UNO_QUERY;
namespace
@@ -892,7 +891,7 @@ void ScXMLExport::ExportExternalRefCacheStyles(const ScDocument& rDoc)
return;
// Export each unique number format used in the external ref cache.
- vector<sal_uInt32> aNumFmts;
+ std::vector<sal_uInt32> aNumFmts;
pRefMgr->getAllCachedNumberFormats(aNumFmts);
static constexpr OUString aDefaultStyle(u"Default"_ustr);
for (const auto& rNumFmt : aNumFmts)
@@ -903,7 +902,7 @@ void ScXMLExport::ExportExternalRefCacheStyles(const ScDocument& rDoc)
uno::Any aVal;
aVal <<= nNumFmt;
- vector<XMLPropertyState> aProps;
+ std::vector<XMLPropertyState> aProps;
aVal <<= aDefaultStyle;
aProps.emplace_back(nEntryIndex, aVal);
@@ -4981,7 +4980,7 @@ void ScXMLExport::WriteExternalRefCaches(const ScDocument& rDoc)
if (!pUrl)
continue;
- vector<OUString> aTabNames;
+ std::vector<OUString> aTabNames;
pRefMgr->getAllCachedTableNames(nFileId, aTabNames);
if (aTabNames.empty())
continue;
@@ -5019,11 +5018,11 @@ void ScXMLExport::WriteExternalRefCaches(const ScDocument& rDoc)
// Determine maximum column count of used area, for repeated cells.
SCCOL nMaxColsUsed = 1; // assume that there is at least one cell somewhere...
- vector<SCROW> aRows;
+ std::vector<SCROW> aRows;
pTable->getAllRows(aRows);
for (SCROW nRow : aRows)
{
- vector<SCCOL> aCols;
+ std::vector<SCCOL> aCols;
pTable->getAllCols(nRow, aCols);
if (!aCols.empty())
{
@@ -5079,7 +5078,7 @@ void ScXMLExport::WriteExternalRefCaches(const ScDocument& rDoc)
}
SvXMLElementExport aElemRow(*this, XML_NAMESPACE_TABLE, XML_TABLE_ROW, true, true);
- vector<SCCOL> aCols;
+ std::vector<SCCOL> aCols;
pTable->getAllCols(nRow, aCols);
SCCOL nLastCol = 0;
bool bFirstCol = true;
@@ -5404,11 +5403,12 @@ void ScXMLExport::IncrementProgressBar(bool bFlush, sal_Int32 nInc)
ErrCode ScXMLExport::exportDoc( enum XMLTokenEnum eClass )
{
+ ScDocument* pDoc = GetDocument();
if( getExportFlags() & (SvXMLExportFlags::FONTDECLS|SvXMLExportFlags::STYLES|
SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::CONTENT) )
{
uno::Reference< frame::XModel > xModel = GetModel();
- if (ScDocument* pDoc = GetDocument())
+ if (pDoc)
{
// if source doc was Excel then
auto pFoundShell = comphelper::getFromUnoTunnel<SfxObjectShell>(xModel);
@@ -5421,8 +5421,8 @@ ErrCode ScXMLExport::exportDoc( enum XMLTokenEnum eClass )
}
CollectUserDefinedNamespaces(pDoc->GetPool(), ATTR_USERDEF);
- CollectUserDefinedNamespaces(pDoc->GetEditTextObjectPool(), EE_PARA_XMLATTRIBS);
- CollectUserDefinedNamespaces(pDoc->GetEditTextObjectPool(), EE_CHAR_XMLATTRIBS);
+ CollectUserDefinedNamespaces(pDoc->GetEditEnginePool(), EE_PARA_XMLATTRIBS);
+ CollectUserDefinedNamespaces(pDoc->GetEditEnginePool(), EE_CHAR_XMLATTRIBS);
ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
if (pDrawLayer)
{
@@ -5448,6 +5448,10 @@ ErrCode ScXMLExport::exportDoc( enum XMLTokenEnum eClass )
}
}
}
+ if (pDoc)
+ {
+ pDoc->CreateAllNoteCaptions();
+ }
return SvXMLExport::exportDoc( eClass );
}
diff --git a/sc/source/filter/xml/xmlfonte.cxx b/sc/source/filter/xml/xmlfonte.cxx
index 69120ed68e12..6a76475e0732 100644
--- a/sc/source/filter/xml/xmlfonte.cxx
+++ b/sc/source/filter/xml/xmlfonte.cxx
@@ -85,7 +85,7 @@ ScXMLFontAutoStylePool_Impl::ScXMLFontAutoStylePool_Impl(ScDocument* pDoc, ScXML
const SfxItemPool* pItemPool(pDoc->GetPool());
AddFontItems(aWhichIds, 3, pItemPool, true);
- const SfxItemPool* pEditPool(pDoc->GetEditTextObjectPool());
+ const SfxItemPool* pEditPool(pDoc->GetEditEnginePool());
AddFontItems(aEditWhichIds, 3, pEditPool, false);
std::unique_ptr<SfxStyleSheetIterator> pItr = pDoc->GetStyleSheetPool()->CreateIterator(SfxStyleFamily::Page);
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index 2cc965549aaf..501deb66de35 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -475,14 +475,14 @@ SvXMLImportContext *ScXMLImport::CreateScriptContext()
void ScXMLImport::SetStatistics(const uno::Sequence<beans::NamedValue> & i_rStats)
{
- static const char* s_stats[] =
+ static const char* const s_stats[] =
{ "TableCount", "CellCount", "ObjectCount", nullptr };
SvXMLImport::SetStatistics(i_rStats);
sal_uInt64 nCount(0);
for (const auto& rStat : i_rStats) {
- for (const char** pStat = s_stats; *pStat != nullptr; ++pStat) {
+ for (const char*const* pStat = s_stats; *pStat != nullptr; ++pStat) {
if (rStat.Name.equalsAscii(*pStat)) {
sal_Int32 val = 0;
if (rStat.Value >>= val) {
@@ -1642,7 +1642,6 @@ ScEditEngineDefaulter* ScXMLImport::GetEditEngine()
{
mpEditEngine.reset(new ScEditEngineDefaulter(mpDoc->GetEditEnginePool()));
mpEditEngine->SetRefMapMode(MapMode(MapUnit::Map100thMM));
- mpEditEngine->SetEditTextObjectPool(mpDoc->GetEditTextObjectPool());
mpEditEngine->SetUpdateLayout(false);
mpEditEngine->EnableUndo(false);
mpEditEngine->SetControlWord(mpEditEngine->GetControlWord() & ~EEControlBits::ALLOWBIGOBJS);
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index e6bbd996a15c..c6962aba57b6 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -61,7 +61,7 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
-typedef std::vector< uno::Reference< XAccessible > > ScXAccVector;
+typedef std::vector<rtl::Reference<comphelper::OAccessible>> ScOAccVector;
namespace {
@@ -110,10 +110,10 @@ private:
sal_Int32 AddNotes(const ScPreviewLocationData& rData, const tools::Rectangle& rVisRect, bool bMark, ScAccNotes& rNotes);
static sal_Int8 CompareCell(const ScAddress& aCell1, const ScAddress& aCell2);
- static void CollectChildren(const ScAccNote& rNote, ScXAccVector& rVector);
+ static void CollectChildren(const ScAccNote& rNote, ScOAccVector& rVector);
sal_Int32 CheckChanges(const ScPreviewLocationData& rData, const tools::Rectangle& rVisRect,
bool bMark, ScAccNotes& rOldNotes, ScAccNotes& rNewNotes,
- ScXAccVector& rOldParas, ScXAccVector& rNewParas);
+ ScOAccVector& rOldParas, ScOAccVector& rNewParas);
inline ScDocument* GetDocument() const;
};
@@ -224,7 +224,7 @@ struct ScParaFound
uno::Reference<XAccessible> ScNotesChildren::GetChild(sal_Int32 nIndex) const
{
- uno::Reference<XAccessible> xAccessible;
+ rtl::Reference<comphelper::OAccessible> pAccessible;
if (nIndex < mnParagraphs)
{
@@ -238,7 +238,7 @@ uno::Reference<XAccessible> ScNotesChildren::GetChild(sal_Int32 nIndex) const
OSL_ENSURE((aItr->maNoteCell == maMarks[nIndex].maNoteCell) && (aItr->mbMarkNote == maMarks[nIndex].mbMarkNote), "wrong note found");
if (!aItr->mpTextHelper)
aItr->mpTextHelper = CreateTextHelper(maMarks[nIndex].maNoteText, maMarks[nIndex].maRect, maMarks[nIndex].maNoteCell, maMarks[nIndex].mbMarkNote, nIndex + mnOffset); // the marks are the first and every mark has only one paragraph
- xAccessible = aItr->mpTextHelper->GetChild(aParaFound.mnIndex + aItr->mpTextHelper->GetStartIndex());
+ pAccessible = aItr->mpTextHelper->GetChild(aParaFound.mnIndex + aItr->mpTextHelper->GetStartIndex());
}
else
{
@@ -255,12 +255,12 @@ uno::Reference<XAccessible> ScNotesChildren::GetChild(sal_Int32 nIndex) const
{
if (!aItr->mpTextHelper)
aItr->mpTextHelper = CreateTextHelper(aItr->maNoteText, aItr->maRect, aItr->maNoteCell, aItr->mbMarkNote, (nIndex - aParaFound.mnIndex) + mnOffset + maMarks.size());
- xAccessible = aItr->mpTextHelper->GetChild(aParaFound.mnIndex + aItr->mpTextHelper->GetStartIndex());
+ pAccessible = aItr->mpTextHelper->GetChild(aParaFound.mnIndex + aItr->mpTextHelper->GetStartIndex());
}
}
}
- return xAccessible;
+ return pAccessible;
}
namespace {
@@ -320,7 +320,7 @@ sal_Int8 ScNotesChildren::CompareCell(const ScAddress& aCell1, const ScAddress&
return nResult;
}
-void ScNotesChildren::CollectChildren(const ScAccNote& rNote, ScXAccVector& rVector)
+void ScNotesChildren::CollectChildren(const ScAccNote& rNote, ScOAccVector& rVector)
{
if (rNote.mpTextHelper)
for (sal_Int32 i = 0; i < rNote.mnParaCount; ++i)
@@ -329,7 +329,7 @@ void ScNotesChildren::CollectChildren(const ScAccNote& rNote, ScXAccVector& rVec
sal_Int32 ScNotesChildren::CheckChanges(const ScPreviewLocationData& rData,
const tools::Rectangle& rVisRect, bool bMark, ScAccNotes& rOldNotes,
- ScAccNotes& rNewNotes, ScXAccVector& rOldParas, ScXAccVector& rNewParas)
+ ScAccNotes& rNewNotes, ScOAccVector& rOldParas, ScOAccVector& rNewParas)
{
sal_Int32 nCount = rData.GetNoteCountInRange(rVisRect, bMark);
@@ -458,8 +458,8 @@ void ScNotesChildren::DataChanged(const tools::Rectangle& rVisRect)
if (!mpViewShell)
return;
- ScXAccVector aNewParas;
- ScXAccVector aOldParas;
+ ScOAccVector aNewParas;
+ ScOAccVector aOldParas;
{
ScAccNotes aNewMarks;
mnParagraphs = CheckChanges(mpViewShell->GetLocationData(), rVisRect, true, maMarks, aNewMarks, aOldParas, aNewParas);
diff --git a/sc/source/ui/Accessibility/AccessibleEditObject.cxx b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
index f0b377e82b8a..75558b5820ea 100644
--- a/sc/source/ui/Accessibility/AccessibleEditObject.cxx
+++ b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
@@ -54,11 +54,11 @@ using ::com::sun::star::lang::IndexOutOfBoundsException;
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
-ScAccessibleEditObject::ScAccessibleEditObject(const uno::Reference<XAccessible>& rxParent,
+ScAccessibleEditObject::ScAccessibleEditObject(const rtl::Reference<comphelper::OAccessible>& rpParent,
EditView* pEditView, vcl::Window* pWin,
const OUString& rName, const OUString& rDescription,
EditObjectType eObjectType)
- : ImplInheritanceHelper(rxParent, AccessibleRole::TEXT_FRAME)
+ : ImplInheritanceHelper(rpParent, AccessibleRole::TEXT_FRAME)
, mpEditView(pEditView)
, mpWindow(pWin)
, mpTextWnd(nullptr)
@@ -66,7 +66,7 @@ ScAccessibleEditObject::ScAccessibleEditObject(const uno::Reference<XAccessible>
, mbHasFocus(false)
, m_pScDoc(nullptr)
{
- InitAcc(rxParent, pEditView, rName, rDescription);
+ InitAcc(rpParent, pEditView, rName, rDescription);
}
ScAccessibleEditObject::ScAccessibleEditObject(EditObjectType eObjectType)
@@ -81,12 +81,12 @@ ScAccessibleEditObject::ScAccessibleEditObject(EditObjectType eObjectType)
}
void ScAccessibleEditObject::InitAcc(
- const uno::Reference<XAccessible>& rxParent,
+ const rtl::Reference<comphelper::OAccessible>& rpParent,
EditView* pEditView,
const OUString& rName,
const OUString& rDescription)
{
- SetParent(rxParent);
+ SetParent(rpParent);
mpEditView = pEditView;
CreateTextHelper();
@@ -94,7 +94,7 @@ void ScAccessibleEditObject::InitAcc(
SetDescription(rDescription);
if( meObjectType == CellInEditMode)
{
- const ScAccessibleDocument *pAccDoc = static_cast<ScAccessibleDocument*>(rxParent.get());
+ const ScAccessibleDocument* pAccDoc = static_cast<ScAccessibleDocument*>(rpParent.get());
if (pAccDoc)
{
m_pScDoc = pAccDoc->GetDocument();
@@ -191,23 +191,19 @@ tools::Rectangle ScAccessibleEditObject::GetBoundingBox()
if ( mpWindow )
{
- uno::Reference< XAccessible > xThis( mpWindow->GetAccessible() );
- if ( xThis.is() )
+ rtl::Reference<comphelper::OAccessible> pThis = mpWindow->GetAccessible();
+ if (pThis.is())
{
- uno::Reference< XAccessibleContext > xContext( xThis->getAccessibleContext() );
- if ( xContext.is() )
+ uno::Reference<XAccessible> xParent = pThis->getAccessibleParent();
+ if ( xParent.is() )
{
- uno::Reference< XAccessible > xParent( xContext->getAccessibleParent() );
- if ( xParent.is() )
+ uno::Reference< XAccessibleComponent > xParentComponent( xParent->getAccessibleContext(), uno::UNO_QUERY );
+ if ( xParentComponent.is() )
{
- uno::Reference< XAccessibleComponent > xParentComponent( xParent->getAccessibleContext(), uno::UNO_QUERY );
- if ( xParentComponent.is() )
- {
- Point aScreenLoc = aBounds.TopLeft();
- awt::Point aParentScreenLoc = xParentComponent->getLocationOnScreen();
- Point aPos( aScreenLoc.getX() - aParentScreenLoc.X, aScreenLoc.getY() - aParentScreenLoc.Y );
- aBounds.SetPos( aPos );
- }
+ Point aScreenLoc = aBounds.TopLeft();
+ awt::Point aParentScreenLoc = xParentComponent->getLocationOnScreen();
+ Point aPos( aScreenLoc.getX() - aParentScreenLoc.X, aScreenLoc.getY() - aParentScreenLoc.Y );
+ aBounds.SetPos( aPos );
}
}
}
diff --git a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
index 4e48a323470c..961cd71e6136 100644
--- a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
@@ -96,7 +96,7 @@ void ScAccessiblePageHeaderArea::Notify( SfxBroadcaster& rBC, const SfxHint& rHi
uno::Reference< XAccessible > SAL_CALL ScAccessiblePageHeaderArea::getAccessibleAtPoint(
const awt::Point& rPoint )
{
- uno::Reference<XAccessible> xRet;
+ rtl::Reference<comphelper::OAccessible> pRet;
if (containsPoint(rPoint))
{
SolarMutexGuard aGuard;
@@ -105,10 +105,10 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePageHeaderArea::getAccessible
if(!mpTextHelper)
CreateTextHelper();
- xRet = mpTextHelper->GetAt(rPoint);
+ pRet = mpTextHelper->GetAt(rPoint);
}
- return xRet;
+ return pRet;
}
//===== XAccessibleContext ==============================================
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
index f1a9fa76ed34..ae6122609106 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
@@ -89,7 +89,7 @@ void ScAccessiblePreviewCell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewCell::getAccessibleAtPoint( const awt::Point& rPoint )
{
- uno::Reference<XAccessible> xRet;
+ rtl::Reference<comphelper::OAccessible> pRet;
if (containsPoint(rPoint))
{
SolarMutexGuard aGuard;
@@ -98,10 +98,10 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewCell::getAccessibleAtP
if(!mpTextHelper)
CreateTextHelper();
- xRet = mpTextHelper->GetAt(rPoint);
+ pRet = mpTextHelper->GetAt(rPoint);
}
- return xRet;
+ return pRet;
}
void SAL_CALL ScAccessiblePreviewCell::grabFocus()
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
index 2605c250c7b9..fba7b33878a5 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
@@ -155,7 +155,7 @@ uno::Any SAL_CALL ScAccessiblePreviewHeaderCell::getMinimumIncrement()
uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewHeaderCell::getAccessibleAtPoint( const awt::Point& rPoint )
{
- uno::Reference<XAccessible> xRet;
+ rtl::Reference<comphelper::OAccessible> pRet;
if (containsPoint(rPoint))
{
SolarMutexGuard aGuard;
@@ -164,10 +164,10 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewHeaderCell::getAccessi
if(!mxTextHelper)
CreateTextHelper();
- xRet = mxTextHelper->GetAt(rPoint);
+ pRet = mxTextHelper->GetAt(rPoint);
}
- return xRet;
+ return pRet;
}
void SAL_CALL ScAccessiblePreviewHeaderCell::grabFocus()
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx
index db1fb175a3ec..240505559943 100644
--- a/sc/source/ui/Accessibility/AccessibleText.cxx
+++ b/sc/source/ui/Accessibility/AccessibleText.cxx
@@ -817,7 +817,7 @@ SvxTextForwarder* ScAccessibleEditLineTextData::GetTextForwarder()
if (!mpEditEngine)
{
rtl::Reference<SfxItemPool> pEnginePool = EditEngine::CreatePool();
- mpEditEngine = new ScFieldEditEngine(nullptr, pEnginePool.get(), nullptr, true);
+ mpEditEngine = new ScFieldEditEngine(nullptr, pEnginePool.get(), true);
mbEditEngineCreated = true;
mpEditEngine->EnableUndo( false );
mpEditEngine->SetRefMapMode(MapMode(MapUnit::Map100thMM));
@@ -1020,7 +1020,7 @@ SvxTextForwarder* ScAccessiblePreviewHeaderCellTextData::GetTextForwarder()
else
{
rtl::Reference<SfxItemPool> pEnginePool = EditEngine::CreatePool();
- pEditEngine.reset( new ScFieldEditEngine(nullptr, pEnginePool.get(), nullptr, true) );
+ pEditEngine.reset( new ScFieldEditEngine(nullptr, pEnginePool.get(), true) );
}
pEditEngine->EnableUndo( false );
if (pDocShell)
@@ -1247,7 +1247,7 @@ SvxTextForwarder* ScAccessibleNoteTextData::GetTextForwarder()
else
{
rtl::Reference<SfxItemPool> pEnginePool = EditEngine::CreatePool();
- mpEditEngine.reset( new ScFieldEditEngine(nullptr, pEnginePool.get(), nullptr, true) );
+ mpEditEngine.reset( new ScFieldEditEngine(nullptr, pEnginePool.get(), true) );
}
mpEditEngine->EnableUndo( false );
if (mpDocSh)
diff --git a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx
index 502d467cc5b8..32a06e183d4c 100644
--- a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx
+++ b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx
@@ -246,11 +246,11 @@ void AddressWalkerWriter::formatAsColumnHeader(SCCOL nCols)
aBorderOuter.SetLine(&aLine, SvxBoxItemLine::TOP);
aBorderOuter.SetLine(&aLine, SvxBoxItemLine::BOTTOM);
- aPattern.GetItemSet().Put(aHJustify);
- aPattern.GetItemSet().Put(aVJustify);
- aPattern.GetItemSet().Put(aWeight);
- aPattern.GetItemSet().Put(aWrap);
- aPattern.GetItemSet().Put(aBorderOuter);
+ aPattern.ItemSetPut(aHJustify);
+ aPattern.ItemSetPut(aVJustify);
+ aPattern.ItemSetPut(aWeight);
+ aPattern.ItemSetPut(aWrap);
+ aPattern.ItemSetPut(aBorderOuter);
mrDocument.ApplyPatternAreaTab(mCurrentAddress.Col(), mCurrentAddress.Row(),
mCurrentAddress.Col() + nCols - 1, mCurrentAddress.Row(),
@@ -266,7 +266,7 @@ void AddressWalkerWriter::formatTableBottom(SCCOL nCols)
SvxBorderLine aLine;
aLine.GuessLinesWidths(aLine.GetBorderLineStyle(), SvxBorderLineWidth::Thin);
aBorderOuter.SetLine(&aLine, SvxBoxItemLine::BOTTOM);
- aPattern.GetItemSet().Put(aBorderOuter);
+ aPattern.ItemSetPut(aBorderOuter);
mrDocument.ApplyPatternAreaTab(mCurrentAddress.Col(), mCurrentAddress.Row(),
mCurrentAddress.Col() + nCols - 1, mCurrentAddress.Row(),
mCurrentAddress.Tab(), aPattern);
diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx
index 8d3e7f86fbb5..18f90407e3b4 100644
--- a/sc/source/ui/app/drwtrans.cxx
+++ b/sc/source/ui/app/drwtrans.cxx
@@ -375,7 +375,7 @@ bool ScDrawTransferObj::GetData( const css::datatransfer::DataFlavor& rFlavor, c
if ( nFormat == SotClipboardFormatId::GDIMETAFILE )
bOK = SetGDIMetaFile( aView.GetMarkedObjMetaFile(true) );
else
- bOK = SetBitmapEx( aView.GetMarkedObjBitmapEx(true), rFlavor );
+ bOK = SetBitmapEx( aView.GetMarkedObjBitmap(true), rFlavor );
}
else if ( nFormat == SotClipboardFormatId::SVXB )
{
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index af3de62fbaaf..c564832b8956 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -926,7 +926,7 @@ void ScInputHandler::ImplCreateEditEngine()
// we cannot create a properly initialised EditEngine until we have a document
assert( pActiveViewSh );
ScDocument& rDoc = pActiveViewSh->GetViewData().GetDocShell().GetDocument();
- mpEditEngine = std::make_unique<ScFieldEditEngine>(&rDoc, rDoc.GetEditEnginePool(), rDoc.GetEditTextObjectPool());
+ mpEditEngine = std::make_unique<ScFieldEditEngine>(&rDoc, rDoc.GetEditEnginePool());
mpEditEngine->SetWordDelimiters( ScEditUtil::ModifyDelimiters( mpEditEngine->GetWordDelimiters() ) );
UpdateRefDevice(); // also sets MapMode
mpEditEngine->SetPaperSize( Size( 1000000, 1000000 ) );
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 18b18836c746..fcbda98b50cb 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1164,7 +1164,7 @@ ScTextWndGroup::ScTextWndGroup(ScInputBarGroup& rParent, ScTabViewShell* pViewSh
, mxTextWndWin(new weld::CustomWeld(rParent.GetBuilder(), u"sc_input_window"_ustr, *mxTextWnd))
, mrParent(rParent)
{
- mxScrollWin->connect_vadjustment_changed(LINK(this, ScTextWndGroup, Impl_ScrollHdl));
+ mxScrollWin->connect_vadjustment_value_changed(LINK(this, ScTextWndGroup, Impl_ScrollHdl));
if (ScTabViewShell* pActiveViewShell = comphelper::LibreOfficeKit::isActive() ?
dynamic_cast<ScTabViewShell*>(SfxViewShell::Current()) : nullptr)
{
@@ -1431,8 +1431,7 @@ void ScTextWnd::SetScrollBarRange()
nPageSize = std::min(nPageSize, nUpper);
weld::ScrolledWindow& rVBar = mrGroupBar.GetScrollWin();
- rVBar.vadjustment_configure(nCurrentDocPos, 0, nUpper,
- nStepIncrement, nPageIncrement, nPageSize);
+ rVBar.vadjustment_configure(nCurrentDocPos, nUpper, nStepIncrement, nPageIncrement, nPageSize);
}
void ScTextWnd::DoScroll()
@@ -1536,10 +1535,10 @@ void ScTextWnd::InitEditEngine()
{
pDocSh = &mpViewShell->GetViewData().GetDocShell();
ScDocument& rDoc = mpViewShell->GetViewData().GetDocument();
- pNew = std::make_unique<ScFieldEditEngine>(&rDoc, rDoc.GetEditEnginePool(), rDoc.GetEditTextObjectPool());
+ pNew = std::make_unique<ScFieldEditEngine>(&rDoc, rDoc.GetEditEnginePool());
}
else
- pNew = std::make_unique<ScFieldEditEngine>(nullptr, EditEngine::CreatePool().get(), nullptr, true);
+ pNew = std::make_unique<ScFieldEditEngine>(nullptr, EditEngine::CreatePool().get(), true);
pNew->SetExecuteURL( false );
m_xEditEngine = std::move(pNew);
@@ -2106,10 +2105,10 @@ void ScTextWnd::MakeDialogEditView()
if ( pViewSh )
{
ScDocument& rDoc = pViewSh->GetViewData().GetDocument();
- pNew = std::make_unique<ScFieldEditEngine>(&rDoc, rDoc.GetEditEnginePool(), rDoc.GetEditTextObjectPool());
+ pNew = std::make_unique<ScFieldEditEngine>(&rDoc, rDoc.GetEditEnginePool());
}
else
- pNew = std::make_unique<ScFieldEditEngine>(nullptr, EditEngine::CreatePool().get(), nullptr, true);
+ pNew = std::make_unique<ScFieldEditEngine>(nullptr, EditEngine::CreatePool().get(), true);
pNew->SetExecuteURL( false );
m_xEditEngine = std::move(pNew);
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index 053ecc02c93d..4cba890faa89 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -97,21 +97,17 @@ void ScTransferObj::GetAreaSize( const ScDocument& rDoc, SCTAB nTab1, SCTAB nTab
nCol = nMaxCol;
}
-void ScTransferObj::PaintToDev( OutputDevice* pDev, ScDocument& rDoc, double nPrintFactor,
+void ScTransferObj::PaintToDev( OutputDevice* pDev, ScDocShell& rDocSh, double nPrintFactor,
const ScRange& rBlock )
{
- if (!rDoc.GetDocumentShell())
- return;
-
tools::Rectangle aBound( Point(), pDev->GetOutputSize() ); //! use size from clip area?
- ScViewData aViewData(*rDoc.GetDocumentShell(), nullptr);
+ ScViewData aViewData(rDocSh, nullptr);
- aViewData.SetTabNo( rBlock.aEnd.Tab() );
aViewData.SetScreen( rBlock.aStart.Col(), rBlock.aStart.Row(),
rBlock.aEnd.Col(), rBlock.aEnd.Row() );
- ScPrintFunc::DrawToDev( rDoc, pDev, nPrintFactor, aBound, aViewData, false/*bMetaFile*/ );
+ ScPrintFunc::DrawToDev( rDocSh.GetDocument(), pDev, nPrintFactor, aBound, aViewData, false/*bMetaFile*/ );
}
ScTransferObj::ScTransferObj( const std::shared_ptr<ScDocument>& pClipDoc, TransferableObjectDescriptor aDesc ) :
@@ -317,7 +313,7 @@ bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor, const OUSt
const ScPatternAttr* pPattern = m_pDoc->GetPattern( nCol, nRow, nTab );
if (pPattern)
{
- ScTabEditEngine aEngine(*pPattern, m_pDoc->GetEditTextObjectPool(), *m_pDoc);
+ ScTabEditEngine aEngine(*pPattern, m_pDoc->GetEditEnginePool(), *m_pDoc);
ScRefCellValue aCell(*m_pDoc, aPos);
if (aCell.getType() == CELLTYPE_EDIT)
{
@@ -437,10 +433,11 @@ bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor, const OUSt
pVirtDev->SetOutputSizePixel(aPixelSize);
- PaintToDev( pVirtDev, *m_pDoc, 1.0, aReducedBlock );
+ InitDocShell(true);
+ PaintToDev( pVirtDev, *m_aDocShellRef, 1.0, aReducedBlock );
pVirtDev->SetMapMode( MapMode( MapUnit::MapPixel, Point(), aScale, aScale ) );
- BitmapEx aBmp = pVirtDev->GetBitmapEx( Point(), pVirtDev->GetOutputSize() );
+ Bitmap aBmp( pVirtDev->GetBitmap( Point(), pVirtDev->GetOutputSize() ) );
bOK = SetBitmapEx( aBmp, rFlavor );
}
else if ( nFormat == SotClipboardFormatId::GDIMETAFILE )
diff --git a/sc/source/ui/app/typemap.cxx b/sc/source/ui/app/typemap.cxx
index 0719a4ed6686..067d9bf40b99 100644
--- a/sc/source/ui/app/typemap.cxx
+++ b/sc/source/ui/app/typemap.cxx
@@ -88,6 +88,7 @@
#include <attrib.hxx>
#include <svx/sdprcitm.hxx>
#include <svx/sdmetitm.hxx>
+#include <svx/pageitem.hxx>
#define avmedia_MediaItem ::avmedia::MediaItem
diff --git a/sc/source/ui/attrdlg/attrdlg.cxx b/sc/source/ui/attrdlg/attrdlg.cxx
index ef6fecddd0b2..75e751ad31f5 100644
--- a/sc/source/ui/attrdlg/attrdlg.cxx
+++ b/sc/source/ui/attrdlg/attrdlg.cxx
@@ -31,33 +31,46 @@
#include <editeng/flstitem.hxx>
#include <osl/diagnose.h>
+#include <vcl/tabs.hrc>
+
ScAttrDlg::ScAttrDlg(weld::Window* pParent, const SfxItemSet* pCellAttrs)
: SfxTabDialogController(pParent, u"modules/scalc/ui/formatcellsdialog.ui"_ustr,
u"FormatCellsDialog"_ustr, pCellAttrs)
{
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT ), "GetTabPageCreatorFunc fail!");
- AddTabPage( u"numbers"_ustr, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT ), nullptr );
- OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), "GetTabPageCreatorFunc fail!");
- AddTabPage( u"font"_ustr, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), nullptr );
- OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), "GetTabPageCreatorFunc fail!");
- AddTabPage( u"fonteffects"_ustr, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), nullptr );
- OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_ALIGNMENT ), "GetTabPageCreatorFunc fail!");
- AddTabPage( u"alignment"_ustr, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_ALIGNMENT ), nullptr );
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_NUMBERFORMAT), "GetTabPageCreatorFunc fail!");
+ AddTabPage(u"numbers"_ustr, TabResId(RID_TAB_NUMBERS.aLabel),
+ pFact->GetTabPageCreatorFunc(RID_SVXPAGE_NUMBERFORMAT),
+ RID_M + RID_TAB_NUMBERS.sIconName);
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_CHAR_NAME), "GetTabPageCreatorFunc fail!");
+ AddTabPage(u"font"_ustr, TabResId(RID_TAB_FONT.aLabel),
+ pFact->GetTabPageCreatorFunc(RID_SVXPAGE_CHAR_NAME),
+ RID_M + RID_TAB_FONT.sIconName);
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_CHAR_EFFECTS), "GetTabPageCreatorFunc fail!");
+ AddTabPage(u"fonteffects"_ustr, TabResId(RID_TAB_FONTEFFECTS.aLabel),
+ pFact->GetTabPageCreatorFunc(RID_SVXPAGE_CHAR_EFFECTS),
+ RID_M + RID_TAB_FONTEFFECTS.sIconName);
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_ALIGNMENT), "GetTabPageCreatorFunc fail!");
+ AddTabPage(u"alignment"_ustr, TabResId(RID_TAB_ALIGNMENT.aLabel),
+ pFact->GetTabPageCreatorFunc(RID_SVXPAGE_ALIGNMENT),
+ RID_M + RID_TAB_ALIGNMENT.sIconName);
if (SvtCJKOptions::IsAsianTypographyEnabled())
{
OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN), "GetTabPageCreatorFunc fail!");
- AddTabPage( u"asiantypography"_ustr, pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN), nullptr );
+ AddTabPage(u"asiantypography"_ustr, TabResId(RID_TAB_ASIANTYPO.aLabel),
+ pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN),
+ RID_M + RID_TAB_ASIANTYPO.sIconName);
}
- else
- RemoveTabPage( u"asiantypography"_ustr );
- OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "GetTabPageCreatorFunc fail!");
- AddTabPage( u"borders"_ustr, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), nullptr );
- OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG ), "GetTabPageCreatorFunc fail!");
- AddTabPage( u"background"_ustr, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG ), nullptr );
- AddTabPage( u"cellprotection"_ustr , ScTabPageProtection::Create, nullptr );
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_BORDER), "GetTabPageCreatorFunc fail!");
+ AddTabPage(u"borders"_ustr, TabResId(RID_TAB_BORDER.aLabel),
+ pFact->GetTabPageCreatorFunc(RID_SVXPAGE_BORDER), RID_M + RID_TAB_BORDER.sIconName);
+ OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_BKG), "GetTabPageCreatorFunc fail!");
+ AddTabPage(u"background"_ustr, TabResId(RID_TAB_BACKGROUND.aLabel),
+ pFact->GetTabPageCreatorFunc(RID_SVXPAGE_BKG), RID_M + RID_TAB_BACKGROUND.sIconName);
+ AddTabPage(u"cellprotection"_ustr, TabResId(RID_TAB_PROTECTION.aLabel),
+ ScTabPageProtection::Create, RID_M + RID_TAB_PROTECTION.sIconName);
}
ScAttrDlg::~ScAttrDlg()
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index a0e113fc2457..43e4ea73e95e 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -83,10 +83,10 @@ public:
using ImplTemplate<Base, Dialog>::ImplTemplate;
// screenshotting
- BitmapEx createScreenshot() const override
+ Bitmap createScreenshot() const override
{
VclPtr<VirtualDevice> xDialogSurface(this->m_pDlg->getDialog()->screenshot());
- return xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel());
+ return xDialogSurface->GetBitmap(Point(), xDialogSurface->GetOutputSizePixel());
}
OUString GetScreenshotId() const override { return this->m_pDlg->get_help_id(); }
};
@@ -844,7 +844,7 @@ public:
{
return this->m_pDlg->selectPageByUIXMLDescription(rUIXMLDescription);
}
- BitmapEx createScreenshot() const override { return this->m_pDlg->createScreenshot(); }
+ Bitmap createScreenshot() const override { return this->m_pDlg->createScreenshot(); }
OUString GetScreenshotId() const override { return this->m_pDlg->GetScreenshotId(); }
};
}
diff --git a/sc/source/ui/attrdlg/tabpages.cxx b/sc/source/ui/attrdlg/tabpages.cxx
index 34931979499a..bc4e4ffcf55f 100644
--- a/sc/source/ui/attrdlg/tabpages.cxx
+++ b/sc/source/ui/attrdlg/tabpages.cxx
@@ -137,31 +137,31 @@ DeactivateRC ScTabPageProtection::DeactivatePage( SfxItemSet* pSetP )
return DeactivateRC::LeavePage;
}
-IMPL_LINK(ScTabPageProtection, ProtectClickHdl, weld::Toggleable&, rBox, void)
+IMPL_LINK_NOARG(ScTabPageProtection, ProtectClickHdl, weld::Toggleable&, void)
{
- aProtectState.ButtonToggled(rBox);
- ButtonClick(rBox);
+ aProtectState.CheckButtonToggled(*m_xBtnProtect);
+ ButtonClick(*m_xBtnProtect);
}
-IMPL_LINK(ScTabPageProtection, HideCellClickHdl, weld::Toggleable&, rBox, void)
+IMPL_LINK_NOARG(ScTabPageProtection, HideCellClickHdl, weld::Toggleable&, void)
{
- aHideCellState.ButtonToggled(rBox);
- ButtonClick(rBox);
+ aHideCellState.CheckButtonToggled(*m_xBtnHideCell);
+ ButtonClick(*m_xBtnHideCell);
}
-IMPL_LINK(ScTabPageProtection, HideFormulaClickHdl, weld::Toggleable&, rBox, void)
+IMPL_LINK_NOARG(ScTabPageProtection, HideFormulaClickHdl, weld::Toggleable&, void)
{
- aHideFormulaState.ButtonToggled(rBox);
- ButtonClick(rBox);
+ aHideFormulaState.CheckButtonToggled(*m_xBtnHideFormula);
+ ButtonClick(*m_xBtnHideFormula);
}
-IMPL_LINK(ScTabPageProtection, HidePrintClickHdl, weld::Toggleable&, rBox, void)
+IMPL_LINK_NOARG(ScTabPageProtection, HidePrintClickHdl, weld::Toggleable&, void)
{
- aHidePrintState.ButtonToggled(rBox);
- ButtonClick(rBox);
+ aHidePrintState.CheckButtonToggled(*m_xBtnHidePrint);
+ ButtonClick(*m_xBtnHidePrint);
}
-void ScTabPageProtection::ButtonClick(const weld::Toggleable& rBox)
+void ScTabPageProtection::ButtonClick(const weld::CheckButton& rBox)
{
TriState eState = rBox.get_state();
if (eState == TRISTATE_INDET)
diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx
index f6979b1d5b1e..068ee78c44cd 100644
--- a/sc/source/ui/cctrl/dpcontrol.cxx
+++ b/sc/source/ui/cctrl/dpcontrol.cxx
@@ -143,10 +143,9 @@ void ScDPFieldButton::draw()
aTextPos.setX(maPos.getX() + 2); // 2 = Margin
aTextPos.setY(maPos.getY() + (maSize.Height()-nTHeight)/2);
- mpOutDev->Push(vcl::PushFlags::CLIPREGION);
+ auto popIt = mpOutDev->ScopedPush(vcl::PushFlags::CLIPREGION);
mpOutDev->IntersectClipRegion(aRect);
mpOutDev->DrawText(aTextPos, maText);
- mpOutDev->Pop();
}
if (mbPopupButton || mbPopupButtonMulti)
diff --git a/sc/source/ui/condformat/condformatmgr.cxx b/sc/source/ui/condformat/condformatmgr.cxx
index 2e5cef3a01a0..5e60a2a2a70d 100644
--- a/sc/source/ui/condformat/condformatmgr.cxx
+++ b/sc/source/ui/condformat/condformatmgr.cxx
@@ -124,7 +124,7 @@ std::unique_ptr<ScConditionalFormatList> ScCondFormatManagerDlg::GetConditionalF
void ScCondFormatManagerDlg::UpdateButtonSensitivity()
{
- bool bNewSensitivity = !m_xFormatList->empty();
+ bool bNewSensitivity = m_xFormatList && !m_xFormatList->empty();
m_xBtnRemove->set_sensitive(bNewSensitivity);
m_xBtnEdit->set_sensitive(bNewSensitivity);
}
diff --git a/sc/source/ui/dataprovider/csvdataprovider.cxx b/sc/source/ui/dataprovider/csvdataprovider.cxx
index 8c91aacf2ec5..30874102d446 100644
--- a/sc/source/ui/dataprovider/csvdataprovider.cxx
+++ b/sc/source/ui/dataprovider/csvdataprovider.cxx
@@ -152,7 +152,8 @@ void CSVDataProvider::Import()
mpDoc.reset(new ScDocument(SCDOCMODE_CLIP));
mpDoc->ResetClip(mpDocument, SCTAB(0));
- mxCSVFetchThread = new CSVFetchThread(*mpDoc, mrDataSource.getURL(), std::bind(&CSVDataProvider::ImportFinished, this), std::vector(mrDataSource.getDataTransformation()));
+ mxCSVFetchThread = new CSVFetchThread(*mpDoc, mrDataSource.getURL(),
+ [this]() { this->ImportFinished(); }, std::vector(mrDataSource.getDataTransformation()));
mxCSVFetchThread->launch();
if (mbDeterministic)
diff --git a/sc/source/ui/dataprovider/xmldataprovider.cxx b/sc/source/ui/dataprovider/xmldataprovider.cxx
index 19ebe49859d2..7572c3f358ec 100644
--- a/sc/source/ui/dataprovider/xmldataprovider.cxx
+++ b/sc/source/ui/dataprovider/xmldataprovider.cxx
@@ -66,7 +66,7 @@ void XMLFetchThread::execute()
aRangeLink.maPos = ScAddress(0, 0, 0);
aRangeLink.maFieldPaths.push_back(OUStringToOString(maID, RTL_TEXTENCODING_UTF8));
maParam.maRangeLinks.clear();
- maParam.maRangeLinks.push_back(aRangeLink);
+ maParam.maRangeLinks.push_back(std::move(aRangeLink));
}
// Do the import.
SolarMutexGuard aGuard;
@@ -103,10 +103,9 @@ void XMLDataProvider::Import()
mpDoc.reset(new ScDocument(SCDOCMODE_CLIP));
mpDoc->ResetClip(mpDocument, SCTAB(0));
- mxXMLFetchThread = new XMLFetchThread(*mpDoc, mrDataSource.getURL(),
- mrDataSource.getXMLImportParam(), mrDataSource.getID(),
- std::bind(&XMLDataProvider::ImportFinished, this),
- std::vector(mrDataSource.getDataTransformation()));
+ mxXMLFetchThread = new XMLFetchThread(
+ *mpDoc, mrDataSource.getURL(), mrDataSource.getXMLImportParam(), mrDataSource.getID(),
+ [this]() { this->ImportFinished(); }, std::vector(mrDataSource.getDataTransformation()));
mxXMLFetchThread->launch();
if (mbDeterministic)
diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
index e7ec2f9e5bb4..fbdabc3e5a46 100644
--- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
@@ -107,9 +107,7 @@ ScPivotLayoutDialog::ScPivotLayoutDialog(
, mxBtnOK(m_xBuilder->weld_button(u"ok"_ustr))
, mxBtnCancel(m_xBuilder->weld_button(u"cancel"_ustr))
, mxSourceFrame(m_xBuilder->weld_frame(u"frame2"_ustr))
- , mxSourceLabel(mxSourceFrame->weld_label_widget())
, mxDestFrame(m_xBuilder->weld_frame(u"frame1"_ustr))
- , mxDestLabel(mxDestFrame->weld_label_widget())
, mxOptions(m_xBuilder->weld_expander(u"options"_ustr))
, mxMore(m_xBuilder->weld_expander(u"more"_ustr))
{
@@ -118,7 +116,7 @@ ScPivotLayoutDialog::ScPivotLayoutDialog(
mxSourceRadioNamedRange->connect_toggled(aLink2);
mxSourceRadioSelection->connect_toggled(aLink2);
- mxSourceEdit->SetReferences(this, mxSourceLabel.get());
+ mxSourceEdit->SetReferences(this, mxSourceFrame.get());
mxSourceButton->SetReferences(this, mxSourceEdit.get());
Link<formula::RefEdit&,void> aEditLink = LINK(this, ScPivotLayoutDialog, GetEditFocusHandler);
@@ -138,7 +136,7 @@ ScPivotLayoutDialog::ScPivotLayoutDialog(
mxDestinationRadioNamedRange->connect_toggled(aLink2);
mxDestinationRadioSelection->connect_toggled(aLink2);
- mxDestinationEdit->SetReferences(this, mxDestLabel.get());
+ mxDestinationEdit->SetReferences(this, mxDestFrame.get());
mxDestinationButton->SetReferences(this, mxDestinationEdit.get());
Link<formula::RefButton&,void> aButtonLink = LINK(this, ScPivotLayoutDialog, GetButtonFocusHandler);
diff --git a/sc/source/ui/dbgui/csvcontrol.cxx b/sc/source/ui/dbgui/csvcontrol.cxx
index 409e898b46a3..7df3d1be2704 100644
--- a/sc/source/ui/dbgui/csvcontrol.cxx
+++ b/sc/source/ui/dbgui/csvcontrol.cxx
@@ -241,12 +241,11 @@ sal_Int32 ScCsvControl::GetLineFromY( sal_Int32 nY ) const
void ScCsvControl::ImplInvertRect( OutputDevice& rOutDev, const tools::Rectangle& rRect )
{
- rOutDev.Push( vcl::PushFlags::LINECOLOR | vcl::PushFlags::FILLCOLOR | vcl::PushFlags::RASTEROP );
+ auto popIt = rOutDev.ScopedPush(vcl::PushFlags::LINECOLOR | vcl::PushFlags::FILLCOLOR | vcl::PushFlags::RASTEROP);
rOutDev.SetLineColor( COL_BLACK );
rOutDev.SetFillColor( COL_BLACK );
rOutDev.SetRasterOp( RasterOp::Invert );
rOutDev.DrawRect( rRect );
- rOutDev.Pop();
}
ScMoveMode ScCsvControl::GetHorzDirection( sal_uInt16 nCode, bool bHomeEnd )
diff --git a/sc/source/ui/dbgui/csvtablebox.cxx b/sc/source/ui/dbgui/csvtablebox.cxx
index ab8231013009..3e259f87413a 100644
--- a/sc/source/ui/dbgui/csvtablebox.cxx
+++ b/sc/source/ui/dbgui/csvtablebox.cxx
@@ -42,8 +42,8 @@ ScCsvTableBox::ScCsvTableBox(weld::Builder& rBuilder)
mxRuler->SetCmdHdl( aLink );
mxGrid->SetCmdHdl( aLink );
- mxScroll->connect_hadjustment_changed(LINK(this, ScCsvTableBox, HScrollHdl));
- mxScroll->connect_vadjustment_changed(LINK(this, ScCsvTableBox, VScrollHdl));
+ mxScroll->connect_hadjustment_value_changed(LINK(this, ScCsvTableBox, HScrollHdl));
+ mxScroll->connect_vadjustment_value_changed(LINK(this, ScCsvTableBox, VScrollHdl));
maEndScrollIdle.SetPriority(TaskPriority::LOWEST);
maEndScrollIdle.SetInvokeHandler(LINK(this,ScCsvTableBox,ScrollEndHdl));
@@ -136,25 +136,21 @@ void ScCsvTableBox::InitControls()
void ScCsvTableBox::InitHScrollBar()
{
- int nLower = 0;
int nValue = mxGrid->GetFirstVisPos();
int nUpper = mxGrid->GetPosCount() + 2;
int nPageSize = mxGrid->GetVisPosCount();
// Undo scrollbar RTL
if (AllSettings::GetLayoutRTL())
- nValue = nUpper - (nValue - nLower + nPageSize);
+ nValue = nUpper - (nValue + nPageSize);
- mxScroll->hadjustment_configure(nValue, nLower, nUpper,
- 1, mxGrid->GetVisPosCount() * 3 / 4,
- nPageSize);
+ mxScroll->hadjustment_configure(nValue, nUpper, 1, mxGrid->GetVisPosCount() * 3 / 4, nPageSize);
}
void ScCsvTableBox::InitVScrollBar()
{
- mxScroll->vadjustment_configure(mxGrid->GetFirstVisLine(), 0, mxGrid->GetLineCount() + 1,
- 1, mxGrid->GetVisLineCount() - 2,
- mxGrid->GetVisLineCount());
+ mxScroll->vadjustment_configure(mxGrid->GetFirstVisLine(), mxGrid->GetLineCount() + 1, 1,
+ mxGrid->GetVisLineCount() - 2, mxGrid->GetVisLineCount());
}
void ScCsvTableBox::MakePosVisible( sal_Int32 nPos )
diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx
index c0d681382688..154d49d68caf 100644
--- a/sc/source/ui/dbgui/dbnamdlg.cxx
+++ b/sc/source/ui/dbgui/dbnamdlg.cxx
@@ -147,11 +147,10 @@ ScDbNameDlg::ScDbNameDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pPa
, m_xBtnRemove(m_xBuilder->weld_button(u"delete"_ustr))
, m_xModifyPB(m_xBuilder->weld_button(u"modify"_ustr))
, m_xInvalidFT(m_xBuilder->weld_label(u"invalid"_ustr))
- , m_xFrameLabel(m_xAssignFrame->weld_label_widget())
, m_xExpander(m_xBuilder->weld_expander(u"more"_ustr))
{
m_xEdName->set_height_request_by_rows(4);
- m_xEdAssign->SetReferences(this, m_xFrameLabel.get());
+ m_xEdAssign->SetReferences(this, m_xAssignFrame.get());
m_xRbAssign->SetReferences(this, m_xEdAssign.get());
aStrAdd = m_xBtnAdd->get_label();
aStrModify = m_xModifyPB->get_label();
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index 493fdcaa042b..076b7ea12afa 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -313,8 +313,8 @@ void ScFilterDlg::Init()
UpdateColorList(i+1);
}
- m_xScrollBar->connect_vadjustment_changed( LINK( this, ScFilterDlg, ScrollHdl ) );
- m_xScrollBar->vadjustment_configure(0, 0, 8, 1, 3, 4);
+ m_xScrollBar->connect_vadjustment_value_changed( LINK( this, ScFilterDlg, ScrollHdl ) );
+ m_xScrollBar->vadjustment_configure(0, 8, 1, 3, 4);
Size aSize(m_xContents->get_preferred_size());
m_xContents->set_size_request(aSize.Width(), aSize.Height());
diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx
index 27b2e28b44d8..b6d8b7767d27 100644
--- a/sc/source/ui/dbgui/pvfundlg.cxx
+++ b/sc/source/ui/dbgui/pvfundlg.cxx
@@ -41,7 +41,6 @@
using namespace ::com::sun::star::sheet;
using ::com::sun::star::uno::Sequence;
-using ::std::vector;
namespace {
@@ -69,10 +68,10 @@ bool lclFillListBox(weld::ComboBox& rLBox, const Sequence< OUString >& rStrings)
return bEmpty;
}
-bool lclFillListBox(weld::ComboBox& rLBox, const vector<ScDPLabelData::Member>& rMembers, int nEmptyPos)
+bool lclFillListBox(weld::ComboBox& rLBox, const std::vector<ScDPLabelData::Member>& rMembers, int nEmptyPos)
{
bool bEmpty = false;
- vector<ScDPLabelData::Member>::const_iterator itr = rMembers.begin(), itrEnd = rMembers.end();
+ std::vector<ScDPLabelData::Member>::const_iterator itr = rMembers.begin(), itrEnd = rMembers.end();
for (; itr != itrEnd; ++itr)
{
OUString aName = itr->getDisplayName();
@@ -87,7 +86,7 @@ bool lclFillListBox(weld::ComboBox& rLBox, const vector<ScDPLabelData::Member>&
return bEmpty;
}
-bool lclFillListBox(weld::TreeView& rLBox, const vector<ScDPLabelData::Member>& rMembers)
+bool lclFillListBox(weld::TreeView& rLBox, const std::vector<ScDPLabelData::Member>& rMembers)
{
bool bEmpty = false;
for (const auto& rMember : rMembers)
@@ -428,7 +427,7 @@ IMPL_LINK( ScDPFunctionDlg, SelectHdl, weld::ComboBox&, rLBox, void )
size_t nBasePos = mxLbBaseField->get_active();
if (nBasePos < mrLabelVec.size())
{
- const vector<ScDPLabelData::Member>& rMembers = mrLabelVec[nBasePos]->maMembers;
+ const std::vector<ScDPLabelData::Member>& rMembers = mrLabelVec[nBasePos]->maMembers;
mbEmptyItem = lclFillListBox(*mxLbBaseItem, rMembers, SC_BASEITEM_USER_POS);
// build cache for base names.
NameMapType aMap;
diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx
index 9df10b9d9003..49af1ff92e3d 100644
--- a/sc/source/ui/dbgui/sfiltdlg.cxx
+++ b/sc/source/ui/dbgui/sfiltdlg.cxx
@@ -80,9 +80,8 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, we
, m_xBtnOk(m_xBuilder->weld_button(u"ok"_ustr))
, m_xBtnCancel(m_xBuilder->weld_button(u"cancel"_ustr))
, m_xFilterFrame(m_xBuilder->weld_frame(u"filterframe"_ustr))
- , m_xFilterLabel(m_xFilterFrame->weld_label_widget())
{
- m_xEdFilterArea->SetReferences(this, m_xFilterLabel.get());
+ m_xEdFilterArea->SetReferences(this, m_xFilterFrame.get());
m_xRbFilterArea->SetReferences(this, m_xEdFilterArea.get());
m_xEdCopyArea->SetReferences(this, m_xFtDbAreaLabel.get());
m_xRbCopyArea->SetReferences(this, m_xEdCopyArea.get());
diff --git a/sc/source/ui/dbgui/sortdlg.cxx b/sc/source/ui/dbgui/sortdlg.cxx
index c2ecda133e0d..5683d4f64a76 100644
--- a/sc/source/ui/dbgui/sortdlg.cxx
+++ b/sc/source/ui/dbgui/sortdlg.cxx
@@ -24,11 +24,15 @@
#include <sortdlg.hxx>
#include <unotools/viewoptions.hxx>
+#include <vcl/tabs.hrc>
+
ScSortDlg::ScSortDlg(weld::Window* pParent, const SfxItemSet* pArgSet)
: SfxTabDialogController(pParent, u"modules/scalc/ui/sortdialog.ui"_ustr, u"SortDialog"_ustr, pArgSet)
{
- AddTabPage(u"criteria"_ustr, ScTabPageSortFields::Create, nullptr);
- AddTabPage(u"options"_ustr, ScTabPageSortOptions::Create, nullptr);
+ AddTabPage(u"criteria"_ustr, TabResId(RID_TAB_SORT.aLabel), ScTabPageSortFields::Create,
+ RID_L + RID_TAB_SORT.sIconName);
+ AddTabPage(u"options"_ustr, TabResId(RID_TAB_SORTOPTIONS.aLabel), ScTabPageSortOptions::Create,
+ RID_L + RID_TAB_SORTOPTIONS.sIconName);
// restore dialog size
SvtViewOptions aDlgOpt(EViewType::Dialog, u"SortDialog"_ustr);
diff --git a/sc/source/ui/dbgui/sortkeydlg.cxx b/sc/source/ui/dbgui/sortkeydlg.cxx
index c4c4e72d6b22..02051d847ffa 100644
--- a/sc/source/ui/dbgui/sortkeydlg.cxx
+++ b/sc/source/ui/dbgui/sortkeydlg.cxx
@@ -15,7 +15,7 @@
#include <scresid.hxx>
#include <strings.hrc>
-ScSortKeyItem::ScSortKeyItem(weld::Container* pParent)
+ScSortKeyItem::ScSortKeyItem(weld::Box* pParent)
: m_xBuilder(Application::CreateBuilder(pParent, u"modules/scalc/ui/sortkey.ui"_ustr))
, m_xFrame(m_xBuilder->weld_frame(u"SortKeyFrame"_ustr))
, m_xLbSort(m_xBuilder->weld_combo_box(u"sortlb"_ustr))
@@ -47,7 +47,7 @@ void ScSortKeyItem::EnableField()
m_xFrame->set_sensitive(true);
}
-ScSortKeyWindow::ScSortKeyWindow(weld::Container* pBox)
+ScSortKeyWindow::ScSortKeyWindow(weld::Box* pBox)
: m_pBox(pBox)
{
}
diff --git a/sc/source/ui/dbgui/subtdlg.cxx b/sc/source/ui/dbgui/subtdlg.cxx
index b549e5c2f33b..99699f5134c3 100644
--- a/sc/source/ui/dbgui/subtdlg.cxx
+++ b/sc/source/ui/dbgui/subtdlg.cxx
@@ -23,15 +23,21 @@
#include <subtdlg.hxx>
#include <scui_def.hxx>
+#include <vcl/tabs.hrc>
+
ScSubTotalDlg::ScSubTotalDlg(weld::Window* pParent, const SfxItemSet& rArgSet)
: SfxTabDialogController(pParent, u"modules/scalc/ui/subtotaldialog.ui"_ustr, u"SubTotalDialog"_ustr, &rArgSet)
, m_xBtnRemove(m_xBuilder->weld_button(u"remove"_ustr))
{
- AddTabPage(u"1stgroup"_ustr, ScTpSubTotalGroup1::Create, nullptr);
- AddTabPage(u"2ndgroup"_ustr, ScTpSubTotalGroup2::Create, nullptr);
- AddTabPage(u"3rdgroup"_ustr, ScTpSubTotalGroup3::Create, nullptr);
- AddTabPage(u"options"_ustr, ScTpSubTotalOptions::Create, nullptr);
- m_xBtnRemove->connect_clicked( LINK( this, ScSubTotalDlg, RemoveHdl ) );
+ AddTabPage(u"1stgroup"_ustr, TabResId(RID_TAB_SUBTOTAL_1ST.aLabel), ScTpSubTotalGroup1::Create,
+ RID_L + RID_TAB_SUBTOTAL_1ST.sIconName);
+ AddTabPage(u"2ndgroup"_ustr, TabResId(RID_TAB_SUBTOTAL_2ND.aLabel), ScTpSubTotalGroup2::Create,
+ RID_L + RID_TAB_SUBTOTAL_2ND.sIconName);
+ AddTabPage(u"3rdgroup"_ustr, TabResId(RID_TAB_SUBTOTAL_3RD.aLabel), ScTpSubTotalGroup3::Create,
+ RID_L + RID_TAB_SUBTOTAL_3RD.sIconName);
+ AddTabPage(u"options"_ustr, TabResId(RID_TAB_SUBTOTAL_OPTIONS.aLabel),
+ ScTpSubTotalOptions::Create, RID_L + RID_TAB_SUBTOTAL_OPTIONS.sIconName);
+ m_xBtnRemove->connect_clicked(LINK(this, ScSubTotalDlg, RemoveHdl));
}
ScSubTotalDlg::~ScSubTotalDlg()
diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 44b3e020e726..df4c2aaddbcf 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -91,7 +91,7 @@ ScTabPageSortFields::ScTabPageSortFields(weld::Container* pPage, weld::DialogCon
, m_xBtnTopDown(m_xBuilder->weld_radio_button(u"rbTopDown"_ustr))
, m_xBtnLeftRight(m_xBuilder->weld_radio_button(u"rbLeftRight"_ustr))
, m_xScrolledWindow(m_xBuilder->weld_scrolled_window(u"SortCriteriaPage"_ustr))
- , m_xBox(m_xBuilder->weld_container(u"SortKeyWindow"_ustr))
+ , m_xBox(m_xBuilder->weld_box(u"SortKeyWindow"_ustr))
, m_aSortWin(m_xBox.get())
{
// tdf#147722 set some nominal small default height so the height adapts
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index bacbe29e3af3..57f8934fa477 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -45,6 +45,8 @@
#include <reffact.hxx>
#include <comphelper/lok.hxx>
+#include <vcl/tabs.hrc>
+
/* Position indexes for "Allow" list box.
They do not map directly to ScValidationMode and can safely be modified to
change the order of the list box entries. */
@@ -96,9 +98,12 @@ ScValidationDlg::ScValidationDlg(weld::Window* pParent, const SfxItemSet* pArgSe
, m_bRefInputting(false)
, m_xHBox(m_xBuilder->weld_container(u"refinputbox"_ustr))
{
- AddTabPage(m_sValuePageId, ScTPValidationValue::Create, nullptr);
- AddTabPage(u"inputhelp"_ustr, ScTPValidationHelp::Create, nullptr);
- AddTabPage(u"erroralert"_ustr, ScTPValidationError::Create, nullptr);
+ AddTabPage(m_sValuePageId, TabResId(RID_TAB_VALIDITY_CRITERIA.aLabel),
+ ScTPValidationValue::Create, RID_L + RID_TAB_VALIDITY_CRITERIA.sIconName);
+ AddTabPage(u"inputhelp"_ustr, TabResId(RID_TAB_VALIDITY_INPUT.aLabel),
+ ScTPValidationHelp::Create, RID_L + RID_TAB_VALIDITY_INPUT.sIconName);
+ AddTabPage(u"erroralert"_ustr, TabResId(RID_TAB_VALIDITY_ERROR.aLabel),
+ ScTPValidationError::Create, RID_L + RID_TAB_VALIDITY_ERROR.sIconName);
if (isLOKMobilePhone())
{
@@ -377,7 +382,7 @@ ScTPValidationValue::ScTPValidationValue(weld::Container* pPage, weld::DialogCon
, m_xEdMax(new formula::RefEdit(m_xBuilder->weld_entry(u"max"_ustr)))
, m_xFtHint(m_xBuilder->weld_label(u"hintft"_ustr))
, m_xBtnRef(new formula::RefButton(m_xBuilder->weld_button(u"validref"_ustr)))
- , m_xRefGrid(m_xBuilder->weld_container(u"refgrid"_ustr))
+ , m_xRefGrid(m_xBuilder->weld_grid(u"refgrid"_ustr))
, m_pRefEditParent(m_xRefGrid.get())
, m_pBtnRefParent(m_xRefGrid.get())
{
@@ -598,7 +603,7 @@ void ScTPValidationValue::RemoveRefDlg(bool bRestoreModal)
pValidationDlg->SetRefInputDonePostHdl( nullptr );
if( m_pRefEdit )
- m_pRefEdit->SetReferences( nullptr, nullptr );
+ m_pRefEdit->SetReferences(nullptr);
m_pRefEdit = nullptr;
m_xBtnRef->SetReferences( nullptr, nullptr );
diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx
index 29360ad4956d..95f7f04d3f02 100644
--- a/sc/source/ui/docshell/arealink.cxx
+++ b/sc/source/ui/docshell/arealink.cxx
@@ -389,8 +389,8 @@ bool ScAreaLink::Refresh( const OUString& rNewFile, const OUString& rNewFilter,
//! ResetAttrib at document !!!
ScPatternAttr aPattern( rSrcDoc.getCellAttributeHelper() );
- aPattern.GetItemSet().Put( ScMergeAttr() ); // Defaults
- aPattern.GetItemSet().Put( ScMergeFlagAttr() );
+ aPattern.ItemSetPut(ScMergeAttr()); // Defaults
+ aPattern.ItemSetPut(ScMergeFlagAttr());
aClipDoc.ApplyPatternAreaTab( 0,0, rDoc.MaxCol(),rDoc.MaxRow(), nSrcTab, aPattern );
}
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index 760d3f1d08e1..e7a57cfaba67 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -1415,7 +1415,7 @@ bool ScDBDocFunc::RemovePivotTable(const ScDPObject& rDPObj, bool bRecord, bool
{
// If we come from GUI - ask to delete the associated pivot charts too...
std::vector<SdrOle2Obj*> aListOfObjects =
- sc::tools::getAllPivotChartsConnectedTo(rDPObj.GetName(), rDocShell);
+ sctools::getAllPivotChartsConnectedTo(rDPObj.GetName(), rDocShell);
ScDrawLayer* pModel = rDoc.GetDrawLayer();
diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx
index 75a207b615c5..64ea51194d58 100644
--- a/sc/source/ui/docshell/dbdocimp.cxx
+++ b/sc/source/ui/docshell/dbdocimp.cxx
@@ -453,7 +453,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
if (rDoc.IsTabProtected(nTab))
{
ScPatternAttr aPattern(pImportDoc->getCellAttributeHelper());
- aPattern.GetItemSet().Put( ScProtectionAttr( false,false,false,false ) );
+ aPattern.ItemSetPut(ScProtectionAttr(false,false,false,false));
pImportDoc->ApplyPatternAreaTab( 0,0,rDoc.MaxCol(),rDoc.MaxRow(), nTab, aPattern );
}
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 1aed6cc9ae4a..756d36beb7bf 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -115,7 +115,6 @@
#include <sfx2/viewfrm.hxx>
using namespace com::sun::star;
-using ::std::vector;
#define AUTOFORMAT_WARN_SIZE 0x10ffffUL
@@ -546,11 +545,11 @@ bool ScDocFunc::DetectiveRefresh( bool bAutomatic )
}
static void lcl_collectAllPredOrSuccRanges(
- const ScRangeList& rSrcRanges, vector<ScTokenRef>& rRefTokens, ScDocShell& rDocShell,
+ const ScRangeList& rSrcRanges, std::vector<ScTokenRef>& rRefTokens, ScDocShell& rDocShell,
bool bPred)
{
ScDocument& rDoc = rDocShell.GetDocument();
- vector<ScTokenRef> aRefTokens;
+ std::vector<ScTokenRef> aRefTokens;
if (rSrcRanges.empty())
return;
ScRange const & rFrontRange = rSrcRanges.front();
@@ -571,12 +570,12 @@ static void lcl_collectAllPredOrSuccRanges(
rRefTokens.swap(aRefTokens);
}
-void ScDocFunc::DetectiveCollectAllPreds(const ScRangeList& rSrcRanges, vector<ScTokenRef>& rRefTokens)
+void ScDocFunc::DetectiveCollectAllPreds(const ScRangeList& rSrcRanges, std::vector<ScTokenRef>& rRefTokens)
{
lcl_collectAllPredOrSuccRanges(rSrcRanges, rRefTokens, rDocShell, true);
}
-void ScDocFunc::DetectiveCollectAllSuccs(const ScRangeList& rSrcRanges, vector<ScTokenRef>& rRefTokens)
+void ScDocFunc::DetectiveCollectAllSuccs(const ScRangeList& rSrcRanges, std::vector<ScTokenRef>& rRefTokens)
{
lcl_collectAllPredOrSuccRanges(rSrcRanges, rRefTokens, rDocShell, false);
}
@@ -1249,7 +1248,7 @@ void ScDocFunc::PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine,
ScPatternAttr aPattern(rDoc.getCellAttributeHelper());
aPattern.GetFromEditItemSet( &rEditAttr );
aPattern.DeleteUnchanged( rDoc.GetPattern( rPos.Col(), rPos.Row(), rPos.Tab() ) );
- aPattern.GetItemSet().ClearItem( ATTR_HOR_JUSTIFY ); // wasn't removed above if no edit object
+ aPattern.ItemSetClearItem(ATTR_HOR_JUSTIFY); // wasn't removed above if no edit object
if ( aPattern.GetItemSet().Count() > 0 )
{
ScMarkData aMark(rDoc.GetSheetLimits());
@@ -2440,7 +2439,7 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
//Issue 8302 want to be able to insert into the middle of merged cells
//the patch comes from maoyg
- ::std::vector<ScRange> qDecreaseRange;
+ std::vector<ScRange> qDecreaseRange;
bool bDeletingMerge = false;
OUString aUndo = ScResId( STR_UNDO_DELETECELLS );
if (bRecord)
@@ -2794,7 +2793,7 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
// not only for whole columns/rows
ScPatternAttr aPattern(rDoc.getCellAttributeHelper());
- aPattern.GetItemSet().Put( ScMergeFlagAttr() );
+ aPattern.ItemSetPut(ScMergeFlagAttr());
rDoc.ApplyPatternArea( nExtendStartCol, nExtendStartRow, nMergeTestEndCol, nMergeTestEndRow, aMark, aPattern );
@@ -3402,7 +3401,7 @@ bool ScDocFunc::DeleteTable( SCTAB nTab, bool bRecord )
{
if (bRecord)
{
- vector<SCTAB> theTabs;
+ std::vector<SCTAB> theTabs;
theTabs.push_back(nTab);
rDocShell.GetUndoManager()->AddUndoAction(
std::make_unique<ScUndoDeleteTab>( rDocShell, theTabs, std::move(pUndoDoc), std::move(pUndoData) ));
@@ -4968,8 +4967,6 @@ bool ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir e
bool ScDocFunc::MergeCells( const ScCellMergeOption& rOption, bool bContents, bool bRecord, bool bApi, bool bEmptyMergedCells /*=false*/ )
{
- using ::std::set;
-
ScDocShellModificator aModificator( rDocShell );
SCCOL nStartCol = rOption.mnStartCol;
@@ -5095,8 +5092,6 @@ bool ScDocFunc::UnmergeCells( const ScRange& rRange, bool bRecord, ScUndoRemoveM
bool ScDocFunc::UnmergeCells( const ScCellMergeOption& rOption, bool bRecord, ScUndoRemoveMerge* pUndoRemoveMerge )
{
- using ::std::set;
-
if (rOption.maTabs.empty())
// Nothing to unmerge.
return true;
@@ -5132,7 +5127,7 @@ bool ScDocFunc::UnmergeCells( const ScCellMergeOption& rOption, bool bRecord, Sc
const SfxPoolItem& rDefAttr = rDoc.GetPool()->GetUserOrPoolDefaultItem( ATTR_MERGE );
ScPatternAttr aPattern(rDoc.getCellAttributeHelper());
- aPattern.GetItemSet().Put( rDefAttr );
+ aPattern.ItemSetPut(rDefAttr);
rDoc.ApplyPatternAreaTab( aRange.aStart.Col(), aRange.aStart.Row(),
aRange.aEnd.Col(), aRange.aEnd.Row(), nTab,
aPattern );
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index c0fe9740f0e0..caaed30794b3 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -153,11 +153,11 @@
#include <svtools/sfxecode.hxx>
#include <unotools/pathoptions.hxx>
+#include <vcl/tabs.hrc>
+
using namespace com::sun::star;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::lang::XMultiServiceFactory;
-using std::shared_ptr;
-using ::std::vector;
// Filter names (like in sclib.cxx)
@@ -1258,7 +1258,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
// Set optimal row height after import?
bool bSetRowHeights = false;
- vector<ScDocRowHeightUpdater::TabRanges> aRecalcRowRangesArray;
+ std::vector<ScDocRowHeightUpdater::TabRanges> aRecalcRowRangesArray;
// All filters need the complete file in one piece (not asynchronously)
// So make sure that we transfer the whole file with CreateFileStream
@@ -3161,7 +3161,8 @@ std::shared_ptr<SfxDocumentInfoDialog> ScDocShell::CreateDocumentInfoDialog(weld
::CreateTabPage ScDocStatPageCreate = pFact->GetTabPageCreatorFunc(SID_SC_TP_STAT);
OSL_ENSURE(ScDocStatPageCreate, "Tabpage create fail!");
xDlg->AddFontTabPage();
- xDlg->AddTabPage(u"calcstats"_ustr, ScResId(STR_DOC_STAT), ScDocStatPageCreate);
+ xDlg->AddTabPage(u"calcstats"_ustr, TabResId(RID_TAB_STATISTICS.aLabel),
+ ScDocStatPageCreate, RID_L + RID_TAB_STATISTICS.sIconName);
}
return xDlg;
}
@@ -3192,7 +3193,7 @@ ScFormatSaveData* ScDocShell::GetFormatSaveData()
namespace {
-void removeKeysIfExists(const Reference<ui::XAcceleratorConfiguration>& xScAccel, const vector<const awt::KeyEvent*>& rKeys)
+void removeKeysIfExists(const Reference<ui::XAcceleratorConfiguration>& xScAccel, const std::vector<const awt::KeyEvent*>& rKeys)
{
for (const awt::KeyEvent* p : rKeys)
{
@@ -3234,7 +3235,7 @@ void ScDocShell::ResetKeyBindings( ScOptionsUtil::KeyBindingType eType )
if (!xScAccel.is())
return;
- vector<const awt::KeyEvent*> aKeys;
+ std::vector<const awt::KeyEvent*> aKeys;
aKeys.reserve(9);
// Backspace key
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 230327f357d3..c70373acc421 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -45,6 +45,8 @@
#include <svx/dataaccessdescriptor.hxx>
#include <svx/drawitem.hxx>
#include <svx/fmshell.hxx>
+#include <svx/pageitem.hxx>
+#include <editeng/sizeitem.hxx>
#include <sfx2/passwd.hxx>
#include <sfx2/filedlghelper.hxx>
#include <sfx2/dispatch.hxx>
@@ -110,6 +112,7 @@
#include <helpids.h>
#include <editeng/eeitem.hxx>
#include <editeng/langitem.hxx>
+#include <editeng/urlfieldhelper.hxx>
#include <officecfg/Office/Common.hxx>
#include <svx/xdef.hxx>
@@ -431,30 +434,24 @@ void ScDocShell::Execute( SfxRequest& rReq )
break;
}
}
- rReq.Ignore();
- break;
}
-
- ScGridWindow* pWin = pViewData->GetActiveWin();
- if ( !pWin )
- {
- rReq.Ignore();
- break;
- }
-
- ScAddress aCell {pViewData->GetCurPos()};
- std::vector<UrlData> vUrls = pWin->GetEditUrls(aCell);
- if (vUrls.empty())
- {
- rReq.Ignore();
- break;
- }
-
- for (UrlData& data : vUrls)
+ else
{
- ScGlobal::OpenURL(data.aUrl, data.aTarget, true);
+ if (ScGridWindow* pWin = pViewData->GetActiveWin())
+ {
+ std::vector<UrlData> vUrls = pWin->GetEditUrls(pViewData->GetCurPos());
+ if (!vUrls.empty())
+ {
+ for (UrlData& data : vUrls)
+ {
+ ScGlobal::OpenURL(data.aUrl, data.aTarget, true);
+ }
+ rReq.Done();
+ break;
+ }
+ }
}
- rReq.Done();
+ rReq.Ignore();
}
break;
case FID_RECALC:
@@ -589,6 +586,67 @@ void ScDocShell::Execute( SfxRequest& rReq )
}
break;
+ case SID_ATTR_PAGE_ORIENTATION: // .uno:Orientation
+ {
+ const SfxBoolItem* pBool = rReq.GetArg<SfxBoolItem>(SID_ATTR_PAGE_ORIENTATION);
+
+ if (!pBool) // nothing supplied -> do nothing
+ {
+ rReq.Done();
+ break;
+ }
+ ScViewData* pViewData = GetViewData();
+ if (!pViewData)
+ break;
+
+ ScDocument& rDoc = GetDocument();
+ const SCTAB nTab = pViewData->GetTabNo();
+
+ // obtain the page-style’s ItemSet
+ OUString aStyleName = rDoc.GetPageStyle(nTab);
+ ScStyleSheetPool* pPagePool = rDoc.GetStyleSheetPool();
+ if (!pPagePool)
+ break;
+ SfxStyleSheetBase* pStyle = pPagePool->Find(aStyleName, SfxStyleFamily::Page);
+ if (!pStyle)
+ break;
+
+ SfxItemSet& rSet = pStyle->GetItemSet();
+
+ const SvxPageItem& rOldPageItem = rSet.Get(ATTR_PAGE);
+ const SvxSizeItem& rOldSizeItem = rSet.Get(ATTR_PAGE_SIZE);
+
+ bool bDesiredLandscape = pBool->GetValue();
+ bool bCurrentLandscape = rOldPageItem.IsLandscape();
+
+ if (bDesiredLandscape == bCurrentLandscape) // already correct
+ {
+ rReq.Done();
+ break;
+ }
+ // apply the change: flip orientation and swap paper size
+ SvxPageItem aNewPageItem(ATTR_PAGE);
+ aNewPageItem.SetLandscape(bDesiredLandscape);
+
+ Size aOld = rOldSizeItem.GetSize();
+ Size aNew(aOld.Height(), aOld.Width()); // swap W/H
+ SvxSizeItem aNewSizeItem(ATTR_PAGE_SIZE, aNew);
+
+ rSet.Put(aNewPageItem);
+ rSet.Put(aNewSizeItem);
+
+ SetDocumentModified();
+ PostPaintGridAll(); // repaint sheet
+
+ if (pBindings) {
+
+ pBindings->Invalidate(SID_ATTR_PAGE_ORIENTATION);
+ pBindings->Invalidate(SID_ATTR_PAGE_SIZE);
+ }
+
+ rReq.Done();
+ }
+ break;
case SID_AUTO_STYLE:
OSL_FAIL("use ScAutoStyleHint instead of SID_AUTO_STYLE");
break;
@@ -2292,6 +2350,54 @@ void ScDocShell::GetState( SfxItemSet &rSet )
}
}
break;
+ case SID_ATTR_PAGE_ORIENTATION:
+ {
+ ScViewData* pViewData = GetViewData();
+ if (pViewData)
+ {
+ ScDocument& rDoc = GetDocument();
+ const SCTAB nTab = pViewData->GetTabNo();
+ OUString aStyleName = rDoc.GetPageStyle(nTab);
+ ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool();
+ if (pStylePool)
+ {
+ SfxStyleSheetBase* pStyleSheet
+ = pStylePool->Find(aStyleName, SfxStyleFamily::Page);
+ if (pStyleSheet)
+ {
+ const SfxItemSet& rStyleSet = pStyleSheet->GetItemSet();
+ rSet.Put(rStyleSet.Get(ATTR_PAGE));
+ }
+ }
+ }
+ }
+ break;
+ case SID_OPEN_HYPERLINK:
+ {
+ ScViewData* pViewData = GetViewData();
+ if (!pViewData)
+ {
+ rSet.DisableItem(nWhich);
+ break;
+ }
+
+ if (ScModule::get()->IsEditMode())
+ {
+ if (EditView* pEditView = pViewData->GetEditView(pViewData->GetActivePart()))
+ if (!URLFieldHelper::IsCursorAtURLField(*pEditView, true))
+ rSet.DisableItem(nWhich);
+ }
+ else
+ {
+ if (ScGridWindow* pWin = pViewData->GetActiveWin())
+ {
+ std::vector<UrlData> vUrls = pWin->GetEditUrls(pViewData->GetCurPos());
+ if (vUrls.empty())
+ rSet.DisableItem(nWhich);
+ }
+ }
+ }
+ break;
case SID_ATTR_CHAR_FONTLIST:
rSet.Put( SvxFontListItem( m_pImpl->pFontList.get(), nWhich ) );
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index ab4cdd7b62cc..5838b8b0f774 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -63,9 +63,6 @@ using com::sun::star::container::XNameContainer;
using com::sun::star::uno::Reference;
using com::sun::star::uno::UNO_QUERY;
-using ::std::unique_ptr;
-using ::std::vector;
-
// former viewfunc/dbfunc methods
void ScDocShell::ErrorMessage(TranslateId pGlobStrId)
@@ -837,12 +834,12 @@ SCTAB ScDocShell::MakeScenario( SCTAB nTab, const OUString& rName, const OUStrin
//! test for filter / buttons / merging
ScPatternAttr aProtPattern(m_pDocument->getCellAttributeHelper());
- aProtPattern.GetItemSet().Put( ScProtectionAttr( true ) );
+ aProtPattern.ItemSetPut(ScProtectionAttr(true));
m_pDocument->ApplyPatternAreaTab( 0,0, m_pDocument->MaxCol(),m_pDocument->MaxRow(), nNewTab, aProtPattern );
ScPatternAttr aPattern(m_pDocument->getCellAttributeHelper());
- aPattern.GetItemSet().Put( ScMergeFlagAttr( ScMF::Scenario ) );
- aPattern.GetItemSet().Put( ScProtectionAttr( true ) );
+ aPattern.ItemSetPut(ScMergeFlagAttr(ScMF::Scenario));
+ aPattern.ItemSetPut(ScProtectionAttr(true));
m_pDocument->ApplySelectionPattern( aPattern, aDestMark );
if (!bCopyAll)
@@ -946,8 +943,8 @@ bool ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, bool bCopy, bool bRec
if (bRecord)
{
- unique_ptr< vector<SCTAB> > pSrcList(new vector<SCTAB>(1, nSrcTab));
- unique_ptr< vector<SCTAB> > pDestList(new vector<SCTAB>(1, nDestTab));
+ std::unique_ptr<std::vector<SCTAB>> pSrcList(new std::vector<SCTAB>(1, nSrcTab));
+ std::unique_ptr<std::vector<SCTAB>> pDestList(new std::vector<SCTAB>(1, nDestTab));
GetUndoManager()->AddUndoAction(
std::make_unique<ScUndoCopyTab>(*this, std::move(pSrcList), std::move(pDestList)));
}
@@ -1010,8 +1007,8 @@ bool ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, bool bCopy, bool bRec
}
else if (bRecord)
{
- unique_ptr< vector<SCTAB> > pSrcList(new vector<SCTAB>(1, nSrcTab));
- unique_ptr< vector<SCTAB> > pDestList(new vector<SCTAB>(1, nDestTab));
+ std::unique_ptr<std::vector<SCTAB>> pSrcList(new std::vector<SCTAB>(1, nSrcTab));
+ std::unique_ptr<std::vector<SCTAB>> pDestList(new std::vector<SCTAB>(1, nDestTab));
GetUndoManager()->AddUndoAction(
std::make_unique<ScUndoMoveTab>(*this, std::move(pSrcList), std::move(pDestList)));
}
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index babab2abb4a6..5535fda0dce1 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -81,7 +81,6 @@
#include <vector>
using namespace com::sun::star;
-using ::std::vector;
#if HAVE_FEATURE_DBCONNECTIVITY
@@ -224,7 +223,7 @@ bool ScDocShell::IsDocument( const INetURLObject& rURL )
#if HAVE_FEATURE_DBCONNECTIVITY
-static void lcl_setScalesToColumns(ScDocument& rDoc, const vector<tools::Long>& rScales)
+static void lcl_setScalesToColumns(ScDocument& rDoc, const std::vector<tools::Long>& rScales)
{
SvNumberFormatter* pFormatter = rDoc.GetFormatTable();
if (!pFormatter)
@@ -263,8 +262,7 @@ static void lcl_setScalesToColumns(ScDocument& rDoc, const vector<tools::Long>&
}
ScPatternAttr aNewAttrs(rDoc.getCellAttributeHelper());
- SfxItemSet& rSet = aNewAttrs.GetItemSet();
- rSet.Put( SfxUInt32Item(ATTR_VALUE_FORMAT, nNewFormat) );
+ aNewAttrs.ItemSetPut(SfxUInt32Item(ATTR_VALUE_FORMAT, nNewFormat));
rDoc.ApplyPatternAreaTab(i, 0, i, rDoc.MaxRow(), 0, aNewAttrs);
}
}
@@ -343,7 +341,7 @@ ErrCode ScDocShell::DBaseImport( const OUString& rFullFileName, rtl_TextEncoding
aProgress.SetState( 0 );
- vector<tools::Long> aScales(nColCount, -1);
+ std::vector<tools::Long> aScales(nColCount, -1);
for (sal_Int32 i=0; i<nColCount; i++)
{
OUString aHeader = xMeta->getColumnLabel( i+1 );
@@ -785,7 +783,7 @@ ErrCodeMsg ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncod
bHasMemo, eCharSet );
// also needed for exception catch
SCROW nDocRow = 0;
- ScFieldEditEngine aEditEngine(m_pDocument.get(), m_pDocument->GetEditTextObjectPool());
+ ScFieldEditEngine aEditEngine(m_pDocument.get(), m_pDocument->GetEditEnginePool());
OUString aString;
try
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index d931e01c5d61..05e5a64219e7 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -69,13 +69,7 @@
#include <memory>
#include <algorithm>
-using ::std::unique_ptr;
using ::com::sun::star::uno::Any;
-using ::std::vector;
-using ::std::find_if;
-using ::std::for_each;
-using ::std::distance;
-using ::std::pair;
using namespace formula;
#define SRCDOC_LIFE_SPAN 30000 // 5 minutes (in 100th of a sec)
@@ -161,7 +155,7 @@ class RemoveFormulaCell
{
public:
explicit RemoveFormulaCell(ScFormulaCell* p) : mpCell(p) {}
- void operator() (pair<const sal_uInt16, ScExternalRefManager::RefCellSet>& r) const
+ void operator() (std::pair<const sal_uInt16, ScExternalRefManager::RefCellSet>& r) const
{
r.second.erase(mpCell);
}
@@ -238,7 +232,7 @@ public:
void removeRangeNamesBySrcDoc(ScRangeName& rRanges, sal_uInt16 nFileId)
{
ScRangeName::const_iterator itr = rRanges.begin(), itrEnd = rRanges.end();
- vector<ScRangeName::const_iterator> v;
+ std::vector<ScRangeName::const_iterator> v;
for (; itr != itrEnd; ++itr)
{
if (hasRefsToSrcDoc(*itr->second, nFileId))
@@ -278,12 +272,11 @@ bool ScExternalRefCache::Table::isReferenced() const
void ScExternalRefCache::Table::setCell(SCCOL nCol, SCROW nRow, TokenRef const & pToken, sal_uLong nFmtIndex, bool bSetCacheRange)
{
- using ::std::pair;
RowsDataType::iterator itrRow = maRows.find(nRow);
if (itrRow == maRows.end())
{
// This row does not exist yet.
- pair<RowsDataType::iterator, bool> res = maRows.emplace(
+ std::pair<RowsDataType::iterator, bool> res = maRows.emplace(
nRow, RowDataType());
if (!res.second)
@@ -334,33 +327,33 @@ bool ScExternalRefCache::Table::hasRow( SCROW nRow ) const
}
template< typename P >
-void ScExternalRefCache::Table::getAllRows(vector<SCROW>& rRows, P predicate) const
+void ScExternalRefCache::Table::getAllRows(std::vector<SCROW>& rRows, P predicate) const
{
- vector<SCROW> aRows;
+ std::vector<SCROW> aRows;
aRows.reserve(maRows.size());
for (const auto& rEntry : maRows)
if (predicate(rEntry))
aRows.push_back(rEntry.first);
// hash map is not ordered, so we need to explicitly sort it.
- ::std::sort(aRows.begin(), aRows.end());
+ std::sort(aRows.begin(), aRows.end());
rRows.swap(aRows);
}
-void ScExternalRefCache::Table::getAllRows(vector<SCROW>& rRows, SCROW nLow, SCROW nHigh) const
+void ScExternalRefCache::Table::getAllRows(std::vector<SCROW>& rRows, SCROW nLow, SCROW nHigh) const
{
getAllRows(rRows,
[nLow, nHigh](std::pair<SCROW, RowDataType> rEntry) { return (nLow <= rEntry.first && rEntry.first <= nHigh); });
}
-void ScExternalRefCache::Table::getAllRows(vector<SCROW>& rRows) const
+void ScExternalRefCache::Table::getAllRows(std::vector<SCROW>& rRows) const
{
getAllRows(rRows, [](std::pair<SCROW, RowDataType>) { return true; } );
}
-::std::pair< SCROW, SCROW > ScExternalRefCache::Table::getRowRange() const
+std::pair< SCROW, SCROW > ScExternalRefCache::Table::getRowRange() const
{
- ::std::pair< SCROW, SCROW > aRange( 0, 0 );
+ std::pair< SCROW, SCROW > aRange( 0, 0 );
if( !maRows.empty() )
{
// iterate over entire container (hash map is not sorted by key)
@@ -373,7 +366,7 @@ void ScExternalRefCache::Table::getAllRows(vector<SCROW>& rRows) const
}
template< typename P >
-void ScExternalRefCache::Table::getAllCols(SCROW nRow, vector<SCCOL>& rCols, P predicate) const
+void ScExternalRefCache::Table::getAllCols(SCROW nRow, std::vector<SCCOL>& rCols, P predicate) const
{
RowsDataType::const_iterator itrRow = maRows.find(nRow);
if (itrRow == maRows.end())
@@ -381,31 +374,31 @@ void ScExternalRefCache::Table::getAllCols(SCROW nRow, vector<SCCOL>& rCols, P p
return;
const RowDataType& rRowData = itrRow->second;
- vector<SCCOL> aCols;
+ std::vector<SCCOL> aCols;
aCols.reserve(rRowData.size());
for (const auto& rCol : rRowData)
if (predicate(rCol))
aCols.push_back(rCol.first);
// hash map is not ordered, so we need to explicitly sort it.
- ::std::sort(aCols.begin(), aCols.end());
+ std::sort(aCols.begin(), aCols.end());
rCols.swap(aCols);
}
-void ScExternalRefCache::Table::getAllCols(SCROW nRow, vector<SCCOL>& rCols, SCCOL nLow, SCCOL nHigh) const
+void ScExternalRefCache::Table::getAllCols(SCROW nRow, std::vector<SCCOL>& rCols, SCCOL nLow, SCCOL nHigh) const
{
getAllCols(nRow, rCols,
[nLow, nHigh](std::pair<SCCOL, Cell> rCol) { return nLow <= rCol.first && rCol.first <= nHigh; } );
}
-void ScExternalRefCache::Table::getAllCols(SCROW nRow, vector<SCCOL>& rCols) const
+void ScExternalRefCache::Table::getAllCols(SCROW nRow, std::vector<SCCOL>& rCols) const
{
getAllCols(nRow, rCols, [](std::pair<SCCOL, Cell>) { return true; } );
}
-::std::pair< SCCOL, SCCOL > ScExternalRefCache::Table::getColRange( SCROW nRow ) const
+std::pair< SCCOL, SCCOL > ScExternalRefCache::Table::getColRange( SCROW nRow ) const
{
- ::std::pair< SCCOL, SCCOL > aRange( 0, 0 );
+ std::pair< SCCOL, SCCOL > aRange( 0, 0 );
RowsDataType::const_iterator itrRow = maRows.find( nRow );
if (itrRow == maRows.end())
@@ -424,7 +417,7 @@ void ScExternalRefCache::Table::getAllCols(SCROW nRow, vector<SCCOL>& rCols) con
return aRange;
}
-void ScExternalRefCache::Table::getAllNumberFormats(vector<sal_uInt32>& rNumFmts) const
+void ScExternalRefCache::Table::getAllNumberFormats(std::vector<sal_uInt32>& rNumFmts) const
{
for (const auto& rRow : maRows)
{
@@ -625,7 +618,7 @@ ScExternalRefCache::TokenArrayRef ScExternalRefCache::getCellRangeData(
ScMatrixRef xMat = new ScMatrix( nMatrixColumns, nMatrixRows);
// Needed in shrink and fill.
- vector<SCROW> aRows;
+ std::vector<SCROW> aRows;
pTab->getAllRows(aRows, nDataRow1, nDataRow2);
bool bFill = true;
@@ -656,7 +649,7 @@ ScExternalRefCache::TokenArrayRef ScExternalRefCache::getCellRangeData(
SCCOL nMaxCol = std::numeric_limits<SCCOL>::min();
for (const auto& rRow : aRows)
{
- vector<SCCOL> aCols;
+ std::vector<SCCOL> aCols;
pTab->getAllCols(rRow, aCols, nDataCol1, nDataCol2);
if (!aCols.empty())
{
@@ -687,7 +680,7 @@ ScExternalRefCache::TokenArrayRef ScExternalRefCache::getCellRangeData(
// Only fill non-empty cells, for better performance.
for (SCROW nRow : aRows)
{
- vector<SCCOL> aCols;
+ std::vector<SCCOL> aCols;
pTab->getAllCols(nRow, aCols, nDataCol1, nDataCol2);
for (SCCOL nCol : aCols)
{
@@ -797,7 +790,6 @@ void ScExternalRefCache::setCellData(sal_uInt16 nFileId, const OUString& rTabNam
if (!isDocInitialized(nFileId))
return;
- using ::std::pair;
DocItem* pDocItem = getDocItem(nFileId);
if (!pDocItem)
return;
@@ -818,10 +810,9 @@ void ScExternalRefCache::setCellData(sal_uInt16 nFileId, const OUString& rTabNam
pTableData->setCachedCell(nCol, nRow);
}
-void ScExternalRefCache::setCellRangeData(sal_uInt16 nFileId, const ScRange& rRange, const vector<SingleRangeData>& rData,
+void ScExternalRefCache::setCellRangeData(sal_uInt16 nFileId, const ScRange& rRange, const std::vector<SingleRangeData>& rData,
const TokenArrayRef& pArray)
{
- using ::std::pair;
if (rData.empty() || !isDocInitialized(nFileId))
// nothing to cache
return;
@@ -942,7 +933,7 @@ OUString getFirstSheetName()
}
}
-void ScExternalRefCache::initializeDoc(sal_uInt16 nFileId, const vector<OUString>& rTabNames,
+void ScExternalRefCache::initializeDoc(sal_uInt16 nFileId, const std::vector<OUString>& rTabNames,
const OUString& rBaseName)
{
DocItem* pDoc = getDocItem(nFileId);
@@ -954,7 +945,7 @@ void ScExternalRefCache::initializeDoc(sal_uInt16 nFileId, const vector<OUString
// table name list - the list must include all table names in the source
// document and only to be populated when loading the source document, not
// when loading cached data from, say, Excel XCT/CRN records.
- vector<TableName> aNewTabNames;
+ std::vector<TableName> aNewTabNames;
aNewTabNames.reserve(n);
for (const auto& rTabName : rTabNames)
{
@@ -965,7 +956,7 @@ void ScExternalRefCache::initializeDoc(sal_uInt16 nFileId, const vector<OUString
// data tables - preserve any existing data that may have been set during
// file import.
- vector<TableTypeRef> aNewTables(n);
+ std::vector<TableTypeRef> aNewTables(n);
for (size_t i = 0; i < n; ++i)
{
size_t nIndex;
@@ -1066,7 +1057,7 @@ OUString ScExternalRefCache::getTableName(sal_uInt16 nFileId, size_t nCacheId) c
return OUString();
}
-void ScExternalRefCache::getAllTableNames(sal_uInt16 nFileId, vector<OUString>& rTabNames) const
+void ScExternalRefCache::getAllTableNames(sal_uInt16 nFileId, std::vector<OUString>& rTabNames) const
{
rTabNames.clear();
DocItem* pDoc = getDocItem(nFileId);
@@ -1085,35 +1076,29 @@ SCTAB ScExternalRefCache::getTabSpan( sal_uInt16 nFileId, const OUString& rStart
if (!pDoc)
return -1;
- vector<TableName>::const_iterator itrBeg = pDoc->maTableNames.begin();
- vector<TableName>::const_iterator itrEnd = pDoc->maTableNames.end();
+ auto itrBeg = pDoc->maTableNames.begin();
+ auto itrEnd = pDoc->maTableNames.end();
- vector<TableName>::const_iterator itrStartTab = ::std::find_if( itrBeg, itrEnd,
- TabNameSearchPredicate( rStartTabName));
+ auto itrStartTab = std::find_if( itrBeg, itrEnd, TabNameSearchPredicate( rStartTabName));
if (itrStartTab == itrEnd)
return -1;
- vector<TableName>::const_iterator itrEndTab = ::std::find_if( itrBeg, itrEnd,
- TabNameSearchPredicate( rEndTabName));
+ auto itrEndTab = std::find_if( itrBeg, itrEnd, TabNameSearchPredicate( rEndTabName));
if (itrEndTab == itrEnd)
return 0;
- size_t nStartDist = ::std::distance( itrBeg, itrStartTab);
- size_t nEndDist = ::std::distance( itrBeg, itrEndTab);
+ size_t nStartDist = std::distance( itrBeg, itrStartTab);
+ size_t nEndDist = std::distance( itrBeg, itrEndTab);
return nStartDist <= nEndDist ? static_cast<SCTAB>(nEndDist - nStartDist + 1) : -static_cast<SCTAB>(nStartDist - nEndDist + 1);
}
-void ScExternalRefCache::getAllNumberFormats(vector<sal_uInt32>& rNumFmts) const
+void ScExternalRefCache::getAllNumberFormats(std::vector<sal_uInt32>& rNumFmts) const
{
std::unique_lock aGuard(maMtxDocs);
-
- using ::std::sort;
- using ::std::unique;
-
- vector<sal_uInt32> aNumFmts;
+ std::vector<sal_uInt32> aNumFmts;
for (const auto& rEntry : maDocs)
{
- const vector<TableTypeRef>& rTables = rEntry.second.maTables;
+ const std::vector<TableTypeRef>& rTables = rEntry.second.maTables;
for (const TableTypeRef& pTab : rTables)
{
if (!pTab)
@@ -1124,8 +1109,8 @@ void ScExternalRefCache::getAllNumberFormats(vector<sal_uInt32>& rNumFmts) const
}
// remove duplicates.
- sort(aNumFmts.begin(), aNumFmts.end());
- aNumFmts.erase(unique(aNumFmts.begin(), aNumFmts.end()), aNumFmts.end());
+ std::sort(aNumFmts.begin(), aNumFmts.end());
+ aNumFmts.erase(std::unique(aNumFmts.begin(), aNumFmts.end()), aNumFmts.end());
rNumFmts.swap(aNumFmts);
}
@@ -1224,7 +1209,7 @@ void ScExternalRefCache::addCacheTableToReferenced( sal_uInt16 nFileId, size_t n
if (nFileId >= maReferenced.maDocs.size())
return;
- ::std::vector<bool> & rTables = maReferenced.maDocs[nFileId].maTables;
+ std::vector<bool> & rTables = maReferenced.maDocs[nFileId].maTables;
size_t nTables = rTables.size();
if (nIndex >= nTables)
return;
@@ -1250,7 +1235,7 @@ void ScExternalRefCache::addCacheDocToReferenced( sal_uInt16 nFileId )
if (!maReferenced.maDocs[nFileId].mbAllTablesReferenced)
{
- ::std::vector<bool> & rTables = maReferenced.maDocs[nFileId].maTables;
+ std::vector<bool> & rTables = maReferenced.maDocs[nFileId].maTables;
size_t nSize = rTables.size();
for (size_t i=0; i < nSize; ++i)
rTables[i] = true;
@@ -1427,13 +1412,11 @@ ScExternalRefCache::DocItem* ScExternalRefCache::getDocItem(sal_uInt16 nFileId)
ScExternalRefCache::DocItem* ScExternalRefCache::getDocItem(std::unique_lock<std::mutex>& /*rGuard*/, sal_uInt16 nFileId) const
{
-
- using ::std::pair;
DocDataType::iterator itrDoc = maDocs.find(nFileId);
if (itrDoc == maDocs.end())
{
// specified document is not cached.
- pair<DocDataType::iterator, bool> res = maDocs.emplace(
+ std::pair<DocDataType::iterator, bool> res = maDocs.emplace(
nFileId, DocItem());
if (!res.second)
@@ -1556,7 +1539,7 @@ static FormulaToken* convertToToken( ScDocument& rHostDoc, const ScDocument& rSr
}
static std::unique_ptr<ScTokenArray> convertToTokenArray(
- ScDocument& rHostDoc, const ScDocument& rSrcDoc, ScRange& rRange, vector<ScExternalRefCache::SingleRangeData>& rCacheData )
+ ScDocument& rHostDoc, const ScDocument& rSrcDoc, ScRange& rRange, std::vector<ScExternalRefCache::SingleRangeData>& rCacheData )
{
ScAddress& s = rRange.aStart;
ScAddress& e = rRange.aEnd;
@@ -1575,9 +1558,9 @@ static std::unique_ptr<ScTokenArray> convertToTokenArray(
std::unique_ptr<ScRange> pUsedRange;
- unique_ptr<ScTokenArray> pArray(new ScTokenArray(rSrcDoc));
+ std::unique_ptr<ScTokenArray> pArray(new ScTokenArray(rSrcDoc));
bool bFirstTab = true;
- vector<ScExternalRefCache::SingleRangeData>::iterator
+ std::vector<ScExternalRefCache::SingleRangeData>::iterator
itrCache = rCacheData.begin(), itrCacheEnd = rCacheData.end();
for (SCTAB nTab = nTab1; nTab <= nTab2 && itrCache != itrCacheEnd; ++nTab, ++itrCache)
@@ -1657,7 +1640,7 @@ static std::unique_ptr<ScTokenArray> lcl_fillEmptyMatrix(const ScDocument& rDoc,
ScMatrixRef xMat = new ScMatrix(nC, nR);
ScMatrixToken aToken(std::move(xMat));
- unique_ptr<ScTokenArray> pArray(new ScTokenArray(rDoc));
+ std::unique_ptr<ScTokenArray> pArray(new ScTokenArray(rDoc));
pArray->AddToken(aToken);
return pArray;
}
@@ -1728,7 +1711,7 @@ ScExternalRefManager::ApiGuard::~ApiGuard()
mpMgr->mbUserInteractionEnabled = mbOldInteractionEnabled;
}
-void ScExternalRefManager::getAllCachedTableNames(sal_uInt16 nFileId, vector<OUString>& rTabNames) const
+void ScExternalRefManager::getAllCachedTableNames(sal_uInt16 nFileId, std::vector<OUString>& rTabNames) const
{
maRefCache.getAllTableNames(nFileId, rTabNames);
}
@@ -1738,7 +1721,7 @@ SCTAB ScExternalRefManager::getCachedTabSpan( sal_uInt16 nFileId, const OUString
return maRefCache.getTabSpan( nFileId, rStartTabName, rEndTabName);
}
-void ScExternalRefManager::getAllCachedNumberFormats(vector<sal_uInt32>& rNumFmts) const
+void ScExternalRefManager::getAllCachedNumberFormats(std::vector<sal_uInt32>& rNumFmts) const
{
maRefCache.getAllNumberFormats(rNumFmts);
}
@@ -1878,7 +1861,7 @@ void putCellDataIntoCache(
void putRangeDataIntoCache(
ScExternalRefCache& rRefCache, ScExternalRefCache::TokenArrayRef& pArray,
sal_uInt16 nFileId, const OUString& rTabName,
- const vector<ScExternalRefCache::SingleRangeData>& rCacheData,
+ const std::vector<ScExternalRefCache::SingleRangeData>& rCacheData,
const ScRange& rCacheRange, const ScRange& rDataRange)
{
if (pArray)
@@ -1923,7 +1906,7 @@ void initDocInCache(ScExternalRefCache& rRefCache, const ScDocument* pSrcDoc, sa
return;
// Populate the cache with all table names in the source document.
- vector<OUString> aTabNames;
+ std::vector<OUString> aTabNames;
aTabNames.reserve(nTabCount);
for (SCTAB i = 0; i < nTabCount; ++i)
{
@@ -2070,7 +2053,7 @@ ScExternalRefCache::TokenArrayRef ScExternalRefManager::getDoubleRefTokens(
if (pSrcDoc)
{
// Document already loaded in memory.
- vector<ScExternalRefCache::SingleRangeData> aCacheData;
+ std::vector<ScExternalRefCache::SingleRangeData> aCacheData;
ScExternalRefCache::TokenArrayRef pArray =
getDoubleRefTokensFromSrcDoc(*pSrcDoc, rTabName, aDataRange, aCacheData);
@@ -2095,7 +2078,7 @@ ScExternalRefCache::TokenArrayRef ScExternalRefManager::getDoubleRefTokens(
return pArray;
}
- vector<ScExternalRefCache::SingleRangeData> aCacheData;
+ std::vector<ScExternalRefCache::SingleRangeData> aCacheData;
pArray = getDoubleRefTokensFromSrcDoc(*pSrcDoc, rTabName, aDataRange, aCacheData);
// Put the data into cache.
@@ -2233,7 +2216,7 @@ void ScExternalRefManager::insertRefCell(sal_uInt16 nFileId, const ScAddress& rC
if (itr == maRefCells.end())
{
RefCellSet aRefCells;
- pair<RefCellMap::iterator, bool> r = maRefCells.emplace(
+ std::pair<RefCellMap::iterator, bool> r = maRefCells.emplace(
nFileId, aRefCells);
if (!r.second)
// insertion failed.
@@ -2325,7 +2308,7 @@ ScExternalRefCache::TokenRef ScExternalRefManager::getSingleRefTokenFromSrcDoc(
ScExternalRefCache::TokenArrayRef ScExternalRefManager::getDoubleRefTokensFromSrcDoc(
const ScDocument& rSrcDoc, const OUString& rTabName, ScRange& rRange,
- vector<ScExternalRefCache::SingleRangeData>& rCacheData)
+ std::vector<ScExternalRefCache::SingleRangeData>& rCacheData)
{
ScExternalRefCache::TokenArrayRef pArray;
SCTAB nTab1;
@@ -2342,7 +2325,7 @@ ScExternalRefCache::TokenArrayRef ScExternalRefManager::getDoubleRefTokensFromSr
aRange.PutInOrder();
SCTAB nTabSpan = aRange.aEnd.Tab() - aRange.aStart.Tab();
- vector<ScExternalRefCache::SingleRangeData> aCacheData;
+ std::vector<ScExternalRefCache::SingleRangeData> aCacheData;
aCacheData.reserve(nTabSpan+1);
aCacheData.emplace_back();
aCacheData.back().maTableName = ScGlobal::getCharClass().uppercase(rTabName);
@@ -2600,7 +2583,7 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, OUSt
pSet->Put( SfxUInt16Item( SID_UPDATEDOCMODE, css::document::UpdateDocMode::FULL_UPDATE));
}
- unique_ptr<SfxMedium> pMedium(new SfxMedium(aFile, StreamMode::STD_READ,
+ std::unique_ptr<SfxMedium> pMedium(new SfxMedium(aFile, StreamMode::STD_READ,
std::move(pFilter), std::move(pSet)));
if (pMedium->GetErrorIgnoreWarning() != ERRCODE_NONE)
return nullptr;
@@ -2803,8 +2786,8 @@ void ScExternalRefManager::convertToAbsName(OUString& rFile) const
sal_uInt16 ScExternalRefManager::getExternalFileId(const OUString& rFile)
{
- vector<SrcFileData>::const_iterator itrBeg = maSrcFiles.begin(), itrEnd = maSrcFiles.end();
- vector<SrcFileData>::const_iterator itr = find_if(itrBeg, itrEnd, FindSrcFileByName(rFile));
+ auto itrBeg = maSrcFiles.begin(), itrEnd = maSrcFiles.end();
+ auto itr = std::find_if(itrBeg, itrEnd, FindSrcFileByName(rFile));
if (itr != itrEnd)
{
size_t nId = distance(itrBeg, itr);
@@ -3185,7 +3168,7 @@ void ScExternalRefManager::addLinkListener(sal_uInt16 nFileId, LinkListener* pLi
LinkListenerMap::iterator itr = maLinkListeners.find(nFileId);
if (itr == maLinkListeners.end())
{
- pair<LinkListenerMap::iterator, bool> r = maLinkListeners.emplace(
+ std::pair<LinkListenerMap::iterator, bool> r = maLinkListeners.emplace(
nFileId, LinkListeners());
if (!r.second)
{
@@ -3258,7 +3241,7 @@ sal_uInt32 ScExternalRefManager::getMappedNumberFormat(sal_uInt16 nFileId, sal_u
if (itr == maNumFormatMap.end())
{
// Number formatter map is not initialized for this external document.
- pair<NumFmtMap::iterator, bool> r = maNumFormatMap.emplace(
+ std::pair<NumFmtMap::iterator, bool> r = maNumFormatMap.emplace(
nFileId, SvNumberFormatterMergeMap());
if (!r.second)
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 6872b359b6ac..97a25e0d91ae 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -1026,8 +1026,7 @@ static bool lcl_PutString(
// ScDocument::SetTextCell() forces it by ScSetStringParam.
sal_uInt32 nFormat = rDoc.GetFormatTable()->GetStandardFormat(SvNumFormatType::TEXT);
ScPatternAttr aNewAttrs(rDoc.getCellAttributeHelper());
- SfxItemSet& rSet = aNewAttrs.GetItemSet();
- rSet.Put( SfxUInt32Item(ATTR_VALUE_FORMAT, nFormat) );
+ aNewAttrs.ItemSetPut(SfxUInt32Item(ATTR_VALUE_FORMAT, nFormat));
rDoc.ApplyPattern(nCol, nRow, nTab, aNewAttrs);
}
if (ScStringUtil::isMultiline(rStr))
@@ -1678,6 +1677,10 @@ bool ScImportExport::ExtText2Doc( SvStream& rStrm )
bool bIsQuoted = false;
p = ScImportExport::ScanNextFieldFromString( p, aCell,
cStr, pSeps, bMerge, bIsQuoted, bOverflowCell, bRemoveSpace );
+ // some dodgy CSVs have a trailing linefeed in each token, which will
+ // make the code think that we have a multi-line field, which will slow things down a lot.
+ if (aCell.endsWith("\n"))
+ aCell = aCell.copy(0, aCell.getLength()-1);
sal_uInt8 nFmt = SC_COL_STANDARD;
for ( i=nInfoStart; i<nInfoCount; i++ )
diff --git a/sc/source/ui/docshell/macromgr.cxx b/sc/source/ui/docshell/macromgr.cxx
index 001707084e7b..9ea59c47e7f0 100644
--- a/sc/source/ui/docshell/macromgr.cxx
+++ b/sc/source/ui/docshell/macromgr.cxx
@@ -31,8 +31,6 @@
using namespace ::com::sun::star;
using ::com::sun::star::uno::Reference;
-using ::std::vector;
-using ::std::pair;
/**
* A simple container to keep track of cells that depend on basic modules
@@ -47,8 +45,8 @@ public:
ModuleCellMap::iterator itr = maCells.find(rModuleName);
if (itr == maCells.end())
{
- pair<ModuleCellMap::iterator, bool> r = maCells.emplace(
- rModuleName, vector<ScFormulaCell*>());
+ std::pair<ModuleCellMap::iterator, bool> r = maCells.emplace(
+ rModuleName, std::vector<ScFormulaCell*>());
if (!r.second)
// insertion failed.
@@ -67,13 +65,13 @@ public:
}
}
- void getCellsByModule(const OUString& rModuleName, vector<ScFormulaCell*>& rCells)
+ void getCellsByModule(const OUString& rModuleName, std::vector<ScFormulaCell*>& rCells)
{
ModuleCellMap::iterator itr = maCells.find(rModuleName);
if (itr == maCells.end())
return;
- vector<ScFormulaCell*>& rCellList = itr->second;
+ std::vector<ScFormulaCell*>& rCellList = itr->second;
// Remove duplicates.
std::sort(rCellList.begin(), rCellList.end());
@@ -81,12 +79,12 @@ public:
rCellList.erase(last, rCellList.end());
// exception safe copy
- vector<ScFormulaCell*> temp(rCellList);
+ std::vector<ScFormulaCell*> temp(rCellList);
rCells.swap(temp);
}
private:
- typedef std::unordered_map<OUString, vector<ScFormulaCell*>> ModuleCellMap;
+ typedef std::unordered_map<OUString, std::vector<ScFormulaCell*>> ModuleCellMap;
ModuleCellMap maCells;
};
@@ -182,7 +180,7 @@ void ScMacroManager::RemoveDependentCell(const ScFormulaCell* pCell)
void ScMacroManager::BroadcastModuleUpdate(const OUString& aModuleName)
{
- vector<ScFormulaCell*> aCells;
+ std::vector<ScFormulaCell*> aCells;
mpDepTracker->getCellsByModule(aModuleName, aCells);
for (ScFormulaCell* pCell : aCells)
{
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index e466ba00b4f7..000a4ca1a61e 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -286,6 +286,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
ExecuteTextAttrDlg( rReq );
break;
+ case SID_INSERT_HYPERLINK:
case SID_EDIT_HYPERLINK:
if ( pSingleSelectedObj )
rViewData.GetDispatcher().Execute( SID_HYPERLINK_DIALOG );
@@ -352,8 +353,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
VclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateCaptionDialog(pWin ? pWin->GetFrameWeld() : nullptr, pView));
- const WhichRangesContainer aRange = pDlg->GetInputRanges( *aNewAttr.GetPool() );
- SfxItemSet aCombSet( *aNewAttr.GetPool(), aRange );
+ SfxItemSet aCombSet(*aNewAttr.GetPool(), pDlg->GetInputRanges(*aNewAttr.GetPool()));
aCombSet.Put( aNewAttr );
aCombSet.Put( aNewGeoAttr );
pDlg->SetInputSet( &aCombSet );
diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx
index 4bf32a50815d..aa707cfd191a 100644
--- a/sc/source/ui/drawfunc/drawsh2.cxx
+++ b/sc/source/ui/drawfunc/drawsh2.cxx
@@ -224,6 +224,7 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // disable functions
{
// no hyperlink options for a selected group
rSet.DisableItem( SID_EDIT_HYPERLINK );
+ rSet.DisableItem( SID_INSERT_HYPERLINK );
rSet.DisableItem( SID_REMOVE_HYPERLINK );
rSet.DisableItem( SID_OPEN_HYPERLINK );
rSet.DisableItem( SID_COPY_HYPERLINK_LOCATION );
@@ -240,6 +241,10 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // disable functions
rSet.DisableItem( SID_REMOVE_HYPERLINK );
rSet.DisableItem( SID_COPY_HYPERLINK_LOCATION );
}
+ else
+ {
+ rSet.DisableItem( SID_INSERT_HYPERLINK );
+ }
SdrLayerID nLayerID = pObj->GetLayer();
if ( nLayerID != SC_LAYER_INTERN )
bCanRename = true; // #i51351# anything except internal objects can be renamed
@@ -305,6 +310,7 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // disable functions
rSet.DisableItem( SID_ORIGINALSIZE );
rSet.DisableItem( SID_FITCELLSIZE );
rSet.DisableItem( SID_ATTR_TRANSFORM );
+ rSet.DisableItem( SID_INSERT_HYPERLINK );
}
if ( rSet.GetItemState( SID_ENABLE_HYPHENATION ) != SfxItemState::UNKNOWN )
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index 3e1ecfabcc70..fa40da9828c6 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -299,6 +299,10 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq )
}
break;
+ case SID_INSERT_HYPERLINK:
+ mrViewData.GetViewShell()->GetViewFrame().GetDispatcher()->Execute(SID_HYPERLINK_DIALOG);
+ break;
+
case SID_EDIT_HYPERLINK:
{
// Ensure the field is selected first
@@ -403,6 +407,7 @@ void ScDrawTextObjectBar::GetState( SfxItemSet& rSet )
}
if (rSet.GetItemState(SID_OPEN_HYPERLINK) != SfxItemState::UNKNOWN
+ || rSet.GetItemState(SID_INSERT_HYPERLINK) != SfxItemState::UNKNOWN
|| rSet.GetItemState(SID_EDIT_HYPERLINK) != SfxItemState::UNKNOWN
|| rSet.GetItemState(SID_COPY_HYPERLINK_LOCATION) != SfxItemState::UNKNOWN
|| rSet.GetItemState(SID_REMOVE_HYPERLINK) != SfxItemState::UNKNOWN)
@@ -415,6 +420,10 @@ void ScDrawTextObjectBar::GetState( SfxItemSet& rSet )
rSet.DisableItem( SID_COPY_HYPERLINK_LOCATION );
rSet.DisableItem( SID_REMOVE_HYPERLINK );
}
+ else
+ {
+ rSet.DisableItem( SID_INSERT_HYPERLINK );
+ }
}
if( rSet.GetItemState( SID_TRANSLITERATE_HALFWIDTH ) != SfxItemState::UNKNOWN )
diff --git a/sc/source/ui/drawfunc/fuconrec.cxx b/sc/source/ui/drawfunc/fuconrec.cxx
index 1829bccfc969..1b5ab78496ce 100644
--- a/sc/source/ui/drawfunc/fuconrec.cxx
+++ b/sc/source/ui/drawfunc/fuconrec.cxx
@@ -151,6 +151,39 @@ void FuConstRectangle::Activate()
aObjKind = SdrObjKind::Caption;
break;
+ case SID_TOOL_CONNECTOR:
+ case SID_CONNECTOR_ARROWS:
+ case SID_CONNECTOR_ARROW_START:
+ case SID_CONNECTOR_ARROW_END:
+ case SID_CONNECTOR_CIRCLE_START:
+ case SID_CONNECTOR_CIRCLE_END:
+ case SID_CONNECTOR_CIRCLES:
+ case SID_CONNECTOR_LINE:
+ case SID_CONNECTOR_LINE_ARROW_START:
+ case SID_CONNECTOR_LINE_ARROW_END:
+ case SID_CONNECTOR_LINE_ARROWS:
+ case SID_CONNECTOR_LINE_CIRCLE_START:
+ case SID_CONNECTOR_LINE_CIRCLE_END:
+ case SID_CONNECTOR_LINE_CIRCLES:
+ case SID_CONNECTOR_CURVE:
+ case SID_CONNECTOR_CURVE_ARROW_START:
+ case SID_CONNECTOR_CURVE_ARROW_END:
+ case SID_CONNECTOR_CURVE_ARROWS:
+ case SID_CONNECTOR_CURVE_CIRCLE_START:
+ case SID_CONNECTOR_CURVE_CIRCLE_END:
+ case SID_CONNECTOR_CURVE_CIRCLES:
+ case SID_CONNECTOR_LINES:
+ case SID_CONNECTOR_LINES_ARROW_START:
+ case SID_CONNECTOR_LINES_ARROW_END:
+ case SID_CONNECTOR_LINES_ARROWS:
+ case SID_CONNECTOR_LINES_CIRCLE_START:
+ case SID_CONNECTOR_LINES_CIRCLE_END:
+ case SID_CONNECTOR_LINES_CIRCLES:
+ aNewPointer = PointerStyle::DrawConnect;
+ aObjKind = SdrObjKind::Edge;
+ pView->SetEditMode(SdrViewEditMode::Create);
+ break;
+
default:
aNewPointer = PointerStyle::Cross;
aObjKind = SdrObjKind::Rectangle;
@@ -172,6 +205,38 @@ void FuConstRectangle::SetLineEnds(SfxItemSet& rAttr, const SdrObject& rObj, sal
void FuConstRectangle::Deactivate()
{
+ sal_uInt16 nSlotId = aSfxRequest.GetSlot();
+ if( nSlotId == SID_TOOL_CONNECTOR ||
+ nSlotId == SID_CONNECTOR_ARROW_START ||
+ nSlotId == SID_CONNECTOR_ARROW_END ||
+ nSlotId == SID_CONNECTOR_ARROWS ||
+ nSlotId == SID_CONNECTOR_CIRCLE_START ||
+ nSlotId == SID_CONNECTOR_CIRCLE_END ||
+ nSlotId == SID_CONNECTOR_CIRCLES ||
+ nSlotId == SID_CONNECTOR_LINE ||
+ nSlotId == SID_CONNECTOR_LINE_ARROW_START ||
+ nSlotId == SID_CONNECTOR_LINE_ARROW_END ||
+ nSlotId == SID_CONNECTOR_LINE_ARROWS ||
+ nSlotId == SID_CONNECTOR_LINE_CIRCLE_START ||
+ nSlotId == SID_CONNECTOR_LINE_CIRCLE_END ||
+ nSlotId == SID_CONNECTOR_LINE_CIRCLES ||
+ nSlotId == SID_CONNECTOR_CURVE ||
+ nSlotId == SID_CONNECTOR_CURVE_ARROW_START ||
+ nSlotId == SID_CONNECTOR_CURVE_ARROW_END ||
+ nSlotId == SID_CONNECTOR_CURVE_ARROWS ||
+ nSlotId == SID_CONNECTOR_CURVE_CIRCLE_START ||
+ nSlotId == SID_CONNECTOR_CURVE_CIRCLE_END ||
+ nSlotId == SID_CONNECTOR_CURVE_CIRCLES ||
+ nSlotId == SID_CONNECTOR_LINES ||
+ nSlotId == SID_CONNECTOR_LINES_ARROW_START ||
+ nSlotId == SID_CONNECTOR_LINES_ARROW_END ||
+ nSlotId == SID_CONNECTOR_LINES_ARROWS ||
+ nSlotId == SID_CONNECTOR_LINES_CIRCLE_START ||
+ nSlotId == SID_CONNECTOR_LINES_CIRCLE_END ||
+ nSlotId == SID_CONNECTOR_LINES_CIRCLES )
+ {
+ pView->SetEditMode(SdrViewEditMode::Edit);
+ }
FuConstruct::Deactivate();
rViewShell.SetActivePointer( aOldPointer );
}
@@ -263,6 +328,48 @@ rtl::Reference<SdrObject> FuConstRectangle::CreateDefaultObject(const sal_uInt16
break;
}
+ case SID_TOOL_CONNECTOR:
+ case SID_CONNECTOR_ARROW_START:
+ case SID_CONNECTOR_ARROW_END:
+ case SID_CONNECTOR_ARROWS:
+ case SID_CONNECTOR_CIRCLE_START:
+ case SID_CONNECTOR_CIRCLE_END:
+ case SID_CONNECTOR_CIRCLES:
+ case SID_CONNECTOR_LINE:
+ case SID_CONNECTOR_LINE_ARROW_START:
+ case SID_CONNECTOR_LINE_ARROW_END:
+ case SID_CONNECTOR_LINE_ARROWS:
+ case SID_CONNECTOR_LINE_CIRCLE_START:
+ case SID_CONNECTOR_LINE_CIRCLE_END:
+ case SID_CONNECTOR_LINE_CIRCLES:
+ case SID_CONNECTOR_CURVE:
+ case SID_CONNECTOR_CURVE_ARROW_START:
+ case SID_CONNECTOR_CURVE_ARROW_END:
+ case SID_CONNECTOR_CURVE_ARROWS:
+ case SID_CONNECTOR_CURVE_CIRCLE_START:
+ case SID_CONNECTOR_CURVE_CIRCLE_END:
+ case SID_CONNECTOR_CURVE_CIRCLES:
+ case SID_CONNECTOR_LINES:
+ case SID_CONNECTOR_LINES_ARROW_START:
+ case SID_CONNECTOR_LINES_ARROW_END:
+ case SID_CONNECTOR_LINES_ARROWS:
+ case SID_CONNECTOR_LINES_CIRCLE_START:
+ case SID_CONNECTOR_LINES_CIRCLE_END:
+ case SID_CONNECTOR_LINES_CIRCLES:
+ {
+ if( auto pEdgeObj = dynamic_cast< SdrEdgeObj *>( pObj.get() ) )
+ {
+ pEdgeObj->SetTailPoint(false, aStart);
+ pEdgeObj->SetTailPoint(true, aEnd);
+ }
+ else
+ {
+ OSL_FAIL("Object is NO connector object");
+ }
+
+ break;
+ }
+
default:
{
pObj->SetLogicRect(aRect);
diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx
index e352fce10c89..4ca3c2dcf3e4 100644
--- a/sc/source/ui/drawfunc/fudraw.cxx
+++ b/sc/source/ui/drawfunc/fudraw.cxx
@@ -136,6 +136,7 @@ bool FuDraw::MouseButtonDown(const MouseEvent& rMEvt)
bool FuDraw::MouseMove(const MouseEvent& rMEvt)
{
+ pView->GetSfxViewShell()->GetDrawView()->MouseMove(rMEvt, pWindow->GetOutDev());
// evaluate modifiers only if in a drawing layer action
// (don't interfere with keyboard shortcut handling)
if (pView->IsAction())
diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx
index e46a4edd582c..b34ac3113b65 100644
--- a/sc/source/ui/formdlg/dwfunctr.cxx
+++ b/sc/source/ui/formdlg/dwfunctr.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <basctl/basctldllpublic.hxx>
#include <comphelper/string.hxx>
#include <editeng/editview.hxx>
#include <sfx2/viewsh.hxx>
@@ -28,6 +29,8 @@
#include <global.hxx>
#include <scmod.hxx>
+#include <sc.hrc>
+#include <svl/stritem.hxx>
#include <inputhdl.hxx>
#include <tabvwsh.hxx>
#include <funcdesc.hxx>
@@ -49,7 +52,7 @@
#*
#************************************************************************/
-ScFunctionWin::ScFunctionWin(weld::Widget* pParent)
+ScFunctionWin::ScFunctionWin(weld::Widget* pParent, SfxBindings* pBindings)
: PanelLayout(pParent, u"FunctionPanel"_ustr, u"modules/scalc/ui/functionpanel.ui"_ustr)
, xCatBox(m_xBuilder->weld_combo_box(u"category"_ustr))
, xFuncList(m_xBuilder->weld_tree_view(u"funclist"_ustr))
@@ -59,6 +62,7 @@ ScFunctionWin::ScFunctionWin(weld::Widget* pParent)
, xSimilaritySearch(m_xBuilder->weld_check_button(u"similaritysearch"_ustr))
, xFiFuncDesc(m_xBuilder->weld_text_view(u"funcdesc"_ustr))
, m_xSearchString(m_xBuilder->weld_entry(u"search"_ustr))
+ , m_pBindings(pBindings)
, xConfigListener(new comphelper::ConfigurationListener(u"/org.openoffice.Office.Calc/Formula/Syntax"_ustr))
, xConfigChange(std::make_unique<EnglishFunctionNameChange>(xConfigListener, this))
, pFuncDesc(nullptr)
@@ -66,7 +70,6 @@ ScFunctionWin::ScFunctionWin(weld::Widget* pParent)
InitLRUList();
UpdateFavouritesList();
- nArgs=0;
m_aListHelpId = xFuncList->get_help_id();
m_aSearchHelpId = m_xSearchString->get_help_id();
@@ -405,91 +408,27 @@ void ScFunctionWin::DoEnter(bool bDoubleOrEnter)
return;
}
- OUStringBuffer aArgStr;
SfxViewShell* pCurSh = SfxViewShell::Current();
- nArgs=0;
if(!aString.isEmpty())
{
- OUString aFirstArgStr;
- ScModule* pScMod = ScModule::get();
- ScTabViewShell* pViewSh = dynamic_cast<ScTabViewShell*>( pCurSh );
- ScInputHandler* pHdl = pScMod->GetInputHdl( pViewSh );
- if(!pScMod->IsEditMode())
- {
- rtl::Reference<comphelper::ConfigurationListener> xDetectDisposed(xConfigListener);
- pScMod->SetInputMode(SC_INPUT_TABLE);
- // the above call can result in us being disposed
- if (xDetectDisposed->isDisposed())
- return;
- aString = "=" + xFuncList->get_selected_text();
- if (pHdl)
- pHdl->ClearText();
- }
const ScFuncDesc* pDesc =
weld::fromId<const ScFuncDesc*>(xFuncList->get_selected_id());
if (pDesc)
{
pFuncDesc=pDesc;
UpdateLRUList();
- nArgs = pDesc->nArgCount;
- if(nArgs>0)
- {
- // NOTE: Theoretically the first parameter could have the
- // suppress flag as well, but practically it doesn't.
- aFirstArgStr = pDesc->maDefArgNames[0];
- aFirstArgStr = comphelper::string::strip(aFirstArgStr, ' ');
- aFirstArgStr = aFirstArgStr.replaceAll(" ", "_");
- aArgStr = aFirstArgStr;
- if ( nArgs != VAR_ARGS && nArgs != PAIRED_VAR_ARGS )
- { // no VarArgs or Fix plus VarArgs, but not VarArgs only
- sal_uInt16 nFix;
- if (nArgs >= PAIRED_VAR_ARGS)
- nFix = nArgs - PAIRED_VAR_ARGS + 2;
- else if (nArgs >= VAR_ARGS)
- nFix = nArgs - VAR_ARGS + 1;
- else
- nFix = nArgs;
- for ( sal_uInt16 nArg = 1;
- nArg < nFix && !pDesc->pDefArgFlags[nArg].bOptional; nArg++ )
- {
- aArgStr.append("; ");
- OUString sTmp = pDesc->maDefArgNames[nArg];
- sTmp = comphelper::string::strip(sTmp, ' ');
- sTmp = sTmp.replaceAll(" ", "_");
- aArgStr.append(sTmp);
- }
- }
- }
- }
- if (pHdl)
- {
- if (pHdl->GetEditString().isEmpty())
- {
- aString = "=" + xFuncList->get_selected_text();
- }
- EditView *pEdView=pHdl->GetActiveView();
- if(pEdView!=nullptr) // @ needed because of crash during setting a name
- {
- if(nArgs>0)
- {
- pHdl->InsertFunction(aString);
- pEdView->InsertText(aArgStr.makeStringAndClear(),true);
- ESelection aESel=pEdView->GetSelection();
- aESel.end.nIndex = aESel.start.nIndex + aFirstArgStr.getLength();
- pEdView->SetSelection(aESel);
- pHdl->DataChanged();
- }
- else
- {
- aString += "()";
- pEdView->InsertText(aString);
- pHdl->DataChanged();
- }
- }
}
InitLRUList();
}
+
+ const SfxStringItem aFunction(FN_PARAM_1, aString);
+ // -1 when function-id is available, category index otherwise
+ const SfxInt16Item nCategory(FN_PARAM_2, -1);
+ const SfxStringItem aFunctionId(FN_PARAM_3, xFuncList->get_selected_id());
+ GetBindings().GetDispatcher()->ExecuteList(SID_INS_FUNCTION, SfxCallMode::SYNCHRON,
+ { &aFunction, &nCategory, &aFunctionId });
+
if ( pCurSh )
{
vcl::Window* pShellWnd = pCurSh->GetWindow();
diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx
index 826facdf49c7..72e8e064a147 100644
--- a/sc/source/ui/formdlg/formula.cxx
+++ b/sc/source/ui/formdlg/formula.cxx
@@ -59,10 +59,9 @@ using namespace com::sun::star;
ScFormulaDlg::ScFormulaDlg(SfxBindings* pB, SfxChildWindow* pCW,
weld::Window* pParent, const ScViewData& rViewData, const formula::IFunctionManager* _pFunctionMgr)
: formula::FormulaDlg(pB, pCW, pParent, _pFunctionMgr, this)
- , m_aHelper(this,pB)
+ , m_aHelper(this, pB, m_xDialog.get())
, m_pViewShell( nullptr )
{
- m_aHelper.SetDialog(m_xDialog.get());
ScModule* pScMod = ScModule::get();
pScMod->InputEnterHandler();
m_pViewShell = nullptr;
@@ -172,7 +171,6 @@ ScFormulaDlg::ScFormulaDlg(SfxBindings* pB, SfxChildWindow* pCW,
OUString rStrExp = GetMeText();
Update(rStrExp);
-
}
void ScFormulaDlg::notifyChange()
@@ -229,7 +227,12 @@ void ScFormulaDlg::fill()
pScMod->SetRefInputHdl(nullptr);
}
-ScFormulaDlg::~ScFormulaDlg() COVERITY_NOEXCEPT_FALSE
+ScFormulaDlg::~ScFormulaDlg()
+{
+ suppress_fun_call_w_exception(ImplDestroy());
+}
+
+void ScFormulaDlg::ImplDestroy()
{
ScFormEditData* pData = m_pViewShell->GetFormEditData();
diff --git a/sc/source/ui/inc/AccessibleCell.hxx b/sc/source/ui/inc/AccessibleCell.hxx
index bd815da3565f..b6c93a32993a 100644
--- a/sc/source/ui/inc/AccessibleCell.hxx
+++ b/sc/source/ui/inc/AccessibleCell.hxx
@@ -43,7 +43,7 @@ using css::accessibility::AccessibleRelationType;
This base class provides an implementation of the
<code>AccessibleCell</code> service.
*/
-class ScAccessibleCell
+class ScAccessibleCell final
: public ScAccessibleCellBase,
public accessibility::AccessibleStaticTextBase,
public ScAccessibleCellAttributeImpl
diff --git a/sc/source/ui/inc/AccessibleCsvControl.hxx b/sc/source/ui/inc/AccessibleCsvControl.hxx
index 40b2d6bdae1c..870c41c5193d 100644
--- a/sc/source/ui/inc/AccessibleCsvControl.hxx
+++ b/sc/source/ui/inc/AccessibleCsvControl.hxx
@@ -82,7 +82,7 @@ protected:
class ScCsvRuler;
/** Accessible class representing the CSV ruler control. */
-class ScAccessibleCsvRuler : public cppu::ImplInheritanceHelper<ScAccessibleCsvControl,
+class ScAccessibleCsvRuler final : public cppu::ImplInheritanceHelper<ScAccessibleCsvControl,
css::accessibility::XAccessibleText>
{
private:
@@ -208,7 +208,7 @@ class ScCsvGrid;
class ScAccessibleCsvCell;
/** Accessible class representing the CSV grid control. */
-class ScAccessibleCsvGrid
+class ScAccessibleCsvGrid final
: public cppu::ImplInheritanceHelper<ScAccessibleCsvControl,
css::accessibility::XAccessibleTable,
css::accessibility::XAccessibleSelection>
@@ -390,7 +390,7 @@ private:
};
/** Accessible class representing a cell of the CSV grid control. */
-class ScAccessibleCsvCell : public ScAccessibleCsvControl,
+class ScAccessibleCsvCell final : public ScAccessibleCsvControl,
public ::accessibility::AccessibleStaticTextBase
{
protected:
diff --git a/sc/source/ui/inc/AccessibleDocument.hxx b/sc/source/ui/inc/AccessibleDocument.hxx
index 3f2be1c51751..456229e0a80e 100644
--- a/sc/source/ui/inc/AccessibleDocument.hxx
+++ b/sc/source/ui/inc/AccessibleDocument.hxx
@@ -38,7 +38,7 @@ namespace utl
class AccessibleRelationSetHelper;
}
-class ScAccessibleDocument
+class ScAccessibleDocument final
: public cppu::ImplInheritanceHelper<
ScAccessibleDocumentBase, css::accessibility::XAccessibleSelection,
css::accessibility::XAccessibleExtendedAttributes, css::view::XSelectionChangeListener>,
diff --git a/sc/source/ui/inc/AccessibleDocumentPagePreview.hxx b/sc/source/ui/inc/AccessibleDocumentPagePreview.hxx
index cad1b49a80f4..f180713c8d85 100644
--- a/sc/source/ui/inc/AccessibleDocumentPagePreview.hxx
+++ b/sc/source/ui/inc/AccessibleDocumentPagePreview.hxx
@@ -31,7 +31,7 @@ class ScShapeChildren;
class ScAccessiblePreviewTable;
class ScAccessiblePageHeader;
-class ScAccessibleDocumentPagePreview
+class ScAccessibleDocumentPagePreview final
: public ScAccessibleDocumentBase
{
public:
diff --git a/sc/source/ui/inc/AccessibleEditObject.hxx b/sc/source/ui/inc/AccessibleEditObject.hxx
index b996a533b7c0..740fce1b5c20 100644
--- a/sc/source/ui/inc/AccessibleEditObject.hxx
+++ b/sc/source/ui/inc/AccessibleEditObject.hxx
@@ -53,12 +53,12 @@ public:
};
ScAccessibleEditObject(
- const css::uno::Reference<css::accessibility::XAccessible>& rxParent,
+ const rtl::Reference<comphelper::OAccessible>& rpParent,
EditView* pEditView, vcl::Window* pWin, const OUString& rName,
const OUString& rDescription, EditObjectType eObjectType);
void InitAcc(
- const css::uno::Reference<css::accessibility::XAccessible>& rxParent,
+ const rtl::Reference<comphelper::OAccessible>& rpParent,
EditView* pEditView, const OUString& rName, const OUString& rDescription);
protected:
@@ -198,7 +198,7 @@ public:
virtual void SAL_CALL disposing() override;
};
-class ScAccessibleEditLineObject : public ScAccessibleEditControlObject
+class ScAccessibleEditLineObject final : public ScAccessibleEditControlObject
{
public:
ScAccessibleEditLineObject(ScTextWnd* pTextWnd);
diff --git a/sc/source/ui/inc/AccessiblePageHeader.hxx b/sc/source/ui/inc/AccessiblePageHeader.hxx
index 12f2f842cc3d..f99fa1210463 100644
--- a/sc/source/ui/inc/AccessiblePageHeader.hxx
+++ b/sc/source/ui/inc/AccessiblePageHeader.hxx
@@ -27,7 +27,7 @@ class ScPreviewShell;
class EditTextObject;
class ScAccessiblePageHeaderArea;
-class ScAccessiblePageHeader : public ScAccessibleContextBase
+class ScAccessiblePageHeader final : public ScAccessibleContextBase
{
public:
ScAccessiblePageHeader( const css::uno::Reference<css::accessibility::XAccessible>& rxParent,
diff --git a/sc/source/ui/inc/AccessiblePageHeaderArea.hxx b/sc/source/ui/inc/AccessiblePageHeaderArea.hxx
index 00fd1f1677b4..3cb2b35402ef 100644
--- a/sc/source/ui/inc/AccessiblePageHeaderArea.hxx
+++ b/sc/source/ui/inc/AccessiblePageHeaderArea.hxx
@@ -29,7 +29,7 @@ namespace accessibility
}
class ScPreviewShell;
-class ScAccessiblePageHeaderArea
+class ScAccessiblePageHeaderArea final
: public ScAccessibleContextBase
{
public:
diff --git a/sc/source/ui/inc/AccessiblePreviewCell.hxx b/sc/source/ui/inc/AccessiblePreviewCell.hxx
index 62bf70bd3632..a787c0cbedd3 100644
--- a/sc/source/ui/inc/AccessiblePreviewCell.hxx
+++ b/sc/source/ui/inc/AccessiblePreviewCell.hxx
@@ -29,7 +29,7 @@ namespace accessibility
class AccessibleTextHelper;
}
-class ScAccessiblePreviewCell : public ScAccessibleCellBase
+class ScAccessiblePreviewCell final : public ScAccessibleCellBase
{
public:
ScAccessiblePreviewCell(const rtl::Reference<ScAccessiblePreviewTable>& rParent,
diff --git a/sc/source/ui/inc/AccessiblePreviewHeaderCell.hxx b/sc/source/ui/inc/AccessiblePreviewHeaderCell.hxx
index 2a903644983d..46cb8d530357 100644
--- a/sc/source/ui/inc/AccessiblePreviewHeaderCell.hxx
+++ b/sc/source/ui/inc/AccessiblePreviewHeaderCell.hxx
@@ -30,7 +30,7 @@ namespace accessibility {
class AccessibleTextHelper;
}
-class ScAccessiblePreviewHeaderCell
+class ScAccessiblePreviewHeaderCell final
: public cppu::ImplInheritanceHelper<ScAccessibleContextBase,
css::accessibility::XAccessibleValue>
{
diff --git a/sc/source/ui/inc/PivotLayoutDialog.hxx b/sc/source/ui/inc/PivotLayoutDialog.hxx
index d995e3bfb13a..38542d30ee35 100644
--- a/sc/source/ui/inc/PivotLayoutDialog.hxx
+++ b/sc/source/ui/inc/PivotLayoutDialog.hxx
@@ -81,9 +81,7 @@ private:
std::unique_ptr<weld::Button> mxBtnCancel;
std::unique_ptr<weld::Frame> mxSourceFrame;
- std::unique_ptr<weld::Label> mxSourceLabel;
std::unique_ptr<weld::Frame> mxDestFrame;
- std::unique_ptr<weld::Label> mxDestLabel;
std::unique_ptr<weld::Expander> mxOptions;
std::unique_ptr<weld::Expander> mxMore;
diff --git a/sc/source/ui/inc/SparklineRenderer.hxx b/sc/source/ui/inc/SparklineRenderer.hxx
index 1a8adc39a828..8fb5f64d214b 100644
--- a/sc/source/ui/inc/SparklineRenderer.hxx
+++ b/sc/source/ui/inc/SparklineRenderer.hxx
@@ -15,7 +15,6 @@
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <comphelper/scopeguard.hxx>
#include <Sparkline.hxx>
#include <SparklineGroup.hxx>
@@ -494,8 +493,7 @@ public:
vcl::RenderContext& rRenderContext, tools::Rectangle const& rRectangle,
tools::Long nOneX, tools::Long nOneY, double fScaleX, double fScaleY)
{
- rRenderContext.Push();
- comphelper::ScopeGuard aPushPopGuard([&rRenderContext]() { rRenderContext.Pop(); });
+ auto popIt = rRenderContext.ScopedPush();
rRenderContext.SetAntialiasing(AntialiasingFlags::Enable);
rRenderContext.SetClipRegion(vcl::Region(rRectangle));
diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx
index 8d422e66add3..0d424e123f77 100644
--- a/sc/source/ui/inc/anyrefdg.hxx
+++ b/sc/source/ui/inc/anyrefdg.hxx
@@ -48,8 +48,8 @@ class ScFormulaReferenceHelper
DECL_LINK( ActivateHdl, weld::Widget&, bool );
public:
- ScFormulaReferenceHelper(IAnyRefDialog* _pDlg, SfxBindings* _pBindings);
- ~ScFormulaReferenceHelper() COVERITY_NOEXCEPT_FALSE;
+ ScFormulaReferenceHelper(IAnyRefDialog* _pDlg, SfxBindings* _pBindings, weld::Dialog* pDialog);
+ ~ScFormulaReferenceHelper();
void dispose();
void ShowSimpleReference(std::u16string_view rStr);
@@ -64,7 +64,6 @@ public:
void RefInputDone( bool bForced );
void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton );
- void SetDialog(weld::Dialog* pDialog) { m_pDialog = pDialog; }
void DoClose( sal_uInt16 nId );
void SetDispatcherLock( bool bLock );
static void EnableSpreadsheets( bool bFlag = true );
diff --git a/sc/source/ui/inc/areasdlg.hxx b/sc/source/ui/inc/areasdlg.hxx
index b7372a5faf73..08efa5d21364 100644
--- a/sc/source/ui/inc/areasdlg.hxx
+++ b/sc/source/ui/inc/areasdlg.hxx
@@ -68,10 +68,6 @@ private:
std::unique_ptr<weld::Frame> m_xRowFrame;
std::unique_ptr<weld::Frame> m_xColFrame;
- std::unique_ptr<weld::Label> m_xPrintFrameFT;
- std::unique_ptr<weld::Label> m_xRowFrameFT;
- std::unique_ptr<weld::Label> m_xColFrameFT;
-
void Impl_Reset();
bool Impl_CheckRefStrings();
void Impl_FillLists();
diff --git a/sc/source/ui/inc/crnrdlg.hxx b/sc/source/ui/inc/crnrdlg.hxx
index 5bff6d2e8c13..751648aab135 100644
--- a/sc/source/ui/inc/crnrdlg.hxx
+++ b/sc/source/ui/inc/crnrdlg.hxx
@@ -69,7 +69,6 @@ private:
std::unique_ptr<weld::Button> m_xBtnRemove;
std::unique_ptr<weld::Frame> m_xRangeFrame;
- std::unique_ptr<weld::Label> m_xRangeFT;
std::unique_ptr<weld::Label> m_xDataFT;
void Init ();
diff --git a/sc/source/ui/inc/dbfunc.hxx b/sc/source/ui/inc/dbfunc.hxx
index a30f39747f30..0a9463e87e15 100644
--- a/sc/source/ui/inc/dbfunc.hxx
+++ b/sc/source/ui/inc/dbfunc.hxx
@@ -67,7 +67,7 @@ public:
void GotoDBArea( const OUString& rDBName );
// DB range from Cursor
- ScDBData* GetDBData( bool bMarkArea = true, ScGetDBMode eMode = SC_DB_MAKE, ScGetDBSelection eSel = ScGetDBSelection::Keep);
+ SAL_RET_MAYBENULL ScDBData* GetDBData( bool bMarkArea = true, ScGetDBMode eMode = SC_DB_MAKE, ScGetDBSelection eSel = ScGetDBSelection::Keep);
ScDBData* GetAnonymousDBData();
void Consolidate( const ScConsolidateParam& rParam );
diff --git a/sc/source/ui/inc/dbnamdlg.hxx b/sc/source/ui/inc/dbnamdlg.hxx
index 4958f121d821..ab1438f5b614 100644
--- a/sc/source/ui/inc/dbnamdlg.hxx
+++ b/sc/source/ui/inc/dbnamdlg.hxx
@@ -82,7 +82,6 @@ private:
std::unique_ptr<weld::Button> m_xModifyPB;
std::unique_ptr<weld::Label> m_xInvalidFT;
- std::unique_ptr<weld::Label> m_xFrameLabel;
std::unique_ptr<weld::Expander> m_xExpander;
private:
void Init();
diff --git a/sc/source/ui/inc/dwfunctr.hxx b/sc/source/ui/inc/dwfunctr.hxx
index e66b02270cbe..316ca2340a1d 100644
--- a/sc/source/ui/inc/dwfunctr.hxx
+++ b/sc/source/ui/inc/dwfunctr.hxx
@@ -21,6 +21,7 @@
#include <comphelper/configurationlistener.hxx>
#include <sfx2/sidebar/PanelLayout.hxx>
#include <unordered_map>
+#include <sfx2/bindings.hxx>
class ScFuncDesc;
namespace formula { class IFunctionDescription; }
@@ -52,11 +53,11 @@ private:
std::unique_ptr<weld::CheckButton> xSimilaritySearch;
std::unique_ptr<weld::TextView> xFiFuncDesc;
std::unique_ptr<weld::Entry> m_xSearchString;
+ SfxBindings* m_pBindings;
rtl::Reference<comphelper::ConfigurationListener> xConfigListener;
std::unique_ptr<EnglishFunctionNameChange> xConfigChange;
const ScFuncDesc* pFuncDesc;
- sal_uInt16 nArgs;
OUString m_aListHelpId;
OUString m_aSearchHelpId;
@@ -70,6 +71,7 @@ private:
void UpdateFavouritesList();
void DoEnter(bool bDouble_or_Enter = false);
void SetDescription();
+ SfxBindings& GetBindings() const { return *m_pBindings; }
weld::TreeIter* FillCategoriesMap(const OUString&, bool);
DECL_LINK( SetRowActivatedHdl, weld::TreeView&, bool );
@@ -82,7 +84,7 @@ private:
DECL_LINK( KeyInputHdl, const KeyEvent&, bool);
public:
- ScFunctionWin(weld::Widget* pParent);
+ ScFunctionWin(weld::Widget* pParent, SfxBindings* pBindings);
virtual ~ScFunctionWin() override;
diff --git a/sc/source/ui/inc/filtdlg.hxx b/sc/source/ui/inc/filtdlg.hxx
index efd1e0f20244..66a226c5ff62 100644
--- a/sc/source/ui/inc/filtdlg.hxx
+++ b/sc/source/ui/inc/filtdlg.hxx
@@ -224,7 +224,6 @@ private:
std::unique_ptr<weld::Button> m_xBtnCancel;
std::unique_ptr<weld::Frame> m_xFilterFrame;
- std::unique_ptr<weld::Label> m_xFilterLabel;
private:
void Init( const SfxItemSet& rArgSet );
diff --git a/sc/source/ui/inc/formula.hxx b/sc/source/ui/inc/formula.hxx
index cd94f2a26d56..8af7c0f4d18b 100644
--- a/sc/source/ui/inc/formula.hxx
+++ b/sc/source/ui/inc/formula.hxx
@@ -47,7 +47,7 @@ class ScFormulaDlg final : public formula::FormulaDlg,
public:
ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW,
weld::Window* pParent, const ScViewData& rViewData, const formula::IFunctionManager* _pFunctionMgr);
- virtual ~ScFormulaDlg() COVERITY_NOEXCEPT_FALSE override;
+ virtual ~ScFormulaDlg() override;
// IFormulaEditorHelper
virtual void notifyChange() override;
@@ -95,6 +95,7 @@ public:
virtual void ViewShellChanged() override;
private:
+ void ImplDestroy();
virtual void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = nullptr ) override;
static void SaveLRUEntry(const ScFuncDesc* pFuncDesc);
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 70076cb40bf7..f12865d3f773 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -395,7 +395,7 @@ public:
bool GetEditUrl(const Point& rPos, OUString* pName = nullptr, OUString* pUrl = nullptr,
OUString* pTarget = nullptr, SCCOL* pnCol= nullptr);
- virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override;
+ virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override;
void FakeButtonUp();
diff --git a/sc/source/ui/inc/hfedtdlg.hxx b/sc/source/ui/inc/hfedtdlg.hxx
index 6bec2d995858..a075d20fef62 100644
--- a/sc/source/ui/inc/hfedtdlg.hxx
+++ b/sc/source/ui/inc/hfedtdlg.hxx
@@ -79,13 +79,6 @@ public:
const SfxItemSet& rCoreSet, std::u16string_view rPageStyle);
};
-class ScHFEditFirstHeaderDlg : public ScHFEditDlg
-{
-public:
- ScHFEditFirstHeaderDlg(weld::Window* pParent,
- const SfxItemSet& rCoreSet, std::u16string_view rPageStyle);
-};
-
class ScHFEditLeftHeaderDlg : public ScHFEditDlg
{
public:
@@ -100,13 +93,6 @@ public:
const SfxItemSet& rCoreSet, std::u16string_view rPageStyle);
};
-class ScHFEditFirstFooterDlg : public ScHFEditDlg
-{
-public:
- ScHFEditFirstFooterDlg(weld::Window* pParent,
- const SfxItemSet& rCoreSet, std::u16string_view rPageStyle);
-};
-
class ScHFEditLeftFooterDlg : public ScHFEditDlg
{
public:
diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx
index 22527d3addc7..8c805ea09a92 100644
--- a/sc/source/ui/inc/output.hxx
+++ b/sc/source/ui/inc/output.hxx
@@ -54,6 +54,7 @@ class ScPageBreakData;
class FmFormView;
class ScFieldEditEngine;
class SdrPaintWindow;
+class ScDrawStringsVars;
#define SC_SCENARIO_HSPACE 60
#define SC_SCENARIO_VSPACE 50
@@ -192,41 +193,41 @@ private:
VclPtr<OutputDevice> mpRefDevice; // printer if used for preview
VclPtr<OutputDevice> pFmtDevice; // reference for text formatting
ScTableInfo& mrTabInfo;
- RowInfo* pRowInfo; // Info block
- SCSIZE nArrCount; // occupied lines in info block
+ RowInfo* mpRowInfo; // Info block
+ SCSIZE mnArrCount; // occupied lines in info block
ScDocument* mpDoc; // Document
- SCTAB nTab; // sheet
- tools::Long nScrX; // Output Startpos. (Pixel)
- tools::Long nScrY;
- tools::Long nScrW; // Output size (Pixel)
- tools::Long nScrH;
- tools::Long nMirrorW; // Visible output width for mirroring (default: nScrW)
- SCCOL nX1; // Start-/End coordinates
- SCROW nY1; // ( incl. hidden )
- SCCOL nX2;
- SCROW nY2;
- SCCOL nVisX1; // Start-/End coordinates
- SCROW nVisY1; // ( visible range )
- SCCOL nVisX2;
- SCROW nVisY2;
- ScOutputType eType; // Screen/Printer ...
+ SCTAB mnTab; // sheet
+ tools::Long mnScrX; // Output Startpos. (Pixel)
+ tools::Long mnScrY;
+ tools::Long mnScrW; // Output size (Pixel)
+ tools::Long mnScrH;
+ tools::Long mnMirrorW; // Visible output width for mirroring (default: nScrW)
+ SCCOL mnX1; // Start-/End coordinates
+ SCROW mnY1; // ( incl. hidden )
+ SCCOL mnX2;
+ SCROW mnY2;
+ SCCOL mnVisX1; // Start-/End coordinates
+ SCROW mnVisY1; // ( visible range )
+ SCCOL mnVisX2;
+ SCROW mnVisY2;
+ ScOutputType meType; // Screen/Printer ...
double mnPPTX; // Pixel per Twips
double mnPPTY;
- Fraction aZoomX;
- Fraction aZoomY;
+ Fraction maZoomX;
+ Fraction maZoomY;
- ScTabViewShell* pViewShell; // for connect from visible plug-ins
+ ScTabViewShell* mpViewShell; // for connect from visible plug-ins
- FmFormView* pDrawView; // SdrView to paint to
+ FmFormView* mpDrawView; // SdrView to paint to
- bool bEditMode; // InPlace edited cell - do not output
- SCCOL nEditCol;
- SCROW nEditRow;
+ bool mbEditMode; // InPlace edited cell - do not output
+ SCCOL mnEditCol;
+ SCROW mnEditRow;
- bool bMetaFile; // Output to metafile (not pixels!)
+ bool mbMetaFile; // Output to metafile (not pixels!)
- bool bPagebreakMode; // Page break preview
- bool bSolidBackground; // white instead of transparent
+ bool mbPagebreakMode; // Page break preview
+ bool mbSolidBackground; // white instead of transparent
bool mbUseStyleColor;
bool mbForceAutoColor;
@@ -236,19 +237,19 @@ private:
std::optional<Color> mxTextColor;
std::optional<Color> mxFormulaColor;
- Color aGridColor;
+ Color maGridColor;
bool mbShowNullValues;
bool mbShowFormulas;
- bool bShowSpellErrors; // Show spelling errors in EditObjects
- bool bMarkClipped;
+ bool mbShowSpellErrors; // Show spelling errors in EditObjects
+ bool mbMarkClipped;
- bool bSnapPixel;
+ bool mbSnapPixel;
- bool bAnyClipped; // internal
- bool bVertical;
- bool bTabProtected;
- bool bLayoutRTL;
+ bool mbAnyClipped; // internal
+ bool mbVertical;
+ bool mbTabProtected;
+ bool mbLayoutRTL;
// #i74769# use SdrPaintWindow direct, remember it during BeginDrawLayers/EndDrawLayers
SdrPaintWindow* mpTargetPaintWindow;
@@ -312,6 +313,21 @@ private:
// and the single call to end of constructor to be sure this always happens
void SetCellRotations();
+ /// inner loop of LayoutStrings
+ void LayoutStringsImpl(bool bPixelToLogic, RowInfo* pThisRowInfo, SCCOL nX, SCROW nY, SCSIZE nArrY,
+ std::optional<SCCOL>& oFirstNonEmptyCellX,
+ std::optional<SCCOL>& oLastEmptyCellX,
+ SCCOL nLastContentCol,
+ std::vector<std::unique_ptr<ScPatternAttr> >& aAltPatterns,
+ const ScPatternAttr*& pOldPattern,
+ const SfxItemSet*& pOldCondSet,
+ SvtScriptType& nOldScript,
+ ScDrawStringsVars& aVars,
+ bool& bProgress, tools::Long nPosX, tools::Long nPosY, bool bTaggedPDF,
+ bool& bReopenRowTag, vcl::PDFExtOutDevData* pPDF,
+ tools::Long nLayoutSign,
+ KernArray& aDX);
+
public:
/**
@@ -334,11 +350,11 @@ public:
void SetRefDevice( OutputDevice* pRDev );
void SetFmtDevice( OutputDevice* pRDev );
- void SetViewShell( ScTabViewShell* pSh ) { pViewShell = pSh; }
+ void SetViewShell( ScTabViewShell* pSh ) { mpViewShell = pSh; }
- void SetDrawView( FmFormView* pNew ) { pDrawView = pNew; }
+ void SetDrawView( FmFormView* pNew ) { mpDrawView = pNew; }
- void SetSolidBackground( bool bSet ) { bSolidBackground = bSet; }
+ void SetSolidBackground( bool bSet ) { mbSolidBackground = bSet; }
void SetUseStyleColor( bool bSet );
void SetEditCell( SCCOL nCol, SCROW nRow );
@@ -350,8 +366,8 @@ public:
void SetShowFormulas ( bool bSet );
void SetShowSpellErrors( bool bSet );
void SetMirrorWidth( tools::Long nNew );
- tools::Long GetScrW() const { return nScrW; }
- tools::Long GetScrH() const { return nScrH; }
+ tools::Long GetScrW() const { return mnScrW; }
+ tools::Long GetScrH() const { return mnScrH; }
void SetSnapPixel();
diff --git a/sc/source/ui/inc/preview.hxx b/sc/source/ui/inc/preview.hxx
index 606454d992ba..cf07452b244a 100644
--- a/sc/source/ui/inc/preview.hxx
+++ b/sc/source/ui/inc/preview.hxx
@@ -110,7 +110,7 @@ protected:
virtual void GetFocus() override;
virtual void LoseFocus() override;
- virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override;
+ virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override;
public:
ScPreview( vcl::Window* pParent, ScDocShell* pDocSh, ScPreviewShell* pViewSh );
diff --git a/sc/source/ui/inc/sortkeydlg.hxx b/sc/source/ui/inc/sortkeydlg.hxx
index 2c702e6100cb..6d110fa9dfd7 100644
--- a/sc/source/ui/inc/sortkeydlg.hxx
+++ b/sc/source/ui/inc/sortkeydlg.hxx
@@ -23,9 +23,9 @@ struct ScSortKeyItem
std::unique_ptr<weld::RadioButton> m_xBtnUp;
std::unique_ptr<weld::RadioButton> m_xBtnDown;
std::unique_ptr<weld::Label> m_xLabel;
- weld::Container* m_pParent;
+ weld::Box* m_pParent;
- ScSortKeyItem(weld::Container* pParent);
+ ScSortKeyItem(weld::Box* pParent);
~ScSortKeyItem();
void DisableField();
@@ -40,10 +40,10 @@ public:
ScSortKeyItems m_aSortKeyItems;
private:
- weld::Container* m_pBox;
+ weld::Box* m_pBox;
public:
- ScSortKeyWindow(weld::Container* pBox);
+ ScSortKeyWindow(weld::Box* pBox);
~ScSortKeyWindow();
void AddSortKey(sal_uInt16 nItem);
diff --git a/sc/source/ui/inc/tabpages.hxx b/sc/source/ui/inc/tabpages.hxx
index 4a613f344b12..f7f70673a047 100644
--- a/sc/source/ui/inc/tabpages.hxx
+++ b/sc/source/ui/inc/tabpages.hxx
@@ -61,7 +61,7 @@ private:
DECL_LINK(HideCellClickHdl, weld::Toggleable&, void);
DECL_LINK(HideFormulaClickHdl, weld::Toggleable&, void);
DECL_LINK(HidePrintClickHdl, weld::Toggleable&, void);
- void ButtonClick(const weld::Toggleable& rBox);
+ void ButtonClick(const weld::CheckButton& rBox);
void UpdateButtons();
};
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 1da1020a005a..be283fcffaf8 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -185,6 +185,8 @@ private:
sal_uInt16 nCurRefDlgId;
+ bool bIsTabChangeInProgress;
+
std::unique_ptr<SfxBroadcaster> pAccessibilityBroadcaster;
// ugly hack for Add button in ScNameDlg
@@ -283,6 +285,9 @@ public:
void SetActive();
+ void SetTabChangeInProgress(bool bState) { bIsTabChangeInProgress = bState; }
+ bool IsTabChangeInProgress() { return bIsTabChangeInProgress; }
+
::editeng::SvxBorderLine* GetDefaultFrameLine() const { return pCurFrameLine.get(); }
void SetDefaultFrameLine(const ::editeng::SvxBorderLine* pLine );
@@ -421,6 +426,8 @@ public:
void FinishProtectTable();
void ExecProtectTable( SfxRequest& rReq );
+ void ExecGoToTab( SfxRequest& rReq, SfxBindings& rBindings );
+
using ScTabView::ShowCursor;
bool IsActive() const { return bIsActive; }
diff --git a/sc/source/ui/inc/tpsort.hxx b/sc/source/ui/inc/tpsort.hxx
index 1c9d27926b1c..b8c630aa9315 100644
--- a/sc/source/ui/inc/tpsort.hxx
+++ b/sc/source/ui/inc/tpsort.hxx
@@ -76,7 +76,7 @@ private:
std::unique_ptr<weld::RadioButton> m_xBtnTopDown;
std::unique_ptr<weld::RadioButton> m_xBtnLeftRight;
std::unique_ptr<weld::ScrolledWindow> m_xScrolledWindow;
- std::unique_ptr<weld::Container> m_xBox;
+ std::unique_ptr<weld::Box> m_xBox;
ScSortKeyWindow m_aSortWin;
void AddSortKey( sal_uInt16 nItem );
diff --git a/sc/source/ui/inc/transobj.hxx b/sc/source/ui/inc/transobj.hxx
index 4ad4a93be7f7..d84f5cb3e0df 100644
--- a/sc/source/ui/inc/transobj.hxx
+++ b/sc/source/ui/inc/transobj.hxx
@@ -58,7 +58,7 @@ private:
static void StripRefs( ScDocument& rDoc, SCCOL nStartX, SCROW nStartY,
SCCOL nEndX, SCROW nEndY,
ScDocument& rDestDoc );
- static void PaintToDev( OutputDevice* pDev, ScDocument& rDoc, double nPrintFactor,
+ static void PaintToDev( OutputDevice* pDev, ScDocShell& rDocSh, double nPrintFactor,
const ScRange& rBlock );
static void GetAreaSize( const ScDocument& rDoc, SCTAB nTab1, SCTAB nTab2, SCROW& nRow, SCCOL& nCol );
diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx
index 5fdbdc7568ce..fa4af2061f73 100644
--- a/sc/source/ui/inc/validate.hxx
+++ b/sc/source/ui/inc/validate.hxx
@@ -128,7 +128,7 @@ private:
std::unique_ptr<formula::RefEdit> m_xEdMax;
std::unique_ptr<weld::Label> m_xFtHint; /// Hint text for cell range validity.
std::unique_ptr<formula::RefButton> m_xBtnRef;
- std::unique_ptr<weld::Container> m_xRefGrid;
+ std::unique_ptr<weld::Grid> m_xRefGrid;
weld::Container* m_pRefEditParent;
weld::Container* m_pBtnRefParent;
diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
index 0fccba0d64d1..b61b6ccbe23c 100644
--- a/sc/source/ui/inc/viewdata.hxx
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -290,6 +290,8 @@ private:
Fraction aDefZoomY;
Fraction aDefPageZoomX; // zoom in page break preview mode
Fraction aDefPageZoomY;
+ // If the actual zoom values are for implementation-only purposes, then provide a value for export
+ std::optional<sal_uInt16> oExportZoom; // used for all sheets
ScRefType eRefType;
@@ -457,6 +459,9 @@ public:
const Fraction& GetZoomX() const { return bPagebreak ? pThisTab->aPageZoomX : pThisTab->aZoomX; }
const Fraction& GetZoomY() const { return bPagebreak ? pThisTab->aPageZoomY : pThisTab->aZoomY; }
+ void SetExportZoom(sal_uInt16 nExportZoom) { oExportZoom = nExportZoom; }
+ const std::optional<sal_uInt16>& GetExportZoom() const { return oExportZoom; }
+
void SetShowGrid( bool bShow );
bool GetShowGrid() const { return pThisTab->bShowGrid; }
diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
index abded6a51b71..5a3b89db9af5 100644
--- a/sc/source/ui/inc/viewfunc.hxx
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -90,6 +90,8 @@ public:
bool AutoSum( const ScRange& rRange, bool bSubTotal, bool bSetCursor, bool bContinue, const OpCode eCode );
OUString GetAutoSumFormula( const ScRangeList& rRangeList, bool bSubTotal, const ScAddress& rAddr, const OpCode eCode );
+ SC_DLLPUBLIC void EnterDataToCurrentCell(const OUString& rString, const EditTextObject* pData = nullptr, bool bMatrixExpand = false);
+
SC_DLLPUBLIC void EnterData(SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString& rString,
const EditTextObject* pData = nullptr, bool bMatrixExpand = false);
void EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx
index 18f3260718b0..b409626ac778 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -44,22 +44,23 @@
#include <memory>
-ScFormulaReferenceHelper::ScFormulaReferenceHelper(IAnyRefDialog* _pDlg,SfxBindings* _pBindings)
- : m_pDlg(_pDlg)
- , m_pRefEdit (nullptr)
- , m_pRefBtn (nullptr)
- , m_pDialog(nullptr)
- , m_pBindings(_pBindings)
- , m_nRefTab(0)
- , m_bHighlightRef(false)
+ScFormulaReferenceHelper::ScFormulaReferenceHelper(IAnyRefDialog* _pDlg, SfxBindings* _pBindings,
+ weld::Dialog* pDialog)
+ : m_pDlg(_pDlg)
+ , m_pRefEdit(nullptr)
+ , m_pRefBtn(nullptr)
+ , m_pDialog(pDialog)
+ , m_pBindings(_pBindings)
+ , m_nRefTab(0)
+ , m_bHighlightRef(false)
{
ScInputOptions aInputOption = ScModule::get()->GetInputOptions();
m_bEnableColorRef=aInputOption.GetRangeFinder();
}
-ScFormulaReferenceHelper::~ScFormulaReferenceHelper() COVERITY_NOEXCEPT_FALSE
+ScFormulaReferenceHelper::~ScFormulaReferenceHelper()
{
- dispose();
+ suppress_fun_call_w_exception(dispose());
}
void ScFormulaReferenceHelper::dispose()
@@ -375,17 +376,15 @@ void ScFormulaReferenceHelper::RefInputStart( formula::RefEdit* pEdit, formula::
// Save and adjust window title
m_sOldDialogText = m_pDialog->get_title();
- if (weld::Label *pLabel = m_pRefEdit->GetLabelWidgetForShrinkMode())
+ const OUString sLabel = m_pRefEdit->GetLabelTextForShrinkMode();
+ if (!sLabel.isEmpty())
{
- const OUString sLabel = pLabel->get_label();
- if (!sLabel.isEmpty())
- {
- const OUString sNewDialogText = m_sOldDialogText + ": " + comphelper::string::stripEnd(sLabel, ':');
- m_pDialog->set_title(pLabel->strip_mnemonic(sNewDialogText));
- }
+ const OUString sNewDialogText = m_sOldDialogText + ": " + comphelper::string::stripEnd(sLabel, ':');
+ m_pDialog->set_title(m_pDialog->strip_mnemonic(sNewDialogText));
}
- m_pDialog->collapse(pEdit->GetWidget(), pButton ? pButton->GetWidget() : nullptr);
+ assert(pEdit && pEdit->GetWidget());
+ m_pDialog->collapse(*pEdit->GetWidget(), pButton ? pButton->GetWidget() : nullptr);
// set button image
if (pButton)
@@ -577,11 +576,9 @@ static void lcl_HideAllReferences()
ScRefHandler::ScRefHandler(SfxDialogController& rController, SfxBindings* pB, bool bBindRef)
: m_pController(&rController)
, m_bInRefMode(false)
- , m_aHelper(this, pB)
+ , m_aHelper(this, pB, rController.getDialog())
, m_pMyBindings(pB)
{
- m_aHelper.SetDialog(rController.getDialog());
-
if( bBindRef ) EnterRefMode();
}
diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx
index 8c8f946f0e77..accb3c99b752 100644
--- a/sc/source/ui/miscdlgs/autofmt.cxx
+++ b/sc/source/ui/miscdlgs/autofmt.cxx
@@ -368,7 +368,7 @@ void ScAutoFmtPreview::DrawBackground(vcl::RenderContext& rRenderContext)
const SvxBrushItem* pItem =
pCurData->GetItem( GetFormatIndex( nCol, nRow ), ATTR_BACKGROUND );
- rRenderContext.Push( vcl::PushFlags::LINECOLOR | vcl::PushFlags::FILLCOLOR );
+ auto popIt = rRenderContext.ScopedPush(vcl::PushFlags::LINECOLOR | vcl::PushFlags::FILLCOLOR);
rRenderContext.SetLineColor();
if (pItem->GetColor() == COL_TRANSPARENT)
rRenderContext.SetFillColor();
@@ -381,7 +381,6 @@ void ScAutoFmtPreview::DrawBackground(vcl::RenderContext& rRenderContext)
basegfx::fround<tools::Long>(aCellRange.getMinX()), basegfx::fround<tools::Long>(aCellRange.getMinY()),
basegfx::fround<tools::Long>(aCellRange.getMaxX()), basegfx::fround<tools::Long>(aCellRange.getMaxY())));
- rRenderContext.Pop();
}
}
}
@@ -497,7 +496,7 @@ void ScAutoFmtPreview::NotifyChange( ScAutoFormatData* pNewData )
void ScAutoFmtPreview::DoPaint(vcl::RenderContext& rRenderContext)
{
- rRenderContext.Push(vcl::PushFlags::ALL);
+ auto popIt = rRenderContext.ScopedPush(vcl::PushFlags::ALL);
DrawModeFlags nOldDrawMode = aVD->GetDrawMode();
Size aWndSize(GetOutputSizePixel());
@@ -523,7 +522,6 @@ void ScAutoFmtPreview::DoPaint(vcl::RenderContext& rRenderContext)
aPos.setX( -aPos.X() );
rRenderContext.DrawOutDev(aPos, aWndSize, Point(), aWndSize, *aVD);
aVD->SetDrawMode(nOldDrawMode);
- rRenderContext.Pop();
}
void ScAutoFmtPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/)
diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx
index f461995d1c9a..aa451f9f2744 100644
--- a/sc/source/ui/miscdlgs/conflictsdlg.cxx
+++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx
@@ -184,7 +184,7 @@ ScConflictsListEntry& ScConflictsFinder::GetEntry( sal_uLong nSharedAction, cons
ScConflictsListEntry aEntry;
aEntry.meConflictAction = SC_CONFLICT_ACTION_NONE;
aEntry.maSharedActions.push_back( nSharedAction );
- mrConflictsList.push_back( aEntry );
+ mrConflictsList.push_back(std::move(aEntry));
return mrConflictsList.back();
}
diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx
index c0a1c3a8a9bb..13f47a4d04b5 100644
--- a/sc/source/ui/miscdlgs/crnrdlg.cxx
+++ b/sc/source/ui/miscdlgs/crnrdlg.cxx
@@ -77,11 +77,10 @@ ScColRowNameRangesDlg::ScColRowNameRangesDlg( SfxBindings* pB,
, m_xBtnAdd(m_xBuilder->weld_button(u"add"_ustr))
, m_xBtnRemove(m_xBuilder->weld_button(u"delete"_ustr))
, m_xRangeFrame(m_xBuilder->weld_frame(u"rangeframe"_ustr))
- , m_xRangeFT(m_xRangeFrame->weld_label_widget())
, m_xDataFT(m_xBuilder->weld_label(u"datarange"_ustr))
{
m_xRbAssign->SetReferences(this, m_xEdAssign.get());
- m_xEdAssign->SetReferences(this, m_xRangeFT.get());
+ m_xEdAssign->SetReferences(this, m_xRangeFrame.get());
m_xRbAssign2->SetReferences(this, m_xEdAssign2.get());
m_xEdAssign2->SetReferences(this, m_xDataFT.get());
diff --git a/sc/source/ui/miscdlgs/datafdlg.cxx b/sc/source/ui/miscdlgs/datafdlg.cxx
index 6490cdc3b5b2..f3c641804566 100644
--- a/sc/source/ui/miscdlgs/datafdlg.cxx
+++ b/sc/source/ui/miscdlgs/datafdlg.cxx
@@ -172,7 +172,7 @@ ScDataFormDlg::ScDataFormDlg(weld::Window* pParent, ScTabViewShell* pTabViewShel
FillCtrls();
- m_xSlider->vadjustment_configure(0, 0, nEndRow - nStartRow + 1, 1, 10, 1);
+ m_xSlider->vadjustment_configure(0, nEndRow - nStartRow + 1, 1, 10, 1);
m_xBtnNew->connect_clicked(LINK( this, ScDataFormDlg, Impl_NewHdl));
m_xBtnPrev->connect_clicked(LINK( this, ScDataFormDlg, Impl_PrevHdl));
@@ -182,7 +182,7 @@ ScDataFormDlg::ScDataFormDlg(weld::Window* pParent, ScTabViewShell* pTabViewShel
m_xBtnDelete->connect_clicked(LINK( this, ScDataFormDlg, Impl_DeleteHdl));
m_xBtnClose->connect_clicked(LINK( this, ScDataFormDlg, Impl_CloseHdl));
- m_xSlider->connect_vadjustment_changed(LINK( this, ScDataFormDlg, Impl_ScrollHdl));
+ m_xSlider->connect_vadjustment_value_changed(LINK( this, ScDataFormDlg, Impl_ScrollHdl));
SetButtonState();
}
diff --git a/sc/source/ui/miscdlgs/highred.cxx b/sc/source/ui/miscdlgs/highred.cxx
index 476a8d62b25e..654bc0040ee9 100644
--- a/sc/source/ui/miscdlgs/highred.cxx
+++ b/sc/source/ui/miscdlgs/highred.cxx
@@ -39,7 +39,7 @@ ScHighlightChgDlg::ScHighlightChgDlg(SfxBindings* pB, SfxChildWindow* pCW, weld:
, m_xBox(m_xBuilder->weld_container(u"box"_ustr))
, m_xFilterCtr(new SvxTPFilter(m_xBox.get()))
{
- m_xEdAssign->SetReferences(this, nullptr);
+ m_xEdAssign->SetReferences(this);
m_xRbAssign->SetReferences(this, m_xEdAssign.get());
m_xOkButton->connect_clicked(LINK( this, ScHighlightChgDlg, OKBtnHdl));
diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx
index f4224c3a152e..fa0f00f54aac 100644
--- a/sc/source/ui/miscdlgs/optsolver.cxx
+++ b/sc/source/ui/miscdlgs/optsolver.cxx
@@ -111,8 +111,8 @@ IMPL_LINK(ScSolverSuccessDialog, ClickHdl, weld::Button&, rBtn, void)
ScCursorRefEdit::ScCursorRefEdit(std::unique_ptr<weld::Entry> xControl)
: formula::RefEdit(std::move(xControl))
{
- xEntry->connect_key_press(Link<const KeyEvent&, bool>()); //acknowledge we first remove the old one
- xEntry->connect_key_press(LINK(this, ScCursorRefEdit, KeyInputHdl));
+ mxEntry->connect_key_press(Link<const KeyEvent&, bool>()); //acknowledge we first remove the old one
+ mxEntry->connect_key_press(LINK(this, ScCursorRefEdit, KeyInputHdl));
}
void ScCursorRefEdit::SetCursorLinks( const Link<ScCursorRefEdit&,void>& rUp, const Link<ScCursorRefEdit&,void>& rDown )
@@ -316,7 +316,7 @@ void ScOptSolverDlg::Init(const ScAddress& rCursorPos)
Size aSize(m_xContents->get_preferred_size());
m_xContents->set_size_request(aSize.Width(), aSize.Height());
- m_xScrollBar->connect_vadjustment_changed( LINK( this, ScOptSolverDlg, ScrollHdl ) );
+ m_xScrollBar->connect_vadjustment_value_changed( LINK( this, ScOptSolverDlg, ScrollHdl ) );
m_xScrollBar->vadjustment_set_page_increment( EDIT_ROW_COUNT );
m_xScrollBar->vadjustment_set_page_size( EDIT_ROW_COUNT );
@@ -385,8 +385,8 @@ void ScOptSolverDlg::ShowConditions()
// allow to scroll one page behind the visible or stored rows
tools::Long nVisible = nScrollPos + EDIT_ROW_COUNT;
tools::Long nMax = std::max( nVisible, static_cast<tools::Long>(m_aConditions.size()) );
- m_xScrollBar->vadjustment_configure(nScrollPos, 0, nMax + EDIT_ROW_COUNT, 1,
- EDIT_ROW_COUNT - 1, EDIT_ROW_COUNT);
+ m_xScrollBar->vadjustment_configure(nScrollPos, nMax + EDIT_ROW_COUNT, 1, EDIT_ROW_COUNT - 1,
+ EDIT_ROW_COUNT);
EnableButtons();
}
diff --git a/sc/source/ui/miscdlgs/retypepassdlg.cxx b/sc/source/ui/miscdlgs/retypepassdlg.cxx
index 4dc5808a8bae..40170a0235b4 100644
--- a/sc/source/ui/miscdlgs/retypepassdlg.cxx
+++ b/sc/source/ui/miscdlgs/retypepassdlg.cxx
@@ -83,7 +83,7 @@ void ScRetypePassDlg::SetDataFromDocument(const ScDocument& rDoc)
if (pTabProtect && pTabProtect->isProtected())
aTabItem.mpProtect = std::make_shared<ScTableProtection>(*pTabProtect);
- maTableItems.push_back(aTabItem);
+ maTableItems.push_back(std::move(aTabItem));
maSheets.emplace_back(new PassFragment(mxSheetsBox.get()));
maSheets.back()->m_xButton->connect_clicked(LINK(this, ScRetypePassDlg, RetypeBtnHdl));
}
diff --git a/sc/source/ui/miscdlgs/textdlgs.cxx b/sc/source/ui/miscdlgs/textdlgs.cxx
index 94933ca144ca..1e9219234641 100644
--- a/sc/source/ui/miscdlgs/textdlgs.cxx
+++ b/sc/source/ui/miscdlgs/textdlgs.cxx
@@ -30,19 +30,23 @@
#include <svl/intitem.hxx>
#include <svx/flagsdef.hxx>
+#include <vcl/tabs.hrc>
+
ScCharDlg::ScCharDlg(weld::Window* pParent, const SfxItemSet* pAttr, const SfxObjectShell* pDocShell, bool bDrawText)
: SfxTabDialogController(pParent, u"modules/scalc/ui/chardialog.ui"_ustr, u"CharDialog"_ustr, pAttr)
, m_rDocShell(*pDocShell)
, m_bDrawText(bDrawText)
{
- AddTabPage(u"font"_ustr, RID_SVXPAGE_CHAR_NAME);
- AddTabPage(u"fonteffects"_ustr, RID_SVXPAGE_CHAR_EFFECTS);
- AddTabPage(u"position"_ustr, RID_SVXPAGE_CHAR_POSITION);
+ AddTabPage(u"font"_ustr, TabResId(RID_TAB_FONT.aLabel), RID_SVXPAGE_CHAR_NAME,
+ RID_L + RID_TAB_FONT.sIconName);
+ AddTabPage(u"fonteffects"_ustr, TabResId(RID_TAB_FONTEFFECTS.aLabel), RID_SVXPAGE_CHAR_EFFECTS,
+ RID_L + RID_TAB_FONTEFFECTS.sIconName);
+ AddTabPage(u"position"_ustr, TabResId(RID_TAB_POSITION.aLabel), RID_SVXPAGE_CHAR_POSITION,
+ RID_L + RID_TAB_POSITION.sIconName);
if (bDrawText)
- AddTabPage(u"background"_ustr, RID_SVXPAGE_BKG);
- else
- RemoveTabPage(u"background"_ustr);
+ AddTabPage(u"background"_ustr, TabResId(RID_TAB_HIGHLIGHTING.aLabel), RID_SVXPAGE_BKG,
+ RID_L + RID_TAB_HIGHLIGHTING.sIconName);
}
void ScCharDlg::PageCreated(const OUString& rId, SfxTabPage &rPage)
@@ -73,13 +77,15 @@ void ScCharDlg::PageCreated(const OUString& rId, SfxTabPage &rPage)
ScParagraphDlg::ScParagraphDlg(weld::Window* pParent, const SfxItemSet* pAttr)
: SfxTabDialogController(pParent, u"modules/scalc/ui/paradialog.ui"_ustr, u"ParagraphDialog"_ustr, pAttr)
{
- AddTabPage(u"indents"_ustr, RID_SVXPAGE_STD_PARAGRAPH);
- AddTabPage(u"alignment"_ustr, RID_SVXPAGE_ALIGN_PARAGRAPH);
- if (SvtCJKOptions::IsAsianTypographyEnabled() )
- AddTabPage(u"asiantypo"_ustr, RID_SVXPAGE_PARA_ASIAN);
- else
- RemoveTabPage(u"asiantypo"_ustr);
- AddTabPage(u"tabs"_ustr, RID_SVXPAGE_TABULATOR);
+ AddTabPage(u"indents"_ustr, TabResId(RID_TAB_INDENTS.aLabel), RID_SVXPAGE_STD_PARAGRAPH,
+ RID_L + RID_TAB_INDENTS.sIconName);
+ AddTabPage(u"alignment"_ustr, TabResId(RID_TAB_ALIGNMENT.aLabel), RID_SVXPAGE_ALIGN_PARAGRAPH,
+ RID_L + RID_TAB_ALIGNMENT.sIconName);
+ if (SvtCJKOptions::IsAsianTypographyEnabled())
+ AddTabPage(u"asiantypo"_ustr, TabResId(RID_TAB_ASIANTYPO.aLabel), RID_SVXPAGE_PARA_ASIAN,
+ RID_L + RID_TAB_ASIANTYPO.sIconName);
+ AddTabPage(u"tabs"_ustr, TabResId(RID_TAB_TABS.aLabel), RID_SVXPAGE_TABULATOR,
+ RID_L + RID_TAB_TABS.sIconName);
}
void ScParagraphDlg::PageCreated(const OUString& rId, SfxTabPage &rPage)
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index c9f38f784f7c..68772babbc9e 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -114,18 +114,15 @@ ScPrintAreasDlg::ScPrintAreasDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Win
, m_xPrintFrame(m_xBuilder->weld_frame(u"printframe"_ustr))
, m_xRowFrame(m_xBuilder->weld_frame(u"rowframe"_ustr))
, m_xColFrame(m_xBuilder->weld_frame(u"colframe"_ustr))
- , m_xPrintFrameFT(m_xPrintFrame->weld_label_widget())
- , m_xRowFrameFT(m_xRowFrame->weld_label_widget())
- , m_xColFrameFT(m_xColFrame->weld_label_widget())
{
- m_xEdPrintArea->SetReferences(this, m_xPrintFrameFT.get());
+ m_xEdPrintArea->SetReferences(this, m_xPrintFrame.get());
m_pRefInputEdit = m_xEdPrintArea.get();
m_xRbPrintArea->SetReferences(this, m_xEdPrintArea.get());
- m_xEdRepeatRow->SetReferences(this, m_xRowFrameFT.get());
+ m_xEdRepeatRow->SetReferences(this, m_xRowFrame.get());
m_xRbRepeatRow->SetReferences(this, m_xEdRepeatRow.get());
- m_xEdRepeatCol->SetReferences(this, m_xColFrameFT.get());
+ m_xEdRepeatCol->SetReferences(this, m_xColFrame.get());
m_xRbRepeatCol->SetReferences(this, m_xEdRepeatCol.get());
Impl_Reset();
diff --git a/sc/source/ui/pagedlg/hfedtdlg.cxx b/sc/source/ui/pagedlg/hfedtdlg.cxx
index de8879f5652a..16268b787118 100644
--- a/sc/source/ui/pagedlg/hfedtdlg.cxx
+++ b/sc/source/ui/pagedlg/hfedtdlg.cxx
@@ -29,6 +29,8 @@
#include <svx/svxids.hrc>
#include <svx/pageitem.hxx>
+#include <vcl/tabs.hrc>
+
ScHFEditDlg::ScHFEditDlg(weld::Window* pParent,
const SfxItemSet& rCoreSet,
std::u16string_view rPageStyle,
@@ -51,9 +53,12 @@ ScHFEditHeaderDlg::ScHFEditHeaderDlg(
: ScHFEditDlg( pParent, rCoreSet, rPageStyle,
u"modules/scalc/ui/headerdialog.ui"_ustr, u"HeaderDialog"_ustr)
{
- AddTabPage(u"headerfirst"_ustr, ScFirstHeaderEditPage::Create, nullptr);
- AddTabPage(u"headerright"_ustr, ScRightHeaderEditPage::Create, nullptr);
- AddTabPage(u"headerleft"_ustr, ScLeftHeaderEditPage::Create, nullptr);
+ AddTabPage(u"headerfirst"_ustr, TabResId(RID_TAB_HEADER_FIRST.aLabel),
+ ScFirstHeaderEditPage::Create, RID_L + RID_TAB_HEADER_FIRST.sIconName);
+ AddTabPage(u"headerright"_ustr, TabResId(RID_TAB_HEADER_RIGHT.aLabel),
+ ScRightHeaderEditPage::Create, RID_L + RID_TAB_HEADER_RIGHT.sIconName);
+ AddTabPage(u"headerleft"_ustr, TabResId(RID_TAB_HEADER_LEFT.aLabel),
+ ScLeftHeaderEditPage::Create, RID_L + RID_TAB_HEADER_LEFT.sIconName);
}
ScHFEditFooterDlg::ScHFEditFooterDlg(
@@ -63,9 +68,12 @@ ScHFEditFooterDlg::ScHFEditFooterDlg(
: ScHFEditDlg( pParent, rCoreSet, rPageStyle,
u"modules/scalc/ui/footerdialog.ui"_ustr, u"FooterDialog"_ustr )
{
- AddTabPage(u"footerfirst"_ustr, ScFirstFooterEditPage::Create, nullptr);
- AddTabPage(u"footerright"_ustr, ScRightFooterEditPage::Create, nullptr);
- AddTabPage(u"footerleft"_ustr, ScLeftFooterEditPage::Create, nullptr);
+ AddTabPage(u"footerfirst"_ustr, TabResId(RID_TAB_FOOTER_FIRST.aLabel),
+ ScFirstFooterEditPage::Create, RID_L + RID_TAB_FOOTER_FIRST.sIconName);
+ AddTabPage(u"footerright"_ustr, TabResId(RID_TAB_FOOTER_RIGHT.aLabel),
+ ScRightFooterEditPage::Create, RID_L + RID_TAB_FOOTER_RIGHT.sIconName);
+ AddTabPage(u"footerleft"_ustr, TabResId(RID_TAB_FOOTER_LEFT.aLabel),
+ ScLeftFooterEditPage::Create, RID_L + RID_TAB_FOOTER_LEFT.sIconName);
}
ScHFEditSharedFirstHeaderDlg::ScHFEditSharedFirstHeaderDlg(
@@ -75,8 +83,10 @@ ScHFEditSharedFirstHeaderDlg::ScHFEditSharedFirstHeaderDlg(
: ScHFEditDlg( pParent, rCoreSet, rPageStyle,
u"modules/scalc/ui/sharedfirstheaderdialog.ui"_ustr, u"SharedFirstHeaderDialog"_ustr )
{
- AddTabPage(u"headerright"_ustr, ScRightHeaderEditPage::Create, nullptr);
- AddTabPage(u"headerleft"_ustr, ScLeftHeaderEditPage::Create, nullptr);
+ AddTabPage(u"headerright"_ustr, TabResId(RID_TAB_HEADER_RIGHT.aLabel),
+ ScRightHeaderEditPage::Create, RID_L + RID_TAB_HEADER_RIGHT.sIconName);
+ AddTabPage(u"headerleft"_ustr, TabResId(RID_TAB_HEADER_LEFT.aLabel),
+ ScLeftHeaderEditPage::Create, RID_L + RID_TAB_HEADER_LEFT.sIconName);
}
ScHFEditSharedFirstFooterDlg::ScHFEditSharedFirstFooterDlg(
@@ -86,8 +96,10 @@ ScHFEditSharedFirstFooterDlg::ScHFEditSharedFirstFooterDlg(
: ScHFEditDlg( pParent, rCoreSet, rPageStyle,
u"modules/scalc/ui/sharedfirstfooterdialog.ui"_ustr, u"SharedFirstFooterDialog"_ustr )
{
- AddTabPage(u"footerright"_ustr, ScRightFooterEditPage::Create, nullptr);
- AddTabPage(u"footerleft"_ustr, ScLeftFooterEditPage::Create, nullptr);
+ AddTabPage(u"footerright"_ustr, TabResId(RID_TAB_FOOTER_RIGHT.aLabel),
+ ScRightFooterEditPage::Create, RID_L + RID_TAB_FOOTER_RIGHT.sIconName);
+ AddTabPage(u"footerleft"_ustr, TabResId(RID_TAB_FOOTER_LEFT.aLabel),
+ ScLeftFooterEditPage::Create, RID_L + RID_TAB_FOOTER_LEFT.sIconName);
}
ScHFEditSharedLeftHeaderDlg::ScHFEditSharedLeftHeaderDlg(
@@ -97,8 +109,10 @@ ScHFEditSharedLeftHeaderDlg::ScHFEditSharedLeftHeaderDlg(
: ScHFEditDlg( pParent, rCoreSet, rPageStyle,
u"modules/scalc/ui/sharedleftheaderdialog.ui"_ustr, u"SharedLeftHeaderDialog"_ustr )
{
- AddTabPage(u"headerfirst"_ustr, ScFirstHeaderEditPage::Create, nullptr);
- AddTabPage(u"headerright"_ustr, ScRightHeaderEditPage::Create, nullptr);
+ AddTabPage(u"headerfirst"_ustr, TabResId(RID_TAB_HEADER_FIRST.aLabel),
+ ScFirstHeaderEditPage::Create, RID_L + RID_TAB_HEADER_FIRST.sIconName);
+ AddTabPage(u"headerright"_ustr, TabResId(RID_TAB_HEADER_RIGHT.aLabel),
+ ScRightHeaderEditPage::Create, RID_L + RID_TAB_HEADER_RIGHT.sIconName);
}
ScHFEditSharedLeftFooterDlg::ScHFEditSharedLeftFooterDlg(
@@ -108,18 +122,10 @@ ScHFEditSharedLeftFooterDlg::ScHFEditSharedLeftFooterDlg(
: ScHFEditDlg( pParent, rCoreSet, rPageStyle,
u"modules/scalc/ui/sharedleftfooterdialog.ui"_ustr, u"SharedLeftFooterDialog"_ustr )
{
- AddTabPage(u"footerfirst"_ustr, ScFirstFooterEditPage::Create, nullptr);
- AddTabPage(u"footerright"_ustr, ScRightFooterEditPage::Create, nullptr);
-}
-
-ScHFEditFirstHeaderDlg::ScHFEditFirstHeaderDlg(
- weld::Window* pParent,
- const SfxItemSet& rCoreSet,
- std::u16string_view rPageStyle)
- : ScHFEditDlg( pParent, rCoreSet, rPageStyle,
- u"modules/scalc/ui/firstheaderdialog.ui"_ustr, u"FirstHeaderDialog"_ustr )
-{
- AddTabPage(u"headerfirst"_ustr, ScFirstHeaderEditPage::Create, nullptr);
+ AddTabPage(u"footerfirst"_ustr, TabResId(RID_TAB_FOOTER_FIRST.aLabel),
+ ScFirstFooterEditPage::Create, RID_L + RID_TAB_FOOTER_FIRST.sIconName);
+ AddTabPage(u"footerright"_ustr, TabResId(RID_TAB_FOOTER_RIGHT.aLabel),
+ ScRightFooterEditPage::Create, RID_L + RID_TAB_FOOTER_RIGHT.sIconName);
}
ScHFEditLeftHeaderDlg::ScHFEditLeftHeaderDlg(
@@ -129,7 +135,8 @@ ScHFEditLeftHeaderDlg::ScHFEditLeftHeaderDlg(
: ScHFEditDlg( pParent, rCoreSet, rPageStyle,
u"modules/scalc/ui/leftheaderdialog.ui"_ustr, u"LeftHeaderDialog"_ustr )
{
- AddTabPage(u"headerleft"_ustr, ScLeftHeaderEditPage::Create, nullptr);
+ AddTabPage(u"headerleft"_ustr, TabResId(RID_TAB_HEADER_LEFT.aLabel),
+ ScLeftHeaderEditPage::Create, RID_L + RID_TAB_HEADER_LEFT.sIconName);
}
ScHFEditRightHeaderDlg::ScHFEditRightHeaderDlg(
@@ -139,17 +146,8 @@ ScHFEditRightHeaderDlg::ScHFEditRightHeaderDlg(
: ScHFEditDlg( pParent, rCoreSet, rPageStyle,
u"modules/scalc/ui/rightheaderdialog.ui"_ustr, u"RightHeaderDialog"_ustr )
{
- AddTabPage(u"headerright"_ustr, ScRightHeaderEditPage::Create, nullptr);
-}
-
-ScHFEditFirstFooterDlg::ScHFEditFirstFooterDlg(
- weld::Window* pParent,
- const SfxItemSet& rCoreSet,
- std::u16string_view rPageStyle)
- : ScHFEditDlg( pParent, rCoreSet, rPageStyle,
- u"modules/scalc/ui/firstfooterdialog.ui"_ustr, u"FirstFooterDialog"_ustr )
-{
- AddTabPage(u"footerfirst"_ustr, ScFirstFooterEditPage::Create, nullptr);
+ AddTabPage(u"headerright"_ustr, TabResId(RID_TAB_HEADER_RIGHT.aLabel),
+ ScRightHeaderEditPage::Create, RID_L + RID_TAB_HEADER_RIGHT.sIconName);
}
ScHFEditLeftFooterDlg::ScHFEditLeftFooterDlg(
@@ -159,7 +157,8 @@ ScHFEditLeftFooterDlg::ScHFEditLeftFooterDlg(
: ScHFEditDlg( pParent, rCoreSet, rPageStyle,
u"modules/scalc/ui/leftfooterdialog.ui"_ustr, u"LeftFooterDialog"_ustr )
{
- AddTabPage(u"footerleft"_ustr, ScLeftFooterEditPage::Create, nullptr);
+ AddTabPage(u"footerleft"_ustr, TabResId(RID_TAB_FOOTER_LEFT.aLabel),
+ ScLeftFooterEditPage::Create, RID_L + RID_TAB_FOOTER_LEFT.sIconName);
}
ScHFEditRightFooterDlg::ScHFEditRightFooterDlg(
@@ -169,7 +168,8 @@ ScHFEditRightFooterDlg::ScHFEditRightFooterDlg(
: ScHFEditDlg( pParent, rCoreSet, rPageStyle,
u"modules/scalc/ui/rightfooterdialog.ui"_ustr, u"RightFooterDialog"_ustr )
{
- AddTabPage(u"footerright"_ustr, ScRightFooterEditPage::Create, nullptr);
+ AddTabPage(u"footerright"_ustr, TabResId(RID_TAB_FOOTER_RIGHT.aLabel),
+ ScRightFooterEditPage::Create, RID_L + RID_TAB_FOOTER_RIGHT.sIconName);
}
ScHFEditSharedHeaderDlg::ScHFEditSharedHeaderDlg(
@@ -179,11 +179,16 @@ ScHFEditSharedHeaderDlg::ScHFEditSharedHeaderDlg(
: ScHFEditDlg( pParent, rCoreSet, rPageStyle,
u"modules/scalc/ui/sharedheaderdialog.ui"_ustr, u"SharedHeaderDialog"_ustr )
{
- AddTabPage(u"headerfirst"_ustr, ScFirstHeaderEditPage::Create, nullptr);
- AddTabPage(u"header"_ustr, ScRightHeaderEditPage::Create, nullptr);
- AddTabPage(u"footerfirst"_ustr, ScFirstFooterEditPage::Create, nullptr);
- AddTabPage(u"footerright"_ustr, ScRightFooterEditPage::Create, nullptr);
- AddTabPage(u"footerleft"_ustr, ScLeftFooterEditPage::Create, nullptr);
+ AddTabPage(u"headerfirst"_ustr, TabResId(RID_TAB_HEADER_FIRST.aLabel),
+ ScFirstHeaderEditPage::Create, RID_L + RID_TAB_HEADER_FIRST.sIconName);
+ AddTabPage(u"header"_ustr, TabResId(RID_TAB_HEADER.aLabel), ScRightHeaderEditPage::Create,
+ RID_L + RID_TAB_HEADER.sIconName);
+ AddTabPage(u"footerfirst"_ustr, TabResId(RID_TAB_FOOTER_FIRST.aLabel),
+ ScFirstFooterEditPage::Create, RID_L + RID_TAB_FOOTER_FIRST.sIconName);
+ AddTabPage(u"footerright"_ustr, TabResId(RID_TAB_FOOTER_RIGHT.aLabel),
+ ScRightFooterEditPage::Create, RID_L + RID_TAB_FOOTER_RIGHT.sIconName);
+ AddTabPage(u"footerleft"_ustr, TabResId(RID_TAB_FOOTER_LEFT.aLabel),
+ ScLeftFooterEditPage::Create, RID_L + RID_TAB_FOOTER_LEFT.sIconName);
}
ScHFEditSharedFooterDlg::ScHFEditSharedFooterDlg(
@@ -193,11 +198,16 @@ ScHFEditSharedFooterDlg::ScHFEditSharedFooterDlg(
: ScHFEditDlg( pParent, rCoreSet, rPageStyle,
u"modules/scalc/ui/sharedfooterdialog.ui"_ustr, u"SharedFooterDialog"_ustr )
{
- AddTabPage(u"headerfirst"_ustr, ScFirstFooterEditPage::Create, nullptr);
- AddTabPage(u"headerright"_ustr, ScRightHeaderEditPage::Create, nullptr);
- AddTabPage(u"headerleft"_ustr, ScLeftHeaderEditPage::Create, nullptr);
- AddTabPage(u"footerfirst"_ustr, ScFirstFooterEditPage::Create, nullptr);
- AddTabPage(u"footer"_ustr, ScRightFooterEditPage::Create, nullptr);
+ AddTabPage(u"headerfirst"_ustr, TabResId(RID_TAB_HEADER_FIRST.aLabel),
+ ScFirstHeaderEditPage::Create, RID_L + RID_TAB_HEADER_FIRST.sIconName);
+ AddTabPage(u"headerright"_ustr, TabResId(RID_TAB_HEADER_RIGHT.aLabel),
+ ScRightHeaderEditPage::Create, RID_L + RID_TAB_HEADER_RIGHT.sIconName);
+ AddTabPage(u"headerleft"_ustr, TabResId(RID_TAB_HEADER_LEFT.aLabel),
+ ScLeftHeaderEditPage::Create, RID_L + RID_TAB_HEADER_LEFT.sIconName);
+ AddTabPage(u"footerfirst"_ustr, TabResId(RID_TAB_FOOTER_FIRST.aLabel),
+ ScFirstFooterEditPage::Create, RID_L + RID_TAB_FOOTER_FIRST.sIconName);
+ AddTabPage(u"footer"_ustr, TabResId(RID_TAB_FOOTER.aLabel), ScRightFooterEditPage::Create,
+ RID_L + RID_TAB_FOOTER.sIconName);
}
ScHFEditAllDlg::ScHFEditAllDlg(
@@ -207,12 +217,18 @@ ScHFEditAllDlg::ScHFEditAllDlg(
: ScHFEditDlg( pParent, rCoreSet, rPageStyle,
u"modules/scalc/ui/allheaderfooterdialog.ui"_ustr, u"AllHeaderFooterDialog"_ustr )
{
- AddTabPage(u"headerfirst"_ustr, ScFirstHeaderEditPage::Create, nullptr);
- AddTabPage(u"headerright"_ustr, ScRightHeaderEditPage::Create, nullptr);
- AddTabPage(u"headerleft"_ustr, ScLeftHeaderEditPage::Create, nullptr);
- AddTabPage(u"footerfirst"_ustr, ScFirstFooterEditPage::Create, nullptr);
- AddTabPage(u"footerright"_ustr, ScRightFooterEditPage::Create, nullptr);
- AddTabPage(u"footerleft"_ustr, ScLeftFooterEditPage::Create, nullptr);
+ AddTabPage(u"headerfirst"_ustr, TabResId(RID_TAB_HEADER_FIRST.aLabel),
+ ScFirstHeaderEditPage::Create, RID_L + RID_TAB_HEADER_FIRST.sIconName);
+ AddTabPage(u"headerright"_ustr, TabResId(RID_TAB_HEADER_RIGHT.aLabel),
+ ScRightHeaderEditPage::Create, RID_L + RID_TAB_HEADER_RIGHT.sIconName);
+ AddTabPage(u"headerleft"_ustr, TabResId(RID_TAB_HEADER_LEFT.aLabel),
+ ScLeftHeaderEditPage::Create, RID_L + RID_TAB_HEADER_LEFT.sIconName);
+ AddTabPage(u"footerfirst"_ustr, TabResId(RID_TAB_FOOTER_FIRST.aLabel),
+ ScFirstFooterEditPage::Create, RID_L + RID_TAB_FOOTER_FIRST.sIconName);
+ AddTabPage(u"footerright"_ustr, TabResId(RID_TAB_FOOTER_RIGHT.aLabel),
+ ScRightFooterEditPage::Create, RID_L + RID_TAB_FOOTER_RIGHT.sIconName);
+ AddTabPage(u"footerleft"_ustr, TabResId(RID_TAB_FOOTER_LEFT.aLabel),
+ ScLeftFooterEditPage::Create, RID_L + RID_TAB_FOOTER_LEFT.sIconName);
}
ScHFEditActiveDlg::ScHFEditActiveDlg(
@@ -230,8 +246,10 @@ ScHFEditActiveDlg::ScHFEditActiveDlg(
if ( bRightPage )
{
- AddTabPage(u"header"_ustr, ScRightHeaderEditPage::Create, nullptr);
- AddTabPage(u"footer"_ustr, ScRightFooterEditPage::Create, nullptr);
+ AddTabPage(u"header"_ustr, TabResId(RID_TAB_HEADER.aLabel), ScRightHeaderEditPage::Create,
+ RID_L + RID_TAB_HEADER.sIconName);
+ AddTabPage(u"footer"_ustr, TabResId(RID_TAB_FOOTER.aLabel), ScRightFooterEditPage::Create,
+ RID_L + RID_TAB_FOOTER.sIconName);
}
else
{
@@ -239,17 +257,21 @@ ScHFEditActiveDlg::ScHFEditActiveDlg(
bool bShareHeader = rCoreSet.Get(ATTR_PAGE_HEADERSET).GetItemSet().
Get(ATTR_PAGE_SHARED).GetValue();
- if ( bShareHeader )
- AddTabPage(u"header"_ustr, ScRightHeaderEditPage::Create, nullptr);
+ if (bShareHeader)
+ AddTabPage(u"header"_ustr, TabResId(RID_TAB_HEADER_RIGHT.aLabel),
+ ScRightHeaderEditPage::Create, RID_L + RID_TAB_HEADER_RIGHT.sIconName);
else
- AddTabPage(u"header"_ustr, ScLeftHeaderEditPage::Create, nullptr);
+ AddTabPage(u"header"_ustr, TabResId(RID_TAB_HEADER_LEFT.aLabel),
+ ScLeftHeaderEditPage::Create, RID_L + RID_TAB_HEADER_LEFT.sIconName);
bool bShareFooter = rCoreSet.Get(ATTR_PAGE_FOOTERSET).GetItemSet().
Get(ATTR_PAGE_SHARED).GetValue();
- if ( bShareFooter )
- AddTabPage(u"footer"_ustr, ScRightFooterEditPage::Create, nullptr);
+ if (bShareFooter)
+ AddTabPage(u"footer"_ustr, TabResId(RID_TAB_FOOTER_RIGHT.aLabel),
+ ScRightFooterEditPage::Create, RID_L + RID_TAB_FOOTER_RIGHT.sIconName);
else
- AddTabPage(u"footer"_ustr, ScLeftFooterEditPage::Create, nullptr);
+ AddTabPage(u"footer"_ustr, TabResId(RID_TAB_FOOTER_LEFT.aLabel),
+ ScLeftFooterEditPage::Create, RID_L + RID_TAB_FOOTER_LEFT.sIconName);
}
}
diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
index e1b57ded2d89..04b62e2d52ed 100644
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
@@ -468,7 +468,7 @@ void CellAppearancePropertyPanel::UpdateControlState()
void CellAppearancePropertyPanel::UpdateCellBorder(bool bTop, bool bBot, bool bLeft, bool bRight,
bool bVer, bool bHor, bool bTLBR, bool bBLTR)
{
- const Size aBmpSize = maIMGCellBorder.GetBitmapEx().GetSizePixel();
+ const Size aBmpSize = maIMGCellBorder.GetBitmap().GetSizePixel();
if (aBmpSize.Width() == 43 && aBmpSize.Height() == 43)
{
diff --git a/sc/source/ui/sidebar/CellLineStyleValueSet.cxx b/sc/source/ui/sidebar/CellLineStyleValueSet.cxx
index b31ac611e729..a6c97eff30ce 100644
--- a/sc/source/ui/sidebar/CellLineStyleValueSet.cxx
+++ b/sc/source/ui/sidebar/CellLineStyleValueSet.cxx
@@ -93,7 +93,7 @@ void CellLineStyleValueSet::UserDraw( const UserDrawEvent& rUDEvt )
tools::Long nRectWidth = aRect.GetWidth();
Point aBLPos = aRect.TopLeft();
- pDev->Push(vcl::PushFlags::FONT | vcl::PushFlags::LINECOLOR | vcl::PushFlags::FILLCOLOR);
+ auto popIt = pDev->ScopedPush(vcl::PushFlags::FONT | vcl::PushFlags::LINECOLOR | vcl::PushFlags::FILLCOLOR);
vcl::Font aFont(OutputDevice::GetDefaultFont(DefaultFontType::UI_SANS, MsLangId::getConfiguredSystemLanguage(), GetDefaultFontFlags::OnlyOne));
Size aSize = aFont.GetFontSize();
@@ -174,8 +174,6 @@ void CellLineStyleValueSet::UserDraw( const UserDrawEvent& rUDEvt )
}
Invalidate( aRect );
- pDev->Pop();
-
}
} // end of namespace sc::sidebar
diff --git a/sc/source/ui/sidebar/ScPanelFactory.cxx b/sc/source/ui/sidebar/ScPanelFactory.cxx
index 833f2187df90..37df0fc263ab 100644
--- a/sc/source/ui/sidebar/ScPanelFactory.cxx
+++ b/sc/source/ui/sidebar/ScPanelFactory.cxx
@@ -91,7 +91,7 @@ Reference<ui::XUIElement> SAL_CALL ScPanelFactory::createUIElement (
}
else if (rsResourceURL.endsWith("/FunctionsPanel"))
{
- xPanel = std::make_unique<ScFunctionWin>(pParent);
+ xPanel = std::make_unique<ScFunctionWin>(pParent, pBindings);
nMinimumSize = 0;
}
diff --git a/sc/source/ui/sparklines/SparklineList.cxx b/sc/source/ui/sparklines/SparklineList.cxx
index 1cae3089616d..1d6ea93e591a 100644
--- a/sc/source/ui/sparklines/SparklineList.cxx
+++ b/sc/source/ui/sparklines/SparklineList.cxx
@@ -58,7 +58,7 @@ std::vector<std::shared_ptr<SparklineGroup>> SparklineList::getSparklineGroups()
auto pWeakGroup = *iterator;
if (auto pSparklineGroup = pWeakGroup.lock())
{
- toReturn.push_back(pSparklineGroup);
+ toReturn.push_back(std::move(pSparklineGroup));
iterator++;
}
else
@@ -86,7 +86,7 @@ SparklineList::getSparklinesFor(std::shared_ptr<SparklineGroup> const& pSparklin
{
if (auto aSparkline = iterator->lock())
{
- toReturn.push_back(aSparkline);
+ toReturn.push_back(std::move(aSparkline));
iterator++;
}
else
diff --git a/sc/source/ui/styleui/styledlg.cxx b/sc/source/ui/styleui/styledlg.cxx
index 0d3332ef6fe4..5253a040edd8 100644
--- a/sc/source/ui/styleui/styledlg.cxx
+++ b/sc/source/ui/styleui/styledlg.cxx
@@ -39,6 +39,8 @@
#include <editeng/flstitem.hxx>
#include <svx/flagsdef.hxx>
+#include <vcl/tabs.hrc>
+
ScStyleDlg::ScStyleDlg(weld::Window* pParent,
SfxStyleSheetBase& rStyleBase,
bool bPage)
@@ -52,31 +54,43 @@ ScStyleDlg::ScStyleDlg(weld::Window* pParent,
rStyleBase )
, m_bPage(bPage)
{
- SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
if (m_bPage) // page styles
{
- AddTabPage(u"page"_ustr, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_PAGE ) );
- AddTabPage(u"borders"_ustr, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) );
- AddTabPage(u"background"_ustr, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BKG ) );
- AddTabPage(u"header"_ustr, &ScHeaderPage::Create, &ScHeaderPage::GetRanges );
- AddTabPage(u"footer"_ustr, &ScFooterPage::Create, &ScFooterPage::GetRanges );
- AddTabPage(u"sheet"_ustr, &ScTablePage::Create, &ScTablePage::GetRanges );
+ AddTabPage(u"page"_ustr, TabResId(RID_TAB_PAGE.aLabel), RID_SVXPAGE_PAGE,
+ RID_M + RID_TAB_PAGE.sIconName);
+ AddTabPage(u"borders"_ustr, TabResId(RID_TAB_BORDER.aLabel), RID_SVXPAGE_BORDER,
+ RID_M + RID_TAB_BORDER.sIconName);
+ AddTabPage(u"background"_ustr, TabResId(RID_TAB_BACKGROUND.aLabel), RID_SVXPAGE_BKG,
+ RID_M + RID_TAB_BACKGROUND.sIconName);
+ AddTabPage(u"header"_ustr, TabResId(RID_TAB_HEADER.aLabel), &ScHeaderPage::Create,
+ &ScHeaderPage::GetRanges, RID_M + RID_TAB_HEADER.sIconName);
+ AddTabPage(u"footer"_ustr, TabResId(RID_TAB_FOOTER.aLabel), &ScFooterPage::Create,
+ &ScFooterPage::GetRanges, RID_M + RID_TAB_FOOTER.sIconName);
+ AddTabPage(u"sheet"_ustr, TabResId(RID_TAB_SHEET.aLabel), &ScTablePage::Create,
+ &ScTablePage::GetRanges, RID_M + RID_TAB_SHEET.sIconName);
}
else // cell format styles
{
- AddTabPage(u"numbers"_ustr, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_NUMBERFORMAT ));
- AddTabPage(u"font"_ustr, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_NAME ));
- AddTabPage(u"fonteffects"_ustr, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_EFFECTS ));
- AddTabPage(u"alignment"_ustr, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_ALIGNMENT ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_ALIGNMENT ));
- if ( SvtCJKOptions::IsAsianTypographyEnabled() )
+ AddTabPage(u"numbers"_ustr, TabResId(RID_TAB_NUMBERS.aLabel), RID_SVXPAGE_NUMBERFORMAT,
+ RID_M + RID_TAB_NUMBERS.sIconName);
+ AddTabPage(u"font"_ustr, TabResId(RID_TAB_FONT.aLabel), RID_SVXPAGE_CHAR_NAME,
+ RID_M + RID_TAB_FONT.sIconName);
+ AddTabPage(u"fonteffects"_ustr, TabResId(RID_TAB_FONTEFFECTS.aLabel),
+ RID_SVXPAGE_CHAR_EFFECTS, RID_M + RID_TAB_FONTEFFECTS.sIconName);
+ AddTabPage(u"alignment"_ustr, TabResId(RID_TAB_ALIGNMENT.aLabel), RID_SVXPAGE_ALIGNMENT,
+ RID_M + RID_TAB_ALIGNMENT.sIconName);
+ if (SvtCJKOptions::IsAsianTypographyEnabled())
{
- AddTabPage(u"asiantypo"_ustr, pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN), pFact->GetTabPageRangesFunc(RID_SVXPAGE_PARA_ASIAN));
+ AddTabPage(u"asiantypo"_ustr, TabResId(RID_TAB_ASIANTYPO.aLabel),
+ RID_SVXPAGE_PARA_ASIAN, RID_M + RID_TAB_ASIANTYPO.sIconName);
}
- else
- RemoveTabPage(u"asiantypo"_ustr);
- AddTabPage(u"borders"_ustr, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ));
- AddTabPage(u"background"_ustr, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BKG ));
- AddTabPage(u"protection"_ustr, &ScTabPageProtection::Create, &ScTabPageProtection::GetRanges);
+ AddTabPage(u"borders"_ustr, TabResId(RID_TAB_BORDER.aLabel), RID_SVXPAGE_BORDER,
+ RID_M + RID_TAB_BORDER.sIconName);
+ AddTabPage(u"background"_ustr, TabResId(RID_TAB_BACKGROUND.aLabel), RID_SVXPAGE_BKG,
+ RID_M + RID_TAB_BACKGROUND.sIconName);
+ AddTabPage(u"protection"_ustr, TabResId(RID_TAB_PROTECTION.aLabel),
+ &ScTabPageProtection::Create, &ScTabPageProtection::GetRanges,
+ RID_M + RID_TAB_PROTECTION.sIconName);
}
}
@@ -143,23 +157,35 @@ ScDrawStyleDlg::ScDrawStyleDlg(weld::Window* pParent, SfxStyleSheetBase& rStyleB
: SfxStyleDialogController(pParent, u"modules/scalc/ui/drawtemplatedialog.ui"_ustr, u"DrawTemplateDialog"_ustr, rStyleBase)
, mpView(pView)
{
- AddTabPage(u"line"_ustr, RID_SVXPAGE_LINE);
- AddTabPage(u"area"_ustr, RID_SVXPAGE_AREA);
- AddTabPage(u"shadowing"_ustr, RID_SVXPAGE_SHADOW);
- AddTabPage(u"transparency"_ustr, RID_SVXPAGE_TRANSPARENCE);
- AddTabPage(u"font"_ustr, RID_SVXPAGE_CHAR_NAME);
- AddTabPage(u"fonteffect"_ustr, RID_SVXPAGE_CHAR_EFFECTS);
- AddTabPage(u"background"_ustr, RID_SVXPAGE_BKG);
- AddTabPage(u"indents"_ustr, RID_SVXPAGE_STD_PARAGRAPH);
- AddTabPage(u"text"_ustr, RID_SVXPAGE_TEXTATTR);
- AddTabPage(u"animation"_ustr, RID_SVXPAGE_TEXTANIMATION);
- AddTabPage(u"dimensioning"_ustr, RID_SVXPAGE_MEASURE);
- AddTabPage(u"alignment"_ustr, RID_SVXPAGE_ALIGN_PARAGRAPH);
- AddTabPage(u"tabs"_ustr, RID_SVXPAGE_TABULATOR);
+ AddTabPage(u"line"_ustr, TabResId(RID_TAB_LINE.aLabel), RID_SVXPAGE_LINE,
+ RID_M + RID_TAB_LINE.sIconName);
+ AddTabPage(u"area"_ustr, TabResId(RID_TAB_AREA.aLabel), RID_SVXPAGE_AREA,
+ RID_M + RID_TAB_AREA.sIconName);
+ AddTabPage(u"shadowing"_ustr, TabResId(RID_TAB_SHADOW.aLabel), RID_SVXPAGE_SHADOW,
+ RID_M + RID_TAB_SHADOW.sIconName);
+ AddTabPage(u"transparency"_ustr, TabResId(RID_TAB_TRANSPARENCE.aLabel),
+ RID_SVXPAGE_TRANSPARENCE, RID_M + RID_TAB_TRANSPARENCE.sIconName);
+ AddTabPage(u"font"_ustr, TabResId(RID_TAB_FONT.aLabel), RID_SVXPAGE_CHAR_NAME,
+ RID_M + RID_TAB_FONT.sIconName);
+ AddTabPage(u"fonteffect"_ustr, TabResId(RID_TAB_FONTEFFECTS.aLabel), RID_SVXPAGE_CHAR_EFFECTS,
+ RID_M + RID_TAB_FONTEFFECTS.sIconName);
+ AddTabPage(u"indents"_ustr, TabResId(RID_TAB_INDENTS.aLabel), RID_SVXPAGE_STD_PARAGRAPH,
+ RID_M + RID_TAB_INDENTS.sIconName);
+ AddTabPage(u"text"_ustr, TabResId(RID_TAB_TEXT.aLabel), RID_SVXPAGE_TEXTATTR,
+ RID_M + RID_TAB_TEXT.sIconName);
+ AddTabPage(u"animation"_ustr, TabResId(RID_TAB_TEXTANIMATION.aLabel), RID_SVXPAGE_TEXTANIMATION,
+ RID_M + RID_TAB_TEXTANIMATION.sIconName);
+ AddTabPage(u"dimensioning"_ustr, TabResId(RID_TAB_DIMENSIONING.aLabel), RID_SVXPAGE_MEASURE,
+ RID_M + RID_TAB_DIMENSIONING.sIconName);
+ AddTabPage(u"alignment"_ustr, TabResId(RID_TAB_ALIGNMENT.aLabel), RID_SVXPAGE_ALIGN_PARAGRAPH,
+ RID_M + RID_TAB_ALIGNMENT.sIconName);
if (SvtCJKOptions::IsAsianTypographyEnabled())
- AddTabPage(u"asiantypo"_ustr, RID_SVXPAGE_PARA_ASIAN);
- else
- RemoveTabPage(u"asiantypo"_ustr);
+ AddTabPage(u"asiantypo"_ustr, TabResId(RID_TAB_ASIANTYPO.aLabel), RID_SVXPAGE_PARA_ASIAN,
+ RID_M + RID_TAB_ASIANTYPO.sIconName);
+ AddTabPage(u"tabs"_ustr, TabResId(RID_TAB_TABS.aLabel), RID_SVXPAGE_TABULATOR,
+ RID_M + RID_TAB_TABS.sIconName);
+ AddTabPage(u"background"_ustr, TabResId(RID_TAB_HIGHLIGHTING.aLabel), RID_SVXPAGE_BKG,
+ RID_M + RID_TAB_HIGHLIGHTING.sIconName);
}
void ScDrawStyleDlg::PageCreated(const OUString& rPageId, SfxTabPage& rTabPage)
diff --git a/sc/source/ui/theme/ThemeColorChanger.cxx b/sc/source/ui/theme/ThemeColorChanger.cxx
index bbe2f328f69c..aa4dd38e1f47 100644
--- a/sc/source/ui/theme/ThemeColorChanger.cxx
+++ b/sc/source/ui/theme/ThemeColorChanger.cxx
@@ -172,7 +172,7 @@ bool changeSheets(ScDocShell& rDocShell, ScTabViewShell* pViewShell, ScDrawLayer
continue;
ScPatternAttr aNewPattern(*pPattern);
- auto& rItemSet = aNewPattern.GetItemSet();
+ auto& rItemSet = aNewPattern.GetItemSetWritable();
bool bItemChanged = changeCellItems(rItemSet, rColorSet);
bChanged = bChanged || bItemChanged;
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index 4fa1085f2748..52154dcb1029 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -475,7 +475,7 @@ void ScUndoDeleteCells::DoChange( const bool bUndo )
ScMarkData aMarkData(rDoc.GetSheetLimits());
aMarkData.SelectOneTable( aWorkRange.aStart.Tab() );
ScPatternAttr aPattern(rDoc.getCellAttributeHelper());
- aPattern.GetItemSet().Put( ScMergeFlagAttr() );
+ aPattern.ItemSetPut(ScMergeFlagAttr());
rDoc.ApplyPatternArea( aWorkRange.aStart.Col(), aWorkRange.aStart.Row(),
aWorkRange.aEnd.Col(), aWorkRange.aEnd.Row(),
aMarkData, aPattern );
@@ -2336,8 +2336,6 @@ void ScUndoRemoveMerge::AddCellMergeOption( const ScCellMergeOption& rOption )
void ScUndoRemoveMerge::Undo()
{
- using ::std::set;
-
SetCurTab();
BeginUndo();
@@ -2372,8 +2370,6 @@ void ScUndoRemoveMerge::Undo()
void ScUndoRemoveMerge::Redo()
{
- using ::std::set;
-
SetCurTab();
BeginRedo();
@@ -2389,7 +2385,7 @@ void ScUndoRemoveMerge::Redo()
const SfxPoolItem& rDefAttr = rDoc.GetPool()->GetUserOrPoolDefaultItem( ATTR_MERGE );
ScPatternAttr aPattern(rDoc.getCellAttributeHelper());
- aPattern.GetItemSet().Put( rDefAttr );
+ aPattern.ItemSetPut(rDefAttr);
rDoc.ApplyPatternAreaTab( rOption.mnStartCol, rOption.mnStartRow,
rOption.mnEndCol, rOption.mnEndRow, nTab,
aPattern );
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index db6375e9f7c5..a8944a993851 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -653,8 +653,6 @@ OUString ScUndoMerge::GetComment() const
void ScUndoMerge::DoChange( bool bUndo ) const
{
- using ::std::set;
-
if (maOption.maTabs.empty())
// Nothing to do.
return;
diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx
index ac2619b9ff13..724da8cd5676 100644
--- a/sc/source/ui/undo/undocell.cxx
+++ b/sc/source/ui/undo/undocell.cxx
@@ -247,7 +247,7 @@ void ScUndoEnterData::Undo()
else
{
ScPatternAttr* pPattern(new ScPatternAttr(*rDoc.GetPattern(maPos.Col(), maPos.Row(), rVal.mnTab)));
- pPattern->GetItemSet().ClearItem( ATTR_VALUE_FORMAT );
+ pPattern->ItemSetClearItem(ATTR_VALUE_FORMAT);
rDoc.SetPattern(maPos.Col(), maPos.Row(), rVal.mnTab, CellAttributeHolder(pPattern, true));
}
rDocShell.PostPaintCell(maPos.Col(), maPos.Row(), rVal.mnTab);
diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx
index 7820d60da6a1..8b9ff7a4a814 100644
--- a/sc/source/ui/undo/undodat.cxx
+++ b/sc/source/ui/undo/undodat.cxx
@@ -1266,10 +1266,12 @@ void ScUndoImportData::Repeat(SfxRepeatTarget& rTarget)
{
ScTabViewShell& rViewShell = pViewTarget->GetViewShell();
- SCTAB nDummy;
ScImportParam aNewParam(aImportParam);
- ScDBData* pDBData = rViewShell.GetDBData();
- pDBData->GetArea( nDummy, aNewParam.nCol1,aNewParam.nRow1, aNewParam.nCol2,aNewParam.nRow2 );
+ if (ScDBData* pDBData = rViewShell.GetDBData())
+ {
+ SCTAB nDummy;
+ pDBData->GetArea( nDummy, aNewParam.nCol1,aNewParam.nRow1, aNewParam.nCol2,aNewParam.nRow2 );
+ }
rViewShell.ImportData( aNewParam );
}
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 8d907bfc24bd..b68735b0b2dc 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -58,8 +58,6 @@
#include <vector>
using namespace com::sun::star;
-using ::std::unique_ptr;
-using ::std::vector;
namespace
{
@@ -335,7 +333,7 @@ bool ScUndoInsertTables::CanRepeat(SfxRepeatTarget& rTarget) const
return dynamic_cast<const ScTabViewTarget*>( &rTarget) != nullptr;
}
-ScUndoDeleteTab::ScUndoDeleteTab( ScDocShell& rNewDocShell, const vector<SCTAB> &aTab,
+ScUndoDeleteTab::ScUndoDeleteTab( ScDocShell& rNewDocShell, const std::vector<SCTAB> &aTab,
ScDocumentUniquePtr pUndoDocument, std::unique_ptr<ScRefUndoData> pRefData ) :
ScMoveUndo( rNewDocShell, std::move(pUndoDocument), std::move(pRefData) )
{
@@ -574,8 +572,8 @@ bool ScUndoRenameTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const
}
ScUndoMoveTab::ScUndoMoveTab(
- ScDocShell& rNewDocShell, std::unique_ptr<vector<SCTAB>> pOldTabs, std::unique_ptr<vector<SCTAB>> pNewTabs,
- std::unique_ptr<vector<OUString>> pOldNames, std::unique_ptr<vector<OUString>> pNewNames) :
+ ScDocShell& rNewDocShell, std::unique_ptr<std::vector<SCTAB>> pOldTabs, std::unique_ptr<std::vector<SCTAB>> pNewTabs,
+ std::unique_ptr<std::vector<OUString>> pOldNames, std::unique_ptr<std::vector<OUString>> pNewNames) :
ScSimpleUndo( rNewDocShell ),
mpOldTabs(std::move(pOldTabs)), mpNewTabs(std::move(pNewTabs)),
mpOldNames(std::move(pOldNames)), mpNewNames(std::move(pNewNames))
@@ -686,8 +684,8 @@ bool ScUndoMoveTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const
ScUndoCopyTab::ScUndoCopyTab(
ScDocShell& rNewDocShell,
- std::unique_ptr<vector<SCTAB>> pOldTabs, std::unique_ptr<vector<SCTAB>> pNewTabs,
- std::unique_ptr<vector<OUString>> pNewNames) :
+ std::unique_ptr<std::vector<SCTAB>> pOldTabs, std::unique_ptr<std::vector<SCTAB>> pNewTabs,
+ std::unique_ptr<std::vector<OUString>> pNewNames) :
ScSimpleUndo( rNewDocShell ),
mpOldTabs(std::move(pOldTabs)),
mpNewTabs(std::move(pNewTabs)),
@@ -731,7 +729,7 @@ void ScUndoCopyTab::Undo()
DoSdrUndoAction( pDrawUndo.get(), &rDoc ); // before the sheets are deleted
- vector<SCTAB>::const_reverse_iterator itr, itrEnd = mpNewTabs->rend();
+ std::vector<SCTAB>::const_reverse_iterator itr, itrEnd = mpNewTabs->rend();
for (itr = mpNewTabs->rbegin(); itr != itrEnd; ++itr)
{
SCTAB nDestTab = *itr;
@@ -1276,7 +1274,7 @@ OUString ScUndoShowHideTab::GetComment() const
return ScResId(pId);
}
-ScUndoDocProtect::ScUndoDocProtect(ScDocShell& rShell, unique_ptr<ScDocProtection> && pProtectSettings) :
+ScUndoDocProtect::ScUndoDocProtect(ScDocShell& rShell, std::unique_ptr<ScDocProtection> && pProtectSettings) :
ScSimpleUndo(rShell),
mpProtectSettings(std::move(pProtectSettings))
{
@@ -1293,7 +1291,7 @@ void ScUndoDocProtect::DoProtect(bool bProtect)
if (bProtect)
{
// set protection.
- unique_ptr<ScDocProtection> pCopy(new ScDocProtection(*mpProtectSettings));
+ std::unique_ptr<ScDocProtection> pCopy(new ScDocProtection(*mpProtectSettings));
pCopy->setProtected(true);
rDoc.SetDocProtection(pCopy.get());
}
@@ -1343,7 +1341,7 @@ OUString ScUndoDocProtect::GetComment() const
return ScResId(pId);
}
-ScUndoTabProtect::ScUndoTabProtect(ScDocShell& rShell, SCTAB nTab, unique_ptr<ScTableProtection> && pProtectSettings) :
+ScUndoTabProtect::ScUndoTabProtect(ScDocShell& rShell, SCTAB nTab, std::unique_ptr<ScTableProtection> && pProtectSettings) :
ScSimpleUndo(rShell),
mnTab(nTab),
mpProtectSettings(std::move(pProtectSettings))
@@ -1361,7 +1359,7 @@ void ScUndoTabProtect::DoProtect(bool bProtect)
if (bProtect)
{
// set protection.
- unique_ptr<ScTableProtection> pCopy(new ScTableProtection(*mpProtectSettings));
+ std::unique_ptr<ScTableProtection> pCopy(new ScTableProtection(*mpProtectSettings));
pCopy->setProtected(true);
rDoc.SetTabProtection(mnTab, pCopy.get());
}
diff --git a/sc/source/ui/unoobj/ChartTools.cxx b/sc/source/ui/unoobj/ChartTools.cxx
index 90c550e95cf4..eabb6a84dcec 100644
--- a/sc/source/ui/unoobj/ChartTools.cxx
+++ b/sc/source/ui/unoobj/ChartTools.cxx
@@ -21,7 +21,7 @@
using namespace css;
-namespace sc::tools {
+namespace sctools {
namespace {
@@ -155,7 +155,7 @@ std::vector<SdrOle2Obj*> getAllPivotChartsConnectedTo(std::u16string_view sPivot
if (!pPage)
continue;
- sc::tools::ChartIterator aIterator(&rDocShell, nPageNo, ChartSourceType::PIVOT_TABLE);
+ ChartIterator aIterator(&rDocShell, nPageNo, ChartSourceType::PIVOT_TABLE);
SdrOle2Obj* pObject = aIterator.next();
while (pObject)
{
@@ -169,6 +169,6 @@ std::vector<SdrOle2Obj*> getAllPivotChartsConnectedTo(std::u16string_view sPivot
return aObjects;
}
-} // end sc::tools
+} // end sctools
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/TablePivotChart.cxx b/sc/source/ui/unoobj/TablePivotChart.cxx
index 9b17b355de9a..60dac16f17c9 100644
--- a/sc/source/ui/unoobj/TablePivotChart.cxx
+++ b/sc/source/ui/unoobj/TablePivotChart.cxx
@@ -56,7 +56,7 @@ void TablePivotChart::Notify(SfxBroadcaster&, const SfxHint& rHint)
uno::Reference<lang::XComponent> SAL_CALL TablePivotChart::getEmbeddedObject()
{
SolarMutexGuard aGuard;
- SdrOle2Obj* pObject = sc::tools::findChartsByName(m_pDocShell, m_nTab, m_aChartName, sc::tools::ChartSourceType::PIVOT_TABLE);
+ SdrOle2Obj* pObject = sctools::findChartsByName(m_pDocShell, m_nTab, m_aChartName, sctools::ChartSourceType::PIVOT_TABLE);
if (pObject && svt::EmbeddedObjectRef::TryRunningState(pObject->GetObjRef()))
return uno::Reference<lang::XComponent>(pObject->GetObjRef()->getComponent(), uno::UNO_QUERY);
return nullptr;
@@ -80,7 +80,7 @@ OUString SAL_CALL TablePivotChart::getPivotTableName()
{
SolarMutexGuard aGuard;
- SdrOle2Obj* pObject = sc::tools::findChartsByName(m_pDocShell, m_nTab, m_aChartName, sc::tools::ChartSourceType::PIVOT_TABLE);
+ SdrOle2Obj* pObject = sctools::findChartsByName(m_pDocShell, m_nTab, m_aChartName, sctools::ChartSourceType::PIVOT_TABLE);
if (!pObject)
return OUString();
diff --git a/sc/source/ui/unoobj/TablePivotCharts.cxx b/sc/source/ui/unoobj/TablePivotCharts.cxx
index 688d872ef864..9a4ab31c6b31 100644
--- a/sc/source/ui/unoobj/TablePivotCharts.cxx
+++ b/sc/source/ui/unoobj/TablePivotCharts.cxx
@@ -164,7 +164,7 @@ void SAL_CALL TablePivotCharts::addNewByName(OUString const & rName,
void SAL_CALL TablePivotCharts::removeByName(const OUString& rName)
{
SolarMutexGuard aGuard;
- SdrOle2Obj* pObject = sc::tools::findChartsByName(m_pDocShell, m_nTab, rName, sc::tools::ChartSourceType::PIVOT_TABLE);
+ SdrOle2Obj* pObject = sctools::findChartsByName(m_pDocShell, m_nTab, rName, sctools::ChartSourceType::PIVOT_TABLE);
if (pObject)
{
ScDocument& rDoc = m_pDocShell->GetDocument();
@@ -184,7 +184,7 @@ sal_Int32 SAL_CALL TablePivotCharts::getCount()
if (!m_pDocShell)
return nCount;
- sc::tools::ChartIterator aIterator(m_pDocShell, m_nTab, sc::tools::ChartSourceType::PIVOT_TABLE);
+ sctools::ChartIterator aIterator(m_pDocShell, m_nTab, sctools::ChartSourceType::PIVOT_TABLE);
SdrOle2Obj* pOleObject = aIterator.next();
while (pOleObject)
@@ -199,8 +199,8 @@ sal_Int32 SAL_CALL TablePivotCharts::getCount()
uno::Any SAL_CALL TablePivotCharts::getByIndex(sal_Int32 nIndex)
{
SolarMutexGuard aGuard;
- SdrOle2Obj* pObject = sc::tools::getChartByIndex(m_pDocShell, m_nTab, nIndex,
- sc::tools::ChartSourceType::PIVOT_TABLE);
+ SdrOle2Obj* pObject = sctools::getChartByIndex(m_pDocShell, m_nTab, nIndex,
+ sctools::ChartSourceType::PIVOT_TABLE);
if (!pObject)
throw lang::IndexOutOfBoundsException();
@@ -234,7 +234,7 @@ uno::Any SAL_CALL TablePivotCharts::getByName(OUString const & rName)
{
SolarMutexGuard aGuard;
- if (!sc::tools::findChartsByName(m_pDocShell, m_nTab, rName, sc::tools::ChartSourceType::PIVOT_TABLE))
+ if (!sctools::findChartsByName(m_pDocShell, m_nTab, rName, sctools::ChartSourceType::PIVOT_TABLE))
throw container::NoSuchElementException();
uno::Reference<table::XTablePivotChart> xChart(new TablePivotChart(m_pDocShell, m_nTab, rName));
@@ -249,7 +249,7 @@ uno::Sequence<OUString> SAL_CALL TablePivotCharts::getElementNames()
SolarMutexGuard aGuard;
std::vector<OUString> aElements;
- sc::tools::ChartIterator aIterator(m_pDocShell, m_nTab, sc::tools::ChartSourceType::PIVOT_TABLE);
+ sctools::ChartIterator aIterator(m_pDocShell, m_nTab, sctools::ChartSourceType::PIVOT_TABLE);
SdrOle2Obj* pOleObject = aIterator.next();
while (pOleObject)
@@ -269,7 +269,7 @@ sal_Bool SAL_CALL TablePivotCharts::hasByName(OUString const & rName)
{
SolarMutexGuard aGuard;
- return sc::tools::findChartsByName(m_pDocShell, m_nTab, rName, sc::tools::ChartSourceType::PIVOT_TABLE) != nullptr;
+ return sctools::findChartsByName(m_pDocShell, m_nTab, rName, sctools::ChartSourceType::PIVOT_TABLE) != nullptr;
}
} // end sc namespace
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 60d2bbc51bbc..b6ecd0cce147 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -1975,7 +1975,7 @@ static void lcl_SetCellProperty( const SfxItemPropertyMapEntry& rEntry, const un
rFirstItemId = rEntry.nWID;
rSecondItemId = 0;
- SfxItemSet& rSet = rPattern.GetItemSet();
+ SfxItemSet& rSet = rPattern.GetItemSetWritable();
switch ( rEntry.nWID )
{
case ATTR_VALUE_FORMAT:
@@ -2112,7 +2112,7 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertyMapEntry* pEntr
// ClearInvalidItems, so that in any case we have an item with the correct type
ScPatternAttr aPattern( *GetCurrentAttrsDeep() );
- SfxItemSet& rSet = aPattern.GetItemSet();
+ SfxItemSet& rSet = aPattern.GetItemSetWritable();
rSet.ClearInvalidItems();
sal_uInt16 nFirstItem, nSecondItem;
@@ -2145,7 +2145,6 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertyMapEntry* pEntr
OUString aStr = aCell.getString(rDoc);
EditEngine aEngine( rDoc.GetEditEnginePool() );
- aEngine.SetEditTextObjectPool(rDoc.GetEditTextObjectPool());
/* EE_CHAR_ESCAPEMENT seems to be set on the cell _only_ when
* there are no other attribs for the cell.
@@ -2280,7 +2279,7 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertyMapEntry* pEntr
pNewData.reset();
ScPatternAttr aPattern(rDoc.getCellAttributeHelper());
- aPattern.GetItemSet().Put( SfxUInt32Item( ATTR_VALIDDATA, nIndex ) );
+ aPattern.ItemSetPut(SfxUInt32Item(ATTR_VALIDDATA, nIndex));
pDocShell->GetDocFunc().ApplyAttributes( *GetMarkData(), aPattern, true );
}
}
@@ -2502,7 +2501,7 @@ void ScCellRangesBase::setValidation(const rtl::Reference<ScTableValidationObj>&
pNewData.reset();
ScPatternAttr aPattern(rDoc.getCellAttributeHelper());
- aPattern.GetItemSet().Put( SfxUInt32Item( ATTR_VALIDDATA, nIndex ) );
+ aPattern.ItemSetPut(SfxUInt32Item(ATTR_VALIDDATA, nIndex));
pDocShell->GetDocFunc().ApplyAttributes( *GetMarkData(), aPattern, true );
}
@@ -2599,7 +2598,7 @@ void SAL_CALL ScCellRangesBase::setPropertyValues( const uno::Sequence< OUString
if ( !pOldPattern )
{
pOldPattern.reset(new ScPatternAttr( *GetCurrentAttrsDeep() ));
- pOldPattern->GetItemSet().ClearInvalidItems();
+ pOldPattern->GetItemSetWritable().ClearInvalidItems();
pNewPattern.reset(new ScPatternAttr(rDoc.getCellAttributeHelper()));
}
@@ -2610,9 +2609,9 @@ void SAL_CALL ScCellRangesBase::setPropertyValues( const uno::Sequence< OUString
// put only affected items into new set
if ( nFirstItem )
- pNewPattern->GetItemSet().Put( pOldPattern->GetItemSet().Get( nFirstItem ) );
+ pNewPattern->ItemSetPut(pOldPattern->GetItemSet().Get(nFirstItem));
if ( nSecondItem )
- pNewPattern->GetItemSet().Put( pOldPattern->GetItemSet().Get( nSecondItem ) );
+ pNewPattern->ItemSetPut(pOldPattern->GetItemSet().Get(nSecondItem));
}
else if ( pEntry->nWID != SC_WID_UNO_CELLSTYL ) // CellStyle is handled above
{
@@ -2735,7 +2734,7 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL ScCellRangesBase::set
if ( !pOldPattern )
{
pOldPattern.reset(new ScPatternAttr( *GetCurrentAttrsDeep() ));
- pOldPattern->GetItemSet().ClearInvalidItems();
+ pOldPattern->GetItemSetWritable().ClearInvalidItems();
pNewPattern.reset(new ScPatternAttr(rDoc.getCellAttributeHelper()));
}
@@ -2747,9 +2746,9 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL ScCellRangesBase::set
// put only affected items into new set
if ( nFirstItem )
- pNewPattern->GetItemSet().Put( pOldPattern->GetItemSet().Get( nFirstItem ) );
+ pNewPattern->ItemSetPut(pOldPattern->GetItemSet().Get(nFirstItem));
if ( nSecondItem )
- pNewPattern->GetItemSet().Put( pOldPattern->GetItemSet().Get( nSecondItem ) );
+ pNewPattern->ItemSetPut(pOldPattern->GetItemSet().Get(nSecondItem));
}
catch ( lang::IllegalArgumentException& )
{
@@ -5829,7 +5828,7 @@ void ScCellObj::InputEnglishString( const OUString& rText )
if (nNewFormat != nOldFormat)
{
ScPatternAttr aPattern(rDoc.getCellAttributeHelper());
- aPattern.GetItemSet().Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNewFormat ) );
+ aPattern.ItemSetPut(SfxUInt32Item(ATTR_VALUE_FORMAT, nNewFormat));
// ATTR_LANGUAGE_FORMAT remains unchanged
rFunc.ApplyAttributes( *GetMarkData(), aPattern, true );
}
@@ -7520,8 +7519,8 @@ void SAL_CALL ScTableSheetObj::addRanges( const uno::Sequence<table::CellRangeAd
// Scenario ranges are tagged with attribute
ScPatternAttr aPattern(rDoc.getCellAttributeHelper());
- aPattern.GetItemSet().Put( ScMergeFlagAttr( ScMF::Scenario ) );
- aPattern.GetItemSet().Put( ScProtectionAttr( true ) );
+ aPattern.ItemSetPut(ScMergeFlagAttr(ScMF::Scenario));
+ aPattern.ItemSetPut(ScProtectionAttr(true));
pDocSh->GetDocFunc().ApplyAttributes( aMarkData, aPattern, true );
}
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index ddb2293233e5..224dcb33bbdb 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -71,11 +71,6 @@ SC_SIMPLE_SERVICE_INFO( ScChart2DataSequence, u"ScChart2DataSequence"_ustr,
using namespace ::com::sun::star;
using namespace ::formula;
-using ::com::sun::star::uno::Sequence;
-using ::std::unique_ptr;
-using ::std::vector;
-using ::std::distance;
-using ::std::shared_ptr;
namespace
{
@@ -115,10 +110,10 @@ private:
OUStringBuffer & m_rBuffer;
};
-OUString lcl_createTableNumberList( const ::std::vector< SCTAB > & rTableVector )
+OUString lcl_createTableNumberList(const std::vector< SCTAB > & rTableVector )
{
OUStringBuffer aBuffer;
- ::std::for_each( rTableVector.begin(), rTableVector.end(), lcl_appendTableNumber( aBuffer ));
+ std::for_each( rTableVector.begin(), rTableVector.end(), lcl_appendTableNumber( aBuffer ));
// remove last trailing ' '
if( !aBuffer.isEmpty() )
aBuffer.setLength( aBuffer.getLength() - 1 );
@@ -138,7 +133,7 @@ struct TokenTable
{
SCROW mnRowCount;
SCCOL mnColCount;
- vector<std::unique_ptr<FormulaToken>> maTokens;
+ std::vector<std::unique_ptr<FormulaToken>> maTokens;
// noncopyable
TokenTable(const TokenTable&) = delete;
@@ -177,19 +172,19 @@ struct TokenTable
return nRet;
}
- vector<ScTokenRef> getColRanges(const ScDocument* pDoc, SCCOL nCol) const;
- vector<ScTokenRef> getRowRanges(const ScDocument* pDoc, SCROW nRow) const;
- vector<ScTokenRef> getAllRanges(const ScDocument* pDoc) const;
+ std::vector<ScTokenRef> getColRanges(const ScDocument* pDoc, SCCOL nCol) const;
+ std::vector<ScTokenRef> getRowRanges(const ScDocument* pDoc, SCROW nRow) const;
+ std::vector<ScTokenRef> getAllRanges(const ScDocument* pDoc) const;
};
-vector<ScTokenRef> TokenTable::getColRanges(const ScDocument* pDoc, SCCOL nCol) const
+std::vector<ScTokenRef> TokenTable::getColRanges(const ScDocument* pDoc, SCCOL nCol) const
{
if (nCol >= mnColCount)
- return vector<ScTokenRef>();
+ return std::vector<ScTokenRef>();
if( mnRowCount<=0 )
- return vector<ScTokenRef>();
+ return std::vector<ScTokenRef>();
- vector<ScTokenRef> aTokens;
+ std::vector<ScTokenRef> aTokens;
sal_uInt32 nLast = getIndex(nCol, mnRowCount-1);
for (sal_uInt32 i = getIndex(nCol, 0); i <= nLast; ++i)
{
@@ -203,14 +198,14 @@ vector<ScTokenRef> TokenTable::getColRanges(const ScDocument* pDoc, SCCOL nCol)
return aTokens;
}
-vector<ScTokenRef> TokenTable::getRowRanges(const ScDocument* pDoc, SCROW nRow) const
+std::vector<ScTokenRef> TokenTable::getRowRanges(const ScDocument* pDoc, SCROW nRow) const
{
if (nRow >= mnRowCount)
- return vector<ScTokenRef>();
+ return std::vector<ScTokenRef>();
if( mnColCount<=0 )
- return vector<ScTokenRef>();
+ return std::vector<ScTokenRef>();
- vector<ScTokenRef> aTokens;
+ std::vector<ScTokenRef> aTokens;
sal_uInt32 nLast = getIndex(mnColCount-1, nRow);
for (sal_uInt32 i = getIndex(0, nRow); i <= nLast; i += mnRowCount)
{
@@ -224,9 +219,9 @@ vector<ScTokenRef> TokenTable::getRowRanges(const ScDocument* pDoc, SCROW nRow)
return aTokens;
}
-vector<ScTokenRef> TokenTable::getAllRanges(const ScDocument* pDoc) const
+std::vector<ScTokenRef> TokenTable::getAllRanges(const ScDocument* pDoc) const
{
- vector<ScTokenRef> aTokens;
+ std::vector<ScTokenRef> aTokens;
sal_uInt32 nStop = mnColCount*mnRowCount;
for (sal_uInt32 i = 0; i < nStop; i++)
{
@@ -254,15 +249,15 @@ public:
SCCOL getDataColCount() const { return mnDataColCount; }
SCROW getDataRowCount() const { return mnDataRowCount; }
- vector<ScTokenRef> getLeftUpperCornerRanges() const;
- vector<ScTokenRef> getAllColHeaderRanges() const;
- vector<ScTokenRef> getAllRowHeaderRanges() const;
+ std::vector<ScTokenRef> getLeftUpperCornerRanges() const;
+ std::vector<ScTokenRef> getAllColHeaderRanges() const;
+ std::vector<ScTokenRef> getAllRowHeaderRanges() const;
- vector<ScTokenRef> getColHeaderRanges(SCCOL nChartCol) const;
- vector<ScTokenRef> getRowHeaderRanges(SCROW nChartRow) const;
+ std::vector<ScTokenRef> getColHeaderRanges(SCCOL nChartCol) const;
+ std::vector<ScTokenRef> getRowHeaderRanges(SCROW nChartRow) const;
- vector<ScTokenRef> getDataColRanges(SCCOL nCol) const;
- vector<ScTokenRef> getDataRowRanges(SCROW nRow) const;
+ std::vector<ScTokenRef> getDataColRanges(SCCOL nCol) const;
+ std::vector<ScTokenRef> getDataRowRanges(SCROW nRow) const;
private:
const ScDocument* mpDoc;
@@ -404,33 +399,37 @@ Chart2PositionMap::~Chart2PositionMap()
maData.clear();
}
-vector<ScTokenRef> Chart2PositionMap::getLeftUpperCornerRanges() const
+std::vector<ScTokenRef> Chart2PositionMap::getLeftUpperCornerRanges() const
{
return maLeftUpperCorner.getAllRanges(mpDoc);
}
-vector<ScTokenRef> Chart2PositionMap::getAllColHeaderRanges() const
+
+std::vector<ScTokenRef> Chart2PositionMap::getAllColHeaderRanges() const
{
return maColHeaders.getAllRanges(mpDoc);
}
-vector<ScTokenRef> Chart2PositionMap::getAllRowHeaderRanges() const
+
+std::vector<ScTokenRef> Chart2PositionMap::getAllRowHeaderRanges() const
{
return maRowHeaders.getAllRanges(mpDoc);
}
-vector<ScTokenRef> Chart2PositionMap::getColHeaderRanges(SCCOL nCol) const
+
+std::vector<ScTokenRef> Chart2PositionMap::getColHeaderRanges(SCCOL nCol) const
{
return maColHeaders.getColRanges(mpDoc, nCol);
}
-vector<ScTokenRef> Chart2PositionMap::getRowHeaderRanges(SCROW nRow) const
+
+std::vector<ScTokenRef> Chart2PositionMap::getRowHeaderRanges(SCROW nRow) const
{
return maRowHeaders.getRowRanges(mpDoc, nRow);
}
-vector<ScTokenRef> Chart2PositionMap::getDataColRanges(SCCOL nCol) const
+std::vector<ScTokenRef> Chart2PositionMap::getDataColRanges(SCCOL nCol) const
{
return maData.getColRanges(mpDoc, nCol);
}
-vector<ScTokenRef> Chart2PositionMap::getDataRowRanges(SCROW nRow) const
+std::vector<ScTokenRef> Chart2PositionMap::getDataRowRanges(SCROW nRow) const
{
return maData.getRowRanges(mpDoc, nRow);
}
@@ -454,7 +453,7 @@ public:
Chart2Positioner(const Chart2Positioner&) = delete;
const Chart2Positioner& operator=(const Chart2Positioner&) = delete;
- Chart2Positioner(ScDocument* pDoc, const vector<ScTokenRef>& rRefTokens) :
+ Chart2Positioner(ScDocument* pDoc, const std::vector<ScTokenRef>& rRefTokens) :
mrRefTokens(rRefTokens),
meGlue(GLUETYPE_NA),
mnStartCol(0),
@@ -485,7 +484,7 @@ private:
void createPositionMap();
private:
- const vector<ScTokenRef>& mrRefTokens;
+ const std::vector<ScTokenRef>& mrRefTokens;
std::unique_ptr<Chart2PositionMap> mpPositionMap;
GlueType meGlue;
SCCOL mnStartCol;
@@ -614,7 +613,7 @@ void Chart2Positioner::calcGlueState(SCCOL nColSize, SCROW nRowSize)
sal_uInt32 nCR = static_cast<sal_uInt32>(nColSize*nRowSize);
- vector<State> aCellStates(nCR, Hole);
+ std::vector<State> aCellStates(nCR, Hole);
// Mark all referenced cells "occupied".
for (const auto& rxToken : mrRefTokens)
@@ -848,7 +847,7 @@ public:
}
private:
- shared_ptr<OUStringBuffer> mpRangeStr;
+ std::shared_ptr<OUStringBuffer> mpRangeStr;
ScDocument* mpDoc;
FormulaGrammar::Grammar meGrammar;
sal_Unicode mcRangeSep;
@@ -956,14 +955,14 @@ private:
}
private:
- shared_ptr<OUStringBuffer> mpRangeStr;
+ std::shared_ptr<OUStringBuffer> mpRangeStr;
ScDocument* mpDoc;
static const sal_Unicode mcRangeSep = ' ';
static const sal_Unicode mcAddrSep = ':';
bool mbFirst;
};
-void lcl_convertTokensToString(OUString& rStr, const vector<ScTokenRef>& rTokens, ScDocument& rDoc)
+void lcl_convertTokensToString(OUString& rStr, const std::vector<ScTokenRef>& rTokens, ScDocument& rDoc)
{
const sal_Unicode cRangeSep = ScCompiler::GetNativeSymbolChar(ocSep);
FormulaGrammar::Grammar eGrammar = rDoc.GetGrammar();
@@ -1016,7 +1015,7 @@ sal_Bool SAL_CALL ScChart2DataProvider::createDataSourcePossible( const uno::Seq
}
}
- vector<ScTokenRef> aTokens;
+ std::vector<ScTokenRef> aTokens;
const sal_Unicode cSep = ScCompiler::GetNativeSymbolChar(ocSep);
ScRefTokenHelper::compileRangeRepresentation(
aTokens, aRangeRepresentation, *m_pDocument, cSep, m_pDocument->GetGrammar(), true);
@@ -1027,7 +1026,7 @@ namespace
{
uno::Reference< chart2::data::XLabeledDataSequence > lcl_createLabeledDataSequenceFromTokens(
- vector< ScTokenRef > && aValueTokens, vector< ScTokenRef > && aLabelTokens,
+ std::vector< ScTokenRef > && aValueTokens, std::vector< ScTokenRef > && aLabelTokens,
ScDocument* pDoc, bool bIncludeHiddenCells )
{
uno::Reference< chart2::data::XLabeledDataSequence > xResult;
@@ -1070,12 +1069,9 @@ uno::Reference< chart2::data::XLabeledDataSequence > lcl_createLabeledDataSequen
*
* @return true if the corner was added, false otherwise.
*/
-bool lcl_addUpperLeftCornerIfMissing(const ScDocument* pDoc, vector<ScTokenRef>& rRefTokens,
+bool lcl_addUpperLeftCornerIfMissing(const ScDocument* pDoc, std::vector<ScTokenRef>& rRefTokens,
SCROW nCornerRowCount, SCCOL nCornerColumnCount)
{
- using ::std::max;
- using ::std::min;
-
if (rRefTokens.empty())
return false;
@@ -1089,7 +1085,7 @@ bool lcl_addUpperLeftCornerIfMissing(const ScDocument* pDoc, vector<ScTokenRef>&
svl::SharedString aExtTabName;
bool bExternal = false;
- vector<ScTokenRef>::const_iterator itr = rRefTokens.begin(), itrEnd = rRefTokens.end();
+ std::vector<ScTokenRef>::const_iterator itr = rRefTokens.begin(), itrEnd = rRefTokens.end();
// Get the first ref token.
ScTokenRef pToken = *itr;
@@ -1108,10 +1104,10 @@ bool lcl_addUpperLeftCornerIfMissing(const ScDocument* pDoc, vector<ScTokenRef>&
case svDoubleRef:
{
const ScComplexRefData& rData = *pToken->GetDoubleRef();
- nMinCol = min(rData.Ref1.Col(), rData.Ref2.Col());
- nMinRow = min(rData.Ref1.Row(), rData.Ref2.Row());
- nMaxCol = max(rData.Ref1.Col(), rData.Ref2.Col());
- nMaxRow = max(rData.Ref1.Row(), rData.Ref2.Row());
+ nMinCol = std::min(rData.Ref1.Col(), rData.Ref2.Col());
+ nMinRow = std::min(rData.Ref1.Row(), rData.Ref2.Row());
+ nMaxCol = std::max(rData.Ref1.Col(), rData.Ref2.Col());
+ nMaxRow = std::max(rData.Ref1.Row(), rData.Ref2.Row());
nTab = rData.Ref1.Tab();
}
break;
@@ -1131,10 +1127,10 @@ bool lcl_addUpperLeftCornerIfMissing(const ScDocument* pDoc, vector<ScTokenRef>&
case svExternalDoubleRef:
{
const ScComplexRefData& rData = *pToken->GetDoubleRef();
- nMinCol = min(rData.Ref1.Col(), rData.Ref2.Col());
- nMinRow = min(rData.Ref1.Row(), rData.Ref2.Row());
- nMaxCol = max(rData.Ref1.Col(), rData.Ref2.Col());
- nMaxRow = max(rData.Ref1.Row(), rData.Ref2.Row());
+ nMinCol = std::min(rData.Ref1.Col(), rData.Ref2.Col());
+ nMinRow = std::min(rData.Ref1.Row(), rData.Ref2.Row());
+ nMaxCol = std::max(rData.Ref1.Col(), rData.Ref2.Col());
+ nMaxRow = std::max(rData.Ref1.Row(), rData.Ref2.Row());
nTab = rData.Ref1.Tab();
nFileId = pToken->GetIndex();
aExtTabName = pToken->GetString();
@@ -1157,10 +1153,10 @@ bool lcl_addUpperLeftCornerIfMissing(const ScDocument* pDoc, vector<ScTokenRef>&
{
const ScSingleRefData& rData = *pToken->GetSingleRef();
- nMinCol = min(nMinCol, rData.Col());
- nMinRow = min(nMinRow, rData.Row());
- nMaxCol = max(nMaxCol, rData.Col());
- nMaxRow = max(nMaxRow, rData.Row());
+ nMinCol = std::min(nMinCol, rData.Col());
+ nMinRow = std::min(nMinRow, rData.Row());
+ nMaxCol = std::max(nMaxCol, rData.Col());
+ nMaxRow = std::max(nMaxRow, rData.Row());
if (nTab != rData.Tab() || bExternal)
return false;
}
@@ -1169,15 +1165,15 @@ bool lcl_addUpperLeftCornerIfMissing(const ScDocument* pDoc, vector<ScTokenRef>&
{
const ScComplexRefData& rData = *pToken->GetDoubleRef();
- nMinCol = min(nMinCol, rData.Ref1.Col());
- nMinCol = min(nMinCol, rData.Ref2.Col());
- nMinRow = min(nMinRow, rData.Ref1.Row());
- nMinRow = min(nMinRow, rData.Ref2.Row());
+ nMinCol = std::min(nMinCol, rData.Ref1.Col());
+ nMinCol = std::min(nMinCol, rData.Ref2.Col());
+ nMinRow = std::min(nMinRow, rData.Ref1.Row());
+ nMinRow = std::min(nMinRow, rData.Ref2.Row());
- nMaxCol = max(nMaxCol, rData.Ref1.Col());
- nMaxCol = max(nMaxCol, rData.Ref2.Col());
- nMaxRow = max(nMaxRow, rData.Ref1.Row());
- nMaxRow = max(nMaxRow, rData.Ref2.Row());
+ nMaxCol = std::max(nMaxCol, rData.Ref1.Col());
+ nMaxCol = std::max(nMaxCol, rData.Ref2.Col());
+ nMaxRow = std::max(nMaxRow, rData.Ref1.Row());
+ nMaxRow = std::max(nMaxRow, rData.Ref2.Row());
if (nTab != rData.Ref1.Tab() || bExternal)
return false;
@@ -1193,10 +1189,10 @@ bool lcl_addUpperLeftCornerIfMissing(const ScDocument* pDoc, vector<ScTokenRef>&
const ScSingleRefData& rData = *pToken->GetSingleRef();
- nMinCol = min(nMinCol, rData.Col());
- nMinRow = min(nMinRow, rData.Row());
- nMaxCol = max(nMaxCol, rData.Col());
- nMaxRow = max(nMaxRow, rData.Row());
+ nMinCol = std::min(nMinCol, rData.Col());
+ nMinRow = std::min(nMinRow, rData.Row());
+ nMaxCol = std::max(nMaxCol, rData.Col());
+ nMaxRow = std::max(nMaxRow, rData.Row());
}
break;
case svExternalDoubleRef:
@@ -1209,15 +1205,15 @@ bool lcl_addUpperLeftCornerIfMissing(const ScDocument* pDoc, vector<ScTokenRef>&
const ScComplexRefData& rData = *pToken->GetDoubleRef();
- nMinCol = min(nMinCol, rData.Ref1.Col());
- nMinCol = min(nMinCol, rData.Ref2.Col());
- nMinRow = min(nMinRow, rData.Ref1.Row());
- nMinRow = min(nMinRow, rData.Ref2.Row());
+ nMinCol = std::min(nMinCol, rData.Ref1.Col());
+ nMinCol = std::min(nMinCol, rData.Ref2.Col());
+ nMinRow = std::min(nMinRow, rData.Ref1.Row());
+ nMinRow = std::min(nMinRow, rData.Ref2.Row());
- nMaxCol = max(nMaxCol, rData.Ref1.Col());
- nMaxCol = max(nMaxCol, rData.Ref2.Col());
- nMaxRow = max(nMaxRow, rData.Ref1.Row());
- nMaxRow = max(nMaxRow, rData.Ref2.Row());
+ nMaxCol = std::max(nMaxCol, rData.Ref1.Col());
+ nMaxCol = std::max(nMaxCol, rData.Ref2.Col());
+ nMaxRow = std::max(nMaxRow, rData.Ref1.Row());
+ nMaxRow = std::max(nMaxRow, rData.Ref2.Row());
}
break;
default:
@@ -1392,7 +1388,7 @@ public:
}
};
-void shrinkToDataRange(ScDocument* pDoc, vector<ScTokenRef>& rRefTokens)
+void shrinkToDataRange(ScDocument* pDoc, std::vector<ScTokenRef>& rRefTokens)
{
std::for_each(rRefTokens.begin(), rRefTokens.end(), ShrinkRefTokenToDataRange(pDoc));
}
@@ -1449,7 +1445,7 @@ ScChart2DataProvider::createDataSource(
}
}
- vector<ScTokenRef> aRefTokens;
+ std::vector<ScTokenRef> aRefTokens;
const sal_Unicode cSep = ScCompiler::GetNativeSymbolChar(ocSep);
ScRefTokenHelper::compileRangeRepresentation(
aRefTokens, aRangeRepresentation, *m_pDocument, cSep, m_pDocument->GetGrammar(), true);
@@ -1497,18 +1493,18 @@ ScChart2DataProvider::createDataSource(
return xResult;
rtl::Reference<ScChart2DataSource> pDS;
- ::std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aSeqs;
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aSeqs;
// Fill Categories
if( bCategories )
{
- vector<ScTokenRef> aValueTokens;
+ std::vector<ScTokenRef> aValueTokens;
if (bOrientCol)
aValueTokens = pChartMap->getAllRowHeaderRanges();
else
aValueTokens = pChartMap->getAllColHeaderRanges();
- vector<ScTokenRef> aLabelTokens(
+ std::vector<ScTokenRef> aLabelTokens(
pChartMap->getLeftUpperCornerRanges());
uno::Reference< chart2::data::XLabeledDataSequence > xCategories = lcl_createLabeledDataSequenceFromTokens(
@@ -1523,8 +1519,8 @@ ScChart2DataProvider::createDataSource(
sal_Int32 nCount = bOrientCol ? pChartMap->getDataColCount() : pChartMap->getDataRowCount();
for (sal_Int32 i = 0; i < nCount; ++i)
{
- vector<ScTokenRef> aValueTokens;
- vector<ScTokenRef> aLabelTokens;
+ std::vector<ScTokenRef> aValueTokens;
+ std::vector<ScTokenRef> aLabelTokens;
if (bOrientCol)
{
aValueTokens = pChartMap->getDataColRanges(static_cast<SCCOL>(i));
@@ -1546,7 +1542,7 @@ ScChart2DataProvider::createDataSource(
pDS = new ScChart2DataSource(m_pDocument);
//reorder labeled sequences according to aSequenceMapping
- ::std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aSeqVector;
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aSeqVector;
aSeqVector.reserve(aSeqs.size());
for (auto const& aSeq : aSeqs)
{
@@ -1556,7 +1552,7 @@ ScChart2DataProvider::createDataSource(
for (const sal_Int32 nNewIndex : aSequenceMapping)
{
// note: assuming that the values in the sequence mapping are always non-negative
- ::std::vector< uno::Reference< chart2::data::XLabeledDataSequence > >::size_type nOldIndex( static_cast< sal_uInt32 >( nNewIndex ) );
+ std::vector< uno::Reference< chart2::data::XLabeledDataSequence > >::size_type nOldIndex( static_cast< sal_uInt32 >( nNewIndex ) );
if( nOldIndex < aSeqVector.size() )
{
pDS->AddLabeledSequence( aSeqVector[nOldIndex] );
@@ -1586,7 +1582,7 @@ class InsertTabNumber
{
public:
InsertTabNumber() :
- mpTabNumVector(std::make_shared<vector<SCTAB>>())
+ mpTabNumVector(std::make_shared<std::vector<SCTAB>>())
{
}
@@ -1599,19 +1595,19 @@ public:
mpTabNumVector->push_back(r.Tab());
}
- void getVector(vector<SCTAB>& rVector)
+ void getVector(std::vector<SCTAB>& rVector)
{
mpTabNumVector->swap(rVector);
}
private:
- shared_ptr< vector<SCTAB> > mpTabNumVector;
+ std::shared_ptr<std::vector<SCTAB>> mpTabNumVector;
};
class RangeAnalyzer
{
public:
RangeAnalyzer();
- void initRangeAnalyzer( const ScDocument* pDoc, const vector<ScTokenRef>& rTokens );
+ void initRangeAnalyzer( const ScDocument* pDoc, const std::vector<ScTokenRef>& rTokens );
void analyzeRange( sal_Int32& rnDataInRows, sal_Int32& rnDataInCols,
bool& rbRowSourceAmbiguous ) const;
bool inSameSingleRow( const RangeAnalyzer& rOther );
@@ -1639,7 +1635,7 @@ RangeAnalyzer::RangeAnalyzer()
{
}
-void RangeAnalyzer::initRangeAnalyzer( const ScDocument* pDoc, const vector<ScTokenRef>& rTokens )
+void RangeAnalyzer::initRangeAnalyzer( const ScDocument* pDoc, const std::vector<ScTokenRef>& rTokens )
{
mnRowCount=0;
mnColumnCount=0;
@@ -1765,19 +1761,19 @@ std::pair<OUString, OUString> constructKey(const uno::Reference< chart2::data::X
uno::Sequence< beans::PropertyValue > SAL_CALL ScChart2DataProvider::detectArguments(
const uno::Reference< chart2::data::XDataSource >& xDataSource )
{
- ::std::vector< beans::PropertyValue > aResult;
+ std::vector< beans::PropertyValue > aResult;
bool bRowSourceDetected = false;
bool bFirstCellAsLabel = false;
bool bHasCategories = false;
OUString sRangeRep;
bool bHasCategoriesLabels = false;
- vector<ScTokenRef> aAllCategoriesValuesTokens;
- vector<ScTokenRef> aAllSeriesLabelTokens;
+ std::vector<ScTokenRef> aAllCategoriesValuesTokens;
+ std::vector<ScTokenRef> aAllSeriesLabelTokens;
chart::ChartDataRowSource eRowSource = chart::ChartDataRowSource_COLUMNS;
- vector<ScTokenRef> aAllTokens;
+ std::vector<ScTokenRef> aAllTokens;
// parse given data source and collect infos
{
@@ -1790,7 +1786,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ScChart2DataProvider::detectArgum
sal_Int32 nDataInCols = 0;
bool bRowSourceAmbiguous = false;
- const Sequence< uno::Reference< chart2::data::XLabeledDataSequence > > aSequences( xDataSource->getDataSequences());
+ const uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > > aSequences( xDataSource->getDataSequences());
const sal_Int32 nCount( aSequences.getLength());
RangeAnalyzer aPrevLabel,aPrevValues;
for( const uno::Reference< chart2::data::XLabeledDataSequence >& xLS : aSequences )
@@ -1813,7 +1809,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ScChart2DataProvider::detectArgum
if( xLabel.is())
{
bFirstCellAsLabel = true;
- vector<ScTokenRef> aTokens;
+ std::vector<ScTokenRef> aTokens;
const sal_Unicode cSep = ScCompiler::GetNativeSymbolChar(ocSep);
ScRefTokenHelper::compileRangeRepresentation(
aTokens, xLabel->getSourceRangeRepresentation(), *m_pDocument, cSep, m_pDocument->GetGrammar(), true);
@@ -1843,7 +1839,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ScChart2DataProvider::detectArgum
uno::Reference< chart2::data::XDataSequence > xValues( xLS->getValues());
if( xValues.is())
{
- vector<ScTokenRef> aTokens;
+ std::vector<ScTokenRef> aTokens;
const sal_Unicode cSep = ScCompiler::GetNativeSymbolChar(ocSep);
ScRefTokenHelper::compileRangeRepresentation(
aTokens, xValues->getSourceRangeRepresentation(), *m_pDocument, cSep, m_pDocument->GetGrammar(), true);
@@ -1921,7 +1917,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ScChart2DataProvider::detectArgum
// TableNumberList
{
- vector<SCTAB> aTableNumVector;
+ std::vector<SCTAB> aTableNumVector;
InsertTabNumber func;
func = ::std::for_each(aAllTokens.begin(), aAllTokens.end(), func);
func.getVector(aTableNumVector);
@@ -2039,7 +2035,7 @@ sal_Bool SAL_CALL ScChart2DataProvider::createDataSequenceByRangeRepresentationP
if( ! m_pDocument )
return false;
- vector<ScTokenRef> aTokens;
+ std::vector<ScTokenRef> aTokens;
const sal_Unicode cSep = ScCompiler::GetNativeSymbolChar(ocSep);
ScRefTokenHelper::compileRangeRepresentation(
aTokens, aRangeRepresentation, *m_pDocument, cSep, m_pDocument->GetGrammar(), true);
@@ -2057,7 +2053,7 @@ uno::Reference< chart2::data::XDataSequence > SAL_CALL
if(!m_pDocument || aRangeRepresentation.isEmpty())
return xResult;
- vector<ScTokenRef> aRefTokens;
+ std::vector<ScTokenRef> aRefTokens;
const sal_Unicode cSep = ScCompiler::GetNativeSymbolChar(ocSep);
ScRefTokenHelper::compileRangeRepresentation(
aRefTokens, aRangeRepresentation, *m_pDocument, cSep, m_pDocument->GetGrammar(), true);
@@ -2091,7 +2087,7 @@ uno::Reference< sheet::XRangeSelection > SAL_CALL ScChart2DataProvider::getRange
}
sal_Bool SAL_CALL ScChart2DataProvider::createDataSequenceByFormulaTokensPossible(
- const Sequence<sheet::FormulaToken>& aTokens )
+ const uno::Sequence<sheet::FormulaToken>& aTokens )
{
if (!aTokens.hasElements())
return false;
@@ -2148,7 +2144,7 @@ sal_Bool SAL_CALL ScChart2DataProvider::createDataSequenceByFormulaTokensPossibl
uno::Reference<chart2::data::XDataSequence> SAL_CALL
ScChart2DataProvider::createDataSequenceByFormulaTokens(
- const Sequence<sheet::FormulaToken>& aTokens )
+ const uno::Sequence<sheet::FormulaToken>& aTokens )
{
uno::Reference<chart2::data::XDataSequence> xResult;
if (!aTokens.hasElements())
@@ -2162,7 +2158,7 @@ ScChart2DataProvider::createDataSequenceByFormulaTokens(
if (!n)
return xResult;
- vector<ScTokenRef> aRefTokens;
+ std::vector<ScTokenRef> aRefTokens;
formula::FormulaTokenArrayPlainIterator aIter(aCode);
const formula::FormulaToken* pFirst = aIter.First();
const formula::FormulaToken* pLast = aCode.GetArray()[n-1];
@@ -2229,7 +2225,7 @@ OUString SAL_CALL ScChart2DataProvider::convertRangeToXML( const OUString& sRang
// Empty data range is allowed.
return aRet;
- vector<ScTokenRef> aRefTokens;
+ std::vector<ScTokenRef> aRefTokens;
const sal_Unicode cSep = ScCompiler::GetNativeSymbolChar(ocSep);
ScRefTokenHelper::compileRangeRepresentation(
aRefTokens, sRangeRepresentation, *m_pDocument, cSep, m_pDocument->GetGrammar(), true);
@@ -2413,7 +2409,7 @@ void ScChart2DataSequence::HiddenRangeListener::notify()
}
ScChart2DataSequence::ScChart2DataSequence( ScDocument* pDoc,
- vector<ScTokenRef>&& rTokens,
+ std::vector<ScTokenRef>&& rTokens,
bool bIncludeHiddenCells )
: m_xDataArray(new std::vector<Item>)
, m_bIncludeHiddenCells( bIncludeHiddenCells)
@@ -2552,7 +2548,7 @@ void ScChart2DataSequence::BuildDataCache()
StopListeningToAllExternalRefs();
- ::std::vector<sal_Int32> aHiddenValues;
+ std::vector<sal_Int32> aHiddenValues;
sal_Int32 nDataCount = 0;
for (const auto& rxToken : m_aTokens)
@@ -2810,15 +2806,15 @@ void ScChart2DataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint
ScRangeList aRanges;
m_oRangeIndices.emplace();
- vector<ScTokenRef>::const_iterator itrBeg = m_aTokens.begin(), itrEnd = m_aTokens.end();
- for (vector<ScTokenRef>::const_iterator itr = itrBeg ;itr != itrEnd; ++itr)
+ std::vector<ScTokenRef>::const_iterator itrBeg = m_aTokens.begin(), itrEnd = m_aTokens.end();
+ for (std::vector<ScTokenRef>::const_iterator itr = itrBeg ;itr != itrEnd; ++itr)
{
if (!ScRefTokenHelper::isExternalRef(*itr))
{
ScRange aRange;
ScRefTokenHelper::getRangeFromToken(m_pDocument, aRange, *itr, ScAddress());
aRanges.push_back(aRange);
- sal_uInt32 nPos = distance(itrBeg, itr);
+ sal_uInt32 nPos = std::distance(itrBeg, itr);
m_oRangeIndices->push_back(nPos);
}
}
@@ -2826,7 +2822,7 @@ void ScChart2DataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint
assert(m_oRangeIndices->size() == aRanges.size() &&
"range list and range index list have different sizes.");
- unique_ptr<ScRangeList> pUndoRanges;
+ std::unique_ptr<ScRangeList> pUndoRanges;
if ( m_pDocument->HasUnoRefUndo() )
pUndoRanges.reset(new ScRangeList(aRanges));
@@ -3113,7 +3109,7 @@ class GenerateLabelStrings
public:
GenerateLabelStrings(const ScDocument* pDoc, sal_Int32 nSize, chart2::data::LabelOrigin eOrigin, bool bColumn) :
mpDoc(pDoc),
- mpLabels(std::make_shared<Sequence<OUString>>(nSize)),
+ mpLabels(std::make_shared<uno::Sequence<OUString>>(nSize)),
meOrigin(eOrigin),
mnCount(0),
mbColumn(bColumn) {}
@@ -3154,11 +3150,11 @@ public:
}
}
- const Sequence<OUString>& getLabels() const { return *mpLabels; }
+ const uno::Sequence<OUString>& getLabels() const { return *mpLabels; }
private:
const ScDocument* mpDoc;
- shared_ptr< Sequence<OUString> > mpLabels;
+ std::shared_ptr<uno::Sequence<OUString>> mpLabels;
chart2::data::LabelOrigin meOrigin;
sal_Int32 mnCount;
bool mbColumn;
@@ -3192,14 +3188,14 @@ uno::Sequence< OUString > SAL_CALL ScChart2DataSequence::generateLabel(chart2::d
bColumn = eOrigin != chart2::data::LabelOrigin_SHORT_SIDE;
}
else
- return Sequence<OUString>();
+ return uno::Sequence<OUString>();
}
// Generate label strings based on the info so far.
sal_Int32 nCount = bColumn ? nCols : nRows;
GenerateLabelStrings genLabels(m_pDocument, nCount, eOrigin, bColumn);
genLabels = ::std::for_each(m_aTokens.begin(), m_aTokens.end(), genLabels);
- Sequence<OUString> aSeq = genLabels.getLabels();
+ uno::Sequence<OUString> aSeq = genLabels.getLabels();
return aSeq;
}
diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx
index 12f0e38af3da..d1eae3b117ee 100644
--- a/sc/source/ui/unoobj/chartuno.cxx
+++ b/sc/source/ui/unoobj/chartuno.cxx
@@ -126,9 +126,9 @@ rtl::Reference<ScChartObj> ScChartsObj::GetObjectByIndex_Impl(tools::Long nIndex
rtl::Reference<ScChartObj> ScChartsObj::GetObjectByName_Impl(const OUString& aName) const
{
- if (sc::tools::findChartsByName(pDocShell, nTab, aName, sc::tools::ChartSourceType::CELL_RANGE))
+ if (sctools::findChartsByName(pDocShell, nTab, aName, sctools::ChartSourceType::CELL_RANGE))
return new ScChartObj( pDocShell, nTab, aName );
- if (sc::tools::findChartsByName(pDocShell, nTab, aName, sc::tools::ChartSourceType::PIVOT_TABLE))
+ if (sctools::findChartsByName(pDocShell, nTab, aName, sctools::ChartSourceType::PIVOT_TABLE))
return new ScChartObj( pDocShell, nTab, aName );
return nullptr;
}
@@ -269,7 +269,7 @@ void SAL_CALL ScChartsObj::addNewByName( const OUString& rName,
void SAL_CALL ScChartsObj::removeByName( const OUString& aName )
{
SolarMutexGuard aGuard;
- SdrOle2Obj* pObj = sc::tools::findChartsByName(pDocShell, nTab, aName, sc::tools::ChartSourceType::CELL_RANGE);
+ SdrOle2Obj* pObj = sctools::findChartsByName(pDocShell, nTab, aName, sctools::ChartSourceType::CELL_RANGE);
if (pObj)
{
ScDocument& rDoc = pDocShell->GetDocument();
@@ -400,8 +400,8 @@ uno::Sequence<OUString> SAL_CALL ScChartsObj::getElementNames()
sal_Bool SAL_CALL ScChartsObj::hasByName( const OUString& aName )
{
SolarMutexGuard aGuard;
- SdrOle2Obj* aOle2Obj = sc::tools::findChartsByName(pDocShell, nTab, aName,
- sc::tools::ChartSourceType::CELL_RANGE);
+ SdrOle2Obj* aOle2Obj = sctools::findChartsByName(pDocShell, nTab, aName,
+ sctools::ChartSourceType::CELL_RANGE);
return aOle2Obj != nullptr;
}
@@ -703,8 +703,8 @@ void SAL_CALL ScChartObj::setRanges( const uno::Sequence<table::CellRangeAddress
uno::Reference<lang::XComponent> SAL_CALL ScChartObj::getEmbeddedObject()
{
SolarMutexGuard aGuard;
- SdrOle2Obj* pObject = sc::tools::findChartsByName(pDocShell, nTab, aChartName,
- sc::tools::ChartSourceType::CELL_RANGE);
+ SdrOle2Obj* pObject = sctools::findChartsByName(pDocShell, nTab, aChartName,
+ sctools::ChartSourceType::CELL_RANGE);
if ( pObject && svt::EmbeddedObjectRef::TryRunningState( pObject->GetObjRef() ) )
{
//TODO/LATER: is it OK that something is returned for *all* objects, not only own objects?
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index 7baf38707020..ed95a593bd54 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -2268,7 +2268,7 @@ DataPilotFieldGroupInfo ScDataPilotFieldObj::getGroupInfo()
for( sal_Int32 nMemIdx = 0, nMemCount = rGroup.GetElementCount(); nMemIdx < nMemCount; ++nMemIdx )
if (const OUString* pMem = rGroup.GetElementByIndex(nMemIdx))
aGroup.maMembers.push_back( *pMem );
- aGroups.push_back( aGroup );
+ aGroups.push_back(std::move(aGroup));
}
aInfo.Groups = new ScDataPilotFieldGroupsObj( std::move(aGroups) );
}
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 9d38d1b080ec..4f376e9d7041 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1117,6 +1117,19 @@ void ScModelObj::setClientZoom(int nTilePixelWidth_, int nTilePixelHeight_, int
pDrawView->resetGridOffsetsForAllSdrPageViews();
}
+void ScModelObj::setExportZoom(int nExportZoom)
+{
+ ScViewData* pViewData = ScDocShell::GetViewData();
+ if (!pViewData)
+ return;
+
+ if (pViewData->GetZoomType() != SvxZoomType::PERCENT)
+ return;
+
+ assert(nExportZoom > 0 && nExportZoom <= SAL_MAX_UINT16);
+ pViewData->SetExportZoom(nExportZoom);
+}
+
void ScModelObj::getRowColumnHeaders(const tools::Rectangle& rRectangle, tools::JsonWriter& rJsonWriter)
{
ScViewData* pViewData = ScDocShell::GetViewData();
diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx
index 7e301b4b3984..40628e0ea1fe 100644
--- a/sc/source/ui/unoobj/funcuno.cxx
+++ b/sc/source/ui/unoobj/funcuno.cxx
@@ -154,8 +154,8 @@ static bool lcl_CopyData( ScDocument* pSrcDoc, const ScRange& rSrcRange,
HasAttrFlags::Merged | HasAttrFlags::Overlapped ) )
{
ScPatternAttr aPattern(pSrcDoc->getCellAttributeHelper());
- aPattern.GetItemSet().Put( ScMergeAttr() ); // Defaults
- aPattern.GetItemSet().Put( ScMergeFlagAttr() );
+ aPattern.ItemSetPut(ScMergeAttr()); // Defaults
+ aPattern.ItemSetPut(ScMergeFlagAttr());
pClipDoc->ApplyPatternAreaTab( 0,0, pClipDoc->MaxCol(), pClipDoc->MaxRow(), nSrcTab, aPattern );
}
diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx
index e7531b42a352..80b8e6ee0329 100644
--- a/sc/source/ui/unoobj/linkuno.cxx
+++ b/sc/source/ui/unoobj/linkuno.cxx
@@ -50,7 +50,6 @@ using ::com::sun::star::uno::Any;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::lang::IllegalArgumentException;
using ::com::sun::star::uno::RuntimeException;
-using ::std::vector;
// used for sheet- and area link:
static std::span<const SfxItemPropertyMapEntry> lcl_GetSheetLinkMap()
@@ -1441,7 +1440,7 @@ Any SAL_CALL ScExternalSheetCacheObj::getCellValue(sal_Int32 nCol, sal_Int32 nRo
Sequence< sal_Int32 > SAL_CALL ScExternalSheetCacheObj::getAllRows()
{
SolarMutexGuard aGuard;
- vector<SCROW> aRows;
+ std::vector<SCROW> aRows;
mpTable->getAllRows(aRows);
size_t nSize = aRows.size();
Sequence<sal_Int32> aRowsSeq(nSize);
@@ -1458,7 +1457,7 @@ Sequence< sal_Int32 > SAL_CALL ScExternalSheetCacheObj::getAllColumns(sal_Int32
if (nRow < 0)
throw IllegalArgumentException();
- vector<SCCOL> aCols;
+ std::vector<SCCOL> aCols;
mpTable->getAllCols(static_cast<SCROW>(nRow), aCols);
size_t nSize = aCols.size();
Sequence<sal_Int32> aColsSeq(nSize);
@@ -1517,11 +1516,11 @@ Any SAL_CALL ScExternalDocLinkObj::getByName(const OUString &aName)
Sequence< OUString > SAL_CALL ScExternalDocLinkObj::getElementNames()
{
SolarMutexGuard aGuard;
- vector<OUString> aTabNames;
+ std::vector<OUString> aTabNames;
mpRefMgr->getAllCachedTableNames(mnFileId, aTabNames);
// #i116940# be consistent with getByName: include only table names which have a cache already
- vector<OUString> aValidNames;
+ std::vector<OUString> aValidNames;
std::copy_if(aTabNames.begin(), aTabNames.end(), std::back_inserter(aValidNames),
[&](const OUString& rTabName) { return mpRefMgr->getCacheTable(mnFileId, rTabName, false); });
diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx
index 0671da468022..d06af2e78b5d 100644
--- a/sc/source/ui/unoobj/servuno.cxx
+++ b/sc/source/ui/unoobj/servuno.cxx
@@ -249,7 +249,7 @@ struct ProvNamesId_Type
ScServiceProvider::Type nType;
};
-const ProvNamesId_Type aProvNamesId[] =
+constexpr ProvNamesId_Type aProvNamesId[] =
{
{ u"com.sun.star.sheet.Spreadsheet"_ustr, Type::SHEET },
{ u"com.sun.star.text.TextField.URL"_ustr, Type::URLFIELD },
@@ -322,7 +322,7 @@ const ProvNamesId_Type aProvNamesId[] =
// old service names that were in 567 still work in createInstance,
// in case some macro is still using them
-const ProvNamesId_Type aOldNames[] =
+constexpr ProvNamesId_Type aOldNames[] =
{
{ u"stardiv.one.text.TextField.URL"_ustr, Type::URLFIELD },
{ u"stardiv.one.text.TextField.PageNumber"_ustr, Type::PAGEFIELD },
diff --git a/sc/source/ui/unoobj/targuno.cxx b/sc/source/ui/unoobj/targuno.cxx
index e7feb8dd3765..f5b8ddffa3c1 100644
--- a/sc/source/ui/unoobj/targuno.cxx
+++ b/sc/source/ui/unoobj/targuno.cxx
@@ -229,8 +229,8 @@ void ScLinkTargetTypeObj::SetLinkTargetBitmap( uno::Any& rRet, sal_uInt16 nType
}
if (nImgId != ScContentId::ROOT)
{
- BitmapEx aBitmapEx { aContentBmps[static_cast<int>(nImgId) -1 ] };
- rRet <<= VCLUnoHelper::CreateBitmap(aBitmapEx);
+ Bitmap aBitmap { aContentBmps[static_cast<int>(nImgId) -1 ] };
+ rRet <<= VCLUnoHelper::CreateBitmap(aBitmap);
}
}
diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx
index 8fd8c0813ad5..038342ca4160 100644
--- a/sc/source/ui/unoobj/textuno.cxx
+++ b/sc/source/ui/unoobj/textuno.cxx
@@ -683,11 +683,11 @@ uno::Reference<text::XTextRange> SAL_CALL ScDrawTextCursor::getEnd()
UNO3_GETIMPLEMENTATION2_IMPL(ScDrawTextCursor, SvxUnoTextCursor);
-ScSimpleEditSourceHelper::ScSimpleEditSourceHelper()
+ScSimpleEditSourceHelper::ScSimpleEditSourceHelper(SfxItemPool* pEditEnginePool)
{
- rtl::Reference<SfxItemPool> pEnginePool = EditEngine::CreatePool();
- pEnginePool->SetDefaultMetric( MapUnit::Map100thMM );
- pEditEngine.reset( new ScFieldEditEngine(nullptr, pEnginePool.get(), nullptr, true) ); // TRUE: become owner of pool
+// rtl::Reference<SfxItemPool> pEnginePool = EditEngine::CreatePool();
+// pEnginePool->SetDefaultMetric( MapUnit::Map100thMM );
+ pEditEngine.reset( new ScFieldEditEngine(nullptr, pEditEnginePool, false) ); // TRUE: become owner of pool
pForwarder.reset( new SvxEditEngineForwarder( *pEditEngine ) );
pOriginalSource.reset( new ScSimpleEditSource( pForwarder.get() ) );
}
@@ -701,7 +701,8 @@ ScSimpleEditSourceHelper::~ScSimpleEditSourceHelper()
pEditEngine.reset();
}
-ScEditEngineTextObj::ScEditEngineTextObj() :
+ScEditEngineTextObj::ScEditEngineTextObj(SfxItemPool* pEditEnginePool) :
+ ScSimpleEditSourceHelper(pEditEnginePool),
SvxUnoText( GetOriginalSource(), ScCellObj::GetEditPropertySet(), uno::Reference<text::XText>() )
{
}
@@ -772,7 +773,7 @@ SvxTextForwarder* ScCellTextData::GetTextForwarder()
else
{
rtl::Reference<SfxItemPool> pEnginePool = EditEngine::CreatePool();
- pEditEngine.reset( new ScFieldEditEngine(nullptr, pEnginePool.get(), nullptr, true) );
+ pEditEngine.reset( new ScFieldEditEngine(nullptr, pEnginePool.get(), true) );
}
// currently, GetPortions doesn't work if UpdateMode is sal_False,
// this will be fixed (in EditEngine) by src600
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 43f5cbee07f8..df14c07e7bc2 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -162,7 +162,6 @@
using namespace ::ooo::vba;
using namespace ::com::sun::star;
-using ::std::vector;
// difference between VBA and file format width, in character units
const double fExtraWidth = 182.0 / 256.0;
@@ -580,7 +579,7 @@ sal_Int32 m_nArea;
}
typedef ::cppu::WeakImplHelper< container::XEnumeration > CellsEnumeration_BASE;
-typedef ::std::vector< CellPos > vCellPos;
+typedef std::vector< CellPos > vCellPos;
namespace {
@@ -2492,7 +2491,7 @@ ScVbaRange::setMergeCells( const uno::Any& aIsMerged )
sal_Int32 nCount = mxRanges->getCount();
// VBA does nothing (no error) if the own ranges overlap somehow
- ::std::vector< table::CellRangeAddress > aList;
+ std::vector< table::CellRangeAddress > aList;
for( sal_Int32 nIndex = 0; nIndex < nCount; ++nIndex )
{
uno::Reference< sheet::XCellRangeAddressable > xRangeAddr( mxRanges->getByIndex( nIndex ), uno::UNO_QUERY_THROW );
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index f75deaa4f91c..c4ae21ee42f7 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -29,6 +29,8 @@
#include <comphelper/lok.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/propertysequence.hxx>
+#include <comphelper/string.hxx>
+#include <formula/funcvarargs.h>
#include <svl/stritem.hxx>
#include <svl/numformat.hxx>
#include <svl/zforlist.hxx>
@@ -53,6 +55,7 @@
#include <cellsh.hxx>
#include <ftools.hxx>
+#include <funcdesc.hxx>
#include <sc.hrc>
#include <document.hxx>
#include <patattr.hxx>
@@ -2094,6 +2097,123 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_INS_FUNCTION:
{
+ const SfxPoolItem* pFunction;
+ const SfxPoolItem* pCategory;
+ const SfxPoolItem* pFunctionId;
+ OUString aFunction;
+ sal_Int16 nCategory = -1;
+ OUString aFunctionId;
+
+ bool bFuncHasCategoryOrId = false;
+ if (pReqArgs && pReqArgs->HasItem(FN_PARAM_1, &pFunction)
+ && pReqArgs->HasItem(FN_PARAM_2, &pCategory)) // -1 when aFunctionId not empty
+ {
+ aFunction = static_cast<const SfxStringItem*>(pFunction)->GetValue();
+ nCategory = static_cast<const SfxInt16Item*>(pCategory)->GetValue();
+
+ if (nCategory == -1 && pReqArgs->HasItem(FN_PARAM_3, &pFunctionId))
+ aFunctionId = static_cast<const SfxStringItem*>(pFunctionId)->GetValue();
+
+ bFuncHasCategoryOrId = nCategory != -1 || !aFunctionId.isEmpty();
+ }
+
+ if (bFuncHasCategoryOrId)
+ {
+ ScInputHandler* pHdl = pScMod->GetInputHdl(pTabViewShell);
+ OUString aString = aFunction;
+ if (!pScMod->IsEditMode())
+ {
+ pScMod->SetInputMode(SC_INPUT_TABLE);
+ aString = "=" + aFunction;
+ if (pHdl)
+ pHdl->ClearText();
+ }
+
+ const ScFuncDesc* pDesc;
+ if (nCategory == -1)
+ pDesc = weld::fromId<const ScFuncDesc*>(aFunctionId);
+ else
+ {
+ ScFunctionMgr* pFuncMgr = ScGlobal::GetStarCalcFunctionMgr();
+ const CharClass* pCharClass
+ = (ScGlobal::GetStarCalcFunctionList()->IsEnglishFunctionNames()
+ ? ScCompiler::GetCharClassEnglish()
+ : ScCompiler::GetCharClassLocalized());
+
+ pDesc = pFuncMgr->First(nCategory);
+ while (
+ pDesc
+ && !pCharClass->uppercase(pDesc->getFunctionName()).equals(aFunction))
+ {
+ pDesc = pFuncMgr->Next();
+ }
+ }
+ if (!pDesc)
+ {
+ rReq.Ignore();
+ break;
+ }
+
+ OUStringBuffer aArgStr;
+ OUString aFirstArgStr;
+ sal_uInt16 nArgs = pDesc->nArgCount;
+ if (nArgs > 0)
+ {
+ // NOTE: Theoretically the first parameter could have the
+ // suppress flag as well, but practically it doesn't.
+ aFirstArgStr = pDesc->maDefArgNames[0];
+ aFirstArgStr = comphelper::string::strip(aFirstArgStr, ' ');
+ aFirstArgStr = aFirstArgStr.replaceAll(" ", "_");
+ aArgStr = aFirstArgStr;
+ if (nArgs != VAR_ARGS && nArgs != PAIRED_VAR_ARGS)
+ { // no VarArgs or Fix plus VarArgs, but not VarArgs only
+ sal_uInt16 nFix;
+ if (nArgs >= PAIRED_VAR_ARGS)
+ nFix = nArgs - PAIRED_VAR_ARGS + 2;
+ else if (nArgs >= VAR_ARGS)
+ nFix = nArgs - VAR_ARGS + 1;
+ else
+ nFix = nArgs;
+ for (sal_uInt16 nArg = 1;
+ nArg < nFix && !pDesc->pDefArgFlags[nArg].bOptional; nArg++)
+ {
+ aArgStr.append("; ");
+ OUString sTmp = pDesc->maDefArgNames[nArg];
+ sTmp = comphelper::string::strip(sTmp, ' ');
+ sTmp = sTmp.replaceAll(" ", "_");
+ aArgStr.append(sTmp);
+ }
+ }
+ }
+
+ if (pHdl)
+ {
+ if (pHdl->GetEditString().isEmpty())
+ aString = "=" + aFunction;
+ EditView* pEdView = pHdl->GetActiveView();
+ if (pEdView != nullptr)
+ {
+ if (nArgs > 0)
+ {
+ pHdl->InsertFunction(aString);
+ pEdView->InsertText(aArgStr.makeStringAndClear(), true);
+ ESelection aESel = pEdView->GetSelection();
+ aESel.end.nIndex = aESel.start.nIndex + aFirstArgStr.getLength();
+ pEdView->SetSelection(aESel);
+ pHdl->DataChanged();
+ }
+ else
+ {
+ aString += "()";
+ pEdView->InsertText(aString);
+ pHdl->DataChanged();
+ }
+ }
+ }
+ rReq.Ignore();
+ break;
+ }
+
const SfxBoolItem* pOkItem = static_cast<const SfxBoolItem*>(&pReqArgs->Get( SID_DLG_RETOK ));
if ( pOkItem->GetValue() ) // OK
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 9d67cdc59c1b..03eb59fe1430 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -384,216 +384,219 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
case SID_SORT_DESCENDING:
case SID_SORT_ASCENDING:
{
- //#i60401 ux-ctest: Calc does not support all users' strategies regarding sorting data
- //the patch comes from maoyg
- ScSortParam aSortParam;
- ScDBData* pDBData = pTabViewShell->GetDBData();
- ScViewData& rData = GetViewData();
-
- pDBData->GetSortParam( aSortParam );
-
- if( lcl_GetSortParam( rData, aSortParam ) )
+ if (ScDBData* pDBData = pTabViewShell->GetDBData())
{
- SCCOL nCol = GetViewData().GetCurX();
- SCCOL nTab = GetViewData().GetTabNo();
- ScDocument& rDoc = GetViewData().GetDocument();
+ //#i60401 ux-ctest: Calc does not support all users' strategies regarding sorting data
+ //the patch comes from maoyg
+ ScSortParam aSortParam;
+ ScViewData& rData = GetViewData();
pDBData->GetSortParam( aSortParam );
- bool bHasHeader = rDoc.HasColHeader( aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, nTab );
-
- if( nCol < aSortParam.nCol1 )
- nCol = aSortParam.nCol1;
- else if( nCol > aSortParam.nCol2 )
- nCol = aSortParam.nCol2;
-
- aSortParam.bHasHeader = bHasHeader;
- aSortParam.bByRow = true;
- aSortParam.bCaseSens = false;
- aSortParam.bNaturalSort = false;
- aSortParam.aDataAreaExtras.mbCellNotes = false;
- aSortParam.aDataAreaExtras.mbCellDrawObjects = true;
- aSortParam.aDataAreaExtras.mbCellFormats = true;
- aSortParam.bInplace = true;
- aSortParam.maKeyState[0].bDoSort = true;
- aSortParam.maKeyState[0].nField = nCol;
- aSortParam.maKeyState[0].bAscending = ( nSlotId == SID_SORT_ASCENDING );
-
- for ( sal_uInt16 i=1; i<aSortParam.GetSortKeyCount(); i++ )
- aSortParam.maKeyState[i].bDoSort = false;
-
- pTabViewShell->UISort( aSortParam ); // subtotal when needed new
- rReq.Done();
+ if( lcl_GetSortParam( rData, aSortParam ) )
+ {
+ SCCOL nCol = GetViewData().GetCurX();
+ SCCOL nTab = GetViewData().GetTabNo();
+ ScDocument& rDoc = GetViewData().GetDocument();
+
+ pDBData->GetSortParam( aSortParam );
+ bool bHasHeader = rDoc.HasColHeader( aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, nTab );
+
+ if( nCol < aSortParam.nCol1 )
+ nCol = aSortParam.nCol1;
+ else if( nCol > aSortParam.nCol2 )
+ nCol = aSortParam.nCol2;
+
+ aSortParam.bHasHeader = bHasHeader;
+ aSortParam.bByRow = true;
+ aSortParam.bCaseSens = false;
+ aSortParam.bNaturalSort = false;
+ aSortParam.aDataAreaExtras.mbCellNotes = false;
+ aSortParam.aDataAreaExtras.mbCellDrawObjects = true;
+ aSortParam.aDataAreaExtras.mbCellFormats = true;
+ aSortParam.bInplace = true;
+ aSortParam.maKeyState[0].bDoSort = true;
+ aSortParam.maKeyState[0].nField = nCol;
+ aSortParam.maKeyState[0].bAscending = ( nSlotId == SID_SORT_ASCENDING );
+
+ for ( sal_uInt16 i=1; i<aSortParam.GetSortKeyCount(); i++ )
+ aSortParam.maKeyState[i].bDoSort = false;
+
+ pTabViewShell->UISort( aSortParam ); // subtotal when needed new
+
+ rReq.Done();
+ }
}
}
break;
case SID_SORT:
{
- const SfxItemSet* pArgs = rReq.GetArgs();
-
- //#i60401 ux-ctest: Calc does not support all users' strategies regarding sorting data
- //the patch comes from maoyg
-
- if ( pArgs ) // Basic
+ if (ScDBData* pDBData = pTabViewShell->GetDBData())
{
- ScSortParam aSortParam;
- ScDBData* pDBData = pTabViewShell->GetDBData();
- ScViewData& rData = GetViewData();
+ const SfxItemSet* pArgs = rReq.GetArgs();
- pDBData->GetSortParam( aSortParam );
+ //#i60401 ux-ctest: Calc does not support all users' strategies regarding sorting data
+ //the patch comes from maoyg
- if( lcl_GetSortParam( rData, aSortParam ) )
+ if ( pArgs ) // Basic
{
- ScDocument& rDoc = GetViewData().GetDocument();
+ ScSortParam aSortParam;
+ ScViewData& rData = GetViewData();
pDBData->GetSortParam( aSortParam );
- bool bHasHeader = rDoc.HasColHeader( aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, rData.GetTabNo() );
- if( bHasHeader )
- aSortParam.bHasHeader = bHasHeader;
-
- aSortParam.bInplace = true; // from Basic always
-
- if ( const SfxBoolItem* pItem = pArgs->GetItemIfSet( SID_SORT_BYROW ) )
- aSortParam.bByRow = pItem->GetValue();
- if ( const SfxBoolItem* pItem = pArgs->GetItemIfSet( SID_SORT_HASHEADER ) )
- aSortParam.bHasHeader = pItem->GetValue();
- if ( const SfxBoolItem* pItem = pArgs->GetItemIfSet( SID_SORT_CASESENS ) )
- aSortParam.bCaseSens = pItem->GetValue();
- if ( const SfxBoolItem* pItem = pArgs->GetItemIfSet( SID_SORT_NATURALSORT ) )
- aSortParam.bNaturalSort = pItem->GetValue();
- if ( const SfxBoolItem* pItem = pArgs->GetItemIfSet( SID_SORT_INCCOMMENTS ) )
- aSortParam.aDataAreaExtras.mbCellNotes = pItem->GetValue();
- if ( const SfxBoolItem* pItem = pArgs->GetItemIfSet( SID_SORT_INCIMAGES ) )
- aSortParam.aDataAreaExtras.mbCellDrawObjects = pItem->GetValue();
- if ( const SfxBoolItem* pItem = pArgs->GetItemIfSet( SID_SORT_ATTRIBS ) )
- aSortParam.aDataAreaExtras.mbCellFormats = pItem->GetValue();
- if ( const SfxUInt16Item* pItem = pArgs->GetItemIfSet( SID_SORT_USERDEF ) )
+
+ if( lcl_GetSortParam( rData, aSortParam ) )
{
- sal_uInt16 nUserIndex = pItem->GetValue();
- aSortParam.bUserDef = ( nUserIndex != 0 );
- if ( nUserIndex )
- aSortParam.nUserIndex = nUserIndex - 1; // Basic: 1-based
- }
+ ScDocument& rDoc = GetViewData().GetDocument();
+
+ pDBData->GetSortParam( aSortParam );
+ bool bHasHeader = rDoc.HasColHeader( aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, rData.GetTabNo() );
+ if( bHasHeader )
+ aSortParam.bHasHeader = bHasHeader;
+
+ aSortParam.bInplace = true; // from Basic always
+
+ if ( const SfxBoolItem* pItem = pArgs->GetItemIfSet( SID_SORT_BYROW ) )
+ aSortParam.bByRow = pItem->GetValue();
+ if ( const SfxBoolItem* pItem = pArgs->GetItemIfSet( SID_SORT_HASHEADER ) )
+ aSortParam.bHasHeader = pItem->GetValue();
+ if ( const SfxBoolItem* pItem = pArgs->GetItemIfSet( SID_SORT_CASESENS ) )
+ aSortParam.bCaseSens = pItem->GetValue();
+ if ( const SfxBoolItem* pItem = pArgs->GetItemIfSet( SID_SORT_NATURALSORT ) )
+ aSortParam.bNaturalSort = pItem->GetValue();
+ if ( const SfxBoolItem* pItem = pArgs->GetItemIfSet( SID_SORT_INCCOMMENTS ) )
+ aSortParam.aDataAreaExtras.mbCellNotes = pItem->GetValue();
+ if ( const SfxBoolItem* pItem = pArgs->GetItemIfSet( SID_SORT_INCIMAGES ) )
+ aSortParam.aDataAreaExtras.mbCellDrawObjects = pItem->GetValue();
+ if ( const SfxBoolItem* pItem = pArgs->GetItemIfSet( SID_SORT_ATTRIBS ) )
+ aSortParam.aDataAreaExtras.mbCellFormats = pItem->GetValue();
+ if ( const SfxUInt16Item* pItem = pArgs->GetItemIfSet( SID_SORT_USERDEF ) )
+ {
+ sal_uInt16 nUserIndex = pItem->GetValue();
+ aSortParam.bUserDef = ( nUserIndex != 0 );
+ if ( nUserIndex )
+ aSortParam.nUserIndex = nUserIndex - 1; // Basic: 1-based
+ }
- SCCOLROW nField0 = 0;
- const SfxPoolItem* pItem = nullptr;
- if ( pArgs->GetItemState( FN_PARAM_1, true, &pItem ) == SfxItemState::SET )
- nField0 = static_cast<const SfxInt32Item*>(pItem)->GetValue();
- aSortParam.maKeyState[0].bDoSort = ( nField0 != 0 );
- aSortParam.maKeyState[0].nField = nField0 > 0 ? (nField0-1) : 0;
- if ( pArgs->GetItemState( FN_PARAM_2, true, &pItem ) == SfxItemState::SET )
- aSortParam.maKeyState[0].bAscending = static_cast<const SfxBoolItem*>(pItem)->GetValue();
- SCCOLROW nField1 = 0;
- if ( pArgs->GetItemState( FN_PARAM_3, true, &pItem ) == SfxItemState::SET )
- nField1 = static_cast<const SfxInt32Item*>(pItem)->GetValue();
- aSortParam.maKeyState[1].bDoSort = ( nField1 != 0 );
- aSortParam.maKeyState[1].nField = nField1 > 0 ? (nField1-1) : 0;
- if ( pArgs->GetItemState( FN_PARAM_4, true, &pItem ) == SfxItemState::SET )
- aSortParam.maKeyState[1].bAscending = static_cast<const SfxBoolItem*>(pItem)->GetValue();
- SCCOLROW nField2 = 0;
- if ( pArgs->GetItemState( FN_PARAM_5, true, &pItem ) == SfxItemState::SET )
- nField2 = static_cast<const SfxInt32Item*>(pItem)->GetValue();
- aSortParam.maKeyState[2].bDoSort = ( nField2 != 0 );
- aSortParam.maKeyState[2].nField = nField2 > 0 ? (nField2-1) : 0;
- if ( pArgs->GetItemState( FN_PARAM_6, true, &pItem ) == SfxItemState::SET )
- aSortParam.maKeyState[2].bAscending = static_cast<const SfxBoolItem*>(pItem)->GetValue();
-
- // subtotal when needed new
- pTabViewShell->UISort( aSortParam );
- rReq.Done();
+ SCCOLROW nField0 = 0;
+ const SfxPoolItem* pItem = nullptr;
+ if ( pArgs->GetItemState( FN_PARAM_1, true, &pItem ) == SfxItemState::SET )
+ nField0 = static_cast<const SfxInt32Item*>(pItem)->GetValue();
+ aSortParam.maKeyState[0].bDoSort = ( nField0 != 0 );
+ aSortParam.maKeyState[0].nField = nField0 > 0 ? (nField0-1) : 0;
+ if ( pArgs->GetItemState( FN_PARAM_2, true, &pItem ) == SfxItemState::SET )
+ aSortParam.maKeyState[0].bAscending = static_cast<const SfxBoolItem*>(pItem)->GetValue();
+ SCCOLROW nField1 = 0;
+ if ( pArgs->GetItemState( FN_PARAM_3, true, &pItem ) == SfxItemState::SET )
+ nField1 = static_cast<const SfxInt32Item*>(pItem)->GetValue();
+ aSortParam.maKeyState[1].bDoSort = ( nField1 != 0 );
+ aSortParam.maKeyState[1].nField = nField1 > 0 ? (nField1-1) : 0;
+ if ( pArgs->GetItemState( FN_PARAM_4, true, &pItem ) == SfxItemState::SET )
+ aSortParam.maKeyState[1].bAscending = static_cast<const SfxBoolItem*>(pItem)->GetValue();
+ SCCOLROW nField2 = 0;
+ if ( pArgs->GetItemState( FN_PARAM_5, true, &pItem ) == SfxItemState::SET )
+ nField2 = static_cast<const SfxInt32Item*>(pItem)->GetValue();
+ aSortParam.maKeyState[2].bDoSort = ( nField2 != 0 );
+ aSortParam.maKeyState[2].nField = nField2 > 0 ? (nField2-1) : 0;
+ if ( pArgs->GetItemState( FN_PARAM_6, true, &pItem ) == SfxItemState::SET )
+ aSortParam.maKeyState[2].bAscending = static_cast<const SfxBoolItem*>(pItem)->GetValue();
+
+ // subtotal when needed new
+ pTabViewShell->UISort( aSortParam );
+ rReq.Done();
+ }
}
- }
- else
- {
- ScSortParam aSortParam;
- ScDBData* pDBData = pTabViewShell->GetDBData();
- ScViewData& rData = GetViewData();
-
- pDBData->GetSortParam( aSortParam );
-
- if( lcl_GetSortParam( rData, aSortParam ) )
+ else
{
- ScDocument& rDoc = GetViewData().GetDocument();
- SfxItemSetFixed<SCITEM_SORTDATA, SCITEM_SORTDATA> aArgSet( GetPool() );
+ ScSortParam aSortParam;
+ ScViewData& rData = GetViewData();
pDBData->GetSortParam( aSortParam );
- bool bHasHeader = rDoc.HasColHeader( aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, rData.GetTabNo() );
- if( bHasHeader )
- aSortParam.bHasHeader = bHasHeader;
- aArgSet.Put( ScSortItem( SCITEM_SORTDATA, &GetViewData(), &aSortParam ) );
+ if( lcl_GetSortParam( rData, aSortParam ) )
+ {
+ ScDocument& rDoc = GetViewData().GetDocument();
+ SfxItemSetFixed<SCITEM_SORTDATA, SCITEM_SORTDATA> aArgSet( GetPool() );
- ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- std::shared_ptr<ScAsyncTabController> pDlg(pFact->CreateScSortDlg(pTabViewShell->GetFrameWeld(), &aArgSet));
- pDlg->SetCurPageId(u"criteria"_ustr); // 1=sort field tab 2=sort options tab
+ pDBData->GetSortParam( aSortParam );
+ bool bHasHeader = rDoc.HasColHeader( aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, rData.GetTabNo() );
+ if( bHasHeader )
+ aSortParam.bHasHeader = bHasHeader;
- VclAbstractDialog::AsyncContext aContext;
- aContext.maEndDialogFn = [pDlg, &rData, pTabViewShell](sal_Int32 nResult)
- {
- if ( nResult == RET_OK )
+ aArgSet.Put( ScSortItem( SCITEM_SORTDATA, &GetViewData(), &aSortParam ) );
+
+ ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
+ std::shared_ptr<ScAsyncTabController> pDlg(pFact->CreateScSortDlg(pTabViewShell->GetFrameWeld(), &aArgSet));
+ pDlg->SetCurPageId(u"criteria"_ustr); // 1=sort field tab 2=sort options tab
+
+ VclAbstractDialog::AsyncContext aContext;
+ aContext.maEndDialogFn = [pDlg, &rData, pTabViewShell](sal_Int32 nResult)
{
- const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
- const ScSortParam& rOutParam =
- pOutSet->Get( SCITEM_SORTDATA ).GetSortData();
+ if ( nResult == RET_OK )
+ {
+ const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
+ const ScSortParam& rOutParam =
+ pOutSet->Get( SCITEM_SORTDATA ).GetSortData();
- // subtotal when needed new
+ // subtotal when needed new
- pTabViewShell->UISort( rOutParam );
+ pTabViewShell->UISort( rOutParam );
- SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
- SfxRequest aRequest(rViewFrm, SID_SORT);
+ SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
+ SfxRequest aRequest(rViewFrm, SID_SORT);
- if ( rOutParam.bInplace )
- {
- aRequest.AppendItem( SfxBoolItem( SID_SORT_BYROW,
- rOutParam.bByRow ) );
- aRequest.AppendItem( SfxBoolItem( SID_SORT_HASHEADER,
- rOutParam.bHasHeader ) );
- aRequest.AppendItem( SfxBoolItem( SID_SORT_CASESENS,
- rOutParam.bCaseSens ) );
- aRequest.AppendItem( SfxBoolItem( SID_SORT_NATURALSORT,
- rOutParam.bNaturalSort ) );
- aRequest.AppendItem( SfxBoolItem( SID_SORT_INCCOMMENTS,
- rOutParam.aDataAreaExtras.mbCellNotes ) );
- aRequest.AppendItem( SfxBoolItem( SID_SORT_INCIMAGES,
- rOutParam.aDataAreaExtras.mbCellDrawObjects ) );
- aRequest.AppendItem( SfxBoolItem( SID_SORT_ATTRIBS,
- rOutParam.aDataAreaExtras.mbCellFormats ) );
- sal_uInt16 nUser = rOutParam.bUserDef ? ( rOutParam.nUserIndex + 1 ) : 0;
- aRequest.AppendItem( SfxUInt16Item( SID_SORT_USERDEF, nUser ) );
- if ( rOutParam.maKeyState[0].bDoSort )
- {
- aRequest.AppendItem( SfxInt32Item( TypedWhichId<SfxInt32Item>(FN_PARAM_1),
- rOutParam.maKeyState[0].nField + 1 ) );
- aRequest.AppendItem( SfxBoolItem( FN_PARAM_2,
- rOutParam.maKeyState[0].bAscending ) );
- }
- if ( rOutParam.maKeyState[1].bDoSort )
- {
- aRequest.AppendItem( SfxInt32Item( TypedWhichId<SfxInt32Item>(FN_PARAM_3),
- rOutParam.maKeyState[1].nField + 1 ) );
- aRequest.AppendItem( SfxBoolItem( FN_PARAM_4,
- rOutParam.maKeyState[1].bAscending ) );
- }
- if ( rOutParam.maKeyState[2].bDoSort )
+ if ( rOutParam.bInplace )
{
- aRequest.AppendItem( SfxInt32Item( TypedWhichId<SfxInt32Item>(FN_PARAM_5),
- rOutParam.maKeyState[2].nField + 1 ) );
- aRequest.AppendItem( SfxBoolItem( FN_PARAM_6,
- rOutParam.maKeyState[2].bAscending ) );
+ aRequest.AppendItem( SfxBoolItem( SID_SORT_BYROW,
+ rOutParam.bByRow ) );
+ aRequest.AppendItem( SfxBoolItem( SID_SORT_HASHEADER,
+ rOutParam.bHasHeader ) );
+ aRequest.AppendItem( SfxBoolItem( SID_SORT_CASESENS,
+ rOutParam.bCaseSens ) );
+ aRequest.AppendItem( SfxBoolItem( SID_SORT_NATURALSORT,
+ rOutParam.bNaturalSort ) );
+ aRequest.AppendItem( SfxBoolItem( SID_SORT_INCCOMMENTS,
+ rOutParam.aDataAreaExtras.mbCellNotes ) );
+ aRequest.AppendItem( SfxBoolItem( SID_SORT_INCIMAGES,
+ rOutParam.aDataAreaExtras.mbCellDrawObjects ) );
+ aRequest.AppendItem( SfxBoolItem( SID_SORT_ATTRIBS,
+ rOutParam.aDataAreaExtras.mbCellFormats ) );
+ sal_uInt16 nUser = rOutParam.bUserDef ? ( rOutParam.nUserIndex + 1 ) : 0;
+ aRequest.AppendItem( SfxUInt16Item( SID_SORT_USERDEF, nUser ) );
+ if ( rOutParam.maKeyState[0].bDoSort )
+ {
+ aRequest.AppendItem( SfxInt32Item( TypedWhichId<SfxInt32Item>(FN_PARAM_1),
+ rOutParam.maKeyState[0].nField + 1 ) );
+ aRequest.AppendItem( SfxBoolItem( FN_PARAM_2,
+ rOutParam.maKeyState[0].bAscending ) );
+ }
+ if ( rOutParam.maKeyState[1].bDoSort )
+ {
+ aRequest.AppendItem( SfxInt32Item( TypedWhichId<SfxInt32Item>(FN_PARAM_3),
+ rOutParam.maKeyState[1].nField + 1 ) );
+ aRequest.AppendItem( SfxBoolItem( FN_PARAM_4,
+ rOutParam.maKeyState[1].bAscending ) );
+ }
+ if ( rOutParam.maKeyState[2].bDoSort )
+ {
+ aRequest.AppendItem( SfxInt32Item( TypedWhichId<SfxInt32Item>(FN_PARAM_5),
+ rOutParam.maKeyState[2].nField + 1 ) );
+ aRequest.AppendItem( SfxBoolItem( FN_PARAM_6,
+ rOutParam.maKeyState[2].bAscending ) );
+ }
}
- }
- aRequest.Done();
- }
- else
- {
- rData.GetDocShell().CancelAutoDBRange();
- }
- };
+ aRequest.Done();
+ }
+ else
+ {
+ rData.GetDocShell().CancelAutoDBRange();
+ }
+ };
- pDlg->StartExecuteAsync(aContext);
+ pDlg->StartExecuteAsync(aContext);
+ }
}
}
}
@@ -671,17 +674,18 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
case SID_UNFILTER:
{
- ScQueryParam aParam;
// tdf#117346 - show current data range of the filter with selection
- ScDBData* pDBData = pTabViewShell->GetDBData(true, SC_DB_OLD);
-
- pDBData->GetQueryParam( aParam );
- SCSIZE nEC = aParam.GetEntryCount();
- for (SCSIZE i=0; i<nEC; i++)
- aParam.GetEntry(i).bDoQuery = false;
- aParam.bDuplicate = true;
- pTabViewShell->Query( aParam, nullptr, true );
- rReq.Done();
+ if (ScDBData* pDBData = pTabViewShell->GetDBData(true, SC_DB_OLD))
+ {
+ ScQueryParam aParam;
+ pDBData->GetQueryParam( aParam );
+ SCSIZE nEC = aParam.GetEntryCount();
+ for (SCSIZE i=0; i<nEC; i++)
+ aParam.GetEntry(i).bDoQuery = false;
+ aParam.bDuplicate = true;
+ pTabViewShell->Query( aParam, nullptr, true );
+ rReq.Done();
+ }
}
break;
@@ -826,7 +830,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
break;
case SID_DATA_PROVIDER:
{
- auto xDoc = o3tl::make_shared<ScDocument>();
+ auto xDoc = std::make_shared<ScDocument>();
xDoc->InsertTab(0, u"test"_ustr);
ScDocument& rDoc = GetViewData().GetDocument();
ScDataProviderDlg aDialog(pTabViewShell->GetDialogParent(), std::move(xDoc), &rDoc);
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index a1b24136a95f..2fcdd0ceef40 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -278,35 +278,31 @@ void ScCellShell::Execute( SfxRequest& rReq )
rBindings.Invalidate(SID_DOC_MODIFIED);
}
- OUString aStr( pReqArgs->Get( SID_ENTER_STRING ).GetValue() );
+ OUString aInputString = pReqArgs->Get(SID_ENTER_STRING).GetValue();
const SfxPoolItem* pDontCommitItem;
bool bCommit = true;
if (pReqArgs->HasItem(FN_PARAM_1, &pDontCommitItem))
bCommit = !(static_cast<const SfxBoolItem*>(pDontCommitItem)->GetValue());
- ScInputHandler* pHdl = pScMod->GetInputHdl(pTabViewShell);
+ ScInputHandler* pInputHandler = pScMod->GetInputHdl(pTabViewShell);
if (bCommit)
{
- pTabViewShell->EnterData( GetViewData().GetCurX(),
- GetViewData().GetCurY(),
- GetViewData().GetTabNo(),
- aStr, nullptr,
- true /*bMatrixExpand*/);
+ pTabViewShell->EnterDataToCurrentCell(aInputString, nullptr, true /*bMatrixExpand*/);
}
- else if (pHdl)
+ else if (pInputHandler)
{
pScMod->SetInputMode(SC_INPUT_TABLE);
- EditView* pTableView = pHdl->GetActiveView();
- pHdl->DataChanging();
+ EditView* pTableView = pInputHandler->GetActiveView();
+ pInputHandler->DataChanging();
if (pTableView)
- pTableView->getEditEngine().SetText(aStr);
- pHdl->DataChanged();
+ pTableView->getEditEngine().SetText(aInputString);
+ pInputHandler->DataChanged();
pScMod->SetInputMode(SC_INPUT_NONE);
}
- if ( !pHdl || !pHdl->IsInEnterHandler() )
+ if (!pInputHandler || !pInputHandler->IsInEnterHandler())
{
// UpdateInputHandler is needed after the cell content
// has changed, but if called from EnterHandler, UpdateInputHandler
diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx
index 8b0ade4fee01..ec13d170f7ef 100644
--- a/sc/source/ui/view/dbfunc.cxx
+++ b/sc/source/ui/view/dbfunc.cxx
@@ -282,6 +282,9 @@ void ScDBFunc::ToggleAutoFilter()
ScDocument& rDoc = rViewData.GetDocument();
ScDBData* pDBData = GetDBData(false, SC_DB_AUTOFILTER, ScGetDBSelection::RowDown);
+ if (!pDBData)
+ return;
+
pDBData->SetByRow( true ); //! undo, retrieve beforehand ??
pDBData->GetQueryParam( aParam );
@@ -419,6 +422,8 @@ void ScDBFunc::HideAutoFilter()
ScDocument& rDoc = rDocSh.GetDocument();
ScDBData* pDBData = GetDBData( false );
+ if (!pDBData)
+ return;
SCTAB nTab;
SCCOL nCol1, nCol2;
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index 192bb2d996fd..fedfa9480d53 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -79,7 +79,6 @@ using ::com::sun::star::uno::UNO_QUERY;
using ::com::sun::star::beans::XPropertySet;
using ::com::sun::star::container::XNameAccess;
using ::com::sun::star::sheet::XDimensionsSupplier;
-using ::std::vector;
// outliner
@@ -1715,7 +1714,7 @@ void ScDBFunc::DataPilotSort(ScDPObject* pDPObj, tools::Long nDimIndex, bool bAs
{
typedef ScDPSaveDimension::MemberList MemList;
const MemList& rDimMembers = pSaveDim->GetMembers();
- vector<OUString> aMembers;
+ std::vector<OUString> aMembers;
std::unordered_set<OUString> aMemberSet;
size_t nMemberCount = 0;
for (ScDPSaveMember* pMem : rDimMembers)
@@ -1753,7 +1752,7 @@ void ScDBFunc::DataPilotSort(ScDPObject* pDPObj, tools::Long nDimIndex, bool bAs
// Rank all members.
- vector<OUString> aRankedNames(nMemberCount);
+ std::vector<OUString> aRankedNames(nMemberCount);
sal_uInt16 nCurStrId = 0;
for (auto const& aMemberName : aMembers)
{
@@ -2080,7 +2079,7 @@ void ScDBFunc::ShowDataPilotSourceData( ScDPObject& rDPObj, const Sequence<sheet
continue;
ScPatternAttr aPattern(pInsDoc->getCellAttributeHelper());
- aPattern.GetItemSet().Put( SfxUInt32Item(ATTR_VALUE_FORMAT, static_cast<sal_uInt32>(nNumFmt)) );
+ aPattern.ItemSetPut(SfxUInt32Item(ATTR_VALUE_FORMAT, static_cast<sal_uInt32>(nNumFmt)));
pInsDoc->ApplyPatternAreaTab(nCol, 1, nCol, nRowSize-1, nNewTab, aPattern);
}
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index f15ee1903f12..75080dce163e 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -639,6 +639,12 @@ void ScEditShell::Execute( SfxRequest& rReq )
}
}
break;
+ case SID_INSERT_HYPERLINK:
+ {
+ rViewData.GetViewShell()->GetViewFrame().GetDispatcher()->Execute(
+ SID_HYPERLINK_DIALOG);
+ }
+ break;
case SID_EDIT_HYPERLINK:
{
// Ensure the field is selected first
@@ -823,6 +829,16 @@ void ScEditShell::GetState( SfxItemSet& rSet )
}
break;
+ case SID_INSERT_HYPERLINK:
+ {
+ // Disable insert hyperlink if no text is selected or cursor is at a URL field
+ ESelection aSel( pActiveView->GetSelection() );
+ if (!aSel.HasRange() || URLFieldHelper::IsCursorAtURLField(*pEditView,
+ /*AlsoCheckBeforeCursor=*/true))
+ rSet.DisableItem (nWhich);
+ }
+ break;
+
case SID_EDIT_HYPERLINK:
case SID_COPY_HYPERLINK_LOCATION:
case SID_REMOVE_HYPERLINK:
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 66df2025835a..c702dd8f4545 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -180,7 +180,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
SfxItemSet aItemSet( GetPool() );
ScPatternAttr aNewAttrs(GetViewData().GetDocument().getCellAttributeHelper());
- SfxItemSet& rNewSet = aNewAttrs.GetItemSet();
+ SfxItemSet& rNewSet = aNewAttrs.GetItemSetWritable();
rNewSet.Put( aItemSet, false );
rDoc.ApplySelectionPattern( aNewAttrs, rDoc.GetPreviewSelection() );
@@ -203,7 +203,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
SfxItemSet aItemSet( GetPool() );
ScPatternAttr aNewAttrs(GetViewData().GetDocument().getCellAttributeHelper());
- SfxItemSet& rNewSet = aNewAttrs.GetItemSet();
+ SfxItemSet& rNewSet = aNewAttrs.GetItemSetWritable();
rNewSet.Put( aItemSet, false );
rDoc.ApplySelectionPattern( aNewAttrs, aPreviewMark );
pTabViewShell->UpdateSelectionArea(aPreviewMark, &aAttr, /*adjustHeight*/ false);
@@ -333,11 +333,10 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
{
const SvNumberformat* pNewEntry = pFormatter->GetEntry( nNewFormat );
ScPatternAttr aNewAttrs(rDoc.getCellAttributeHelper());
- SfxItemSet& rSet = aNewAttrs.GetItemSet();
LanguageType eNewLang = pNewEntry ? pNewEntry->GetLanguage() : LANGUAGE_DONTKNOW;
if ( eNewLang != eOldLang && eNewLang != LANGUAGE_DONTKNOW )
- rSet.Put( SvxLanguageItem( eNewLang, ATTR_LANGUAGE_FORMAT ) );
- rSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNewFormat ) );
+ aNewAttrs.ItemSetPut(SvxLanguageItem(eNewLang, ATTR_LANGUAGE_FORMAT));
+ aNewAttrs.ItemSetPut(SfxUInt32Item(ATTR_VALUE_FORMAT, nNewFormat));
pTabViewShell->ApplySelectionPattern( aNewAttrs );
}
else
@@ -1061,9 +1060,35 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
case SID_FRAME_LINESTYLE:
{
// Update default line
- const ::editeng::SvxBorderLine* pLine =
- pNewAttrs->Get( SID_FRAME_LINESTYLE ).
- GetLine();
+ ::editeng::SvxBorderLine aLine;
+ const ::editeng::SvxBorderLine* pLine = nullptr;
+ const SfxInt16Item* lineStyleItem = rReq.GetArg<SfxInt16Item>(FN_PARAM_1);
+
+ if (lineStyleItem)
+ {
+ const SfxInt16Item* InnerLineWidthItem
+ = rReq.GetArg<SfxInt16Item>(FN_PARAM_2);
+ const SfxInt16Item* OuterLineWidthItem
+ = rReq.GetArg<SfxInt16Item>(FN_PARAM_3);
+ const SfxInt16Item* LineDistanceItem
+ = rReq.GetArg<SfxInt16Item>(FN_PARAM_4);
+
+ sal_uInt16 InnerLineWidth, OuterLineWidth, LineDistance;
+ SvxBorderLineStyle lineStyle
+ = static_cast<SvxBorderLineStyle>(lineStyleItem->GetValue());
+ InnerLineWidth = InnerLineWidthItem ? InnerLineWidthItem->GetValue() : 0;
+ OuterLineWidth = OuterLineWidthItem ? OuterLineWidthItem->GetValue() : 0;
+ LineDistance = LineDistanceItem ? LineDistanceItem->GetValue() : 0;
+
+ aLine.GuessLinesWidths(
+ lineStyle, InnerLineWidth, OuterLineWidth, LineDistance);
+
+ pLine = &aLine;
+ }
+ else
+ {
+ pLine = pNewAttrs->Get(SID_FRAME_LINESTYLE).GetLine();
+ }
if ( pLine )
{
@@ -1091,6 +1116,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
pTabViewShell->SetDefaultFrameLine( &aDefLine );
pTabViewShell->SetSelectionFrameLines( nullptr, false );
}
+ rReq.Done();
}
break;
@@ -1444,6 +1470,8 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet )
SvxLineItem aItem(SID_FRAME_LINESTYLE);
aItem.SetLine(&aLine);
rSet.Put( aItem );
+ if (!aLine.GetWidth())
+ rSet.DisableItem(SID_FRAME_LINESTYLE);
}
}
}
@@ -1913,9 +1941,8 @@ void ScFormatShell::ExecuteTextDirection( const SfxRequest& rReq )
{
bool bVert = (nSlot == SID_TEXTDIRECTION_TOP_TO_BOTTOM);
ScPatternAttr aAttr(GetViewData().GetDocument().getCellAttributeHelper());
- SfxItemSet& rItemSet = aAttr.GetItemSet();
- rItemSet.Put( ScVerticalStackCell( bVert ) );
- rItemSet.Put( SfxBoolItem( ATTR_VERTICAL_ASIAN, bVert ) );
+ aAttr.ItemSetPut(ScVerticalStackCell(bVert));
+ aAttr.ItemSetPut(SfxBoolItem(ATTR_VERTICAL_ASIAN, bVert));
pTabViewShell->ApplySelectionPattern( aAttr );
pTabViewShell->AdjustBlockHeight();
}
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 2c1ab215aa2c..35128ef40dd1 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -5789,7 +5789,7 @@ std::shared_ptr<ScFieldEditEngine> createEditEngine( ScDocShell& rDocSh, const S
{
ScDocument& rDoc = rDocSh.GetDocument();
- auto pEngine = std::make_shared<ScFieldEditEngine>(&rDoc, rDoc.GetEditTextObjectPool());
+ auto pEngine = std::make_shared<ScFieldEditEngine>(&rDoc, rDoc.GetEditEnginePool());
ScSizeDeviceProvider aProv(rDocSh);
pEngine->SetRefDevice(aProv.GetDevice());
pEngine->SetRefMapMode(MapMode(MapUnit::Map100thMM));
@@ -6186,7 +6186,7 @@ void ScGridWindow::notifyKitCellViewCursor(const SfxViewShell* pForShell) const
aCursor = pForTabView->GetViewData().describeCellCursorAt(
mrViewData.GetCurX(), mrViewData.GetCurY()); // our position.
}
- SfxLokHelper::notifyOtherView(pViewShell, pForShell, LOK_CALLBACK_CELL_VIEW_CURSOR, "rectangle", aCursor);
+ SfxLokHelper::notifyOtherView(*pViewShell, pForShell, LOK_CALLBACK_CELL_VIEW_CURSOR, "rectangle", aCursor);
}
// Send our cursor details to a view described by @pForShell, or all views
@@ -6208,7 +6208,7 @@ void ScGridWindow::updateKitCellCursor(const SfxViewShell* pForShell) const
if (pForShell)
{
- SfxLokHelper::notifyOtherView(pViewShell, pForShell,
+ SfxLokHelper::notifyOtherView(*pViewShell, pForShell,
LOK_CALLBACK_CELL_VIEW_CURSOR, "rectangle", aCursor);
}
else
@@ -6480,7 +6480,7 @@ void ScGridWindow::UpdateKitSelection(const std::vector<tools::Rectangle>& rRect
std::vector<tools::Rectangle> aPixelRects;
pGrid->GetPixelRectsFor(mrViewData.GetMarkData() /* ours */, aPixelRects);
auto aOtherLogicRects = convertPixelToLogical(pOther->GetViewData(), aPixelRects, aDummyBBox);
- SfxLokHelper::notifyOtherView(pViewShell, pOther, LOK_CALLBACK_TEXT_VIEW_SELECTION,
+ SfxLokHelper::notifyOtherView(*pViewShell, pOther, LOK_CALLBACK_TEXT_VIEW_SELECTION,
"selection", rectanglesToString(aOtherLogicRects));
}
}
@@ -6527,7 +6527,7 @@ void ScGridWindow::updateOtherKitSelections() const
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION, aRectsString);
}
else
- SfxLokHelper::notifyOtherView(it, pViewShell, LOK_CALLBACK_TEXT_VIEW_SELECTION,
+ SfxLokHelper::notifyOtherView(*it, pViewShell, LOK_CALLBACK_TEXT_VIEW_SELECTION,
"selection", aRectsString);
}
}
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index 558272d3b382..fab1e5a0168c 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -50,10 +50,8 @@
using namespace css;
using namespace css::sheet;
-using css::sheet::DataPilotFieldOrientation;
-using std::vector;
-DataPilotFieldOrientation ScGridWindow::GetDPFieldOrientation( SCCOL nCol, SCROW nRow ) const
+sheet::DataPilotFieldOrientation ScGridWindow::GetDPFieldOrientation( SCCOL nCol, SCROW nRow ) const
{
ScDocument& rDoc = mrViewData.GetDocument();
SCTAB nTab = mrViewData.GetTabNo();
@@ -61,23 +59,23 @@ DataPilotFieldOrientation ScGridWindow::GetDPFieldOrientation( SCCOL nCol, SCROW
if (!pDPObj)
return DataPilotFieldOrientation_HIDDEN;
- DataPilotFieldOrientation nOrient = DataPilotFieldOrientation_HIDDEN;
+ sheet::DataPilotFieldOrientation nOrient = DataPilotFieldOrientation_HIDDEN;
// Check for page field first.
if (nCol > 0)
{
// look for the dimension header left of the drop-down arrow
tools::Long nField = pDPObj->GetHeaderDim( ScAddress( nCol-1, nRow, nTab ), nOrient );
- if ( nField >= 0 && nOrient == DataPilotFieldOrientation_PAGE )
+ if ( nField >= 0 && nOrient == sheet::DataPilotFieldOrientation_PAGE )
{
bool bIsDataLayout = false;
OUString aFieldName = pDPObj->GetDimName( nField, bIsDataLayout );
if ( !aFieldName.isEmpty() && !bIsDataLayout )
- return DataPilotFieldOrientation_PAGE;
+ return sheet::DataPilotFieldOrientation_PAGE;
}
}
- nOrient = DataPilotFieldOrientation_HIDDEN;
+ nOrient = sheet::DataPilotFieldOrientation_HIDDEN;
// Now, check for row/column field.
tools::Long nField = pDPObj->GetHeaderDim(ScAddress(nCol, nRow, nTab), nOrient);
@@ -95,7 +93,7 @@ DataPilotFieldOrientation ScGridWindow::GetDPFieldOrientation( SCCOL nCol, SCROW
// private method for mouse button handling
bool ScGridWindow::DoPageFieldSelection( SCCOL nCol, SCROW nRow )
{
- if (GetDPFieldOrientation( nCol, nRow ) == DataPilotFieldOrientation_PAGE)
+ if (GetDPFieldOrientation( nCol, nRow ) == sheet::DataPilotFieldOrientation_PAGE)
{
LaunchPageFieldMenu( nCol, nRow );
return true;
@@ -655,7 +653,7 @@ void ScGridWindow::DPSetupFieldPopup(std::unique_ptr<ScCheckListMenuControl::Ext
if (bDimOrientNotPage)
{
- vector<OUString> aUserSortNames;
+ std::vector<OUString> aUserSortNames;
ScUserList& rUserList = ScGlobal::GetUserList();
size_t nUserListSize = rUserList.size();
aUserSortNames.reserve(nUserListSize);
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 6fbdeb8cb021..eb67ff3ec120 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -353,7 +353,7 @@ void ScGridWindow::InvalidateLOKViewCursor(const tools::Rectangle& rCursorRect,
Fraction aZoomY = rOtherViewData.GetZoomY();
if (aZoomX == aScaleX && aZoomY == aScaleY)
{
- SfxLokHelper::notifyOtherView(pThisViewShell, pOtherViewShell,
+ SfxLokHelper::notifyOtherView(*pThisViewShell, pOtherViewShell,
LOK_CALLBACK_INVALIDATE_VIEW_CURSOR, "rectangle", rCursorRect.toString());
}
}
@@ -677,13 +677,13 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
&& comphelper::LibreOfficeKit::isCompatFlagSet(
comphelper::LibreOfficeKit::Compat::scNoGridBackground);
- SCTAB nTab = aOutputData.nTab;
- SCCOL nX1 = aOutputData.nX1;
- SCROW nY1 = aOutputData.nY1;
- SCCOL nX2 = aOutputData.nX2;
- SCROW nY2 = aOutputData.nY2;
- tools::Long nScrX = aOutputData.nScrX;
- tools::Long nScrY = aOutputData.nScrY;
+ SCTAB nTab = aOutputData.mnTab;
+ SCCOL nX1 = aOutputData.mnX1;
+ SCROW nY1 = aOutputData.mnY1;
+ SCCOL nX2 = aOutputData.mnX2;
+ SCROW nY2 = aOutputData.mnY2;
+ tools::Long nScrX = aOutputData.mnScrX;
+ tools::Long nScrY = aOutputData.mnScrY;
const svtools::ColorConfig& rColorCfg = pScMod->GetColorConfig();
Color aGridColor( rColorCfg.GetColorValue( svtools::CALCGRID ).nColor );
@@ -819,32 +819,30 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
OutputDevice* pContentDev = &rDevice; // device for document content, used by overlay manager
SdrPaintWindow* pTargetPaintWindow = nullptr; // #i74769# work with SdrPaintWindow directly
+ // init redraw
+ if (pCurTabViewShell)
{
- // init redraw
- if (pCurTabViewShell)
+ MapMode aCurrentMapMode(pContentDev->GetMapMode());
+ pContentDev->SetMapMode(aDrawMode);
+ SdrView* pDrawView = pCurTabViewShell->GetScDrawView();
+
+ if(pDrawView)
{
- MapMode aCurrentMapMode(pContentDev->GetMapMode());
- pContentDev->SetMapMode(aDrawMode);
- SdrView* pDrawView = pCurTabViewShell->GetScDrawView();
+ // #i74769# Use new BeginDrawLayers() interface
+ vcl::Region aDrawingRegion(aDrawingRectLogic);
+ pTargetPaintWindow = pDrawView->BeginDrawLayers(pContentDev, aDrawingRegion);
+ OSL_ENSURE(pTargetPaintWindow, "BeginDrawLayers: Got no SdrPaintWindow (!)");
- if(pDrawView)
+ if (!bIsTiledRendering)
{
- // #i74769# Use new BeginDrawLayers() interface
- vcl::Region aDrawingRegion(aDrawingRectLogic);
- pTargetPaintWindow = pDrawView->BeginDrawLayers(pContentDev, aDrawingRegion);
- OSL_ENSURE(pTargetPaintWindow, "BeginDrawLayers: Got no SdrPaintWindow (!)");
-
- if (!bIsTiledRendering)
- {
- // #i74769# get target device from SdrPaintWindow, this may be the prerender
- // device now, too.
- pContentDev = &(pTargetPaintWindow->GetTargetOutputDevice());
- aOutputData.SetContentDevice(pContentDev);
- }
+ // #i74769# get target device from SdrPaintWindow, this may be the prerender
+ // device now, too.
+ pContentDev = &(pTargetPaintWindow->GetTargetOutputDevice());
+ aOutputData.SetContentDevice(pContentDev);
}
-
- pContentDev->SetMapMode(aCurrentMapMode);
}
+
+ pContentDev->SetMapMode(aCurrentMapMode);
}
// app-background / document edge (area) (Pixel)
@@ -1059,44 +1057,42 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
}
}
+ // end redraw
+ if (pCurTabViewShell)
{
- // end redraw
- if (pCurTabViewShell)
+ MapMode aCurrentMapMode(pContentDev->GetMapMode());
+ pContentDev->SetMapMode(aDrawMode);
+
+ if (bIsTiledRendering)
{
- MapMode aCurrentMapMode(pContentDev->GetMapMode());
- pContentDev->SetMapMode(aDrawMode);
+ Point aOrigin = aOriginalMode.GetOrigin();
+ if (bLayoutRTL)
+ aOrigin.setX(-aOrigin.getX()
+ + o3tl::toTwips(aOutputData.mnScrX + aOutputData.GetScrW(), o3tl::Length::px));
+ else
+ aOrigin.AdjustX(o3tl::toTwips(aOutputData.mnScrX, o3tl::Length::px));
- if (bIsTiledRendering)
- {
- Point aOrigin = aOriginalMode.GetOrigin();
- if (bLayoutRTL)
- aOrigin.setX(-aOrigin.getX()
- + o3tl::toTwips(aOutputData.nScrX + aOutputData.GetScrW(), o3tl::Length::px));
- else
- aOrigin.AdjustX(o3tl::toTwips(aOutputData.nScrX, o3tl::Length::px));
-
- aOrigin.AdjustY(o3tl::toTwips(aOutputData.nScrY, o3tl::Length::px));
- aOrigin = o3tl::convert(aOrigin, o3tl::Length::twip, o3tl::Length::mm100);
- // keep into account the zoom factor
- aOrigin = aOrigin.scale(
- aDrawMode.GetScaleX().GetDenominator(), aDrawMode.GetScaleX().GetNumerator(),
- aDrawMode.GetScaleY().GetDenominator(), aDrawMode.GetScaleY().GetNumerator());
-
- MapMode aNew = rDevice.GetMapMode();
- aNew.SetOrigin(aOrigin);
- rDevice.SetMapMode(aNew);
- }
+ aOrigin.AdjustY(o3tl::toTwips(aOutputData.mnScrY, o3tl::Length::px));
+ aOrigin = o3tl::convert(aOrigin, o3tl::Length::twip, o3tl::Length::mm100);
+ // keep into account the zoom factor
+ aOrigin = aOrigin.scale(
+ aDrawMode.GetScaleX().GetDenominator(), aDrawMode.GetScaleX().GetNumerator(),
+ aDrawMode.GetScaleY().GetDenominator(), aDrawMode.GetScaleY().GetNumerator());
- SdrView* pDrawView = pCurTabViewShell->GetScDrawView();
+ MapMode aNew = rDevice.GetMapMode();
+ aNew.SetOrigin(aOrigin);
+ rDevice.SetMapMode(aNew);
+ }
- if(pDrawView)
- {
- // #i74769# work with SdrPaintWindow directly
- pDrawView->EndDrawLayers(*pTargetPaintWindow, true);
- }
+ SdrView* pDrawView = pCurTabViewShell->GetScDrawView();
- pContentDev->SetMapMode(aCurrentMapMode);
+ if(pDrawView)
+ {
+ // #i74769# work with SdrPaintWindow directly
+ pDrawView->EndDrawLayers(*pTargetPaintWindow, true);
}
+
+ pContentDev->SetMapMode(aCurrentMapMode);
}
// in place editing - lok case
diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx
index 3913b2c27e84..d865fcfa0e31 100644
--- a/sc/source/ui/view/gridwin5.cxx
+++ b/sc/source/ui/view/gridwin5.cxx
@@ -371,8 +371,7 @@ void ScGridWindow::HideNoteOverlay()
mpNoteOverlay.reset();
}
-css::uno::Reference< css::accessibility::XAccessible >
- ScGridWindow::CreateAccessible()
+rtl::Reference<comphelper::OAccessible> ScGridWindow::CreateAccessible()
{
rtl::Reference<ScAccessibleDocument> pAccessibleDocument =
new ScAccessibleDocument(GetAccessibleParent(),
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 062a3d71cdf9..d49918ec9f27 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -149,68 +149,68 @@ ScOutputData::ScOutputData( OutputDevice* pNewDev, ScOutputType eNewType,
mpRefDevice( pNewDev ), // default is output device
pFmtDevice( pNewDev ), // default is output device
mrTabInfo( rTabInfo ),
- pRowInfo( rTabInfo.mpRowInfo.get() ),
- nArrCount( rTabInfo.mnArrCount ),
+ mpRowInfo( rTabInfo.mpRowInfo.get() ),
+ mnArrCount( rTabInfo.mnArrCount ),
mpDoc( pNewDoc ),
- nTab( nNewTab ),
- nScrX( nNewScrX ),
- nScrY( nNewScrY ),
- nX1( nNewX1 ),
- nY1( nNewY1 ),
- nX2( nNewX2 ),
- nY2( nNewY2 ),
- eType( eNewType ),
+ mnTab( nNewTab ),
+ mnScrX( nNewScrX ),
+ mnScrY( nNewScrY ),
+ mnX1( nNewX1 ),
+ mnY1( nNewY1 ),
+ mnX2( nNewX2 ),
+ mnY2( nNewY2 ),
+ meType( eNewType ),
mnPPTX( nPixelPerTwipsX ),
mnPPTY( nPixelPerTwipsY ),
- pViewShell( nullptr ),
- pDrawView( nullptr ),
- bEditMode( false ),
- nEditCol( 0 ),
- nEditRow( 0 ),
- bMetaFile( false ),
- bPagebreakMode( false ),
- bSolidBackground( false ),
+ mpViewShell( nullptr ),
+ mpDrawView( nullptr ),
+ mbEditMode( false ),
+ mnEditCol( 0 ),
+ mnEditRow( 0 ),
+ mbMetaFile( false ),
+ mbPagebreakMode( false ),
+ mbSolidBackground( false ),
mbUseStyleColor( false ),
mbForceAutoColor( officecfg::Office::Common::Accessibility::IsAutomaticFontColor::get() ),
mbSyntaxMode( false ),
- aGridColor( COL_BLACK ),
+ maGridColor( COL_BLACK ),
mbShowNullValues( true ),
mbShowFormulas( false ),
- bShowSpellErrors( false ),
- bMarkClipped( false ), // sal_False for printer/metafile etc.
- bSnapPixel( false ),
- bAnyClipped( false ),
- bVertical(false),
+ mbShowSpellErrors( false ),
+ mbMarkClipped( false ), // sal_False for printer/metafile etc.
+ mbSnapPixel( false ),
+ mbAnyClipped( false ),
+ mbVertical(false),
mpTargetPaintWindow(nullptr), // #i74769# use SdrPaintWindow direct
mpSpellCheckCxt(nullptr)
{
if (pZoomX)
- aZoomX = *pZoomX;
+ maZoomX = *pZoomX;
else
- aZoomX = Fraction(1,1);
+ maZoomX = Fraction(1,1);
if (pZoomY)
- aZoomY = *pZoomY;
+ maZoomY = *pZoomY;
else
- aZoomY = Fraction(1,1);
+ maZoomY = Fraction(1,1);
- nVisX1 = nX1;
- nVisY1 = nY1;
- nVisX2 = nX2;
- nVisY2 = nY2;
- mpDoc->StripHidden( nVisX1, nVisY1, nVisX2, nVisY2, nTab );
+ mnVisX1 = mnX1;
+ mnVisY1 = mnY1;
+ mnVisX2 = mnX2;
+ mnVisY2 = mnY2;
+ mpDoc->StripHidden( mnVisX1, mnVisY1, mnVisX2, mnVisY2, mnTab );
- nScrW = 0;
- for (SCCOL nX=nVisX1; nX<=nVisX2; nX++)
- nScrW += pRowInfo[0].basicCellInfo(nX).nWidth;
+ mnScrW = 0;
+ for (SCCOL nX=mnVisX1; nX<=mnVisX2; nX++)
+ mnScrW += mpRowInfo[0].basicCellInfo(nX).nWidth;
- nMirrorW = nScrW;
+ mnMirrorW = mnScrW;
- nScrH = 0;
- for (SCSIZE nArrY=1; nArrY+1<nArrCount; nArrY++)
- nScrH += pRowInfo[nArrY].nHeight;
+ mnScrH = 0;
+ for (SCSIZE nArrY=1; nArrY+1<mnArrCount; nArrY++)
+ mnScrH += mpRowInfo[nArrY].nHeight;
- bTabProtected = mpDoc->IsTabProtected( nTab );
- bLayoutRTL = mpDoc->IsLayoutRTL( nTab );
+ mbTabProtected = mpDoc->IsTabProtected( mnTab );
+ mbLayoutRTL = mpDoc->IsLayoutRTL( mnTab );
// always needed, so call at the end of the constructor
SetCellRotations();
@@ -239,17 +239,17 @@ void ScOutputData::SetContentDevice( OutputDevice* pContentDev )
void ScOutputData::SetMirrorWidth( tools::Long nNew )
{
- nMirrorW = nNew;
+ mnMirrorW = nNew;
}
void ScOutputData::SetGridColor( const Color& rColor )
{
- aGridColor = rColor;
+ maGridColor = rColor;
}
void ScOutputData::SetMarkClipped( bool bSet )
{
- bMarkClipped = bSet;
+ mbMarkClipped = bSet;
}
void ScOutputData::SetShowNullValues( bool bSet )
@@ -264,26 +264,26 @@ void ScOutputData::SetShowFormulas( bool bSet )
void ScOutputData::SetShowSpellErrors( bool bSet )
{
- bShowSpellErrors = bSet;
+ mbShowSpellErrors = bSet;
// reset EditEngine because it depends on bShowSpellErrors
mxOutputEditEngine.reset();
}
void ScOutputData::SetSnapPixel()
{
- bSnapPixel = true;
+ mbSnapPixel = true;
}
void ScOutputData::SetEditCell( SCCOL nCol, SCROW nRow )
{
- nEditCol = nCol;
- nEditRow = nRow;
- bEditMode = true;
+ mnEditCol = nCol;
+ mnEditRow = nRow;
+ mbEditMode = true;
}
void ScOutputData::SetMetaFileMode( bool bNewMode )
{
- bMetaFile = bNewMode;
+ mbMetaFile = bNewMode;
}
void ScOutputData::SetSyntaxMode( bool bNewMode )
@@ -356,7 +356,7 @@ void ScOutputData::DrawGrid(vcl::RenderContext& rRenderContext, bool bGrid, bool
Color aPageColor;
Color aManualColor;
- if (bPagebreakMode)
+ if (mbPagebreakMode)
bPage = false; // no "normal" breaks over the whole width/height
// It is a big mess to distinguish when we are using pixels and when logic
@@ -367,7 +367,7 @@ void ScOutputData::DrawGrid(vcl::RenderContext& rRenderContext, bool bGrid, bool
// * drawing to the screen - everything is internally counted in pixels there
//
// 'Internally' in the above means the pCellInfo[...].nWidth and
- // pRowInfo[...]->nHeight:
+ // mpRowInfo[...]->nHeight:
//
// * when bWorksInPixels is true: these are in pixels
// * when bWorksInPixels is false: these are in the logic units
@@ -377,11 +377,11 @@ void ScOutputData::DrawGrid(vcl::RenderContext& rRenderContext, bool bGrid, bool
// there gradually (get rid of setting MapUnit::MapPixel first), otherwise we'd
// break all the drawing by one change.
// So until that happens, we need to special case.
- bool bWorksInPixels = bMetaFile;
+ bool bWorksInPixels = mbMetaFile;
const svtools::ColorConfig& rColorCfg = ScModule::get()->GetColorConfig();
Color aSheetBGColor = rColorCfg.GetColorValue(::svtools::DOCCOLOR).nColor;
- if ( eType == OUTTYPE_WINDOW )
+ if ( meType == OUTTYPE_WINDOW )
{
bWorksInPixels = true;
aPageColor = rColorCfg.GetColorValue(svtools::CALCPAGEBREAKAUTOMATIC).nColor;
@@ -389,8 +389,8 @@ void ScOutputData::DrawGrid(vcl::RenderContext& rRenderContext, bool bGrid, bool
}
else
{
- aPageColor = aGridColor;
- aManualColor = aGridColor;
+ aPageColor = maGridColor;
+ aManualColor = maGridColor;
}
tools::Long nOneX = 1;
@@ -402,22 +402,22 @@ void ScOutputData::DrawGrid(vcl::RenderContext& rRenderContext, bool bGrid, bool
nOneY = aOnePixel.Height();
}
- tools::Long nLayoutSign = bLayoutRTL ? -1 : 1;
+ tools::Long nLayoutSign = mbLayoutRTL ? -1 : 1;
tools::Long nSignedOneX = nOneX * nLayoutSign;
- rRenderContext.SetLineColor(bMergeCover ? aSheetBGColor : aGridColor);
+ rRenderContext.SetLineColor(bMergeCover ? aSheetBGColor : maGridColor);
ScGridMerger aGrid(&rRenderContext, nOneX, nOneY);
// vertical lines
- nPosX = nScrX;
- if ( bLayoutRTL )
- nPosX += nMirrorW - nOneX;
+ nPosX = mnScrX;
+ if ( mbLayoutRTL )
+ nPosX += mnMirrorW - nOneX;
- for (nX=nX1; nX<=nX2; nX++)
+ for (nX=mnX1; nX<=mnX2; nX++)
{
- sal_uInt16 nWidth = pRowInfo[0].basicCellInfo(nX).nWidth;
+ sal_uInt16 nWidth = mpRowInfo[0].basicCellInfo(nX).nWidth;
if (nWidth)
{
nPosX += nWidth * nLayoutSign;
@@ -428,8 +428,8 @@ void ScOutputData::DrawGrid(vcl::RenderContext& rRenderContext, bool bGrid, bool
SCCOL nCol = nX + 1;
while (nCol <= mpDoc->MaxCol())
{
- nBreak = mpDoc->HasColBreak(nCol, nTab);
- bool bHidden = mpDoc->ColHidden(nCol, nTab);
+ nBreak = mpDoc->HasColBreak(nCol, mnTab);
+ bool bHidden = mpDoc->ColHidden(nCol, mnTab);
if ( nBreak != ScBreakType::NONE || !bHidden )
break;
@@ -448,7 +448,7 @@ void ScOutputData::DrawGrid(vcl::RenderContext& rRenderContext, bool bGrid, bool
}
else
{
- rRenderContext.SetLineColor(bMergeCover ? aSheetBGColor : aGridColor);
+ rRenderContext.SetLineColor(bMergeCover ? aSheetBGColor : maGridColor);
bDashed = false;
}
@@ -458,16 +458,16 @@ void ScOutputData::DrawGrid(vcl::RenderContext& rRenderContext, bool bGrid, bool
bool bDraw = bGrid || nBreakOld != ScBreakType::NONE || bMergeCover; // simple grid only if set that way
- sal_uInt16 nWidthXplus1 = pRowInfo[0].basicCellInfo(nX+1).nWidth;
+ sal_uInt16 nWidthXplus1 = mpRowInfo[0].basicCellInfo(nX+1).nWidth;
bool bSingle = false; //! get into Fillinfo !!!!!
if ( nX<mpDoc->MaxCol() )
{
bSingle = ( nWidthXplus1 == 0 );
- for (nArrY=1; nArrY+1<nArrCount && !bSingle; nArrY++)
+ for (nArrY=1; nArrY+1<mnArrCount && !bSingle; nArrY++)
{
- if (pRowInfo[nArrY].cellInfo(nX+1).bHOverlapped)
+ if (mpRowInfo[nArrY].cellInfo(nX+1).bHOverlapped)
bSingle = true;
- if (pRowInfo[nArrY].cellInfo(nX).bHideGrid)
+ if (mpRowInfo[nArrY].cellInfo(nX).bHideGrid)
bSingle = true;
}
}
@@ -477,13 +477,13 @@ void ScOutputData::DrawGrid(vcl::RenderContext& rRenderContext, bool bGrid, bool
if ( nX<mpDoc->MaxCol() && bSingle )
{
SCCOL nVisX = nX + 1;
- while ( nVisX < mpDoc->MaxCol() && !mpDoc->GetColWidth(nVisX,nTab) )
+ while ( nVisX < mpDoc->MaxCol() && !mpDoc->GetColWidth(nVisX,mnTab) )
++nVisX;
- nPosY = nScrY;
- for (nArrY=1; nArrY+1<nArrCount; nArrY++)
+ nPosY = mnScrY;
+ for (nArrY=1; nArrY+1<mnArrCount; nArrY++)
{
- RowInfo* pThisRowInfo = &pRowInfo[nArrY];
+ RowInfo* pThisRowInfo = &mpRowInfo[nArrY];
const tools::Long nNextY = nPosY + pThisRowInfo->nHeight;
bool bHOver = pThisRowInfo->cellInfo(nX).bHideGrid;
@@ -493,15 +493,15 @@ void ScOutputData::DrawGrid(vcl::RenderContext& rRenderContext, bool bGrid, bool
bHOver = pThisRowInfo->cellInfo(nX+1).bHOverlapped;
else
{
- if (nVisX <= nX2)
+ if (nVisX <= mnX2)
bHOver = pThisRowInfo->cellInfo(nVisX).bHOverlapped;
else
bHOver = mpDoc->GetAttr(
- nVisX,pThisRowInfo->nRowNo,nTab,ATTR_MERGE_FLAG)
+ nVisX,pThisRowInfo->nRowNo,mnTab,ATTR_MERGE_FLAG)
->IsHorOverlapped();
if (bHOver)
bHOver = mpDoc->GetAttr(
- nX + 1,pThisRowInfo->nRowNo,nTab,ATTR_MERGE_FLAG)
+ nX + 1,pThisRowInfo->nRowNo,mnTab,ATTR_MERGE_FLAG)
->IsHorOverlapped();
}
}
@@ -515,7 +515,7 @@ void ScOutputData::DrawGrid(vcl::RenderContext& rRenderContext, bool bGrid, bool
}
else if (!bMergeCover)
{
- aGrid.AddVerLine(bWorksInPixels, nPosX-nSignedOneX, nScrY, nScrY+nScrH-nOneY, bDashed);
+ aGrid.AddVerLine(bWorksInPixels, nPosX-nSignedOneX, mnScrY, mnScrY+mnScrH-nOneY, bDashed);
}
}
}
@@ -525,22 +525,22 @@ void ScOutputData::DrawGrid(vcl::RenderContext& rRenderContext, bool bGrid, bool
bool bHiddenRow = true;
SCROW nHiddenEndRow = -1;
- nPosY = nScrY;
- for (nArrY=1; nArrY+1<nArrCount; nArrY++)
+ nPosY = mnScrY;
+ for (nArrY=1; nArrY+1<mnArrCount; nArrY++)
{
SCSIZE nArrYplus1 = nArrY+1;
- nY = pRowInfo[nArrY].nRowNo;
+ nY = mpRowInfo[nArrY].nRowNo;
SCROW nYplus1 = nY+1;
- nPosY += pRowInfo[nArrY].nHeight;
+ nPosY += mpRowInfo[nArrY].nHeight;
- if (pRowInfo[nArrY].bChanged)
+ if (mpRowInfo[nArrY].bChanged)
{
if ( bPage )
{
for (SCROW i = nYplus1; i <= mpDoc->MaxRow(); ++i)
{
if (i > nHiddenEndRow)
- bHiddenRow = mpDoc->RowHidden(i, nTab, nullptr, &nHiddenEndRow);
+ bHiddenRow = mpDoc->RowHidden(i, mnTab, nullptr, &nHiddenEndRow);
/* TODO: optimize the row break thing for large hidden
* segments where HasRowBreak() has to be called
* nevertheless for each row, as a row break is drawn also
@@ -548,7 +548,7 @@ void ScOutputData::DrawGrid(vcl::RenderContext& rRenderContext, bool bGrid, bool
* once per hidden segment, maybe giving manual breaks
* priority. Something like GetNextRowBreak() and
* GetNextManualRowBreak(). */
- nBreak = mpDoc->HasRowBreak(i, nTab);
+ nBreak = mpDoc->HasRowBreak(i, mnTab);
if (!bHiddenRow || nBreak != ScBreakType::NONE)
break;
}
@@ -565,7 +565,7 @@ void ScOutputData::DrawGrid(vcl::RenderContext& rRenderContext, bool bGrid, bool
}
else
{
- rRenderContext.SetLineColor(bMergeCover ? aSheetBGColor : aGridColor);
+ rRenderContext.SetLineColor(bMergeCover ? aSheetBGColor : maGridColor);
bDashed = false;
}
@@ -575,11 +575,11 @@ void ScOutputData::DrawGrid(vcl::RenderContext& rRenderContext, bool bGrid, bool
bool bDraw = bGrid || nBreakOld != ScBreakType::NONE || bMergeCover; // simple grid only if set so
- bool bNextYisNextRow = (pRowInfo[nArrYplus1].nRowNo == nYplus1);
+ bool bNextYisNextRow = (mpRowInfo[nArrYplus1].nRowNo == nYplus1);
bool bSingle = !bNextYisNextRow; // Hidden
- for (SCCOL i=nX1; i<=nX2 && !bSingle; i++)
+ for (SCCOL i=mnX1; i<=mnX2 && !bSingle; i++)
{
- if (pRowInfo[nArrYplus1].cellInfo(i).bVOverlapped)
+ if (mpRowInfo[nArrYplus1].cellInfo(i).bVOverlapped)
bSingle = true;
}
@@ -587,27 +587,27 @@ void ScOutputData::DrawGrid(vcl::RenderContext& rRenderContext, bool bGrid, bool
{
if ( bSingle && nY<mpDoc->MaxRow() )
{
- SCROW nVisY = pRowInfo[nArrYplus1].nRowNo;
+ SCROW nVisY = mpRowInfo[nArrYplus1].nRowNo;
- nPosX = nScrX;
- if ( bLayoutRTL )
- nPosX += nMirrorW - nOneX;
+ nPosX = mnScrX;
+ if ( mbLayoutRTL )
+ nPosX += mnMirrorW - nOneX;
- for (SCCOL i=nX1; i<=nX2; i++)
+ for (SCCOL i=mnX1; i<=mnX2; i++)
{
- const tools::Long nNextX = nPosX + pRowInfo[0].basicCellInfo(i).nWidth * nLayoutSign;
+ const tools::Long nNextX = nPosX + mpRowInfo[0].basicCellInfo(i).nWidth * nLayoutSign;
if (nNextX != nPosX) // visible
{
bool bVOver;
if ( bNextYisNextRow )
- bVOver = pRowInfo[nArrYplus1].cellInfo(i).bVOverlapped;
+ bVOver = mpRowInfo[nArrYplus1].cellInfo(i).bVOverlapped;
else
{
bVOver = mpDoc->GetAttr(
- i,nYplus1,nTab,ATTR_MERGE_FLAG)
+ i,nYplus1,mnTab,ATTR_MERGE_FLAG)
->IsVerOverlapped()
&& mpDoc->GetAttr(
- i,nVisY,nTab,ATTR_MERGE_FLAG)
+ i,nVisY,mnTab,ATTR_MERGE_FLAG)
->IsVerOverlapped();
//! nVisY from Array ??
}
@@ -622,7 +622,7 @@ void ScOutputData::DrawGrid(vcl::RenderContext& rRenderContext, bool bGrid, bool
}
else if (!bMergeCover)
{
- aGrid.AddHorLine(bWorksInPixels, nScrX, nScrX+nScrW-nOneX, nPosY-nOneY, bDashed);
+ aGrid.AddHorLine(bWorksInPixels, mnScrX, mnScrX+mnScrW-nOneX, nPosY-nOneY, bDashed);
}
}
}
@@ -631,7 +631,7 @@ void ScOutputData::DrawGrid(vcl::RenderContext& rRenderContext, bool bGrid, bool
void ScOutputData::SetPagebreakMode( ScPageBreakData* pPageData )
{
- bPagebreakMode = true;
+ mbPagebreakMode = true;
if (!pPageData)
return; // not yet initialized -> everything "not printed"
@@ -643,14 +643,14 @@ void ScOutputData::SetPagebreakMode( ScPageBreakData* pPageData )
{
ScRange aRange = pPageData->GetData( nPos ).GetPrintRange();
- SCCOL nStartX = std::max( aRange.aStart.Col(), nX1 );
- SCCOL nEndX = std::min( aRange.aEnd.Col(), nX2 );
- SCROW nStartY = std::max( aRange.aStart.Row(), nY1 );
- SCROW nEndY = std::min( aRange.aEnd.Row(), nY2 );
+ SCCOL nStartX = std::max( aRange.aStart.Col(), mnX1 );
+ SCCOL nEndX = std::min( aRange.aEnd.Col(), mnX2 );
+ SCROW nStartY = std::max( aRange.aStart.Row(), mnY1 );
+ SCROW nEndY = std::min( aRange.aEnd.Row(), mnY2 );
- for (SCSIZE nArrY=1; nArrY+1<nArrCount; nArrY++)
+ for (SCSIZE nArrY=1; nArrY+1<mnArrCount; nArrY++)
{
- RowInfo* pThisRowInfo = &pRowInfo[nArrY];
+ RowInfo* pThisRowInfo = &mpRowInfo[nArrY];
if ( pThisRowInfo->bChanged && pThisRowInfo->nRowNo >= nStartY &&
pThisRowInfo->nRowNo <= nEndY )
{
@@ -664,17 +664,17 @@ void ScOutputData::SetPagebreakMode( ScPageBreakData* pPageData )
void ScOutputData::SetCellRotations()
{
//! save nRotMax
- SCCOL nRotMax = nX2;
- for (SCSIZE nRotY=0; nRotY<nArrCount; nRotY++)
- if (pRowInfo[nRotY].nRotMaxCol != SC_ROTMAX_NONE && pRowInfo[nRotY].nRotMaxCol > nRotMax)
- nRotMax = pRowInfo[nRotY].nRotMaxCol;
+ SCCOL nRotMax = mnX2;
+ for (SCSIZE nRotY=0; nRotY<mnArrCount; nRotY++)
+ if (mpRowInfo[nRotY].nRotMaxCol != SC_ROTMAX_NONE && mpRowInfo[nRotY].nRotMaxCol > nRotMax)
+ nRotMax = mpRowInfo[nRotY].nRotMaxCol;
- for (SCSIZE nArrY=1; nArrY<nArrCount; nArrY++)
+ for (SCSIZE nArrY=1; nArrY<mnArrCount; nArrY++)
{
- RowInfo* pThisRowInfo = &pRowInfo[nArrY];
+ RowInfo* pThisRowInfo = &mpRowInfo[nArrY];
if ( pThisRowInfo->nRotMaxCol != SC_ROTMAX_NONE &&
- ( pThisRowInfo->bChanged || pRowInfo[nArrY-1].bChanged ||
- ( nArrY+1<nArrCount && pRowInfo[nArrY+1].bChanged ) ) )
+ ( pThisRowInfo->bChanged || mpRowInfo[nArrY-1].bChanged ||
+ ( nArrY+1<mnArrCount && mpRowInfo[nArrY+1].bChanged ) ) )
{
SCROW nY = pThisRowInfo->nRowNo;
@@ -684,10 +684,10 @@ void ScOutputData::SetCellRotations()
const ScPatternAttr* pPattern = pInfo->pPatternAttr;
const SfxItemSet* pCondSet = pInfo->pConditionSet;
- if ( !pPattern && !mpDoc->ColHidden(nX, nTab) )
+ if ( !pPattern && !mpDoc->ColHidden(nX, mnTab) )
{
- pPattern = mpDoc->GetPattern( nX, nY, nTab );
- pCondSet = mpDoc->GetCondResult( nX, nY, nTab );
+ pPattern = mpDoc->GetPattern( nX, nY, mnTab );
+ pCondSet = mpDoc->GetCondResult( nX, nY, mnTab );
}
if ( pPattern ) // column isn't hidden
@@ -699,8 +699,8 @@ void ScOutputData::SetCellRotations()
pInfo->nRotateDir = nDir;
// create target coordinates
- const SCCOL nTargetX(nX - nVisX1 + 1);
- const SCROW nTargetY(nY - nVisY1 + 1);
+ const SCCOL nTargetX(nX - mnVisX1 + 1);
+ const SCROW nTargetY(nY - mnVisY1 + 1);
// Check for values - below in SetCellRotation these will
// be converted to size_t and thus may not be negative
@@ -709,7 +709,7 @@ void ScOutputData::SetCellRotations()
// add rotation info to Array information
const Degree100 nAttrRotate(pPattern->GetRotateVal(pCondSet));
const SvxRotateMode eRotMode(pPattern->GetItem(ATTR_ROTATE_MODE, pCondSet).GetValue());
- const double fOrient((bLayoutRTL ? -1.0 : 1.0) * toRadians(nAttrRotate)); // 1/100th degrees -> [0..2PI]
+ const double fOrient((mbLayoutRTL ? -1.0 : 1.0) * toRadians(nAttrRotate)); // 1/100th degrees -> [0..2PI]
svx::frame::Array& rArray = mrTabInfo.maArray;
rArray.SetCellRotation(nTargetX, nTargetY, eRotMode, fOrient);
@@ -721,10 +721,10 @@ void ScOutputData::SetCellRotations()
}
}
-static ScRotateDir lcl_GetRotateDir( const ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab )
+static ScRotateDir lcl_GetRotateDir( const ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB mnTab )
{
- const ScPatternAttr* pPattern = pDoc->GetPattern( nCol, nRow, nTab );
- const SfxItemSet* pCondSet = pDoc->GetCondResult( nCol, nRow, nTab );
+ const ScPatternAttr* pPattern = pDoc->GetPattern( nCol, nRow, mnTab );
+ const SfxItemSet* pCondSet = pDoc->GetCondResult( nCol, nRow, mnTab );
ScRotateDir nRet = ScRotateDir::NONE;
@@ -754,37 +754,37 @@ static ScRotateDir lcl_GetRotateDir( const ScDocument* pDoc, SCCOL nCol, SCROW n
return nRet;
}
-static const SvxBrushItem* lcl_FindBackground( const ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab )
+static const SvxBrushItem* lcl_FindBackground( const ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB mnTab )
{
- const ScPatternAttr* pPattern = pDoc->GetPattern( nCol, nRow, nTab );
- const SfxItemSet* pCondSet = pDoc->GetCondResult( nCol, nRow, nTab );
+ const ScPatternAttr* pPattern = pDoc->GetPattern( nCol, nRow, mnTab );
+ const SfxItemSet* pCondSet = pDoc->GetCondResult( nCol, nRow, mnTab );
const SvxBrushItem* pBackground =
&pPattern->GetItem( ATTR_BACKGROUND, pCondSet );
- ScRotateDir nDir = lcl_GetRotateDir( pDoc, nCol, nRow, nTab );
+ ScRotateDir nDir = lcl_GetRotateDir( pDoc, nCol, nRow, mnTab );
// treat CENTER like RIGHT
if ( nDir == ScRotateDir::Right || nDir == ScRotateDir::Center )
{
// text goes to the right -> take background from the left
- while ( nCol > 0 && lcl_GetRotateDir( pDoc, nCol, nRow, nTab ) == nDir &&
+ while ( nCol > 0 && lcl_GetRotateDir( pDoc, nCol, nRow, mnTab ) == nDir &&
pBackground->GetColor().GetAlpha() != 0 )
{
--nCol;
- pPattern = pDoc->GetPattern( nCol, nRow, nTab );
- pCondSet = pDoc->GetCondResult( nCol, nRow, nTab );
+ pPattern = pDoc->GetPattern( nCol, nRow, mnTab );
+ pCondSet = pDoc->GetCondResult( nCol, nRow, mnTab );
pBackground = &pPattern->GetItem( ATTR_BACKGROUND, pCondSet );
}
}
else if ( nDir == ScRotateDir::Left )
{
// text goes to the left -> take background from the right
- while ( nCol < pDoc->MaxCol() && lcl_GetRotateDir( pDoc, nCol, nRow, nTab ) == nDir &&
+ while ( nCol < pDoc->MaxCol() && lcl_GetRotateDir( pDoc, nCol, nRow, mnTab ) == nDir &&
pBackground->GetColor().GetAlpha() != 0 )
{
++nCol;
- pPattern = pDoc->GetPattern( nCol, nRow, nTab );
- pCondSet = pDoc->GetCondResult( nCol, nRow, nTab );
+ pPattern = pDoc->GetPattern( nCol, nRow, mnTab );
+ pCondSet = pDoc->GetCondResult( nCol, nRow, mnTab );
pBackground = &pPattern->GetItem( ATTR_BACKGROUND, pCondSet );
}
}
@@ -793,7 +793,7 @@ static const SvxBrushItem* lcl_FindBackground( const ScDocument* pDoc, SCCOL nCo
}
static bool lcl_EqualBack( const RowInfo& rFirst, const RowInfo& rOther,
- SCCOL nX1, SCCOL nX2, bool bShowProt, bool bPagebreakMode )
+ SCCOL mnX1, SCCOL mnX2, bool bShowProt, bool bPagebreakMode )
{
if ( rFirst.bChanged != rOther.bChanged ||
rFirst.bEmptyBack != rOther.bEmptyBack )
@@ -802,7 +802,7 @@ static bool lcl_EqualBack( const RowInfo& rFirst, const RowInfo& rOther,
SCCOL nX;
if ( bShowProt )
{
- for ( nX=nX1; nX<=nX2; nX++ )
+ for ( nX=mnX1; nX<=mnX2; nX++ )
{
const ScPatternAttr* pPat1 = rFirst.cellInfo(nX).pPatternAttr;
const ScPatternAttr* pPat2 = rOther.cellInfo(nX).pPatternAttr;
@@ -813,22 +813,22 @@ static bool lcl_EqualBack( const RowInfo& rFirst, const RowInfo& rOther,
}
else
{
- for ( nX=nX1; nX<=nX2; nX++ )
+ for ( nX=mnX1; nX<=mnX2; nX++ )
if ( !SfxPoolItem::areSame(rFirst.cellInfo(nX).maBackground.getItem(), rOther.cellInfo(nX).maBackground.getItem() ) )
return false;
}
if ( rFirst.nRotMaxCol != SC_ROTMAX_NONE || rOther.nRotMaxCol != SC_ROTMAX_NONE )
- for ( nX=nX1; nX<=nX2; nX++ )
+ for ( nX=mnX1; nX<=mnX2; nX++ )
if ( rFirst.cellInfo(nX).nRotateDir != rOther.cellInfo(nX).nRotateDir )
return false;
if ( bPagebreakMode )
- for ( nX=nX1; nX<=nX2; nX++ )
+ for ( nX=mnX1; nX<=mnX2; nX++ )
if ( rFirst.cellInfo(nX).bPrinted != rOther.cellInfo(nX).bPrinted )
return false;
- for ( nX=nX1; nX<=nX2; nX++ )
+ for ( nX=mnX1; nX<=mnX2; nX++ )
{
std::optional<Color> const & pCol1 = rFirst.cellInfo(nX).mxColorScale;
std::optional<Color> const & pCol2 = rOther.cellInfo(nX).mxColorScale;
@@ -860,15 +860,15 @@ static bool lcl_EqualBack( const RowInfo& rFirst, const RowInfo& rOther,
void ScOutputData::DrawDocumentBackground()
{
- if ( !bSolidBackground )
+ if ( !mbSolidBackground )
return;
Color aBgColor(ScModule::get()->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor);
mpDev->SetLineColor(aBgColor);
mpDev->SetFillColor(aBgColor);
- Point aScreenPos = mpDev->PixelToLogic(Point(nScrX, nScrY));
- Size aScreenSize = mpDev->PixelToLogic(Size(nScrW - 1,nScrH - 1));
+ Point aScreenPos = mpDev->PixelToLogic(Point(mnScrX, mnScrY));
+ Size aScreenSize = mpDev->PixelToLogic(Size(mnScrW - 1,mnScrH - 1));
mpDev->DrawRect(tools::Rectangle(aScreenPos, aScreenSize));
}
@@ -949,7 +949,7 @@ void drawDataBars(vcl::RenderContext& rRenderContext, const ScDataBarInfo* pOldD
rRenderContext.SetFillColor();
}
-const BitmapEx& getIcon(sc::IconSetBitmapMap & rIconSetBitmapMap, ScIconSetType eType, sal_Int32 nIndex)
+const Bitmap& getIcon(sc::IconSetBitmapMap & rIconSetBitmapMap, ScIconSetType eType, sal_Int32 nIndex)
{
return ScIconSetFormat::getBitmap(rIconSetBitmapMap, eType, nIndex);
}
@@ -959,7 +959,7 @@ void drawIconSets(vcl::RenderContext& rRenderContext, const ScIconSetInfo* pOldI
{
ScIconSetType eType = pOldIconSetInfo->eIconSetType;
sal_Int32 nIndex = pOldIconSetInfo->nIconIndex;
- const BitmapEx& rIcon = getIcon(rIconSetBitmapMap, eType, nIndex);
+ const Bitmap& rIcon = getIcon(rIconSetBitmapMap, eType, nIndex);
tools::Long aHeight = o3tl::convert(10, o3tl::Length::pt, o3tl::Length::mm100);
@@ -980,10 +980,9 @@ void drawIconSets(vcl::RenderContext& rRenderContext, const ScIconSetInfo* pOldI
double fRatio = static_cast<double>(aSize.Width()) / aSize.Height();
tools::Long aWidth = fRatio * aHeight;
- rRenderContext.Push();
+ auto popIt = rRenderContext.ScopedPush();
rRenderContext.SetClipRegion(vcl::Region(rRect));
rRenderContext.DrawBitmapEx(Point(rRect.Left() + 2 * nOneX, rRect.Bottom() - 2 * nOneY - aHeight), Size(aWidth, aHeight), rIcon);
- rRenderContext.Pop();
}
void drawCells(vcl::RenderContext& rRenderContext, std::optional<Color> const & pColor, const SvxBrushItem* pBackground, std::optional<Color>& pOldColor, const SvxBrushItem*& pOldBackground,
@@ -1074,31 +1073,31 @@ void ScOutputData::DrawBackground(vcl::RenderContext& rRenderContext)
tools::Long nOneYLogic = aOnePixel.Height();
// See more about bWorksInPixels in ScOutputData::DrawGrid
- bool bWorksInPixels = (eType == OUTTYPE_WINDOW);
+ bool bWorksInPixels = (meType == OUTTYPE_WINDOW);
const tools::Long nOneX = bWorksInPixels ? 1 : nOneXLogic;
- const tools::Long nLayoutSign = bLayoutRTL ? -1 : 1;
+ const tools::Long nLayoutSign = mbLayoutRTL ? -1 : 1;
const tools::Long nSignedOneX = nOneX * nLayoutSign;
tools::Rectangle aRect;
rRenderContext.SetLineColor();
- bool bShowProt = mbSyntaxMode && mpDoc->IsTabProtected(nTab);
- bool bDoAll = bShowProt || bPagebreakMode || bSolidBackground;
+ bool bShowProt = mbSyntaxMode && mpDoc->IsTabProtected(mnTab);
+ bool bDoAll = bShowProt || mbPagebreakMode || mbSolidBackground;
bool bCellContrast = mbUseStyleColor &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode();
- tools::Long nPosY = nScrY;
+ tools::Long nPosY = mnScrY;
const svtools::ColorConfig& rColorCfg = ScModule::get()->GetColorConfig();
Color aProtectedColor( rColorCfg.GetColorValue( svtools::CALCPROTECTEDBACKGROUND ).nColor );
auto pProtectedBackground = std::make_shared<SvxBrushItem>( aProtectedColor, ATTR_BACKGROUND );
// iterate through the rows to show
- for (SCSIZE nArrY=1; nArrY+1<nArrCount; nArrY++)
+ for (SCSIZE nArrY=1; nArrY+1<mnArrCount; nArrY++)
{
- RowInfo* pThisRowInfo = &pRowInfo[nArrY];
+ RowInfo* pThisRowInfo = &mpRowInfo[nArrY];
tools::Long nRowHeight = pThisRowInfo->nHeight;
if ( pThisRowInfo->bChanged )
@@ -1114,17 +1113,17 @@ void ScOutputData::DrawBackground(vcl::RenderContext& rRenderContext)
// scan for rows with the same background:
SCSIZE nSkip = 0;
- while ( nArrY+nSkip+2<nArrCount &&
- lcl_EqualBack( *pThisRowInfo, pRowInfo[nArrY+nSkip+1],
- nX1, nX2, bShowProt, bPagebreakMode ) )
+ while ( nArrY+nSkip+2<mnArrCount &&
+ lcl_EqualBack( *pThisRowInfo, mpRowInfo[nArrY+nSkip+1],
+ mnX1, mnX2, bShowProt, mbPagebreakMode ) )
{
++nSkip;
- nRowHeight += pRowInfo[nArrY+nSkip].nHeight; // after incrementing
+ nRowHeight += mpRowInfo[nArrY+nSkip].nHeight; // after incrementing
}
- tools::Long nPosX = nScrX;
- if ( bLayoutRTL )
- nPosX += nMirrorW - nOneX;
+ tools::Long nPosX = mnScrX;
+ if ( mbLayoutRTL )
+ nPosX += mnMirrorW - nOneX;
// tdf#135891 - adjust the x position to ensure the correct starting point
if (!bWorksInPixels)
@@ -1142,7 +1141,7 @@ void ScOutputData::DrawBackground(vcl::RenderContext& rRenderContext)
SCCOL nMergedCols = 1;
SCCOL nOldMerged = 0;
- for (SCCOL nX=nX1; nX + nMergedCols <= nX2 + 1; nX += nOldMerged)
+ for (SCCOL nX=mnX1; nX + nMergedCols <= mnX2 + 1; nX += nOldMerged)
{
ScCellInfo* pInfo = &pThisRowInfo->cellInfo(nX-1+nMergedCols);
@@ -1161,9 +1160,9 @@ void ScOutputData::DrawBackground(vcl::RenderContext& rRenderContext)
for (SCCOL nMerged = 0; nMerged < nMergedCols; ++nMerged)
{
SCCOL nCol = nX+nOldMerged+nMerged;
- if (nCol > nX2+2)
+ if (nCol > mnX2+2)
break;
- nNewPosX += pRowInfo[0].basicCellInfo(nCol-1).nWidth * nLayoutSign;
+ nNewPosX += mpRowInfo[0].basicCellInfo(nCol-1).nWidth * nLayoutSign;
}
if (nNewPosX == nPosX)
@@ -1191,15 +1190,15 @@ void ScOutputData::DrawBackground(vcl::RenderContext& rRenderContext)
else
pBackground = static_cast<const SvxBrushItem*>(pInfo->maBackground.getItem());
- if ( bPagebreakMode && !pInfo->bPrinted )
+ if ( mbPagebreakMode && !pInfo->bPrinted )
pBackground = pProtectedBackground.get();
if ( pInfo->nRotateDir > ScRotateDir::Standard &&
!pBackground->GetColor().IsFullyTransparent() &&
!bCellContrast )
{
- SCROW nY = pRowInfo[nArrY].nRowNo;
- pBackground = lcl_FindBackground( mpDoc, nX, nY, nTab );
+ SCROW nY = mpRowInfo[nArrY].nRowNo;
+ pBackground = lcl_FindBackground( mpDoc, nX, nY, mnTab );
}
std::optional<Color> const & pColor = pInfo->mxColorScale;
@@ -1214,7 +1213,7 @@ void ScOutputData::DrawBackground(vcl::RenderContext& rRenderContext)
nPosX = nNewPosX;
// tdf#135891 - adjust the x position to ensure the correct starting point
- if (!bWorksInPixels && nX == nX1)
+ if (!bWorksInPixels && nX == mnX1)
nPosX += nSignedOneX + 1;
}
@@ -1252,31 +1251,31 @@ void ScOutputData::DrawExtraShadow(bool bLeft, bool bTop, bool bRight, bool bBot
if ( bCellContrast )
aAutoTextColor = ScModule::get()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor;
- tools::Long nInitPosX = nScrX;
- if ( bLayoutRTL )
+ tools::Long nInitPosX = mnScrX;
+ if ( mbLayoutRTL )
{
Size aOnePixel = mpDev->PixelToLogic(Size(1,1));
tools::Long nOneX = aOnePixel.Width();
- nInitPosX += nMirrorW - nOneX;
+ nInitPosX += mnMirrorW - nOneX;
}
- tools::Long nLayoutSign = bLayoutRTL ? -1 : 1;
+ tools::Long nLayoutSign = mbLayoutRTL ? -1 : 1;
- tools::Long nPosY = nScrY - pRowInfo[0].nHeight;
- for (SCSIZE nArrY=0; nArrY<nArrCount; nArrY++)
+ tools::Long nPosY = mnScrY - mpRowInfo[0].nHeight;
+ for (SCSIZE nArrY=0; nArrY<mnArrCount; nArrY++)
{
- bool bCornerY = ( nArrY == 0 ) || ( nArrY+1 == nArrCount );
- bool bSkipY = ( nArrY==0 && !bTop ) || ( nArrY+1 == nArrCount && !bBottom );
+ bool bCornerY = ( nArrY == 0 ) || ( nArrY+1 == mnArrCount );
+ bool bSkipY = ( nArrY==0 && !bTop ) || ( nArrY+1 == mnArrCount && !bBottom );
- RowInfo* pThisRowInfo = &pRowInfo[nArrY];
+ RowInfo* pThisRowInfo = &mpRowInfo[nArrY];
tools::Long nRowHeight = pThisRowInfo->nHeight;
if ( pThisRowInfo->bChanged && !bSkipY )
{
- tools::Long nPosX = nInitPosX - pRowInfo[0].basicCellInfo(nX1-1).nWidth * nLayoutSign;
- for (SCCOL nCol=nX1-1; nCol<=nX2+1; nCol++)
+ tools::Long nPosX = nInitPosX - mpRowInfo[0].basicCellInfo(mnX1-1).nWidth * nLayoutSign;
+ for (SCCOL nCol=mnX1-1; nCol<=mnX2+1; nCol++)
{
- bool bCornerX = ( nCol==nX1-1 || nCol==nX2+1 );
- bool bSkipX = ( nCol==nX1-1 && !bLeft ) || ( nCol==nX2+1 && !bRight );
+ bool bCornerX = ( nCol==mnX1-1 || nCol==mnX2+1 );
+ bool bSkipX = ( nCol==mnX1-1 && !bLeft ) || ( nCol==mnX2+1 && !bRight );
for (sal_uInt16 nPass=0; nPass<2; nPass++) // horizontal / vertical
{
@@ -1299,21 +1298,21 @@ void ScOutputData::DrawExtraShadow(bool bLeft, bool bTop, bool bRight, bool bBot
if (bDo)
{
- tools::Long nThisWidth = pRowInfo[0].basicCellInfo(nCol).nWidth;
+ tools::Long nThisWidth = mpRowInfo[0].basicCellInfo(nCol).nWidth;
tools::Long nMaxWidth = nThisWidth;
if (!nMaxWidth)
{
//! direction must depend on shadow location
SCCOL nWx = nCol+1;
- while (nWx<nX2 && !pRowInfo[0].basicCellInfo(nWx).nWidth)
+ while (nWx<mnX2 && !mpRowInfo[0].basicCellInfo(nWx).nWidth)
++nWx;
- nMaxWidth = pRowInfo[0].basicCellInfo(nWx).nWidth;
+ nMaxWidth = mpRowInfo[0].basicCellInfo(nWx).nWidth;
}
// rectangle is in logical orientation
tools::Rectangle aRect( nPosX, nPosY,
nPosX + ( nThisWidth - 1 ) * nLayoutSign,
- nPosY + pRowInfo[nArrY].nHeight - 1 );
+ nPosY + mpRowInfo[nArrY].nHeight - 1 );
tools::Long nSize = pAttr->GetWidth();
tools::Long nSizeX = static_cast<tools::Long>(nSize*mnPPTX);
@@ -1324,7 +1323,7 @@ void ScOutputData::DrawExtraShadow(bool bLeft, bool bTop, bool bRight, bool bBot
nSizeX *= nLayoutSign; // used only to add to rectangle values
SvxShadowLocation eLoc = pAttr->GetLocation();
- if ( bLayoutRTL )
+ if ( mbLayoutRTL )
{
// Shadow location is specified as "visual" (right is always right),
// so the attribute's location value is mirrored here and in FillInfo.
@@ -1382,7 +1381,7 @@ void ScOutputData::DrawExtraShadow(bool bLeft, bool bTop, bool bRight, bool bBot
}
}
- nPosX += pRowInfo[0].basicCellInfo(nCol).nWidth * nLayoutSign;
+ nPosX += mpRowInfo[0].basicCellInfo(nCol).nWidth * nLayoutSign;
}
}
nPosY += nRowHeight;
@@ -1399,31 +1398,31 @@ void ScOutputData::DrawClear()
// (called only for ScGridWindow)
Color aBgColor(ScModule::get()->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor);
- if (bMetaFile)
+ if (mbMetaFile)
nOneX = nOneY = 0;
mpDev->SetLineColor();
mpDev->SetFillColor( aBgColor );
- tools::Long nPosY = nScrY;
- for (SCSIZE nArrY=1; nArrY+1<nArrCount; nArrY++)
+ tools::Long nPosY = mnScrY;
+ for (SCSIZE nArrY=1; nArrY+1<mnArrCount; nArrY++)
{
- RowInfo* pThisRowInfo = &pRowInfo[nArrY];
+ RowInfo* pThisRowInfo = &mpRowInfo[nArrY];
tools::Long nRowHeight = pThisRowInfo->nHeight;
if ( pThisRowInfo->bChanged )
{
// scan for more rows which must be painted:
SCSIZE nSkip = 0;
- while ( nArrY+nSkip+2<nArrCount && pRowInfo[nArrY+nSkip+1].bChanged )
+ while ( nArrY+nSkip+2<mnArrCount && mpRowInfo[nArrY+nSkip+1].bChanged )
{
++nSkip;
- nRowHeight += pRowInfo[nArrY+nSkip].nHeight; // after incrementing
+ nRowHeight += mpRowInfo[nArrY+nSkip].nHeight; // after incrementing
}
- aRect = tools::Rectangle( Point( nScrX, nPosY ),
- Size( nScrW+1-nOneX, nRowHeight+1-nOneY) );
+ aRect = tools::Rectangle( Point( mnScrX, nPosY ),
+ Size( mnScrW+1-nOneX, nRowHeight+1-nOneY) );
mpDev->DrawRect( aRect );
nArrY += nSkip;
@@ -1434,14 +1433,14 @@ void ScOutputData::DrawClear()
// Lines
-static tools::Long lclGetSnappedX( const OutputDevice& rDev, tools::Long nPosX, bool bSnapPixel )
+static tools::Long lclGetSnappedX( const OutputDevice& rDev, tools::Long nPosX, bool mbSnapPixel )
{
- return (bSnapPixel && nPosX) ? rDev.PixelToLogic( rDev.LogicToPixel( Size( nPosX, 0 ) ) ).Width() : nPosX;
+ return (mbSnapPixel && nPosX) ? rDev.PixelToLogic( rDev.LogicToPixel( Size( nPosX, 0 ) ) ).Width() : nPosX;
}
-static tools::Long lclGetSnappedY( const OutputDevice& rDev, tools::Long nPosY, bool bSnapPixel )
+static tools::Long lclGetSnappedY( const OutputDevice& rDev, tools::Long nPosY, bool mbSnapPixel )
{
- return (bSnapPixel && nPosY) ? rDev.PixelToLogic( rDev.LogicToPixel( Size( 0, nPosY ) ) ).Height() : nPosY;
+ return (mbSnapPixel && nPosY) ? rDev.PixelToLogic( rDev.LogicToPixel( Size( 0, nPosY ) ) ).Height() : nPosY;
}
void ScOutputData::DrawFrame(vcl::RenderContext& rRenderContext)
@@ -1488,14 +1487,14 @@ void ScOutputData::DrawFrame(vcl::RenderContext& rRenderContext)
DrawRotatedFrame(rRenderContext); // removes the lines that must not be painted here
}
- tools::Long nInitPosX = nScrX;
- if ( bLayoutRTL )
+ tools::Long nInitPosX = mnScrX;
+ if ( mbLayoutRTL )
{
Size aOnePixel = rRenderContext.PixelToLogic(Size(1,1));
tools::Long nOneX = aOnePixel.Width();
- nInitPosX += nMirrorW - nOneX;
+ nInitPosX += mnMirrorW - nOneX;
}
- tools::Long nLayoutSign = bLayoutRTL ? -1 : 1;
+ tools::Long nLayoutSign = mbLayoutRTL ? -1 : 1;
// *** set column and row sizes of the frame border array ***
@@ -1507,13 +1506,13 @@ void ScOutputData::DrawFrame(vcl::RenderContext& rRenderContext)
// row 0 is not visible (dummy for borders from top) - subtract its height from initial position
// subtract 1 unit more, because position 0 is first *in* cell, grid line is one unit before
- tools::Long nOldPosY = nScrY - 1 - pRowInfo[ 0 ].nHeight;
- tools::Long nOldSnapY = lclGetSnappedY( rRenderContext, nOldPosY, bSnapPixel );
+ tools::Long nOldPosY = mnScrY - 1 - mpRowInfo[ 0 ].nHeight;
+ tools::Long nOldSnapY = lclGetSnappedY( rRenderContext, nOldPosY, mbSnapPixel );
rArray.SetYOffset( nOldSnapY );
for( size_t nRow = 0; nRow < nRowCount; ++nRow )
{
- tools::Long nNewPosY = nOldPosY + pRowInfo[ nRow ].nHeight;
- tools::Long nNewSnapY = lclGetSnappedY( rRenderContext, nNewPosY, bSnapPixel );
+ tools::Long nNewPosY = nOldPosY + mpRowInfo[ nRow ].nHeight;
+ tools::Long nNewSnapY = lclGetSnappedY( rRenderContext, nNewPosY, mbSnapPixel );
rArray.SetRowHeight( nRow, nNewSnapY - nOldSnapY );
nOldPosY = nNewPosY;
nOldSnapY = nNewSnapY;
@@ -1521,23 +1520,23 @@ void ScOutputData::DrawFrame(vcl::RenderContext& rRenderContext)
// column widths
- // column nX1-1 is not visible (dummy for borders from left) - subtract its width from initial position
+ // column mnX1-1 is not visible (dummy for borders from left) - subtract its width from initial position
// subtract 1 unit more, because position 0 is first *in* cell, grid line is one unit above
- tools::Long nOldPosX = nInitPosX - nLayoutSign * (1 + pRowInfo[ 0 ].basicCellInfo( nX1 - 1 ).nWidth);
- tools::Long nOldSnapX = lclGetSnappedX( rRenderContext, nOldPosX, bSnapPixel );
+ tools::Long nOldPosX = nInitPosX - nLayoutSign * (1 + mpRowInfo[ 0 ].basicCellInfo( mnX1 - 1 ).nWidth);
+ tools::Long nOldSnapX = lclGetSnappedX( rRenderContext, nOldPosX, mbSnapPixel );
// set X offset for left-to-right sheets; for right-to-left sheets this is done after for() loop
- if( !bLayoutRTL )
+ if( !mbLayoutRTL )
rArray.SetXOffset( nOldSnapX );
- for( SCCOL nCol = nX1 - 1; nCol <= nX2 + 1; ++nCol )
+ for( SCCOL nCol = mnX1 - 1; nCol <= mnX2 + 1; ++nCol )
{
- size_t nArrCol = bLayoutRTL ? nX2 + 1 - nCol : nCol - (nX1 - 1);
- tools::Long nNewPosX = nOldPosX + pRowInfo[ 0 ].basicCellInfo( nCol ).nWidth * nLayoutSign;
- tools::Long nNewSnapX = lclGetSnappedX( rRenderContext, nNewPosX, bSnapPixel );
+ size_t nArrCol = mbLayoutRTL ? mnX2 + 1 - nCol : nCol - (mnX1 - 1);
+ tools::Long nNewPosX = nOldPosX + mpRowInfo[ 0 ].basicCellInfo( nCol ).nWidth * nLayoutSign;
+ tools::Long nNewSnapX = lclGetSnappedX( rRenderContext, nNewPosX, mbSnapPixel );
rArray.SetColWidth( nArrCol, std::abs( nNewSnapX - nOldSnapX ) );
nOldPosX = nNewPosX;
nOldSnapX = nNewSnapX;
}
- if( bLayoutRTL )
+ if( mbLayoutRTL )
rArray.SetXOffset( nOldSnapX );
// *** draw the array ***
@@ -1557,11 +1556,11 @@ void ScOutputData::DrawFrame(vcl::RenderContext& rRenderContext)
return;
while( nRow1 <= nLastRow )
{
- while( (nRow1 <= nLastRow) && !pRowInfo[ nRow1 ].bChanged ) ++nRow1;
+ while( (nRow1 <= nLastRow) && !mpRowInfo[ nRow1 ].bChanged ) ++nRow1;
if( nRow1 <= nLastRow )
{
size_t nRow2 = nRow1;
- while( (nRow2 + 1 <= nLastRow) && pRowInfo[ nRow2 + 1 ].bChanged ) ++nRow2;
+ while( (nRow2 + 1 <= nLastRow) && mpRowInfo[ nRow2 + 1 ].bChanged ) ++nRow2;
auto xPrimitive = rArray.CreateB2DPrimitiveRange(
nFirstCol, nRow1, nLastCol, nRow2, pForceColor );
pProcessor->process(xPrimitive);
@@ -1579,10 +1578,10 @@ void ScOutputData::DrawFrame(vcl::RenderContext& rRenderContext)
void ScOutputData::DrawRotatedFrame(vcl::RenderContext& rRenderContext)
{
//! save nRotMax
- SCCOL nRotMax = nX2;
- for (SCSIZE nRotY=0; nRotY<nArrCount; nRotY++)
- if (pRowInfo[nRotY].nRotMaxCol != SC_ROTMAX_NONE && pRowInfo[nRotY].nRotMaxCol > nRotMax)
- nRotMax = pRowInfo[nRotY].nRotMaxCol;
+ SCCOL nRotMax = mnX2;
+ for (SCSIZE nRotY=0; nRotY<mnArrCount; nRotY++)
+ if (mpRowInfo[nRotY].nRotMaxCol != SC_ROTMAX_NONE && mpRowInfo[nRotY].nRotMaxCol > nRotMax)
+ nRotMax = mpRowInfo[nRotY].nRotMaxCol;
const ScPatternAttr* pPattern;
const SfxItemSet* pCondSet;
@@ -1590,17 +1589,17 @@ void ScOutputData::DrawRotatedFrame(vcl::RenderContext& rRenderContext)
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
bool bCellContrast = mbUseStyleColor && rStyleSettings.GetHighContrastMode();
- tools::Long nInitPosX = nScrX;
- if ( bLayoutRTL )
+ tools::Long nInitPosX = mnScrX;
+ if ( mbLayoutRTL )
{
Size aOnePixel = rRenderContext.PixelToLogic(Size(1,1));
tools::Long nOneX = aOnePixel.Width();
- nInitPosX += nMirrorW - nOneX;
+ nInitPosX += mnMirrorW - nOneX;
}
- tools::Long nLayoutSign = bLayoutRTL ? -1 : 1;
+ tools::Long nLayoutSign = mbLayoutRTL ? -1 : 1;
- tools::Rectangle aClipRect( Point(nScrX, nScrY), Size(nScrW, nScrH) );
- if (bMetaFile)
+ tools::Rectangle aClipRect( Point(mnScrX, mnScrY), Size(mnScrW, mnScrH) );
+ if (mbMetaFile)
{
rRenderContext.Push();
rRenderContext.IntersectClipRegion( aClipRect );
@@ -1609,29 +1608,29 @@ void ScOutputData::DrawRotatedFrame(vcl::RenderContext& rRenderContext)
rRenderContext.SetClipRegion( vcl::Region( aClipRect ) );
std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor(CreateProcessor2D( ));
- tools::Long nPosY = nScrY;
- for (SCSIZE nArrY=1; nArrY<nArrCount; nArrY++)
+ tools::Long nPosY = mnScrY;
+ for (SCSIZE nArrY=1; nArrY<mnArrCount; nArrY++)
{
// Rotated is also drawn one line above/below Changed if parts extend into the cell
- RowInfo& rPrevRowInfo = pRowInfo[nArrY-1];
- RowInfo& rThisRowInfo = pRowInfo[nArrY];
- RowInfo& rNextRowInfo = pRowInfo[nArrY+1];
+ RowInfo& rPrevRowInfo = mpRowInfo[nArrY-1];
+ RowInfo& rThisRowInfo = mpRowInfo[nArrY];
+ RowInfo& rNextRowInfo = mpRowInfo[nArrY+1];
tools::Long nRowHeight = rThisRowInfo.nHeight;
if ( rThisRowInfo.nRotMaxCol != SC_ROTMAX_NONE &&
( rThisRowInfo.bChanged || rPrevRowInfo.bChanged ||
- ( nArrY+1<nArrCount && rNextRowInfo.bChanged ) ) )
+ ( nArrY+1<mnArrCount && rNextRowInfo.bChanged ) ) )
{
SCROW nY = rThisRowInfo.nRowNo;
tools::Long nPosX = 0;
SCCOL nX;
for (nX=0; nX<=nRotMax; nX++)
{
- if (nX==nX1) nPosX = nInitPosX; // calculated individually for preceding positions
+ if (nX==mnX1) nPosX = nInitPosX; // calculated individually for preceding positions
ScCellInfo* pInfo = &rThisRowInfo.cellInfo(nX);
- tools::Long nColWidth = pRowInfo[0].basicCellInfo(nX).nWidth;
+ tools::Long nColWidth = mpRowInfo[0].basicCellInfo(nX).nWidth;
if ( pInfo->nRotateDir > ScRotateDir::Standard &&
!pInfo->bHOverlapped && !pInfo->bVOverlapped )
{
@@ -1639,9 +1638,9 @@ void ScOutputData::DrawRotatedFrame(vcl::RenderContext& rRenderContext)
pCondSet = pInfo->pConditionSet;
if (!pPattern)
{
- pPattern = mpDoc->GetPattern( nX, nY, nTab );
+ pPattern = mpDoc->GetPattern( nX, nY, mnTab );
pInfo->pPatternAttr = pPattern;
- pCondSet = mpDoc->GetCondResult( nX, nY, nTab );
+ pCondSet = mpDoc->GetCondResult( nX, nY, mnTab );
pInfo->pConditionSet = pCondSet;
}
@@ -1653,14 +1652,14 @@ void ScOutputData::DrawRotatedFrame(vcl::RenderContext& rRenderContext)
if (nAttrRotate)
{
- if (nX < nX1) // compute negative position
+ if (nX < mnX1) // compute negative position
{
nPosX = nInitPosX;
- SCCOL nCol = nX1;
+ SCCOL nCol = mnX1;
while (nCol > nX)
{
--nCol;
- nPosX -= nLayoutSign * static_cast<tools::Long>(pRowInfo[0].basicCellInfo(nCol).nWidth);
+ nPosX -= nLayoutSign * static_cast<tools::Long>(mpRowInfo[0].basicCellInfo(nCol).nWidth);
}
}
@@ -1769,7 +1768,7 @@ void ScOutputData::DrawRotatedFrame(vcl::RenderContext& rRenderContext)
pProcessor.reset();
- if (bMetaFile)
+ if (mbMetaFile)
rRenderContext.Pop();
else
rRenderContext.SetClipRegion();
@@ -1783,7 +1782,7 @@ std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> ScOutputData::Create
return nullptr;
basegfx::B2DRange aViewRange;
- SdrPage *pDrawPage = pDrawLayer->GetPage( static_cast< sal_uInt16 >( nTab ) );
+ SdrPage *pDrawPage = pDrawLayer->GetPage( static_cast< sal_uInt16 >( mnTab ) );
drawinglayer::geometry::ViewInformation2D aNewViewInfos;
aNewViewInfos.setViewTransformation(mpDev->GetViewTransformation());
aNewViewInfos.setViewport(aViewRange);
@@ -1800,15 +1799,15 @@ vcl::Region ScOutputData::GetChangedAreaRegion()
vcl::Region aRegion;
tools::Rectangle aDrawingRect;
bool bHad(false);
- tools::Long nPosY = nScrY;
+ tools::Long nPosY = mnScrY;
SCSIZE nArrY;
- aDrawingRect.SetLeft( nScrX );
- aDrawingRect.SetRight( nScrX+nScrW-1 );
+ aDrawingRect.SetLeft( mnScrX );
+ aDrawingRect.SetRight( mnScrX+mnScrW-1 );
- for(nArrY=1; nArrY+1<nArrCount; nArrY++)
+ for(nArrY=1; nArrY+1<mnArrCount; nArrY++)
{
- RowInfo* pThisRowInfo = &pRowInfo[nArrY];
+ RowInfo* pThisRowInfo = &mpRowInfo[nArrY];
if(pThisRowInfo->bChanged)
{
@@ -1818,7 +1817,7 @@ vcl::Region ScOutputData::GetChangedAreaRegion()
bHad = true;
}
- aDrawingRect.SetBottom( nPosY + pRowInfo[nArrY].nHeight - 1 );
+ aDrawingRect.SetBottom( nPosY + mpRowInfo[nArrY].nHeight - 1 );
}
else if(bHad)
{
@@ -1826,7 +1825,7 @@ vcl::Region ScOutputData::GetChangedAreaRegion()
bHad = false;
}
- nPosY += pRowInfo[nArrY].nHeight;
+ nPosY += mpRowInfo[nArrY].nHeight;
}
if(bHad)
@@ -1842,15 +1841,15 @@ bool ScOutputData::SetChangedClip()
tools::PolyPolygon aPoly;
tools::Rectangle aDrawingRect;
- aDrawingRect.SetLeft( nScrX );
- aDrawingRect.SetRight( nScrX+nScrW-1 );
+ aDrawingRect.SetLeft( mnScrX );
+ aDrawingRect.SetRight( mnScrX+mnScrW-1 );
bool bHad = false;
- tools::Long nPosY = nScrY;
+ tools::Long nPosY = mnScrY;
SCSIZE nArrY;
- for (nArrY=1; nArrY+1<nArrCount; nArrY++)
+ for (nArrY=1; nArrY+1<mnArrCount; nArrY++)
{
- RowInfo* pThisRowInfo = &pRowInfo[nArrY];
+ RowInfo* pThisRowInfo = &mpRowInfo[nArrY];
if ( pThisRowInfo->bChanged )
{
@@ -1859,14 +1858,14 @@ bool ScOutputData::SetChangedClip()
aDrawingRect.SetTop( nPosY );
bHad = true;
}
- aDrawingRect.SetBottom( nPosY + pRowInfo[nArrY].nHeight - 1 );
+ aDrawingRect.SetBottom( nPosY + mpRowInfo[nArrY].nHeight - 1 );
}
else if (bHad)
{
aPoly.Insert( tools::Polygon( mpDev->PixelToLogic(aDrawingRect) ) );
bHad = false;
}
- nPosY += pRowInfo[nArrY].nHeight;
+ nPosY += mpRowInfo[nArrY].nHeight;
}
if (bHad)
@@ -1885,18 +1884,18 @@ void ScOutputData::FindChanged()
bool bWasIdleEnabled = mpDoc->IsIdleEnabled();
mpDoc->EnableIdle(false);
- for (nArrY=0; nArrY<nArrCount; nArrY++)
- pRowInfo[nArrY].bChanged = false;
+ for (nArrY=0; nArrY<mnArrCount; nArrY++)
+ mpRowInfo[nArrY].bChanged = false;
SCCOL nCol1 = mpDoc->MaxCol(), nCol2 = 0;
SCROW nRow1 = mpDoc->MaxRow(), nRow2 = 0;
bool bAnyDirty = false;
bool bAnyChanged = false;
- for (nArrY=0; nArrY<nArrCount; nArrY++)
+ for (nArrY=0; nArrY<mnArrCount; nArrY++)
{
- RowInfo* pThisRowInfo = &pRowInfo[nArrY];
- for (nX=nX1; nX<=nX2; nX++)
+ RowInfo* pThisRowInfo = &mpRowInfo[nArrY];
+ for (nX=mnX1; nX<=mnX2; nX++)
{
const ScRefCellValue& rCell = pThisRowInfo->cellInfo(nX).maCell;
@@ -1940,12 +1939,12 @@ void ScOutputData::FindChanged()
if (bAnyDirty || bAnyChanged)
{
if (bAnyDirty)
- mpDoc->EnsureFormulaCellResults(ScRange(nCol1, nRow1, nTab, nCol2, nRow2, nTab), true);
+ mpDoc->EnsureFormulaCellResults(ScRange(nCol1, nRow1, mnTab, nCol2, nRow2, mnTab), true);
- for (nArrY=0; nArrY<nArrCount; nArrY++)
+ for (nArrY=0; nArrY<mnArrCount; nArrY++)
{
- RowInfo* pThisRowInfo = &pRowInfo[nArrY];
- for (nX=nX1; nX<=nX2; nX++)
+ RowInfo* pThisRowInfo = &mpRowInfo[nArrY];
+ for (nX=mnX1; nX<=mnX2; nX++)
{
const ScRefCellValue& rCell = pThisRowInfo->cellInfo(nX).maCell;
@@ -1965,10 +1964,10 @@ void ScOutputData::FindChanged()
if ( pThisRowInfo->cellInfo(nX).bMerged )
{
SCSIZE nOverY = nArrY + 1;
- while ( nOverY<nArrCount &&
- pRowInfo[nOverY].cellInfo(nX).bVOverlapped )
+ while ( nOverY<mnArrCount &&
+ mpRowInfo[nOverY].cellInfo(nX).bVOverlapped )
{
- pRowInfo[nOverY].bChanged = true;
+ mpRowInfo[nOverY].bChanged = true;
++nOverY;
}
}
@@ -1991,30 +1990,30 @@ ReferenceMark ScOutputData::FillReferenceMark( SCCOL nRefStartX, SCROW nRefStart
PutInOrder( nRefStartY, nRefEndY );
if ( nRefStartX == nRefEndX && nRefStartY == nRefEndY )
- mpDoc->ExtendMerge( nRefStartX, nRefStartY, nRefEndX, nRefEndY, nTab );
+ mpDoc->ExtendMerge( nRefStartX, nRefStartY, nRefEndX, nRefEndY, mnTab );
- if ( nRefStartX <= nVisX2 && nRefEndX >= nVisX1 &&
- nRefStartY <= nVisY2 && nRefEndY >= nVisY1 )
+ if ( nRefStartX <= mnVisX2 && nRefEndX >= mnVisX1 &&
+ nRefStartY <= mnVisY2 && nRefEndY >= mnVisY1 )
{
- tools::Long nMinX = nScrX;
- tools::Long nMinY = nScrY;
- tools::Long nMaxX = nScrX + nScrW - 1;
- tools::Long nMaxY = nScrY + nScrH - 1;
- if ( bLayoutRTL )
+ tools::Long nMinX = mnScrX;
+ tools::Long nMinY = mnScrY;
+ tools::Long nMaxX = mnScrX + mnScrW - 1;
+ tools::Long nMaxY = mnScrY + mnScrH - 1;
+ if ( mbLayoutRTL )
std::swap( nMinX, nMaxX );
- tools::Long nLayoutSign = bLayoutRTL ? -1 : 1;
+ tools::Long nLayoutSign = mbLayoutRTL ? -1 : 1;
bool bTop = false;
bool bBottom = false;
bool bLeft = false;
bool bRight = false;
- tools::Long nPosY = nScrY;
- bool bNoStartY = ( nY1 < nRefStartY );
+ tools::Long nPosY = mnScrY;
+ bool bNoStartY = ( mnY1 < nRefStartY );
bool bNoEndY = false;
- for (SCSIZE nArrY=1; nArrY<nArrCount; nArrY++) // loop to end for bNoEndY check
+ for (SCSIZE nArrY=1; nArrY<mnArrCount; nArrY++) // loop to end for bNoEndY check
{
- SCROW nY = pRowInfo[nArrY].nRowNo;
+ SCROW nY = mpRowInfo[nArrY].nRowNo;
if ( nY==nRefStartY || (nY>nRefStartY && bNoStartY) )
{
@@ -2023,7 +2022,7 @@ ReferenceMark ScOutputData::FillReferenceMark( SCCOL nRefStartX, SCROW nRefStart
}
if ( nY==nRefEndY )
{
- nMaxY = nPosY + pRowInfo[nArrY].nHeight - 2;
+ nMaxY = nPosY + mpRowInfo[nArrY].nHeight - 2;
bBottom = true;
}
if ( nY>nRefEndY && bNoEndY )
@@ -2033,14 +2032,14 @@ ReferenceMark ScOutputData::FillReferenceMark( SCCOL nRefStartX, SCROW nRefStart
}
bNoStartY = ( nY < nRefStartY );
bNoEndY = ( nY < nRefEndY );
- nPosY += pRowInfo[nArrY].nHeight;
+ nPosY += mpRowInfo[nArrY].nHeight;
}
- tools::Long nPosX = nScrX;
- if ( bLayoutRTL )
- nPosX += nMirrorW - 1; // always in pixels
+ tools::Long nPosX = mnScrX;
+ if ( mbLayoutRTL )
+ nPosX += mnMirrorW - 1; // always in pixels
- for (SCCOL nX=nX1; nX<=nX2; nX++)
+ for (SCCOL nX=mnX1; nX<=mnX2; nX++)
{
if ( nX==nRefStartX )
{
@@ -2049,10 +2048,10 @@ ReferenceMark ScOutputData::FillReferenceMark( SCCOL nRefStartX, SCROW nRefStart
}
if ( nX==nRefEndX )
{
- nMaxX = nPosX + ( pRowInfo[0].basicCellInfo(nX).nWidth - 2 ) * nLayoutSign;
+ nMaxX = nPosX + ( mpRowInfo[0].basicCellInfo(nX).nWidth - 2 ) * nLayoutSign;
bRight = true;
}
- nPosX += pRowInfo[0].basicCellInfo(nX).nWidth * nLayoutSign;
+ nPosX += mpRowInfo[0].basicCellInfo(nX).nWidth * nLayoutSign;
}
if (bTop && bBottom && bLeft && bRight)
@@ -2062,7 +2061,7 @@ ReferenceMark ScOutputData::FillReferenceMark( SCCOL nRefStartX, SCROW nRefStart
nMinY / mnPPTY,
( nMaxX - nMinX ) / mnPPTX,
( nMaxY - nMinY ) / mnPPTY,
- nTab,
+ mnTab,
rColor );
}
}
@@ -2078,34 +2077,34 @@ void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY,
PutInOrder( nRefStartY, nRefEndY );
if ( nRefStartX == nRefEndX && nRefStartY == nRefEndY )
- mpDoc->ExtendMerge( nRefStartX, nRefStartY, nRefEndX, nRefEndY, nTab );
+ mpDoc->ExtendMerge( nRefStartX, nRefStartY, nRefEndX, nRefEndY, mnTab );
else if (mpDoc->ValidCol(nRefEndX) && mpDoc->ValidRow(nRefEndY) &&
- mpDoc->HasAttrib(nRefEndX, nRefEndY, nTab, HasAttrFlags::Merged))
- mpDoc->ExtendMerge(nRefEndX, nRefEndY, nRefEndX, nRefEndY, nTab);
+ mpDoc->HasAttrib(nRefEndX, nRefEndY, mnTab, HasAttrFlags::Merged))
+ mpDoc->ExtendMerge(nRefEndX, nRefEndY, nRefEndX, nRefEndY, mnTab);
- if ( !(nRefStartX <= nVisX2 && nRefEndX >= nVisX1 &&
- nRefStartY <= nVisY2 && nRefEndY >= nVisY1) )
+ if ( !(nRefStartX <= mnVisX2 && nRefEndX >= mnVisX1 &&
+ nRefStartY <= mnVisY2 && nRefEndY >= mnVisY1) )
return;
- tools::Long nMinX = nScrX;
- tools::Long nMinY = nScrY;
- tools::Long nMaxX = nScrX + nScrW - 1;
- tools::Long nMaxY = nScrY + nScrH - 1;
- if ( bLayoutRTL )
+ tools::Long nMinX = mnScrX;
+ tools::Long nMinY = mnScrY;
+ tools::Long nMaxX = mnScrX + mnScrW - 1;
+ tools::Long nMaxY = mnScrY + mnScrH - 1;
+ if ( mbLayoutRTL )
std::swap( nMinX, nMaxX );
- tools::Long nLayoutSign = bLayoutRTL ? -1 : 1;
+ tools::Long nLayoutSign = mbLayoutRTL ? -1 : 1;
bool bTop = false;
bool bBottom = false;
bool bLeft = false;
bool bRight = false;
- tools::Long nPosY = nScrY;
- bool bNoStartY = ( nY1 < nRefStartY );
+ tools::Long nPosY = mnScrY;
+ bool bNoStartY = ( mnY1 < nRefStartY );
bool bNoEndY = false;
- for (SCSIZE nArrY=1; nArrY<nArrCount; nArrY++) // loop to end for bNoEndY check
+ for (SCSIZE nArrY=1; nArrY<mnArrCount; nArrY++) // loop to end for bNoEndY check
{
- SCROW nY = pRowInfo[nArrY].nRowNo;
+ SCROW nY = mpRowInfo[nArrY].nRowNo;
if ( nY==nRefStartY || (nY>nRefStartY && bNoStartY) )
{
@@ -2114,7 +2113,7 @@ void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY,
}
if ( nY==nRefEndY )
{
- nMaxY = nPosY + pRowInfo[nArrY].nHeight - 2;
+ nMaxY = nPosY + mpRowInfo[nArrY].nHeight - 2;
bBottom = true;
}
if ( nY>nRefEndY && bNoEndY )
@@ -2124,14 +2123,14 @@ void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY,
}
bNoStartY = ( nY < nRefStartY );
bNoEndY = ( nY < nRefEndY );
- nPosY += pRowInfo[nArrY].nHeight;
+ nPosY += mpRowInfo[nArrY].nHeight;
}
- tools::Long nPosX = nScrX;
- if ( bLayoutRTL )
- nPosX += nMirrorW - 1; // always in pixels
+ tools::Long nPosX = mnScrX;
+ if ( mbLayoutRTL )
+ nPosX += mnMirrorW - 1; // always in pixels
- for (SCCOL nX=nX1; nX<=nX2; nX++)
+ for (SCCOL nX=mnX1; nX<=mnX2; nX++)
{
if ( nX==nRefStartX )
{
@@ -2140,10 +2139,10 @@ void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY,
}
if ( nX==nRefEndX )
{
- nMaxX = nPosX + ( pRowInfo[0].basicCellInfo(nX).nWidth - 2 ) * nLayoutSign;
+ nMaxX = nPosX + ( mpRowInfo[0].basicCellInfo(nX).nWidth - 2 ) * nLayoutSign;
bRight = true;
}
- nPosX += pRowInfo[0].basicCellInfo(nX).nWidth * nLayoutSign;
+ nPosX += mpRowInfo[0].basicCellInfo(nX).nWidth * nLayoutSign;
}
if ( nMaxX * nLayoutSign < nMinX * nLayoutSign || nMaxY < nMinY )
@@ -2204,31 +2203,31 @@ void ScOutputData::DrawOneChange( SCCOL nRefStartX, SCROW nRefStartY,
PutInOrder( nRefStartY, nRefEndY );
if ( nRefStartX == nRefEndX && nRefStartY == nRefEndY )
- mpDoc->ExtendMerge( nRefStartX, nRefStartY, nRefEndX, nRefEndY, nTab );
+ mpDoc->ExtendMerge( nRefStartX, nRefStartY, nRefEndX, nRefEndY, mnTab );
- if ( !(nRefStartX <= nVisX2 + 1 && nRefEndX >= nVisX1 &&
- nRefStartY <= nVisY2 + 1 && nRefEndY >= nVisY1) ) // +1 because it touches next cells left/top
+ if ( !(nRefStartX <= mnVisX2 + 1 && nRefEndX >= mnVisX1 &&
+ nRefStartY <= mnVisY2 + 1 && nRefEndY >= mnVisY1) ) // +1 because it touches next cells left/top
return;
- tools::Long nMinX = nScrX;
- tools::Long nMinY = nScrY;
- tools::Long nMaxX = nScrX+nScrW-1;
- tools::Long nMaxY = nScrY+nScrH-1;
- if ( bLayoutRTL )
+ tools::Long nMinX = mnScrX;
+ tools::Long nMinY = mnScrY;
+ tools::Long nMaxX = mnScrX+mnScrW-1;
+ tools::Long nMaxY = mnScrY+mnScrH-1;
+ if ( mbLayoutRTL )
std::swap( nMinX, nMaxX );
- tools::Long nLayoutSign = bLayoutRTL ? -1 : 1;
+ tools::Long nLayoutSign = mbLayoutRTL ? -1 : 1;
bool bTop = false;
bool bBottom = false;
bool bLeft = false;
bool bRight = false;
- tools::Long nPosY = nScrY;
- bool bNoStartY = ( nY1 < nRefStartY );
+ tools::Long nPosY = mnScrY;
+ bool bNoStartY = ( mnY1 < nRefStartY );
bool bNoEndY = false;
- for (SCSIZE nArrY=1; nArrY<nArrCount; nArrY++) // loop to end for bNoEndY check
+ for (SCSIZE nArrY=1; nArrY<mnArrCount; nArrY++) // loop to end for bNoEndY check
{
- SCROW nY = pRowInfo[nArrY].nRowNo;
+ SCROW nY = mpRowInfo[nArrY].nRowNo;
if ( nY==nRefStartY || (nY>nRefStartY && bNoStartY) )
{
@@ -2237,7 +2236,7 @@ void ScOutputData::DrawOneChange( SCCOL nRefStartX, SCROW nRefStartY,
}
if ( nY==nRefEndY )
{
- nMaxY = nPosY + pRowInfo[nArrY].nHeight - 1;
+ nMaxY = nPosY + mpRowInfo[nArrY].nHeight - 1;
bBottom = true;
}
if ( nY>nRefEndY && bNoEndY )
@@ -2247,14 +2246,14 @@ void ScOutputData::DrawOneChange( SCCOL nRefStartX, SCROW nRefStartY,
}
bNoStartY = ( nY < nRefStartY );
bNoEndY = ( nY < nRefEndY );
- nPosY += pRowInfo[nArrY].nHeight;
+ nPosY += mpRowInfo[nArrY].nHeight;
}
- tools::Long nPosX = nScrX;
- if ( bLayoutRTL )
- nPosX += nMirrorW - 1; // always in pixels
+ tools::Long nPosX = mnScrX;
+ if ( mbLayoutRTL )
+ nPosX += mnMirrorW - 1; // always in pixels
- for (SCCOL nX=nX1; nX<=nX2+1; nX++)
+ for (SCCOL nX=mnX1; nX<=mnX2+1; nX++)
{
if ( nX==nRefStartX )
{
@@ -2263,10 +2262,10 @@ void ScOutputData::DrawOneChange( SCCOL nRefStartX, SCROW nRefStartY,
}
if ( nX==nRefEndX )
{
- nMaxX = nPosX + ( pRowInfo[0].basicCellInfo(nX).nWidth - 1 ) * nLayoutSign;
+ nMaxX = nPosX + ( mpRowInfo[0].basicCellInfo(nX).nWidth - 1 ) * nLayoutSign;
bRight = true;
}
- nPosX += pRowInfo[0].basicCellInfo(nX).nWidth * nLayoutSign;
+ nPosX += mpRowInfo[0].basicCellInfo(nX).nWidth * nLayoutSign;
}
if ( nMaxX * nLayoutSign < nMinX * nLayoutSign || nMaxY < nMinY )
@@ -2322,11 +2321,11 @@ void ScOutputData::DrawChangeTrack()
// clipping happens from the outside
//! without clipping, only paint affected cells ??!??!?
- SCCOL nEndX = nX2;
- SCROW nEndY = nY2;
+ SCCOL nEndX = mnX2;
+ SCROW nEndY = mnY2;
if ( nEndX < mpDoc->MaxCol() ) ++nEndX; // also from the next cell since the mark
if ( nEndY < mpDoc->MaxRow() ) ++nEndY; // protrudes from the preceding cell
- ScRange aViewRange( nX1, nY1, nTab, nEndX, nEndY, nTab );
+ ScRange aViewRange( mnX1, mnY1, mnTab, nEndX, nEndY, mnTab );
const ScChangeAction* pAction = pTrack->GetFirst();
while (pAction)
{
@@ -2334,7 +2333,7 @@ void ScOutputData::DrawChangeTrack()
{
ScChangeActionType eActionType = pAction->GetType();
const ScBigRange& rBig = pAction->GetBigRange();
- if ( rBig.aStart.Tab() == nTab )
+ if ( rBig.aStart.Tab() == mnTab )
{
ScRange aRange = rBig.MakeRange( *mpDoc );
@@ -2355,7 +2354,7 @@ void ScOutputData::DrawChangeTrack()
}
if ( eActionType == SC_CAT_MOVE &&
static_cast<const ScChangeActionMove*>(pAction)->
- GetFromRange().aStart.Tab() == nTab )
+ GetFromRange().aStart.Tab() == mnTab )
{
ScRange aRange = static_cast<const ScChangeActionMove*>(pAction)->
GetFromRange().MakeRange( *mpDoc );
@@ -2376,19 +2375,19 @@ void ScOutputData::DrawChangeTrack()
void ScOutputData::DrawSparklines(vcl::RenderContext& rRenderContext)
{
- tools::Long nInitPosX = nScrX;
- if ( bLayoutRTL )
- nInitPosX += nMirrorW - 1; // always in pixels
- tools::Long nLayoutSign = bLayoutRTL ? -1 : 1;
+ tools::Long nInitPosX = mnScrX;
+ if ( mbLayoutRTL )
+ nInitPosX += mnMirrorW - 1; // always in pixels
+ tools::Long nLayoutSign = mbLayoutRTL ? -1 : 1;
- tools::Long nPosY = nScrY;
- for (SCSIZE nArrY=1; nArrY+1<nArrCount; nArrY++)
+ tools::Long nPosY = mnScrY;
+ for (SCSIZE nArrY=1; nArrY+1<mnArrCount; nArrY++)
{
- RowInfo* pThisRowInfo = &pRowInfo[nArrY];
+ RowInfo* pThisRowInfo = &mpRowInfo[nArrY];
if ( pThisRowInfo->bChanged )
{
tools::Long nPosX = nInitPosX;
- for (SCCOL nX=nX1; nX<=nX2; nX++)
+ for (SCCOL nX=mnX1; nX<=mnX2; nX++)
{
ScCellInfo* pInfo = &pThisRowInfo->cellInfo(nX);
bool bIsMerged = false;
@@ -2398,52 +2397,52 @@ void ScOutputData::DrawSparklines(vcl::RenderContext& rRenderContext)
tools::Long nStartPosX = nPosX;
tools::Long nStartPosY = nPosY;
- ScAddress aCurrentAddress(nX, pRowInfo[nArrY].nRowNo, nTab);
+ ScAddress aCurrentAddress(nX, mpRowInfo[nArrY].nRowNo, mnTab);
std::shared_ptr<sc::Sparkline> pSparkline = mpDoc->GetSparkline(aCurrentAddress);
if (pInfo->bHOverlapped || pInfo->bVOverlapped)
{
while (nOverX > 0 && (mpDoc->GetAttr(
- nOverX, nOverY, nTab, ATTR_MERGE_FLAG)->GetValue() & ScMF::Hor))
+ nOverX, nOverY, mnTab, ATTR_MERGE_FLAG)->GetValue() & ScMF::Hor))
{
--nOverX;
nStartPosX -= nLayoutSign
- * static_cast<tools::Long>(mpDoc->GetColWidth(nOverX, nTab)
+ * static_cast<tools::Long>(mpDoc->GetColWidth(nOverX, mnTab)
* mnPPTX);
}
while (nOverY > 0 && (mpDoc->GetAttr(
- nOverX, nOverY, nTab, ATTR_MERGE_FLAG)->GetValue() & ScMF::Ver))
+ nOverX, nOverY, mnTab, ATTR_MERGE_FLAG)->GetValue() & ScMF::Ver))
{
--nOverY;
nStartPosY -= nLayoutSign
- * static_cast<tools::Long>(mpDoc->GetRowHeight(nOverY, nTab)
+ * static_cast<tools::Long>(mpDoc->GetRowHeight(nOverY, mnTab)
* mnPPTY);
}
- pSparkline = mpDoc->GetSparkline(ScAddress(nOverX, nOverY, nTab));
+ pSparkline = mpDoc->GetSparkline(ScAddress(nOverX, nOverY, mnTab));
bIsMerged = pSparkline ? true : false;
}
- if (!mpDoc->ColHidden(nX, nTab) && pSparkline
+ if (!mpDoc->ColHidden(nX, mnTab) && pSparkline
&& (bIsMerged || (!pInfo->bHOverlapped && !pInfo->bVOverlapped)))
{
- tools::Long nWidth = pRowInfo[0].basicCellInfo(nX).nWidth;
+ tools::Long nWidth = mpRowInfo[0].basicCellInfo(nX).nWidth;
tools::Long nHeight = pThisRowInfo->nHeight;
if (bIsMerged || pInfo->bMerged)
{
- const ScMergeAttr* pMerge = mpDoc->GetAttr(nOverX, nOverY, nTab, ATTR_MERGE);
+ const ScMergeAttr* pMerge = mpDoc->GetAttr(nOverX, nOverY, mnTab, ATTR_MERGE);
SCROW nCountX = pMerge->GetColMerge();
if (nCountX > 0)
{
sal_Int32 nIndex = 1;
while (nCountX > nIndex && (mpDoc->GetAttr(
- nOverX + nIndex, nOverY, nTab, ATTR_MERGE_FLAG)->GetValue() & ScMF::Hor))
+ nOverX + nIndex, nOverY, mnTab, ATTR_MERGE_FLAG)->GetValue() & ScMF::Hor))
{
nWidth += nLayoutSign
* static_cast<tools::Long>(
- mpDoc->GetColWidth(nOverX + nIndex, nTab) * mnPPTX);
+ mpDoc->GetColWidth(nOverX + nIndex, mnTab) * mnPPTX);
nIndex++;
}
}
@@ -2453,11 +2452,11 @@ void ScOutputData::DrawSparklines(vcl::RenderContext& rRenderContext)
{
sal_Int32 nIndex = 1;
while (nCountY > nIndex && (mpDoc->GetAttr(
- nOverX, nOverY + nIndex, nTab, ATTR_MERGE_FLAG)->GetValue() & ScMF::Ver))
+ nOverX, nOverY + nIndex, mnTab, ATTR_MERGE_FLAG)->GetValue() & ScMF::Ver))
{
nHeight += nLayoutSign
* static_cast<tools::Long>(
- mpDoc->GetRowHeight(nOverY + nIndex, nTab) * mnPPTY);
+ mpDoc->GetRowHeight(nOverY + nIndex, mnTab) * mnPPTY);
nIndex++;
}
}
@@ -2467,10 +2466,10 @@ void ScOutputData::DrawSparklines(vcl::RenderContext& rRenderContext)
Size aSize(nWidth, nHeight);
sc::SparklineRenderer renderer(*mpDoc);
- renderer.render(pSparkline, rRenderContext, tools::Rectangle(aPoint, aSize), 1, 1, double(aZoomX), double(aZoomY));
+ renderer.render(pSparkline, rRenderContext, tools::Rectangle(aPoint, aSize), 1, 1, double(maZoomX), double(maZoomY));
}
- nPosX += pRowInfo[0].basicCellInfo(nX).nWidth * nLayoutSign;
+ nPosX += mpRowInfo[0].basicCellInfo(nX).nWidth * nLayoutSign;
}
}
nPosY += pThisRowInfo->nHeight;
@@ -2485,34 +2484,34 @@ void ScOutputData::DrawNoteMarks(vcl::RenderContext& rRenderContext)
if (comphelper::LibreOfficeKit::isActive())
return;
- tools::Long nInitPosX = nScrX;
- if ( bLayoutRTL )
- nInitPosX += nMirrorW - 1; // always in pixels
- tools::Long nLayoutSign = bLayoutRTL ? -1 : 1;
+ tools::Long nInitPosX = mnScrX;
+ if ( mbLayoutRTL )
+ nInitPosX += mnMirrorW - 1; // always in pixels
+ tools::Long nLayoutSign = mbLayoutRTL ? -1 : 1;
- tools::Long nPosY = nScrY - 1;
- for (SCSIZE nArrY=1; nArrY+1<nArrCount; nArrY++)
+ tools::Long nPosY = mnScrY - 1;
+ for (SCSIZE nArrY=1; nArrY+1<mnArrCount; nArrY++)
{
- RowInfo* pThisRowInfo = &pRowInfo[nArrY];
+ RowInfo* pThisRowInfo = &mpRowInfo[nArrY];
if ( pThisRowInfo->bChanged )
{
tools::Long nPosX = nInitPosX;
- for (SCCOL nX=nX1; nX<=nX2; nX++)
+ for (SCCOL nX=mnX1; nX<=mnX2; nX++)
{
ScCellInfo* pInfo = &pThisRowInfo->cellInfo(nX);
bool bIsMerged = false;
- if ( nX==nX1 && pInfo->bHOverlapped && !pInfo->bVOverlapped )
+ if ( nX==mnX1 && pInfo->bHOverlapped && !pInfo->bVOverlapped )
{
// find start of merged cell
bIsMerged = true;
- SCROW nY = pRowInfo[nArrY].nRowNo;
+ SCROW nY = mpRowInfo[nArrY].nRowNo;
SCCOL nMergeX = nX;
SCROW nMergeY = nY;
- mpDoc->ExtendOverlapped( nMergeX, nMergeY, nX, nY, nTab );
+ mpDoc->ExtendOverlapped( nMergeX, nMergeY, nX, nY, mnTab );
}
- if (!mpDoc->ColHidden(nX, nTab) && mpDoc->GetNote(nX, pRowInfo[nArrY].nRowNo, nTab)
+ if (!mpDoc->ColHidden(nX, mnTab) && mpDoc->GetNote(nX, mpRowInfo[nArrY].nRowNo, mnTab)
&& (bIsMerged || (!pInfo->bHOverlapped && !pInfo->bVOverlapped)))
{
ScModule* mod = ScModule::get();
@@ -2524,14 +2523,14 @@ void ScOutputData::DrawNoteMarks(vcl::RenderContext& rRenderContext)
else
rRenderContext.SetFillColor( mod->GetColorConfig().GetColorValue(svtools::CALCCOMMENTS).nColor );
- tools::Long nMarkX = nPosX + ( pRowInfo[0].basicCellInfo(nX).nWidth - 1) * nLayoutSign;
+ tools::Long nMarkX = nPosX + ( mpRowInfo[0].basicCellInfo(nX).nWidth - 1) * nLayoutSign;
if ( bIsMerged || pInfo->bMerged )
{
// if merged, add widths of all cells
SCCOL nNextX = nX + 1;
- while ( nNextX <= nX2 + 1 && pThisRowInfo->cellInfo(nNextX).bHOverlapped )
+ while ( nNextX <= mnX2 + 1 && pThisRowInfo->cellInfo(nNextX).bHOverlapped )
{
- nMarkX += pRowInfo[0].basicCellInfo(nNextX).nWidth * nLayoutSign;
+ nMarkX += mpRowInfo[0].basicCellInfo(nNextX).nWidth * nLayoutSign;
++nNextX;
}
}
@@ -2540,21 +2539,21 @@ void ScOutputData::DrawNoteMarks(vcl::RenderContext& rRenderContext)
sal_Int16 nSize = officecfg::Office::Calc::Content::Display::NoteIndicator::get();
if (nSize < 1)
{
- const double fSize(rRenderContext.GetDPIScaleFactor() * aZoomX * 3 + 3);
+ const double fSize(rRenderContext.GetDPIScaleFactor() * maZoomX * 3 + 3);
nSize = static_cast<sal_Int16>(fSize);
}
Point aPoints[3];
aPoints[0] = Point(nMarkX, nPosY);
- aPoints[0].setX( bLayoutRTL ? aPoints[0].X() + nSize : aPoints[0].X() - nSize );
+ aPoints[0].setX( mbLayoutRTL ? aPoints[0].X() + nSize : aPoints[0].X() - nSize );
aPoints[1] = Point(nMarkX, nPosY);
aPoints[2] = Point(nMarkX, nPosY + nSize);
tools::Polygon aPoly(3, aPoints);
- if ( bLayoutRTL ? ( nMarkX >= 0 ) : ( nMarkX < nScrX+nScrW ) )
+ if ( mbLayoutRTL ? ( nMarkX >= 0 ) : ( nMarkX < mnScrX+mnScrW ) )
rRenderContext.DrawPolygon(aPoly);
}
- nPosX += pRowInfo[0].basicCellInfo(nX).nWidth * nLayoutSign;
+ nPosX += mpRowInfo[0].basicCellInfo(nX).nWidth * nLayoutSign;
}
}
nPosY += pThisRowInfo->nHeight;
@@ -2565,22 +2564,22 @@ void ScOutputData::DrawFormulaMarks(vcl::RenderContext& rRenderContext)
{
bool bFirst = true;
- tools::Long nInitPosX = nScrX;
- if ( bLayoutRTL )
- nInitPosX += nMirrorW - 1; // always in pixels
- tools::Long nLayoutSign = bLayoutRTL ? -1 : 1;
+ tools::Long nInitPosX = mnScrX;
+ if ( mbLayoutRTL )
+ nInitPosX += mnMirrorW - 1; // always in pixels
+ tools::Long nLayoutSign = mbLayoutRTL ? -1 : 1;
- tools::Long nPosY = nScrY;
- for (SCSIZE nArrY=1; nArrY+1<nArrCount; nArrY++)
+ tools::Long nPosY = mnScrY;
+ for (SCSIZE nArrY=1; nArrY+1<mnArrCount; nArrY++)
{
- RowInfo* pThisRowInfo = &pRowInfo[nArrY];
+ RowInfo* pThisRowInfo = &mpRowInfo[nArrY];
if ( pThisRowInfo->bChanged )
{
tools::Long nPosX = nInitPosX;
- for (SCCOL nX=nX1; nX<=nX2; nX++)
+ for (SCCOL nX=mnX1; nX<=mnX2; nX++)
{
ScCellInfo* pInfo = &pThisRowInfo->cellInfo(nX);
- if (!mpDoc->ColHidden(nX, nTab) && !mpDoc->GetFormula(nX, pRowInfo[nArrY].nRowNo, nTab).isEmpty()
+ if (!mpDoc->ColHidden(nX, mnTab) && !mpDoc->GetFormula(nX, mpRowInfo[nArrY].nRowNo, mnTab).isEmpty()
&& (!pInfo->bHOverlapped && !pInfo->bVOverlapped))
{
if (bFirst)
@@ -2600,33 +2599,33 @@ void ScOutputData::DrawFormulaMarks(vcl::RenderContext& rRenderContext)
tools::Long nMarkY = nPosY + pThisRowInfo->nHeight - 2;
if ( pInfo->bMerged )
{
- for (SCSIZE nNextY=nArrY+1; nNextY+1<nArrCount; nNextY++)
+ for (SCSIZE nNextY=nArrY+1; nNextY+1<mnArrCount; nNextY++)
{
bool bVOver;
- if (pRowInfo[nNextY + 1].nRowNo == (pRowInfo[nNextY].nRowNo + 1)) {
- bVOver = pRowInfo[nNextY].cellInfo(nX).bVOverlapped;
+ if (mpRowInfo[nNextY + 1].nRowNo == (mpRowInfo[nNextY].nRowNo + 1)) {
+ bVOver = mpRowInfo[nNextY].cellInfo(nX).bVOverlapped;
} else {
- bVOver = mpDoc->GetAttr(nX,nNextY,nTab,ATTR_MERGE_FLAG)->IsVerOverlapped();
+ bVOver = mpDoc->GetAttr(nX,nNextY,mnTab,ATTR_MERGE_FLAG)->IsVerOverlapped();
}
if (!bVOver) break;
- nMarkY += pRowInfo[nNextY].nHeight;
+ nMarkY += mpRowInfo[nNextY].nHeight;
}
}
// DPI/ZOOM 100/100 => 10, 100/50 => 7, 100/150 => 13
// DPI/ZOOM 150/100 => 13, 150/50 => 8.5, 150/150 => 17.5
- const double nSize( rRenderContext.GetDPIScaleFactor() * aZoomX * 6 + 4);
+ const double nSize( rRenderContext.GetDPIScaleFactor() * maZoomX * 6 + 4);
Point aPoints[3];
aPoints[0] = Point(nMarkX, nMarkY);
- aPoints[0].setX( bLayoutRTL ? aPoints[0].X() - nSize : aPoints[0].X() + nSize );
+ aPoints[0].setX( mbLayoutRTL ? aPoints[0].X() - nSize : aPoints[0].X() + nSize );
aPoints[1] = Point(nMarkX, nMarkY);
aPoints[2] = Point(nMarkX, nMarkY - nSize);
tools::Polygon aPoly(3, aPoints);
- if ( bLayoutRTL ? ( nMarkX >= 0 ) : ( nMarkX < nScrX+nScrW ) )
+ if ( mbLayoutRTL ? ( nMarkX >= 0 ) : ( nMarkX < mnScrX+mnScrW ) )
rRenderContext.DrawPolygon(aPoly);
}
- nPosX += pRowInfo[0].basicCellInfo(nX).nWidth * nLayoutSign;
+ nPosX += mpRowInfo[0].basicCellInfo(nX).nWidth * nLayoutSign;
}
}
nPosY += pThisRowInfo->nHeight;
@@ -2639,64 +2638,64 @@ void ScOutputData::AddPDFNotes()
if ( !pPDFData || !pPDFData->GetIsExportNotes() )
return;
- tools::Long nInitPosX = nScrX;
- if ( bLayoutRTL )
+ tools::Long nInitPosX = mnScrX;
+ if ( mbLayoutRTL )
{
Size aOnePixel = mpDev->PixelToLogic(Size(1,1));
tools::Long nOneX = aOnePixel.Width();
- nInitPosX += nMirrorW - nOneX;
+ nInitPosX += mnMirrorW - nOneX;
}
- tools::Long nLayoutSign = bLayoutRTL ? -1 : 1;
+ tools::Long nLayoutSign = mbLayoutRTL ? -1 : 1;
- tools::Long nPosY = nScrY;
- for (SCSIZE nArrY=1; nArrY+1<nArrCount; nArrY++)
+ tools::Long nPosY = mnScrY;
+ for (SCSIZE nArrY=1; nArrY+1<mnArrCount; nArrY++)
{
- RowInfo* pThisRowInfo = &pRowInfo[nArrY];
+ RowInfo* pThisRowInfo = &mpRowInfo[nArrY];
if ( pThisRowInfo->bChanged )
{
tools::Long nPosX = nInitPosX;
- for (SCCOL nX=nX1; nX<=nX2; nX++)
+ for (SCCOL nX=mnX1; nX<=mnX2; nX++)
{
ScCellInfo* pInfo = &pThisRowInfo->cellInfo(nX);
bool bIsMerged = false;
- SCROW nY = pRowInfo[nArrY].nRowNo;
+ SCROW nY = mpRowInfo[nArrY].nRowNo;
SCCOL nMergeX = nX;
SCROW nMergeY = nY;
- if ( nX==nX1 && pInfo->bHOverlapped && !pInfo->bVOverlapped )
+ if ( nX==mnX1 && pInfo->bHOverlapped && !pInfo->bVOverlapped )
{
// find start of merged cell
bIsMerged = true;
- mpDoc->ExtendOverlapped( nMergeX, nMergeY, nX, nY, nTab );
+ mpDoc->ExtendOverlapped( nMergeX, nMergeY, nX, nY, mnTab );
// use origin's pCell for NotePtr test below
}
- ScPostIt* pNote = mpDoc->GetNote(nMergeX, nMergeY, nTab);
+ ScPostIt* pNote = mpDoc->GetNote(nMergeX, nMergeY, mnTab);
if ( pNote && ( bIsMerged || ( !pInfo->bHOverlapped && !pInfo->bVOverlapped ) ) )
{
tools::Long nNoteWidth = static_cast<tools::Long>( SC_CLIPMARK_SIZE * mnPPTX );
tools::Long nNoteHeight = static_cast<tools::Long>( SC_CLIPMARK_SIZE * mnPPTY );
- tools::Long nMarkX = nPosX + ( pRowInfo[0].basicCellInfo(nX).nWidth - nNoteWidth ) * nLayoutSign;
+ tools::Long nMarkX = nPosX + ( mpRowInfo[0].basicCellInfo(nX).nWidth - nNoteWidth ) * nLayoutSign;
if ( bIsMerged || pInfo->bMerged )
{
// if merged, add widths of all cells
SCCOL nNextX = nX + 1;
- while ( nNextX <= nX2 + 1 && pThisRowInfo->cellInfo(nNextX).bHOverlapped )
+ while ( nNextX <= mnX2 + 1 && pThisRowInfo->cellInfo(nNextX).bHOverlapped )
{
- nMarkX += pRowInfo[0].basicCellInfo(nNextX).nWidth * nLayoutSign;
+ nMarkX += mpRowInfo[0].basicCellInfo(nNextX).nWidth * nLayoutSign;
++nNextX;
}
}
- if ( bLayoutRTL ? ( nMarkX >= 0 ) : ( nMarkX < nScrX+nScrW ) )
+ if ( mbLayoutRTL ? ( nMarkX >= 0 ) : ( nMarkX < mnScrX+mnScrW ) )
{
tools::Rectangle aNoteRect( nMarkX, nPosY, nMarkX+nNoteWidth*nLayoutSign, nPosY+nNoteHeight );
vcl::pdf::PDFNote aNote;
// Note title is the cell address (as on printed note pages)
- ScAddress aAddress( nMergeX, nMergeY, nTab );
+ ScAddress aAddress( nMergeX, nMergeY, mnTab );
aNote.maTitle = aAddress.Format(ScRefFlags::VALID, mpDoc, mpDoc->GetAddressConvention());
// Content has to be a simple string without line breaks
@@ -2711,7 +2710,7 @@ void ScOutputData::AddPDFNotes()
SdrCaptionObj* pCaption = pNote->GetCaption();
tools::Rectangle aCaptionRect(pCaption->GetLogicRect());
- Point aPoint(aCaptionRect.getX() + nScrX, aCaptionRect.getY() + nScrY);
+ Point aPoint(aCaptionRect.getX() + mnScrX, aCaptionRect.getY() + mnScrY);
Size aSize(aCaptionRect.GetWidth(), aCaptionRect.GetHeight());
tools::Rectangle aPopupRect(aPoint, aSize);
@@ -2722,7 +2721,7 @@ void ScOutputData::AddPDFNotes()
}
}
- nPosX += pRowInfo[0].basicCellInfo(nX).nWidth * nLayoutSign;
+ nPosX += mpRowInfo[0].basicCellInfo(nX).nWidth * nLayoutSign;
}
}
nPosY += pThisRowInfo->nHeight;
@@ -2731,7 +2730,7 @@ void ScOutputData::AddPDFNotes()
void ScOutputData::DrawClipMarks()
{
- if (!bAnyClipped)
+ if (!mbAnyClipped)
return;
ScModule* mod = ScModule::get();
@@ -2740,21 +2739,21 @@ void ScOutputData::DrawClipMarks()
DrawModeFlags nOldDrawMode = mpDev->GetDrawMode();
- tools::Long nInitPosX = nScrX;
- if ( bLayoutRTL )
- nInitPosX += nMirrorW - 1; // always in pixels
- tools::Long nLayoutSign = bLayoutRTL ? -1 : 1;
+ tools::Long nInitPosX = mnScrX;
+ if ( mbLayoutRTL )
+ nInitPosX += mnMirrorW - 1; // always in pixels
+ tools::Long nLayoutSign = mbLayoutRTL ? -1 : 1;
tools::Rectangle aCellRect;
- tools::Long nPosY = nScrY;
- for (SCSIZE nArrY=1; nArrY+1<nArrCount; nArrY++)
+ tools::Long nPosY = mnScrY;
+ for (SCSIZE nArrY=1; nArrY+1<mnArrCount; nArrY++)
{
- RowInfo* pThisRowInfo = &pRowInfo[nArrY];
+ RowInfo* pThisRowInfo = &mpRowInfo[nArrY];
if ( pThisRowInfo->bChanged )
{
SCROW nY = pThisRowInfo->nRowNo;
tools::Long nPosX = nInitPosX;
- for (SCCOL nX=nX1; nX<=nX2; nX++)
+ for (SCCOL nX=mnX1; nX<=mnX2; nX++)
{
ScCellInfo* pInfo = &pThisRowInfo->cellInfo(nX);
if (pInfo->nClipMark != ScClipMark::NONE)
@@ -2769,36 +2768,36 @@ void ScOutputData::DrawClipMarks()
tools::Long nStartPosY = nPosY;
while ( nOverX > 0 && ( mpDoc->GetAttr(
- nOverX, nOverY, nTab, ATTR_MERGE_FLAG )->GetValue() & ScMF::Hor ) )
+ nOverX, nOverY, mnTab, ATTR_MERGE_FLAG )->GetValue() & ScMF::Hor ) )
{
--nOverX;
- nStartPosX -= nLayoutSign * static_cast<tools::Long>( mpDoc->GetColWidth(nOverX,nTab) * mnPPTX );
+ nStartPosX -= nLayoutSign * static_cast<tools::Long>( mpDoc->GetColWidth(nOverX,mnTab) * mnPPTX );
}
while ( nOverY > 0 && ( mpDoc->GetAttr(
- nOverX, nOverY, nTab, ATTR_MERGE_FLAG )->GetValue() & ScMF::Ver ) )
+ nOverX, nOverY, mnTab, ATTR_MERGE_FLAG )->GetValue() & ScMF::Ver ) )
{
--nOverY;
- nStartPosY -= nLayoutSign * static_cast<tools::Long>( mpDoc->GetRowHeight(nOverY,nTab) * mnPPTY );
+ nStartPosY -= nLayoutSign * static_cast<tools::Long>( mpDoc->GetRowHeight(nOverY,mnTab) * mnPPTY );
}
- tools::Long nOutWidth = static_cast<tools::Long>( mpDoc->GetColWidth(nOverX,nTab) * mnPPTX );
- tools::Long nOutHeight = static_cast<tools::Long>( mpDoc->GetRowHeight(nOverY,nTab) * mnPPTY );
+ tools::Long nOutWidth = static_cast<tools::Long>( mpDoc->GetColWidth(nOverX,mnTab) * mnPPTX );
+ tools::Long nOutHeight = static_cast<tools::Long>( mpDoc->GetRowHeight(nOverY,mnTab) * mnPPTY );
- const ScMergeAttr* pMerge = mpDoc->GetAttr( nOverX, nOverY, nTab, ATTR_MERGE );
+ const ScMergeAttr* pMerge = mpDoc->GetAttr( nOverX, nOverY, mnTab, ATTR_MERGE );
SCCOL nCountX = pMerge->GetColMerge();
for (SCCOL i=1; i<nCountX; i++)
- nOutWidth += mpDoc->GetColWidth(nOverX+i,nTab) * mnPPTX;
+ nOutWidth += mpDoc->GetColWidth(nOverX+i,mnTab) * mnPPTX;
SCROW nCountY = pMerge->GetRowMerge();
- nOutHeight += mpDoc->GetScaledRowHeight( nOverY+1, nOverY+nCountY-1, nTab, mnPPTY);
+ nOutHeight += mpDoc->GetScaledRowHeight( nOverY+1, nOverY+nCountY-1, mnTab, mnPPTY);
- if ( bLayoutRTL )
+ if ( mbLayoutRTL )
nStartPosX -= nOutWidth - 1;
aCellRect = tools::Rectangle( Point( nStartPosX, nStartPosY ), Size( nOutWidth, nOutHeight ) );
}
else
{
- tools::Long nOutWidth = pRowInfo[0].basicCellInfo(nX).nWidth;
+ tools::Long nOutWidth = mpRowInfo[0].basicCellInfo(nX).nWidth;
tools::Long nOutHeight = pThisRowInfo->nHeight;
if ( pInfo->bMerged && pInfo->pPatternAttr )
@@ -2809,13 +2808,13 @@ void ScOutputData::DrawClipMarks()
&pInfo->pPatternAttr->GetItem(ATTR_MERGE);
SCCOL nCountX = pMerge->GetColMerge();
for (SCCOL i=1; i<nCountX; i++)
- nOutWidth += mpDoc->GetColWidth(nOverX+i,nTab) * mnPPTX;
+ nOutWidth += mpDoc->GetColWidth(nOverX+i,mnTab) * mnPPTX;
SCROW nCountY = pMerge->GetRowMerge();
- nOutHeight += mpDoc->GetScaledRowHeight( nOverY+1, nOverY+nCountY-1, nTab, mnPPTY);
+ nOutHeight += mpDoc->GetScaledRowHeight( nOverY+1, nOverY+nCountY-1, mnTab, mnPPTY);
}
tools::Long nStartPosX = nPosX;
- if ( bLayoutRTL )
+ if ( mbLayoutRTL )
nStartPosX -= nOutWidth - 1;
// #i80447# create aCellRect from two points in case nOutWidth is 0
aCellRect = tools::Rectangle( Point( nStartPosX, nPosY ),
@@ -2823,7 +2822,7 @@ void ScOutputData::DrawClipMarks()
}
aCellRect.AdjustBottom( -1 ); // don't paint over the cell grid
- if ( bLayoutRTL )
+ if ( mbLayoutRTL )
aCellRect.AdjustLeft(1 );
else
aCellRect.AdjustRight( -1 );
@@ -2839,16 +2838,16 @@ void ScOutputData::DrawClipMarks()
else
mpDev->SetDrawMode( nOldDrawMode | DrawModeFlags::BlackLine );
- if (bVertical)
+ if (mbVertical)
{
- if (pInfo->nClipMark & (bLayoutRTL ? ScClipMark::Bottom : ScClipMark::Top))
+ if (pInfo->nClipMark & (mbLayoutRTL ? ScClipMark::Bottom : ScClipMark::Top))
{
// visually top
tools::Rectangle aMarkRect = aCellRect;
aMarkRect.SetBottom(aCellRect.Top() + nMarkPixel - 1);
SvxFont::DrawArrow(*mpDev, aMarkRect, aMarkSize, aArrowFillCol, true, true);
}
- if (pInfo->nClipMark & (bLayoutRTL ? ScClipMark::Top : ScClipMark::Bottom))
+ if (pInfo->nClipMark & (mbLayoutRTL ? ScClipMark::Top : ScClipMark::Bottom))
{
// visually bottom
tools::Rectangle aMarkRect = aCellRect;
@@ -2859,7 +2858,7 @@ void ScOutputData::DrawClipMarks()
}
else
{
- if (pInfo->nClipMark & (bLayoutRTL ? ScClipMark::Right : ScClipMark::Left))
+ if (pInfo->nClipMark & (mbLayoutRTL ? ScClipMark::Right : ScClipMark::Left))
{
// visually left
tools::Rectangle aMarkRect = aCellRect;
@@ -2867,7 +2866,7 @@ void ScOutputData::DrawClipMarks()
SvxFont::DrawArrow(*mpDev, aMarkRect, aMarkSize, aArrowFillCol, true,
false);
}
- if (pInfo->nClipMark & (bLayoutRTL ? ScClipMark::Left : ScClipMark::Right))
+ if (pInfo->nClipMark & (mbLayoutRTL ? ScClipMark::Left : ScClipMark::Right))
{
// visually right
tools::Rectangle aMarkRect = aCellRect;
@@ -2877,7 +2876,7 @@ void ScOutputData::DrawClipMarks()
}
}
}
- nPosX += pRowInfo[0].basicCellInfo(nX).nWidth * nLayoutSign;
+ nPosX += mpRowInfo[0].basicCellInfo(nX).nWidth * nLayoutSign;
}
}
nPosY += pThisRowInfo->nHeight;
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 3427fc2296c4..c0ea776687c9 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -243,7 +243,7 @@ void ScDrawStringsVars::SetShrinkScale( tools::Long nScale, SvtScriptType nScrip
Fraction aFraction( nScale, 100 );
if ( !bPixelToLogic )
- aFraction *= pOutput->aZoomY;
+ aFraction *= pOutput->maZoomY;
vcl::Font aTmpFont;
pPattern->fillFontOnly(aTmpFont, pFmtDevice, &aFraction, pCondSet, nScript);
// only need font height
@@ -290,9 +290,9 @@ bool lcl_GetBoolValue(const ScPatternAttr& rPattern, sal_uInt16 nWhich, const Sf
}
-static bool lcl_isNumberFormatText(const ScDocument* pDoc, SCCOL nCellX, SCROW nCellY, SCTAB nTab )
+static bool lcl_isNumberFormatText(const ScDocument* pDoc, SCCOL nCellX, SCROW nCellY, SCTAB mnTab )
{
- sal_uInt32 nCurrentNumberFormat = pDoc->GetNumberFormat( nCellX, nCellY, nTab );
+ sal_uInt32 nCurrentNumberFormat = pDoc->GetNumberFormat( nCellX, nCellY, mnTab );
SvNumberFormatter* pNumberFormatter = pDoc->GetFormatTable();
return pNumberFormatter->GetType( nCurrentNumberFormat ) == SvNumFormatType::TEXT;
}
@@ -331,7 +331,7 @@ void ScDrawStringsVars::SetPattern(
if (bPixelToLogic)
pPattern->fillFont(aFont, eColorMode, pFmtDevice, nullptr, pCondSet, nScript, &aBackConfigColor, &aTextConfigColor);
else
- pPattern->fillFont(aFont, eColorMode, pFmtDevice, &pOutput->aZoomY, pCondSet, nScript, &aBackConfigColor, &aTextConfigColor );
+ pPattern->fillFont(aFont, eColorMode, pFmtDevice, &pOutput->maZoomY, pCondSet, nScript, &aBackConfigColor, &aTextConfigColor );
aFont.SetAlignment(ALIGN_BASELINE);
@@ -861,12 +861,12 @@ double ScOutputData::GetStretch() const
if ( mpRefDevice == pFmtDevice )
{
MapMode aOld = mpRefDevice->GetMapMode();
- return static_cast<double>(aOld.GetScaleY()) / static_cast<double>(aOld.GetScaleX()) * static_cast<double>(aZoomY) / static_cast<double>(aZoomX);
+ return static_cast<double>(aOld.GetScaleY()) / static_cast<double>(aOld.GetScaleX()) * static_cast<double>(maZoomY) / static_cast<double>(maZoomX);
}
else
{
// when formatting for printer, device map mode has already been taken care of
- return static_cast<double>(aZoomY) / static_cast<double>(aZoomX);
+ return static_cast<double>(maZoomY) / static_cast<double>(maZoomX);
}
}
@@ -952,23 +952,23 @@ bool ScOutputData::GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY,
bool bVisRowChanged )
{
bool bDoMerge = false;
- bool bIsLeft = ( nX == nVisX1 );
- bool bIsTop = ( nY == nVisY1 ) || bVisRowChanged;
+ bool bIsLeft = ( nX == mnVisX1 );
+ bool bIsTop = ( nY == mnVisY1 ) || bVisRowChanged;
bool bHOver;
bool bVOver;
bool bHidden;
- if (!mpDoc->ColHidden(nX, nTab) && nX >= nX1 && nX <= nX2
- && !mpDoc->RowHidden(nY, nTab) && nY >= nY1 && nY <= nY2)
+ if (!mpDoc->ColHidden(nX, mnTab) && nX >= mnX1 && nX <= mnX2
+ && !mpDoc->RowHidden(nY, mnTab) && nY >= mnY1 && nY <= mnY2)
{
- ScCellInfo* pInfo = &pRowInfo[nArrY].cellInfo(nX);
+ ScCellInfo* pInfo = &mpRowInfo[nArrY].cellInfo(nX);
bHOver = pInfo->bHOverlapped;
bVOver = pInfo->bVOverlapped;
}
else
{
- ScMF nOverlap2 = mpDoc->GetAttr(nX, nY, nTab, ATTR_MERGE_FLAG)->GetValue();
+ ScMF nOverlap2 = mpDoc->GetAttr(nX, nY, mnTab, ATTR_MERGE_FLAG)->GetValue();
bHOver = bool(nOverlap2 & ScMF::Hor);
bVOver = bool(nOverlap2 & ScMF::Ver);
}
@@ -986,18 +986,18 @@ bool ScOutputData::GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY,
while (bHOver) // nY constant
{
--rOverX;
- bHidden = mpDoc->ColHidden(rOverX, nTab);
+ bHidden = mpDoc->ColHidden(rOverX, mnTab);
if ( !bDoMerge && !bHidden )
return false;
- if (rOverX >= nX1 && !bHidden)
+ if (rOverX >= mnX1 && !bHidden)
{
- bHOver = pRowInfo[nArrY].cellInfo(rOverX).bHOverlapped;
- bVOver = pRowInfo[nArrY].cellInfo(rOverX).bVOverlapped;
+ bHOver = mpRowInfo[nArrY].cellInfo(rOverX).bHOverlapped;
+ bVOver = mpRowInfo[nArrY].cellInfo(rOverX).bVOverlapped;
}
else
{
- ScMF nOverlap = mpDoc->GetAttr(rOverX, rOverY, nTab, ATTR_MERGE_FLAG)->GetValue();
+ ScMF nOverlap = mpDoc->GetAttr(rOverX, rOverY, mnTab, ATTR_MERGE_FLAG)->GetValue();
bHOver = bool(nOverlap & ScMF::Hor);
bVOver = bool(nOverlap & ScMF::Ver);
}
@@ -1006,23 +1006,23 @@ bool ScOutputData::GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY,
while (bVOver)
{
--rOverY;
- bHidden = mpDoc->RowHidden(rOverY, nTab);
+ bHidden = mpDoc->RowHidden(rOverY, mnTab);
if ( !bDoMerge && !bHidden )
return false;
if (nArrY>0)
--nArrY; // local copy !
- if (rOverX >= nX1 && rOverY >= nY1 &&
- !mpDoc->ColHidden(rOverX, nTab) &&
- !mpDoc->RowHidden(rOverY, nTab) &&
- pRowInfo[nArrY].nRowNo == rOverY)
+ if (rOverX >= mnX1 && rOverY >= mnY1 &&
+ !mpDoc->ColHidden(rOverX, mnTab) &&
+ !mpDoc->RowHidden(rOverY, mnTab) &&
+ mpRowInfo[nArrY].nRowNo == rOverY)
{
- bVOver = pRowInfo[nArrY].cellInfo(rOverX).bVOverlapped;
+ bVOver = mpRowInfo[nArrY].cellInfo(rOverX).bVOverlapped;
}
else
{
- ScMF nOverlap = mpDoc->GetAttr( rOverX, rOverY, nTab, ATTR_MERGE_FLAG )->GetValue();
+ ScMF nOverlap = mpDoc->GetAttr( rOverX, rOverY, mnTab, ATTR_MERGE_FLAG )->GetValue();
bVOver = bool(nOverlap & ScMF::Ver);
}
}
@@ -1129,34 +1129,34 @@ bool ScOutputData::IsEmptyCellText( const RowInfo* pThisRowInfo, SCCOL nX, SCROW
// pThisRowInfo may be NULL
bool bEmpty;
- if ( pThisRowInfo && nX <= nX2 )
+ if ( pThisRowInfo && nX <= mnX2 )
bEmpty = pThisRowInfo->basicCellInfo(nX).bEmptyCellText;
else
{
- ScRefCellValue aCell(*mpDoc, ScAddress(nX, nY, nTab));
+ ScRefCellValue aCell(*mpDoc, ScAddress(nX, nY, mnTab));
bEmpty = aCell.isEmpty();
}
- if ( !bEmpty && ( nX < nX1 || nX > nX2 || !pThisRowInfo ) )
+ if ( !bEmpty && ( nX < mnX1 || nX > mnX2 || !pThisRowInfo ) )
{
- // for the range nX1..nX2 in RowInfo, cell protection attribute is already evaluated
+ // for the range mnX1..mnX2 in RowInfo, cell protection attribute is already evaluated
// into bEmptyCellText in ScDocument::FillInfo / lcl_HidePrint (printfun)
- bool bIsPrint = ( eType == OUTTYPE_PRINTER );
+ bool bIsPrint = ( meType == OUTTYPE_PRINTER );
- if ( bIsPrint || bTabProtected )
+ if ( bIsPrint || mbTabProtected )
{
const ScProtectionAttr* pAttr =
- mpDoc->GetEffItem( nX, nY, nTab, ATTR_PROTECTION );
+ mpDoc->GetEffItem( nX, nY, mnTab, ATTR_PROTECTION );
if ( bIsPrint && pAttr->GetHidePrint() )
bEmpty = true;
- else if ( bTabProtected )
+ else if ( mbTabProtected )
{
if ( pAttr->GetHideCell() )
bEmpty = true;
else if ( mbShowFormulas && pAttr->GetHideFormula() )
{
- if (mpDoc->GetCellType(ScAddress(nX, nY, nTab)) == CELLTYPE_FORMULA)
+ if (mpDoc->GetCellType(ScAddress(nX, nY, mnTab)) == CELLTYPE_FORMULA)
bEmpty = true;
}
}
@@ -1178,11 +1178,11 @@ bool ScOutputData::IsAvailable( SCCOL nX, SCROW nY )
// Stop at non-empty or merged or overlapped cell,
// where a note is empty as well as a cell that's hidden by protection settings
- ScRefCellValue aCell(*mpDoc, ScAddress(nX, nY, nTab));
+ ScRefCellValue aCell(*mpDoc, ScAddress(nX, nY, mnTab));
if (!aCell.isEmpty() && !IsEmptyCellText(nullptr, nX, nY))
return false;
- const ScPatternAttr* pPattern = mpDoc->GetPattern( nX, nY, nTab );
+ const ScPatternAttr* pPattern = mpDoc->GetPattern( nX, nY, mnTab );
return !(pPattern->GetItem(ATTR_MERGE).IsMerged() ||
pPattern->GetItem(ATTR_MERGE_FLAG).IsOverlapped());
}
@@ -1206,50 +1206,50 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, tools::Long nPosX, too
OutputAreaParam& rParam )
{
// rThisRowInfo may be for a different row than nCellY, is still used for clip marks
- RowInfo& rThisRowInfo = pRowInfo[nArrY];
+ RowInfo& rThisRowInfo = mpRowInfo[nArrY];
- tools::Long nLayoutSign = bLayoutRTL ? -1 : 1;
+ tools::Long nLayoutSign = mbLayoutRTL ? -1 : 1;
tools::Long nCellPosX = nPosX; // find nCellX position, starting at nX/nPosX
SCCOL nCompCol = nX;
while ( nCellX > nCompCol )
{
//! extra member function for width?
- tools::Long nColWidth = ( nCompCol <= nX2 ) ?
- pRowInfo[0].basicCellInfo(nCompCol).nWidth :
- static_cast<tools::Long>( mpDoc->GetColWidth( nCompCol, nTab ) * mnPPTX );
+ tools::Long nColWidth = ( nCompCol <= mnX2 ) ?
+ mpRowInfo[0].basicCellInfo(nCompCol).nWidth :
+ static_cast<tools::Long>( mpDoc->GetColWidth( nCompCol, mnTab ) * mnPPTX );
nCellPosX += nColWidth * nLayoutSign;
++nCompCol;
}
while ( nCellX < nCompCol )
{
--nCompCol;
- tools::Long nColWidth = ( nCompCol <= nX2 ) ?
- pRowInfo[0].basicCellInfo(nCompCol).nWidth :
- static_cast<tools::Long>( mpDoc->GetColWidth( nCompCol, nTab ) * mnPPTX );
+ tools::Long nColWidth = ( nCompCol <= mnX2 ) ?
+ mpRowInfo[0].basicCellInfo(nCompCol).nWidth :
+ static_cast<tools::Long>( mpDoc->GetColWidth( nCompCol, mnTab ) * mnPPTX );
nCellPosX -= nColWidth * nLayoutSign;
}
tools::Long nCellPosY = nPosY; // find nCellY position, starting at nArrY/nPosY
SCSIZE nCompArr = nArrY;
- SCROW nCompRow = pRowInfo[nCompArr].nRowNo;
+ SCROW nCompRow = mpRowInfo[nCompArr].nRowNo;
while ( nCellY > nCompRow )
{
- if ( nCompArr + 1 < nArrCount )
+ if ( nCompArr + 1 < mnArrCount )
{
- nCellPosY += pRowInfo[nCompArr].nHeight;
+ nCellPosY += mpRowInfo[nCompArr].nHeight;
++nCompArr;
- nCompRow = pRowInfo[nCompArr].nRowNo;
+ nCompRow = mpRowInfo[nCompArr].nRowNo;
}
else
{
- sal_uInt16 nDocHeight = mpDoc->GetRowHeight( nCompRow, nTab );
+ sal_uInt16 nDocHeight = mpDoc->GetRowHeight( nCompRow, mnTab );
if ( nDocHeight )
nCellPosY += static_cast<tools::Long>( nDocHeight * mnPPTY );
++nCompRow;
}
}
- nCellPosY -= mpDoc->GetScaledRowHeight( nCellY, nCompRow-1, nTab, mnPPTY );
+ nCellPosY -= mpDoc->GetScaledRowHeight( nCellY, nCompRow-1, mnTab, mnPPTY );
const ScMergeAttr* pMerge = &rPattern.GetItem( ATTR_MERGE );
bool bMerged = pMerge->IsMerged();
@@ -1263,9 +1263,9 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, tools::Long nPosX, too
tools::Long nMergeSizeX = 0;
for ( tools::Long i=0; i<nMergeCols; i++ )
{
- tools::Long nColWidth = ( nCellX+i <= nX2 ) ?
- pRowInfo[0].basicCellInfo(nCellX+i).nWidth :
- static_cast<tools::Long>( mpDoc->GetColWidth( sal::static_int_cast<SCCOL>(nCellX+i), nTab ) * mnPPTX );
+ tools::Long nColWidth = ( nCellX+i <= mnX2 ) ?
+ mpRowInfo[0].basicCellInfo(nCellX+i).nWidth :
+ static_cast<tools::Long>( mpDoc->GetColWidth( sal::static_int_cast<SCCOL>(nCellX+i), mnTab ) * mnPPTX );
nMergeSizeX += nColWidth;
}
tools::Long nMergeSizeY = 0;
@@ -1277,7 +1277,7 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, tools::Long nPosX, too
nDirect = 1; // skip in loop
}
// following rows always from document
- nMergeSizeY += mpDoc->GetScaledRowHeight( nCellY+nDirect, nCellY+nMergeRows-1, nTab, mnPPTY);
+ nMergeSizeY += mpDoc->GetScaledRowHeight( nCellY+nDirect, nCellY+nMergeRows-1, mnTab, mnPPTY);
--nMergeSizeX; // leave out the grid horizontally, also for alignment (align between grid lines)
@@ -1323,7 +1323,7 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, tools::Long nPosX, too
}
// nLeftMissing, nRightMissing are logical, eHorJust values are visual
- if ( bLayoutRTL )
+ if ( mbLayoutRTL )
::std::swap( nLeftMissing, nRightMissing );
SCCOL nRightX = nCellX;
@@ -1335,21 +1335,21 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, tools::Long nPosX, too
while ( nRightMissing > 0 && nRightX < mpDoc->MaxCol() && ( bOverwrite || IsAvailable( nRightX+1, nCellY ) ) )
{
++nRightX;
- tools::Long nAdd = static_cast<tools::Long>( mpDoc->GetColWidth( nRightX, nTab ) * mnPPTX );
+ tools::Long nAdd = static_cast<tools::Long>( mpDoc->GetColWidth( nRightX, mnTab ) * mnPPTX );
nRightMissing -= nAdd;
rParam.maClipRect.AdjustRight(nAdd * nLayoutSign );
- if ( rThisRowInfo.nRowNo == nCellY && nRightX >= nX1 && nRightX <= nX2 )
+ if ( rThisRowInfo.nRowNo == nCellY && nRightX >= mnX1 && nRightX <= mnX2 )
rThisRowInfo.cellInfo(nRightX-1).bHideGrid = true;
}
while ( nLeftMissing > 0 && nLeftX > 0 && ( bOverwrite || IsAvailable( nLeftX-1, nCellY ) ) )
{
- if ( rThisRowInfo.nRowNo == nCellY && nLeftX >= nX1 && nLeftX <= nX2 )
+ if ( rThisRowInfo.nRowNo == nCellY && nLeftX >= mnX1 && nLeftX <= mnX2 )
rThisRowInfo.cellInfo(nLeftX-1).bHideGrid = true;
--nLeftX;
- tools::Long nAdd = static_cast<tools::Long>( mpDoc->GetColWidth( nLeftX, nTab ) * mnPPTX );
+ tools::Long nAdd = static_cast<tools::Long>( mpDoc->GetColWidth( nLeftX, mnTab ) * mnPPTX );
nLeftMissing -= nAdd;
rParam.maClipRect.AdjustLeft( -(nAdd * nLayoutSign) );
}
@@ -1357,17 +1357,17 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, tools::Long nPosX, too
// Set flag and reserve space for clipping mark triangle,
// even if rThisRowInfo isn't for nCellY (merged cells).
- if ( nRightMissing > 0 && bMarkClipped && nRightX >= nX1 && nRightX <= nX2 && !bBreak && !bCellIsValue )
+ if ( nRightMissing > 0 && mbMarkClipped && nRightX >= mnX1 && nRightX <= mnX2 && !bBreak && !bCellIsValue )
{
rThisRowInfo.cellInfo(nRightX).nClipMark |= ScClipMark::Right;
- bAnyClipped = true;
+ mbAnyClipped = true;
tools::Long nMarkPixel = static_cast<tools::Long>( SC_CLIPMARK_SIZE * mnPPTX );
rParam.maClipRect.AdjustRight( -(nMarkPixel * nLayoutSign) );
}
- if ( nLeftMissing > 0 && bMarkClipped && nLeftX >= nX1 && nLeftX <= nX2 && !bBreak && !bCellIsValue )
+ if ( nLeftMissing > 0 && mbMarkClipped && nLeftX >= mnX1 && nLeftX <= mnX2 && !bBreak && !bCellIsValue )
{
rThisRowInfo.cellInfo(nLeftX).nClipMark |= ScClipMark::Left;
- bAnyClipped = true;
+ mbAnyClipped = true;
tools::Long nMarkPixel = static_cast<tools::Long>( SC_CLIPMARK_SIZE * mnPPTX );
rParam.maClipRect.AdjustLeft(nMarkPixel * nLayoutSign );
}
@@ -1384,7 +1384,7 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, tools::Long nPosX, too
// leave space for AutoFilter on screen
// (for automatic line break: only if not formatting for printer, as in ScColumn::GetNeededSize)
- if ( eType==OUTTYPE_WINDOW &&
+ if ( meType==OUTTYPE_WINDOW &&
( rPattern.GetItem(ATTR_MERGE_FLAG).GetValue() & (ScMF::Auto|ScMF::Button|ScMF::ButtonPopup) ) &&
( !bBreak || mpRefDevice == pFmtDevice ) )
{
@@ -1441,7 +1441,7 @@ bool beginsWithRTLCharacter(const OUString& rStr)
static SvxCellHorJustify getAlignmentFromContext( SvxCellHorJustify eInHorJust,
bool bCellIsValue, const OUString& rText,
const ScPatternAttr& rPattern, const SfxItemSet* pCondSet,
- const ScDocument* pDoc, SCTAB nTab, const bool bNumberFormatIsText )
+ const ScDocument* pDoc, SCTAB mnTab, const bool bNumberFormatIsText )
{
SvxCellHorJustify eHorJustContext = eInHorJust;
bool bUseWritingDirection = false;
@@ -1474,7 +1474,7 @@ static SvxCellHorJustify getAlignmentFromContext( SvxCellHorJustify eInHorJust,
// fdo#73588: The content of the cell must also
// begin with a RTL character to be right
// aligned; otherwise, it should be left aligned.
- eHorJustContext = (pDoc && pDoc->IsLayoutRTL(nTab) && (beginsWithRTLCharacter( rText))) ? SvxCellHorJustify::Right : SvxCellHorJustify::Left;
+ eHorJustContext = (pDoc && pDoc->IsLayoutRTL(mnTab) && (beginsWithRTLCharacter( rText))) ? SvxCellHorJustify::Right : SvxCellHorJustify::Left;
}
else
eHorJustContext = SvxCellHorJustify::Right;
@@ -1515,34 +1515,29 @@ void ScOutputData::LayoutStrings(bool bPixelToLogic)
// Try to limit interpreting to only visible cells. Calling e.g. IsValue()
// on a formula cell that needs interpreting would call Interpret()
// for the entire formula group, which could be large.
- mpDoc->InterpretCellsIfNeeded( ScRange( nX1, nY1, nTab, nX2, nY2, nTab ));
+ mpDoc->InterpretCellsIfNeeded( ScRange( mnX1, mnY1, mnTab, mnX2, mnY2, mnTab ));
ScDrawStringsVars aVars( this, bPixelToLogic );
bool bProgress = false;
- tools::Long nInitPosX = nScrX;
- if ( bLayoutRTL )
- nInitPosX += nMirrorW - 1; // pixels
- tools::Long nLayoutSign = bLayoutRTL ? -1 : 1;
+ tools::Long nInitPosX = mnScrX;
+ if ( mbLayoutRTL )
+ nInitPosX += mnMirrorW - 1; // pixels
+ tools::Long nLayoutSign = mbLayoutRTL ? -1 : 1;
SCCOL nLastContentCol = mpDoc->MaxCol();
- if ( nX2 < mpDoc->MaxCol() )
+ if ( mnX2 < mpDoc->MaxCol() )
{
SCROW nEndRow;
- mpDoc->GetCellArea(nTab, nLastContentCol, nEndRow);
+ mpDoc->GetCellArea(mnTab, nLastContentCol, nEndRow);
}
- SCCOL nLoopStartX = nX1;
- if ( nX1 > 0 && !bTaggedPDF )
- --nLoopStartX; // start before nX1 for rest of long text to the left
+ SCCOL nLoopStartX = mnX1;
+ if ( mnX1 > 0 && !bTaggedPDF )
+ --nLoopStartX; // start before mnX1 for rest of long text to the left
// variables for GetOutputArea
- OutputAreaParam aAreaParam;
- bool bCellIsValue = false;
- tools::Long nNeededWidth = 0;
- const ScPatternAttr* pPattern = nullptr;
- const SfxItemSet* pCondSet = nullptr;
const ScPatternAttr* pOldPattern = nullptr;
const SfxItemSet* pOldCondSet = nullptr;
SvtScriptType nOldScript = SvtScriptType::NONE;
@@ -1552,707 +1547,736 @@ void ScOutputData::LayoutStrings(bool bPixelToLogic)
std::vector<std::unique_ptr<ScPatternAttr> > aAltPatterns;
KernArray aDX;
- tools::Long nPosY = nScrY;
- for (SCSIZE nArrY=1; nArrY+1<nArrCount; nArrY++)
+ tools::Long nPosY = mnScrY;
+ for (SCSIZE nArrY=1; nArrY+1<mnArrCount; nArrY++)
{
- RowInfo* pThisRowInfo = &pRowInfo[nArrY];
+ RowInfo* pThisRowInfo = &mpRowInfo[nArrY];
SCROW nY = pThisRowInfo->nRowNo;
if (pThisRowInfo->bChanged)
{
bool bReopenRowTag = false;
tools::Long nPosX = nInitPosX;
- if ( nLoopStartX < nX1 )
- nPosX -= pRowInfo[0].basicCellInfo(nLoopStartX).nWidth * nLayoutSign;
+ if ( nLoopStartX < mnX1 )
+ nPosX -= mpRowInfo[0].basicCellInfo(nLoopStartX).nWidth * nLayoutSign;
+ std::optional<SCCOL> oFirstNonEmptyCellX;
std::optional<SCCOL> oLastEmptyCellX;
- for (SCCOL nX=nLoopStartX; nX<=nX2; nX++)
+ for (SCCOL nX=nLoopStartX; nX<=mnX2; nX++)
{
- bool bMergeEmpty = false;
- const ScCellInfo* pInfo = &pThisRowInfo->cellInfo(nX);
- bool bEmpty = nX < nX1 || pThisRowInfo->basicCellInfo(nX).bEmptyCellText;
-
- SCCOL nCellX = nX; // position where the cell really starts
- SCROW nCellY = nY;
- bool bDoCell = false;
- bool bUseEditEngine = false;
-
- // Part of a merged cell?
+ LayoutStringsImpl(bPixelToLogic, pThisRowInfo, nX, nY, nArrY, oFirstNonEmptyCellX, oLastEmptyCellX, nLastContentCol,
+ aAltPatterns, pOldPattern, pOldCondSet, nOldScript, aVars,
+ bProgress, nPosX, nPosY, bTaggedPDF, bReopenRowTag, pPDF, nLayoutSign, aDX);
+ nPosX += mpRowInfo[0].basicCellInfo(nX).nWidth * nLayoutSign;
+ }
+ }
+ nPosY += mpRowInfo[nArrY].nHeight;
+ }
+ if (bTaggedPDF)
+ pPDF->EndStructureElement(); // Table
- bool bOverlapped = (pInfo->bHOverlapped || pInfo->bVOverlapped);
- if ( bOverlapped )
- {
- bEmpty = true;
+ if ( bProgress )
+ ScProgress::DeleteInterpretProgress();
+}
- SCCOL nOverX; // start of the merged cells
- SCROW nOverY;
- bool bVisChanged = !pRowInfo[nArrY-1].bChanged;
- if (GetMergeOrigin( nX,nY, nArrY, nOverX,nOverY, bVisChanged ))
- {
- nCellX = nOverX;
- nCellY = nOverY;
- bDoCell = true;
- }
- else
- bMergeEmpty = true;
- }
+/// inner loop of LayoutStrings
+void ScOutputData::LayoutStringsImpl(bool const bPixelToLogic, RowInfo* const pThisRowInfo,
+ SCCOL const nX, SCROW const nY, SCSIZE const nArrY,
+ std::optional<SCCOL>& oFirstNonEmptyCellX,
+ std::optional<SCCOL>& oLastEmptyCellX,
+ SCCOL const nLastContentCol,
+ std::vector<std::unique_ptr<ScPatternAttr> >& aAltPatterns,
+ const ScPatternAttr*& pOldPattern,
+ const SfxItemSet*& pOldCondSet,
+ SvtScriptType& nOldScript,
+ ScDrawStringsVars& aVars,
+ bool& bProgress, tools::Long const nPosX, tools::Long const nPosY,
+ bool const bTaggedPDF, bool& bReopenRowTag, vcl::PDFExtOutDevData* const pPDF,
+ tools::Long const nLayoutSign, KernArray& aDX)
+{
+ const ScPatternAttr* pPattern = nullptr;
+ const SfxItemSet* pCondSet = nullptr;
+ bool bCellIsValue = false;
+ tools::Long nNeededWidth = 0;
+ OutputAreaParam aAreaParam;
+ bool bMergeEmpty = false;
+ const ScCellInfo* pInfo = &pThisRowInfo->cellInfo(nX);
+ bool bEmpty = nX < mnX1 || pThisRowInfo->basicCellInfo(nX).bEmptyCellText;
- // Rest of a long text further to the left?
+ SCCOL nCellX = nX; // position where the cell really starts
+ SCROW nCellY = nY;
+ bool bDoCell = false;
+ bool bUseEditEngine = false;
- if ( bEmpty && !bMergeEmpty && nX < nX1 && !bOverlapped )
- {
- if (!oLastEmptyCellX)
- {
- SCCOL nTempX=nX1;
- while (nTempX > 0 && IsEmptyCellText( pThisRowInfo, nTempX, nY ))
- --nTempX;
- oLastEmptyCellX = nTempX;
- }
+ // Part of a merged cell?
- if ( *oLastEmptyCellX < nX1 &&
- !IsEmptyCellText( pThisRowInfo, *oLastEmptyCellX, nY ) &&
- !mpDoc->HasAttrib( *oLastEmptyCellX,nY,nTab, nX1,nY,nTab, HasAttrFlags::Merged | HasAttrFlags::Overlapped ) )
- {
- nCellX = *oLastEmptyCellX;
- bDoCell = true;
- }
- }
+ bool bOverlapped = (pInfo->bHOverlapped || pInfo->bVOverlapped);
+ if ( bOverlapped )
+ {
+ bEmpty = true;
- // Rest of a long text further to the right?
+ SCCOL nOverX; // start of the merged cells
+ SCROW nOverY;
+ bool bVisChanged = !mpRowInfo[nArrY-1].bChanged;
+ if (GetMergeOrigin( nX,nY, nArrY, nOverX,nOverY, bVisChanged ))
+ {
+ nCellX = nOverX;
+ nCellY = nOverY;
+ bDoCell = true;
+ }
+ else
+ bMergeEmpty = true;
+ }
- if ( bEmpty && !bMergeEmpty && nX == nX2 && !bOverlapped )
- {
- // don't have to look further than nLastContentCol
+ // Is there a long text further to the left, that overlaps this region?
- SCCOL nTempX=nX;
- while (nTempX < nLastContentCol && IsEmptyCellText( pThisRowInfo, nTempX, nY ))
- ++nTempX;
+ if ( bEmpty && !bMergeEmpty && nX < mnX1 && !bOverlapped )
+ {
+ if (!oFirstNonEmptyCellX)
+ {
+ SCCOL nTempX=mnX1;
+ while (nTempX > 0 && IsEmptyCellText( pThisRowInfo, nTempX, nY ))
+ --nTempX;
+ oFirstNonEmptyCellX = nTempX;
+ }
- if ( nTempX > nX &&
- !IsEmptyCellText( pThisRowInfo, nTempX, nY ) &&
- !mpDoc->HasAttrib( nTempX,nY,nTab, nX,nY,nTab, HasAttrFlags::Merged | HasAttrFlags::Overlapped ) )
- {
- nCellX = nTempX;
- bDoCell = true;
- }
- }
+ if ( *oFirstNonEmptyCellX < mnX1 &&
+ !IsEmptyCellText( pThisRowInfo, *oFirstNonEmptyCellX, nY ) &&
+ !mpDoc->HasAttrib( *oFirstNonEmptyCellX,nY,mnTab, mnX1,nY,mnTab, HasAttrFlags::Merged | HasAttrFlags::Overlapped ) )
+ {
+ nCellX = *oFirstNonEmptyCellX;
+ bDoCell = true;
+ }
+ }
- // normal visible cell
+ // Is there a long text further to the right, that overlaps this region?
- if (!bEmpty)
- bDoCell = true;
+ if ( bEmpty && !bMergeEmpty && nX == mnX2 && !bOverlapped )
+ {
+ if (!oLastEmptyCellX)
+ {
+ // don't have to look further than nLastContentCol
+ SCCOL nTempX=nX;
+ while (nTempX < nLastContentCol && IsEmptyCellText( pThisRowInfo, nTempX, nY ))
+ ++nTempX;
+ oLastEmptyCellX = nTempX;
+ }
- // don't output the cell that's being edited
+ if ( *oLastEmptyCellX > nX &&
+ !IsEmptyCellText( pThisRowInfo, *oLastEmptyCellX, nY ) &&
+ !mpDoc->HasAttrib( *oLastEmptyCellX, nY,mnTab, nX,nY,mnTab, HasAttrFlags::Merged | HasAttrFlags::Overlapped ) )
+ {
+ nCellX = *oLastEmptyCellX;
+ bDoCell = true;
+ }
+ }
- if ( bDoCell && bEditMode && nCellX == nEditCol && nCellY == nEditRow )
- bDoCell = false;
+ // normal visible cell
- // skip text in cell if data bar/icon set is set and only value selected
- if ( bDoCell )
- {
- if(pInfo->pDataBar && !pInfo->pDataBar->mbShowValue)
- bDoCell = false;
- if(pInfo->pIconSet && !pInfo->pIconSet->mbShowValue)
- bDoCell = false;
- }
+ if (!bEmpty)
+ bDoCell = true;
- // output the cell text
+ // don't output the cell that's being edited
- ScRefCellValue aCell;
- if (bDoCell)
- {
- if ( nCellY == nY && nCellX == nX && nCellX >= nX1 && nCellX <= nX2 )
- aCell = pThisRowInfo->cellInfo(nCellX).maCell;
- else
- GetVisibleCell( nCellX, nCellY, nTab, aCell ); // get from document
- if (aCell.isEmpty())
- bDoCell = false;
- else if (aCell.getType() == CELLTYPE_EDIT)
- bUseEditEngine = true;
- }
+ if ( bDoCell && mbEditMode && nCellX == mnEditCol && nCellY == mnEditRow )
+ bDoCell = false;
- // Check if this cell is mis-spelled.
- if (bDoCell && !bUseEditEngine && aCell.getType() == CELLTYPE_STRING)
- {
- if (mpSpellCheckCxt && mpSpellCheckCxt->isMisspelled(nCellX, nCellY))
- bUseEditEngine = true;
- }
+ // skip text in cell if data bar/icon set is set and only value selected
+ if ( bDoCell )
+ {
+ if(pInfo->pDataBar && !pInfo->pDataBar->mbShowValue)
+ bDoCell = false;
+ if(pInfo->pIconSet && !pInfo->pIconSet->mbShowValue)
+ bDoCell = false;
+ }
- if (bDoCell && !bUseEditEngine)
- {
- if ( nCellY == nY && nCellX >= nX1 && nCellX <= nX2 )
- {
- ScCellInfo& rCellInfo = pThisRowInfo->cellInfo(nCellX);
- pPattern = rCellInfo.pPatternAttr;
- pCondSet = rCellInfo.pConditionSet;
+ // output the cell text
- if ( !pPattern )
- {
- // #i68085# pattern from cell info for hidden columns is null,
- // test for null is quicker than using column flags
- pPattern = mpDoc->GetPattern( nCellX, nCellY, nTab );
- pCondSet = mpDoc->GetCondResult( nCellX, nCellY, nTab );
- }
- }
- else // get from document
- {
- pPattern = mpDoc->GetPattern( nCellX, nCellY, nTab );
- pCondSet = mpDoc->GetCondResult( nCellX, nCellY, nTab );
- }
- if ( mpDoc->GetPreviewFont() || mpDoc->GetPreviewCellStyle() )
- {
- aAltPatterns.push_back(std::make_unique<ScPatternAttr>(*pPattern));
- ScPatternAttr* pAltPattern = aAltPatterns.back().get();
- if ( ScStyleSheet* pPreviewStyle = mpDoc->GetPreviewCellStyle( nCellX, nCellY, nTab ) )
- {
- pAltPattern->SetStyleSheet(pPreviewStyle);
- }
- else if ( SfxItemSet* pFontSet = mpDoc->GetPreviewFont( nCellX, nCellY, nTab ) )
- {
- if ( const SvxFontItem* pItem = pFontSet->GetItemIfSet( ATTR_FONT ) )
- pAltPattern->GetItemSet().Put( *pItem );
- if ( const SvxFontItem* pItem = pFontSet->GetItemIfSet( ATTR_CJK_FONT ) )
- pAltPattern->GetItemSet().Put( *pItem );
- if ( const SvxFontItem* pItem = pFontSet->GetItemIfSet( ATTR_CTL_FONT ) )
- pAltPattern->GetItemSet().Put( *pItem );
- }
- pPattern = pAltPattern;
- }
+ ScRefCellValue aCell;
+ if (bDoCell)
+ {
+ if ( nCellY == nY && nCellX == nX && nCellX >= mnX1 && nCellX <= mnX2 )
+ aCell = pThisRowInfo->cellInfo(nCellX).maCell;
+ else
+ GetVisibleCell( nCellX, nCellY, mnTab, aCell ); // get from document
+ if (aCell.isEmpty())
+ bDoCell = false;
+ else if (aCell.getType() == CELLTYPE_EDIT)
+ bUseEditEngine = true;
+ }
- if (aCell.hasNumeric() &&
- pPattern->GetItem(ATTR_LINEBREAK, pCondSet).GetValue())
- {
- // Disable line break when the cell content is numeric.
- aAltPatterns.push_back(std::make_unique<ScPatternAttr>(*pPattern));
- ScPatternAttr* pAltPattern = aAltPatterns.back().get();
- ScLineBreakCell aLineBreak(false);
- pAltPattern->GetItemSet().Put(aLineBreak);
- pPattern = pAltPattern;
- }
+ // Check if this cell is mis-spelled.
+ if (bDoCell && !bUseEditEngine && aCell.getType() == CELLTYPE_STRING)
+ {
+ if (mpSpellCheckCxt && mpSpellCheckCxt->isMisspelled(nCellX, nCellY))
+ bUseEditEngine = true;
+ }
- SvtScriptType nScript = mpDoc->GetCellScriptType(
- ScAddress(nCellX, nCellY, nTab),
- pPattern->GetNumberFormat(mpDoc->GetFormatTable(), pCondSet));
+ if (bDoCell && !bUseEditEngine)
+ {
+ if ( nCellY == nY && nCellX >= mnX1 && nCellX <= mnX2 )
+ {
+ ScCellInfo& rCellInfo = pThisRowInfo->cellInfo(nCellX);
+ pPattern = rCellInfo.pPatternAttr;
+ pCondSet = rCellInfo.pConditionSet;
- if (nScript == SvtScriptType::NONE)
- nScript = ScGlobal::GetDefaultScriptType();
+ if ( !pPattern )
+ {
+ // #i68085# pattern from cell info for hidden columns is null,
+ // test for null is quicker than using column flags
+ pPattern = mpDoc->GetPattern( nCellX, nCellY, mnTab );
+ pCondSet = mpDoc->GetCondResult( nCellX, nCellY, mnTab );
+ }
+ }
+ else // get from document
+ {
+ pPattern = mpDoc->GetPattern( nCellX, nCellY, mnTab );
+ pCondSet = mpDoc->GetCondResult( nCellX, nCellY, mnTab );
+ }
+ if ( mpDoc->GetPreviewFont() || mpDoc->GetPreviewCellStyle() )
+ {
+ aAltPatterns.push_back(std::make_unique<ScPatternAttr>(*pPattern));
+ ScPatternAttr* pAltPattern = aAltPatterns.back().get();
+ if ( ScStyleSheet* pPreviewStyle = mpDoc->GetPreviewCellStyle( nCellX, nCellY, mnTab ) )
+ {
+ pAltPattern->SetStyleSheet(pPreviewStyle);
+ }
+ else if ( SfxItemSet* pFontSet = mpDoc->GetPreviewFont( nCellX, nCellY, mnTab ) )
+ {
+ if ( const SvxFontItem* pItem = pFontSet->GetItemIfSet( ATTR_FONT ) )
+ pAltPattern->ItemSetPut( *pItem );
+ if ( const SvxFontItem* pItem = pFontSet->GetItemIfSet( ATTR_CJK_FONT ) )
+ pAltPattern->ItemSetPut( *pItem );
+ if ( const SvxFontItem* pItem = pFontSet->GetItemIfSet( ATTR_CTL_FONT ) )
+ pAltPattern->ItemSetPut( *pItem );
+ }
+ pPattern = pAltPattern;
+ }
- if ( !ScPatternAttr::areSame(pPattern, pOldPattern) || pCondSet != pOldCondSet ||
- nScript != nOldScript || mbSyntaxMode )
- {
- if ( StringDiffer(pOldPattern,pPattern) ||
- pCondSet != pOldCondSet || nScript != nOldScript || mbSyntaxMode )
- {
- aVars.SetPattern(pPattern, pCondSet, aCell, nScript);
- }
- else
- aVars.SetPatternSimple( pPattern, pCondSet );
- pOldPattern = pPattern;
- pOldCondSet = pCondSet;
- nOldScript = nScript;
- }
+ if (aCell.hasNumeric() &&
+ pPattern->GetItem(ATTR_LINEBREAK, pCondSet).GetValue())
+ {
+ // Disable line break when the cell content is numeric.
+ aAltPatterns.push_back(std::make_unique<ScPatternAttr>(*pPattern));
+ ScPatternAttr* pAltPattern = aAltPatterns.back().get();
+ ScLineBreakCell aLineBreak(false);
+ pAltPattern->ItemSetPut(aLineBreak);
+ pPattern = pAltPattern;
+ }
- // use edit engine for rotated, stacked or mixed-script text
- if ( aVars.GetOrient() == SvxCellOrientation::Stacked ||
- aVars.IsRotated() || IsAmbiguousScript(nScript) )
- bUseEditEngine = true;
- }
- if (bDoCell && !bUseEditEngine)
- {
- bool bFormulaCell = (aCell.getType() == CELLTYPE_FORMULA);
- if ( bFormulaCell )
- lcl_CreateInterpretProgress(bProgress, mpDoc, aCell.getFormula());
- if ( aVars.SetText(aCell) )
- pOldPattern = nullptr;
- bUseEditEngine = aVars.HasEditCharacters() || (bFormulaCell && aCell.getFormula()->IsMultilineResult());
- }
- tools::Long nTotalMargin = 0;
- SvxCellHorJustify eOutHorJust = SvxCellHorJustify::Standard;
- if (bDoCell && !bUseEditEngine)
- {
- CellType eCellType = aCell.getType();
- bCellIsValue = ( eCellType == CELLTYPE_VALUE );
- if ( eCellType == CELLTYPE_FORMULA )
- {
- ScFormulaCell* pFCell = aCell.getFormula();
- bCellIsValue = pFCell->IsRunning() || pFCell->IsValue();
- }
+ SvtScriptType nScript = mpDoc->GetCellScriptType(
+ ScAddress(nCellX, nCellY, mnTab),
+ pPattern->GetNumberFormat(mpDoc->GetFormatTable(), pCondSet));
- const bool bNumberFormatIsText = lcl_isNumberFormatText( mpDoc, nCellX, nCellY, nTab );
- eOutHorJust = getAlignmentFromContext( aVars.GetHorJust(), bCellIsValue, aVars.GetString(),
- *pPattern, pCondSet, mpDoc, nTab, bNumberFormatIsText );
+ if (nScript == SvtScriptType::NONE)
+ nScript = ScGlobal::GetDefaultScriptType();
- bool bBreak = ( aVars.GetLineBreak() || aVars.GetHorJust() == SvxCellHorJustify::Block );
- // #i111387# #o11817313# tdf#121040 disable automatic line breaks for all number formats
- // Must be synchronized with ScColumn::GetNeededSize()
- SvNumberFormatter* pFormatter = mpDoc->GetFormatTable();
- if (bBreak && bCellIsValue && (pFormatter->GetType(aVars.GetResultValueFormat()) == SvNumFormatType::NUMBER))
- bBreak = false;
+ if ( !ScPatternAttr::areSame(pPattern, pOldPattern) || pCondSet != pOldCondSet ||
+ nScript != nOldScript || mbSyntaxMode )
+ {
+ if ( StringDiffer(pOldPattern,pPattern) ||
+ pCondSet != pOldCondSet || nScript != nOldScript || mbSyntaxMode )
+ {
+ aVars.SetPattern(pPattern, pCondSet, aCell, nScript);
+ }
+ else
+ aVars.SetPatternSimple( pPattern, pCondSet );
+ pOldPattern = pPattern;
+ pOldCondSet = pCondSet;
+ nOldScript = nScript;
+ }
- bool bRepeat = aVars.IsRepeat() && !bBreak;
- bool bShrink = aVars.IsShrink() && !bBreak && !bRepeat;
+ // use edit engine for rotated, stacked or mixed-script text
+ if ( aVars.GetOrient() == SvxCellOrientation::Stacked ||
+ aVars.IsRotated() || IsAmbiguousScript(nScript) )
+ bUseEditEngine = true;
+ }
+ if (bDoCell && !bUseEditEngine)
+ {
+ bool bFormulaCell = (aCell.getType() == CELLTYPE_FORMULA);
+ if ( bFormulaCell )
+ lcl_CreateInterpretProgress(bProgress, mpDoc, aCell.getFormula());
+ if ( aVars.SetText(aCell) )
+ pOldPattern = nullptr;
+ bUseEditEngine = aVars.HasEditCharacters() || (bFormulaCell && aCell.getFormula()->IsMultilineResult());
+ }
+ tools::Long nTotalMargin = 0;
+ SvxCellHorJustify eOutHorJust = SvxCellHorJustify::Standard;
+ if (bDoCell && !bUseEditEngine)
+ {
+ CellType eCellType = aCell.getType();
+ bCellIsValue = ( eCellType == CELLTYPE_VALUE );
+ if ( eCellType == CELLTYPE_FORMULA )
+ {
+ ScFormulaCell* pFCell = aCell.getFormula();
+ bCellIsValue = pFCell->IsRunning() || pFCell->IsValue();
+ }
- nTotalMargin =
- static_cast<tools::Long>(aVars.GetLeftTotal() * mnPPTX) +
- static_cast<tools::Long>(aVars.GetMargin()->GetRightMargin() * mnPPTX);
+ const bool bNumberFormatIsText = lcl_isNumberFormatText( mpDoc, nCellX, nCellY, mnTab );
+ eOutHorJust = getAlignmentFromContext( aVars.GetHorJust(), bCellIsValue, aVars.GetString(),
+ *pPattern, pCondSet, mpDoc, mnTab, bNumberFormatIsText );
- nNeededWidth = aVars.GetTextSize().Width() + nTotalMargin;
+ bool bBreak = ( aVars.GetLineBreak() || aVars.GetHorJust() == SvxCellHorJustify::Block );
+ // #i111387# #o11817313# tdf#121040 disable automatic line breaks for all number formats
+ // Must be synchronized with ScColumn::GetNeededSize()
+ SvNumberFormatter* pFormatter = mpDoc->GetFormatTable();
+ if (bBreak && bCellIsValue && (pFormatter->GetType(aVars.GetResultValueFormat()) == SvNumFormatType::NUMBER))
+ bBreak = false;
- // GetOutputArea gives justified rectangles
- GetOutputArea( nX, nArrY, nPosX, nPosY, nCellX, nCellY, nNeededWidth,
- *pPattern, sal::static_int_cast<sal_uInt16>(eOutHorJust),
- bCellIsValue || bRepeat || bShrink, bBreak, false,
- aAreaParam );
+ bool bRepeat = aVars.IsRepeat() && !bBreak;
+ bool bShrink = aVars.IsShrink() && !bBreak && !bRepeat;
- aVars.RepeatToFill( aAreaParam.mnColWidth - nTotalMargin );
- if ( bShrink )
- {
- if ( aVars.GetOrient() != SvxCellOrientation::Standard )
- {
- // Only horizontal scaling is handled here.
- // DrawEdit is used to vertically scale 90 deg rotated text.
- bUseEditEngine = true;
- }
- else if ( aAreaParam.mbLeftClip || aAreaParam.mbRightClip ) // horizontal
- {
- tools::Long nAvailable = aAreaParam.maAlignRect.GetWidth() - nTotalMargin;
- tools::Long nScaleSize = aVars.GetTextSize().Width(); // without margin
+ nTotalMargin =
+ static_cast<tools::Long>(aVars.GetLeftTotal() * mnPPTX) +
+ static_cast<tools::Long>(aVars.GetMargin()->GetRightMargin() * mnPPTX);
- if ( nAvailable > 0 && nScaleSize > 0 ) // 0 if the text is empty (formulas, number formats)
- {
- tools::Long nScale = ( nAvailable * 100 ) / nScaleSize;
+ nNeededWidth = aVars.GetTextSize().Width() + nTotalMargin;
- aVars.SetShrinkScale( nScale, nOldScript );
- tools::Long nNewSize = aVars.GetTextSize().Width();
+ // GetOutputArea gives justified rectangles
+ GetOutputArea( nX, nArrY, nPosX, nPosY, nCellX, nCellY, nNeededWidth,
+ *pPattern, sal::static_int_cast<sal_uInt16>(eOutHorJust),
+ bCellIsValue || bRepeat || bShrink, bBreak, false,
+ aAreaParam );
- sal_uInt16 nShrinkAgain = 0;
- while ( nNewSize > nAvailable && nShrinkAgain < SC_SHRINKAGAIN_MAX )
- {
- // If the text is still too large, reduce the scale again by 10%, until it fits,
- // at most 7 times (it's less than 50% of the calculated scale then).
+ aVars.RepeatToFill( aAreaParam.mnColWidth - nTotalMargin );
+ if ( bShrink )
+ {
+ if ( aVars.GetOrient() != SvxCellOrientation::Standard )
+ {
+ // Only horizontal scaling is handled here.
+ // DrawEdit is used to vertically scale 90 deg rotated text.
+ bUseEditEngine = true;
+ }
+ else if ( aAreaParam.mbLeftClip || aAreaParam.mbRightClip ) // horizontal
+ {
+ tools::Long nAvailable = aAreaParam.maAlignRect.GetWidth() - nTotalMargin;
+ tools::Long nScaleSize = aVars.GetTextSize().Width(); // without margin
- nScale = ( nScale * 9 ) / 10;
- aVars.SetShrinkScale( nScale, nOldScript );
- nNewSize = aVars.GetTextSize().Width();
- ++nShrinkAgain;
- }
- // If even at half the size the font still isn't rendered smaller,
- // fall back to normal clipping (showing ### for numbers).
- if ( nNewSize <= nAvailable )
- {
- // Reset relevant parameters.
- aAreaParam.mbLeftClip = aAreaParam.mbRightClip = false;
- aAreaParam.mnLeftClipLength = aAreaParam.mnRightClipLength = 0;
- }
+ if ( nAvailable > 0 && nScaleSize > 0 ) // 0 if the text is empty (formulas, number formats)
+ {
+ tools::Long nScale = ( nAvailable * 100 ) / nScaleSize;
- pOldPattern = nullptr;
- }
- }
- }
+ aVars.SetShrinkScale( nScale, nOldScript );
+ tools::Long nNewSize = aVars.GetTextSize().Width();
- if ( bRepeat && !aAreaParam.mbLeftClip && !aAreaParam.mbRightClip )
+ sal_uInt16 nShrinkAgain = 0;
+ while ( nNewSize > nAvailable && nShrinkAgain < SC_SHRINKAGAIN_MAX )
{
- tools::Long nAvailable = aAreaParam.maAlignRect.GetWidth() - nTotalMargin;
- tools::Long nRepeatSize = aVars.GetTextSize().Width(); // without margin
- // When formatting for the printer, the text sizes don't always add up.
- // Round down (too few repetitions) rather than exceeding the cell size then:
- if ( pFmtDevice != mpRefDevice )
- ++nRepeatSize;
- if ( nRepeatSize > 0 )
- {
- tools::Long nRepeatCount = nAvailable / nRepeatSize;
- if ( nRepeatCount > 1 )
- {
- OUString aCellStr = aVars.GetString();
- OUStringBuffer aRepeated(aCellStr);
- for ( tools::Long nRepeat = 1; nRepeat < nRepeatCount; nRepeat++ )
- aRepeated.append(aCellStr);
- aVars.SetAutoText( aRepeated.makeStringAndClear() );
- }
- }
- }
+ // If the text is still too large, reduce the scale again by 10%, until it fits,
+ // at most 7 times (it's less than 50% of the calculated scale then).
- // use edit engine if automatic line breaks are needed
- if ( bBreak )
- {
- if ( aVars.GetOrient() == SvxCellOrientation::Standard )
- bUseEditEngine = ( aAreaParam.mbLeftClip || aAreaParam.mbRightClip );
- else
- {
- tools::Long nHeight = aVars.GetTextSize().Height() +
- static_cast<tools::Long>(aVars.GetMargin()->GetTopMargin()*mnPPTY) +
- static_cast<tools::Long>(aVars.GetMargin()->GetBottomMargin()*mnPPTY);
- bUseEditEngine = ( nHeight > aAreaParam.maClipRect.GetHeight() );
- }
+ nScale = ( nScale * 9 ) / 10;
+ aVars.SetShrinkScale( nScale, nOldScript );
+ nNewSize = aVars.GetTextSize().Width();
+ ++nShrinkAgain;
}
- if (!bUseEditEngine)
+ // If even at half the size the font still isn't rendered smaller,
+ // fall back to normal clipping (showing ### for numbers).
+ if ( nNewSize <= nAvailable )
{
- bUseEditEngine =
- aVars.GetHorJust() == SvxCellHorJustify::Block &&
- aVars.GetHorJustMethod() == SvxCellJustifyMethod::Distribute;
+ // Reset relevant parameters.
+ aAreaParam.mbLeftClip = aAreaParam.mbRightClip = false;
+ aAreaParam.mnLeftClipLength = aAreaParam.mnRightClipLength = 0;
}
- }
- if (bUseEditEngine)
- {
- // mark the cell in ScCellInfo to be drawn in DrawEdit:
- // Cells to the left are marked directly, cells to the
- // right are handled by the flag for nX2
- SCCOL nMarkX = ( nCellX <= nX2 ) ? nCellX : nX2;
- pThisRowInfo->basicCellInfo(nMarkX).bEditEngine = true;
- bDoCell = false; // don't draw here
-
- // Mark the tagged "TD" structure element to be drawn in DrawEdit
- if (bTaggedPDF)
- {
- if (bReopenRowTag)
- ReopenPDFStructureElement(vcl::pdf::StructElement::TableRow, nY);
- else
- {
- sal_Int32 nId = pPDF->EnsureStructureElement(nullptr);
- pPDF->InitStructureElement(nId, vcl::pdf::StructElement::TableRow,
- u"TR"_ustr);
- pPDF->BeginStructureElement(nId);
- pPDF->GetScPDFState()->m_TableRowMap.emplace(nY, nId);
- bReopenRowTag = true;
- }
-
- pPDF->WrapBeginStructureElement(vcl::pdf::StructElement::TableData,
- u"TD"_ustr);
-
- sal_Int32 nId = pPDF->GetCurrentStructureElement();
- pPDF->GetScPDFState()->m_TableDataMap[{ nY, nX }] = nId;
- pPDF->EndStructureElement(); // TableData
- pPDF->EndStructureElement(); // TableRow
- }
+ pOldPattern = nullptr;
}
- if ( bDoCell )
+ }
+ }
+
+ if ( bRepeat && !aAreaParam.mbLeftClip && !aAreaParam.mbRightClip )
+ {
+ tools::Long nAvailable = aAreaParam.maAlignRect.GetWidth() - nTotalMargin;
+ tools::Long nRepeatSize = aVars.GetTextSize().Width(); // without margin
+ // When formatting for the printer, the text sizes don't always add up.
+ // Round down (too few repetitions) rather than exceeding the cell size then:
+ if ( pFmtDevice != mpRefDevice )
+ ++nRepeatSize;
+ if ( nRepeatSize > 0 )
+ {
+ tools::Long nRepeatCount = nAvailable / nRepeatSize;
+ if ( nRepeatCount > 1 )
{
- if ( bCellIsValue && ( aAreaParam.mbLeftClip || aAreaParam.mbRightClip ) )
- {
- bool bHasHashText = false;
- if (mbShowFormulas)
- {
- aVars.SetHashText();
- bHasHashText = true;
- }
- else
- // Adjust the decimals to fit the available column width.
- bHasHashText = aVars.SetTextToWidthOrHash( aCell, aAreaParam.mnColWidth - nTotalMargin );
+ OUString aCellStr = aVars.GetString();
+ OUStringBuffer aRepeated(aCellStr);
+ for ( tools::Long nRepeat = 1; nRepeat < nRepeatCount; nRepeat++ )
+ aRepeated.append(aCellStr);
+ aVars.SetAutoText( aRepeated.makeStringAndClear() );
+ }
+ }
+ }
- if ( bHasHashText )
- {
- tools::Long nMarkPixel = SC_CLIPMARK_SIZE * mnPPTX;
+ // use edit engine if automatic line breaks are needed
+ if ( bBreak )
+ {
+ if ( aVars.GetOrient() == SvxCellOrientation::Standard )
+ bUseEditEngine = ( aAreaParam.mbLeftClip || aAreaParam.mbRightClip );
+ else
+ {
+ tools::Long nHeight = aVars.GetTextSize().Height() +
+ static_cast<tools::Long>(aVars.GetMargin()->GetTopMargin()*mnPPTY) +
+ static_cast<tools::Long>(aVars.GetMargin()->GetBottomMargin()*mnPPTY);
+ bUseEditEngine = ( nHeight > aAreaParam.maClipRect.GetHeight() );
+ }
+ }
+ if (!bUseEditEngine)
+ {
+ bUseEditEngine =
+ aVars.GetHorJust() == SvxCellHorJustify::Block &&
+ aVars.GetHorJustMethod() == SvxCellJustifyMethod::Distribute;
+ }
+ }
+ if (bUseEditEngine)
+ {
+ // mark the cell in ScCellInfo to be drawn in DrawEdit:
+ // Cells to the left are marked directly, cells to the
+ // right are handled by the flag for mnX2
+ SCCOL nMarkX = ( nCellX <= mnX2 ) ? nCellX : mnX2;
+ pThisRowInfo->basicCellInfo(nMarkX).bEditEngine = true;
+ bDoCell = false; // don't draw here
- if ( eOutHorJust == SvxCellHorJustify::Left )
- {
- if ( nCellY == nY && nCellX >= nX1 && nCellX <= nX2 )
- pRowInfo[nArrY].cellInfo(nCellX).nClipMark |= ScClipMark::Right;
- bAnyClipped = true;
- aAreaParam.maClipRect.AdjustRight( -(nMarkPixel * nLayoutSign) );
- }
- else if ( eOutHorJust == SvxCellHorJustify::Right )
- {
- if ( nCellY == nY && nCellX >= nX1 && nCellX <= nX2 )
- pRowInfo[nArrY].cellInfo(nCellX).nClipMark |= ScClipMark::Left;
- bAnyClipped = true;
- aAreaParam.maClipRect.AdjustLeft(nMarkPixel * nLayoutSign);
- }
- else
- {
- if ( nCellY == nY && nCellX >= nX1 && nCellX <= nX2 )
- {
- pRowInfo[nArrY].cellInfo(nCellX).nClipMark |= ScClipMark::Right;
- pRowInfo[nArrY].cellInfo(nCellX).nClipMark |= ScClipMark::Left;
- }
- bAnyClipped = true;
- aAreaParam.maClipRect.AdjustRight( -(nMarkPixel * nLayoutSign) );
- aAreaParam.maClipRect.AdjustLeft(nMarkPixel * nLayoutSign);
- }
- }
+ // Mark the tagged "TD" structure element to be drawn in DrawEdit
+ if (bTaggedPDF)
+ {
+ if (bReopenRowTag)
+ ReopenPDFStructureElement(vcl::pdf::StructElement::TableRow, nY);
+ else
+ {
+ sal_Int32 nId = pPDF->EnsureStructureElement(nullptr);
+ pPDF->InitStructureElement(nId, vcl::pdf::StructElement::TableRow,
+ u"TR"_ustr);
+ pPDF->BeginStructureElement(nId);
+ pPDF->GetScPDFState()->m_TableRowMap.emplace(nY, nId);
+ bReopenRowTag = true;
+ }
- nNeededWidth = aVars.GetTextSize().Width() +
- static_cast<tools::Long>( aVars.GetLeftTotal() * mnPPTX ) +
- static_cast<tools::Long>( aVars.GetMargin()->GetRightMargin() * mnPPTX );
- if ( nNeededWidth <= aAreaParam.maClipRect.GetWidth() )
- {
- // Cell value is no longer clipped. Reset relevant parameters.
- aAreaParam.mbLeftClip = aAreaParam.mbRightClip = false;
- aAreaParam.mnLeftClipLength = aAreaParam.mnRightClipLength = 0;
- }
- }
+ pPDF->WrapBeginStructureElement(vcl::pdf::StructElement::TableData,
+ u"TD"_ustr);
- tools::Long nJustPosX = aAreaParam.maAlignRect.Left(); // "justified" - effect of alignment will be added
- tools::Long nJustPosY = aAreaParam.maAlignRect.Top();
- tools::Long nAvailWidth = aAreaParam.maAlignRect.GetWidth();
- tools::Long nOutHeight = aAreaParam.maAlignRect.GetHeight();
+ sal_Int32 nId = pPDF->GetCurrentStructureElement();
+ pPDF->GetScPDFState()->m_TableDataMap[{ nY, nX }] = nId;
- bool bOutside = ( aAreaParam.maClipRect.Right() < nScrX || aAreaParam.maClipRect.Left() >= nScrX + nScrW );
- // Take adjusted values of aAreaParam.mbLeftClip and aAreaParam.mbRightClip
- bool bVClip = AdjustAreaParamClipRect(aAreaParam);
- bool bHClip = aAreaParam.mbLeftClip || aAreaParam.mbRightClip;
+ pPDF->EndStructureElement(); // TableData
+ pPDF->EndStructureElement(); // TableRow
+ }
+ }
+ if ( bDoCell )
+ {
+ if ( bCellIsValue && ( aAreaParam.mbLeftClip || aAreaParam.mbRightClip ) )
+ {
+ bool bHasHashText = false;
+ if (mbShowFormulas)
+ {
+ aVars.SetHashText();
+ bHasHashText = true;
+ }
+ else
+ // Adjust the decimals to fit the available column width.
+ bHasHashText = aVars.SetTextToWidthOrHash( aCell, aAreaParam.mnColWidth - nTotalMargin );
- // check horizontal space
+ if ( bHasHashText )
+ {
+ tools::Long nMarkPixel = SC_CLIPMARK_SIZE * mnPPTX;
- if ( !bOutside )
+ if ( eOutHorJust == SvxCellHorJustify::Left )
+ {
+ if ( nCellY == nY && nCellX >= mnX1 && nCellX <= mnX2 )
+ mpRowInfo[nArrY].cellInfo(nCellX).nClipMark |= ScClipMark::Right;
+ mbAnyClipped = true;
+ aAreaParam.maClipRect.AdjustRight( -(nMarkPixel * nLayoutSign) );
+ }
+ else if ( eOutHorJust == SvxCellHorJustify::Right )
+ {
+ if ( nCellY == nY && nCellX >= mnX1 && nCellX <= mnX2 )
+ mpRowInfo[nArrY].cellInfo(nCellX).nClipMark |= ScClipMark::Left;
+ mbAnyClipped = true;
+ aAreaParam.maClipRect.AdjustLeft(nMarkPixel * nLayoutSign);
+ }
+ else
+ {
+ if ( nCellY == nY && nCellX >= mnX1 && nCellX <= mnX2 )
{
- bool bRightAdjusted = false; // to correct text width calculation later
- switch (eOutHorJust)
- {
- case SvxCellHorJustify::Left:
- nJustPosX += static_cast<tools::Long>( aVars.GetLeftTotal() * mnPPTX );
- break;
- case SvxCellHorJustify::Right:
- nJustPosX += nAvailWidth - aVars.GetTextSize().Width() -
- static_cast<tools::Long>( aVars.GetRightTotal() * mnPPTX );
- bRightAdjusted = true;
- break;
- case SvxCellHorJustify::Center:
- nJustPosX += ( nAvailWidth - aVars.GetTextSize().Width() +
- static_cast<tools::Long>( aVars.GetLeftTotal() * mnPPTX ) -
- static_cast<tools::Long>( aVars.GetMargin()->GetRightMargin() * mnPPTX ) ) / 2;
- break;
- default:
- {
- // added to avoid warnings
- }
- }
+ mpRowInfo[nArrY].cellInfo(nCellX).nClipMark |= ScClipMark::Right;
+ mpRowInfo[nArrY].cellInfo(nCellX).nClipMark |= ScClipMark::Left;
+ }
+ mbAnyClipped = true;
+ aAreaParam.maClipRect.AdjustRight( -(nMarkPixel * nLayoutSign) );
+ aAreaParam.maClipRect.AdjustLeft(nMarkPixel * nLayoutSign);
+ }
+ }
- tools::Long nTestClipHeight = aVars.GetTextSize().Height();
- switch (aVars.GetVerJust())
- {
- case SvxCellVerJustify::Top:
- case SvxCellVerJustify::Block:
- {
- tools::Long nTop = static_cast<tools::Long>( aVars.GetMargin()->GetTopMargin() * mnPPTY );
- nJustPosY += nTop;
- nTestClipHeight += nTop;
- }
- break;
- case SvxCellVerJustify::Bottom:
- {
- tools::Long nBot = static_cast<tools::Long>( aVars.GetMargin()->GetBottomMargin() * mnPPTY );
- nJustPosY += nOutHeight - aVars.GetTextSize().Height() - nBot;
- nTestClipHeight += nBot;
- }
- break;
- case SvxCellVerJustify::Center:
- {
- tools::Long nTop = static_cast<tools::Long>( aVars.GetMargin()->GetTopMargin() * mnPPTY );
- tools::Long nBot = static_cast<tools::Long>( aVars.GetMargin()->GetBottomMargin() * mnPPTY );
- nJustPosY += ( nOutHeight + nTop -
- aVars.GetTextSize().Height() - nBot ) / 2;
- nTestClipHeight += std::abs( nTop - nBot );
- }
- break;
- default:
- {
- // added to avoid warnings
- }
- }
+ nNeededWidth = aVars.GetTextSize().Width() +
+ static_cast<tools::Long>( aVars.GetLeftTotal() * mnPPTX ) +
+ static_cast<tools::Long>( aVars.GetMargin()->GetRightMargin() * mnPPTX );
+ if ( nNeededWidth <= aAreaParam.maClipRect.GetWidth() )
+ {
+ // Cell value is no longer clipped. Reset relevant parameters.
+ aAreaParam.mbLeftClip = aAreaParam.mbRightClip = false;
+ aAreaParam.mnLeftClipLength = aAreaParam.mnRightClipLength = 0;
+ }
+ }
- if ( nTestClipHeight > nOutHeight )
- {
- // no vertical clipping when printing cells with optimal height,
- // except when font size is from conditional formatting.
- if ( eType != OUTTYPE_PRINTER ||
- ( mpDoc->GetRowFlags( nCellY, nTab ) & CRFlags::ManualSize ) ||
- ( aVars.HasCondHeight() ) )
- bVClip = true;
- }
+ tools::Long nJustPosX = aAreaParam.maAlignRect.Left(); // "justified" - effect of alignment will be added
+ tools::Long nJustPosY = aAreaParam.maAlignRect.Top();
+ tools::Long nAvailWidth = aAreaParam.maAlignRect.GetWidth();
+ tools::Long nOutHeight = aAreaParam.maAlignRect.GetHeight();
- if ( bHClip || bVClip )
- {
- // only clip the affected dimension so that not all right-aligned
- // columns are cut off when performing a non-proportional resize
- if (!bHClip)
- {
- aAreaParam.maClipRect.SetLeft( nScrX );
- aAreaParam.maClipRect.SetRight( nScrX+nScrW );
- }
- if (!bVClip)
- {
- aAreaParam.maClipRect.SetTop( nScrY );
- aAreaParam.maClipRect.SetBottom( nScrY+nScrH );
- }
+ bool bOutside = ( aAreaParam.maClipRect.Right() < mnScrX || aAreaParam.maClipRect.Left() >= mnScrX + mnScrW );
+ // Take adjusted values of aAreaParam.mbLeftClip and aAreaParam.mbRightClip
+ bool bVClip = AdjustAreaParamClipRect(aAreaParam);
+ bool bHClip = aAreaParam.mbLeftClip || aAreaParam.mbRightClip;
- // aClipRect is not used after SetClipRegion/IntersectClipRegion,
- // so it can be modified here
- if (bPixelToLogic)
- aAreaParam.maClipRect = mpRefDevice->PixelToLogic( aAreaParam.maClipRect );
+ // check horizontal space
- if (bMetaFile)
- {
- mpDev->Push();
- mpDev->IntersectClipRegion( aAreaParam.maClipRect );
- }
- else
- mpDev->SetClipRegion( vcl::Region( aAreaParam.maClipRect ) );
- }
+ if ( !bOutside )
+ {
+ bool bRightAdjusted = false; // to correct text width calculation later
+ switch (eOutHorJust)
+ {
+ case SvxCellHorJustify::Left:
+ nJustPosX += static_cast<tools::Long>( aVars.GetLeftTotal() * mnPPTX );
+ break;
+ case SvxCellHorJustify::Right:
+ nJustPosX += nAvailWidth - aVars.GetTextSize().Width() -
+ static_cast<tools::Long>( aVars.GetRightTotal() * mnPPTX );
+ bRightAdjusted = true;
+ break;
+ case SvxCellHorJustify::Center:
+ nJustPosX += ( nAvailWidth - aVars.GetTextSize().Width() +
+ static_cast<tools::Long>( aVars.GetLeftTotal() * mnPPTX ) -
+ static_cast<tools::Long>( aVars.GetMargin()->GetRightMargin() * mnPPTX ) ) / 2;
+ break;
+ default:
+ {
+ // added to avoid warnings
+ }
+ }
- Point aURLStart( nJustPosX, nJustPosY ); // copy before modifying for orientation
+ tools::Long nTestClipHeight = aVars.GetTextSize().Height();
+ switch (aVars.GetVerJust())
+ {
+ case SvxCellVerJustify::Top:
+ case SvxCellVerJustify::Block:
+ {
+ tools::Long nTop = static_cast<tools::Long>( aVars.GetMargin()->GetTopMargin() * mnPPTY );
+ nJustPosY += nTop;
+ nTestClipHeight += nTop;
+ }
+ break;
+ case SvxCellVerJustify::Bottom:
+ {
+ tools::Long nBot = static_cast<tools::Long>( aVars.GetMargin()->GetBottomMargin() * mnPPTY );
+ nJustPosY += nOutHeight - aVars.GetTextSize().Height() - nBot;
+ nTestClipHeight += nBot;
+ }
+ break;
+ case SvxCellVerJustify::Center:
+ {
+ tools::Long nTop = static_cast<tools::Long>( aVars.GetMargin()->GetTopMargin() * mnPPTY );
+ tools::Long nBot = static_cast<tools::Long>( aVars.GetMargin()->GetBottomMargin() * mnPPTY );
+ nJustPosY += ( nOutHeight + nTop -
+ aVars.GetTextSize().Height() - nBot ) / 2;
+ nTestClipHeight += std::abs( nTop - nBot );
+ }
+ break;
+ default:
+ {
+ // added to avoid warnings
+ }
+ }
- switch (aVars.GetOrient())
- {
- case SvxCellOrientation::Standard:
- nJustPosY += aVars.GetAscent();
- break;
- case SvxCellOrientation::TopBottom:
- nJustPosX += aVars.GetTextSize().Width() - aVars.GetAscent();
- break;
- case SvxCellOrientation::BottomUp:
- nJustPosY += aVars.GetTextSize().Height();
- nJustPosX += aVars.GetAscent();
- break;
- default:
- {
- // added to avoid warnings
- }
- }
+ if ( nTestClipHeight > nOutHeight )
+ {
+ // no vertical clipping when printing cells with optimal height,
+ // except when font size is from conditional formatting.
+ if ( meType != OUTTYPE_PRINTER ||
+ ( mpDoc->GetRowFlags( nCellY, mnTab ) & CRFlags::ManualSize ) ||
+ ( aVars.HasCondHeight() ) )
+ bVClip = true;
+ }
- // When clipping, the visible part is now completely defined by the alignment,
- // there's no more special handling to show the right part of RTL text.
+ if ( bHClip || bVClip )
+ {
+ // only clip the affected dimension so that not all right-aligned
+ // columns are cut off when performing a non-proportional resize
+ if (!bHClip)
+ {
+ aAreaParam.maClipRect.SetLeft( mnScrX );
+ aAreaParam.maClipRect.SetRight( mnScrX+mnScrW );
+ }
+ if (!bVClip)
+ {
+ aAreaParam.maClipRect.SetTop( mnScrY );
+ aAreaParam.maClipRect.SetBottom( mnScrY+mnScrH );
+ }
- Point aDrawTextPos( nJustPosX, nJustPosY );
- if ( bPixelToLogic )
- {
- // undo text width adjustment in pixels
- if (bRightAdjusted)
- aDrawTextPos.AdjustX(aVars.GetTextSize().Width() );
+ // aClipRect is not used after SetClipRegion/IntersectClipRegion,
+ // so it can be modified here
+ if (bPixelToLogic)
+ aAreaParam.maClipRect = mpRefDevice->PixelToLogic( aAreaParam.maClipRect );
- aDrawTextPos = mpRefDevice->PixelToLogic( aDrawTextPos );
+ if (mbMetaFile)
+ {
+ mpDev->Push();
+ mpDev->IntersectClipRegion( aAreaParam.maClipRect );
+ }
+ else
+ mpDev->SetClipRegion( vcl::Region( aAreaParam.maClipRect ) );
+ }
- // redo text width adjustment in logic units
- if (bRightAdjusted)
- aDrawTextPos.AdjustX( -(aVars.GetOriginalWidth()) );
- }
+ Point aURLStart( nJustPosX, nJustPosY ); // copy before modifying for orientation
- // in Metafiles always use DrawTextArray to ensure that positions are
- // recorded (for non-proportional resize):
+ switch (aVars.GetOrient())
+ {
+ case SvxCellOrientation::Standard:
+ nJustPosY += aVars.GetAscent();
+ break;
+ case SvxCellOrientation::TopBottom:
+ nJustPosX += aVars.GetTextSize().Width() - aVars.GetAscent();
+ break;
+ case SvxCellOrientation::BottomUp:
+ nJustPosY += aVars.GetTextSize().Height();
+ nJustPosX += aVars.GetAscent();
+ break;
+ default:
+ {
+ // added to avoid warnings
+ }
+ }
- const OUString& aString = aVars.GetString();
- if (!aString.isEmpty())
- {
- if (bTaggedPDF)
- {
- if (bReopenRowTag)
- ReopenPDFStructureElement(vcl::pdf::StructElement::TableRow,
- nY);
- else
- {
- sal_Int32 nId = pPDF->EnsureStructureElement(nullptr);
- pPDF->InitStructureElement(
- nId, vcl::pdf::StructElement::TableRow, u"TR"_ustr);
- pPDF->BeginStructureElement(nId);
- pPDF->GetScPDFState()->m_TableRowMap.emplace(nY, nId);
- bReopenRowTag = true;
- }
+ // When clipping, the visible part is now completely defined by the alignment,
+ // there's no more special handling to show the right part of RTL text.
- pPDF->WrapBeginStructureElement(vcl::pdf::StructElement::TableData,
- u"TD"_ustr);
- pPDF->WrapBeginStructureElement(vcl::pdf::StructElement::Paragraph,
- u"P"_ustr);
- }
+ Point aDrawTextPos( nJustPosX, nJustPosY );
+ if ( bPixelToLogic )
+ {
+ // undo text width adjustment in pixels
+ if (bRightAdjusted)
+ aDrawTextPos.AdjustX(aVars.GetTextSize().Width() );
- // If the string is clipped, make it shorter for
- // better performance since drawing by HarfBuzz is
- // quite expensive especially for long string.
+ aDrawTextPos = mpRefDevice->PixelToLogic( aDrawTextPos );
- OUString aShort = aString;
+ // redo text width adjustment in logic units
+ if (bRightAdjusted)
+ aDrawTextPos.AdjustX( -(aVars.GetOriginalWidth()) );
+ }
- // But never fiddle with numeric values.
- // (Which was the cause of tdf#86024).
- // The General automatic format output takes
- // care of this, or fixed width numbers either fit
- // or display as ###.
- if (!bCellIsValue)
- {
- double fVisibleRatio = 1.0;
- double fTextWidth = aVars.GetTextSize().Width();
- sal_Int32 nTextLen = aString.getLength();
- if (eOutHorJust == SvxCellHorJustify::Left && aAreaParam.mnRightClipLength > 0)
- {
- fVisibleRatio = (fTextWidth - aAreaParam.mnRightClipLength) / fTextWidth;
- if (0.0 < fVisibleRatio && fVisibleRatio < 1.0)
- {
- // Only show the left-end segment.
- sal_Int32 nShortLen = fVisibleRatio*nTextLen + 1;
- aShort = aShort.copy(0, nShortLen);
- }
- }
- else if (eOutHorJust == SvxCellHorJustify::Right && aAreaParam.mnLeftClipLength > 0)
- {
- fVisibleRatio = (fTextWidth - aAreaParam.mnLeftClipLength) / fTextWidth;
- if (0.0 < fVisibleRatio && fVisibleRatio < 1.0)
- {
- // Only show the right-end segment.
- sal_Int32 nShortLen = fVisibleRatio*nTextLen + 1;
- aShort = aShort.copy(nTextLen-nShortLen);
-
- // Adjust the text position after shortening of the string.
- double fShortWidth = aVars.GetFmtTextWidth(aShort);
- double fOffset = fTextWidth - fShortWidth;
- aDrawTextPos.Move(fOffset, 0);
- }
- }
- }
+ // in Metafiles always use DrawTextArray to ensure that positions are
+ // recorded (for non-proportional resize):
- if (bMetaFile || pFmtDevice != mpDev || aZoomX != aZoomY)
- {
- size_t nLen = aShort.getLength();
- if (aDX.size() < nLen)
- aDX.resize(nLen, 0);
+ const OUString& aString = aVars.GetString();
+ if (!aString.isEmpty())
+ {
+ if (bTaggedPDF)
+ {
+ if (bReopenRowTag)
+ ReopenPDFStructureElement(vcl::pdf::StructElement::TableRow,
+ nY);
+ else
+ {
+ sal_Int32 nId = pPDF->EnsureStructureElement(nullptr);
+ pPDF->InitStructureElement(
+ nId, vcl::pdf::StructElement::TableRow, u"TR"_ustr);
+ pPDF->BeginStructureElement(nId);
+ pPDF->GetScPDFState()->m_TableRowMap.emplace(nY, nId);
+ bReopenRowTag = true;
+ }
- pFmtDevice->GetTextArray(aShort, &aDX);
+ pPDF->WrapBeginStructureElement(vcl::pdf::StructElement::TableData,
+ u"TD"_ustr);
+ pPDF->WrapBeginStructureElement(vcl::pdf::StructElement::Paragraph,
+ u"P"_ustr);
+ }
- if ( !mpRefDevice->GetConnectMetaFile() ||
- mpRefDevice->GetOutDevType() == OUTDEV_PRINTER )
- {
- double fMul = GetStretch();
- for (size_t i = 0; i < nLen; ++i)
- aDX[i] /= fMul;
- }
+ // If the string is clipped, make it shorter for
+ // better performance since drawing by HarfBuzz is
+ // quite expensive especially for long string.
- mpDev->DrawTextArray(aDrawTextPos, aShort, aDX, {}, 0, nLen);
- }
- else
- {
- mpDev->DrawText(aDrawTextPos, aShort, 0, -1, nullptr, nullptr,
- aVars.GetLayoutGlyphs(aShort));
- }
- if (bTaggedPDF)
- {
- pPDF->EndStructureElement(); // Paragraph
- pPDF->EndStructureElement(); // TableData
- pPDF->EndStructureElement(); // TableRow
- }
- }
+ OUString aShort = aString;
- if ( bHClip || bVClip )
+ // But never fiddle with numeric values.
+ // (Which was the cause of tdf#86024).
+ // The General automatic format output takes
+ // care of this, or fixed width numbers either fit
+ // or display as ###.
+ if (!bCellIsValue)
+ {
+ double fVisibleRatio = 1.0;
+ double fTextWidth = aVars.GetTextSize().Width();
+ sal_Int32 nTextLen = aString.getLength();
+ if (eOutHorJust == SvxCellHorJustify::Left && aAreaParam.mnRightClipLength > 0)
+ {
+ fVisibleRatio = (fTextWidth - aAreaParam.mnRightClipLength) / fTextWidth;
+ if (0.0 < fVisibleRatio && fVisibleRatio < 1.0)
{
- if (bMetaFile)
- mpDev->Pop();
- else
- mpDev->SetClipRegion();
+ // Only show the left-end segment.
+ sal_Int32 nShortLen = fVisibleRatio*nTextLen + 1;
+ aShort = aShort.copy(0, nShortLen);
}
-
- // PDF: whole-cell hyperlink from formula?
- bool bHasURL = pPDF && aCell.getType() == CELLTYPE_FORMULA && aCell.getFormula()->IsHyperLinkCell();
- if (bHasURL)
+ }
+ else if (eOutHorJust == SvxCellHorJustify::Right && aAreaParam.mnLeftClipLength > 0)
+ {
+ fVisibleRatio = (fTextWidth - aAreaParam.mnLeftClipLength) / fTextWidth;
+ if (0.0 < fVisibleRatio && fVisibleRatio < 1.0)
{
- tools::Rectangle aURLRect( aURLStart, aVars.GetTextSize() );
- lcl_DoHyperlinkResult(mpDev, aURLRect, aCell);
+ // Only show the right-end segment.
+ sal_Int32 nShortLen = fVisibleRatio*nTextLen + 1;
+ aShort = aShort.copy(nTextLen-nShortLen);
+
+ // Adjust the text position after shortening of the string.
+ double fShortWidth = aVars.GetFmtTextWidth(aShort);
+ double fOffset = fTextWidth - fShortWidth;
+ aDrawTextPos.Move(fOffset, 0);
}
}
}
- nPosX += pRowInfo[0].basicCellInfo(nX).nWidth * nLayoutSign;
+
+ if (mbMetaFile || pFmtDevice != mpDev || maZoomX != maZoomY)
+ {
+ size_t nLen = aShort.getLength();
+ if (aDX.size() < nLen)
+ aDX.resize(nLen, 0);
+
+ pFmtDevice->GetTextArray(aShort, &aDX);
+
+ if ( !mpRefDevice->GetConnectMetaFile() ||
+ mpRefDevice->GetOutDevType() == OUTDEV_PRINTER )
+ {
+ double fMul = GetStretch();
+ for (size_t i = 0; i < nLen; ++i)
+ aDX[i] /= fMul;
+ }
+
+ mpDev->DrawTextArray(aDrawTextPos, aShort, aDX, {}, 0, nLen);
+ }
+ else
+ {
+ mpDev->DrawText(aDrawTextPos, aShort, 0, -1, nullptr, nullptr,
+ aVars.GetLayoutGlyphs(aShort));
+ }
+ if (bTaggedPDF)
+ {
+ pPDF->EndStructureElement(); // Paragraph
+ pPDF->EndStructureElement(); // TableData
+ pPDF->EndStructureElement(); // TableRow
+ }
+ }
+
+ if ( bHClip || bVClip )
+ {
+ if (mbMetaFile)
+ mpDev->Pop();
+ else
+ mpDev->SetClipRegion();
+ }
+
+ // PDF: whole-cell hyperlink from formula?
+ bool bHasURL = pPDF && aCell.getType() == CELLTYPE_FORMULA && aCell.getFormula()->IsHyperLinkCell();
+ if (bHasURL)
+ {
+ tools::Rectangle aURLRect( aURLStart, aVars.GetTextSize() );
+ lcl_DoHyperlinkResult(mpDev, aURLRect, aCell);
}
}
- nPosY += pRowInfo[nArrY].nHeight;
}
- if (bTaggedPDF)
- pPDF->EndStructureElement(); // Table
-
- if ( bProgress )
- ScProgress::DeleteInterpretProgress();
}
void ScOutputData::SetRefDevice( OutputDevice* pRDev )
@@ -2286,9 +2310,9 @@ void ScOutputData::InitOutputEditEngine()
// a RefDevice always has to be set, otherwise EditEngine would create a VirtualDevice
mxOutputEditEngine->SetRefDevice( pFmtDevice );
EEControlBits nCtrl = mxOutputEditEngine->GetControlWord();
- if ( bShowSpellErrors )
+ if ( mbShowSpellErrors )
nCtrl |= EEControlBits::ONLINESPELLING;
- if ( eType == OUTTYPE_PRINTER )
+ if ( meType == OUTTYPE_PRINTER )
nCtrl &= ~EEControlBits::MARKFIELDS;
else
nCtrl &= ~EEControlBits::MARKURLFIELDS; // URLs not shaded for output
@@ -2302,7 +2326,7 @@ void ScOutputData::InitOutputEditEngine()
}
// we don't track changes to these settings, so we have to apply them every time
mpDoc->ApplyAsianEditSettings( *mxOutputEditEngine );
- mxOutputEditEngine->SetDefaultHorizontalTextDirection( mpDoc->GetEditTextDirection( nTab ) );
+ mxOutputEditEngine->SetDefaultHorizontalTextDirection( mpDoc->GetEditTextDirection( mnTab ) );
}
static void lcl_ClearEdit( EditEngine& rEngine ) // text and attributes
@@ -2886,27 +2910,27 @@ void ScOutputData::DrawEditParam::adjustForHyperlinkInPDF(Point aURLStart, const
// Returns true if the rect is clipped vertically
bool ScOutputData::AdjustAreaParamClipRect(OutputAreaParam& rAreaParam)
{
- if( rAreaParam.maClipRect.Left() < nScrX )
+ if( rAreaParam.maClipRect.Left() < mnScrX )
{
- rAreaParam.maClipRect.SetLeft( nScrX );
+ rAreaParam.maClipRect.SetLeft( mnScrX );
rAreaParam.mbLeftClip = true;
}
- if( rAreaParam.maClipRect.Right() > nScrX + nScrW )
+ if( rAreaParam.maClipRect.Right() > mnScrX + mnScrW )
{
- rAreaParam.maClipRect.SetRight( nScrX + nScrW ); //! minus one?
+ rAreaParam.maClipRect.SetRight( mnScrX + mnScrW ); //! minus one?
rAreaParam.mbRightClip = true;
}
bool bVClip = false;
- if( rAreaParam.maClipRect.Top() < nScrY )
+ if( rAreaParam.maClipRect.Top() < mnScrY )
{
- rAreaParam.maClipRect.SetTop( nScrY );
+ rAreaParam.maClipRect.SetTop( mnScrY );
bVClip = true;
}
- if( rAreaParam.maClipRect.Bottom() > nScrY + nScrH )
+ if( rAreaParam.maClipRect.Bottom() > mnScrY + mnScrH )
{
- rAreaParam.maClipRect.SetBottom( nScrY + nScrH ); //! minus one?
+ rAreaParam.maClipRect.SetBottom( mnScrY + mnScrH ); //! minus one?
bVClip = true;
}
return bVClip;
@@ -3014,16 +3038,16 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
rParam.calcMargins(nTopM, nLeftM, nBottomM, nRightM, mnPPTX, mnPPTY);
SCCOL nXForPos = rParam.mnX;
- if ( nXForPos < nX1 )
+ if ( nXForPos < mnX1 )
{
- nXForPos = nX1;
+ nXForPos = mnX1;
rParam.mnPosX = rParam.mnInitPosX;
}
SCSIZE nArrYForPos = rParam.mnArrY;
if ( nArrYForPos < 1 )
{
nArrYForPos = 1;
- rParam.mnPosY = nScrY;
+ rParam.mnPosY = mnScrY;
}
OutputAreaParam aAreaParam;
@@ -3052,7 +3076,7 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
// use same GetEditArea call as in ScViewData::SetEditEngine
Fraction aFract(1,1);
- tools::Rectangle aUtilRect = ScEditUtil( *mpDoc, rParam.mnCellX, rParam.mnCellY, nTab, Point(0,0), pFmtDevice,
+ tools::Rectangle aUtilRect = ScEditUtil( *mpDoc, rParam.mnCellX, rParam.mnCellY, mnTab, Point(0,0), pFmtDevice,
HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( rParam.mpPattern, false );
aLogicSize.setWidth( aUtilRect.GetWidth() );
}
@@ -3147,11 +3171,11 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
}
}
- if (rParam.mnX >= nX1 && rParam.mbCellIsValue
+ if (rParam.mnX >= mnX1 && rParam.mbCellIsValue
&& (aAreaParam.mbLeftClip || aAreaParam.mbRightClip))
{
SetEngineTextAndGetWidth( rParam, u"###"_ustr, nNeededPixel, ( nLeftM + nRightM ) );
- tools::Long nLayoutSign = bLayoutRTL ? -1 : 1;
+ tools::Long nLayoutSign = mbLayoutRTL ? -1 : 1;
ScCellInfo* pClipMarkCell = &rParam.mpThisRowInfo->cellInfo(rParam.mnX);
SetClipMarks( aAreaParam, pClipMarkCell, eOutHorJust, nLayoutSign );
}
@@ -3190,7 +3214,7 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
nStartX += nLeftM;
}
- bool bOutside = (aAreaParam.maClipRect.Right() < nScrX || aAreaParam.maClipRect.Left() >= nScrX + nScrW);
+ bool bOutside = (aAreaParam.maClipRect.Right() < mnScrX || aAreaParam.maClipRect.Left() >= mnScrX + mnScrW);
if (bOutside)
return;
@@ -3212,8 +3236,8 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
// Don't clip for text height when printing rows with optimal height,
// except when font size is from conditional formatting.
//! Allow clipping when vertically merged?
- if ( eType != OUTTYPE_PRINTER ||
- ( mpDoc->GetRowFlags( rParam.mnCellY, nTab ) & CRFlags::ManualSize ) ||
+ if ( meType != OUTTYPE_PRINTER ||
+ ( mpDoc->GetRowFlags( rParam.mnCellY, mnTab ) & CRFlags::ManualSize ) ||
( rParam.mpCondSet && SfxItemState::SET ==
rParam.mpCondSet->GetItemState(ATTR_FONT_HEIGHT) ) )
bClip = true;
@@ -3227,21 +3251,21 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
// Only with automatic line breaks, to avoid having to find
// the cells with the horizontal end of the text again.
if ( nEngineHeight - aCellSize.Height() > 100 &&
- rParam.mbBreak && bMarkClipped &&
+ rParam.mbBreak && mbMarkClipped &&
( rParam.mpEngine->GetParagraphCount() > 1 || rParam.mpEngine->GetLineCount(0) > 1 ) )
{
ScCellInfo* pClipMarkCell = nullptr;
if ( bMerged )
{
// anywhere in the merged area...
- SCCOL nClipX = ( rParam.mnX < nX1 ) ? nX1 : rParam.mnX;
- pClipMarkCell = &pRowInfo[(rParam.mnArrY != 0) ? rParam.mnArrY : 1].cellInfo(nClipX);
+ SCCOL nClipX = ( rParam.mnX < mnX1 ) ? mnX1 : rParam.mnX;
+ pClipMarkCell = &mpRowInfo[(rParam.mnArrY != 0) ? rParam.mnArrY : 1].cellInfo(nClipX);
}
else
pClipMarkCell = &rParam.mpThisRowInfo->cellInfo(rParam.mnX);
pClipMarkCell->nClipMark |= ScClipMark::Right; //! also allow left?
- bAnyClipped = true;
+ mbAnyClipped = true;
tools::Long nMarkPixel = static_cast<tools::Long>( SC_CLIPMARK_SIZE * mnPPTX );
if ( aAreaParam.maClipRect.Right() - nMarkPixel > aAreaParam.maClipRect.Left() )
@@ -3258,7 +3282,7 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
{ // Clip marks are already handled in GetOutputArea
ClearableClipRegion aClip(rParam.mbPixelToLogic ? mpRefDevice->PixelToLogic(aAreaParam.maClipRect)
- : aAreaParam.maClipRect, bClip, bSimClip, mpDev, bMetaFile);
+ : aAreaParam.maClipRect, bClip, bSimClip, mpDev, mbMetaFile);
Point aLogicStart;
if (rParam.mbPixelToLogic)
@@ -3336,20 +3360,20 @@ void ScOutputData::SetClipMarks( OutputAreaParam &aAreaParam, ScCellInfo* pClipM
if ( eOutHorJust == SvxCellHorJustify::Left )
{
pClipMarkCell->nClipMark |= ScClipMark::Right;
- bAnyClipped = true;
+ mbAnyClipped = true;
aAreaParam.maClipRect.AdjustRight( -( nMarkPixel * nLayoutSign ) );
}
else if ( eOutHorJust == SvxCellHorJustify::Right )
{
pClipMarkCell->nClipMark |= ScClipMark::Left;
- bAnyClipped = true;
+ mbAnyClipped = true;
aAreaParam.maClipRect.AdjustLeft( nMarkPixel * nLayoutSign );
}
else
{
pClipMarkCell->nClipMark |= ScClipMark::Right;
pClipMarkCell->nClipMark |= ScClipMark::Left;
- bAnyClipped = true;
+ mbAnyClipped = true;
aAreaParam.maClipRect.AdjustRight( -( nMarkPixel * nLayoutSign ) );
aAreaParam.maClipRect.AdjustLeft( nMarkPixel * nLayoutSign );
}
@@ -3365,7 +3389,7 @@ void ScOutputData::ShowClipMarks( DrawEditParam& rParam, tools::Long nEngineWidt
// with the default right position of the text.
// Only with automatic line breaks, to avoid having to find
// the cells with the horizontal end of the text again.
- if (nEngineWidth - aCellSize.Width() <= 100 || !rParam.mbBreak || !bMarkClipped
+ if (nEngineWidth - aCellSize.Width() <= 100 || !rParam.mbBreak || !mbMarkClipped
|| (rParam.mpEngine->GetParagraphCount() <= 1 && rParam.mpEngine->GetLineCount(0) <= 1))
return;
@@ -3373,14 +3397,14 @@ void ScOutputData::ShowClipMarks( DrawEditParam& rParam, tools::Long nEngineWidt
if (bMerged)
{
// anywhere in the merged area...
- SCCOL nClipX = (rParam.mnX < nX1) ? nX1 : rParam.mnX;
- pClipMarkCell = &pRowInfo[(rParam.mnArrY != 0) ? rParam.mnArrY : 1].cellInfo(nClipX);
+ SCCOL nClipX = (rParam.mnX < mnX1) ? mnX1 : rParam.mnX;
+ pClipMarkCell = &mpRowInfo[(rParam.mnArrY != 0) ? rParam.mnArrY : 1].cellInfo(nClipX);
}
else
pClipMarkCell = &rParam.mpThisRowInfo->cellInfo(rParam.mnX);
- bAnyClipped = true;
- bVertical = true;
+ mbAnyClipped = true;
+ mbVertical = true;
const tools::Long nMarkPixel = static_cast<tools::Long>(SC_CLIPMARK_SIZE * mnPPTX);
if (bTop)
{
@@ -3413,8 +3437,8 @@ ClearableClipRegionPtr ScOutputData::Clip( DrawEditParam& rParam, const Size& aC
// Don't clip for text height when printing rows with optimal height,
// except when font size is from conditional formatting.
//! Allow clipping when vertically merged?
- if ( eType != OUTTYPE_PRINTER ||
- ( mpDoc->GetRowFlags( rParam.mnCellY, nTab ) & CRFlags::ManualSize ) ||
+ if ( meType != OUTTYPE_PRINTER ||
+ ( mpDoc->GetRowFlags( rParam.mnCellY, mnTab ) & CRFlags::ManualSize ) ||
( rParam.mpCondSet && SfxItemState::SET ==
rParam.mpCondSet->GetItemState(ATTR_FONT_HEIGHT) ) )
bClip = true;
@@ -3427,7 +3451,7 @@ ClearableClipRegionPtr ScOutputData::Clip( DrawEditParam& rParam, const Size& aC
// Clip marks are already handled in GetOutputArea
return ClearableClipRegionPtr(new ClearableClipRegion(rParam.mbPixelToLogic ?
mpRefDevice->PixelToLogic(aAreaParam.maClipRect)
- : aAreaParam.maClipRect, bClip, bSimClip, mpDev, bMetaFile));
+ : aAreaParam.maClipRect, bClip, bSimClip, mpDev, mbMetaFile));
}
void ScOutputData::DrawEditBottomTop(DrawEditParam& rParam)
@@ -3445,16 +3469,16 @@ void ScOutputData::DrawEditBottomTop(DrawEditParam& rParam)
rParam.calcMargins(nTopM, nLeftM, nBottomM, nRightM, mnPPTX, mnPPTY);
SCCOL nXForPos = rParam.mnX;
- if ( nXForPos < nX1 )
+ if ( nXForPos < mnX1 )
{
- nXForPos = nX1;
+ nXForPos = mnX1;
rParam.mnPosX = rParam.mnInitPosX;
}
SCSIZE nArrYForPos = rParam.mnArrY;
if ( nArrYForPos < 1 )
{
nArrYForPos = 1;
- rParam.mnPosY = nScrY;
+ rParam.mnPosY = mnScrY;
}
OutputAreaParam aAreaParam;
@@ -3591,7 +3615,7 @@ void ScOutputData::DrawEditBottomTop(DrawEditParam& rParam)
nStartX += nLeftM;
}
- const bool bOutside = (aAreaParam.maClipRect.Right() < nScrX || aAreaParam.maClipRect.Left() >= nScrX + nScrW);
+ const bool bOutside = (aAreaParam.maClipRect.Right() < mnScrX || aAreaParam.maClipRect.Left() >= mnScrX + mnScrW);
if (bOutside)
return;
@@ -3688,16 +3712,16 @@ void ScOutputData::DrawEditTopBottom(DrawEditParam& rParam)
rParam.calcMargins(nTopM, nLeftM, nBottomM, nRightM, mnPPTX, mnPPTY);
SCCOL nXForPos = rParam.mnX;
- if ( nXForPos < nX1 )
+ if ( nXForPos < mnX1 )
{
- nXForPos = nX1;
+ nXForPos = mnX1;
rParam.mnPosX = rParam.mnInitPosX;
}
SCSIZE nArrYForPos = rParam.mnArrY;
if ( nArrYForPos < 1 )
{
nArrYForPos = 1;
- rParam.mnPosY = nScrY;
+ rParam.mnPosY = mnScrY;
}
OutputAreaParam aAreaParam;
@@ -3837,7 +3861,7 @@ void ScOutputData::DrawEditTopBottom(DrawEditParam& rParam)
nStartX += nLeftM;
}
- const bool bOutside = (aAreaParam.maClipRect.Right() < nScrX || aAreaParam.maClipRect.Left() >= nScrX + nScrW);
+ const bool bOutside = (aAreaParam.maClipRect.Right() < mnScrX || aAreaParam.maClipRect.Left() >= mnScrX + mnScrW);
if (bOutside)
return;
@@ -3937,16 +3961,16 @@ void ScOutputData::DrawEditStacked(DrawEditParam& rParam)
rParam.calcMargins(nTopM, nLeftM, nBottomM, nRightM, mnPPTX, mnPPTY);
SCCOL nXForPos = rParam.mnX;
- if ( nXForPos < nX1 )
+ if ( nXForPos < mnX1 )
{
- nXForPos = nX1;
+ nXForPos = mnX1;
rParam.mnPosX = rParam.mnInitPosX;
}
SCSIZE nArrYForPos = rParam.mnArrY;
if ( nArrYForPos < 1 )
{
nArrYForPos = 1;
- rParam.mnPosY = nScrY;
+ rParam.mnPosY = mnScrY;
}
OutputAreaParam aAreaParam;
@@ -3973,7 +3997,7 @@ void ScOutputData::DrawEditStacked(DrawEditParam& rParam)
// use same GetEditArea call as in ScViewData::SetEditEngine
Fraction aFract(1,1);
- tools::Rectangle aUtilRect = ScEditUtil( *mpDoc, rParam.mnCellX, rParam.mnCellY, nTab, Point(0,0), pFmtDevice,
+ tools::Rectangle aUtilRect = ScEditUtil( *mpDoc, rParam.mnCellX, rParam.mnCellY, mnTab, Point(0,0), pFmtDevice,
HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( rParam.mpPattern, false );
aLogicSize.setWidth( aUtilRect.GetWidth() );
}
@@ -4027,7 +4051,7 @@ void ScOutputData::DrawEditStacked(DrawEditParam& rParam)
if ( rParam.mbCellIsValue && ( aAreaParam.mbLeftClip || aAreaParam.mbRightClip ) )
{
nEngineWidth = SetEngineTextAndGetWidth( rParam, u"###"_ustr, nNeededPixel, ( nLeftM + nRightM ) );
- tools::Long nLayoutSign = bLayoutRTL ? -1 : 1;
+ tools::Long nLayoutSign = mbLayoutRTL ? -1 : 1;
ScCellInfo* pClipMarkCell = &rParam.mpThisRowInfo->cellInfo(rParam.mnX);
SetClipMarks( aAreaParam, pClipMarkCell, eOutHorJust, nLayoutSign );
}
@@ -4066,7 +4090,7 @@ void ScOutputData::DrawEditStacked(DrawEditParam& rParam)
nStartX += nLeftM;
}
- bool bOutside = (aAreaParam.maClipRect.Right() < nScrX || aAreaParam.maClipRect.Left() >= nScrX + nScrW);
+ bool bOutside = (aAreaParam.maClipRect.Right() < mnScrX || aAreaParam.maClipRect.Left() >= mnScrX + mnScrW);
if (bOutside)
return;
@@ -4088,8 +4112,8 @@ void ScOutputData::DrawEditStacked(DrawEditParam& rParam)
// Don't clip for text height when printing rows with optimal height,
// except when font size is from conditional formatting.
//! Allow clipping when vertically merged?
- if ( eType != OUTTYPE_PRINTER ||
- ( mpDoc->GetRowFlags( rParam.mnCellY, nTab ) & CRFlags::ManualSize ) ||
+ if ( meType != OUTTYPE_PRINTER ||
+ ( mpDoc->GetRowFlags( rParam.mnCellY, mnTab ) & CRFlags::ManualSize ) ||
( rParam.mpCondSet && SfxItemState::SET ==
rParam.mpCondSet->GetItemState(ATTR_FONT_HEIGHT) ) )
bClip = true;
@@ -4103,21 +4127,21 @@ void ScOutputData::DrawEditStacked(DrawEditParam& rParam)
// Only with automatic line breaks, to avoid having to find
// the cells with the horizontal end of the text again.
if ( nEngineHeight - aCellSize.Height() > 100 &&
- rParam.mbBreak && bMarkClipped &&
+ rParam.mbBreak && mbMarkClipped &&
( rParam.mpEngine->GetParagraphCount() > 1 || rParam.mpEngine->GetLineCount(0) > 1 ) )
{
ScCellInfo* pClipMarkCell = nullptr;
if ( bMerged )
{
// anywhere in the merged area...
- SCCOL nClipX = ( rParam.mnX < nX1 ) ? nX1 : rParam.mnX;
- pClipMarkCell = &pRowInfo[(rParam.mnArrY != 0) ? rParam.mnArrY : 1].cellInfo(nClipX);
+ SCCOL nClipX = ( rParam.mnX < mnX1 ) ? mnX1 : rParam.mnX;
+ pClipMarkCell = &mpRowInfo[(rParam.mnArrY != 0) ? rParam.mnArrY : 1].cellInfo(nClipX);
}
else
pClipMarkCell = &rParam.mpThisRowInfo->cellInfo(rParam.mnX);
pClipMarkCell->nClipMark |= ScClipMark::Right; //! also allow left?
- bAnyClipped = true;
+ mbAnyClipped = true;
tools::Long nMarkPixel = static_cast<tools::Long>( SC_CLIPMARK_SIZE * mnPPTX );
if ( aAreaParam.maClipRect.Right() - nMarkPixel > aAreaParam.maClipRect.Left() )
@@ -4129,7 +4153,7 @@ void ScOutputData::DrawEditStacked(DrawEditParam& rParam)
{ // Clip marks are already handled in GetOutputArea
ClearableClipRegion aClip(rParam.mbPixelToLogic ? mpRefDevice->PixelToLogic(aAreaParam.maClipRect)
- : aAreaParam.maClipRect, bClip, bSimClip, mpDev, bMetaFile);
+ : aAreaParam.maClipRect, bClip, bSimClip, mpDev, mbMetaFile);
Point aLogicStart;
if (rParam.mbPixelToLogic)
@@ -4233,16 +4257,16 @@ void ScOutputData::DrawEditAsianVertical(DrawEditParam& rParam)
rParam.calcMargins(nTopM, nLeftM, nBottomM, nRightM, mnPPTX, mnPPTY);
SCCOL nXForPos = rParam.mnX;
- if ( nXForPos < nX1 )
+ if ( nXForPos < mnX1 )
{
- nXForPos = nX1;
+ nXForPos = mnX1;
rParam.mnPosX = rParam.mnInitPosX;
}
SCSIZE nArrYForPos = rParam.mnArrY;
if ( nArrYForPos < 1 )
{
nArrYForPos = 1;
- rParam.mnPosY = nScrY;
+ rParam.mnPosY = mnScrY;
}
OutputAreaParam aAreaParam;
@@ -4269,7 +4293,7 @@ void ScOutputData::DrawEditAsianVertical(DrawEditParam& rParam)
// use same GetEditArea call as in ScViewData::SetEditEngine
Fraction aFract(1,1);
- tools::Rectangle aUtilRect = ScEditUtil( *mpDoc, rParam.mnCellX, rParam.mnCellY, nTab, Point(0,0), pFmtDevice,
+ tools::Rectangle aUtilRect = ScEditUtil( *mpDoc, rParam.mnCellX, rParam.mnCellY, mnTab, Point(0,0), pFmtDevice,
HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( rParam.mpPattern, false );
aLogicSize.setWidth( aUtilRect.GetWidth() );
}
@@ -4327,7 +4351,7 @@ void ScOutputData::DrawEditAsianVertical(DrawEditParam& rParam)
if ( rParam.mbCellIsValue && ( aAreaParam.mbLeftClip || aAreaParam.mbRightClip ) )
{
nEngineWidth = SetEngineTextAndGetWidth( rParam, u"###"_ustr, nNeededPixel, ( nLeftM + nRightM ) );
- tools::Long nLayoutSign = bLayoutRTL ? -1 : 1;
+ tools::Long nLayoutSign = mbLayoutRTL ? -1 : 1;
ScCellInfo* pClipMarkCell = &rParam.mpThisRowInfo->cellInfo(rParam.mnX);
SetClipMarks( aAreaParam, pClipMarkCell, eOutHorJust, nLayoutSign );
}
@@ -4353,7 +4377,7 @@ void ScOutputData::DrawEditAsianVertical(DrawEditParam& rParam)
nStartX += nLeftM;
- bool bOutside = (aAreaParam.maClipRect.Right() < nScrX || aAreaParam.maClipRect.Left() >= nScrX + nScrW);
+ bool bOutside = (aAreaParam.maClipRect.Right() < mnScrX || aAreaParam.maClipRect.Left() >= mnScrX + mnScrW);
if (bOutside)
return;
@@ -4375,8 +4399,8 @@ void ScOutputData::DrawEditAsianVertical(DrawEditParam& rParam)
// Don't clip for text height when printing rows with optimal height,
// except when font size is from conditional formatting.
//! Allow clipping when vertically merged?
- if ( eType != OUTTYPE_PRINTER ||
- ( mpDoc->GetRowFlags( rParam.mnCellY, nTab ) & CRFlags::ManualSize ) ||
+ if ( meType != OUTTYPE_PRINTER ||
+ ( mpDoc->GetRowFlags( rParam.mnCellY, mnTab ) & CRFlags::ManualSize ) ||
( rParam.mpCondSet && SfxItemState::SET ==
rParam.mpCondSet->GetItemState(ATTR_FONT_HEIGHT) ) )
bClip = true;
@@ -4391,21 +4415,21 @@ void ScOutputData::DrawEditAsianVertical(DrawEditParam& rParam)
// the cells with the horizontal end of the text again.
if ( nEngineHeight - aCellSize.Height() > 100 &&
( rParam.mbBreak || rParam.meOrient == SvxCellOrientation::Stacked ) &&
- !rParam.mbAsianVertical && bMarkClipped &&
+ !rParam.mbAsianVertical && mbMarkClipped &&
( rParam.mpEngine->GetParagraphCount() > 1 || rParam.mpEngine->GetLineCount(0) > 1 ) )
{
ScCellInfo* pClipMarkCell = nullptr;
if ( bMerged )
{
// anywhere in the merged area...
- SCCOL nClipX = ( rParam.mnX < nX1 ) ? nX1 : rParam.mnX;
- pClipMarkCell = &pRowInfo[(rParam.mnArrY != 0) ? rParam.mnArrY : 1].cellInfo(nClipX);
+ SCCOL nClipX = ( rParam.mnX < mnX1 ) ? mnX1 : rParam.mnX;
+ pClipMarkCell = &mpRowInfo[(rParam.mnArrY != 0) ? rParam.mnArrY : 1].cellInfo(nClipX);
}
else
pClipMarkCell = &rParam.mpThisRowInfo->cellInfo(rParam.mnX);
pClipMarkCell->nClipMark |= ScClipMark::Right; //! also allow left?
- bAnyClipped = true;
+ mbAnyClipped = true;
tools::Long nMarkPixel = static_cast<tools::Long>( SC_CLIPMARK_SIZE * mnPPTX );
if ( aAreaParam.maClipRect.Right() - nMarkPixel > aAreaParam.maClipRect.Left() )
@@ -4417,7 +4441,7 @@ void ScOutputData::DrawEditAsianVertical(DrawEditParam& rParam)
{ // Clip marks are already handled in GetOutputArea
ClearableClipRegion aClip(rParam.mbPixelToLogic ? mpRefDevice->PixelToLogic(aAreaParam.maClipRect)
- : aAreaParam.maClipRect, bClip, bSimClip, mpDev, bMetaFile);
+ : aAreaParam.maClipRect, bClip, bSimClip, mpDev, mbMetaFile);
Point aLogicStart;
if (rParam.mbPixelToLogic)
@@ -4472,34 +4496,34 @@ void ScOutputData::DrawEdit(bool bPixelToLogic)
const SfxItemSet* pOldPreviewFontSet = nullptr;
ScRefCellValue aCell;
- tools::Long nInitPosX = nScrX;
- if ( bLayoutRTL )
+ tools::Long nInitPosX = mnScrX;
+ if ( mbLayoutRTL )
{
- nInitPosX += nMirrorW - 1;
+ nInitPosX += mnMirrorW - 1;
}
- tools::Long nLayoutSign = bLayoutRTL ? -1 : 1;
+ tools::Long nLayoutSign = mbLayoutRTL ? -1 : 1;
SCCOL nLastContentCol = mpDoc->MaxCol();
- if ( nX2 < mpDoc->MaxCol() )
+ if ( mnX2 < mpDoc->MaxCol() )
{
SCROW nEndRow;
- mpDoc->GetCellArea(nTab, nLastContentCol, nEndRow);
+ mpDoc->GetCellArea(mnTab, nLastContentCol, nEndRow);
}
- tools::Long nRowPosY = nScrY;
- for (SCSIZE nArrY=0; nArrY+1<nArrCount; nArrY++) // 0 of the rest of the merged
+ tools::Long nRowPosY = mnScrY;
+ for (SCSIZE nArrY=0; nArrY+1<mnArrCount; nArrY++) // 0 of the rest of the merged
{
- RowInfo* pThisRowInfo = &pRowInfo[nArrY];
+ RowInfo* pThisRowInfo = &mpRowInfo[nArrY];
- if (nArrY==1) nRowPosY = nScrY; // positions before are calculated individually
+ if (nArrY==1) nRowPosY = mnScrY; // positions before are calculated individually
if ( pThisRowInfo->bChanged || nArrY==0 )
{
tools::Long nPosX = 0;
- for (SCCOL nX=0; nX<=nX2; nX++) // due to overflow
+ for (SCCOL nX=0; nX<=mnX2; nX++) // due to overflow
{
std::unique_ptr< ScPatternAttr > pPreviewPattr;
- if (nX==nX1) nPosX = nInitPosX; // positions before nX1 are calculated individually
+ if (nX==mnX1) nPosX = nInitPosX; // positions before mnX1 are calculated individually
if (pThisRowInfo->basicCellInfo(nX).bEditEngine)
{
@@ -4514,13 +4538,13 @@ void ScOutputData::DrawEdit(bool bPixelToLogic)
bool bDoCell = false;
// if merged cell contains hidden row or column or both
- const ScMergeFlagAttr* pMergeFlag = mpDoc->GetAttr(nX, nY, nTab, ATTR_MERGE_FLAG);
+ const ScMergeFlagAttr* pMergeFlag = mpDoc->GetAttr(nX, nY, mnTab, ATTR_MERGE_FLAG);
bool bOverlapped = (pMergeFlag->IsHorOverlapped() || pMergeFlag->IsVerOverlapped());
tools::Long nPosY = nRowPosY;
if (bOverlapped)
{
- nY = pRowInfo[nArrY].nRowNo;
+ nY = mpRowInfo[nArrY].nRowNo;
SCCOL nOverX; // start of the merged cells
SCROW nOverY;
if (GetMergeOrigin( nX,nY, nArrY, nOverX,nOverY, true ))
@@ -4530,7 +4554,7 @@ void ScOutputData::DrawEdit(bool bPixelToLogic)
bDoCell = true;
}
}
- else if ( nX == nX2 && pThisRowInfo->cellInfo(nX).maCell.isEmpty() )
+ else if ( nX == mnX2 && pThisRowInfo->cellInfo(nX).maCell.isEmpty() )
{
// Rest of a long text further to the right?
@@ -4540,7 +4564,7 @@ void ScOutputData::DrawEdit(bool bPixelToLogic)
if ( nTempX > nX &&
!IsEmptyCellText( pThisRowInfo, nTempX, nY ) &&
- !mpDoc->HasAttrib( nTempX,nY,nTab, nX,nY,nTab, HasAttrFlags::Merged | HasAttrFlags::Overlapped ) )
+ !mpDoc->HasAttrib( nTempX,nY,mnTab, nX,nY,mnTab, HasAttrFlags::Merged | HasAttrFlags::Overlapped ) )
{
nCellX = nTempX;
bDoCell = true;
@@ -4551,15 +4575,15 @@ void ScOutputData::DrawEdit(bool bPixelToLogic)
bDoCell = true;
}
- if ( bDoCell && bEditMode && nCellX == nEditCol && nCellY == nEditRow )
+ if ( bDoCell && mbEditMode && nCellX == mnEditCol && nCellY == mnEditRow )
bDoCell = false;
const ScPatternAttr* pPattern = nullptr;
const SfxItemSet* pCondSet = nullptr;
if (bDoCell)
{
- if ( nCellY == nY && nCellX >= nX1 && nCellX <= nX2 &&
- !mpDoc->ColHidden(nCellX, nTab) )
+ if ( nCellY == nY && nCellX >= mnX1 && nCellX <= mnX2 &&
+ !mpDoc->ColHidden(nCellX, mnTab) )
{
ScCellInfo& rCellInfo = pThisRowInfo->cellInfo(nCellX);
pPattern = rCellInfo.pPatternAttr;
@@ -4568,9 +4592,9 @@ void ScOutputData::DrawEdit(bool bPixelToLogic)
}
else // get from document
{
- pPattern = mpDoc->GetPattern( nCellX, nCellY, nTab );
- pCondSet = mpDoc->GetCondResult( nCellX, nCellY, nTab );
- GetVisibleCell( nCellX, nCellY, nTab, aCell );
+ pPattern = mpDoc->GetPattern( nCellX, nCellY, mnTab );
+ pCondSet = mpDoc->GetCondResult( nCellX, nCellY, mnTab );
+ GetVisibleCell( nCellX, nCellY, mnTab, aCell );
}
if (aCell.isEmpty())
bDoCell = false;
@@ -4579,23 +4603,23 @@ void ScOutputData::DrawEdit(bool bPixelToLogic)
{
if ( mpDoc->GetPreviewCellStyle() )
{
- if ( ScStyleSheet* pPreviewStyle = mpDoc->GetPreviewCellStyle( nCellX, nCellY, nTab ) )
+ if ( ScStyleSheet* pPreviewStyle = mpDoc->GetPreviewCellStyle( nCellX, nCellY, mnTab ) )
{
pPreviewPattr.reset( new ScPatternAttr(*pPattern) );
pPreviewPattr->SetStyleSheet(pPreviewStyle);
pPattern = pPreviewPattr.get();
}
}
- SfxItemSet* pPreviewFontSet = mpDoc->GetPreviewFont( nCellX, nCellY, nTab );
+ SfxItemSet* pPreviewFontSet = mpDoc->GetPreviewFont( nCellX, nCellY, mnTab );
lcl_ClearEdit( *mxOutputEditEngine ); // also calls SetUpdateMode(sal_False)
// fdo#32530: Check if the first character is RTL.
- OUString aStr = mpDoc->GetString(nCellX, nCellY, nTab);
+ OUString aStr = mpDoc->GetString(nCellX, nCellY, mnTab);
DrawEditParam aParam(pPattern, pCondSet, lcl_SafeIsValue(aCell));
- const bool bNumberFormatIsText = lcl_isNumberFormatText( mpDoc, nCellX, nCellY, nTab );
+ const bool bNumberFormatIsText = lcl_isNumberFormatText( mpDoc, nCellX, nCellY, mnTab );
aParam.meHorJustContext = getAlignmentFromContext( aParam.meHorJustAttr,
- aParam.mbCellIsValue, aStr, *pPattern, pCondSet, mpDoc, nTab, bNumberFormatIsText);
+ aParam.mbCellIsValue, aStr, *pPattern, pCondSet, mpDoc, mnTab, bNumberFormatIsText);
aParam.meHorJustResult = (aParam.meHorJustAttr == SvxCellHorJustify::Block) ?
SvxCellHorJustify::Block : aParam.meHorJustContext;
aParam.mbPixelToLogic = bPixelToLogic;
@@ -4647,10 +4671,10 @@ void ScOutputData::DrawEdit(bool bPixelToLogic)
if (bReopenTag)
pPDF->EndStructureElement();
}
- nPosX += pRowInfo[0].basicCellInfo(nX).nWidth * nLayoutSign;
+ nPosX += mpRowInfo[0].basicCellInfo(nX).nWidth * nLayoutSign;
}
}
- nRowPosY += pRowInfo[nArrY].nHeight;
+ nRowPosY += mpRowInfo[nArrY].nHeight;
}
if (mrTabInfo.maArray.HasCellRotation())
@@ -4663,10 +4687,10 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
{
InitOutputEditEngine();
//! store nRotMax
- SCCOL nRotMax = nX2;
- for (SCSIZE nRotY=0; nRotY<nArrCount; nRotY++)
- if (pRowInfo[nRotY].nRotMaxCol != SC_ROTMAX_NONE && pRowInfo[nRotY].nRotMaxCol > nRotMax)
- nRotMax = pRowInfo[nRotY].nRotMaxCol;
+ SCCOL nRotMax = mnX2;
+ for (SCSIZE nRotY=0; nRotY<mnArrCount; nRotY++)
+ if (mpRowInfo[nRotY].nRotMaxCol != SC_ROTMAX_NONE && mpRowInfo[nRotY].nRotMaxCol > nRotMax)
+ nRotMax = mpRowInfo[nRotY].nRotMaxCol;
Color nConfBackColor = GetConfBackgroundColor();
bool bCellContrast = mbUseStyleColor &&
@@ -4679,26 +4703,26 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
const SfxItemSet* pOldCondSet = nullptr;
ScRefCellValue aCell;
- tools::Long nInitPosX = nScrX;
- if ( bLayoutRTL )
+ tools::Long nInitPosX = mnScrX;
+ if ( mbLayoutRTL )
{
- nInitPosX += nMirrorW - 1;
+ nInitPosX += mnMirrorW - 1;
}
- tools::Long nLayoutSign = bLayoutRTL ? -1 : 1;
+ tools::Long nLayoutSign = mbLayoutRTL ? -1 : 1;
- tools::Long nRowPosY = nScrY;
- for (SCSIZE nArrY=0; nArrY+1<nArrCount; nArrY++) // 0 for the rest of the merged
+ tools::Long nRowPosY = mnScrY;
+ for (SCSIZE nArrY=0; nArrY+1<mnArrCount; nArrY++) // 0 for the rest of the merged
{
- RowInfo* pThisRowInfo = &pRowInfo[nArrY];
+ RowInfo* pThisRowInfo = &mpRowInfo[nArrY];
tools::Long nCellHeight = static_cast<tools::Long>(pThisRowInfo->nHeight);
- if (nArrY==1) nRowPosY = nScrY; // positions before are calculated individually
+ if (nArrY==1) nRowPosY = mnScrY; // positions before are calculated individually
if ( ( pThisRowInfo->bChanged || nArrY==0 ) && pThisRowInfo->nRotMaxCol != SC_ROTMAX_NONE )
{
tools::Long nPosX = 0;
for (SCCOL nX=0; nX<=nRotMax; nX++)
{
- if (nX==nX1) nPosX = nInitPosX; // positions before nX1 are calculated individually
+ if (nX==mnX1) nPosX = nInitPosX; // positions before mnX1 are calculated individually
const ScCellInfo* pInfo = &pThisRowInfo->cellInfo(nX);
if ( pInfo->nRotateDir != ScRotateDir::NONE )
@@ -4706,8 +4730,8 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
SCROW nY = pThisRowInfo->nRowNo;
bool bHidden = false;
- if (bEditMode)
- if ( nX == nEditCol && nY == nEditRow )
+ if (mbEditMode)
+ if ( nX == mnEditCol && nY == mnEditRow )
bHidden = true;
if (!bHidden)
@@ -4723,20 +4747,20 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
pCondSet = pInfo->pConditionSet;
if (!pPattern)
{
- pPattern = mpDoc->GetPattern( nX, nY, nTab );
+ pPattern = mpDoc->GetPattern( nX, nY, mnTab );
bFromDoc = true;
}
aCell = pInfo->maCell;
if (bFromDoc)
- pCondSet = mpDoc->GetCondResult( nX, nY, nTab );
+ pCondSet = mpDoc->GetCondResult( nX, nY, mnTab );
- if (aCell.isEmpty() && nX>nX2)
- GetVisibleCell( nX, nY, nTab, aCell );
+ if (aCell.isEmpty() && nX>mnX2)
+ GetVisibleCell( nX, nY, mnTab, aCell );
if (aCell.isEmpty() || IsEmptyCellText(pThisRowInfo, nX, nY))
bHidden = true; // nRotateDir is also set without a cell
- tools::Long nCellWidth = static_cast<tools::Long>(pRowInfo[0].basicCellInfo(nX).nWidth);
+ tools::Long nCellWidth = static_cast<tools::Long>(mpRowInfo[0].basicCellInfo(nX).nWidth);
SvxCellHorJustify eHorJust =
pPattern->GetItem(ATTR_HOR_JUSTIFY, pCondSet).GetValue();
@@ -4752,18 +4776,18 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
tools::Long nStartX = nPosX;
tools::Long nStartY = nPosY;
- if (nX<nX1)
+ if (nX<mnX1)
{
if ((bBreak || eOrient!=SvxCellOrientation::Standard) && !bMerged)
bHidden = true;
else
{
nStartX = nInitPosX;
- SCCOL nCol = nX1;
+ SCCOL nCol = mnX1;
while (nCol > nX)
{
--nCol;
- nStartX -= nLayoutSign * static_cast<tools::Long>(pRowInfo[0].basicCellInfo(nCol).nWidth);
+ nStartX -= nLayoutSign * static_cast<tools::Long>(mpRowInfo[0].basicCellInfo(nCol).nWidth);
}
}
}
@@ -4780,9 +4804,9 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
{
SCCOL nCountX = pMerge->GetColMerge();
for (SCCOL i=1; i<nCountX; i++)
- nOutWidth += mpDoc->GetColWidth(nX+i,nTab) * mnPPTX;
+ nOutWidth += mpDoc->GetColWidth(nX+i,mnTab) * mnPPTX;
SCROW nCountY = pMerge->GetRowMerge();
- nOutHeight += mpDoc->GetScaledRowHeight( nY+1, nY+nCountY-1, nTab, mnPPTY);
+ nOutHeight += mpDoc->GetScaledRowHeight( nY+1, nY+nCountY-1, mnTab, mnPPTY);
}
SvxCellVerJustify eVerJust =
@@ -4896,7 +4920,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
eRotMode = SVX_ROTATE_MODE_STANDARD; // no overflow
}
- if ( bLayoutRTL )
+ if ( mbLayoutRTL )
{
// keep in range [0..36000[
nAttrRotate = Degree100(36000 - nAttrRotate.get());
@@ -5051,7 +5075,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
if (!bHidden)
{
- Size aClipSize( nScrX+nScrW-nStartX, nScrY+nScrH-nStartY );
+ Size aClipSize( mnScrX+mnScrW-nStartX, mnScrY+mnScrH-nStartY );
// go on writing
@@ -5068,7 +5092,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
nGridWidth = aCellSize.Width() +
std::abs(static_cast<tools::Long>( aCellSize.Height() * nCos / nSin ));
bNegative = ( pInfo->nRotateDir == ScRotateDir::Left );
- if ( bLayoutRTL )
+ if ( mbLayoutRTL )
bNegative = !bNegative;
}
@@ -5120,14 +5144,14 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
}
tools::Long nClipStartX = nStartX;
- if (nX<nX1)
+ if (nX<mnX1)
{
//! clipping is not needed when on the left side of the window
- if (nStartX<nScrX)
+ if (nStartX<mnScrX)
{
- tools::Long nDif = nScrX - nStartX;
- nClipStartX = nScrX;
+ tools::Long nDif = mnScrX - nStartX;
+ nClipStartX = mnScrX;
aClipSize.AdjustWidth( -nDif );
}
}
@@ -5143,8 +5167,8 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
if ( nAttrRotate /* && eRotMode != SVX_ROTATE_MODE_STANDARD */ )
{
// only clip rotated output text at the page border
- nClipStartX = nScrX;
- aClipSize.setWidth( nScrW );
+ nClipStartX = mnScrX;
+ aClipSize.setWidth( mnScrW );
}
if (bPixelToLogic)
@@ -5154,7 +5178,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
aAreaParam.maClipRect = tools::Rectangle(Point(nClipStartX, nClipStartY),
aClipSize ); // Scale = 1
- if (bMetaFile)
+ if (mbMetaFile)
{
mpDev->Push();
mpDev->IntersectClipRegion( aAreaParam.maClipRect );
@@ -5170,7 +5194,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
if ( eOrient!=SvxCellOrientation::Standard || !bBreak )
{
tools::Long nAvailWidth = aCellSize.Width();
- if (eType==OUTTYPE_WINDOW &&
+ if (meType==OUTTYPE_WINDOW &&
eOrient!=SvxCellOrientation::Stacked &&
pInfo->bAutoFilter)
{
@@ -5220,7 +5244,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
}
}
- if ( bLayoutRTL )
+ if ( mbLayoutRTL )
{
if (bPixelToLogic)
aLogicStart.AdjustX( -(mpRefDevice->PixelToLogic(
@@ -5318,7 +5342,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
mxOutputEditEngine->DrawText_ToPosition(*mpDev, aLogicStart, nOriVal);
- if (bMetaFile)
+ if (mbMetaFile)
mpDev->Pop();
else
mpDev->SetClipRegion();
@@ -5326,10 +5350,10 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
}
}
}
- nPosX += pRowInfo[0].basicCellInfo(nX).nWidth * nLayoutSign;
+ nPosX += mpRowInfo[0].basicCellInfo(nX).nWidth * nLayoutSign;
}
}
- nRowPosY += pRowInfo[nArrY].nHeight;
+ nRowPosY += mpRowInfo[nArrY].nHeight;
}
}
diff --git a/sc/source/ui/view/output3.cxx b/sc/source/ui/view/output3.cxx
index 1f5311c720de..a50c1c648734 100644
--- a/sc/source/ui/view/output3.cxx
+++ b/sc/source/ui/view/output3.cxx
@@ -42,17 +42,17 @@ Point ScOutputData::PrePrintDrawingLayer(tools::Long nLogStX, tools::Long nLogSt
tools::Rectangle aRect;
SCCOL nCol;
Point aOffset;
- tools::Long nLayoutSign(bLayoutRTL ? -1 : 1);
+ tools::Long nLayoutSign(mbLayoutRTL ? -1 : 1);
- for (nCol=0; nCol<nX1; nCol++)
- aOffset.AdjustX( -(mpDoc->GetColWidth( nCol, nTab ) * nLayoutSign) );
- aOffset.AdjustY( -sal_Int32(mpDoc->GetRowHeight( 0, nY1-1, nTab )) );
+ for (nCol=0; nCol<mnX1; nCol++)
+ aOffset.AdjustX( -(mpDoc->GetColWidth( nCol, mnTab ) * nLayoutSign) );
+ aOffset.AdjustY( -sal_Int32(mpDoc->GetRowHeight( 0, mnY1-1, mnTab )) );
tools::Long nDataWidth = 0;
- for (nCol=nX1; nCol<=nX2; nCol++)
- nDataWidth += mpDoc->GetColWidth( nCol, nTab );
+ for (nCol=mnX1; nCol<=mnX2; nCol++)
+ nDataWidth += mpDoc->GetColWidth( nCol, mnTab );
- if ( bLayoutRTL )
+ if ( mbLayoutRTL )
aOffset.AdjustX(nDataWidth );
aRect.SetLeft( -aOffset.X() );
@@ -64,27 +64,27 @@ Point ScOutputData::PrePrintDrawingLayer(tools::Long nLogStX, tools::Long nLogSt
aMMOffset.setX(o3tl::convert(aMMOffset.X(), o3tl::Length::twip, o3tl::Length::mm100));
aMMOffset.setY(o3tl::convert(aMMOffset.Y(), o3tl::Length::twip, o3tl::Length::mm100));
- if (!bMetaFile)
+ if (!mbMetaFile)
aMMOffset += Point( nLogStX, nLogStY );
- for (nCol=nX1; nCol<=nX2; nCol++)
- aRect.AdjustRight(mpDoc->GetColWidth( nCol, nTab ) );
- aRect.AdjustBottom(mpDoc->GetRowHeight( nY1, nY2, nTab ) );
+ for (nCol=mnX1; nCol<=mnX2; nCol++)
+ aRect.AdjustRight(mpDoc->GetColWidth( nCol, mnTab ) );
+ aRect.AdjustBottom(mpDoc->GetRowHeight( mnY1, mnY2, mnTab ) );
aRect.SetLeft(o3tl::convert(aRect.Left(), o3tl::Length::twip, o3tl::Length::mm100));
aRect.SetTop(o3tl::convert(aRect.Top(), o3tl::Length::twip, o3tl::Length::mm100));
aRect.SetRight(o3tl::convert(aRect.Right(), o3tl::Length::twip, o3tl::Length::mm100));
aRect.SetBottom(o3tl::convert(aRect.Bottom(), o3tl::Length::twip, o3tl::Length::mm100));
- if(pViewShell || pDrawView)
+ if(mpViewShell || mpDrawView)
{
- SdrView* pLocalDrawView = pDrawView ? pDrawView : pViewShell->GetScDrawView();
+ SdrView* pLocalDrawView = mpDrawView ? mpDrawView : mpViewShell->GetScDrawView();
if(pLocalDrawView)
{
// #i76114# MapMode has to be set because BeginDrawLayers uses GetPaintRegion
MapMode aOldMode = mpDev->GetMapMode();
- if (!bMetaFile)
+ if (!mbMetaFile)
mpDev->SetMapMode( MapMode( MapUnit::Map100thMM, aMMOffset, aOldMode.GetScaleX(), aOldMode.GetScaleY() ) );
// #i74769# work with SdrPaintWindow directly
@@ -94,7 +94,7 @@ Point ScOutputData::PrePrintDrawingLayer(tools::Long nLogStX, tools::Long nLogSt
mpTargetPaintWindow = pLocalDrawView->BeginDrawLayers(mpDev, aRectRegion, true);
OSL_ENSURE(mpTargetPaintWindow, "BeginDrawLayers: Got no SdrPaintWindow (!)");
- if (!bMetaFile)
+ if (!mbMetaFile)
mpDev->SetMapMode( aOldMode );
}
}
@@ -109,14 +109,14 @@ void ScOutputData::PostPrintDrawingLayer(const Point& rMMOffset) // #i74768#
// painted with offset
MapMode aOldMode = mpDev->GetMapMode();
- if (!bMetaFile)
+ if (!mbMetaFile)
{
mpDev->SetMapMode( MapMode( MapUnit::Map100thMM, rMMOffset, aOldMode.GetScaleX(), aOldMode.GetScaleY() ) );
}
- if(pViewShell || pDrawView)
+ if(mpViewShell || mpDrawView)
{
- SdrView* pLocalDrawView = pDrawView ? pDrawView : pViewShell->GetScDrawView();
+ SdrView* pLocalDrawView = mpDrawView ? mpDrawView : mpViewShell->GetScDrawView();
if(pLocalDrawView)
{
@@ -127,7 +127,7 @@ void ScOutputData::PostPrintDrawingLayer(const Point& rMMOffset) // #i74768#
}
// #i74768#
- if (!bMetaFile)
+ if (!mbMetaFile)
{
mpDev->SetMapMode( aOldMode );
}
@@ -138,9 +138,9 @@ void ScOutputData::PrintDrawingLayer(SdrLayerID nLayer, const Point& rMMOffset)
{
bool bHideAllDrawingLayer(false);
- if(pViewShell || pDrawView)
+ if(mpViewShell || mpDrawView)
{
- SdrView* pLocalDrawView = pDrawView ? pDrawView : pViewShell->GetScDrawView();
+ SdrView* pLocalDrawView = mpDrawView ? mpDrawView : mpViewShell->GetScDrawView();
if(pLocalDrawView)
{
@@ -156,14 +156,14 @@ void ScOutputData::PrintDrawingLayer(SdrLayerID nLayer, const Point& rMMOffset)
MapMode aOldMode = mpDev->GetMapMode();
- if (!bMetaFile)
+ if (!mbMetaFile)
{
mpDev->SetMapMode( MapMode( MapUnit::Map100thMM, rMMOffset, aOldMode.GetScaleX(), aOldMode.GetScaleY() ) );
}
DrawSelectiveObjects( nLayer );
- if (!bMetaFile)
+ if (!mbMetaFile)
{
mpDev->SetMapMode( aOldMode );
}
@@ -181,7 +181,7 @@ void ScOutputData::DrawSelectiveObjects(SdrLayerID nLayer)
SdrOutliner& rOutl = pModel->GetDrawOutliner();
rOutl.EnableAutoColor( mbUseStyleColor );
rOutl.SetDefaultHorizontalTextDirection(
- mpDoc->GetEditTextDirection( nTab ) );
+ mpDoc->GetEditTextDirection( mnTab ) );
Color aOldOutlinerBackgroundColor = rOutl.GetBackgroundColor();
const ScTabViewShell* pTabViewShellBg = mbUseStyleColor ? ScTabViewShell::GetActiveViewShell() : nullptr;
if (pTabViewShellBg)
@@ -208,9 +208,9 @@ void ScOutputData::DrawSelectiveObjects(SdrLayerID nLayer)
DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient );
}
- if(pViewShell || pDrawView)
+ if(mpViewShell || mpDrawView)
{
- SdrView* pLocalDrawView = pDrawView ? pDrawView : pViewShell->GetScDrawView();
+ SdrView* pLocalDrawView = mpDrawView ? mpDrawView : mpViewShell->GetScDrawView();
if(pLocalDrawView)
{
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index ae18b997cd91..081050d01e6f 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -1515,7 +1515,7 @@ void ScPreview::LoseFocus()
Window::LoseFocus();
}
-css::uno::Reference<css::accessibility::XAccessible> ScPreview::CreateAccessible()
+rtl::Reference<comphelper::OAccessible> ScPreview::CreateAccessible()
{
rtl::Reference<ScAccessibleDocumentPagePreview> pAccessible =
new ScAccessibleDocumentPagePreview(GetAccessibleParent(), pViewShell );
diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx
index 6b87175c7987..670091f46401 100644
--- a/sc/source/ui/view/spelleng.cxx
+++ b/sc/source/ui/view/spelleng.cxx
@@ -126,7 +126,7 @@ bool ScConversionEngineBase::FindNextConversionCell()
if (!bSimpleString || eCellType == CELLTYPE_EDIT)
{
std::unique_ptr<EditTextObject> pEditObj(CreateTextObject());
- mrDoc.SetEditText(aPos, *pEditObj, GetEditTextObjectPool());
+ mrDoc.SetEditText(aPos, *pEditObj, GetItemPool());
}
else
{
@@ -141,7 +141,7 @@ bool ScConversionEngineBase::FindNextConversionCell()
else
pNewAttr = new ScPatternAttr(mrDoc.getCellAttributeHelper());
- pNewAttr->GetItemSet().Put(SvxLanguageItem(aLang.nLang, ATTR_FONT_LANGUAGE));
+ pNewAttr->ItemSetPut(SvxLanguageItem(aLang.nLang, ATTR_FONT_LANGUAGE));
mrDoc.SetPattern(aPos, CellAttributeHolder(pNewAttr, true));
}
diff --git a/sc/source/ui/view/tabsplit.cxx b/sc/source/ui/view/tabsplit.cxx
index 95fef3d1acf6..f74bde7c17ff 100644
--- a/sc/source/ui/view/tabsplit.cxx
+++ b/sc/source/ui/view/tabsplit.cxx
@@ -55,7 +55,7 @@ void ScTabSplitter::SetFixed(bool bSet)
void ScTabSplitter::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect )
{
- rRenderContext.Push(vcl::PushFlags::FILLCOLOR | vcl::PushFlags::LINECOLOR);
+ auto popIt = rRenderContext.ScopedPush(vcl::PushFlags::FILLCOLOR | vcl::PushFlags::LINECOLOR);
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
if (IsHorizontal())
@@ -120,8 +120,6 @@ void ScTabSplitter::Paint( vcl::RenderContext& rRenderContext, const tools::Rect
break;
}
}
-
- rRenderContext.Pop();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index e28993653fee..d24f950a6394 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -1772,7 +1772,6 @@ void ScTabView::DoHSplit(tools::Long nSplitPos)
}
else
{
- // coverity[ tainted_data_return : FALSE ] version 2023.12.2
SCCOL nOldDelta = aViewData.GetPosX( SC_SPLIT_LEFT );
tools::Long nLeftWidth = nSplitPos - pRowBar[SC_SPLIT_BOTTOM]->GetSizePixel().Width();
if ( nLeftWidth < 0 ) nLeftWidth = 0;
@@ -1839,10 +1838,7 @@ void ScTabView::DoVSplit(tools::Long nSplitPos)
else
{
if ( aOldMode == SC_SPLIT_NONE )
- {
- // coverity[ tainted_data_return : FALSE ] version 2023.12.2
nOldDelta = aViewData.GetPosY( SC_SPLIT_BOTTOM );
- }
else
nOldDelta = aViewData.GetPosY( SC_SPLIT_TOP );
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 4509f7dc31a8..566a1f4be261 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -30,6 +30,7 @@
#include <sfx2/lokhelper.hxx>
#include <sfx2/viewfrm.hxx>
#include <vcl/cursor.hxx>
+#include <vcl/dndlistenercontainer.hxx>
#include <vcl/uitest/logger.hxx>
#include <vcl/uitest/eventdescription.hxx>
#include <sal/log.hxx>
@@ -1896,6 +1897,9 @@ void ScTabView::SelectTabPage( const sal_uInt16 nTab )
void ScTabView::SetTabNo( SCTAB nTab, bool bNew, bool bExtendSelection, bool bSameTabButMoved )
{
+ ScTabViewShell* pViewShell = aViewData.GetViewShell();
+ pViewShell->SetTabChangeInProgress(true);
+
if ( !ValidTab(nTab) )
{
OSL_FAIL("SetTabNo: invalid sheet");
@@ -2097,7 +2101,6 @@ void ScTabView::SetTabNo( SCTAB nTab, bool bNew, bool bExtendSelection, bool bSa
// disable invalidations for kit during tab switching
{
- ScTabViewShell* pViewShell = aViewData.GetViewShell();
SfxLokCallbackInterface* pCallback = pViewShell->getLibreOfficeKitViewCallback();
pViewShell->setLibreOfficeKitViewCallback(nullptr);
comphelper::ScopeGuard aOutputGuard(
@@ -2140,6 +2143,7 @@ void ScTabView::SetTabNo( SCTAB nTab, bool bNew, bool bExtendSelection, bool bSa
}
OnLibreOfficeKitTabChanged();
+ pViewShell->SetTabChangeInProgress(false);
}
void ScTabView::AddWindowToForeignEditView(SfxViewShell* pViewShell, ScSplitPos eWhich)
diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index 3aa9ff0a101d..fab217cf4fc3 100644
--- a/sc/source/ui/view/tabvwsh2.cxx
+++ b/sc/source/ui/view/tabvwsh2.cxx
@@ -232,6 +232,34 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
case SID_DRAW_RECT:
case SID_DRAW_ELLIPSE:
case SID_DRAW_MEASURELINE:
+ case SID_TOOL_CONNECTOR:
+ case SID_CONNECTOR_ARROW_START:
+ case SID_CONNECTOR_ARROW_END:
+ case SID_CONNECTOR_ARROWS:
+ case SID_CONNECTOR_CIRCLE_START:
+ case SID_CONNECTOR_CIRCLE_END:
+ case SID_CONNECTOR_CIRCLES:
+ case SID_CONNECTOR_LINE:
+ case SID_CONNECTOR_LINE_ARROW_START:
+ case SID_CONNECTOR_LINE_ARROW_END:
+ case SID_CONNECTOR_LINE_ARROWS:
+ case SID_CONNECTOR_LINE_CIRCLE_START:
+ case SID_CONNECTOR_LINE_CIRCLE_END:
+ case SID_CONNECTOR_LINE_CIRCLES:
+ case SID_CONNECTOR_CURVE:
+ case SID_CONNECTOR_CURVE_ARROW_START:
+ case SID_CONNECTOR_CURVE_ARROW_END:
+ case SID_CONNECTOR_CURVE_ARROWS:
+ case SID_CONNECTOR_CURVE_CIRCLE_START:
+ case SID_CONNECTOR_CURVE_CIRCLE_END:
+ case SID_CONNECTOR_CURVE_CIRCLES:
+ case SID_CONNECTOR_LINES:
+ case SID_CONNECTOR_LINES_ARROW_START:
+ case SID_CONNECTOR_LINES_ARROW_END:
+ case SID_CONNECTOR_LINES_ARROWS:
+ case SID_CONNECTOR_LINES_CIRCLE_START:
+ case SID_CONNECTOR_LINES_CIRCLE_END:
+ case SID_CONNECTOR_LINES_CIRCLES:
pTabView->SetDrawFuncPtr(new FuConstRectangle(*this, pWin, pView, rModel, aNewReq));
bCreateDirectly = comphelper::LibreOfficeKit::isActive();
break;
@@ -431,6 +459,34 @@ void ScTabViewShell::GetDrawState(SfxItemSet &rSet)
case SID_DRAW_TEXT:
case SID_DRAW_TEXT_MARQUEE:
case SID_DRAW_CAPTION:
+ case SID_TOOL_CONNECTOR:
+ case SID_CONNECTOR_ARROW_START:
+ case SID_CONNECTOR_ARROW_END:
+ case SID_CONNECTOR_ARROWS:
+ case SID_CONNECTOR_CIRCLE_START:
+ case SID_CONNECTOR_CIRCLE_END:
+ case SID_CONNECTOR_CIRCLES:
+ case SID_CONNECTOR_LINE:
+ case SID_CONNECTOR_LINE_ARROW_START:
+ case SID_CONNECTOR_LINE_ARROW_END:
+ case SID_CONNECTOR_LINE_ARROWS:
+ case SID_CONNECTOR_LINE_CIRCLE_START:
+ case SID_CONNECTOR_LINE_CIRCLE_END:
+ case SID_CONNECTOR_LINE_CIRCLES:
+ case SID_CONNECTOR_CURVE:
+ case SID_CONNECTOR_CURVE_ARROW_START:
+ case SID_CONNECTOR_CURVE_ARROW_END:
+ case SID_CONNECTOR_CURVE_ARROWS:
+ case SID_CONNECTOR_CURVE_CIRCLE_START:
+ case SID_CONNECTOR_CURVE_CIRCLE_END:
+ case SID_CONNECTOR_CURVE_CIRCLES:
+ case SID_CONNECTOR_LINES:
+ case SID_CONNECTOR_LINES_ARROW_START:
+ case SID_CONNECTOR_LINES_ARROW_END:
+ case SID_CONNECTOR_LINES_ARROWS:
+ case SID_CONNECTOR_LINES_CIRCLE_START:
+ case SID_CONNECTOR_LINES_CIRCLE_END:
+ case SID_CONNECTOR_LINES_CIRCLES:
rSet.Put( SfxBoolItem( nWhich, nDrawSfxId == nWhich ) );
break;
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index 5a4fd2fc700a..c75bd174ac19 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -171,6 +171,77 @@ namespace
}
}
+void ScTabViewShell::ExecGoToTab( SfxRequest& rReq, SfxBindings& rBindings )
+{
+ SCTAB nTab;
+ ScViewData& rViewData = GetViewData();
+ ScDocument& rDoc = rViewData.GetDocument();
+ SCTAB nTabCount = rDoc.GetTableCount();
+ const SfxItemSet* pReqArgs = rReq.GetArgs();
+ sal_uInt16 nSlot = rReq.GetSlot();
+
+ if ( pReqArgs ) // command from Navigator with nTab
+ {
+ // sheet for basic is one-based
+ nTab = static_cast<const SfxUInt16Item&>(pReqArgs->Get(nSlot)).GetValue() - 1;
+ if ( nTab < nTabCount )
+ {
+ SetTabNo( nTab );
+ rBindings.Update( nSlot );
+
+ if( ! rReq.IsAPI() )
+ rReq.Done();
+ }
+ }
+ else // command from Menu: ask for nTab
+ {
+ auto xRequest = std::make_shared<SfxRequest>(rReq);
+ rReq.Ignore();
+
+ ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
+
+ VclPtr<AbstractScGoToTabDlg> pDlg(pFact->CreateScGoToTabDlg(GetFrameWeld()));
+ pDlg->SetDescription(
+ ScResId( STR_DLG_SELECTTABLE_TITLE ),
+ ScResId( STR_DLG_SELECTTABLE_MASK ),
+ ScResId( STR_DLG_SELECTTABLE_LBNAME ),
+ GetStaticInterface()->GetSlot(SID_CURRENTTAB)->GetCommand(), HID_GOTOTABLEMASK, HID_GOTOTABLE );
+
+ // fill all table names and select current tab
+ OUString aTabName;
+ for( nTab = 0; nTab < nTabCount; ++nTab )
+ {
+ if( rDoc.IsVisible( nTab ) )
+ {
+ rDoc.GetName( nTab, aTabName );
+ pDlg->Insert( aTabName, rViewData.GetTabNo() == nTab );
+ }
+ }
+
+ pDlg->StartExecuteAsync([this, nTab, nTabCount, pDlg,
+ xRequest=std::move(xRequest)](sal_Int32 response) {
+ if( response == RET_OK )
+ {
+ auto nTab2 = nTab;
+ if( !GetViewData().GetDocument().GetTable( pDlg->GetSelectedEntry(), nTab2 ) )
+ nTab2 = nTabCount;
+ if ( nTab2 < nTabCount )
+ {
+ SetTabNo( nTab2 );
+
+ if ( !xRequest->IsAPI() )
+ xRequest->Done();
+ }
+ }
+ else
+ {
+ xRequest->Ignore();
+ }
+ pDlg->disposeOnce();
+ });
+ }
+}
+
void ScTabViewShell::FinishProtectTable()
{
TabChanged();
@@ -638,56 +709,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case SID_CURRENTTAB:
{
- SCTAB nTab;
- ScViewData& rViewData = GetViewData();
- ScDocument& rDoc = rViewData.GetDocument();
- SCTAB nTabCount = rDoc.GetTableCount();
- if ( pReqArgs ) // command from Navigator with nTab
- {
- // sheet for basic is one-based
- nTab = static_cast<const SfxUInt16Item&>(pReqArgs->Get(nSlot)).GetValue() - 1;
- }
- else // command from Menu: ask for nTab
- {
- ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
-
- ScopedVclPtr<AbstractScGoToTabDlg> pDlg(pFact->CreateScGoToTabDlg(GetFrameWeld()));
- pDlg->SetDescription(
- ScResId( STR_DLG_SELECTTABLE_TITLE ),
- ScResId( STR_DLG_SELECTTABLE_MASK ),
- ScResId( STR_DLG_SELECTTABLE_LBNAME ),
- GetStaticInterface()->GetSlot(SID_CURRENTTAB)->GetCommand(), HID_GOTOTABLEMASK, HID_GOTOTABLE );
-
- // fill all table names and select current tab
- OUString aTabName;
- for( nTab = 0; nTab < nTabCount; ++nTab )
- {
- if( rDoc.IsVisible( nTab ) )
- {
- rDoc.GetName( nTab, aTabName );
- pDlg->Insert( aTabName, rViewData.GetTabNo() == nTab );
- }
- }
-
- if( pDlg->Execute() == RET_OK )
- {
- if( !rDoc.GetTable( pDlg->GetSelectedEntry(), nTab ) )
- nTab = nTabCount;
- pDlg.disposeAndClear();
- }
- else
- {
- rReq.Ignore();
- }
- }
- if ( nTab < nTabCount )
- {
- SetTabNo( nTab );
- rBindings.Update( nSlot );
-
- if( ! rReq.IsAPI() )
- rReq.Done();
- }
+ ExecGoToTab( rReq, rBindings );
//! otherwise an error ?
}
break;
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 794af32bde73..a2d3cf043e1f 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -2038,6 +2038,7 @@ ScTabViewShell::ScTabViewShell( SfxViewFrame& rViewFrame,
bInDispose(false),
bMoveKeepEdit(false),
nCurRefDlgId(0),
+ bIsTabChangeInProgress(false),
mbInSwitch(false),
m_pDragData(new ScDragData),
m_pScCondFormatDlgData()
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index 4cff2bdcadc2..975a14c13e72 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -332,52 +332,55 @@ std::shared_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogCont
}
case SID_FILTER:
{
+ if (ScDBData* pDBData = GetDBData(false, SC_DB_MAKE, ScGetDBSelection::RowDown))
+ {
+ ScQueryParam aQueryParam;
+ SfxItemSetFixed<SCITEM_QUERYDATA, SCITEM_QUERYDATA> aArgSet( GetPool() );
- ScQueryParam aQueryParam;
- SfxItemSetFixed<SCITEM_QUERYDATA, SCITEM_QUERYDATA> aArgSet( GetPool() );
-
- ScDBData* pDBData = GetDBData(false, SC_DB_MAKE, ScGetDBSelection::RowDown);
- pDBData->ExtendDataArea(rDoc);
- pDBData->ExtendBackColorArea(rDoc);
- pDBData->GetQueryParam( aQueryParam );
+ pDBData->ExtendDataArea(rDoc);
+ pDBData->ExtendBackColorArea(rDoc);
+ pDBData->GetQueryParam( aQueryParam );
- ScRange aArea;
- pDBData->GetArea(aArea);
- MarkRange(aArea, false);
+ ScRange aArea;
+ pDBData->GetArea(aArea);
+ MarkRange(aArea, false);
- aArgSet.Put( ScQueryItem( SCITEM_QUERYDATA, &aQueryParam ) );
+ aArgSet.Put( ScQueryItem( SCITEM_QUERYDATA, &aQueryParam ) );
- // mark current sheet (due to RefInput in dialog)
- GetViewData().SetRefTabNo( GetViewData().GetTabNo() );
+ // mark current sheet (due to RefInput in dialog)
+ GetViewData().SetRefTabNo( GetViewData().GetTabNo() );
- xResult = std::make_shared<ScFilterDlg>(pB, pCW, pParent, GetViewData(), aArgSet);
+ xResult = std::make_shared<ScFilterDlg>(pB, pCW, pParent, GetViewData(), aArgSet);
+ }
break;
}
case SID_SPECIAL_FILTER:
{
- ScQueryParam aQueryParam;
- SfxItemSetFixed<SCITEM_QUERYDATA,
- SCITEM_QUERYDATA> aArgSet( GetPool() );
+ if (ScDBData* pDBData = GetDBData(false, SC_DB_MAKE, ScGetDBSelection::RowDown))
+ {
+ ScQueryParam aQueryParam;
+ SfxItemSetFixed<SCITEM_QUERYDATA,
+ SCITEM_QUERYDATA> aArgSet( GetPool() );
- ScDBData* pDBData = GetDBData(false, SC_DB_MAKE, ScGetDBSelection::RowDown);
- pDBData->ExtendDataArea(rDoc);
- pDBData->GetQueryParam( aQueryParam );
+ pDBData->ExtendDataArea(rDoc);
+ pDBData->GetQueryParam( aQueryParam );
- ScRange aArea;
- pDBData->GetArea(aArea);
- MarkRange(aArea, false);
+ ScRange aArea;
+ pDBData->GetArea(aArea);
+ MarkRange(aArea, false);
- ScQueryItem aItem( SCITEM_QUERYDATA, &aQueryParam );
- ScRange aAdvSource;
- if (pDBData->GetAdvancedQuerySource(aAdvSource))
- aItem.SetAdvancedQuerySource( &aAdvSource );
+ ScQueryItem aItem( SCITEM_QUERYDATA, &aQueryParam );
+ ScRange aAdvSource;
+ if (pDBData->GetAdvancedQuerySource(aAdvSource))
+ aItem.SetAdvancedQuerySource( &aAdvSource );
- aArgSet.Put( aItem );
+ aArgSet.Put( aItem );
- // mark current sheet (due to RefInput in dialog)
- GetViewData().SetRefTabNo( GetViewData().GetTabNo() );
+ // mark current sheet (due to RefInput in dialog)
+ GetViewData().SetRefTabNo( GetViewData().GetTabNo() );
- xResult = std::make_shared<ScSpecialFilterDlg>(pB, pCW, pParent, GetViewData(), aArgSet);
+ xResult = std::make_shared<ScSpecialFilterDlg>(pB, pCW, pParent, GetViewData(), aArgSet);
+ }
break;
}
case SID_OPENDLG_OPTSOLVER:
@@ -418,7 +421,7 @@ std::shared_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogCont
if (!isLOKMobilePhone())
{
// dialog checks, what is in the cell
- xResult = o3tl::make_shared<ScFormulaDlg>(pB, pCW, pParent, GetViewData(), ScGlobal::GetStarCalcFunctionMgr());
+ xResult = std::make_shared<ScFormulaDlg>(pB, pCW, pParent, GetViewData(), ScGlobal::GetStarCalcFunctionMgr());
}
break;
}
@@ -473,7 +476,7 @@ void ScTabViewShell::afterCallbackRegistered()
}
SfxObjectShell* pDocShell = GetObjectShell();
- if (pDocShell)
+ if (pDocShell && !IsTabChangeInProgress())
{
std::shared_ptr<model::ColorSet> pThemeColors = pDocShell->GetThemeColors();
std::set<Color> aDocumentColors = pDocShell->GetDocColors();
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index 1d6102fc78e6..3f7b1cdeb44c 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -56,7 +56,6 @@
#include <vector>
-using std::unique_ptr;
using namespace com::sun::star;
void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 7fa3e8f0f6ea..a00ba92a0036 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -64,6 +64,7 @@
#include <comphelper/flagguard.hxx>
#include <comphelper/lok.hxx>
#include <comphelper/processfactory.hxx>
+#include <comphelper/SetFlagContextHelper.hxx>
#include <comphelper/string.hxx>
#include <vcl/uitest/logger.hxx>
@@ -594,6 +595,11 @@ void ScViewDataTable::WriteUserDataSequence(uno::Sequence <beans::PropertyValue>
sal_Int32 nPageZoomValue = tools::Long(aPageZoomY * 100);
pSettings[SC_TABLE_ZOOM_TYPE].Name = SC_ZOOMTYPE;
pSettings[SC_TABLE_ZOOM_TYPE].Value <<= sal_Int16(eZoomType);
+
+ const std::optional<sal_uInt16>& oExportZoom = rViewData.GetExportZoom();
+ if (oExportZoom && comphelper::IsContextFlagActive(u"IsLOKExport"_ustr))
+ nZoomValue = *oExportZoom;
+
pSettings[SC_TABLE_ZOOM_VALUE].Name = SC_ZOOMVALUE;
pSettings[SC_TABLE_ZOOM_VALUE].Value <<= nZoomValue;
pSettings[SC_TABLE_PAGE_VIEW_ZOOM_VALUE].Name = SC_PAGEVIEWZOOMVALUE;
@@ -3561,6 +3567,7 @@ void ScViewData::WriteExtOptions( ScExtDocOptions& rDocOpt ) const
rTabSett.mbPageMode = bPagebreak;
rTabSett.mnNormalZoom = static_cast< tools::Long >( pViewTab->aZoomY * Fraction( 100.0 ) );
rTabSett.mnPageZoom = static_cast< tools::Long >( pViewTab->aPageZoomY * Fraction( 100.0 ) );
+ rTabSett.moExportZoom = GetExportZoom();
}
}
}
@@ -3777,6 +3784,10 @@ void ScViewData::WriteUserDataSequence(uno::Sequence <beans::PropertyValue>& rSe
sal_Int32 nPageZoomValue = tools::Long(pThisTab->aPageZoomY * 100);
pSettings[SC_ZOOM_TYPE].Name = SC_ZOOMTYPE;
pSettings[SC_ZOOM_TYPE].Value <<= sal_Int16(pThisTab->eZoomType);
+
+ if (oExportZoom && comphelper::IsContextFlagActive(u"IsLOKExport"_ustr))
+ nZoomValue = *oExportZoom;
+
pSettings[SC_ZOOM_VALUE].Name = SC_ZOOMVALUE;
pSettings[SC_ZOOM_VALUE].Value <<= nZoomValue;
pSettings[SC_PAGE_VIEW_ZOOM_VALUE].Name = SC_PAGEVIEWZOOMVALUE;
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 36b62e31d599..64a3d0e284cf 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -110,9 +110,6 @@ void collectUIInformation(std::map<OUString, OUString>&& aParameters, const OUSt
}
}
-using ::std::vector;
-using ::std::unique_ptr;
-
bool ScViewFunc::AdjustBlockHeight( bool bPaint, ScMarkData* pMarkData )
{
ScDocShell& rDocSh = GetViewData().GetDocShell();
@@ -940,7 +937,7 @@ void ScViewFunc::EnterBlock( const OUString& rString, const EditTextObject* pDat
else if ( pData )
{
// A copy of pData will be stored.
- pInsDoc->SetEditText(aPos, *pData, rDoc.GetEditTextObjectPool());
+ pInsDoc->SetEditText(aPos, *pData, rDoc.GetEditEnginePool());
}
else
pInsDoc->SetString( nCol, nRow, nTab, aNewStr );
@@ -958,7 +955,7 @@ void ScViewFunc::EnterBlock( const OUString& rString, const EditTextObject* pDat
// MarkData was already MarkToSimple'ed in PasteFromClip
const ScRange& aRange = rMark.GetMarkArea();
ScPatternAttr aPattern(rDoc.getCellAttributeHelper());
- aPattern.GetItemSet().Put( *pItem );
+ aPattern.ItemSetPut(*pItem);
SvNumFormatType nNewType = rDoc.GetFormatTable()->GetType( pItem->GetValue() );
rDoc.ApplyPatternIfNumberformatIncompatible( aRange, rMark,
aPattern, nNewType );
@@ -2390,8 +2387,8 @@ void ScViewFunc::ExtendScenario()
ScDocument& rDoc = GetViewData().GetDocument();
ScPatternAttr aPattern(rDoc.getCellAttributeHelper());
- aPattern.GetItemSet().Put( ScMergeFlagAttr( ScMF::Scenario ) );
- aPattern.GetItemSet().Put( ScProtectionAttr( true ) );
+ aPattern.ItemSetPut(ScMergeFlagAttr(ScMF::Scenario));
+ aPattern.ItemSetPut(ScProtectionAttr(true));
ApplySelectionPattern(aPattern);
}
@@ -2549,7 +2546,7 @@ void ScViewFunc::DeleteTables( const SCTAB nTab, SCTAB nSheets )
pSfxApp->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) );
}
-bool ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, bool bRecord )
+bool ScViewFunc::DeleteTables(const std::vector<SCTAB> &TheTabs, bool bRecord )
{
ScDocShell& rDocSh = GetViewData().GetDocShell();
ScDocument& rDoc = rDocSh.GetDocument();
@@ -2927,7 +2924,7 @@ void ScViewFunc::MoveTable(sal_uInt16 nDestDocNo, SCTAB nDestTab, bool bCopy,
SCTAB nTabCount = rDoc.GetTableCount();
SCTAB nTabSelCount = rMark.GetSelectCount();
- vector<SCTAB> TheTabs;
+ std::vector<SCTAB> TheTabs;
for(SCTAB i=0; i<nTabCount; ++i)
{
@@ -3064,10 +3061,10 @@ void ScViewFunc::MoveTable(sal_uInt16 nDestDocNo, SCTAB nDestTab, bool bCopy,
// Move or copy within the same document.
SCTAB nTabCount = rDoc.GetTableCount();
- unique_ptr< vector<SCTAB> > pSrcTabs(new vector<SCTAB>);
- unique_ptr< vector<SCTAB> > pDestTabs(new vector<SCTAB>);
- unique_ptr< vector<OUString> > pTabNames(new vector<OUString>);
- unique_ptr< vector<OUString> > pDestNames;
+ std::unique_ptr<std::vector<SCTAB>> pSrcTabs(new std::vector<SCTAB>);
+ std::unique_ptr<std::vector<SCTAB>> pDestTabs(new std::vector<SCTAB>);
+ std::unique_ptr<std::vector<OUString>> pTabNames(new std::vector<OUString>);
+ std::unique_ptr<std::vector<OUString>> pDestNames;
pSrcTabs->reserve(nTabCount);
pDestTabs->reserve(nTabCount);
pTabNames->reserve(nTabCount);
@@ -3164,7 +3161,7 @@ void ScViewFunc::MoveTable(sal_uInt16 nDestDocNo, SCTAB nDestTab, bool bCopy,
// Rename must be done after all sheets have been moved.
if (bRename)
{
- pDestNames.reset(new vector<OUString>);
+ pDestNames.reset(new std::vector<OUString>);
size_t n = pDestTabs->size();
pDestNames->reserve(n);
for (size_t j = 0; j < n; ++j)
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 3bbe4b4ff92d..33153652fb04 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -816,14 +816,14 @@ bool ScViewFunc::PasteOnDrawObjectLinked(
}
else if ( aDataHelper.HasFormat( SotClipboardFormatId::BITMAP ) || aDataHelper.HasFormat( SotClipboardFormatId::PNG ) )
{
- BitmapEx aBmpEx;
+ Bitmap aBmp;
ScDrawView* pScDrawView = GetScDrawView();
- if( pScDrawView && aDataHelper.GetBitmapEx( SotClipboardFormatId::BITMAP, aBmpEx ) )
+ if( pScDrawView && aDataHelper.GetBitmapEx( SotClipboardFormatId::BITMAP, aBmp ) )
{
const OUString aBeginUndo(ScResId(STR_UNDO_DRAGDROP));
- if(pScDrawView->ApplyGraphicToObject( rHitObj, Graphic(aBmpEx), aBeginUndo, u""_ustr ))
+ if(pScDrawView->ApplyGraphicToObject( rHitObj, Graphic(aBmp), aBeginUndo, u""_ustr ))
{
return true;
}
diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx
index a917f534dfd2..4a64af774613 100644
--- a/sc/source/ui/view/viewfun4.cxx
+++ b/sc/source/ui/view/viewfun4.cxx
@@ -358,7 +358,6 @@ void ScViewFunc::DoThesaurus()
uno::Reference<linguistic2::XSpellChecker1> xSpeller = LinguMgr::GetSpellChecker();
pThesaurusEngine.reset(new ScEditEngineDefaulter(rDoc.GetEditEnginePool()));
- pThesaurusEngine->SetEditTextObjectPool( rDoc.GetEditTextObjectPool() );
pThesaurusEngine->SetRefDevice(GetViewData().GetActiveWin()->GetOutDev());
pThesaurusEngine->SetSpeller(xSpeller);
MakeEditView(*pThesaurusEngine, nCol, nRow);
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index eec948c0f44e..968df102dac6 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -26,12 +26,17 @@
#include <svx/unomodel.hxx>
#include <unotools/streamwrap.hxx>
+#include <svtools/svtresid.hxx>
+#include <svtools/strings.hrc>
+#include <svx/dialmgr.hxx>
+#include <svx/strings.hrc>
#include <svx/svditer.hxx>
#include <svx/svdobj.hxx>
#include <svx/svdogrp.hxx>
#include <svx/svdouno.hxx>
#include <svx/svdoole2.hxx>
#include <svx/svdpage.hxx>
+#include <svx/GenericDropDownFieldDialog.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/docfile.hxx>
#include <comphelper/classids.hxx>
@@ -45,12 +50,14 @@
#include <osl/thread.h>
#include <o3tl/unit_conversion.hxx>
#include <o3tl/string_view.hxx>
+#include <md4c.h>
#include <comphelper/automationinvokedzone.hxx>
#include <comphelper/lok.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/storagehelper.hxx>
#include <comphelper/string.hxx>
+#include <comphelper/markdown.hxx>
#include <viewfunc.hxx>
#include <docsh.hxx>
@@ -221,9 +228,9 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId,
}
else if (nFormatId == SotClipboardFormatId::BITMAP || nFormatId == SotClipboardFormatId::PNG || nFormatId == SotClipboardFormatId::JPEG)
{
- BitmapEx aBmpEx;
- if( aDataHelper.GetBitmapEx( SotClipboardFormatId::BITMAP, aBmpEx ) )
- bRet = PasteBitmapEx( aPos, aBmpEx );
+ Bitmap aBmp;
+ if( aDataHelper.GetBitmapEx( SotClipboardFormatId::BITMAP, aBmp ) )
+ bRet = PasteBitmapEx( aPos, BitmapEx(aBmp) );
}
else if (nFormatId == SotClipboardFormatId::GDIMETAFILE)
{
@@ -657,6 +664,89 @@ bool ScViewFunc::PasteDataFormatSource( SotClipboardFormatId nFormatId,
return bRet;
}
+static bool lcl_convert_markdown_to_csv(OUString& rData)
+{
+
+ auto enter_block_callbck = [](MD_BLOCKTYPE, void*, void*) -> int {
+ return 0;
+ };
+
+ auto leave_block_callbck = [](MD_BLOCKTYPE type, void*, void* userdata) -> int {
+
+ OUString& rStr = *static_cast<OUString*>(userdata);
+ switch(type)
+ {
+ case MD_BLOCK_DOC:
+ case MD_BLOCK_QUOTE:
+ case MD_BLOCK_UL:
+ case MD_BLOCK_OL:
+ case MD_BLOCK_LI:
+ case MD_BLOCK_HR:
+ case MD_BLOCK_H:
+ case MD_BLOCK_CODE:
+ case MD_BLOCK_HTML:
+ case MD_BLOCK_P:
+ case MD_BLOCK_TABLE:
+ case MD_BLOCK_THEAD:
+ case MD_BLOCK_TBODY:
+ break;
+ case MD_BLOCK_TR:
+ {
+ rStr += u"\n"_ustr;
+ break;
+ }
+ case MD_BLOCK_TH:
+ case MD_BLOCK_TD:
+ {
+ rStr += u","_ustr;
+ break;
+ }
+ }
+
+ return 0;
+ };
+
+ auto enter_span_callbck = [](MD_SPANTYPE, void*, void*) -> int {
+ return 0;
+ };
+
+ auto leave_span_callbck = [](MD_SPANTYPE, void*, void*) -> int {
+ return 0;
+ };
+
+ auto text_callbck = [](MD_TEXTTYPE, const MD_CHAR* text, MD_SIZE size, void* userdata) -> int {
+
+ OUString& rStr = *static_cast<OUString*>(userdata);
+
+ OUString aText = OStringToOUString({text, size}, RTL_TEXTENCODING_UTF8);
+ rStr += aText;
+
+ return 0;
+ };
+
+ MD_PARSER parser = {0,
+ MD_FLAG_TABLES,
+ enter_block_callbck,
+ leave_block_callbck,
+ enter_span_callbck,
+ leave_span_callbck,
+ text_callbck,
+ nullptr,
+ nullptr};
+
+
+ OUString aConvertedData;
+ OString rawData = OUStringToOString(rData, RTL_TEXTENCODING_UTF8);
+
+ int ret = md_parse(rawData.getStr(), rawData.getLength(), &parser, static_cast<void*>(&aConvertedData));
+
+ if(ret != 0)
+ return false;
+
+ rData = aConvertedData;
+ return true;
+}
+
bool ScViewFunc::PasteDataFormatFormattedText( SotClipboardFormatId nFormatId,
const uno::Reference<datatransfer::XTransferable>& rxTransferable,
SCCOL nPosX, SCROW nPosY, bool bAllowDialogs,
@@ -734,6 +824,35 @@ bool ScViewFunc::PasteDataFormatFormattedText( SotClipboardFormatId nFormatId,
{
vcl::Window* pParent = GetActiveWin();
+ OUString aSelection;
+ std::vector<OUString> aFormats;
+ aFormats.push_back(SvtResId(STR_FORMAT_STRING));
+
+ if(comphelper::IsMarkdownData(*pStrBuffer)) //markdown
+ {
+ aFormats.push_back(SvtResId(STR_FORMAT_ID_MARKDOWN));
+ }
+
+ if(aFormats.size() > 1)
+ {
+ GenericDropDownFieldDialog aDialog(pParent->GetFrameWeld(),
+ SvxResId(RID_SVXSTR_PASTE_AS_DIALOG_TITLE),
+ aFormats);
+ short nRet = aDialog.run();
+ if( nRet == RET_OK)
+ {
+ aSelection = aDialog.GetSelectedItem();
+ }
+ else if(nRet == RET_CANCEL)
+ return false;
+ }
+
+ if(aSelection == SvtResId(STR_FORMAT_ID_MARKDOWN))
+ {
+ if(!lcl_convert_markdown_to_csv(*pStrBuffer))
+ return false;
+ }
+
auto pStrm = std::make_shared<ScImportStringStream>(*pStrBuffer);
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx
index f5ee3e462700..face230c43ac 100644
--- a/sc/source/ui/view/viewfun6.cxx
+++ b/sc/source/ui/view/viewfun6.cxx
@@ -69,8 +69,6 @@ void collectUIInformation( const OUString& aevent )
}
-using ::std::vector;
-
void ScViewFunc::DetectiveAddPred()
{
ScDocShell& rDocSh = GetViewData().GetDocShell();
@@ -181,7 +179,7 @@ void ScViewFunc::DetectiveMarkPred()
else
aRanges.push_back(ScRange(aCurPos));
- vector<ScTokenRef> aRefTokens;
+ std::vector<ScTokenRef> aRefTokens;
rDocSh.GetDocFunc().DetectiveCollectAllPreds(aRanges, aRefTokens);
if (aRefTokens.empty())
@@ -244,7 +242,7 @@ void ScViewFunc::DetectiveMarkSucc()
else
aRanges.push_back(ScRange(aCurPos));
- vector<ScTokenRef> aRefTokens;
+ std::vector<ScTokenRef> aRefTokens;
rDocSh.GetDocFunc().DetectiveCollectAllSuccs(aRanges, aRefTokens);
if (aRefTokens.empty())
@@ -288,7 +286,7 @@ void ScViewFunc::InsertCurrentTime(SvNumFormatType nReqFmt, const OUString& rUnd
const SvNumFormatType nCurNumFormatType = (pCurNumFormatEntry ?
pCurNumFormatEntry->GetMaskedType() : SvNumFormatType::UNDEFINED);
- const int nView(comphelper::LibreOfficeKit::isActive() ? SfxLokHelper::getView() : -1);
+ const int nView(comphelper::LibreOfficeKit::isActive() ? SfxLokHelper::getCurrentView() : -1);
if (nView >= 0)
{
const auto [isTimezoneSet, aTimezone] = SfxLokHelper::getViewTimezone(nView);
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 8c0b2c58e188..c18f977b9d5c 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -133,7 +133,8 @@ ScViewFunc::~ScViewFunc()
{
}
-namespace {
+namespace
+{
struct FormulaProcessingContext
{
@@ -187,7 +188,7 @@ void collectUIInformation(std::map<OUString, OUString>&& aParameters, const OUSt
UITestLogger::getInstance().logEvent(aDescription);
}
-}
+} // end anonymous namespace
void ScViewFunc::StartFormatArea()
{
@@ -428,233 +429,240 @@ namespace HelperNotifyChanges
namespace
{
- class AutoCorrectQuery : public weld::MessageDialogController
- {
- private:
- std::unique_ptr<weld::TextView> m_xError;
- public:
- AutoCorrectQuery(weld::Window* pParent, const OUString& rFormula)
- : weld::MessageDialogController(pParent, u"modules/scalc/ui/warnautocorrect.ui"_ustr, u"WarnAutoCorrect"_ustr, u"grid"_ustr)
- , m_xError(m_xBuilder->weld_text_view(u"error"_ustr))
- {
- m_xDialog->set_default_response(RET_YES);
- const int nMaxWidth = m_xError->get_approximate_digit_width() * 65;
- const int nMaxHeight = m_xError->get_height_rows(6);
- m_xError->set_size_request(nMaxWidth, nMaxHeight);
-
- m_xError->set_text(rFormula);
- }
- };
-}
-namespace
+class AutoCorrectQuery : public weld::MessageDialogController
{
- void runAutoCorrectQueryAsync(const std::shared_ptr<FormulaProcessingContext>& context);
-
- void performAutoFormatAndUpdate(std::u16string_view rString, const ScMarkData& rMark, SCCOL nCol,
- SCROW nRow, SCTAB nTab, bool bNumFmtChanged, bool bRecord,
- const std::shared_ptr<ScDocShellModificator>& pModificator,
- ScViewFunc& rViewFunc)
+private:
+ std::unique_ptr<weld::TextView> m_xError;
+public:
+ AutoCorrectQuery(weld::Window* pParent, const OUString& rFormula)
+ : weld::MessageDialogController(pParent, u"modules/scalc/ui/warnautocorrect.ui"_ustr, u"WarnAutoCorrect"_ustr, u"grid"_ustr)
+ , m_xError(m_xBuilder->weld_text_view(u"error"_ustr))
{
- bool bAutoFormat = rViewFunc.TestFormatArea(nCol, nRow, nTab, bNumFmtChanged);
+ m_xDialog->set_default_response(RET_YES);
- if (bAutoFormat)
- rViewFunc.DoAutoAttributes(nCol, nRow, nTab, bNumFmtChanged);
+ const int nMaxWidth = m_xError->get_approximate_digit_width() * 65;
+ const int nMaxHeight = m_xError->get_height_rows(6);
+ m_xError->set_size_request(nMaxWidth, nMaxHeight);
- ScViewData& rViewData = rViewFunc.GetViewData();
- ScDocShell& rDocSh = rViewData.GetDocShell();
- rDocSh.UpdateOle(rViewData);
+ m_xError->set_text(rFormula);
+ }
+};
- const OUString aType(rString.empty() ? u"delete-content" : u"cell-change");
- HelperNotifyChanges::NotifyIfChangesListeners(rDocSh, rMark, nCol, nRow, aType);
+void runAutoCorrectQueryAsync(const std::shared_ptr<FormulaProcessingContext>& context);
- if (bRecord)
- {
- ScDocFunc &rFunc = rViewData.GetDocFunc();
- rFunc.EndListAction();
- }
+void performAutoFormatAndUpdate(std::u16string_view rString, const ScMarkData& rMark, SCCOL nCol,
+ SCROW nRow, SCTAB nTab, bool bNumFmtChanged, bool bRecord,
+ const std::shared_ptr<ScDocShellModificator>& pModificator,
+ ScViewFunc& rViewFunc)
+{
+ bool bAutoFormat = rViewFunc.TestFormatArea(nCol, nRow, nTab, bNumFmtChanged);
- pModificator->SetDocumentModified();
- ScDocument& rDoc = rViewData.GetDocument();
- lcl_PostRepaintCondFormat(rDoc.GetCondFormat(nCol, nRow, nTab), rDocSh);
- lcl_PostRepaintSparkLine(rDoc.GetSparklineList(nTab), ScRange(nCol, nRow, nTab), rDocSh);
- }
+ if (bAutoFormat)
+ rViewFunc.DoAutoAttributes(nCol, nRow, nTab, bNumFmtChanged);
- void finalizeFormulaProcessing(const std::shared_ptr<FormulaProcessingContext>& context)
- {
- // to be used in multiple tabs, the formula must be compiled anew
- // via ScFormulaCell copy-ctor because of RangeNames,
- // the same code-array for all cells is not possible.
- // If the array has an error, (it) must be RPN-erased in the newly generated
- // cells and the error be set explicitly, so that
- // via FormulaCell copy-ctor and Interpreter it will be, when possible,
- // ironed out again, too intelligent... e.g.: =1))
- FormulaError nError = context->pArr->GetCodeError();
- if ( nError == FormulaError::NONE )
- {
- // update list of recent functions with all functions that
- // are not within parentheses
+ ScViewData& rViewData = rViewFunc.GetViewData();
+ ScDocShell& rDocSh = rViewData.GetDocShell();
+ rDocSh.UpdateOle(rViewData);
- ScModule* pScMod = ScModule::get();
- ScAppOptions aAppOpt = pScMod->GetAppOptions();
- bool bOptChanged = false;
+ const OUString aType(rString.empty() ? u"delete-content" : u"cell-change");
+ HelperNotifyChanges::NotifyIfChangesListeners(rDocSh, rMark, nCol, nRow, aType);
- formula::FormulaToken** ppToken = context->pArr->GetArray();
- sal_uInt16 nTokens = context->pArr->GetLen();
- sal_uInt16 nLevel = 0;
- for (sal_uInt16 nTP=0; nTP<nTokens; nTP++)
- {
- formula::FormulaToken* pTok = ppToken[nTP];
- OpCode eOp = pTok->GetOpCode();
- if ( eOp == ocOpen )
- ++nLevel;
- else if ( eOp == ocClose && nLevel )
- --nLevel;
- if ( nLevel == 0 && pTok->IsFunction() &&
- lcl_AddFunction( aAppOpt, sal::static_int_cast<sal_uInt16>( eOp ) ) )
- bOptChanged = true;
- }
+ if (bRecord)
+ {
+ ScDocFunc &rFunc = rViewData.GetDocFunc();
+ rFunc.EndListAction();
+ }
- if ( bOptChanged )
- {
- pScMod->SetAppOptions(aAppOpt);
- }
+ pModificator->SetDocumentModified();
+ ScDocument& rDoc = rViewData.GetDocument();
+ lcl_PostRepaintCondFormat(rDoc.GetCondFormat(nCol, nRow, nTab), rDocSh);
+ lcl_PostRepaintSparkLine(rDoc.GetSparklineList(nTab), ScRange(nCol, nRow, nTab), rDocSh);
+}
- if (context->bMatrixExpand)
+void finalizeFormulaProcessing(const std::shared_ptr<FormulaProcessingContext>& context)
+{
+ // to be used in multiple tabs, the formula must be compiled anew
+ // via ScFormulaCell copy-ctor because of RangeNames,
+ // the same code-array for all cells is not possible.
+ // If the array has an error, (it) must be RPN-erased in the newly generated
+ // cells and the error be set explicitly, so that
+ // via FormulaCell copy-ctor and Interpreter it will be, when possible,
+ // ironed out again, too intelligent... e.g.: =1))
+ FormulaError nError = context->pArr->GetCodeError();
+ if ( nError == FormulaError::NONE )
+ {
+ // update list of recent functions with all functions that
+ // are not within parentheses
+
+ ScModule* pScMod = ScModule::get();
+ ScAppOptions aAppOpt = pScMod->GetAppOptions();
+ bool bOptChanged = false;
+
+ formula::FormulaToken** ppToken = context->pArr->GetArray();
+ sal_uInt16 nTokens = context->pArr->GetLen();
+ sal_uInt16 nLevel = 0;
+ for (sal_uInt16 nTP=0; nTP<nTokens; nTP++)
+ {
+ formula::FormulaToken* pTok = ppToken[nTP];
+ OpCode eOp = pTok->GetOpCode();
+ if ( eOp == ocOpen )
+ ++nLevel;
+ else if ( eOp == ocClose && nLevel )
+ --nLevel;
+ if ( nLevel == 0 && pTok->IsFunction() &&
+ lcl_AddFunction( aAppOpt, sal::static_int_cast<sal_uInt16>( eOp ) ) )
+ bOptChanged = true;
+ }
+
+ if ( bOptChanged )
+ {
+ pScMod->SetAppOptions(aAppOpt);
+ }
+
+ if (context->bMatrixExpand)
+ {
+ // If the outer function/operator returns an array/matrix then
+ // enter a matrix formula. ScViewFunc::EnterMatrix() takes care
+ // of selection/mark of the result dimensions or preselected
+ // mark. If the user wanted less or a single cell then should
+ // mark such prior to entering the formula.
+ const formula::FormulaToken* pToken = context->pArr->LastRPNToken();
+ if (pToken && (formula::FormulaCompiler::IsMatrixFunction( pToken->GetOpCode())
+ || pToken->IsInForceArray()))
{
- // If the outer function/operator returns an array/matrix then
- // enter a matrix formula. ScViewFunc::EnterMatrix() takes care
- // of selection/mark of the result dimensions or preselected
- // mark. If the user wanted less or a single cell then should
- // mark such prior to entering the formula.
- const formula::FormulaToken* pToken = context->pArr->LastRPNToken();
- if (pToken && (formula::FormulaCompiler::IsMatrixFunction( pToken->GetOpCode())
- || pToken->IsInForceArray()))
- {
- // Discard this (still empty here) Undo action,
- // EnterMatrix() will create its own.
- if (context->bRecord)
- context->GetDocFunc().EndListAction();
+ // Discard this (still empty here) Undo action,
+ // EnterMatrix() will create its own.
+ if (context->bRecord)
+ context->GetDocFunc().EndListAction();
- // Use corrected formula string.
- context->rViewFunc.EnterMatrix( context->aFormula, context->GetDoc().GetGrammar());
+ // Use corrected formula string.
+ context->rViewFunc.EnterMatrix( context->aFormula, context->GetDoc().GetGrammar());
- return;
- }
+ return;
}
}
+ }
- ScFormulaCell aCell(context->GetDoc(), *context->aPos, std::move(*context->pArr), formula::FormulaGrammar::GRAM_DEFAULT, ScMatrixMode::NONE);
+ ScFormulaCell aCell(context->GetDoc(), *context->aPos, std::move(*context->pArr), formula::FormulaGrammar::GRAM_DEFAULT, ScMatrixMode::NONE);
- SCTAB i;
- SvNumberFormatter* pFormatter = context->GetDoc().GetFormatTable();
- for (const auto& rTab : context->aMark)
- {
- i = rTab;
- context->aPos->SetTab( i );
- const sal_uInt32 nIndex = context->GetDoc().GetAttr(
- context->nCol, context->nRow, i, ATTR_VALUE_FORMAT )->GetValue();
- const SvNumFormatType nType = pFormatter->GetType( nIndex);
- if (nType == SvNumFormatType::TEXT ||
- ((context->aString[0] == '+' || context->aString[0] == '-') && nError != FormulaError::NONE && context->aString == context->aFormula))
+ SCTAB i;
+ SvNumberFormatter* pFormatter = context->GetDoc().GetFormatTable();
+ for (const auto& rTab : context->aMark)
+ {
+ i = rTab;
+ context->aPos->SetTab( i );
+ const sal_uInt32 nIndex = context->GetDoc().GetAttr(
+ context->nCol, context->nRow, i, ATTR_VALUE_FORMAT )->GetValue();
+ const SvNumFormatType nType = pFormatter->GetType( nIndex);
+ if (nType == SvNumFormatType::TEXT ||
+ ((context->aString[0] == '+' || context->aString[0] == '-') && nError != FormulaError::NONE && context->aString == context->aFormula))
+ {
+ if ( context->xTextObject )
{
- if ( context->xTextObject )
- {
- // A clone of context->xTextObject will be stored in the cell.
- context->GetDocFunc().SetEditCell(*(context->aPos), *context->xTextObject, true);
- }
- else
- context->GetDocFunc().SetStringCell(*(context->aPos), context->aFormula, true);
+ // A clone of context->xTextObject will be stored in the cell.
+ context->GetDocFunc().SetEditCell(*(context->aPos), *context->xTextObject, true);
}
else
+ context->GetDocFunc().SetStringCell(*(context->aPos), context->aFormula, true);
+ }
+ else
+ {
+ ScFormulaCell* pCell = new ScFormulaCell( aCell, context->GetDoc(), *(context->aPos) );
+ if ( nError != FormulaError::NONE )
{
- ScFormulaCell* pCell = new ScFormulaCell( aCell, context->GetDoc(), *(context->aPos) );
- if ( nError != FormulaError::NONE )
- {
- pCell->GetCode()->DelRPN();
- pCell->SetErrCode( nError );
- if(pCell->GetCode()->IsHyperLink())
- pCell->GetCode()->SetHyperLink(false);
- }
- if (nType == SvNumFormatType::LOGICAL)
- {
- // Reset to General so the actual format can be determined
- // after the cell has been interpreted. A sticky boolean
- // number format is highly likely unwanted... see tdf#75650.
- // General of same locale as current number format.
- const SvNumberformat* pEntry = pFormatter->GetEntry( nIndex);
- const LanguageType nLang = (pEntry ? pEntry->GetLanguage() : ScGlobal::eLnge);
- const sal_uInt32 nFormat = pFormatter->GetStandardFormat( SvNumFormatType::NUMBER, nLang);
- ScPatternAttr aPattern(context->GetDoc().getCellAttributeHelper());
- aPattern.GetItemSet().Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nFormat));
- ScMarkData aMark(context->GetDoc().GetSheetLimits());
- aMark.SelectTable( i, true);
- aMark.SetMarkArea( ScRange( *(context->aPos)));
- context->GetDocFunc().ApplyAttributes( aMark, aPattern, false);
- context->bNumFmtChanged = true;
- }
- context->GetDocFunc().SetFormulaCell(*(context->aPos), pCell, true);
+ pCell->GetCode()->DelRPN();
+ pCell->SetErrCode( nError );
+ if(pCell->GetCode()->IsHyperLink())
+ pCell->GetCode()->SetHyperLink(false);
}
+ if (nType == SvNumFormatType::LOGICAL)
+ {
+ // Reset to General so the actual format can be determined
+ // after the cell has been interpreted. A sticky boolean
+ // number format is highly likely unwanted... see tdf#75650.
+ // General of same locale as current number format.
+ const SvNumberformat* pEntry = pFormatter->GetEntry( nIndex);
+ const LanguageType nLang = (pEntry ? pEntry->GetLanguage() : ScGlobal::eLnge);
+ const sal_uInt32 nFormat = pFormatter->GetStandardFormat( SvNumFormatType::NUMBER, nLang);
+ ScPatternAttr aPattern(context->GetDoc().getCellAttributeHelper());
+ aPattern.ItemSetPut(SfxUInt32Item(ATTR_VALUE_FORMAT, nFormat));
+ ScMarkData aMark(context->GetDoc().GetSheetLimits());
+ aMark.SelectTable( i, true);
+ aMark.SetMarkArea( ScRange( *(context->aPos)));
+ context->GetDocFunc().ApplyAttributes( aMark, aPattern, false);
+ context->bNumFmtChanged = true;
+ }
+ context->GetDocFunc().SetFormulaCell(*(context->aPos), pCell, true);
}
-
- performAutoFormatAndUpdate(context->aString, context->aMark, context->nCol,
- context->nRow, context->nTab, context->bNumFmtChanged,
- context->bRecord, context->aModificator, context->rViewFunc);
}
- void parseAndCorrectFormula(std::shared_ptr<FormulaProcessingContext> context)
- {
- bool bAddEqual = false;
- context->pArr = context->aComp->CompileString(context->aFormula);
- bool bCorrected = context->aComp->IsCorrected();
+ performAutoFormatAndUpdate(context->aString, context->aMark, context->nCol,
+ context->nRow, context->nTab, context->bNumFmtChanged,
+ context->bRecord, context->aModificator, context->rViewFunc);
+}
- if (bCorrected) {
- context->pArrFirst = context->pArr;
- context->pArr = context->aComp->CompileString(context->aComp->GetCorrectedFormula());
- }
+void parseAndCorrectFormula(std::shared_ptr<FormulaProcessingContext> context)
+{
+ bool bAddEqual = false;
+ context->pArr = context->aComp->CompileString(context->aFormula);
+ bool bCorrected = context->aComp->IsCorrected();
- if (context->pArr->GetCodeError() == FormulaError::NONE) {
- bAddEqual = true;
- context->aComp->CompileTokenArray();
- bCorrected |= context->aComp->IsCorrected();
- }
+ if (bCorrected) {
+ context->pArrFirst = context->pArr;
+ context->pArr = context->aComp->CompileString(context->aComp->GetCorrectedFormula());
+ }
- if (bCorrected) {
- context->aCorrectedFormula = bAddEqual ? "=" + context->aComp->GetCorrectedFormula()
- : context->aComp->GetCorrectedFormula();
- if (context->aCorrectedFormula.getLength() == 1) {
- // empty formula, just '='
- if (context->pArrFirst)
- context->pArr = context->pArrFirst;
- }
- else
- {
- runAutoCorrectQueryAsync(context);
- return;
- }
+ if (context->pArr->GetCodeError() == FormulaError::NONE) {
+ bAddEqual = true;
+ context->aComp->CompileTokenArray();
+ bCorrected |= context->aComp->IsCorrected();
+ }
+
+ if (bCorrected) {
+ context->aCorrectedFormula = bAddEqual ? "=" + context->aComp->GetCorrectedFormula()
+ : context->aComp->GetCorrectedFormula();
+ if (context->aCorrectedFormula.getLength() == 1) {
+ // empty formula, just '='
+ if (context->pArrFirst)
+ context->pArr = context->pArrFirst;
+ }
+ else
+ {
+ runAutoCorrectQueryAsync(context);
+ return;
}
- finalizeFormulaProcessing(context);
}
+ finalizeFormulaProcessing(context);
+}
- void runAutoCorrectQueryAsync(const std::shared_ptr<FormulaProcessingContext>& context)
+void runAutoCorrectQueryAsync(const std::shared_ptr<FormulaProcessingContext>& context)
+{
+ auto aQueryBox = std::make_shared<AutoCorrectQuery>(context->GetViewData().GetDialogParent(), context->aCorrectedFormula);
+ weld::DialogController::runAsync(aQueryBox, [context] (int nResult)
{
- auto aQueryBox = std::make_shared<AutoCorrectQuery>(context->GetViewData().GetDialogParent(), context->aCorrectedFormula);
- weld::DialogController::runAsync(aQueryBox, [context] (int nResult)
- {
- if (nResult == RET_YES) {
- context->aFormula = context->aCorrectedFormula;
- parseAndCorrectFormula(context);
- } else {
- if (context->pArrFirst)
- context->pArr = context->pArrFirst;
+ if (nResult == RET_YES) {
+ context->aFormula = context->aCorrectedFormula;
+ parseAndCorrectFormula(context);
+ } else {
+ if (context->pArrFirst)
+ context->pArr = context->pArrFirst;
- finalizeFormulaProcessing(context);
- }
- });
- }
+ finalizeFormulaProcessing(context);
+ }
+ });
}
-// actual functions
+} // end anonymous namespace
+
+void ScViewFunc::EnterDataToCurrentCell(const OUString& rString, const EditTextObject* pData, bool bMatrixExpand)
+{
+ SCCOL nCol = GetViewData().GetCurX();
+ SCROW nRow = GetViewData().GetCurY();
+ SCTAB nTab = GetViewData().GetTabNo();
+
+ EnterData(nCol, nRow, nTab, rString, pData, bMatrixExpand);
+}
// input - undo OK
void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
@@ -899,7 +907,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
for (const auto& rTab : rMark)
{
ScAddress aPos(nCol, nRow, rTab);
- rDoc.SetEditText(aPos, rData, rDoc.GetEditTextObjectPool());
+ rDoc.SetEditText(aPos, rData, rDoc.GetEditEnginePool());
}
if ( bRecord )
@@ -1116,14 +1124,15 @@ void ScViewFunc::ApplyAttributes( const SfxItemSet& rDialogSet,
pNewEntry ? pNewEntry->GetLanguage() : LANGUAGE_DONTKNOW;
if ( eNewLang != eOldLang )
{
- aNewAttrs.GetItemSet().Put(
- SvxLanguageItem( eNewLang, ATTR_LANGUAGE_FORMAT ) );
+ aNewAttrs.ItemSetPut(SvxLanguageItem(eNewLang, ATTR_LANGUAGE_FORMAT));
// only the language has changed -> do not touch numberformat-attribute
sal_uInt32 nNewMod = nNewFormat % SV_COUNTRY_LANGUAGE_OFFSET;
if ( nNewMod == ( nOldFormat % SV_COUNTRY_LANGUAGE_OFFSET ) &&
nNewMod <= SV_MAX_COUNT_STANDARD_FORMATS )
- aNewAttrs.GetItemSet().ClearItem( ATTR_VALUE_FORMAT );
+ {
+ aNewAttrs.ItemSetClearItem(ATTR_VALUE_FORMAT);
+ }
}
}
}
@@ -1136,7 +1145,6 @@ void ScViewFunc::ApplyAttributes( const SfxItemSet& rDialogSet,
const SvxBoxItem& rNewOuter = rDialogSet.Get(ATTR_BORDER);
const SvxBoxInfoItem& rOldInner = rOldSet.Get(ATTR_BORDER_INNER);
const SvxBoxInfoItem& rNewInner = rDialogSet.Get(ATTR_BORDER_INNER);
- SfxItemSet& rNewSet = aNewAttrs.GetItemSet();
// protect referenced Items from disappearing (was: don't delete yet)
const SfxPoolItemHolder aHoldOuter(*rDialogSet.GetPool() , &rNewOuter);
@@ -1144,8 +1152,8 @@ void ScViewFunc::ApplyAttributes( const SfxItemSet& rDialogSet,
(void)aHoldOuter;
(void)aHoldInner;
- rNewSet.ClearItem( ATTR_BORDER );
- rNewSet.ClearItem( ATTR_BORDER_INNER );
+ aNewAttrs.ItemSetClearItem(ATTR_BORDER);
+ aNewAttrs.ItemSetClearItem(ATTR_BORDER_INNER);
/*
* establish whether border attribute is to be set:
@@ -1207,10 +1215,10 @@ void ScViewFunc::ApplyAttr( const SfxPoolItem& rAttrItem, bool bAdjustBlockHeigh
ScDocument& rDoc = GetViewData().GetDocument();
ScPatternAttr aNewAttrs(rDoc.getCellAttributeHelper());
- aNewAttrs.GetItemSet().Put( rAttrItem );
+ aNewAttrs.ItemSetPut(rAttrItem);
// if justify is set (with Buttons), always indentation 0
if ( rAttrItem.Which() == ATTR_HOR_JUSTIFY )
- aNewAttrs.GetItemSet().Put( ScIndentItem( 0 ) );
+ aNewAttrs.ItemSetPut(ScIndentItem(0));
ApplySelectionPattern( aNewAttrs );
// Prevent useless compute
@@ -1515,7 +1523,7 @@ void ScViewFunc::ApplyUserItemSet( const SfxItemSet& rItemSet )
}
ScPatternAttr aNewAttrs(GetViewData().GetDocument().getCellAttributeHelper());
- SfxItemSet& rNewSet = aNewAttrs.GetItemSet();
+ SfxItemSet& rNewSet = aNewAttrs.GetItemSetWritable();
rNewSet.Put( rItemSet, false );
ApplySelectionPattern( aNewAttrs );
@@ -2894,8 +2902,7 @@ void ScViewFunc::SetNumberFormat( SvNumFormatType nFormatType, sal_uLong nAdd )
nNumberFormat = pNumberFormatter->GetStandardFormat( nFormatType, eLanguage ) + nAdd;
- SfxItemSet& rSet = aNewAttrs.GetItemSet();
- rSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNumberFormat ) );
+ aNewAttrs.ItemSetPut(SfxUInt32Item(ATTR_VALUE_FORMAT, nNumberFormat));
// ATTR_LANGUAGE_FORMAT not
ApplySelectionPattern( aNewAttrs );
}
@@ -2938,9 +2945,8 @@ void ScViewFunc::SetNumFmtByStr( const OUString& rCode )
if ( bOk ) // valid format?
{
ScPatternAttr aNewAttrs(rDoc.getCellAttributeHelper());
- SfxItemSet& rSet = aNewAttrs.GetItemSet();
- rSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNumberFormat ) );
- rSet.Put( SvxLanguageItem( eLanguage, ATTR_LANGUAGE_FORMAT ) );
+ aNewAttrs.ItemSetPut(SfxUInt32Item(ATTR_VALUE_FORMAT, nNumberFormat));
+ aNewAttrs.ItemSetPut(SvxLanguageItem(eLanguage, ATTR_LANGUAGE_FORMAT));
ApplySelectionPattern( aNewAttrs );
}
@@ -3071,8 +3077,7 @@ void ScViewFunc::ChangeNumFmtDecimals( bool bIncrement )
if (!bError)
{
ScPatternAttr aNewAttrs(rDoc.getCellAttributeHelper());
- SfxItemSet& rSet = aNewAttrs.GetItemSet();
- rSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNewFormat ) );
+ aNewAttrs.ItemSetPut(SfxUInt32Item(ATTR_VALUE_FORMAT, nNewFormat));
// ATTR_LANGUAGE_FORMAT not
ApplySelectionPattern( aNewAttrs );
}
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index fd29d13f93ea..e6b947b299fb 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -82,7 +82,7 @@ ScXMLSourceDlg::ScXMLSourceDlg(
mxLbTree->set_size_request(mxLbTree->get_approximate_digit_width() * 40,
mxLbTree->get_height_rows(15));
mxLbTree->set_selection_mode(SelectionMode::Multiple);
- mxRefEdit->SetReferences(this, nullptr);
+ mxRefEdit->SetReferences(this);
mxRefBtn->SetReferences(this, mxRefEdit.get());
mpActiveEdit = mxRefEdit.get();
@@ -522,7 +522,7 @@ void ScXMLSourceDlg::OkPressed()
aRangeLink.maRowGroups.push_back(
OUStringToOString(aThisEntry, RTL_TEXTENCODING_UTF8));
- aParam.maRangeLinks.push_back(aRangeLink);
+ aParam.maRangeLinks.push_back(std::move(aRangeLink));
}
// Remove duplicate namespace IDs.
diff --git a/sc/ucalc_setup.mk b/sc/ucalc_setup.mk
index af400da43014..4a4918d0dcf6 100644
--- a/sc/ucalc_setup.mk
+++ b/sc/ucalc_setup.mk
@@ -36,6 +36,7 @@ $(eval $(call gb_CppunitTest_use_externals,sc_ucalc$(1),\
mdds_headers \
orcus \
orcus-parser \
+ md4c \
))
$(eval $(call gb_CppunitTest_use_libraries,sc_ucalc$(1), \
diff --git a/sc/uiconfig/scalc/menubar/menubar.xml b/sc/uiconfig/scalc/menubar/menubar.xml
index 9f29e6b0cbe7..423215858319 100644
--- a/sc/uiconfig/scalc/menubar/menubar.xml
+++ b/sc/uiconfig/scalc/menubar/menubar.xml
@@ -243,6 +243,7 @@
<menu:menuitem menu:id=".uno:Polygon_Diagonal"/>
</menu:menupopup>
</menu:menu>
+ <menu:menuitem menu:id=".uno:ConnectorToolbox"/>
<menu:menuitem menu:id=".uno:BasicShapes"/>
<menu:menuitem menu:id=".uno:ArrowShapes"/>
<menu:menuitem menu:id=".uno:SymbolShapes"/>
diff --git a/sc/uiconfig/scalc/popupmenu/celledit.xml b/sc/uiconfig/scalc/popupmenu/celledit.xml
index 12bac415d953..36aad7336769 100644
--- a/sc/uiconfig/scalc/popupmenu/celledit.xml
+++ b/sc/uiconfig/scalc/popupmenu/celledit.xml
@@ -24,6 +24,7 @@
</menu:menupopup>
</menu:menu>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertHyperlink"/>
<menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/>
<menu:menuitem menu:id=".uno:EditHyperlink"/>
<menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/>
diff --git a/sc/uiconfig/scalc/popupmenu/draw.xml b/sc/uiconfig/scalc/popupmenu/draw.xml
index 41167edf00fd..5e56bfe3713a 100644
--- a/sc/uiconfig/scalc/popupmenu/draw.xml
+++ b/sc/uiconfig/scalc/popupmenu/draw.xml
@@ -58,6 +58,7 @@
<menu:menuitem menu:id=".uno:RenameObject"/>
<menu:menuitem menu:id=".uno:ObjectTitleDescription"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertHyperlink"/>
<menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/>
<menu:menuitem menu:id=".uno:EditHyperlink"/>
<menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/>
diff --git a/sc/uiconfig/scalc/popupmenu/drawtext.xml b/sc/uiconfig/scalc/popupmenu/drawtext.xml
index d8cdc15e603e..7034a07e4f52 100644
--- a/sc/uiconfig/scalc/popupmenu/drawtext.xml
+++ b/sc/uiconfig/scalc/popupmenu/drawtext.xml
@@ -23,6 +23,7 @@
<menu:menuitem menu:id=".uno:FontDialog"/>
<menu:menuitem menu:id=".uno:ParagraphDialog"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertHyperlink"/>
<menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/>
<menu:menuitem menu:id=".uno:EditHyperlink"/>
<menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/>
diff --git a/sc/uiconfig/scalc/popupmenu/graphic.xml b/sc/uiconfig/scalc/popupmenu/graphic.xml
index 10f813f1e702..9d5abcc348b3 100644
--- a/sc/uiconfig/scalc/popupmenu/graphic.xml
+++ b/sc/uiconfig/scalc/popupmenu/graphic.xml
@@ -67,6 +67,7 @@
<menu:menuitem menu:id=".uno:RenameObject"/>
<menu:menuitem menu:id=".uno:ObjectTitleDescription"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertHyperlink"/>
<menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/>
<menu:menuitem menu:id=".uno:EditHyperlink"/>
<menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/>
diff --git a/sc/uiconfig/scalc/popupmenu/media.xml b/sc/uiconfig/scalc/popupmenu/media.xml
index d5453747eb68..3a1864c340fb 100644
--- a/sc/uiconfig/scalc/popupmenu/media.xml
+++ b/sc/uiconfig/scalc/popupmenu/media.xml
@@ -42,6 +42,7 @@
<menu:menuitem menu:id=".uno:RenameObject"/>
<menu:menuitem menu:id=".uno:ObjectTitleDescription"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertHyperlink"/>
<menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/>
<menu:menuitem menu:id=".uno:EditHyperlink"/>
<menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/>
diff --git a/sc/uiconfig/scalc/toolbar/connectorsbar.xml b/sc/uiconfig/scalc/toolbar/connectorsbar.xml
new file mode 100644
index 000000000000..8355775e2a9c
--- /dev/null
+++ b/sc/uiconfig/scalc/toolbar/connectorsbar.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
+<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <toolbar:toolbaritem xlink:href=".uno:ConnectorArrowEnd"/>
+ <toolbar:toolbaritem xlink:href=".uno:ConnectorLineArrowEnd"/>
+ <toolbar:toolbaritem xlink:href=".uno:ConnectorCurveArrowEnd"/>
+ <toolbar:toolbaritem xlink:href=".uno:ConnectorLinesArrowEnd"/>
+ <toolbar:toolbarbreak/>
+ <toolbar:toolbaritem xlink:href=".uno:Connector"/>
+ <toolbar:toolbaritem xlink:href=".uno:ConnectorLine"/>
+ <toolbar:toolbaritem xlink:href=".uno:ConnectorCurve"/>
+ <toolbar:toolbaritem xlink:href=".uno:ConnectorLines"/>
+ <toolbar:toolbarbreak/>
+ <toolbar:toolbaritem xlink:href=".uno:ConnectorArrows"/>
+ <toolbar:toolbaritem xlink:href=".uno:ConnectorLineArrows"/>
+ <toolbar:toolbaritem xlink:href=".uno:ConnectorCurveArrows"/>
+ <toolbar:toolbaritem xlink:href=".uno:ConnectorLinesArrows"/>
+ <toolbar:toolbarbreak/>
+ <toolbar:toolbaritem xlink:href=".uno:ConnectorArrowStart" toolbar:visible="false"/>
+ <toolbar:toolbaritem xlink:href=".uno:ConnectorLineArrowStart" toolbar:visible="false"/>
+ <toolbar:toolbaritem xlink:href=".uno:ConnectorCurveArrowStart" toolbar:visible="false"/>
+ <toolbar:toolbaritem xlink:href=".uno:ConnectorLinesArrowStart" toolbar:visible="false"/>
+ <toolbar:toolbarbreak/>
+ <toolbar:toolbaritem xlink:href=".uno:ConnectorCircleEnd" toolbar:visible="false"/>
+ <toolbar:toolbaritem xlink:href=".uno:ConnectorLineCircleEnd" toolbar:visible="false"/>
+ <toolbar:toolbaritem xlink:href=".uno:ConnectorCurveCircleEnd" toolbar:visible="false"/>
+ <toolbar:toolbaritem xlink:href=".uno:ConnectorLinesCircleEnd" toolbar:visible="false"/>
+ <toolbar:toolbarbreak/>
+ <toolbar:toolbaritem xlink:href=".uno:ConnectorCircleStart" toolbar:visible="false"/>
+ <toolbar:toolbaritem xlink:href=".uno:ConnectorLineCircleStart" toolbar:visible="false"/>
+ <toolbar:toolbaritem xlink:href=".uno:ConnectorCurveCircleStart" toolbar:visible="false"/>
+ <toolbar:toolbaritem xlink:href=".uno:ConnectorLinesCircleStart" toolbar:visible="false"/>
+ <toolbar:toolbarbreak/>
+ <toolbar:toolbaritem xlink:href=".uno:ConnectorCircles" toolbar:visible="false"/>
+ <toolbar:toolbaritem xlink:href=".uno:ConnectorLineCircles" toolbar:visible="false"/>
+ <toolbar:toolbaritem xlink:href=".uno:ConnectorCurveCircles" toolbar:visible="false"/>
+ <toolbar:toolbaritem xlink:href=".uno:ConnectorLinesCircles" toolbar:visible="false"/>
+</toolbar:toolbar>
diff --git a/sc/uiconfig/scalc/toolbar/drawbar.xml b/sc/uiconfig/scalc/toolbar/drawbar.xml
index 2e20e0c98915..310d4ee36844 100644
--- a/sc/uiconfig/scalc/toolbar/drawbar.xml
+++ b/sc/uiconfig/scalc/toolbar/drawbar.xml
@@ -21,6 +21,7 @@
<toolbar:toolbaritem xlink:href=".uno:SelectObject"/>
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:Line"/>
+ <toolbar:toolbaritem xlink:href=".uno:ConnectorToolbox"/>
<toolbar:toolbaritem xlink:href=".uno:ArrowsToolbox"/>
<toolbar:toolbaritem xlink:href=".uno:LineToolbox"/>
<toolbar:toolbaritem xlink:href=".uno:Freeline" toolbar:visible="false"/>
diff --git a/sc/uiconfig/scalc/ui/allheaderfooterdialog.ui b/sc/uiconfig/scalc/ui/allheaderfooterdialog.ui
index f80bae61bacd..193be704cad1 100644
--- a/sc/uiconfig/scalc/ui/allheaderfooterdialog.ui
+++ b/sc/uiconfig/scalc/ui/allheaderfooterdialog.ui
@@ -93,100 +93,10 @@
<property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
+ <property name="tab-pos">left</property>
<property name="scrollable">True</property>
<property name="enable-popup">True</property>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="headerright">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="allheaderfooterdialog|headerright">Header (right)</property>
- </object>
- <packing>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="headerleft">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="allheaderfooterdialog|headerleft">Header (left)</property>
- </object>
- <packing>
- <property name="position">1</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="footerright">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="allheaderfooterdialog|footerright">Footer (right)</property>
- </object>
- <packing>
- <property name="position">2</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">3</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="footerleft">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="allheaderfooterdialog|footerleft">Footer (left)</property>
- </object>
- <packing>
- <property name="position">3</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
+ <property name="group-name">icons</property>
</object>
<packing>
<property name="expand">False</property>
diff --git a/sc/uiconfig/scalc/ui/chardialog.ui b/sc/uiconfig/scalc/ui/chardialog.ui
index 053faf19696d..e15f1204761c 100644
--- a/sc/uiconfig/scalc/ui/chardialog.ui
+++ b/sc/uiconfig/scalc/ui/chardialog.ui
@@ -90,218 +90,9 @@
<property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="scrollable">True</property>
<property name="tab-pos">left</property>
+ <property name="scrollable">True</property>
<property name="group-name">icons</property>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkBox" id="font">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imFont">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/32/fontdialog.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbFont"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbFont">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="chardialog|font">Font</property>
- <property name="mnemonic-widget">font</property>
- <accessibility>
- <relation type="label-for" target="imFont"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="fonteffects">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imFonteffects">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/32/color.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbFonteffects"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbFonteffects">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="chardialog|fonteffects">Font Effects</property>
- <property name="mnemonic-widget">fonteffects</property>
- <accessibility>
- <relation type="label-for" target="imFonteffects"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="position">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imPosition">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/32/fontwork.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbPosition"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbPosition">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="chardialog|position">Position</property>
- <property name="mnemonic-widget">position</property>
- <accessibility>
- <relation type="label-for" target="imPosition"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">3</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="background">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imBackground">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/32/backcolor.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbBackground"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbBackground">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="chardialog|background">Highlighting</property>
- <property name="mnemonic-widget">background</property>
- <accessibility>
- <relation type="label-for" target="imBackground"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">3</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
</object>
<packing>
<property name="expand">False</property>
diff --git a/sc/uiconfig/scalc/ui/drawtemplatedialog.ui b/sc/uiconfig/scalc/ui/drawtemplatedialog.ui
index d32009a8f2cc..4ac757030d12 100644
--- a/sc/uiconfig/scalc/ui/drawtemplatedialog.ui
+++ b/sc/uiconfig/scalc/ui/drawtemplatedialog.ui
@@ -109,809 +109,6 @@
<property name="tab-pos">left</property>
<property name="scrollable">True</property>
<property name="tab-pos">left</property>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkBox" id="organizer">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imOrganizer">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_browseview.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbOrganizer"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbOrganizer">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="drawtemplatedialog|organizer">General</property>
- <property name="mnemonic-widget">organizer</property>
- <accessibility>
- <relation type="label-for" target="imOrganizer"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="line">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imLine">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_formatline.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbLine"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbLine">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="drawtemplatedialog|line">Line</property>
- <property name="mnemonic-widget">line</property>
- <accessibility>
- <relation type="label-for" target="imLine"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="area">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imArea">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_backgroundcolor.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbArea"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbArea">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="drawtemplatedialog|area">Area</property>
- <property name="mnemonic-widget">area</property>
- <accessibility>
- <relation type="label-for" target="imArea"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">3</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="shadowing">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imShadowing">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_fillshadow.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbShadowing"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbShadowing">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="drawtemplatedialog|shadowing">Shadowing</property>
- <property name="mnemonic-widget">shadowing</property>
- <accessibility>
- <relation type="label-for" target="imShadowing"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">3</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">4</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="transparency">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imTransparency">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_graftransparence.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbTransparency"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbTransparency">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="drawtemplatedialog|transparency">Transparency</property>
- <property name="mnemonic-widget">transparency</property>
- <accessibility>
- <relation type="label-for" target="imTransparency"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">4</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">5</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="font">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imFont">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_fontdialog.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbFont"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbFont">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="drawtemplatedialog|font">Font</property>
- <property name="mnemonic-widget">font</property>
- <accessibility>
- <relation type="label-for" target="imFont"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">5</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">6</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="fonteffect">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imFonteffect">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_color.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbFonteffect"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbFonteffect">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="drawtemplatedialog|fonteffect">Font Effects</property>
- <property name="mnemonic-widget">fonteffect</property>
- <accessibility>
- <relation type="label-for" target="imFonteffect"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">6</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">7</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="indents">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imIndents">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_paraspaceincrease.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbIndents"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbIndents">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="drawtemplatedialog|indents">Indents &amp; Spacing</property>
- <property name="mnemonic-widget">indents</property>
- <accessibility>
- <relation type="label-for" target="imIndents"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">7</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">8</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="text">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imText">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_text_marquee.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbText"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbText">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="drawtemplatedialog|text">Text</property>
- <property name="mnemonic-widget">text</property>
- <accessibility>
- <relation type="label-for" target="imText"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">8</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">9</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="animation">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imAnimation">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_animationeffects.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbAnimation"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbAnimation">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="drawtemplatedialog|animation">Text Animation</property>
- <property name="mnemonic-widget">animation</property>
- <accessibility>
- <relation type="label-for" target="imAnimation"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">9</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">10</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="dimensioning">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imDimensioning">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_measureline.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbDimensioning"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbDimensioning">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="drawtemplatedialog|dimensioning">Dimensioning</property>
- <property name="mnemonic-widget">dimensioning</property>
- <accessibility>
- <relation type="label-for" target="imDimensioning"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">10</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">11</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="alignment">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imAlignment">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_alignblock.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbAlignment"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbAlignment">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="drawtemplatedialog|alignment">Alignment</property>
- <property name="mnemonic-widget">alignment</property>
- <accessibility>
- <relation type="label-for" target="imAlignment"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">11</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">12</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="asiantypo">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imAsiantypo">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_defaultcharstyle.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbAsiantypo"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbAsiantypo">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="drawtemplatedialog|asiantypo">Asian Typography</property>
- <property name="mnemonic-widget">asiantypo</property>
- <accessibility>
- <relation type="label-for" target="imAsiantypo"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">12</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">13</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="tabs">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imTabs">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_hangingindent.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbTabs"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbTabs">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="drawtemplatedialog|tabs">Tabs</property>
- <property name="mnemonic-widget">tabs</property>
- <accessibility>
- <relation type="label-for" target="imTabs"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">13</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">14</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="background">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imBackground">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_backcolor.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbBackground"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbBackground">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="drawtemplatedialog|background">Highlighting</property>
- <property name="mnemonic-widget">background</property>
- <accessibility>
- <relation type="label-for" target="imBackground"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">14</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
</object>
<packing>
<property name="expand">False</property>
diff --git a/sc/uiconfig/scalc/ui/footerdialog.ui b/sc/uiconfig/scalc/ui/footerdialog.ui
index 4d009c4cc9b7..dd1d9263a697 100644
--- a/sc/uiconfig/scalc/ui/footerdialog.ui
+++ b/sc/uiconfig/scalc/ui/footerdialog.ui
@@ -1,34 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.38.0 -->
+<!-- Generated with glade 3.40.0 -->
<interface domain="sc">
<requires lib="gtk+" version="3.20"/>
<object class="GtkDialog" id="FooterDialog">
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">6</property>
<property name="title" translatable="yes" context="footerdialog|FooterDialog">Footers</property>
<property name="resizable">False</property>
<property name="modal">True</property>
- <property name="default_width">0</property>
- <property name="default_height">0</property>
- <property name="type_hint">dialog</property>
- <child>
- <placeholder/>
- </child>
+ <property name="default-width">0</property>
+ <property name="default-height">0</property>
+ <property name="type-hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
+ <property name="can-focus">False</property>
+ <property name="layout-style">end</property>
<child>
<object class="GtkButton" id="reset">
<property name="label" translatable="yes" context="stock">_Reset</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -41,10 +38,10 @@
<object class="GtkButton" id="ok">
<property name="label" translatable="yes" context="stock">_OK</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="can-default">True</property>
+ <property name="has-default">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -57,8 +54,8 @@
<object class="GtkButton" id="cancel">
<property name="label" translatable="yes" context="stock">_Cancel</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -71,8 +68,8 @@
<object class="GtkButton" id="help">
<property name="label" translatable="yes" context="stock">_Help</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -86,154 +83,20 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="pack_type">end</property>
+ <property name="pack-type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkNotebook" id="tabcontrol">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
+ <property name="tab-pos">left</property>
<property name="scrollable">True</property>
- <property name="enable_popup">True</property>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="footerfirst">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="footerdialog|footerfirst">Footer (first)</property>
- </object>
- <packing>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="footerright">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="footerdialog|footerright">Footer (right)</property>
- </object>
- <packing>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="footerleft">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="footerdialog|footerleft">Footer (left)</property>
- </object>
- <packing>
- <property name="position">1</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
+ <property name="enable-popup">True</property>
+ <property name="group-name">icons</property>
</object>
<packing>
<property name="expand">False</property>
diff --git a/sc/uiconfig/scalc/ui/formatcellsdialog.ui b/sc/uiconfig/scalc/ui/formatcellsdialog.ui
index 57e93f8e014d..1a4aa2cb7bc8 100644
--- a/sc/uiconfig/scalc/ui/formatcellsdialog.ui
+++ b/sc/uiconfig/scalc/ui/formatcellsdialog.ui
@@ -92,433 +92,8 @@
<property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="scrollable">True</property>
<property name="tab-pos">left</property>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkBox" id="numbers">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imNumbers">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_numberformatdecimal.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbNumbers"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbNumbers">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="formatcellsdialog|numbers">Numbers</property>
- <property name="mnemonic-widget">numbers</property>
- <accessibility>
- <relation type="label-for" target="imNumbers"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="font">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imFont">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_fontdialog.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbFont"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbFont">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="formatcellsdialog|font">Font</property>
- <property name="mnemonic-widget">font</property>
- <accessibility>
- <relation type="label-for" target="imFont"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="fonteffects">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imFonteffects">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_color.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbFonteffects"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbFonteffects">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="formatcellsdialog|fonteffects">Font Effects</property>
- <property name="mnemonic-widget">fonteffects</property>
- <accessibility>
- <relation type="label-for" target="imFonteffects"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">3</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="alignment">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imAlignment">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_alignblock.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbAlignment"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbAlignment">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="formatcellsdialog|alignment">Alignment</property>
- <property name="mnemonic-widget">alignment</property>
- <accessibility>
- <relation type="label-for" target="imAlignment"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">3</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">4</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="asiantypography">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imAsiantypography">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_defaultcharstyle.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbAsiantypography"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbAsiantypography">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="formatcellsdialog|asiantypography">Asian Typography</property>
- <property name="mnemonic-widget">asiantypography</property>
- <accessibility>
- <relation type="label-for" target="imAsiantypography"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">4</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">5</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="borders">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imBorders">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_borderdialog.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbBorders"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbBorders">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="formatcellsdialog|borders">Borders</property>
- <property name="mnemonic-widget">borders</property>
- <accessibility>
- <relation type="label-for" target="imBorders"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">5</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">6</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="background">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imBackground">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_backgroundcolor.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbBackground"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbBackground">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="formatcellsdialog|background">Background</property>
- <property name="mnemonic-widget">background</property>
- <accessibility>
- <relation type="label-for" target="imBackground"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">6</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">7</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="cellprotection">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imCellprotection">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_protect.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbCellprotection"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbCellprotection">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="formatcellsdialog|cellprotection">Cell Protection</property>
- <property name="mnemonic-widget">cellprotection</property>
- <accessibility>
- <relation type="label-for" target="imCellprotection"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">7</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
+ <property name="scrollable">True</property>
</object>
<packing>
<property name="expand">False</property>
diff --git a/sc/uiconfig/scalc/ui/headerdialog.ui b/sc/uiconfig/scalc/ui/headerdialog.ui
index d5668c12d29b..17258b1f2407 100644
--- a/sc/uiconfig/scalc/ui/headerdialog.ui
+++ b/sc/uiconfig/scalc/ui/headerdialog.ui
@@ -1,34 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.38.0 -->
+<!-- Generated with glade 3.40.0 -->
<interface domain="sc">
<requires lib="gtk+" version="3.20"/>
<object class="GtkDialog" id="HeaderDialog">
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">6</property>
<property name="title" translatable="yes" context="headerdialog|HeaderDialog">Headers</property>
<property name="resizable">False</property>
<property name="modal">True</property>
- <property name="default_width">0</property>
- <property name="default_height">0</property>
- <property name="type_hint">dialog</property>
- <child>
- <placeholder/>
- </child>
+ <property name="default-width">0</property>
+ <property name="default-height">0</property>
+ <property name="type-hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
+ <property name="can-focus">False</property>
+ <property name="layout-style">end</property>
<child>
<object class="GtkButton" id="reset">
<property name="label" translatable="yes" context="stock">_Reset</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -41,10 +38,10 @@
<object class="GtkButton" id="ok">
<property name="label" translatable="yes" context="stock">_OK</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="can-default">True</property>
+ <property name="has-default">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -57,8 +54,8 @@
<object class="GtkButton" id="cancel">
<property name="label" translatable="yes" context="stock">_Cancel</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -71,8 +68,8 @@
<object class="GtkButton" id="help">
<property name="label" translatable="yes" context="stock">_Help</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -86,154 +83,20 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="pack_type">end</property>
+ <property name="pack-type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkNotebook" id="tabcontrol">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
+ <property name="tab-pos">left</property>
<property name="scrollable">True</property>
- <property name="enable_popup">True</property>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="headerfirst">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="headerdialog|headerfirst">Header (first)</property>
- </object>
- <packing>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="headerright">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="headerdialog|headerright">Header (right)</property>
- </object>
- <packing>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="headerleft">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="headerdialog|headerleft">Header (left)</property>
- </object>
- <packing>
- <property name="position">1</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
+ <property name="enable-popup">True</property>
+ <property name="group-name">icons</property>
</object>
<packing>
<property name="expand">False</property>
diff --git a/sc/uiconfig/scalc/ui/headerfooterdialog.ui b/sc/uiconfig/scalc/ui/headerfooterdialog.ui
index f928d7e598bd..4da2c4a036b8 100644
--- a/sc/uiconfig/scalc/ui/headerfooterdialog.ui
+++ b/sc/uiconfig/scalc/ui/headerfooterdialog.ui
@@ -93,52 +93,10 @@
<property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
+ <property name="tab-pos">left</property>
<property name="scrollable">True</property>
<property name="enable-popup">True</property>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="header">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="headerfooterdialog|header">Header</property>
- </object>
- <packing>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="footer">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="headerfooterdialog|footer">Footer</property>
- </object>
- <packing>
- <property name="position">1</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
+ <property name="group-name">icons</property>
</object>
<packing>
<property name="expand">False</property>
diff --git a/sc/uiconfig/scalc/ui/leftfooterdialog.ui b/sc/uiconfig/scalc/ui/leftfooterdialog.ui
index b48ce782f30c..c0ed768afe14 100644
--- a/sc/uiconfig/scalc/ui/leftfooterdialog.ui
+++ b/sc/uiconfig/scalc/ui/leftfooterdialog.ui
@@ -93,28 +93,10 @@
<property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
+ <property name="tab-pos">left</property>
<property name="scrollable">True</property>
<property name="enable-popup">True</property>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="footerleft">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="leftfooterdialog|footerleft">Footer (left)</property>
- </object>
- <packing>
- <property name="tab-fill">False</property>
- </packing>
- </child>
+ <property name="group-name">icons</property>
</object>
<packing>
<property name="expand">False</property>
diff --git a/sc/uiconfig/scalc/ui/leftheaderdialog.ui b/sc/uiconfig/scalc/ui/leftheaderdialog.ui
index 779f4028a999..688a70a10bae 100644
--- a/sc/uiconfig/scalc/ui/leftheaderdialog.ui
+++ b/sc/uiconfig/scalc/ui/leftheaderdialog.ui
@@ -93,28 +93,10 @@
<property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
+ <property name="tab-pos">left</property>
<property name="scrollable">True</property>
<property name="enable-popup">True</property>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="headerleft">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="leftheaderdialog|headerleft">Header (left)</property>
- </object>
- <packing>
- <property name="tab-fill">False</property>
- </packing>
- </child>
+ <property name="group-name">icons</property>
</object>
<packing>
<property name="expand">False</property>
diff --git a/sc/uiconfig/scalc/ui/notebookbar.ui b/sc/uiconfig/scalc/ui/notebookbar.ui
index ffe980ce2baa..1f0d3782298e 100644
--- a/sc/uiconfig/scalc/ui/notebookbar.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar.ui
@@ -5402,19 +5402,9 @@
</packing>
</child>
<child>
- <object class="GtkToolButton" id="Insert-Polygon_Unfilled1">
+ <object class="GtkToolButton" id="Insert-ConnectorToolbox">
<property name="visible">True</property>
- <property name="action_name">.uno:Polygon_Unfilled</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolButton" id="Insert-Bezier_Unfilled1">
- <property name="visible">True</property>
- <property name="action_name">.uno:Bezier_Unfilled</property>
+ <property name="action_name">.uno:ConnectorToolbox</property>
</object>
<packing>
<property name="expand">False</property>
diff --git a/sc/uiconfig/scalc/ui/notebookbar_compact.ui b/sc/uiconfig/scalc/ui/notebookbar_compact.ui
index 0ed02fc4c71e..242aa8009fda 100644
--- a/sc/uiconfig/scalc/ui/notebookbar_compact.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar_compact.ui
@@ -5405,6 +5405,16 @@
</packing>
</child>
<child>
+ <object class="GtkToolButton" id="Insert-ConnectorToolbox">
+ <property name="visible">True</property>
+ <property name="action_name">.uno:ConnectorToolbox</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkToolButton" id="Insert-ArrowsToolbox">
<property name="visible">True</property>
<property name="action_name">.uno:ArrowsToolbox</property>
diff --git a/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui b/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui
index 831699851d6a..7c35db8f341f 100644
--- a/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui
@@ -6404,6 +6404,16 @@
</packing>
</child>
<child>
+ <object class="GtkToolButton" id="Draw-ConnectorToolbox">
+ <property name="visible">True</property>
+ <property name="action_name">.uno:ConnectorToolbox</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkToolButton" id="Draw-ArrowsToolbox">
<property name="visible">True</property>
<property name="action_name">.uno:ArrowsToolbox</property>
diff --git a/sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui b/sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui
index 9caf60e83aaf..082c0c7fc7b0 100644
--- a/sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui
@@ -7504,6 +7504,16 @@
</packing>
</child>
<child>
+ <object class="GtkToolButton" id="ConnectorToolbox">
+ <property name="visible">True</property>
+ <property name="action_name">.uno:ConnectorToolbox</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkToolButton" id="ArrowsToolbox">
<property name="visible">True</property>
<property name="action_name">.uno:ArrowsToolbox</property>
diff --git a/sc/uiconfig/scalc/ui/optdlg.ui b/sc/uiconfig/scalc/ui/optdlg.ui
index 8dd869f817af..0506a5f47876 100644
--- a/sc/uiconfig/scalc/ui/optdlg.ui
+++ b/sc/uiconfig/scalc/ui/optdlg.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.38.2 -->
+<!-- Generated with glade 3.40.0 -->
<interface domain="sc">
<requires lib="gtk+" version="3.20"/>
<object class="GtkBox" id="optCalcPrintPage">
@@ -24,22 +24,16 @@
<property name="row-spacing">6</property>
<property name="column-spacing">6</property>
<child>
- <object class="GtkCheckButton" id="suppressCB">
- <property name="label" translatable="yes" context="optdlg|suppressCB">_Suppress output of empty pages</property>
- <property name="visible">True</property>
- <property name="can-focus">True</property>
- <property name="receives-default">False</property>
- <property name="use-underline">True</property>
- <property name="draw-indicator">True</property>
- <child internal-child="accessible">
- <object class="AtkObject" id="suppressCB-atkobject">
- <property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|suppressCB">Specifies that empty pages that have no cell contents or draw objects are not printed.</property>
- </object>
- </child>
+ <object class="GtkImage" id="lockforceBreaksCB">
+ <property name="can-focus">False</property>
+ <property name="no-show-all">True</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="icon-name">res/lock.png</property>
</object>
<packing>
- <property name="left-attach">1</property>
- <property name="top-attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
@@ -57,7 +51,7 @@
</packing>
</child>
<child>
- <object class="GtkImage" id="lockforceBreaksCB">
+ <object class="GtkImage" id="locksuppressCB">
<property name="can-focus">False</property>
<property name="no-show-all">True</property>
<property name="halign">center</property>
@@ -66,19 +60,25 @@
</object>
<packing>
<property name="left-attach">0</property>
- <property name="top-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
- <object class="GtkImage" id="locksuppressCB">
- <property name="can-focus">False</property>
- <property name="no-show-all">True</property>
- <property name="halign">center</property>
- <property name="valign">center</property>
- <property name="icon-name">res/lock.png</property>
+ <object class="GtkCheckButton" id="suppressCB">
+ <property name="label" translatable="yes" context="optdlg|suppressCB">_Suppress output of empty pages</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="suppressCB-atkobject">
+ <property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|suppressCB">Specifies that empty pages that have no cell contents or draw objects are not printed.</property>
+ </object>
+ </child>
</object>
<packing>
- <property name="left-attach">0</property>
+ <property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
diff --git a/sc/uiconfig/scalc/ui/pagetemplatedialog.ui b/sc/uiconfig/scalc/ui/pagetemplatedialog.ui
index 5d19567e6d7d..7a1014feeff1 100644
--- a/sc/uiconfig/scalc/ui/pagetemplatedialog.ui
+++ b/sc/uiconfig/scalc/ui/pagetemplatedialog.ui
@@ -110,377 +110,6 @@
<property name="tab-pos">left</property>
<property name="tab-pos">left</property>
<property name="enable-popup">True</property>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkBox" id="organizer">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imOrganizer">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_browseview.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbOrganizer"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbOrganizer">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="pagetemplatedialog|organizer">General</property>
- <property name="mnemonic-widget">organizer</property>
- <accessibility>
- <relation type="label-for" target="imOrganizer"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="page">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imPage">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_attributepagesize.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbPage"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbPage">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="pagetemplatedialog|page">Page</property>
- <property name="mnemonic-widget">page</property>
- <accessibility>
- <relation type="label-for" target="imPage"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="borders">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imBorders">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_borderdialog.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbBorders"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbBorders">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="pagetemplatedialog|borders">Borders</property>
- <property name="mnemonic-widget">borders</property>
- <accessibility>
- <relation type="label-for" target="imBorders"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">3</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="background">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imBackground">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_backgroundcolor.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbBackground"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbBackground">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="pagetemplatedialog|background">Background</property>
- <property name="mnemonic-widget">background</property>
- <accessibility>
- <relation type="label-for" target="imBackground"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">3</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">4</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="header">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imHeader">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_insertheader.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbHeader"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbHeader">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="pagetemplatedialog|header">Header</property>
- <property name="mnemonic-widget">header</property>
- <accessibility>
- <relation type="label-for" target="imHeader"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">4</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">5</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="footer">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imFooter">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_insertfooter.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbFooter"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbFooter">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="pagetemplatedialog|footer">Footer</property>
- <property name="mnemonic-widget">footer</property>
- <accessibility>
- <relation type="label-for" target="imFooter"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">5</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">6</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="sheet">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imSheet">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_printersetup.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbSheet"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbSheet">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="pagetemplatedialog|sheet">Sheet</property>
- <property name="mnemonic-widget">sheet</property>
- <accessibility>
- <relation type="label-for" target="imSheet"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">6</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
</object>
<packing>
<property name="expand">False</property>
diff --git a/sc/uiconfig/scalc/ui/paradialog.ui b/sc/uiconfig/scalc/ui/paradialog.ui
index 3b868936a3e0..06960516abbe 100644
--- a/sc/uiconfig/scalc/ui/paradialog.ui
+++ b/sc/uiconfig/scalc/ui/paradialog.ui
@@ -90,218 +90,9 @@
<property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="scrollable">True</property>
<property name="tab-pos">left</property>
+ <property name="scrollable">True</property>
<property name="group-name">icons</property>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkBox" id="indents">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imParaIndent">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/32/paraspaceincrease.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbParaIndent"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbParaIndent">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="paradialog|labelTP_PARA_STD">Indents &amp; Spacing</property>
- <property name="mnemonic-widget">indents</property>
- <accessibility>
- <relation type="label-for" target="imParaIndent"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="alignment">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imAlignment">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/32/alignblock.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbAlignment"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbAlignment">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="paradialog|labelTP_PARA_ALIGN">Alignment</property>
- <property name="mnemonic-widget">alignment</property>
- <accessibility>
- <relation type="label-for" target="imAlignment"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="asiantypo">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imAsiantypo">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/32/defaultcharstyle.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbAsiantypo"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbAsiantypo">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="paradialog|labelTP_PARA_ASIAN">Asian Typography</property>
- <property name="mnemonic-widget">asiantypo</property>
- <accessibility>
- <relation type="label-for" target="imAsiantypo"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">3</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="tabs">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imTabs">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/32/hangingindent.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbTabs"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbTabs">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="paradialog|labelTP_TABULATOR">Tabs</property>
- <property name="mnemonic-widget">tabs</property>
- <accessibility>
- <relation type="label-for" target="imTabs"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">3</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
</object>
<packing>
<property name="expand">False</property>
diff --git a/sc/uiconfig/scalc/ui/paratemplatedialog.ui b/sc/uiconfig/scalc/ui/paratemplatedialog.ui
index 48c7e457b101..6056092f7ad9 100644
--- a/sc/uiconfig/scalc/ui/paratemplatedialog.ui
+++ b/sc/uiconfig/scalc/ui/paratemplatedialog.ui
@@ -109,485 +109,6 @@
<property name="tab-pos">left</property>
<property name="scrollable">True</property>
<property name="tab-pos">left</property>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkBox" id="organizer">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imOrganizer">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_browseview.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbOrganizer"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbOrganizer">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="paratemplatedialog|organizer">General</property>
- <property name="mnemonic-widget">organizer</property>
- <accessibility>
- <relation type="label-for" target="imOrganizer"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="numbers">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imNumbers">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_numberformatdecimal.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbNumbers"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbNumbers">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="paratemplatedialog|numbers">Numbers</property>
- <property name="mnemonic-widget">numbers</property>
- <accessibility>
- <relation type="label-for" target="imNumbers"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="font">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imFont">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_fontdialog.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbFont"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbFont">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="paratemplatedialog|font">Font</property>
- <property name="mnemonic-widget">font</property>
- <accessibility>
- <relation type="label-for" target="imFont"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">3</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="fonteffects">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imFonteffects">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_color.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbFonteffects"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbFonteffects">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="paratemplatedialog|fonteffects">Font Effects</property>
- <property name="mnemonic-widget">fonteffects</property>
- <accessibility>
- <relation type="label-for" target="imFonteffects"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">3</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">4</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="alignment">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imAlignment">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_alignblock.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbAlignment"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbAlignment">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="paratemplatedialog|alignment">Alignment</property>
- <property name="mnemonic-widget">alignment</property>
- <accessibility>
- <relation type="label-for" target="imAlignment"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">4</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">5</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="asiantypo">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imAsiantypo">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_defaultcharstyle.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbAsiantypo"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbAsiantypo">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="paratemplatedialog|asiantypo">Asian Typography</property>
- <property name="mnemonic-widget">asiantypo</property>
- <accessibility>
- <relation type="label-for" target="imAsiantypo"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">5</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">6</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="borders">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imBorders">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_borderdialog.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbBorders"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbBorders">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="paratemplatedialog|borders">Borders</property>
- <property name="mnemonic-widget">borders</property>
- <accessibility>
- <relation type="label-for" target="imBorders"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">6</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">7</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="background">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imBackground">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_backgroundcolor.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbBackground"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbBackground">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="paratemplatedialog|background">Background</property>
- <property name="mnemonic-widget">background</property>
- <accessibility>
- <relation type="label-for" target="imBackground"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">7</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">8</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkBox" id="protection">
- <property name="can-focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="imProtection">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="icon-name">cmd/lc_protect.png</property>
- <accessibility>
- <relation type="labelled-by" target="lbProtection"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lbProtection">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="paratemplatedialog|protection">Cell Protection</property>
- <property name="mnemonic-widget">protection</property>
- <accessibility>
- <relation type="label-for" target="imProtection"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">8</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
</object>
<packing>
<property name="expand">False</property>
diff --git a/sc/uiconfig/scalc/ui/rightfooterdialog.ui b/sc/uiconfig/scalc/ui/rightfooterdialog.ui
index 02502e8cfefd..e34a73d3e452 100644
--- a/sc/uiconfig/scalc/ui/rightfooterdialog.ui
+++ b/sc/uiconfig/scalc/ui/rightfooterdialog.ui
@@ -93,28 +93,10 @@
<property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
+ <property name="tab-pos">left</property>
<property name="scrollable">True</property>
<property name="enable-popup">True</property>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="footerright">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="rightfooterdialog|footerright">Footer (right)</property>
- </object>
- <packing>
- <property name="tab-fill">False</property>
- </packing>
- </child>
+ <property name="group-name">icons</property>
</object>
<packing>
<property name="expand">False</property>
diff --git a/sc/uiconfig/scalc/ui/rightheaderdialog.ui b/sc/uiconfig/scalc/ui/rightheaderdialog.ui
index 340df22acdc2..7441d73df5c3 100644
--- a/sc/uiconfig/scalc/ui/rightheaderdialog.ui
+++ b/sc/uiconfig/scalc/ui/rightheaderdialog.ui
@@ -93,28 +93,10 @@
<property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
+ <property name="tab-pos">left</property>
<property name="scrollable">True</property>
<property name="enable-popup">True</property>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="headerright">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="rightheaderdialog|headerright">Header (right)</property>
- </object>
- <packing>
- <property name="tab-fill">False</property>
- </packing>
- </child>
+ <property name="group-name">icons</property>
</object>
<packing>
<property name="expand">False</property>
diff --git a/sc/uiconfig/scalc/ui/sharedfirstfooterdialog.ui b/sc/uiconfig/scalc/ui/sharedfirstfooterdialog.ui
index dd716a7f8a8d..15353b463fa3 100644
--- a/sc/uiconfig/scalc/ui/sharedfirstfooterdialog.ui
+++ b/sc/uiconfig/scalc/ui/sharedfirstfooterdialog.ui
@@ -1,34 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.38.0 -->
+<!-- Generated with glade 3.40.0 -->
<interface domain="sc">
<requires lib="gtk+" version="3.20"/>
<object class="GtkDialog" id="SharedFirstFooterDialog">
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">6</property>
<property name="title" translatable="yes" context="sharedfirstfooterdialog|SharedFirstFooterDialog">Footers</property>
<property name="resizable">False</property>
<property name="modal">True</property>
- <property name="default_width">0</property>
- <property name="default_height">0</property>
- <property name="type_hint">dialog</property>
- <child>
- <placeholder/>
- </child>
+ <property name="default-width">0</property>
+ <property name="default-height">0</property>
+ <property name="type-hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
+ <property name="can-focus">False</property>
+ <property name="layout-style">end</property>
<child>
<object class="GtkButton" id="reset">
<property name="label" translatable="yes" context="stock">_Reset</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -41,10 +38,10 @@
<object class="GtkButton" id="ok">
<property name="label" translatable="yes" context="stock">_OK</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="can-default">True</property>
+ <property name="has-default">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -57,8 +54,8 @@
<object class="GtkButton" id="cancel">
<property name="label" translatable="yes" context="stock">_Cancel</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -71,8 +68,8 @@
<object class="GtkButton" id="help">
<property name="label" translatable="yes" context="stock">_Help</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -86,110 +83,20 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="pack_type">end</property>
+ <property name="pack-type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkNotebook" id="tabcontrol">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
+ <property name="tab-pos">left</property>
<property name="scrollable">True</property>
- <property name="enable_popup">True</property>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="footerright">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="sharedfirstfooterdialog|footerright">Footer (right)</property>
- </object>
- <packing>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="footerleft">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="sharedfirstfooterdialog|footerleft">Footer (left)</property>
- </object>
- <packing>
- <property name="position">1</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
+ <property name="enable-popup">True</property>
+ <property name="group-name">icons</property>
</object>
<packing>
<property name="expand">False</property>
diff --git a/sc/uiconfig/scalc/ui/sharedfirstheaderdialog.ui b/sc/uiconfig/scalc/ui/sharedfirstheaderdialog.ui
index 1d23a12f320a..2ac7f9287836 100644
--- a/sc/uiconfig/scalc/ui/sharedfirstheaderdialog.ui
+++ b/sc/uiconfig/scalc/ui/sharedfirstheaderdialog.ui
@@ -1,34 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.38.0 -->
+<!-- Generated with glade 3.40.0 -->
<interface domain="sc">
<requires lib="gtk+" version="3.20"/>
<object class="GtkDialog" id="SharedFirstHeaderDialog">
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">6</property>
<property name="title" translatable="yes" context="sharedfirstheaderdialog|SharedFirstHeaderDialog">Headers</property>
<property name="resizable">False</property>
<property name="modal">True</property>
- <property name="default_width">0</property>
- <property name="default_height">0</property>
- <property name="type_hint">dialog</property>
- <child>
- <placeholder/>
- </child>
+ <property name="default-width">0</property>
+ <property name="default-height">0</property>
+ <property name="type-hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
+ <property name="can-focus">False</property>
+ <property name="layout-style">end</property>
<child>
<object class="GtkButton" id="reset">
<property name="label" translatable="yes" context="stock">_Reset</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -41,10 +38,10 @@
<object class="GtkButton" id="ok">
<property name="label" translatable="yes" context="stock">_OK</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="can-default">True</property>
+ <property name="has-default">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -57,8 +54,8 @@
<object class="GtkButton" id="cancel">
<property name="label" translatable="yes" context="stock">_Cancel</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -71,8 +68,8 @@
<object class="GtkButton" id="help">
<property name="label" translatable="yes" context="stock">_Help</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -86,110 +83,20 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="pack_type">end</property>
+ <property name="pack-type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkNotebook" id="tabcontrol">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
+ <property name="tab-pos">left</property>
<property name="scrollable">True</property>
- <property name="enable_popup">True</property>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="headerright">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="sharedfirstheaderdialog|headerright">Header (right)</property>
- </object>
- <packing>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="headerleft">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="sharedfirstheaderdialog|headerleft">Header (left)</property>
- </object>
- <packing>
- <property name="position">1</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
+ <property name="enable-popup">True</property>
+ <property name="group-name">icons</property>
</object>
<packing>
<property name="expand">False</property>
diff --git a/sc/uiconfig/scalc/ui/sharedfooterdialog.ui b/sc/uiconfig/scalc/ui/sharedfooterdialog.ui
index 6ef6701102a2..5fc3889b9e3f 100644
--- a/sc/uiconfig/scalc/ui/sharedfooterdialog.ui
+++ b/sc/uiconfig/scalc/ui/sharedfooterdialog.ui
@@ -93,76 +93,10 @@
<property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
+ <property name="tab-pos">left</property>
<property name="scrollable">True</property>
<property name="enable-popup">True</property>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="headerright">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="sharedfooterdialog|headerright">Header (right)</property>
- </object>
- <packing>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="headerleft">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="sharedfooterdialog|headerleft">Header (left)</property>
- </object>
- <packing>
- <property name="position">1</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="footer">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="sharedfooterdialog|footer">Footer</property>
- </object>
- <packing>
- <property name="position">2</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
+ <property name="group-name">icons</property>
</object>
<packing>
<property name="expand">False</property>
diff --git a/sc/uiconfig/scalc/ui/sharedheaderdialog.ui b/sc/uiconfig/scalc/ui/sharedheaderdialog.ui
index 2a68d9814bb5..0d9ba867110b 100644
--- a/sc/uiconfig/scalc/ui/sharedheaderdialog.ui
+++ b/sc/uiconfig/scalc/ui/sharedheaderdialog.ui
@@ -93,76 +93,10 @@
<property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
+ <property name="tab-pos">left</property>
<property name="scrollable">True</property>
<property name="enable-popup">True</property>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="header">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="sharedheaderdialog|header">Header</property>
- </object>
- <packing>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="footerright">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="sharedheaderdialog|footerright">Footer (right)</property>
- </object>
- <packing>
- <property name="position">1</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="footerleft">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="sharedheaderdialog|footerleft">Footer (left)</property>
- </object>
- <packing>
- <property name="position">2</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
+ <property name="group-name">icons</property>
</object>
<packing>
<property name="expand">False</property>
diff --git a/sc/uiconfig/scalc/ui/sharedleftfooterdialog.ui b/sc/uiconfig/scalc/ui/sharedleftfooterdialog.ui
index 3875e35eaaa5..d428da49b897 100644
--- a/sc/uiconfig/scalc/ui/sharedleftfooterdialog.ui
+++ b/sc/uiconfig/scalc/ui/sharedleftfooterdialog.ui
@@ -1,34 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.38.0 -->
+<!-- Generated with glade 3.40.0 -->
<interface domain="sc">
<requires lib="gtk+" version="3.20"/>
<object class="GtkDialog" id="SharedLeftFooterDialog">
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">6</property>
<property name="title" translatable="yes" context="sharedleftfooterdialog|SharedLeftFooterDialog">Footers</property>
<property name="resizable">False</property>
<property name="modal">True</property>
- <property name="default_width">0</property>
- <property name="default_height">0</property>
- <property name="type_hint">dialog</property>
- <child>
- <placeholder/>
- </child>
+ <property name="default-width">0</property>
+ <property name="default-height">0</property>
+ <property name="type-hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
+ <property name="can-focus">False</property>
+ <property name="layout-style">end</property>
<child>
<object class="GtkButton" id="reset">
<property name="label" translatable="yes" context="stock">_Reset</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -41,10 +38,10 @@
<object class="GtkButton" id="ok">
<property name="label" translatable="yes" context="stock">_OK</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="can-default">True</property>
+ <property name="has-default">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -57,8 +54,8 @@
<object class="GtkButton" id="cancel">
<property name="label" translatable="yes" context="stock">_Cancel</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -71,8 +68,8 @@
<object class="GtkButton" id="help">
<property name="label" translatable="yes" context="stock">_Help</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -86,106 +83,20 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="pack_type">end</property>
+ <property name="pack-type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkNotebook" id="tabcontrol">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
+ <property name="tab-pos">left</property>
<property name="scrollable">True</property>
- <property name="enable_popup">True</property>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="footerfirst">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="sharedleftfooterdialog|footerfirst">Footer (first)</property>
- </object>
- <packing>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="footerright">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="sharedleftfooterdialog|footerright">Footer (rest)</property>
- </object>
- <packing>
- <property name="tab_fill">False</property>
- </packing>
- </child>
+ <property name="enable-popup">True</property>
+ <property name="group-name">icons</property>
</object>
<packing>
<property name="expand">False</property>
diff --git a/sc/uiconfig/scalc/ui/sharedleftheaderdialog.ui b/sc/uiconfig/scalc/ui/sharedleftheaderdialog.ui
index 305767acebcb..30c8a32cff62 100644
--- a/sc/uiconfig/scalc/ui/sharedleftheaderdialog.ui
+++ b/sc/uiconfig/scalc/ui/sharedleftheaderdialog.ui
@@ -1,34 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.38.0 -->
+<!-- Generated with glade 3.40.0 -->
<interface domain="sc">
<requires lib="gtk+" version="3.20"/>
<object class="GtkDialog" id="SharedLeftHeaderDialog">
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">6</property>
<property name="title" translatable="yes" context="sharedleftheaderdialog|SharedLeftHeaderDialog">Headers</property>
<property name="resizable">False</property>
<property name="modal">True</property>
- <property name="default_width">0</property>
- <property name="default_height">0</property>
- <property name="type_hint">dialog</property>
- <child>
- <placeholder/>
- </child>
+ <property name="default-width">0</property>
+ <property name="default-height">0</property>
+ <property name="type-hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
+ <property name="can-focus">False</property>
+ <property name="layout-style">end</property>
<child>
<object class="GtkButton" id="reset">
<property name="label" translatable="yes" context="stock">_Reset</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -41,10 +38,10 @@
<object class="GtkButton" id="ok">
<property name="label" translatable="yes" context="stock">_OK</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="can-default">True</property>
+ <property name="has-default">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -57,8 +54,8 @@
<object class="GtkButton" id="cancel">
<property name="label" translatable="yes" context="stock">_Cancel</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -71,8 +68,8 @@
<object class="GtkButton" id="help">
<property name="label" translatable="yes" context="stock">_Help</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="use-underline">True</property>
</object>
<packing>
@@ -86,106 +83,20 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="pack_type">end</property>
+ <property name="pack-type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkNotebook" id="tabcontrol">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
+ <property name="tab-pos">left</property>
<property name="scrollable">True</property>
- <property name="enable_popup">True</property>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="headerfirst">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="sharedleftheaderdialog|headerfirst">Header (first)</property>
- </object>
- <packing>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="headerright">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="sharedleftheaderdialog|headerright">Header (rest)</property>
- </object>
- <packing>
- <property name="tab_fill">False</property>
- </packing>
- </child>
+ <property name="enable-popup">True</property>
+ <property name="group-name">icons</property>
</object>
<packing>
<property name="expand">False</property>
diff --git a/sc/uiconfig/scalc/ui/sortdialog.ui b/sc/uiconfig/scalc/ui/sortdialog.ui
index 7149b3e63425..a346e676a313 100644
--- a/sc/uiconfig/scalc/ui/sortdialog.ui
+++ b/sc/uiconfig/scalc/ui/sortdialog.ui
@@ -92,52 +92,10 @@
<property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
+ <property name="tab-pos">left</property>
<property name="scrollable">True</property>
<property name="enable-popup">True</property>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="criteria">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="sortdialog|criteria">Sort Criteria</property>
- </object>
- <packing>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="options">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="sortdialog|options">Options</property>
- </object>
- <packing>
- <property name="position">1</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
+ <property name="group-name">icons</property>
</object>
<packing>
<property name="expand">False</property>
diff --git a/sc/uiconfig/scalc/ui/statisticsinfopage.ui b/sc/uiconfig/scalc/ui/statisticsinfopage.ui
index 2e3d7604ee8c..3e2b41ea31f4 100644
--- a/sc/uiconfig/scalc/ui/statisticsinfopage.ui
+++ b/sc/uiconfig/scalc/ui/statisticsinfopage.ui
@@ -1,125 +1,126 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.40.0 -->
<interface domain="sc">
<requires lib="gtk+" version="3.20"/>
<object class="GtkFrame" id="StatisticsInfoPage">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">6</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=2 n-rows=4 -->
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">12</property>
+ <property name="can-focus">False</property>
<property name="margin-start">12</property>
<property name="margin-top">6</property>
+ <property name="row-spacing">6</property>
+ <property name="column-spacing">12</property>
<child>
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes" context="statisticsinfopage|label6">Pages:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">nopages</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">nopages</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="nopages">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="halign">start</property>
<property name="hexpand">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes" context="statisticsinfopage|label5">Cells:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">nocells</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">nocells</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="nocells">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="halign">start</property>
<property name="hexpand">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes" context="statisticsinfopage|label2">Sheets:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">nosheets</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">nosheets</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="nosheets">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="halign">start</property>
<property name="hexpand">True</property>
- <property name="use_underline">True</property>
+ <property name="use-underline">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes" context="statisticsinfopage|label3">Formula groups:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">noformula</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">noformula</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="noformula">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="halign">start</property>
<property name="hexpand">True</property>
- <property name="use_underline">True</property>
+ <property name="use-underline">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">3</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">3</property>
</packing>
</child>
</object>
@@ -127,7 +128,7 @@
<child type="label">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="statisticsinfopage|label1">Document: </property>
<attributes>
<attribute name="weight" value="bold"/>
diff --git a/sc/uiconfig/scalc/ui/subtotaldialog.ui b/sc/uiconfig/scalc/ui/subtotaldialog.ui
index f850bac550b1..f3d9d9cb45a0 100644
--- a/sc/uiconfig/scalc/ui/subtotaldialog.ui
+++ b/sc/uiconfig/scalc/ui/subtotaldialog.ui
@@ -108,100 +108,10 @@
<property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
+ <property name="tab-pos">left</property>
<property name="scrollable">True</property>
<property name="enable-popup">True</property>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="1stgroup">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="subtotaldialog|1stgroup">1st Group</property>
- </object>
- <packing>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="2ndgroup">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="subtotaldialog|2ndgroup">2nd Group</property>
- </object>
- <packing>
- <property name="position">1</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="3rdgroup">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="subtotaldialog|3rdgroup">3rd Group</property>
- </object>
- <packing>
- <property name="position">2</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">3</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="options">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="subtotaldialog|options">Options</property>
- </object>
- <packing>
- <property name="position">3</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
+ <property name="group-name">icons</property>
</object>
<packing>
<property name="expand">False</property>
diff --git a/sc/uiconfig/scalc/ui/validationdialog.ui b/sc/uiconfig/scalc/ui/validationdialog.ui
index 9b91467c1ec8..fe1806ed132a 100644
--- a/sc/uiconfig/scalc/ui/validationdialog.ui
+++ b/sc/uiconfig/scalc/ui/validationdialog.ui
@@ -98,76 +98,10 @@
<property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
+ <property name="tab-pos">left</property>
<property name="scrollable">True</property>
<property name="enable-popup">True</property>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="criteria">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="validationdialog|criteria">Criteria</property>
- </object>
- <packing>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="inputhelp">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="validationdialog|inputhelp">Input Help</property>
- </object>
- <packing>
- <property name="position">1</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
- <child>
- <!-- n-columns=1 n-rows=1 -->
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="erroralert">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="validationdialog|erroralert">Error Alert</property>
- </object>
- <packing>
- <property name="position">2</property>
- <property name="tab-fill">False</property>
- </packing>
- </child>
+ <property name="group-name">icons</property>
</object>
<packing>
<property name="expand">False</property>