Skip to content

Commit 96999b6

Browse files
author
DESKTOP-U434MT0\hiro
committed
1 parent 873b10a commit 96999b6

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

src/structs/drawing/graphic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ impl Graphic {
2929
&mut self,
3030
reader: &mut Reader<R>,
3131
_e: &BytesStart,
32-
drawing_relationships: &RawRelationships,
32+
drawing_relationships: Option<&RawRelationships>,
3333
) {
3434
let mut buf = Vec::new();
3535

src/structs/drawing/graphic_data.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ impl GraphicData {
3131
&mut self,
3232
reader: &mut Reader<R>,
3333
_e: &BytesStart,
34-
drawing_relationships: &RawRelationships,
34+
drawing_relationships: Option<&RawRelationships>,
3535
) {
3636
let mut buf = Vec::new();
3737

@@ -40,7 +40,7 @@ impl GraphicData {
4040
Ok(Event::Empty(ref e)) => match e.name().into_inner() {
4141
b"c:chart" => {
4242
let chart_id = get_attribute(e, b"r:id").unwrap();
43-
let relationship = drawing_relationships.get_relationship_by_rid(&chart_id);
43+
let relationship = drawing_relationships.unwrap().get_relationship_by_rid(&chart_id);
4444
let _ = chart::read(relationship.get_raw_file(), &mut self.chart_space);
4545
}
4646
_ => (),

src/structs/drawing/spreadsheet/graphic_frame.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ impl GraphicFrame {
7777
&mut self,
7878
reader: &mut Reader<R>,
7979
e: &BytesStart,
80-
drawing_relationships: &RawRelationships,
80+
drawing_relationships: Option<&RawRelationships>,
8181
) {
8282
match get_attribute(e, b"macro") {
8383
Some(v) => {

src/structs/drawing/spreadsheet/two_cell_anchor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ impl TwoCellAnchor {
204204
}
205205
b"xdr:graphicFrame" => {
206206
let mut obj = GraphicFrame::default();
207-
obj.set_attributes(reader, e, drawing_relationships.unwrap());
207+
obj.set_attributes(reader, e, drawing_relationships);
208208
self.set_graphic_frame(obj);
209209
}
210210
b"xdr:sp" => {

src/structs/vml/image_data.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ impl ImageData {
3535
&mut self,
3636
_reader: &mut Reader<R>,
3737
e: &BytesStart,
38-
drawing_relationships: &RawRelationships,
38+
drawing_relationships: Option<&RawRelationships>,
3939
) {
4040
match get_attribute(e, b"o:relid") {
4141
Some(relid) => {
42-
let relationship = drawing_relationships.get_relationship_by_rid(&relid);
42+
let relationship = drawing_relationships.unwrap().get_relationship_by_rid(&relid);
4343
self.image_name
4444
.set_value_string(relationship.get_raw_file().get_file_name());
4545
}

src/structs/vml/shape.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ impl Shape {
280280
}
281281
b"v:imagedata" => {
282282
let mut obj = ImageData::default();
283-
obj.set_attributes(reader, e, drawing_relationships.unwrap());
283+
obj.set_attributes(reader, e, drawing_relationships);
284284
self.set_image_data(obj);
285285
}
286286
_ => (),

0 commit comments

Comments
 (0)