Inline single use interfaces

This commit is contained in:
Dolan
2021-03-15 00:11:39 +00:00
parent 18ce200cdb
commit a3febae8a3
42 changed files with 91 additions and 181 deletions

View File

@ -1,10 +1,8 @@
import { XmlAttributeComponent } from "file/xml-components";
export interface IGraphicDataAttributes {
export class GraphicDataAttributes extends XmlAttributeComponent<{
readonly uri?: string;
}
export class GraphicDataAttributes extends XmlAttributeComponent<IGraphicDataAttributes> {
}> {
protected readonly xmlKeys = {
uri: "uri",
};

View File

@ -1,12 +1,10 @@
import { IMediaData } from "file/media";
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
interface IBlipProperties {
class BlipAttributes extends XmlAttributeComponent<{
readonly embed: string;
readonly cstate: string;
}
class BlipAttributes extends XmlAttributeComponent<IBlipProperties> {
}> {
protected readonly xmlKeys = {
embed: "r:embed",
cstate: "cstate",

View File

@ -1,11 +1,9 @@
import { XmlAttributeComponent } from "file/xml-components";
export interface IPicLocksAttributes {
export class PicLocksAttributes extends XmlAttributeComponent<{
readonly noChangeAspect?: number;
readonly noChangeArrowheads?: number;
}
export class PicLocksAttributes extends XmlAttributeComponent<IPicLocksAttributes> {
}> {
protected readonly xmlKeys = {
noChangeAspect: "noChangeAspect",
noChangeArrowheads: "noChangeArrowheads",

View File

@ -1,12 +1,10 @@
import { XmlAttributeComponent } from "file/xml-components";
export interface INonVisualPropertiesAttributes {
export class NonVisualPropertiesAttributes extends XmlAttributeComponent<{
readonly id?: number;
readonly name?: string;
readonly descr?: string;
}
export class NonVisualPropertiesAttributes extends XmlAttributeComponent<INonVisualPropertiesAttributes> {
}> {
protected readonly xmlKeys = {
id: "id",
name: "name",

View File

@ -1,10 +1,8 @@
import { XmlAttributeComponent } from "file/xml-components";
export interface IPicAttributes {
export class PicAttributes extends XmlAttributeComponent<{
readonly xmlns?: string;
}
export class PicAttributes extends XmlAttributeComponent<IPicAttributes> {
}> {
protected readonly xmlKeys = {
xmlns: "xmlns:pic",
};

View File

@ -1,11 +1,9 @@
import { XmlAttributeComponent } from "file/xml-components";
export interface IExtentsAttributes {
export class ExtentsAttributes extends XmlAttributeComponent<{
readonly cx?: number;
readonly cy?: number;
}
export class ExtentsAttributes extends XmlAttributeComponent<IExtentsAttributes> {
}> {
protected readonly xmlKeys = {
cx: "cx",
cy: "cy",

View File

@ -1,11 +1,9 @@
import { XmlAttributeComponent } from "file/xml-components";
export interface IOffsetAttributes {
export class OffsetAttributes extends XmlAttributeComponent<{
readonly x?: number;
readonly y?: number;
}
export class OffsetAttributes extends XmlAttributeComponent<IOffsetAttributes> {
}> {
protected readonly xmlKeys = {
x: "x",
y: "y",

View File

@ -1,10 +1,8 @@
import { XmlAttributeComponent } from "file/xml-components";
export interface IPresetGeometryAttributes {
export class PresetGeometryAttributes extends XmlAttributeComponent<{
readonly prst?: string;
}
export class PresetGeometryAttributes extends XmlAttributeComponent<IPresetGeometryAttributes> {
}> {
protected readonly xmlKeys = {
prst: "prst",
};

View File

@ -1,10 +1,8 @@
import { XmlAttributeComponent } from "file/xml-components";
export interface IShapePropertiesAttributes {
export class ShapePropertiesAttributes extends XmlAttributeComponent<{
readonly bwMode?: string;
}
export class ShapePropertiesAttributes extends XmlAttributeComponent<IShapePropertiesAttributes> {
}> {
protected readonly xmlKeys = {
bwMode: "bwMode",
};

View File

@ -3,11 +3,9 @@ import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
import { GraphicData } from "./graphic-data";
interface IGraphicProperties {
class GraphicAttributes extends XmlAttributeComponent<{
readonly a: string;
}
class GraphicAttributes extends XmlAttributeComponent<IGraphicProperties> {
}> {
protected readonly xmlKeys = {
a: "xmlns:a",
};

View File

@ -2,14 +2,7 @@ import { XmlAttributeComponent } from "file/xml-components";
import { IDistance } from "../drawing";
// distT, distB etc have no effect on inline images, only floating
export interface IInlineAttributes extends IDistance {
readonly distT?: number;
readonly distB?: number;
readonly distL?: number;
readonly distR?: number;
}
export class InlineAttributes extends XmlAttributeComponent<IInlineAttributes> {
export class InlineAttributes extends XmlAttributeComponent<IDistance> {
protected readonly xmlKeys = {
distT: "distT",
distB: "distB",