kbrown / rpms / libreoffice

Forked from rpms/libreoffice 2 years ago
Clone

Blame SOURCES/0038-EMF-force-canvas-if-EMF-comments-are-used.patch

f0633d
From 2f641a7d37fd7fb80286be5a37778c41ac834d93 Mon Sep 17 00:00:00 2001
f0633d
From: "Andrzej J.R. Hunt" <andrzej.hunt@collabora.com>
f0633d
Date: Thu, 5 Dec 2013 11:36:53 +0000
f0633d
Subject: [PATCH 038/109] EMF+: force canvas if EMF+ comments are used.
f0633d
MIME-Version: 1.0
f0633d
Content-Type: text/plain; charset=UTF-8
f0633d
Content-Transfer-Encoding: 8bit
f0633d
f0633d
Without this the drawinglayer renderer is used, whereas
f0633d
only the canvas renderer supports EMF+.
f0633d
f0633d
Change-Id: Id8a10e400e08c1913e7d6864a51f7b73fc9be437
f0633d
(cherry picked from commit be7d87bea2611eb316b9b379aebc031179d4f794)
f0633d
Reviewed-on: https://gerrit.libreoffice.org/6940
f0633d
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
f0633d
Tested-by: Caolán McNamara <caolanm@redhat.com>
f0633d
---
f0633d
 vcl/source/gdi/gdimtf.cxx | 7 +++++++
f0633d
 1 file changed, 7 insertions(+)
f0633d
f0633d
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
f0633d
index f5666a6..1240500 100644
f0633d
--- a/vcl/source/gdi/gdimtf.cxx
f0633d
+++ b/vcl/source/gdi/gdimtf.cxx
f0633d
@@ -2765,6 +2765,13 @@ SvStream& operator>>( SvStream& rIStm, GDIMetaFile& rGDIMetaFile )
f0633d
             {
f0633d
                 pAction = MetaAction::ReadMetaAction( rIStm, &aReadData );
f0633d
 
f0633d
+                if (pAction->GetType() == META_COMMENT_ACTION)
f0633d
+                {
f0633d
+                    MetaCommentAction* pCommentAct = static_cast<MetaCommentAction*>(pAction);
f0633d
+                    if ( pCommentAct->GetComment() == "EMF_PLUS" )
f0633d
+                        rGDIMetaFile.UseCanvas( sal_True );
f0633d
+                }
f0633d
+
f0633d
                 if( pAction )
f0633d
                     rGDIMetaFile.AddAction( pAction );
f0633d
             }
f0633d
-- 
f0633d
1.8.4.2
f0633d