FIX: Add test for get_defined_name_list
Also uses the scope instead of the opaque sheet_id
This commit is contained in:
committed by
Nicolás Hatcher Andrés
parent
2ed5fb9bbc
commit
86213a8434
@@ -29,7 +29,7 @@ impl Workbook {
|
||||
}
|
||||
|
||||
/// Returns the a list of defined names in the workbook with their scope
|
||||
pub(crate) fn get_defined_names_with_scope(&self) -> Vec<(String, Option<u32>)> {
|
||||
pub(crate) fn get_defined_names_with_scope(&self) -> Vec<(String, Option<u32>, String)> {
|
||||
let sheet_id_index: Vec<u32> = self.worksheets.iter().map(|s| s.sheet_id).collect();
|
||||
|
||||
let defined_names = self
|
||||
@@ -45,7 +45,7 @@ impl Workbook {
|
||||
// convert Option<usize> to Option<u32>
|
||||
.map(|pos| pos as u32);
|
||||
|
||||
(dn.name.clone(), index)
|
||||
(dn.name.clone(), index, dn.formula.clone())
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
defined_names
|
||||
|
||||
Reference in New Issue
Block a user