Created attachment 87198 [details] Screenshot of field command with buggy behavior marked, and used custom template Problem description: When in a writer template file (.ott) the field command "time (fixed)" is used, then, when creating a new file based on this template file, the time inserted by the field command is "0:00" instead of current time of file creation. Steps to reproduce: 1. create a new empty writer project 2. insert a field command "time (fixed)" 3. save file as template file (.ott) 4. use this file as default template when opening Writer 5. Close Writer 6. Open Writer (create a new project based on template file) Current behavior: --> the inserted time is "0:00". Expected behavior: The current time on Writer-open time was expected as in previous versions. Operating System: Windows 7 Version: 4.1.1.2 release
Hi Thomas, Works fine for me in 4.1.2.3 on Ubuntu. Can you pls attach the sample/test file? Regards, Cor
Created attachment 87209 [details] Template which shows errorenous behavior of time field on windows This first occurred under windows Win7 (DE localized). I've tested again: Under LO 4.0.4.5 under Winxp on other PC the template works fine, after installation of 4.1 on the computer the template behaves with same problem as described in bug. See template attached for further tests.
Created attachment 87212 [details] test template by Cor Hi Thomas, thanks - indeed shows 00:00 by me too. Can you test my template (attached) pls?
Hi Cor, thanks for your testing! Are you shure this is the correct attachment? This only shows an image to me, not a template. Regards, Thomas
Hi Cor, thanks for your testing! Are you sure this is the correct attachment? This only shows an image to me, not a template. Regards, Thomas
Created attachment 87250 [details] right test template by Cor appologies :)
Created attachment 87254 [details] 70198_TestCor2.ott Hi Cor, I was now able to test your template: Your template uses another field command (field command "file info: creation time"). My template used field command "time (fixed)" The goal of my template is to mark the time the document window was opened (edit start time). Your field command is correct for the time the document was saved (edit stop time). I've added the field command "time (fixed)" to your template and attached it. There you can see the difference of both field commands.
Created attachment 87255 [details] Screenshot of field command "time (fixed)" showing "0:00:02" While trying out I found out further, that not in all cases the field is "0:00". Indeed it seems this is dependend on the start delay of LO Writer? Sometimes I was able to produce a "0:00:02" (see screenshot attached)!
Hi Thomas, Got it now. Sometimes see 00:00:03 - better then yours ;) The first version with the problem I have is 4.1.0beta1 thanks, Cor
can't reproduce problem on Linux with 4.1.1.2, current libreoffcie-4-1 or current master. but the bug does happen on Windows on master.
aha... when creating the document from the template the Time value gets truncated in SwDoc::SetFixFields() (except if you've got 64 bits) which then puts the wrong time value into the field. this is what happens when code uses platform dependent types like "long"... fixed on master.
Michael Stahl committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=17dab5bf8efb3fd676e6854474b199b681d0dc28 fdo#70198: sw: don't truncate Time values on 32bit platforms The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Michael Stahl committed a patch related to this issue. It has been pushed to "libreoffice-4-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=9b498bb45b34a474b666107265896d69707472d1&h=libreoffice-4-2 fdo#70198: sw: don't truncate Time values on 32bit platforms It will be available in LibreOffice 4.2. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Michael Stahl committed a patch related to this issue. It has been pushed to "libreoffice-4-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=f0d031c19c45d680b3d468c58a912da2a3ce4c78&h=libreoffice-4-1 fdo#70198: sw: don't truncate Time values on 32bit platforms It will be available in LibreOffice 4.1.5. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Michael Stahl committed a patch related to this issue. It has been pushed to "libreoffice-4-1-4": http://cgit.freedesktop.org/libreoffice/core/commit/?id=1a37462bb59f036b5b871e6f1361c4b2fd216481&h=libreoffice-4-1-4 fdo#70198: sw: don't truncate Time values on 32bit platforms It will be available already in LibreOffice 4.1.4. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
thanks Michael!