diff options
-rw-r--r-- | officecfg/registry/schema/org/openoffice/Office/Compatibility.xcs | 8 | ||||
-rw-r--r-- | sw/source/uibase/shells/textfld.cxx | 6 |
2 files changed, 14 insertions, 0 deletions
diff --git a/officecfg/registry/schema/org/openoffice/Office/Compatibility.xcs b/officecfg/registry/schema/org/openoffice/Office/Compatibility.xcs index 5d781baf6b64..1712a85a30cc 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Compatibility.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Compatibility.xcs @@ -163,6 +163,14 @@ </info> <value>false</value> </prop> + <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 interperability.</label> + </info> + <value>true</value> + </prop> </group> </component> </oor:component-schema> diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx index d5c4e6b73154..ea78347f73a9 100644 --- a/sw/source/uibase/shells/textfld.cxx +++ b/sw/source/uibase/shells/textfld.cxx @@ -81,6 +81,7 @@ #include <svl/zforlist.hxx> #include <svl/zformat.hxx> #include <IMark.hxx> +#include <officecfg/Office/Compatibility.hxx> using namespace nsSwDocInfoSubType; @@ -904,6 +905,11 @@ 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() ) + { + rSet.DisableItem(nWhich); + } } break; |