Skip to content

wxAutoExcel 2.7.0 - #20

Merged
PBfordev merged 10 commits into
masterfrom
v2.7.0
Oct 26, 2026
Merged

PBfordev merged 10 commits into
masterfrom
v2.7.0

Conversation

@PBfordev

@PBfordev PBfordev commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

wxAutoExcel 2.7.0.

Library

  • Fixed enum values that did not match Office, checked against the Office and Excel type libraries and, where they differed, in Excel:
    • MsoParagraphAlignment: all values were one less, so msoAlignCenter aligned the text to the left.
    • XlThemeFont: xlThemeFontMajor and xlThemeFontMinor were swapped.
    • msoShapeRound2DiagRectangle had the value of msoShapeSnip2DiagRectangle.
    • MsoPictureEffectType: 15 values were wrong, e.g. msoEffectNone was 17 instead of 0.
    • msoContactCardAddressTypeIM and msoMetaPropertyTypeMax had wrong values.
  • Added msoSoftEdgeTypeMixed (the old SoftEdgeTypeMixed is kept but deprecated) and the missing MsoMetaPropertyType values.
  • Breaks build: wxAutoExcel objects now convert only to bool: operator bool() of wxExcelObject was replaced with a conversion template allowing only bool. Objects still convert to bool wherever they did (conditions, initializing a bool, returning from a function returning bool), but no longer to numbers, e.g. long n = obj;. Thanks to this, collections can be indexed with string literals, e.g. styles["Normal"], which did not compile because the call was ambiguous with the built-in subscript "Normal"[index].
  • The library names now contain 2.7.

The enum values are changed in a minor version, as code relying on the wrong values may behave differently.

Tests and samples

  • Tests checking the fixed values against what Excel does, as the existing tests only set a value and read it back, and a test of indexing with string literals.
  • The Minimal and PureWin32 samples index styles with string literals instead of wxString("...").
  • The Shapes sample centers its wrapped text lines, now that msoAlignCenter works.

Built with MSVC (Debug and Release), MinGW UCRT64 (DLL and static, Debug and Release), and clang64 (DLL, Debug, against wxWidgets built with clang) with no warnings; all 231 test cases pass in each configuration.

🤖 Generated with Claude Code

PBfordev and others added 10 commits October 26, 2026 10:49
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
All values were one less than the Office ones, starting with
msoAlignLeft = 0 instead of 1, so e.g. msoAlignCenter aligned the
text to the left. The values were checked with the Office type library.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
xlThemeFontMajor and xlThemeFontMinor had their values swapped, so
setting the major (headings) theme font set the minor (body) one and
vice versa.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It had the value of msoShapeSnip2DiagRectangle, so a rectangle with
two snipped corners was added instead of the one with two rounded
corners.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
msoEffectNone was 17 instead of 0, the values following
msoEffectMosaicBubbles were one higher than in Office, and those of
msoEffectChalkSketch, msoEffectColorTemperature, and
msoEffectCrisscrossEtching were mixed up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
msoContactCardAddressTypeIM had the value of
msoContactCardAddressTypeOutlook. Add the missing
msoMetaPropertyTypeUserMulti, msoMetaPropertyTypeBusinessData, and
msoMetaPropertyTypeBusinessDataSecondary, and set msoMetaPropertyTypeMax
to the value following them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The mixed value of MsoSoftEdgeType was named SoftEdgeTypeMixed, without
the prefix used in Office. Keep the old name, so that the code using it
still compiles, but mark it as deprecated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Indexing a collection with a string literal, e.g. styles["Normal"], did
not compile, as the call was ambiguous: the built-in subscript
"Normal"[index] could be used too, with the collection converted to a
number by its operator bool. Replace operator bool in wxExcelObject with
a conversion template allowing only bool, so that objects still convert
to bool everywhere they did, e.g. in conditions, initializing a bool, or
returning from a function returning bool, but not to a number.

Use string literals instead of wxString("...") as indices in the
samples, and test indexing with literals.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@PBfordev
PBfordev merged commit f788392 into master Oct 26, 2026
7 checks passed
@PBfordev
PBfordev deleted the v2.7.0 branch October 26, 2026 13:26

This branch was successfully deployed

1 active deployment
github-pages — f788392f Deployed Oct 26, 2026 by PBfordev via Deploy online documentation #46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant