diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-02-11 21:33:49 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-02-12 12:47:57 +0100 |
commit | de0651551b13e58e4a37794e1da6649629be3fc0 (patch) | |
tree | 661ba5596b35d69f24db89a474c416c7aad94dae | |
parent | c4a91f1409fc21d92f207718f29377c2862e381f (diff) |
weld ScSolverOptionsDialog
Change-Id: I940fe1c5b4edf41c66a729c56fa789488fd39ba6
Reviewed-on: https://gerrit.libreoffice.org/67713
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | cui/uiconfig/ui/acoroptionspage.ui | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/solveroptions.hxx | 53 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/optsolver.cxx | 9 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/solveroptions.cxx | 274 | ||||
-rw-r--r-- | sc/uiconfig/scalc/ui/solveroptionsdialog.ui | 185 | ||||
-rw-r--r-- | solenv/sanitizers/ui/cui.suppr | 1 |
6 files changed, 265 insertions, 259 deletions
diff --git a/cui/uiconfig/ui/acoroptionspage.ui b/cui/uiconfig/ui/acoroptionspage.ui index 9c10c2b50f58..2bdc0bf3492d 100644 --- a/cui/uiconfig/ui/acoroptionspage.ui +++ b/cui/uiconfig/ui/acoroptionspage.ui @@ -37,7 +37,7 @@ <property name="vexpand">True</property> <property name="model">liststore2</property> <property name="headers_visible">False</property> - <property name="search_column">0</property> + <property name="search_column">1</property> <property name="show_expanders">False</property> <child internal-child="selection"> <object class="GtkTreeSelection" id="Macro Library List-selection2"/> diff --git a/sc/source/ui/inc/solveroptions.hxx b/sc/source/ui/inc/solveroptions.hxx index 73e2dc1c9c40..18bc0ab3012a 100644 --- a/sc/source/ui/inc/solveroptions.hxx +++ b/sc/source/ui/inc/solveroptions.hxx @@ -20,46 +20,67 @@ #ifndef INCLUDED_SC_SOURCE_UI_INC_SOLVEROPTIONS_HXX #define INCLUDED_SC_SOURCE_UI_INC_SOLVEROPTIONS_HXX -#include <vcl/button.hxx> -#include <vcl/dialog.hxx> -#include <vcl/lstbox.hxx> #include <vcl/weld.hxx> -#include <svx/checklbx.hxx> #include <com/sun/star/uno/Sequence.hxx> namespace com { namespace sun { namespace star { namespace beans { struct PropertyValue; } } } } -class ScSolverOptionsDialog : public ModalDialog +class ScSolverOptionsString { - VclPtr<ListBox> m_pLbEngine; - VclPtr<SvxCheckListBox> m_pLbSettings; - VclPtr<PushButton> m_pBtnEdit; + bool mbIsDouble; + double mfDoubleValue; + sal_Int32 mnIntValue; + OUString msStr; - std::unique_ptr<SvLBoxButtonData> m_xCheckButtonData; +public: + explicit ScSolverOptionsString(const OUString& rStr) + : mbIsDouble(false) + , mfDoubleValue(0.0) + , mnIntValue(0) + , msStr(rStr) + { + } + + bool IsDouble() const { return mbIsDouble; } + double GetDoubleValue() const { return mfDoubleValue; } + sal_Int32 GetIntValue() const { return mnIntValue; } + const OUString& GetText() const { return msStr; } + + void SetDoubleValue( double fNew ) { mbIsDouble = true; mfDoubleValue = fNew; } + void SetIntValue( sal_Int32 nNew ) { mbIsDouble = false; mnIntValue = nNew; } +}; + +class ScSolverOptionsDialog : public weld::GenericDialogController +{ css::uno::Sequence<OUString> maImplNames; css::uno::Sequence<OUString> maDescriptions; - OUString maEngine; + OUString maEngine; css::uno::Sequence<css::beans::PropertyValue> maProperties; - DECL_LINK( EngineSelectHdl, ListBox&, void ); - DECL_LINK( SettingsSelHdl, SvTreeListBox*, void ); - DECL_LINK( SettingsDoubleClickHdl, SvTreeListBox*, bool ); - DECL_LINK( ButtonHdl, Button*, void ); + std::vector<std::unique_ptr<ScSolverOptionsString>> m_aOptions; + + std::unique_ptr<weld::ComboBox> m_xLbEngine; + std::unique_ptr<weld::TreeView> m_xLbSettings; + std::unique_ptr<weld::Button> m_xBtnEdit; + + DECL_LINK( EngineSelectHdl, weld::ComboBox&, void ); + DECL_LINK( SettingsSelHdl, weld::TreeView&, void ); + DECL_LINK( SettingsDoubleClickHdl, weld::TreeView&, void ); + DECL_LINK( ButtonHdl, weld::Button&, void ); void ReadFromComponent(); void FillListBox(); void EditOption(); public: - ScSolverOptionsDialog( vcl::Window* pParent, + ScSolverOptionsDialog( weld::Window* pParent, const css::uno::Sequence<OUString>& rImplNames, const css::uno::Sequence<OUString>& rDescriptions, const OUString& rEngine, const css::uno::Sequence<css::beans::PropertyValue>& rProperties ); virtual ~ScSolverOptionsDialog() override; - virtual void dispose() override; // already updated in selection handler const OUString& GetEngine() const { return maEngine; } diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx index 8d26590cfb79..2f4232d2f4f7 100644 --- a/sc/source/ui/miscdlgs/optsolver.cxx +++ b/sc/source/ui/miscdlgs/optsolver.cxx @@ -600,12 +600,11 @@ IMPL_LINK( ScOptSolverDlg, BtnHdl, Button*, pBtn, void ) else if ( pBtn == m_pBtnOpt ) { //! move options dialog to UI lib? - ScopedVclPtr<ScSolverOptionsDialog> pOptDlg( - VclPtr<ScSolverOptionsDialog>::Create( this, maImplNames, maDescriptions, maEngine, maProperties )); - if ( pOptDlg->Execute() == RET_OK ) + ScSolverOptionsDialog aOptDlg(GetFrameWeld(), maImplNames, maDescriptions, maEngine, maProperties); + if (aOptDlg.run() == RET_OK) { - maEngine = pOptDlg->GetEngine(); - maProperties = pOptDlg->GetProperties(); + maEngine = aOptDlg.GetEngine(); + maProperties = aOptDlg.GetProperties(); } } } diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx b/sc/source/ui/miscdlgs/solveroptions.cxx index 02616a62db8d..eaedf2ab296f 100644 --- a/sc/source/ui/miscdlgs/solveroptions.cxx +++ b/sc/source/ui/miscdlgs/solveroptions.cxx @@ -53,85 +53,33 @@ struct ScSolverOptionsEntry } }; -class ScSolverOptionsString : public SvLBoxString -{ - bool mbIsDouble; - double mfDoubleValue; - sal_Int32 mnIntValue; - -public: - explicit ScSolverOptionsString(const OUString& rStr) - : SvLBoxString(rStr) - , mbIsDouble(false) - , mfDoubleValue(0.0) - , mnIntValue(0) - { - } - - bool IsDouble() const { return mbIsDouble; } - double GetDoubleValue() const { return mfDoubleValue; } - sal_Int32 GetIntValue() const { return mnIntValue; } - - void SetDoubleValue( double fNew ) { mbIsDouble = true; mfDoubleValue = fNew; } - void SetIntValue( sal_Int32 nNew ) { mbIsDouble = false; mnIntValue = nNew; } - - virtual void Paint(const Point& rPos, SvTreeListBox& rDev, vcl::RenderContext& rRenderContext, - const SvViewDataEntry* pView, const SvTreeListEntry& rEntry) override; -}; - -void ScSolverOptionsString::Paint(const Point& rPos, SvTreeListBox& /*rDev*/, vcl::RenderContext& rRenderContext, - const SvViewDataEntry* /*pView*/, const SvTreeListEntry& /*rEntry*/) -{ - //! move position? (SvxLinguTabPage: aPos.X() += 20) - OUString aNormalStr(GetText()); - aNormalStr += ":"; - rRenderContext.DrawText(rPos, aNormalStr); - - Point aNewPos(rPos); - aNewPos.AdjustX(rRenderContext.GetTextWidth(aNormalStr) ); - vcl::Font aOldFont(rRenderContext.GetFont()); - vcl::Font aFont(aOldFont); - aFont.SetWeight(WEIGHT_BOLD); - - OUString sTxt(' '); - if (mbIsDouble) - sTxt += rtl::math::doubleToUString(mfDoubleValue, - rtl_math_StringFormat_Automatic, rtl_math_DecimalPlaces_Max, - ScGlobal::GetpLocaleData()->getNumDecimalSep()[0], true ); - else - sTxt += OUString::number(mnIntValue); - rRenderContext.SetFont(aFont); - rRenderContext.DrawText(aNewPos, sTxt); - - rRenderContext.SetFont(aOldFont); -} - -ScSolverOptionsDialog::ScSolverOptionsDialog( vcl::Window* pParent, +ScSolverOptionsDialog::ScSolverOptionsDialog(weld::Window* pParent, const uno::Sequence<OUString>& rImplNames, const uno::Sequence<OUString>& rDescriptions, const OUString& rEngine, const uno::Sequence<beans::PropertyValue>& rProperties ) - : ModalDialog(pParent, "SolverOptionsDialog", - "modules/scalc/ui/solveroptionsdialog.ui") + : GenericDialogController(pParent, "modules/scalc/ui/solveroptionsdialog.ui", "SolverOptionsDialog") , maImplNames(rImplNames) , maDescriptions(rDescriptions) , maEngine(rEngine) , maProperties(rProperties) + , m_xLbEngine(m_xBuilder->weld_combo_box("engine")) + , m_xLbSettings(m_xBuilder->weld_tree_view("settings")) + , m_xBtnEdit(m_xBuilder->weld_button("edit")) { - get(m_pLbEngine, "engine"); - get(m_pLbSettings, "settings"); - get(m_pBtnEdit, "edit"); + m_xLbSettings->set_size_request(m_xLbSettings->get_approximate_digit_width() * 32, + m_xLbSettings->get_height_rows(6)); - m_pLbEngine->SetSelectHdl( LINK( this, ScSolverOptionsDialog, EngineSelectHdl ) ); + std::vector<int> aWidths; + aWidths.push_back(m_xLbSettings->get_approximate_digit_width() * 3 + 6); + m_xLbSettings->set_column_fixed_widths(aWidths); - m_pBtnEdit->SetClickHdl( LINK( this, ScSolverOptionsDialog, ButtonHdl ) ); + m_xLbEngine->connect_changed( LINK( this, ScSolverOptionsDialog, EngineSelectHdl ) ); - m_pLbSettings->SetStyle( m_pLbSettings->GetStyle()|WB_CLIPCHILDREN ); - m_pLbSettings->SetForceMakeVisible(true); - m_pLbSettings->SetHighlightRange(); + m_xBtnEdit->connect_clicked( LINK( this, ScSolverOptionsDialog, ButtonHdl ) ); - m_pLbSettings->SetSelectHdl( LINK( this, ScSolverOptionsDialog, SettingsSelHdl ) ); - m_pLbSettings->SetDoubleClickHdl( LINK( this, ScSolverOptionsDialog, SettingsDoubleClickHdl ) ); + m_xLbSettings->connect_changed( LINK( this, ScSolverOptionsDialog, SettingsSelHdl ) ); + m_xLbSettings->connect_row_activated( LINK( this, ScSolverOptionsDialog, SettingsDoubleClickHdl ) ); sal_Int32 nSelect = -1; sal_Int32 nImplCount = maImplNames.getLength(); @@ -139,7 +87,7 @@ ScSolverOptionsDialog::ScSolverOptionsDialog( vcl::Window* pParent, { OUString aImplName( maImplNames[nImpl] ); OUString aDescription( maDescriptions[nImpl] ); // user-visible descriptions in list box - m_pLbEngine->InsertEntry( aDescription ); + m_xLbEngine->append_text(aDescription); if ( aImplName == maEngine ) nSelect = nImpl; } @@ -155,7 +103,7 @@ ScSolverOptionsDialog::ScSolverOptionsDialog( vcl::Window* pParent, maProperties.realloc(0); // don't use options from different engine } if ( nSelect >= 0 ) // select in list box - m_pLbEngine->SelectEntryPos( static_cast<sal_uInt16>(nSelect) ); + m_xLbEngine->set_active(nSelect); if ( !maProperties.getLength() ) ReadFromComponent(); // fill maProperties from component (using maEngine) @@ -164,16 +112,6 @@ ScSolverOptionsDialog::ScSolverOptionsDialog( vcl::Window* pParent, ScSolverOptionsDialog::~ScSolverOptionsDialog() { - disposeOnce(); -} - -void ScSolverOptionsDialog::dispose() -{ - m_xCheckButtonData.reset(); - m_pLbEngine.clear(); - m_pLbSettings.clear(); - m_pBtnEdit.clear(); - ModalDialog::dispose(); } const uno::Sequence<beans::PropertyValue>& ScSolverOptionsDialog::GetProperties() @@ -181,31 +119,20 @@ const uno::Sequence<beans::PropertyValue>& ScSolverOptionsDialog::GetProperties( // update maProperties from list box content // order of entries in list box and maProperties is the same sal_Int32 nEntryCount = maProperties.getLength(); - SvTreeList* pModel = m_pLbSettings->GetModel(); - if ( nEntryCount == static_cast<sal_Int32>(pModel->GetEntryCount()) ) + if (nEntryCount == m_xLbSettings->n_children()) { for (sal_Int32 nEntryPos=0; nEntryPos<nEntryCount; ++nEntryPos) { uno::Any& rValue = maProperties[nEntryPos].Value; - SvTreeListEntry* pEntry = pModel->GetEntry(nEntryPos); - - bool bHasData = false; - sal_uInt16 nItemCount = pEntry->ItemCount(); - for (sal_uInt16 nItemPos=0; nItemPos<nItemCount && !bHasData; ++nItemPos) + if (ScSolverOptionsString* pStringItem = reinterpret_cast<ScSolverOptionsString*>(m_xLbSettings->get_id(nEntryPos).toInt64())) { - SvLBoxItem& rItem = pEntry->GetItem( nItemPos ); - ScSolverOptionsString* pStringItem = dynamic_cast<ScSolverOptionsString*>(&rItem); - if ( pStringItem ) - { - if ( pStringItem->IsDouble() ) - rValue <<= pStringItem->GetDoubleValue(); - else - rValue <<= pStringItem->GetIntValue(); - bHasData = true; - } + if (pStringItem->IsDouble()) + rValue <<= pStringItem->GetDoubleValue(); + else + rValue <<= pStringItem->GetIntValue(); } - if ( !bHasData ) - rValue <<= ( m_pLbSettings->GetCheckButtonState( pEntry ) == SvButtonState::Checked ); + else + rValue <<= m_xLbSettings->get_toggle(nEntryPos, 0); } } else @@ -246,14 +173,8 @@ void ScSolverOptionsDialog::FillListBox() // fill the list box - m_pLbSettings->SetUpdateMode(false); - m_pLbSettings->Clear(); - - if (!m_xCheckButtonData) - m_xCheckButtonData.reset(new SvLBoxButtonData(m_pLbSettings)); - - SvTreeList* pModel = m_pLbSettings->GetModel(); - SvTreeListEntry* pEntry = nullptr; + m_xLbSettings->freeze(); + m_xLbSettings->clear(); for (sal_Int32 nPos=0; nPos<nCount; nPos++) { @@ -261,46 +182,52 @@ void ScSolverOptionsDialog::FillListBox() uno::Any aValue = maProperties[nPos].Value; uno::TypeClass eClass = aValue.getValueTypeClass(); + + m_xLbSettings->insert(nullptr, -1, nullptr, nullptr, + nullptr, nullptr, nullptr, false); + if ( eClass == uno::TypeClass_BOOLEAN ) { // check box entry - pEntry = new SvTreeListEntry; - std::unique_ptr<SvLBoxButton> xButton(new SvLBoxButton( - SvLBoxButtonKind::EnabledCheckbox, m_xCheckButtonData.get())); - if ( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ) - xButton->SetStateChecked(); - else - xButton->SetStateUnchecked(); - pEntry->AddItem(std::move(xButton)); - pEntry->AddItem(std::make_unique<SvLBoxContextBmp>(Image(), Image(), false)); - pEntry->AddItem(std::make_unique<SvLBoxString>(aVisName)); + m_xLbSettings->set_toggle(nPos, ScUnoHelpFunctions::GetBoolFromAny(aValue), 0); + m_xLbSettings->set_text(nPos, aVisName, 1); } else { // value entry - pEntry = new SvTreeListEntry; - pEntry->AddItem(std::make_unique<SvLBoxString>("")); // empty column - pEntry->AddItem(std::make_unique<SvLBoxContextBmp>(Image(), Image(), false)); - std::unique_ptr<ScSolverOptionsString> pItem( - new ScSolverOptionsString(aVisName)); - if ( eClass == uno::TypeClass_DOUBLE ) + m_xLbSettings->set_text(nPos, aVisName, 1); + m_aOptions.emplace_back(new ScSolverOptionsString(aVisName)); + if (eClass == uno::TypeClass_DOUBLE) { double fDoubleValue = 0.0; - if ( aValue >>= fDoubleValue ) - pItem->SetDoubleValue( fDoubleValue ); + if (aValue >>= fDoubleValue) + m_aOptions.back()->SetDoubleValue(fDoubleValue); + + OUString sTxt(aVisName); + sTxt += ": "; + sTxt += rtl::math::doubleToUString(fDoubleValue, + rtl_math_StringFormat_Automatic, rtl_math_DecimalPlaces_Max, + ScGlobal::GetpLocaleData()->getNumDecimalSep()[0], true ); + + m_xLbSettings->set_text(nPos, sTxt, 1); } else { sal_Int32 nIntValue = 0; - if ( aValue >>= nIntValue ) - pItem->SetIntValue( nIntValue ); + if (aValue >>= nIntValue) + m_aOptions.back()->SetIntValue(nIntValue); + + OUString sTxt(aVisName); + sTxt += ": "; + sTxt += OUString::number(nIntValue); + + m_xLbSettings->set_text(nPos, sTxt, 1); } - pEntry->AddItem(std::move(pItem)); + m_xLbSettings->set_id(nPos, OUString::number(reinterpret_cast<sal_Int64>(m_aOptions.back().get()))); } - pModel->Insert( pEntry ); } - m_pLbSettings->SetUpdateMode(true); + m_xLbSettings->thaw(); } void ScSolverOptionsDialog::ReadFromComponent() @@ -310,58 +237,63 @@ void ScSolverOptionsDialog::ReadFromComponent() void ScSolverOptionsDialog::EditOption() { - SvTreeListEntry* pEntry = m_pLbSettings->GetCurEntry(); - if (pEntry) + int nEntry = m_xLbSettings->get_selected_index(); + if (nEntry == -1) + return; + ScSolverOptionsString* pStringItem = reinterpret_cast<ScSolverOptionsString*>(m_xLbSettings->get_id(nEntry).toInt64()); + if (!pStringItem) + return; + + if (pStringItem->IsDouble()) { - sal_uInt16 nItemCount = pEntry->ItemCount(); - for (sal_uInt16 nPos=0; nPos<nItemCount; ++nPos) + ScSolverValueDialog aValDialog(m_xDialog.get()); + aValDialog.SetOptionName( pStringItem->GetText() ); + aValDialog.SetValue( pStringItem->GetDoubleValue() ); + if (aValDialog.run() == RET_OK) { - SvLBoxItem& rItem = pEntry->GetItem( nPos ); - ScSolverOptionsString* pStringItem = dynamic_cast<ScSolverOptionsString*>(&rItem); - if ( pStringItem ) - { - if ( pStringItem->IsDouble() ) - { - ScSolverValueDialog aValDialog(GetFrameWeld()); - aValDialog.SetOptionName( pStringItem->GetText() ); - aValDialog.SetValue( pStringItem->GetDoubleValue() ); - if (aValDialog.run() == RET_OK) - { - pStringItem->SetDoubleValue( aValDialog.GetValue() ); - m_pLbSettings->InvalidateEntry( pEntry ); - } - } - else - { - ScSolverIntegerDialog aIntDialog(GetFrameWeld()); - aIntDialog.SetOptionName( pStringItem->GetText() ); - aIntDialog.SetValue( pStringItem->GetIntValue() ); - if (aIntDialog.run() == RET_OK) - { - pStringItem->SetIntValue(aIntDialog.GetValue()); - m_pLbSettings->InvalidateEntry( pEntry ); - } - } - } + pStringItem->SetDoubleValue( aValDialog.GetValue() ); + + OUString sTxt(pStringItem->GetText()); + sTxt += ": "; + sTxt += rtl::math::doubleToUString(pStringItem->GetDoubleValue(), + rtl_math_StringFormat_Automatic, rtl_math_DecimalPlaces_Max, + ScGlobal::GetpLocaleData()->getNumDecimalSep()[0], true ); + + m_xLbSettings->set_text(nEntry, sTxt, 1); + } + } + else + { + ScSolverIntegerDialog aIntDialog(m_xDialog.get()); + aIntDialog.SetOptionName( pStringItem->GetText() ); + aIntDialog.SetValue( pStringItem->GetIntValue() ); + if (aIntDialog.run() == RET_OK) + { + pStringItem->SetIntValue(aIntDialog.GetValue()); + + OUString sTxt(pStringItem->GetText()); + sTxt += ": "; + sTxt += OUString::number(pStringItem->GetIntValue()); + + m_xLbSettings->set_text(nEntry, sTxt, 1); } } } -IMPL_LINK( ScSolverOptionsDialog, ButtonHdl, Button*, pBtn, void ) +IMPL_LINK( ScSolverOptionsDialog, ButtonHdl, weld::Button&, rBtn, void ) { - if (pBtn == m_pBtnEdit) + if (&rBtn == m_xBtnEdit.get()) EditOption(); } -IMPL_LINK_NOARG(ScSolverOptionsDialog, SettingsDoubleClickHdl, SvTreeListBox*, bool) +IMPL_LINK_NOARG(ScSolverOptionsDialog, SettingsDoubleClickHdl, weld::TreeView&, void) { EditOption(); - return false; } -IMPL_LINK_NOARG(ScSolverOptionsDialog, EngineSelectHdl, ListBox&, void) +IMPL_LINK_NOARG(ScSolverOptionsDialog, EngineSelectHdl, weld::ComboBox&, void) { - const sal_Int32 nSelectPos = m_pLbEngine->GetSelectedEntryPos(); + const sal_Int32 nSelectPos = m_xLbEngine->get_active(); if ( nSelectPos < maImplNames.getLength() ) { OUString aNewEngine( maImplNames[nSelectPos] ); @@ -374,19 +306,19 @@ IMPL_LINK_NOARG(ScSolverOptionsDialog, EngineSelectHdl, ListBox&, void) } } -IMPL_LINK_NOARG(ScSolverOptionsDialog, SettingsSelHdl, SvTreeListBox*, void) +IMPL_LINK_NOARG(ScSolverOptionsDialog, SettingsSelHdl, weld::TreeView&, void) { bool bCheckbox = false; - SvTreeListEntry* pEntry = m_pLbSettings->GetCurEntry(); - if (pEntry) + int nEntry = m_xLbSettings->get_selected_index(); + if (nEntry != -1) { - SvLBoxItem* pItem = pEntry->GetFirstItem(SvLBoxItemType::Button); - if (pItem && pItem->GetType() == SvLBoxItemType::Button) + ScSolverOptionsString* pStringItem = reinterpret_cast<ScSolverOptionsString*>(m_xLbSettings->get_id(nEntry).toInt64()); + if (!pStringItem) bCheckbox = true; } - m_pBtnEdit->Enable( !bCheckbox ); + m_xBtnEdit->set_sensitive(!bCheckbox); } ScSolverIntegerDialog::ScSolverIntegerDialog(weld::Window * pParent) diff --git a/sc/uiconfig/scalc/ui/solveroptionsdialog.ui b/sc/uiconfig/scalc/ui/solveroptionsdialog.ui index 472a7224eb91..5388ef012fb6 100644 --- a/sc/uiconfig/scalc/ui/solveroptionsdialog.ui +++ b/sc/uiconfig/scalc/ui/solveroptionsdialog.ui @@ -1,18 +1,90 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.18.3 --> +<!-- Generated with glade 3.22.1 --> <interface domain="sc"> <requires lib="gtk+" version="3.18"/> + <object class="GtkTreeStore" id="liststore1"> + <columns> + <!-- column-name check1 --> + <column type="gboolean"/> + <!-- column-name text --> + <column type="gchararray"/> + <!-- column-name id --> + <column type="gchararray"/> + <!-- column-name checkvis1 --> + <column type="gboolean"/> + </columns> + </object> <object class="GtkDialog" id="SolverOptionsDialog"> <property name="can_focus">False</property> <property name="border_width">6</property> <property name="title" translatable="yes" context="solveroptionsdialog|SolverOptionsDialog">Options</property> <property name="resizable">False</property> <property name="type_hint">dialog</property> + <child> + <placeholder/> + </child> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox1"> <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> + <child> + <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="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + <property name="secondary">True</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">2</property> + </packing> + </child> <child> <object class="GtkGrid" id="grid1"> <property name="visible">True</property> @@ -29,10 +101,10 @@ <object class="GtkLabel" id="label2"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="xalign">0</property> <property name="label" translatable="yes" context="solveroptionsdialog|label2">Solver engine:</property> <property name="use_underline">True</property> <property name="mnemonic_widget">engine</property> + <property name="xalign">0</property> </object> <packing> <property name="left_attach">0</property> @@ -66,10 +138,10 @@ <object class="GtkLabel" id="label1"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="xalign">0</property> <property name="label" translatable="yes" context="solveroptionsdialog|label1">Settings:</property> <property name="use_underline">True</property> - <property name="mnemonic_widget">settings:border</property> + <property name="mnemonic_widget">settings</property> + <property name="xalign">0</property> </object> <packing> <property name="left_attach">0</property> @@ -77,13 +149,53 @@ </packing> </child> <child> - <object class="svxcorelo-SvxCheckListBox" id="settings:border"> + <object class="GtkScrolledWindow"> <property name="visible">True</property> - <property name="can_focus">False</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"/> + <property name="shadow_type">in</property> + <child> + <object class="GtkTreeView" id="settings"> + <property name="width_request">-1</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="model">liststore1</property> + <property name="headers_visible">False</property> + <property name="search_column">1</property> + <property name="show_expanders">False</property> + <child internal-child="selection"> + <object class="GtkTreeSelection" id="Macro Library List-selection2"/> + </child> + <child> + <object class="GtkTreeViewColumn" id="treeviewcolumn1"> + <property name="resizable">True</property> + <property name="spacing">6</property> + <property name="alignment">0.5</property> + <child> + <object class="GtkCellRendererToggle" id="cellrenderer5"/> + <attributes> + <attribute name="visible">3</attribute> + <attribute name="active">0</attribute> + </attributes> + </child> + </object> + </child> + <child> + <object class="GtkTreeViewColumn" id="treeviewcolumn2"> + <property name="spacing">6</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext1"/> + <attributes> + <attribute name="text">1</attribute> + </attributes> + </child> + </object> + </child> + </object> </child> </object> <packing> @@ -118,63 +230,6 @@ <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="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> - <child> - <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="expand">False</property> - <property name="fill">True</property> - <property name="position">2</property> - <property name="secondary">True</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="pack_type">end</property> - <property name="position">2</property> - </packing> - </child> </object> </child> <action-widgets> diff --git a/solenv/sanitizers/ui/cui.suppr b/solenv/sanitizers/ui/cui.suppr index efe88e89d490..2e83d8eed13e 100644 --- a/solenv/sanitizers/ui/cui.suppr +++ b/solenv/sanitizers/ui/cui.suppr @@ -28,7 +28,6 @@ cui/uiconfig/ui/applyautofmtpage.ui://svtlo-SvSimpleTableContainer[@id='list'] n cui/uiconfig/ui/applylocalizedpage.ui://GtkLabel[@id='m'] orphan-label cui/uiconfig/ui/applylocalizedpage.ui://GtkLabel[@id='t'] orphan-label cui/uiconfig/ui/applylocalizedpage.ui://svtlo-SvSimpleTableContainer[@id='list:border'] no-labelled-by -cui/uiconfig/ui/applylocalizedpage.ui://svxcorelo-SvxCheckListBox[@id='checklist:border'] no-labelled-by cui/uiconfig/ui/applylocalizedpage.ui://GtkLabel[@id='singlestartex'] orphan-label cui/uiconfig/ui/applylocalizedpage.ui://GtkLabel[@id='singleendex'] orphan-label cui/uiconfig/ui/applylocalizedpage.ui://GtkLabel[@id='doublestartex'] orphan-label |