Bug 86199 - Inserted macro in Writer is not evaluated
Summary: Inserted macro in Writer is not evaluated
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
4.3.0.0.alpha1
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Macro-UI
  Show dependency treegraph
 
Reported: 2014-11-12 14:11 UTC by Jez
Modified: 2023-04-05 03:23 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example macro to reproduce behaviour (444 bytes, text/plain)
2014-11-12 14:11 UTC, Jez
Details
test file (9.40 KB, application/vnd.oasis.opendocument.text)
2014-11-19 22:16 UTC, raal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jez 2014-11-12 14:11:54 UTC
Created attachment 109339 [details]
Example macro to reproduce behaviour

See attachment for example macro to reproduce this behaviour.

When you try to insert a conditional text field through a LibreOffice basic macro, it isn't evaluated the first time you do it (just after starting LibreOffice Writer) - although the second and subsequent times the macro is run, all the fields are evaluated.

The field should be evaluated the first time the macro is run, instead of just staying blank.
Comment 1 Buovjaga 2014-11-16 19:47:06 UTC
For me, it is inserting "My true text" the first time and no matter how many times I run it.
What LibO version and OS are you running?
Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the information.

Win 7 64-bit Version: 4.4.0.0.alpha2+
Build ID: b021b5983c62e266b82d9f0c5c6d8d8900553827
TinderBox: Win-x86@39, Branch:master, Time: 2014-11-12_01:10:08
Comment 2 Jez 2014-11-16 20:33:19 UTC
I'm using Windows 7 64 bit, and this version of LibreOffice Writer:

Version: 4.3.3.2
Build ID: 9bb7eadab57b6755b1265afa86e04bf45fbfc644

Would this rather bizarre bug have been fixed in the recent alpha?
Comment 3 Buovjaga 2014-11-17 07:35:57 UTC
(In reply to Jez from comment #2)
> I'm using Windows 7 64 bit, and this version of LibreOffice Writer:
> 
> Version: 4.3.3.2
> Build ID: 9bb7eadab57b6755b1265afa86e04bf45fbfc644
> 
> Would this rather bizarre bug have been fixed in the recent alpha?

You can test by installing an alpha build alongside your stable:
http://dev-builds.libreoffice.org/daily/master/Win-x86@39/2014-11-12_01.10.08/

It installs to a different folder and doesn't mess with your stable install. Please report your findings here.
Comment 4 Jez 2014-11-17 15:02:36 UTC
OK I tried it in LibreOfficeDev Writer:

Version: 4.4.0.0.alpha2+
Build ID: b021b5983c62e266b82d9f0c5c6d8d8900553827
TinderBox: Win-x86@39, Branch:master, Time: 2014-11-12_01:10:08

I get exactly the same behaviour.  The inserted field does not show any text until I run the macro again, and then both the inserted fields are evaluated and show text.
Comment 5 Buovjaga 2014-11-17 15:11:39 UTC
Thanks for testing, let's set back to unconfirmed then and wait for other testers.
Comment 6 raal 2014-11-19 22:16:07 UTC
I can confirm with Version: 4.4.0.0.alpha2+
Build ID: 2f342c61616418c6ad7303d7f5efa27a28378681
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2014-11-16_00:33:40

I can reproduce with Version: 4.3.0.0.alpha1+
Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e, setting older version
Comment 7 raal 2014-11-19 22:16:27 UTC
Created attachment 109743 [details]
test file
Comment 8 Buovjaga 2014-11-20 06:07:32 UTC
(In reply to raal from comment #7)
> Created attachment 109743 [details]
> test file

Hmh, with this file I could repro.

Win 7 64-bit Version: 4.4.0.0.alpha2+
Build ID: b021b5983c62e266b82d9f0c5c6d8d8900553827
TinderBox: Win-x86@39, Branch:master, Time: 2014-11-12_01:10:08
Comment 9 Oliver Specht (CIB) 2015-12-18 08:19:09 UTC
To update fields you should call
 doc.textfields.refresh
Comment 10 Jez 2015-12-18 11:03:49 UTC
(In reply to Oliver Specht from comment #9)
> To update fields you should call
>  doc.textfields.refresh

I can confirm that this does indeed work.  Don't think it's a fix for this bug, but it is a workaround...
Comment 11 QA Administrators 2017-01-03 19:47:25 UTC Comment hidden (obsolete)
Comment 12 Buovjaga 2019-08-11 11:33:10 UTC
(In reply to raal from comment #7)
> Created attachment 109743 [details]
> test file

Still confirmed

Arch Linux 64-bit
Version: 6.4.0.0.alpha0+
Build ID: 37fc9f51a8de11d40632e8cda17ccf1fa4b1f503
CPU threads: 8; OS: Linux 5.2; UI render: default; VCL: gtk3; 
Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US
Calc: threaded
Built on 6 August 2019
Comment 13 Andreas Heinisch 2021-04-04 16:46:29 UTC
Still confirmed in:

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 5ff4d54f7b7fc0d01e0e1004324a90042494422b
CPU threads: 6; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: CL
Comment 14 QA Administrators 2023-04-05 03:23:56 UTC
Dear Jez,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug