pub struct CommonData {
pub max_unit_id: StId,
pub page_area: CtPageArea,
pub public_res: Vec<StLoc>,
pub document_res: Vec<StLoc>,
pub template_page: Vec<TemplatePage>,
pub default_cs: Option<StRefId>,
pub xml_other_attrs: Vec<(Box<str>, Box<str>)>,
pub xml_other_children: Vec<(usize, Box<str>)>,
}Expand description
文档公共数据。
Fields§
§max_unit_id: StId当前文档中所有对象使用标识的最大值,初始值为 0。MaxUnitID 主要用于文档编辑,在向文档中新增加一个对象时,需要分配一个新的标识,新标识取值宜为 MaxUnitID + 1,同时需要修改此 MaxUnitID 值。
page_area: CtPageArea指定该文档页面区域的默认大小和位置。
public_res: Vec<StLoc>公共资源序列,每个节点指向 OFD 包内的一个资源描述文档,资源部分的描述见 7.9,字型和颜色空间等宜在公共资源文件中描述。
document_res: Vec<StLoc>文档资源序列,每个节点指向 OFD 包内的一个资源描述文档,资源部分的描述见 7.9,绘制参数、多媒体和矢量图像等宜在文档资源文件中描述。
template_page: Vec<TemplatePage>模板页序列,为一系列模板页的集合,模板页内容结构和普通页相同,描述见 7.7。
default_cs: Option<StRefId>引用在资源文件中定义的颜色空间标识,有关颜色空间的描述见 8.3.1。如果此项不存在,采用 RGB 作为默认颜色空间。
xml_other_attrs: Vec<(Box<str>, Box<str>)>§xml_other_children: Vec<(usize, Box<str>)>Implementations§
Source§impl CommonData
impl CommonData
pub fn from_reader<R: BufRead>(reader: R) -> Result<Self, SdkError>
Trait Implementations§
Source§impl Clone for CommonData
impl Clone for CommonData
Source§fn clone(&self) -> CommonData
fn clone(&self) -> CommonData
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CommonData
impl Debug for CommonData
Source§impl Default for CommonData
impl Default for CommonData
Source§fn default() -> CommonData
fn default() -> CommonData
Returns the “default value” for a type. Read more
Source§impl Display for CommonData
impl Display for CommonData
Auto Trait Implementations§
impl Freeze for CommonData
impl RefUnwindSafe for CommonData
impl Send for CommonData
impl Sync for CommonData
impl Unpin for CommonData
impl UnsafeUnpin for CommonData
impl UnwindSafe for CommonData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more