summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.com>2016-02-04 14:44:36 +0100
committerTomaž Vajngerl <tomaz.vajngerl@collabora.com>2016-02-04 15:15:07 +0100
commit806d34981f480908645038f4cfc29ebcf25ca145 (patch)
tree0903abe2038bfcc20719a1bafa7f96126858e862 /desktop
parent9f84b757a2e6678a30a797e85d8236612b952646 (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
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 203279cf693f..7c4d8cf303ff 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -622,6 +622,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;
}
@@ -765,7 +766,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;
}