officecfg/registry/schema/org/openoffice/Office/Compatibility.xcs | 4 ++-- sw/source/uibase/shells/textfld.cxx | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-)
New commits: commit e88c41b552ab958579baf3e4bccf941b588a537c Author: Justin Luth <[email protected]> AuthorDate: Tue Jul 12 16:46:01 2022 -0400 Commit: Justin Luth <[email protected]> CommitDate: Tue Jul 19 02:27:12 2022 +0200 tdf#135794 sw: add no-frames to AllowCommentsInFootnotes DOCX also doesn't allow comments in textboxs / frames, so add that situation to the existing option that was attempting to improve DOCX compatibility. By default, comments are allowed in frames. Although the option name is worded fairly specifically, I don't see any reason for adding a second option. I also didn't want to change the name to be more generic since this has been in existance since 6.4. Change-Id: I3cc8631b4379a0523f2556ff99aed9127016485c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137010 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <[email protected]> diff --git a/officecfg/registry/schema/org/openoffice/Office/Compatibility.xcs b/officecfg/registry/schema/org/openoffice/Office/Compatibility.xcs index 266183469f55..aef3819d9237 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Compatibility.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Compatibility.xcs @@ -172,8 +172,8 @@ <prop oor:name="AllowCommentsInFootnotes" oor:type="xs:boolean" oor:nillable="false"> <info> <!-- See tdf#86188 for rationale --> - <desc>Specifies whether adding comments to footnotes is allowed. This is allowed for ODF but not in OOXML and can result in invalid docx files being saved.</desc> - <label>Allow adding comments to footnotes. Disable for better OOXML interoperability.</label> + <desc>Specifies whether adding comments to footnotes etc. is allowed. These are allowed for ODF but not in OOXML and can result in invalid docx files being saved.</desc> + <label>Allow adding comments to footnotes and frames. Disable for better OOXML interoperability.</label> </info> <value>true</value> </prop> diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx index 42ca39769015..b334e9b5ce95 100644 --- a/sw/source/uibase/shells/textfld.cxx +++ b/sw/source/uibase/shells/textfld.cxx @@ -916,7 +916,8 @@ void SwTextShell::StateField( SfxItemSet &rSet ) rSet.DisableItem(nWhich); } // tdf#86188 Allow disabling comment insertion on footnote/endnote for better OOXML interoperability - else if ( rSh.IsCursorInFootnote() && !officecfg::Office::Compatibility::View::AllowCommentsInFootnotes::get() ) + else if (!officecfg::Office::Compatibility::View::AllowCommentsInFootnotes::get() && + (rSh.IsCursorInFootnote() || rSh.GetCurrFlyFrame(/*bCalcFrame=*/false))) { rSet.DisableItem(nWhich); }
