diff --git a/Cargo.toml b/Cargo.toml index dbfc767c..76835279 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "umya-spreadsheet" version = "4.0.0" authors = ["MathNya "] categories = ["parser-implementations", "encoding", "text-processing"] -edition = "2021" +edition = "2024" keywords = ["excel", "spreadsheet", "xlsx", "reader", "writer"] license = "MIT" repository = "https://github.com/MathNya/umya-spreadsheet" diff --git a/src/helper/formula.rs b/src/helper/formula.rs index cb5c71f3..693b1c20 100644 --- a/src/helper/formula.rs +++ b/src/helper/formula.rs @@ -408,17 +408,16 @@ fn handle_in_error( } fn handle_scientific_notation(formula: &str, index: &mut usize, value: &mut String) -> bool { - if let Some(current_char) = formula.chars().nth(*index) { - if OPERATORS_SN.contains(current_char) - && value.len() > 1 - && compile_regex!(r"/^[1-9]{1}(\\.\\d+)?E{1}$/") - .is_match(¤t_char.to_string()) - .unwrap_or(false) - { - value.push(current_char); - *index += 1; - return true; - } + if let Some(current_char) = formula.chars().nth(*index) + && OPERATORS_SN.contains(current_char) + && value.len() > 1 + && compile_regex!(r"/^[1-9]{1}(\\.\\d+)?E{1}$/") + .is_match(¤t_char.to_string()) + .unwrap_or(false) + { + value.push(current_char); + *index += 1; + return true; } false } @@ -771,15 +770,15 @@ fn cleanup_tokens(tokens1: &[FormulaToken], tokens2: &mut Vec) { next_token = tokens1.get(i + 1); } - if let Some(p) = previous_token { - if !is_operand_or_close(p) { - continue; - } + if let Some(p) = previous_token + && !is_operand_or_close(p) + { + continue; } - if let Some(n) = next_token { - if !is_operand_or_open(n) { - continue; - } + if let Some(n) = next_token + && !is_operand_or_open(n) + { + continue; } tokens2.push(token!( value.clone(), @@ -788,10 +787,10 @@ fn cleanup_tokens(tokens1: &[FormulaToken], tokens2: &mut Vec) { )); value.clear(); - if let Some(n) = next_token { - if !is_operand_or_open(n) { - continue; - } + if let Some(n) = next_token + && !is_operand_or_open(n) + { + continue; } tokens2.push(token!( value.clone(), @@ -886,27 +885,27 @@ pub fn adjustment_formula_coordinate( let (mut col_num, mut row_num, is_lock_col, is_lock_row) = index_from_coordinate(coordinate); if col_num.is_some() || row_num.is_some() { - if let Some(col_num) = col_num.as_mut() { - if !is_lock_col.unwrap_or_default() { - let calc_col_num = - num_traits::cast::<_, i32>(*col_num).unwrap() + offset_col_num; - if calc_col_num < 1 { - has_error = true; - break; - } - *col_num = num_traits::cast::<_, u32>(calc_col_num).unwrap(); + if let Some(col_num) = col_num.as_mut() + && !is_lock_col.unwrap_or_default() + { + let calc_col_num = + num_traits::cast::<_, i32>(*col_num).unwrap() + offset_col_num; + if calc_col_num < 1 { + has_error = true; + break; } + *col_num = num_traits::cast::<_, u32>(calc_col_num).unwrap(); } - if let Some(row_num) = row_num.as_mut() { - if !is_lock_row.unwrap_or_default() { - let calc_row_num = - num_traits::cast::<_, i32>(*row_num).unwrap() + offset_row_num; - if calc_row_num < 1 { - has_error = true; - break; - } - *row_num = num_traits::cast::<_, u32>(calc_row_num).unwrap(); + if let Some(row_num) = row_num.as_mut() + && !is_lock_row.unwrap_or_default() + { + let calc_row_num = + num_traits::cast::<_, i32>(*row_num).unwrap() + offset_row_num; + if calc_row_num < 1 { + has_error = true; + break; } + *row_num = num_traits::cast::<_, u32>(calc_row_num).unwrap(); } let mut new_coordinate = String::new(); if let Some(col_num) = col_num { diff --git a/src/helper/utils.rs b/src/helper/utils.rs index b20273e5..0c4cdd2d 100644 --- a/src/helper/utils.rs +++ b/src/helper/utils.rs @@ -80,15 +80,14 @@ pub(crate) fn unescape_xstring(value: &str) -> std::borrow::Cow<'_, str> { let mut i = 0; while i < value.len() { let rest = &value[i..]; - if let Some(len) = escape_len(rest) { - if let Some(c) = u32::from_str_radix(&rest[2..6], 16) + if let Some(len) = escape_len(rest) + && let Some(c) = u32::from_str_radix(&rest[2..6], 16) .ok() .and_then(char::from_u32) - { - output.push(c); - i += len; - continue; - } + { + output.push(c); + i += len; + continue; } let c = rest.chars().next().unwrap(); output.push(c); diff --git a/src/reader/xlsx/workbook.rs b/src/reader/xlsx/workbook.rs index fef2e656..752d101d 100644 --- a/src/reader/xlsx/workbook.rs +++ b/src/reader/xlsx/workbook.rs @@ -91,11 +91,11 @@ pub(crate) fn read( sheet.add_defined_names(defined_name.clone()); } } else { - if let Some(v) = defined_name.address_obj().first() { - if let Ok(s) = wb.sheet_by_name_mut(v.sheet_name()) { - s.add_defined_names(defined_name.clone()); - continue; - } + if let Some(v) = defined_name.address_obj().first() + && let Ok(s) = wb.sheet_by_name_mut(v.sheet_name()) + { + s.add_defined_names(defined_name.clone()); + continue; } wb.add_defined_names(defined_name.clone()); } diff --git a/src/reader/xlsx/worksheet.rs b/src/reader/xlsx/worksheet.rs index deb85303..9cc7ce0c 100644 --- a/src/reader/xlsx/worksheet.rs +++ b/src/reader/xlsx/worksheet.rs @@ -56,23 +56,23 @@ pub(crate) fn read( shared_string_table: &SharedStringTable, stylesheet: &Stylesheet, ) -> Result<(), XlsxError> { - if let Some(source_file) = raw_data_of_worksheet.worksheet_file().source_file() { - if !raw_data_of_worksheet.worksheet_file().has_file_data() { - let file = File::open(source_file)?; - let mut archive = zip::read::ZipArchive::new(file)?; - let source = zip_by_name( - &mut archive, - raw_data_of_worksheet.worksheet_file().file_target(), - )?; - let reader = io::BufReader::new(source); - return read_from_reader( - worksheet, - reader, - raw_data_of_worksheet, - shared_string_table, - stylesheet, - ); - } + if let Some(source_file) = raw_data_of_worksheet.worksheet_file().source_file() + && !raw_data_of_worksheet.worksheet_file().has_file_data() + { + let file = File::open(source_file)?; + let mut archive = zip::read::ZipArchive::new(file)?; + let source = zip_by_name( + &mut archive, + raw_data_of_worksheet.worksheet_file().file_target(), + )?; + let reader = io::BufReader::new(source); + return read_from_reader( + worksheet, + reader, + raw_data_of_worksheet, + shared_string_table, + stylesheet, + ); } let data = io::Cursor::new(raw_data_of_worksheet.worksheet_file().file_data()); @@ -301,17 +301,17 @@ pub(crate) fn read_lite( shared_string_table: &SharedStringTable, stylesheet: &Stylesheet, ) -> Result { - if let Some(source_file) = raw_data_of_worksheet.worksheet_file().source_file() { - if !raw_data_of_worksheet.worksheet_file().has_file_data() { - let file = File::open(source_file)?; - let mut archive = zip::read::ZipArchive::new(file)?; - let source = zip_by_name( - &mut archive, - raw_data_of_worksheet.worksheet_file().file_target(), - )?; - let reader = io::BufReader::new(source); - return read_lite_from_reader(reader, shared_string_table, stylesheet); - } + if let Some(source_file) = raw_data_of_worksheet.worksheet_file().source_file() + && !raw_data_of_worksheet.worksheet_file().has_file_data() + { + let file = File::open(source_file)?; + let mut archive = zip::read::ZipArchive::new(file)?; + let source = zip_by_name( + &mut archive, + raw_data_of_worksheet.worksheet_file().file_target(), + )?; + let reader = io::BufReader::new(source); + return read_lite_from_reader(reader, shared_string_table, stylesheet); } let data = io::Cursor::new(raw_data_of_worksheet.worksheet_file().file_data()); @@ -375,22 +375,17 @@ pub(crate) fn read_cells_stream( where F: FnMut(&Cell), { - if let Some(source_file) = raw_data_of_worksheet.worksheet_file().source_file() { - if !raw_data_of_worksheet.worksheet_file().has_file_data() { - let file = File::open(source_file)?; - let mut archive = zip::read::ZipArchive::new(file)?; - let source = zip_by_name( - &mut archive, - raw_data_of_worksheet.worksheet_file().file_target(), - )?; - let reader = io::BufReader::new(source); - return read_cells_stream_from_reader( - reader, - shared_string_table, - stylesheet, - callback, - ); - } + if let Some(source_file) = raw_data_of_worksheet.worksheet_file().source_file() + && !raw_data_of_worksheet.worksheet_file().has_file_data() + { + let file = File::open(source_file)?; + let mut archive = zip::read::ZipArchive::new(file)?; + let source = zip_by_name( + &mut archive, + raw_data_of_worksheet.worksheet_file().file_target(), + )?; + let reader = io::BufReader::new(source); + return read_cells_stream_from_reader(reader, shared_string_table, stylesheet, callback); } let data = io::Cursor::new(raw_data_of_worksheet.worksheet_file().file_data()); diff --git a/src/structs/cell.rs b/src/structs/cell.rs index a32725b1..d6ad63d0 100644 --- a/src/structs/cell.rs +++ b/src/structs/cell.rs @@ -470,11 +470,10 @@ impl Cell { #[inline] #[must_use] pub fn formula_shared_index(&self) -> Option { - if let Some(v) = self.formula_obj() { - if v.formula_type() == &CellFormulaValues::Shared { + if let Some(v) = self.formula_obj() + && v.formula_type() == &CellFormulaValues::Shared { return Some(v.shared_index()); } - } None } @@ -540,11 +539,11 @@ impl Cell { } // convert value - let result = match self.style().number_format() { + + match self.style().number_format() { Some(number_format) => to_formatted_string(&value, number_format.format_code()), None => to_formatted_string(&value, NumberingFormat::FORMAT_GENERAL), - }; - result + } } #[must_use] @@ -586,12 +585,11 @@ impl Cell { self.coordinate.set_coordinate(&cell_reference); } - if let Some(v) = get_attribute(e, b"s") { - if let Ok(id) = v.parse::() { + if let Some(v) = get_attribute(e, b"s") + && let Ok(id) = v.parse::() { let style = stylesheet.style(id); self.set_style(style); } - } if let Some(v) = get_attribute(e, b"t") { type_value = v; @@ -613,13 +611,12 @@ impl Cell { self.cell_value.set_formula_obj(obj); } b"t" => { - if let Some(Ok(attribute)) = e.attributes().next() { - if attribute.key.into_inner() == b"xml:space" + if let Some(Ok(attribute)) = e.attributes().next() + && attribute.key.into_inner() == b"xml:space" && attribute.value.as_ref() == b"preserve" { reader.config_mut().trim_text(false); } - } let mut buf = Vec::new(); let text = crate::helper::utils::unescape_xml_text( &reader.read_text_into(e.name(), &mut buf).unwrap(), @@ -637,13 +634,12 @@ impl Cell { self.set_value_string_crate(text); } "s" => { - if let Ok(index) = text.parse::() { - if let Some(shared_string_item) = + if let Ok(index) = text.parse::() + && let Some(shared_string_item) = shared_string_table.shared_string_item().get(index) { self.set_shared_string_item(shared_string_item); } - } } "b" => { let prm = text == "1"; diff --git a/src/structs/cell_formula.rs b/src/structs/cell_formula.rs index fe0320be..6ae3a705 100644 --- a/src/structs/cell_formula.rs +++ b/src/structs/cell_formula.rs @@ -423,8 +423,7 @@ impl CellFormula { } } else if let Some((start_col, end_col)) = formula_shared_list.get(&self.shared_index.value()) - { - if coordinate == start_col { + && coordinate == start_col { reference_str = match end_col { Some(v) => { format!("{start_col}:{v}") @@ -433,7 +432,6 @@ impl CellFormula { }; attributes.push(("ref", &reference_str).into()); } - } // An array formula's range, as read. if self.formula_type.value() == &CellFormulaValues::Array && self.reference.has_value() { diff --git a/src/structs/color.rs b/src/structs/color.rs index 6466632a..94d4a154 100644 --- a/src/structs/color.rs +++ b/src/structs/color.rs @@ -259,11 +259,10 @@ impl Color { #[must_use] pub fn argb(&self) -> ARGB8 { - if let Some(idx) = self.indexed { - if let Some(v) = INDEX_TO_COLOR.get(&idx) { + if let Some(idx) = self.indexed + && let Some(v) = INDEX_TO_COLOR.get(&idx) { return *v; } - } self.argb.unwrap_or_default() } @@ -285,8 +284,8 @@ impl Color { if self.indexed.is_some() { return self.argb_str().into(); } - if let Some(key) = self.theme_index { - if let Some(v) = theme + if let Some(key) = self.theme_index + && let Some(v) = theme .theme_elements() .color_scheme() .color_map() @@ -297,7 +296,6 @@ impl Color { } return v.clone().into(); } - } self.argb_str().clone().into() } @@ -461,18 +459,16 @@ impl Color { } } b"indexed" => { - if let Ok(v) = get_attribute_value(&attr) { - if let Ok(num) = v.parse() { + if let Ok(v) = get_attribute_value(&attr) + && let Ok(num) = v.parse() { self.indexed = Some(num); } - } } b"theme" => { - if let Ok(v) = get_attribute_value(&attr) { - if let Ok(num) = v.parse() { + if let Ok(v) = get_attribute_value(&attr) + && let Ok(num) = v.parse() { self.theme_index = Some(num); } - } } b"rgb" => { if let Ok(v) = get_attribute_value(&attr) { @@ -480,11 +476,10 @@ impl Color { } } b"tint" => { - if let Ok(v) = get_attribute_value(&attr) { - if let Ok(num) = v.parse() { + if let Ok(v) = get_attribute_value(&attr) + && let Ok(num) = v.parse() { self.tint = Some(num); } - } } _ => {} } diff --git a/src/structs/custom_properties/custom_document_property.rs b/src/structs/custom_properties/custom_document_property.rs index c842c21f..8a3ec8be 100644 --- a/src/structs/custom_properties/custom_document_property.rs +++ b/src/structs/custom_properties/custom_document_property.rs @@ -156,7 +156,10 @@ impl CustomDocumentProperty { e: &BytesStart, empty_flag: bool, ) { - for (attr, field) in [("name", &mut self.name), ("linkTarget", &mut self.link_target)] { + for (attr, field) in [ + ("name", &mut self.name), + ("linkTarget", &mut self.link_target), + ] { if let Some(raw) = get_attribute(e, attr.as_bytes()) { let value = quick_xml::escape::unescape(&raw).unwrap_or(Cow::Borrowed(&raw)); field.set_value_string(value.into_owned()); diff --git a/src/structs/drawing/charts/area_chart_series.rs b/src/structs/drawing/charts/area_chart_series.rs index ea2d05e1..e0ac68c4 100644 --- a/src/structs/drawing/charts/area_chart_series.rs +++ b/src/structs/drawing/charts/area_chart_series.rs @@ -435,10 +435,10 @@ impl AreaChartSeries { pub fn formula_mut(&mut self) -> Vec<&mut Formula> { let mut result: Vec<&mut Formula> = Vec::default(); - if let Some(v) = &mut self.category_axis_data { - if let Some(h) = v.string_reference_mut() { - result.push(h.formula_mut()); - } + if let Some(v) = &mut self.category_axis_data + && let Some(h) = v.string_reference_mut() + { + result.push(h.formula_mut()); } if let Some(v) = &mut self.values { result.push(v.number_reference_mut().formula_mut()); diff --git a/src/structs/drawing/picture_locks.rs b/src/structs/drawing/picture_locks.rs index 6ea23692..153a88a9 100644 --- a/src/structs/drawing/picture_locks.rs +++ b/src/structs/drawing/picture_locks.rs @@ -43,10 +43,10 @@ impl PictureLocks { _reader: &mut Reader, e: &BytesStart, ) { - if let Some(v) = get_attribute(e, b"noChangeAspect") { - if v == "1" { - self.set_no_change_aspect(true); - } + if let Some(v) = get_attribute(e, b"noChangeAspect") + && v == "1" + { + self.set_no_change_aspect(true); } } diff --git a/src/structs/image.rs b/src/structs/image.rs index d279c8ae..a45bce6b 100644 --- a/src/structs/image.rs +++ b/src/structs/image.rs @@ -362,16 +362,14 @@ impl Image { if let Some(v) = anchor.picture() { result.push(v.blip_fill().blip().image()); } - if let Some(v) = anchor.shape() { - if let Some(bf) = v.shape_properties().blip_fill() { + if let Some(v) = anchor.shape() + && let Some(bf) = v.shape_properties().blip_fill() { result.push(bf.blip().image()); } - } - if let Some(v) = anchor.connection_shape() { - if let Some(bf) = v.shape_properties().blip_fill() { + if let Some(v) = anchor.connection_shape() + && let Some(bf) = v.shape_properties().blip_fill() { result.push(bf.blip().image()); } - } if let Some(v) = anchor.group_shape() { for pic in v.picture_collection() { result.push(pic.blip_fill().blip().image()); @@ -387,11 +385,10 @@ impl Image { if let Some(v) = anchor.picture() { result.push(v.blip_fill().blip().image()); } - if let Some(v) = anchor.shape() { - if let Some(bf) = v.shape_properties().blip_fill() { + if let Some(v) = anchor.shape() + && let Some(bf) = v.shape_properties().blip_fill() { result.push(bf.blip().image()); } - } if let Some(v) = anchor.group_shape() { for pic in v.picture_collection() { result.push(pic.blip_fill().blip().image()); diff --git a/src/structs/row.rs b/src/structs/row.rs index bc3707dc..fa72e51e 100644 --- a/src/structs/row.rs +++ b/src/structs/row.rs @@ -247,11 +247,10 @@ impl Row { set_string_from_xml!(self, e, custom_height, "customHeight"); set_string_from_xml!(self, e, hidden, "hidden"); - if let Some(v) = get_attribute(e, b"x14ac:dyDescent") { - if !v.is_empty() { + if let Some(v) = get_attribute(e, b"x14ac:dyDescent") + && !v.is_empty() { self.descent.set_value_string(v); } - } if let Some(v) = get_attribute(e, b"s") { let style = stylesheet.style(v.parse::().unwrap()); diff --git a/src/structs/shared_items.rs b/src/structs/shared_items.rs index 96594e8a..da0dc65a 100644 --- a/src/structs/shared_items.rs +++ b/src/structs/shared_items.rs @@ -232,24 +232,22 @@ impl SharedItems { } }, b"e" => { - if let Some(v) = get_attribute(e, b"v") { - if let Ok(e) = CellErrorType::from_str(&v) { + if let Some(v) = get_attribute(e, b"v") + && let Ok(e) = CellErrorType::from_str(&v) { let obj = SharedItemValue::Error(e); self.items.push(obj); } - } }, b"m" => { let obj = SharedItemValue::Empty; self.items.push(obj); }, b"n" => { - if let Some(v) = get_attribute(e, b"v") { - if let Ok(f) = v.parse::() { + if let Some(v) = get_attribute(e, b"v") + && let Ok(f) = v.parse::() { let obj = SharedItemValue::Numeric(f); self.items.push(obj); } - } }, b"s" => { if let Some(v) = get_attribute(e, b"v") { diff --git a/src/structs/shared_string_table.rs b/src/structs/shared_string_table.rs index db79df3c..47f9077e 100644 --- a/src/structs/shared_string_table.rs +++ b/src/structs/shared_string_table.rs @@ -82,15 +82,15 @@ impl SharedStringTable { } let hash_code = shared_string_item.hash_u64(); - let n = if let Some(v) = self.map.get(&hash_code) { + + if let Some(v) = self.map.get(&hash_code) { *v } else { let n = self.shared_string_item.len(); self.map.insert(hash_code, n); self.set_shared_string_item(shared_string_item); n - }; - n + } } pub(crate) fn set_attributes( diff --git a/src/structs/vml/fill.rs b/src/structs/vml/fill.rs index 0f72fc8f..3906cb3f 100644 --- a/src/structs/vml/fill.rs +++ b/src/structs/vml/fill.rs @@ -148,15 +148,15 @@ impl Fill { set_string_from_xml!(self, e, on, "on"); set_string_from_xml!(self, e, focus_size, "focussize"); - if let Some(relid) = get_attribute(e, b"o:relid") { - if let Some(rel) = drawing_relationships { - let relationship = rel.relationship_by_rid(&relid); - let mut obj = MediaObject::default(); - obj.set_image_title(get_attribute(e, b"o:title").unwrap()); - obj.set_image_name(relationship.raw_file().file_name()); - obj.set_image_data(relationship.raw_file().file_data()); - self.set_image(obj); - } + if let Some(relid) = get_attribute(e, b"o:relid") + && let Some(rel) = drawing_relationships + { + let relationship = rel.relationship_by_rid(&relid); + let mut obj = MediaObject::default(); + obj.set_image_title(get_attribute(e, b"o:title").unwrap()); + obj.set_image_name(relationship.raw_file().file_name()); + obj.set_image_data(relationship.raw_file().file_data()); + self.set_image(obj); } } diff --git a/src/structs/vml/image_data.rs b/src/structs/vml/image_data.rs index f39b2c7a..af1ade1c 100644 --- a/src/structs/vml/image_data.rs +++ b/src/structs/vml/image_data.rs @@ -78,14 +78,14 @@ impl ImageData { e: &BytesStart, drawing_relationships: Option<&RawRelationships>, ) { - if let Some(relid) = get_attribute(e, b"o:relid") { - if let Some(rel) = drawing_relationships { - let relationship = rel.relationship_by_rid(&relid); - let mut obj = MediaObject::default(); - obj.set_image_name(relationship.raw_file().file_name()); - obj.set_image_data(relationship.raw_file().file_data()); - self.set_image(obj); - } + if let Some(relid) = get_attribute(e, b"o:relid") + && let Some(rel) = drawing_relationships + { + let relationship = rel.relationship_by_rid(&relid); + let mut obj = MediaObject::default(); + obj.set_image_name(relationship.raw_file().file_name()); + obj.set_image_data(relationship.raw_file().file_data()); + self.set_image(obj); } set_string_from_xml!(self, e, title, "o:title"); diff --git a/src/structs/worksheet.rs b/src/structs/worksheet.rs index ad91315d..50e7f558 100644 --- a/src/structs/worksheet.rs +++ b/src/structs/worksheet.rs @@ -2582,8 +2582,8 @@ impl Worksheet { } } for ole_objects in self.ole_objects().ole_object() { - if let Some(fill) = ole_objects.shape().fill() { - if let Some(media_object) = fill.image() { + if let Some(fill) = ole_objects.shape().fill() + && let Some(media_object) = fill.image() { let is_new = !list .iter() .any(|v| v.image_name() == media_object.image_name()); @@ -2591,11 +2591,10 @@ impl Worksheet { list.push(media_object); } } - } } for comment in self.comments() { - if let Some(fill) = comment.shape().fill() { - if let Some(media_object) = fill.image() { + if let Some(fill) = comment.shape().fill() + && let Some(media_object) = fill.image() { let is_new = !list .iter() .any(|v| v.image_name() == media_object.image_name()); @@ -2603,7 +2602,6 @@ impl Worksheet { list.push(media_object); } } - } } list diff --git a/src/writer/xlsx/worksheet.rs b/src/writer/xlsx/worksheet.rs index 062a6c33..bdd51795 100644 --- a/src/writer/xlsx/worksheet.rs +++ b/src/writer/xlsx/worksheet.rs @@ -133,8 +133,8 @@ fn write_worksheet_properties( ) { let mut attributes: crate::structs::AttrCollection = Vec::new(); if has_macros { - let code_name = if worksheet.has_code_name() { - worksheet.code_name().as_ref().unwrap() + let code_name = if let Some(&value) = worksheet.code_name().as_ref() { + value } else { worksheet.name() }; diff --git a/tests/custom_property_attributes.rs b/tests/custom_property_attributes.rs index abadaddd..93726c07 100644 --- a/tests/custom_property_attributes.rs +++ b/tests/custom_property_attributes.rs @@ -1,5 +1,10 @@ use std::io::Cursor; -use umya_spreadsheet::{custom_properties::CustomDocumentProperty, reader, writer}; + +use umya_spreadsheet::{ + custom_properties::CustomDocumentProperty, + reader, + writer, +}; #[test] fn round_trip_custom_property_attributes() {