[Libreoffice-commits] .: Branch 'feature/calc-dp-unlimited-fields' - 178 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
Wed Dec 15 08:12:38 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/ChartTypeDialogController.cxx              |    1 
 chart2/source/controller/dialogs/DataBrowser.cxx                            |   13 
 chart2/source/controller/dialogs/ObjectNameProvider.cxx                     |    7 
 chart2/source/controller/dialogs/ResourceIds.hrc                            |    3 
 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_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/res_BarGeometry.src                        |    2 
 chart2/source/controller/dialogs/res_ErrorBar.cxx                           |    2 
 chart2/source/controller/dialogs/res_TextSeparator.src                      |    4 
 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_AxisPositions.hxx                       |    1 
 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/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                                     |    9 
 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/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                                                         |   47 
 sc/inc/editutil.hxx                                                         |    2 
 sc/inc/global.hxx                                                           |   21 
 sc/inc/globstr.hrc                                                          |   11 
 sc/inc/nameuno.hxx                                                          |    4 
 sc/inc/rangelst.hxx                                                         |  105 -
 sc/inc/reffind.hxx                                                          |    2 
 sc/inc/refreshtimer.hxx                                                     |  173 +-
 sc/inc/sc.hrc                                                               |   73 
 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/documen5.cxx                                            |   31 
 sc/source/core/data/document.cxx                                            |   82 -
 sc/source/core/data/dpobject.cxx                                            |    2 
 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                                              |    4 
 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                                           |    9 
 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                                         |    4 
 sc/source/filter/xml/XMLExportDDELinks.cxx                                  |    2 
 sc/source/filter/xml/XMLExportDDELinks.hxx                                  |    2 
 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/xmlsubti.hxx                                           |    4 
 sc/source/ui/Accessibility/AccessibleContextBase.cxx                        |    1 
 sc/source/ui/Accessibility/AccessibleCsvControl.cxx                         |    7 
 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.src                                            |    2 
 sc/source/ui/cctrl/popmenu.cxx                                              |    2 
 sc/source/ui/cctrl/tbinsert.cxx                                             |   10 
 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/filtdlg.cxx                                              |    7 
 sc/source/ui/dbgui/imoptdlg.hrc                                             |    5 
 sc/source/ui/dbgui/imoptdlg.src                                             |   23 
 sc/source/ui/dbgui/pfiltdlg.cxx                                             |    4 
 sc/source/ui/dbgui/pivot.hrc                                                |    3 
 sc/source/ui/dbgui/pivot.src                                                |    2 
 sc/source/ui/dbgui/pvfundlg.hrc                                             |    6 
 sc/source/ui/dbgui/pvfundlg.src                                             |    2 
 sc/source/ui/dbgui/pvlaydlg.cxx                                             |    1 
 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                                             |   88 -
 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/acredlin.hrc                                               |   10 
 sc/source/ui/inc/attrdlg.hrc                                                |    4 
 sc/source/ui/inc/condfrmt.hrc                                               |    3 
 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/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/optdlg.hrc                                                 |   19 
 sc/source/ui/inc/optload.hrc                                                |    4 
 sc/source/ui/inc/optsolver.hrc                                              |    5 
 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/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/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                                         |    6 
 sc/source/ui/miscdlgs/protectiondlg.src                                     |    2 
 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/namedlg/namedlg.cxx                                            |   12 
 sc/source/ui/navipi/content.cxx                                             |    8 
 sc/source/ui/navipi/navcitem.cxx                                            |    2 
 sc/source/ui/navipi/navipi.cxx                                              |   42 
 sc/source/ui/navipi/navipi.hrc                                              |    2 
 sc/source/ui/navipi/navipi.src                                              |   20 
 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                                           |    3 
 sc/source/ui/pagedlg/hfedtdlg.src                                           |   69 
 sc/source/ui/pagedlg/pagedlg.src                                            |   31 
 sc/source/ui/pagedlg/scuitphfedit.cxx                                       |   22 
 sc/source/ui/pagedlg/tphf.cxx                                               |   18 
 sc/source/ui/pagedlg/tphf.src                                               |   31 
 sc/source/ui/pagedlg/tphfedit.cxx                                           |  144 -
 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                                               |    3 
 sc/source/ui/src/scfuncs.src                                                |   10 
 sc/source/ui/src/scstring.src                                               |   80 +
 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                                           |    8 
 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                                            |   52 
 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/viewuno.cxx                                             |   31 
 sc/source/ui/vba/service.cxx                                                |   25 
 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                                               |   82 -
 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                                              |    8 
 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/output3.cxx                                               |    4 
 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                                              |   41 
 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                                               |    8 
 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                                              |    8 
 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 
 559 files changed, 4965 insertions(+), 7352 deletions(-)

New commits:
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++)
-        theOldTabs.Insert(aOldTab[sal::static_int_cast<USHORT>(i)],theOldTabs.Count());
-
-    for(i=0;i<aNewTab.Count();i++)
-        theNewTabs.Insert(aNewTab[sal::static_int_cast<USHORT>(i)],theNewTabs.Count());
-
-    if (mpOldNames && theOldTabs.Count() != mpOldNames->size())
+    if (mpOldNames && mpOldTabs->size() != mpOldNames->size())
         // The sizes differ.  Something is wrong.
         mpOldNames.reset();
 
-    if (mpNewNames && theNewTabs.Count() != mpNewNames->size())
+    if (mpNewNames && mpNewTabs->size() != mpNewNames->size())
         // The sizes differ.  Something is wrong.
         mpNewNames.reset();
 }
 
 ScUndoMoveTab::~ScUndoMoveTab()
 {
-    theNewTabs.Remove(0,theNewTabs.Count());
-    theOldTabs.Remove(0,theOldTabs.Count());
 }
 
 String ScUndoMoveTab::GetComment() const
@@ -586,10 +578,10 @@ void ScUndoMoveTab::DoChange( BOOL bUndo ) const
 
     if (bUndo)										// UnDo
     {
-        for(int i=theNewTabs.Count()-1;i>=0;i--)
+        for (size_t i = mpNewTabs->size(); i > 0; --i)
         {
-            SCTAB nDestTab = theNewTabs[sal::static_int_cast<USHORT>(i)];
-            SCTAB nOldTab = theOldTabs[sal::static_int_cast<USHORT>(i)];
+            SCTAB nDestTab = (*mpNewTabs)[i-1];
+            SCTAB nOldTab = (*mpOldTabs)[i-1];
             if (nDestTab > MAXTAB)							// angehaengt ?
                 nDestTab = pDoc->GetTableCount() - 1;
 
@@ -598,18 +590,18 @@ void ScUndoMoveTab::DoChange( BOOL bUndo ) const
             pViewShell->SetTabNo( nOldTab, TRUE );
             if (mpOldNames)
             {
-                const OUString& rOldName = (*mpOldNames)[i];
+                const OUString& rOldName = (*mpOldNames)[i-1];
                 pDoc->RenameTab(nOldTab, rOldName);
             }
         }
     }
     else
     {
-        for(int i=0;i<theNewTabs.Count();i++)
+        for (size_t i = 0, n = mpNewTabs->size(); i < n; ++i)
         {
-            SCTAB nDestTab = theNewTabs[sal::static_int_cast<USHORT>(i)];
-            SCTAB nNewTab = theNewTabs[sal::static_int_cast<USHORT>(i)];
-            SCTAB nOldTab = theOldTabs[sal::static_int_cast<USHORT>(i)];
+            SCTAB nDestTab = (*mpNewTabs)[i];
+            SCTAB nNewTab = nDestTab;
+            SCTAB nOldTab = (*mpOldTabs)[i];
             if (nDestTab > MAXTAB)							// angehaengt ?
                 nDestTab = pDoc->GetTableCount() - 1;
 
@@ -658,22 +650,18 @@ BOOL ScUndoMoveTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const
 //
 
 ScUndoCopyTab::ScUndoCopyTab(
-    ScDocShell* pNewDocShell, const SvShorts &aOldTab, const SvShorts &aNewTab,
+    ScDocShell* pNewDocShell,
+    vector<SCTAB>* pOldTabs, vector<SCTAB>* pNewTabs,
     vector<OUString>* pNewNames) :
     ScSimpleUndo( pNewDocShell ),
+    mpOldTabs(pOldTabs),
+    mpNewTabs(pNewTabs),
     mpNewNames(pNewNames),
     pDrawUndo( NULL )
 {
     pDrawUndo = GetSdrUndoAction( pDocShell->GetDocument() );
 
-    int i;
-    for(i=0;i<aOldTab.Count();i++)
-        theOldTabs.Insert(aOldTab[sal::static_int_cast<USHORT>(i)],theOldTabs.Count());
-
-    for(i=0;i<aNewTab.Count();i++)
-        theNewTabs.Insert(aNewTab[sal::static_int_cast<USHORT>(i)],theNewTabs.Count());
-
-    if (mpNewNames && theNewTabs.Count() != mpNewNames->size())
+    if (mpNewNames && mpNewTabs->size() != mpNewNames->size())
         // The sizes differ.  Something is wrong.
         mpNewNames.reset();
 }
@@ -693,7 +681,7 @@ void ScUndoCopyTab::DoChange() const
     ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
 
     if (pViewShell)
-        pViewShell->SetTabNo(theOldTabs[0],TRUE);
+        pViewShell->SetTabNo((*mpOldTabs)[0],TRUE);
 
     SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );	// Navigator
 
@@ -708,10 +696,10 @@ void ScUndoCopyTab::Undo()
 
     DoSdrUndoAction( pDrawUndo, pDoc );                 // before the sheets are deleted
 
-    int i;
-    for(i=theNewTabs.Count()-1;i>=0;i--)
+    vector<SCTAB>::const_reverse_iterator itr, itrEnd = mpNewTabs->rend();
+    for (itr = mpNewTabs->rbegin(); itr != itrEnd; ++itr)
     {
-        SCTAB nDestTab = theNewTabs[sal::static_int_cast<USHORT>(i)];
+        SCTAB nDestTab = *itr;
         if (nDestTab > MAXTAB)							// append?
             nDestTab = pDoc->GetTableCount() - 1;
 
@@ -723,9 +711,9 @@ void ScUndoCopyTab::Undo()
     //	ScTablesHint broadcasts after all sheets have been deleted,
     //	so sheets and draw pages are in sync!
 
-    for(i=theNewTabs.Count()-1;i>=0;i--)
+    for (itr = mpNewTabs->rbegin(); itr != itrEnd; ++itr)
     {
-        SCTAB nDestTab = theNewTabs[sal::static_int_cast<USHORT>(i)];
+        SCTAB nDestTab = *itr;
         if (nDestTab > MAXTAB)							// append?
             nDestTab = pDoc->GetTableCount() - 1;
 
@@ -741,11 +729,11 @@ void ScUndoCopyTab::Redo()
     ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
 
     SCTAB nDestTab = 0;
-    for(int i=0;i<theNewTabs.Count();i++)
+    for (size_t i = 0, n = mpNewTabs->size(); i < n; ++i)
     {
-        nDestTab = theNewTabs[sal::static_int_cast<USHORT>(i)];
-        SCTAB nNewTab = theNewTabs[sal::static_int_cast<USHORT>(i)];
-        SCTAB nOldTab = theOldTabs[sal::static_int_cast<USHORT>(i)];
+        nDestTab = (*mpNewTabs)[i];
+        SCTAB nNewTab = nDestTab;
+        SCTAB nOldTab = (*mpOldTabs)[i];
         if (nDestTab > MAXTAB)							// angehaengt ?
             nDestTab = pDoc->GetTableCount() - 1;
 
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index e78eec4..5c07a40 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -2756,10 +2756,12 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
         // Move or copy within the same document.
         SCTAB		nTabCount	= pDoc->GetTableCount();
 
-        SvShorts	TheTabs;
-        SvShorts	TheDestTabs;
+        auto_ptr< vector<SCTAB> >    pSrcTabs(new vector<SCTAB>);
+        auto_ptr< vector<SCTAB> >    pDestTabs(new vector<SCTAB>);
         auto_ptr< vector<OUString> > pTabNames(new vector<OUString>);
         auto_ptr< vector<OUString> > pDestNames(NULL);
+        pSrcTabs->reserve(nTabCount);
+        pDestTabs->reserve(nTabCount);
         pTabNames->reserve(nTabCount);
         String		aDestName;
 
@@ -2819,7 +2821,7 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
                 pDoc->SetVisible(nDestTab1,bVisible );
             }
 
-            TheTabs.Insert(nMovTab,TheTabs.Count());
+            pSrcTabs->push_back(nMovTab);
 
             if(!bCopy)
             {
@@ -2829,18 +2831,18 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
                 }
             }
 
-            TheDestTabs.Insert(nDestTab1,TheDestTabs.Count());
+            pDestTabs->push_back(nDestTab1);
         }
 
         // Rename must be done after all sheets have been moved.
         if (bRename)
         {
             pDestNames.reset(new vector<OUString>);
-            size_t n = TheDestTabs.Count();
+            size_t n = pDestTabs->size();
             pDestNames->reserve(n);
             for (size_t j = 0; j < n; ++j)
             {
-                SCTAB nRenameTab = static_cast<SCTAB>(TheDestTabs[j]);
+                SCTAB nRenameTab = (*pDestTabs)[j];
                 String aTabName = *pNewTabName;
                 pDoc->CreateValidTabName( aTabName );
                 pDestNames->push_back(aTabName);
@@ -2858,13 +2860,14 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
             if (bCopy)
             {
                 pDocShell->GetUndoManager()->AddUndoAction(
-                        new ScUndoCopyTab( pDocShell, TheTabs, TheDestTabs, pDestNames.release()));
+                        new ScUndoCopyTab(
+                            pDocShell, pSrcTabs.release(), pDestTabs.release(), pDestNames.release()));
             }
             else
             {
                 pDocShell->GetUndoManager()->AddUndoAction(
                         new ScUndoMoveTab(
-                            pDocShell, TheTabs, TheDestTabs, pTabNames.release(), pDestNames.release()));
+                            pDocShell, pSrcTabs.release(), pDestTabs.release(), pTabNames.release(), pDestNames.release()));
             }
         }
 
commit f534c96b2c69306d5888f87c88cb8e5b081c8263
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Tue Dec 14 18:13:46 2010 -0500

    Removed unused code.

diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 8b923c7..e78eec4 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -2716,13 +2716,7 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
             default:
             break;
         }
-        //pDestShell->GetUndoManager()->Clear();		//! Undo implementieren !!!
-/*
-        String sName;
-        pDestDoc->GetName(nDestTab, sName);
-        pDestShell->GetUndoManager()->AddUndoAction(
-                        new ScUndoInsertTab( pDestShell, nDestTab, TRUE, sName ) );
-*/
+
         if (!bCopy)
         {
             if(nTabCount!=nTabSelCount)
@@ -2738,7 +2732,6 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
                 pDestDoc->UpdateChartListenerCollection();
 
             pDestDoc->DeleteTab(static_cast<SCTAB>(TheTabs.Count()));   // alte erste Tabelle
-//?			pDestDoc->SelectTable(0, TRUE);		// neue erste Tabelle selektieren
             if (pDestViewSh)
                 pDestViewSh->TabChanged();		// Pages auf dem Drawing-Layer
             pDestShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB,
commit cdcd262ea4aa3c3e407b14ed533e514f75de2d3a
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Tue Dec 14 17:27:55 2010 -0500

    Fixed unformatted text paste. (fdo#32213)
    
    * Changed default option settings for CSV import options to
      something sensible.
    
    * Set explicit multi-line cell handling policy during unformatted
      text pasting.

diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index d297821..05abff4 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -311,8 +311,15 @@ sal_Bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor )
             BOOL bIncludeFiltered = pDoc->IsCutMode() || bUsedForLink;
 
             ScImportExport aObj( pDoc, aBlock );
+            ScExportTextOptions aTextOptions(ScExportTextOptions::None, 0, true);
             if ( bUsedForLink )
-                aObj.SetExportTextOptions( ScExportTextOptions( ScExportTextOptions::ToSpace, ' ', false ) );
+            {
+                // For a DDE link, convert line breaks and separators to space.
+                aTextOptions.meNewlineConversion = ScExportTextOptions::ToSpace;
+                aTextOptions.mcSeparatorConvertTo = ' ';
+                aTextOptions.mbAddQuotes = false;
+            }
+            aObj.SetExportTextOptions(aTextOptions);
             aObj.SetFormulas( pDoc->GetViewOptions().GetOption( VOPT_FORMULAS ) );
             aObj.SetIncludeFiltered( bIncludeFiltered );
 
diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx
index 09e1dfb..2a9e071 100644
--- a/sc/source/ui/dbgui/scuiasciiopt.cxx
+++ b/sc/source/ui/dbgui/scuiasciiopt.cxx
@@ -274,9 +274,9 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName,
     }
     SetText( aName );
 
-
-    OUString sFieldSeparators;
-    OUString sTextSeparators;
+    // Default options
+    OUString sFieldSeparators(RTL_CONSTASCII_USTRINGPARAM("\t"));
+    OUString sTextSeparators(mcTextSep);
     bool bMergeDelimiters = false;
     bool bFixedWidth = false;
     bool bQuotedFieldAsText = true;
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index fb242f2..ba9c36e 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -1398,10 +1398,38 @@ const sal_Unicode* ScImportExport::ScanNextFieldFromString( const sal_Unicode* p
     return p;
 }
 
-        //
-        //
-        //
+namespace {
+
+/**
+ * Check if a given string has any line break characters or separators.
+ *
+ * @param rStr string to inspect.
+ * @param cSep separator character.
+ */
+bool hasLineBreaksOrSeps( const String& rStr, sal_Unicode cSep )
+{
+    const sal_Unicode* p = rStr.GetBuffer();
+    for (xub_StrLen i = 0, n = rStr.Len(); i < n; ++i, ++p)
+    {
+        sal_Unicode c = *p;
+        if (c == cSep)
+            // separator found.
+            return true;
 
+        switch (c)
+        {
+            case _LF:
+            case _CR:
+                // line break found.
+                return true;
+            default:
+                ;
+        }
+    }
+    return false;
+}
+
+}
 
 BOOL ScImportExport::Doc2Text( SvStream& rStrm )
 {
@@ -1482,7 +1510,7 @@ BOOL ScImportExport::Doc2Text( SvStream& rStrm )
                         if( mExportTextOptions.mcSeparatorConvertTo && cSep )
                             aCell.SearchAndReplaceAll( cSep, mExportTextOptions.mcSeparatorConvertTo );
 
-                        if( mExportTextOptions.mbAddQuotes && ( aCell.Search( cSep ) != STRING_NOTFOUND ) )
+                        if( mExportTextOptions.mbAddQuotes && hasLineBreaksOrSeps(aCell, cSep) )
                             lcl_WriteString( rStrm, aCell, cStr, cStr );
                         else
                             lcl_WriteSimpleString( rStrm, aCell );
commit 15124f0b2476ed4a9d499331fc154a9602205dae
Author: Michael Meeks <michael.meeks at novell.com>
Date:   Tue Dec 14 15:50:17 2010 +0000

    add CSV number parser unit tests, and license headers

diff --git a/sc/qa/unit/makefile.mk b/sc/qa/unit/makefile.mk
index 83be94c..db22e52 100644
--- a/sc/qa/unit/makefile.mk
+++ b/sc/qa/unit/makefile.mk
@@ -1,37 +1,31 @@
-#*************************************************************************
+# -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 #
-#   OpenOffice.org - a multi-platform office productivity suite
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
 #
-#   $RCSfile: makefile.mk,v $
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
 #
-#   $Revision: 1.2 $
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
 #
-#   last change: $Author: ihi $ $Date: 2007/11/23 13:58:12 $
+# The Initial Developer of the Original Code is
+#       Novell, Inc.
+# Portions created by the Initial Developer are Copyright (C) 2010 the
+# Initial Developer. All Rights Reserved.
 #
-#   The Contents of this file are made available subject to
-#   the terms of GNU Lesser General Public License Version 2.1.
+# Contributor(s):  Michael Meeks <michael.meeks at novell.com>
+#                  Caolan McNamara <caolanm at redhat.com>
 #
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
 #
-#     GNU Lesser General Public License Version 2.1
-#     =============================================
-#     Copyright 2007 by Sun Microsystems, Inc.
-#     901 San Antonio Road, Palo Alto, CA 94303, USA
-#
-#     This library is free software; you can redistribute it and/or
-#     modify it under the terms of the GNU Lesser General Public
-#     License version 2.1, as published by the Free Software Foundation.
-#
-#     This library is distributed in the hope that it will be useful,
-#     but WITHOUT ANY WARRANTY; without even the implied warranty of
-#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#     Lesser General Public License for more details.
-#
-#     You should have received a copy of the GNU Lesser General Public
-#     License along with this library; if not, write to the Free Software
-#     Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-#     MA  02111-1307  USA
-#
-#*************************************************************************
 
 PRJ=..$/..
 PRJNAME=sc
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 5be5800..a358409 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -1,7 +1,29 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /*
- * Known problems:
- * + We need to re-enable the exports.map with the right symbol
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ *       Novell, Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):  Michael Meeks <michael.meeks at novell.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
  */
 
 // TODO ...
@@ -31,6 +53,7 @@
 #include <vcl/svapp.hxx>
 #include <scdll.hxx>
 #include <document.hxx>
+#include <stringutil.hxx>
 
 #include "preextstl.h"
 #include <cppunit/TestSuite.h>
@@ -51,10 +74,12 @@ public:
 
     void testSUM();
     void testNamedRange();
+    void testCSV();
 
     CPPUNIT_TEST_SUITE(Test);
     CPPUNIT_TEST(testSUM);
     CPPUNIT_TEST(testNamedRange);
+    CPPUNIT_TEST(testCSV);
     CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -132,6 +157,39 @@ void Test::testNamedRange()
     m_pDoc->DeleteTab(0);
 }
 
+void Test::testCSV()
+{
+    const int English = 0, European = 1;
+    struct {
+        const char *pStr; int eSep; bool bResult; double nValue;
+    } aTests[] = {
+        { "foo",       English,  false, 0.0 },
+        { "1.0",       English,  true,  1.0 },
+        { "1,0",       English,  false, 0.0 },
+        { "1.0",       European, false, 0.0 },
+        { "1.000",     European, true,  1000.0 },
+        { "1,000",     European, true,  1.0 },
+        { "1.000",     English,  true,  1.0 },
+        { "1,000",     English,  true,  1000.0 },
+        { " 1.0",      English,  true,  1.0 },
+        { " 1.0  ",    English,  true,  1.0 },
+        { "1.0 ",      European, false, 0.0 },
+        { "1.000",     European, true,  1000.0 },
+        { "1137.999",  English,  true,  1137.999 },
+        { "1.000.00",  European, false, 0.0 }
+    };
+    for (sal_uInt32 i = 0; i < SAL_N_ELEMENTS(aTests); i++) {
+        rtl::OUString aStr(aTests[i].pStr, strlen (aTests[i].pStr), RTL_TEXTENCODING_UTF8);
+        double nValue = 0.0;
+        bool bResult = ScStringUtil::parseSimpleNumber
+                (aStr, aTests[i].eSep == English ? '.' : ',',
+                 aTests[i].eSep == English ? ',' : '.',
+                 nValue);
+        CPPUNIT_ASSERT_MESSAGE ("CSV numeric detection failure", bResult == aTests[i].bResult);
+        CPPUNIT_ASSERT_MESSAGE ("CSV numeric value failure", nValue == aTests[i].nValue);
+    }
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 }
commit 139726734ba6ed653ee0b8c1186b3c65190e8759
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Mon Dec 13 23:30:36 2010 -0500

    When the name equals the automatically assigned one, remove it.
    
    This prevents e.g. copying Sheet1 with the default name of Sheet1_2
    from being renamed to Sheet1_2_2.

diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index 18d1c7d..a5c0118 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -239,9 +239,24 @@ IMPL_LINK( ScMoveTableDlg, OkHdl, void *, EMPTYARG )
     bCopyTable  = aBtnCopy.IsChecked();
     bRenameTable= aBtnRename.IsChecked();
 
-    // Return an empty string, when the new name is the same as the original name.
-    if( mrDefaultName == aEdTabName.GetText() )
-        aEdTabName.SetText( String() );
+    if (bCopyTable)
+    {
+        // Return an empty string when the new name is the same as the
+        // automatic name assigned by the document.
+        String aCopyName = mrDefaultName;
+        ScDocument* pDoc = GetSelectedDoc();
+        if (pDoc)
+            pDoc->CreateValidTabName(aCopyName);
+        if (aCopyName == aEdTabName.GetText())
+            aEdTabName.SetText( String() );
+    }
+    else
+    {
+        // Return an empty string, when the new name is the same as the
+        // original name.
+        if( mrDefaultName == aEdTabName.GetText() )
+            aEdTabName.SetText( String() );
+    }
 
     EndDialog( RET_OK );
 
commit 0e405c692ad036fead59aa80974e65e499005f32
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Mon Dec 13 23:16:28 2010 -0500

    Properly support redo of renamed sheet copy.

diff --git a/sc/source/ui/inc/undotab.hxx b/sc/source/ui/inc/undotab.hxx
index 90a75e3..5d46136 100644
--- a/sc/source/ui/inc/undotab.hxx
+++ b/sc/source/ui/inc/undotab.hxx
@@ -211,9 +211,11 @@ class ScUndoCopyTab: public ScSimpleUndo
 {
 public:
                     TYPEINFO();
-                    ScUndoCopyTab(ScDocShell* pNewDocShell,
-                                  const SvShorts &aOldTab,
-                                  const SvShorts &aNewTab);
+                    ScUndoCopyTab(
+                        ScDocShell* pNewDocShell,
+                        const SvShorts &aOldTab,
+                        const SvShorts &aNewTab,
+                        ::std::vector< ::rtl::OUString>* pNewNames = NULL );
 
     virtual			~ScUndoCopyTab();
 
@@ -225,6 +227,7 @@ public:
     virtual String	GetComment() const;
 
 private:
+    ::boost::shared_ptr< ::std::vector< ::rtl::OUString> > mpNewNames;
     SdrUndoAction*	pDrawUndo;
     SvShorts	theOldTabs;
     SvShorts	theNewTabs;
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index ba8cbef..65c7f67 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -657,10 +657,11 @@ BOOL ScUndoMoveTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const
 //		Tabelle kopieren
 //
 
-ScUndoCopyTab::ScUndoCopyTab( ScDocShell* pNewDocShell,
-                                  const SvShorts &aOldTab,
-                                  const SvShorts &aNewTab) :
+ScUndoCopyTab::ScUndoCopyTab(
+    ScDocShell* pNewDocShell, const SvShorts &aOldTab, const SvShorts &aNewTab,
+    vector<OUString>* pNewNames) :
     ScSimpleUndo( pNewDocShell ),
+    mpNewNames(pNewNames),
     pDrawUndo( NULL )
 {
     pDrawUndo = GetSdrUndoAction( pDocShell->GetDocument() );
@@ -671,6 +672,10 @@ ScUndoCopyTab::ScUndoCopyTab( ScDocShell* pNewDocShell,
 
     for(i=0;i<aNewTab.Count();i++)
         theNewTabs.Insert(aNewTab[sal::static_int_cast<USHORT>(i)],theNewTabs.Count());
+
+    if (mpNewNames && theNewTabs.Count() != mpNewNames->size())
+        // The sizes differ.  Something is wrong.
+        mpNewNames.reset();
 }
 
 ScUndoCopyTab::~ScUndoCopyTab()
@@ -770,6 +775,12 @@ void ScUndoCopyTab::Redo()
 
         if ( pDoc->IsTabProtected( nAdjSource ) )
             pDoc->CopyTabProtection(nAdjSource, nNewTab);
+
+        if (mpNewNames)
+        {
+            const OUString& rName = (*mpNewNames)[i];
+            pDoc->RenameTab(nNewTab, rName);
+        }
     }
 
     RedoSdrUndoAction( pDrawUndo );             // after the sheets are inserted
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 22d43da..8b923c7 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -2865,7 +2865,7 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
             if (bCopy)
             {
                 pDocShell->GetUndoManager()->AddUndoAction(
-                        new ScUndoCopyTab( pDocShell, TheTabs, TheDestTabs));
+                        new ScUndoCopyTab( pDocShell, TheTabs, TheDestTabs, pDestNames.release()));
             }
             else
             {
commit bc1fddc43a67193b3d97b0d3a2d5dbeba62581d6
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Mon Dec 13 23:06:26 2010 -0500

    Properly support undo and redo when moving sheets.

diff --git a/sc/source/ui/inc/undotab.hxx b/sc/source/ui/inc/undotab.hxx
index d725386..90a75e3 100644
--- a/sc/source/ui/inc/undotab.hxx
+++ b/sc/source/ui/inc/undotab.hxx
@@ -51,7 +51,9 @@
 
 #include <com/sun/star/uno/Sequence.hxx>
 
+#include <boost/shared_ptr.hpp>
 #include <memory>
+#include <vector>
 
 class ScDocShell;
 class ScDocument;
@@ -180,9 +182,12 @@ class ScUndoMoveTab: public ScSimpleUndo
 {
 public:
                     TYPEINFO();
-                    ScUndoMoveTab( ScDocShell* pNewDocShell,
-                                  const SvShorts &aOldTab,
-                                  const SvShorts &aNewTab);
+                    ScUndoMoveTab(
+                        ScDocShell* pNewDocShell,
+                        const SvShorts &aOldTab, const SvShorts &aNewTab,
+                        ::std::vector< ::rtl::OUString>* pOldNames = NULL,
+                        ::std::vector< ::rtl::OUString>* pNewNames = NULL );
+
     virtual			~ScUndoMoveTab();
 
     virtual void	Undo();
@@ -193,6 +198,8 @@ public:
     virtual String	GetComment() const;
 
 private:
+    ::boost::shared_ptr< ::std::vector< ::rtl::OUString> > mpOldNames;
+    ::boost::shared_ptr< ::std::vector< ::rtl::OUString> > mpNewNames;
     SvShorts	theOldTabs;
     SvShorts	theNewTabs;
 
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index f32a335..ba8cbef 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -61,7 +61,10 @@ extern BOOL bDrawIsInUndo;			//! irgendwo als Member !!!
 
 using namespace com::sun::star;
 using ::com::sun::star::uno::Sequence;
+using ::rtl::OUString;
 using ::std::auto_ptr;
+using ::std::vector;
+using ::boost::shared_ptr;
 
 // STATIC DATA -----------------------------------------------------------
 
@@ -543,10 +546,11 @@ BOOL ScUndoRenameTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const
 //		Tabelle verschieben
 //
 
-ScUndoMoveTab::ScUndoMoveTab( ScDocShell* pNewDocShell,
-                                  const SvShorts &aOldTab,
-                                  const SvShorts &aNewTab) :
-    ScSimpleUndo( pNewDocShell )
+ScUndoMoveTab::ScUndoMoveTab(
+    ScDocShell* pNewDocShell, const SvShorts &aOldTab, const SvShorts &aNewTab,
+    vector<OUString>* pOldNames, vector<OUString>* pNewNames) :
+    ScSimpleUndo( pNewDocShell ),
+    mpOldNames(pOldNames), mpNewNames(pNewNames)
 {
     int i;
     for(i=0;i<aOldTab.Count();i++)
@@ -554,6 +558,14 @@ ScUndoMoveTab::ScUndoMoveTab( ScDocShell* pNewDocShell,
 
     for(i=0;i<aNewTab.Count();i++)
         theNewTabs.Insert(aNewTab[sal::static_int_cast<USHORT>(i)],theNewTabs.Count());
+
+    if (mpOldNames && theOldTabs.Count() != mpOldNames->size())
+        // The sizes differ.  Something is wrong.
+        mpOldNames.reset();
+
+    if (mpNewNames && theNewTabs.Count() != mpNewNames->size())
+        // The sizes differ.  Something is wrong.
+        mpNewNames.reset();
 }
 
 ScUndoMoveTab::~ScUndoMoveTab()
@@ -584,6 +596,11 @@ void ScUndoMoveTab::DoChange( BOOL bUndo ) const
             pDoc->MoveTab( nDestTab, nOldTab );
             pViewShell->GetViewData()->MoveTab( nDestTab, nOldTab );
             pViewShell->SetTabNo( nOldTab, TRUE );
+            if (mpOldNames)
+            {
+                const OUString& rOldName = (*mpOldNames)[i];
+                pDoc->RenameTab(nOldTab, rOldName);
+            }
         }
     }
     else
@@ -599,6 +616,11 @@ void ScUndoMoveTab::DoChange( BOOL bUndo ) const
             pDoc->MoveTab( nOldTab, nNewTab );
             pViewShell->GetViewData()->MoveTab( nOldTab, nNewTab );
             pViewShell->SetTabNo( nDestTab, TRUE );
+            if (mpNewNames)
+            {
+                const OUString& rNewName = (*mpNewNames)[i];
+                pDoc->RenameTab(nNewTab, rNewName);
+            }
         }
     }
 
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 848989e..22d43da 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -56,7 +56,6 @@
 #include <basic/sbstar.hxx>
 #include <com/sun/star/container/XNameContainer.hpp>
 #include <com/sun/star/script/XLibraryContainer.hpp>
