<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - EDITING: Paste stops working after several copy-paste (steps: comment 28)"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=57147#c53">Comment # 53</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - EDITING: Paste stops working after several copy-paste (steps: comment 28)"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=57147">bug 57147</a>
from <span class="vcard"><a class="email" href="mailto:newbie-02@gmx.de" title="b. <newbie-02@gmx.de>"> <span class="fn">b.</span></a>
</span></b>
<pre>Created <span class=""><a href="http://bugs.documentfoundation.org/attachment.cgi?id=166145" name="attach_166145" title="screenshot_with_'splitted_focus'">attachment 166145</a> <a href="http://bugs.documentfoundation.org/attachment.cgi?id=166145&action=edit" title="screenshot_with_'splitted_focus'">[details]</a></span>
screenshot_with_'splitted_focus'
found another variant of this (or another variant of copy-paste) bug:
0. working in a big sheet, replacing formulas (patching strings together) by
their resulting string,
1. find a cell with a strng formula, ctrl-f and search for '&',
2. escape from search box by ESC,
3. run macro - see below - by assigned keyboard shortcut (alt-F7 n my case), it
copies the actual selection and pastes it back as it's result with 'paste
special',
4. ctrl-f and search for the next occurence of '&',
5. escape from the search box by ESC,
6. in this situation the sheet is displayed as in the attached screenshot, the
'old selection' / replaced cell is 'highlighted' with light blue-grey
background, a dotted border and the small black 'expand-square' bottom-right,
and the new / found cell is marked with the thick black border,
7. starting the replace macro in that situation results in a short display of
the hourglass and 'no action', the formula stays as formula,
8. changing the 'focus' / 'selection' by e.g. cursor-up - cursor-down (which
results in the new found cell being selcted and the highlighting of the former
cell disappearing) enables to start the macro with expected result,
it could be that some variants of the 'focus' / 'selection' status, being
'splitted'? (a thing that i had never consciously seen before) somehow plays
into copy/paste ... ???
(only reported because this bug has been unsolved for such long time and it
might be helpful to point out exotic side effects, and it looks to me as a
'stable reproducer'),
experienced in ver 6.1.6.3, retested in 7.1.0.0.a0+, same effect,
the macro (recorded and cutted away an unneeded cell change in the beginning):
++++++++++++
sub replace_formula
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:Copy", "", 0, Array())
rem ----------------------------------------------------------------------
dim args4(5) as new com.sun.star.beans.PropertyValue
args4(0).Name = "Flags"
args4(0).Value = "SVD"
args4(1).Name = "FormulaCommand"
args4(1).Value = 0
args4(2).Name = "SkipEmptyCells"
args4(2).Value = false
args4(3).Name = "Transpose"
args4(3).Value = false
args4(4).Name = "AsLink"
args4(4).Value = false
args4(5).Name = "MoveMode"
args4(5).Value = 4
dispatcher.executeDispatch(document, ".uno:InsertContents", "", 0, args4())
end sub 'sub replace_formula
++++++++++++</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>