Created attachment 197558 [details] There are three slides with a different image on each slide. Open Navigator and click on any of the named "Picture 2" and only the image in the first slide will be selected. A pptx file created in PowerPoint 2010 has some different images on each page. When the file is opened in LibreOffice, each image in Navigator is named the same as the first image, as a consequence only the first image will be selected from the Navigator pane when any of the same named images is clicked Expected: Each image should have a unique name for identification and selection from Navigator. Earliest I tested on was 7.3.1.3 Version: 24.8.2.1 (X86_64) / LibreOffice Community Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13 CPU threads: 8; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win Locale: en-NZ (en_NZ); UI: en-GB Calc: CL threaded
The same happens with PowerPoint. Microsoft® PowerPoint® para Microsoft 365 MSO (versión 2410 compilación 16.0.18129.20100) 64 bits So maybe is something about how the file was created.
This happens, when the shape/image has got the same name. In the UI of LibreOffice it is not possible to give the same name to different shapes/images. And when you duplicate a slide the given names are automatically changed so that they are unique. But in PowerPoint the shape names remain the same, when you duplicate a slide. Inside PowerPoint it is no problem because PowerPoint uses object names per slide. But when such file is imported to LibreOffice, LibreOffice does not check whether there are duplicate names. We could e.g add the slide name or check for uniqueness and add a counter if needed. For jumps renaming on import is no problem, as PowerPoint does not allow jumps to objects but only to slides. When objects have no name, then they are selected correctly in the Navigator, so not importing duplicate names might be an option as well. But I see as problem with renaming or deleting names, that macros might use the name. I have no idea for a solution.
(In reply to Regina Henschel from comment #2) Can you please create a sample macro of such kind? I believe, that it should be a VBA macro, not LibreOffice one, because we are talking about importing an external format; the problems would be the renaming of the objects, and at the same time, keeping the macros working. The macros would either read the names, or use them as indexes (accessing children by names, or something)? If I remember correctly, we have user-visible names, and API names (or maybe I confuse it with something else - needs code reading, which I can't do now).
Created attachment 197589 [details] presentation with macro (In reply to Mike Kaganski from comment #3) > (In reply to Regina Henschel from comment #2) > > Can you please create a sample macro of such kind? I believe, that it should > be a VBA macro, not LibreOffice one, because we are talking about importing > an external format; the problems would be the renaming of the objects, and > at the same time, keeping the macros working. The macros would either read > the names, or use them as indexes (accessing children by names, or > something)? The attached presentation contains a macro. You can run the macro in a running presentation in PowerPoint, when you click on the blue rectangle. It seems we currently do not import and convert the macro at all. Thus we might ignore renaming problems with macros. > > If I remember correctly, we have user-visible names, and API names (or maybe > I confuse it with something else - needs code reading, which I can't do now). A user-visible name is the same as the value of the Name property of the API and the msName member in class OOX_DLLPUBLIC Shape. That class has a member msInternalName; // used by diagram; not displayed in UI The comment indicates that it is not used for normal shapes.