excel_cli/actions/
command.rs1use super::types::{ActionCommand, ActionType};
2
3impl ActionCommand {
4 pub fn get_action_type(&self) -> ActionType {
6 match self {
7 ActionCommand::Cell(action) => match action.action_type {
8 ActionType::Edit => ActionType::Edit,
9 ActionType::Cut => ActionType::Cut,
10 ActionType::Paste => ActionType::Paste,
11 _ => ActionType::Edit, },
13 ActionCommand::Row(_) => ActionType::DeleteRow,
14 ActionCommand::MultiRow(_) => ActionType::DeleteMultiRows,
15 ActionCommand::Column(_) => ActionType::DeleteColumn,
16 ActionCommand::MultiColumn(_) => ActionType::DeleteMultiColumns,
17 ActionCommand::Sheet(_) => ActionType::DeleteSheet,
18 }
19 }
20}