Bug 160955

Summary: When selecting an alternative link target for an OLE object, button says "Insert"
Product: LibreOffice Reporter: Eyal Rozenberg <eyalroz1>
Component: UIAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: minor CC: heiko.tietze, stephane.guillou
Priority: low Keywords: needsDevEval
Version: 24.8.0.0 alpha0+   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=157881
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 107810, 112581    
Attachments: Screenshot of the "Edit Links" dialog

Description Eyal Rozenberg 2024-05-06 09:43:53 UTC
Instructions:

1. Create a new document (e.g. Writer)
2. Insert an OLE Object: An existing file, with a link to the file, display as icon.
3. On the Edit menu, choose "External Links..."
4. Select the OLE object you've inserted
5. Press "Modify"

Expected results: File selection dialog comes up, selection button should say "Select" or "Set as new Target" or "Set as target" or "Set link target".

Actual results: File selection dialog comes up, selection button says "Insert"

Easy hack?
Comment 1 Heiko Tietze 2024-05-06 10:54:41 UTC
(In reply to Eyal Rozenberg from comment #0)
> 5. Press "Modify"
Where? I have Edit (opens the object), Properties, Delete, and Rename.
Comment 2 Eyal Rozenberg 2024-05-06 11:25:38 UTC
Created attachment 193988 [details]
Screenshot of the "Edit Links" dialog
Comment 3 Eyal Rozenberg 2024-05-06 11:25:59 UTC
(In reply to Heiko Tietze from comment #1)
> Where? I have Edit (opens the object), Properties, Delete, and Rename.

Have a look at the screenshot.
Comment 4 Heiko Tietze 2024-05-06 12:48:50 UTC
Edit > External Links... has a Modify button.

(In reply to Eyal Rozenberg from comment #0)
> Easy hack?
Don't spot the string in a quick glance in ChangeSourceClickHdl at cui/source/dialogs/linkdlg.cxx. Maybe mxFileDlg->setTitle( SfxResId( STR_SFX_EXPLORERFILE_INSERT ) ); in sfx2/source/dialog/filedlghelper.cxx but this affects all dialogs then. Could be solved by introducing another flag for FileDialogFlags but using this flag becomes a bit tricky.
Comment 5 Eyal Rozenberg 2024-05-06 13:01:27 UTC
(In reply to Heiko Tietze from comment #4)
> Don't spot the string in a quick glance in ChangeSourceClickHdl at
> cui/source/dialogs/linkdlg.cxx. Maybe mxFileDlg->setTitle( SfxResId(
> STR_SFX_EXPLORERFILE_INSERT ) ); in sfx2/source/dialog/filedlghelper.cxx but
> this affects all dialogs then. Could be solved by introducing another flag
> for FileDialogFlags but using this flag becomes a bit tricky.

But surely the button text is set differently for different file selection dialogs? Open, Save, Select, Insert ...
Comment 6 Stéphane Guillou (stragu) 2024-05-21 10:47:56 UTC
Reproduced:

Version: 24.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: ae798781ef4df7a1fdef13af0bc459bf4f6e7b4c
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded

Same with gen VCL plugin.

Could be improved, but it's a fairly minor issue, as it's still understandable in the context of the linking.
(I actually remember coming across another case where that button label doesn't match the action, and it being more jarring, but can't remember where...)