Kaydet (Commit) 7daa651f authored tarafından Andre Fischer's avatar Andre Fischer

#i119902# Rename all master pages in a template, not only the first one.

Patch by: Ma Bingbing
Review by: Andre Fischer
üst 2cede595
...@@ -946,8 +946,17 @@ sal_Bool DrawDocShell::SaveAsOwnFormat( SfxMedium& rMedium ) ...@@ -946,8 +946,17 @@ sal_Bool DrawDocShell::SaveAsOwnFormat( SfxMedium& rMedium )
if( aLayoutName.Len() ) if( aLayoutName.Len() )
{ {
String aOldPageLayoutName = mpDoc->GetSdPage(0, PK_STANDARD)->GetLayoutName(); sal_uInt32 nCount = mpDoc->GetMasterSdPageCount(PK_STANDARD);
mpDoc->RenameLayoutTemplate(aOldPageLayoutName, aLayoutName); for(sal_uInt32 i = 0; i < nCount; i++)
{
String aOldPageLayoutName = mpDoc->GetMasterSdPage(i, PK_STANDARD)->GetLayoutName();
String aNewLayoutName = aLayoutName;
// Don't add suffix for the first master page
if( i > 0 )
aNewLayoutName += String::CreateFromInt32(i);
mpDoc->RenameLayoutTemplate(aOldPageLayoutName, aNewLayoutName);
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment