Observe Word paste changes without selection events
This commit is contained in:
parent
a4f4f03b5e
commit
0c144b9e72
@ -56,3 +56,11 @@ Two further Windows defects were found during this qualification. AgentProcess.S
|
||||
The established Update script's Office Clean target also invokes UnregisterOfficeAddin and RemoveOfficeAddInSecurity. Running Clean during the recovery build removed the test registration. The corrected update procedure uses Build;VisualStudioForApplicationsBuild with PrepareForRunDependsOn=CopyFilesToOutputDirectory and omits Clean. The installation is reapplied after building. This prevents future preparation from unregistering the tested add-in. The update remote is read from the shared branch's configured tracking remote.
|
||||
|
||||
The final build also labels the book-title search explicitly and ensures remembered books without a server project identifier never generate an invalid half-populated ProjectId/BookId descriptor. Native book authorisation remains in the existing workspace flow. ClickOnce/registry rollback records are archived before replacement so earlier recovery steps remain recoverable.
|
||||
|
||||
## Final installed candidate 1.0.0.9
|
||||
|
||||
Word 1.0.0.8 reopened the saved synthetic manuscript, started its agent automatically without a manual executable launch, and restored the remembered book after the author renewed browser sign-in. The ribbon displayed the selected book and detected Chapter One, and Settings displayed the saved association. Diagnostics showed one session, empty queues and zero COM errors in that run.
|
||||
|
||||
A paste test exposed an additional observation gap: the document held seven words while the last completed snapshot still held two until another observation. Version 1.0.0.9 schedules a coalesced, lightweight position/length/saved-state probe at most once per second on the existing Word STA scheduler. It reuses the existing bounded reader only when observation changes. It does not call Word's full-document statistics API or add another prose reader. Same-length edits while already dirty remain subject to the documented explicit-refresh limitation.
|
||||
|
||||
The final signed Office build passed with zero warnings/errors. A before/after check confirmed Build without Clean retained the existing Manifest and LoadBehavior registration. Read-only reflection checks against the actual compiled startup resolver resolved the registered adjacent agent for matching DLL bytes and refused an unrelated DLL.
|
||||
|
||||
@ -1 +1 @@
|
||||
<Project><PropertyGroup><ApplicationVersion>1.0.0.8</ApplicationVersion></PropertyGroup></Project>
|
||||
<Project><PropertyGroup><ApplicationVersion>1.0.0.9</ApplicationVersion></PropertyGroup></Project>
|
||||
|
||||
@ -3,6 +3,6 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyTitle("PlotDirector Word Companion — Native development")]
|
||||
[assembly: AssemblyCompany("Nick Beckley")]
|
||||
[assembly: AssemblyProduct("PlotDirector")]
|
||||
[assembly: AssemblyVersion("1.0.0.8")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.8")]
|
||||
[assembly: AssemblyVersion("1.0.0.9")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.9")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
@ -31,6 +31,7 @@ namespace PlotDirector.WordAddIn
|
||||
private readonly Queue<UiMetric> pendingMetrics = new Queue<UiMetric>();
|
||||
private readonly Stopwatch tickClock = Stopwatch.StartNew();
|
||||
private readonly Stopwatch metricClock = Stopwatch.StartNew();
|
||||
private readonly Stopwatch selectionClock = Stopwatch.StartNew();
|
||||
private void Metric(string name,double milliseconds)
|
||||
{
|
||||
if(pendingMetrics.Count==256)pendingMetrics.Dequeue();
|
||||
@ -492,6 +493,10 @@ namespace PlotDirector.WordAddIn
|
||||
private void Tick(object sender,EventArgs args)
|
||||
{
|
||||
Metric("ui-tick-delay",Math.Max(0,tickClock.Elapsed.TotalMilliseconds-25));tickClock.Restart();
|
||||
// Paste and some Word edits do not raise WindowSelectionChange. Probe only
|
||||
// position/length/saved state; reuse the existing bounded reader if changed.
|
||||
if(!disposed&&active!=null&&selectionClock.ElapsedMilliseconds>=1000)
|
||||
{selectionClock.Restart();scheduler.Post("selection",CaptureSelection);}
|
||||
if(!disposed)scheduler.Pump();
|
||||
Message[] responses;
|
||||
lock(reviewGate){responses=reviewReplies.Values.Take(4).ToArray();foreach(var response in responses)reviewReplies.Remove(response.SessionId);}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user