Bug 97108 - Assertion `!rDestShellID.isEmpty() && !rDestShellID.startsWith("0x")' failed when copying OLE object
Summary: Assertion `!rDestShellID.isEmpty() && !rDestShellID.startsWith("0x")' failed ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.2.0.0.alpha0+
Hardware: All Linux (All)
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:5.2.0 target:5.1.1
Keywords:
: 96785 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-01-13 20:06 UTC by Maxim Monastirsky
Modified: 2016-10-25 19:08 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maxim Monastirsky 2016-01-13 20:06:56 UTC
Open Writer, insert OLE object, right click -> Copy.

This triggers the assert:

!rDestShellID.isEmpty() && !rDestShellID.startsWith("0x")

From:

commit e4a06fc983fd6a94a6138503c3fc94b567bc3a68
Author: Michael Stahl <mstahl@redhat.com>
Date:   Tue Dec 15 16:39:14 2015 +0100

    sw: set a BaseURL when copying embedded objects
    
    Turns out that SfxObjectShell::CreateShellID() will produce the
    SfxMedium's base URL if it exists, so
    EmbeddedObjectContainer::CopyAndGetEmbeddedObject() already has
    parameters, sw just needs to set them.
    
    Change-Id: I36cedfde4e7c2e25c43c66a30d8ca572f099ad69
Comment 1 Michael Stahl (allotropia) 2016-01-13 22:45:00 UTC
rats, i always thought the clipboard never has a SfxObjectShell, but there's a special case when you copy a embedded object for which one is created, and it doesn't have a URL of course.

fixed on master
Comment 2 Commit Notification 2016-01-13 22:46:11 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=bd5834005872d005c3129405c6ab2d6d2bdce19d

tdf#97108: SwDocShell of clipboard document has no base URL

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 3 Commit Notification 2016-01-18 14:08:16 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=24b329855050512e9e5c61ac56f2300b69e38b9e&h=libreoffice-5-1

tdf#97108: SwDocShell of clipboard document has no base URL

It will be available in 5.1.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Michael Stahl (allotropia) 2016-02-19 22:13:13 UTC
*** Bug 96785 has been marked as a duplicate of this bug. ***