summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-08-21 09:25:27 +0100
committerTor Lillqvist <tml@collabora.com>2015-08-21 08:46:50 +0000
commita1e77b96a6ec93be07e23ab13585bec5a953b950 (patch)
tree543d0514a209d24015d0fbce32d2844d7c2f1333
parentdb2d1814c2770424d3ba4764711f4845850ee094 (diff)
tdf#93547: Add basic lock-down support for OpenGL settings
Change-Id: I0459c33ac5230899366dd756886d55fefbe01798 Reviewed-on: https://gerrit.libreoffice.org/17887 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
-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 5de00a6360b6..c0ed6d50fc03 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -145,8 +145,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();
}
}
@@ -699,6 +701,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()