[ooo-build-commit] .: Branch 'ooo-build-3-2-1' - patches/dev300
Thorsten Behrens
thorsten at kemper.freedesktop.org
Wed May 19 06:26:49 PDT 2010
patches/dev300/apply | 1
patches/dev300/cws-impressmedia01-linkfix.diff | 36 +++++++++++++++++++++++++
2 files changed, 37 insertions(+)
New commits:
commit 3573438122230eedcaa7c43bcf14a7cd122ccb9f
Author: Thorsten Behrens <tbehrens at novell.com>
Date: Wed May 19 15:30:01 2010 +0200
Fix embedded media to break on 2nd load
* patches/dev300/apply: added below patch
* patches/dev300/cws-impressmedia01-linkfix.diff: replace Package URI
with proper relative path on storing, otherwise reload of doc will
loose you the embedded media file.
diff --git a/patches/dev300/apply b/patches/dev300/apply
index f2cc6f6..944b70c 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3904,6 +3904,7 @@ transogl-crossplatform.diff, ericb
cws-impressmedia01-backport.diff, i#83753, thorsten
cws-impressmedia01-slotparams-fix.diff, n#597691, thorsten
cws-impressmedia01-crash-fix.diff, n#588570, thorsten
+cws-impressmedia01-linkfix.diff, thorsten
[ Fixes ]
svx-sound.diff, n#515553, rodo
diff --git a/patches/dev300/cws-impressmedia01-linkfix.diff b/patches/dev300/cws-impressmedia01-linkfix.diff
new file mode 100644
index 0000000..78ab0c6
--- /dev/null
+++ b/patches/dev300/cws-impressmedia01-linkfix.diff
@@ -0,0 +1,36 @@
+Replace Package uri with relative path, for embedded media
+
+From: Thorsten Behrens <tbehrens at novell.com>
+
+
+---
+
+ xmloff/source/draw/shapeexport2.cxx | 14 +++++++++++++-
+ 1 files changed, 34 insertions(+), 2 deletions(-)
+
+
+diff --git xmloff/source/draw/shapeexport2.cxx xmloff/source/draw/shapeexport2.cxx
+index 2a10dc2..1137372 100644
+--- xmloff/source/draw/shapeexport2.cxx
++++ xmloff/source/draw/shapeexport2.cxx
+@@ -1966,7 +1966,19 @@ void XMLShapeExport::ImpExportMediaShape(
+ // export media url
+ OUString aMediaURL;
+ xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "MediaURL" ) ) ) >>= aMediaURL;
+- mrExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_HREF, GetExport().GetRelativeReference( aMediaURL ) );
++
++ const rtl::OUString sPackageURL( RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.Package:") );
++ if( aMediaURL.match( sPackageURL, 0 ) )
++ {
++ // embedded media, strip package prefix
++ aMediaURL = aMediaURL.copy( sPackageURL.getLength(),
++ aMediaURL.getLength() - sPackageURL.getLength() );
++ }
++ else
++ {
++ aMediaURL = GetExport().GetRelativeReference( aMediaURL );
++ }
++ mrExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_HREF, aMediaURL );
+ mrExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
+ mrExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED );
+ mrExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD );
More information about the ooo-build-commit
mailing list