sc/source/core/data/dociter.cxx |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

New commits:
commit ab847de1734efe38e78bbd2b45ec24827a188ef1
Author: Damjan Jovanovic <[email protected]>
Date:   Wed Sep 9 20:35:12 2015 +0000

    #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.

diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 3f39389..3120e04 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -626,7 +626,17 @@ bool 
ScDBQueryDataIterator::DataAccessInternal::getCurrent(Value& rValue)
                                 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:
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to