User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36 Build Identifier: LibreOffice 5.0.1.2 Colorize 5x5 array of cells, click format -> autoformat -> add new; Enter the name of your new autoformat, click OK. Then again open format -> autoformat. There are no format you have created!!!! Reproducible: Always [Information automatically included from LibreOffice] Locale: ru Module: SpreadsheetDocument [Information guessed from browser] OS: Linux (All) OS is 64bit: yes Reset User Profile?No
Created attachment 118655 [details] test
On pc Debian x86-64 with LO Debian package 5.0.1.2, I don't reproduce this. Did you choose a name in lowercase? (in this case, it might be at the bottom of the list)
Hi @Yan, thanks for reporting. Reproducible. Win7x64 Version: 5.0.2.1 (x64)Build ID: 9a18d52abbdfbdc2ac9acebec2b92e7859eb73b7 Version: 4.4.6.0.0+ Build ID: 7785e87aa9fc706b1474e6a480affca067542f5d TinderBox: Win-x86@51-TDF, Branch:libreoffice-4-4, Time: 2015-09-02_22:14:25 Version: 4.3.7.2 Build ID: 8a35821d8636a03b8bf4e15b48f59794652c68ba Versión: 4.2.8.0.0 Id. de compilación: 48d50dbfc06349262c9d50868e5c1f630a573ebd Versión: 4.1.6.2 Id. de compilación: 40ff705089295be5be0aae9b15123f687c05b0a Version 3.6.7.2 (Build ID: e183d5b) Last working for me- LibreOffice 3.5.7.2 Build ID: 3215f89-f603614-ab984f2-7348103-1225a5b In those version working "Default" is at the top of the Formats list, in those not working is sorted with others Format names. Creating one with '0New' name disappear after close and reopen Autoformat. Please @Julien, could you play a bit creating and deleting a couple of them with different names.
Thank you mariosv for the hint, I could reproduce this if the new entry is at the beginning of the list. For example: "0New", "Arrowtest", ... But "BlueTest" is ok for example.
In autoform.cxx, line 1082, if I change this line: for (++it; bRet && it != itEnd; ++it) // Skip the first item. into this: for (; bRet && it != itEnd; ++it) it's ok (see http://opengrok.libreoffice.org/xref/core/sc/source/core/tool/autoform.cxx#1082) The goal is to skip "Default" (the always first entry in autoformat list) However, seeing there's a "Default" in Autoformat in Writer, I suppose there should one too in Calc. So the quoted change must be wrong and I should search why Default doesn't appear.
Created attachment 118680 [details] Autoformat screenshoot (In reply to Julien Nabet from comment #5) > However, seeing there's a "Default" in Autoformat in Writer, I suppose there > should one too in Calc. > So the quoted change must be wrong and I should search why Default doesn't > appear. For me there is one "Default" in calc, not at the beginning but in their sort order.
I'm not sure at all but wonder if it could be related to this commit: http://cgit.freedesktop.org/libreoffice/core/commit/?id=72c1b6141d590fb4479925ed8bc88b79357c2bfc extract of gdb session: Breakpoint 2, ScAutoFormat::Load (this=0x35b29f0) at /home/julien/compile-libreoffice/libreoffice/sc/source/core/tool/autoform.cxx:1039 1039 insert(pData); (gdb) p maData $19 = boost::ptr_map with 2.0 elements = {["00Test"] = {aName = "00Test", nStrResId = 65535, bIncludeFont = true, bIncludeJustify = true, bIncludeFrame = true, bIncludeBackground = true, bIncludeValueFormat = true, bIncludeWidthHeight = true, m_swFields = {<boost::noncopyable_::noncopyable> = {<No data fields>}, pData = 0x0, size = 0}, ppDataField = 0x359bc40}, ["Default"] = {aName = "Default", nStrResId = 65535, bIncludeFont = true, bIncludeJustify = true, bIncludeFrame = true, bIncludeBackground = true, bIncludeValueFormat = true, bIncludeWidthHeight = true, m_swFields = {<boost::noncopyable_::noncopyable> = {<No data fields>}, pData = 0x0, size = 0}, ppDataField = 0x350a8d0}} So it seems that to fix this, "Default" should be first in the list and the rest sorted.
I'll give it a try. I think we need to resurrect Compare function (to put Default at first) and use it in MapType definition.
Sorry, I don't know how to do this. Hopefully, I'm quite sure this could be done in few minutes by anyone knowing C++ :-)
Finally I gave a new try and succeeded to have Default always showing first (and so the new entry, even if new first on the list, is saved). I submitted a patch to review here: https://gerrit.libreoffice.org/18598 (master branch)
Setting version according to Mario's comment 3
*** Bug 82948 has been marked as a duplicate of this bug. ***
*** Bug 61331 has been marked as a duplicate of this bug. ***
*** Bug 61330 has been marked as a duplicate of this bug. ***
Julien Nabet committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=652158c3f2c9cd0d6f71ecd14bf5d5cc02a71b50 tdf#94173: Calc doesn't save your own created autoformat presets It will be available in 5.1.0. 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.
And what about 5.0.3, will the patch be backporteed?
I cherry-picked the patch and submitted to review for 5.0 branch here: https://gerrit.libreoffice.org/#/c/19029/
Eike Rathke committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=a71febc99d2cfc2fe51dec8c0bca5d84d8577168 use collator for UI visible sorting, tdf#94173 follow-up It will be available in 5.1.0. 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.
Julien Nabet committed a patch related to this issue. It has been pushed to "libreoffice-5-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=457a9f405f3778547cc2fcafff445d89e87c7db6&h=libreoffice-5-0 tdf#94173: Calc doesn't save your own created autoformat presets It will be available in 5.0.3. 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.
Julien Nabet committed a patch related to this issue. It has been pushed to "libreoffice-4-4": http://cgit.freedesktop.org/libreoffice/core/commit/?id=75d6000da3d185da1694631c4444be8dd9dd5eac&h=libreoffice-4-4 tdf#94173: Calc doesn't save your own created autoformat presets It will be available in 4.4.7. 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.
Thank you to Eike for the follow-up (use collator, see http://cgit.freedesktop.org/libreoffice/core/commit/?id=a71febc99d2cfc2fe51dec8c0bca5d84d8577168). Let's put this one to FIXED now.
Julien Nabet committed a patch related to this issue. It has been pushed to "libreoffice-4-4-6": http://cgit.freedesktop.org/libreoffice/core/commit/?id=6cf58fbb1f5f44fa868b74146c3008dc8ffa46e8&h=libreoffice-4-4-6 tdf#94173: Calc doesn't save your own created autoformat presets It will be available in 4.4.6. 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.