sc/qa/unit/ucalc.cxx | 9 +++++++++
1 file changed, 9 insertions(+)
New commits:
commit ebc60c3297ae464898f6135e4cc5a652fb53b935
Author: Kohei Yoshida <[email protected]>
Date: Mon Jul 9 10:12:53 2012 -0400
Unit test for string input with custom string handling policy.
Change-Id: I51e8fbe83e94ba66a0e2ef63aacf080ba0e50a9c
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 93e5b80..b816f5c 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -362,6 +362,15 @@ void Test::testInput()
bTest = test == "'apple'";
CPPUNIT_ASSERT_MESSAGE("Text content should have retained the first
apostrophe.", bTest);
+ // Customized string handling policy.
+ ScSetStringParam aParam;
+ aParam.mbDetectNumberFormat = false;
+ aParam.mbSetTextCellFormat = true;
+ aParam.mbHandleApostrophe = false;
+ m_pDoc->SetString(0, 0, 0, "000123", &aParam);
+ m_pDoc->GetString(0, 0, 0, test);
+ CPPUNIT_ASSERT_MESSAGE("Text content should have been treated as string,
not number.", test == "000123");
+
m_pDoc->DeleteTab(0);
}
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits