Apache OpenOffice (AOO) Bugzilla – Issue 106214
text alignment in tables
Last modified: 2017-05-20 10:29:14 UTC
I create a drawing and inserted a table. After inserting text I changed the alignment of them to center. Jumping into the cell for editing, the text is centered. Leaving the cell the text switches to left alingment. I remember, this came first in after changing from DEV300m61 to DEV400m62. Dietmar
Created attachment 65552 [details] sample for incorrect alignment
Also exproting the document to pdf shows a incorrect text alignment in the table.
Reproducible with "Ooo-Dev 3.2.0 multilingual version German UI WIN XP: [OOO320m2 (Build 9432)]"! Works fine with "Ooo 3.1.0 WIN XP DE-multilingual version German UI activated [OOO310m11 (Build 9399)]" Related to Issue 105508?
.
Reproducible. Reassigned.
cl->aw: another regression between text edit mode and display mode from m61 to m62. In this case the text edit mode is correct. Text alignment in table cells should honor the column width and not the text width like in text shapes. I'm nominating this as a OOo 3.2 showstopper
AW: Taking a look. Central point for CellText layouting is SdrTextObj::impDecomposeBlockTextPrimitive. Added to ooo32gsl03, prepared for work, looking...
Created attachment 65685 [details] Proposed fix
AW: Found. Need to set Min, Max and PaperSize at the Outliner to get the corrcet layout. The MinPaperSize was missing. Added, committed, added patch as attachment. Done.
Great, many thanks. Dietmar
AW: Checked in ooo32gsl03 build, works as expected. AW->WG: Please verify.
Verified in CWS.
cl->aw: this fix breaks the vertical alignment in tables create a new table (2x2 f.e.), resize it larger, enter a short word in the first cell, from context menu choose Cell/Center. In text edit mode the text is correctly vertically centered. Leaving text edit mode the text swaps to the top.
reassigned
AW: Took a look, indeed, it kills the vertical align. I have to admit that i was not aware of vertical alignment in tables yet... Already experimented and the prev fix to set SetMinAutoPaperSize to aAnchorTextSize is too strong for Cell formatting. MinAutoPaperSize needs to be set to zero (grow) in vertical (Y) for horizontal text (!bVerticalWritintg) and vice versa (Yes, it's irritating, but this may be due to old EditEngine/Outliner). Waiting for CWS ooo32gsl07 where i will handle this task...
AW: Adapted SdrTextObj::impDecomposeBlockTextPrimitive accordingly; the MinAutoPaperSize is now set only for the relevant parts. Checked, works as expected. Commited, done.
AW: Checked unxlngi6.pro version, works as expected. AW->HI: Please verify in CWS. Simplest way: Impress, instert table (2x2), make big (nearly as the page), klick in top-left area, type a word. Klick on 'centered' in the text toolbar, click on 'Cebter (vertical)' in the table toolbar -> word is now centered in X and Y. Klick out of table -> it stays centered. Without the fix, it loses vertical center when TextEdit is deactivated.
Verified with cws ooo32gsl07 = ok