Bug 112906 - Custom date format is not applied for fields which use custom function
Summary: Custom date format is not applied for fields which use custom function
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.2.7.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-05 19:09 UTC by Quazgar
Modified: 2017-10-23 08:47 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Simple test case with the macro described in the bug report. (9.93 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-10-05 19:11 UTC, Quazgar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Quazgar 2017-10-05 19:09:56 UTC
Description:
I have defined a custom BASIC function:

Function test_format()
	test_format = Now()
End Function

When I now use this function to set the value of a field like so

=test_format()

I cannot change that field's format to anything but the default format.

Steps to Reproduce:
1. Create macro function mentioned above
2. Use in field.
3. Try to change format of field.

Actual Results:  
Field format is not changed.

Expected Results:
Field format should change.


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
Comment 1 Quazgar 2017-10-05 19:11:25 UTC
Created attachment 136787 [details]
Simple test case with the macro described in the bug report.
Comment 2 raal 2017-10-22 21:44:55 UTC
Tested with Version: 6.0.0.0.alpha0+
Build ID: 616f21db9e50a77b0c02dfb123f871a742f46216
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk3; 

I can change format to "YY-MM-DD" and it works. Please, could you test with newer version? Setting bug as needinfo, set as unconfirmed again if problem still occurs in newer version. Thank you.

http://dev-builds.libreoffice.org/daily/master/
Comment 3 Quazgar 2017-10-23 07:56:43 UTC
(In reply to raal from comment #2)
> Tested with Version: 6.0.0.0.alpha0+
> I can change format to "YY-MM-DD" and it works.

I installed the daily build and it works for me as well on a Debian 9 system.  (Tested again and did not work on a 5.* LibreOffice installation.)
Comment 4 raal 2017-10-23 08:47:02 UTC
Correct status