Bug 125933 - Text inside a text box does not align, when using the alignment commands.
Summary: Text inside a text box does not align, when using the alignment commands.
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
6.2.4.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-15 03:52 UTC by Roshan W
Modified: 2019-06-15 13:39 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Test file with applied alignments (15.98 KB, application/vnd.oasis.opendocument.presentation)
2019-06-15 13:39 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roshan W 2019-06-15 03:52:00 UTC
Description:
I created a text box in Libreoffice impress and typed some content inside. and then I tried to use the text alignment in the toolbox, and they did not work. I tried the short keys ctrl+R and ctrl +e too. 

I did some googling over the issue, what I found was related to openoffice, which said I have to change the anchoring settings, so I  did  select the text box > Right click > text... (context menu) and selected the text anchoring to center. (screenshot attached). Then the text was centered,but again I could not use the toolbar buttons to align it left, right or justify. 


Also I checked the styles by right clicking > click styles > text tab (graphic styles:default dialog box), and there I saw full width is enabled in the anchoring options. 

Another thing is that this is not applicable for layout-generated text boxes, only applicable for the drawn text boxes using the text box tool.



Steps to Reproduce:
1.create a text box and type something inside.
2.select the textbox, and try to align the text to center, using the toolbar buttons.
3.right click on textbox > go to text.. > (dialog box) set text anchoring to center. Then the text will be centered.
4. try step 2 again, to align the text to left or right, using the toolbar buttons, or short keys ( Ctrl + L or Ctrl + R) and they do not work



Actual Results:
eventhough the toolbar buttons will indicate the text is aligned, it does not happen. 

Expected Results:
The text should align to the directed sides, when clicking on the toolbar buttons (center, left or right)


Reproducible: Always


User Profile Reset: Yes



Additional Info:
when we select the text box and click any of the alignment buttons, the text inside the box should be aligned accordingly. 

When we select the text box > rigt click > click text... > and change the anchor to full width (click on check box), then all the alignment buttons work successfully after that. But I checked the general settings for that, which is found when right click > styles > text tab (graphic styles:default dialog box), and the full width option is enabled by default.

Another thing is that this is not applicable for layout-generated text boxes, only applicable for the drawn text boxes using the text box tool.
Comment 1 V Stuart Foote 2019-06-15 13:14:08 UTC
A Text box is a sd Drawing object. When the object is selected (the 8 active frame grabs show) you are not changing the text--just its frame.

You get visual indicator of the changed target, e.g. the grabs, context sensitive toolbars, sidebar deck. That is when in default View -> User Interface "Standard toolbar' UI, selecting the sd Text box will toggle UI from the 'Text Formatting' toolbar to the 'Drawing' toolbar.

Meaning, if you are changing the text held by the draw Text box, or any other draw shape in use in Impress (or any other LO module) you need to be in the correct edit mode--i.e. Text box active (frame border showing, but no grabs) and text cursor displayed.  Toolbar buttons, standard menu Format -> Align, and the shortcuts all function in the text edit mode.

=-testing-=
Windows 10 Home 64-bit en-US with
Version: 6.2.4.2 (x64)
Build ID: 2412653d852ce75f65fbfa83fb7e7b669a126d64
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded

also with current master/6.4.0
Comment 2 Regina Henschel 2019-06-15 13:39:39 UTC
Created attachment 152211 [details]
Test file with applied alignments

Your tries mix-up several distinct settings.

If you click into the text so that you have a cursor, you will see the outline of a rectangle. That is the area, where text can be positioned. The menu item "Text..." provides the settings "Spacing to border". They determine the distances of this theoretical text area from the edges of the shape.

Now think of a rectangle around your text. The settings in "Text Anchor" determine where this rectangle is placed inside the above mentioned area.

If the option "Full width" is checked, this current-text-rectangle has the same width as the theoretical text area. Then 'left' or 'right' makes no sense and therefore the UI only provides the three center options. If the option "Full width" is not checked, the current-text-rectangle is a tight rectangle around the text. That means, that it is as wide as the longest line. In that case all nine positions are possible.

Inside the current-text-rectangle the settings of the paragraph determine the alignment of the paragraph. Click into the text so that you have a cursor, which means, the shape is in text edit mode. Now you can use the toolbar icons to change the alignment of the paragraph, but only inside the above mentioned 'current-text-rectangle'.

The shape style provides only an initial setting for all paragraphs together. If you want different alignment of paragraphs in the same shape, you have to apply the alignment directly to the paragraph.