summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-10-31 20:37:03 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-10-31 20:39:12 -0400
commita05cfc077aebd71c8e882ec2c83cd7bd2b818401 (patch)
tree56fb840a22d95b60c68a9c1ee9aca586d2946ce9
parent117e87ffda86623825b0a6715ed754e721c09200 (diff)
fdo#56627: Handle empty cell values separately in filters test.
Perhaps this will make valgrind happy? Change-Id: I11f965d13f8d71b2ab9f9624367fd70713644f10
-rw-r--r--sc/qa/unit/helper/csv_handler.hxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/sc/qa/unit/helper/csv_handler.hxx b/sc/qa/unit/helper/csv_handler.hxx
index 8b4e54570c3f..4d16576babfa 100644
--- a/sc/qa/unit/helper/csv_handler.hxx
+++ b/sc/qa/unit/helper/csv_handler.hxx
@@ -117,7 +117,16 @@ public:
#if DEBUG_CSV_HANDLER
std::cout << "Col: " << mnCol << " Row: " << mnRow << std::endl;
#endif //DEBUG_CSV_HANDLER
- if (meStringType == PureString)
+ if (n == 0)
+ {
+ // Empty cell.
+ if (!mpDoc->GetString(mnCol, mnRow, mnTab).isEmpty())
+ {
+ // cell in the document is not empty.
+ CPPUNIT_ASSERT_MESSAGE(createErrorMessage(mnCol, mnRow, mnTab).getStr(), false);
+ }
+ }
+ else if (meStringType == PureString)
{
rtl::OUString aCSVString(p, n, RTL_TEXTENCODING_UTF8);
rtl::OUString aString;