Add extra columns when converting text to table in Writer
Miklos Vajna
vmiklos at collabora.com
Thu Jul 17 07:00:50 UTC 2025
Hi,
On Wed, Jul 16, 2025 at 04:12:26PM +0800, Lodev <lodev at ossii.com.tw> wrote:
> We also found that (hope it's correct) the core implementation might be in
> SwNodes::TextToTable() in sw/source/core/docnode/ndtbl.cxx.
That sounds plausible, yes.
The only trick is that there is no "column" in the Writer table model:
it's really a set of rows, and each row has a set of cells. A column
only exists at a UI level.
> Could anyone please give us some instructions and hints about what we should
> do if we want to add (a certain number of) empty cells after each row?
The usual places to look at is the UI's insert table dialog or the ODT
import filter, since those create table cells, too.
One edge case may be to find out what to do when your table already
takes all the horizontal space available: if you add more columns at the
end, then how do you make space for them? Do you proportionally scale
down the existing cells? Something else?
Regards,
Miklos
More information about the LibreOffice
mailing list