Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | [From Symphony] The left-style columns display with the same width when opening with AOO | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Writer | Reporter: | xiao ting xiao <tingxiaox> | ||||||||||
Component: | open-import | Assignee: | Andre <awf.aoo> | ||||||||||
Status: | CLOSED FIXED | QA Contact: | |||||||||||
Severity: | Normal | ||||||||||||
Priority: | P3 | CC: | awf.aoo, bjdujing, liushenf, orw, wujinlong | ||||||||||
Version: | 3.4.0 | ||||||||||||
Target Milestone: | 4.0.0 | ||||||||||||
Hardware: | PC | ||||||||||||
OS: | All | ||||||||||||
Issue Type: | DEFECT | Latest Confirmation in: | --- | ||||||||||
Developer Difficulty: | --- | ||||||||||||
Attachments: |
|
Created attachment 77810 [details]
screenshot in MS
Created attachment 77811 [details]
screenshot in AOO
Created attachment 78424 [details]
Patch
Root case: the column width calculation logic miss the case for two columns.
Resolution: Correct the column width calculation entry condition to make the column calculation correct.
I am not really familiar with Writer code but it looks like m_nColumnCount is off by one by design, indicated by loops like for( sal_Int32 nCol = 0; nCol <= m_nColumnCount; ++nCol) ... With that in mind I understand the patch, but the original code looks like an error, ie the comparison if ( ... sal_Int32(m_aColDistance.size()) == m_nColumnCount) ...) looks like it should be if ( ... sal_Int32(m_aColDistance.size()) == m_nColumnCount+1) ...) which is basically what the patch does. My question is this: why not remove the sal_Int32(m_aColDistance.size()) == m_nColumnCount) part from the if-statement? @wujinlong: Can you give an answer to the question in my last comment? @wijinlong: Do you have any feedback on Andre's comment? Hi Andre, Sorry for late response. I did some debug today, and found that 1) if there is 2 columns, m_nColumnCount = 1 m_aColDistance.size() = 2 2) if there is n (n>2) columns, m_nColumnCount = n -1 m_aColDistance.size() = n - 1 So the original logic is correct if columns number > 2. While this fix is to handle the special case for 2 columns. So we need these 2 conditions, and they are OR relationship in logic. The first one is for columns > 2, and the second is specific for columns = 2. ((sal_Int32(m_aColDistance.size()) == m_nColumnCount) || (sal_Int32(m_aColDistance.size()) == m_nColumnCount + 1)) ) Thanks! "af" committed SVN revision 1378848 into trunk: #i119592# Fixed column widths. Applied the patch. verified on the AOO3.5_r1380171 set Target Milestone to AOO 3.5.0 for PM purpose. |
Created attachment 77809 [details] ColumnsLeft Steps: 1. Open the attached docx sample files. 2. Check the two columns in the page 1. Defect: The two columns are equal in width,instead of the expected left-style coloumns set in ms2010. Please see screenshots for detail information.