diff --git a/en/cpp/developer-guide/technical-articles/copy-paragraph-and-portion-in-pptx/_index.md b/en/cpp/developer-guide/technical-articles/copy-paragraph-and-portion-in-pptx/_index.md deleted file mode 100644 index afc64a5be0..0000000000 --- a/en/cpp/developer-guide/technical-articles/copy-paragraph-and-portion-in-pptx/_index.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: Copy Paragraph and Portion in PPTX -type: docs -weight: 30 -url: /cpp/copy-paragraph-and-portion-in-pptx/ ---- - -{{% alert color="primary" %}} - -In order to format presentation text we need to format it on **Paragraph** and **Portion** level. -Some text properties that can be set on Paragraph level and some - on Portion level. -If there is a paragraph or portion in the text that we need to copy to the newly added paragraphs or portions, we need to copy all properties of the respective paragraph or portion to the newly added paragraph or portion. - -{{% /alert %}} - -## **Copy Paragraph** -Paragraph properties can be accessed through **ParagraphFormat** instance of **Paragraph** class. -We need to copy all the properties of the source paragraph to the target paragraph. In the following example, the **CopyParagraph** method is shared that takes a paragraph to be copied as an argument. It copies all the properties of the source paragraph to a temporary paragraph and return the same. The target paragraph gets the copied values. - -``` cpp -SharedPtr CopyParagraph(SharedPtr par) -{ - SharedPtr para = MakeObject(); - - SharedPtr paraData = par->get_ParagraphFormat()->GetEffective(); - - // use ParagraphFormat to set values - para->get_ParagraphFormat()->set_Alignment(paraData->get_Alignment()); - para->get_ParagraphFormat()->set_DefaultTabSize(paraData->get_DefaultTabSize()); - para->get_ParagraphFormat()->set_MarginLeft(paraData->get_MarginLeft()); - para->get_ParagraphFormat()->set_MarginRight(paraData->get_MarginRight()); - para->get_ParagraphFormat()->set_FontAlignment(paraData->get_FontAlignment()); - para->get_ParagraphFormat()->set_Indent(paraData->get_Indent()); - para->get_ParagraphFormat()->set_Depth(paraData->get_Depth()); - para->get_ParagraphFormat()->set_SpaceAfter(paraData->get_SpaceAfter()); - para->get_ParagraphFormat()->set_SpaceBefore(paraData->get_SpaceBefore()); - para->get_ParagraphFormat()->set_SpaceWithin(paraData->get_SpaceWithin()); - - para->get_ParagraphFormat()->get_Bullet()->set_Type(paraData->get_Bullet()->get_Type()); - para->get_ParagraphFormat()->get_Bullet()->set_Char(paraData->get_Bullet()->get_Char()); - para->get_ParagraphFormat()->get_Bullet()->get_Color()->set_Color(paraData->get_Bullet()->get_Color()) ; - para->get_ParagraphFormat()->get_Bullet()->set_Height(paraData->get_Bullet()->get_Height()) ; - para->get_ParagraphFormat()->get_Bullet()->set_Font(paraData->get_Bullet()->get_Font()); - para->get_ParagraphFormat()->get_Bullet()->set_NumberedBulletStyle(paraData->get_Bullet()->get_NumberedBulletStyle()); - para->get_ParagraphFormat()->set_FontAlignment(paraData->get_FontAlignment()) ; - - para->get_ParagraphFormat()->set_RightToLeft(paraData->get_RightToLeft() ? NullableBool::True : NullableBool::False); - para->get_ParagraphFormat()->set_EastAsianLineBreak(paraData->get_EastAsianLineBreak() ? NullableBool::True : NullableBool::False); - para->get_ParagraphFormat()->set_HangingPunctuation(paraData->get_HangingPunctuation() ? NullableBool::True : NullableBool::False); - - return para; -} -``` - -## **Copy Portion** -Portion properties can be accessed through **PortionFormat** instance of **Portion** class. -We need to copy all the properties of the source portion to the target portion. In the following example, the **CopyPortion** method is shared that takes a portion to be copied as an argument. It copies all the properties of the source portion to a temporary portion and return the same. The target portion gets the copied values. - -``` cpp -SharedPtr CopyPortion(SharedPtr por) -{ - SharedPtr temp = MakeObject(); - - SharedPtr portData = por->get_PortionFormat()->GetEffective(); - - // use PortionFormat to set values - temp->get_PortionFormat()->set_AlternativeLanguageId(portData->get_AlternativeLanguageId()); - temp->get_PortionFormat()->set_BookmarkId(portData->get_BookmarkId()) ; - temp->get_PortionFormat()->set_Escapement(portData->get_Escapement()) ; - temp->get_PortionFormat()->get_FillFormat()->set_FillType(por->get_PortionFormat()->get_FillFormat()->get_FillType()); - temp->get_PortionFormat()->get_FillFormat()->get_SolidFillColor()->set_Color(portData->get_FillFormat()->get_SolidFillColor()) ; - - temp->get_PortionFormat()->set_FontBold(portData->get_FontBold() ? NullableBool::True : NullableBool::False); - temp->get_PortionFormat()->set_FontHeight(portData->get_FontHeight()); - temp->get_PortionFormat()->set_FontItalic(portData->get_FontItalic() ? NullableBool::True : NullableBool::False); - temp->get_PortionFormat()->set_FontUnderline(portData->get_FontUnderline()); - temp->get_PortionFormat()->get_UnderlineFillFormat()->set_FillType(portData->get_UnderlineFillFormat()->get_FillType()); - temp->get_PortionFormat()->get_UnderlineFillFormat()->get_SolidFillColor()->set_Color(portData->get_UnderlineFillFormat()->get_SolidFillColor()); - temp->get_PortionFormat()->set_IsHardUnderlineFill(portData->get_IsHardUnderlineFill() ? NullableBool::True : NullableBool::False); - temp->get_PortionFormat()->set_IsHardUnderlineLine(portData->get_IsHardUnderlineLine() ? NullableBool::True : NullableBool::False); - - temp->get_PortionFormat()->set_KerningMinimalSize(portData->get_KerningMinimalSize()) ; - temp->get_PortionFormat()->set_Kumimoji(portData->get_Kumimoji() ? NullableBool::True : NullableBool::False); - temp->get_PortionFormat()->set_LanguageId(portData->get_LanguageId()); - - temp->get_PortionFormat()->set_LatinFont(portData->get_LatinFont()) ; - temp->get_PortionFormat()->set_EastAsianFont(portData->get_EastAsianFont()); - temp->get_PortionFormat()->set_ComplexScriptFont(portData->get_ComplexScriptFont()); - temp->get_PortionFormat()->set_SymbolFont(portData->get_SymbolFont()); - - temp->get_PortionFormat()->set_TextCapType(portData->get_TextCapType()); - temp->get_PortionFormat()->set_Spacing(portData->get_Spacing()); - temp->get_PortionFormat()->set_StrikethroughType(portData->get_StrikethroughType()); - temp->get_PortionFormat()->set_ProofDisabled(portData->get_ProofDisabled() ? NullableBool::True : NullableBool::False); - temp->get_PortionFormat()->set_NormaliseHeight(portData->get_NormaliseHeight() ? NullableBool::True : NullableBool::False); - temp->get_PortionFormat()->set_HyperlinkMouseOver(portData->get_HyperlinkMouseOver()); - temp->get_PortionFormat()->set_HyperlinkClick(por->get_PortionFormat()->get_HyperlinkClick()); - temp->get_PortionFormat()->get_HighlightColor()->set_Color(portData->get_HighlightColor()); - - return temp; -} -``` diff --git a/en/cpp/developer-guide/technical-articles/copying-paragraph-and-portion-in-pptx/_index.md b/en/cpp/developer-guide/technical-articles/copying-paragraph-and-portion-in-pptx/_index.md deleted file mode 100644 index ecc029e2ff..0000000000 --- a/en/cpp/developer-guide/technical-articles/copying-paragraph-and-portion-in-pptx/_index.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: Copying Paragraph and Portion in PPTX -type: docs -weight: 30 -url: /cpp/copying-paragraph-and-portion-in-pptx/ ---- - -{{% alert color="primary" %}} - -In order to format presentation text we need to format it on **Paragraph** and **Portion** level. -Some text properties that can be set on Paragraph level and some - on Portion level. -If there is a paragraph or portion in the text that we need to copy to the newly added paragraphs or portions, we need to copy all properties of the respective paragraph or portion to the newly added paragraph or portion. - -{{% /alert %}} - -## **Copy Paragraph** -Paragraph properties can be accessed through **ParagraphFormat** instance of **Paragraph** class. -We need to copy all the properties of the source paragraph to the target paragraph. In the following example, the **CopyParagraph** method is shared that takes a paragraph to be copied as an argument. It copies all the properties of the source paragraph to a temporary paragraph and return the same. The target paragraph gets the copied values. - -``` cpp -SharedPtr CopyParagraph(SharedPtr par) -{ - SharedPtr para = MakeObject(); - - SharedPtr paraData = par->get_ParagraphFormat()->GetEffective(); - - // use ParagraphFormat to set values - para->get_ParagraphFormat()->set_Alignment(paraData->get_Alignment()); - para->get_ParagraphFormat()->set_DefaultTabSize(paraData->get_DefaultTabSize()); - para->get_ParagraphFormat()->set_MarginLeft(paraData->get_MarginLeft()); - para->get_ParagraphFormat()->set_MarginRight(paraData->get_MarginRight()); - para->get_ParagraphFormat()->set_FontAlignment(paraData->get_FontAlignment()); - para->get_ParagraphFormat()->set_Indent(paraData->get_Indent()); - para->get_ParagraphFormat()->set_Depth(paraData->get_Depth()); - para->get_ParagraphFormat()->set_SpaceAfter(paraData->get_SpaceAfter()); - para->get_ParagraphFormat()->set_SpaceBefore(paraData->get_SpaceBefore()); - para->get_ParagraphFormat()->set_SpaceWithin(paraData->get_SpaceWithin()); - - para->get_ParagraphFormat()->get_Bullet()->set_Type(paraData->get_Bullet()->get_Type()); - para->get_ParagraphFormat()->get_Bullet()->set_Char(paraData->get_Bullet()->get_Char()); - para->get_ParagraphFormat()->get_Bullet()->get_Color()->set_Color(paraData->get_Bullet()->get_Color()) ; - para->get_ParagraphFormat()->get_Bullet()->set_Height(paraData->get_Bullet()->get_Height()) ; - para->get_ParagraphFormat()->get_Bullet()->set_Font(paraData->get_Bullet()->get_Font()); - para->get_ParagraphFormat()->get_Bullet()->set_NumberedBulletStyle(paraData->get_Bullet()->get_NumberedBulletStyle()); - para->get_ParagraphFormat()->set_FontAlignment(paraData->get_FontAlignment()) ; - - para->get_ParagraphFormat()->set_RightToLeft(paraData->get_RightToLeft() ? NullableBool::True : NullableBool::False); - para->get_ParagraphFormat()->set_EastAsianLineBreak(paraData->get_EastAsianLineBreak() ? NullableBool::True : NullableBool::False); - para->get_ParagraphFormat()->set_HangingPunctuation(paraData->get_HangingPunctuation() ? NullableBool::True : NullableBool::False); - - return para; -} -``` - -## **Copy Portion** -Portion properties can be accessed through **PortionFormat** instance of **Portion** class. -We need to copy all the properties of the source portion to the target portion. In the following example, the **CopyPortion** method is shared that takes a portion to be copied as an argument. It copies all the properties of the source portion to a temporary portion and return the same. The target portion gets the copied values. - -``` cpp -SharedPtr CopyPortion(SharedPtr por) -{ - SharedPtr temp = MakeObject(); - - SharedPtr portData = por->get_PortionFormat()->GetEffective(); - - // use PortionFormat to set values - temp->get_PortionFormat()->set_AlternativeLanguageId(portData->get_AlternativeLanguageId()); - temp->get_PortionFormat()->set_BookmarkId(portData->get_BookmarkId()) ; - temp->get_PortionFormat()->set_Escapement(portData->get_Escapement()) ; - temp->get_PortionFormat()->get_FillFormat()->set_FillType(por->get_PortionFormat()->get_FillFormat()->get_FillType()); - temp->get_PortionFormat()->get_FillFormat()->get_SolidFillColor()->set_Color(portData->get_FillFormat()->get_SolidFillColor()) ; - - temp->get_PortionFormat()->set_FontBold(portData->get_FontBold() ? NullableBool::True : NullableBool::False); - temp->get_PortionFormat()->set_FontHeight(portData->get_FontHeight()); - temp->get_PortionFormat()->set_FontItalic(portData->get_FontItalic() ? NullableBool::True : NullableBool::False); - temp->get_PortionFormat()->set_FontUnderline(portData->get_FontUnderline()); - temp->get_PortionFormat()->get_UnderlineFillFormat()->set_FillType(portData->get_UnderlineFillFormat()->get_FillType()); - temp->get_PortionFormat()->get_UnderlineFillFormat()->get_SolidFillColor()->set_Color(portData->get_UnderlineFillFormat()->get_SolidFillColor()); - temp->get_PortionFormat()->set_IsHardUnderlineFill(portData->get_IsHardUnderlineFill() ? NullableBool::True : NullableBool::False); - temp->get_PortionFormat()->set_IsHardUnderlineLine(portData->get_IsHardUnderlineLine() ? NullableBool::True : NullableBool::False); - - temp->get_PortionFormat()->set_KerningMinimalSize(portData->get_KerningMinimalSize()) ; - temp->get_PortionFormat()->set_Kumimoji(portData->get_Kumimoji() ? NullableBool::True : NullableBool::False); - temp->get_PortionFormat()->set_LanguageId(portData->get_LanguageId()); - - temp->get_PortionFormat()->set_LatinFont(portData->get_LatinFont()) ; - temp->get_PortionFormat()->set_EastAsianFont(portData->get_EastAsianFont()); - temp->get_PortionFormat()->set_ComplexScriptFont(portData->get_ComplexScriptFont()); - temp->get_PortionFormat()->set_SymbolFont(portData->get_SymbolFont()); - - temp->get_PortionFormat()->set_TextCapType(portData->get_TextCapType()); - temp->get_PortionFormat()->set_Spacing(portData->get_Spacing()); - temp->get_PortionFormat()->set_StrikethroughType(portData->get_StrikethroughType()); - temp->get_PortionFormat()->set_ProofDisabled(portData->get_ProofDisabled() ? NullableBool::True : NullableBool::False); - temp->get_PortionFormat()->set_NormaliseHeight(portData->get_NormaliseHeight() ? NullableBool::True : NullableBool::False); - temp->get_PortionFormat()->set_HyperlinkMouseOver(portData->get_HyperlinkMouseOver()); - temp->get_PortionFormat()->set_HyperlinkClick(por->get_PortionFormat()->get_HyperlinkClick()); - temp->get_PortionFormat()->get_HighlightColor()->set_Color(portData->get_HighlightColor()); - - return temp; -} -``` diff --git a/en/java/developer-guide/technical-articles/copying-paragraph-and-portion-in-pptx/_index.md b/en/java/developer-guide/technical-articles/copying-paragraph-and-portion-in-pptx/_index.md deleted file mode 100644 index e95ee7a23f..0000000000 --- a/en/java/developer-guide/technical-articles/copying-paragraph-and-portion-in-pptx/_index.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: Copying Paragraph and Portion in PPTX -type: docs -weight: 70 -url: /java/copying-paragraph-and-portion-in-pptx/ ---- - -{{% alert color="primary" %}} - -In order to format presentation text we need to format that on **Paragraph** and **Portion** level. There are some text properties that can be set on Paragraph level and some are set on Portion level. If there is a paragraph or portion in the text that we need to copy to newly added paragraphs or portions, we need to copy all properties of respective paragraph or portion to newly added paragraph or portion. - -{{% /alert %}} -## **Copying a Paragraph** -The properties of the **Paragraph** can be accessed in **ParagraphFormat** instance of **Pargraph** class. We need to copy all the properties of source paragraph to target paragraph. In the following example, the **CopyParagraph** method is shared that takes paragraph to be copied as an argument. It copies all the properties of source paragraph to a temporary paragraph and return the same. The target paragraph gets the copied values. - -{{< gist "aspose-com-gists" "1f55f0222bc39a382d831900e8de7400" "Examples-src-main-java-com-aspose-slides-examples-Text-CopyParagraph-CopyParagraph.java" >}} - - -## **Copying a Portion** -The properties of the **Portion** can be accessed in **PortionFormat** instance of **Portion** class. We need to copy all the properties of source portion to target portion . In the following example, the **CopyPortion** method is shared that takes portion to be copied as an argument. It copies all the properties of source portion to a temporary portion and return the same. The target portion gets the copied values. - -{{< gist "aspose-com-gists" "1f55f0222bc39a382d831900e8de7400" "Examples-src-main-java-com-aspose-slides-examples-Text-CopyPortion-CopyPortion.java" >}} diff --git a/en/net/developer-guide/technical-articles/copying-paragraph-and-portion-in-pptx/_index.md b/en/net/developer-guide/technical-articles/copying-paragraph-and-portion-in-pptx/_index.md deleted file mode 100644 index 4e1cda6d4d..0000000000 --- a/en/net/developer-guide/technical-articles/copying-paragraph-and-portion-in-pptx/_index.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Copying Paragraph and Portion in PPTX -type: docs -weight: 80 -url: /net/copying-paragraph-and-portion-in-pptx/ ---- - -{{% alert color="primary" %}} - -In order to format presentation text we need to format that on **Paragraph** and **Portion** level. There are some text properties that can be set on Paragraph level and some are set on Portion level. If there is a paragraph or portion in the text that we need to copy to newly added paragraphs or portions, we need to copy all properties of respective paragraph or portion to newly added paragraph or portion. - -{{% /alert %}} -## **Copying a Paragraph** -The properties of the **Paragraph** can be accessed in **ParagraphFormat** instance of **Pargraph** class. We need to copy all the properties of source paragraph to target paragraph. In the following example, the **CopyParagraph** method is shared that takes paragraph to be copied as an argument. It copies all the properties of source paragraph to a temporary paragraph and return the same. The target paragraph gets the copied values. - - - - -## **Copying a Portion** -The properties of the **Portion** can be accessed in **PortionFormat** instance of **Portion** class. We need to copy all the properties of source portion to target portion . In the following example, the **CopyPortion** method is shared that takes portion to be copied as an argument. It copies all the properties of source portion to a temporary portion and return the same. The target portion gets the copied values. diff --git a/en/python-net/developer-guide/technical-articles/copying-paragraph-and-portion-in-pptx/_index.md b/en/python-net/developer-guide/technical-articles/copying-paragraph-and-portion-in-pptx/_index.md deleted file mode 100644 index ebb31ca411..0000000000 --- a/en/python-net/developer-guide/technical-articles/copying-paragraph-and-portion-in-pptx/_index.md +++ /dev/null @@ -1,115 +0,0 @@ ---- -title: Copy Paragraphs and Text Portions in Presentations Using Python -linktitle: Copy Text -type: docs -weight: 80 -url: /python-net/copying-paragraph-and-portion-in-pptx/ -keywords: -- copy paragraph -- clone paragraph -- copy text -- clone text -- copy text portion -- clone text portion -- PowerPoint -- presentation -- Python -- Aspose.Slides -description: "Discover how to copy paragraphs and text portions between PowerPoint and OpenDocument presentations with Aspose.Slides for Python via .NET to enhance your workflow." ---- - -{{% alert color="primary" %}} - -In order to format presentation text we need to format that on **Paragraph** and **Portion** level. There are some text properties that can be set on Paragraph level and some are set on Portion level. If there is a paragraph or portion in the text that we need to copy to newly added paragraphs or portions, we need to copy all properties of respective paragraph or portion to newly added paragraph or portion. - -{{% /alert %}} -## **Copying a Paragraph** -The properties of the **Paragraph** can be accessed in **ParagraphFormat** instance of **Pargraph** class. We need to copy all the properties of source paragraph to target paragraph. In the following example, the **CopyParagraph** method is shared that takes paragraph to be copied as an argument. It copies all the properties of source paragraph to a temporary paragraph and return the same. The target paragraph gets the copied values. - -```py -import aspose.slides as slides - -#Function Definition -def copy_paragraph(par): - temp = slides.Paragraph() - # use CreateParagraphFormatData !!! - paraData = par.create_paragraph_format_effective() - # use ParagraphFormat to set values - temp.paragraph_format.alignment = paraData.alignment - temp.paragraph_format.default_tab_size = paraData.default_tab_size - temp.paragraph_format.margin_left = paraData.margin_left - temp.paragraph_format.margin_right = paraData.margin_right - temp.paragraph_format.font_alignment = paraData.font_alignment - temp.paragraph_format.indent = paraData.indent - temp.paragraph_format.depth = paraData.depth - temp.paragraph_format.space_after = paraData.space_after - temp.paragraph_format.space_before = paraData.space_before - temp.paragraph_format.space_within = paraData.space_within - - temp.paragraph_format.bullet.char = paraData.bullet.char - temp.paragraph_format.bullet.height = paraData.bullet.height - temp.paragraph_format.bullet.font = paraData.bullet.font - temp.paragraph_format.bullet.numbered_bullet_style = paraData.bullet.numbered_bullet_style - temp.paragraph_format.font_alignment = paraData.font_alignment - - return temp -``` - - -## **Copying a Portion** -The properties of the **Portion** can be accessed in **PortionFormat** instance of **Portion** class. We need to copy all the properties of source portion to target portion . In the following example, the **CopyPortion** method is shared that takes portion to be copied as an argument. It copies all the properties of source portion to a temporary portion and return the same. The target portion gets the copied values. - -```py -import aspose.slides as slides - -#Function Definition -def copy_portion(por): - temp = slides.Portion() - - #use CreatePortionFormatData!!! - portData = por.create_portion_format_effective() - - # use PortionFormat to set values - temp.portion_format.alternative_language_id = portData.alternative_language_id - temp.portion_format.bookmark_id = portData.bookmark_id - temp.portion_format.escapement = portData.escapement - temp.portion_format.fill_format.fill_type = por.portion_format.fill_format.fill_type - temp.portion_format.fill_format.solid_fill_color.color = portData.fill_format.solid_fill_color.color - - temp.portion_format.font_bold = portData.font_bold - temp.portion_format.font_height = portData.font_height - - temp.portion_format.font_italic = portData.font_italic - - temp.portion_format.font_underline = portData.font_underline - temp.portion_format.underline_fill_format.fill_type = portData.underline_fill_format.fill_type - temp.portion_format.underline_fill_format.solid_fill_color.color = portData.underline_fill_format.solid_fill_color.color - - temp.portion_format.is_hard_underline_fill = portData.is_hard_underline_fill - - temp.portion_format.is_hard_underline_line = portData.is_hard_underline_line - - temp.portion_format.kumimoji = portData.kumimoji - - temp.portion_format.kerning_minimal_size = portData.kerning_minimal_size - temp.portion_format.language_id = portData.language_id - - temp.portion_format.latin_font = portData.latin_font - temp.portion_format.east_asian_font = portData.east_asian_font - temp.portion_format.complex_script_font = portData.complex_script_font - temp.portion_format.symbol_font = portData.symbol_font - - temp.portion_format.text_cap_type = portData.text_cap_type - temp.portion_format.spacing = portData.spacing - temp.portion_format.strikethrough_type = portData.strikethrough_type - - temp.portion_format.proof_disabled = portData.proof_disabled - - temp.portion_format.normalise_height = portData.normalise_height - - temp.portion_format.hyperlink_mouse_over = portData.hyperlink_mouse_over - temp.portion_format.hyperlink_click = por.portion_format.hyperlink_click - temp.portion_format.highlight_color.color = portData.highlight_color.color - - return temp -```