summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-12-23 21:22:58 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-12-24 21:24:13 +0000
commita4764cfa80270f973da5861d0ddc28298bf16f4d (patch)
tree0f37444037a87082fdea400dc2d1cdc0edd76f89 /comphelper
parent33fac4828038bc38ab4a0c4b891d762a5ae73e5e (diff)
crashtesting: fdo73974-1.doc assert on reexport to doc
try setting DefaultParentBaseURL based on the parent BaseURL for objects created this way Change-Id: Idfc44d90e4f73f23976e8648c504786955b4fce6
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/container/embeddedobjectcontainer.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx
index b813b96be0dd..127798f45569 100644
--- a/comphelper/source/container/embeddedobjectcontainer.cxx
+++ b/comphelper/source/container/embeddedobjectcontainer.cxx
@@ -589,7 +589,7 @@ uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::InsertEmbedde
return xRet;
}
-uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::InsertEmbeddedObject( const css::uno::Sequence < css::beans::PropertyValue >& aMedium, OUString& rNewName )
+uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::InsertEmbeddedObject( const css::uno::Sequence < css::beans::PropertyValue >& aMedium, OUString& rNewName, OUString const* pBaseURL )
{
if ( rNewName.isEmpty() )
rNewName = CreateUniqueObjectName();
@@ -598,9 +598,14 @@ uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::InsertEmbedde
try
{
uno::Reference < embed::XEmbeddedObjectCreator > xFactory = embed::EmbeddedObjectCreator::create( ::comphelper::getProcessComponentContext() );
- uno::Sequence< beans::PropertyValue > aObjDescr( 1 );
+ uno::Sequence< beans::PropertyValue > aObjDescr(pBaseURL ? 2 : 1);
aObjDescr[0].Name = "Parent";
aObjDescr[0].Value <<= pImpl->m_xModel.get();
+ if (pBaseURL)
+ {
+ aObjDescr[1].Name = "DefaultParentBaseURL";
+ aObjDescr[1].Value <<= *pBaseURL;
+ }
xObj.set( xFactory->createInstanceInitFromMediaDescriptor(
pImpl->mxStorage, rNewName, aMedium, aObjDescr ), uno::UNO_QUERY );
uno::Reference < embed::XEmbedPersist > xPersist( xObj, uno::UNO_QUERY );