To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=60594
------- Additional comments from [EMAIL PROTECTED] Wed Apr 9 11:35:07 +0000 2008 ------- fme->hennerdrewes: Thank you for your patch. I see. If called from the text formatting, the code still returns the number of kashida positions inside the given text range., because pKernArray = 0, nSpaceAdd = 0, nMinKashidaWidth = 0. The second case - the function is called from fntcache.cxx for cursor calculation of text painting - works as follows: First (like in the first case), we calculate the number of kashidas in the text range. If we find, that the space provided for the kashidas is smaller than a nMinKashidaWidth and there is more than one kashida in the text range, we start discarding the kashida positions at the beginning of the text range, as long as the nSpaceAdd value for the remaining kashidas is < nMinKashidaWidth. Sounds reasonable. I would suggest to proceed as follows: In CalcNewBlock(), the nSpaceAdd value for each text line is stored at the SwLineLayoutPortion. After this calculation has been performed, we know the nSpaceAdd value for this line based on the assumption, that each possible kashida position can be used. Here we need to insert some new code that iterates over the text portions in the current line (SwTxtAttrIterator), checks which font will be used for the portion, get the minimum kashida width for that font. If the minimum kashida width is smaller than the calculated nSpaceAdd value stored at the SwLineLayout, we should start to mark some of the kashida positions in the SwScriptInfo structure as invalid, just as you proposed. Then the nSpaceAdd value for storing at the SwLineLayout will be calculated again until we can make sure that nSpaceAdd > the minimum kashida width for all the text portions in the current line. If we proceed this way, I think we can keep the original version of KashidaJustify(). One more note: Each time CalcNewBlock is executed, we first have to reset the invalid flags for the kashida postions located in the current line. What do you think? --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
