Kaydet (Commit) d56ee733 authored tarafından Caolán McNamara's avatar Caolán McNamara

remove unused RefEdit/RefButton

and rename WeldRefEdit/WeldRefButton back

Change-Id: I3aab8585d4ba1017cc755bf21e827522e7ee6980
Reviewed-on: https://gerrit.libreoffice.org/71957
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst d6a43b40
......@@ -28,7 +28,7 @@ class ParaWin;
// class ArgEdit
class ArgEdit : public WeldRefEdit
class ArgEdit : public RefEdit
{
public:
ArgEdit(std::unique_ptr<weld::Entry> xControl);
......@@ -62,12 +62,12 @@ private:
weld::Label*pFtArg;
weld::Button* pBtnFx;
ArgEdit* pEdArg;
WeldRefButton* pRefBtn;
RefButton* pRefBtn;
DECL_LINK( FxBtnClickHdl, weld::Button&, void );
DECL_LINK( FxBtnFocusHdl, weld::Widget&, void );
DECL_LINK( EdFocusHdl, WeldRefEdit&, void );
DECL_LINK( EdModifyHdl, WeldRefEdit&, void );
DECL_LINK( EdFocusHdl, RefEdit&, void );
DECL_LINK( EdModifyHdl, RefEdit&, void );
public:
......@@ -76,7 +76,7 @@ public:
void InitArgInput(weld::Label* pftArg,
weld::Button* pbtnFx,
ArgEdit* pedArg,
WeldRefButton* prefBtn);
RefButton* prefBtn);
void SetArgName(const OUString &aArg);
OUString GetArgName();
......
......@@ -72,10 +72,8 @@ using namespace ::com::sun::star;
class FormulaDlg_Impl
{
public:
static ::std::pair<RefButton*, RefEdit*>
::std::pair<RefButton*, RefEdit*>
RefInputStartBefore( RefEdit* pEdit, RefButton* pButton );
::std::pair<WeldRefButton*, WeldRefEdit*>
RefInputStartBefore( WeldRefEdit* pEdit, WeldRefButton* pButton );
void RefInputStartAfter();
void RefInputDoneAfter( bool bForced );
bool CalcValue( const OUString& rStrExp, OUString& rStrResult, bool bForceMatrixFormula = false );
......@@ -118,7 +116,7 @@ public:
void SetData( sal_Int32 nFStart, sal_Int32 nNextFStart, sal_Int32 nNextFEnd, sal_Int32& PrivStart, sal_Int32& PrivEnd);
WeldRefEdit* GetCurrRefEdit();
RefEdit* GetCurrRefEdit();
const FormulaHelper& GetFormulaHelper() const { return m_aFormulaHelper;}
void InitFormulaOpCodeMapper();
......@@ -173,8 +171,8 @@ public:
int m_nSelectionStart;
int m_nSelectionEnd;
WeldRefEdit* m_pTheRefEdit;
WeldRefButton* m_pTheRefButton;
RefEdit* m_pTheRefEdit;
RefButton* m_pTheRefButton;
std::unique_ptr<weld::Notebook> m_xTabCtrl;
std::unique_ptr<weld::Container> m_xParaWinBox;
......@@ -201,8 +199,8 @@ public:
std::unique_ptr<weld::Label> m_xFtFormResult;
std::unique_ptr<weld::Entry> m_xWndFormResult;
std::unique_ptr<WeldRefEdit> m_xEdRef;
std::unique_ptr<WeldRefButton> m_xRefBtn;
std::unique_ptr<RefEdit> m_xEdRef;
std::unique_ptr<RefButton> m_xRefBtn;
std::unique_ptr<FuncPage> m_xFuncPage;
std::unique_ptr<StructPage> m_xStructPage;
......@@ -258,8 +256,8 @@ FormulaDlg_Impl::FormulaDlg_Impl(weld::Dialog& rDialog,
, m_xBtnEnd(rBuilder.weld_button("ok"))
, m_xFtFormResult(rBuilder.weld_label("label1"))
, m_xWndFormResult(rBuilder.weld_entry("formula_result"))
, m_xEdRef(new WeldRefEdit(rBuilder.weld_entry("ED_REF")))
, m_xRefBtn(new WeldRefButton(rBuilder.weld_button("RB_REF")))
, m_xEdRef(new RefEdit(rBuilder.weld_entry("ED_REF")))
, m_xRefBtn(new RefButton(rBuilder.weld_button("RB_REF")))
{
//Space for two lines of text
m_xFtHeadLine->set_label("X\nX\n");
......@@ -1506,7 +1504,7 @@ void FormulaDlg_Impl::UpdateSelection()
UpdateOldSel();
}
::std::pair<WeldRefButton*, WeldRefEdit*> FormulaDlg_Impl::RefInputStartBefore(WeldRefEdit* pEdit, WeldRefButton* pButton)
::std::pair<RefButton*, RefEdit*> FormulaDlg_Impl::RefInputStartBefore(RefEdit* pEdit, RefButton* pButton)
{
m_pTheRefEdit = pEdit;
m_pTheRefButton = pButton;
......@@ -1533,21 +1531,12 @@ void FormulaDlg_Impl::UpdateSelection()
m_xRefBtn->GetWidget()->set_visible(pButton != nullptr);
::std::pair<WeldRefButton*, WeldRefEdit*> aPair;
::std::pair<RefButton*, RefEdit*> aPair;
aPair.first = pButton ? m_xRefBtn.get() : nullptr;
aPair.second = m_xEdRef.get();
return aPair;
}
::std::pair<RefButton*, RefEdit*> FormulaDlg_Impl::RefInputStartBefore( RefEdit* pEdit, RefButton* pButton )
{
assert(!pEdit && !pButton);
::std::pair<RefButton*, RefEdit*> aPair;
aPair.first = pButton;
aPair.second = pEdit;
return aPair;
}
void FormulaDlg_Impl::RefInputStartAfter()
{
m_xRefBtn->SetEndImage();
......@@ -1591,7 +1580,7 @@ void FormulaDlg_Impl::RefInputDoneAfter( bool bForced )
}
}
WeldRefEdit* FormulaDlg_Impl::GetCurrRefEdit()
RefEdit* FormulaDlg_Impl::GetCurrRefEdit()
{
return m_xEdRef->GetWidget()->get_visible() ? m_xEdRef.get() : m_xParaWin->GetActiveEdit();
}
......@@ -1725,7 +1714,7 @@ void FormulaDlg_Impl::UpdateParaWin( const Selection& _rSelection, const OUStrin
m_xParaWin->SetArgument( nPrivActiv, m_xEdRef->GetText());
m_xParaWin->UpdateParas();
WeldRefEdit* pEd = GetCurrRefEdit();
RefEdit* pEd = GetCurrRefEdit();
if (pEd)
pEd->SetSelection( theSel );
}
......@@ -1733,7 +1722,7 @@ void FormulaDlg_Impl::UpdateParaWin( const Selection& _rSelection, const OUStrin
bool FormulaDlg_Impl::UpdateParaWin(Selection& _rSelection)
{
OUString aStrEd;
WeldRefEdit* pEd = GetCurrRefEdit();
RefEdit* pEd = GetCurrRefEdit();
if (pEd && !m_pTheRefEdit)
{
_rSelection = pEd->GetSelection();
......@@ -1753,7 +1742,7 @@ bool FormulaDlg_Impl::UpdateParaWin(Selection& _rSelection)
void FormulaDlg_Impl::SetEdSelection()
{
WeldRefEdit* pEd = GetCurrRefEdit()/*aScParaWin.GetActiveEdit()*/;
RefEdit* pEd = GetCurrRefEdit()/*aScParaWin.GetActiveEdit()*/;
if (pEd)
{
Selection theSel = m_xEdRef->GetSelection();
......@@ -1798,14 +1787,9 @@ void FormulaModalDialog::Update()
m_pImpl->Update();
}
::std::pair<WeldRefButton*, WeldRefEdit*> FormulaModalDialog::RefInputStartBefore( WeldRefEdit* pEdit, WeldRefButton* pButton )
{
return m_pImpl->RefInputStartBefore( pEdit, pButton );
}
::std::pair<RefButton*, RefEdit*> FormulaModalDialog::RefInputStartBefore( RefEdit* pEdit, RefButton* pButton )
{
return formula::FormulaDlg_Impl::RefInputStartBefore(pEdit, pButton);
return m_pImpl->RefInputStartBefore( pEdit, pButton );
}
void FormulaModalDialog::RefInputStartAfter()
......@@ -1875,14 +1859,9 @@ void FormulaDlg::DoEnter()
m_pImpl->DoEnter(false);
}
::std::pair<WeldRefButton*, WeldRefEdit*> FormulaDlg::RefInputStartBefore( WeldRefEdit* pEdit, WeldRefButton* pButton )
{
return m_pImpl->RefInputStartBefore( pEdit, pButton );
}
::std::pair<RefButton*, RefEdit*> FormulaDlg::RefInputStartBefore( RefEdit* pEdit, RefButton* pButton )
{
return formula::FormulaDlg_Impl::RefInputStartBefore(pEdit, pButton);
return m_pImpl->RefInputStartBefore( pEdit, pButton );
}
void FormulaDlg::RefInputStartAfter()
......@@ -1924,7 +1903,7 @@ bool FormulaDlg::UpdateParaWin(Selection& _rSelection)
return m_pImpl->UpdateParaWin(_rSelection);
}
WeldRefEdit* FormulaDlg::GetActiveEdit()
RefEdit* FormulaDlg::GetActiveEdit()
{
return m_pImpl->m_xParaWin->GetActiveEdit();
}
......
......@@ -60,10 +60,10 @@ ParaWin::ParaWin(weld::Container* pParent,IControlReferenceHandler* _pDlg)
, m_xEdArg2(new ArgEdit(m_xBuilder->weld_entry("ED_ARG2")))
, m_xEdArg3(new ArgEdit(m_xBuilder->weld_entry("ED_ARG3")))
, m_xEdArg4(new ArgEdit(m_xBuilder->weld_entry("ED_ARG4")))
, m_xRefBtn1(new WeldRefButton(m_xBuilder->weld_button("RB_ARG1")))
, m_xRefBtn2(new WeldRefButton(m_xBuilder->weld_button("RB_ARG2")))
, m_xRefBtn3(new WeldRefButton(m_xBuilder->weld_button("RB_ARG3")))
, m_xRefBtn4(new WeldRefButton(m_xBuilder->weld_button("RB_ARG4")))
, m_xRefBtn1(new RefButton(m_xBuilder->weld_button("RB_ARG1")))
, m_xRefBtn2(new RefButton(m_xBuilder->weld_button("RB_ARG2")))
, m_xRefBtn3(new RefButton(m_xBuilder->weld_button("RB_ARG3")))
, m_xRefBtn4(new RefButton(m_xBuilder->weld_button("RB_ARG4")))
{
// Space for three lines of text in function description.
m_xFtEditDesc->set_label("X\nX\nX\n");
......@@ -251,7 +251,7 @@ void ParaWin::SetActiveLine(sal_uInt16 no)
}
}
WeldRefEdit* ParaWin::GetActiveEdit()
RefEdit* ParaWin::GetActiveEdit()
{
if(nArgs>0 && nEdFocus!=NOT_FOUND)
{
......@@ -371,7 +371,7 @@ void ParaWin::SetEdFocus()
}
void ParaWin::InitArgInput(sal_uInt16 nPos, weld::Label& rFtArg, weld::Button& rBtnFx,
ArgEdit& rEdArg, WeldRefButton& rRefBtn)
ArgEdit& rEdArg, RefButton& rRefBtn)
{
rRefBtn.SetReferences(pMyParent, &rEdArg);
......
......@@ -88,10 +88,10 @@ private:
std::unique_ptr<ArgEdit> m_xEdArg3;
std::unique_ptr<ArgEdit> m_xEdArg4;
std::unique_ptr<WeldRefButton> m_xRefBtn1;
std::unique_ptr<WeldRefButton> m_xRefBtn2;
std::unique_ptr<WeldRefButton> m_xRefBtn3;
std::unique_ptr<WeldRefButton> m_xRefBtn4;
std::unique_ptr<RefButton> m_xRefBtn1;
std::unique_ptr<RefButton> m_xRefBtn2;
std::unique_ptr<RefButton> m_xRefBtn3;
std::unique_ptr<RefButton> m_xRefBtn4;
DECL_LINK( ScrollHdl, weld::ScrolledWindow&, void);
DECL_LINK( ModifyHdl, ArgInput&, void );
......@@ -102,7 +102,7 @@ private:
void ArgumentModified();
void InitArgInput(sal_uInt16 nPos, weld::Label& rFtArg, weld::Button& rBtnFx,
ArgEdit& rEdArg, WeldRefButton& rRefBtn);
ArgEdit& rEdArg, RefButton& rRefBtn);
void SetArgumentDesc(const OUString& aText);
void SetArgumentText(const OUString& aText);
......@@ -126,7 +126,7 @@ public:
sal_uInt16 GetActiveLine() { return nActiveLine;}
void SetActiveLine(sal_uInt16 no);
WeldRefEdit* GetActiveEdit();
RefEdit* GetActiveEdit();
OUString GetActiveArgName();
OUString GetArgument(sal_uInt16 no);
......
......@@ -26,18 +26,14 @@
namespace formula
{
class RefEdit;
class WeldRefEdit;
class RefButton;
class WeldRefButton;
class FORMULA_DLLPUBLIC SAL_NO_VTABLE IControlReferenceHandler
{
public:
virtual void ShowReference(const OUString& _sRef) = 0;
virtual void HideReference( bool bDoneRefMode = true ) = 0;
virtual void ReleaseFocus( RefEdit* pEdit ) = 0;
virtual void ReleaseFocus( WeldRefEdit* pEdit ) = 0;
virtual void ToggleCollapsed( RefEdit* pEdit, RefButton* pButton ) = 0;
virtual void ToggleCollapsed( WeldRefEdit* pEdit, WeldRefButton* pButton ) = 0;
protected:
~IControlReferenceHandler() {}
......
......@@ -55,9 +55,7 @@ class FormulaDlg_Impl;
class IControlReferenceHandler;
class FormulaHelper;
class RefEdit;
class WeldRefEdit;
class RefButton;
class WeldRefButton;
class FormEditData;
class FORMULA_DLLPUBLIC FormulaModalDialog
......@@ -74,8 +72,7 @@ private:
protected:
static ::std::pair<RefButton*,RefEdit*> RefInputStartBefore( RefEdit* pEdit, RefButton* pButton );
::std::pair<WeldRefButton*,WeldRefEdit*> RefInputStartBefore( WeldRefEdit* pEdit, WeldRefButton* pButton );
::std::pair<RefButton*,RefEdit*> RefInputStartBefore( RefEdit* pEdit, RefButton* pButton );
void RefInputStartAfter();
void RefInputDoneAfter();
......@@ -106,8 +103,7 @@ protected:
protected:
static ::std::pair<RefButton*,RefEdit*> RefInputStartBefore( RefEdit* pEdit, RefButton* pButton );
::std::pair<WeldRefButton*,WeldRefEdit*> RefInputStartBefore( WeldRefEdit* pEdit, WeldRefButton* pButton );
::std::pair<RefButton*,RefEdit*> RefInputStartBefore( RefEdit* pEdit, RefButton* pButton );
void RefInputStartAfter();
void RefInputDoneAfter( bool bForced );
......@@ -121,7 +117,7 @@ protected:
const IFunctionDescription* getCurrentFunctionDescription() const;
bool UpdateParaWin(Selection& _rSelection);
void UpdateParaWin(const Selection& _rSelection, const OUString& _sRefStr);
WeldRefEdit* GetActiveEdit();
RefEdit* GetActiveEdit();
void SetEdSelection();
void StoreFormEditData(FormEditData* pData);
......
......@@ -37,44 +37,7 @@ namespace formula {
class IControlReferenceHandler;
class FORMULA_DLLPUBLIC RefEdit : public Edit
{
private:
Idle aIdle;
IControlReferenceHandler* pAnyRefDlg; // parent dialog
VclPtr<vcl::Window> pLabelWidget;
DECL_LINK( UpdateHdl, Timer*, void );
protected:
virtual void KeyInput( const KeyEvent& rKEvt ) override;
virtual void GetFocus() override;
virtual void LoseFocus() override;
public:
RefEdit( vcl::Window* _pParent, vcl::Window* pShrinkModeLabel, WinBits nStyle = WB_BORDER );
virtual ~RefEdit() override;
virtual void dispose() override;
void SetRefString( const OUString& rStr );
using Edit::SetText;
void SetText( const OUString& rStr ) override;
virtual void Modify() override;
void StartUpdateData();
void SetReferences( IControlReferenceHandler* pDlg, vcl::Window *pLabelWidget );
vcl::Window* GetLabelWidgetForShrinkMode()
{
return pLabelWidget;
}
};
class FORMULA_DLLPUBLIC WeldRefEdit
class FORMULA_DLLPUBLIC RefEdit
{
protected:
std::unique_ptr<weld::Entry> xEntry;
......@@ -83,9 +46,9 @@ private:
Idle aIdle;
IControlReferenceHandler* pAnyRefDlg; // parent dialog
weld::Label* pLabelWidget;
Link<WeldRefEdit&,void> maGetFocusHdl;
Link<WeldRefEdit&,void> maLoseFocusHdl;
Link<WeldRefEdit&,void> maModifyHdl;
Link<RefEdit&,void> maGetFocusHdl;
Link<RefEdit&,void> maLoseFocusHdl;
Link<RefEdit&,void> maModifyHdl;
Link<weld::Widget&,bool> maActivateHdl;
DECL_LINK( UpdateHdl, Timer*, void );
......@@ -97,9 +60,9 @@ protected:
DECL_LINK(Modify, weld::Entry&, void);
public:
WeldRefEdit(std::unique_ptr<weld::Entry> xControl);
RefEdit(std::unique_ptr<weld::Entry> xControl);
weld::Entry* GetWidget() const { return xEntry.get(); }
~WeldRefEdit();
~RefEdit();
void SetRefString( const OUString& rStr );
......@@ -166,48 +129,23 @@ public:
return xEntry->get_value_changed_from_saved();
}
void SetGetFocusHdl(const Link<WeldRefEdit&,void>& rLink) { maGetFocusHdl = rLink; }
void SetLoseFocusHdl(const Link<WeldRefEdit&,void>& rLink) { maLoseFocusHdl = rLink; }
void SetModifyHdl(const Link<WeldRefEdit&,void>& rLink) { maModifyHdl = rLink; }
const Link<WeldRefEdit&,void>& GetModifyHdl() const { return maModifyHdl; }
void SetGetFocusHdl(const Link<RefEdit&,void>& rLink) { maGetFocusHdl = rLink; }
void SetLoseFocusHdl(const Link<RefEdit&,void>& rLink) { maLoseFocusHdl = rLink; }
void SetModifyHdl(const Link<RefEdit&,void>& rLink) { maModifyHdl = rLink; }
const Link<RefEdit&,void>& GetModifyHdl() const { return maModifyHdl; }
void SetActivateHdl(const Link<weld::Widget&,bool>& rLink) { maActivateHdl = rLink; }
};
class FORMULA_DLLPUBLIC RefButton : public ImageButton
{
private:
Image aImgRefStart; // Start reference input
Image aImgRefDone; // Stop reference input
OUString aShrinkQuickHelp;
OUString aExpandQuickHelp;
IControlReferenceHandler* pAnyRefDlg; // parent dialog
VclPtr<RefEdit> pRefEdit; // associated Edit-Control
protected:
virtual void Click() override;
virtual void KeyInput( const KeyEvent& rKEvt ) override;
virtual void GetFocus() override;
virtual void LoseFocus() override;
public:
RefButton(vcl::Window* _pParent, WinBits nStyle);
virtual ~RefButton() override;
virtual void dispose() override;
void SetReferences( IControlReferenceHandler* pDlg, RefEdit* pEdit );
void SetStartImage();
void SetEndImage();
};
class FORMULA_DLLPUBLIC WeldRefButton
class FORMULA_DLLPUBLIC RefButton
{
private:
std::unique_ptr<weld::Button> xButton;
IControlReferenceHandler* pAnyRefDlg; // parent dialog
WeldRefEdit* pRefEdit; // associated Edit-Control
Link<WeldRefButton&,void> maGetFocusHdl;
Link<WeldRefButton&,void> maLoseFocusHdl;
RefEdit* pRefEdit; // associated Edit-Control
Link<RefButton&,void> maGetFocusHdl;
Link<RefButton&,void> maLoseFocusHdl;
Link<weld::Widget&,bool> maActivateHdl;
Link<WeldRefButton&,void> maClickHdl;
Link<RefButton&,void> maClickHdl;
protected:
DECL_LINK(Click, weld::Button&, void);
......@@ -216,23 +154,22 @@ protected:
DECL_LINK(LoseFocus, weld::Widget&, void);
public:
WeldRefButton(std::unique_ptr<weld::Button> xControl);
RefButton(std::unique_ptr<weld::Button> xControl);
weld::Button* GetWidget() const { return xButton.get(); }
~WeldRefButton();
void SetReferences(IControlReferenceHandler* pDlg, WeldRefEdit* pEdit);
~RefButton();
void SetReferences(IControlReferenceHandler* pDlg, RefEdit* pEdit);
void SetStartImage();
void SetEndImage();
void DoRef()
{
Click(*xButton);
}
void SetGetFocusHdl(const Link<WeldRefButton&,void>& rLink) { maGetFocusHdl = rLink; }
void SetLoseFocusHdl(const Link<WeldRefButton&,void>& rLink) { maLoseFocusHdl = rLink; }
void SetGetFocusHdl(const Link<RefButton&,void>& rLink) { maGetFocusHdl = rLink; }
void SetLoseFocusHdl(const Link<RefButton&,void>& rLink) { maLoseFocusHdl = rLink; }
void SetActivateHdl(const Link<weld::Widget&,bool>& rLink) { maActivateHdl = rLink; }
void SetClickHdl(const Link<WeldRefButton&,void>& rLink) { maClickHdl = rLink; }
void SetClickHdl(const Link<RefButton&,void>& rLink) { maClickHdl = rLink; }
};
} // formula
#endif // INCLUDED_FORMULA_FUNCUTL_HXX
......
......@@ -95,7 +95,7 @@ FormulaDialog::~FormulaDialog()
}
StoreFormEditData( m_pFormulaData );
m_pEdit.clear();
m_pEdit = nullptr;
m_pAddField.clear();
}
......@@ -196,18 +196,14 @@ void FormulaDialog::ReleaseFocus( RefEdit* /*pEdit*/)
{
}
void FormulaDialog::ReleaseFocus( WeldRefEdit* /*pEdit*/)
{
}
void FormulaDialog::ToggleCollapsed( RefEdit* _pEdit, RefButton* _pButton)
{
::std::pair<RefButton*,RefEdit*> aPair = RefInputStartBefore( _pEdit, _pButton );
m_pEdit = aPair.second;
if ( m_pEdit )
m_pEdit->Hide();
m_pEdit->GetWidget()->hide();
if ( aPair.first )
aPair.first->Hide();
aPair.first->GetWidget()->hide();
if ( !m_pAddField )
{
......@@ -226,11 +222,6 @@ void FormulaDialog::ToggleCollapsed( RefEdit* _pEdit, RefButton* _pButton)
m_pAddField->Show();
}
void FormulaDialog::ToggleCollapsed( WeldRefEdit* /*_pEdit*/, WeldRefButton* /*_pButton*/)
{
assert(false);
}
IMPL_LINK( FormulaDialog, OnClickHdl, OAddFieldWindow& ,_rAddFieldDlg, void)
{
const uno::Sequence< beans::PropertyValue > aArgs = _rAddFieldDlg.getSelectedFieldDescriptors();
......
......@@ -51,7 +51,7 @@ class FormulaDialog : public formula::FormulaModalDialog,
css::uno::Reference < css::beans::XPropertySet > m_xRowSet;
css::uno::Reference< css::report::meta::XFormulaParser> m_xParser;
css::uno::Reference< css::sheet::XFormulaOpCodeMapper> m_xOpCodeMapper;
VclPtr<formula::RefEdit> m_pEdit;
formula::RefEdit* m_pEdit;
OUString m_sFormula;
sal_Int32 m_nStart;
sal_Int32 m_nEnd;
......@@ -100,9 +100,7 @@ public:
virtual void ShowReference(const OUString& _sRef) override;
virtual void HideReference( bool bDoneRefMode = true ) override;
virtual void ReleaseFocus( formula::RefEdit* pEdit ) override;
virtual void ReleaseFocus( formula::WeldRefEdit* pEdit ) override;
virtual void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton ) override;
virtual void ToggleCollapsed( formula::WeldRefEdit* pEdit, formula::WeldRefButton* pButton ) override;
};
......
......@@ -52,8 +52,8 @@ ScRandomNumberGeneratorDialog::ScRandomNumberGeneratorDialog(
, mpDoc(pViewData->GetDocument())
, mbDialogLostFocus(false)
, mxInputRangeText(m_xBuilder->weld_label("cell-range-label"))
, mxInputRangeEdit(new formula::WeldRefEdit(m_xBuilder->weld_entry("cell-range-edit")))
, mxInputRangeButton(new formula::WeldRefButton(m_xBuilder->weld_button("cell-range-button")))
, mxInputRangeEdit(new formula::RefEdit(m_xBuilder->weld_entry("cell-range-edit")))
, mxInputRangeButton(new formula::RefButton(m_xBuilder->weld_button("cell-range-button")))
, mxDistributionCombo(m_xBuilder->weld_combo_box("distribution-combo"))
, mxParameter1Text(m_xBuilder->weld_label("parameter1-label"))
, mxParameter1Value(m_xBuilder->weld_spin_button("parameter1-spin"))
......@@ -311,27 +311,27 @@ IMPL_LINK_NOARG( ScRandomNumberGeneratorDialog, CloseClicked, weld::Button&, voi
response(RET_CLOSE);
}
IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, GetEditFocusHandler, formula::WeldRefEdit&, void)
IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, GetEditFocusHandler, formula::RefEdit&, void)
{
mxInputRangeEdit->SelectAll();
}
IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, GetButtonFocusHandler, formula::WeldRefButton&, void)
IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, GetButtonFocusHandler, formula::RefButton&, void)
{
mxInputRangeEdit->SelectAll();
}
IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, LoseEditFocusHandler, formula::WeldRefEdit&, void)
IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, LoseEditFocusHandler, formula::RefEdit&, void)
{
mbDialogLostFocus = !m_xDialog->has_toplevel_focus();
}
IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, LoseButtonFocusHandler, formula::WeldRefButton&, void)
IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, LoseButtonFocusHandler, formula::RefButton&, void)
{
mbDialogLostFocus = !m_xDialog->has_toplevel_focus();
}
IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, InputRangeModified, formula::WeldRefEdit&, void)
IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, InputRangeModified, formula::RefEdit&, void)
{
ScRangeList aRangeList;
bool bValid = ParseWithNames( aRangeList, mxInputRangeEdit->GetText(), mpDoc);
......
......@@ -34,11 +34,11 @@ ScSamplingDialog::ScSamplingDialog(SfxBindings* pSfxBindings, SfxChildWindow* pC
, mnLastPeriodValue(1)
, mDialogLostFocus(false)
, mxInputRangeLabel(m_xBuilder->weld_label("input-range-label"))
, mxInputRangeEdit(new formula::WeldRefEdit(m_xBuilder->weld_entry("input-range-edit")))
, mxInputRangeButton(new formula::WeldRefButton(m_xBuilder->weld_button("input-range-button")))
, mxInputRangeEdit(new formula::RefEdit(m_xBuilder->weld_entry("input-range-edit")))
, mxInputRangeButton(new formula::RefButton(m_xBuilder->weld_button("input-range-button")))
, mxOutputRangeLabel(m_xBuilder->weld_label("output-range-label"))
, mxOutputRangeEdit(new formula::WeldRefEdit(m_xBuilder->weld_entry("output-range-edit")))
, mxOutputRangeButton(new formula::WeldRefButton(m_xBuilder->weld_button("output-range-button")))
, mxOutputRangeEdit(new formula::RefEdit(m_xBuilder->weld_entry("output-range-edit")))
, mxOutputRangeButton(new formula::RefButton(m_xBuilder->weld_button("output-range-button")))
, mxSampleSize(m_xBuilder->weld_spin_button("sample-size-spin"))
, mxPeriod(m_xBuilder->weld_spin_button("period-spin"))
, mxRandomMethodRadio(m_xBuilder->weld_radio_button("random-method-radio"))
......@@ -66,10 +66,10 @@ void ScSamplingDialog::Init()
mxButtonOk->connect_clicked( LINK( this, ScSamplingDialog, OkClicked ) );
mxButtonOk->set_sensitive(false);
Link<formula::WeldRefEdit&,void> aEditLink = LINK( this, ScSamplingDialog, GetEditFocusHandler );
Link<formula::RefEdit&,void> aEditLink = LINK( this, ScSamplingDialog, GetEditFocusHandler );
mxInputRangeEdit->SetGetFocusHdl( aEditLink );
mxOutputRangeEdit->SetGetFocusHdl( aEditLink );
Link<formula::WeldRefButton&,void> aButtonLink = LINK( this, ScSamplingDialog, GetButtonFocusHandler );
Link<formula::RefButton&,void> aButtonLink = LINK( this, ScSamplingDialog, GetButtonFocusHandler );
mxInputRangeButton->SetGetFocusHdl( aButtonLink );
mxOutputRangeButton->SetGetFocusHdl( aButtonLink );
......@@ -80,7 +80,7 @@ void ScSamplingDialog::Init()
mxInputRangeButton->SetLoseFocusHdl( aButtonLink );
mxOutputRangeButton->SetLoseFocusHdl( aButtonLink );
Link<formula::WeldRefEdit&,void> aLink2 = LINK( this, ScSamplingDialog, RefInputModifyHandler);
Link<formula::RefEdit&,void> aLink2 = LINK( this, ScSamplingDialog, RefInputModifyHandler);
mxInputRangeEdit->SetModifyHdl( aLink2);
mxOutputRangeEdit->SetModifyHdl( aLink2);
......@@ -390,7 +390,7 @@ IMPL_LINK_NOARG(ScSamplingDialog, PeriodValueModified, weld::SpinButton&, void)
mnLastPeriodValue = mxPeriod->get_value();
}
IMPL_LINK( ScSamplingDialog, GetEditFocusHandler, formula::WeldRefEdit&, rCtrl, void )
IMPL_LINK( ScSamplingDialog, GetEditFocusHandler, formula::RefEdit&, rCtrl, void )
{
if (&rCtrl == mxInputRangeEdit.get())
mpActiveEdit = mxInputRangeEdit.get();
......@@ -403,7 +403,7 @@ IMPL_LINK( ScSamplingDialog, GetEditFocusHandler, formula::WeldRefEdit&, rCtrl,
mpActiveEdit->SelectAll();
}
IMPL_LINK(ScSamplingDialog, GetButtonFocusHandler, formula::WeldRefButton&, rCtrl, void)
IMPL_LINK(ScSamplingDialog, GetButtonFocusHandler, formula::RefButton&, rCtrl, void)
{
if (&rCtrl == mxInputRangeButton.get())
mpActiveEdit = mxInputRangeEdit.get();
......@@ -423,12 +423,12 @@ IMPL_LINK_NOARG(ScSamplingDialog, OkClicked, weld::Button&, void)
response(RET_OK);
}
IMPL_LINK_NOARG(ScSamplingDialog, LoseEditFocusHandler, formula::WeldRefEdit&, void)
IMPL_LINK_NOARG(ScSamplingDialog, LoseEditFocusHandler, formula::RefEdit&, void)
{
mDialogLostFocus = !m_xDialog->has_toplevel_focus();
}
IMPL_LINK_NOARG(ScSamplingDialog, LoseButtonFocusHandler, formula::WeldRefButton&, void)
IMPL_LINK_NOARG(ScSamplingDialog, LoseButtonFocusHandler, formula::RefButton&, void)
{
mDialogLostFocus = !m_xDialog->has_toplevel_focus();
}
......@@ -490,7 +490,7 @@ IMPL_LINK(ScSamplingDialog, CheckHdl, weld::Button&, rBtn, void)
}
}
IMPL_LINK_NOARG(ScSamplingDialog, RefInputModifyHandler, formula::WeldRefEdit&, void)
IMPL_LINK_NOARG(ScSamplingDialog, RefInputModifyHandler, formula::RefEdit&, void)
{
if ( mpActiveEdit )
{
......
......@@ -51,11 +51,11 @@ ScStatisticsInputOutputDialog::ScStatisticsInputOutputDialog(
weld::Window* pParent, ScViewData* pViewData, const OUString& rUIXMLDescription, const OString& rID)
: ScAnyRefDlgController(pSfxBindings, pChildWindow, pParent, rUIXMLDescription, rID)
, mxInputRangeLabel(m_xBuilder->weld_label("input-range-label"))
, mxInputRangeEdit(new formula::WeldRefEdit(m_xBuilder->weld_entry("input-range-edit")))
, mxInputRangeButton(new formula::WeldRefButton(m_xBuilder->weld_button("input-range-button")))
, mxInputRangeEdit(new formula::RefEdit(m_xBuilder->weld_entry("input-range-edit")))
, mxInputRangeButton(new formula::RefButton(m_xBuilder->weld_button("input-range-button")))
, mxOutputRangeLabel(m_xBuilder->weld_label("output-range-label"))
, mxOutputRangeEdit(new formula::WeldRefEdit(m_xBuilder->weld_entry("output-range-edit")))
, mxOutputRangeButton(new formula::WeldRefButton(m_xBuilder->weld_button("output-range-button")))
, mxOutputRangeEdit(new formula::RefEdit(m_xBuilder->weld_entry("output-range-edit")))
, mxOutputRangeButton(new formula::RefButton(m_xBuilder->weld_button("output-range-button")))