Bug 149049 - Navigator does not show media objects unless a "Name" is added
Summary: Navigator does not show media objects unless a "Name" is added
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.4.0
Keywords:
Depends on:
Blocks: Navigator
  Show dependency treegraph
 
Reported: 2022-05-12 11:53 UTC by sdc.blanco
Modified: 2022-05-24 10:19 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 sdc.blanco 2022-05-12 11:53:00 UTC
1. Insert > Media > Audio or Video

Actual: does not appear in Navigator

2. Select inserted media icon, right-click, choose "Name" and enter name.

Actual: Appears now in Navigator under Drawing objects.

Expected: Do not need to add name to inserted media file for it to appear in Navigator

Additional information

Only tested with one .mp3 file.
Comment 1 raal 2022-05-14 21:45:47 UTC
Tested Draw, Impress - I can see mp3 in Navigator as "shape 1 (Media object)".
Writer - no media in Navigator, even when I add name. Which module did you tested?
Version: 7.4.0.0.alpha1+ / LibreOffice Community
Build ID: 75f7e057039aaa49558e22d18cad651d11589da9
CPU threads: 4; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded Jumbo
Comment 2 sdc.blanco 2022-05-14 22:02:40 UTC
(In reply to raal from comment #1)
> Which module did you tested?
Writer.

Repro that Draw and Impress show "Shape n (media object)" in Navigator
and Calc shows "Media object 1" (under Drawing objects).

but Writer does not add a "Name", so the object does not appear in Navigator.

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 4ea44fdb19e568093ab1e0549c3ffa33296a486b
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: da-DK (da_DK); UI: en-US
Calc: CL
Comment 3 Jim Raykowski 2022-05-15 04:34:25 UTC
Here is a patch that gives a name to audio and video media objects when created so they will show in the Navigator when inserted:

https://gerrit.libreoffice.org/c/core/+/134334

The patch exposes a bug in Writer. When a media object is inserted, it is inserted twice.
Comment 4 sdc.blanco 2022-05-15 08:56:44 UTC
(In reply to Jim Raykowski from comment #3)
> The patch exposes a bug in Writer. When a media object is inserted, it is
> inserted twice.
Aha!  I noticed once that there were two copies, but thought that maybe it was "operator error" -- good catch -- because the copies are inserted on top of each other.

And then -- off-topic -- can you delete these media "shapes" with Ctrl+X?  (I could not do this in Writer, with or without names. Had to use Delete.  (no problem using Ctrl+X in Draw). I can file another ticket if appropriate.
Comment 5 Commit Notification 2022-05-15 19:18:50 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2daceaba6f2d1666e195af9a8e5dc8c4a703c293

tdf#149049 related: fix media object inserts twice in Writer

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Jim Raykowski 2022-05-16 06:47:01 UTC
(In reply to sdc.blanco from comment #4)
> (In reply to Jim Raykowski from comment #3)
> > The patch exposes a bug in Writer. When a media object is inserted, it is
> > inserted twice.
> Aha!  I noticed once that there were two copies, but thought that maybe it
> was "operator error" -- good catch -- because the copies are inserted on top
> of each other.
I also initially thought it was "operator error" :)

> And then -- off-topic -- can you delete these media "shapes" with Ctrl+X? 
> (I could not do this in Writer, with or without names. Had to use Delete. 
> (no problem using Ctrl+X in Draw). I can file another ticket if appropriate.
Here is a patch that makes the media object delete when it is cut:
https://gerrit.libreoffice.org/c/core/+/134381
Comment 7 Commit Notification 2022-05-16 15:01:55 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9e2391561d80cc06b7c1959f58ce4b70aca2a444

tdf#149049 give media object a name when created

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 sdc.blanco 2022-05-24 10:19:20 UTC
Verified with:

Version: 7.4.0.0.alpha1+ (x64) / LibreOffice Community
Build ID: 09822cf77cdbe32b03553cd05154100b5f2591d0
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: da-DK (da_DK); UI: en-US
Calc: CL

Thanks Jim!  Works smoothly as expected, no extra copy, can delete with Ctrl+X...