Bug 168525 - Insert > Text from file... is misnamed
Summary: Insert > Text from file... is misnamed
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
26.2.0.0 alpha0+ master
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyBeginner, easyHack, skillDesign, topicDesign
Depends on:
Blocks: Insert-File-Content
  Show dependency treegraph
 
Reported: 2025-09-23 17:02 UTC by Eyal Rozenberg
Modified: 2025-09-24 10:53 UTC (History)
3 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 Eyal Rozenberg 2025-09-23 17:02:27 UTC
The Insert > Text from file... menu item is mis-named: 

1. It doesn't even presume to insert text from "files". If you try to insert the text of an ODS document, you'll get an error message saying "Not a text document".
2. It fails to insert text from some files which it accepts as relevant, e.g. if you try to use it with a (LO-generated) PDF with some text, you're likely not to see anything inserted.
3. It inserts all (or most?) content in ODT document - not just the text

So, we should rename the item "Text from file..." to "Text document contents..."
Comment 1 V Stuart Foote 2025-09-23 17:43:31 UTC
Sure. Though I'd lean toward Insert -> "Text strings from document"

This is for the UNO .uno:InsertDoc and the "Text from file..." label was assigned during work on bug 91781 [1]. The prior Insert menu label was simply "Doc~ument" so that really needed deliniation.

But care is needed bcz "Text from file" now is also the name for the UNO (as used to Customize).

And the UNO actually could be extended to do more than following os/DE file manager detection of "text" files as it does currently (i.e. to actually handle string content from more ODF document formats, or even PDF) as it is an sfx2 command [2], it already uses os/DE file manager's sense of document with text. But rejects any selection that can't be parsed 'Information -- This is not a text document'

Note: this Insert should NOT be confused with full OLE Object 'Create from file' handling, which is a more feature rich work flow.

=-ref-=
[1] https://gerrit.libreoffice.org/c/core/+/46451 
[2] /core/sfx2/source/doc/docinsert.cxx
Comment 2 Eyal Rozenberg 2025-09-23 17:55:24 UTC
(In reply to V Stuart Foote from comment #1)
> Sure. Though I'd lean toward Insert -> "Text strings from document"

But it inserts drawing objects, formatting, paragraph structure, styles...
Comment 3 V Stuart Foote 2025-09-23 19:49:42 UTC
(In reply to Eyal Rozenberg from comment #2)
> (In reply to V Stuart Foote from comment #1)
> > Sure. Though I'd lean toward Insert -> "Text strings from document"
> 
> But it inserts drawing objects, formatting, paragraph structure, styles...

Yep, sure does. Lots of LO objects/structs get parsed. Had missed that, so scratch my "strings" musings.
Comment 4 Heiko Tietze 2025-09-24 07:43:39 UTC
(In reply to Eyal Rozenberg from comment #0)
> ...rename the item "Text from file..." to "Text document contents..."

"Contents from Text Document..." sounds better to me, but the native speaker should decide.

Code pointer: in officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu change the label for <node oor:name=".uno:InsertDoc" oor:op="replace">
Comment 5 V Stuart Foote 2025-09-24 10:53:59 UTC
(In reply to Heiko Tietze from comment #4)
> (In reply to Eyal Rozenberg from comment #0)
> > ...rename the item "Text from file..." to "Text document contents..."
> 
> "Contents from Text Document..." sounds better to me, but the native speaker
> should decide.
> 
> Code pointer: in
> officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu change
> the label for <node oor:name=".uno:InsertDoc" oor:op="replace">

+1