Kaydet (Commit) 4da83330 authored tarafından Andre Fischer's avatar Andre Fischer Kaydeden (comit) Caolán McNamara

Resolves: #i119902# Rename all master pages in a template...

not only the first one.

Patch by: Ma Bingbing
Review by: Andre Fischer
(cherry picked from commit 7daa651f)

Change-Id: Ibd8bf8c6f04785c93b7dae70b57fd9eb14623aaf
üst dca43757
......@@ -867,8 +867,17 @@ sal_Bool DrawDocShell::SaveAsOwnFormat( SfxMedium& rMedium )
if( aLayoutName.Len() )
{
String aOldPageLayoutName = mpDoc->GetSdPage(0, PK_STANDARD)->GetLayoutName();
mpDoc->RenameLayoutTemplate(aOldPageLayoutName, aLayoutName);
sal_uInt32 nCount = mpDoc->GetMasterSdPageCount(PK_STANDARD);
for (sal_uInt32 i = 0; i < nCount; ++i)
{
OUString aOldPageLayoutName = mpDoc->GetMasterSdPage(i, PK_STANDARD)->GetLayoutName();
OUString aNewLayoutName = aLayoutName;
// Don't add suffix for the first master page
if( i > 0 )
aNewLayoutName += OUString::number(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