Skip to main content

WpdEvent

Enum WpdEvent 

Source
pub enum WpdEvent {
Show 38 variants Text(String), Tab, Space, LineBreak, ParagraphEnd, ListItemStart { ordered: bool, level: u8, counter: u32, }, ListItemEnd, HeadingStart { level: u8, }, BoldStart, BoldEnd, ItalicStart, ItalicEnd, UnderlineStart, UnderlineEnd, StrikethroughStart, StrikethroughEnd, SuperscriptStart, SuperscriptEnd, SubscriptStart, SubscriptEnd, TableStart, RowStart { header: bool, }, CellStart { column: i32, col_span: u32, row_span: u32, }, CoveredCell { column: i32, }, CellEnd, RowEnd, TableEnd, HeaderStart, HeaderEnd, FooterStart, FooterEnd, NoteStart { endnote: bool, }, NoteEnd, AsideStart { kind: String, }, AsideEnd, LinkStart { href: String, }, LinkEnd, Field(String),
}
Expand description

A single event recorded from the librevenge callback walk, decoded 1:1 from the binary stream shim.cpp produces. Events are strictly ordered and properly nested (each *Start has a matching *End), mirroring the order libwpd invoked the corresponding callbacks in.

Variants§

§

Text(String)

Literal run of text.

§

Tab

A tab character.

§

Space

A non-breaking/explicit space.

§

LineBreak

An explicit line break within a paragraph.

§

ParagraphEnd

End of the current paragraph.

§

ListItemStart

Start of a list item.

Fields

§ordered: bool

Whether the enclosing list is ordered (numbered) or unordered (bulleted).

§level: u8

1-based nesting depth of the enclosing list.

§counter: u32

1-based position within an ordered list; 0 for unordered lists.

§

ListItemEnd

End of a list item.

§

HeadingStart

Start of a heading paragraph (text:outline-level 1-6).

Fields

§level: u8

Heading level, 1 through 6.

§

BoldStart

Start of a bold span.

§

BoldEnd

End of a bold span.

§

ItalicStart

Start of an italic span.

§

ItalicEnd

End of an italic span.

§

UnderlineStart

Start of an underline span.

§

UnderlineEnd

End of an underline span.

§

StrikethroughStart

Start of a strikethrough span.

§

StrikethroughEnd

End of a strikethrough span.

§

SuperscriptStart

Start of a superscript span.

§

SuperscriptEnd

End of a superscript span.

§

SubscriptStart

Start of a subscript span.

§

SubscriptEnd

End of a subscript span.

§

TableStart

Start of a table.

§

RowStart

Start of a table row.

Fields

§header: bool

Whether librevenge flagged this row as a header row.

§

CellStart

Start of a real (non-covered) table cell.

Fields

§column: i32

Absolute grid column from librevenge:column, or -1 if libwpd did not report one for this cell.

§col_span: u32

Number of columns this cell spans (at least 1).

§row_span: u32

Number of rows this cell spans (at least 1).

§

CoveredCell

A covered (merged-away) grid position from a vertical or horizontal span.

Fields

§column: i32

Absolute grid column from librevenge:column, or -1 if unknown.

§

CellEnd

End of a table cell.

§

RowEnd

End of a table row.

§

TableEnd

End of a table.

§

HeaderStart

Start of the document’s running header (recurs on every page).

§

HeaderEnd

End of the document’s running header.

§

FooterStart

Start of the document’s running footer.

§

FooterEnd

End of the document’s running footer.

§

NoteStart

Start of a footnote or endnote body, anchored at this point in the flow.

Fields

§endnote: bool

true for an endnote, false for a footnote.

§

NoteEnd

End of a footnote or endnote body.

§

AsideStart

Start of a comment or text-box aside.

Fields

§kind: String

"comment" or "box".

§

AsideEnd

End of a comment or text-box aside.

§

LinkStart

Start of a hyperlink span.

Fields

§href: String

The link target, if librevenge reported one.

§

LinkEnd

End of a hyperlink span.

§

Field(String)

An inserted field (page number, page count, date, time, or another field type libwpd reported by name), already mapped to a stable placeholder string by the shim.

Trait Implementations§

Source§

impl Clone for WpdEvent

Source§

fn clone(&self) -> WpdEvent

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WpdEvent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for WpdEvent

Source§

impl PartialEq for WpdEvent

Source§

fn eq(&self, other: &WpdEvent) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for WpdEvent

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more