Issue 54248

Summary: Table alignment changes when using "optimal column width"
Product: Writer Reporter: skelem <steve>
Component: formattingAssignee: michael.ruess
Status: CLOSED FIXED QA Contact: issues@sw <issues>
Severity: Trivial    
Priority: P3 CC: chengxiuzhi, don.troodon, ecastro, issues, jian.li, jonathan.n.mills, liujiaxiang, peter.junge
Version: OOO 2.0 Beta2Keywords: oooqa, usability
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: PATCH Latest Confirmation in: ---
Developer Difficulty: ---
Issue Depends on:    
Issue Blocks: 72764    
Attachments:
Description Flags
patch file
none
patch 2 for this issue none

Description skelem 2005-09-05 20:13:10 UTC
Create a new table.  Size 2x2 will do.  It takes up the width of the document.
Enter some short text in each cell.
Select Table/Table Properties.  A dialog titled "Table Format" appears  (instead
of matching the Table Properties name).
Select the Table tab. Select Alignment=Center.
Click OK.
Select Table/AutoFit/Optimal Column Width.
The table becomes left-aligned on the page.
Select Table/Table Properties/Table.
The Alignment was changed to Manual!
The alignment should have stayed at Center!
Comment 1 ecastro 2006-01-15 18:24:35 UTC
Hi skelem,
Your problem is reproducible. In fact, it is the standard behaviour for tables
in OOo (either 1.1x or 2.x series). The "whole table" alignment setting is not a
property of the table (so it will stay centered whatever resizing you perform on
the table), but a command. After a alignment setting, if you change the size,
width, of the table, moving columns, the alignment revert to "manual". The
preserved magnitude is teh position of the left border of the table, from thedre
colums are added and end as dictated by the sum of columns widths.
This was so in 1.1.x, on linux and Windows. So this is not a bug.

However, I understand your surprise. If a text paragraph is set as "centered"
then if you type more words they move to maintain line centered. The paragraph
is not reverted to "left". 
I do agree that tables should behave in the same way. Whether columns get wider
or thinner, the alignment of the whole table must be preserved, changing the
position of the  left and right borders of the table as needed.

This is an RFE; a request for enhancement.
The motivations for the RFE are two:
a) maintaining the consistency of the interface: This is the way tables will
behave as text lines. Now they are different (frustrating expectatives)
b) the improvement of usability: in this way reformating a table will requiere
less manual work. Now after each change to any column width it is needed to
manually re-set the alignment attibute. 

Enrique



Enrique



Comment 2 michael.ruess 2006-01-16 17:03:02 UTC
MRU->OS: when changing the table width by an automatism like "optimal column
width", the alignment of the table should not be changed.
Comment 3 Oliver Specht 2006-07-03 09:08:25 UTC
Reassigned to FME
Comment 4 jian.li 2008-01-14 05:51:37 UTC
lijian->fme:
I am not sure what should be correct for this issue.
Do you mean that the alignment should be always the one
before "optimal column width" ?
Comment 5 frank.meies 2008-01-14 07:23:32 UTC
fme->lijian: Yes, I think that's what this issue is about.
Comment 6 jian.li 2008-01-18 07:51:07 UTC
Created attachment 50954 [details]
patch file
Comment 7 jian.li 2008-01-18 07:53:57 UTC
lijian->fme:
Here is a patch. Please have a look. Thank you!
Comment 8 jian.li 2008-01-21 07:27:56 UTC
Created attachment 51039 [details]
patch 2 for this issue
Comment 9 jian.li 2008-01-21 07:29:55 UTC
lijian->fme:
Another patch. Please have a look. Thank you!
Comment 10 frank.meies 2008-01-21 07:56:18 UTC
fme->lijian: Thank you, looks perfect. I'll add this patch to cws sw30bf01.

Fixed in cws sw30bf01, ndtbl1.cxx rev. 1.20.146.1
Comment 11 jian.li 2008-01-21 08:12:05 UTC
lijian->fme:
It seems that I am using a very old code version(m196).
I think I'd better using m241 afterwards. :-)
Comment 12 frank.meies 2008-02-05 09:10:45 UTC
Ready for QA.
Comment 13 michael.ruess 2008-03-11 15:59:02 UTC
Verified in CWS sw30bf01.
Comment 14 michael.ruess 2008-03-27 16:23:33 UTC
Checked fix in DEV300m5.