File tree Expand file tree Collapse file tree 6 files changed +8
-8
lines changed
Expand file tree Collapse file tree 6 files changed +8
-8
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 _ => ( ) ,
Original file line number Diff line number Diff 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) => {
Original file line number Diff line number Diff 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" => {
Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff 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 _ => ( ) ,
You can’t perform that action at this time.
0 commit comments