diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-06-14 08:56:11 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-06-14 12:20:10 +0200 |
commit | f61c154a21ead9f27378e3c8dcee87678d17e334 (patch) | |
tree | abc14aba5e124be00957488b2a42d3cec578bcbf /sfx2 | |
parent | 8447d31e529985ef7fc71933f0e55685530f9fc9 (diff) |
tdf#116742: Only enable "CMIS" versions button for versionable CMIS
Change-Id: I9230e1b973d55113287c013ff7b2c167af25a95c
Reviewed-on: https://gerrit.libreoffice.org/55776
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/versdlg.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx index 1624304bd20b..9320d6f37362 100644 --- a/sfx2/source/dialog/versdlg.cxx +++ b/sfx2/source/dialog/versdlg.cxx @@ -19,6 +19,8 @@ #include <sal/config.h> +#include <com/sun/star/document/XCmisDocument.hpp> + #include <unotools/localedatawrapper.hxx> #include <svl/eitem.hxx> #include <svl/intitem.hxx> @@ -297,7 +299,11 @@ void SfxVersionDialog::Init_Impl() SvtMiscOptions miscOptions; if ( !miscOptions.IsExperimentalMode() ) m_pCmisButton->Hide( ); - m_pCmisButton->Enable(); + uno::Reference<document::XCmisDocument> xCmisDoc(pObjShell->GetModel(), uno::UNO_QUERY); + if (xCmisDoc && xCmisDoc->isVersionable()) + m_pCmisButton->Enable(); + else + m_pCmisButton->Disable(); SelectHdl_Impl(m_pVersionBox); } |