summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorabdulmajeed ahmed <aalabdulrazzaq@kacst.edu.sa>2013-06-15 12:43:29 +0200
committerabdulmajeed ahmed <aalabdulrazzaq@kacst.edu.sa>2013-06-15 12:53:07 +0200
commit36de708ce421b31beaaddb1048d444de91b2e5e9 (patch)
tree3ec60b54f937fdc7849c2892a1ae7b144bdec23b /sw
parent0c0a9c3abbda78e116b6b4920dbdefb06f278261 (diff)
fix fdo#63053 ampersand in document title causes corrupt docx
FILESAVE, FILEOPEN: ampersand in document title causes corrupt docx when saving; truncates title when loading
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo63053.docxbin0 -> 5044 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx11
2 files changed, 10 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/fdo63053.docx b/sw/qa/extras/ooxmlexport/data/fdo63053.docx
new file mode 100644
index 000000000000..43282b0df717
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo63053.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 494076c0cb50..b832322db64e 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -75,7 +75,7 @@ public:
void testPageGraphicBackground();
void testFdo65265();
void testFdo65655();
-
+ void testFDO63053();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
CPPUNIT_TEST(run);
@@ -127,6 +127,8 @@ void Test::run()
{"page-graphic-background.odt", &Test::testPageGraphicBackground},
{"fdo65265.docx", &Test::testFdo65265},
{"fdo65655.docx", &Test::testFdo65655},
+ {"fdo63053.docx" , &Test::testFDO63053},
+
};
// Don't test the first import of these, for some reason those tests fail
const char* aBlacklist[] = {
@@ -725,6 +727,13 @@ void Test::testFdo65655()
CPPUNIT_ASSERT_EQUAL(false, bool(bValue));
xPropertySet->getPropertyValue("FooterIsShared") >>= bValue;
CPPUNIT_ASSERT_EQUAL(false, bool(bValue));
+
+void Test::testFDO63053()
+{
+ uno::Reference<document::XDocumentPropertiesSupplier> xDocumentPropertiesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<document::XDocumentProperties> xDocumentProperties = xDocumentPropertiesSupplier->getDocumentProperties();
+ CPPUNIT_ASSERT_EQUAL(OUString("test1&test2"), xDocumentProperties->getTitle());
+ CPPUNIT_ASSERT_EQUAL(OUString("test1&test2"), xDocumentProperties->getSubject());
}
CPPUNIT_TEST_SUITE_REGISTRATION(Test);