Compartir a través de


PowerPoint.BulletFormat class

Representa las propiedades de formato de viñetas de un texto que está asociado a PowerPoint.ParagraphFormat.

Extends

Comentarios

[ Conjunto de API: PowerPointApi 1.4 ]

Ejemplos

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/text/get-set-textrange.yaml

// Gets navigational (complex) properties of the selected text range.
await PowerPoint.run(async (context) => {
  const textRange: PowerPoint.TextRange = context.presentation.getSelectedTextRange();
  textRange.load("font,paragraphFormat/bulletFormat,paragraphFormat/horizontalAlignment");
  await context.sync();

  console.log("Font properties of selected text range:");
  console.log(`\tallCaps: ${textRange.font.allCaps}`);
  console.log(`\tbold: ${textRange.font.bold}`);
  console.log(`\tcolor: ${textRange.font.color}`);
  console.log(`\tdoubleStrikethrough: ${textRange.font.doubleStrikethrough}`);
  console.log(`\titalic: ${textRange.font.italic}`);
  console.log(`\tname: ${textRange.font.name}`);
  console.log(`\tsize: ${textRange.font.size}`);
  console.log(`\tsmallCaps: ${textRange.font.smallCaps}`);
  console.log(`\tstrikethrough: ${textRange.font.strikethrough}`);
  console.log(`\tsubscript: ${textRange.font.subscript}`);
  console.log(`\tsuperscript: ${textRange.font.superscript}`);
  console.log(`\tunderline: ${textRange.font.underline}`);

  console.log("Paragraph format properties of selected text range:");
  console.log(`\tbulletFormat.visible: ${textRange.paragraphFormat.bulletFormat.visible}`);
  console.log(`\thorizontalAlignment: ${textRange.paragraphFormat.horizontalAlignment}`);
});

Propiedades

context

Contexto de solicitud asociado al objeto . Esto conecta el proceso del complemento al proceso de la aplicación host de Office.

style

Especifica el estilo de las viñetas del párrafo. Vea PowerPoint.BulletStyle para obtener más información. Devuelve null si PowerPoint.TextRange incluye fragmentos de texto con diferentes propiedades de formato de viñetas.

type

Especifica el tipo de las viñetas del párrafo. Vea PowerPoint.BulletType para obtener más información. Devuelve null si PowerPoint.TextRange incluye fragmentos de texto con diferentes propiedades de formato de viñetas.

visible

Especifica si las viñetas del párrafo están visibles. Devuelve null si PowerPoint.TextRange incluye fragmentos de texto con valores de visibilidad de viñetas diferentes.

Métodos

load(options)

Pone en cola un comando para cargar las propiedades especificadas del objeto. Debe llamar a context.sync() antes de leer las propiedades.

load(propertyNames)

Pone en cola un comando para cargar las propiedades especificadas del objeto. Debe llamar a context.sync() antes de leer las propiedades.

load(propertyNamesAndPaths)

Pone en cola un comando para cargar las propiedades especificadas del objeto. Debe llamar a context.sync() antes de leer las propiedades.

toJSON()

Invalida el método JavaScript toJSON() para proporcionar una salida más útil cuando se pasa un objeto de API a JSON.stringify(). (JSON.stringifya su vez, llama al toJSON método del objeto que se le pasa). Mientras que el objeto original PowerPoint.BulletFormat es un objeto de API, el toJSON método devuelve un objeto JavaScript sin formato (escrito como PowerPoint.Interfaces.BulletFormatData) que contiene copias superficiales de las propiedades secundarias cargadas del objeto original.

Detalles de las propiedades

context

Contexto de solicitud asociado al objeto . Esto conecta el proceso del complemento al proceso de la aplicación host de Office.

context: RequestContext;

Valor de propiedad

style

Nota

Esta API se ofrece a los desarrolladores como versión preliminar y puede cambiar en función de los comentarios que recibamos. No utilice esta API en un entorno de producción.

Especifica el estilo de las viñetas del párrafo. Vea PowerPoint.BulletStyle para obtener más información. Devuelve null si PowerPoint.TextRange incluye fragmentos de texto con diferentes propiedades de formato de viñetas.

style: PowerPoint.BulletStyle | "Unsupported" | "AlphabetLowercasePeriod" | "AlphabetUppercasePeriod" | "ArabicNumeralParenthesisRight" | "ArabicNumeralPeriod" | "RomanLowercaseParenthesesBoth" | "RomanLowercaseParenthesisRight" | "RomanLowercasePeriod" | "RomanUppercasePeriod" | "AlphabetLowercaseParenthesesBoth" | "AlphabetLowercaseParenthesisRight" | "AlphabetUppercaseParenthesesBoth" | "AlphabetUppercaseParenthesisRight" | "ArabicNumeralParenthesesBoth" | "ArabicNumeralPlain" | "RomanUppercaseParenthesesBoth" | "RomanUppercaseParenthesisRight" | "SimplifiedChinesePlain" | "SimplifiedChinesePeriod" | "CircleNumberDoubleBytePlain" | "CircleNumberWideDoubleByteWhitePlain" | "CircleNumberWideDoubleByteBlackPlain" | "TraditionalChinesePlain" | "TraditionalChinesePeriod" | "ArabicAlphabetDash" | "ArabicAbjadDash" | "HebrewAlphabetDash" | "KanjiKoreanPlain" | "KanjiKoreanPeriod" | "ArabicDoubleBytePlain" | "ArabicDoubleBytePeriod" | "ThaiAlphabetPeriod" | "ThaiAlphabetParenthesisRight" | "ThaiAlphabetParenthesesBoth" | "ThaiNumeralPeriod" | "ThaiNumeralParenthesisRight" | "ThaiNumeralParenthesesBoth" | "HindiAlphabetPeriod" | "HindiNumeralPeriod" | "KanjiSimplifiedChineseDoubleBytePeriod" | "HindiNumeralParenthesisRight" | "HindiAlphabet1Period" | null;

Valor de propiedad

PowerPoint.BulletStyle | "Unsupported" | "AlphabetLowercasePeriod" | "AlphabetUppercasePeriod" | "ArabicNumeralParenthesisRight" | "ArabicNumeralPeriod" | "RomanLowercaseParenthesesBoth" | "RomanLowercaseParenthesisRight" | "RomanLowercasePeriod" | "RomanUppercasePeriod" | "AlphabetLowercaseParenthesesBoth" | "AlphabetLowercaseParenthesisRight" | "AlphabetUppercaseParenthesesBoth" | "AlphabetUppercaseParenthesisRight" | "ArabicNumeralParenthesesBoth" | "ArabicNumeralPlain" | "RomanUppercaseParenthesesBoth" | "RomanUppercaseParenthesisRight" | "SimplifiedChinesePlain" | "SimplifiedChinesePeriod" | "CircleNumberDoubleBytePlain" | "CircleNumberWideDoubleByteWhitePlain" | "CircleNumberWideDoubleByteBlackPlain" | "TraditionalChinesePlain" | "TraditionalChinesePeriod" | "ArabicAlphabetDash" | "ArabicAbjadDash" | "HebrewAlphabetDash" | "KanjiKoreanPlain" | "KanjiKoreanPeriod" | "ArabicDoubleBytePlain" | "ArabicDoubleBytePeriod" | "ThaiAlphabetPeriod" | "ThaiAlphabetParenthesisRight" | "ThaiAlphabetParenthesesBoth" | "ThaiNumeralPeriod" | "ThaiNumeralParenthesisRight" | "ThaiNumeralParenthesesBoth" | "HindiAlphabetPeriod" | "HindiNumeralPeriod" | "KanjiSimplifiedChineseDoubleBytePeriod" | "HindiNumeralParenthesisRight" | "HindiAlphabet1Period" | null

Comentarios

[ Conjunto de API: PowerPointApi BETA (SOLO VERSIÓN PRELIMINAR) ]

type

Nota

Esta API se ofrece a los desarrolladores como versión preliminar y puede cambiar en función de los comentarios que recibamos. No utilice esta API en un entorno de producción.

Especifica el tipo de las viñetas del párrafo. Vea PowerPoint.BulletType para obtener más información. Devuelve null si PowerPoint.TextRange incluye fragmentos de texto con diferentes propiedades de formato de viñetas.

type: PowerPoint.BulletType | "Unsupported" | "None" | "Numbered" | "Unnumbered" | null;

Valor de propiedad

PowerPoint.BulletType | "Unsupported" | "None" | "Numbered" | "Unnumbered" | null

Comentarios

[ Conjunto de API: PowerPointApi BETA (SOLO VERSIÓN PRELIMINAR) ]

visible

Especifica si las viñetas del párrafo están visibles. Devuelve null si PowerPoint.TextRange incluye fragmentos de texto con valores de visibilidad de viñetas diferentes.

visible: boolean | null;

Valor de propiedad

boolean | null

Comentarios

[ Conjunto de API: PowerPointApi 1.4 ]

Detalles del método

load(options)

Pone en cola un comando para cargar las propiedades especificadas del objeto. Debe llamar a context.sync() antes de leer las propiedades.

load(options?: PowerPoint.Interfaces.BulletFormatLoadOptions): PowerPoint.BulletFormat;

Parámetros

options
PowerPoint.Interfaces.BulletFormatLoadOptions

Proporciona opciones para las propiedades del objeto que se van a cargar.

Devoluciones

load(propertyNames)

Pone en cola un comando para cargar las propiedades especificadas del objeto. Debe llamar a context.sync() antes de leer las propiedades.

load(propertyNames?: string | string[]): PowerPoint.BulletFormat;

Parámetros

propertyNames

string | string[]

Una cadena delimitada por comas o una matriz de cadenas que especifican las propiedades que se van a cargar.

Devoluciones

load(propertyNamesAndPaths)

Pone en cola un comando para cargar las propiedades especificadas del objeto. Debe llamar a context.sync() antes de leer las propiedades.

load(propertyNamesAndPaths?: {
            select?: string;
            expand?: string;
        }): PowerPoint.BulletFormat;

Parámetros

propertyNamesAndPaths

{ select?: string; expand?: string; }

propertyNamesAndPaths.select es una cadena delimitada por comas que especifica las propiedades que se van a cargar y propertyNamesAndPaths.expand es una cadena delimitada por comas que especifica las propiedades de navegación que se van a cargar.

Devoluciones

toJSON()

Invalida el método JavaScript toJSON() para proporcionar una salida más útil cuando se pasa un objeto de API a JSON.stringify(). (JSON.stringifya su vez, llama al toJSON método del objeto que se le pasa). Mientras que el objeto original PowerPoint.BulletFormat es un objeto de API, el toJSON método devuelve un objeto JavaScript sin formato (escrito como PowerPoint.Interfaces.BulletFormatData) que contiene copias superficiales de las propiedades secundarias cargadas del objeto original.

toJSON(): PowerPoint.Interfaces.BulletFormatData;

Devoluciones