-using namespace com::sun::star;
 
 #include "viewfunc.hxx"
 
@@ -98,11 +97,16 @@ using namespace com::sun::star;
 #include <com/sun/star/script/XLibraryContainer.hpp>
 
 #include <boost/scoped_ptr.hpp>
+#include <vector>
+#include <memory>
 
 using namespace com::sun::star;
 using ::rtl::OUStringBuffer;
 using ::rtl::OUString;
 
+using ::std::vector;
+using ::std::auto_ptr;
+
 // helper func defined in docfunc.cxx
 void VBA_DeleteModule( ScDocShell& rDocSh, String& sModuleName );
 
@@ -2761,9 +2765,10 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
 
         SvShorts	TheTabs;
         SvShorts	TheDestTabs;
-        SvStrings	TheTabNames;
+        auto_ptr< vector<OUString> > pTabNames(new vector<OUString>);
+        auto_ptr< vector<OUString> > pDestNames(NULL);
+        pTabNames->reserve(nTabCount);
         String		aDestName;
-        const String* pString;
 
         for(SCTAB i=0;i<nTabCount;i++)
         {
@@ -2771,19 +2776,18 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
             {
                 String aTabName;
                 pDoc->GetName( i, aTabName);
-                TheTabNames.Insert(new String(aTabName),TheTabNames.Count());
+                pTabNames->push_back(aTabName);
 
                 for(SCTAB j=i+1;j<nTabCount;j++)
                 {
                     if((!pDoc->IsVisible(j))&&(pDoc->IsScenario(j)))
                     {
                         pDoc->GetName( j, aTabName);
-                        TheTabNames.Insert(new String(aTabName),TheTabNames.Count());
+                        pTabNames->push_back(aTabName);
                         i=j;
                     }
                     else break;
                 }
-
             }
         }
 
@@ -2793,11 +2797,11 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
         pDoc->GetName( nDestTab, aDestName);
         SCTAB nDestTab1=nDestTab;
         SCTAB nMovTab=0;
-        for(int j=0;j<TheTabNames.Count();j++)
+        for (size_t j = 0, n = pTabNames->size(); j < n; ++j)
         {
             nTabCount	= pDoc->GetTableCount();
-            pString=TheTabNames[sal::static_int_cast<USHORT>(j)];
-            if(!pDoc->GetTable(*pString,nMovTab))
+            const OUString& rStr = (*pTabNames)[j];
+            if(!pDoc->GetTable(rStr,nMovTab))
             {
                 nMovTab=nTabCount;
             }
@@ -2826,27 +2830,33 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
 
             if(!bCopy)
             {
-                if(!pDoc->GetTable(*pString,nDestTab1))
+                if(!pDoc->GetTable(rStr,nDestTab1))
                 {
                     nDestTab1=nTabCount;
                 }
             }
 
             TheDestTabs.Insert(nDestTab1,TheDestTabs.Count());
-            delete pString;
         }
 
-        // Rename must be done after that all sheets have been moved.
+        // Rename must be done after all sheets have been moved.
         if (bRename)
         {
-            for(int j=0;j<TheDestTabs.Count();j++)
+            pDestNames.reset(new vector<OUString>);
+            size_t n = TheDestTabs.Count();
+            pDestNames->reserve(n);
+            for (size_t j = 0; j < n; ++j)
             {
                 SCTAB nRenameTab = static_cast<SCTAB>(TheDestTabs[j]);
                 String aTabName = *pNewTabName;
                 pDoc->CreateValidTabName( aTabName );
-                pDocShell->GetDocFunc().RenameTable( nRenameTab, aTabName, false, false );
+                pDestNames->push_back(aTabName);
+                pDoc->RenameTab(nRenameTab, aTabName);
             }
         }
+        else
+            // No need to keep this around when we are not renaming.
+            pTabNames.reset();
 
         nTab = GetViewData()->GetTabNo();
 
@@ -2860,7 +2870,8 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
             else
             {
                 pDocShell->GetUndoManager()->AddUndoAction(
-                        new ScUndoMoveTab( pDocShell, TheTabs, TheDestTabs));
+                        new ScUndoMoveTab(
+                            pDocShell, TheTabs, TheDestTabs, pTabNames.release(), pDestNames.release()));
             }
         }
 
commit a710124689874ed3f0857ba76c6eb2b7b7cb1b82
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Mon Dec 13 21:43:04 2010 -0500

    A little code cleanups.

diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
index 95158e9..98107ea 100644
--- a/sc/source/ui/inc/viewfunc.hxx
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -272,7 +272,7 @@ public:
     BOOL			DeleteTables(const SvShorts &TheTabs, BOOL bRecord = TRUE );
 
     BOOL			RenameTable( const String& rName, SCTAB nTabNr );
-    void			MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const String* pName = NULL );
+    void			MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const String* pNewTabName = NULL );
     void			ImportTables( ScDocShell* pSrcShell,
                                     SCTAB nCount, const SCTAB* pSrcTabs,
                                     BOOL bLink,SCTAB nTab);
diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index d9381ae..18d1c7d 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -128,14 +128,18 @@ void ScMoveTableDlg::SetRenameTable(BOOL bFlag)
 
 void ScMoveTableDlg::EnableRenameTable(BOOL bFlag)
 {
-    if( bFlag )
-        aBtnRename.Enable();
-    else
-        aBtnRename.Disable();
+    aBtnRename.Enable(bFlag);
+    ResetRenameInput();
 }
 
 void ScMoveTableDlg::ResetRenameInput()
 {
+    if (!aBtnRename.IsEnabled())
+    {
+        aEdTabName.SetText(String());
+        return;
+    }
+
     bool bVal = aBtnCopy.IsChecked();
     if (bVal)
     {
@@ -174,7 +178,6 @@ void ScMoveTableDlg::Init()
     aEdTabName.Enable(false);
     InitDocListBox();
     SelHdl( &aLbDoc );
-    ResetRenameInput();
 }
 
 //------------------------------------------------------------------------
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index 56d9b5e..497a4c0 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -558,10 +558,11 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
                         pDlg->SetCopyTable();
                         pDlg->EnableCopyTable(FALSE);
                     }
-                    if(nTabSelCount != 1)
-                    {
-                        pDlg->EnableRenameTable(FALSE);
-                    }
+
+                    // We support direct renaming of sheet only when one sheet
+                    // is selected.
+                    pDlg->EnableRenameTable(nTabSelCount == 1);
+
                     if ( pDlg->Execute() == RET_OK )
                     {
                         nDoc = pDlg->GetSelectedDocument();
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 21e7194..848989e 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -2543,7 +2543,7 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell,
 //----------------------------------------------------------------------------
 //	Tabelle in anderes Dokument verschieben / kopieren
 
-void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const String* pName )
+void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const String* pNewTabName )
 {
     ScDocument* pDoc	   = GetViewData()->GetDocument();
     ScDocShell* pDocShell  = GetViewData()->GetDocShell();
@@ -2551,6 +2551,7 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
     ScDocShell* pDestShell = NULL;
     ScTabViewShell* pDestViewSh = NULL;
     BOOL bUndo (pDoc->IsUndoEnabled());
+    bool bRename = pNewTabName && pNewTabName->Len();
 
     BOOL bNewDoc = ( nDestDocNo == SC_DOC_NEW );
     if ( bNewDoc )
@@ -2589,6 +2590,14 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
         return;
     }
 
+    ScMarkData& rMark = GetViewData()->GetMarkData();
+    if (bRename && rMark.GetSelectCount() != 1)
+    {
+        // Custom sheet name is provided, but more than one sheet is selected.
+        // We don't support this scenario at the moment.
+        return;
+    }
+
     pDestDoc = pDestShell->GetDocument();
 
     SCTAB nTab = GetViewData()->GetTabNo();
@@ -2604,7 +2613,6 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
                         FALSE );
         }
 
-        ScMarkData& rMark		= GetViewData()->GetMarkData();
         SCTAB		nTabCount	= pDoc->GetTableCount();
         SCTAB		nTabSelCount = rMark.GetSelectCount();
 
@@ -2645,8 +2653,8 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
         for( USHORT j=0; j<TheTabs.Count(); j++, nDestTab1++ )
         {	// #63304# insert sheets first and update all references
             String aName;
-            if( (pName != NULL ) && ( pName->Len() ) )
-                aName = *pName;
+            if (bRename)
+                aName = *pNewTabName;
             else
                 pDoc->GetName( TheTabs[j], aName );
 
@@ -2746,17 +2754,16 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
         pDestShell->SetDocumentModified();
         SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
     }
