diff options
author | Kelemen Gábor <kelemeng@ubuntu.com> | 2019-10-15 13:34:02 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-10-18 08:41:35 +0200 |
commit | 2fca4bcfda927c6e63f67f70a3331d2d748e65ca (patch) | |
tree | b08533146cc908d76453e40e18ae267946315c8f /sw | |
parent | cdeff4f1b4021c5fca55743e119a70fa2bd52b91 (diff) |
tdf#86188 Compatibility setting enabling comments to footnotes
For better OOXML interoperability allow disabling the insertion
of comments to footnotes/endnotes.
It is not possible to add comments to footnotes/endnotes in Word
so no wonder Writer generates invalid XML if one tries to save
comments added to footnotes as DOCX.
Prevent that by adding a centrally manageably key for disabling the
menu item if the cursor is in a footnote/endnote. In OOXML-heavy
environments sysadmins should be able to disable this and thus
hide the footgun from users.
Default setting is true so it means no change compared to current
feature set.
Change-Id: I2f799cb3f77a47fc14fa60b55fc5689a2710aff7
Reviewed-on: https://gerrit.libreoffice.org/80829
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/shells/textfld.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
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; |