1use super::{ActionType, Command};
2use crate::excel::Cell;
3use anyhow::Result;
4
5#[derive(Clone)]
6pub struct RowAction {
7 pub sheet_index: usize,
8 pub sheet_name: String,
9 pub row: usize,
10 pub row_data: Vec<Cell>,
11}
12
13impl Command for RowAction {
14 fn execute(&self) -> Result<()> {
15 unimplemented!("Requires an ActionExecutor implementation")
16 }
17
18 fn undo(&self) -> Result<()> {
19 unimplemented!("Requires an ActionExecutor implementation")
20 }
21
22 fn action_type(&self) -> ActionType {
23 ActionType::DeleteRow
24 }
25}
26
27#[derive(Clone)]
28pub struct MultiRowAction {
29 pub sheet_index: usize,
30 pub sheet_name: String,
31 pub start_row: usize,
32 pub end_row: usize,
33 pub rows_data: Vec<Vec<Cell>>,
34}
35
36impl Command for MultiRowAction {
37 fn execute(&self) -> Result<()> {
38 unimplemented!("Requires an ActionExecutor implementation")
39 }
40
41 fn undo(&self) -> Result<()> {
42 unimplemented!("Requires an ActionExecutor implementation")
43 }
44
45 fn action_type(&self) -> ActionType {
46 ActionType::DeleteMultiRows
47 }
48}