<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>I'm trying to write a unit test for
<a class="moz-txt-link-freetext" href="https://bugs.documentfoundation.org/show_bug.cgi?id=133647">https://bugs.documentfoundation.org/show_bug.cgi?id=133647</a>. As I
see it, in order for this unit test to be effective, it needs to
either compare to the formatted display value of the function (to
check whether or not "** Expression is faulty **" is being shown)
or compare to the formula text value (to see if it is getting
translated the way I expect). But, I am having a heck of a time
getting either of those in the unit test. </p>
<p>I put what I have so far in <a class="moz-txt-link-freetext" href="https://paste.debian.net/1154267/">https://paste.debian.net/1154267/</a>
with the output at the bottom in a comment. <br>
</p>
<p>The operational code in DomainMapper_Impl.cxx appears to be
writing the formula text to a com.sun.star.text.TextField when
importing the document, but trying to get an XTextField from an
XCell like this:<br>
uno::Reference<text::XTextField> xTextField(xCell,
uno::UNO_QUERY);</p>
<p>In the unit test isn't working, xTextField.is() is false. <br>
</p>
<p>I can get a calculated value by getting an XText from the XCell,
but that's not what I am after. <br>
</p>
<p class="bz_comment_text" id="comment_text_6">As far as looking at
the formatted display value, from what I can tell in a debugging
session it seems like I need
DocumentFieldsManager::UpdateTableFields() to run, but I don't
know if this is happening when running a unit test, maybe it
isn't. I can't tell if there is some way to force it from a unit
test. </p>
</body>
</html>