Add Modelar Word engine (B-1.5.2) with scoped substitution and guide#10
Open
hubertdungen wants to merge 4 commits into
Open
Add Modelar Word engine (B-1.5.2) with scoped substitution and guide#10hubertdungen wants to merge 4 commits into
hubertdungen wants to merge 4 commits into
Conversation
Implement ModelarMotorWord, which executes the expanded Modelar plan against Word interop: open the base O.S. model once, prepare headers and page numbering like the classic flow, then per operation open and copy the fragment document, paste it at the end of the output, run the Excel triage for the operation's day, and fill the escala tags only inside the freshly pasted range via the new Word_Processor.SubstituirVariaveisNoRange (scoped Range.Find with wdFindStop) — the per-day capability the classic wdReplaceAll flow could not provide. Word always closes on error. Wire it opt-in in FormExport: the engine runs only when modelar_programa.json exists beside SIPOS.exe (day list from the B-1.3.2 start/end range when active, otherwise the holiday-aware PlaneadorDeDias); without the file the classic flow runs untouched. Expose the selected calendar range through Mediator. Add docs/GUIA-MODELAR.md (concept, action types, JSON format, Windows test script) and docs/modelar_programa.exemplo.json, verified to load, validate and expand with the real code. Version bumped to v B-1.5.2. Windows validation (B-1.5.4) pending before merge to main. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fn4QT7YQAGt9F6W3HNF7aK
FormModelar now edits modelar_programa.json directly: each row gains an action-type ComboBox (cloned rows inherit items and selection via a new CloneControls branch), and new top-menu buttons save the visible rows as a LoopDias program (validated before writing) or reload them from the saved file, which also auto-populates the rows on form load. Implement the previously empty SwitchRowActivationState stub: the check button now toggles and displays the row's Ativa state, dimming disabled rows, which the export engine skips. Dock the open-file button on the right so the growing docked button stack cannot overlap it. Update the Modelar guide with the UI chapter and refresh the experimental portable artifact in dist/. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fn4QT7YQAGt9F6W3HNF7aK
Replace the native ComboBox in the Modelar rows with the project's own CustomComboBox control (custom border, drawn arrow icon, styled dropdown), themed to the SIPOS dark palette. CloneControls gains a dedicated branch that builds a fresh CustomComboBox per cloned row, copying the selected type and skipping child recursion since the composite control constructs its internals in its constructor. Refresh the experimental portable artifact in dist/. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fn4QT7YQAGt9F6W3HNF7aK
Give the previously dead selector panel its intended function: the template ComboBox lists the classic program plus one entry per action type, and the add button inserts the chosen program (three preconfigured rows) or a single row of that type, reusing the first empty row and generating unique names so validation never blocks fresh rows. The hint box now switches its text with the Programar/Ficheiros menu, whose clicks were previously style-only. Widen the row maximum width from 800 to 1400 pixels so the crowded rows can spread in wider windows. Refresh the experimental portable artifact in dist/. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fn4QT7YQAGt9F6W3HNF7aK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement ModelarMotorWord, which executes the expanded Modelar plan
against Word interop: open the base O.S. model once, prepare headers
and page numbering like the classic flow, then per operation open and
copy the fragment document, paste it at the end of the output, run the
Excel triage for the operation's day, and fill the escala tags only
inside the freshly pasted range via the new
Word_Processor.SubstituirVariaveisNoRange (scoped Range.Find with
wdFindStop) — the per-day capability the classic wdReplaceAll flow
could not provide. Word always closes on error.
Wire it opt-in in FormExport: the engine runs only when
modelar_programa.json exists beside SIPOS.exe (day list from the
B-1.3.2 start/end range when active, otherwise the holiday-aware
PlaneadorDeDias); without the file the classic flow runs untouched.
Expose the selected calendar range through Mediator.
Add docs/GUIA-MODELAR.md (concept, action types, JSON format, Windows
test script) and docs/modelar_programa.exemplo.json, verified to load,
validate and expand with the real code. Version bumped to v B-1.5.2.
Windows validation (B-1.5.4) pending before merge to main.
Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01Fn4QT7YQAGt9F6W3HNF7aK