Blob Blame History Raw
From 2f641a7d37fd7fb80286be5a37778c41ac834d93 Mon Sep 17 00:00:00 2001
From: "Andrzej J.R. Hunt" <andrzej.hunt@collabora.com>
Date: Thu, 5 Dec 2013 11:36:53 +0000
Subject: [PATCH 038/109] EMF+: force canvas if EMF+ comments are used.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Without this the drawinglayer renderer is used, whereas
only the canvas renderer supports EMF+.

Change-Id: Id8a10e400e08c1913e7d6864a51f7b73fc9be437
(cherry picked from commit be7d87bea2611eb316b9b379aebc031179d4f794)
Reviewed-on: https://gerrit.libreoffice.org/6940
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
---
 vcl/source/gdi/gdimtf.cxx | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index f5666a6..1240500 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -2765,6 +2765,13 @@ SvStream& operator>>( SvStream& rIStm, GDIMetaFile& rGDIMetaFile )
             {
                 pAction = MetaAction::ReadMetaAction( rIStm, &aReadData );
 
+                if (pAction->GetType() == META_COMMENT_ACTION)
+                {
+                    MetaCommentAction* pCommentAct = static_cast<MetaCommentAction*>(pAction);
+                    if ( pCommentAct->GetComment() == "EMF_PLUS" )
+                        rGDIMetaFile.UseCanvas( sal_True );
+                }
+
                 if( pAction )
                     rGDIMetaFile.AddAction( pAction );
             }
-- 
1.8.4.2