[Solved] Evenly distribute text to columns
[Solved] Evenly distribute text to columns
I would like to turn off the default behavior of having text evenly distributed across columns.
I scoured through the API documentation and could not find the name of the property to do it.
Is there a way to accomplish this via the API?
Thanks!
Jason Wharton
I scoured through the API documentation and could not find the name of the property to do it.
Is there a way to accomplish this via the API?
Thanks!
Jason Wharton
Last edited by MrProgrammer on Sun Mar 26, 2023 6:17 pm, edited 1 time in total.
Reason: Tagged ✓ [Solved] -- MrProgrammer, forum moderator
Reason: Tagged ✓ [Solved] -- MrProgrammer, forum moderator
LibreOffice 6.2.3.2 on Windows 64
Re: API: columns: evenly distribute text issue
Please provide more details. Which application are you talking about?
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Re: API: columns: evenly distribute text issue
If you meant the Columns of the Writer:I would like to turn off the default behavior of having text evenly distributed across columns.
I scoured through the API documentation and could not find the name of the property to do it.
Is there a way to accomplish this via the API?
The text in the columns of a Writer document always will flow to the next column on a specific page. You can not control the text to flow from the first column of a page to the first column of the next page. There is not way to do this (I think).
You must use a Table in the writer document for this task. It is a workaround only...
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: API: columns: evenly distribute text issue
What I am talking about is in Writer where you can have multiple columns and control the behavior of how the text flows in them. One way it keeps them balanced out side by side. The other way fills the one column entirely before putting anything in the other column.
I have attached a screenshot of where it can be controlled via the settings.
I have attached a screenshot of where it can be controlled via the settings.
LibreOffice 6.2.3.2 on Windows 64
Re: API: columns: evenly distribute text issue
The macro record function gives the same result whether that's ticked or not - so it looks to be only available via the dialog.
You might be able to open the dialog and manipulate it using the Accessible Context of the dialog - it would be difficult, see Useful Macro Information
For OpenOffice.org By Andrew Pitonyak
An alternative might be write your own routine to do the moving.
You might be able to open the dialog and manipulate it using the Accessible Context of the dialog - it would be difficult, see Useful Macro Information
For OpenOffice.org By Andrew Pitonyak
An alternative might be write your own routine to do the moving.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Re: API: columns: evenly distribute text issue
I just discovered that handling multiple columns in body text and in the sections is fundamentally different in this point of view. (Same in the AOO an in LO.)
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: API: columns: evenly distribute text issue
... try the below code. The first one requires the cursor being in the multi column section
Good luck
ms777
Good luck
ms777
Code: Select all
Sub Main
oDoc = ThisComponent
oSection = oDoc.currentSelection.getByIndex(0).TextSection
oSection.DontBalanceTextColumns = not oSection.DontBalanceTextColumns
msgbox oSection.DontBalanceTextColumns
End Sub
Code: Select all
Sub Main
oDoc = ThisComponent
with oDoc.TextSections
for i=0 to .Count-1
.getByIndex(i).DontBalanceTextColumns = false
next i
end with
End Sub
Re: API: columns: evenly distribute text issue
There is no OpenOffice 6.2. The current "still" version of LibreOffice is 7.3.7.
The addressed issue is one of th UI. The actual balancing of contents for an existing TextSection is ruled by the attribute .DontBalanceTextColumns of the section object as @ms777 already showed.
As far as I can see, the 'Expert Configuration' also doesn't offer a switch making the "other" setting the default.
Relevant and consistent enhancement would require the implementation of Section styles.
The addressed issue is one of th UI. The actual balancing of contents for an existing TextSection is ruled by the attribute .DontBalanceTextColumns of the section object as @ms777 already showed.
As far as I can see, the 'Expert Configuration' also doesn't offer a switch making the "other" setting the default.
Relevant and consistent enhancement would require the implementation of Section styles.
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
---
Lupp from München
[Solved] Re: API: columns: evenly distribute text issue
.DontBalanceTextColumns is exactly what I needed!
I attached a screen shot of version that I am using.
Thanks everyone!
Jason Wharton
I attached a screen shot of version that I am using.
Thanks everyone!
Jason Wharton
- Attachments
-
- LibreOfficeAboutScreenShot.png (23.73 KiB) Viewed 768 times
LibreOffice 6.2.3.2 on Windows 64