[ooo-build-commit] Branch 'ooo-build-3-1-1' - patches/dev300
Thorsten Behrens
thorsten at kemper.freedesktop.org
Fri Aug 14 06:38:53 PDT 2009
patches/dev300/apply | 1
patches/dev300/svx-gfx-lost-fix.diff | 64 +++++++++++++++++++++++++++++++++++
2 files changed, 65 insertions(+)
New commits:
commit 0662f1ef957138188baf7f6c6927698f34ef0a43
Author: Thorsten Behrens <tbehrens at novell.com>
Date: Fri Aug 14 15:35:21 2009 +0200
Fix gfx reduction to preview size on save
* patches/dev300/apply: add the patch
* patches/dev300/svx-gfx-lost-fix.diff: make sure that the drawing
layer hands out the correct graphics ID (the funny string name of
the embedded images in the Pictures dir in the zip archive) when
asked (and not the one from the preview graphic). n#531221
diff --git a/patches/dev300/apply b/patches/dev300/apply
index 5544efe..445cb3a 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3388,3 +3388,4 @@ xmloff-layoutcode.diff, cocofan
[ Fixes ]
avoid-too-long-filenames.diff
+svx-gfx-lost-fix, n#531221, thorsten
diff --git a/patches/dev300/svx-gfx-lost-fix.diff b/patches/dev300/svx-gfx-lost-fix.diff
new file mode 100644
index 0000000..361de76
--- /dev/null
+++ b/patches/dev300/svx-gfx-lost-fix.diff
@@ -0,0 +1,64 @@
+Fix gfx reduction to preview size on save
+
+From: Thorsten Behrens <thb at openoffice.org>
+
+
+---
+
+ svx/inc/svx/svdograf.hxx | 1 +
+ svx/source/svdraw/svdograf.cxx | 12 ++++++++++++
+ svx/source/unodraw/unoshap2.cxx | 4 ++--
+ 3 files changed, 15 insertions(+), 2 deletions(-)
+
+
+diff --git svx/inc/svx/svdograf.hxx svx/inc/svx/svdograf.hxx
+index f542818..ea6a996 100644
+--- svx/inc/svx/svdograf.hxx
++++ svx/inc/svx/svdograf.hxx
+@@ -143,6 +143,7 @@ public:
+
+ void SetGraphicObject( const GraphicObject& rGrfObj );
+ const GraphicObject& GetGraphicObject( bool bForceSwapIn = false) const;
++ ByteString GetUniqueID() const;
+
+ void SetGraphic(const Graphic& rGrf);
+ const Graphic& GetGraphic() const;
+diff --git svx/source/svdraw/svdograf.cxx svx/source/svdraw/svdograf.cxx
+index 1bf8ceb..b47f48b 100644
+--- svx/source/svdraw/svdograf.cxx
++++ svx/source/svdraw/svdograf.cxx
+@@ -303,6 +303,18 @@ const GraphicObject& SdrGrafObj::GetGraphicObject(bool bForceSwapIn) const
+
+ // -----------------------------------------------------------------------------
+
++ByteString SdrGrafObj::GetUniqueID() const
++{
++ // #i104146# attempting to retrieve the gfx ID from a preview
++ // graphic might *change* the file on export
++ if( mbIsPreview )
++ ForceSwapIn();
++
++ return pGraphic->GetUniqueID();
++}
++
++// -----------------------------------------------------------------------------
++
+ void SdrGrafObj::SetGraphic( const Graphic& rGrf )
+ {
+ pGraphic->SetGraphic( rGrf );
+diff --git svx/source/unodraw/unoshap2.cxx svx/source/unodraw/unoshap2.cxx
+index 5994304..3e405dd 100644
+--- svx/source/unodraw/unoshap2.cxx
++++ svx/source/unodraw/unoshap2.cxx
+@@ -1834,9 +1834,9 @@ bool SvxGraphicObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty
+ }
+ else
+ {
+- const GraphicObject& rGrafObj = static_cast< SdrGrafObj*>( mpObj.get() )->GetGraphicObject();
+ OUString aURL( RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_GRAPHOBJ_URLPREFIX));
+- aURL += OUString::createFromAscii( rGrafObj.GetUniqueID().GetBuffer() );
++ aURL += OUString::createFromAscii(
++ static_cast< SdrGrafObj*>( mpObj.get() )->GetUniqueID().GetBuffer() );
+ rValue <<= aURL;
+ }
+ break;
More information about the ooo-build-commit
mailing list