<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - copy/paste of text boxes results in separate shape and text frame"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=135888">135888</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>copy/paste of text boxes results in separate shape and text frame
</td>
</tr>
<tr>
<th>Product</th>
<td>LibreOffice
</td>
</tr>
<tr>
<th>Version</th>
<td>5.3.0.3 release
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>UNCONFIRMED
</td>
</tr>
<tr>
<th>Keywords</th>
<td>regression
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>Writer
</td>
</tr>
<tr>
<th>Assignee</th>
<td>libreoffice-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>michael.stahl@cib.de
</td>
</tr>
<tr>
<th>CC</th>
<td>glogow@fbihome.de, vmiklos@collabora.com
</td>
</tr></table>
<p>
<div>
<pre>in Writer, copy a shape w/ text-box and paste it, the result will be 2
unconnected objects, a shape and a text frame.
the problem is that in DocumentContentOperationsManager::CopyFlyInFlyImpl(),
the
SwTextBoxHelper::resetLink(pFormat, aOldContent);
removes the RES_CNTNT property that isTextBox() checks to determine it's a text
box (it's also required in CopyLayoutFormat()).
if (!pShape || pShape->Which() != nType ||
!pShape->GetAttrSet().HasItem(RES_CNTNT))
return false;
it's only restored at the end of the function, when it's too late:
SwTextBoxHelper::restoreLinks(aSet, aVecSwFrameFormat, aOldTextBoxes,
aOldContent);
i don't understand why we need this?
reading the git log it looks to me that this caused it:
commit 0bcc5b3daebeb2a7d2b5ba132af4745cc6c78cd0
Author: Jan-Marek Glogowski <<a href="mailto:glogow@fbihome.de">glogow@fbihome.de</a>>
AuthorDate: Fri Jul 22 17:50:52 2016 +0200
Switch isTextBox to use the format pointers
This replaces all possible occurences of the text box format
maps, which just want to know, if a SwFrameFormat is part of a
text box to use the direct lookup via the isTextBox, which is
now a cheap call.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>