<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - Impossible to edit any TextField (except URL) inside a spreadsheet cell by user code."
href="https://bugs.documentfoundation.org/show_bug.cgi?id=125705#c6">Comment # 6</a>
on <a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - Impossible to edit any TextField (except URL) inside a spreadsheet cell by user code."
href="https://bugs.documentfoundation.org/show_bug.cgi?id=125705">bug 125705</a>
from <span class="vcard"><a class="email" href="mailto:jag@psilosoph.de" title="Wolfgang Jäger <jag@psilosoph.de>"> <span class="fn">Wolfgang Jäger</span></a>
</span></b>
<pre>There was a misunderstanding.
If I just wanted to get the behavior of Calc changed or to get a feature added,
I would post an "enhancement" bug (request).
This is a *bug report* because the actual behavior of textfield objects imo is
different from how it should be regarding the *existing specifications*.
However, I also can't see the differences as a "feature". To the contrary it is
annoying and makes textfield instances (with the exception of .textfiel.URL) in
Calc next to useless. Concerning DateTime the unchangeable NumberFormat is not
acceptable.
BTW: Since I don't use sheet headers/footers, I didn't test the details, but it
seems that everything I reported here about SheetCell objects also holds for
textfield instances there.
(Of course, I also am unhappy with the differences in the "specialized"
implementations of .Text services for generic objects of different kind, but
this is off topic here.)
Just tested with LibO V7.2.0.4: Everything as reported earlier.
The "setting back to IsFixed=False" (and similar) is reported about the actual
textfield of the inspected text portion, not about the instance the code below
is working on.
I also tested with the modified code below (and with additional variants):
Sub lookAtDateTimeFields() REM In advance of running this Sub: Select the
single cell you want to inspect.
cell = ThisComponent.CurrentSelection(0)
For Each quasiPar In cell
For Each portion In quasiPar
If portion.TextPortionType="TextField" Then
tf = portion.TextField
With tf
If .supportsService("com.sun.star.text.TextField.DateTime") Then
dt = .DateTime
.IsFixed = True 'Was first accepted but later set back to False.
tf.IsDate = False
dt.Day = 1
dt.Hours = 13
tf.NumberFormat = h_findCreateNumberFormatStyle("YYYY-MM-DD HH:MM")
REM Name and code for findCreateNumberFormatStyle() are by Andrew Pitonyak.
.DateTime = dt
End If
End With
REM An attempt to assign portion.TextFiled = tf fails ("ReadOnly").
End If
Next portion
Next quasiPar
End Sub</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>