From 6628a0a8e1abbb308c1e7b65d8c89294af5ba5dc Mon Sep 17 00:00:00 2001 From: Steven Cohnd Date: Thu, 3 Oct 2024 09:49:36 -0400 Subject: [PATCH] fix wrapping Image with text box --- OneMore/Commands/Tables/Formulas/Processor.cs | 4 ++-- OneMore/Models/PageEditor.cs | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/OneMore/Commands/Tables/Formulas/Processor.cs b/OneMore/Commands/Tables/Formulas/Processor.cs index 800332c508..d9201fffaf 100644 --- a/OneMore/Commands/Tables/Formulas/Processor.cs +++ b/OneMore/Commands/Tables/Formulas/Processor.cs @@ -130,9 +130,9 @@ private List DiscoverTags() private void Report(TableCell cell, Formula formula, double result) { - int dplaces = formula.Version >= 2 ? formula.DecimalPlaces : maxdec; + var dplaces = formula.Version >= 2 ? formula.DecimalPlaces : maxdec; - string text = string.Empty; + var text = string.Empty; switch (formula.Format) { case FormulaFormat.Currency: diff --git a/OneMore/Models/PageEditor.cs b/OneMore/Models/PageEditor.cs index 7c65208124..108bcc7aca 100644 --- a/OneMore/Models/PageEditor.cs +++ b/OneMore/Models/PageEditor.cs @@ -187,6 +187,12 @@ public void FollowWithCurosr(XElement root) } else { + // selected item might be Image, so move up to Parent + if (last.Parent.Name.LocalName == "OE") + { + last = last.Parent; + } + last.AddAfterSelf(new XElement(ns + "OE", new XElement(ns + "T", new XAttribute("selected", "all"),