Impress: divide rectangles with horizontal or vertical lines?

In my diagrams I frequently have need to draw a rectangle and then divide up the interior with horizontal or vertical lines (sometimes both). Some times equally spaced sometimes not. I can do this manually just by drawing lines, but getting them perpendicular to and exactly touch the rectangle boundary is time consuming and error prone.

Is there some way to do this more easily?

Hold down Shift while drawing line to constrain it.

If Snap is on and rectangle size matches snap divisions then line will also snap to match divisions

Have you tried with tables? A drawback is that a table (afaik) can’t be converted to curves.

To get lines perpendicular drag while holding Shift. And to touch the rectangle boundary, choose menu View - Snap Guides - Snap to Object Border.

Tested with LibreOffice 6.4.7.2 (x86); OS: Windows 6.1.


Add Answer is reserved for solutions. If you think the answer is not satisfactory, add a comment below, or click edit (below your question) to add more information. Thanks.

Check the mark (Answer markCorrect answer mark) to the left of the answer that solves your question.

If the answer helped you, you can mark the up arrow (Upvote mark) that is on the left (to vote, you need to have karma of at least 5).

To get the line equally spaced, use the options Align and Distribution… in menu Format. To get rectagle divided in two, you can add one auxiliary line to each end of the rectangle, distribute the lines, and delete the auxiliary lines.

LibreOffice Help on Distribution.

Hold down Shift while drawing line to constrain it.

If Snap is on and rectangle size matches snap divisions then line will also snap to match divisions. See Tools > Options > LibreOffice Impress > Grid for setting default snaps

If rectangle is an odd size right click on it and select Position and Size, make a note of the dimension the line must be. Draw your perpendicular line roughly to length, right-click it and select Position and Size, change dimension to noted length, OK.

Drag-select both line and rectangle (or select one, hold Shift and select the other), click Format > Align > Centre (or Centred according to direction or requirements)