summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMark Hung <marklh9@gmail.com>2018-01-15 21:34:50 +0800
committerMark Hung <marklh9@gmail.com>2018-01-17 09:47:57 +0100
commita4895d64298e40e7c00a5b6f7a7455519f408ec1 (patch)
tree83c9afeade0c98999396c479d9cb20f3f2cbdf6b /sw
parent23885b06b185142d6ef4a3ceccfd3b5ad915a65f (diff)
Fix testTdf113481 in case detected script is not as expected.
Change-Id: Iefc85ab40831e4e2576ce1b3ac513858cf18185b Reviewed-on: https://gerrit.libreoffice.org/47898 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index e76a50ab8cc3..43b492763f04 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -5741,10 +5741,13 @@ void SwUiWriterTest::testTdf113481()
pWrtShell->Down(false);
pWrtShell->EndPara();
// Before: U+4E2D U+2205 U+FE00. After: U+4E2D U+2205
- pWrtShell->DelLeft();
- const uno::Reference< text::XTextRange > xPara2 = getParagraph(2);
- CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xPara2->getString().getLength());
- CPPUNIT_ASSERT_EQUAL(u'\x2205', xPara2->getString()[1]);
+ if ( pWrtShell->GetScriptType() == SvtScriptType::ASIAN )
+ {
+ pWrtShell->DelLeft();
+ const uno::Reference< text::XTextRange > xPara2 = getParagraph(2);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xPara2->getString().getLength());
+ CPPUNIT_ASSERT_EQUAL(u'\x2205', xPara2->getString()[1]);
+ }
// Characters of other scripts, remove one character.
pWrtShell->Down(false);