Issue 119952 - [From Symphony]Cannot open sample file
Summary: [From Symphony]Cannot open sample file
Alias: None
Product: Writer
Classification: Application
Component: open-import (show other issues)
Version: 3.4.0
Hardware: PC All
: P3 Major (vote)
Target Milestone: 4.0.0
Assignee: Oliver-Rainer Wittmann
QA Contact:
Depends on:
Blocks: 120823
  Show dependency tree
Reported: 2012-06-12 06:29 UTC by Yan Ji
Modified: 2012-10-09 09:39 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

sample (116.50 KB, application/msword)
2012-06-12 06:29 UTC, Yan Ji
no flags Details
patch (715 bytes, patch)
2012-06-13 09:01 UTC, qiuhuaidong
orw: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Yan Ji 2012-06-12 06:29:55 UTC
Created attachment 78246 [details]

Build: AOO3.4

Defect: Cannot open attached sample file
Comment 1 qiuhuaidong 2012-06-13 09:01:12 UTC
Created attachment 78290 [details]

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.
Comment 2 Oliver-Rainer Wittmann 2012-07-09 17:14:04 UTC
taking over to review patch
Comment 3 Oliver-Rainer Wittmann 2012-07-10 11:23:56 UTC
Comment on attachment 78290 [details]

review done. patch looks good and solves the problem.
I will apply the patch on trunk.
Comment 4 SVN Robot 2012-07-10 11:34:44 UTC
"orw" committed SVN revision 1359607 into trunk:
#119952# - method <lcl_CalcAutoWidth(..)> - do not provide width of text fram...
Comment 5 Oliver-Rainer Wittmann 2012-07-10 11:35:49 UTC
applied patch on trunk
Comment 6 Du Jing 2012-08-20 07:56:44 UTC
verified on the AOO3.5
Comment 7 Shenfeng Liu 2012-10-09 09:38:55 UTC
set Target Milestone to AOO 3.5.0 for PM purpose.