Blame SOURCES/0393-lok-fix-saveAs-for-a-loaded-HTML-document.patch

135360
From ed0cf5fe7f448b471a6627b045e2ea3df464e83f Mon Sep 17 00:00:00 2001
135360
From: =?UTF-8?q?Toma=C5=BE=20Vajngerl?= <tomaz.vajngerl@collabora.com>
135360
Date: Thu, 4 Feb 2016 14:44:36 +0100
135360
Subject: [PATCH 393/398] lok: fix saveAs for a loaded HTML document
135360
135360
a HTML document is reported as "com.sun.star.text.WebDocument"
135360
which is a unsupported document type in LOK so report it as a
135360
LOK_DOCTYPE_TEXT instead.
135360
135360
Change-Id: Iaa77cb8b1f55cf31ebbb4fd4d69c02702e60e251
135360
(cherry picked from commit 806d34981f480908645038f4cfc29ebcf25ca145)
135360
Reviewed-on: https://gerrit.libreoffice.org/22119
135360
Tested-by: Jenkins <ci@libreoffice.org>
135360
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
135360
(cherry picked from commit 1deed8dae78be05cafde17768d111035c111b567)
135360
---
135360
 desktop/source/lib/init.cxx | 3 ++-
135360
 1 file changed, 2 insertions(+), 1 deletion(-)
135360
135360
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
135360
index fe297fb09414..9e5c52917eb7 100644
135360
--- a/desktop/source/lib/init.cxx
135360
+++ b/desktop/source/lib/init.cxx
135360
@@ -621,6 +621,7 @@ static int doc_saveAs(LibreOfficeKitDocument* pThis, const char* sUrl, const cha
135360
             break;
135360
         case LOK_DOCTYPE_OTHER:
135360
         default:
135360
+            SAL_INFO("lok", "Can't save document - unsopported document type.");
135360
             return false;
135360
         }
135360
 
135360
@@ -756,7 +757,7 @@ static int doc_getDocumentType (LibreOfficeKitDocument* pThis)
135360
         {
135360
             return LOK_DOCTYPE_DRAWING;
135360
         }
135360
-        else if (xDocument->supportsService("com.sun.star.text.TextDocument"))
135360
+        else if (xDocument->supportsService("com.sun.star.text.TextDocument") || xDocument->supportsService("com.sun.star.text.WebDocument"))
135360
         {
135360
             return LOK_DOCTYPE_TEXT;
135360
         }
135360
-- 
135360
2.12.0
135360