Issue 120999

Summary: Cannot resize AutoGrowWidth text shape in the first try
Product: Draw Reporter: Armin Le Grand <Armin.Le.Grand>
Component: editingAssignee: Armin Le Grand <Armin.Le.Grand>
Status: CLOSED FIXED QA Contact:
Severity: Normal    
Priority: P3 CC: louqingle
Version: 4.0.0-dev   
Target Milestone: 4.0.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Issue Depends on:    
Issue Blocks: 121365, 121373    

Description Armin Le Grand 2012-09-18 02:06:55 UTC
ALG: To reproduce:
- Open Draw/Impress
- create a new text object (click on text in the bottom toolbar, then somewhere on the page to start text edit, do *not* give it a width so that it will auto grow)
- type some text
- press ESC (to get to object selected mode)
- try to make it smaller (less width) with e.g. the right handle

-> it will snap back to it's original size

Interestingly, repeating the same action after this *will* work now in the 2nd try. This is because the AutoGrowWidth aleady got reset. This indicates that there is code to reset that flag, but it is executed too late. The first action should already let the use resize the object.

The user clearly expresses with the action he triggers what he wants to do, so always respect user input. Since it *can* be resized in the 2nd try, it looks like an error, it should be possible in the first try. Denying resize in the first try is a bad user experience.
Comment 1 Armin Le Grand 2012-09-18 02:10:59 UTC
ALG: Taking a look...
Comment 2 Armin Le Grand 2012-09-18 06:04:43 UTC
ALG: The reason is that there is code to reset AutoGrowWidth on the object, but it is set at a cloned object with the new overlay dragging. When creating a new clone, only the geometry is applied to it. Internal changes like this indirect item change will get lost.
Ading some code to SdrDragObjOwn implementaion which is in charge of creating and setting up the clones.
Comment 3 SVN Robot 2012-09-19 01:56:22 UTC
"alg" committed SVN revision 1387434 into trunk:
#120999# Added support code in SdrDragObjOwn::MoveSdrDrag to rescue the chang...
Comment 4 Armin Le Grand 2012-09-19 06:10:47 UTC
ALG: Saving AutoGrowWidth inside SdrDragObjOwn::MoveSdrDrag and applying it to newly create clones and the original. This saves the problem, the shape can be resized on the first try.
Comitted, done.
Comment 5 louqle 2012-11-22 00:55:16 UTC
verified in build 1409708 on Win7, suse 11 sp1 and Mac 10.7, the text box can be resized at the first try.