diff --git a/src/ods.rs b/src/ods.rs index 19459e9..599dcb6 100644 --- a/src/ods.rs +++ b/src/ods.rs @@ -616,6 +616,15 @@ fn get_datatype( { return Ok((Data::String(s), formula, true)); } + Ok(Event::Start(ref e)) if e.name() == QName(b"office:annotation") => loop { + match reader.read_event_into(buf) { + Ok(Event::End(ref e)) if e.name() == QName(b"office:annotation") => { + break; + } + Err(e) => return Err(OdsError::Xml(e)), + _ => (), + } + }, Ok(Event::Start(ref e)) if e.name() == QName(b"text:p") => { if first_paragraph { first_paragraph = false; diff --git a/tests/test.rs b/tests/test.rs index 7a4d7dc..13077d5 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -1822,3 +1822,10 @@ fn issue_repeated_empty(#[case] fixture_path: &str) { ] ); } + +#[test] +fn ods_with_annotations() { + let mut ods: Ods<_> = wb("with-annotation.ods"); + let range = ods.worksheet_range("table1").unwrap(); + range_eq!(range, [[String("cell a.1".to_string())],]); +} diff --git a/tests/with-annotation.ods b/tests/with-annotation.ods new file mode 100644 index 0000000..d4ac285 Binary files /dev/null and b/tests/with-annotation.ods differ