Ely Office: six offline-first desktop apps in Rust and GPUI
ElyDoc, ElyTable, ElyShow (LibreOfficeKit), ElyPDF (MuPDF), ElyTree (Git), ElyMark (Milkdown and CodeMirror in CEF). ElyMail and ElyAgent follow.
This commit is contained in:
817 files changed
+143101
No files matched your search
@@ -0,0 +1,47 @@
|
||||
//! Spreadsheet rows: pivot tables and charts.
|
||||
|
||||
use super::{Arg, Check, Command, command};
|
||||
|
||||
/// Pivot tables and charts (TABLE-10, 11).
|
||||
pub(super) const ROWS: &[Command] = &[
|
||||
command(
|
||||
"pivot.make",
|
||||
".uno:DataPilotExec",
|
||||
&[Arg::Text("Pivot")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"pivot.refresh",
|
||||
".uno:RecalcPivotTable",
|
||||
&[],
|
||||
Check::Finished,
|
||||
),
|
||||
command(
|
||||
"pivot.delete",
|
||||
".uno:DeletePivotTable",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"chart.insert",
|
||||
".uno:InsertObjectChart",
|
||||
&[
|
||||
Arg::Text("RangeList"),
|
||||
Arg::Bool("InNewTable"),
|
||||
Arg::Text("Chart"),
|
||||
],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"chart.change",
|
||||
".uno:ChangeChartData",
|
||||
&[
|
||||
Arg::Text("Name"),
|
||||
Arg::Text("Range"),
|
||||
Arg::Bool("ColHeaders"),
|
||||
Arg::Bool("RowHeaders"),
|
||||
Arg::Text("Chart"),
|
||||
],
|
||||
Check::Undoable,
|
||||
),
|
||||
];
|
||||
@@ -0,0 +1,41 @@
|
||||
//! Spreadsheet rows: calculation, names, error tracing.
|
||||
|
||||
use super::{Arg, Check, Command, command};
|
||||
|
||||
/// Calculation, named ranges and tracing (TABLE-03..06).
|
||||
pub(super) const ROWS: &[Command] = &[
|
||||
command(
|
||||
"calc.auto",
|
||||
".uno:AutomaticCalculation",
|
||||
&[Arg::Bool("AutomaticCalculation")],
|
||||
Check::Finished,
|
||||
),
|
||||
command("calc.now", ".uno:Calculate", &[], Check::Finished),
|
||||
command("calc.all", ".uno:CalculateHard", &[], Check::Finished),
|
||||
command(
|
||||
"names.define",
|
||||
".uno:DefineName",
|
||||
&[Arg::Text("Name"), Arg::Text("Symbol"), Arg::Loose("Scope")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"names.remove",
|
||||
".uno:DefineName",
|
||||
&[Arg::Text("Name"), Arg::Loose("Scope")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command("trace.error", ".uno:ShowErrors", &[], Check::Undoable),
|
||||
command(
|
||||
"trace.precedents",
|
||||
".uno:ShowPrecedents",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"trace.dependents",
|
||||
".uno:ShowDependents",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command("trace.clear", ".uno:ClearArrows", &[], Check::Undoable),
|
||||
];
|
||||
@@ -0,0 +1,185 @@
|
||||
//! Spreadsheet rows: formats, data, rules.
|
||||
|
||||
use super::{Arg, Check, Command, command};
|
||||
|
||||
/// A column for sorting, from 1; 0 for none.
|
||||
const fn key(name: &'static str) -> Arg {
|
||||
Arg::Int(name, "long", 0, 16_384)
|
||||
}
|
||||
|
||||
/// A row or column index, from 0.
|
||||
const fn index(name: &'static str) -> Arg {
|
||||
Arg::Int(name, "long", 0, 1_048_575)
|
||||
}
|
||||
|
||||
/// Cell borders: the outer, the inner lines, or none.
|
||||
const fn borders(id: &'static str, outer: bool, inner: bool) -> Command {
|
||||
command(
|
||||
id,
|
||||
".uno:SetBorderStyle",
|
||||
if inner {
|
||||
&[
|
||||
Arg::Line("OuterBorder.LeftBorder", true),
|
||||
Arg::Line("OuterBorder.RightBorder", true),
|
||||
Arg::Line("OuterBorder.TopBorder", true),
|
||||
Arg::Line("OuterBorder.BottomBorder", true),
|
||||
Arg::Line("InnerBorder.Horizontal", true),
|
||||
Arg::Line("InnerBorder.Vertical", true),
|
||||
]
|
||||
} else if outer {
|
||||
&[
|
||||
Arg::Line("OuterBorder.LeftBorder", true),
|
||||
Arg::Line("OuterBorder.RightBorder", true),
|
||||
Arg::Line("OuterBorder.TopBorder", true),
|
||||
Arg::Line("OuterBorder.BottomBorder", true),
|
||||
Arg::Line("InnerBorder.Horizontal", false),
|
||||
Arg::Line("InnerBorder.Vertical", false),
|
||||
]
|
||||
} else {
|
||||
&[
|
||||
Arg::Line("OuterBorder.LeftBorder", false),
|
||||
Arg::Line("OuterBorder.RightBorder", false),
|
||||
Arg::Line("OuterBorder.TopBorder", false),
|
||||
Arg::Line("OuterBorder.BottomBorder", false),
|
||||
Arg::Line("InnerBorder.Horizontal", false),
|
||||
Arg::Line("InnerBorder.Vertical", false),
|
||||
]
|
||||
},
|
||||
Check::Undoable,
|
||||
)
|
||||
}
|
||||
|
||||
/// Formats, sorting, filtering and rules (TABLE-07..09).
|
||||
pub(super) const ROWS: &[Command] = &[
|
||||
command(
|
||||
"number.general",
|
||||
".uno:NumberFormatStandard",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"number.decimal",
|
||||
".uno:NumberFormatDecimal",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"number.currency",
|
||||
".uno:NumberFormatCurrency",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"number.percent",
|
||||
".uno:NumberFormatPercent",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command("number.date", ".uno:NumberFormatDate", &[], Check::Undoable),
|
||||
command(
|
||||
"number.code",
|
||||
".uno:NumberFormat",
|
||||
&[Arg::Text("FormatCode")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command("align.left", ".uno:AlignLeft", &[], Check::Undoable),
|
||||
command(
|
||||
"align.center",
|
||||
".uno:AlignHorizontalCenter",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command("align.right", ".uno:AlignRight", &[], Check::Undoable),
|
||||
command("align.justify", ".uno:AlignBlock", &[], Check::Undoable),
|
||||
command("align.top", ".uno:AlignTop", &[], Check::Undoable),
|
||||
command("align.middle", ".uno:AlignVCenter", &[], Check::Undoable),
|
||||
command("align.bottom", ".uno:AlignBottom", &[], Check::Undoable),
|
||||
command(
|
||||
"cells.wrap",
|
||||
".uno:WrapText",
|
||||
&[Arg::Bool("WrapText")],
|
||||
Check::Undoable,
|
||||
),
|
||||
borders("cells.borders_all", true, true),
|
||||
borders("cells.borders_outer", true, false),
|
||||
borders("cells.borders_none", false, false),
|
||||
command(
|
||||
"cells.fill",
|
||||
".uno:BackgroundColor",
|
||||
&[Arg::Int("BackgroundColor.Color", "long", -1, 0xFF_FFFF)],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"data.sort",
|
||||
".uno:DataSort",
|
||||
&[
|
||||
Arg::Bool("HasHeader"),
|
||||
key("Col1"),
|
||||
Arg::Bool("Ascending1"),
|
||||
key("Col2"),
|
||||
Arg::Bool("Ascending2"),
|
||||
key("Col3"),
|
||||
Arg::Bool("Ascending3"),
|
||||
],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"data.autofilter",
|
||||
".uno:DataFilterAutoFilter",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"data.filter",
|
||||
".uno:DataFilterStandardFilter",
|
||||
&[Arg::Text("Query")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"data.unfilter",
|
||||
".uno:DataFilterRemoveFilter",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"data.dedupe",
|
||||
".uno:HandleDuplicateRecords",
|
||||
&[
|
||||
Arg::Bool("Remove"),
|
||||
Arg::Bool("IncludesHeaders"),
|
||||
Arg::Bool("DuplicateRows"),
|
||||
index("StartColumn"),
|
||||
index("StartRow"),
|
||||
index("EndColumn"),
|
||||
index("EndRow"),
|
||||
Arg::Int("TabNo", "long", 0, 9_999),
|
||||
],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"data.columns",
|
||||
".uno:TextToColumns",
|
||||
&[Arg::Text("Options")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command("select.data", ".uno:SelectData", &[], Check::Finished),
|
||||
command("paste.values", ".uno:PasteOnlyValue", &[], Check::Undoable),
|
||||
command(
|
||||
"paste.formulas",
|
||||
".uno:PasteOnlyFormula",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"rules.validation",
|
||||
".uno:Validation",
|
||||
&[Arg::Text("Rule")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"rules.conditional",
|
||||
".uno:ConditionalFormatEasy",
|
||||
&[Arg::Text("Rule")],
|
||||
Check::Undoable,
|
||||
),
|
||||
];
|
||||
@@ -0,0 +1,176 @@
|
||||
//! Drawing rows: shapes, lines, fill, outline, arrangement.
|
||||
|
||||
use super::{Arg, Check, Command, command};
|
||||
|
||||
/// Slide objects (SHOW-03 to 06).
|
||||
pub(super) const ROWS: &[Command] = &[
|
||||
command(
|
||||
"draw.text",
|
||||
".uno:Text",
|
||||
&[Arg::Bool("CreateDirectly")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"draw.shape",
|
||||
".uno:BasicShapes",
|
||||
&[Arg::Text("BasicShapes"), Arg::Bool("CreateDirectly")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command("draw.line", ".uno:Line", &[], Check::Undoable),
|
||||
command("draw.arrow", ".uno:LineArrowEnd", &[], Check::Undoable),
|
||||
command("draw.connector", ".uno:Connector", &[], Check::Undoable),
|
||||
command(
|
||||
"object.fill",
|
||||
".uno:FillColor",
|
||||
&[Arg::Int("FillColor", "long", 0, 0xFF_FFFF)],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"object.fill_none",
|
||||
".uno:FillStyle",
|
||||
&[Arg::Int("FillStyle", "long", 0, 0)],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"object.line_none",
|
||||
".uno:XLineStyle",
|
||||
&[Arg::Int("XLineStyle", "long", 0, 0)],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"object.line_color",
|
||||
".uno:XLineColor",
|
||||
&[Arg::Int("XLineColor", "long", 0, 0xFF_FFFF)],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"object.line_width",
|
||||
".uno:LineWidth",
|
||||
&[Arg::Int("LineWidth", "long", 0, 5_000)],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"object.transparency",
|
||||
".uno:FillTransparence",
|
||||
&[Arg::Int("FillTransparence", "unsigned short", 0, 100)],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"object.shadow",
|
||||
".uno:FillShadow",
|
||||
&[Arg::Bool("FillShadow")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"object.x",
|
||||
".uno:TransformDialog",
|
||||
&[Arg::Int("TransformPosX", "long", -1_000_000, 1_000_000)],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"object.y",
|
||||
".uno:TransformDialog",
|
||||
&[Arg::Int("TransformPosY", "long", -1_000_000, 1_000_000)],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"object.width",
|
||||
".uno:TransformDialog",
|
||||
&[Arg::Int("TransformWidth", "long", 1, 1_000_000)],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"object.height",
|
||||
".uno:TransformDialog",
|
||||
&[Arg::Int("TransformHeight", "long", 1, 1_000_000)],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"object.rotate",
|
||||
".uno:TransformDialog",
|
||||
&[
|
||||
Arg::Int("TransformRotationAngle", "long", 0, 35_999),
|
||||
Arg::Int("TransformRotationX", "long", -1_000_000, 1_000_000),
|
||||
Arg::Int("TransformRotationY", "long", -1_000_000, 1_000_000),
|
||||
],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"object.lock",
|
||||
".uno:TransformDialog",
|
||||
&[Arg::Bool("ProtectPos"), Arg::Bool("ProtectSize")],
|
||||
Check::Finished,
|
||||
),
|
||||
command(
|
||||
"object.select",
|
||||
".uno:SelectObject",
|
||||
&[Arg::Int("Index", "long", 0, 9_999), Arg::Bool("Add")],
|
||||
Check::Finished,
|
||||
),
|
||||
command(
|
||||
"object.deselect",
|
||||
".uno:SelectObject",
|
||||
&[Arg::Bool("Add")],
|
||||
Check::Finished,
|
||||
),
|
||||
command(
|
||||
"image.replace",
|
||||
".uno:ChangePicture",
|
||||
&[Arg::Text("FileName")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command("object.align_left", ".uno:ObjectAlignLeft", &[], Check::Undoable),
|
||||
command("object.align_center", ".uno:AlignCenter", &[], Check::Undoable),
|
||||
command("object.align_right", ".uno:ObjectAlignRight", &[], Check::Undoable),
|
||||
command("object.align_top", ".uno:AlignUp", &[], Check::Undoable),
|
||||
command("object.align_middle", ".uno:AlignMiddle", &[], Check::Undoable),
|
||||
command("object.align_bottom", ".uno:AlignDown", &[], Check::Undoable),
|
||||
command(
|
||||
"object.spread_across",
|
||||
".uno:DistributeHorzDistance",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"object.spread_down",
|
||||
".uno:DistributeVertDistance",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command("object.group", ".uno:FormatGroup", &[], Check::Undoable),
|
||||
command("object.ungroup", ".uno:FormatUngroup", &[], Check::Undoable),
|
||||
command(
|
||||
"text.fit",
|
||||
".uno:TextAutoFitToSize",
|
||||
&[Arg::Text("Fit")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command("view.snap_grid", ".uno:GridUse", &[], Check::Finished),
|
||||
command("view.snap_guides", ".uno:HelplinesUse", &[], Check::Finished),
|
||||
command(
|
||||
"guide.add",
|
||||
".uno:CapturePoint",
|
||||
&[
|
||||
Arg::Int("Kind", "unsigned short", 0, 1),
|
||||
Arg::Int("X", "long", -1_000_000, 1_000_000),
|
||||
Arg::Int("Y", "long", -1_000_000, 1_000_000),
|
||||
],
|
||||
Check::Finished,
|
||||
),
|
||||
command(
|
||||
"guide.move",
|
||||
".uno:CapturePoint",
|
||||
&[
|
||||
Arg::Int("Index", "long", 0, 999),
|
||||
Arg::Int("X", "long", -1_000_000, 1_000_000),
|
||||
Arg::Int("Y", "long", -1_000_000, 1_000_000),
|
||||
],
|
||||
Check::Finished,
|
||||
),
|
||||
command(
|
||||
"guide.delete",
|
||||
".uno:CapturePoint",
|
||||
&[Arg::Int("Index", "long", 0, 999), Arg::Bool("Delete")],
|
||||
Check::Finished,
|
||||
),
|
||||
];
|
||||
@@ -0,0 +1,271 @@
|
||||
//! Layout rows: pages, headers, fields, tables, images.
|
||||
|
||||
use super::{Arg, Check, Command, command};
|
||||
|
||||
/// Page, table and object commands.
|
||||
pub(super) const ROWS: &[Command] = &[
|
||||
command(
|
||||
"page.size",
|
||||
".uno:AttributePageSize",
|
||||
&[
|
||||
Arg::Int("AttributePageSize.Width", "long", 1_000, 600_000),
|
||||
Arg::Int("AttributePageSize.Height", "long", 1_000, 600_000),
|
||||
],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"page.orientation",
|
||||
".uno:AttributePageSize",
|
||||
&[
|
||||
Arg::Int("AttributePageSize.Width", "long", 1_000, 600_000),
|
||||
Arg::Int("AttributePageSize.Height", "long", 1_000, 600_000),
|
||||
Arg::Bool("AttributePage.Landscape"),
|
||||
Arg::Int("AttributePage.Layout", "long", 0, 3),
|
||||
Arg::Int("AttributePage.NumType", "long", 0, 99),
|
||||
],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"page.margins_lr",
|
||||
".uno:PageLRMargin",
|
||||
&[
|
||||
Arg::Int("Page.Left", "long", 0, 99_990),
|
||||
Arg::Int("Page.Right", "long", 0, 99_990),
|
||||
],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"page.margins_ul",
|
||||
".uno:PageULMargin",
|
||||
&[
|
||||
Arg::Int("Page.Upper", "long", 0, 99_990),
|
||||
Arg::Int("Page.Lower", "long", 0, 99_990),
|
||||
],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"page.columns",
|
||||
".uno:PageColumnType",
|
||||
&[Arg::Int("PageColumnType", "short", 1, 3)],
|
||||
Check::Undoable,
|
||||
),
|
||||
command("page.break", ".uno:InsertPagebreak", &[], Check::Undoable),
|
||||
command(
|
||||
"page.section",
|
||||
".uno:InsertBreak",
|
||||
&[Arg::Int("Kind", "short", 3, 3), Arg::Text("TemplateName")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"header.on",
|
||||
".uno:SwPageHeaderItem",
|
||||
&[Arg::Bool("SwPageHeaderItem")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"footer.on",
|
||||
".uno:SwPageFooterItem",
|
||||
&[Arg::Bool("SwPageFooterItem")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"header.layout",
|
||||
".uno:SwPageHeaderLayout",
|
||||
&[Arg::Int("SwPageHeaderLayout", "short", 0, 3)],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"footer.layout",
|
||||
".uno:SwPageFooterLayout",
|
||||
&[Arg::Int("SwPageFooterLayout", "short", 0, 3)],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"field.page",
|
||||
".uno:InsertPageNumberField",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"field.pages",
|
||||
".uno:InsertPageCountField",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"table.insert",
|
||||
".uno:InsertTable",
|
||||
&[
|
||||
Arg::Int("Columns", "unsigned short", 1, 99),
|
||||
Arg::Int("Rows", "unsigned short", 1, 999),
|
||||
],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"table.row_above",
|
||||
".uno:InsertRowsBefore",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"table.row_below",
|
||||
".uno:InsertRowsAfter",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"table.column_left",
|
||||
".uno:InsertColumnsBefore",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"table.column_right",
|
||||
".uno:InsertColumnsAfter",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command("table.delete_rows", ".uno:DeleteRows", &[], Check::Undoable),
|
||||
command(
|
||||
"table.delete_columns",
|
||||
".uno:DeleteColumns",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command("table.delete", ".uno:DeleteTable", &[], Check::Undoable),
|
||||
command("table.merge", ".uno:MergeCells", &[], Check::Undoable),
|
||||
command("table.select", ".uno:SelectTable", &[], Check::Result),
|
||||
command(
|
||||
"table.split",
|
||||
".uno:SplitCell",
|
||||
&[Arg::Int("Amount", "long", 2, 9), Arg::Bool("Horizontal")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"table.even_columns",
|
||||
".uno:DistributeColumns",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"table.optimal_height",
|
||||
".uno:SetOptimalRowHeight",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"table.even_rows",
|
||||
".uno:DistributeRows",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"table.borders_all",
|
||||
".uno:SetBorderStyle",
|
||||
&[
|
||||
Arg::Line("OuterBorder.LeftBorder", true),
|
||||
Arg::Line("OuterBorder.RightBorder", true),
|
||||
Arg::Line("OuterBorder.TopBorder", true),
|
||||
Arg::Line("OuterBorder.BottomBorder", true),
|
||||
Arg::Line("InnerBorder.Horizontal", true),
|
||||
Arg::Line("InnerBorder.Vertical", true),
|
||||
],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"table.borders_none",
|
||||
".uno:SetBorderStyle",
|
||||
&[
|
||||
Arg::Line("OuterBorder.LeftBorder", false),
|
||||
Arg::Line("OuterBorder.RightBorder", false),
|
||||
Arg::Line("OuterBorder.TopBorder", false),
|
||||
Arg::Line("OuterBorder.BottomBorder", false),
|
||||
Arg::Line("InnerBorder.Horizontal", false),
|
||||
Arg::Line("InnerBorder.Vertical", false),
|
||||
],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"table.shading",
|
||||
".uno:TableCellBackgroundColor",
|
||||
&[Arg::Int(
|
||||
"TableCellBackgroundColor.Color",
|
||||
"long",
|
||||
-1,
|
||||
0xFF_FFFF,
|
||||
)],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"table.repeat_heading",
|
||||
".uno:HeadingRowsRepeat",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"table.row_split",
|
||||
".uno:RowSplit",
|
||||
&[Arg::Bool("RowSplit")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"image.insert",
|
||||
".uno:InsertGraphic",
|
||||
&[Arg::Text("FileName")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"image.anchor_page",
|
||||
".uno:SetAnchorToPage",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"image.anchor_paragraph",
|
||||
".uno:SetAnchorToPara",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"image.anchor_char",
|
||||
".uno:SetAnchorAtChar",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"image.anchor_as_char",
|
||||
".uno:SetAnchorToChar",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command("image.wrap_off", ".uno:WrapOff", &[], Check::Undoable),
|
||||
command("image.wrap_on", ".uno:WrapOn", &[], Check::Undoable),
|
||||
command("image.wrap_ideal", ".uno:WrapIdeal", &[], Check::Undoable),
|
||||
command("image.wrap_left", ".uno:WrapLeft", &[], Check::Undoable),
|
||||
command("image.wrap_right", ".uno:WrapRight", &[], Check::Undoable),
|
||||
command(
|
||||
"image.wrap_through",
|
||||
".uno:WrapThrough",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command("image.front", ".uno:BringToFront", &[], Check::Undoable),
|
||||
command("image.back", ".uno:SendToBack", &[], Check::Undoable),
|
||||
command(
|
||||
"image.forward",
|
||||
".uno:ObjectForwardOne",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command("image.backward", ".uno:ObjectBackOne", &[], Check::Undoable),
|
||||
command("image.crop", ".uno:Crop", &[], Check::Cropping),
|
||||
command(
|
||||
"image.size",
|
||||
".uno:TransformDialog",
|
||||
&[
|
||||
Arg::Int("TransformWidth", "uint32", 57, 340_000),
|
||||
Arg::Int("TransformHeight", "uint32", 57, 340_000),
|
||||
],
|
||||
Check::Undoable,
|
||||
),
|
||||
];
|
||||
@@ -0,0 +1,54 @@
|
||||
//! Spreadsheet rows: printing and protection.
|
||||
|
||||
use super::{Arg, Check, Command, command};
|
||||
|
||||
/// Print layout, breaks and protection (TABLE-14, 15).
|
||||
pub(super) const ROWS: &[Command] = &[
|
||||
command(
|
||||
"print.area",
|
||||
".uno:ChangePrintArea",
|
||||
&[
|
||||
Arg::Loose("PrintArea"),
|
||||
Arg::Loose("PrintRepeatRow"),
|
||||
Arg::Loose("PrintRepeatCol"),
|
||||
],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"page.setup",
|
||||
".uno:PageFormatDialog",
|
||||
&[Arg::Text("Page")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command("break.row", ".uno:InsertRowBreak", &[], Check::Undoable),
|
||||
command(
|
||||
"break.column",
|
||||
".uno:InsertColumnBreak",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"break.row_remove",
|
||||
".uno:DeleteRowbreak",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"break.column_remove",
|
||||
".uno:DeleteColumnbreak",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"sheet.protect",
|
||||
".uno:Protect",
|
||||
&[Arg::Text("Protection")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"cells.lock",
|
||||
".uno:CellProtection",
|
||||
&[Arg::Bool("CellProtection")],
|
||||
Check::Reports,
|
||||
),
|
||||
];
|
||||
@@ -0,0 +1,93 @@
|
||||
//! Reference and review rows: notes, marks, formulas, comments.
|
||||
|
||||
use super::{Arg, Check, Command, command};
|
||||
|
||||
/// Reference, comment and tracked-change commands.
|
||||
pub(super) const ROWS: &[Command] = &[
|
||||
command("note.footnote", ".uno:InsertFootnote", &[], Check::Undoable),
|
||||
command("note.endnote", ".uno:InsertEndnote", &[], Check::Undoable),
|
||||
command(
|
||||
"bookmark.insert",
|
||||
".uno:InsertBookmark",
|
||||
&[Arg::Text("Bookmark")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"link.insert",
|
||||
".uno:SetHyperlink",
|
||||
&[Arg::Text("Hyperlink.Text"), Arg::Text("Hyperlink.URL")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"reference.insert",
|
||||
".uno:InsertField",
|
||||
&[
|
||||
Arg::Int("Type", "unsigned short", 13, 13),
|
||||
Arg::Int("SubType", "unsigned short", 2, 2),
|
||||
Arg::Text("Name"),
|
||||
Arg::Int("Format", "uint32", 0, 3),
|
||||
],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"index.insert",
|
||||
".uno:InsertMultiIndex",
|
||||
&[Arg::Text("Title")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"index.update",
|
||||
".uno:UpdateAllIndexes",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"caption.insert",
|
||||
".uno:InsertCaptionDialog",
|
||||
&[Arg::Text("Category"), Arg::Text("Text")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"formula.insert",
|
||||
".uno:InsertObjectStarMath",
|
||||
&[Arg::Text("Formula")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"comment.insert",
|
||||
".uno:InsertAnnotation",
|
||||
&[Arg::Text("Text")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"comment.reply",
|
||||
".uno:ReplyComment",
|
||||
&[Arg::Text("Id"), Arg::Text("Text")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command("track.toggle", ".uno:TrackChanges", &[], Check::Result),
|
||||
command(
|
||||
"track.accept",
|
||||
".uno:AcceptTrackedChange",
|
||||
&[Arg::Int("AcceptTrackedChange", "uint32", 1, 4_294_967_295)],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"track.reject",
|
||||
".uno:RejectTrackedChange",
|
||||
&[Arg::Int("RejectTrackedChange", "uint32", 1, 4_294_967_295)],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"track.accept_all",
|
||||
".uno:AcceptAllTrackedChanges",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"track.reject_all",
|
||||
".uno:RejectAllTrackedChanges",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
];
|
||||
@@ -0,0 +1,171 @@
|
||||
//! Spreadsheet rows: sheets, cells, rows and columns.
|
||||
|
||||
use super::{Arg, Check, Command, command};
|
||||
|
||||
/// A sheet position, counted from 1.
|
||||
const SHEET: Arg = Arg::Int("Index", "unsigned short", 1, 10000);
|
||||
|
||||
/// The selection modifier: none, Shift or the command key.
|
||||
const MODIFIER: Arg = Arg::Int("Modifier", "short", 0, 0x3000);
|
||||
|
||||
/// Workbook and range editing commands (TABLE-01, TABLE-02).
|
||||
pub(super) const ROWS: &[Command] = &[
|
||||
command(
|
||||
"sheet.insert",
|
||||
".uno:Insert",
|
||||
&[Arg::Text("Name"), SHEET],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"sheet.rename",
|
||||
".uno:Name",
|
||||
&[Arg::Text("Name"), SHEET],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"sheet.move",
|
||||
".uno:Move",
|
||||
&[SHEET, Arg::Bool("Copy"), Arg::Bool("UseCurrentDocument")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"sheet.hide",
|
||||
".uno:Hide",
|
||||
&[Arg::Int("nTabNumber", "short", 0, 9999)],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"sheet.show",
|
||||
".uno:Show",
|
||||
&[Arg::Text("aTableName")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command("sheet.delete", ".uno:Remove", &[SHEET], Check::Undoable),
|
||||
command(
|
||||
"cell.goto",
|
||||
".uno:GoToCell",
|
||||
&[Arg::Text("ToPoint")],
|
||||
Check::Result,
|
||||
),
|
||||
command(
|
||||
"cell.enter",
|
||||
".uno:EnterString",
|
||||
&[Arg::Loose("StringName")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"rows.insert_above",
|
||||
".uno:InsertRowsBefore",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"rows.insert_below",
|
||||
".uno:InsertRowsAfter",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"columns.insert_before",
|
||||
".uno:InsertColumnsBefore",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"columns.insert_after",
|
||||
".uno:InsertColumnsAfter",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command("rows.delete", ".uno:DeleteRows", &[], Check::Undoable),
|
||||
command("columns.delete", ".uno:DeleteColumns", &[], Check::Undoable),
|
||||
// Flags: V shifts down, > shifts right.
|
||||
command(
|
||||
"cells.insert",
|
||||
".uno:InsertCell",
|
||||
&[Arg::Text("Flags")],
|
||||
Check::Undoable,
|
||||
),
|
||||
// Flags: U shifts up, L shifts left.
|
||||
command(
|
||||
"cells.delete",
|
||||
".uno:DeleteCell",
|
||||
&[Arg::Text("Flags")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"cells.merge",
|
||||
".uno:MergeCells",
|
||||
&[Arg::Bool("MoveContents")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command("cells.split", ".uno:SplitCell", &[], Check::Undoable),
|
||||
command("view.freeze", ".uno:FreezePanes", &[], Check::Finished),
|
||||
command("rows.hide", ".uno:HideRow", &[], Check::Undoable),
|
||||
command("rows.show", ".uno:ShowRow", &[], Check::Undoable),
|
||||
command("columns.hide", ".uno:HideColumn", &[], Check::Undoable),
|
||||
command("columns.show", ".uno:ShowColumn", &[], Check::Undoable),
|
||||
// Sizes in 1/100 mm; rows and columns from 1.
|
||||
command(
|
||||
"rows.height",
|
||||
".uno:RowHeight",
|
||||
&[
|
||||
Arg::Int("RowHeight", "unsigned short", 1, 65535),
|
||||
Arg::Int("Row", "long", 1, 1048576),
|
||||
],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"columns.width",
|
||||
".uno:ColumnWidth",
|
||||
&[
|
||||
Arg::Int("ColumnWidth", "unsigned short", 1, 65535),
|
||||
Arg::Int("Column", "unsigned short", 1, 16384),
|
||||
],
|
||||
Check::Undoable,
|
||||
),
|
||||
// The same sizes for every selected row or column.
|
||||
command(
|
||||
"rows.height_selected",
|
||||
".uno:RowHeight",
|
||||
&[Arg::Int("RowHeight", "unsigned short", 1, 65535)],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"columns.width_selected",
|
||||
".uno:ColumnWidth",
|
||||
&[Arg::Int("ColumnWidth", "unsigned short", 1, 65535)],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"rows.optimal",
|
||||
".uno:SetOptimalRowHeight",
|
||||
&[Arg::Int("aExtraHeight", "unsigned short", 0, 0)],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"columns.optimal",
|
||||
".uno:SetOptimalColumnWidth",
|
||||
&[Arg::Int("aExtraWidth", "unsigned short", 0, 0)],
|
||||
Check::Undoable,
|
||||
),
|
||||
// Rows and columns from 0.
|
||||
command(
|
||||
"select.column",
|
||||
".uno:SelectColumn",
|
||||
&[Arg::Int("Col", "long", 0, 16383), MODIFIER],
|
||||
Check::Finished,
|
||||
),
|
||||
command(
|
||||
"select.row",
|
||||
".uno:SelectRow",
|
||||
&[Arg::Int("Row", "long", 0, 1048575), MODIFIER],
|
||||
Check::Finished,
|
||||
),
|
||||
command(
|
||||
"fill.auto",
|
||||
".uno:AutoFill",
|
||||
&[Arg::Text("EndCell")],
|
||||
Check::Undoable,
|
||||
),
|
||||
];
|
||||
@@ -0,0 +1,110 @@
|
||||
//! Presentation rows: slides, design, charts, notes, comments.
|
||||
|
||||
use super::{Arg, Check, Command, command};
|
||||
|
||||
/// Slide management and design (SHOW-01, 02).
|
||||
pub(super) const ROWS: &[Command] = &[
|
||||
command("slide.insert", ".uno:InsertPage", &[], Check::Undoable),
|
||||
command(
|
||||
"slide.duplicate",
|
||||
".uno:DuplicatePage",
|
||||
&[],
|
||||
Check::Undoable,
|
||||
),
|
||||
command("slide.delete", ".uno:DeletePage", &[], Check::Undoable),
|
||||
command("slide.hide", ".uno:HideSlide", &[], Check::Undoable),
|
||||
command("slide.show", ".uno:ShowSlide", &[], Check::Undoable),
|
||||
command("slide.up", ".uno:MovePageUp", &[], Check::Undoable),
|
||||
command("slide.down", ".uno:MovePageDown", &[], Check::Undoable),
|
||||
command("slide.first", ".uno:MovePageFirst", &[], Check::Undoable),
|
||||
command("slide.last", ".uno:MovePageLast", &[], Check::Undoable),
|
||||
command(
|
||||
"slide.layout",
|
||||
".uno:AssignLayout",
|
||||
&[Arg::Int("WhatLayout", "long", 0, 34)],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"slide.size",
|
||||
".uno:PageSize",
|
||||
&[
|
||||
Arg::Int("PageWidth", "long", 1000, 300_000),
|
||||
Arg::Int("PageHeight", "long", 1000, 300_000),
|
||||
Arg::Bool("ScaleObjects"),
|
||||
],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"slide.master",
|
||||
".uno:PresentationLayout",
|
||||
&[Arg::Text("Master")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"slide.theme",
|
||||
".uno:ThemeDialog",
|
||||
&[Arg::Text("ColorSet")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command("master.edit", ".uno:SlideMasterPage", &[], Check::Finished),
|
||||
command(
|
||||
"master.insert",
|
||||
".uno:InsertMasterPage",
|
||||
&[],
|
||||
Check::Finished,
|
||||
),
|
||||
command("master.close", ".uno:CloseMasterView", &[], Check::Finished),
|
||||
command(
|
||||
"show.chart",
|
||||
".uno:InsertObjectChart",
|
||||
&[Arg::Text("Chart")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"slide.transition",
|
||||
".uno:SetSlideTransition",
|
||||
&[Arg::Text("Transition")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"animation.add",
|
||||
".uno:AddAnimation",
|
||||
&[Arg::Text("Animation")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"animation.change",
|
||||
".uno:ChangeAnimation",
|
||||
&[Arg::Text("Animation")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"media.insert",
|
||||
".uno:InsertAVMedia",
|
||||
&[
|
||||
Arg::Text("URL"),
|
||||
Arg::Bool("IsLink"),
|
||||
Arg::Int("Width", "long", 1, 1_000_000),
|
||||
Arg::Int("Height", "long", 1, 1_000_000),
|
||||
],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"notes.set",
|
||||
".uno:SlideNotes",
|
||||
&[Arg::Loose("Text"), Arg::Int("Part", "long", 0, 9_999)],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"remark.edit",
|
||||
".uno:EditAnnotation",
|
||||
&[Arg::Text("Id"), Arg::Text("Text")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"remark.delete",
|
||||
".uno:DeleteAnnotation",
|
||||
&[Arg::Text("Id")],
|
||||
Check::Undoable,
|
||||
),
|
||||
];
|
||||
@@ -0,0 +1,116 @@
|
||||
//! Text rows: editing, characters, paragraphs, lists, styles.
|
||||
|
||||
use super::{Arg, Check, Command, command};
|
||||
|
||||
/// Editing, formatting and style commands.
|
||||
pub(super) const ROWS: &[Command] = &[
|
||||
command("edit.undo", ".uno:Undo", &[], Check::History),
|
||||
command("edit.redo", ".uno:Redo", &[], Check::History),
|
||||
command("edit.select_all", ".uno:SelectAll", &[], Check::Result),
|
||||
command("format.bold", ".uno:Bold", &[], Check::Result),
|
||||
command("format.italic", ".uno:Italic", &[], Check::Result),
|
||||
command("format.underline", ".uno:Underline", &[], Check::Result),
|
||||
command("format.strikeout", ".uno:Strikeout", &[], Check::Result),
|
||||
command(
|
||||
"format.font",
|
||||
".uno:CharFontName",
|
||||
&[Arg::Font("CharFontName.FamilyName")],
|
||||
Check::Reports,
|
||||
),
|
||||
command(
|
||||
"format.size",
|
||||
".uno:FontHeight",
|
||||
&[Arg::Points("FontHeight.Height")],
|
||||
Check::Reports,
|
||||
),
|
||||
command(
|
||||
"format.style",
|
||||
".uno:StyleApply",
|
||||
&[Arg::Text("Style"), Arg::Text("FamilyName")],
|
||||
Check::Result,
|
||||
),
|
||||
command("format.superscript", ".uno:SuperScript", &[], Check::Result),
|
||||
command("format.subscript", ".uno:SubScript", &[], Check::Result),
|
||||
command(
|
||||
"format.color",
|
||||
".uno:FontColor",
|
||||
&[Arg::Int("FontColor.Color", "long", 0, 0xFF_FFFF)],
|
||||
Check::Reports,
|
||||
),
|
||||
command(
|
||||
"format.highlight",
|
||||
".uno:CharBackColor",
|
||||
&[Arg::Int("CharBackColor.Color", "long", -1, 0xFF_FFFF)],
|
||||
Check::Reports,
|
||||
),
|
||||
command("paragraph.left", ".uno:LeftPara", &[], Check::Result),
|
||||
command("paragraph.center", ".uno:CenterPara", &[], Check::Result),
|
||||
command("paragraph.right", ".uno:RightPara", &[], Check::Result),
|
||||
command("paragraph.justify", ".uno:JustifyPara", &[], Check::Result),
|
||||
command(
|
||||
"paragraph.indent",
|
||||
".uno:IncrementIndent",
|
||||
&[],
|
||||
Check::Result,
|
||||
),
|
||||
command(
|
||||
"paragraph.outdent",
|
||||
".uno:DecrementIndent",
|
||||
&[],
|
||||
Check::Result,
|
||||
),
|
||||
command("paragraph.spacing_1", ".uno:SpacePara1", &[], Check::Result),
|
||||
command(
|
||||
"paragraph.spacing_15",
|
||||
".uno:SpacePara15",
|
||||
&[],
|
||||
Check::Result,
|
||||
),
|
||||
command("paragraph.spacing_2", ".uno:SpacePara2", &[], Check::Result),
|
||||
command(
|
||||
"paragraph.spacing",
|
||||
".uno:ULSpacing",
|
||||
&[
|
||||
Arg::Int("ULSpacing.TopMargin", "long", 0, 10_000),
|
||||
Arg::Int("ULSpacing.BottomMargin", "long", 0, 10_000),
|
||||
],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"paragraph.tab",
|
||||
".uno:ChangeTabStop",
|
||||
&[
|
||||
Arg::Int("Index", "long", -1, 99),
|
||||
Arg::Int("Position", "long", 0, 31_680),
|
||||
Arg::Bool("Remove"),
|
||||
],
|
||||
Check::Undoable,
|
||||
),
|
||||
command("list.bullets", ".uno:DefaultBullet", &[], Check::Result),
|
||||
command(
|
||||
"list.numbering",
|
||||
".uno:DefaultNumbering",
|
||||
&[],
|
||||
Check::Result,
|
||||
),
|
||||
command("list.deeper", ".uno:DecrementLevel", &[], Check::Result),
|
||||
command("list.higher", ".uno:IncrementLevel", &[], Check::Result),
|
||||
command(
|
||||
"style.new",
|
||||
".uno:StyleNewByExample",
|
||||
&[
|
||||
Arg::Text("Param"),
|
||||
Arg::Int("Family", "unsigned short", 1, 8),
|
||||
],
|
||||
Check::Listed,
|
||||
),
|
||||
command(
|
||||
"style.update",
|
||||
".uno:StyleUpdateByExample",
|
||||
&[
|
||||
Arg::Text("Param"),
|
||||
Arg::Int("Family", "unsigned short", 1, 2),
|
||||
],
|
||||
Check::Undoable,
|
||||
),
|
||||
];
|
||||
@@ -0,0 +1,59 @@
|
||||
//! Tool rows: find and replace, spelling, compare.
|
||||
|
||||
use super::{Arg, Check, Command, command};
|
||||
|
||||
/// Find one (0) or all (1), with the options.
|
||||
const FIND: [Arg; 6] = [
|
||||
Arg::Loose("SearchItem.SearchString"),
|
||||
Arg::Bool("SearchItem.Backward"),
|
||||
Arg::Int("SearchItem.Command", "unsigned short", 0, 1),
|
||||
Arg::Int("SearchItem.TransliterateFlags", "long", 0, 256),
|
||||
Arg::Int("SearchItem.SearchFlags", "long", 0, 16),
|
||||
Arg::Int("SearchItem.AlgorithmType2", "short", 1, 2),
|
||||
];
|
||||
|
||||
/// Replace one (2) or all (3), with the replacement.
|
||||
const REPLACE: [Arg; 7] = [
|
||||
Arg::Loose("SearchItem.SearchString"),
|
||||
Arg::Bool("SearchItem.Backward"),
|
||||
Arg::Int("SearchItem.Command", "unsigned short", 2, 3),
|
||||
Arg::Int("SearchItem.TransliterateFlags", "long", 0, 256),
|
||||
Arg::Int("SearchItem.SearchFlags", "long", 0, 16),
|
||||
Arg::Int("SearchItem.AlgorithmType2", "short", 1, 2),
|
||||
Arg::Loose("SearchItem.ReplaceString"),
|
||||
];
|
||||
|
||||
/// Find, replace, spelling and compare commands.
|
||||
pub(super) const ROWS: &[Command] = &[
|
||||
command("find.run", ".uno:ExecuteSearch", &FIND, Check::Finished),
|
||||
command(
|
||||
"find.replace",
|
||||
".uno:ExecuteSearch",
|
||||
&REPLACE,
|
||||
Check::Finished,
|
||||
),
|
||||
command(
|
||||
"spell.apply",
|
||||
".uno:SpellCheckApplySuggestion",
|
||||
&[Arg::Text("ApplyRule")],
|
||||
Check::Undoable,
|
||||
),
|
||||
command(
|
||||
"spell.ignore_all",
|
||||
".uno:SpellCheckIgnoreAll",
|
||||
&[Arg::Text("Type")],
|
||||
Check::Finished,
|
||||
),
|
||||
command(
|
||||
"view.theme",
|
||||
".uno:ChangeTheme",
|
||||
&[Arg::Text("NewTheme")],
|
||||
Check::Finished,
|
||||
),
|
||||
command(
|
||||
"doc.compare",
|
||||
".uno:CompareDocuments",
|
||||
&[Arg::Text("URL"), Arg::Bool("NoAcceptDialog")],
|
||||
Check::Result,
|
||||
),
|
||||
];
|
||||
Reference in new issue
Block a user