Ask Your Question
1

avoid to be asked for update "external" links [solved]

asked 2019-06-15 09:08:56 +0200

fbertoldi gravatar image

updated 2019-06-15 20:46:59 +0200

I have actually, in a odt file, internal DDE links (from one part to another one of the same file), but when I open that file I am always asked for "update external links", because that links are seen (in edit -> links) as external (with the complete path of that file).
How can avoid this annoying behaviour?

  • Useless "cut" the path of the file (in Edit -> Links), leaving only the file name: doesn't works, the link is not recognized anymore.
  • Useless also Tools -> Options -> LibreWriter -> General > Update lins when loading: always

Thank you!

EDIT

I've found this, but it doesn't work in Writer, even so modified

Sub  autoupdate_DDE
' 20170314
' load library with help function
GlobalScope.BasicLibraries.LoadLibrary( "Tools" )
' get all DDE links of document '
dde_links = ThisComponent.textfields
' get array of names '
aEN = dde_links.getElementNames()
' work on every DDE link '
for i = 0 to UBound( aEN() )
   xTF = dde_links.getByName( aEN( i ) )
   xTF.refresh()
Next
End Sub

EDIT

As I said I use DDE link (copy a sentence, f.e., and paste special -> as DDE link in another part of the same file) to avoid duplicate in the same file and to duplicate (possible) modifications of the same item.

edit retag flag offensive close merge delete

Comments

Please edit your question (don't use an answer) to explain how you created your links (which menu, which dialog option) as there is no DDE link in LO parlance. Describe your intent (quick navigation to the location of the link or cross-reference). Don't forget to mention your OS.

My subjective feeling: you may have alternate, more robust ways, of doing this, but I need to know your purpose.

ajlittoz gravatar imageajlittoz ( 2019-06-15 12:16:13 +0200 )edit

From experiment, the solution would be to bookmark the phrase or paragraph then insert a cross-reference to it. However, the cross-reference can contain only a paragraph worth of data. If your duplicated text extends on several paragraphs, you must cross-reference each paragraph separately.

With cross-references, you have no dialog asking to refresh the links. You are free to refresh them any time you like with Tools>Update>Update All.

If that answers your problem, I'll transform my comment into an answer and give more details.

ajlittoz gravatar imageajlittoz ( 2019-06-15 14:25:39 +0200 )edit

With a cross-reference it seems that I cannot I see the sentence (which is in another part of the file). In other words, it is more similar to a hardlink (no good) than to a symlink (good). So this won't be the solution I'm looking for.
But I'm afraid that this is a LibreOffice bug...

fbertoldi gravatar imagefbertoldi ( 2019-06-15 16:35:55 +0200 )edit

What do you mean "I can't see the sentence"? You access the bookmarks through Insert>Cross-reference and you get the text choosing Reference instead of the usual Page or Chapter.

If you mean you can't check bookmark content while inserting, yes, this is a shortcoming, while it is possible for headings or numbered paragraphs.

ajlittoz gravatar imageajlittoz ( 2019-06-15 17:19:46 +0200 )edit

Ok, it seems work quite well, thank you. Just only a problem, so far: format (no bold, no italic), but this was a problem also with dde links. Just some other experiments, afterwards I will mark as solved and your answer as the right one. EDIT Yes, you can transform your comment into an answer: it solved my problem! Thank you!

fbertoldi gravatar imagefbertoldi ( 2019-06-15 18:46:10 +0200 )edit

2 Answers

Sort by » oldest newest most voted
1

answered 2019-06-16 13:48:24 +0200

fbertoldi gravatar image

updated 2019-06-19 17:46:31 +0200

Thanks to ajlittoz I discovered this way. Depending on your needs, this modality could be useful: without bookmarks.

  • Select the text you want
  • Insert cross reference -> set reference
  • go in the place you want
  • Insert cross reference -> insert reference [choose what you want] -> reference

This way the text "referenced", «the content», will be shown where you want, as a ddl link.

image description

You can also see this video:

edit flag offensive delete link more

Comments

I may have missed something: in the Insert>Cross-reference dialog, I don't see the content of the reference, I only see its name. Have you some procedural trick to make the content visible so that you can check this is the reference you want before the insertion?

ajlittoz gravatar imageajlittoz ( 2019-06-16 14:20:27 +0200 )edit

Did you selected the content first of all? And did you insert, as reference, "reference" (as in image I have just added above)?

fbertoldi gravatar imagefbertoldi ( 2019-06-17 11:42:12 +0200 )edit

I confirm I only see the reference name, not its content.

After careful study, I think bookmarks and references are strictly equivalent. The only difference is the definition: bookmarks are defined with Insert>Bookmark while references are defined with Insert>Cross-reference, Set reference type. Of course, they are listed in two independent categories.

ajlittoz gravatar imageajlittoz ( 2019-06-17 14:30:42 +0200 )edit

How can I attach a mkv file?

fbertoldi gravatar imagefbertoldi ( 2019-06-19 17:25:26 +0200 )edit

Cheat: change the extension to .jpeg ot .txt or .odt, but add a caveat in the question (you can only attach files to questions or answers, not to comments). What is a .mkv file? Attachments are limited in size but I don't know the exact limit.

ajlittoz gravatar imageajlittoz ( 2019-06-19 17:33:02 +0200 )edit

It's a kind of video, very useful (it can embed subtitles and chapters, as a DVD) :). I linked a mkv from Google drive, bu I can see it only with Chrome, not with Firefox...

fbertoldi gravatar imagefbertoldi ( 2019-06-19 18:03:36 +0200 )edit

Works for me with Firefox (Fedora Linux, KDE desktop, but no sound track). Shows exactly the same as what I experimented. You have access to the reference name not to its content.

BTW, you should View>Formatting Marks, so that you can discriminate vertical white space from empty paragraphs. Also styles are your friends: never use Default Style for actual text. The "standard" style for text is Text Body.

ajlittoz gravatar imageajlittoz ( 2019-06-19 18:52:49 +0200 )edit

What is important for me, is have access to content in the normal view of the odt file, not in the dialog window. But in the end, it is clear that everybody has different needs :)
Thank you!

