summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-08-21 09:25:27 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-08-21 09:26:30 +0100
commit81a49f68d61f984503b89e0766bea81ee4733d9c (patch)
tree21032fe4782675f9782455284afe31059237360c /cui
parent0208dc3b5d6611dbb3c88042322e4c83e1d0af2a (diff)
tdf#93547 - add basic lock-down support for OpenGL settings.
Change-Id: I0459c33ac5230899366dd756886d55fefbe01798
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/optgdlg.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 3ed38ddeff13..4970b4b4fda5 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -144,8 +144,10 @@ OpenGLCfg::~OpenGLCfg()
if (mbModified)
{
std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
- officecfg::Office::Common::VCL::UseOpenGL::set(mbUseOpenGL, batch);
- officecfg::Office::Common::VCL::ForceOpenGL::set(mbForceOpenGL, batch);
+ if (!officecfg::Office::Common::VCL::UseOpenGL::isReadOnly())
+ officecfg::Office::Common::VCL::UseOpenGL::set(mbUseOpenGL, batch);
+ if (!officecfg::Office::Common::VCL::ForceOpenGL::isReadOnly())
+ officecfg::Office::Common::VCL::ForceOpenGL::set(mbForceOpenGL, batch);
batch->commit();
}
}
@@ -674,6 +676,12 @@ OfaViewTabPage::OfaViewTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
// separate auto and other icon themes
m_pIconStyleLB->SetSeparatorPos( 0 );
m_pIconStyleLB->SelectEntryPos(0);
+
+ // FIXME: should really add code to show a 'lock' icon here.
+ if (officecfg::Office::Common::VCL::UseOpenGL::isReadOnly())
+ m_pUseOpenGL->Enable(false);
+ if (officecfg::Office::Common::VCL::ForceOpenGL::isReadOnly())
+ m_pForceOpenGL->Enable(false);
}
OfaViewTabPage::~OfaViewTabPage()