[Libreoffice-commits] .: 2 commits - sc/qa
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Oct 31 17:40:03 PDT 2012
sc/qa/unit/helper/csv_handler.hxx | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
New commits:
commit a05cfc077aebd71c8e882ec2c83cd7bd2b818401
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Wed Oct 31 20:37:03 2012 -0400
fdo#56627: Handle empty cell values separately in filters test.
Perhaps this will make valgrind happy?
Change-Id: I11f965d13f8d71b2ab9f9624367fd70713644f10
diff --git a/sc/qa/unit/helper/csv_handler.hxx b/sc/qa/unit/helper/csv_handler.hxx
index 8b4e545..4d16576 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;
commit 117e87ffda86623825b0a6715ed754e721c09200
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Wed Oct 31 20:07:07 2012 -0400
Use 'e' prefix for enum values.
Change-Id: Iae3eceb38a6f9bc53805445799534ec8ee44a9a9
diff --git a/sc/qa/unit/helper/csv_handler.hxx b/sc/qa/unit/helper/csv_handler.hxx
index dbb68cd..8b4e545 100644
--- a/sc/qa/unit/helper/csv_handler.hxx
+++ b/sc/qa/unit/helper/csv_handler.hxx
@@ -93,14 +93,12 @@ enum StringType { PureString, FormulaValue, StringValue };
class csv_handler
{
public:
-
-
- csv_handler(ScDocument* pDoc, SCTAB nTab, StringType aType = StringValue):
+ csv_handler(ScDocument* pDoc, SCTAB nTab, StringType eType = StringValue):
mpDoc(pDoc),
mnCol(0),
mnRow(0),
mnTab(nTab),
- maStringType(aType) {}
+ meStringType(eType) {}
void begin_parse() {}
@@ -119,7 +117,7 @@ public:
#if DEBUG_CSV_HANDLER
std::cout << "Col: " << mnCol << " Row: " << mnRow << std::endl;
#endif //DEBUG_CSV_HANDLER
- if (maStringType == PureString)
+ if (meStringType == PureString)
{
rtl::OUString aCSVString(p, n, RTL_TEXTENCODING_UTF8);
rtl::OUString aString;
@@ -141,7 +139,7 @@ public:
if (*pRemainingChars)
{
rtl::OUString aString;
- switch (maStringType)
+ switch (meStringType)
{
case StringValue:
mpDoc->GetString(mnCol, mnRow, mnTab, aString);
@@ -174,7 +172,6 @@ public:
}
}
++mnCol;
-
}
private:
@@ -182,7 +179,7 @@ private:
SCCOL mnCol;
SCROW mnRow;
SCTAB mnTab;
- StringType maStringType;
+ StringType meStringType;
};
More information about the Libreoffice-commits
mailing list