In Calc, "###" code means "The cell is not wide enough to display the contents" [1]. In a spreadsheet put number '2E306' into a cell, and format it with a fraction format, e.g. '# #/#'. Or use a time span format, like '[HH]'. Or use a percent format, like '0%'. This results in "###" displayed in the cell, which has nothing to do with "cell not wide enough", but is an error string from the formatting function. This easy hack is for changing the error string in the number formatter to something else - e.g., '#FMT'. The string is defined in ImpSvNumberformatScan::sErrStr (see its declaration in svl/source/numbers/zforscan.hxx), and it's used in svl/source/numbers/zformat.cxx through calls to ImpSvNumberformatScan::GetErrorString. [1] https://help.libreoffice.org/6.4/en-US/text/scalc/05/02140000.html
Additionally, the error code should be listed in both [1] and [2]. In [1], it should be listed after ###, but before all the codes that have actual error number in Calc, since it's not a spreadsheet error (detectable e.g. by spreadsheet function ISERR), but a formatting (display) error, somewhat similar to ###. [1] https://help.libreoffice.org/6.4/en-US/text/scalc/05/02140000.html [2] https://help.libreoffice.org/6.4/en-US/text/shared/01/05020301.html
Hi there, I am trying to solve this bug. What should be the error message instead of "###" and what test should I perform to test whether this bug is resolved or not? Please help! Thanks.
(In reply to Abhishek from comment #2) The proposed text is present in the description, namely "#FMT". The steps to check if the bug is fixed is obvious from the description, too: naturally, one who wants to fix it should first reproduce the problem, which implies preparing a spreadsheet according to examples given in the description. Then, after the problem is fixed, the spreadsheet should show the corrected string instead of ###. Does it make sense now?
Thanks for the help Mike!
I am going to try and work on this easy hack
(In reply to Mohamed Sameh from comment #5) > I am going to try and work on this easy hack Welcome! Of course, the bug has been unassigned till now; but please note the comments from Abhishek from ~a week ago. *Possibly* Abhishek has just forgot to assign it - but everything is possible. Please wait for Abhishek's response for a day or two before starting to work on it (however sad I am to say that, since I'd love to have it worked on), to avoid stepping on other's...
(In reply to Mike Kaganski from comment #6) > (In reply to Mohamed Sameh from comment #5) > > I am going to try and work on this easy hack > > Welcome! > Of course, the bug has been unassigned till now; but please note the > comments from Abhishek from ~a week ago. *Possibly* Abhishek has just forgot > to assign it - but everything is possible. Please wait for Abhishek's > response for a day or two before starting to work on it (however sad I am to > say that, since I'd love to have it worked on), to avoid stepping on > other's... Sure, I think you are right. I will give it a day then
it's been 2 days can I start working on this now ?
(In reply to Mohamed Sameh from comment #8) > it's been 2 days can I start working on this now ? I think so. Abhishek was not in the Cc list of this report, though, but I noticed that he was working on some completely different bug.
How and where should I define the new string "#FMT' ?
(In reply to Mohamed Sameh from comment #10) > How and where should I define the new string "#FMT' ? I read the easyhack description again and realised it should replace the string ### in svl/source/numbers/zformat.cxx. I will be commiting soon
I have commited the change here https://gerrit.libreoffice.org/c/core/+/88760 I am not sure how to edit the 2 HTML pages. are they part of the repository ?
(In reply to Mohamed Sameh from comment #12) > I have commited the change here https://gerrit.libreoffice.org/c/core/+/88760 Thanks! > I am not sure how to edit the 2 HTML pages. are they part of the repository ? It's in help [1]. You may see an introduction to Web-based help patching in bug 130572 comment 2. [1] https://gerrit.libreoffice.org/admin/repos/help
(In reply to Mike Kaganski from comment #13) > (In reply to Mohamed Sameh from comment #12) > > I have commited the change here https://gerrit.libreoffice.org/c/core/+/88760 > > Thanks! > > > I am not sure how to edit the 2 HTML pages. are they part of the repository ? > > It's in help [1]. You may see an introduction to Web-based help patching in > bug 130572 comment 2. > > [1] https://gerrit.libreoffice.org/admin/repos/help Thanks Mike! I cloned the help repo but I can not find guidelines on how to edit it. I opened the xhp file of the page we need to change but I don't know what to place as the id of the new items I am adding or if I am even supposed to be doing those edits manually or is there a tool to automate edits. example from xhp file: <tablecell> <paragraph xml-lang="en-US" id="par_id1668467" role="tablecontent" localize="false">###</paragraph> </tablecell>
(In reply to Mohamed Sameh from comment #14) I do those edits manually. The ids must be unique throughout the page, nothing else. You may hake the previous id and increment it.
Mohamed Sameh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/9414882dc22899a3fe0e13294a1b68885f055538 tdf#129878: replace error string for number format errors in Calc It will be available in 7.0.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
(In reply to Mike Kaganski from comment #1) > Additionally, the error code should be listed in both [1] and [2]. In [1], > it should be listed after ###, but before all the codes that have actual > error number in Calc, since it's not a spreadsheet error (detectable e.g. by > spreadsheet function ISERR), but a formatting (display) error, somewhat > similar to ###. > > [1] https://help.libreoffice.org/6.4/en-US/text/scalc/05/02140000.html > [2] https://help.libreoffice.org/6.4/en-US/text/shared/01/05020301.html I have added the new error code in [1] but I am not sure where to add it in [2]. Also the help repository does not come with logerrit to push commits so I don't know how to push my commits
(In reply to Mohamed Sameh from comment #17) > > [1] https://help.libreoffice.org/6.4/en-US/text/scalc/05/02140000.html > > [2] https://help.libreoffice.org/6.4/en-US/text/shared/01/05020301.html > > I have added the new error code in [1] but I am not sure where to add it in > [2]. Either under the relevant sections discussing the format codes that might result in the error (which I would prefer, something like "if formatted value is outside of range ..., then #FMT will be displayed" under percentage formatting), or as a separate section e.g. in the end of the whole page (like "Error codes", "Some format codes may result in "#FMT" shown when formatted value is outside of limits ..."). > Also the help repository does not come with logerrit to push commits so I > don't know how to push my commits Use this: > git push ssh://gerrit.libreoffice.org/help HEAD:refs/for/master
I finished the 2 files but I got The following error from the commit-msg hook when commiting. >.git/hooks/commit-msg: 2: Syntax error: newline unexpected
(In reply to Mohamed Sameh from comment #19) > I finished the 2 files but I got The following error from the commit-msg > hook when commiting. > >.git/hooks/commit-msg: 2: Syntax error: newline unexpected It sounds like you have an unexpected newline in your commit message. Can you git commit --amend it and somehow make it acceptable to the hook?
(In reply to Buovjaga from comment #20) > (In reply to Mohamed Sameh from comment #19) > > I finished the 2 files but I got The following error from the commit-msg > > hook when commiting. > > >.git/hooks/commit-msg: 2: Syntax error: newline unexpected > > It sounds like you have an unexpected newline in your commit message. Can > you git commit --amend it and somehow make it acceptable to the hook? I am sorry for replying late but I had a couple of busy days. I don't have any extra lines, I tried to edit and remove any extra space but no good. so, I commited bypassing the hook msg. However, I am unable to push >> git push ssh://gerrit.libreoffice.org/help HEAD:refs/for/master I am not sure what to replace refs/for/master with ?
(In reply to Mohamed Sameh from comment #21) > I don't have any extra lines, I tried to edit and remove any extra space but > no good. What is the contents of the hook? > so, I commited bypassing the hook msg. However, I am unable to push > >> git push ssh://gerrit.libreoffice.org/help HEAD:refs/for/master > I am not sure what to replace refs/for/master with ? You forgot to mention the problem you see - any error message? You can prepare the commit using Web UI in case something is really problematic with pushing to help...
(In reply to Mike Kaganski from comment #22) > (In reply to Mohamed Sameh from comment #21) > > I don't have any extra lines, I tried to edit and remove any extra space but > > no good. > > What is the contents of the hook? > > > so, I commited bypassing the hook msg. However, I am unable to push > > >> git push ssh://gerrit.libreoffice.org/help HEAD:refs/for/master > > I am not sure what to replace refs/for/master with ? > > You forgot to mention the problem you see - any error message? > > You can prepare the commit using Web UI in case something is really > problematic with pushing to help... The content of the commit message is between the double quotes " tdf#129878: Add FMT error code into help pages # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # Date: Mon Feb 17 07:44:12 2020 -0500 # # On branch easyhack129878 # Changes to be committed: # modified: source/text/scalc/05/02140000.xhp # modified: source/text/shared/01/05020301.xhp # " How do I access the Web UI ?
(In reply to Mohamed Sameh from comment #23) > How do I access the Web UI ? See comment 13
I did it through the web UI here is the link to the gerrit patch https://gerrit.libreoffice.org/c/help/+/89269
Mohamed Sameh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/help/commit/1936bfe6697be30202547a7775bda81d6b8d0211 tdf#129878: Add FMT error code into help pages
It's showing now "#FMT" Verified in Version: 7.0.2.0.0+ Build ID: b27137a7091104cce177791478e86d127680c9af CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3 Locale: ro-RO (ro_RO.UTF-8); UI: en-US Calc: threaded
Verified also in Version: 7.1.0.0.alpha0+ Build ID: d57b14e3394b081adf0888ed8dcb7b86d66c246c CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3 Locale: en-US (ro_RO.UTF-8); UI: en-US Calc: threaded
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/a6241e3f7585c3c1806df64d4c485afb47da68c4 tdf#129878: svl_qa_cppunit: Add unittest It will be available in 7.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.