View | Details | Raw Unified | Return to issue 119902
Collapse All | Expand All

(-)main/sd/source/ui/docshell/docshel4.cxx (-2 / +11 lines)
Lines 946-953 Link Here
946
946
947
		if( aLayoutName.Len() )
947
		if( aLayoutName.Len() )
948
		{
948
		{
949
			String aOldPageLayoutName = mpDoc->GetSdPage(0, PK_STANDARD)->GetLayoutName();
949
			sal_uInt32 nCount = mpDoc->GetMasterSdPageCount(PK_STANDARD);
950
			mpDoc->RenameLayoutTemplate(aOldPageLayoutName, aLayoutName);
950
			for(sal_uInt32 i = 0; i < nCount; i++)
951
			{
952
				String aOldPageLayoutName = mpDoc->GetMasterSdPage(i, PK_STANDARD)->GetLayoutName();
953
				String aNewLayoutName = aLayoutName;
954
				// Don't add suffix for the first master page
955
				if( i > 0 )				
956
					aNewLayoutName += String::CreateFromInt32(i);				
957
				
958
				mpDoc->RenameLayoutTemplate(aOldPageLayoutName, aNewLayoutName);
959
			}			
951
		}
960
		}
952
	}
961
	}
953
962

Return to issue 119902