summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@edx.srv.br>2014-12-30 14:19:39 -0200
committerCaolán McNamara <caolanm@redhat.com>2015-01-05 09:49:31 +0000
commite224c9cb929cd744674b5d4d265cfb4680c82a2b (patch)
treebf8add9025743e2b77c725b0024bb6c495059939
parent97a99db679e547b8adaaedb6d02f2b191a8da688 (diff)
Refactor OpenCL settings dialog
Convert listbox entries into independent widgets Some code left as the dialog and the settings are been worked ATM. Add help button (fdo#86637) HIG-ification of widgets Change-Id: Ieef1abb0502171e7f46695f40445af6cfa059a04 Reviewed-on: https://gerrit.libreoffice.org/13703 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sc/source/ui/optdlg/calcoptionsdlg.cxx525
-rw-r--r--sc/source/ui/optdlg/calcoptionsdlg.hxx64
-rw-r--r--sc/uiconfig/scalc/ui/formulacalculationoptions.ui838
3 files changed, 396 insertions, 1031 deletions
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx
index 3c3e3f73c95c..da171ca8c2a7 100644
--- a/sc/source/ui/optdlg/calcoptionsdlg.cxx
+++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx
@@ -35,15 +35,6 @@
namespace {
-typedef enum {
- CALC_OPTION_STRING_CONVERSION,
- CALC_OPTION_EMPTY_AS_ZERO,
- CALC_OPTION_REF_SYNTAX,
- CALC_OPTION_ENABLE_OPENCL_SUBSET,
- CALC_OPTION_OPENCL_MIN_SIZE,
- CALC_OPTION_OPENCL_SUBSET_OPS,
-} CalcOptionOrder;
-
class OptionString : public SvLBoxString
{
OUString maDesc;
@@ -118,41 +109,14 @@ formula::FormulaGrammar::AddressConvention toAddressConvention(sal_Int32 nPos)
return formula::FormulaGrammar::CONV_UNSPECIFIED;
}
-ScCalcConfig::StringConversion toStringConversion(sal_Int32 nPos)
-{
- switch (nPos)
- {
- case 0:
- return ScCalcConfig::STRING_CONVERSION_AS_ERROR;
- case 1:
- return ScCalcConfig::STRING_CONVERSION_AS_ZERO;
- case 2:
- return ScCalcConfig::STRING_CONVERSION_UNAMBIGUOUS;
- case 3:
- return ScCalcConfig::STRING_CONVERSION_LOCALE_DEPENDENT;
- }
-
- return ScCalcConfig::STRING_CONVERSION_AS_ERROR;
-}
-
}
ScCalcOptionsDialog::ScCalcOptionsDialog(vcl::Window* pParent, const ScCalcConfig& rConfig)
: ModalDialog(pParent, "FormulaCalculationOptions",
"modules/scalc/ui/formulacalculationoptions.ui")
- , maCalcA1(ScResId(SCSTR_FORMULA_SYNTAX_CALC_A1).toString())
- , maExcelA1(ScResId(SCSTR_FORMULA_SYNTAX_XL_A1).toString())
- , maExcelR1C1(ScResId(SCSTR_FORMULA_SYNTAX_XL_R1C1).toString())
, maConfig(rConfig)
, mbSelectedEmptyStringAsZero(rConfig.mbEmptyStringAsZero)
{
- get(mpLbSettings, "settings");
- get(mpLbOptionEdit, "edit");
- get(mpFtAnnotation, "annotation");
- get(mpBtnTrue, "true");
- get(mpBtnFalse, "false");
- get(mpSpinButton, "spinbutton");
- get(mpEditField, "entry");
get(mpTestButton, "test");
get(mpOpenclInfoList, "opencl_list");
get(mpBtnAutomaticSelectionTrue, "automatic_select_true");
@@ -161,7 +125,30 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(vcl::Window* pParent, const ScCalcConfi
get(mpFtComputeUnits, "compute_units");
get(mpFtMemory, "memory");
- mpSpinButton->SetModifyHdl(LINK(this, ScCalcOptionsDialog, NumModifiedHdl));
+ get(mpConversion,"comboConversion");
+ mpConversion->SelectEntryPos(rConfig.meStringConversion, true);
+ mpConversion->SetSelectHdl(LINK(this, ScCalcOptionsDialog, ConversionModifiedHdl));
+
+ get(mpEmptyAsZero,"checkEmptyAsZero");
+ mpEmptyAsZero->Check(rConfig.mbEmptyStringAsZero);
+ mpEmptyAsZero->SetClickHdl(LINK(this, ScCalcOptionsDialog, AsZeroModifiedHdl));
+
+ get(mpSyntax,"comboSyntaxRef");
+ mpSyntax->SelectEntryPos(rConfig.meStringRefAddressSyntax);
+ mpSyntax->SetSelectHdl(LINK(this, ScCalcOptionsDialog, SyntaxModifiedHdl));
+
+ get(mpUseOpenCL,"CBUseOpenCL");
+ mpUseOpenCL->Check(rConfig.mbOpenCLSubsetOnly);
+ mpUseOpenCL->SetClickHdl(LINK(this, ScCalcOptionsDialog, CBUseOpenCLHdl));
+
+ get(mpSpinButton,"spinOpenCLSize");
+ mpSpinButton->SetValue(rConfig.mnOpenCLMinimumFormulaGroupSize);
+ mpSpinButton->SetModifyHdl(LINK(this, ScCalcOptionsDialog, SpinOpenCLMinSizeHdl));
+
+ get(mpEditField, "entry");
+ mpEditField->SetText(ScOpCodeSetToSymbolicString(maConfig.maOpenCLSubsetOpCodes));
+ mpEditField->set_height_request(4 * mpEditField->GetTextHeight());
+
mpEditField->SetModifyHdl(LINK(this, ScCalcOptionsDialog, EditModifiedHdl));
mpOpenclInfoList->set_height_request(4* mpOpenclInfoList->GetTextHeight());
@@ -172,83 +159,13 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(vcl::Window* pParent, const ScCalcConfi
mpBtnAutomaticSelectionTrue->SetToggleHdl(LINK(this, ScCalcOptionsDialog, BtnAutomaticSelectHdl));
- maCaptionStringRefSyntax = get<vcl::Window>("ref_syntax_caption")->GetText();
- maDescStringRefSyntax = get<vcl::Window>("ref_syntax_desc")->GetText();
- maUseFormulaSyntax = get<vcl::Window>("use_formula_syntax")->GetText();
-
- maCaptionStringConversion = get<vcl::Window>("string_conversion_caption")->GetText();
- maDescStringConversion = get<vcl::Window>("string_conversion_desc")->GetText();
- maStringConversionAsError = get<vcl::Window>("string_conversion_as_error")->GetText();
- maStringConversionAsZero = get<vcl::Window>("string_conversion_as_zero")->GetText();
- maStringConversionUnambiguous = get<vcl::Window>("string_conversion_unambiguous")->GetText();
- maStringConversionLocaleDependent = get<vcl::Window>("string_conversion_locale_dependent")->GetText();
-
- maCaptionEmptyStringAsZero = get<vcl::Window>("empty_str_as_zero_caption")->GetText();
- maDescEmptyStringAsZero = get<vcl::Window>("empty_str_as_zero_desc")->GetText();
-
- maCaptionOpenCLSubsetEnabled = get<vcl::Window>("opencl_subset_enabled")->GetText();
- maDescOpenCLSubsetEnabled = get<vcl::Window>("opencl_subset_enabled_desc")->GetText();
-
- maCaptionOpenCLMinimumFormulaSize = get<vcl::Window>("opencl_minimum_size")->GetText();
- maDescOpenCLMinimumFormulaSize = get<vcl::Window>("opencl_minimum_size_desc")->GetText();
-
- maCaptionOpenCLSubsetOpCodes = get<vcl::Window>("opencl_subset_opcodes")->GetText();
- maDescOpenCLSubsetOpCodes = get<vcl::Window>("opencl_subset_opcodes_desc")->GetText();
-
maSoftware = get<vcl::Window>("software")->GetText();
- mpLbSettings->set_height_request(8 * mpLbSettings->GetTextHeight());
- mpLbSettings->SetStyle(mpLbSettings->GetStyle() | WB_CLIPCHILDREN | WB_FORCE_MAKEVISIBLE);
- mpLbSettings->SetHighlightRange();
-
- Link aLink = LINK(this, ScCalcOptionsDialog, SettingsSelHdl);
- mpLbSettings->SetSelectHdl(aLink);
- mpLbOptionEdit->SetSelectHdl(aLink);
-
mpTestButton->SetClickHdl(LINK(this, ScCalcOptionsDialog, TestClickHdl));
-
- aLink = LINK(this, ScCalcOptionsDialog, BtnToggleHdl);
- mpBtnTrue->SetToggleHdl(aLink); // Set handler only to the 'True' button.
-
- maTrue = mpBtnTrue->GetText();
- maFalse = mpBtnFalse->GetText();
-
- FillOptionsList();
- SelectionChanged();
}
ScCalcOptionsDialog::~ScCalcOptionsDialog() {}
-SvTreeListEntry *ScCalcOptionsDialog::createItem(const OUString &rCaption, const OUString& sValue) const
-{
- SvTreeListEntry* pEntry = new SvTreeListEntry;
- pEntry->AddItem(new SvLBoxString(pEntry, 0, OUString()));
- pEntry->AddItem(new SvLBoxContextBmp(pEntry, 0, Image(), Image(), false));
- OptionString* pItem = new OptionString(rCaption, sValue);
- pEntry->AddItem(pItem);
- return pEntry;
-}
-
-void ScCalcOptionsDialog::setValueAt(size_t nPos, const OUString &rValue)
-{
- SvTreeList *pModel = mpLbSettings->GetModel();
- SvTreeListEntry* pEntry = pModel->GetEntry(NULL, nPos);
- if (!pEntry)
- {
- SAL_WARN("sc", "missing entry at " << nPos << " in value view");
- return;
- }
- OptionString* pOpt = dynamic_cast<OptionString *>(pEntry->GetItem(2));
- if (!pOpt)
- {
- SAL_WARN("sc", "missing option string item so can't set " << rValue);
- return;
- }
-
- pOpt->SetValue(rValue);
- pModel->InvalidateEntry(pEntry);
-}
-
#if HAVE_FEATURE_OPENCL
void ScCalcOptionsDialog::fillOpenCLList()
@@ -291,277 +208,6 @@ void ScCalcOptionsDialog::fillOpenCLList()
#endif
-namespace {
-void addOption( SvTreeList* pModel, OptionString* pItem )
-{
- SvTreeListEntry* pEntry = new SvTreeListEntry;
- pEntry->AddItem(new SvLBoxString(pEntry, 0, OUString()));
- pEntry->AddItem(new SvLBoxContextBmp(pEntry, 0, Image(), Image(), false));
- pEntry->AddItem(pItem);
- pModel->Insert(pEntry);
-}
-}
-
-void ScCalcOptionsDialog::FillOptionsList()
-{
- mpLbSettings->SetUpdateMode(false);
- mpLbSettings->Clear();
-
- SvTreeList* pModel = mpLbSettings->GetModel();
-
- {
- // String conversion for arithmetic operations.
- OptionString* pItem = new OptionString(
- maCaptionStringConversion, toString(maConfig.meStringConversion));
- addOption( pModel, pItem);
- }
-
- pModel->Insert(createItem(maCaptionEmptyStringAsZero,toString(maConfig.mbEmptyStringAsZero)));
-
- {
- // Syntax for INDIRECT function.
- OptionString* pItem = new OptionString(
- maCaptionStringRefSyntax, toString(maConfig.meStringRefAddressSyntax));
- addOption( pModel, pItem);
- }
-
-#if HAVE_FEATURE_OPENCL
- pModel->Insert(createItem(maCaptionOpenCLSubsetEnabled,toString(maConfig.mbOpenCLSubsetOnly)));
- pModel->Insert(createItem(maCaptionOpenCLMinimumFormulaSize,toString(maConfig.mnOpenCLMinimumFormulaGroupSize)));
- pModel->Insert(createItem(maCaptionOpenCLSubsetOpCodes,ScOpCodeSetToSymbolicString(maConfig.maOpenCLSubsetOpCodes)));
-
- fillOpenCLList();
-
- mpBtnAutomaticSelectionFalse->Check(!maConfig.mbOpenCLAutoSelect);
- mpBtnAutomaticSelectionTrue->Check(maConfig.mbOpenCLAutoSelect);
-#endif
-
- mpLbSettings->SetUpdateMode(true);
-}
-
-void ScCalcOptionsDialog::SelectionChanged()
-{
- sal_uLong nSelectedPos = mpLbSettings->GetSelectEntryPos();
- switch ((CalcOptionOrder)nSelectedPos)
- {
- case CALC_OPTION_REF_SYNTAX:
- {
- // Formula syntax for INDIRECT function.
- mpBtnTrue->Hide();
- mpBtnFalse->Hide();
- mpSpinButton->Hide();
- mpEditField->Hide();
- mpLbOptionEdit->Show();
- mpOpenclInfoList->GetParent()->Hide();
-
- mpLbOptionEdit->Clear();
- mpLbOptionEdit->InsertEntry(maUseFormulaSyntax);
- mpLbOptionEdit->InsertEntry(maCalcA1);
- mpLbOptionEdit->InsertEntry(maExcelA1);
- mpLbOptionEdit->InsertEntry(maExcelR1C1);
- switch (maConfig.meStringRefAddressSyntax)
- {
- case formula::FormulaGrammar::CONV_OOO:
- mpLbOptionEdit->SelectEntryPos(1);
- break;
- case formula::FormulaGrammar::CONV_XL_A1:
- mpLbOptionEdit->SelectEntryPos(2);
- break;
- case formula::FormulaGrammar::CONV_XL_R1C1:
- mpLbOptionEdit->SelectEntryPos(3);
- break;
- case formula::FormulaGrammar::CONV_UNSPECIFIED:
- default:
- mpLbOptionEdit->SelectEntryPos(0);
- }
- mpFtAnnotation->SetText(maDescStringRefSyntax);
- }
- break;
-
- case CALC_OPTION_STRING_CONVERSION:
- {
- // String conversion for arithmetic operations.
- mpBtnTrue->Hide();
- mpBtnFalse->Hide();
- mpSpinButton->Hide();
- mpEditField->Hide();
- mpLbOptionEdit->Show();
- mpOpenclInfoList->GetParent()->Hide();
-
- mpLbOptionEdit->Clear();
- mpLbOptionEdit->InsertEntry(maStringConversionAsError);
- mpLbOptionEdit->InsertEntry(maStringConversionAsZero);
- mpLbOptionEdit->InsertEntry(maStringConversionUnambiguous);
- mpLbOptionEdit->InsertEntry(maStringConversionLocaleDependent);
- switch (maConfig.meStringConversion)
- {
- case ScCalcConfig::STRING_CONVERSION_AS_ERROR:
- mpLbOptionEdit->SelectEntryPos(0);
- break;
- case ScCalcConfig::STRING_CONVERSION_AS_ZERO:
- mpLbOptionEdit->SelectEntryPos(1);
- break;
- case ScCalcConfig::STRING_CONVERSION_UNAMBIGUOUS:
- mpLbOptionEdit->SelectEntryPos(2);
- break;
- case ScCalcConfig::STRING_CONVERSION_LOCALE_DEPENDENT:
- mpLbOptionEdit->SelectEntryPos(3);
- break;
- }
- mpFtAnnotation->SetText(maDescStringConversion);
- }
- break;
-
- // booleans
- case CALC_OPTION_EMPTY_AS_ZERO:
- case CALC_OPTION_ENABLE_OPENCL_SUBSET:
- {
- mpLbOptionEdit->Hide();
- mpBtnTrue->Show();
- mpBtnFalse->Show();
- mpSpinButton->Hide();
- mpEditField->Hide();
-
- bool bValue = false;
- bool bEnable = true;
- if ( nSelectedPos == CALC_OPTION_EMPTY_AS_ZERO )
- {
- bValue = maConfig.mbEmptyStringAsZero;
- mpFtAnnotation->SetText(maDescEmptyStringAsZero);
- mpOpenclInfoList->GetParent()->Hide();
- switch (maConfig.meStringConversion)
- {
- case ScCalcConfig::STRING_CONVERSION_AS_ERROR:
- case ScCalcConfig::STRING_CONVERSION_AS_ZERO:
- bEnable = false;
- break;
- case ScCalcConfig::STRING_CONVERSION_UNAMBIGUOUS:
- case ScCalcConfig::STRING_CONVERSION_LOCALE_DEPENDENT:
- break; // nothing
- }
- }
- else if ( nSelectedPos == CALC_OPTION_ENABLE_OPENCL_SUBSET )
- {
- bValue = maConfig.mbOpenCLSubsetOnly;
- mpFtAnnotation->SetText(maDescOpenCLSubsetEnabled);
- mpOpenclInfoList->GetParent()->Hide();
- }
- else
- {
- assert(false);
- }
-
- if ( bValue )
- {
- mpBtnTrue->Check(true);
- mpBtnFalse->Check(false);
- }
- else
- {
- mpBtnTrue->Check(false);
- mpBtnFalse->Check(true);
- }
- if (bEnable)
- {
- mpBtnTrue->Enable();
- mpBtnFalse->Enable();
- }
- else
- {
- mpBtnTrue->Disable();
- mpBtnFalse->Disable();
- }
- }
- break;
-
- // numeric fields
- case CALC_OPTION_OPENCL_MIN_SIZE:
- {
- // just one numeric field so far
- sal_Int32 nValue = maConfig.mnOpenCLMinimumFormulaGroupSize;
- mpLbOptionEdit->Hide();
- mpBtnTrue->Hide();
- mpBtnFalse->Hide();
- mpSpinButton->Show();
- mpEditField->Hide();
- mpOpenclInfoList->GetParent()->Hide();
- mpFtAnnotation->SetText(maDescOpenCLMinimumFormulaSize);
- mpSpinButton->SetValue(nValue);
- }
- break;
-
- // strings
- case CALC_OPTION_OPENCL_SUBSET_OPS:
- {
- // just one string field so far
- OUString sValue = ScOpCodeSetToSymbolicString(maConfig.maOpenCLSubsetOpCodes);
- mpLbOptionEdit->Hide();
- mpBtnTrue->Hide();
- mpBtnFalse->Hide();
- mpSpinButton->Hide();
- mpEditField->Show();
- mpOpenclInfoList->GetParent()->Hide();
- mpFtAnnotation->SetText(maDescOpenCLSubsetOpCodes);
- mpEditField->SetText(sValue);
- }
- break;
-
- }
-}
-
-void ScCalcOptionsDialog::ListOptionValueChanged()
-{
- sal_uLong nSelected = mpLbSettings->GetSelectEntryPos();
- switch ((CalcOptionOrder) nSelected)
- {
- case CALC_OPTION_REF_SYNTAX:
- {
- // Formula syntax for INDIRECT function.
- sal_Int32 nPos = mpLbOptionEdit->GetSelectEntryPos();
- maConfig.meStringRefAddressSyntax = toAddressConvention(nPos);
-
- setValueAt(nSelected, toString(maConfig.meStringRefAddressSyntax));
- }
- break;
-
- case CALC_OPTION_STRING_CONVERSION:
- {
- // String conversion for arithmetic operations.
- sal_Int32 nPos = mpLbOptionEdit->GetSelectEntryPos();
- maConfig.meStringConversion = toStringConversion(nPos);
-
- setValueAt(nSelected, toString(maConfig.meStringConversion));
-
- switch (maConfig.meStringConversion)
- {
- case ScCalcConfig::STRING_CONVERSION_AS_ERROR:
- maConfig.mbEmptyStringAsZero = false;
- setValueAt(CALC_OPTION_EMPTY_AS_ZERO, toString(maConfig.mbEmptyStringAsZero));
- mpLbOptionEdit->SelectEntryPos(0);
- break;
- case ScCalcConfig::STRING_CONVERSION_AS_ZERO:
- maConfig.mbEmptyStringAsZero = true;
- setValueAt(CALC_OPTION_EMPTY_AS_ZERO, toString(maConfig.mbEmptyStringAsZero));
- mpLbOptionEdit->SelectEntryPos(1);
- break;
- case ScCalcConfig::STRING_CONVERSION_UNAMBIGUOUS:
- case ScCalcConfig::STRING_CONVERSION_LOCALE_DEPENDENT:
- // Reset to the value the user selected before.
- maConfig.mbEmptyStringAsZero = mbSelectedEmptyStringAsZero;
- setValueAt(CALC_OPTION_EMPTY_AS_ZERO, toString(maConfig.mbEmptyStringAsZero));
- break;
- }
- }
- break;
-
- case CALC_OPTION_EMPTY_AS_ZERO:
- case CALC_OPTION_ENABLE_OPENCL_SUBSET:
- case CALC_OPTION_OPENCL_MIN_SIZE:
- case CALC_OPTION_OPENCL_SUBSET_OPS:
- break;
- }
-}
-
void ScCalcOptionsDialog::OpenCLAutomaticSelectionChanged()
{
bool bValue = mpBtnAutomaticSelectionTrue->IsChecked();
@@ -607,104 +253,53 @@ void ScCalcOptionsDialog::SelectedDeviceChanged()
#endif
}
-void ScCalcOptionsDialog::RadioValueChanged()
-{
- sal_uLong nSelected = mpLbSettings->GetSelectEntryPos();
- bool bValue = mpBtnTrue->IsChecked();
- switch (nSelected)
- {
- case CALC_OPTION_REF_SYNTAX:
- case CALC_OPTION_STRING_CONVERSION:
- return;
- case CALC_OPTION_EMPTY_AS_ZERO:
- maConfig.mbEmptyStringAsZero = mbSelectedEmptyStringAsZero = bValue;
- break;
- case CALC_OPTION_ENABLE_OPENCL_SUBSET:
- maConfig.mbOpenCLSubsetOnly = bValue;
- break;
- }
-
- setValueAt(nSelected, toString(bValue));
-}
-
-void ScCalcOptionsDialog::SpinButtonValueChanged()
+IMPL_LINK(ScCalcOptionsDialog, AsZeroModifiedHdl, CheckBox*, pCheckBox )
{
- // We know that the mpSpinButton is used for only one thing at the moment,
- // the OpenCL minimum formula size
- sal_Int64 nVal = mpSpinButton->GetValue();
- maConfig.mnOpenCLMinimumFormulaGroupSize = nVal;
-}
-
-void ScCalcOptionsDialog::EditFieldValueChanged(Control *pCtrl)
-{
- Edit& rEdit(dynamic_cast<Edit&>(*pCtrl));
-
- OUString sVal = rEdit.GetText();
-
- if (&rEdit == mpEditField)
- {
- // We know that the mpEditField is used for only one thing at the moment,
- // the OpenCL subset list of opcodes
- maConfig.maOpenCLSubsetOpCodes = ScStringToOpCodeSet(sVal);
- }
+ maConfig.mbEmptyStringAsZero = pCheckBox->IsChecked();
+ return 0;
}
-OUString ScCalcOptionsDialog::toString(formula::FormulaGrammar::AddressConvention eConv) const
+IMPL_LINK(ScCalcOptionsDialog, ConversionModifiedHdl, ListBox*, pConv )
{
- switch (eConv)
- {
- case formula::FormulaGrammar::CONV_OOO:
- return maCalcA1;
- case formula::FormulaGrammar::CONV_XL_A1:
- return maExcelA1;
- case formula::FormulaGrammar::CONV_XL_R1C1:
- return maExcelR1C1;
- case formula::FormulaGrammar::CONV_UNSPECIFIED:
- default:
- ;
- }
- return maUseFormulaSyntax;
-}
-OUString ScCalcOptionsDialog::toString(ScCalcConfig::StringConversion eConv) const
-{
- switch (eConv)
+ maConfig.meStringConversion = (ScCalcConfig::StringConversion)pConv->GetSelectEntryPos();
+ switch (maConfig.meStringConversion)
{
- case ScCalcConfig::STRING_CONVERSION_AS_ERROR:
- return maStringConversionAsError;
- case ScCalcConfig::STRING_CONVERSION_AS_ZERO:
- return maStringConversionAsZero;
- case ScCalcConfig::STRING_CONVERSION_UNAMBIGUOUS:
- return maStringConversionUnambiguous;
- case ScCalcConfig::STRING_CONVERSION_LOCALE_DEPENDENT:
- return maStringConversionLocaleDependent;
- }
- return maStringConversionAsError;
-}
-
-OUString ScCalcOptionsDialog::toString(bool bVal) const
-{
- return bVal ? maTrue : maFalse;
+ case ScCalcConfig::STRING_CONVERSION_AS_ERROR:
+ maConfig.mbEmptyStringAsZero = false;
+ mpEmptyAsZero->Check(false);
+ mpEmptyAsZero->Enable(false);
+ break;
+ case ScCalcConfig::STRING_CONVERSION_AS_ZERO:
+ maConfig.mbEmptyStringAsZero = true;
+ mpEmptyAsZero->Check(true);
+ mpEmptyAsZero->Enable(false);
+ break;
+ case ScCalcConfig::STRING_CONVERSION_UNAMBIGUOUS:
+ case ScCalcConfig::STRING_CONVERSION_LOCALE_DEPENDENT:
+ // Reset to the value the user selected before.
+ maConfig.mbEmptyStringAsZero = mbSelectedEmptyStringAsZero;
+ mpEmptyAsZero->Enable(true);
+ break;
+ }
+ return 0;
}
-OUString ScCalcOptionsDialog::toString(sal_Int32 nVal) const
+IMPL_LINK(ScCalcOptionsDialog, SyntaxModifiedHdl, ListBox*, pSyntax)
{
- return OUString::number(nVal);
+ maConfig.meStringRefAddressSyntax = toAddressConvention(pSyntax->GetSelectEntryPos());
+ return 0;
}
-IMPL_LINK(ScCalcOptionsDialog, SettingsSelHdl, Control*, pCtrl)
+IMPL_LINK(ScCalcOptionsDialog, CBUseOpenCLHdl, CheckBox*, pCheckBox)
{
- if (pCtrl == mpLbSettings)
- SelectionChanged();
- else if (pCtrl == mpLbOptionEdit)
- ListOptionValueChanged();
-
+ maConfig.mbOpenCLSubsetOnly = pCheckBox->IsChecked();
return 0;
}
-IMPL_LINK_NOARG(ScCalcOptionsDialog, BtnToggleHdl)
+IMPL_LINK(ScCalcOptionsDialog, SpinOpenCLMinSizeHdl, NumericField*, pSpin)
{
- RadioValueChanged();
+ maConfig.mnOpenCLMinimumFormulaGroupSize = pSpin->GetValue();
return 0;
}
@@ -720,15 +315,9 @@ IMPL_LINK_NOARG(ScCalcOptionsDialog, DeviceSelHdl)
return 0;
}
-IMPL_LINK_NOARG(ScCalcOptionsDialog, NumModifiedHdl)
-{
- SpinButtonValueChanged();
- return 0;
-}
-
-IMPL_LINK(ScCalcOptionsDialog, EditModifiedHdl, Control*, pCtrl)
+IMPL_LINK(ScCalcOptionsDialog, EditModifiedHdl, Edit*, pCtrl)
{
- EditFieldValueChanged(pCtrl);
+ maConfig.maOpenCLSubsetOpCodes = ScStringToOpCodeSet(pCtrl->GetText());
return 0;
}
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.hxx b/sc/source/ui/optdlg/calcoptionsdlg.hxx
index c7bfe4dbda29..e253a9567798 100644
--- a/sc/source/ui/optdlg/calcoptionsdlg.hxx
+++ b/sc/source/ui/optdlg/calcoptionsdlg.hxx
@@ -19,7 +19,9 @@
#include <vcl/fixed.hxx>
#include <vcl/layout.hxx>
#include <vcl/lstbox.hxx>
+
#include <svx/checklbx.hxx>
+
#include <svtools/treelistbox.hxx>
#include "calcconfig.hxx"
@@ -35,48 +37,43 @@ public:
ScCalcOptionsDialog(vcl::Window* pParent, const ScCalcConfig& rConfig);
virtual ~ScCalcOptionsDialog();
- DECL_LINK( SettingsSelHdl, Control* );
- DECL_LINK( BtnToggleHdl, void* );
DECL_LINK( BtnAutomaticSelectHdl, void* );
DECL_LINK( DeviceSelHdl, void* );
DECL_LINK( NumModifiedHdl, void * );
- DECL_LINK( EditModifiedHdl, Control * );
+ DECL_LINK( EditModifiedHdl, Edit * );
DECL_LINK( TestClickHdl, PushButton* );
+ DECL_LINK( AsZeroModifiedHdl, CheckBox*);
+ DECL_LINK( ConversionModifiedHdl, ListBox*);
+ DECL_LINK( SyntaxModifiedHdl, ListBox*);
+ DECL_LINK( CBUseOpenCLHdl, CheckBox*);
+ DECL_LINK( SpinOpenCLMinSizeHdl, NumericField*);
const ScCalcConfig& GetConfig() const { return maConfig;}
private:
- void FillOptionsList();
- void SelectionChanged();
- void ListOptionValueChanged();
- void RadioValueChanged();
void OpenCLAutomaticSelectionChanged();
void SelectedDeviceChanged();
- void SpinButtonValueChanged();
- void EditFieldValueChanged(Control *pCtrl);
#if HAVE_FEATURE_OPENCL
void fillOpenCLList();
#endif
- OUString toString(formula::FormulaGrammar::AddressConvention eConv) const;
- OUString toString(ScCalcConfig::StringConversion eConv) const;
- OUString toString(bool bVal) const;
- OUString toString(sal_Int32 nVal) const;
SvTreeListEntry *createItem(const OUString &rCaption, const OUString& sValue) const;
void setValueAt(size_t nPos, const OUString &rString);
OpenCLConfig::ImplMatcherSet& CurrentWhiteOrBlackList();
const OpenCLConfig::ImplMatcher& CurrentWhiteOrBlackListEntry();
private:
- SvxCheckListBox* mpLbSettings;
- ListBox* mpLbOptionEdit;
- RadioButton* mpBtnTrue;
- RadioButton* mpBtnFalse;
+ CheckBox* mpEmptyAsZero;
+ ListBox* mpConversion;
+ ListBox* mpSyntax;
+ CheckBox* mpUseOpenCL;
NumericField* mpSpinButton;
- Edit* mpEditField;
+ VclMultiLineEdit* mpEditField;
PushButton* mpTestButton;
+ ListBox* mpLbOptionEdit;
+
FixedText* mpFtAnnotation;
FixedText* mpFtFrequency;
FixedText* mpFtComputeUnits;
@@ -86,37 +83,6 @@ private:
RadioButton* mpBtnAutomaticSelectionTrue;
RadioButton* mpBtnAutomaticSelectionFalse;
- OUString maTrue;
- OUString maFalse;
-
- OUString maCalcA1;
- OUString maExcelA1;
- OUString maExcelR1C1;
-
- OUString maCaptionStringRefSyntax;
- OUString maDescStringRefSyntax;
- OUString maUseFormulaSyntax;
-
- OUString maStringConversionAsError;
- OUString maStringConversionAsZero;
- OUString maStringConversionUnambiguous;
- OUString maStringConversionLocaleDependent;
-
- OUString maCaptionStringConversion;
- OUString maDescStringConversion;
-
- OUString maCaptionEmptyStringAsZero;
- OUString maDescEmptyStringAsZero;
-
- OUString maCaptionOpenCLSubsetEnabled;
- OUString maDescOpenCLSubsetEnabled;
-
- OUString maCaptionOpenCLMinimumFormulaSize;
- OUString maDescOpenCLMinimumFormulaSize;
-
- OUString maCaptionOpenCLSubsetOpCodes;
- OUString maDescOpenCLSubsetOpCodes;
-
OUString maSoftware;
ScCalcConfig maConfig;
diff --git a/sc/uiconfig/scalc/ui/formulacalculationoptions.ui b/sc/uiconfig/scalc/ui/formulacalculationoptions.ui
index 7332c085851d..4e81c04d8d0d 100644
--- a/sc/uiconfig/scalc/ui/formulacalculationoptions.ui
+++ b/sc/uiconfig/scalc/ui/formulacalculationoptions.ui
@@ -1,7 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.18.3 -->
<interface>
- <!-- interface-requires gtk+ 3.6 -->
- <!-- interface-requires LibreOffice 1.0 -->
+ <requires lib="gtk+" version="3.6"/>
+ <requires lib="LibreOffice" version="1.0"/>
+ <object class="GtkAdjustment" id="adjustment1">
+ <property name="lower">100</property>
+ <property name="value">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">100</property>
+ </object>
<object class="GtkDialog" id="FormulaCalculationOptions">
<property name="can_focus">False</property>
<property name="vexpand">True</property>
@@ -13,657 +20,469 @@
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
- <child internal-child="action_area">
- <object class="GtkButtonBox" id="dialog-action_area1">
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="ok">
- <property name="label">gtk-ok</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="cancel">
- <property name="label">gtk-cancel</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
<child>
- <object class="GtkGrid" id="grid1">
+ <object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <property name="row_spacing">12</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
<child>
- <object class="svxcorelo-SvxCheckListBox" id="settings:border">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="Check List Box-selection1"/>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkGrid" id="grid2">
+ <object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="column_spacing">12</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
<child>
- <object class="GtkLabel" id="label1">
+ <object class="GtkGrid" id="grid7">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">_Value:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkGrid" id="grid4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="column_homogeneous">True</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
- <object class="GtkRadioButton" id="true">
- <property name="label" translatable="yes">True</property>
+ <object class="GtkLabel" id="labelConvT2N">
<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="can_focus">False</property>
<property name="xalign">0</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">false</property>
+ <property name="label" translatable="yes">Conversion from text to number:</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkRadioButton" id="false">
- <property name="label" translatable="yes">False</property>
+ <object class="GtkCheckButton" id="checkEmptyAsZero">
+ <property name="label" translatable="yes">Treat _empty string as zero</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>
- <property name="group">true</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">2</property>
</packing>
</child>
<child>
- <object class="GtkComboBoxText" id="edit">
+ <object class="GtkLabel" id="labelSyntaxRef">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="hexpand">True</property>
+ <property name="label" translatable="yes">Reference syntax for string reference:</property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="spinbutton">
+ <object class="GtkComboBoxText" id="comboSyntaxRef">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="halign">start</property>
- <property name="invisible_char">●</property>
- <property name="adjustment">adjustment1</property>
- <property name="climb_rate">1</property>
- <property name="update_policy">if-valid</property>
+ <property name="can_focus">False</property>
+ <items>
+ <item id="0" translatable="yes">Use formula syntax</item>
+ <item id="1">Calc A1</item>
+ <item id="2">Excel A1</item>
+ <item id="3">Excel R1C1</item>
+ </items>
</object>
<packing>
- <property name="left_attach">3</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
</packing>
</child>
<child>
- <object class="GtkEntry" id="entry">
+ <object class="GtkComboBoxText" id="comboConversion">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="valign">center</property>
- <property name="invisible_char">●</property>
+ <property name="can_focus">False</property>
+ <items>
+ <item id="0" translatable="yes">Generate #VALUE! error</item>
+ <item id="1" translatable="yes">Treat as zero</item>
+ <item id="2" translatable="yes">Convert only if unambiguous</item>
+ <item id="3" translatable="yes">Convert also locale dependent</item>
+ </items>
</object>
<packing>
- <property name="left_attach">4</property>
+ <property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
</object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
</child>
</object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
</child>
- <child>
- <object class="GtkLabel" id="annotation">
+ <child type="label">
+ <object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="wrap">True</property>
- <property name="max_width_chars">56</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="string_conversion_caption">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
- <property name="label" translatable="yes">Conversion from text to number</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">4</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="string_conversion_desc">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
- <property name="label" translatable="yes">How to treat text when encountered as operand in an arithmetic operation or as argument to a function that expects a number instead. Unambiguous conversion is possible for integer numbers including exponents and ISO 8601 dates and times in their extended formats with separators. Fractional numeric values with decimal separators or dates other than ISO 8601 are locale dependent. Note that in locale dependent conversions the resulting numeric value may differ between locales!</property>
- <property name="wrap">True</property>
- <property name="max_width_chars">56</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">5</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="string_conversion_as_error">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
- <property name="label" translatable="yes">Generate #VALUE! error</property>
+ <property name="label" translatable="yes">Contents to Numbers</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">6</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="string_conversion_as_zero">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
- <property name="label" translatable="yes">Treat as zero</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">7</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="string_conversion_unambiguous">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
- <property name="label" translatable="yes">Convert only unambiguous</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">8</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="string_conversion_locale_dependent">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
- <property name="label" translatable="yes">Convert also locale dependent</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">9</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="empty_str_as_zero_caption">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
- <property name="label" translatable="yes">Treat empty string as zero</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">10</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="empty_str_as_zero_desc">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
- <property name="label" translatable="yes">This option determines how an empty string is treated when used in arithmetic operations. If you have set "Conversion from text to number" to either "Generate #VALUE! error" or "Treat as zero", you cannot choose (here) if conversion of an empty string to a number will generate an error or if it will treat empty strings as zero. Otherwise this option determines how empty strings are treated.</property>
- <property name="wrap">True</property>
- <property name="max_width_chars">56</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">11</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="ref_syntax_caption">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
- <property name="label" translatable="yes">Reference syntax for string reference</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">12</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="ref_syntax_desc">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
- <property name="label" translatable="yes">Formula syntax to use when parsing references given in string parameters. This affects built-in functions such as INDIRECT that takes a reference as a string value.</property>
- <property name="wrap">True</property>
- <property name="max_width_chars">56</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">13</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="use_formula_syntax">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
- <property name="label" translatable="yes">Use formula syntax</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">14</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="opencl_subset_enabled">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
- <property name="label" translatable="yes">Use OpenCL only for a subset of operations</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">15</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="opencl_subset_enabled_desc">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
- <property name="label" translatable="yes">Use OpenCL only for some of the operations that spreadsheet formulas are translated to.</property>
- <property name="wrap">True</property>
- <property name="max_width_chars">56</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">16</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="opencl_minimum_size">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
- <property name="label" translatable="yes">Minimum data size for OpenCL use</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">17</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
</child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
<child>
- <object class="GtkLabel" id="opencl_minimum_size_desc">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
- <property name="label" translatable="yes">An approximate lower limit on the number of data cells a spreadsheet formula should use for OpenCL to be considered.</property>
- <property name="wrap">True</property>
- <property name="max_width_chars">56</property>
+ <object class="GtkButton" id="help">
+ <property name="label">gtk-help</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">18</property>
- <property name="width">1</property>
- <property name="height">1</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ <property name="secondary">True</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="opencl_subset_opcodes">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
- <property name="label" translatable="yes">Subset of opcodes for which OpenCL is used</property>
+ <object class="GtkButton" id="ok">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">19</property>
- <property name="width">1</property>
- <property name="height">1</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="opencl_subset_opcodes_desc">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
- <property name="label" translatable="yes">The list of operator and function opcodes for which to use OpenCL. If a formula contains only these operators and functions, it might be calculated using OpenCL.</property>
- <property name="wrap">True</property>
- <property name="max_width_chars">56</property>
+ <object class="GtkButton" id="cancel">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">20</property>
- <property name="width">1</property>
- <property name="height">1</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
</packing>
</child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame2">
+ <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="GtkGrid" id="grid6">
+ <object class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="row_spacing">6</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
<child>
- <object class="svtlo-SvTreeListBox" id="opencl_list:border">
+ <object class="GtkGrid" id="grid1">
<property name="visible">True</property>
- <property name="app_paintable">True</property>
- <property name="can_focus">True</property>
+ <property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="Tree List-selection1"/>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkGrid" id="grid3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
+ <object class="GtkGrid" id="grid6">
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Automatic selection of platform/device:</property>
+ <property name="orientation">vertical</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="svtlo-SvTreeListBox" id="opencl_list:border">
+ <property name="visible">True</property>
+ <property name="app_paintable">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="Tree List-selection"/>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="grid3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Automatic selection of platform/device:</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="automatic_select_true">
+ <property name="label" translatable="yes">True</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">automatic_select_false</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="automatic_select_false">
+ <property name="label" translatable="yes">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">automatic_select_true</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="grid5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="frequency_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Frequency:</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="compute_units_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Compute units:</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="memory_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Memory (in MB):</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="frequency">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="compute_units">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="memory">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
+ <property name="top_attach">4</property>
+ <property name="width">2</property>
</packing>
</child>
<child>
- <object class="GtkRadioButton" id="automatic_select_true">
- <property name="label" translatable="yes">True</property>
+ <object class="GtkLabel" id="software">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Internal, software interpreter</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">6</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="test">
+ <property name="label" translatable="yes">_Test OpenCL</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="xalign">0</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">automatic_select_false</property>
+ <property name="receives_default">True</property>
+ <property name="halign">center</property>
+ <property name="use_underline">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">5</property>
+ <property name="width">2</property>
</packing>
</child>
<child>
- <object class="GtkRadioButton" id="automatic_select_false">
- <property name="label" translatable="yes">False</property>
+ <object class="GtkCheckButton" id="CBUseOpenCL">
+ <property name="label" translatable="yes">Use Open_CL only for a subset of operations</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="active">True</property>
<property name="draw_indicator">True</property>
- <property name="group">automatic_select_true</property>
</object>
<packing>
- <property name="left_attach">2</property>
+ <property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
+ <property name="width">2</property>
</packing>
</child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkGrid" id="grid5">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">12</property>
<child>
- <object class="GtkLabel" id="frequency_label">
+ <object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Frequency:</property>
+ <property name="label" translatable="yes">Minimum data size for OpenCL use:</property>
+ <property name="ellipsize">end</property>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
+ <property name="top_attach">1</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="compute_units_label">
+ <object class="GtkSpinButton" id="spinOpenCLSize">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Compute units:</property>
+ <property name="can_focus">True</property>
+ <property name="adjustment">adjustment1</property>
</object>
<packing>
- <property name="left_attach">0</property>
+ <property name="left_attach">1</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="memory_label">
+ <object class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="valign">start</property>
+ <property name="vexpand">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Memory (in MB):</property>
+ <property name="label" translatable="yes">Subset of OpCodes for which OpenCL is used:</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="frequency">
+ <object class="GtkTextView" id="entry">
+ <property name="width_request">60</property>
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can_focus">True</property>
+ <property name="margin_left">50</property>
+ <property name="wrap_mode">word-char</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ <property name="width">2</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="compute_units">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
+ <placeholder/>
</child>
<child>
- <object class="GtkLabel" id="memory">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
+ <placeholder/>
</child>
</object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
</child>
</object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
</child>
- <child>
- <object class="GtkLabel" id="software">
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Internal, software interpreter</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">27</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="test">
- <property name="label" translatable="yes">_Test</property>
+ <child type="label">
+ <object class="GtkLabel" id="label4">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">OpenCL Settings</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">28</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
@@ -674,19 +493,10 @@
</action-widgets>
</object>
<object class="GtkSizeGroup" id="sizegroup1">
- <property name="mode">both</property>
- <widgets>
- <widget name="annotation"/>
- <widget name="ref_syntax_desc"/>
- <widget name="empty_str_as_zero_desc"/>
- </widgets>
- </object>
- <object class="GtkSizeGroup" id="sizegroup2">
- <property name="mode">vertical</property>
<widgets>
- <widget name="true"/>
- <widget name="false"/>
- <widget name="edit"/>
+ <widget name="comboSyntaxRef"/>
+ <widget name="comboConversion"/>
+ <widget name="spinOpenCLSize"/>
</widgets>
</object>
</interface>