[libreoffice/f20] Related: rhbz#1117128 missing pictures in impress
Caolán McNamara
caolanm at fedoraproject.org
Wed Jul 23 10:38:12 UTC 2014
commit 0fb6c02d8308f6d699cfad4e19c5020dd8157c30
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jul 23 11:37:43 2014 +0100
Related: rhbz#1117128 missing pictures in impress
give this a go
...25289-do-apply-possible-changed-GraphicSt.patch | 77 ++++++++++++++++++++
libreoffice.spec | 6 ++-
2 files changed, 82 insertions(+), 1 deletions(-)
---
diff --git a/0001-Resolves-i125289-do-apply-possible-changed-GraphicSt.patch b/0001-Resolves-i125289-do-apply-possible-changed-GraphicSt.patch
new file mode 100644
index 0000000..4a14092
--- /dev/null
+++ b/0001-Resolves-i125289-do-apply-possible-changed-GraphicSt.patch
@@ -0,0 +1,77 @@
+From fd641c7b23ce4205c29fc0c564b73336cb2cfb07 Mon Sep 17 00:00:00 2001
+From: Oliver-Rainer Wittmann <orw at apache.org>
+Date: Wed, 23 Jul 2014 08:53:15 +0000
+Subject: [PATCH] Resolves: #i125289# do apply possible changed
+ <GraphicStreamURL>...
+
+only for embedded images which already have its stream inside the package
+
+fixes also issue 125290
+
+(cherry picked from commit 9602a121b458e7456fc533dad86f434f846a72ba)
+
+Conflicts:
+ xmloff/source/draw/shapeexport2.cxx
+
+Change-Id: I5af0093b20f2f291d3a94c690bfbdb59a59320c3
+---
+ xmloff/source/draw/shapeexport.cxx | 32 +++++++++++++++++++-------------
+ 1 file changed, 19 insertions(+), 13 deletions(-)
+
+diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
+index 7f33e58..ba8ce16 100644
+--- a/xmloff/source/draw/shapeexport.cxx
++++ b/xmloff/source/draw/shapeexport.cxx
+@@ -2256,9 +2256,12 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
+ OUString aResolveURL( sImageURL );
+ const OUString sPackageURL( "vnd.sun.star.Package:" );
+
+- // trying to preserve the filename
++ // trying to preserve the filename for embedded images which already have its stream inside the package
++ bool bIsEmbeddedImageWithExistingStreamInPackage = false;
+ if ( aStreamURL.match( sPackageURL, 0 ) )
+ {
++ bIsEmbeddedImageWithExistingStreamInPackage = true;
++
+ OUString sRequestedName( aStreamURL.copy( sPackageURL.getLength(), aStreamURL.getLength() - sPackageURL.getLength() ) );
+ sal_Int32 nLastIndex = sRequestedName.lastIndexOf( '/' ) + 1;
+ if ( ( nLastIndex > 0 ) && ( nLastIndex < sRequestedName.getLength() ) )
+@@ -2278,20 +2281,23 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
+
+ if( !aStr.isEmpty() )
+ {
+- aStreamURL = sPackageURL;
+- if( aStr[ 0 ] == '#' )
+- {
+- aStreamURL = aStreamURL.concat( aStr.copy( 1, aStr.getLength() - 1 ) );
+- }
+- else
++ // apply possible changed stream URL to embedded image object
++ if ( bIsEmbeddedImageWithExistingStreamInPackage )
+ {
+- aStreamURL = aStreamURL.concat( aStr );
+- }
++ aStreamURL = sPackageURL;
++ if ( aStr[0] == '#' )
++ {
++ aStreamURL = aStreamURL.concat( aStr.copy( 1, aStr.getLength() - 1 ) );
++ }
++ else
++ {
++ aStreamURL = aStreamURL.concat( aStr );
++ }
+
+- // update stream URL for load on demand
+- uno::Any aAny;
+- aAny <<= aStreamURL;
+- xPropSet->setPropertyValue("GraphicStreamURL", aAny );
++ uno::Any aAny;
++ aAny <<= aStreamURL;
++ xPropSet->setPropertyValue( OUString("GraphicStreamURL"), aAny );
++ }
+
+ mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
+ mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED );
+--
+1.9.3
+
diff --git a/libreoffice.spec b/libreoffice.spec
index 8d1c5e1..70ea419 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -36,7 +36,7 @@ Summary: Free Software Productivity Suite
Name: libreoffice
Epoch: 1
Version: %{libo_version}.2
-Release: 9%{?libo_prerelease}%{?dist}
+Release: 10%{?libo_prerelease}%{?dist}
License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic and MPLv2.0
Group: Applications/Productivity
URL: http://www.libreoffice.org/
@@ -309,6 +309,7 @@ Patch51: 0001-resolved-fdo-77018-keep-external-references-intact-d.patch
Patch52: 0001-scrolling-very-slow-in-calc.patch
Patch53: 0001-Resolves-fdo-81487-pasting-into-outline-view-crashes.patch
Patch54: 0001-Resolves-rhbz-1121341-crash-on-closing-shrunk-validi.patch
+Patch55: 0001-Resolves-i125289-do-apply-possible-changed-GraphicSt.patch
%define instdir %{_libdir}
%define baseinstdir %{instdir}/libreoffice
@@ -2259,6 +2260,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%endif
%changelog
+* Wed Jul 23 2014 Caolán McNamara <caolanm at redhat.com> - 1:4.2.5.2-10
+- Related: rhbz#1117128 missing pictures in impress
+
* Mon Jul 21 2014 Caolán McNamara <caolanm at redhat.com> - 1:4.2.5.2-9
- Resolves: rhbz#1121341 crash on closing shrunk validity window
More information about the scm-commits
mailing list