How to force updating a table formula

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to force updating a table formula

Peter Eberlein-3
Hi,

after inserting some text in a XTextTable with Java, sometimes the cell
with the sum formula isn't refreshed.

What does work:
* UI: press F9 or clicking into a cell
* Basic: ThisComponent.TextFields.refresh()

What does not work:
* Java (document is the XTextDocument here):

XTextFieldsSupplier xfs = (XTextFieldsSupplier)
UnoRuntime.queryInterface(XTextFieldsSupplier.class, document);

XRefreshable xtfr = (XRefreshable)
UnoRuntime.queryInterface(XRefreshable.class, xfs);
xtfr.refresh();

or

XRefreshable xtfr2 = (XRefreshable)
UnoRuntime.queryInterface(XRefreshable.class, document);
xtfr2.refresh();


Any hints how to force that?


Regards

Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to force updating a table formula

Oliver Specht - Sun Germany - ham02 - Hamburg
Hi,On 11.03.2010 10:04, Peter Eberlein wrote:

> Hi,
>
> after inserting some text in a XTextTable with Java, sometimes the cell
> with the sum formula isn't refreshed.
>
> What does work:
> * UI: press F9 or clicking into a cell
> * Basic: ThisComponent.TextFields.refresh()
this is a ThisComponent.getTextFields.refresh()

>
> What does not work:
> * Java (document is the XTextDocument here):
>
> XTextFieldsSupplier xfs = (XTextFieldsSupplier)
> UnoRuntime.queryInterface(XTextFieldsSupplier.class, document);
>
> XRefreshable xtfr = (XRefreshable)
> UnoRuntime.queryInterface(XRefreshable.class, xfs);
> xtfr.refresh();
This is a 'ThisComponent.refresh', a refresh of the document.
>
> or
>
> XRefreshable xtfr2 = (XRefreshable)
> UnoRuntime.queryInterface(XRefreshable.class, document);
> xtfr2.refresh();
same as above
>
>
> Any hints how to force that?
How about something like
XTextFieldsSupplier xfs = (XTextFieldsSupplier)
UnoRuntime.queryInterface(XTextFieldsSupplier.class, document);

XRefreshable xtfr2 = (XRefreshable)
UnoRuntime.queryInterface(XRefreshable.class, xfs.getTextFields());
xtfr2.refresh();

Regards,
Oliver

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to force updating a table formula

Peter Eberlein-3
Hi Oliver,

Am 11.03.2010 10:15, schrieb Oliver Specht:

> Hi,On 11.03.2010 10:04, Peter Eberlein wrote:
>
>
>> Any hints how to force that?
> How about something like
> XTextFieldsSupplier xfs = (XTextFieldsSupplier)
> UnoRuntime.queryInterface(XTextFieldsSupplier.class, document);
>
> XRefreshable xtfr2 = (XRefreshable)
> UnoRuntime.queryInterface(XRefreshable.class, xfs.getTextFields());
> xtfr2.refresh();
>

of course, :-\

Thank you

> Regards,
> Oliver
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]