Skip to content

Commit 0be11d0

Browse files
devX2712Progi1984
authored andcommitted
BUGFIX for duplacting slide
BUGFIX when duplicating slide an each composants, text into paragraph into richText where forget
1 parent 3dfc5f5 commit 0be11d0

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

src/PhpPresentation/Shape/RichText/Paragraph.php

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,26 @@ public function __construct()
107107
}
108108

109109
/**
110-
* Get alignment.
110+
* Magic Method : clone
111+
*/
112+
public function __clone()
113+
{
114+
// Clone each text
115+
if (isset($this->richTextElements)) {
116+
foreach ($this->richTextElements as &$txtElt) {
117+
$txtElt = clone $txtElt;
118+
}}
119+
// Clone each effect
120+
if (isset($this->effectCollection)) {
121+
foreach ($this->effectCollection as &$effect) {
122+
$effect = clone $effect;
123+
}}
124+
}
125+
126+
/**
127+
* Get alignment
128+
*
129+
* @return \PhpOffice\PhpPresentation\Style\Alignment
111130
*/
112131
public function getAlignment(): Alignment
113132
{

0 commit comments

Comments
 (0)