Free Support Forum - aspose.com

How does Aspose.Slides designate portions from paragraphs

Hi there

I’m wondering how Aspose.Slides divides up paragraphs into portions?
I have a problem whereby I am trying to detect the format changes between different portions, but
the formatting does not change, yet it’s part of a different portion. Our software concatenates the text of portions together to form paragraphs for visual presentation to human translators, and records the boundaries of portions in order to split paragraphs back into portions. However, we’re finding it hard to detect the values that are changing between certain portions, and thus when our software writes back text, the formatting is incorrect.

When inspecting with the Visual Studio 2008 debugger watch window, I notice two portion properties, “b” and “c” change, but they dont seem related to formatting information. I was wondering what they represent as they dont seem to be publicly exposed properties, and this is making it hard for our software to detect new portions. I’ve attached a screenshot of what Im talking about, the values that are changing between portions are highlighted in red.

Thanks

Eric

Hi Eric,

Whenever any of the font properties in a paragraph change, it is recognized by a new Portion object.

Hi Muhammad


Yes, the Aspose.Slides helpfile mentioned that as well. My problem is
that for certain paragraphs, the font properties do not seem to be
changing between portions according to the Visual Studio 2008 debugger, but yet there are multiple portions for that
paragraph, if you follow. I have attached a document where this is occurring.

It occurs on the first slide in the presentation, in the paragraph containing “Questions and answers for quiz” and on the second slide, in the paragraph containing the sentence “Follow the placeholder prompts and fill in your actual questions and answers”. If you could perhaps tell me what is changing then I would have a better idea of where I am going wrong.

Thanks

Eric


Hi Eric,

Now, I have a question. Can you please share with me how these two sentences were created? I just retyped these sentences and again, I am able to get these sentences in one portion.

Hi Muhammad

I’m not actually sure. The file comes from our bank of sample files we use for testing our software. Did you manage to reproduce the behaviour I described?

Eric

Just out of interest, I noticed that Aspose.Slides seems to use white space characters like non-breaking spaces to mark portions? Is this the case?

Hi Eric,

These portions have different formatting although look similar. First property contains empty extended attribute which is just skipped by Aspose.Slides.

Hi Muhammad

Thanks for your response. What is the difference in formatting between these portions?

Thanks

Eric

Hi Eric,

In this particular case, one portion contains additional empty container for the extended attributes. Since it's empty both properties have the same formatting. Aspose.Slides doesn't merge portions with the same formatting by itself. All portions provided "as is" as they stored in a presentation ppt file.