Clone Tabs of Notes of a Slide dont work

Hello,

I'm using this function to clone the Notes of a Slide.

sourceTabs.size() returns allways "0".

Is there any solution? I found a hint to use "GetEffectiveTabs" for TextFrame, but Notes don't have (in Java).

/**
* Kopiert die Notizen.
*
* @param sourceSlide
* ist das Source-Slide.
* @param destSlide
* ist das Destination-Slide.
* @throws PptEditException
*/
private void cloneNotes(Slide sourceSlide,
Slide destSlide)
throws PptEditException
{
Notes sourceNotes = sourceSlide.getNotes();

if (sourceNotes != null)
{
Paragraphs sourceParagraphs = sourceNotes.getParagraphs();

if (sourceParagraphs != null)
{
Notes destNotes = destSlide.addNotes();
Paragraphs destParagraphs = destNotes.getParagraphs();
destParagraphs.clear();
//----------------------------------------------------------------------------------
{
TextRuler sourceTextRuler = sourceNotes.getTextRuler();
TextRuler destTextRuler = destNotes.getTextRuler();
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{
Tabs sourceTabs = sourceTextRuler.getTabs();
log.debug("Tabs: size: " + sourceTabs.size());
Tabs destTabs = destTextRuler.getTabs();
{
// Default:
Tab destTab = new Tab(10, TabAlignment.LEFT);
destTabs.add(destTab);
}

for (int tabPos = 0; tabPos < sourceTabs.size(); tabPos++)
{
Tab sourceTab = sourceTabs.get(tabPos);
Tab destTab = new Tab(sourceTab.getPosition(),
sourceTab.getAlign());
log.debug("Tab: " + sourceTab.getPosition());
destTabs.add(destTab);
}
}
// ??? For tabulations in this ppt please check
// TextFrame.GetEffectiveTabs function and EffectiveTabs class.
}
//----------------------------------------------------------------------------------
for (int notePos = 0; notePos < sourceParagraphs.size(); notePos++)
{
Paragraph sourceNoteParagraph = sourceParagraphs.get(notePos);
Paragraph destNoteParagraph = new Paragraph(sourceNoteParagraph);
destParagraphs.add(destNoteParagraph);
}
}
}
}

thx,
vland

Dear vland,

For cloning notes, you should see this thread.

There you will see the code for cloning a slide along with its notes from source presentation into destination presentation.
It first clones a slide then it copies notes from source slide to destination slide. You can also see the complete java code, source and output presentations which have been attached with different posts.

Hello,

the code in the other thread is OK, I use a similar one.

But the fomatings of the notes are not copied propertly and I cannot do it with the API functions.

Please look at the attached PPTs in the ZIP: "Test Präsentation 6.ppt" is the original, "testCreatePresentation.ppt" is the generated copy.

Is there any procedure to copy the notes propertly?

vland

Dear vland,

I can see the problem; you are unable to copy the proper tabs in notes. Do you have any other formatting issue, please let me know.

For the tab issue, I think, it needs a fix so I have reported it. As soon as it is fixed, I will let you know by posting here.

Hello,
any news about this issue? Our customer is still waiting for a fix.

Hello,
msfaiz: Anything new about this issue?

thanks
vland

Dear Christian,

We are trying to fix this problem but it is difficult for us to give you any timeframe. Sorry for inconvenience.

Hello,
msfaiz: Anything new about this issue?

thanks
vland

We found out that the problem in your notes is due to unnecessary whitespace characters at the start of paragraphs e.g a space and extra tab.