Difference between revisions of "PptFile class"

From Catglobe Wiki
Jump to: navigation, search
(Created page with "{{CGscriptConstructors_Template|Parameters= {{CGscriptParameters_Template|Type=Attachment|Name=<nowiki>attachment</nowiki>|Description=<nowiki>Load from this attachment.</nowi...")
 
Line 1: Line 1:
 +
{{CGscriptClass_Template
 +
|Name=<nowiki>PptFile</nowiki>
 +
|Description=<nowiki>Manipulate PPT files.</nowiki>
 +
|Constructors=
 +
{{CGscriptConstructors_Template|Description=<nowiki>Create new presentation.</nowiki>}}
 
{{CGscriptConstructors_Template|Parameters=
 
{{CGscriptConstructors_Template|Parameters=
 
{{CGscriptParameters_Template|Type=Attachment|Name=<nowiki>attachment</nowiki>|Description=<nowiki>Load from this attachment.</nowiki>}}
 
{{CGscriptParameters_Template|Type=Attachment|Name=<nowiki>attachment</nowiki>|Description=<nowiki>Load from this attachment.</nowiki>}}

Revision as of 07:47, 27 March 2016

PptFile



Manipulate PPT files.

Constructors

  • () - Create new presentation.
  • (Attachment attachment "Load from this attachment.") - Load existing presentation.
  • (string source "Load from this source.", bool isTemp "Is source a temporary file.") - Load existing presentation.

Methods

  • number AddSlide(string mastername "Name of the masterslide.", string layoutType "Layout type from the master slide.") - Add a new blank slide based on the given master slide.
  • Empty Clear() - Remove all slides. Keep all master slides.
  • number CloneSlide(PptFile source "Source of slide.", number idx "Index of slide in the source.", bool allowCloneMissingLayout "Copy master slide from source or throw exception.") - Clone a slide from another presentation.
  • number CloneSlide(PptFile source "Source of slide.", string name "Name of the slide in the source.", bool allowCloneMissingLayout "Copy master slide from source or throw exception.") - Clone a slide from another presentation.
  • string CurrentLayoutType(number idx "Index of slide.") - Get the current layout type.
  • string CurrentMasterName(number idx "Index of slide.") - Get the current master.
  • array GetAllDiagrams(number idx "Index of slide.") - Return a list of diagram names that can be used in SetDiagram and other diagram functions.
  • array GetAllMasterTextBoxes(string mastername "Name of the masterslide.", string layoutType "Layout from the master slide.") - Return a list of text box names that can be used in SetText for the given slide.
  • array GetAllTables(number idx "Index of slide.") - Return a list of table names that can be used in SetDiagram and other diagram functions.
  • array GetAllTextBoxes(number idx "Index of slide.") - Return a list of text box names that can be used in SetText for the given slide.
  • array GetLayoutTypesFromMaster(string name "Name of master.") - Get a list of all the layout types that belongs to a given master slide.
  • array GetMasterNames() - Get a list of all the master slide names. The first is also the primary.
  • number GetMasterSlideIdxByName(string name "Name of slide to find.") - Find a slide based on the name. Return -1 if not found.
  • number GetMasterTextFields(string mastername "Name of the masterslide.", string layoutType "Layout from the master slide.", string name "Name of text box.") - Get the number of parameters needed to format the fields in the text box with the given name.
  • number GetSlideIdxByName(string name "Name of slide to find.") - Find a slide based on the name. Return -1 if not found.
  • number GetTextFields(number idx "Index of slide.", string name "Name of text box.") - Get the number of parameters needed to format the fields in the text box with the given name.
  • string Name(number idx "Index of slide.") - Get the name of the given slide.
  • number NumberOfSlides() - Get the number of slides.
  • Empty RemoveSlide(number idx "Index of slide to remove.") - Remove the given slide. All indexes of following slides are adjusted.
  • Empty RenderSlideAsPng(number idx "Index of slide to render.", string dest "Save to this file.", bool isTemp "Is destination a temporary file.") - Render a slide as png image.
  • string RenderSlideAsSvg(number idx "Index of slide to render.") - Render a slide as svg image.
  • Empty SaveAllAsPptx(string dest "Save to this file.", bool isTemp "Is destination a temporary file.") - Save presentation.
  • Empty SetDiagram(number idx "Index of slide.", string name "Name of diagram.", number diagramIndex "Data for the table.", string chartTitle "Title of the chart.") - Set the values of the diagram with the given name on the given slide to the values generated by the diagram returned by createCrossDiagram or createFixedCrossTable.
  • Empty SetDiagramData(number idx "Index of slide.", string name "Name of diagram.", array data "Data for the table. E.g. {{'','Series 1'}, {'Category 1', 123.45}}", string chartTitle "Title of the chart.") - Set the values of the diagram with the given name on the given slide to the values given.
  • Empty SetMasterAndLayout(number idx "Index of slide.", string mastername "Name of the masterslide.", string layoutType "Layout from the master slide.") - Set the layout on the given slide to the layout from the given master.
  • string SetMasterText(string mastername "Name of the masterslide.", string layoutType "Layout from the master slide.", string name "Name of text box.", array parameters "Parameters for the text box.") - Get the number of parameters needed to format the fields in the text box with the given name. Return resulting plain text value.
  • Empty SetTable(number idx "Index of slide.", string name "Name of diagram.", number diagramIndex "Data for the table.", bool keepTableWidth "If true, the columnsare split into minor cols. This will keep the width of the table. If false the columns are cloned, which will keep the size of cols, but table may then exceed the slide width.", bool keepTableHeight "If true, the rows are split into minor rows. This will keep the height of the table. If false the last row is cloned, which will keep the size of rows, but table may then exceed the slide height.") - Set the values of the table with the given name on the given slide to the values generated by the diagram returned by createCrossDiagram or createFixedCrossTable.
  • Empty SetTableData(number idx "Index of slide.", string name "Name of table.", array data "Data for the table. E.g. {{'','Series 1'}, {'Category 1', 123.45}}.", bool keepTableWidth "If true, the last col is split into minor cols. This will keep the width of the table. If false the last col is cloned, which will keep the size of cols, but table may then exceed the slide width.", bool keepTableHeight "If true, the last row is split into minor rows. This will keep the height of the table. If false the last row is cloned, which will keep the size of rows, but table may then exceed the slide height.") - Set the values of the table with the given name on the given slide to the values given.
  • string SetText(number idx "Index of slide.", string name "Name of text box.", array parameters "Parameters for the text box.") - Get the number of parameters needed to format the fields in the text box with the given name. Return resulting plain text value.
  • string ToString() - The string representation of the object.

Properties

  • string ObjectTypeName { get; } - The name of the type of object.
  • TypeInformation TypeInformation { get; } - Get information about this class.