summaryrefslogtreecommitdiff
path: root/sw/qa/extras/indexing
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2021-06-15 14:12:26 +0900
committerTomaž Vajngerl <quikee@gmail.com>2021-06-19 11:13:32 +0200
commit37cd5bd4fdf2317709882c933844c4cc67e4cee4 (patch)
tree089df4e6eef57bb60dc7e91f1035e43fe36e11ee /sw/qa/extras/indexing
parentf81115740bac985cad3cd15348f75c2c78b8843a (diff)
indexing: indexing OLE objects for the IndexingExport
Adds handling of OLE objects to the IndexingExport with exporting the alt text and the name to the indexing xml. Change-Id: Ie357f55195cda864ee12d6b120babd106eff6179 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117358 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sw/qa/extras/indexing')
-rw-r--r--sw/qa/extras/indexing/IndexingExportTest.cxx20
-rw-r--r--sw/qa/extras/indexing/data/IndexingExport_OLE.odtbin0 -> 14358 bytes
2 files changed, 20 insertions, 0 deletions
diff --git a/sw/qa/extras/indexing/IndexingExportTest.cxx b/sw/qa/extras/indexing/IndexingExportTest.cxx
index f76850c1a803..807f84ab6934 100644
--- a/sw/qa/extras/indexing/IndexingExportTest.cxx
+++ b/sw/qa/extras/indexing/IndexingExportTest.cxx
@@ -28,10 +28,12 @@ private:
public:
void testIndexingExport_Paragraphs();
void testIndexingExport_Images();
+ void testIndexingExport_OLE();
CPPUNIT_TEST_SUITE(IndexingExportTest);
CPPUNIT_TEST(testIndexingExport_Paragraphs);
CPPUNIT_TEST(testIndexingExport_Images);
+ CPPUNIT_TEST(testIndexingExport_OLE);
CPPUNIT_TEST_SUITE_END();
};
@@ -100,6 +102,24 @@ void IndexingExportTest::testIndexingExport_Images()
assertXPath(pXmlDoc, "/indexing/graphic[2]", "name", "Image_InCaption");
}
+void IndexingExportTest::testIndexingExport_OLE()
+{
+ SwDoc* pDoc = createDoc("IndexingExport_OLE.odt");
+ CPPUNIT_ASSERT(pDoc);
+
+ SvMemoryStream aMemoryStream;
+ sw::IndexingExport aIndexingExport(aMemoryStream, pDoc);
+ aIndexingExport.runExport();
+ aMemoryStream.Seek(0);
+
+ xmlDocUniquePtr pXmlDoc = parseXmlStream(&aMemoryStream);
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ assertXPath(pXmlDoc, "/indexing");
+ assertXPath(pXmlDoc, "/indexing/ole[1]", "name", "Object - Chart");
+ assertXPath(pXmlDoc, "/indexing/ole[1]", "alt", "Alt Text");
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(IndexingExportTest);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/qa/extras/indexing/data/IndexingExport_OLE.odt b/sw/qa/extras/indexing/data/IndexingExport_OLE.odt
new file mode 100644
index 000000000000..3da225368bd4
--- /dev/null
+++ b/sw/qa/extras/indexing/data/IndexingExport_OLE.odt
Binary files differ