diff --git a/components/fpspreadsheet/fpsfunc.pas b/components/fpspreadsheet/fpsfunc.pas index 5ab870ce3..28861f29b 100644 --- a/components/fpspreadsheet/fpsfunc.pas +++ b/components/fpspreadsheet/fpsfunc.pas @@ -574,7 +574,7 @@ begin n := ArgToInt(Args[1]) else n := 1; - if Args[0].ResultType in [rtDateTime, rtFloat, rtInteger] then + if Args[0].ResultType in [rtCell, rtDateTime, rtFloat, rtInteger] then dt := ArgToDateTime(Args[0]) else if Args[0].ResultType in [rtString] then diff --git a/components/fpspreadsheet/tests/formulatests.pas b/components/fpspreadsheet/tests/formulatests.pas index bb4e03ddb..39ad87d5d 100644 --- a/components/fpspreadsheet/tests/formulatests.pas +++ b/components/fpspreadsheet/tests/formulatests.pas @@ -33,20 +33,12 @@ type // Test reconstruction of formula strings procedure Test_Write_Read_FormulaStrings(AFormat: TsSpreadsheetFormat; UseRPNFormula: Boolean); - { - // Test reconstruction of shared formula strings - procedure Test_Write_Read_SharedFormulaStrings(AFormat: TsSpreadsheetFormat); - // Test calculation of formulas - } procedure Test_Write_Read_CalcFormulas(AFormat: TsSpreadsheetformat; UseRPNFormula: Boolean); - { - // Test calculation of shared formulas - procedure Test_Write_Read_CalcSharedFormulas(AFormat: TsSpreadsheetformat); - } published // Writes out formulas & reads them back. + { BIFF2 Tests } procedure Test_Write_Read_FormulaStrings_BIFF2; { BIFF5 Tests } @@ -58,19 +50,6 @@ type { ODS Tests } procedure Test_Write_Read_FormulaStrings_ODS; - (* - // Writes out shared formulas & reads them back. - { BIFF2 Tests } - procedure Test_Write_Read_SharedFormulaStrings_BIFF2; - { BIFF2 Tests } - procedure Test_Write_Read_SharedFormulaStrings_BIFF5; - { BIFF8 Tests } - procedure Test_Write_Read_SharedFormulaStrings_BIFF8; - { OOXML Tests } - procedure Test_Write_Read_SharedFormulaStrings_OOXML; - { ODS Tests } - procedure Test_Write_Read_SharedFormulaStrings_ODS; *) - // Writes out and calculates rpn formulas, read back { BIFF2 Tests } procedure Test_Write_Read_CalcRPNFormula_BIFF2; @@ -94,18 +73,6 @@ type procedure Test_Write_Read_CalcStringFormula_OOXML; { ODS Tests } procedure Test_Write_Read_CalcStringFormula_ODS; - (* - // Writes out and calculates shared formulas, read back - { BIFF2 Tests } - procedure Test_Write_Read_CalcSharedFormula_BIFF2; - { BIFF5 Tests } - procedure Test_Write_Read_CalcSharedFormula_BIFF5; - { BIFF8 Tests } - procedure Test_Write_Read_CalcSharedFormula_BIFF8; - { OOXML Tests } - procedure Test_Write_Read_CalcSharedFormula_OOXML; - { ODS Tests } - procedure Test_Write_Read_CalcSharedFormula_ODS; *) end;