Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi there,

it seems, though the filter is there, we don't read .svg files from
the Pictures stream inside the odf zip container. Easy fix attached,
could someone please review & commit to -3-4?

Cheers,

-- Thorsten
From abc156890a8cb64094f5d668274559203ae188b5 Mon Sep 17 00:00:00 2001
From: Thorsten Behrens <tbehrens@novell.com>
Date: Fri, 21 Oct 2011 11:14:32 +0200
Subject: [PATCH] Fix fdo#41995 fallout - recognize .svg in odf container

Seems the graphic load code is stupid and not using the path name /
file extension to guess file type, but only "magic byte" detection.
Giving filter framework the path now, so that .svg actually loads.
---
 svx/source/svdraw/svdograf.cxx |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index e51a268..56d0643 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -1299,8 +1299,11 @@ IMPL_LINK( SdrGrafObj, ImpSwapHdl, GraphicObject*, pO )
                         mbIsPreview = sal_True;
                     }
 
-                    if( !GraphicFilter::GetGraphicFilter()->ImportGraphic( aGraphic, String(), 
*pStream,
-                                                        GRFILTER_FORMAT_DONTKNOW, NULL, 0, 
pFilterData ) )
+                    if( !GraphicFilter::GetGraphicFilter()->ImportGraphic( aGraphic,
+                                                                           aStreamInfo.maUserData,
+                                                                           *pStream,
+                                                                           
GRFILTER_FORMAT_DONTKNOW,
+                                                                           NULL, 0, pFilterData ) )
                     {
                         const String aUserData( pGraphic->GetUserData() );
 
-- 
1.7.1

Attachment: pgpb7Nyre8Sjw.pgp
Description: PGP signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.