summaryrefslogtreecommitdiff
path: root/emfio/inc/emfreader.hxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2020-09-17 13:21:52 +0200
committerMiklos Vajna <vmiklos@collabora.com>2020-09-17 17:21:44 +0200
commitd75c5b38911557173c54a78f42ff220ab3918573 (patch)
treeee1d3b2a7c9a280f71a5a6bb65f4ea088555a467 /emfio/inc/emfreader.hxx
parent007e6063931bd87d6ce15deb65b9adc823f74ce0 (diff)
tdf#136836 emfio: speed up import of EMF import when the orig PDF is available
The PPTX bugdoc has a 17MB EMF file, which has enough instructions to keep Impress busy for minutes during import. Take advantage of the detail that this EMF has a EMR_COMMENT_MULTIFORMATS record that contains the original PDF, which can be rendered much faster: - old cost: 122.153 seconds - new cost: 1.952 seconds (1.6% of baseline) Change-Id: I38efc1c24e21a7622377b9e1c1938ebee826bae9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102918 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'emfio/inc/emfreader.hxx')
-rw-r--r--emfio/inc/emfreader.hxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/emfio/inc/emfreader.hxx b/emfio/inc/emfreader.hxx
index 90d8969ae70c..75a77211ea61 100644
--- a/emfio/inc/emfreader.hxx
+++ b/emfio/inc/emfreader.hxx
@@ -32,6 +32,8 @@ namespace emfio
bool mbRecordPath : 1;
bool mbEMFPlus : 1;
bool mbEMFPlusDualMode : 1;
+ /// An other format is read already, can ignore actual EMF data.
+ bool mbReadOtherGraphicFormat = false;
bool ReadHeader();
// reads and converts the rectangle
@@ -43,6 +45,8 @@ namespace emfio
bool ReadEnhWMF();
void ReadGDIComment(sal_uInt32 nCommentId);
+ /// Parses EMR_COMMENT_MULTIFORMATS.
+ void ReadMultiformatsComment();
private:
template <class T> void ReadAndDrawPolyPolygon(sal_uInt32 nNextPos);