Repository navigation
Conversation
Aiiaiiio
force-pushed
the
fix/no-warning-docformatlib
branch
from
December 2, 2026 13:29
1c08a52 to
d999897
Compare
Aiiaiiio
marked this pull request as ready for review
December 2, 2026 13:29
Aiiaiiio
requested review from
OlhaUshkalenko and
rikled
and
a balanced review from Copilot
and removed request for
a team
December 2, 2026 13:29
There was a problem hiding this comment.
🟡 Changes recommended
The new std::optional declarations require C++17, but the default qmake and checked-in Windows configurations do not enable it, breaking those builds.
1 open issue
What changed in this PR
Reduces DocFormatLib compiler warnings across document conversion code and shared OOXML types, alongside targeted correctness fixes.
Changes:
- Makes copy operations, overload visibility, initialization order, and signedness explicit.
- Fixes last-page detection, slicer extension destruction, and permission-group fallthrough.
- Migrates selected Boost types to standard-library equivalents; documents the deferred encryption issue #506.
| File | Description |
|---|---|
| OOXML/XlsxFormat/WritingElement.h | Exposes base XML overload; removes obsolete comments. |
| OOXML/XlsxFormat/Slicer/SlicerCacheExt.h | Includes complete extension-list type. |
| OOXML/PPTXFormat/WrapperWritingElement.h | Delegates copy constructors to defaults. |
| OOXML/PPTXFormat/ViewProps/SorterViewPr.h | Defaults copy assignment. |
| OOXML/PPTXFormat/ViewProps/SlideViewPr.h | Defaults copy assignment. |
| OOXML/PPTXFormat/ViewProps/Scale.h | Defaults copy assignment. |
| OOXML/PPTXFormat/ViewProps/Restored.h | Defaults copy assignment. |
| OOXML/PPTXFormat/ViewProps/Ratio.h | Defaults copy assignment. |
| OOXML/PPTXFormat/ViewProps/OutlineViewPr.h | Defaults copy assignment. |
| OOXML/PPTXFormat/ViewProps/Origin.h | Defaults copy assignment. |
| OOXML/PPTXFormat/ViewProps/NotesViewPr.h | Defaults copy assignment. |
| OOXML/PPTXFormat/ViewProps/NotesTextViewPr.h | Defaults copy assignment. |
| OOXML/PPTXFormat/ViewProps/NormalViewPr.h | Defaults copy assignment. |
| OOXML/PPTXFormat/ViewProps/Guide.h | Defaults copy assignment. |
| OOXML/PPTXFormat/ViewProps/GridSpacing.h | Defaults copy assignment. |
| OOXML/PPTXFormat/ViewProps/CViewPr.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Theme/ThemeElements.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Theme/FontScheme.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Theme/ExtraClrScheme.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Theme.h | Exposes inherited read overloads. |
| OOXML/PPTXFormat/ShowPr/SldRg.h | Defaults copy assignment. |
| OOXML/PPTXFormat/ShowPr/SldAll.h | Defaults copy assignment. |
| OOXML/PPTXFormat/ShowPr/PresentationPr.h | Defaults show and print assignments. |
| OOXML/PPTXFormat/ShowPr/Present.h | Defaults copy assignment. |
| OOXML/PPTXFormat/ShowPr/Kiosk.h | Defaults copy assignment. |
| OOXML/PPTXFormat/ShowPr/CustomShowId.h | Defaults copy assignment. |
| OOXML/PPTXFormat/ShowPr/Browse.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Presentation/PresentationChildElements.h | Defaults child-element assignments. |
| OOXML/PPTXFormat/Logic/XmlId.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/UniPath2D.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/TxStyles.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Transitions/ZoomTransition.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Transitions/WheelTransition.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Transitions/Transition.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Transitions/StSnd.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Transitions/SplitTransition.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Transitions/SndAc.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Transitions/SideDirectionTransition.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Transitions/OrientationTransition.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Transitions/OptionalBlackTransition.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Transitions/EmptyTransition.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Transitions/EightDirectionTransition.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Transitions/CornerDirectionTransition.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/Video.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/TxEl.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/Tmpl.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/Timing.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/TgtEl.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/Tav.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/SpTgt.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/Set.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/Seq.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/Par.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/Iterate.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/GraphicEl.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/Excl.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/CTn.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/Cond.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/CMediaNode.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/Cmd.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/ChildTnLst.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/CBhvr.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/BldSub.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/BldP.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/BldOleChart.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/BldGraphic.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/BldDgm.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/Audio.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/AttrName.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/AnimVariant.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/AnimScale.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/AnimRot.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/AnimMotion.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/AnimEffect.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/AnimClr.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Timing/Anim.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/TextSpacing.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/TextFont.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/TextFont.cpp | Delegates copy construction. |
| OOXML/PPTXFormat/Logic/TcTxStyle.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/TcStyle.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/TcBdr.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/TableStyle.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/TablePartStyle.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/TableBgStyle.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Tab.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/SupplementalFont.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Runs/MathParaWrapper.h | Exposes inherited binary-reader overload. |
| OOXML/PPTXFormat/Logic/RunProperties.h | Defaults RTL copy assignment. |
| OOXML/PPTXFormat/Logic/Rot.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Rect.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/PrstDash.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Path.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/PartTitle.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/LineStyle.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/LineJoin.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/LineEnd.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Lin.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/LightRig.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Hf.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/HeadingVariant.h | Defaults variant assignments. |
| OOXML/PPTXFormat/Logic/Gd.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/FillStyle.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Controls.h | Defaults control assignments. |
| OOXML/PPTXFormat/Logic/Colors/SysClr.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Colors/SrgbClr.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Colors/SchemeClr.h | Defaults color assignments. |
| OOXML/PPTXFormat/Logic/Colors/PrstClr.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/ClrMapOvr.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/ClrMap.h | Defaults copy construction. |
| OOXML/PPTXFormat/Logic/Camera.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/BgPr.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/Backdrop.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/AhXY.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/AhPolar.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Logic/AhBase.h | Defaults copy assignment. |
| OOXML/PPTXFormat/Comments.h | Defaults comment and moniker assignments. |
| OOXML/PPTXFormat/CommentAuthors.h | Defaults author assignment. |
| OOXML/DocxFormat/Media/VbaProject.h | Exposes inherited read overloads. |
| OOXML/DocxFormat/Logic/Vml.h | Exposes inherited merge overload. |
| OOXML/Base/Nullable.h | Uses base-class copy constructors. |
| MsBinaryFile/XlsFile/Format/Logic/Biff_structures/BorderFillInfo.h | Makes comparison grouping explicit. |
| MsBinaryFile/XlsFile/Format/Logic/Biff_structures/BiffString.h | Exposes inherited save overloads. |
| MsBinaryFile/XlsFile/Format/Logic/Biff_structures/BiffAttribute.h | Corrects template constructor syntax. |
| MsBinaryFile/PptFile/Drawing/Attributes.h | Defaults file-info and color copying. |
| MsBinaryFile/DocFile/WordDocument.cpp | Fixes last-page detection; adds encryption TODO. |
| MsBinaryFile/DocFile/VMLShapeMapping.cpp | Migrates optionals; guards image indexing. |
| MsBinaryFile/DocFile/TextboxMapping.cpp | Makes index conversions explicit. |
| MsBinaryFile/DocFile/TablePropertiesMapping.cpp | Migrates table optionals to std::optional. |
| MsBinaryFile/DocFile/TableMapping.cpp | Avoids size underflow in bounds checks. |
| MsBinaryFile/DocFile/TableCellPropertiesMapping.cpp | Clarifies index checks and loop types. |
| MsBinaryFile/DocFile/StringTable.h | Cleans comparisons and unused state. |
| MsBinaryFile/DocFile/Spa.cpp | Uses unsigned container index. |
| MsBinaryFile/DocFile/Plex.h | Orders initialization; simplifies bounds check. |
| MsBinaryFile/DocFile/OleObject.cpp | Makes size comparison signedness explicit. |
| MsBinaryFile/DocFile/OfficeDrawing/Record.cpp | Guards signed size conversion. |
| MsBinaryFile/DocFile/NumberingMapping.cpp | Explicitly guards negative indices. |
| MsBinaryFile/DocFile/ListData.h | Migrates shared-pointer aliases. |
| MsBinaryFile/DocFile/ListData.cpp | Uses std::make_shared; removes unused includes. |
| MsBinaryFile/DocFile/HeaderAndFooterTable.cpp | Aligns comparison types; adds braces. |
| MsBinaryFile/DocFile/FormattedDiskPagePAPX.cpp | Makes size conversion explicit. |
| MsBinaryFile/DocFile/FormattedDiskPageCHPX.cpp | Makes size conversion explicit. |
| MsBinaryFile/DocFile/EncryptionHeader.cpp | Simplifies RC4 selection; documents deferred flag bug. |
| MsBinaryFile/DocFile/DocumentProperties.cpp | Removes unused storage while preserving reads. |
| MsBinaryFile/DocFile/DocumentMapping.cpp | Fixes permission fallthrough and bounds checks. |
| MsBinaryFile/DocFile/CharacterPropertiesMapping.h | Corrects virtual override signature. |
| MsBinaryFile/DocFile/CharacterPropertiesMapping.cpp | Matches override; removes redundant checks. |
| MsBinaryFile/Common/Base/utf8.h | Uses unsigned values for bit shifts. |
| MsBinaryFile/Common/Base/FormatUtils.h | Corrects initializer order. |
| DesktopEditor/common/ASCVariant.h | Matches initialization to declaration order. |
Review effort: Balanced
Signed-off-by: Tamás Bari <adaorcpp@gmail.com>
Signed-off-by: Tamás Bari <adaorcpp@gmail.com>
…in GetFileCharacterPositions Signed-off-by: Tamás Bari <adaorcpp@gmail.com>
Signed-off-by: Tamás Bari <adaorcpp@gmail.com>
Signed-off-by: Tamás Bari <adaorcpp@gmail.com>
…-bounds warning goes away Signed-off-by: Tamás Bari <adaorcpp@gmail.com>
Signed-off-by: Tamás Bari <adaorcpp@gmail.com>
Aiiaiiio
force-pushed
the
fix/no-warning-docformatlib
branch
from
December 4, 2026 00:57
d999897 to
a9f7ead
Compare
This branch was previously deployed
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.

DocFormatLib now builds with 0 warnings. Mostly mechanical; worth a look:
Behaviour changes
WordDocument::GetFileCharacterPositions: the "last FKP" check used the wrong counter, so it missed the real last page when earlier pages were skipped.SlicerCacheExt.h: inline constructors and destructors deleted a forward-declaredCOfficeArtExtensionList(undefined behaviour, leak). It now includesDrawingExt.h.Non-mechanical
PPTX_LOGIC_BASE*copy constructors delegate to the default constructor; explicit= defaultoperator=added.using Base::name;added for hidden virtual overloads.shared_ptr,optional) in a few DocFile spots to get rid of GCC false positives.Known bug, not fixed (TODO in the code): the
EncryptionHeaderflag bits are read one position off (same in XLSRC4EncryptionHeader). It needs encrypted test files. #506🤖 Generated with Claude Code