sd/source/ui/docshell/docshel4.cxx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
New commits: commit 4da833308a496363cd05baad577a073e5bfb0872 Author: Andre Fischer <a...@apache.org> Date: Fri Jul 6 10:45:08 2012 +0000 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 7daa651fbc74a6fc08d713282b9e25cda14e39e9) Change-Id: Ibd8bf8c6f04785c93b7dae70b57fd9eb14623aaf diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index 9422ba9..9c998a3 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -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); + } } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits