ComOfficeKitby KDAN API Reference for Windows
Table of Contents

Class PresentationSceneEditor

Namespace
ComOfficeKit.Model
Assembly
ComOfficeKit.dll

The Apple SDK's value methods on a deck's slides, shapes and text, and SlideDeckEditService's on the deck, on one presentation: each is run by the engine as one undo step, on a slide by its index and a shape by its id, both from GetSlides(); text in a shape by its paragraph's and run's index, in the shape's text or in its table's cell (TableCellAddress). A shape takes an edit as PowerPoint's editor would: a SmartArt part, a grouped shape or a layout's does not move; a table, a chart or a line does not turn; a picture or a chart takes no fill; only a text box's or a table's own text is edited, and a table then fits its rows, as typing in a cell makes it. A snapshot read before an edit keeps its old values: read again after one.

public sealed class PresentationSceneEditor
Inheritance
PresentationSceneEditor
Inherited Members

Methods

Deleting(int)

The Apple SDK's SlideDeckEditService.deleting(_:) on the deck: the slide deleted, never the last one. One undo step.

public long Deleting(int selectedIndex)

Parameters

selectedIndex int

The slide's index, from 0 (the deck's selectedIndex).

Returns

long

The deck's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when there is no such slide, or it is the deck's last.

Duplicating(int)

The Apple SDK's SlideDeckEditService.duplicating(_:) on the deck: a copy of the slide after it, with an id of its own. One undo step.

public long Duplicating(int selectedIndex)

Parameters

selectedIndex int

The slide's index, from 0 (the deck's selectedIndex).

Returns

long

The deck's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when there is no such slide.

Inserting(int, int)

The Apple SDK's SlideDeckEditService.inserting(_:slide:scene:at:) on the deck, with the slide New Slide makes from a layout (SlideParser.LayoutTemplate.makeSlide(slideNumber:)): the layout's placeholders, empty, on a slide with an id and a number of its own. One undo step.

public long Inserting(int layout, int at)

Parameters

layout int

The layout's index in GetLayouts(); GetDefaultLayoutChoice(int?) gives New Slide's own.

at int

Where the slide goes, from 0 to SlideCount: 0 before the first slide, SlideCount after the last.

Returns

long

The deck's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when there is no such layout or place, or the deck's layouts cannot be read.

ReplacingFormatting(int, string, int, int, TextRunFormattingChange, TableCellAddress?)

The Apple SDK's TextRun.replacingFormatting(fontFamily:fontSizePt:bold:italic:underline:strikethrough:baselinePercent:highlightHex:colorHex:) on a run: its formatting, its text and link kept. One undo step.

public long ReplacingFormatting(int slide, string shapeId, int paragraph, int run, TextRunFormattingChange change, TableCellAddress? cell = null)

Parameters

slide int

The slide's index, from 0.

shapeId string

The shape's Id.

paragraph int

The paragraph's index, from 0, in the shape's text or the cell's.

run int

The run's index in the paragraph, from 0.

change TextRunFormattingChange

What to change: each part set, cleared (the run then takes its placeholder's or its theme's), or left.

cell TableCellAddress?

The table's cell, for a table; null for a text box.

Returns

long

The deck's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses a value or the address, or the shape's text is not the slide's own.

ReplacingFrame(int, string, ModelRect, double?)

The Apple SDK's SlideShape.replacingFrame(_:rotationDegrees:) on a shape: where it stands and how large it is, in points, and its turn. One undo step.

public long ReplacingFrame(int slide, string shapeId, ModelRect frame, double? rotationDegrees = null)

Parameters

slide int

The slide's index, from 0.

shapeId string

The shape's Id.

frame ModelRect

Its frame: x and y from -32,256 to 32,256, width and height from 0 to 32,256 (eight of PowerPoint's largest slides).

rotationDegrees double?

Its clockwise turn, from -360 to 360; null keeps the turn it has.

Returns

long

The deck's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses an argument, or the shape does not take the edit.

ReplacingNotes(int, string?)

The Apple SDK's SlideScene.replacingNotes(_:) on a slide: its speaker notes. One undo step.

public long ReplacingNotes(int slide, string? notes)

Parameters

slide int

The slide's index, from 0.

notes string

The notes, or null (or empty) for none.

Returns

long

The deck's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses an argument.

ReplacingParagraphs(int, string, IReadOnlyList<Paragraph>)

The Apple SDK's TextContent.replacingParagraphs(_:) on a text box: its paragraphs, its body's properties kept. One undo step.

public long ReplacingParagraphs(int slide, string shapeId, IReadOnlyList<Paragraph> newParagraphs)

Parameters

slide int

The slide's index, from 0.

shapeId string

The text box's Id.

newParagraphs IReadOnlyList<Paragraph>

One paragraph at least. Their numbers in OOXML's ranges (a size 1 to 4,000 pt, spacing 0 to 1,584 pt, a level 0 to 8), colours RRGGBB, a numbered bullet one of OOXML's schemes, and a run's link one the text already holds: the file's links are kept, and no new one is written.

Returns

long

The deck's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses a value, or the shape is not a text box of the slide's own.

ReplacingProperties(int, string, int, ParagraphPropertiesChange, TableCellAddress?)

The Apple SDK's Paragraph.replacingProperties(alignment:level:bullet:lineSpacing:) on a paragraph: its alignment, level, bullet and line spacing, its runs kept. One undo step.

public long ReplacingProperties(int slide, string shapeId, int paragraph, ParagraphPropertiesChange change, TableCellAddress? cell = null)

Parameters

slide int

The slide's index, from 0.

shapeId string

The shape's Id.

paragraph int

The paragraph's index, from 0, in the shape's text or the cell's.

change ParagraphPropertiesChange

What to change: each property set, cleared (a bullet, a line spacing), or left.

cell TableCellAddress?

The table's cell, for a table; null for a text box.

Returns

long

The deck's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses a value or the address, or the shape's text is not the slide's own.

ReplacingRuns(int, string, int, IReadOnlyList<TextRun>, TableCellAddress?)

The Apple SDK's Paragraph.replacingRuns(_:) on a paragraph: its runs, its properties kept. One undo step.

public long ReplacingRuns(int slide, string shapeId, int paragraph, IReadOnlyList<TextRun> newRuns, TableCellAddress? cell = null)

Parameters

slide int

The slide's index, from 0.

shapeId string

The shape's Id.

paragraph int

The paragraph's index, from 0, in the shape's text or the cell's.

newRuns IReadOnlyList<TextRun>

The runs, held as ReplacingParagraphs(int, string, IReadOnlyList<Paragraph>)'s are; a line break's text is "\n".

cell TableCellAddress?

The table's cell, for a table; null for a text box.

Returns

long

The deck's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses a value or the address, or the shape's text is not the slide's own.

ReplacingStyle(int, string, SlideShapeStyleChange)

The Apple SDK's SlideShape.replacingStyle(fill:strokeHex:strokeWidthPt:) on a shape: its fill and outline. One undo step.

public long ReplacingStyle(int slide, string shapeId, SlideShapeStyleChange change)

Parameters

slide int

The slide's index, from 0.

shapeId string

The shape's Id.

change SlideShapeStyleChange

What to change: each part set, cleared, or left as it is.

Returns

long

The deck's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses an argument (a colour not RRGGBB, an image fill, a pattern OOXML does not name), or the shape does not take the edit.

ReplacingStyle(int, string, TableCellAddress, TableCellStyleChange)

The Apple SDK's TableCell.replacingStyle(fill:borders:) on a table's cell: its fill and borders. A cell covered by a merged one takes a style too. One undo step.

public long ReplacingStyle(int slide, string shapeId, TableCellAddress cell, TableCellStyleChange change)

Parameters

slide int

The slide's index, from 0.

shapeId string

The table's Id.

cell TableCellAddress

The cell.

change TableCellStyleChange

What to change: the fill set, cleared or left; the borders set whole, or left.

Returns

long

The deck's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses an argument (a colour not RRGGBB, an image fill, a width beyond 1,584 pt), there is no such cell, or the shape is no table.

ReplacingText(int, string, int, int, string, bool?, TableCellAddress?)

The Apple SDK's TextRun.replacingText(_:isLineBreak:) on a run: its text, its formatting and link kept. One undo step.

public long ReplacingText(int slide, string shapeId, int paragraph, int run, string newText, bool? isLineBreak = null, TableCellAddress? cell = null)

Parameters

slide int

The slide's index, from 0.

shapeId string

The shape's Id.

paragraph int

The paragraph's index, from 0, in the shape's text or the cell's.

run int

The run's index in the paragraph, from 0.

newText string

The text; a line break's is "\n".

isLineBreak bool?

True to make the run a line break, false to make it text; null keeps what it is.

cell TableCellAddress?

The table's cell, for a table; null for a text box.

Returns

long

The deck's ModelRevision after the edit.

Exceptions

ComOfficeKitException

InvalidArgument when the engine refuses the text or the address, or the shape's text is not the slide's own.