Summary
IParagraph.GetRect() throws System.ArgumentOutOfRangeException (an internal List indexing error) for any paragraph that is entirely clipped away by its text frame, i.e. when the shape’s <a:bodyPr> has vertOverflow="clip" and the paragraph lies fully outside the visible box.
Clipping should only affect painting, not layout: GetRect() is expected to return the paragraph’s layout rectangle (or an empty rectangle), never to throw an undocumented exception. With vertOverflow="overflow" or vertOverflow="ellipsis" the same document measures all paragraphs without error, regardless of the vertical anchor.
Reproduction
The attached ClippedOverflow.pptx is a minimal file. It contains a single 200×40 pt rectangle whose text frame has:
<a:bodyPr vertOverflow="clip" ... anchor="ctr"><a:noAutofit /></a:bodyPr>- Six one-line paragraphs (
Line 1…Line 6)
Only one line fits inside the 40 pt box; the remaining paragraphs are clipped.
To reproduce, run (requires .NET 10 SDK; downloads Aspose.Slides.NET 26.7.0 via #:package):
cd AsposeBugReport4
dotnet run Reproduce.cs
The script loads the presentation — without modifying it in any way — and calls GetRect() on each of the six paragraphs.
Expected result
GetRect() returns a rectangle for every paragraph (or an empty rectangle for fully clipped ones).
Actual result
GetRect() succeeds only for the first paragraph and throws for every fully clipped one (paragraphs 1–5):
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
at System.Collections.Generic.List`1.get_Item(Int32 index)
at Aspose.Slides.Paragraph.GetRect()
Environment
- Aspose.Slides.NET 26.7.0
- .NET 10.0, Windows 11
Attachments
AsposeBugReport4.zip (24.4 KB)
| File | Description |
|---|---|
ClippedOverflow.pptx |
Minimal reproduction PPTX |
Reproduce.cs |
File-based C# app that calls GetRect() on each paragraph (dotnet run Reproduce.cs) |