summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authoryogesh.bharate001 <yogesh.bharate@synerzip.com>2015-05-04 17:49:12 +0530
committerCaolán McNamara <caolanm@redhat.com>2015-05-07 15:59:49 +0000
commit3ffed8635acd55a5989bf9a0f4bc9c20b0acd945 (patch)
tree858115689fbb4458c184ae5d5dd5d6d10b8e2a98 /sc
parentd0dd41319ff153cc71ac65f7cc6a0abb0e3ca300 (diff)
tdf#91066: Condensed Character Spacing i.e spc(negative value) is not exported after RT.
Problem Description: - Condensed character spacing i.e Spacing between characters/letters (negative value) is not preserved after roundtrip. XML Difference: XML Difference : Original: <a:rPr lang="en-IN" sz="6000" b="1" kern="0" spc="-1000" baseline="0"> After Roundtrip: <a:rPr b="1" lang="en-IN" sz="6000" strike="noStrike"> spc="-1000" is missing in roundtripped file. Change-Id: I02edbb31375c2406a6e39873b7b886f4786a3758 Solution: Added support for Condensed Character Spacing. Reviewed-on: https://gerrit.libreoffice.org/15635 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/data/xlsx/textbox-CondensedCharacterSpace.xlsxbin0 -> 9577 bytes
-rw-r--r--sc/qa/unit/subsequent_export-test.cxx21
2 files changed, 21 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xlsx/textbox-CondensedCharacterSpace.xlsx b/sc/qa/unit/data/xlsx/textbox-CondensedCharacterSpace.xlsx
new file mode 100644
index 000000000000..fb46fefd4312
--- /dev/null
+++ b/sc/qa/unit/data/xlsx/textbox-CondensedCharacterSpace.xlsx
Binary files differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 5271095b2f3f..4924adcb78a6 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -140,6 +140,7 @@ public:
void testSheetTextBoxHyperlink();
void testFontSize();
void testSheetCharacterKerningSpace();
+ void testSheetCondensedCharacterSpace();
CPPUNIT_TEST_SUITE(ScExportTest);
CPPUNIT_TEST(test);
@@ -190,6 +191,7 @@ public:
CPPUNIT_TEST(testSheetTextBoxHyperlink);
CPPUNIT_TEST(testFontSize);
CPPUNIT_TEST(testSheetCharacterKerningSpace);
+ CPPUNIT_TEST(testSheetCondensedCharacterSpace);
CPPUNIT_TEST_SUITE_END();
@@ -2573,6 +2575,25 @@ void ScExportTest::testSheetCharacterKerningSpace()
xDocSh->DoClose();
}
+void ScExportTest::testSheetCondensedCharacterSpace()
+{
+ ScDocShellRef xShell = loadDoc("textbox-CondensedCharacterSpace.", XLSX);
+ CPPUNIT_ASSERT(xShell.Is());
+
+ ScDocShellRef xDocSh = saveAndReload(&(*xShell), XLSX);
+ CPPUNIT_ASSERT(xDocSh.Is());
+
+ xmlDocPtr pDoc = XPathHelper::parseExport(&(*xDocSh), m_xSFactory, "xl/drawings/drawing1.xml", XLSX);
+ CPPUNIT_ASSERT(pDoc);
+
+ OUString CondensedCharSpace = getXPath(pDoc,
+ "/xdr:wsDr[1]/xdr:twoCellAnchor[1]/xdr:sp[1]/xdr:txBody[1]/a:p[1]/a:r[1]/a:rPr[1]","spc");
+
+ // make sure that the CondensedCharSpace is -996.
+ CPPUNIT_ASSERT_EQUAL(OUString("-996"), CondensedCharSpace);
+
+ xDocSh->DoClose();
+}
CPPUNIT_TEST_SUITE_REGISTRATION(ScExportTest);