Aspose.Slides 21.12 Breaks our Unit Tests by Reporting Relative Links as Absolute

Our unit test simply scans a PPT file and verifies the links that are reported. The file has a mix of both relative and absolute links; however, Aspose Slides 21.12 reports all the links as absolute.
Added below is an example of the situation we are coming across:

  1. Parent ppt file is located in folder C:\Test\ParentFile\Parent.pptx
  2. Child file is located in folder C:\Test\ChildFile\Child.xlsx
  3. The relative path is …/ChildFile\Child.xlsx

When we copy the files to a new location:

  1. Parent: C:\Test_01\ParentFile\Parent.pptx
  2. Child: C:\Test_01\ChildFile\Child.xlsx

The link in PPT file works as it is relative and it opens the child file.
But Aspose.Slides 21.12 still reads the first absolute path C:\Test\ChildFile\Child.xlsx.

Only when we manually open the PPT file and click on “Update Links”, Aspose reads the new absolute path C:\Test_01\ChildFile\Child.xlsx.

This is the bug that is noticed with Aspose.Slides 21.12.

We had faced a similar issue with Aspose.Slides 18.12 and we were informed that this was fixed in Aspose.Slides 19.2 (refer: Aspose.Slides 21.5 Breaks Unit Tests by Reporting All Relative Links as Absolute - #10 by andrey.potapov)

@vikram.venugopal,
Thank you for contacting support.

To investigate this case on our side, please share and specify the following:

  • the files you mentioned above
  • code example that reproduces the problem
  • OS version on which the code was run
  • .NET Framework version in your application
  • PowerPoint version you used

@Andrey_Potapov, here are the requested informations.

Here is the link where You can download the test files and the test project: AsposeSlidesTestRelativePaths.zip.

The zip file contains two folders:

  1. TestFiles - test files
  2. AsposeSlidesTest - test project

The folder structure in the TestFiles folder is as follows:

  1. Excel file: \TestFiles\Excel\File\MySheet.xlsx
  2. PPT file: \TestFiles\PPT\File\MyPPT 2003.ppt

The PPT file has a link pointing to an Excel cell range inside the excel file.
The relative path between two files should be “…\…\Excel\File\MySheet.xlsx”.

These are the steps to reproduce the issue.

  1. Unpack the TestFiles folder to any location on Your computer, for example, C:\Test\TestFiles.
  2. Open the PPT file located in \TestFiles\PPT\File, click “Update Links” and save the file.
  3. Unpack AsposeSlidesTest folder and start the project.
  4. Click on the “Select PowerPoint file” button and select the PPT file located in \TestFiles\PPT\File. The application will read the correct absolute path to the excel file. Do not close the application.
  5. Move the test files folder to another location, for example, from C:\Test\TestFiles to C:\Test_01\TestFiles.
  6. Click on the “Select PowerPoint file” button and select the PPT file from the new location, C:\Test_01\TestFiles\PPT\File. The application will read the absolute path to the original location, C:\Test\TestFiles\Excel\File\MySheet.xlsx.
  7. Open the PPT file from the new location, C:\Test_01\TestFiles\PPT\File\MyPPT 2003.ppt, click “Update links” and save the file.
  8. Click again on the “Select PowerPoint file” button and select the PPT file from the new location, C:\Test_01\TestFiles\PPT\File. The application will read the new, correct, absolute path, C:\Test_01\TestFiles\Excel\File\MySheet.xlsx.

Based on this behavior, it looks like the link inside this PPT file has a relative path.

The project is created using Visual Studio 2019, .NET framework 4.6.1, Aspose.Slides 22.2.
The PPT file is created using MS PowerPoint 365 and saved as “PowerPoint 97 - 2003 Presentation”.
As You can see from the project, the link path is read from OleObjectFrame.LinkPathLong property.
Aspose.Slides, version 18.12, reports correct relative path in OleObjectFrame.LinkPathLong property.

Basically, we need the ability to get the relative path from PPT file, if the link is saved as relative link.
Perhaps You could add another property, something like OleObjectFrame.LinkPathRelative?

@spopov71,
Thank you for the additional data. We will reply to you as soon as possible.

@spopov71,
I’ve reproduced the problem with the links to the Excel file and added a ticket with ID SLIDESNET-43091 to our issue tracking system. Our development team will investigated this case. We will inform you of any progress.

The issues you have found earlier (filed as SLIDESNET-43091) have been fixed in Aspose.Slides for .NET 22.11 (ZIP, MSI).
You can check all fixes on the Release Notes page.
You can also find the latest version of our library on the Product Download page.