[Libreoffice-commits] .: Branch 'feature/calc-matrix-rework' - 285 commits - chart2/source chart2/uiconfig .gitignore sc/addin scaddins/source sccomp/source sc/inc sc/qa sc/source sc/uiconfig sc/util

Kohei Yoshida kohei at kemper.freedesktop.org
Thu Dec 16 08:54:33 PST 2010


 .gitignore                                                                  |    3 
 chart2/source/controller/accessibility/AccessibleBase.cxx                   |    1 
 chart2/source/controller/accessibility/AccessibleChartElement.cxx           |   31 
 chart2/source/controller/accessibility/AccessibleChartView.cxx              |    3 
 chart2/source/controller/accessibility/ChartElementFactory.cxx              |   64 
 chart2/source/controller/chartapiwrapper/AreaWrapper.cxx                    |    1 
 chart2/source/controller/chartapiwrapper/AxisWrapper.cxx                    |    3 
 chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx           |   13 
 chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx         |    6 
 chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx                 |    6 
 chart2/source/controller/chartapiwrapper/DiagramWrapper.hxx                 |    5 
 chart2/source/controller/chartapiwrapper/GridWrapper.cxx                    |    1 
 chart2/source/controller/chartapiwrapper/LegendWrapper.cxx                  |    4 
 chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx              |    5 
 chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.hxx              |    3 
 chart2/source/controller/chartapiwrapper/TitleWrapper.cxx                   |    4 
 chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx               |    3 
 chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx               |    3 
 chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx               |    1 
 chart2/source/controller/dialogs/Bitmaps.src                                |   14 
 chart2/source/controller/dialogs/Bitmaps_HC.hrc                             |  213 -
 chart2/source/controller/dialogs/Bitmaps_HC.src                             |  543 ---
 chart2/source/controller/dialogs/ChartTypeDialogController.cxx              |  303 +-
 chart2/source/controller/dialogs/ChartTypeDialogController.hxx              |   90 
 chart2/source/controller/dialogs/DataBrowser.cxx                            |   64 
 chart2/source/controller/dialogs/ObjectNameProvider.cxx                     |    7 
 chart2/source/controller/dialogs/RangeSelectionButton.cxx                   |    6 
 chart2/source/controller/dialogs/ResourceIds.hrc                            |    8 
 chart2/source/controller/dialogs/Strings.src                                |    7 
 chart2/source/controller/dialogs/Strings_AdditionalControls.src             |    2 
 chart2/source/controller/dialogs/Strings_Scale.src                          |    2 
 chart2/source/controller/dialogs/Strings_Statistic.src                      |    2 
 chart2/source/controller/dialogs/TabPages.hrc                               |   13 
 chart2/source/controller/dialogs/dlg_ChartType.src                          |    8 
 chart2/source/controller/dialogs/dlg_CreationWizard.src                     |    2 
 chart2/source/controller/dialogs/dlg_DataEditor.cxx                         |   88 
 chart2/source/controller/dialogs/dlg_DataEditor.hrc                         |    5 
 chart2/source/controller/dialogs/dlg_DataEditor.src                         |   11 
 chart2/source/controller/dialogs/dlg_DataSource.src                         |    2 
 chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx                    |    1 
 chart2/source/controller/dialogs/dlg_InsertAxis_Grid.src                    |    9 
 chart2/source/controller/dialogs/dlg_InsertDataLabel.src                    |    2 
 chart2/source/controller/dialogs/dlg_InsertErrorBars.src                    |    3 
 chart2/source/controller/dialogs/dlg_InsertLegend.src                       |    2 
 chart2/source/controller/dialogs/dlg_InsertTitle.src                        |    2 
 chart2/source/controller/dialogs/dlg_InsertTrendline.src                    |    3 
 chart2/source/controller/dialogs/dlg_ObjectProperties.cxx                   |    3 
 chart2/source/controller/dialogs/dlg_ObjectProperties.src                   |    2 
 chart2/source/controller/dialogs/dlg_ShapeFont.src                          |    2 
 chart2/source/controller/dialogs/dlg_ShapeParagraph.src                     |    2 
 chart2/source/controller/dialogs/dlg_View3D.src                             |    5 
 chart2/source/controller/dialogs/makefile.mk                                |   16 
 chart2/source/controller/dialogs/res_BarGeometry.src                        |    2 
 chart2/source/controller/dialogs/res_ErrorBar.cxx                           |   28 
 chart2/source/controller/dialogs/res_TextSeparator.src                      |    4 
 chart2/source/controller/dialogs/res_Trendline.cxx                          |   36 
 chart2/source/controller/dialogs/tp_3D_SceneAppearance.src                  |    9 
 chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx                    |    1 
 chart2/source/controller/dialogs/tp_3D_SceneGeometry.src                    |    9 
 chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx                |   48 
 chart2/source/controller/dialogs/tp_AxisPositions.hxx                       |    1 
 chart2/source/controller/dialogs/tp_ChartType.cxx                           |   22 
 chart2/source/controller/dialogs/tp_ChartType.src                           |    6 
 chart2/source/controller/dialogs/tp_DataLabel.src                           |    2 
 chart2/source/controller/dialogs/tp_DataSource.src                          |    2 
 chart2/source/controller/dialogs/tp_ErrorBars.src                           |    3 
 chart2/source/controller/dialogs/tp_LegendPosition.src                      |    6 
 chart2/source/controller/dialogs/tp_Location.src                            |    6 
 chart2/source/controller/dialogs/tp_PointGeometry.src                       |    3 
 chart2/source/controller/dialogs/tp_PolarOptions.src                        |    2 
 chart2/source/controller/dialogs/tp_RangeChooser.cxx                        |    2 
 chart2/source/controller/dialogs/tp_RangeChooser.src                        |    2 
 chart2/source/controller/dialogs/tp_Scale.src                               |   23 
 chart2/source/controller/dialogs/tp_SeriesToAxis.src                        |   23 
 chart2/source/controller/dialogs/tp_TitleRotation.src                       |    4 
 chart2/source/controller/dialogs/tp_Trendline.src                           |    3 
 chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.src             |    2 
 chart2/source/controller/drawinglayer/DrawViewWrapper.cxx                   |   38 
 chart2/source/controller/inc/HelpIds.hrc                                    |   13 
 chart2/source/controller/inc/MenuResIds.hrc                                 |    3 
 chart2/source/controller/inc/ShapeController.hrc                            |    3 
 chart2/source/controller/inc/dlg_DataEditor.hxx                             |    3 
 chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx               |    2 
 chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx  |    9 
 chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx          |    1 
 chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx    |   17 
 chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx |   18 
 chart2/source/controller/main/DrawCommandDispatch.hrc                       |    3 
 chart2/source/controller/menus/ShapeContextMenu.src                         |    6 
 chart2/source/controller/menus/ShapeEditContextMenu.src                     |    2 
 chart2/source/inc/DiagramHelper.hxx                                         |    2 
 chart2/source/inc/Strings.hrc                                               |  117 
 chart2/source/model/filter/XMLFilter.cxx                                    |    2 
 chart2/source/model/inc/BaseCoordinateSystem.hxx                            |   22 
 chart2/source/model/inc/ChartTypeManager.hxx                                |    1 
 chart2/source/model/inc/Diagram.hxx                                         |    9 
 chart2/source/model/main/Axis.hxx                                           |    7 
 chart2/source/model/main/ChartModel.cxx                                     |   26 
 chart2/source/model/main/ChartModel.hxx                                     |    7 
 chart2/source/model/main/DataPointProperties.hxx                            |    1 
 chart2/source/model/main/FormattedString.hxx                                |    7 
 chart2/source/model/main/Legend.hxx                                         |    7 
 chart2/source/model/main/PageBackground.hxx                                 |    7 
 chart2/source/model/main/Title.hxx                                          |    7 
 chart2/source/model/main/Wall.hxx                                           |    7 
 chart2/source/tools/ConfigColorScheme.cxx                                   |    3 
 chart2/source/tools/DataSeriesHelper.cxx                                    |    2 
 chart2/source/tools/XMLRangeHelper.cxx                                      |    2 
 chart2/source/view/main/ChartView.cxx                                       |    5 
 chart2/uiconfig/menubar/menubar.xml                                         |    1 
 sc/addin/datefunc/dfa.src                                                   |    2 
 sc/addin/inc/rot13.hrc                                                      |    3 
 sc/addin/rot13/rot13.src                                                    |    2 
 sc/inc/address.hxx                                                          |    2 
 sc/inc/autonamecache.hxx                                                    |    2 
 sc/inc/cellsuno.hxx                                                         |    1 
 sc/inc/chgtrack.hxx                                                         |    5 
 sc/inc/compressedarray.hxx                                                  |   51 
 sc/inc/dociter.hxx                                                          |    4 
 sc/inc/document.hxx                                                         |   78 
 sc/inc/dpglobal.hxx                                                         |    2 
 sc/inc/dpobject.hxx                                                         |   10 
 sc/inc/dpshttab.hxx                                                         |   11 
 sc/inc/editutil.hxx                                                         |    2 
 sc/inc/global.hxx                                                           |   51 
 sc/inc/globstr.hrc                                                          |   11 
 sc/inc/nameuno.hxx                                                          |    4 
 sc/inc/pivot.hxx                                                            |   23 
 sc/inc/rangelst.hxx                                                         |  105 
 sc/inc/reffind.hxx                                                          |    2 
 sc/inc/refreshtimer.hxx                                                     |  173 -
 sc/inc/sc.hrc                                                               |   95 
 sc/inc/scabstdlg.hxx                                                        |    8 
 sc/inc/stringutil.hxx                                                       |    2 
 sc/inc/tabopparams.hxx                                                      |   11 
 sc/inc/tabprotection.hxx                                                    |    2 
 sc/qa/complex/dataPilot/interfaceTests/beans/_XPropertySet.java             |   44 
 sc/qa/complex/sc/CalcRTL.java                                               |    2 
 sc/qa/unit/makefile.mk                                                      |   65 
 sc/qa/unit/ucalc.cxx                                                        |  122 
 sc/qa/unit/version.map                                                      |   34 
 sc/source/core/data/autonamecache.cxx                                       |    2 
 sc/source/core/data/cell.cxx                                                |    2 
 sc/source/core/data/clipparam.cxx                                           |   35 
 sc/source/core/data/compressedarray.cxx                                     |  170 -
 sc/source/core/data/conditio.cxx                                            |    6 
 sc/source/core/data/dociter.cxx                                             |    4 
 sc/source/core/data/docpool.cxx                                             |   14 
 sc/source/core/data/documen2.cxx                                            |   12 
 sc/source/core/data/documen3.cxx                                            |   70 
 sc/source/core/data/documen4.cxx                                            |    7 
 sc/source/core/data/documen5.cxx                                            |   31 
 sc/source/core/data/document.cxx                                            |   95 
 sc/source/core/data/dpglobal.cxx                                            |    1 
 sc/source/core/data/dpobject.cxx                                            |  335 +-
 sc/source/core/data/dpoutput.cxx                                            |   39 
 sc/source/core/data/dptablecache.cxx                                        |   19 
 sc/source/core/data/dptabres.cxx                                            |    2 
 sc/source/core/data/dptabsrc.cxx                                            |   17 
 sc/source/core/data/drawpage.cxx                                            |    2 
 sc/source/core/data/drwlayer.cxx                                            |   32 
 sc/source/core/data/global.cxx                                              |   80 
 sc/source/core/data/global2.cxx                                             |  120 
 sc/source/core/data/markdata.cxx                                            |   13 
 sc/source/core/data/patattr.cxx                                             |   10 
 sc/source/core/data/stlpool.cxx                                             |    8 
 sc/source/core/data/stlsheet.cxx                                            |   14 
 sc/source/core/data/table2.cxx                                              |   27 
 sc/source/core/data/table6.cxx                                              |   18 
 sc/source/core/data/validat.cxx                                             |    2 
 sc/source/core/src/compiler.src                                             |    6 
 sc/source/core/tool/autoform.cxx                                            |    4 
 sc/source/core/tool/chartarr.cxx                                            |    6 
 sc/source/core/tool/charthelper.cxx                                         |   13 
 sc/source/core/tool/chartpos.cxx                                            |   53 
 sc/source/core/tool/chgtrack.cxx                                            |   20 
 sc/source/core/tool/compiler.cxx                                            |   46 
 sc/source/core/tool/ddelink.cxx                                             |    6 
 sc/source/core/tool/docoptio.cxx                                            |   10 
 sc/source/core/tool/editutil.cxx                                            |    8 
 sc/source/core/tool/interpr1.cxx                                            |   15 
 sc/source/core/tool/interpr2.cxx                                            |    4 
 sc/source/core/tool/interpr4.cxx                                            |   32 
 sc/source/core/tool/interpr5.cxx                                            |   45 
 sc/source/core/tool/parclass.cxx                                            |    3 
 sc/source/core/tool/rangelst.cxx                                            |  755 +++--
 sc/source/core/tool/rangeutl.cxx                                            |   11 
 sc/source/core/tool/reffind.cxx                                             |    2 
 sc/source/core/tool/reftokenhelper.cxx                                      |    6 
 sc/source/core/tool/stringutil.cxx                                          |   31 
 sc/source/core/tool/token.cxx                                               |    4 
 sc/source/core/tool/userlist.cxx                                            |    2 
 sc/source/core/tool/viewopti.cxx                                            |   10 
 sc/source/core/tool/zforauto.cxx                                            |    2 
 sc/source/filter/excel/excdoc.cxx                                           |   11 
 sc/source/filter/excel/excform.cxx                                          |    2 
 sc/source/filter/excel/excform8.cxx                                         |    2 
 sc/source/filter/excel/makefile.mk                                          |    4 
 sc/source/filter/excel/read.cxx                                             |    1 
 sc/source/filter/excel/xechart.cxx                                          |   62 
 sc/source/filter/excel/xecontent.cxx                                        |   47 
 sc/source/filter/excel/xeescher.cxx                                         |   31 
 sc/source/filter/excel/xeformula.cxx                                        |   14 
 sc/source/filter/excel/xehelper.cxx                                         |   18 
 sc/source/filter/excel/xelink.cxx                                           |   24 
 sc/source/filter/excel/xename.cxx                                           |   20 
 sc/source/filter/excel/xepivot.cxx                                          |    6 
 sc/source/filter/excel/xeroot.cxx                                           |   32 
 sc/source/filter/excel/xestream.cxx                                         |   19 
 sc/source/filter/excel/xestyle.cxx                                          |    8 
 sc/source/filter/excel/xetable.cxx                                          |   33 
 sc/source/filter/excel/xichart.cxx                                          |  290 +
 sc/source/filter/excel/xicontent.cxx                                        |   31 
 sc/source/filter/excel/xiescher.cxx                                         |   50 
 sc/source/filter/excel/xipivot.cxx                                          |   12 
 sc/source/filter/excel/xiroot.cxx                                           |   16 
 sc/source/filter/excel/xistream.cxx                                         |    6 
 sc/source/filter/excel/xistyle.cxx                                          |   21 
 sc/source/filter/excel/xlchart.cxx                                          |   13 
 sc/source/filter/excel/xlformula.cxx                                        |    2 
 sc/source/filter/excel/xlpage.cxx                                           |    3 
 sc/source/filter/excel/xlroot.cxx                                           |    5 
 sc/source/filter/excel/xlstyle.cxx                                          |    9 
 sc/source/filter/excel/xltools.cxx                                          |   11 
 sc/source/filter/ftools/makefile.mk                                         |    4 
 sc/source/filter/html/htmlexp.cxx                                           |   61 
 sc/source/filter/html/htmlexp2.cxx                                          |   12 
 sc/source/filter/html/htmlimp.cxx                                           |    8 
 sc/source/filter/html/htmlpars.cxx                                          |  116 
 sc/source/filter/inc/eeparser.hxx                                           |   50 
 sc/source/filter/inc/excdoc.hxx                                             |    3 
 sc/source/filter/inc/excrecds.hxx                                           |    3 
 sc/source/filter/inc/expbase.hxx                                            |    4 
 sc/source/filter/inc/fapihelper.hxx                                         |    2 
 sc/source/filter/inc/ftools.hxx                                             |  120 
 sc/source/filter/inc/htmlexp.hxx                                            |    8 
 sc/source/filter/inc/htmlpars.hxx                                           |    8 
 sc/source/filter/inc/imp_op.hxx                                             |    5 
 sc/source/filter/inc/rtfparse.hxx                                           |    6 
 sc/source/filter/inc/xechart.hxx                                            |   67 
 sc/source/filter/inc/xeescher.hxx                                           |   17 
 sc/source/filter/inc/xeformula.hxx                                          |    3 
 sc/source/filter/inc/xehelper.hxx                                           |    5 
 sc/source/filter/inc/xelink.hxx                                             |    3 
 sc/source/filter/inc/xename.hxx                                             |    3 
 sc/source/filter/inc/xerecord.hxx                                           |    3 
 sc/source/filter/inc/xeroot.hxx                                             |   35 
 sc/source/filter/inc/xestream.hxx                                           |    2 
 sc/source/filter/inc/xestyle.hxx                                            |    3 
 sc/source/filter/inc/xetable.hxx                                            |   20 
 sc/source/filter/inc/xichart.hxx                                            |  100 
 sc/source/filter/inc/xiescher.hxx                                           |   29 
 sc/source/filter/inc/xiformula.hxx                                          |    3 
 sc/source/filter/inc/xihelper.hxx                                           |    3 
 sc/source/filter/inc/xipivot.hxx                                            |   13 
 sc/source/filter/inc/xiroot.hxx                                             |   47 
 sc/source/filter/inc/xistream.hxx                                           |    3 
 sc/source/filter/inc/xistyle.hxx                                            |   13 
 sc/source/filter/inc/xlchart.hxx                                            |   11 
 sc/source/filter/inc/xlformula.hxx                                          |    3 
 sc/source/filter/inc/xlroot.hxx                                             |   17 
 sc/source/filter/inc/xlview.hxx                                             |    3 
 sc/source/filter/lotus/makefile.mk                                          |    2 
 sc/source/filter/rtf/eeimpars.cxx                                           |   49 
 sc/source/filter/rtf/expbase.cxx                                            |    4 
 sc/source/filter/rtf/rtfparse.cxx                                           |   80 
 sc/source/filter/xcl97/XclExpChangeTrack.cxx                                |   42 
 sc/source/filter/xcl97/xcl97rec.cxx                                         |    6 
 sc/source/filter/xml/XMLExportDDELinks.cxx                                  |   25 
 sc/source/filter/xml/XMLExportDDELinks.hxx                                  |    6 
 sc/source/filter/xml/XMLExportIterator.cxx                                  |    1 
 sc/source/filter/xml/XMLExportIterator.hxx                                  |    4 
 sc/source/filter/xml/XMLExportSharedData.cxx                                |    4 
 sc/source/filter/xml/XMLExportSharedData.hxx                                |    6 
 sc/source/filter/xml/XMLStylesExportHelper.cxx                              |   70 
 sc/source/filter/xml/XMLStylesExportHelper.hxx                              |   43 
 sc/source/filter/xml/XMLStylesImportHelper.cxx                              |   58 
 sc/source/filter/xml/XMLStylesImportHelper.hxx                              |    6 
 sc/source/filter/xml/XMLTableHeaderFooterContext.cxx                        |    8 
 sc/source/filter/xml/cachedattraccess.cxx                                   |   70 
 sc/source/filter/xml/cachedattraccess.hxx                                   |   63 
 sc/source/filter/xml/makefile.mk                                            |    1 
 sc/source/filter/xml/xmlexprt.cxx                                           |  461 +--
 sc/source/filter/xml/xmlexprt.hxx                                           |   12 
 sc/source/filter/xml/xmlimprt.cxx                                           |  129 
 sc/source/filter/xml/xmlsceni.cxx                                           |    4 
 sc/source/filter/xml/xmlstyle.cxx                                           |   14 
 sc/source/filter/xml/xmlsubti.hxx                                           |    4 
 sc/source/ui/Accessibility/AccessibleContextBase.cxx                        |    1 
 sc/source/ui/Accessibility/AccessibleCsvControl.cxx                         |    7 
 sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx                   |   10 
 sc/source/ui/Accessibility/AccessibleDocument.cxx                           |    1 
 sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx                |  168 -
 sc/source/ui/Accessibility/AccessiblePreviewTable.cxx                       |   62 
 sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx                        |   22 
 sc/source/ui/Accessibility/AccessibleTableBase.cxx                          |    7 
 sc/source/ui/Accessibility/AccessibleText.cxx                               |   44 
 sc/source/ui/app/client.cxx                                                 |   10 
 sc/source/ui/app/inputhdl.cxx                                               |    4 
 sc/source/ui/app/inputwin.cxx                                               |   74 
 sc/source/ui/app/msgpool.cxx                                                |    6 
 sc/source/ui/app/rfindlst.cxx                                               |    2 
 sc/source/ui/app/scmod.cxx                                                  |    2 
 sc/source/ui/app/template.cxx                                               |    2 
 sc/source/ui/app/transobj.cxx                                               |    9 
 sc/source/ui/app/uiitems.cxx                                                |   80 
 sc/source/ui/attrdlg/attrdlg.cxx                                            |    4 
 sc/source/ui/attrdlg/condfrmt.cxx                                           |    2 
 sc/source/ui/attrdlg/scdlgfact.cxx                                          |   23 
 sc/source/ui/attrdlg/scdlgfact.hxx                                          |    9 
 sc/source/ui/attrdlg/tabpages.cxx                                           |   12 
 sc/source/ui/cctrl/cbuttonw.cxx                                             |    2 
 sc/source/ui/cctrl/dpcontrol.cxx                                            |   66 
 sc/source/ui/cctrl/dpcontrol.src                                            |    2 
 sc/source/ui/cctrl/popmenu.cxx                                              |    2 
 sc/source/ui/cctrl/tbinsert.cxx                                             |  112 
 sc/source/ui/cctrl/tbzoomsliderctrl.cxx                                     |    2 
 sc/source/ui/dbgui/asciiopt.cxx                                             |    4 
 sc/source/ui/dbgui/asciiopt.hrc                                             |   31 
 sc/source/ui/dbgui/asciiopt.src                                             |   47 
 sc/source/ui/dbgui/consdlg.cxx                                              |    6 
 sc/source/ui/dbgui/consdlg.hrc                                              |    3 
 sc/source/ui/dbgui/consdlg.src                                              |    3 
 sc/source/ui/dbgui/csvgrid.cxx                                              |   44 
 sc/source/ui/dbgui/csvtablebox.cxx                                          |   44 
 sc/source/ui/dbgui/dapitype.hrc                                             |    3 
 sc/source/ui/dbgui/dapitype.src                                             |   23 
 sc/source/ui/dbgui/dbnamdlg.cxx                                             |   21 
 sc/source/ui/dbgui/dpgroupdlg.hrc                                           |    3 
 sc/source/ui/dbgui/dpgroupdlg.src                                           |    3 
 sc/source/ui/dbgui/dpuiglobal.hxx                                           |   43 
 sc/source/ui/dbgui/fieldwnd.cxx                                             | 1466 ++++++----
 sc/source/ui/dbgui/filtdlg.cxx                                              |    7 
 sc/source/ui/dbgui/imoptdlg.hrc                                             |    5 
 sc/source/ui/dbgui/imoptdlg.src                                             |   23 
 sc/source/ui/dbgui/outline.src                                              |   11 
 sc/source/ui/dbgui/pfiltdlg.cxx                                             |    4 
 sc/source/ui/dbgui/pivot.hrc                                                |    6 
 sc/source/ui/dbgui/pivot.src                                                |   93 
 sc/source/ui/dbgui/pvfundlg.hrc                                             |    6 
 sc/source/ui/dbgui/pvfundlg.src                                             |    2 
 sc/source/ui/dbgui/pvglob.hxx                                               |   45 
 sc/source/ui/dbgui/pvlaydlg.cxx                                             | 1247 ++++----
 sc/source/ui/dbgui/scendlg.cxx                                              |    2 
 sc/source/ui/dbgui/scendlg.hrc                                              |    4 
 sc/source/ui/dbgui/scendlg.src                                              |   40 
 sc/source/ui/dbgui/scuiasciiopt.cxx                                         |    7 
 sc/source/ui/dbgui/scuiimoptdlg.cxx                                         |    2 
 sc/source/ui/dbgui/sfiltdlg.cxx                                             |    6 
 sc/source/ui/dbgui/sortdlg.cxx                                              |    2 
 sc/source/ui/dbgui/textimportoptions.src                                    |    9 
 sc/source/ui/dbgui/tpsort.cxx                                               |   30 
 sc/source/ui/dbgui/tpsubt.cxx                                               |   36 
 sc/source/ui/dbgui/validate.cxx                                             |   20 
 sc/source/ui/dbgui/validate.src                                             |   93 
 sc/source/ui/docshell/arealink.cxx                                          |    8 
 sc/source/ui/docshell/dbdocfun.cxx                                          |    3 
 sc/source/ui/docshell/docfunc.cxx                                           |   18 
 sc/source/ui/docshell/docsh.cxx                                             |   90 
 sc/source/ui/docshell/docsh2.cxx                                            |   39 
 sc/source/ui/docshell/docsh3.cxx                                            |    5 
 sc/source/ui/docshell/docsh4.cxx                                            |   38 
 sc/source/ui/docshell/docsh5.cxx                                            |   22 
 sc/source/ui/docshell/docsh6.cxx                                            |    8 
 sc/source/ui/docshell/externalrefmgr.cxx                                    |    6 
 sc/source/ui/docshell/impex.cxx                                             |   50 
 sc/source/ui/docshell/servobj.cxx                                           |    6 
 sc/source/ui/docshell/tablink.cxx                                           |   18 
 sc/source/ui/docshell/tpstat.cxx                                            |    8 
 sc/source/ui/docshell/tpstat.src                                            |   35 
 sc/source/ui/drawfunc/drformsh.src                                          |   34 
 sc/source/ui/drawfunc/drtxtob.cxx                                           |   14 
 sc/source/ui/drawfunc/drtxtob2.cxx                                          |    4 
 sc/source/ui/drawfunc/fuconarc.cxx                                          |    8 
 sc/source/ui/drawfunc/fuconcustomshape.cxx                                  |    8 
 sc/source/ui/drawfunc/fuconpol.cxx                                          |    8 
 sc/source/ui/drawfunc/fuconrec.cxx                                          |    8 
 sc/source/ui/drawfunc/fuconstr.cxx                                          |    8 
 sc/source/ui/drawfunc/fuconuno.cxx                                          |    8 
 sc/source/ui/drawfunc/fudraw.cxx                                            |    8 
 sc/source/ui/drawfunc/fuins1.cxx                                            |    2 
 sc/source/ui/drawfunc/fuins2.cxx                                            |   13 
 sc/source/ui/drawfunc/fusel.cxx                                             |    6 
 sc/source/ui/drawfunc/futext.cxx                                            |    8 
 sc/source/ui/drawfunc/objdraw.src                                           |    2 
 sc/source/ui/formdlg/dwfunctr.cxx                                           |   12 
 sc/source/ui/formdlg/dwfunctr.hrc                                           |    6 
 sc/source/ui/formdlg/dwfunctr.src                                           |   38 
 sc/source/ui/formdlg/formdlgs.src                                           |    3 
 sc/source/ui/formdlg/formula.cxx                                            |   12 
 sc/source/ui/inc/AccessibleDataPilotControl.hxx                             |    6 
 sc/source/ui/inc/acredlin.hrc                                               |   10 
 sc/source/ui/inc/attrdlg.hrc                                                |    4 
 sc/source/ui/inc/condfrmt.hrc                                               |    3 
 sc/source/ui/inc/content.hxx                                                |    1 
 sc/source/ui/inc/crnrdlg.hrc                                                |    7 
 sc/source/ui/inc/csvgrid.hxx                                                |    5 
 sc/source/ui/inc/csvtablebox.hxx                                            |    5 
 sc/source/ui/inc/dbnamdlg.hrc                                               |    3 
 sc/source/ui/inc/docsh.hxx                                                  |    4 
 sc/source/ui/inc/drawview.hxx                                               |   11 
 sc/source/ui/inc/fieldwnd.hxx                                               |  428 ++
 sc/source/ui/inc/filter.hrc                                                 |    3 
 sc/source/ui/inc/highred.hrc                                                |   13 
 sc/source/ui/inc/impex.hxx                                                  |    4 
 sc/source/ui/inc/instbdlg.hrc                                               |    6 
 sc/source/ui/inc/linkarea.hrc                                               |    3 
 sc/source/ui/inc/miscdlgs.hrc                                               |   17 
 sc/source/ui/inc/mvtabdlg.hxx                                               |   54 
 sc/source/ui/inc/namedlg.hrc                                                |    9 
 sc/source/ui/inc/navipi.hxx                                                 |    3 
 sc/source/ui/inc/optdlg.hrc                                                 |   19 
 sc/source/ui/inc/optload.hrc                                                |    4 
 sc/source/ui/inc/optsolver.hrc                                              |    5 
 sc/source/ui/inc/protectiondlg.hrc                                          |    4 
 sc/source/ui/inc/pvlaydlg.hxx                                               |   61 
 sc/source/ui/inc/rfindlst.hxx                                               |    6 
 sc/source/ui/inc/simpref.hrc                                                |    3 
 sc/source/ui/inc/solveroptions.hrc                                          |    3 
 sc/source/ui/inc/solvrdlg.hrc                                               |    3 
 sc/source/ui/inc/sortdlg.hrc                                                |   14 
 sc/source/ui/inc/subtdlg.hrc                                                |   10 
 sc/source/ui/inc/tabopdlg.hrc                                               |    4 
 sc/source/ui/inc/tbinsert.hrc                                               |    4 
 sc/source/ui/inc/tpcalc.hxx                                                 |    3 
 sc/source/ui/inc/tptable.hxx                                                |    4 
 sc/source/ui/inc/undotab.hxx                                                |   31 
 sc/source/ui/inc/validate.hrc                                               |    5 
 sc/source/ui/inc/viewfunc.hxx                                               |    2 
 sc/source/ui/miscdlgs/acredlin.cxx                                          |   79 
 sc/source/ui/miscdlgs/acredlin.src                                          |   53 
 sc/source/ui/miscdlgs/anyrefdg.cxx                                          |   32 
 sc/source/ui/miscdlgs/autofmt.cxx                                           |   11 
 sc/source/ui/miscdlgs/conflictsdlg.src                                      |    7 
 sc/source/ui/miscdlgs/crdlg.cxx                                             |    2 
 sc/source/ui/miscdlgs/crnrdlg.cxx                                           |   12 
 sc/source/ui/miscdlgs/delcldlg.cxx                                          |    2 
 sc/source/ui/miscdlgs/delcodlg.cxx                                          |    2 
 sc/source/ui/miscdlgs/filldlg.cxx                                           |    8 
 sc/source/ui/miscdlgs/groupdlg.cxx                                          |    2 
 sc/source/ui/miscdlgs/highred.cxx                                           |    9 
 sc/source/ui/miscdlgs/highred.src                                           |   33 
 sc/source/ui/miscdlgs/inscldlg.cxx                                          |    2 
 sc/source/ui/miscdlgs/inscodlg.cxx                                          |    2 
 sc/source/ui/miscdlgs/instbdlg.cxx                                          |    4 
 sc/source/ui/miscdlgs/instbdlg.src                                          |   38 
 sc/source/ui/miscdlgs/lbseldlg.cxx                                          |    2 
 sc/source/ui/miscdlgs/linkarea.cxx                                          |    2 
 sc/source/ui/miscdlgs/linkarea.src                                          |    2 
 sc/source/ui/miscdlgs/mtrindlg.cxx                                          |    2 
 sc/source/ui/miscdlgs/mvtabdlg.cxx                                          |  117 
 sc/source/ui/miscdlgs/optsolver.cxx                                         |   16 
 sc/source/ui/miscdlgs/protectiondlg.cxx                                     |    4 
 sc/source/ui/miscdlgs/protectiondlg.src                                     |   12 
 sc/source/ui/miscdlgs/retypepassdlg.src                                     |    5 
 sc/source/ui/miscdlgs/scuiautofmt.cxx                                       |    4 
 sc/source/ui/miscdlgs/sharedocdlg.src                                       |    4 
 sc/source/ui/miscdlgs/shtabdlg.cxx                                          |    2 
 sc/source/ui/miscdlgs/simpref.cxx                                           |    4 
 sc/source/ui/miscdlgs/solvrdlg.cxx                                          |    8 
 sc/source/ui/miscdlgs/strindlg.cxx                                          |    2 
 sc/source/ui/miscdlgs/tabopdlg.cxx                                          |    6 
 sc/source/ui/miscdlgs/textdlgs.cxx                                          |    4 
 sc/source/ui/miscdlgs/warnbox.cxx                                           |   11 
 sc/source/ui/namedlg/namedlg.cxx                                            |   12 
 sc/source/ui/navipi/content.cxx                                             |    9 
 sc/source/ui/navipi/navcitem.cxx                                            |    2 
 sc/source/ui/navipi/navipi.cxx                                              |   60 
 sc/source/ui/navipi/navipi.hrc                                              |   10 
 sc/source/ui/navipi/navipi.src                                              |  103 
 sc/source/ui/optdlg/opredlin.cxx                                            |    8 
 sc/source/ui/optdlg/tpcalc.cxx                                              |   15 
 sc/source/ui/optdlg/tpusrlst.cxx                                            |   12 
 sc/source/ui/pagedlg/areasdlg.cxx                                           |   10 
 sc/source/ui/pagedlg/hfedtdlg.cxx                                           |    4 
 sc/source/ui/pagedlg/hfedtdlg.hrc                                           |   12 
 sc/source/ui/pagedlg/hfedtdlg.src                                           |  112 
 sc/source/ui/pagedlg/pagedlg.hrc                                            |    5 
 sc/source/ui/pagedlg/pagedlg.src                                            |   43 
 sc/source/ui/pagedlg/scuitphfedit.cxx                                       |   38 
 sc/source/ui/pagedlg/tphf.cxx                                               |   18 
 sc/source/ui/pagedlg/tphf.src                                               |   31 
 sc/source/ui/pagedlg/tphfedit.cxx                                           |  144 
 sc/source/ui/pagedlg/tptable.cxx                                            |   13 
 sc/source/ui/src/attrdlg.src                                                |   41 
 sc/source/ui/src/autofmt.src                                                |   44 
 sc/source/ui/src/condfrmt.src                                               |   42 
 sc/source/ui/src/crnrdlg.src                                                |   36 
 sc/source/ui/src/dbnamdlg.src                                               |   23 
 sc/source/ui/src/filter.src                                                 |    2 
 sc/source/ui/src/globstr.src                                                |    2 
 sc/source/ui/src/hdrcont.src                                                |   39 
 sc/source/ui/src/miscdlgs.src                                               |  124 
 sc/source/ui/src/namedlg.src                                                |    2 
 sc/source/ui/src/opredlin.src                                               |   39 
 sc/source/ui/src/optdlg.src                                                 |    7 
 sc/source/ui/src/optsolver.src                                              |    4 
 sc/source/ui/src/popup.src                                                  |    2 
 sc/source/ui/src/pseudo.src                                                 |   36 
 sc/source/ui/src/sc.src                                                     |    6 
 sc/source/ui/src/scerrors.src                                               |    5 
 sc/source/ui/src/scfuncs.src                                                |   10 
 sc/source/ui/src/scstring.src                                               |   88 
 sc/source/ui/src/scwarngs.src                                               |   41 
 sc/source/ui/src/simpref.src                                                |   32 
 sc/source/ui/src/solveroptions.src                                          |    4 
 sc/source/ui/src/solvrdlg.src                                               |    3 
 sc/source/ui/src/sortdlg.src                                                |   19 
 sc/source/ui/src/subtdlg.src                                                |   56 
 sc/source/ui/src/tabopdlg.src                                               |    3 
 sc/source/ui/src/textdlgs.src                                               |   41 
 sc/source/ui/src/toolbox.src                                                |   10 
 sc/source/ui/styleui/scstyles.src                                           |   16 
 sc/source/ui/styleui/styledlg.cxx                                           |    6 
 sc/source/ui/styleui/styledlg.src                                           |   40 
 sc/source/ui/undo/target.cxx                                                |    2 
 sc/source/ui/undo/undobase.cxx                                              |    8 
 sc/source/ui/undo/undoblk.cxx                                               |  233 -
 sc/source/ui/undo/undoblk2.cxx                                              |   12 
 sc/source/ui/undo/undoblk3.cxx                                              |  146 
 sc/source/ui/undo/undocell.cxx                                              |  110 
 sc/source/ui/undo/undodat.cxx                                               |  180 -
 sc/source/ui/undo/undodraw.cxx                                              |   22 
 sc/source/ui/undo/undotab.cxx                                               |   95 
 sc/source/ui/unoobj/addruno.cxx                                             |    4 
 sc/source/ui/unoobj/cellsuno.cxx                                            |  318 +-
 sc/source/ui/unoobj/chart2uno.cxx                                           |  174 -
 sc/source/ui/unoobj/chartuno.cxx                                            |   12 
 sc/source/ui/unoobj/cursuno.cxx                                             |   54 
 sc/source/ui/unoobj/dapiuno.cxx                                             |    4 
 sc/source/ui/unoobj/docuno.cxx                                              |   22 
 sc/source/ui/unoobj/funcuno.cxx                                             |    8 
 sc/source/ui/unoobj/nameuno.cxx                                             |   16 
 sc/source/ui/unoobj/scdetect.cxx                                            |   56 
 sc/source/ui/unoobj/servuno.cxx                                             |    4 
 sc/source/ui/unoobj/shapeuno.cxx                                            |   10 
 sc/source/ui/unoobj/styleuno.cxx                                            |    4 
 sc/source/ui/unoobj/targuno.cxx                                             |    5 
 sc/source/ui/unoobj/viewuno.cxx                                             |   31 
 sc/source/ui/vba/service.cxx                                                |   25 
 sc/source/ui/vba/testvba/testvba.cxx                                        |    3 
 sc/source/ui/vba/vbaapplication.cxx                                         |    6 
 sc/source/ui/vba/vbaeventshelper.cxx                                        |    4 
 sc/source/ui/vba/vbahelper.cxx                                              |    2 
 sc/source/ui/vba/vbahyperlinks.cxx                                          |    8 
 sc/source/ui/vba/vbainterior.cxx                                            |    4 
 sc/source/ui/vba/vbaoleobject.cxx                                           |   12 
 sc/source/ui/vba/vbapagesetup.cxx                                           |    6 
 sc/source/ui/vba/vbarange.cxx                                               |   94 
 sc/source/ui/view/cellsh.cxx                                                |   27 
 sc/source/ui/view/cellsh2.cxx                                               |    2 
 sc/source/ui/view/dbfunc3.cxx                                               |    6 
 sc/source/ui/view/drawattr.cxx                                              |    8 
 sc/source/ui/view/drawvie3.cxx                                              |    2 
 sc/source/ui/view/drawview.cxx                                              |   32 
 sc/source/ui/view/editsh.cxx                                                |    4 
 sc/source/ui/view/formatsh.cxx                                              |    4 
 sc/source/ui/view/gridwin.cxx                                               |   38 
 sc/source/ui/view/gridwin4.cxx                                              |   22 
 sc/source/ui/view/hdrcont.cxx                                               |    6 
 sc/source/ui/view/hintwin.cxx                                               |    2 
 sc/source/ui/view/olinewin.cxx                                              |    8 
 sc/source/ui/view/output2.cxx                                               |   13 
 sc/source/ui/view/output3.cxx                                               |   14 
 sc/source/ui/view/pivotsh.cxx                                               |    2 
 sc/source/ui/view/preview.cxx                                               |   21 
 sc/source/ui/view/prevwsh.cxx                                               |   38 
 sc/source/ui/view/prevwsh2.cxx                                              |    2 
 sc/source/ui/view/printfun.cxx                                              |   52 
 sc/source/ui/view/reffact.cxx                                               |    2 
 sc/source/ui/view/select.cxx                                                |   28 
 sc/source/ui/view/tabsplit.cxx                                              |    8 
 sc/source/ui/view/tabview.cxx                                               |   29 
 sc/source/ui/view/tabview3.cxx                                              |   19 
 sc/source/ui/view/tabview5.cxx                                              |    4 
 sc/source/ui/view/tabvwsh2.cxx                                              |    2 
 sc/source/ui/view/tabvwsh3.cxx                                              |   81 
 sc/source/ui/view/tabvwsh4.cxx                                              |   40 
 sc/source/ui/view/tabvwsh5.cxx                                              |    2 
 sc/source/ui/view/tabvwsh8.cxx                                              |    2 
 sc/source/ui/view/tabvwsh9.cxx                                              |    2 
 sc/source/ui/view/tabvwsha.cxx                                              |    6 
 sc/source/ui/view/tabvwshb.cxx                                              |    2 
 sc/source/ui/view/tabvwshe.cxx                                              |    2 
 sc/source/ui/view/tabvwshf.cxx                                              |   21 
 sc/source/ui/view/viewdata.cxx                                              |   29 
 sc/source/ui/view/viewfun2.cxx                                              |  114 
 sc/source/ui/view/viewfun3.cxx                                              |   65 
 sc/source/ui/view/viewfun4.cxx                                              |    6 
 sc/source/ui/view/viewfun5.cxx                                              |   30 
 sc/source/ui/view/viewfun6.cxx                                              |   17 
 sc/source/ui/view/viewfunc.cxx                                              |    6 
 sc/uiconfig/scalc/menubar/menubar.xml                                       |    1 
 sc/util/hidother.src                                                        |    1 
 scaddins/source/analysis/analysis.cxx                                       |   20 
 scaddins/source/analysis/analysis.src                                       |   40 
 scaddins/source/analysis/analysis_deffuncnames.src                          |    7 
 scaddins/source/analysis/analysis_funcnames.src                             |   52 
 scaddins/source/analysis/analysisadd.idl                                    |    5 
 scaddins/source/analysis/analysishelper.cxx                                 |  150 -
 scaddins/source/analysis/analysishelper.hxx                                 |    3 
 scaddins/source/datefunc/datefunc.cxx                                       |    6 
 scaddins/source/datefunc/datefunc.src                                       |   34 
 sccomp/source/solver/solver.cxx                                             |    6 
 sccomp/source/solver/solver.src                                             |   11 
 605 files changed, 7809 insertions(+), 10781 deletions(-)