fbertoldi gravatar imagefbertoldi ( 2019-06-20 09:37:41 +0200 )edit

A cross-reference is internally managed as a field. You can either display field names (View>Field Names checked) or field content (View>Field Namesun checked).

ajlittoz gravatar imageajlittoz ( 2019-06-20 10:34:29 +0200 )edit
1

answered 2019-06-16 12:11:24 +0200

ajlittoz gravatar image

updated 2019-06-16 14:26:16 +0200

Internal "links" used to duplicate document paragraphs are much more efficiently implemented with cross-references. However they are limited to only a paragraph worth of text. If the duplicated range spans more than one paragraph, several cross-references must be used, each covering a single paragraph.

The procedure is:

  1. Define a bookmark on the range to be duplicated (Insert>Bookmark and give it a relevant name)

    Here, the bookmark can't be a mere location. It is used to capture text and therefore the text must be selected first. The selection content will be associated with the bookmark.

    If the cursor is simply put inside a paragraph, selection range is empty and captured text will contain no character.

  2. Wherever you want the bookmarked text to appear, Insert>Cross-reference, type Bookmarks, insert reference to Reference

    Of course, if you want also the page number or the chapter reference, you can insert multiple times the same bookmarks varying the reference to Page or Chapter.

A shortcoming of LO Writer is you can't check the "content" of the bookmark in the insertion dialog.

Important: the reference is inserted "as a whole" and any formatting (done with character styles) is stripped off before the insertion. Thus you only get raw text then formatted according to the paragraph style at the point of insertion. This is a common limitation in fields (the underlying engine) to avoid queer behaviour and ugly layout if formatting attributes were transferred as is (think for example of font size). You can't apply character styles or direct formatting on selected words in the insertion.

With cross-references, there is no question about refreshing the links when the document is opened.

To show the community your question has been answered, click the ✓ next to the correct answer, and "upvote" by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

edit flag offensive delete link more

Comments

But I use another way: without bookmarks.

  • Select the text you want
  • Insert cross reference -> set reference
  • go in the place you want
  • Insert cross reference -> insert reference [choose what you want] -> reference

This way the text "referenced", «the content» will be shown where you want.
I avoid at the moment to transform this comment in answer, because of your help, ajlittoz, but you can try my solution.

fbertoldi gravatar imagefbertoldi ( 2019-06-16 12:43:30 +0200 )edit

Very good indeed! One is always blinded by his own needs (mine is page # and chapter # in addition to reference, therefore the cross-reference) and does not see the obvious.

Don't hesitate to make your comment an answer and I'll upvote it.

ajlittoz gravatar imageajlittoz ( 2019-06-16 13:14:27 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-06-15 09:08:56 +0200

Seen: 64 times

Last updated: Jun 19