summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-04-12 11:47:05 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-04-12 14:54:00 +0200
commit73e7db91ba006dc9333767de18df2c5057376183 (patch)
tree6ccb5d3a8059f2f3b0c7f83291d3bd92da8b7806
parentdd5fbb68ebaa8b8be8b6a4a97a8aedbf22d5714f (diff)
weld ScSolverDlg
Change-Id: I35fa2f63eb47f18289892ffcf042d041752bfbd7 Reviewed-on: https://gerrit.libreoffice.org/70653 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sc/source/ui/inc/reffact.hxx2
-rw-r--r--sc/source/ui/inc/solvrdlg.hxx53
-rw-r--r--sc/source/ui/miscdlgs/solvrdlg.cxx191
-rw-r--r--sc/source/ui/view/reffact.cxx4
-rw-r--r--sc/source/ui/view/tabvwshc.cxx19
-rw-r--r--sc/uiconfig/scalc/ui/goalseekdlg.ui38
-rw-r--r--solenv/sanitizers/ui/modules/scalc.suppr2
7 files changed, 165 insertions, 144 deletions
diff --git a/sc/source/ui/inc/reffact.hxx b/sc/source/ui/inc/reffact.hxx
index ce462942f5de..8fa24b6f4fe2 100644
--- a/sc/source/ui/inc/reffact.hxx
+++ b/sc/source/ui/inc/reffact.hxx
@@ -46,7 +46,7 @@
DECL_WRAPPER_WITHID_CONTROLLER(ScNameDlgWrapper)
DECL_WRAPPER_WITHID_CONTROLLER(ScNameDefDlgWrapper)
-DECL_WRAPPER_WITHID(ScSolverDlgWrapper)
+DECL_WRAPPER_WITHID_CONTROLLER(ScSolverDlgWrapper)
DECL_WRAPPER_WITHID(ScOptSolverDlgWrapper)
DECL_WRAPPER_WITHID(ScXMLSourceDlgWrapper)
DECL_WRAPPER_WITHID(ScPivotLayoutWrapper)
diff --git a/sc/source/ui/inc/solvrdlg.hxx b/sc/source/ui/inc/solvrdlg.hxx
index 29883c0a2ccc..173ced735a6a 100644
--- a/sc/source/ui/inc/solvrdlg.hxx
+++ b/sc/source/ui/inc/solvrdlg.hxx
@@ -33,54 +33,59 @@ enum ScSolverErr
SOLVERR_INVALID_TARGETVALUE
};
-class ScSolverDlg : public ScAnyRefDlg
+class ScSolverDlg : public ScAnyRefDlgController
{
public:
- ScSolverDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent,
- ScDocument* pDocument,
- const ScAddress& aCursorPos );
- virtual ~ScSolverDlg() override;
- virtual void dispose() override;
+ ScSolverDlg( SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParent,
+ ScDocument* pDocument,
+ const ScAddress& aCursorPos );
+ virtual ~ScSolverDlg() override;
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) override;
virtual bool IsRefInputMode() const override;
virtual void SetActive() override;
- virtual bool Close() override;
+ virtual void Close() override;
private:
- VclPtr<FixedText> m_pFtFormulaCell;
- VclPtr<formula::RefEdit> m_pEdFormulaCell;
- VclPtr<formula::RefButton> m_pRBFormulaCell;
-
- VclPtr<Edit> m_pEdTargetVal;
-
- VclPtr<FixedText> m_pFtVariableCell;
- VclPtr<formula::RefEdit> m_pEdVariableCell;
- VclPtr<formula::RefButton> m_pRBVariableCell;
-
- VclPtr<OKButton> m_pBtnOk;
- VclPtr<CancelButton> m_pBtnCancel;
-
ScAddress theFormulaCell;
ScAddress theVariableCell;
OUString theTargetValStr;
ScDocument* pDoc;
const SCTAB nCurTab;
- VclPtr<formula::RefEdit> pEdActive;
bool bDlgLostFocus;
const OUString errMsgInvalidVar;
const OUString errMsgInvalidForm;
const OUString errMsgNoFormula;
const OUString errMsgInvalidVal;
+ formula::WeldRefEdit* m_pEdActive;
+
+ std::unique_ptr<weld::Label> m_xFtFormulaCell;
+ std::unique_ptr<formula::WeldRefEdit> m_xEdFormulaCell;
+ std::unique_ptr<formula::WeldRefButton> m_xRBFormulaCell;
+
+ std::unique_ptr<weld::Entry> m_xEdTargetVal;
+
+ std::unique_ptr<weld::Label> m_xFtVariableCell;
+ std::unique_ptr<formula::WeldRefEdit> m_xEdVariableCell;
+ std::unique_ptr<formula::WeldRefButton> m_xRBVariableCell;
+
+ std::unique_ptr<weld::Button> m_xBtnOk;
+ std::unique_ptr<weld::Button> m_xBtnCancel;
+
void Init();
bool CheckTargetValue( const OUString& rStrVal );
void RaiseError( ScSolverErr eError );
- DECL_LINK( BtnHdl, Button*, void );
- DECL_LINK( GetFocusHdl, Control&, void );
- DECL_LINK( LoseFocusHdl, Control&, void );
+ DECL_LINK( BtnHdl, weld::Button&, void );
+ DECL_LINK( GetEditFocusHdl, formula::WeldRefEdit&, void );
+ DECL_LINK( LoseEditFocusHdl, formula::WeldRefEdit&, void );
+
+ DECL_LINK( GetButtonFocusHdl, formula::WeldRefButton&, void );
+ DECL_LINK( LoseButtonFocusHdl, formula::WeldRefButton&, void );
+
+ DECL_LINK( GetFocusHdl, weld::Widget&, void );
};
#endif // INCLUDED_SC_SOURCE_UI_INC_SOLVRDLG_HXX
diff --git a/sc/source/ui/miscdlgs/solvrdlg.cxx b/sc/source/ui/miscdlgs/solvrdlg.cxx
index 6bc2fff92818..55cfb6626dc0 100644
--- a/sc/source/ui/miscdlgs/solvrdlg.cxx
+++ b/sc/source/ui/miscdlgs/solvrdlg.cxx
@@ -42,86 +42,75 @@ namespace
}
}
-ScSolverDlg::ScSolverDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent,
+ScSolverDlg::ScSolverDlg( SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParent,
ScDocument* pDocument,
const ScAddress& aCursorPos )
- : ScAnyRefDlg(pB, pCW, pParent, "GoalSeekDialog", "modules/scalc/ui/goalseekdlg.ui")
+ : ScAnyRefDlgController(pB, pCW, pParent, "modules/scalc/ui/goalseekdlg.ui", "GoalSeekDialog")
, theFormulaCell(aCursorPos)
, theVariableCell(aCursorPos)
, pDoc(pDocument)
, nCurTab(aCursorPos.Tab())
- , pEdActive(nullptr)
, bDlgLostFocus(false)
, errMsgInvalidVar(ScResId(STR_INVALIDVAR))
, errMsgInvalidForm(ScResId(STR_INVALIDFORM))
, errMsgNoFormula(ScResId(STR_NOFORMULA))
, errMsgInvalidVal(ScResId(STR_INVALIDVAL))
+ , m_pEdActive(nullptr)
+ , m_xFtFormulaCell(m_xBuilder->weld_label("formulatext"))
+ , m_xEdFormulaCell(new formula::WeldRefEdit(m_xBuilder->weld_entry("formulaedit")))
+ , m_xRBFormulaCell(new formula::WeldRefButton(m_xBuilder->weld_button("formulabutton")))
+ , m_xEdTargetVal(m_xBuilder->weld_entry("target"))
+ , m_xFtVariableCell(m_xBuilder->weld_label("vartext"))
+ , m_xEdVariableCell(new formula::WeldRefEdit(m_xBuilder->weld_entry("varedit")))
+ , m_xRBVariableCell(new formula::WeldRefButton(m_xBuilder->weld_button("varbutton")))
+ , m_xBtnOk(m_xBuilder->weld_button("ok"))
+ , m_xBtnCancel(m_xBuilder->weld_button("cancel"))
{
- get(m_pFtFormulaCell, "formulatext");
- get(m_pEdFormulaCell, "formulaedit");
- m_pEdFormulaCell->SetReferences(this, m_pFtFormulaCell);
- get(m_pRBFormulaCell, "formulabutton");
- m_pRBFormulaCell->SetReferences(this, m_pEdFormulaCell);
- get(m_pEdTargetVal, "target");
- get(m_pFtVariableCell, "vartext");
- get(m_pEdVariableCell, "varedit");
- m_pEdVariableCell->SetReferences(this, m_pFtVariableCell);
- get(m_pRBVariableCell, "varbutton");
- m_pRBVariableCell->SetReferences(this, m_pEdVariableCell);
- get(m_pBtnOk, "ok");
- get(m_pBtnCancel, "cancel");
+ m_xEdFormulaCell->SetReferences(this, m_xFtFormulaCell.get());
+ m_xRBFormulaCell->SetReferences(this, m_xEdFormulaCell.get());
+ m_xEdVariableCell->SetReferences(this, m_xFtVariableCell.get());
+ m_xRBVariableCell->SetReferences(this, m_xEdVariableCell.get());
Init();
}
ScSolverDlg::~ScSolverDlg()
{
- disposeOnce();
-}
-
-void ScSolverDlg::dispose()
-{
- m_pFtFormulaCell.clear();
- m_pEdFormulaCell.clear();
- m_pRBFormulaCell.clear();
- m_pEdTargetVal.clear();
- m_pFtVariableCell.clear();
- m_pEdVariableCell.clear();
- m_pRBVariableCell.clear();
- m_pBtnOk.clear();
- m_pBtnCancel.clear();
- pEdActive.clear();
- ScAnyRefDlg::dispose();
}
void ScSolverDlg::Init()
{
- m_pBtnOk->SetClickHdl( LINK( this, ScSolverDlg, BtnHdl ) );
- m_pBtnCancel->SetClickHdl( LINK( this, ScSolverDlg, BtnHdl ) );
-
- Link<Control&,void> aLink = LINK( this, ScSolverDlg, GetFocusHdl );
- m_pEdFormulaCell->SetGetFocusHdl( aLink );
- m_pRBFormulaCell->SetGetFocusHdl( aLink );
- m_pEdVariableCell->SetGetFocusHdl( aLink );
- m_pRBVariableCell->SetGetFocusHdl( aLink );
- m_pEdTargetVal->SetGetFocusHdl( aLink );
-
- aLink = LINK( this, ScSolverDlg, LoseFocusHdl );
- m_pEdFormulaCell->SetLoseFocusHdl ( aLink );
- m_pRBFormulaCell->SetLoseFocusHdl ( aLink );
- m_pEdVariableCell->SetLoseFocusHdl ( aLink );
- m_pRBVariableCell->SetLoseFocusHdl ( aLink );
+ m_xBtnOk->connect_clicked( LINK( this, ScSolverDlg, BtnHdl ) );
+ m_xBtnCancel->connect_clicked( LINK( this, ScSolverDlg, BtnHdl ) );
+
+ Link<formula::WeldRefEdit&,void> aEditLink = LINK( this, ScSolverDlg, GetEditFocusHdl );
+ m_xEdFormulaCell->SetGetFocusHdl( aEditLink );
+ m_xEdVariableCell->SetGetFocusHdl( aEditLink );
+
+ Link<formula::WeldRefButton&,void> aButtonLink = LINK( this, ScSolverDlg, GetButtonFocusHdl );
+ m_xRBFormulaCell->SetGetFocusHdl( aButtonLink );
+ m_xRBVariableCell->SetGetFocusHdl( aButtonLink );
+
+ m_xEdTargetVal->connect_focus_in(LINK(this, ScSolverDlg, GetFocusHdl));
+
+ aEditLink = LINK( this, ScSolverDlg, LoseEditFocusHdl );
+ m_xEdFormulaCell->SetLoseFocusHdl ( aEditLink );
+ m_xEdVariableCell->SetLoseFocusHdl ( aEditLink );
+
+ aButtonLink = LINK( this, ScSolverDlg, LoseButtonFocusHdl );
+ m_xRBFormulaCell->SetLoseFocusHdl ( aButtonLink );
+ m_xRBVariableCell->SetLoseFocusHdl ( aButtonLink );
OUString aStr(theFormulaCell.Format(ScRefFlags::ADDR_ABS, nullptr, pDoc->GetAddressConvention()));
- m_pEdFormulaCell->SetText( aStr );
- m_pEdFormulaCell->GrabFocus();
- pEdActive = m_pEdFormulaCell;
+ m_xEdFormulaCell->SetText( aStr );
+ m_xEdFormulaCell->GrabFocus();
+ m_pEdActive = m_xEdFormulaCell.get();
}
-bool ScSolverDlg::Close()
+void ScSolverDlg::Close()
{
- return DoClose( ScSolverDlgWrapper::GetChildWindowId() );
+ DoClose( ScSolverDlgWrapper::GetChildWindowId() );
}
void ScSolverDlg::SetActive()
@@ -129,22 +118,22 @@ void ScSolverDlg::SetActive()
if ( bDlgLostFocus )
{
bDlgLostFocus = false;
- if( pEdActive )
- pEdActive->GrabFocus();
+ if( m_pEdActive )
+ m_pEdActive->GrabFocus();
}
else
{
- GrabFocus();
+ m_xDialog->grab_focus();
}
RefInputDone();
}
void ScSolverDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
{
- if( pEdActive )
+ if( m_pEdActive )
{
if ( rRef.aStart != rRef.aEnd )
- RefInputStart(pEdActive);
+ RefInputStart(m_pEdActive);
ScAddress aAdr = rRef.aStart;
ScRefFlags nFmt = ( aAdr.Tab() == nCurTab )
@@ -152,11 +141,11 @@ void ScSolverDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
: ScRefFlags::ADDR_ABS_3D;
OUString aStr(aAdr.Format(nFmt, pDocP, pDocP->GetAddressConvention()));
- pEdActive->SetRefString( aStr );
+ m_pEdActive->SetRefString( aStr );
- if ( pEdActive == m_pEdFormulaCell )
+ if (m_pEdActive == m_xEdFormulaCell.get())
theFormulaCell = aAdr;
- else if ( pEdActive == m_pEdVariableCell )
+ else if (m_pEdActive == m_xEdVariableCell.get())
theVariableCell = aAdr;
}
}
@@ -166,30 +155,30 @@ void ScSolverDlg::RaiseError( ScSolverErr eError )
switch ( eError )
{
case SOLVERR_NOFORMULA:
- lclErrorDialog(GetFrameWeld(), errMsgNoFormula,
+ lclErrorDialog(m_xDialog.get(), errMsgNoFormula,
[this](sal_Int32 /*nResult*/) {
- m_pEdFormulaCell->GrabFocus();
+ m_xEdFormulaCell->GrabFocus();
});
break;
case SOLVERR_INVALID_FORMULA:
- lclErrorDialog(GetFrameWeld(), errMsgInvalidForm,
+ lclErrorDialog(m_xDialog.get(), errMsgInvalidForm,
[this](sal_Int32 /*nResult*/) {
- m_pEdFormulaCell->GrabFocus();
+ m_xEdFormulaCell->GrabFocus();
});
break;
case SOLVERR_INVALID_VARIABLE:
- lclErrorDialog(GetFrameWeld(), errMsgInvalidVar,
+ lclErrorDialog(m_xDialog.get(), errMsgInvalidVar,
[this](sal_Int32 /*nResult*/) {
- m_pEdVariableCell->GrabFocus();
+ m_xEdVariableCell->GrabFocus();
});
break;
case SOLVERR_INVALID_TARGETVALUE:
- lclErrorDialog(GetFrameWeld(), errMsgInvalidVal,
+ lclErrorDialog(m_xDialog.get(), errMsgInvalidVal,
[this](sal_Int32 /*nResult*/) {
- m_pEdTargetVal->GrabFocus();
+ m_xEdTargetVal->grab_focus();
});
break;
}
@@ -197,7 +186,7 @@ void ScSolverDlg::RaiseError( ScSolverErr eError )
bool ScSolverDlg::IsRefInputMode() const
{
- return pEdActive != nullptr;
+ return m_pEdActive != nullptr;
}
bool ScSolverDlg::CheckTargetValue( const OUString& rStrVal )
@@ -210,11 +199,11 @@ bool ScSolverDlg::CheckTargetValue( const OUString& rStrVal )
// Handler:
-IMPL_LINK( ScSolverDlg, BtnHdl, Button*, pBtn, void )
+IMPL_LINK(ScSolverDlg, BtnHdl, weld::Button&, rBtn, void)
{
- if (pBtn == m_pBtnOk)
+ if (&rBtn == m_xBtnOk.get())
{
- theTargetValStr = m_pEdTargetVal->GetText();
+ theTargetValStr = m_xEdTargetVal->get_text();
// The following code checks:
// 1. do the strings contain correct references / defined names?
@@ -222,8 +211,8 @@ IMPL_LINK( ScSolverDlg, BtnHdl, Button*, pBtn, void )
// 3. has a valid target value been entered?
const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
- ScRefFlags nRes1 = theFormulaCell .Parse( m_pEdFormulaCell->GetText(), pDoc, eConv );
- ScRefFlags nRes2 = theVariableCell.Parse( m_pEdVariableCell->GetText(), pDoc, eConv );
+ ScRefFlags nRes1 = theFormulaCell .Parse( m_xEdFormulaCell->GetText(), pDoc, eConv );
+ ScRefFlags nRes2 = theVariableCell.Parse( m_xEdVariableCell->GetText(), pDoc, eConv );
if ( (nRes1 & ScRefFlags::VALID) == ScRefFlags::VALID )
{
@@ -250,7 +239,7 @@ IMPL_LINK( ScSolverDlg, BtnHdl, Button*, pBtn, void )
GetBindings().GetDispatcher()->ExecuteList(SID_SOLVE,
SfxCallMode::SLOT | SfxCallMode::RECORD,
{ &aOutItem });
- Close();
+ response(RET_OK);
}
else RaiseError( SOLVERR_NOFORMULA );
}
@@ -260,31 +249,49 @@ IMPL_LINK( ScSolverDlg, BtnHdl, Button*, pBtn, void )
}
else RaiseError( SOLVERR_INVALID_FORMULA );
}
- else if (pBtn == m_pBtnCancel)
+ else if (&rBtn == m_xBtnCancel.get())
{
- Close();
+ response(RET_CANCEL);
}
}
-IMPL_LINK( ScSolverDlg, GetFocusHdl, Control&, rCtrl, void )
+IMPL_LINK(ScSolverDlg, GetEditFocusHdl, formula::WeldRefEdit&, rCtrl, void)
+{
+ if (&rCtrl == m_xEdFormulaCell.get())
+ m_pEdActive = m_xEdFormulaCell.get();
+ else if (&rCtrl == m_xEdVariableCell.get())
+ m_pEdActive = m_xEdVariableCell.get();
+
+ if (m_pEdActive)
+ m_pEdActive->SelectAll();
+}
+
+IMPL_LINK_NOARG(ScSolverDlg, GetFocusHdl, weld::Widget&, void)
+{
+ m_pEdActive = nullptr;
+ m_xEdTargetVal->select_region(0, -1);
+}
+
+IMPL_LINK(ScSolverDlg, GetButtonFocusHdl, formula::WeldRefButton&, rCtrl, void)
{
- Edit* pEdit = nullptr;
- pEdActive = nullptr;
-
- if( (&rCtrl == static_cast<Control*>(m_pEdFormulaCell)) || (&rCtrl == static_cast<Control*>(m_pRBFormulaCell)) )
- pEdit = pEdActive = m_pEdFormulaCell;
- else if( (&rCtrl == static_cast<Control*>(m_pEdVariableCell)) || (&rCtrl == static_cast<Control*>(m_pRBVariableCell)) )
- pEdit = pEdActive = m_pEdVariableCell;
- else if( &rCtrl == static_cast<Control*>(m_pEdTargetVal) )
- pEdit = m_pEdTargetVal;
-
- if( pEdit )
- pEdit->SetSelection( Selection( 0, SELECTION_MAX ) );
+ if (&rCtrl == m_xRBFormulaCell.get())
+ m_pEdActive = m_xEdFormulaCell.get();
+ else if (&rCtrl == m_xRBVariableCell.get())
+ m_pEdActive = m_xEdVariableCell.get();
+
+ if (m_pEdActive)
+ m_pEdActive->SelectAll();
}
-IMPL_LINK_NOARG(ScSolverDlg, LoseFocusHdl, Control&, void)
+IMPL_LINK_NOARG(ScSolverDlg, LoseEditFocusHdl, formula::WeldRefEdit&, void)
{
- bDlgLostFocus = !IsActive();
+ bDlgLostFocus = !m_xDialog->has_toplevel_focus();
}
+IMPL_LINK_NOARG(ScSolverDlg, LoseButtonFocusHdl, formula::WeldRefButton&, void)
+{
+ bDlgLostFocus = !m_xDialog->has_toplevel_focus();
+}
+
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/reffact.cxx b/sc/source/ui/view/reffact.cxx
index 1337c719a589..24461740e766 100644
--- a/sc/source/ui/view/reffact.cxx
+++ b/sc/source/ui/view/reffact.cxx
@@ -34,7 +34,7 @@
SFX_IMPL_CHILDWINDOW_WITHID(ScNameDlgWrapper, FID_DEFINE_NAME)
SFX_IMPL_CHILDWINDOW_WITHID(ScNameDefDlgWrapper, FID_ADD_NAME )
-SFX_IMPL_MODELESSDIALOG_WITHID(ScSolverDlgWrapper, SID_OPENDLG_SOLVE )
+SFX_IMPL_CHILDWINDOW_WITHID(ScSolverDlgWrapper, SID_OPENDLG_SOLVE )
SFX_IMPL_MODELESSDIALOG_WITHID(ScOptSolverDlgWrapper, SID_OPENDLG_OPTSOLVER )
SFX_IMPL_MODELESSDIALOG_WITHID(ScXMLSourceDlgWrapper, SID_MANAGE_XML_SOURCE)
SFX_IMPL_MODELESSDIALOG_WITHID(ScPivotLayoutWrapper, SID_OPENDLG_PIVOTTABLE )
@@ -125,7 +125,7 @@ IMPL_CONTROLLER_CHILD_CTOR( ScNameDlgWrapper, FID_DEFINE_NAME )
IMPL_CONTROLLER_CHILD_CTOR( ScNameDefDlgWrapper, FID_ADD_NAME )
-IMPL_CHILD_CTOR( ScSolverDlgWrapper, SID_OPENDLG_SOLVE )
+IMPL_CONTROLLER_CHILD_CTOR( ScSolverDlgWrapper, SID_OPENDLG_SOLVE )
IMPL_CHILD_CTOR( ScOptSolverDlgWrapper, SID_OPENDLG_OPTSOLVER )
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index 71181450a3d0..147794aed117 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -249,16 +249,6 @@ VclPtr<SfxModelessDialog> ScTabViewShell::CreateRefDialog(
}
break;
- case SID_OPENDLG_SOLVE:
- {
- ScViewData& rViewData = GetViewData();
- ScAddress aCurPos( rViewData.GetCurX(),
- rViewData.GetCurY(),
- rViewData.GetTabNo());
- pResult = VclPtr<ScSolverDlg>::Create( pB, pCW, pParent, rViewData.GetDocument(), aCurPos );
- }
- break;
-
case SID_OPENDLG_OPTSOLVER:
{
ScViewData& rViewData = GetViewData();
@@ -489,6 +479,15 @@ std::unique_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogCont
case SID_DEFINE_COLROWNAMERANGES:
xResult.reset(new ScColRowNameRangesDlg(pB, pCW, pParent, &GetViewData()));
break;
+ case SID_OPENDLG_SOLVE:
+ {
+ ScViewData& rViewData = GetViewData();
+ ScAddress aCurPos( rViewData.GetCurX(),
+ rViewData.GetCurY(),
+ rViewData.GetTabNo());
+ xResult.reset(new ScSolverDlg(pB, pCW, pParent, rViewData.GetDocument(), aCurPos));
+ break;
+ }
}
if (xResult)
diff --git a/sc/uiconfig/scalc/ui/goalseekdlg.ui b/sc/uiconfig/scalc/ui/goalseekdlg.ui
index a4eff6a98e54..9e88b195c305 100644
--- a/sc/uiconfig/scalc/ui/goalseekdlg.ui
+++ b/sc/uiconfig/scalc/ui/goalseekdlg.ui
@@ -1,29 +1,31 @@
<?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"/>
- <requires lib="LibreOffice" version="1.0"/>
<object class="GtkDialog" id="GoalSeekDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes" context="goalseekdlg|GoalSeekDialog">Goal Seek</property>
+ <property name="default_width">-1</property>
+ <property name="default_height">-1</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="orientation">vertical</property>
- <property name="layout_style">start</property>
+ <property name="layout_style">end</property>
<child>
- <object class="GtkButton" id="ok">
- <property name="label">gtk-ok</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="can_default">True</property>
- <property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
@@ -34,10 +36,12 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="cancel">
- <property name="label">gtk-cancel</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>
@@ -59,6 +63,7 @@
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
+ <property name="secondary">True</property>
</packing>
</child>
</object>
@@ -136,11 +141,12 @@
<property name="hexpand">True</property>
<property name="spacing">6</property>
<child>
- <object class="foruilo-RefEdit" id="formulaedit">
+ <object class="GtkEntry" id="formulaedit">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="valign">center</property>
<property name="hexpand">True</property>
+ <property name="activates_default">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -149,7 +155,7 @@
</packing>
</child>
<child>
- <object class="foruilo-RefButton" id="formulabutton">
+ <object class="GtkButton" id="formulabutton">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
@@ -172,6 +178,7 @@
<property name="can_focus">True</property>
<property name="valign">center</property>
<property name="hexpand">True</property>
+ <property name="activates_default">True</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -185,11 +192,12 @@
<property name="hexpand">True</property>
<property name="spacing">6</property>
<child>
- <object class="foruilo-RefEdit" id="varedit">
+ <object class="GtkEntry" id="varedit">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="valign">center</property>
<property name="hexpand">True</property>
+ <property name="activates_default">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -198,7 +206,7 @@
</packing>
</child>
<child>
- <object class="foruilo-RefButton" id="varbutton">
+ <object class="GtkButton" id="varbutton">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
@@ -239,8 +247,8 @@
</object>
</child>
<action-widgets>
- <action-widget response="-5">ok</action-widget>
<action-widget response="-6">cancel</action-widget>
+ <action-widget response="-5">ok</action-widget>
<action-widget response="-11">help</action-widget>
</action-widgets>
</object>
diff --git a/solenv/sanitizers/ui/modules/scalc.suppr b/solenv/sanitizers/ui/modules/scalc.suppr
index 18d4c20f2231..501da89c964c 100644
--- a/solenv/sanitizers/ui/modules/scalc.suppr
+++ b/solenv/sanitizers/ui/modules/scalc.suppr
@@ -92,6 +92,8 @@ sc/uiconfig/scalc/ui/fourieranalysisdialog.ui://GtkButton[@id='output-range-butt
sc/uiconfig/scalc/ui/functionpanel.ui://GtkComboBoxText[@id='category'] no-labelled-by
sc/uiconfig/scalc/ui/functionpanel.ui://GtkTreeView[@id='funclist:border'] no-labelled-by
sc/uiconfig/scalc/ui/functionpanel.ui://GtkLabel[@id='funcdesc:border'] orphan-label
+sc/uiconfig/scalc/ui/goalseekdlg.ui://GtkButton[@id='formulabutton'] button-no-label
+sc/uiconfig/scalc/ui/goalseekdlg.ui://GtkButton[@id='varbutton'] button-no-label
sc/uiconfig/scalc/ui/groupbydate.ui://GtkMenuButton[@id='start_date'] button-no-label
sc/uiconfig/scalc/ui/groupbydate.ui://GtkMenuButton[@id='end_date'] button-no-label
sc/uiconfig/scalc/ui/groupbynumber.ui://GtkEntry[@id='edit_by'] no-labelled-by