New commits:
commit 00b72046166670628078f9f94a22897c90cf894f
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Thu Dec 16 11:53:53 2010 -0500

    Fixed build breakage.

diff --git a/sc/source/filter/xml/XMLExportDDELinks.cxx b/sc/source/filter/xml/XMLExportDDELinks.cxx
index 971f5d5..810edc3 100644
--- a/sc/source/filter/xml/XMLExportDDELinks.cxx
+++ b/sc/source/filter/xml/XMLExportDDELinks.cxx
@@ -73,7 +73,7 @@ sal_Bool ScXMLExportDDELinks::CellsEqual(const sal_Bool bPrevEmpty, const sal_Bo
         return sal_False;
 }
 
-void WriteCell(ScXMLExport& rExport, const ScMatrixValue& aVal, sal_Int32 nRepeat)
+void ScXMLExportDDELinks::WriteCell(const ScMatrixValue& aVal, sal_Int32 nRepeat)
 {
     bool bString = ScMatrix::IsNonValueType(aVal.nType);
     bool bEmpty = ScMatrix::IsEmptyType(aVal.nType);
@@ -103,8 +103,6 @@ void WriteCell(ScXMLExport& rExport, const ScMatrixValue& aVal, sal_Int32 nRepea
     SvXMLElementExport(rExport, XML_NAMESPACE_TABLE, XML_TABLE_CELL, sal_True, sal_True);
 }
 
-}
-
 void ScXMLExportDDELinks::WriteTable(const sal_Int32 nPos)
 {
     ScDocument* pDoc = rExport.GetDocument();
@@ -140,13 +138,13 @@ void ScXMLExportDDELinks::WriteTable(const sal_Int32 nPos)
             if (nCol > 0 && aVal != aPrevVal)
             {
                 // Cell value differs.  Flush the cell content.
-                WriteCell(rExport, aPrevVal, nRepeat);
+                WriteCell(aPrevVal, nRepeat);
                 nRepeat = 0;
             }
             aPrevVal = aVal;
         }
 
