From e9309e1f32e9029b62d67a3706ea63d4c5bb587a Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 9 Feb 2016 14:58:47 +0100 Subject: don't assert that no ODF import happens without a base URL Turns out that if you create a new document and then copy an embedded object from it to the clipboard, there really is no usable base URL. So don't assert and just log something, hopefully the important file import cases have been fixed already. Change-Id: Iee1027cbab4db10a273518739a5ab2c31627180e --- sc/source/filter/xml/xmlwrap.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sc') diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx index 0df5913cf120..f6dde8d02c3c 100644 --- a/sc/source/filter/xml/xmlwrap.cxx +++ b/sc/source/filter/xml/xmlwrap.cxx @@ -349,7 +349,8 @@ bool ScXMLImportWrapper::Import( sal_uInt8 nMode, ErrCode& rError ) // Set base URI OSL_ENSURE( pMedium, "There is no medium to get MediaDescriptor from!\n" ); OUString aBaseURL = pMedium ? pMedium->GetBaseURL() : OUString(); - assert(!aBaseURL.isEmpty()); // needed for relative URLs + // needed for relative URLs, but in clipboard copy/paste there may be none + SAL_INFO_IF(aBaseURL.isEmpty(), "sc.filter", "ScXMLImportWrapper: no base URL"); OUString sPropName("BaseURI"); xInfoSet->setPropertyValue( sPropName, uno::makeAny( aBaseURL ) ); -- cgit