Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | editengine: detection of script type uses incorrect range | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Draw | Reporter: | caolanm | ||||||||||
Component: | code | Assignee: | stefan.baltzer | ||||||||||
Status: | CLOSED FIXED | QA Contact: | issues@graphics <issues> | ||||||||||
Severity: | Trivial | ||||||||||||
Priority: | P3 | CC: | issues | ||||||||||
Version: | OOo 2.1 | ||||||||||||
Target Milestone: | OOo 2.3 | ||||||||||||
Hardware: | All | ||||||||||||
OS: | Linux, all | ||||||||||||
Issue Type: | PATCH | Latest Confirmation in: | --- | ||||||||||
Developer Difficulty: | --- | ||||||||||||
Issue Depends on: | |||||||||||||
Issue Blocks: | 78017 | ||||||||||||
Attachments: |
|
Description
caolanm
2006-12-07 09:58:42 UTC
Created attachment 41192 [details]
demo document
Created attachment 41193 [details]
patch to fix
Reassigned. Please handle. cl->tl: please evaluate and integrate if this patch is ok . The patch works for selected characters but not if one simply travels with the cursor from char to char. The following code works well with both cases: : for ( USHORT n = 0; n < rTypes.Count(); n++ ) : { -/+ if (rTypes[n].nStartPos <= nS && nE <= rTypes[n].nEndPos) : { : if ( rTypes[n].nScriptType != i18n::ScriptType::WEAK ) : { : nScriptType |= GetItemScriptType ( rTypes[n].nScriptType ); : } : else : { : if ( !nScriptType && n ) : { : // #93548# When starting with WEAK, use prev ScriptType... : nScriptType = rTypes[n-1].nScriptType; : } : } + break; : } : } Fixed in CWS tl37. Files changed: - svx/source/editeng/impedit2.cxx . The detection of the scripttype is fixed. For example copy the characters from the presentation sample document into a Writer text box. It still does not work as expected in Draw/Impress and Calc though! This is because sd and sc choose to overwrite that scriptype with the one from the keyboard input language. Which should not happen. Since I do not want to mess with the implementation of the use-keyboard-language feature I'm going to write separate issues to sd and sc. I submitted a follow-up for the remaining problem in Draw/Impress and Calc (see issue 77682). Created attachment 45557 [details]
document for testing
I'm not sure that the final fix was right either, what I think we want to get out of this function is the combination of scripts which are active for the selection. i.e. the sum of scripts which intersect with the selection. So if we have two scripts used inside the selection we want to get both of them back. While the final patch gets the script of the range which completely encloses the selection. As a side problem, when we have no selection, just a cursor to get the script of the previous character. Basically the selection of the previous character. cmc->tl/mru: I think the above document and ctrl+a and change fontsize should show what I mean. In a mixed script selection in the workspace install sets I think only the western script will change size, not both of them. Does the below attached patch seem plausible instead ? or maybe I'm wrong and the above testcase shows no regression ? Created attachment 45558 [details]
patch
TL->CMC: I see the problem. Still that problem is a new one entirely different from the original one described in this issue. Thus the original problem is fixed and the new found issue should not prevent this CWS from being integrated. Please submit the patch to the new problem in an issue of it's own. Thanks in advance! done, issue 78017 Reassigned to SBA. SBA: Verified in CWS tl37. closed |