diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2016-02-04 14:44:36 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-02-05 15:34:27 +0000 |
commit | 1deed8dae78be05cafde17768d111035c111b567 (patch) | |
tree | e2f959ffc2a49e3f3329386dce3f793c4a247636 /desktop | |
parent | 216738ffa610848eebfd6bbbad6bc74db96ef051 (diff) |
lok: fix saveAs for a loaded HTML document
a HTML document is reported as "com.sun.star.text.WebDocument"
which is a unsupported document type in LOK so report it as a
LOK_DOCTYPE_TEXT instead.
Change-Id: Iaa77cb8b1f55cf31ebbb4fd4d69c02702e60e251
(cherry picked from commit 806d34981f480908645038f4cfc29ebcf25ca145)
Reviewed-on: https://gerrit.libreoffice.org/22119
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index f7a40cb2abfe..b2d6e14d904d 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -623,6 +623,7 @@ static int doc_saveAs(LibreOfficeKitDocument* pThis, const char* sUrl, const cha break; case LOK_DOCTYPE_OTHER: default: + SAL_INFO("lok", "Can't save document - unsopported document type."); return false; } @@ -758,7 +759,7 @@ static int doc_getDocumentType (LibreOfficeKitDocument* pThis) { return LOK_DOCTYPE_DRAWING; } - else if (xDocument->supportsService("com.sun.star.text.TextDocument")) + else if (xDocument->supportsService("com.sun.star.text.TextDocument") || xDocument->supportsService("com.sun.star.text.WebDocument")) { return LOK_DOCTYPE_TEXT; } |