View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0013490 | Scribus | Story Editor / Text Frames | public | 2015-11-02 07:40 | 2015-11-18 18:09 |
Reporter | aliyousuf | Assigned To | cbradney | ||
Priority | high | Severity | text | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | ubuntu 14.04 | ||||
Product Version | 1.5.1svn | ||||
Fixed in Version | 1.5.1svn | ||||
Summary | 0013490: after inserting a footnote before an existing footnote the format of the new footnote text is wrong | ||||
Description | create doc create text frame insert paragraph insert footnote in the middle of paragraph type text for footnote insert footnote in the first of paragraph type text for footnote Than see the size footnote character in the first of paragraph | ||||
Tags | HOST-Oman, patch_tested_ok | ||||
Patch | No | ||||
|
|
|
|
|
I tried to give a solution for this issue. Are superscript text in footnote important? |
|
>> Are superscript text in footnote important? Yes, superscript is important. |
|
why? |
|
Because footnote indexes are usually layouted using superscript. |
|
I dont understand exactly your report. On your screenshots, both footnote looks the same size. What exactly is the issue ? |
|
|
|
that Image when apply the patch file but look at the problem.png |
|
ok, it's now clear where the issue is! i had a test at it and it's not related to the end of the paragraph... i'll fix the title of this ticket. |
|
I confirm the issue. I tested the patch and found it's not OK - in the footnote text, the recall of the note is not superscript anymore (the little "1)" in the footnote frame) - when the 2nd note is inserted, it inserts 3 or 4 footnotes lines in the footnote frame at once !! Not sure if patch is that bad, or if there's something wrong with my current source. Cant somebody else test ? aliyousouf : the footnote recall [ = little "1)" in the footnote frame ] should be superscript. Is it superscript when you test your patch ??? |
|
I tried to give a solution for this issue. please have a look to the patch |
|
Aliyousouf : have you tested your new patch intensively ? Does it fix both of the issues i have found in your previous patch ? Have you found that it fixes all obvious issues related to guides management history recording and undo ? Have you found out that it doesnt introduce new issues ? |
|
yes |
|
you can check it |
|
And I used "superscript" for all footnote indexes |
|
the problem , there are an other style when insert footnote text but I put "superscript" for all footnote text . |
|
mmm.. footnote text should not be superscript. only the mark... |
|
ale,you mean that the first patch is correct |
|
hi aliyousuf, as of yesterday discussion on irc, it seems that the issue is more complex than what can be fixed by a simple on/off switch in the code. if you want, we can sit down (in a virtual way, of course!) and try to go through what happens in Scribus and what is in the code to figure out. i can help you finding out what the problem is and how to solve it, but i want that it's you who does the research and the patch. i can teach how to look for use cases that help you understand where to put your attention and what you can do there. one of the bigger steps has already been done by you! you have found out where the given text is layouted. now, we have to define what the issue exactly is and find out why the wrong result is given. i estimate that it will take two to three more hours of fully concentrated work to get there. if you're ready to dive into it, please ping me on irc and we will try to find a day and time when we can both be available for this! |
|
If you look at the "pagitem_textframe.cpp" at line 1519 we can see this code: StyleFlag s(itemText.charStyle(a).effects()); if (mark->isType(MARKNoteMasterType)) { if (nStyle->isSuperscriptInMaster()) s |= ScStyle_Superscript; else s &= ~ScStyle_Superscript; } else { if (nStyle->isSuperscriptInNote()) s |= ScStyle_Superscript; else s &= ~ScStyle_Superscript; } if (s != itemText.charStyle(a).effects()) { CharStyle haveSuperscript; haveSuperscript.setFeatures(s.featureList()); itemText.applyCharStyle(a, 1, haveSuperscript); } On the above code, the style of mark note characters are changed to superscript on both frames (master frame and note frame). If we look at file "pagitem_textframe.cpp" at line 1621: CharStyle charStyle = ((itemText.text(a) != SpecialChars::PARSEP) ? itemText.charStyle(a) : style.charStyle()); On the above code, the style of characters on both frames (master frame and note frame) is applied. If we change this code to "CharStyle charStyle = style.charStyle();", superscript on footnote frame and master frame mark is not applied. If we change this code to "CharStyle charStyle = itemText.charStyle(a);" the superscript will be applied to both, footnote frame text and master frame mark. Thus, I implemented this code to give all footnotes text superscript style. if (isNoteFrame()) { StyleFlag s(itemText.charStyle(a).effects()); s |= ScStyle_Superscript; CharStyle haveSuperscript; haveSuperscript.setFeatures(s.featureList()); itemText.applyCharStyle(a, 1, haveSuperscript); } |
|
if i understand your code correctly you're only exploring the case that - you have found the cause of the bug - there is a single point where you need to make a switch and you get to the solution. i don't think that the bug is simply in the part applying (or not) the superscript. i have tried a few use cases and it seems that the bug is (at least also) at a different place. the offer to discuss how to tackle this bug is still open. ping me on irc and we can make an appointment for a deeper discussion on the topic. |
|
sorry, aliyousuf, after re-reading your comment above, i think that you now are heading in a good direction. checking the styles is a much better idea than focusing on the superscript. i cannot judge your code (even if at first sight it does not look 100% to me), but the styles are for sure a part of the solution. |
|
please say in case there is a tested correct code to be tested. please say also in case we should delete one of the wrong provided patch. |
|
please test my patch. apply the second patch |
|
Patch tested and NOT OK. With your patch, the whole footnote is superscript when only the footnote recall should be. AMOF ale allready tested your patch and said it was wrong and explained to you why on 2015-11-05 10:55 : « mmm.. footnote text should not be superscript. only the mark... » as can be seen http://bugs.scribus.net/view.php?id=13490#c37245 And AMOF you have not provided a new patch and your patch is now rejected for same reason. :-( If that's not clear to you, please look at http://www.atlantiswordprocessor.com/en/help/images/footnotes_35.png : text layout is kindof the expected default result. Note that this is only the default result look, because notes styles are user-defined in the "Edit" > "Note styles" menu entry : this is where you define the styles to be applied for the notecall mark in the text and the noterecall mark in the footnote. This is where "superscript" is choosen or not, for the mark in the text and/or in the footnote. The "mark character style" should be applied only to the mark (= note recall), and the "Note paragraph style" should be applied to the whole note paragraph. |
|
issue.patch (759 bytes)
Index: scribus/pageitem_textframe.cpp =================================================================== --- scribus/pageitem_textframe.cpp (revision 20548) +++ scribus/pageitem_textframe.cpp (working copy) @@ -1618,6 +1618,14 @@ } if (current.itemsInLine == 0) opticalMargins = style.opticalMargins(); + if (isNoteFrame() && !mark) + { + StyleFlag s(itemText.charStyle(a).effects()); + s &= ~ScStyle_Superscript; + CharStyle haveSuperscript; + haveSuperscript.setFeatures(s.featureList()); + itemText.applyCharStyle(a, 1, haveSuperscript); + } CharStyle charStyle = ((itemText.text(a) != SpecialChars::PARSEP) ? itemText.charStyle(a) : style.charStyle()); chstr = ExpandToken(a); int chstrLen = chstr.length(); |
|
JLuc,I do what you want? I upload issue.patch file. that is answer for this issue. |
|
This is correct patch (issue.patch [^] (759 bytes) 2015-11-12 06:07) |
|
Yes it works now ! AliYousuf : thanks for going on and providing a fix. Devs : please have a look and merge. |
|
Please test fix and report |
|
Fix committed by Craing in r20550 Patch proposed by aliyousuf :) Thank you. Closing. |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-11-02 07:40 | aliyousuf | New Issue | |
2015-11-03 11:08 | aliyousuf | File Added: issue13490.patch | |
2015-11-03 11:09 | aliyousuf | File Added: Screenshot from 2015-11-03 14:57:54.png | |
2015-11-03 11:09 | aliyousuf | File Added: Screenshot from 2015-11-03 14:58:40.png | |
2015-11-03 11:30 | aliyousuf | Note Added: 0037175 | |
2015-11-03 12:20 | jghali | Note Added: 0037176 | |
2015-11-03 13:08 | aliyousuf | Note Added: 0037181 | |
2015-11-03 13:21 | jghali | Note Added: 0037182 | |
2015-11-03 13:25 | jghali | Note Edited: 0037182 | |
2015-11-04 10:01 | JLuc | Note Added: 0037213 | |
2015-11-04 10:29 | aliyousuf | File Added: problem.png | |
2015-11-04 11:06 | aliyousuf | Note Added: 0037214 | |
2015-11-04 13:49 | ale | Note Added: 0037217 | |
2015-11-04 13:50 | ale | Summary | insert footnote in the middle of paragraph and insert footnote in the first of paragraph the size of character is different => after inserting a footnote before an existing footnote the format of the new footnote text is wrong |
2015-11-04 14:56 | JLuc | Note Added: 0037218 | |
2015-11-04 15:20 | JLuc | Note Edited: 0037218 | |
2015-11-05 05:46 | aliyousuf | Tag Attached: HOST-Oman | |
2015-11-05 05:47 | aliyousuf | File Added: 0013490.patch | |
2015-11-05 05:47 | aliyousuf | Note Added: 0037236 | |
2015-11-05 08:38 | JLuc | Note Added: 0037239 | |
2015-11-05 08:39 | JLuc | Note Edited: 0037239 | |
2015-11-05 08:54 | aliyousuf | Note Added: 0037241 | |
2015-11-05 08:55 | aliyousuf | Note Added: 0037242 | |
2015-11-05 09:09 | aliyousuf | Note Added: 0037243 | |
2015-11-05 09:14 | aliyousuf | Note Added: 0037244 | |
2015-11-05 09:55 | ale | Note Added: 0037245 | |
2015-11-05 12:23 | Kunda | Sticky Issue | No => Yes |
2015-11-06 17:11 | aliyousuf | Note Added: 0037286 | |
2015-11-07 07:46 | ale | Note Added: 0037296 | |
2015-11-07 11:31 | Kunda | Relationship added | related to 0013092 |
2015-11-09 06:49 | aliyousuf | Note Added: 0037332 | |
2015-11-09 10:19 | ale | Note Added: 0037335 | |
2015-11-09 10:56 | ale | Note Edited: 0037335 | |
2015-11-09 10:57 | ale | Note Edited: 0037335 | |
2015-11-09 11:00 | ale | Note Added: 0037338 | |
2015-11-09 19:12 | JLuc | Note Added: 0037354 | |
2015-11-10 17:26 | aliyousuf | Note Added: 0037393 | |
2015-11-10 21:27 | JLuc | Note Added: 0037403 | |
2015-11-10 21:28 | JLuc | Note Edited: 0037403 | |
2015-11-10 21:32 | JLuc | Note Edited: 0037403 | |
2015-11-11 05:26 | aliyousuf | Note Edited: 0037393 | |
2015-11-12 05:07 | aliyousuf | File Added: issue.patch | |
2015-11-12 05:11 | aliyousuf | Note Added: 0037439 | |
2015-11-12 07:34 | aliyousuf | Note Added: 0037441 | |
2015-11-12 09:43 | JLuc | File Deleted: issue13490.patch | |
2015-11-12 09:43 | JLuc | File Deleted: 0013490.patch | |
2015-11-12 09:46 | JLuc | Note Added: 0037450 | |
2015-11-12 09:46 | JLuc | Tag Attached: patch_tested_ok | |
2015-11-12 22:00 | cbradney | Status | new => resolved |
2015-11-12 22:00 | cbradney | Fixed in Version | => 1.5.1svn |
2015-11-12 22:00 | cbradney | Resolution | open => fixed |
2015-11-12 22:00 | cbradney | Assigned To | => cbradney |
2015-11-12 22:03 | Kunda | Sticky Issue | Yes => No |
2015-11-13 01:25 | Kunda | Relationship added | child of 0012496 |
2015-11-14 13:09 | Kunda | Note Added: 0037477 | |
2015-11-18 18:09 | Kunda | Note Added: 0037537 | |
2015-11-18 18:09 | Kunda | Status | resolved => closed |