Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | [From Symphony]Cannot open sample file | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Writer | Reporter: | Yan Ji <yanji.yj> | ||||||
Component: | open-import | Assignee: | Oliver-Rainer Wittmann <orw> | ||||||
Status: | CLOSED FIXED | QA Contact: | |||||||
Severity: | Major | ||||||||
Priority: | P3 | CC: | bjdujing, jingbaibetsy, liushenf, orw | ||||||
Version: | 3.4.0 | ||||||||
Target Milestone: | 4.0.0 | ||||||||
Hardware: | PC | ||||||||
OS: | All | ||||||||
Issue Type: | DEFECT | Latest Confirmation in: | --- | ||||||
Developer Difficulty: | --- | ||||||||
Issue Depends on: | |||||||||
Issue Blocks: | 120823 | ||||||||
Attachments: |
|
Created attachment 78290 [details]
patch
Patch to fix the defect
Root cause: The function lcl_CalcAutoWidth() which is used to calculate the width of a fly frame is incorrect, the function uses SwTxtFrm::CalcFitToContent() to calculate the width of the paragraphs inside the fly frame, then add the left and right margin sizes to get the total width of the fly frame. But the SwTxtFrm::CalcFitToContent() method will return the total width (Print area width) of the SwTxtFrm when the SwTxtFrm is in the lock state, Add the left and right margin sizes to the return value of SwTxtFrm::CalcFitToContent() will cause the algorithm think the fly frame can not contain the text in it, so it will keep split the text to fit them into the fly frame which will cause AOO freeze.
Solution: Don't add the margin sizes to the SwTxtFrm::CalcFitToContent() return value when the SwTxtFrm is locked.
taking over to review patch Comment on attachment 78290 [details]
patch
review done. patch looks good and solves the problem.
I will apply the patch on trunk.
"orw" committed SVN revision 1359607 into trunk: #119952# - method <lcl_CalcAutoWidth(..)> - do not provide width of text fram... applied patch on trunk verified on the AOO3.5 set Target Milestone to AOO 3.5.0 for PM purpose. |
Created attachment 78246 [details] sample Build: AOO3.4 Defect: Cannot open attached sample file