summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-11-24 18:08:55 +0200
committerTor Lillqvist <tml@collabora.com>2014-11-28 10:21:30 +0200
commit2f0d4b3c41def8a2bc5a1440d53a008fe40da577 (patch)
tree588217e33686ef21f678cc1d3f056dbec2d0a261 /cui
parent030c604642e3ce5058b9d83cb94319cd6b7ef4d5 (diff)
Make whether to use OpenCL or not a global option
Add a toggle to the "General" page. Change-Id: If35b1472032706b09a3bc3499c55cbd3ac2e13ac
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/optgdlg.cxx10
-rw-r--r--cui/source/options/optgdlg.hxx2
-rw-r--r--cui/uiconfig/ui/optgeneralpage.ui41
3 files changed, 53 insertions, 0 deletions
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 29e1387354c6..1f5c32e8144e 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -208,6 +208,7 @@ OfaMiscTabPage::OfaMiscTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
get(m_pYearValueField, "year");
get(m_pToYearFT, "toyear");
get(m_pCollectUsageInfo, "collectusageinfo");
+ get(m_pUseOpenCL, "useopencl");
if (m_pFileDlgCB->IsVisible() && SvtMiscOptions().IsUseSystemFileDialogReadOnly())
{
@@ -300,6 +301,12 @@ bool OfaMiscTabPage::FillItemSet( SfxItemSet* rSet )
bModified = true;
}
+ if (m_pUseOpenCL->IsValueChangedFromSaved())
+ {
+ officecfg::Office::Common::Misc::UseOpenCL::set(m_pUseOpenCL->IsChecked(), batch);
+ bModified = true;
+ }
+
batch->commit();
return bModified;
@@ -341,6 +348,9 @@ void OfaMiscTabPage::Reset( const SfxItemSet* rSet )
m_pCollectUsageInfo->Check(officecfg::Office::Common::Misc::CollectUsageInformation::get());
m_pCollectUsageInfo->SaveValue();
+
+ m_pUseOpenCL->Check(officecfg::Office::Common::Misc::UseOpenCL::get());
+ m_pUseOpenCL->SaveValue();
}
diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx
index 33534573502d..a6a7dac8df83 100644
--- a/cui/source/options/optgdlg.hxx
+++ b/cui/source/options/optgdlg.hxx
@@ -57,6 +57,8 @@ private:
CheckBox* m_pCollectUsageInfo;
+ CheckBox* m_pUseOpenCL;
+
DECL_LINK( TwoFigureHdl, NumericField* );
DECL_LINK( TwoFigureConfigHdl, NumericField* );
DECL_LINK(HelpCheckHdl_Impl, void *);
diff --git a/cui/uiconfig/ui/optgeneralpage.ui b/cui/uiconfig/ui/optgeneralpage.ui
index b1447c59cecd..d3e801593ff0 100644
--- a/cui/uiconfig/ui/optgeneralpage.ui
+++ b/cui/uiconfig/ui/optgeneralpage.ui
@@ -370,5 +370,46 @@
<property name="top_attach">5</property>
</packing>
</child>
+ <child>
+ <object class="GtkFrame" id="openclframe">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment7">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkCheckButton" id="useopencl">
+ <property name="label" translatable="yes">Allow use of OpenCL</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label8">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">OpenCL</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">6</property>
+ </packing>
+ </child>
</object>
</interface>