summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMihai Varga <mihai.varga@collabora.com>2015-02-25 10:20:56 +0200
committerCaolán McNamara <caolanm@redhat.com>2015-02-26 16:50:06 +0000
commit5e71cbe3f9a8c70e5c36570ff530c3fe30e825e1 (patch)
tree43615c107ef9842e9392d4c66fb86e427086b165 /include
parentcbab46342e75a0bd8987620757bf67c4f68f8edd (diff)
SkipImages option for PDF import
This option allows images and drawings to be skipped while importing a PDF, the main reason was performance improvement where images were not needed. And I've also added unit tests for it. Change-Id: I6595d3ff22d5389eab4fe8450460d083f626d216 Reviewed-on: https://gerrit.libreoffice.org/14628 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.h3
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.hxx11
2 files changed, 12 insertions, 2 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index d7b8e41909a0..fbf4001e8dab 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -64,6 +64,9 @@ struct _LibreOfficeKitClass
void (*destroy) (LibreOfficeKit *pThis);
LibreOfficeKitDocument* (*documentLoad) (LibreOfficeKit *pThis, const char *pURL);
char* (*getError) (LibreOfficeKit *pThis);
+ LibreOfficeKitDocument* (*documentLoadWithOptions) (LibreOfficeKit* pThis,
+ const char* pURL,
+ const char* pOptions);
};
#define LIBREOFFICEKIT_DOCUMENT_HAS(pDoc,member) LIBREOFFICEKIT_HAS_MEMBER(LibreOfficeKitDocumentClass,member,(pDoc)->pClass->nSize)
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx
index f1255f4a59eb..d58e0714c985 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -105,11 +105,18 @@ public:
mpThis->pClass->destroy(mpThis);
}
- inline Document* documentLoad(const char* pUrl)
+ inline Document* documentLoad(const char* pUrl, const char* pFilterOptions = NULL)
{
- LibreOfficeKitDocument* pDoc = mpThis->pClass->documentLoad(mpThis, pUrl);
+ LibreOfficeKitDocument* pDoc = NULL;
+
+ if (LIBREOFFICEKIT_HAS(mpThis, documentLoadWithOptions))
+ pDoc = mpThis->pClass->documentLoadWithOptions(mpThis, pUrl, pFilterOptions);
+ else
+ pDoc = mpThis->pClass->documentLoad(mpThis, pUrl);
+
if (pDoc == NULL)
return NULL;
+
return new Document(pDoc);
}