-        WriteCell(rExport, aPrevVal, nRepeat);
+        WriteCell(aPrevVal, nRepeat);
     }
 }
 
diff --git a/sc/source/filter/xml/XMLExportDDELinks.hxx b/sc/source/filter/xml/XMLExportDDELinks.hxx
index d913735..2dacb5a 100644
--- a/sc/source/filter/xml/XMLExportDDELinks.hxx
+++ b/sc/source/filter/xml/XMLExportDDELinks.hxx
@@ -33,6 +33,7 @@
 
 class String;
 class ScXMLExport;
+class ScMatrixValue;
 
 class ScXMLExportDDELinks
 {
@@ -40,7 +41,7 @@ class ScXMLExportDDELinks
 
     sal_Bool			CellsEqual(const sal_Bool bPrevEmpty, const sal_Bool bPrevString, const String& sPrevValue, const double& fPrevValue,
                                     const sal_Bool bEmpty, const sal_Bool bString, const String& sValue, const double& fValue) const;
-    void 				WriteCell(const sal_Bool bEmpty, const sal_Bool bString, const String& sValue, const double& fValue, const sal_Int32 nRepeat);
+    void 				WriteCell(const ScMatrixValue& aVal, sal_Int32 nRepeat);
     void				WriteTable(const sal_Int32 nPos);
 public:
     ScXMLExportDDELinks(ScXMLExport& rExport);
commit 4e876a04373ccbc376d330ee494f5a04d503a7b4
Merge: d5dd7ae... d28be24...
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Thu Dec 16 11:11:45 2010 -0500

    Merge branch 'master' into feature/calc-matrix-rework
    
    Conflicts:
    	chart2/source/controller/dialogs/ChartTypeDialogController.cxx
    	chart2/source/controller/dialogs/TabPages.hrc
    	sc/inc/dpshttab.hxx
    	sc/inc/global.hxx
    	sc/source/core/data/dpobject.cxx
    	sc/source/core/data/dptablecache.cxx
    	sc/source/core/data/drwlayer.cxx
    	sc/source/filter/excel/xecontent.cxx
    	sc/source/filter/inc/ftools.hxx
    	sc/source/filter/inc/xehelper.hxx
    	sc/source/filter/inc/xihelper.hxx
    	sc/source/filter/inc/xistyle.hxx
    	sc/source/filter/xml/XMLExportDDELinks.cxx
    	sc/source/filter/xml/XMLExportDDELinks.hxx
    	sc/source/ui/docshell/docfunc.cxx
    	sc/source/ui/optdlg/opredlin.cxx
    	sc/source/ui/unoobj/styleuno.cxx

diff --cc sc/source/filter/xml/XMLExportDDELinks.cxx
index 4b4ff7a,e2a85ab..971f5d5
--- a/sc/source/filter/xml/XMLExportDDELinks.cxx
+++ b/sc/source/filter/xml/XMLExportDDELinks.cxx
@@@ -56,13 -57,26 +56,28 @@@ ScXMLExportDDELinks::~ScXMLExportDDELin
  {
  }
  
- namespace {
+ sal_Bool ScXMLExportDDELinks::CellsEqual(const sal_Bool bPrevEmpty, const sal_Bool bPrevString, const String& sPrevValue, const double& fPrevValue,
+                      const sal_Bool bEmpty, const sal_Bool bString, const String& sValue, const double& fValue) const
+ {
+     if (bEmpty == bPrevEmpty)
+         if (bEmpty)
+             return sal_True;
+         else if (bString == bPrevString)
+             if (bString)
+                 return (sPrevValue == sValue);
+             else
+                 return (fPrevValue == fValue);
+         else
+             return sal_False;
+     else
+         return sal_False;
+ }
  
 -void ScXMLExportDDELinks::WriteCell(const sal_Bool bEmpty, const sal_Bool bString, const String& sValue, const double& fValue, const sal_Int32 nRepeat)
 +void WriteCell(ScXMLExport& rExport, const ScMatrixValue& aVal, sal_Int32 nRepeat)
  {
 -    rtl::OUStringBuffer sBuffer;
 +    bool bString = ScMatrix::IsNonValueType(aVal.nType);
 +    bool bEmpty = ScMatrix::IsEmptyType(aVal.nType);
 +
      if (!bEmpty)
      {
          if (bString)
diff --cc sc/source/filter/xml/XMLExportDDELinks.hxx
index 8b94dba,25845f5..d913735
--- a/sc/source/filter/xml/XMLExportDDELinks.hxx
+++ b/sc/source/filter/xml/XMLExportDDELinks.hxx
@@@ -36,9 -36,12 +36,12 @@@ class ScXMLExport
  
  class ScXMLExportDDELinks
  {
 -    ScXMLExport&		rExport;
 +    ScXMLExport&        rExport;
  
-     void                WriteTable(const sal_Int32 nPos);
+     sal_Bool			CellsEqual(const sal_Bool bPrevEmpty, const sal_Bool bPrevString, const String& sPrevValue, const double& fPrevValue,
+                                     const sal_Bool bEmpty, const sal_Bool bString, const String& sValue, const double& fValue) const;
+     void 				WriteCell(const sal_Bool bEmpty, const sal_Bool bString, const String& sValue, const double& fValue, const sal_Int32 nRepeat);
+     void				WriteTable(const sal_Int32 nPos);
  public:
      ScXMLExportDDELinks(ScXMLExport& rExport);
      ~ScXMLExportDDELinks();
diff --cc sc/source/filter/xml/xmlexprt.hxx
index e89deb8,b77a40a..797b8ee
--- a/sc/source/filter/xml/xmlexprt.hxx
+++ b/sc/source/filter/xml/xmlexprt.hxx
@@@ -160,13 -161,14 +161,14 @@@ class ScXMLExport : public SvXMLExpor
      void ExportFormatRanges(const sal_Int32 nStartCol, const sal_Int32 nStartRow,
          const sal_Int32 nEndCol, const sal_Int32 nEndRow, const sal_Int32 nSheet);
      void WriteRowContent();
-     void WriteRowStartTag(sal_Int32 nRow, const sal_Int32 nIndex, const sal_Int8 nFlag, const sal_Int32 nEmptyRows);
+     void WriteRowStartTag(sal_Int32 nRow, const sal_Int32 nIndex, const sal_Int32 nEmptyRows, bool bHidden, bool bFiltered);
      void OpenHeaderRows();
      void CloseHeaderRows();
-     void OpenNewRow(const sal_Int32 nIndex, const sal_Int8 nFlag, const sal_Int32 nStartRow, const sal_Int32 nEmptyRows);
-     void OpenAndCloseRow(const sal_Int32 nIndex, const sal_Int8 nFlag,
-         const sal_Int32 nStartRow, const sal_Int32 nEmptyRows);
-     void OpenRow(const sal_Int32 nTable, const sal_Int32 nStartRow, const sal_Int32 nRepeatRow);
+     void OpenNewRow(const sal_Int32 nIndex, const sal_Int32 nStartRow, const sal_Int32 nEmptyRows,
+                     bool bHidden, bool bFiltered);
 -    void OpenAndCloseRow(const sal_Int32 nIndex, const sal_Int32 nStartRow, const sal_Int32 nEmptyRows, 
++    void OpenAndCloseRow(const sal_Int32 nIndex, const sal_Int32 nStartRow, const sal_Int32 nEmptyRows,
+                          bool bHidden, bool bFiltered);
+     void OpenRow(const sal_Int32 nTable, const sal_Int32 nStartRow, const sal_Int32 nRepeatRow, ScXMLCachedRowAttrAccess& rRowAttr);
      void CloseRow(const sal_Int32 nRow);
      void GetColumnRowHeader(sal_Bool& bHasColumnHeader, com::sun::star::table::CellRangeAddress& aColumnHeaderRange,
          sal_Bool& bHasRowHeader, com::sun::star::table::CellRangeAddress& aRowHeaderRange,
commit d28be24997af545a56180d9a7d0ce3d57009a9ff
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Wed Dec 15 22:26:33 2010 -0500

    Give each field control a proper description.
    
    Incidentally, the page field was missing a description.  Added one.

diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 1d7d59d..d684d05 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -1316,6 +1316,7 @@
 #define STR_ACC_DATAPILOT_COL_DESCR (STR_START + 179)
 #define STR_ACC_DATAPILOT_DATA_DESCR (STR_START + 180)
 #define STR_ACC_DATAPILOT_SEL_DESCR (STR_START + 181)
+#define STR_ACC_DATAPILOT_PAGE_DESCR (STR_START + 182)
 
 // --------------------------------------------------
 
diff --git a/sc/source/ui/dbgui/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx
index c0a0998..26f6faf 100644
--- a/sc/source/ui/dbgui/fieldwnd.cxx
+++ b/sc/source/ui/dbgui/fieldwnd.cxx
@@ -977,6 +977,11 @@ ScDPFieldType ScDPPageFieldControl::GetFieldType() const
     return TYPE_PAGE;
 }
 
+String ScDPPageFieldControl::GetDescription() const
+{
+    return ScResId(STR_ACC_DATAPILOT_PAGE_DESCR);
+}
+
 //=============================================================================
 
 ScDPColFieldControl::ScDPColFieldControl(
@@ -994,6 +999,11 @@ ScDPFieldType ScDPColFieldControl::GetFieldType() const
     return TYPE_COL;
 }
 
+String ScDPColFieldControl::GetDescription() const
+{
+    return ScResId(STR_ACC_DATAPILOT_COL_DESCR);
+}
+
 //=============================================================================
 
 ScDPRowFieldControl::ScDPRowFieldControl(
@@ -1244,6 +1254,11 @@ ScDPFieldType ScDPSelectFieldControl::GetFieldType() const
     return TYPE_SELECT;
 }
 
+String ScDPSelectFieldControl::GetDescription() const
+{
+    return ScResId(STR_ACC_DATAPILOT_SEL_DESCR);
+}
+
 //=============================================================================
 
 ScDPDataFieldControl::ScDPDataFieldControl(
diff --git a/sc/source/ui/inc/fieldwnd.hxx b/sc/source/ui/inc/fieldwnd.hxx
index bf707ad..7835855 100644
--- a/sc/source/ui/inc/fieldwnd.hxx
+++ b/sc/source/ui/inc/fieldwnd.hxx
@@ -302,6 +302,7 @@ public:
     virtual ~ScDPPageFieldControl();
 
     virtual ScDPFieldType GetFieldType() const;
+    virtual String GetDescription() const;
 };
 
 // ============================================================================
@@ -314,6 +315,7 @@ public:
     virtual ~ScDPColFieldControl();
 
     virtual ScDPFieldType GetFieldType() const;
+    virtual String GetDescription() const;
 };
 
 // ============================================================================
@@ -370,6 +372,7 @@ public:
     virtual ~ScDPSelectFieldControl();
 
     virtual ScDPFieldType GetFieldType() const;
+    virtual String GetDescription() const;
 };
 
 // ============================================================================
diff --git a/sc/source/ui/src/scstring.src b/sc/source/ui/src/scstring.src
index c39a183..92ced8a 100644
--- a/sc/source/ui/src/scstring.src
+++ b/sc/source/ui/src/scstring.src
@@ -796,6 +796,11 @@ String STR_ACC_DATAPILOT_SEL_DESCR
     Text [ en-US ] = "Lists the fields that you can drag to one of the other three areas.";
 };
 
+String STR_ACC_DATAPILOT_PAGE_DESCR
+{
+    Text [ en-US ] = "Fields that you drop here will be available as filter lists at the top of the final DataPilot table.";
+};
+
 String SCSTR_MEDIASHELL
 {
     Text [ en-US ] = "Media Playback";
commit f9d6a0014cd41a915f31841c7251177ee8b21e31
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Wed Dec 15 22:11:42 2010 -0500

    Wrapper class for the normal scroll bar class.
    
    We need to only to pass the mouse wheel events to its parent control
    in order to have them handled properly while the mouse cursor is
    over the scroll bar control.  For some reason the normal scroll bar
    does not handle mouse wheel events natively.

diff --git a/sc/source/ui/dbgui/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx
index a96af6d..c0a0998 100644
--- a/sc/source/ui/dbgui/fieldwnd.cxx
+++ b/sc/source/ui/dbgui/fieldwnd.cxx
@@ -51,6 +51,17 @@ using ::com::sun::star::accessibility::XAccessible;
 
 const size_t INVALID_INDEX = static_cast<size_t>(-1);
 
+ScDPFieldControlBase::ScrollBar::ScrollBar(Window* pParent, WinBits nStyle) :
+    ::ScrollBar(pParent, nStyle),
+    mpParent(pParent)
+{
+}
+
+void ScDPFieldControlBase::ScrollBar::Command( const CommandEvent& rCEvt )
+{
+    mpParent->Command(rCEvt);
+}
+
 ScDPFieldControlBase::ScDPFieldControlBase( ScDPLayoutDlg* pParent, const ResId& rResId, FixedText* pCaption ) :
     Control(pParent, rResId),
     mpDlg(pParent),
diff --git a/sc/source/ui/inc/fieldwnd.hxx b/sc/source/ui/inc/fieldwnd.hxx
index a8128fc..bf707ad 100644
--- a/sc/source/ui/inc/fieldwnd.hxx
+++ b/sc/source/ui/inc/fieldwnd.hxx
@@ -65,6 +65,22 @@ protected:
     typedef ::std::vector<FieldName> FieldNames;
 
 public:
+
+    /**
+     * Custom scroll bar to pass the command event to its parent window.
+     * We need this to pass the mouse wheel events to its parent field
+     * control to have mouse wheel events appaer to be properly handled by the
+     * scroll bar.
+     */
+    class ScrollBar : public ::ScrollBar
+    {
+    public:
+        ScrollBar(Window* pParent, WinBits nStyle);
+        virtual void Command( const CommandEvent& rCEvt );
+    private:
+        Window* mpParent;
+    };
+
     ScDPFieldControlBase(
         ScDPLayoutDlg* pParent, const ResId& rResId, FixedText* pCaption );
     virtual ~ScDPFieldControlBase();
@@ -340,7 +356,7 @@ private:
 
 private:
 
-    ScrollBar               maScroll;
+    ScDPFieldControlBase::ScrollBar maScroll;
     size_t                  mnColumnBtnCount;
 };
 
commit 42497053fccc1a676a06fdae0f0a4db185d28355
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Wed Dec 15 21:45:06 2010 -0500

    Handle mouse wheel input on the row field control.
    
    Only for vertical scrolling at the moment.

diff --git a/sc/source/ui/dbgui/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx
index 802b2d8..a96af6d 100644
--- a/sc/source/ui/dbgui/fieldwnd.cxx
+++ b/sc/source/ui/dbgui/fieldwnd.cxx
@@ -275,6 +275,20 @@ void ScDPFieldControlBase::DataChanged( const DataChangedEvent& rDCEvt )
     Control::DataChanged( rDCEvt );
 }
 
+void ScDPFieldControlBase::Command( const CommandEvent& rCEvt )
+{
+    if (rCEvt.GetCommand() == COMMAND_WHEEL)
+    {
+        const CommandWheelData* pData = rCEvt.GetWheelData();
+        if (pData->GetMode() == COMMAND_WHEEL_SCROLL && !pData->IsHorz())
+        {
+            // Handle vertical mouse wheel scrolls.
+            long nNotch = pData->GetNotchDelta(); // positive => up; negative => down
+            HandleWheelScroll(nNotch);
+        }
+    }
+}
+
 void ScDPFieldControlBase::MouseButtonDown( const MouseEvent& rMEvt )
 {
     if( rMEvt.IsLeft() )
@@ -896,6 +910,11 @@ void ScDPHorFieldControl::ResetScrollBar()
     }
 }
 
+void ScDPHorFieldControl::HandleWheelScroll(long /*nNotch*/)
+{
+    // not handled for horizontal field controls.
+}
+
 bool ScDPHorFieldControl::GetFieldBtnPosSize(size_t nPos, Point& rPos, Size& rSize)
 {
     if (nPos >= mnFieldBtnColCount*mnFieldBtnRowCount)
@@ -1159,6 +1178,11 @@ void ScDPRowFieldControl::ResetScrollBar()
     }
 }
 
