@@ -920,6 +920,26 @@ impl Docx {
920920 Some ( "header" ) ,
921921 ) ;
922922 }
923+ HeaderChild :: StructuredDataTag ( tag) => {
924+ for child in tag. children . iter_mut ( ) {
925+ if let StructuredDataTagChild :: Paragraph ( paragraph) = child {
926+ collect_images_from_paragraph (
927+ paragraph,
928+ & mut images,
929+ & mut image_bufs,
930+ Some ( "header" ) ,
931+ ) ;
932+ }
933+ if let StructuredDataTagChild :: Table ( table) = child {
934+ collect_images_from_table (
935+ table,
936+ & mut images,
937+ & mut image_bufs,
938+ Some ( "header" ) ,
939+ ) ;
940+ }
941+ }
942+ }
923943 }
924944 }
925945 header_images[ 0 ] = images;
@@ -945,6 +965,26 @@ impl Docx {
945965 Some ( "header" ) ,
946966 ) ;
947967 }
968+ HeaderChild :: StructuredDataTag ( tag) => {
969+ for child in tag. children . iter_mut ( ) {
970+ if let StructuredDataTagChild :: Paragraph ( paragraph) = child {
971+ collect_images_from_paragraph (
972+ paragraph,
973+ & mut images,
974+ & mut image_bufs,
975+ Some ( "header" ) ,
976+ ) ;
977+ }
978+ if let StructuredDataTagChild :: Table ( table) = child {
979+ collect_images_from_table (
980+ table,
981+ & mut images,
982+ & mut image_bufs,
983+ Some ( "header" ) ,
984+ ) ;
985+ }
986+ }
987+ }
948988 }
949989 }
950990 header_images[ 1 ] = images;
@@ -970,6 +1010,26 @@ impl Docx {
9701010 Some ( "header" ) ,
9711011 ) ;
9721012 }
1013+ HeaderChild :: StructuredDataTag ( tag) => {
1014+ for child in tag. children . iter_mut ( ) {
1015+ if let StructuredDataTagChild :: Paragraph ( paragraph) = child {
1016+ collect_images_from_paragraph (
1017+ paragraph,
1018+ & mut images,
1019+ & mut image_bufs,
1020+ Some ( "header" ) ,
1021+ ) ;
1022+ }
1023+ if let StructuredDataTagChild :: Table ( table) = child {
1024+ collect_images_from_table (
1025+ table,
1026+ & mut images,
1027+ & mut image_bufs,
1028+ Some ( "header" ) ,
1029+ ) ;
1030+ }
1031+ }
1032+ }
9731033 }
9741034 }
9751035 header_images[ 2 ] = images;
@@ -1002,6 +1062,26 @@ impl Docx {
10021062 Some ( "footer" ) ,
10031063 ) ;
10041064 }
1065+ FooterChild :: StructuredDataTag ( tag) => {
1066+ for child in tag. children . iter_mut ( ) {
1067+ if let StructuredDataTagChild :: Paragraph ( paragraph) = child {
1068+ collect_images_from_paragraph (
1069+ paragraph,
1070+ & mut images,
1071+ & mut image_bufs,
1072+ Some ( "header" ) ,
1073+ ) ;
1074+ }
1075+ if let StructuredDataTagChild :: Table ( table) = child {
1076+ collect_images_from_table (
1077+ table,
1078+ & mut images,
1079+ & mut image_bufs,
1080+ Some ( "header" ) ,
1081+ ) ;
1082+ }
1083+ }
1084+ }
10051085 }
10061086 }
10071087 footer_images[ 0 ] = images;
@@ -1027,6 +1107,26 @@ impl Docx {
10271107 Some ( "footer" ) ,
10281108 ) ;
10291109 }
1110+ FooterChild :: StructuredDataTag ( tag) => {
1111+ for child in tag. children . iter_mut ( ) {
1112+ if let StructuredDataTagChild :: Paragraph ( paragraph) = child {
1113+ collect_images_from_paragraph (
1114+ paragraph,
1115+ & mut images,
1116+ & mut image_bufs,
1117+ Some ( "header" ) ,
1118+ ) ;
1119+ }
1120+ if let StructuredDataTagChild :: Table ( table) = child {
1121+ collect_images_from_table (
1122+ table,
1123+ & mut images,
1124+ & mut image_bufs,
1125+ Some ( "header" ) ,
1126+ ) ;
1127+ }
1128+ }
1129+ }
10301130 }
10311131 }
10321132 footer_images[ 1 ] = images;
@@ -1052,6 +1152,26 @@ impl Docx {
10521152 Some ( "footer" ) ,
10531153 ) ;
10541154 }
1155+ FooterChild :: StructuredDataTag ( tag) => {
1156+ for child in tag. children . iter_mut ( ) {
1157+ if let StructuredDataTagChild :: Paragraph ( paragraph) = child {
1158+ collect_images_from_paragraph (
1159+ paragraph,
1160+ & mut images,
1161+ & mut image_bufs,
1162+ Some ( "header" ) ,
1163+ ) ;
1164+ }
1165+ if let StructuredDataTagChild :: Table ( table) = child {
1166+ collect_images_from_table (
1167+ table,
1168+ & mut images,
1169+ & mut image_bufs,
1170+ Some ( "header" ) ,
1171+ ) ;
1172+ }
1173+ }
1174+ }
10551175 }
10561176 }
10571177 footer_images[ 2 ] = images;
0 commit comments