Comment 61 for bug 157249

Revision history for this message
In , Michael Meeks (michael-meeks) wrote :

the txtparae.cxx code that does the export does:

    // xlink:href
    OUString sOrigURL;
    rPropSet->getPropertyValue( sGraphicURL ) >>= sOrigURL;

This calls into /data/opt/libreoffice/master/sw/source/core/unocore/unoframe.cxx:1402ish that in a nutshell returns:
          pGrfNode->GetGrfObj().GetUniqueID()
Which is:
(gdb) p sOrigURL
$9 = "vnd.sun.star.GraphicObject:200004AD0000475F000033B367F3281F"

    OUString sURL(GetExport().AddEmbeddedGraphicObject( sOrigURL ));

This saves the embedded object into the output stream giving it a new name:

(gdb) p sURL
$11 = "Pictures/200004AD0000475F000033B367F3281F.svm"

    setTextEmbeddedGraphicURL( rPropSet, sURL );

And this then calls the 'SetNewName' on the graphic:

        String aNewURL( RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.Package:") );
        aNewURL += String(rURL);
        pGrfNd->SetNewStreamName( aNewURL );

Which then causes the grief.