parent
f08cefff0a
commit
be3e5a9860
|
@ -9,7 +9,7 @@ use crate::xml_builder::*;
|
|||
pub struct DocGrid {
|
||||
grid_type: DocGridType,
|
||||
line_pitch: Option<usize>,
|
||||
char_space: Option<usize>,
|
||||
char_space: Option<isize>,
|
||||
}
|
||||
|
||||
impl DocGrid {
|
||||
|
@ -35,7 +35,7 @@ impl DocGrid {
|
|||
self
|
||||
}
|
||||
|
||||
pub fn char_space(mut self, char_space: usize) -> Self {
|
||||
pub fn char_space(mut self, char_space: isize) -> Self {
|
||||
self.char_space = Some(char_space);
|
||||
self
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ impl ElementReader for DocGrid {
|
|||
doc_grid = doc_grid.line_pitch(line_pitch as usize);
|
||||
} else if local_name == "charSpace" {
|
||||
let char_space = f32::from_str(&a.value)?;
|
||||
doc_grid = doc_grid.char_space(char_space as usize);
|
||||
doc_grid = doc_grid.char_space(char_space as isize);
|
||||
}
|
||||
}
|
||||
Ok(doc_grid)
|
||||
|
|
|
@ -529,7 +529,7 @@ impl XMLBuilder {
|
|||
mut self,
|
||||
t: &DocGridType,
|
||||
line_pitch: Option<usize>,
|
||||
char_space: Option<usize>,
|
||||
char_space: Option<isize>,
|
||||
) -> Self {
|
||||
let t = t.to_string();
|
||||
let line_pitch_string = format!("{}", line_pitch.unwrap_or_default());
|
||||
|
|
|
@ -162,7 +162,7 @@ impl Docx {
|
|||
mut self,
|
||||
grid_type: docx_rs::DocGridType,
|
||||
line_pitch: Option<usize>,
|
||||
char_space: Option<usize>,
|
||||
char_space: Option<isize>,
|
||||
) -> Self {
|
||||
let mut doc_grid = docx_rs::DocGrid::with_empty().grid_type(grid_type);
|
||||
if let Some(line_pitch) = line_pitch {
|
||||
|
|
Loading…
Reference in New Issue