diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-03-17 21:58:29 +0000 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-03-20 18:24:17 +0100 |
commit | c38b5d7ceaf4c19812e63f6a81ed19ed30ac2f94 (patch) | |
tree | e03df3c358c6fc447f2bf5034b945e6df4e977a7 /sc/source/ui/docshell | |
parent | 2eabd56ff5f65733c6fa1bcef14d4a39c21dddc7 (diff) |
add a sc-html fuzzer
Change-Id: I0d74859e276bfa98d8abf7b2e66600f849971468
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164956
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sc/source/ui/docshell')
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 857313f587b9..c3dd185a0ac9 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -3488,6 +3488,22 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportSLK(SvStream &rStream) return aImpEx.ImportStream(rStream, OUString(), SotClipboardFormatId::SYLK); } +extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportCalcHTML(SvStream &rStream) +{ + ScDLL::Init(); + ScDocument aDocument; + ScDocOptions aDocOpt = aDocument.GetDocOptions(); + aDocOpt.SetLookUpColRowNames(false); + aDocument.SetDocOptions(aDocOpt); + aDocument.MakeTable(0); + aDocument.EnableExecuteLink(false); + aDocument.SetInsertingFromOtherDoc(true); + aDocument.SetImportingXML(true); + + ScImportExport aImpEx(aDocument); + return aImpEx.ImportStream(rStream, OUString(), SotClipboardFormatId::HTML); +} + extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportDBF(SvStream &rStream) { ScDLL::Init(); |