+void ScDPRowFieldControl::HandleWheelScroll(long nNotch)
+{
+    maScroll.DoScroll(maScroll.GetThumbPos() - nNotch);
+}
+
 bool ScDPRowFieldControl::GetFieldBtnPosSize(size_t nPos, Point& rPos, Size& rSize)
 {
     if (nPos >= mnColumnBtnCount)
diff --git a/sc/source/ui/inc/fieldwnd.hxx b/sc/source/ui/inc/fieldwnd.hxx
index f681021..a8128fc 100644
--- a/sc/source/ui/inc/fieldwnd.hxx
+++ b/sc/source/ui/inc/fieldwnd.hxx
@@ -88,6 +88,7 @@ public:
     virtual void ScrollToShowSelection() = 0;
     virtual void ScrollToEnd() = 0;
     virtual void ResetScrollBar() = 0;
+    virtual void HandleWheelScroll(long nNotch) = 0;
 
     /** Reads the FixedText's text with mnemonic and hides the FixedText. */
     void            UseMnemonic();
@@ -145,6 +146,7 @@ public:
 
     virtual void            Paint( const Rectangle& rRect );
     virtual void            DataChanged( const DataChangedEvent& rDCEvt );
+    virtual void            Command( const CommandEvent& rCEvt );
     virtual void            MouseButtonDown( const MouseEvent& rMEvt );
     virtual void            MouseButtonUp( const MouseEvent& rMEvt );
     virtual void            MouseMove( const MouseEvent& rMEvt );
@@ -257,6 +259,7 @@ public:
     virtual void ScrollToEnd();
     virtual void ScrollToShowSelection();
     virtual void ResetScrollBar();
+    virtual void HandleWheelScroll(long nNotch);
 
 private:
     bool GetFieldBtnPosSize(size_t nPos, Point& rPos, Size& rSize);
@@ -321,6 +324,7 @@ public:
     virtual void ScrollToEnd();
     virtual void ScrollToShowSelection();
     virtual void ResetScrollBar();
+    virtual void HandleWheelScroll(long nNotch);
 
 protected:
     virtual size_t          CalcNewFieldIndex( SCsCOL nDX, SCsROW nDY ) const;
commit 3ceb39b15fa268fbad260c2254ea07690529479a
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Wed Dec 15 20:39:46 2010 -0500

    Fixed the mouse cursor pos to field index conversion method.
    
    For row field control.

diff --git a/sc/source/ui/dbgui/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx
index 7c5950d..802b2d8 100644
--- a/sc/source/ui/dbgui/fieldwnd.cxx
+++ b/sc/source/ui/dbgui/fieldwnd.cxx
@@ -1004,7 +1004,23 @@ bool ScDPRowFieldControl::GetFieldIndex( const Point& rPos, size_t& rnIndex )
     if (rPos.X() < 0 || rPos.Y() < 0)
         return false;
 
-    rnIndex = rPos.Y() / GetFieldSize().Height() + maScroll.GetThumbPos();
+    long nFldH = GetFieldSize().Height();
+    long nThreshold = OUTER_MARGIN_VER + nFldH + ROW_FIELD_BTN_GAP / 2;
+
+    size_t nIndex = 0;
+    for (; nIndex < mnColumnBtnCount; ++nIndex)
+    {
+        if (rPos.Y() < nThreshold)
+            break;
+
+        nThreshold += nFldH + ROW_FIELD_BTN_GAP;
+    }
+
+    if (nIndex >= mnColumnBtnCount)
+        nIndex = mnColumnBtnCount - 1;
+
+    nIndex += maScroll.GetThumbPos();
+    rnIndex = nIndex;
     return IsValidIndex(rnIndex);
 }
 
@@ -1074,6 +1090,8 @@ void ScDPRowFieldControl::CalcSize()
 
 bool ScDPRowFieldControl::IsValidIndex(size_t /*nIndex*/) const
 {
+    // This method is here in case we decide to impose an arbitrary upper
+    // boundary on the number of fields.
     return true;
 }
 
commit 295990097592f9ffe25e4c0c6d85e341f10a6fa2
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Wed Dec 15 19:44:21 2010 -0500

    Removed all my debug statements.

diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index e846203..a486c9c 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -77,48 +77,6 @@ using ::com::sun::star::uno::makeAny;
 using ::com::sun::star::uno::Any;
 using ::rtl::OUString;
 
-#include <stdio.h>
-#include <string>
-#include <sys/time.h>
-
-namespace {
-
-class StackPrinter
-{
-public:
-    explicit StackPrinter(const char* msg) :
-        msMsg(msg)
-    {
-        fprintf(stdout, "%s: --begin\n", msMsg.c_str());
-        mfStartTime = getTime();
-    }
-
-    ~StackPrinter()
-    {
-        double fEndTime = getTime();
-        fprintf(stdout, "%s: --end (duration: %g sec)\n", msMsg.c_str(), (fEndTime-mfStartTime));
-    }
-
-    void printTime(int line) const
-    {
-        double fEndTime = getTime();
-        fprintf(stdout, "%s: --(%d) (duration: %g sec)\n", msMsg.c_str(), line, (fEndTime-mfStartTime));
-    }
-
-private:
-    double getTime() const
-    {
-        timeval tv;
-        gettimeofday(&tv, NULL);
-        return tv.tv_sec + tv.tv_usec / 1000000.0;
-    }
-
-    ::std::string msMsg;
-    double mfStartTime;
-};
-
-}
-
 // -----------------------------------------------------------------------
 
 //!	move to a header file
@@ -413,7 +371,6 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS
     bSizeOverflow( FALSE ),
     mbHeaderLayout( false )
 {
-    StackPrinter __stack_printer__("ScDPOutput::ScDPOutput");
     nTabStartCol = nMemberStartCol = nDataStartCol = nTabEndCol = 0;
     nTabStartRow = nMemberStartRow = nDataStartRow = nTabEndRow = 0;
 
@@ -434,7 +391,6 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS
         long nDimCount = xDims->getCount();
         for (long nDim=0; nDim<nDimCount; nDim++)
         {
-            fprintf(stdout, "ScDPOutput::ScDPOutput:   dimension = %ld\n", nDim);
             uno::Reference<uno::XInterface> xDim =
                     ScUnoHelpFunctions::AnyToInterface( xDims->getByIndex(nDim) );
             uno::Reference<beans::XPropertySet> xDimProp( xDim, uno::UNO_QUERY );
@@ -455,7 +411,6 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS
 
                 if ( eDimOrient != sheet::DataPilotFieldOrientation_HIDDEN )
                 {
-                    fprintf(stdout, "ScDPOutput::ScDPOutput:   not hidden\n");
                     uno::Reference<container::XIndexAccess> xHiers =
                             new ScNameToIndexAccess( xDimSupp->getHierarchies() );
                     long nHierarchy = ScUnoHelpFunctions::GetLongProperty(
@@ -495,7 +450,6 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS
                                 switch ( eDimOrient )
                                 {
                                     case sheet::DataPilotFieldOrientation_COLUMN:
-                                        fprintf(stdout, "ScDPOutput::ScDPOutput:   column\n");
                                         pColFields[nColFieldCount].nDim    = nDim;
                                         pColFields[nColFieldCount].nHier   = nHierarchy;
                                         pColFields[nColFieldCount].nLevel  = nLev;
@@ -508,7 +462,6 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS
                                             ++nColFieldCount;
                                         break;
                                     case sheet::DataPilotFieldOrientation_ROW:
-                                        fprintf(stdout, "ScDPOutput::ScDPOutput:   row\n");
                                         pRowFields[nRowFieldCount].nDim    = nDim;
                                         pRowFields[nRowFieldCount].nHier   = nHierarchy;
                                         pRowFields[nRowFieldCount].nLevel  = nLev;
@@ -524,7 +477,6 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS
                                         }
                                         break;
                                     case sheet::DataPilotFieldOrientation_PAGE:
-                                        fprintf(stdout, "ScDPOutput::ScDPOutput:   page\n");
                                         pPageFields[nPageFieldCount].nDim    = nDim;
                                         pPageFields[nPageFieldCount].nHier   = nHierarchy;
                                         pPageFields[nPageFieldCount].nLevel  = nLev;
@@ -538,7 +490,6 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS
                                         break;
                                     default:
                                     {
-                                        fprintf(stdout, "ScDPOutput::ScDPOutput:   none of the above\n");
                                         // added to avoid warnings
                                     }
                                 }
@@ -546,7 +497,6 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS
                                 // get number formats from data dimensions
                                 if ( bIsDataLayout )
                                 {
-                                    fprintf(stdout, "ScDPOutput::ScDPOutput:   data layout\n");
                                     if (bRowFieldHasMember)
                                         mbHasDataLayout = true;
 
@@ -562,14 +512,11 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS
                 }
                 else if ( bIsDataLayout )
                 {
-                    fprintf(stdout, "ScDPOutput::ScDPOutput:   hidden data layout\n");
                     // data layout dimension is hidden (allowed if there is only one data dimension)
                     // -> use the number format from the first data dimension for all results
 
                     nSingleNumFmt = lcl_GetFirstNumberFormat( xDims );
                 }
-                else
-                    fprintf(stdout, "ScDPOutput::ScDPOutput:   just hidden ?\n");
             }
         }
         lcl_SortFields( pColFields, nColFieldCount );
@@ -767,11 +714,6 @@ void ScDPOutput::CalcSizes()
             // Insert an extra header row only when there is no column field.
             nHeaderSize = 2;
 
-        fprintf(stdout, "ScDPOutput::CalcSizes:   header size = %d\n", nHeaderSize);
-
-        fprintf(stdout, "ScDPOutput::CalcSizes:   col fields = %d  row fields = %d\n",
-                nColFieldCount, nRowFieldCount);
-
         //	calculate output positions and sizes
 
         long nPageSize = 0;		//! use page fields!
@@ -806,9 +748,6 @@ void ScDPOutput::CalcSizes()
         else
             nTabEndRow = nDataStartRow;		// single row will remain empty
         bSizesValid = TRUE;
-
-        fprintf(stdout, "ScDPOutput::CalcSizes:   table size (col=%ld,row=%ld) - (col=%ld,row=%ld)\n",
-                nTabStartCol,nTabStartRow,nTabEndCol,nTabEndRow);
     }
 }
 
diff --git a/sc/source/ui/dbgui/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx
index e0bdf66..7c5950d 100644
--- a/sc/source/ui/dbgui/fieldwnd.cxx
+++ b/sc/source/ui/dbgui/fieldwnd.cxx
@@ -49,48 +49,6 @@ using ::com::sun::star::uno::Reference;
 using ::com::sun::star::uno::WeakReference;
 using ::com::sun::star::accessibility::XAccessible;
 
-#include <stdio.h>
-#include <string>
-#include <sys/time.h>
-
-namespace {
-
-class StackPrinter
-{
-public:
-    explicit StackPrinter(const char* msg) :
-        msMsg(msg)
-    {
-        fprintf(stdout, "%s: --begin\n", msMsg.c_str());
-        mfStartTime = getTime();
-    }
-
-    ~StackPrinter()
-    {
-        double fEndTime = getTime();
-        fprintf(stdout, "%s: --end (duration: %g sec)\n", msMsg.c_str(), (fEndTime-mfStartTime));
-    }
-
-    void printTime(int line) const
-    {
-        double fEndTime = getTime();
-        fprintf(stdout, "%s: --(%d) (duration: %g sec)\n", msMsg.c_str(), line, (fEndTime-mfStartTime));
-    }
-
-private:
-    double getTime() const
-    {
-        timeval tv;
-        gettimeofday(&tv, NULL);
-        return tv.tv_sec + tv.tv_usec / 1000000.0;
-    }
-
-    ::std::string msMsg;
-    double mfStartTime;
-};
-
-}
-
 const size_t INVALID_INDEX = static_cast<size_t>(-1);
 
 ScDPFieldControlBase::ScDPFieldControlBase( ScDPLayoutDlg* pParent, const ResId& rResId, FixedText* pCaption ) :
diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx
index c207744..b9b273f 100644
--- a/sc/source/ui/dbgui/pvlaydlg.cxx
+++ b/sc/source/ui/dbgui/pvlaydlg.cxx
@@ -58,48 +58,6 @@
 #include "sc.hrc"
 #include "scabstdlg.hxx"
 
-#include <stdio.h>
-#include <string>
-#include <sys/time.h>
-
-namespace {
-
-class StackPrinter
-{
-public:
-    explicit StackPrinter(const char* msg) :
-        msMsg(msg)
-    {
-        fprintf(stdout, "%s: --begin\n", msMsg.c_str());
-        mfStartTime = getTime();
-    }
-
-    ~StackPrinter()
-    {
-        double fEndTime = getTime();
-        fprintf(stdout, "%s: --end (duration: %g sec)\n", msMsg.c_str(), (fEndTime-mfStartTime));
-    }
-
-    void printTime(int line) const
-    {
-        double fEndTime = getTime();
-        fprintf(stdout, "%s: --(%d) (duration: %g sec)\n", msMsg.c_str(), line, (fEndTime-mfStartTime));
-    }
-
-private:
-    double getTime() const
-    {
-        timeval tv;
-        gettimeofday(&tv, NULL);
-        return tv.tv_sec + tv.tv_usec / 1000000.0;
-    }
-
-    ::std::string msMsg;
-    double mfStartTime;
-};
-
-}
-
 using namespace com::sun::star;
 using ::rtl::OUString;
 using ::std::vector;
