Alternative to OLE

I’m having trouble inserting a .odg file into a text document. I don’t understand how to manage the size and shape, namely, only including the document and not a ton of border. One of the answers here shows how to work with that, but it seems very complicated. That answer says this is in part because OLE is a proprietary tool.

So if OLE is proprietary, and so hard to use in Libreoffice, is there another way to include an .odg drawing in a document? This is all Libreoffice, has no one added a means of linking LO documents together without dealing with OLE?

My OLE isn’t because it works on Linux. Which is your OS?

???

Compared to which way?

I asked a question. You seem to want to solve a problem I did not ask about. I am asking if there is an LO equivalent to OLE?

If I need help with the OLE problem, I will ask about that. I’m still reading what I’ve found elsewhere. It is about the size of the “canvas” and is rather complex.

I read my initial query and I don’t see where I was complaining about anything. You comment regarding that is not helpful.

OLE is a piece of software wich allows to include “foreign” objects and call the necessary programm to edit the object even inside other programs. If you need this, you have to use OLE.
.
If you just need a drawing inside writer, save to bitmap (jpg/png) or vektor (svg) and load this as a “simple” graphic object - no ole needed.
.

The docs for programmers are even more complicated - but it may be 20 years since I read that…

The main question is what you expect from “linking” OLE serves another purpose than the typical hyperlink, maybe you could compare it to using iframes, if you want to use browser-oriented terms.

I get an “OLE object” (whatever that means on Linux) when I drag an .odg file into writer.
I get a group of Draw objects when I hit Ctrl+A, Ctrl+C in Draw and then paste into Writer.

Usually, you don’t include a file (all the more an odg one) into a Writer document. What you really want is to insert a drawing in the middle of your text.

Then OLE is not your tool (I know, I read your angry comment you asked a question about OLE and the answer was something else). OLE creates complication for a simple thing and creates a constraint where your document and the linked file must always be moved simultaneously and kept in the same position relative to each other.

It is much simpler to copy a part of your graphics in Draw (this is all LO) and paste it into the Writer document.

Your Draw document can then contain multiple drawings in a single file and simplify your life managing only two file: one odt and one odg. Whenever you can, adopt the simplest solution. It makes document more stable.

Keep OLE only when Writer or more generally LO is unable to handle the situation by itself.

Thank you for the helpful advice. Copying the drawing into Writer seems a very clumsy way to do this. I would have to either edit it in Writer or copy it again, every time I want to update it. That is why I want to link to the file. I want to update the Draw file and have it update in the Writer document as well.

Not only am I fine with the idea of not using OLE, that is what I asked about.

I’m sorry if I sounded angry. I’m just relating the facts, no anger involved.

BTW, I gave up on using OLE. I can’t manage the size of the image in Writer. It keeps adding border around my image. Even when I reduce the size of the window when open for editing in Writer, it moves part of the drawing off page.

Generating an image from Draw and including the image works… mostly. The generated image has some issues. When I try to “Export” as a .gif or .png, I change the setting for resolution and the image produced is always produced with the same, coarser resolution.

BTW, every issue is not an example of the XY problem. I am capable of asking further questions if I need to. But it’s useful to answer the question asked first. The answer to this question seems to be, “No, there is no LO equivalent to OLE for including Draw documents in Writer.” Thank you.

Wanderer

I didn’t have an image to include in the document. I have a Draw drawing which will get updated from time to time. That is why I wish to link to it.

It is common to have multiple uses for a single drawing. That’s why I’d like to use the .odg file in the .odt file. Since that isn’t going to work, I’ve generated .gif and .png files which seem to only have limited resolution. I guess I’ll have to live with that.

BTW, I see others use paragraphs with clear spacing between. When I hit enter, it starts a new line, but I can’t get the appropriate spacing between paragraphs. Is there something special I need to do? I’ve tried using Enter twice and it shows up in the edit window, but ignored in the post.
1 Enter

2 Enters

I made an experiment and it works fine. Effectively OLE allows for update but you don’t control the size of the image or, more precisely, you must define the page size in Draw as the full file is included, not what you have selected as in the case of copy’n’paste.


No border show up here. Remember that all insertions are put inside a frame to which some frame style is applied. With OLE, the style is surprisingly named OLE. You have perhaps unwillingly modified it to display border. Customise it to your taste. Perhaps the active style is simple Frame which has borders by default. Apply OLE to fix.

I assume you’re talking about the AskLO site.

Remember this is basically an HTML site. All HTML rules apply. In particular, multiple spaces (space characters or newlines) are merged into a single one (except in answers; I don’t know why). Consequently I manually add <br> when I want to start a new paragraph with some space from the the previous one.

Blockquote
you must define the page size in Draw as the full file is included

Yes, I am aware of that. The problem is when I bring it in using OLE, the included document has huge borders around the drawing. Trying to reduce the inclusion to just the drawing is nearly impossible, at least, I could not make it happen. I ended up with over an inch of white space on the left, and missing drawing on the right.

Blockquote
No border show up here.

So when you insert a drawing using OLE, the size of the inserted drawing is exactly the size of the drawing page? Try using a larger page. Mine is 5.51″ x 6.30″. Not sure why it is reporting in inches. I thought it had this configured for mm, but I guess that doesn’t apply to the dialogs.

I left the OLE object selected so you can see how much larger it is than the drawing. Also notice it is clipped at the bottom.

Changing the size of this object only distorts the image, and does not show any more of the drawing. If I open it for editing, I can change the size of the editing window. As I’ve said, that includes the bottom, clipped part, but the drawing is shifted to the right, clipping it horizontally. It also warns me that I am making a change to the inserted object and this will be overwritten if I update the object… which is the reason for using OLE.

I can find no controls for the frame.

Well, I was confused by the vocabulary. You used “borders” (a line drawn around an object) while you meant “padding” (blank space separating an object from its “environment”).

I can’t see any setting allowing to control OLE behaviour. I tried to modify my page format in the odg, even setting margins to zero, but this doesn’t change how Writer handles the OLE.


It looks like Writer takes the object to be inserted and scales it within a rectangle where it adds “margins” of its own around it. I didn’t find any way to modify these margins. I think this is why I don’t use OLE. I certainly tested it and concluded it was more trouble than comfort. I prefer to change my drawings in Draw and replace the image in Writer by pasting.

Sorry for not finding a solution.

Thanks for your efforts

OLE (also working in LibO without Win) is exactly what you need.
Embed a drawing as “linked OLE object” into your Writer document, and you can allow or reject update on every load. You can also save versions of the .odt and break the link for such “backups”. Everything you want. The size the drawing you can choose in Writer…
It will need some experience.

The only thing that’s seriously missing in LibO OLE (with own document types) is multiple “view instances” of the same object with different views in different positions. You can’t have OLE views to different pages (or sheets) of the same document embedded or linked in different places.

But you can (e.g.) OLE-link a drawing in one place, and embed the same drawing in a different position. Later editing of the source file will then only afflict the linked version.

1 Like

I suppose I will use OLE when I gain the experience required. Do they have a trainer for OLE, like the trainer aircraft they use in the military?