diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-08-13 14:20:13 -0400 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2012-08-14 12:49:59 +0200 |
commit | 22571981cdae59bce508dfd2af4c873aa216d885 (patch) | |
tree | fa1f81241f90363e634c0a646bda548cb703cdd1 /sc/qa | |
parent | b5edfe152737650772504dc6464dbbb2f607f453 (diff) |
fdo#53089: Avoid setting valid numbers as text during html import.
(cherry picked from commit 51f1fc69aa539dec8035195b98e0b128026388e9)
Conflicts:
sc/qa/unit/ucalc.cxx
Change-Id: I5fa9a54f70e8e4d8aac42687f2a204b2925d4619
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 8d9febe34f22..cab47a690fc6 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -360,6 +360,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.meSetTextNumFormat = ScSetStringParam::Always; + 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); } |