You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by da...@apache.org on 2015/09/09 22:35:12 UTC

svn commit: r1702107 - in /openoffice/trunk: main/sc/source/core/data/dociter.cxx test/testuno/data/uno/sc/fvt/DGET on formulas.ods test/testuno/source/fvt/uno/sc/formula/TestFormulaDocs.java

Author: damjan
Date: Wed Sep  9 20:35:12 2015
New Revision: 1702107

URL: http://svn.apache.org/r1702107
Log:
#i123901# formula DGET() gives #VALUE! error when fetching calculation resulting in string
Gets ScDBQueryDataIterator::DataAccessInternal::getCurrent() to handle formulas returning strings.
Added a spreadsheet test for this behaviour.


Added:
    openoffice/trunk/test/testuno/data/uno/sc/fvt/DGET on formulas.ods   (with props)
Modified:
    openoffice/trunk/main/sc/source/core/data/dociter.cxx
    openoffice/trunk/test/testuno/source/fvt/uno/sc/formula/TestFormulaDocs.java

Modified: openoffice/trunk/main/sc/source/core/data/dociter.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sc/source/core/data/dociter.cxx?rev=1702107&r1=1702106&r2=1702107&view=diff
==============================================================================
--- openoffice/trunk/main/sc/source/core/data/dociter.cxx (original)
+++ openoffice/trunk/main/sc/source/core/data/dociter.cxx Wed Sep  9 20:35:12 2015
@@ -626,7 +626,17 @@ bool ScDBQueryDataIterator::DataAccessIn
 								return sal_True;	// gefunden
 							}
 							else
-								nRow++;
+							{
+							    if (mpParam->mbSkipString)
+							        ++nRow;
+							    else
+							    {
+                                    rValue.maString = ((ScFormulaCell*)pCell)->GetStringData();
+                                    rValue.mbIsNumber = false;
+                                    rValue.mnError = ((ScFormulaCell*)pCell)->GetErrCode();
+                                    return sal_True;
+							    }
+							}
 						}
 						break;
                     case CELLTYPE_STRING:

Added: openoffice/trunk/test/testuno/data/uno/sc/fvt/DGET on formulas.ods
URL: http://svn.apache.org/viewvc/openoffice/trunk/test/testuno/data/uno/sc/fvt/DGET%20on%20formulas.ods?rev=1702107&view=auto
==============================================================================
Binary file - no diff available.

Propchange: openoffice/trunk/test/testuno/data/uno/sc/fvt/DGET on formulas.ods
------------------------------------------------------------------------------
    svn:mime-type = application/vnd.oasis.opendocument.spreadsheet

Modified: openoffice/trunk/test/testuno/source/fvt/uno/sc/formula/TestFormulaDocs.java
URL: http://svn.apache.org/viewvc/openoffice/trunk/test/testuno/source/fvt/uno/sc/formula/TestFormulaDocs.java?rev=1702107&r1=1702106&r2=1702107&view=diff
==============================================================================
--- openoffice/trunk/test/testuno/source/fvt/uno/sc/formula/TestFormulaDocs.java (original)
+++ openoffice/trunk/test/testuno/source/fvt/uno/sc/formula/TestFormulaDocs.java Wed Sep  9 20:35:12 2015
@@ -80,6 +80,7 @@ public class TestFormulaDocs {
 		testOneDoc( "uno/sc/fvt/FormulaTest1.ods");
 		testOneDoc( "uno/sc/fvt/StarBasicYearMonthDateHourMinuteSecondTests.ods");
 		testOneDoc( "uno/sc/fvt/StarBasicCLng.ods");
+		testOneDoc( "uno/sc/fvt/DGET on formulas.ods");
 	}
 
 	public void testOneDoc( String filename) throws Exception {