@@ -473,7 +431,6 @@ void ScDPLayoutDlg::InitFields()
 
 void ScDPLayoutDlg::AddField( size_t nFromIndex, ScDPFieldType eToType, const Point& rAtPos )
 {
-    fprintf(stdout, "ScDPLayoutDlg::AddField:   from index = %d  pos = (%ld, %ld)\n", nFromIndex, rAtPos.X(), rAtPos.Y());
     ScDPFuncData        fData( *(aSelectArr[nFromIndex]) );
     size_t nAt = 0;
     ScDPFieldControlBase* toWnd = GetFieldWindow(eToType);
@@ -548,8 +505,6 @@ void ScDPLayoutDlg::AddField( size_t nFromIndex, ScDPFieldType eToType, const Po
 
 void ScDPLayoutDlg::AppendField(size_t nFromIndex, ScDPFieldType eToType)
 {
-    StackPrinter __stack_printer__("ScDPLayoutDlg::AppendField");
-    fprintf(stdout, "ScDPLayoutDlg::AppendField:   from index = %d  to type = %d\n", nFromIndex, eToType);
     ScDPFuncData aFuncData = *aSelectArr[nFromIndex];
 
     size_t nAt = 0;
@@ -621,8 +576,6 @@ void ScDPLayoutDlg::AppendField(size_t nFromIndex, ScDPFieldType eToType)
 
 void ScDPLayoutDlg::MoveField( ScDPFieldType eFromType, size_t nFromIndex, ScDPFieldType eToType, const Point& rAtPos )
 {
-    StackPrinter __stack_printer__("ScDPLayoutDlg::MoveField");
-    fprintf(stdout, "ScDPLayoutDlg::MoveField:   from type = %d  from index = %d  to type = %d\n", eFromType, nFromIndex, eToType);
     if ( eFromType == TYPE_SELECT )
         AddField( nFromIndex, eToType, rAtPos );
     else if ( eFromType != eToType )
@@ -767,10 +720,6 @@ void ScDPLayoutDlg::MoveField( ScDPFieldType eFromType, size_t nFromIndex, ScDPF
 
 void ScDPLayoutDlg::MoveFieldToEnd( ScDPFieldType eFromType, size_t nFromIndex, ScDPFieldType eToType )
 {
-    StackPrinter __stack_printer__("ScDPLayoutDlg::MoveFieldToEnd");
-    fprintf(stdout, "ScDPLayoutDlg::MoveFieldToEnd:   from type = %d  from index = %d  to type = %d\n",
-            eFromType, nFromIndex, eToType);
-
     if ( eFromType == TYPE_SELECT )
         AppendField( nFromIndex, eToType );
     else if ( eFromType != eToType )
@@ -907,8 +856,6 @@ void ScDPLayoutDlg::MoveFieldToEnd( ScDPFieldType eFromType, size_t nFromIndex,
 
 void ScDPLayoutDlg::RemoveField( ScDPFieldType eFromType, size_t nIndex )
 {
-    StackPrinter __stack_printer__("ScDPLayoutDlg::RemoveField");
-    fprintf(stdout, "ScDPLayoutDlg::RemoveField:   from type = %d  index = %d\n", eFromType, nIndex);
     ScDPFuncDataVec* pArr = GetFieldDataArray(eFromType);
 
     if( pArr )
@@ -927,7 +874,6 @@ void ScDPLayoutDlg::RemoveField( ScDPFieldType eFromType, size_t nIndex )
 
 void ScDPLayoutDlg::NotifyMouseButtonUp( const Point& rAt )
 {
-    StackPrinter __stack_printer__("ScDPLayoutDlg::NotifyMouseButtonUp");
     if ( bIsDrag )
     {
         bIsDrag = FALSE;
@@ -1431,7 +1377,6 @@ bool ScDPLayoutDlg::GetPivotArrays(
 
 void ScDPLayoutDlg::UpdateSrcRange()
 {
-    StackPrinter __stack_printer__("ScDPLayoutDlg::UpdateSrcRange");
     String  theCurPosStr = aEdInPos.GetText();
     USHORT  nResult = ScRange().Parse(theCurPosStr, pDoc, pDoc->GetAddressConvention());
 
commit c7e7a4f56c6fb09829264ab2819e2f2c10693465
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Wed Dec 15 17:46:36 2010 -0500

    Added some class descriptions.

diff --git a/sc/source/ui/inc/fieldwnd.hxx b/sc/source/ui/inc/fieldwnd.hxx
index 22defb6..f681021 100644
--- a/sc/source/ui/inc/fieldwnd.hxx
+++ b/sc/source/ui/inc/fieldwnd.hxx
@@ -230,6 +230,10 @@ private:
 
 // ============================================================================
 
+/**
+ * Base class for field control with a horizontal scroll bar at the bottom.
+ * Page, column, data and select fields are derived from this class.
+ */
 class ScDPHorFieldControl : public ScDPFieldControlBase
 {
 protected:
@@ -295,6 +299,9 @@ public:
 
 // ============================================================================
 
+/**
+ * Row field control with a vertical scroll bar.
+ */
 class ScDPRowFieldControl : public ScDPFieldControlBase
 {
 public:
commit 926dfc3a1a09b53aa53711ac4f3bf176d67ab8be
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Wed Dec 15 17:18:17 2010 -0500

    Show the scroll bars only when necessary, otherwise hide them.

diff --git a/sc/source/ui/dbgui/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx
index 2d0b812..e0bdf66 100644
--- a/sc/source/ui/dbgui/fieldwnd.cxx
+++ b/sc/source/ui/dbgui/fieldwnd.cxx
@@ -721,7 +721,7 @@ ScDPHorFieldControl::ScDPHorFieldControl(
 {
     maScroll.SetScrollHdl( LINK(this, ScDPHorFieldControl, ScrollHdl) );
     maScroll.SetEndScrollHdl( LINK(this, ScDPHorFieldControl, EndScrollHdl) );
-    maScroll.Show();
+    maScroll.Hide();
 
     AppendPaintable(&maScroll);
 }
@@ -931,7 +931,11 @@ void ScDPHorFieldControl::ResetScrollBar()
         static_cast<double>(GetFieldCount()) / static_cast<double>(mnFieldBtnRowCount));
 
     if (nOldMax != nNewMax)
+    {
         maScroll.SetRangeMax(nNewMax);
+        bool bShow = mnFieldBtnColCount*mnFieldBtnRowCount < GetFieldCount();
+        maScroll.Show(bShow);
+    }
 }
 
 bool ScDPHorFieldControl::GetFieldBtnPosSize(size_t nPos, Point& rPos, Size& rSize)
@@ -1012,7 +1016,7 @@ ScDPRowFieldControl::ScDPRowFieldControl(
 {
     maScroll.SetScrollHdl( LINK(this, ScDPRowFieldControl, ScrollHdl) );
     maScroll.SetEndScrollHdl( LINK(this, ScDPRowFieldControl, EndScrollHdl) );
-    maScroll.Show();
+    maScroll.Show(false);
 
     AppendPaintable(&maScroll);
 }
@@ -1173,7 +1177,10 @@ void ScDPRowFieldControl::ResetScrollBar()
     long nNewMax = std::max<long>(mnColumnBtnCount, GetFieldCount());
 
     if (nOldMax != nNewMax)
+    {
         maScroll.SetRangeMax(nNewMax);
+        maScroll.Show(GetFieldCount() > mnColumnBtnCount);
+    }
 }
 
 bool ScDPRowFieldControl::GetFieldBtnPosSize(size_t nPos, Point& rPos, Size& rSize)
commit 83bfacd324eae18eb9d4a3bba1027affff4c0fbf
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Wed Dec 15 16:56:47 2010 -0500

    Removed the old code for the data field control.

diff --git a/sc/source/ui/dbgui/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx
index 74bc3ee..2d0b812 100644
--- a/sc/source/ui/dbgui/fieldwnd.cxx
+++ b/sc/source/ui/dbgui/fieldwnd.cxx
@@ -1228,8 +1228,6 @@ ScDPFieldType ScDPSelectFieldControl::GetFieldType() const
 
 //=============================================================================
 
-#if DATA_FIELD_NEW
-
 ScDPDataFieldControl::ScDPDataFieldControl(
     ScDPLayoutDlg* pDialog, const ResId& rResId, FixedText* pCaption) :
     ScDPHorFieldControl(pDialog, rResId, pCaption)
@@ -1258,360 +1256,4 @@ String ScDPDataFieldControl::GetDescription() const
     return ScResId(STR_ACC_DATAPILOT_DATA_DESCR);
 }
 
-#else
-
-ScDPDataFieldControl::ScDPDataFieldControl( ScDPLayoutDlg* pParent, const ResId& rResId, FixedText* pCaption ) :
-    ScDPFieldControlBase(pParent, rResId, pCaption),
-    maScroll(this, WB_HORZ | WB_DRAG),
-    mpParent(pParent),
-    mnScrollMarginHeight(0),
-    mnColumnBtnCount(0),
-    mnTotalBtnCount(0)
-{
-    maScroll.SetLineSize(1);
-    maScroll.SetVisibleSize(2);
-    maScroll.SetPageSize(2);
-    maScroll.SetRange(Range(0, 2));
-    maScroll.DoScroll(0);
-    maScroll.SetScrollHdl( LINK(this, ScDPDataFieldControl, ScrollHdl) );
-    maScroll.SetEndScrollHdl( LINK(this, ScDPDataFieldControl, EndScrollHdl) );
-    maScroll.Show();
-
-    AppendPaintable(&maScroll);
-}
-
-ScDPDataFieldControl::~ScDPDataFieldControl()
-{
-}
-
-void ScDPDataFieldControl::CalcSize()
-{
-    long nScrollSize = GetSettings().GetStyleSettings().GetScrollBarSize();
-    Size aWndSize = GetSizePixel();
-    mnScrollMarginHeight = nScrollSize + OUTER_MARGIN_VER;
-
-    maScroll.SetSizePixel(Size(aWndSize.Width() - OUTER_MARGIN_HOR*2, nScrollSize));
-    maScroll.SetPosPixel(Point(OUTER_MARGIN_HOR, aWndSize.Height() - mnScrollMarginHeight));
-
-    long nH = GetFieldSize().Height() + DATA_FIELD_BTN_GAP;
-    long nTotalH = aWndSize.Height() - mnScrollMarginHeight - OUTER_MARGIN_VER;
-    mnColumnBtnCount = nTotalH / nH;
-    mnTotalBtnCount = mnColumnBtnCount * 2;
-}
-
-bool ScDPDataFieldControl::IsValidIndex(size_t /*nIndex*/) const
-{
-    // We support unlimited number of data fields.  If we ever want to put a
-    // cap on the number of data fields, this is the right place.
-    return true;
-}
-
-Point ScDPDataFieldControl::GetFieldPosition(size_t nIndex)
-{
-    Point aPos;
-    Size aSize;
-    GetFieldBtnPosSize(nIndex, aPos, aSize);
-    return aPos;
-}
-
-bool ScDPDataFieldControl::GetFieldIndex(const Point& rPos, size_t& rnIndex)
-{
-    size_t nCol, nRow;
-    GetFieldBtnColRow(rPos, nCol, nRow);
-    nCol += static_cast<size_t>(maScroll.GetThumbPos());
-    size_t nIndex = nCol * mnColumnBtnCount;
-
-    nIndex += nRow;
-    size_t nFldCount = GetFieldCount();
-    if (nIndex >= nFldCount)
-        nIndex = nFldCount;
-
-    rnIndex = nIndex;
-    return true;
-}
-
-Size ScDPDataFieldControl::GetFieldSize() const
-{
-    Size aWndSize = GetSizePixel();
-    long nFieldObjWidth = aWndSize.Width() / 2.0 - OUTER_MARGIN_HOR - DATA_FIELD_BTN_GAP/2;
-    Size aFieldSize(nFieldObjWidth, FIELD_BTN_HEIGHT);
-    return aFieldSize;
-}
-
-String ScDPDataFieldControl::GetDescription() const
-{
-    return ScResId(STR_ACC_DATAPILOT_DATA_DESCR);
-}
-
-ScDPFieldType ScDPDataFieldControl::GetFieldType() const
-{
-    return TYPE_DATA;
-}
-
-void ScDPDataFieldControl::ScrollToEnd()
-{
-    maScroll.DoScroll(maScroll.GetRangeMax());
-}
-
-void ScDPDataFieldControl::ScrollToShowSelection()
-{
-    long nNewOffset = CalcOffsetToShowSelection();
-    if (nNewOffset != maScroll.GetThumbPos())
-        maScroll.DoScroll(nNewOffset);
-}
-
-void ScDPDataFieldControl::ResetScrollBar()
-{
-    long nOldMax = maScroll.GetRangeMax();
-    long nNewMax = ceil(
-        static_cast<double>(GetFieldCount()) / static_cast<double>(mnColumnBtnCount));
-
-    if (nOldMax != nNewMax)
-    {
-        maScroll.SetRangeMax(nNewMax);
-        if (nNewMax < nOldMax)
-        {
-            // We lost a column.  Scroll to the right frame.
-            long nNewOffset = CalcOffsetToShowSelection();
-            nNewOffset -= 2;
-            if (nNewOffset < 0)
-                nNewOffset = 0;
-            maScroll.DoScroll(nNewOffset);
-        }
-    }
-}
-
-void ScDPDataFieldControl::Paint(const Rectangle& /*rRect*/)
-{
-    Redraw();
-}
-
-void ScDPDataFieldControl::DataChanged( const DataChangedEvent& rDCEvt )
-{
-    ScDPFieldControlBase::DataChanged(rDCEvt);
-}
-
-void ScDPDataFieldControl::MouseButtonDown(const MouseEvent& rMEvt)
-{
-    if (maScroll.IsVisible())
-    {
-        Rectangle aRect(maScroll.GetPosPixel(), maScroll.GetSizePixel());
-        if (aRect.IsInside(rMEvt.GetPosPixel()))
-        {
-            maScroll.MouseButtonDown(rMEvt);
-            return;
-        }
-    }
-    ScDPFieldControlBase::MouseButtonDown(rMEvt);
-}
-
-void ScDPDataFieldControl::MouseButtonUp(const MouseEvent& rMEvt)
-{
-    if (maScroll.IsVisible())
-    {
-        Rectangle aRect(maScroll.GetPosPixel(), maScroll.GetSizePixel());
-        if (aRect.IsInside(rMEvt.GetPosPixel()))
-        {
-            maScroll.MouseButtonUp(rMEvt);
-            return;
-        }
-    }
-    ScDPFieldControlBase::MouseButtonUp(rMEvt);
-}
-
-void ScDPDataFieldControl::MouseMove(const MouseEvent& rMEvt)
-{
-    if (maScroll.IsVisible())
-    {
-        Rectangle aRect(maScroll.GetPosPixel(), maScroll.GetSizePixel());
-        if (aRect.IsInside(rMEvt.GetPosPixel()))
-        {
-            maScroll.MouseMove(rMEvt);
-            return;
-        }
-    }
-    ScDPFieldControlBase::MouseMove(rMEvt);
-}
-
-bool ScDPDataFieldControl::GetFieldBtnPosSize(size_t nPos, Point& rPos, Size& rSize)
-{
-    if (nPos >= mnTotalBtnCount)
-        return false;
-
-    Size aFieldSize = GetFieldSize();
-
-    size_t nCol = nPos / mnColumnBtnCount;
-    size_t nRow = nPos % mnColumnBtnCount;
-
-    long nX = OUTER_MARGIN_HOR + aFieldSize.Width() * nCol;
-    if (nCol > 0)
-        nX += DATA_FIELD_BTN_GAP * nCol;
-
-    long nY = OUTER_MARGIN_VER + aFieldSize.Height() * nRow;
-    if (nRow > 0)
-        nY += DATA_FIELD_BTN_GAP * nRow;
-
-    rPos = Point(nX, nY);
-    rSize = aFieldSize;
-    return true;
-}
-
-void ScDPDataFieldControl::GetFieldBtnColRow(const Point& rPos, size_t& rCol, size_t& rRow)
-{
-    Size aSize = GetSizePixel();
-    long nBtnH = GetFieldSize().Height();
-
-    size_t nCol = (rPos.X() <= aSize.Width()/2.0) ? 0 : 1;
-    size_t nRow = 0;
-
-    long nVBound = OUTER_MARGIN_VER + nBtnH + DATA_FIELD_BTN_GAP;
-    while (true)
-    {
-        if (rPos.Y() <= nVBound)
-            break;
-
-        nVBound += nBtnH + DATA_FIELD_BTN_GAP;
-        if (nVBound > aSize.Height())
-            break;
-
-        ++nRow;
-    }
-
-    rCol = nCol;
-    rRow = nRow;
-}
-
-long ScDPDataFieldControl::CalcOffsetToShowSelection()
-{
-    long nOffset = maScroll.GetThumbPos();
-    size_t nSel = GetSelectedField();
-    size_t nLower = nOffset*mnColumnBtnCount;
-    size_t nUpper = nLower + mnColumnBtnCount * 2 - 1;
-    long nNewOffset = nOffset;
-    if (nSel < nLower)
-    {
-        // scroll to left.  The selected field should be in the left column.
-        nNewOffset = floor(
-            static_cast<double>(nSel) / static_cast<double>(mnColumnBtnCount));
-    }
-    else if (nUpper < nSel)
-    {
-        // scroll to right.  The selected field should be in the right column.
-        nNewOffset = floor(
-            static_cast<double>(nSel) / static_cast<double>(mnColumnBtnCount))-1;
-    }
-    return nNewOffset;
-}
-
-void ScDPDataFieldControl::HandleScroll()
-{
-    Redraw();
-}
-
-void ScDPDataFieldControl::Redraw()
-{
-    VirtualDevice	aVirDev;
-    // #i97623# VirtualDevice is always LTR while other windows derive direction from parent
-    aVirDev.EnableRTL( IsRTLEnabled() );
-    aVirDev.SetMapMode( MAP_PIXEL );
-
-    Point aPos0;
-    Size aWndSize = GetSizePixel();
-    Font aFont = GetFont();
-    aFont.SetTransparent(true);
-    aVirDev.SetFont(aFont);
-    aVirDev.SetOutputSizePixel(aWndSize);
-
-    DrawBackground(aVirDev);
-
-    long nOffset = maScroll.GetThumbPos();
-    FieldNames& rFields = GetFieldNames();
-    {
-        FieldNames::iterator itr = rFields.begin(), itrEnd = rFields.end();
-        if (nOffset)
-            ::std::advance(itr, nOffset*mnColumnBtnCount);
-
-        for (size_t i = 0; itr != itrEnd; ++itr, ++i)
-        {
-            Point aFldPt;
-            Size aFldSize;
-            if (!GetFieldBtnPosSize(i, aFldPt, aFldSize))
-                break;
-
-            size_t nField = i + nOffset*mnColumnBtnCount;
-            bool bFocus = HasFocus() && (nField == GetSelectedField());
-            DrawField(aVirDev, Rectangle(aFldPt, aFldSize), *itr, bFocus);
-        }
-    }
-
-    // Create a bitmap from the virtual device, and place that bitmap onto
-    // this control.
-    DrawBitmap(aPos0, aVirDev.GetBitmap(aPos0, aWndSize));
-
-    DrawPaintables();
-    DrawInvertSelection();
-    UpdateStyle();
-}
-
-size_t ScDPDataFieldControl::CalcNewFieldIndex(SCsCOL nDX, SCsROW nDY) const
-{
-    size_t nField = GetSelectedField();
-    if (nField < mnColumnBtnCount)
-    {
-        // selected button in the first column.
-        if (nDX < 0)
-            // in the left most column.  We can't move any more to the left.
-            return nField;
-        if (nField == 0 && nDY < 0)
-            // at the top left most position.  We can't move up any more.
-            return nField;
-    }
-
-    size_t nFldCount = GetFieldCount();
-    size_t nFirstInLastCol = nFldCount / mnColumnBtnCount * mnColumnBtnCount;
-    if (nFirstInLastCol <= nField)
-    {
-        // selected button in the last column.
-        if (nDX > 0)
-            // can't move to the right any more.
-            return nField;
-        if (nDY > 0 && nField >= nFldCount)
-            // at the last position.  Can't move down any more.
-            return nField;
-    }
-
-    nDY += nDX * mnColumnBtnCount;
-    nField += nDY;
-
-    if (nField >= nFldCount)
-        // Don't exceed the upper bound.
-        nField = nFldCount - 1;
-    return nField;
-}
-
-size_t ScDPDataFieldControl::GetDisplayPosition(size_t nIndex) const
-{
-    long nOffset = maScroll.GetThumbPos();
-    size_t nLower = mnColumnBtnCount * nOffset;
-    size_t nUpper = nLower + mnColumnBtnCount*2 - 1;
-    if (nLower <= nIndex && nIndex <= nUpper)
-        return nIndex - nLower;
-
-    return INVALID_INDEX;
-}
-
-IMPL_LINK(ScDPDataFieldControl, ScrollHdl, ScrollBar*, EMPTYARG)
-{
-    HandleScroll();
-    return 0;
-}
-
-IMPL_LINK(ScDPDataFieldControl, EndScrollHdl, ScrollBar*, EMPTYARG)
-{
-    HandleScroll();
-    return 0;
-}
-
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/fieldwnd.hxx b/sc/source/ui/inc/fieldwnd.hxx
index f501a32..22defb6 100644
--- a/sc/source/ui/inc/fieldwnd.hxx
+++ b/sc/source/ui/inc/fieldwnd.hxx
@@ -347,10 +347,6 @@ public:
 
 // ============================================================================
 
-#define DATA_FIELD_NEW 1
-
-#if DATA_FIELD_NEW
-
 class ScDPDataFieldControl : public ScDPHorFieldControl
 {
 public:
@@ -362,69 +358,6 @@ public:
     virtual String GetDescription() const;
 };
 
-#else
-
-class ScDPDataFieldControl : public ScDPFieldControlBase
-{
-public:
-    ScDPDataFieldControl( ScDPLayoutDlg* pParent, const ResId& rResId, FixedText* pCaption );
-    virtual ~ScDPDataFieldControl();
-
-    virtual void CalcSize();
-    virtual bool IsValidIndex( size_t nIndex ) const;
-    virtual Point GetFieldPosition( size_t nIndex );
-    virtual bool GetFieldIndex(const Point& rPos, size_t& rnIndex);
-    virtual Size GetFieldSize() const;
-    virtual String GetDescription() const;
-    virtual ScDPFieldType GetFieldType() const;
-    virtual void ScrollToEnd();
-    virtual void ScrollToShowSelection();
-    virtual void ResetScrollBar();
-
-public:
-    virtual void Paint( const Rectangle& rRect );
-    virtual void DataChanged( const DataChangedEvent& rDCEvt );
-    virtual void MouseButtonDown( const MouseEvent& rMEvt );
-    virtual void MouseButtonUp( const MouseEvent& rMEvt );
-    virtual void MouseMove( const MouseEvent& rMEvt );
-
-protected:
-    virtual void Redraw();
-    virtual size_t CalcNewFieldIndex( SCsCOL nDX, SCsROW nDY ) const;
-    virtual size_t GetDisplayPosition(size_t nIndex) const;
-
-private:
-    /**
-     * Get the size and position of specified field button.
-     *
-     * @param nPos position index of the field button.  Note that this index
-     *             differs from field name index in that, the top left button
-     *             always has an index of 0 regardless off scroll offset.
-     * @param rPos
-     * @param rSize
-     *
-     * @return false if the position index is out-of-bound, or otherwise
-     *         invalid.
-     */
-    bool GetFieldBtnPosSize(size_t nPos, Point& rPos, Size& rSize);
-    void GetFieldBtnColRow(const Point& rPos, size_t& rCol, size_t& rRow);
-    long CalcOffsetToShowSelection();
-    void HandleScroll();
-
-    DECL_LINK(ScrollHdl, ScrollBar*);
-    DECL_LINK(EndScrollHdl, ScrollBar*);
-
-private:
-    ScrollBar       maScroll;
-    ScDPLayoutDlg*  mpParent;
-
-    long            mnScrollMarginHeight; /// bottom scroll bar margin height.
-    size_t          mnColumnBtnCount; /// number of buttons per single column.
-    size_t          mnTotalBtnCount; /// number of total visible buttons
-};
-
-#endif
-
 #endif // SC_FIELDWND_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 8fffea3bec326e98386b98c294356d4d1cb49936
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Wed Dec 15 16:51:50 2010 -0500

    Added mode lines for the new file.

diff --git a/sc/source/ui/dbgui/dpuiglobal.hxx b/sc/source/ui/dbgui/dpuiglobal.hxx
index 10d95e6..b648750 100644
--- a/sc/source/ui/dbgui/dpuiglobal.hxx
+++ b/sc/source/ui/dbgui/dpuiglobal.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /*
  * Version: MPL 1.1 / GPLv3+ / LGPLv3+
  *
@@ -38,3 +39,5 @@
 #define FIELD_AREA_GAP       3   // gap between row/column/data/page areas
 
 #endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit ddfe893ea68dc7bdb02d711c750d4e413e1bb118
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Wed Dec 15 15:59:15 2010 -0500

    Reuse ScDPHorFieldControl to render the data field, to reduce code size.

diff --git a/sc/source/ui/dbgui/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx
index cd14479..74bc3ee 100644
--- a/sc/source/ui/dbgui/fieldwnd.cxx
+++ b/sc/source/ui/dbgui/fieldwnd.cxx
@@ -1228,6 +1228,38 @@ ScDPFieldType ScDPSelectFieldControl::GetFieldType() const
 
 //=============================================================================
 
+#if DATA_FIELD_NEW
+
+ScDPDataFieldControl::ScDPDataFieldControl(
+    ScDPLayoutDlg* pDialog, const ResId& rResId, FixedText* pCaption) :
+    ScDPHorFieldControl(pDialog, rResId, pCaption)
+{
+}
+
+ScDPDataFieldControl::~ScDPDataFieldControl()
+{
+}
+
+ScDPFieldType ScDPDataFieldControl::GetFieldType() const
+{
+    return TYPE_DATA;
+}
+
+Size ScDPDataFieldControl::GetFieldSize() const
+{
+    Size aWndSize = GetSizePixel();
+    long nFieldObjWidth = aWndSize.Width() / 2.0 - OUTER_MARGIN_HOR - DATA_FIELD_BTN_GAP/2;
+    Size aFieldSize(nFieldObjWidth, FIELD_BTN_HEIGHT);
+    return aFieldSize;
+}
+
+String ScDPDataFieldControl::GetDescription() const
+{
+    return ScResId(STR_ACC_DATAPILOT_DATA_DESCR);
+}
+
+#else
+
 ScDPDataFieldControl::ScDPDataFieldControl( ScDPLayoutDlg* pParent, const ResId& rResId, FixedText* pCaption ) :
     ScDPFieldControlBase(pParent, rResId, pCaption),
     maScroll(this, WB_HORZ | WB_DRAG),
@@ -1580,4 +1612,6 @@ IMPL_LINK(ScDPDataFieldControl, EndScrollHdl, ScrollBar*, EMPTYARG)
     return 0;
 }
 
+#endif
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/fieldwnd.hxx b/sc/source/ui/inc/fieldwnd.hxx
index 21eda91..f501a32 100644
--- a/sc/source/ui/inc/fieldwnd.hxx
+++ b/sc/source/ui/inc/fieldwnd.hxx
@@ -347,6 +347,23 @@ public:
 
 // ============================================================================
 
+#define DATA_FIELD_NEW 1
+
+#if DATA_FIELD_NEW
+
+class ScDPDataFieldControl : public ScDPHorFieldControl
+{
+public:
+    ScDPDataFieldControl( ScDPLayoutDlg* pParent, const ResId& rResId, FixedText* pCaption );
+    virtual ~ScDPDataFieldControl();
+
+    virtual ScDPFieldType GetFieldType() const;
+    virtual Size GetFieldSize() const;
+    virtual String GetDescription() const;
+};
+
+#else
+
 class ScDPDataFieldControl : public ScDPFieldControlBase
 {
 public:
@@ -406,6 +423,8 @@ private:
     size_t          mnTotalBtnCount; /// number of total visible buttons
 };
 
+#endif
+
 #endif // SC_FIELDWND_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 331d477815640c9dd62089725a9bec8af4d0ee40
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Wed Dec 15 15:45:15 2010 -0500

    Call GetFieldSize() to get button size to avoid hard-coded size.

diff --git a/sc/source/ui/dbgui/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx
index 6f5151f..cd14479 100644
--- a/sc/source/ui/dbgui/fieldwnd.cxx
+++ b/sc/source/ui/dbgui/fieldwnd.cxx
@@ -758,18 +758,19 @@ bool ScDPHorFieldControl::GetFieldIndex( const Point& rPos, size_t& rnIndex )
     size_t nW = aWndSize.Width();
     size_t nH = aWndSize.Height();
 
-    size_t nCurX = OUTER_MARGIN_HOR + FIELD_BTN_WIDTH + ROW_FIELD_BTN_GAP/2;
-    size_t nCurY = OUTER_MARGIN_VER + FIELD_BTN_HEIGHT + ROW_FIELD_BTN_GAP/2;
+    Size aFldSize = GetFieldSize();
+    size_t nCurX = OUTER_MARGIN_HOR + aFldSize.Width() + ROW_FIELD_BTN_GAP/2;
+    size_t nCurY = OUTER_MARGIN_VER + aFldSize.Height() + ROW_FIELD_BTN_GAP/2;
     size_t nCol = 0;
     size_t nRow = 0;
     while (nX > nCurX && nCurX <= nW)
     {
-        nCurX += FIELD_BTN_WIDTH + ROW_FIELD_BTN_GAP;
+        nCurX += aFldSize.Width() + ROW_FIELD_BTN_GAP;
         ++nCol;
     }
     while (nY > nCurY && nCurY <= nH)
     {
-        nCurY += FIELD_BTN_HEIGHT + ROW_FIELD_BTN_GAP;
+        nCurY += aFldSize.Height() + ROW_FIELD_BTN_GAP;
         ++nRow;
     }
 
@@ -840,8 +841,8 @@ void ScDPHorFieldControl::CalcSize()
 
     long nTotalH = aWndSize.Height() - nScrollSize - OUTER_MARGIN_VER*2;
     long nTotalW = aWndSize.Width() - OUTER_MARGIN_HOR*2;
-    mnFieldBtnRowCount = nTotalH / (FIELD_BTN_HEIGHT + ROW_FIELD_BTN_GAP);
-    mnFieldBtnColCount = (nTotalW + ROW_FIELD_BTN_GAP) / (FIELD_BTN_WIDTH + ROW_FIELD_BTN_GAP);
+    mnFieldBtnRowCount = nTotalH / (GetFieldSize().Height() + ROW_FIELD_BTN_GAP);
+    mnFieldBtnColCount = (nTotalW + ROW_FIELD_BTN_GAP) / (GetFieldSize().Width() + ROW_FIELD_BTN_GAP);
 
     maScroll.SetLineSize(1);
     maScroll.SetVisibleSize(mnFieldBtnColCount);
@@ -942,11 +943,11 @@ bool ScDPHorFieldControl::GetFieldBtnPosSize(size_t nPos, Point& rPos, Size& rSi
     size_t nRow = nPos % mnFieldBtnRowCount;
     size_t nCol = nPos / mnFieldBtnRowCount;
 
-    aPos.X() += nCol*(FIELD_BTN_WIDTH + ROW_FIELD_BTN_GAP);
-    aPos.Y() += nRow*(FIELD_BTN_HEIGHT + ROW_FIELD_BTN_GAP);
+    aPos.X() += nCol*(GetFieldSize().Width() + ROW_FIELD_BTN_GAP);
+    aPos.Y() += nRow*(GetFieldSize().Height() + ROW_FIELD_BTN_GAP);
 
     rPos = aPos;
-    rSize = Size(FIELD_BTN_WIDTH, FIELD_BTN_HEIGHT);
+    rSize = GetFieldSize();
     return true;
 }
 
@@ -1041,7 +1042,7 @@ bool ScDPRowFieldControl::GetFieldIndex( const Point& rPos, size_t& rnIndex )
     if (rPos.X() < 0 || rPos.Y() < 0)
         return false;
 
-    rnIndex = rPos.Y() / FIELD_BTN_HEIGHT + maScroll.GetThumbPos();
+    rnIndex = rPos.Y() / GetFieldSize().Height() + maScroll.GetThumbPos();
     return IsValidIndex(rnIndex);
 }
 
@@ -1095,7 +1096,7 @@ void ScDPRowFieldControl::CalcSize()
     Size aWndSize = GetSizePixel();
 
     long nTotal = aWndSize.Height() - OUTER_MARGIN_VER;
-    mnColumnBtnCount = nTotal / (FIELD_BTN_HEIGHT + ROW_FIELD_BTN_GAP);
+    mnColumnBtnCount = nTotal / (GetFieldSize().Height() + ROW_FIELD_BTN_GAP);
 
     long nScrollSize = GetSettings().GetStyleSettings().GetScrollBarSize();
 
@@ -1184,9 +1185,9 @@ bool ScDPRowFieldControl::GetFieldBtnPosSize(size_t nPos, Point& rPos, Size& rSi
     if (nPos + nOffset >= GetFieldCount())
         return false;
 
-    rSize = Size(FIELD_BTN_WIDTH, FIELD_BTN_HEIGHT);
+    rSize = GetFieldSize();
     rPos = Point(OUTER_MARGIN_HOR, OUTER_MARGIN_VER);
-    rPos.Y() += nPos * (FIELD_BTN_HEIGHT + ROW_FIELD_BTN_GAP);
+    rPos.Y() += nPos * (rSize.Height() + ROW_FIELD_BTN_GAP);
     return true;
 }
 
@@ -1260,7 +1261,7 @@ void ScDPDataFieldControl::CalcSize()
     maScroll.SetSizePixel(Size(aWndSize.Width() - OUTER_MARGIN_HOR*2, nScrollSize));
     maScroll.SetPosPixel(Point(OUTER_MARGIN_HOR, aWndSize.Height() - mnScrollMarginHeight));
 
-    long nH = FIELD_BTN_HEIGHT + DATA_FIELD_BTN_GAP;
+    long nH = GetFieldSize().Height() + DATA_FIELD_BTN_GAP;
     long nTotalH = aWndSize.Height() - mnScrollMarginHeight - OUTER_MARGIN_VER;
     mnColumnBtnCount = nTotalH / nH;
     mnTotalBtnCount = mnColumnBtnCount * 2;
@@ -1426,7 +1427,7 @@ bool ScDPDataFieldControl::GetFieldBtnPosSize(size_t nPos, Point& rPos, Size& rS
 void ScDPDataFieldControl::GetFieldBtnColRow(const Point& rPos, size_t& rCol, size_t& rRow)
 {
     Size aSize = GetSizePixel();
-    long nBtnH = FIELD_BTN_HEIGHT;
+    long nBtnH = GetFieldSize().Height();
 
     size_t nCol = (rPos.X() <= aSize.Width()/2.0) ? 0 : 1;
     size_t nRow = 0;
commit f29227703201cf96928e53dd1dc7ee369706c5ff
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Wed Dec 15 15:29:46 2010 -0500

    A little UI tweak & code cleanup.

diff --git a/sc/source/ui/dbgui/dpuiglobal.hxx b/sc/source/ui/dbgui/dpuiglobal.hxx
index 5fd4ed2..10d95e6 100644
--- a/sc/source/ui/dbgui/dpuiglobal.hxx
+++ b/sc/source/ui/dbgui/dpuiglobal.hxx
@@ -28,8 +28,6 @@
 #ifndef __SC_DPUIGLOBAL_HXX__
 #define __SC_DPUIGLOBAL_HXX__
 
-#define MAX_PAGEFIELDS 10   // maximum count of fields for page area
-
 #define OUTER_MARGIN_HOR     4
 #define OUTER_MARGIN_VER     4
 #define DATA_FIELD_BTN_GAP   2     // must be an even number
diff --git a/sc/source/ui/dbgui/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx
index 206812c..6f5151f 100644
--- a/sc/source/ui/dbgui/fieldwnd.cxx
+++ b/sc/source/ui/dbgui/fieldwnd.cxx
@@ -396,15 +396,17 @@ void ScDPFieldControlBase::KeyInput( const KeyEvent& rKEvt )
         bKeyEvaluated = true;
         switch( nCode )
         {
-            case KEY_UP:    MoveSelection( nCode, 0, -1 );          break;
-            case KEY_DOWN:  MoveSelection( nCode, 0, 1 );           break;
-            case KEY_LEFT:  MoveSelection( nCode, -1, 0 );          break;
-            case KEY_RIGHT: MoveSelection( nCode, 1, 0 );           break;
-            case KEY_HOME:  SetSelectionHome();                     break;
-            case KEY_END:   SetSelectionEnd();                      break;
+            case KEY_UP:    MoveSelection( 0, -1 ); break;
+            case KEY_DOWN:  MoveSelection( 0, 1 ); break;
+            case KEY_LEFT:  MoveSelection( -1, 0 ); break;
+            case KEY_RIGHT: MoveSelection( 1, 0 ); break;
+            case KEY_HOME:  SetSelectionHome();     break;
+            case KEY_END:   SetSelectionEnd();      break;
             case KEY_DELETE:
-                mpDlg->NotifyRemoveField( GetFieldType(), mnFieldSelected );   break;
-            default:        bKeyEvaluated = false;
+                mpDlg->NotifyRemoveField( GetFieldType(), mnFieldSelected );
+            break;
+            default:
+                bKeyEvaluated = false;
         }
     }
 
@@ -504,8 +506,16 @@ void ScDPFieldControlBase::DrawBackground( OutputDevice& rDev )
     Point aPos0;
     Size aSize( GetSizePixel() );
 
-    rDev.SetLineColor( aWinTextColor );
-    rDev.SetFillColor( aWinColor );
+    if (mpCaption)
+    {
+        rDev.SetLineColor( aWinTextColor );
+        rDev.SetFillColor( aWinColor );
+    }
+    else
+    {
+        rDev.SetLineColor( aFaceColor );
+        rDev.SetFillColor( aFaceColor );
+    }
     rDev.DrawRect( Rectangle( aPos0, aSize ) );
 
     rDev.SetTextColor( aWinTextColor );
@@ -676,7 +686,7 @@ void ScDPFieldControlBase::SetSelectionEnd()
     }
 }
 
-void ScDPFieldControlBase::MoveSelection( USHORT nKeyCode, SCsCOL nDX, SCsROW nDY )
+void ScDPFieldControlBase::MoveSelection(SCsCOL nDX, SCsROW nDY)
 {
     size_t nNewIndex = CalcNewFieldIndex( nDX, nDY );
     SetSelection( nNewIndex );
diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx
index 9f05845..c207744 100644
--- a/sc/source/ui/dbgui/pvlaydlg.cxx
+++ b/sc/source/ui/dbgui/pvlaydlg.cxx
@@ -1360,6 +1360,7 @@ void ScDPLayoutDlg::CalcWndSizes()
     // selection area
     long nLineSize = 10; // number of fields per column.
     long nH = OUTER_MARGIN_VER + nLineSize* nFldH + nLineSize * ROW_FIELD_BTN_GAP;
+    nH += ROW_FIELD_BTN_GAP;
     nH += GetSettings().GetStyleSettings().GetScrollBarSize() + OUTER_MARGIN_VER;
     aWndSelect.SetSizePixel(
         Size(2 * nFldW + ROW_FIELD_BTN_GAP + 10, nH));
diff --git a/sc/source/ui/inc/fieldwnd.hxx b/sc/source/ui/inc/fieldwnd.hxx
index 67f16c2..21eda91 100644
--- a/sc/source/ui/inc/fieldwnd.hxx
+++ b/sc/source/ui/inc/fieldwnd.hxx
@@ -211,7 +211,7 @@ private:
     /** Sets selection to last field. */
     void                    SetSelectionEnd();
     /** Sets selection to new position relative to current. */
-    void                    MoveSelection( USHORT nKeyCode, SCsCOL nDX, SCsROW nDY );
+    void                    MoveSelection( SCsCOL nDX, SCsROW nDY );
 
 private:
     typedef ::std::vector<Window*> Paintables;
commit 8fefa461a29658d184d72eadd98ffd0fde089d6c
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Wed Dec 15 14:42:35 2010 -0500

    Up the number of fields per column from 8 to 10.

diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx
index 2b59740..9f05845 100644
--- a/sc/source/ui/dbgui/pvlaydlg.cxx
+++ b/sc/source/ui/dbgui/pvlaydlg.cxx
@@ -1358,7 +1358,7 @@ void ScDPLayoutDlg::CalcWndSizes()
               aWndPage.GetPosPixel().Y()));
 
     // selection area
-    long nLineSize = 8; // number of fields per column.
+    long nLineSize = 10; // number of fields per column.
     long nH = OUTER_MARGIN_VER + nLineSize* nFldH + nLineSize * ROW_FIELD_BTN_GAP;
     nH += GetSettings().GetStyleSettings().GetScrollBarSize() + OUTER_MARGIN_VER;
     aWndSelect.SetSizePixel(
commit 2f7f47072d8263242d45624c7d56a58ed7c43167
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Wed Dec 15 14:38:30 2010 -0500

    Removed code I don't use any more.

diff --git a/sc/source/ui/dbgui/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx
index 76cc70c..206812c 100644
--- a/sc/source/ui/dbgui/fieldwnd.cxx
+++ b/sc/source/ui/dbgui/fieldwnd.cxx
@@ -1199,8 +1199,6 @@ IMPL_LINK(ScDPRowFieldControl, EndScrollHdl, ScrollBar*, EMPTYARG)
 
 //=============================================================================
 
-#if NEW_SELECT_FIELD
-
 ScDPSelectFieldControl::ScDPSelectFieldControl(
         ScDPLayoutDlg* pDialog, const ResId& rResId, FixedText* pCaption) :
     ScDPHorFieldControl(pDialog, rResId, pCaption)
@@ -1217,121 +1215,6 @@ ScDPFieldType ScDPSelectFieldControl::GetFieldType() const
     return TYPE_SELECT;
 }
 
-#else
-
-ScDPSelectFieldControl::ScDPSelectFieldControl(
-    ScDPLayoutDlg* pDialog, const ResId& rResId, const String& rName ) :
-    ScDPFieldControlBase( pDialog, rResId, NULL )
-{
-    SetName(rName);
-}
-
-ScDPSelectFieldControl::~ScDPSelectFieldControl()
-{
-}
-
-Point ScDPSelectFieldControl::GetFieldPosition( size_t nIndex )
-{
-    Point aPos;
-    long nFldW = FIELD_BTN_WIDTH;
-    long nFldH = FIELD_BTN_HEIGHT;
-    long nSpace = SELECT_FIELD_BTN_SPACE;
-
-    aPos.X() = (nFldW + nSpace) * (nIndex / LINE_SIZE);
-    aPos.Y() = (nFldH + nSpace) * (nIndex % LINE_SIZE);
-    return aPos;
-}
-
-Size ScDPSelectFieldControl::GetFieldSize() const
-{
-    return Size(FIELD_BTN_WIDTH, FIELD_BTN_HEIGHT);
-}
-
-bool ScDPSelectFieldControl::GetFieldIndex( const Point& rPos, size_t& rnIndex )
-{
-    rnIndex = INVALID_INDEX;
-    long nFldW = FIELD_BTN_WIDTH;
-    long nFldH = FIELD_BTN_HEIGHT;
-    long nSpace = SELECT_FIELD_BTN_SPACE;
-    if( (rPos.X() >= 0) && (rPos.Y() >= 0) )
-    {
-        size_t nRow = rPos.Y() / (nFldH + nSpace);
-        size_t nCol = rPos.X() / (nFldW + nSpace);
-        // is not between controls?
-        if( (rPos.Y() % (nFldH + nSpace) < nFldH) && (rPos.X() % (nFldW + nSpace) < nFldW) )
-            rnIndex = nCol * LINE_SIZE + nRow;
-    }
-    return IsValidIndex( rnIndex );
-}
-
-void ScDPSelectFieldControl::Redraw()
-{
-    const StyleSettings& rStyleSet = GetSettings().GetStyleSettings();
-    Color aFaceColor = rStyleSet.GetFaceColor();
-    Color aWinColor = rStyleSet.GetWindowColor();
-    Color aTextColor = rStyleSet.GetButtonTextColor();
-    Color aWinTextColor = rStyleSet.GetWindowTextColor();
-
-    VirtualDevice	aVirDev;
-    // #i97623# VirtualDevice is always LTR while other windows derive direction from parent
-    aVirDev.EnableRTL( IsRTLEnabled() );
-    aVirDev.SetMapMode( MAP_PIXEL );
-
-    Point			aPos0;
-    Size			aSize( GetSizePixel() );
-    Font			aFont( GetFont() );			// Font vom Window
-    aFont.SetTransparent( TRUE );
-    aVirDev.SetFont( aFont );
-    aVirDev.SetOutputSizePixel( aSize );
-
-    aVirDev.SetLineColor();
-    aVirDev.SetFillColor( aFaceColor );
-    aVirDev.DrawRect( Rectangle(aPos0, aSize) );
-
-    size_t nFieldSelected = GetSelectedField();
-    FieldNames& rFields = GetFieldNames();
-
-    Rectangle aFieldRect( aPos0, GetFieldSize() );
-    for( size_t nIx = 0; nIx < rFields.size(); ++nIx )
-    {
-        aFieldRect.SetPos( GetFieldPosition( nIx ) );
-        bool bFocus = HasFocus() && (nIx == nFieldSelected);
-        DrawField( aVirDev, aFieldRect, rFields[ nIx ], bFocus );
-    }
-
-    DrawBitmap( aPos0, aVirDev.GetBitmap( aPos0, aSize ) );
-    DrawInvertSelection();
-    UpdateStyle();
-}
-
-//-------------------------------------------------------------------
-
-bool ScDPSelectFieldControl::IsValidIndex( size_t nIndex ) const
-{
-    return nIndex < PAGE_SIZE;
-}
-
-size_t ScDPSelectFieldControl::CalcNewFieldIndex( SCsCOL nDX, SCsROW nDY ) const
-{
-    size_t nNewField = GetSelectedField();
-    nNewField += static_cast<SCsCOLROW>(nDX) * LINE_SIZE + nDY;
-    return IsExistingIndex( nNewField ) ? nNewField : GetSelectedField();
-}
-
-//-------------------------------------------------------------------
-
-String ScDPSelectFieldControl::GetDescription() const
-{
-    return ScResId(STR_ACC_DATAPILOT_SEL_DESCR);
-}
-
-ScDPFieldType ScDPSelectFieldControl::GetFieldType() const
-{
-    return TYPE_SELECT;
-}
-
-#endif
-
 //=============================================================================
 
 ScDPDataFieldControl::ScDPDataFieldControl( ScDPLayoutDlg* pParent, const ResId& rResId, FixedText* pCaption ) :
diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx
index 1b2d4e5..2b59740 100644
--- a/sc/source/ui/dbgui/pvlaydlg.cxx
+++ b/sc/source/ui/dbgui/pvlaydlg.cxx
@@ -1358,9 +1358,11 @@ void ScDPLayoutDlg::CalcWndSizes()
               aWndPage.GetPosPixel().Y()));
 
     // selection area
+    long nLineSize = 8; // number of fields per column.
+    long nH = OUTER_MARGIN_VER + nLineSize* nFldH + nLineSize * ROW_FIELD_BTN_GAP;
+    nH += GetSettings().GetStyleSettings().GetScrollBarSize() + OUTER_MARGIN_VER;
     aWndSelect.SetSizePixel(
-        Size(2 * nFldW + ROW_FIELD_BTN_GAP + 10,
-             LINE_SIZE * nFldH + (LINE_SIZE - 1) * ROW_FIELD_BTN_GAP));
+        Size(2 * nFldW + ROW_FIELD_BTN_GAP + 10, nH));
 
     aRectPage   = Rectangle( aWndPage.GetPosPixel(),    aWndPage.GetSizePixel() );
     aRectRow	= Rectangle( aWndRow.GetPosPixel(),		aWndRow.GetSizePixel() );
diff --git a/sc/source/ui/inc/fieldwnd.hxx b/sc/source/ui/inc/fieldwnd.hxx
index 0b1fb85..67f16c2 100644
--- a/sc/source/ui/inc/fieldwnd.hxx
+++ b/sc/source/ui/inc/fieldwnd.hxx
@@ -37,12 +37,6 @@
 #include <vcl/scrbar.hxx>
 #include <cppuhelper/weakref.hxx>
 
-#define NEW_SELECT_FIELD 1
-
-#define PAGE_SIZE   16      // count of visible fields for scrollbar
-#define LINE_SIZE   8       // count of fields per column for scrollbar
-#define MAX_FIELDS  8       // maximum count of fields for row/col/data area
-
 class ScDPLayoutDlg;
 class ScAccessibleDataPilotControl;
 
@@ -341,8 +335,6 @@ private:
 
 // ============================================================================
 
-#if NEW_SELECT_FIELD
-
 class ScDPSelectFieldControl : public ScDPHorFieldControl
 {
 public:
@@ -353,35 +345,6 @@ public:
     virtual ScDPFieldType GetFieldType() const;
 };
 
-#else
-
-class ScDPSelectFieldControl : public ScDPFieldControlBase
-{
-public:
-    ScDPSelectFieldControl(
-        ScDPLayoutDlg* pDialog, const ResId& rResId, const String& aName );
-
-    virtual                 ~ScDPSelectFieldControl();
-
-    virtual void            CalcSize() {}
-    virtual bool            IsValidIndex( size_t nIndex ) const;
-    virtual Point           GetFieldPosition( size_t nIndex );
-    virtual Size            GetFieldSize() const;
-    virtual bool            GetFieldIndex( const Point& rPos, size_t& rnIndex );
-    virtual String          GetDescription() const;
-    virtual ScDPFieldType   GetFieldType() const;
-
-    virtual void ScrollToEnd() {}
-    virtual void ScrollToShowSelection() {}
-    virtual void ResetScrollBar() {}
-
-protected:
-    virtual size_t          CalcNewFieldIndex( SCsCOL nDX, SCsROW nDY ) const;
-    virtual size_t          GetDisplayPosition(size_t nIndex) const { return 0; }
-    virtual void            Redraw();
-};
-#endif
-
 // ============================================================================
 
 class ScDPDataFieldControl : public ScDPFieldControlBase
commit 7dcbd30dddd940cae0c14d1082582359f1d476e4
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Wed Dec 15 14:22:33 2010 -0500

    The size of each field control is calculated in the dialog code.
    
    Since the size of each field control is calculated in the dialog
    code, leave some note in the src file and set the sizes to 1 by 1.

diff --git a/sc/source/ui/dbgui/pivot.src b/sc/source/ui/dbgui/pivot.src
index fc70df9..514a371 100644
--- a/sc/source/ui/dbgui/pivot.src
+++ b/sc/source/ui/dbgui/pivot.src
@@ -46,8 +46,9 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
     };
     Control WND_PAGE
     {
+        /* Size is calculated in the dialog code. */
         Pos = MAP_APPFONT ( 20 , 14 ) ;
-        Size = MAP_APPFONT ( 202 , 34 ) ;
+        Size = MAP_APPFONT ( 1 , 1 ) ;
         TabStop = TRUE ;
     };
     FixedText FT_COL
@@ -58,8 +59,9 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
     };
     Control WND_COL
     {
+        /* Size is calculated in the dialog code. */
         Pos = MAP_APPFONT ( 56 , 56 ) ;
-        Size = MAP_APPFONT ( 144 , 34 ) ;
+        Size = MAP_APPFONT ( 1 , 1 ) ;
         TabStop = TRUE ;
     };
     FixedText FT_ROW
@@ -70,8 +72,9 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
     };
     Control WND_ROW
     {
+        /* Size is calculated in the dialog code. */
         Pos = MAP_APPFONT ( 6 , 98 ) ;
-        Size = MAP_APPFONT ( 50 , 96 ) ;
+        Size = MAP_APPFONT ( 1 , 1 ) ;
         TabStop = TRUE ;
     };
     FixedText FT_DATA
@@ -82,14 +85,16 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
     };
     Control WND_DATA
     {
+        /* Size is calculated in the dialog code. */
         Pos = MAP_APPFONT ( 56 , 98 ) ;
-        Size = MAP_APPFONT ( 144 , 96 ) ;
+        Size = MAP_APPFONT ( 1 , 1 ) ;
         TabStop = TRUE ;
     };
     Control WND_SELECT
     {
+        /* Size is calculated in the dialog code. */
         Pos = MAP_APPFONT ( 210 , 14 ) ;
-        Size = MAP_APPFONT ( 70 , 136 ) ;
+        Size = MAP_APPFONT ( 1 , 1 ) ;
         TabStop = TRUE ;
     };
     String STR_SELECT
commit 4b5c4e2d3a926ea18b943199252d6d983c179361
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Wed Dec 15 14:17:50 2010 -0500

    Clean up.

diff --git a/sc/source/ui/dbgui/pivot.hrc b/sc/source/ui/dbgui/pivot.hrc
index 9942cfa..e4207e8 100644
--- a/sc/source/ui/dbgui/pivot.hrc
+++ b/sc/source/ui/dbgui/pivot.hrc
@@ -38,9 +38,6 @@
 #define WND_ROW                 12
 #define WND_DATA                13
 #define WND_SELECT              14
-//#define WND_FIELD               15
-//#define WND_FIELD_SPACE         16
-#define WND_HSCROLL             17
 #define WND_PAGE                18
 #define FT_COL                  31
 #define FT_ROW                  32
diff --git a/sc/source/ui/dbgui/pivot.src b/sc/source/ui/dbgui/pivot.src
index 1aaf937..fc70df9 100644
--- a/sc/source/ui/dbgui/pivot.src
+++ b/sc/source/ui/dbgui/pivot.src
@@ -89,20 +89,13 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
     Control WND_SELECT
     {
         Pos = MAP_APPFONT ( 210 , 14 ) ;
-        Size = MAP_APPFONT ( 70 , 126 ) ;
+        Size = MAP_APPFONT ( 70 , 136 ) ;
         TabStop = TRUE ;
     };
     String STR_SELECT
     {
         Text [ en-US ] = "Selection area";
     };
-    ScrollBar WND_HSCROLL
-    {
-        Pos = MAP_APPFONT ( 208 , 144 ) ;
-        Size = MAP_APPFONT ( 70 , 8 ) ;
-        HScroll = TRUE ;
-        TabStop = FALSE ;
-    };
     FixedText FT_INFO
     {
         Pos = MAP_APPFONT ( 6 , 200 ) ;
diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx
index b5db6a7..1b2d4e5 100644
--- a/sc/source/ui/dbgui/pvlaydlg.cxx
+++ b/sc/source/ui/dbgui/pvlaydlg.cxx
@@ -1460,8 +1460,6 @@ void ScDPLayoutDlg::UpdateSrcRange()
     aWndPage.ClearFields();
 
     aSelectArr.clear();
-    aSelectArr.resize(PAGE_SIZE);
-
     aRowArr.clear();
     aColArr.clear();
     aDataArr.clear();
diff --git a/sc/source/ui/inc/pvlaydlg.hxx b/sc/source/ui/inc/pvlaydlg.hxx
index 01b4fe9..98c3ba1 100644
--- a/sc/source/ui/inc/pvlaydlg.hxx
+++ b/sc/source/ui/inc/pvlaydlg.hxx
@@ -166,7 +166,7 @@ private:
     ScDPFieldType           eLastActiveType;        /// Type of last active area.
     size_t                  nOffset;                /// Offset of first field in TYPE_SELECT area.
 
-    ScDPFuncDataVec         aSelectArr;  // holds instances for visible buttons only
+    ScDPFuncDataVec         aSelectArr;
     ScDPFuncDataVec         aPageArr;
     ScDPFuncDataVec         aColArr;
     ScDPFuncDataVec         aRowArr;
commit c4c6475f86b1dba9f8453431e4426ac83b8c6c40
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Wed Dec 15 14:00:14 2010 -0500

    Simpler logic for selecting next field button.

diff --git a/sc/source/ui/dbgui/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx
index 288a136..76cc70c 100644
--- a/sc/source/ui/dbgui/fieldwnd.cxx
+++ b/sc/source/ui/dbgui/fieldwnd.cxx
@@ -690,8 +690,7 @@ void ScDPFieldControlBase::ModifySelectionOffset( long nOffsetDiff )
 
 void ScDPFieldControlBase::SelectNext()
 {
-    if( GetFieldType() == TYPE_SELECT )
-        MoveSelection( KEY_DOWN, 0, 1 );
+    SetSelection(mnFieldSelected + 1);
 }
 
 void ScDPFieldControlBase::GrabFocusWithSel( size_t nIndex )
commit 104f1f7f0185e986e789ecba3932ba27dd06e9e0
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Wed Dec 15 13:04:11 2010 -0500

    Set scroll bar line size to always 1.

diff --git a/sc/source/ui/dbgui/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx
index 4ebc44a..288a136 100644
--- a/sc/source/ui/dbgui/fieldwnd.cxx
+++ b/sc/source/ui/dbgui/fieldwnd.cxx
@@ -834,7 +834,7 @@ void ScDPHorFieldControl::CalcSize()
     mnFieldBtnRowCount = nTotalH / (FIELD_BTN_HEIGHT + ROW_FIELD_BTN_GAP);
     mnFieldBtnColCount = (nTotalW + ROW_FIELD_BTN_GAP) / (FIELD_BTN_WIDTH + ROW_FIELD_BTN_GAP);
 
-    maScroll.SetLineSize(mnFieldBtnRowCount);
+    maScroll.SetLineSize(1);
     maScroll.SetVisibleSize(mnFieldBtnColCount);
     maScroll.SetPageSize(mnFieldBtnColCount);
     maScroll.SetRange(Range(0, mnFieldBtnColCount));
commit 06aa754ffd3a6a21cd06f2a226ddab57780ae424
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Wed Dec 15 12:05:50 2010 -0500

    TRUE to true

diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx
index bda93dd..b5db6a7 100644
--- a/sc/source/ui/dbgui/pvlaydlg.cxx
+++ b/sc/source/ui/dbgui/pvlaydlg.cxx
@@ -957,7 +957,7 @@ void ScDPLayoutDlg::NotifyMouseButtonUp( const Point& rAt )
             eDnDToType = TYPE_SELECT;
         }
         else
-            bDel = TRUE;
+            bDel = true;
 
         if (bDel)
         {
commit 02969310c4288f1f303d7da96f96a5b3c5df7b4d
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Wed Dec 15 12:03:40 2010 -0500

    Debug statements & we don't remove any buttons from the select field.

diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx
index fafabaa..bda93dd 100644
--- a/sc/source/ui/dbgui/pvlaydlg.cxx
+++ b/sc/source/ui/dbgui/pvlaydlg.cxx
@@ -548,6 +548,8 @@ void ScDPLayoutDlg::AddField( size_t nFromIndex, ScDPFieldType eToType, const Po
 
 void ScDPLayoutDlg::AppendField(size_t nFromIndex, ScDPFieldType eToType)
 {
+    StackPrinter __stack_printer__("ScDPLayoutDlg::AppendField");
+    fprintf(stdout, "ScDPLayoutDlg::AppendField:   from index = %d  to type = %d\n", nFromIndex, eToType);
     ScDPFuncData aFuncData = *aSelectArr[nFromIndex];
 
     size_t nAt = 0;
@@ -619,6 +621,8 @@ void ScDPLayoutDlg::AppendField(size_t nFromIndex, ScDPFieldType eToType)
 
 void ScDPLayoutDlg::MoveField( ScDPFieldType eFromType, size_t nFromIndex, ScDPFieldType eToType, const Point& rAtPos )
 {
+    StackPrinter __stack_printer__("ScDPLayoutDlg::MoveField");
+    fprintf(stdout, "ScDPLayoutDlg::MoveField:   from type = %d  from index = %d  to type = %d\n", eFromType, nFromIndex, eToType);
     if ( eFromType == TYPE_SELECT )
         AddField( nFromIndex, eToType, rAtPos );
     else if ( eFromType != eToType )
@@ -763,6 +767,10 @@ void ScDPLayoutDlg::MoveField( ScDPFieldType eFromType, size_t nFromIndex, ScDPF
 
 void ScDPLayoutDlg::MoveFieldToEnd( ScDPFieldType eFromType, size_t nFromIndex, ScDPFieldType eToType )
 {
+    StackPrinter __stack_printer__("ScDPLayoutDlg::MoveFieldToEnd");
+    fprintf(stdout, "ScDPLayoutDlg::MoveFieldToEnd:   from type = %d  from index = %d  to type = %d\n",
+            eFromType, nFromIndex, eToType);
+
     if ( eFromType == TYPE_SELECT )
         AppendField( nFromIndex, eToType );
     else if ( eFromType != eToType )
@@ -899,6 +907,8 @@ void ScDPLayoutDlg::MoveFieldToEnd( ScDPFieldType eFromType, size_t nFromIndex,
 
 void ScDPLayoutDlg::RemoveField( ScDPFieldType eFromType, size_t nIndex )
 {
+    StackPrinter __stack_printer__("ScDPLayoutDlg::RemoveField");
+    fprintf(stdout, "ScDPLayoutDlg::RemoveField:   from type = %d  index = %d\n", eFromType, nIndex);
     ScDPFuncDataVec* pArr = GetFieldDataArray(eFromType);
 
     if( pArr )
@@ -917,44 +927,44 @@ void ScDPLayoutDlg::RemoveField( ScDPFieldType eFromType, size_t nIndex )
 
 void ScDPLayoutDlg::NotifyMouseButtonUp( const Point& rAt )
 {
+    StackPrinter __stack_printer__("ScDPLayoutDlg::NotifyMouseButtonUp");
     if ( bIsDrag )
     {
         bIsDrag = FALSE;
 
         ScDPFieldType   eDnDToType = TYPE_SELECT;
         Point           aPos = ScreenToOutputPixel( rAt );
-        BOOL            bDel = FALSE;
+        bool            bDel = false;
 
         if ( aRectPage.IsInside( aPos ) )
         {
             eDnDToType = TYPE_PAGE;
-            bDel = FALSE;
         }
         else if ( aRectCol.IsInside( aPos ) )
         {
             eDnDToType = TYPE_COL;
-            bDel = FALSE;
         }
         else if ( aRectRow.IsInside( aPos ) )
         {
             eDnDToType = TYPE_ROW;
-            bDel = FALSE;
         }
         else if ( aRectData.IsInside( aPos ) )
         {
             eDnDToType = TYPE_DATA;
-            bDel = FALSE;
         }
         else if ( aRectSelect.IsInside( aPos ) )
         {
             eDnDToType = TYPE_SELECT;
-            bDel = TRUE;
         }
         else
             bDel = TRUE;
 
-        if ( bDel )
-            RemoveField( eDnDFromType, nDnDFromIndex );
+        if (bDel)
+        {
+            // We don't remove any buttons from the select field.
+            if (eDnDFromType != TYPE_SELECT)
+                RemoveField( eDnDFromType, nDnDFromIndex );
+        }
         else
             MoveField( eDnDFromType, nDnDFromIndex, eDnDToType, aPos );
     }
commit 63e57a2994380322a07519ae598ae871555ce8f0
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Wed Dec 15 11:23:00 2010 -0500

    Fixed a build breakage after merging master.

diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx
index 11ebc49..fafabaa 100644
--- a/sc/source/ui/dbgui/pvlaydlg.cxx
+++ b/sc/source/ui/dbgui/pvlaydlg.cxx
@@ -717,6 +717,7 @@ void ScDPLayoutDlg::MoveField( ScDPFieldType eFromType, size_t nFromIndex, ScDPF
 
         if ( Contains( theArr, fData.mnCol, nAt ) )
         {
+            size_t nToIndex = 0;
             aToPos = DlgPos2WndPos( rAtPos, *theWnd );
             theWnd->GetExistingIndex( aToPos, nToIndex );
 
commit c1a3585f31f0000e845647d5c12a61d9d9ee0ff1
Merge: caab2dc... 828b212...
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Wed Dec 15 11:11:52 2010 -0500

    Merge branch 'master' into feature/calc-dp-unlimited-fields
    
    Conflicts:
    	sc/source/core/data/global2.cxx
    	sc/source/ui/dbgui/fieldwnd.cxx
    	sc/source/ui/dbgui/pvlaydlg.cxx

diff --cc sc/qa/complex/sc/CalcRTL.java
index fb39b7c,44e1ebe..5805f1b
--- a/sc/qa/complex/sc/CalcRTL.java
+++ b/sc/qa/complex/sc/CalcRTL.java
@@@ -325,7 -325,7 +325,7 @@@ public class CalcRTL extends ComplexTes
              worked = checkResult(set, pName, oldValue, pValue, resValue, 
                                   exception);
          } catch (Exception e) {
-             System.out.println("Exception occured while testing property '" + 
 -            System.out.println("Exception occurred while testing property '" + 
++            System.out.println("Exception occurred while testing property '" +
                                 pName + "'");
              e.printStackTrace();
              worked = false;
diff --cc sc/source/core/data/dpobject.cxx
index 9e7bc80,d6be537..2df47c7
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@@ -1711,19 -1713,19 +1711,19 @@@ USHORT lcl_CountBits( USHORT nBits 
      return nCount;
  }
  
 -SCSIZE lcl_FillOldFields( PivotField* pFields,
 -                            const uno::Reference<sheet::XDimensionsSupplier>& xSource,
 -                            USHORT nOrient, SCCOL nColAdd, BOOL bAddData )
 +void lcl_FillOldFields(
 +    vector<PivotField>& rFields,
 +    const uno::Reference<sheet::XDimensionsSupplier>& xSource,
 +    USHORT nOrient, SCCOL nColAdd, bool bAddData )
  {
 -    SCSIZE nOutCount = 0;
 -    BOOL bDataFound = FALSE;
 +    vector<PivotField> aFields;
  
 -    SCSIZE nCount = (nOrient == sheet::DataPilotFieldOrientation_PAGE) ? PIVOT_MAXPAGEFIELD : PIVOT_MAXFIELD;
 +    bool bDataFound = false;
  
-     //!	merge multiple occurences (data field with different functions)
+     //!	merge multiple occurrences (data field with different functions)
      //!	force data field in one dimension
  
 -    std::vector< long > aPos( nCount, 0 );
 +    vector<long> aPos;
  
      uno::Reference<container::XNameAccess> xDimsName = xSource->getDimensions();
      uno::Reference<container::XIndexAccess> xDims = new ScNameToIndexAccess( xDimsName );
diff --cc sc/source/ui/dbgui/pvlaydlg.cxx
index 1873ef5,e634089..11ebc49
--- a/sc/source/ui/dbgui/pvlaydlg.cxx
+++ b/sc/source/ui/dbgui/pvlaydlg.cxx
@@@ -707,151 -800,40 +707,150 @@@ void ScDPLayoutDlg::MoveField( ScDPFiel
      }
      else // -> eFromType == eToType
      {
 -        ScDPFieldWindow*    theWnd  = NULL;
 -        ScDPFuncDataVec*    theArr   = NULL;
 +        ScDPFieldControlBase* theWnd  = GetFieldWindow(eFromType);
 +        ScDPFuncDataVec*    theArr   = GetFieldDataArray(eFromType);
          size_t              nAt      = 0;
-         size_t              nToIndex = 0;
          Point               aToPos;
 -        BOOL                bDataArr = FALSE;
 +        BOOL                bDataArr = eFromType == TYPE_DATA;
 +
 +        ScDPFuncData fData( *((*theArr)[nFromIndex]) );
  
 -        switch ( eFromType )
 +        if ( Contains( theArr, fData.mnCol, nAt ) )
          {
 -            case TYPE_PAGE:
 -                theWnd = &aWndPage;
 -                theArr = &aPageArr;
 -                break;
 +            aToPos = DlgPos2WndPos( rAtPos, *theWnd );
 +            theWnd->GetExistingIndex( aToPos, nToIndex );
  
 -            case TYPE_COL:
 -                theWnd = &aWndCol;
 -                theArr = &aColArr;
 -                break;
 +            if ( nToIndex != nAt )
 +            {
 +                size_t nAddedAt = 0;
  
 -            case TYPE_ROW:
 -                theWnd = &aWndRow;
 -                theArr = &aRowArr;
 -                break;
 +                theWnd->DelField( nAt );
 +                Remove( theArr, nAt );
  
 -            case TYPE_DATA:
 -                theWnd = &aWndData;
 -                theArr = &aDataArr;
 -                bDataArr = TRUE;
 -                break;
 +                if ( !bDataArr )
 +                {
 +                    if ( theWnd->AddField( GetLabelString( fData.mnCol ),
 +                                           aToPos,
 +                                           nAddedAt ) )
 +                    {
 +                        Insert( theArr, fData, nAddedAt );
 +                    }
 +                }
 +                else
 +                {
 +                    ScDPLabelData* p = GetLabelData(fData.mnCol);
 +                    OUString aStr = p->maLayoutName;
 +                    USHORT nMask = fData.mnFuncMask;
 +                    if (!aStr.getLength())
 +                    {
 +                        aStr = GetFuncString(nMask);
 +                        aStr += p->maName;
 +                    }
  
 -            default:
 +                    if ( theWnd->AddField( aStr,
 +                                           DlgPos2WndPos( rAtPos, *theWnd ),
 +                                           nAddedAt ) )
 +                    {
 +                        fData.mnFuncMask = nMask;
 +                        Insert( theArr, fData, nAddedAt );
 +                    }
 +                }
 +            }
 +        }
 +    }
 +}
 +
 +void ScDPLayoutDlg::MoveFieldToEnd( ScDPFieldType eFromType, size_t nFromIndex, ScDPFieldType eToType )
 +{
 +    if ( eFromType == TYPE_SELECT )
 +        AppendField( nFromIndex, eToType );
 +    else if ( eFromType != eToType )
 +    {
 +        ScDPFieldControlBase* fromWnd  = GetFieldWindow(eFromType);
 +        ScDPFieldControlBase* toWnd    = GetFieldWindow(eToType);
 +
 +        ScDPFieldControlBase* rmWnd1   = NULL;
 +        ScDPFieldControlBase* rmWnd2   = NULL;
 +        GetOtherFieldWindows(eToType, rmWnd1, rmWnd2);
 +
 +        ScDPFuncDataVec*    fromArr  = GetFieldDataArray(eFromType);
 +        ScDPFuncDataVec*    toArr    = GetFieldDataArray(eToType);
 +
 +        ScDPFuncDataVec*    rmArr1   = NULL;
 +        ScDPFuncDataVec*    rmArr2   = NULL;
 +        GetOtherDataArrays(eToType, rmArr1, rmArr2);
 +
 +        size_t nAt = 0;
 +        bool bDataArr = eToType == TYPE_DATA;
 +
 +        if ( fromArr && toArr && fromWnd && toWnd )
 +        {
 +            ScDPFuncData fData( *((*fromArr)[nFromIndex]) );
 +
 +            if ( Contains( fromArr, fData.mnCol, nAt ) )
              {
 -                // added to avoid warnings
 +                fromWnd->DelField( nAt );
 +                Remove( fromArr, nAt );
 +
 +                if (!Contains( toArr, fData.mnCol, nAt ))
 +                {
 +                    size_t nAddedAt = 0;
 +                    if ( !bDataArr )
 +                    {
 +                        // ggF. in anderem Fenster entfernen
 +                        if ( rmArr1 )
 +                        {
 +                            if ( Contains( rmArr1, fData.mnCol, nAt ) )
 +                            {
 +                                rmWnd1->DelField( nAt );
 +                                Remove( rmArr1, nAt );
 +                            }
 +                        }
 +                        if ( rmArr2 )
 +                        {
 +                            if ( Contains( rmArr2, fData.mnCol, nAt ) )
 +                            {
 +                                rmWnd2->DelField( nAt );
 +                                Remove( rmArr2, nAt );
 +                            }
 +                        }
 +
 +                        if ( toWnd->AppendField( GetLabelString( fData.mnCol ), nAddedAt ) )
 +                        {
 +                            Insert( toArr, fData, nAddedAt );
 +                            toWnd->GrabFocus();
 +                        }
 +                    }
 +                    else
 +                    {
 +                        ScDPLabelData* p = GetLabelData(fData.mnCol);
 +                        OUString aStr = p->maLayoutName;
 +                        USHORT nMask = fData.mnFuncMask;
 +                        if (!aStr.getLength())
 +                        {
 +                            aStr = GetFuncString(nMask);
 +                            aStr += p->maName;
 +                        }
 +
 +                        if ( toWnd->AppendField(aStr, nAddedAt) )
 +                        {
 +                            fData.mnFuncMask = nMask;
 +                            Insert( toArr, fData, nAddedAt );
 +                            toWnd->GrabFocus();
 +                        }
 +                    }
 +                }
              }
          }
 +    }
 +    else // -> eFromType == eToType
 +    {
 +        ScDPFieldControlBase* theWnd  = GetFieldWindow(eFromType);
 +        ScDPFuncDataVec*    theArr   = GetFieldDataArray(eFromType);
 +        size_t              nAt      = 0;
 +        size_t              nToIndex = 0;
 +        Point               aToPos;
 +        BOOL                bDataArr = eFromType == TYPE_DATA;
  
          ScDPFuncData fData( *((*theArr)[nFromIndex]) );
  
commit 828b2125192c2891dbcd6664b20037699f797856
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Tue Dec 14 22:58:56 2010 -0500

    Header comment for a struct.

diff --git a/sc/source/ui/inc/impex.hxx b/sc/source/ui/inc/impex.hxx
index 6345279..5577f53 100644
--- a/sc/source/ui/inc/impex.hxx
+++ b/sc/source/ui/inc/impex.hxx
@@ -40,6 +40,10 @@ class SvStream;
 class SfxMedium;
 class ScAsciiOptions;
 
+/**
+ * These options control how multi-line cells are converted during export in
+ * certain lossy formats (such as csv).
+ */
 struct ScExportTextOptions
 {
     enum NewlineConversion { ToSystem, ToSpace, None };
commit 909a1db3eb8f3e6236ff1572a8ce7047fb89b1b2
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Tue Dec 14 22:47:23 2010 -0500

    Removed commented out code.

diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index a5a9ebe..480c1de 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -192,17 +192,6 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
                     // try to get the replacement image from the clipboard
                     Graphic aGraphic;
                     ULONG nGrFormat = 0;
-// (wg. Selection Manager bei Trustet Solaris)
-#ifndef SOLARIS
-/*
-                    if( aDataHelper.GetGraphic( SOT_FORMATSTR_ID_SVXB, aGraphic ) )
-                        nGrFormat = SOT_FORMATSTR_ID_SVXB;
-                    else if( aDataHelper.GetGraphic( FORMAT_GDIMETAFILE, aGraphic ) )
-                        nGrFormat = SOT_FORMAT_GDIMETAFILE;
-                    else if( aDataHelper.GetGraphic( FORMAT_BITMAP, aGraphic ) )
-                        nGrFormat = SOT_FORMAT_BITMAP;
-*/
-#endif
 
                     // insert replacement image ( if there is one ) into the object helper
                     if ( nGrFormat )
commit ed5d652e91aaf681533e77c3d189b2e9b246e724
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Tue Dec 14 22:40:31 2010 -0500

    Provide import options when pasting HTML data. (fdo#32400)
    
    When importing an html document, we launch text import options to
    provide several options for the user.  Let's do the same when
    pasting html data too.

diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index ba9c36e..2ad1225 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -2035,7 +2035,19 @@ BOOL ScImportExport::HTML2Doc( SvStream& rStrm, const String& rBaseURL )
 
         USHORT nFlags = IDF_ALL & ~IDF_STYLES;
         pDoc->DeleteAreaTab( aRange, nFlags );
-        pImp->WriteToDocument();
+
+        if (pExtOptions)
+        {
+            // Pick up import options if available.
+            LanguageType eLang = pExtOptions->GetLanguage();
+            SvNumberFormatter aNumFormatter(pDoc->GetServiceManager(), eLang);
+            bool bSpecialNumber = pExtOptions->IsDetectSpecialNumber();
+            pImp->WriteToDocument(false, 1.0, &aNumFormatter, bSpecialNumber);
+        }
+        else
+            // Regular import, with no options.
+            pImp->WriteToDocument();
+
         EndPaste();
     }
     delete pImp;
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index 818b602..a5a9ebe 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -320,8 +320,27 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
             ::rtl::OUString aStr;
             SotStorageStreamRef xStream;
             if ( aDataHelper.GetSotStorageStream( nFormatId, xStream ) && xStream.Is() )
+            {
+                if (nFormatId == SOT_FORMATSTR_ID_HTML)
+                {
+                    // Launch the text import options dialog.  For now, we do
+                    // this for html pasting only, but in the future it may
+                    // make sense to do it for other data types too.
+                    ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
+                    ::std::auto_ptr<AbstractScTextImportOptionsDlg> pDlg(
+                        pFact->CreateScTextImportOptionsDlg(NULL, RID_SCDLG_TEXT_IMPORT_OPTIONS));
+
+                    if (pDlg->Execute() == RET_OK)
+                    {
+                        ScAsciiOptions aOptions;
+                        aOptions.SetLanguage(pDlg->GetLanguageType());
+                        aOptions.SetDetectSpecialNumber(pDlg->IsDateConversionSet());
+                        aObj.SetExtOptions(aOptions);
+                    }
+                }
                 // mba: clipboard always must contain absolute URLs (could be from alien source)
                 bRet = aObj.ImportStream( *xStream, String(), nFormatId );
+            }
             else if (nFormatId == FORMAT_STRING && aDataHelper.GetString( nFormatId, aStr ))
             {
                 // Do CSV dialog if more than one line.
commit 568229e5a07ab0082b7c172f48a2905abbb112a1
Author: Thorsten Behrens <tbehrens at novell.com>
Date:   Wed Dec 15 01:42:27 2010 +0100

    Fix dbgutil build

diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 8687500..50ee7fc 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -332,7 +332,7 @@ void XclExpMergedcells::AppendRange( const ScRange& rRange, sal_uInt32 nBaseXFId
 
 sal_uInt32 XclExpMergedcells::GetBaseXFId( const ScAddress& rPos ) const
 {
-    DBG_ASSERT( maBaseXFIds.size() == maMergedRanges.Count(), "XclExpMergedcells::GetBaseXFId - invalid lists" );
+    DBG_ASSERT( maBaseXFIds.size() == maMergedRanges.size(), "XclExpMergedcells::GetBaseXFId - invalid lists" );
     ScfUInt32Vec::const_iterator aIt = maBaseXFIds.begin();
     ScRangeList& rNCRanges = const_cast< ScRangeList& >( maMergedRanges );
     for ( size_t i = 0, nRanges = rNCRanges.size(); i < nRanges; ++i, ++aIt )
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index fa2a6a6..a7d6708 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -7017,7 +7017,7 @@ uno::Reference<sheet::XSheetCellCursor> SAL_CALL ScTableSheetObj::createCursorBy
         if (pRangesImp)
         {
             const ScRangeList& rRanges = pRangesImp->GetRangeList();
-            DBG_ASSERT( rRanges.Count() == 1, "Range? Ranges?" );
+            DBG_ASSERT( rRanges.size() == 1, "Range? Ranges?" );
             return new ScCellCursorObj( pDocSh, *rRanges[ 0 ] );
         }
     }
commit b2f3c59bc4a6dafe4ae4ee4997b53bcff5df84c0
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Tue Dec 14 18:57:04 2010 -0500

    Replaced SvShorts with std::vector<SCTAB>.

diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index 59c7e4b..edb92cd 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -69,6 +69,9 @@
 #include <basic/sbstar.hxx>
 #include <basic/basmgr.hxx>
 
+#include <memory>
+#include <vector>
+
 // defined in docfunc.cxx
 void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String& sModuleSource );
 
@@ -78,6 +81,9 @@ using com::sun::star::container::XNameContainer;
 using com::sun::star::uno::Reference;
 using com::sun::star::uno::UNO_QUERY;
 
+using ::std::auto_ptr;
+using ::std::vector;
+
 // ---------------------------------------------------------------------------
 
 //
@@ -934,12 +940,10 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec
 
             if (bRecord)
             {
-                SvShorts aSrcList;
-                SvShorts aDestList;
-                aSrcList.Insert(nSrcTab,0);
-                aDestList.Insert(nDestTab,0);
+                auto_ptr< vector<SCTAB> > pSrcList(new vector<SCTAB>(1, nSrcTab));
+                auto_ptr< vector<SCTAB> > pDestList(new vector<SCTAB>(1, nDestTab));
                 GetUndoManager()->AddUndoAction(
-                        new ScUndoCopyTab( this, aSrcList, aDestList ) );
+                        new ScUndoCopyTab(this, pSrcList.release(), pDestList.release()));
             }
 
             BOOL bVbaEnabled = aDocument.IsInVBAMode();
@@ -996,12 +1000,10 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec
             return FALSE;
         else if (bRecord)
         {
-            SvShorts aSrcList;
-            SvShorts aDestList;
-            aSrcList.Insert(nSrcTab,0);
-            aDestList.Insert(nDestTab,0);
+            auto_ptr< vector<SCTAB> > pSrcList(new vector<SCTAB>(1, nSrcTab));
+            auto_ptr< vector<SCTAB> > pDestList(new vector<SCTAB>(1, nDestTab));
             GetUndoManager()->AddUndoAction(
-                    new ScUndoMoveTab( this, aSrcList, aDestList ) );
+                    new ScUndoMoveTab(this, pSrcList.release(), pDestList.release()));
         }
 
         Broadcast( ScTablesHint( SC_TAB_MOVED, nSrcTab, nDestTab ) );
diff --git a/sc/source/ui/inc/undotab.hxx b/sc/source/ui/inc/undotab.hxx
index 5d46136..bf43322 100644
--- a/sc/source/ui/inc/undotab.hxx
+++ b/sc/source/ui/inc/undotab.hxx
@@ -184,7 +184,8 @@ public:
                     TYPEINFO();
                     ScUndoMoveTab(
                         ScDocShell* pNewDocShell,
-                        const SvShorts &aOldTab, const SvShorts &aNewTab,
+                        ::std::vector<SCTAB>* pOldTabs,
+                        ::std::vector<SCTAB>* pNewTabs,
                         ::std::vector< ::rtl::OUString>* pOldNames = NULL,
                         ::std::vector< ::rtl::OUString>* pNewNames = NULL );
 
@@ -198,10 +199,10 @@ public:
     virtual String	GetComment() const;
 
 private:
+    ::boost::shared_ptr< ::std::vector<SCTAB> > mpOldTabs;
+    ::boost::shared_ptr< ::std::vector<SCTAB> > mpNewTabs;
     ::boost::shared_ptr< ::std::vector< ::rtl::OUString> > mpOldNames;
     ::boost::shared_ptr< ::std::vector< ::rtl::OUString> > mpNewNames;
-    SvShorts	theOldTabs;
-    SvShorts	theNewTabs;
 
     void DoChange( BOOL bUndo ) const;
 };
@@ -213,8 +214,8 @@ public:
                     TYPEINFO();
                     ScUndoCopyTab(
                         ScDocShell* pNewDocShell,
-                        const SvShorts &aOldTab,
-                        const SvShorts &aNewTab,
+                        ::std::vector<SCTAB>* pOldTabs,
+                        ::std::vector<SCTAB>* pNewTabs,
                         ::std::vector< ::rtl::OUString>* pNewNames = NULL );
 
     virtual			~ScUndoCopyTab();
@@ -227,10 +228,10 @@ public:
     virtual String	GetComment() const;
 
 private:
+    ::boost::shared_ptr< ::std::vector<SCTAB> > mpOldTabs;
+    ::boost::shared_ptr< ::std::vector<SCTAB> > mpNewTabs;
     ::boost::shared_ptr< ::std::vector< ::rtl::OUString> > mpNewNames;
     SdrUndoAction*	pDrawUndo;
-    SvShorts	theOldTabs;
-    SvShorts	theNewTabs;
 
     void DoChange() const;
 };
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 65c7f67..3c1ba2b 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -547,31 +547,23 @@ BOOL ScUndoRenameTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const
 //
 
 ScUndoMoveTab::ScUndoMoveTab(
-    ScDocShell* pNewDocShell, const SvShorts &aOldTab, const SvShorts &aNewTab,
+    ScDocShell* pNewDocShell, vector<SCTAB>* pOldTabs, vector<SCTAB>* pNewTabs,
     vector<OUString>* pOldNames, vector<OUString>* pNewNames) :
     ScSimpleUndo( pNewDocShell ),
+    mpOldTabs(pOldTabs), mpNewTabs(pNewTabs),
     mpOldNames(pOldNames), mpNewNames(pNewNames)
 {
-    int i;
-    for(i=0;i<aOldTab.Count();i++)

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list