feat: Phase D.26: Table autofit and column width control#104
feat: Phase D.26: Table autofit and column width control#104citconv-agents[bot] wants to merge 2 commits intomasterfrom
Conversation
- Add WD_TABLE_AUTOFIT enum (FIXED_WIDTH, AUTOFIT_TO_CONTENTS, AUTOFIT_TO_WINDOW) - Add table.autofit_behavior property combining tblLayout and tblW settings - Add table.allow_autofit property (clearer name for tblLayout type) - Add table.preferred_width property for reading/writing w:tblW - Improve column.width setter to also update cell widths (w:tcW) for reliable column width control - Register w:tblW element and add tblW child to CT_TblPr Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Security Agent Report SECURITY_PASS Security Review: PR #104 — Table AutoFit Behavior and Column Width ControlBranch: agent/issue-39 Files Reviewed
Checks PerformedXML Injection / XXECLEAN. All XML attribute values assigned in the changed code ( Path TraversalCLEAN. No file path handling added or modified. Dependency RisksCLEAN. No new dependencies added ( Data Exposure / Unsafe File HandlingCLEAN. No I/O operations, no logging of sensitive data, no external network calls. Secrets in CodeCLEAN. No API keys, tokens, passwords, or credentials present. Integer Overflow / Numeric SafetyCLEAN. Width values are Python Silent Failure on Invalid Enum ValueLOW CONCERN (informational only). The SummaryPR #104 is a pure feature addition implementing OOXML table autofit and preferred-width controls. All XML mutations use hardcoded enum-driven literals through the existing |
|
Review Agent REVIEW_CHANGES_NEEDED PR #104 — Table AutoFit Behavior and Column Width ControlOverall the implementation is well-structured and tests are thorough. Two issues need addressing before merge. Issue 1 (Moderate):
|
Remove duplicate `allow_autofit` property (identical to existing `autofit`) and clear stale `tblW` element when switching to FIXED_WIDTH behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Security Agent Report SECURITY_PASS Security Review — PR #104 (Table AutoFit / Preferred Width)Branch: agent/issue-39 SummaryNo security issues found. All changes are internal library extensions that operate on typed values within the existing XML abstraction layer. Files Reviewed
Checks PerformedXML Injection / XXEResult: CLEAN All values written to XML attributes are strongly typed ( Path TraversalResult: CLEAN No file paths are constructed or manipulated in any of the changed files. New DependenciesResult: CLEAN No new third-party dependencies are introduced. All imports are from existing internal modules ( Secrets / Hardcoded CredentialsResult: CLEAN No API keys, tokens, passwords, or other credentials present. Data Exposure / Unsafe File HandlingResult: CLEAN No file I/O, network calls, or sensitive data handling introduced. Logic / DoS ConcernsResult: CLEAN The ConclusionThe PR adds well-scoped table width and autofit behavior control. All new XML attribute writes use the existing type-safe oxml abstraction layer. No security-relevant issues were identified. |
|
Review Agent REVIEW_CHANGES_NEEDED PR #104 — Table AutoFit Behavior and Preferred WidthSummaryThe PR adds Issue 1 — Calling a private CT_ method from the proxy layer (Required Change)
if value == WD_TABLE_AUTOFIT.FIXED_WIDTH:
tblPr.autofit = False
tblPr._remove_tblW() # <-- private method called from proxy layerThe project's three-layer pattern keeps if value == WD_TABLE_AUTOFIT.FIXED_WIDTH:
tblPr.autofit = False
tblPr.preferred_width = NoneIssue 2 —
|
Summary
Implements #39
This PR was automatically generated by the Developer Agent.
Original Issue
Fix table autofit behavior and improve column width control.
Current issues
API Design
XML
Upstream: python-openxml#209 (13 comments), python-openxml#360 (8 comments)
Generated by Developer Agent using Claude Code