Ask Your Question
0

How can I change a rectangle to a rounded rectangle? [closed]

asked 2016-12-16 04:10:24 +0200

hobs gravatar image

Rather than deleting and recreating a lot of shapes in my diagram I'd like to change them all from a regular rectangle to a rounded rectangle, maintaining their connections to other rectangles and text labels.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2020-09-16 17:30:57.052718

1 Answer

Sort by » oldest newest most voted
0

answered 2016-12-16 10:40:00 +0200

pierre-yves samyn gravatar image

Hi

I do not know how to do this directly in LibreOffice. You can Save As your document in Flat XML ODF format, open this new document in a text editor (e.g. NotePad++), to replace all (enable regular expressions):

<draw:enhanced-geometry.*type="rectangle".*

With:

<draw:enhanced-geometry svg:viewBox="0 0 21600 21600" draw:path-stretchpoint-x="10800" draw:path-stretchpoint-y="10800" draw:text-areas="?f3 ?f4 ?f5 ?f6" draw:type="round-rectangle" draw:modifiers="3600" draw:enhanced-path="M ?f7 0 X 0 ?f8 L 0 ?f9 Y ?f7 21600 L ?f10 21600 X 21600 ?f9 L 21600 ?f8 Y ?f10 0 Z N">
      <draw:equation draw:name="f0" draw:formula="45"/>
      <draw:equation draw:name="f1" draw:formula="$0 *sin(?f0 *(pi/180))"/>
      <draw:equation draw:name="f2" draw:formula="?f1 *3163/7636"/>
      <draw:equation draw:name="f3" draw:formula="left+?f2 "/>
      <draw:equation draw:name="f4" draw:formula="top+?f2 "/>
      <draw:equation draw:name="f5" draw:formula="right-?f2 "/>
      <draw:equation draw:name="f6" draw:formula="bottom-?f2 "/>
      <draw:equation draw:name="f7" draw:formula="left+$0 "/>
      <draw:equation draw:name="f8" draw:formula="top+$0 "/>
      <draw:equation draw:name="f9" draw:formula="bottom-$0 "/>
      <draw:equation draw:name="f10" draw:formula="right-$0 "/>
      <draw:handle draw:handle-position="$0 top" draw:handle-switched="true" draw:handle-range-x-minimum="0" draw:handle-range-x-maximum="10800"/>
     </draw:enhanced-geometry>

I have done only a few tests but there is no risk to try since you work on a copy of the original document

Regards

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-12-16 04:10:24 +0200

Seen: 651 times

Last updated: Dec 16 '16