Bug 57148 - Ability to include file contents as a dynamic field
Summary: Ability to include file contents as a dynamic field
Status: CLOSED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All Linux (All)
: low enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-15 09:35 UTC by Pablo Iranzo Gomez
Modified: 2017-05-26 11:10 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pablo Iranzo Gomez 2012-11-15 09:35:51 UTC
Hi
I would like Writer to include the option to include file contents dinamically.

Use case:
I usually write technical reports using libreoffice and if I include some script code, I need to manually copy/paste several times in the documents after I do some change.

I would like libreoffice to automatically take care of that, and just 'refreshing' all the fields at the document whould include latest version of the file keeping the formatting of the paragraph it was inserted (I use a 'Code' style which has different background and uses a monospaced font).

Thanks
Comment 1 Joel Madero 2013-06-02 02:52:09 UTC
Hm - why not just have the repeated text in spreadsheet and link to document? There are several options to do this - I'd recommend asking on the ask site:
http://ask.libreoffice.org/en/questions/

or joining the user mailing list.

For now marking this as INVALID as I believe the feature already exists BUT if you can't get it working this way or if this won't fit your needs, mark as UNCONFIRMED again and clarify what you're looking for.

From what I understand you essentially want variables in writer that you can update and have text formatting be maintained. 

Another place to look would be Insert -> Field -> Other and select "variable" - here you can define variables in such a way.

Apologies for the long delay, hope this helps out, if not again just mark as UNCONFIRMED and clarify/correct me :)
Comment 2 Pablo Iranzo Gomez 2013-06-02 07:05:32 UTC
Joel

(In reply to comment #1)
> Hm - why not just have the repeated text in spreadsheet and link to
> document? There are several options to do this - I'd recommend asking on the
> ask site:
> http://ask.libreoffice.org/en/questions/

The point is not repeating text in a spreadsheet 
 
> For now marking this as INVALID as I believe the feature already exists BUT
> if you can't get it working this way or if this won't fit your needs, mark
> as UNCONFIRMED again and clarify what you're looking for.
> 
> From what I understand you essentially want variables in writer that you can
> update and have text formatting be maintained. 

No, what I said is to be able to insert some 'field' which contains automatically the text on a file on disk, and be able to 'refresh' all those file contents on disk and have it updated on LibreOffice.

For example, inserting a field which displays the content of "/home/user/test-script.sh", so, when I update externally that script file, LibreOffice could refresh the contents and update the text. (Something like a <IFRAME> if it were HTML)

Regards
Comment 3 Joel Madero 2013-06-02 17:01:46 UTC
Putting to UNCONFIRMED - REOPENED is a status maintained if a developer has fixed something but reporter (or someone else ) says it's not fixed. Need to go through NEEDINFO first so apologies for the spam.


Thanks for the info on this one, makes more sense now
Comment 4 Joel Madero 2014-05-28 17:20:40 UTC
Thank you for reporting this enhancement request! I can confirm that this is a valid enhancement request on:
Version: 4.3.0.0.alpha0+ Build ID: 84862db95a5e22b9ef89baa2a8a5deeffefbdef6
Date:   Thu Apr 24 21:43:16 2014 +0300
Platform: Ubuntu Linux 14.04 x64
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 
As I've been able to confirm the enhancement request I am marking as:

New (confirmed)
Enhancement
Low - not going to help a lot of users (most users don't use dynamic fields at all) but none the less a valid request

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 
LibreOffice is powered by a team of volunteers, every bug is confirmed (triaged) by human beings who mostly give their time for free. We invite you to join our triaging by checking out this link:
https://wiki.documentfoundation.org/QA/BugTriage

There are also other ways to get involved including with marketing, UX, documentation, and of course developing -  http://www.libreoffice.org/get-help/mailing-lists/. 

Lastly, good bug reports help tremendously in making the process go smoother, please always provide reproducible steps (even if it seems easy) and attach any and all relevant material
Comment 5 Regina Henschel 2017-05-26 11:10:07 UTC
That is already available. Use Insert > Section. In the dialog you can check "Link". Click on "Browse" to select the file. If it has a suitable format, the content is displayed.

That works inside a document too. If you put one instance of the text into a section, you can insert a linked section in other places of the text. If you change the source instance and click on Tools > Update, the linked section will show the changed text.

Depending on your operating system you can use OLE and DDE linking as well.

So I will close this as "works for me". If it does not work for you, you can reopen the issue and add a more detailed description of your needs.