[Libreoffice-commits] core.git: 3 commits - sc/source sw/source

Caolán McNamara caolanm at redhat.com
Sat Jan 9 09:10:33 PST 2016


 sc/source/filter/excel/xiescher.cxx |    3 ++-
 sw/source/core/ole/ndole.cxx        |    5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 7c76db3c88d5fa27776c7c5efa04249a6a7ed559
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Jan 9 16:57:32 2016 +0000

    crashtesting: ooo104626-3.odt assert on reexport to odt
    
    try setting DefaultParentBaseURL based on the parent BaseURL
    for objects created this way
    
    Change-Id: I8cb1e9692cc4255c0a0b11b6df4bacee737ae184

diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx
index d508654..608e792 100644
--- a/sw/source/core/ole/ndole.cxx
+++ b/sw/source/core/ole/ndole.cxx
@@ -774,7 +774,8 @@ const uno::Reference < embed::XEmbeddedObject > SwOLEObj::GetOleRef()
         SfxObjectShell* p = pOLENd->GetDoc()->GetPersist();
         assert(p && "No SvPersist present");
 
-        uno::Reference < embed::XEmbeddedObject > xObj = p->GetEmbeddedObjectContainer().GetEmbeddedObject( aName );
+        OUString sDocumentBaseURL = p->getDocumentBaseURL();
+        uno::Reference < embed::XEmbeddedObject > xObj = p->GetEmbeddedObjectContainer().GetEmbeddedObject(aName, &sDocumentBaseURL);
         OSL_ENSURE( !xOLERef.is(), "Calling GetOleRef() recursively is not permitted" );
 
         if ( !xObj.is() )
commit 77846edf44512d48f21300bec0b75b94362774b2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Jan 9 16:55:13 2016 +0000

    OSL_ENSURE on p followed by deref -> assert
    
    Change-Id: I4021053efbdaf1c04a9eb4c8fa52ef3da7b98b67

diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx
index f17714c..d508654 100644
--- a/sw/source/core/ole/ndole.cxx
+++ b/sw/source/core/ole/ndole.cxx
@@ -772,7 +772,7 @@ const uno::Reference < embed::XEmbeddedObject > SwOLEObj::GetOleRef()
     if( !xOLERef.is() )
     {
         SfxObjectShell* p = pOLENd->GetDoc()->GetPersist();
-        OSL_ENSURE( p, "No SvPersist present" );
+        assert(p && "No SvPersist present");
 
         uno::Reference < embed::XEmbeddedObject > xObj = p->GetEmbeddedObjectContainer().GetEmbeddedObject( aName );
         OSL_ENSURE( !xOLERef.is(), "Calling GetOleRef() recursively is not permitted" );
commit 91cbc10f380e752b95c5b71f596d68848533b132
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Jan 9 15:27:53 2016 +0000

    crashtesting: ooo29815-1.doc assert on reexport to doc
    
    try setting DefaultParentBaseURL based on the parent BaseURL
    for objects created this way
    
    Change-Id: Id9294e03c9c586a9445257ac9139f26f2b1a6a46

diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index d592213..22265ca 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -1700,8 +1700,9 @@ SdrObjectPtr XclImpChartObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const
     {
         // create embedded chart object
         OUString aEmbObjName;
+        OUString sBaseURL(GetRoot().GetMedium().GetBaseURL());
         Reference< XEmbeddedObject > xEmbObj = pDocShell->GetEmbeddedObjectContainer().
-                CreateEmbeddedObject( SvGlobalName( SO3_SCH_CLASSID ).GetByteSequence(), aEmbObjName );
+                CreateEmbeddedObject( SvGlobalName( SO3_SCH_CLASSID ).GetByteSequence(), aEmbObjName, &sBaseURL );
 
         /*  Set the size to the embedded object, this prevents that font sizes
             of text objects are changed in the chart when the object is


More information about the Libreoffice-commits mailing list