-    else					// innerhalb des Dokuments
+    else
     {
-
-        ScMarkData& rMark		= GetViewData()->GetMarkData();
+        // Move or copy within the same document.
         SCTAB		nTabCount	= pDoc->GetTableCount();
 
         SvShorts	TheTabs;
         SvShorts	TheDestTabs;
         SvStrings	TheTabNames;
         String		aDestName;
-        String		*pString;
+        const String* pString;
 
         for(SCTAB i=0;i<nTabCount;i++)
         {
@@ -2830,14 +2837,14 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
         }
 
         // Rename must be done after that all sheets have been moved.
-        if( (pName != NULL) && ( pName->Len() ) )
+        if (bRename)
         {
             for(int j=0;j<TheDestTabs.Count();j++)
             {
                 SCTAB nRenameTab = static_cast<SCTAB>(TheDestTabs[j]);
-                String aTabName( *pName);
+                String aTabName = *pNewTabName;
                 pDoc->CreateValidTabName( aTabName );
-                pDocShell->GetDocFunc().RenameTable( nRenameTab, aTabName, TRUE, FALSE );
+                pDocShell->GetDocFunc().RenameTable( nRenameTab, aTabName, false, false );
             }
         }
 
commit c203454a76f455fe565c5c7dca688f30cb85ed3d
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Mon Dec 13 20:34:30 2010 -0500

    Removed unused block.

diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index 4bf4174..56d9b5e 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -498,12 +498,6 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
                     if( IS_AVAILABLE( FN_PARAM_2, &pItem ) )
                         bCpy = ((const SfxBoolItem*)pItem)->GetValue();
 
-#if 0
-// This must be checked:
-                    if( IS_AVAILABLE( FN_PARAM_3, &pItem ) )
-                        aTabName = ((const SfxStringItem*)pItem)->GetValue();
-#endif
-
                     if( aDocName.Len() )
                     {
                         SfxObjectShell* pSh		= SfxObjectShell::GetFirst();
commit 5425a9944573c50c8b5548e69f5631094c088931
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Mon Dec 13 20:13:33 2010 -0500

    Update new sheet name when control states change.

diff --git a/sc/source/ui/inc/mvtabdlg.hxx b/sc/source/ui/inc/mvtabdlg.hxx
index 8ee5847..3c1b6d2 100644
--- a/sc/source/ui/inc/mvtabdlg.hxx
+++ b/sc/source/ui/inc/mvtabdlg.hxx
@@ -57,7 +57,10 @@ public:
     void    EnableCopyTable         (BOOL bFlag=TRUE);
     void    SetRenameTable          (BOOL bFlag=TRUE);
     void    EnableRenameTable       (BOOL bFlag=TRUE);
-    void    EnableTabName           (BOOL bFlag=TRUE);
+
+private:
+    void ResetRenameInput();
+    ScDocument* GetSelectedDoc();
 
 private:
     FixedText       aFtDoc;
@@ -83,7 +86,7 @@ private:
     void    InitDocListBox  ();
     DECL_LINK( OkHdl, void * );
     DECL_LINK( SelHdl, ListBox * );
-    DECL_LINK( RenameHdl, void * );
+    DECL_LINK( CheckBtnHdl, void * );
 };
 
 #include <layout/layout-post.hxx>
diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index 1e81606..d9381ae 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -123,28 +123,42 @@ void ScMoveTableDlg::EnableCopyTable(BOOL bFlag)
 void ScMoveTableDlg::SetRenameTable(BOOL bFlag)
 {
     aBtnRename.Check(bFlag);
-    EnableTabName(bFlag);
+    aEdTabName.Enable(bFlag);
 }
 
 void ScMoveTableDlg::EnableRenameTable(BOOL bFlag)
-{    if( bFlag )
+{
+    if( bFlag )
         aBtnRename.Enable();
     else
         aBtnRename.Disable();
 }
 
-void ScMoveTableDlg::EnableTabName(BOOL bFlag)
+void ScMoveTableDlg::ResetRenameInput()
 {
-    if(bFlag)
+    bool bVal = aBtnCopy.IsChecked();
+    if (bVal)
     {
-        aEdTabName.Enable();
-        aEdTabName.SetText( mrDefaultName );
+        // copy
+        ScDocument* pDoc = GetSelectedDoc();
+        if (pDoc)
+        {
+            String aStr = mrDefaultName;
+            pDoc->CreateValidTabName(aStr);
+            aEdTabName.SetText(aStr);
+        }
+        else
+            aEdTabName.SetText(mrDefaultName);
     }
     else
-    {
-        aEdTabName.Disable();
-        aEdTabName.SetText( String() );
-    }
+        // move
+        aEdTabName.SetText(mrDefaultName);
+}
+
+ScDocument* ScMoveTableDlg::GetSelectedDoc()
+{
+    USHORT nPos = aLbDoc.GetSelectEntryPos();
+    return static_cast<ScDocument*>(aLbDoc.GetEntryData(nPos));
 }
 
 //------------------------------------------------------------------------
@@ -153,12 +167,14 @@ void ScMoveTableDlg::Init()
 {
     aBtnOk.SetClickHdl   ( LINK( this, ScMoveTableDlg, OkHdl ) );
     aLbDoc.SetSelectHdl  ( LINK( this, ScMoveTableDlg, SelHdl ) );
-    aBtnRename.SetToggleHdl( LINK( this, ScMoveTableDlg, RenameHdl ) );
+    aBtnCopy.SetToggleHdl( LINK( this, ScMoveTableDlg, CheckBtnHdl ) );
+    aBtnRename.SetToggleHdl( LINK( this, ScMoveTableDlg, CheckBtnHdl ) );
     aBtnCopy.Check( FALSE );
     aBtnRename.Check( FALSE );
-    EnableTabName( FALSE );
+    aEdTabName.Enable(false);
     InitDocListBox();
     SelHdl( &aLbDoc );
+    ResetRenameInput();
 }
 
 //------------------------------------------------------------------------
@@ -198,9 +214,12 @@ void ScMoveTableDlg::InitDocListBox()
 //------------------------------------------------------------------------
 // Handler:
 
-IMPL_LINK( ScMoveTableDlg, RenameHdl, void *, EMPTYARG )
+IMPL_LINK( ScMoveTableDlg, CheckBtnHdl, void *, pBtn )
 {
-    EnableTabName( aBtnRename.IsChecked() );
+    if (pBtn == &aBtnRename)
+        aEdTabName.Enable( aBtnRename.IsChecked() );
+    else if (pBtn == &aBtnCopy)
+        ResetRenameInput();
 
     return 0;
 }
@@ -226,14 +245,11 @@ IMPL_LINK( ScMoveTableDlg, OkHdl, void *, EMPTYARG )
     return 0;
 }
 
-//------------------------------------------------------------------------
-
 IMPL_LINK( ScMoveTableDlg, SelHdl, ListBox *, pLb )
 {
     if ( pLb == &aLbDoc )
     {
-        ScDocument* pDoc   = (ScDocument*)
-                             aLbDoc.GetEntryData( aLbDoc.GetSelectEntryPos() );
+        ScDocument* pDoc = GetSelectedDoc();
         SCTAB      nLast  = 0;
         String      aName;
 
@@ -251,6 +267,7 @@ IMPL_LINK( ScMoveTableDlg, SelHdl, ListBox *, pLb )
         aLbTable.InsertEntry( ScGlobal::GetRscString(STR_MOVE_TO_END) );
         aLbTable.SetUpdateMode( TRUE );
         aLbTable.SelectEntryPos( 0 );
+        ResetRenameInput();
     }
 
     return 0;
commit 20c5b51c515497a9eb8a2ff349f2c5cf52060045
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Mon Dec 13 17:04:43 2010 -0500

    Tabs to space conversion.

diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index b157241..bdfdd1a 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -506,7 +506,7 @@ bool AbstractScMoveTableDlg_Impl::GetRenameTable() const
 {
     return pDlg->GetRenameTable();
 }
-void	AbstractScMoveTableDlg_Impl::GetTabNameString( String& rString ) const
+void AbstractScMoveTableDlg_Impl::GetTabNameString( String& rString ) const
 {
     pDlg->GetTabNameString( rString );
 }
diff --git a/sc/source/ui/inc/mvtabdlg.hxx b/sc/source/ui/inc/mvtabdlg.hxx
index 7b05ad2..8ee5847 100644
--- a/sc/source/ui/inc/mvtabdlg.hxx
+++ b/sc/source/ui/inc/mvtabdlg.hxx
@@ -48,39 +48,39 @@ public:
                     ScMoveTableDlg( Window* pParent, const String& rDefault );
                     ~ScMoveTableDlg();
 
-    USHORT	GetSelectedDocument		() const;
-    SCTAB	GetSelectedTable		() const;
-    BOOL	GetCopyTable			() const;
+    USHORT  GetSelectedDocument     () const;
+    SCTAB   GetSelectedTable        () const;
+    BOOL    GetCopyTable            () const;
     bool    GetRenameTable          () const;
     void    GetTabNameString( String& rString ) const;
-    void	SetCopyTable			(BOOL bFlag=TRUE);
-    void	EnableCopyTable			(BOOL bFlag=TRUE);
-    void	SetRenameTable			(BOOL bFlag=TRUE);
-    void	EnableRenameTable		(BOOL bFlag=TRUE);
-    void	EnableTabName			(BOOL bFlag=TRUE);
+    void    SetCopyTable            (BOOL bFlag=TRUE);
+    void    EnableCopyTable         (BOOL bFlag=TRUE);
+    void    SetRenameTable          (BOOL bFlag=TRUE);
+    void    EnableRenameTable       (BOOL bFlag=TRUE);
+    void    EnableTabName           (BOOL bFlag=TRUE);
 
 private:
-    FixedText		aFtDoc;
-    ListBox			aLbDoc;
-    FixedText		aFtTable;
-    ListBox			aLbTable;
-    CheckBox		aBtnCopy;
-    CheckBox		aBtnRename;
-    Edit     		aEdTabName;
-    OKButton		aBtnOk;
-    CancelButton	aBtnCancel;
-    HelpButton		aBtnHelp;
+    FixedText       aFtDoc;
+    ListBox         aLbDoc;
+    FixedText       aFtTable;
+    ListBox         aLbTable;
+    CheckBox        aBtnCopy;
+    CheckBox        aBtnRename;
+    Edit            aEdTabName;
+    OKButton        aBtnOk;
+    CancelButton    aBtnCancel;
+    HelpButton      aBtnHelp;
 
-    const String&	mrDefaultName;
+    const String&   mrDefaultName;
 
-    USHORT			nDocument;
-    SCTAB			nTable;
-    BOOL			bCopyTable;
-    BOOL			bRenameTable;
+    USHORT          nDocument;
+    SCTAB           nTable;
+    BOOL            bCopyTable;
+    BOOL            bRenameTable;
     //--------------------------------------
-    void	Init			();
-    void    InitBtnRename	();
-    void	InitDocListBox	();
+    void    Init            ();
+    void    InitBtnRename   ();
+    void    InitDocListBox  ();
     DECL_LINK( OkHdl, void * );
     DECL_LINK( SelHdl, ListBox * );
     DECL_LINK( RenameHdl, void * );
diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index 8b12ae5..1e81606 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -59,7 +59,7 @@
 ScMoveTableDlg::ScMoveTableDlg( Window*       pParent,
                                 const String& rDefault )
 
-    :	ModalDialog ( pParent, ScResId( RID_SCDLG_MOVETAB ) ),
+    :   ModalDialog ( pParent, ScResId( RID_SCDLG_MOVETAB ) ),
         //
         aFtDoc      ( this, ScResId( FT_DEST ) ),
         aLbDoc      ( this, ScResId( LB_DEST ) ),
@@ -67,7 +67,7 @@ ScMoveTableDlg::ScMoveTableDlg( Window*       pParent,
         aLbTable    ( this, ScResId( LB_INSERT ) ),
         aBtnCopy    ( this, ScResId( BTN_COPY ) ),
         aBtnRename  ( this, ScResId( BTN_RENAME ) ),
-        aEdTabName	( this, ScResId( ED_INPUT ) ),
+        aEdTabName  ( this, ScResId( ED_INPUT ) ),
         aBtnOk      ( this, ScResId( BTN_OK ) ),
         aBtnCancel  ( this, ScResId( BTN_CANCEL ) ),
         aBtnHelp    ( this, ScResId( BTN_HELP ) ),
@@ -165,10 +165,10 @@ void ScMoveTableDlg::Init()
 
 void ScMoveTableDlg::InitDocListBox()
 {
-    SfxObjectShell* pSh		= SfxObjectShell::GetFirst();
-    ScDocShell*		pScSh	= NULL;
-    USHORT    		nSelPos	= 0;
-    USHORT    		i    	= 0;
+    SfxObjectShell* pSh     = SfxObjectShell::GetFirst();
+    ScDocShell*     pScSh   = NULL;
+    USHORT          nSelPos = 0;
+    USHORT          i       = 0;
 
     aLbDoc.Clear();
     aLbDoc.SetUpdateMode( FALSE );
commit d9d515299663d9399904b73a494c248578f43360
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Mon Dec 13 13:51:18 2010 -0500

    BOOL -> bool, and tabs to whitespace in new code.
    
    Also, putting a bool declaration in the right context.

diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index 93b291c..0b33261 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -213,7 +213,7 @@ public:
     virtual USHORT	GetSelectedDocument		() const = 0;
     virtual USHORT	GetSelectedTable		() const = 0;
     virtual BOOL	GetCopyTable			() const = 0;
-    virtual BOOL	GetRenameTable			() const = 0;
+    virtual bool    GetRenameTable          () const = 0;
     virtual void    GetTabNameString( String& rString ) const = 0;
     virtual void	SetCopyTable			(BOOL bFlag=TRUE) = 0;
     virtual void	EnableCopyTable			(BOOL bFlag=TRUE) = 0;
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index d31bd7e..b157241 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -502,7 +502,7 @@ BOOL	AbstractScMoveTableDlg_Impl::GetCopyTable() const
 {
     return pDlg->GetCopyTable();
 }
-BOOL	AbstractScMoveTableDlg_Impl::GetRenameTable() const
+bool AbstractScMoveTableDlg_Impl::GetRenameTable() const
 {
     return pDlg->GetRenameTable();
 }
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index 0738e97..121b791 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -263,7 +263,7 @@ class AbstractScMoveTableDlg_Impl : public AbstractScMoveTableDlg  //add for ScM
     virtual USHORT	GetSelectedDocument		() const;
     virtual USHORT	GetSelectedTable		() const;
     virtual BOOL	GetCopyTable			() const;
-    virtual BOOL	GetRenameTable			() const;
+    virtual bool    GetRenameTable          () const;
     virtual void    GetTabNameString( String& rString ) const;
     virtual void	SetCopyTable			(BOOL bFlag=TRUE);
     virtual void	EnableCopyTable			(BOOL bFlag=TRUE);
diff --git a/sc/source/ui/inc/mvtabdlg.hxx b/sc/source/ui/inc/mvtabdlg.hxx
index 8724bc4..7b05ad2 100644
--- a/sc/source/ui/inc/mvtabdlg.hxx
+++ b/sc/source/ui/inc/mvtabdlg.hxx
@@ -51,7 +51,7 @@ public:
     USHORT	GetSelectedDocument		() const;
     SCTAB	GetSelectedTable		() const;
     BOOL	GetCopyTable			() const;
-    BOOL	GetRenameTable			() const;
+    bool    GetRenameTable          () const;
     void    GetTabNameString( String& rString ) const;
     void	SetCopyTable			(BOOL bFlag=TRUE);
     void	EnableCopyTable			(BOOL bFlag=TRUE);
diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index 9ded781..8b12ae5 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -100,7 +100,7 @@ SCTAB ScMoveTableDlg::GetSelectedTable    () const { return nTable;     }
 
 BOOL   ScMoveTableDlg::GetCopyTable        () const { return bCopyTable; }
 
-BOOL   ScMoveTableDlg::GetRenameTable        () const { return bRenameTable; }
+bool   ScMoveTableDlg::GetRenameTable        () const { return bRenameTable; }
 
 void ScMoveTableDlg::GetTabNameString( String& rString ) const
 {
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index d46d7ec..4bf4174 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -478,7 +478,6 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
                 USHORT nDoc = 0;
                 SCTAB nTab = pViewData->GetTabNo();
                 BOOL   bCpy = FALSE;
-                BOOL   bRna = FALSE;
                 String aDocName;
                 String aTabName;
 
@@ -574,7 +573,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
                         nDoc = pDlg->GetSelectedDocument();
                         nTab = pDlg->GetSelectedTable();
                         bCpy = pDlg->GetCopyTable();
-                        bRna = pDlg->GetRenameTable();
+                        bool bRna = pDlg->GetRenameTable();
                         // Leave aTabName string empty, when Rename is FALSE.
                         if( bRna )
                         {
commit 93f5901f42e57c5c3cbd070e6a716945bd4bbb14
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Mon Dec 13 13:41:56 2010 -0500

    Made the dialog a bit smaller to fit.

diff --git a/sc/source/ui/src/miscdlgs.src b/sc/source/ui/src/miscdlgs.src
index cd7b2c6..0c3c0db 100644
--- a/sc/source/ui/src/miscdlgs.src
+++ b/sc/source/ui/src/miscdlgs.src
@@ -439,7 +439,7 @@ ModalDialog RID_SCDLG_MOVETAB
     OutputSize = TRUE ;
     HelpId = FID_TAB_MOVE ;
     SVLook = TRUE ;
-    Size = MAP_APPFONT ( 168 , 154 ) ;
+    Size = MAP_APPFONT ( 168 , 145 ) ;
     Text [ en-US ] = "Move/Copy Sheet" ;
     Moveable = TRUE ;
     Closeable = FALSE ;
@@ -499,7 +499,7 @@ ModalDialog RID_SCDLG_MOVETAB
     CheckBox BTN_RENAME
     {
         Pos = MAP_APPFONT ( 6 , 128 ) ;
-        Size = MAP_APPFONT (  52 , 10 ) ;
+        Size = MAP_APPFONT ( 52 , 10 ) ;
         Text [ en-US ] = "~Rename" ;
         TabStop = TRUE ;
     };
commit dd42e1b87bef10b20278e3c4a69c18b540056fc8
Author: Joost Wezenbeek <joost.eekhoorn at gmail.com>
Date:   Sun Dec 12 12:04:34 2010 +0100

    Change Sheet copy process
    
    Easy Hacks 3.27
    Added rename in Move/Copy Sheet in calc

diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index 102ea20..93b291c 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -410,7 +410,9 @@ public:
                                                                 long			nFirst	  = 1,
                                                                 long          nLast     = 100 ) = 0;
 
-    virtual AbstractScMoveTableDlg * CreateScMoveTableDlg(  Window* pParent, int nId ) = 0; //add for ScMoveTableDlg
+    virtual AbstractScMoveTableDlg * CreateScMoveTableDlg(  Window* pParent,  //add for ScMoveTableDlg
+                                                            const String& rDefault,
+                                                            int nId ) = 0;
 
     virtual AbstractScNameCreateDlg * CreateScNameCreateDlg ( Window * pParent, USHORT nFlags, int nId ) = 0; //add for ScNameCreateDlg
 
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index 10f0065..d31bd7e 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -1125,13 +1125,15 @@ AbstractScMetricInputDlg * ScAbstractDialogFactory_Impl::CreateScMetricInputDlg
 
 
 //add for  ScMoveTableDlg  begin
-AbstractScMoveTableDlg * ScAbstractDialogFactory_Impl::CreateScMoveTableDlg(  Window* pParent, int nId )
+AbstractScMoveTableDlg * ScAbstractDialogFactory_Impl::CreateScMoveTableDlg(  Window* pParent,
+                                                                              const String& rDefault,
+                                                                              int nId )
 {
     ScMoveTableDlg * pDlg=NULL;
     switch ( nId )
     {
         case RID_SCDLG_MOVETAB :
-            pDlg = new ScMoveTableDlg( pParent );
+            pDlg = new ScMoveTableDlg( pParent, rDefault );
             break;
         default:
             break;
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index f4a8286..0738e97 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -492,7 +492,10 @@ public:
                                                                 long			nFirst	  = 1,
                                                                 long          nLast     = 100 );
 
-    virtual AbstractScMoveTableDlg * CreateScMoveTableDlg(  Window* pParent, int nId ); //add for ScMoveTableDlg
+    virtual AbstractScMoveTableDlg * CreateScMoveTableDlg(  Window* pParent,  //add for ScMoveTableDlg
+                                                            const String& rDefault,
+                                                            int nId );
+
     virtual AbstractScNameCreateDlg * CreateScNameCreateDlg ( Window * pParent, USHORT nFlags, int nId ); //add for ScNameCreateDlg
 
     virtual AbstractScNamePasteDlg * CreateScNamePasteDlg ( Window * pParent, const ScRangeName* pList, //add for ScNamePasteDlg
diff --git a/sc/source/ui/inc/mvtabdlg.hxx b/sc/source/ui/inc/mvtabdlg.hxx
index 1ffdc28..8724bc4 100644
--- a/sc/source/ui/inc/mvtabdlg.hxx
+++ b/sc/source/ui/inc/mvtabdlg.hxx
@@ -45,7 +45,7 @@
 class ScMoveTableDlg : public ModalDialog
 {
 public:
-                    ScMoveTableDlg( Window* pParent );
+                    ScMoveTableDlg( Window* pParent, const String& rDefault );
                     ~ScMoveTableDlg();
 
     USHORT	GetSelectedDocument		() const;
@@ -71,6 +71,8 @@ private:
     CancelButton	aBtnCancel;
     HelpButton		aBtnHelp;
 
+    const String&	mrDefaultName;
+
     USHORT			nDocument;
     SCTAB			nTable;
     BOOL			bCopyTable;
diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index cf394a7..9ded781 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -56,7 +56,8 @@
 
 //==================================================================
 
-ScMoveTableDlg::ScMoveTableDlg( Window* pParent )
+ScMoveTableDlg::ScMoveTableDlg( Window*       pParent,
+                                const String& rDefault )
 
     :	ModalDialog ( pParent, ScResId( RID_SCDLG_MOVETAB ) ),
         //
@@ -71,6 +72,7 @@ ScMoveTableDlg::ScMoveTableDlg( Window* pParent )
         aBtnCancel  ( this, ScResId( BTN_CANCEL ) ),
         aBtnHelp    ( this, ScResId( BTN_HELP ) ),
         //
+        mrDefaultName( rDefault ),
         nDocument   ( 0 ),
         nTable      ( 0 ),
         bCopyTable  ( FALSE ),
@@ -136,6 +138,7 @@ void ScMoveTableDlg::EnableTabName(BOOL bFlag)
     if(bFlag)
     {
         aEdTabName.Enable();
+        aEdTabName.SetText( mrDefaultName );
     }
     else
     {
@@ -213,6 +216,11 @@ IMPL_LINK( ScMoveTableDlg, OkHdl, void *, EMPTYARG )
     nTable      = (nTabSel != nTabLast) ? static_cast<SCTAB>(nTabSel) : SC_TAB_APPEND;
     bCopyTable  = aBtnCopy.IsChecked();
     bRenameTable= aBtnRename.IsChecked();
+
+    // Return an empty string, when the new name is the same as the original name.
+    if( mrDefaultName == aEdTabName.GetText() )
+        aEdTabName.SetText( String() );
+
     EndDialog( RET_OK );
 
     return 0;
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index b22c1ca..d46d7ec 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -544,10 +544,15 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
                 }
                 else
                 {
+                    String aDefaultName;
+                    pDoc->GetName( pViewData->GetTabNo(), aDefaultName );
+
                     ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
                     DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
 
-                    AbstractScMoveTableDlg* pDlg = pFact->CreateScMoveTableDlg( GetDialogParent(), RID_SCDLG_MOVETAB );
+                    AbstractScMoveTableDlg* pDlg = pFact->CreateScMoveTableDlg( GetDialogParent(),
+                                                                                aDefaultName,
+                                                                                RID_SCDLG_MOVETAB );
                     DBG_ASSERT(pDlg, "Dialog create fail!");
 
                     SCTAB nTableCount = pDoc->GetTableCount();
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 49c876c..21e7194 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -2645,7 +2645,7 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
         for( USHORT j=0; j<TheTabs.Count(); j++, nDestTab1++ )
         {	// #63304# insert sheets first and update all references
             String aName;
-            if( pName->Len() )
+            if( (pName != NULL ) && ( pName->Len() ) )
                 aName = *pName;
             else
                 pDoc->GetName( TheTabs[j], aName );
@@ -2830,7 +2830,7 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
         }
 
         // Rename must be done after that all sheets have been moved.
-        if( pName->Len() )
+        if( (pName != NULL) && ( pName->Len() ) )
         {
             for(int j=0;j<TheDestTabs.Count();j++)
             {
commit 977f9973be22defae88f6e46e62c02280a583851
Author: Joost Wezenbeek <joost.eekhoorn at gmail.com>
Date:   Sat Dec 11 21:52:42 2010 +0100

    Change Sheet copy process
    
    Easy Hacks 3.27
    Added rename in Move/Copy Sheet in calc

diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index dc20e8f..102ea20 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -217,6 +217,8 @@ public:
     virtual void    GetTabNameString( String& rString ) const = 0;
     virtual void	SetCopyTable			(BOOL bFlag=TRUE) = 0;
     virtual void	EnableCopyTable			(BOOL bFlag=TRUE) = 0;
+    virtual void	SetRenameTable			(BOOL bFlag=TRUE) = 0;
+    virtual void	EnableRenameTable		(BOOL bFlag=TRUE) = 0;
 };
 
 class AbstractScNameCreateDlg : public VclAbstractDialog  //add for ScNameCreateDlg
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index 5a78eae..10f0065 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -518,6 +518,15 @@ void	AbstractScMoveTableDlg_Impl::EnableCopyTable(BOOL bFlag)
 {
     return pDlg->EnableCopyTable( bFlag);
 }
+void	AbstractScMoveTableDlg_Impl::SetRenameTable(BOOL bFla)
+{
+    return pDlg->SetRenameTable( bFla );
+}
+void	AbstractScMoveTableDlg_Impl::EnableRenameTable(BOOL bFlag)
+{
+    return pDlg->EnableRenameTable( bFlag);
+}
+
 //add for AbstractScMoveTableDlg_Impl end
 
 //add for AbstractScNameCreateDlg_Impl begin
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index dc583a6..f4a8286 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -267,6 +267,8 @@ class AbstractScMoveTableDlg_Impl : public AbstractScMoveTableDlg  //add for ScM
     virtual void    GetTabNameString( String& rString ) const;
     virtual void	SetCopyTable			(BOOL bFlag=TRUE);
     virtual void	EnableCopyTable			(BOOL bFlag=TRUE);
+    virtual void	SetRenameTable			(BOOL bFlag=TRUE);
+    virtual void	EnableRenameTable		(BOOL bFlag=TRUE);
 };
 
 class AbstractScNameCreateDlg_Impl : public AbstractScNameCreateDlg  //add for ScNameCreateDlg
diff --git a/sc/source/ui/inc/mvtabdlg.hxx b/sc/source/ui/inc/mvtabdlg.hxx
index 543fa01..1ffdc28 100644
--- a/sc/source/ui/inc/mvtabdlg.hxx
+++ b/sc/source/ui/inc/mvtabdlg.hxx
@@ -56,7 +56,8 @@ public:
     void	SetCopyTable			(BOOL bFlag=TRUE);
     void	EnableCopyTable			(BOOL bFlag=TRUE);
     void	SetRenameTable			(BOOL bFlag=TRUE);
-    void	SetTabNameVisible		(BOOL bFlag=TRUE);
+    void	EnableRenameTable		(BOOL bFlag=TRUE);
+    void	EnableTabName			(BOOL bFlag=TRUE);
 
 private:
     FixedText		aFtDoc;
@@ -65,7 +66,6 @@ private:
     ListBox			aLbTable;
     CheckBox		aBtnCopy;
     CheckBox		aBtnRename;
-    FixedText		aFtTabName;
     Edit     		aEdTabName;
     OKButton		aBtnOk;
     CancelButton	aBtnCancel;
@@ -77,6 +77,7 @@ private:
     BOOL			bRenameTable;
     //--------------------------------------
     void	Init			();
+    void    InitBtnRename	();
     void	InitDocListBox	();
     DECL_LINK( OkHdl, void * );
     DECL_LINK( SelHdl, ListBox * );
diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
index e8ed808..95158e9 100644
--- a/sc/source/ui/inc/viewfunc.hxx
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -272,7 +272,7 @@ public:
     BOOL			DeleteTables(const SvShorts &TheTabs, BOOL bRecord = TRUE );
 
     BOOL			RenameTable( const String& rName, SCTAB nTabNr );
-    void			MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const String& rName );
+    void			MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const String* pName = NULL );
     void			ImportTables( ScDocShell* pSrcShell,
                                     SCTAB nCount, const SCTAB* pSrcTabs,
                                     BOOL bLink,SCTAB nTab);
diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index 5cb79d9..cf394a7 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -66,7 +66,6 @@ ScMoveTableDlg::ScMoveTableDlg( Window* pParent )
         aLbTable    ( this, ScResId( LB_INSERT ) ),
         aBtnCopy    ( this, ScResId( BTN_COPY ) ),
         aBtnRename  ( this, ScResId( BTN_RENAME ) ),
-        aFtTabName  ( this, ScResId( FT_LABEL ) ),
         aEdTabName	( this, ScResId( ED_INPUT ) ),
         aBtnOk      ( this, ScResId( BTN_OK ) ),
         aBtnCancel  ( this, ScResId( BTN_CANCEL ) ),
@@ -110,6 +109,7 @@ void ScMoveTableDlg::SetCopyTable(BOOL bFlag)
 {
     aBtnCopy.Check(bFlag);
 }
+
 void ScMoveTableDlg::EnableCopyTable(BOOL bFlag)
 {
     if(bFlag)
@@ -121,19 +121,26 @@ void ScMoveTableDlg::EnableCopyTable(BOOL bFlag)
 void ScMoveTableDlg::SetRenameTable(BOOL bFlag)
 {
     aBtnRename.Check(bFlag);
-    SetTabNameVisible(bFlag);
+    EnableTabName(bFlag);
+}
+
+void ScMoveTableDlg::EnableRenameTable(BOOL bFlag)
+{    if( bFlag )
+        aBtnRename.Enable();
+    else
+        aBtnRename.Disable();
 }
 
-void ScMoveTableDlg::SetTabNameVisible(BOOL bFlag)
+void ScMoveTableDlg::EnableTabName(BOOL bFlag)
 {
     if(bFlag)
     {
-        aFtTabName.Show();
-        aEdTabName.Show();
-    } else
+        aEdTabName.Enable();
+    }
+    else
     {
-        aFtTabName.Hide();
-        aEdTabName.Hide();
+        aEdTabName.Disable();
+        aEdTabName.SetText( String() );
     }
 }
 
@@ -146,7 +153,7 @@ void ScMoveTableDlg::Init()
     aBtnRename.SetToggleHdl( LINK( this, ScMoveTableDlg, RenameHdl ) );
     aBtnCopy.Check( FALSE );
     aBtnRename.Check( FALSE );
-    SetTabNameVisible( FALSE );
+    EnableTabName( FALSE );
     InitDocListBox();
     SelHdl( &aLbDoc );
 }
@@ -185,13 +192,12 @@ void ScMoveTableDlg::InitDocListBox()
     aLbDoc.SelectEntryPos( nSelPos );
 }
 
-
 //------------------------------------------------------------------------
 // Handler:
 
 IMPL_LINK( ScMoveTableDlg, RenameHdl, void *, EMPTYARG )
 {
-    SetTabNameVisible( aBtnRename.IsChecked() );
+    EnableTabName( aBtnRename.IsChecked() );
 
     return 0;
 }
diff --git a/sc/source/ui/src/miscdlgs.src b/sc/source/ui/src/miscdlgs.src
index 49bda22..cd7b2c6 100644
--- a/sc/source/ui/src/miscdlgs.src
+++ b/sc/source/ui/src/miscdlgs.src
@@ -439,7 +439,7 @@ ModalDialog RID_SCDLG_MOVETAB
     OutputSize = TRUE ;
     HelpId = FID_TAB_MOVE ;
     SVLook = TRUE ;
-    Size = MAP_APPFONT ( 168 , 180 ) ;
+    Size = MAP_APPFONT ( 168 , 154 ) ;
     Text [ en-US ] = "Move/Copy Sheet" ;
     Moveable = TRUE ;
     Closeable = FALSE ;
@@ -498,22 +498,16 @@ ModalDialog RID_SCDLG_MOVETAB
     };
     CheckBox BTN_RENAME
     {
-        Pos = MAP_APPFONT ( 6 , 124 ) ;
-        Size = MAP_APPFONT ( 100 , 10 ) ;
+        Pos = MAP_APPFONT ( 6 , 128 ) ;
+        Size = MAP_APPFONT (  52 , 10 ) ;
         Text [ en-US ] = "~Rename" ;
         TabStop = TRUE ;
     };
-    FixedText FT_LABEL
-    {
-        Pos = MAP_APPFONT ( 6 , 137 ) ;
-        Size = MAP_APPFONT ( 100 , 8 ) ;
-        Text [ en-US ] = "New ~name" ;
-    };
     Edit ED_INPUT
     {
         Border = TRUE ;
-        Pos = MAP_APPFONT ( 6 , 149 ) ;
-        Size = MAP_APPFONT ( 110 , 12 ) ;
+        Pos = MAP_APPFONT ( 58 , 127 ) ;
+        Size = MAP_APPFONT ( 104 , 12 ) ;
         TabStop = TRUE ;
     };
     String STR_NEWDOC
diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index b56fc42..14d0a33 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -552,7 +552,7 @@ sal_Int8 ScTabControl::ExecuteDrop( const ExecuteDropEvent& rEvt )
             if ( !pDoc->GetChangeTrack() && pDoc->IsDocEditable() )
             {
                 //! use table selection from the tab control where dragging was started?
-                pViewData->GetView()->MoveTable( lcl_DocShellNr(pDoc), nPos, rEvt.mnAction != DND_ACTION_MOVE, String() );
+                pViewData->GetView()->MoveTable( lcl_DocShellNr(pDoc), nPos, rEvt.mnAction != DND_ACTION_MOVE );
 
                 rData.pCellTransfer->SetDragWasInternal();          // don't delete
                 return TRUE;
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index 2fe2758..b22c1ca 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -560,6 +560,10 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
                         pDlg->SetCopyTable();
                         pDlg->EnableCopyTable(FALSE);
                     }
+                    if(nTabSelCount != 1)
+                    {
+                        pDlg->EnableRenameTable(FALSE);
+                    }
                     if ( pDlg->Execute() == RET_OK )
                     {
                         nDoc = pDlg->GetSelectedDocument();
@@ -600,7 +604,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
                 {
                     rReq.Done();		// aufzeichnen, solange das Dokument noch aktiv ist
 
-                    MoveTable( nDoc, nTab, bCpy, aTabName );
+                    MoveTable( nDoc, nTab, bCpy, &aTabName );
                 }
             }
             break;
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 0d93136..49c876c 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -2543,7 +2543,7 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell,
 //----------------------------------------------------------------------------
 //	Tabelle in anderes Dokument verschieben / kopieren
 
-void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const String& rName )
+void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const String* pName )
 {
     ScDocument* pDoc	   = GetViewData()->GetDocument();
     ScDocShell* pDocShell  = GetViewData()->GetDocShell();
@@ -2645,8 +2645,8 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
         for( USHORT j=0; j<TheTabs.Count(); j++, nDestTab1++ )
         {	// #63304# insert sheets first and update all references
             String aName;
-            if( rName.Len() )
-                aName = rName;
+            if( pName->Len() )
+                aName = *pName;
             else
                 pDoc->GetName( TheTabs[j], aName );
 
@@ -2830,12 +2830,12 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const
         }
 
         // Rename must be done after that all sheets have been moved.
-        if( rName.Len() )
+        if( pName->Len() )
         {
             for(int j=0;j<TheDestTabs.Count();j++)
             {
                 SCTAB nRenameTab = static_cast<SCTAB>(TheDestTabs[j]);
-                String aTabName( rName);
+                String aTabName( *pName);
                 pDoc->CreateValidTabName( aTabName );
                 pDocShell->GetDocFunc().RenameTable( nRenameTab, aTabName, TRUE, FALSE );
             }
commit af9d123791ebeaca9dd84a4294169237e193d6ff
Author: Joost Wezenbeek <joost.eekhoorn at gmail.com>
Date:   Fri Dec 10 20:03:11 2010 +0100

    Change Sheet copy process
    
    Easy Hacks 3.27
    Added rename in Move/Copy Sheet in calc

diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index e880df8..dc20e8f 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -213,6 +213,8 @@ public:
     virtual USHORT	GetSelectedDocument		() const = 0;
     virtual USHORT	GetSelectedTable		() const = 0;
     virtual BOOL	GetCopyTable			() const = 0;
+    virtual BOOL	GetRenameTable			() const = 0;
+    virtual void    GetTabNameString( String& rString ) const = 0;
     virtual void	SetCopyTable			(BOOL bFlag=TRUE) = 0;
     virtual void	EnableCopyTable			(BOOL bFlag=TRUE) = 0;
 };
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index fa14720..5a78eae 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -502,6 +502,14 @@ BOOL	AbstractScMoveTableDlg_Impl::GetCopyTable() const
 {
     return pDlg->GetCopyTable();
 }
+BOOL	AbstractScMoveTableDlg_Impl::GetRenameTable() const
+{
+    return pDlg->GetRenameTable();
+}
+void	AbstractScMoveTableDlg_Impl::GetTabNameString( String& rString ) const
+{
+    pDlg->GetTabNameString( rString );
+}
 void	AbstractScMoveTableDlg_Impl::SetCopyTable(BOOL bFla)
 {
     return pDlg->SetCopyTable( bFla );
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index f1ec2a5..dc583a6 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -263,6 +263,8 @@ class AbstractScMoveTableDlg_Impl : public AbstractScMoveTableDlg  //add for ScM
     virtual USHORT	GetSelectedDocument		() const;
     virtual USHORT	GetSelectedTable		() const;
     virtual BOOL	GetCopyTable			() const;
+    virtual BOOL	GetRenameTable			() const;
+    virtual void    GetTabNameString( String& rString ) const;
     virtual void	SetCopyTable			(BOOL bFlag=TRUE);
     virtual void	EnableCopyTable			(BOOL bFlag=TRUE);
 };
diff --git a/sc/source/ui/inc/mvtabdlg.hxx b/sc/source/ui/inc/mvtabdlg.hxx
index 1260737..543fa01 100644
--- a/sc/source/ui/inc/mvtabdlg.hxx
+++ b/sc/source/ui/inc/mvtabdlg.hxx
@@ -35,6 +35,7 @@
 #include <vcl/imagebtn.hxx>
 #include <vcl/lstbox.hxx>
 #include <vcl/fixed.hxx>
+#include <vcl/edit.hxx>
 
 #include <layout/layout.hxx>
 #include <layout/layout-pre.hxx>
@@ -50,8 +51,12 @@ public:
     USHORT	GetSelectedDocument		() const;
     SCTAB	GetSelectedTable		() const;
     BOOL	GetCopyTable			() const;
+    BOOL	GetRenameTable			() const;
+    void    GetTabNameString( String& rString ) const;
     void	SetCopyTable			(BOOL bFlag=TRUE);
     void	EnableCopyTable			(BOOL bFlag=TRUE);
+    void	SetRenameTable			(BOOL bFlag=TRUE);
+    void	SetTabNameVisible		(BOOL bFlag=TRUE);
 
 private:
     FixedText		aFtDoc;
@@ -59,6 +64,9 @@ private:
     FixedText		aFtTable;
     ListBox			aLbTable;
     CheckBox		aBtnCopy;
+    CheckBox		aBtnRename;
+    FixedText		aFtTabName;
+    Edit     		aEdTabName;
     OKButton		aBtnOk;
     CancelButton	aBtnCancel;
     HelpButton		aBtnHelp;
@@ -66,11 +74,13 @@ private:
     USHORT			nDocument;
     SCTAB			nTable;
     BOOL			bCopyTable;
+    BOOL			bRenameTable;
     //--------------------------------------
     void	Init			();
     void	InitDocListBox	();
     DECL_LINK( OkHdl, void * );
     DECL_LINK( SelHdl, ListBox * );
+    DECL_LINK( RenameHdl, void * );
 };
 
 #include <layout/layout-post.hxx>
diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
index 0cacc54..e8ed808 100644
--- a/sc/source/ui/inc/viewfunc.hxx
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -272,7 +272,7 @@ public:
     BOOL			DeleteTables(const SvShorts &TheTabs, BOOL bRecord = TRUE );
 
     BOOL			RenameTable( const String& rName, SCTAB nTabNr );
-    void			MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy );
+    void			MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy, const String& rName );
     void			ImportTables( ScDocShell* pSrcShell,
                                     SCTAB nCount, const SCTAB* pSrcTabs,
                                     BOOL bLink,SCTAB nTab);
diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index 8664da5..5cb79d9 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -65,13 +65,17 @@ ScMoveTableDlg::ScMoveTableDlg( Window* pParent )
         aFtTable    ( this, ScResId( FT_INSERT ) ),
         aLbTable    ( this, ScResId( LB_INSERT ) ),
         aBtnCopy    ( this, ScResId( BTN_COPY ) ),
+        aBtnRename  ( this, ScResId( BTN_RENAME ) ),
+        aFtTabName  ( this, ScResId( FT_LABEL ) ),
+        aEdTabName	( this, ScResId( ED_INPUT ) ),
         aBtnOk      ( this, ScResId( BTN_OK ) ),
         aBtnCancel  ( this, ScResId( BTN_CANCEL ) ),
         aBtnHelp    ( this, ScResId( BTN_HELP ) ),
         //
         nDocument   ( 0 ),
         nTable      ( 0 ),
-        bCopyTable  ( FALSE )
+        bCopyTable  ( FALSE ),
+        bRenameTable( FALSE )
 {
 #if ENABLE_LAYOUT
 #undef ScResId
@@ -95,6 +99,13 @@ SCTAB ScMoveTableDlg::GetSelectedTable    () const { return nTable;     }
 
 BOOL   ScMoveTableDlg::GetCopyTable        () const { return bCopyTable; }
 
+BOOL   ScMoveTableDlg::GetRenameTable        () const { return bRenameTable; }
+
+void ScMoveTableDlg::GetTabNameString( String& rString ) const
+{

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list