formula/source/ui/dlg/ControlHelper.hxx | 10 formula/source/ui/dlg/formula.cxx | 55 - formula/source/ui/dlg/funcutl.cxx | 244 ------ formula/source/ui/dlg/parawin.cxx | 12 formula/source/ui/dlg/parawin.hxx | 12 include/formula/IControlReferenceHandler.hxx | 4 include/formula/formula.hxx | 10 include/formula/funcutl.hxx | 105 -- reportdesign/source/ui/dlg/Formula.cxx | 15 reportdesign/source/ui/inc/Formula.hxx | 4 sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx | 14 sc/source/ui/StatisticsDialogs/SamplingDialog.cxx | 24 sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx | 24 sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx | 28 sc/source/ui/condformat/condformatdlg.cxx | 10 sc/source/ui/condformat/condformatdlgentry.cxx | 8 sc/source/ui/dbgui/PivotLayoutDialog.cxx | 22 sc/source/ui/dbgui/consdlg.cxx | 16 sc/source/ui/dbgui/dbnamdlg.cxx | 10 sc/source/ui/dbgui/filtdlg.cxx | 4 sc/source/ui/dbgui/foptmgr.cxx | 6 sc/source/ui/dbgui/sfiltdlg.cxx | 18 sc/source/ui/dbgui/validate.cxx | 16 sc/source/ui/formdlg/formula.cxx | 21 sc/source/ui/inc/IAnyRefDialog.hxx | 1 sc/source/ui/inc/PivotLayoutDialog.hxx | 20 sc/source/ui/inc/RandomNumberGeneratorDialog.hxx | 14 sc/source/ui/inc/SamplingDialog.hxx | 20 sc/source/ui/inc/StatisticsInputOutputDialog.hxx | 20 sc/source/ui/inc/StatisticsTwoVariableDialog.hxx | 24 sc/source/ui/inc/anyrefdg.hxx | 131 --- sc/source/ui/inc/areasdlg.hxx | 20 sc/source/ui/inc/condformatdlg.hxx | 10 sc/source/ui/inc/condformatdlgentry.hxx | 8 sc/source/ui/inc/consdlg.hxx | 16 sc/source/ui/inc/crnrdlg.hxx | 22 sc/source/ui/inc/dbnamdlg.hxx | 6 sc/source/ui/inc/filtdlg.hxx | 20 sc/source/ui/inc/foptmgr.hxx | 14 sc/source/ui/inc/formula.hxx | 3 sc/source/ui/inc/highred.hxx | 4 sc/source/ui/inc/namedefdlg.hxx | 6 sc/source/ui/inc/namedlg.hxx | 8 sc/source/ui/inc/optsolver.hxx | 50 - sc/source/ui/inc/simpref.hxx | 4 sc/source/ui/inc/solvrdlg.hxx | 18 sc/source/ui/inc/tabopdlg.hxx | 22 sc/source/ui/inc/validate.hxx | 29 sc/source/ui/inc/xmlsourcedlg.hxx | 8 sc/source/ui/miscdlgs/anyrefdg.cxx | 374 ---------- sc/source/ui/miscdlgs/crnrdlg.cxx | 24 sc/source/ui/miscdlgs/highred.cxx | 4 sc/source/ui/miscdlgs/optsolver.cxx | 60 - sc/source/ui/miscdlgs/simpref.cxx | 4 sc/source/ui/miscdlgs/solvrdlg.cxx | 20 sc/source/ui/miscdlgs/tabopdlg.cxx | 26 sc/source/ui/namedlg/namedefdlg.cxx | 6 sc/source/ui/namedlg/namedlg.cxx | 8 sc/source/ui/pagedlg/areasdlg.cxx | 22 sc/source/ui/xmlsource/xmlsourcedlg.cxx | 8 60 files changed, 494 insertions(+), 1252 deletions(-)
New commits: commit d56ee7339f1a2ca73167791a5b39b6da38b401d5 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed May 8 11:14:52 2019 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sat May 11 20:31:04 2019 +0200 remove unused RefEdit/RefButton and rename WeldRefEdit/WeldRefButton back Change-Id: I3aab8585d4ba1017cc755bf21e827522e7ee6980 Reviewed-on: https://gerrit.libreoffice.org/71957 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/formula/source/ui/dlg/ControlHelper.hxx b/formula/source/ui/dlg/ControlHelper.hxx index 8ec7d504279e..5e3811f90fa6 100644 --- a/formula/source/ui/dlg/ControlHelper.hxx +++ b/formula/source/ui/dlg/ControlHelper.hxx @@ -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(); diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index 97b28f6a2009..889f21d8d724 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -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(); } diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx index 13730efe00a8..e82da218b6a0 100644 --- a/formula/source/ui/dlg/funcutl.cxx +++ b/formula/source/ui/dlg/funcutl.cxx @@ -38,7 +38,7 @@ namespace formula // class ArgEdit ArgEdit::ArgEdit(std::unique_ptr<weld::Entry> xControl) - : WeldRefEdit(std::move(xControl)) + : RefEdit(std::move(xControl)) , pEdPrev(nullptr) , pEdNext(nullptr) , pSlider(nullptr) @@ -144,7 +144,7 @@ ArgInput::ArgInput() } void ArgInput::InitArgInput(weld::Label* pftArg, weld::Button* pbtnFx, - ArgEdit* pedArg, WeldRefButton* prefBtn) + ArgEdit* pedArg, RefButton* prefBtn) { pFtArg =pftArg; pBtnFx =pbtnFx; @@ -259,139 +259,38 @@ IMPL_LINK( ArgInput, FxBtnFocusHdl, weld::Widget&, rControl, void ) aFxFocusLink.Call(*this); } -IMPL_LINK( ArgInput, EdFocusHdl, WeldRefEdit&, rControl, void ) +IMPL_LINK( ArgInput, EdFocusHdl, RefEdit&, rControl, void ) { if (&rControl == pEdArg) aEdFocusLink.Call(*this); } -IMPL_LINK( ArgInput, EdModifyHdl, WeldRefEdit&, rEdit, void ) +IMPL_LINK( ArgInput, EdModifyHdl, RefEdit&, rEdit, void ) { if (&rEdit == pEdArg) aEdModifyLink.Call(*this); } -// class RefEdit - -RefEdit::RefEdit( vcl::Window* _pParent, vcl::Window* pShrinkModeLabel, WinBits nStyle ) - : Edit( _pParent, nStyle ) - , aIdle("formula RefEdit Idle") - , pAnyRefDlg( nullptr ) - , pLabelWidget(pShrinkModeLabel) -{ - aIdle.SetInvokeHandler( LINK( this, RefEdit, UpdateHdl ) ); -} - -extern "C" SAL_DLLPUBLIC_EXPORT void makeRefEdit(VclPtr<vcl::Window> & rRet, VclPtr<vcl::Window> & pParent, VclBuilder::stringmap &) -{ - rRet = VclPtr<RefEdit>::Create(pParent, nullptr, WB_BORDER); -} - -RefEdit::~RefEdit() -{ - disposeOnce(); -} - -void RefEdit::dispose() -{ - aIdle.ClearInvokeHandler(); - aIdle.Stop(); - pLabelWidget.clear(); - Edit::dispose(); -} - -void RefEdit::SetRefString( const OUString& rStr ) -{ - // Prevent unwanted side effects by setting only a differing string. - // See commit message for reasons. - if (Edit::GetText() != rStr) - Edit::SetText( rStr ); -} - -void RefEdit::SetText(const OUString& rStr) -{ - Edit::SetText( rStr ); - UpdateHdl( &aIdle ); -} - -void RefEdit::StartUpdateData() -{ - aIdle.Start(); -} - -void RefEdit::SetReferences( IControlReferenceHandler* pDlg, vcl::Window* pLabel ) -{ - pAnyRefDlg = pDlg; - pLabelWidget = pLabel; - - if( pDlg ) - { - aIdle.SetInvokeHandler( LINK( this, RefEdit, UpdateHdl ) ); - } - else - { - aIdle.ClearInvokeHandler(); - aIdle.Stop(); - } -} - -void RefEdit::Modify() -{ - Edit::Modify(); - if( pAnyRefDlg ) - pAnyRefDlg->HideReference(); -} - -void RefEdit::KeyInput( const KeyEvent& rKEvt ) -{ - const vcl::KeyCode& rKeyCode = rKEvt.GetKeyCode(); - if( pAnyRefDlg && !rKeyCode.GetModifier() && (rKeyCode.GetCode() == KEY_F2) ) - pAnyRefDlg->ReleaseFocus( this ); - else - Edit::KeyInput( rKEvt ); -} - -void RefEdit::GetFocus() -{ - Edit::GetFocus(); - StartUpdateData(); -} - -void RefEdit::LoseFocus() -{ - Edit::LoseFocus(); - if( pAnyRefDlg ) - pAnyRefDlg->HideReference(); -} - -IMPL_LINK_NOARG(RefEdit, UpdateHdl, Timer *, void) -{ - if( pAnyRefDlg ) - pAnyRefDlg->ShowReference( GetText() ); -} - -// class RefEdit - -WeldRefEdit::WeldRefEdit(std::unique_ptr<weld::Entry> xControl) +RefEdit::RefEdit(std::unique_ptr<weld::Entry> xControl) : xEntry(std::move(xControl)) , aIdle("formula RefEdit Idle") , pAnyRefDlg(nullptr) , pLabelWidget(nullptr) { - xEntry->connect_focus_in(LINK(this, WeldRefEdit, GetFocus)); - xEntry->connect_focus_out(LINK(this, WeldRefEdit, LoseFocus)); - xEntry->connect_key_press(LINK(this, WeldRefEdit, KeyInput)); - xEntry->connect_changed(LINK(this, WeldRefEdit, Modify)); - aIdle.SetInvokeHandler( LINK( this, WeldRefEdit, UpdateHdl ) ); + xEntry->connect_focus_in(LINK(this, RefEdit, GetFocus)); + xEntry->connect_focus_out(LINK(this, RefEdit, LoseFocus)); + xEntry->connect_key_press(LINK(this, RefEdit, KeyInput)); + xEntry->connect_changed(LINK(this, RefEdit, Modify)); + aIdle.SetInvokeHandler( LINK( this, RefEdit, UpdateHdl ) ); } -WeldRefEdit::~WeldRefEdit() +RefEdit::~RefEdit() { aIdle.ClearInvokeHandler(); aIdle.Stop(); } -void WeldRefEdit::SetRefString( const OUString& rStr ) +void RefEdit::SetRefString( const OUString& rStr ) { // Prevent unwanted side effects by setting only a differing string. // See commit message for reasons. @@ -399,30 +298,30 @@ void WeldRefEdit::SetRefString( const OUString& rStr ) xEntry->set_text(rStr); } -void WeldRefEdit::SetRefValid(bool bValid) +void RefEdit::SetRefValid(bool bValid) { xEntry->set_message_type(bValid ? weld::EntryMessageType::Normal : weld::EntryMessageType::Error); } -void WeldRefEdit::SetText(const OUString& rStr) +void RefEdit::SetText(const OUString& rStr) { xEntry->set_text(rStr); UpdateHdl( &aIdle ); } -void WeldRefEdit::StartUpdateData() +void RefEdit::StartUpdateData() { aIdle.Start(); } -void WeldRefEdit::SetReferences(IControlReferenceHandler* pDlg, weld::Label* pLabel) +void RefEdit::SetReferences(IControlReferenceHandler* pDlg, weld::Label* pLabel) { pAnyRefDlg = pDlg; pLabelWidget = pLabel; if( pDlg ) { - aIdle.SetInvokeHandler(LINK(this, WeldRefEdit, UpdateHdl)); + aIdle.SetInvokeHandler(LINK(this, RefEdit, UpdateHdl)); } else { @@ -431,14 +330,14 @@ void WeldRefEdit::SetReferences(IControlReferenceHandler* pDlg, weld::Label* pLa } } -IMPL_LINK_NOARG(WeldRefEdit, Modify, weld::Entry&, void) +IMPL_LINK_NOARG(RefEdit, Modify, weld::Entry&, void) { maModifyHdl.Call(*this); if (pAnyRefDlg) pAnyRefDlg->HideReference(); } -IMPL_LINK(WeldRefEdit, KeyInput, const KeyEvent&, rKEvt, bool) +IMPL_LINK(RefEdit, KeyInput, const KeyEvent&, rKEvt, bool) { const vcl::KeyCode& rKeyCode = rKEvt.GetKeyCode(); if (pAnyRefDlg && !rKeyCode.GetModifier() && rKeyCode.GetCode() == KEY_F2) @@ -457,141 +356,68 @@ IMPL_LINK(WeldRefEdit, KeyInput, const KeyEvent&, rKEvt, bool) return false; } -IMPL_LINK_NOARG(WeldRefEdit, GetFocus, weld::Widget&, void) +IMPL_LINK_NOARG(RefEdit, GetFocus, weld::Widget&, void) { maGetFocusHdl.Call(*this); StartUpdateData(); } -IMPL_LINK_NOARG(WeldRefEdit, LoseFocus, weld::Widget&, void) +IMPL_LINK_NOARG(RefEdit, LoseFocus, weld::Widget&, void) { maLoseFocusHdl.Call(*this); if( pAnyRefDlg ) pAnyRefDlg->HideReference(); } -IMPL_LINK_NOARG(WeldRefEdit, UpdateHdl, Timer *, void) +IMPL_LINK_NOARG(RefEdit, UpdateHdl, Timer *, void) { if( pAnyRefDlg ) pAnyRefDlg->ShowReference(xEntry->get_text()); } //class RefButton -RefButton::RefButton( vcl::Window* _pParent, WinBits nStyle ) : - ImageButton(_pParent, nStyle), - aImgRefStart(BitmapEx(RID_BMP_REFBTN1)), - aImgRefDone(BitmapEx(RID_BMP_REFBTN2)), - aShrinkQuickHelp( ForResId( RID_STR_SHRINK ) ), - aExpandQuickHelp( ForResId( RID_STR_EXPAND ) ), - pAnyRefDlg( nullptr ), - pRefEdit( nullptr ) -{ - SetStartImage(); -} - -RefButton::~RefButton() -{ - disposeOnce(); -} - -void RefButton::dispose() -{ - pRefEdit.clear(); - ImageButton::dispose(); -} - -VCL_BUILDER_FACTORY_ARGS(RefButton, 0) - -void RefButton::SetStartImage() -{ - SetModeImage( aImgRefStart ); - SetQuickHelpText( aShrinkQuickHelp ); -} - -void RefButton::SetEndImage() -{ - SetModeImage( aImgRefDone ); - SetQuickHelpText( aExpandQuickHelp ); -} - -void RefButton::SetReferences( IControlReferenceHandler* pDlg, RefEdit* pEdit ) -{ - pAnyRefDlg = pDlg; - pRefEdit = pEdit; -} - -void RefButton::Click() -{ - if( pAnyRefDlg ) - pAnyRefDlg->ToggleCollapsed( pRefEdit, this ); -} - -void RefButton::KeyInput( const KeyEvent& rKEvt ) -{ - const vcl::KeyCode& rKeyCode = rKEvt.GetKeyCode(); - if( pAnyRefDlg && !rKeyCode.GetModifier() && (rKeyCode.GetCode() == KEY_F2) ) - pAnyRefDlg->ReleaseFocus( pRefEdit ); - else - ImageButton::KeyInput( rKEvt ); -} - -void RefButton::GetFocus() -{ - ImageButton::GetFocus(); - if( pRefEdit ) - pRefEdit->StartUpdateData(); -} - -void RefButton::LoseFocus() -{ - ImageButton::LoseFocus(); - if( pRefEdit ) - pRefEdit->Modify(); -} - -//class RefButton -WeldRefButton::WeldRefButton(std::unique_ptr<weld::Button> xControl) +RefButton::RefButton(std::unique_ptr<weld::Button> xControl) : xButton(std::move(xControl)) , pAnyRefDlg( nullptr ) , pRefEdit( nullptr ) { - xButton->connect_focus_in(LINK(this, WeldRefButton, GetFocus)); - xButton->connect_focus_out(LINK(this, WeldRefButton, LoseFocus)); - xButton->connect_key_press(LINK(this, WeldRefButton, KeyInput)); - xButton->connect_clicked(LINK(this, WeldRefButton, Click)); + xButton->connect_focus_in(LINK(this, RefButton, GetFocus)); + xButton->connect_focus_out(LINK(this, RefButton, LoseFocus)); + xButton->connect_key_press(LINK(this, RefButton, KeyInput)); + xButton->connect_clicked(LINK(this, RefButton, Click)); SetStartImage(); } -WeldRefButton::~WeldRefButton() +RefButton::~RefButton() { } -void WeldRefButton::SetStartImage() +void RefButton::SetStartImage() { xButton->set_from_icon_name(RID_BMP_REFBTN1); xButton->set_tooltip_text(ForResId(RID_STR_SHRINK)); } -void WeldRefButton::SetEndImage() +void RefButton::SetEndImage() { xButton->set_from_icon_name(RID_BMP_REFBTN2); xButton->set_tooltip_text(ForResId(RID_STR_EXPAND)); } -void WeldRefButton::SetReferences( IControlReferenceHandler* pDlg, WeldRefEdit* pEdit ) +void RefButton::SetReferences( IControlReferenceHandler* pDlg, RefEdit* pEdit ) { pAnyRefDlg = pDlg; pRefEdit = pEdit; } -IMPL_LINK_NOARG(WeldRefButton, Click, weld::Button&, void) +IMPL_LINK_NOARG(RefButton, Click, weld::Button&, void) { maClickHdl.Call(*this); if( pAnyRefDlg ) pAnyRefDlg->ToggleCollapsed( pRefEdit, this ); } -IMPL_LINK(WeldRefButton, KeyInput, const KeyEvent&, rKEvt, bool) +IMPL_LINK(RefButton, KeyInput, const KeyEvent&, rKEvt, bool) { const vcl::KeyCode& rKeyCode = rKEvt.GetKeyCode(); if (pAnyRefDlg && !rKeyCode.GetModifier() && rKeyCode.GetCode() == KEY_F2) @@ -610,14 +436,14 @@ IMPL_LINK(WeldRefButton, KeyInput, const KeyEvent&, rKEvt, bool) return false; } -IMPL_LINK_NOARG(WeldRefButton, GetFocus, weld::Widget&, void) +IMPL_LINK_NOARG(RefButton, GetFocus, weld::Widget&, void) { maGetFocusHdl.Call(*this); if (pRefEdit) pRefEdit->StartUpdateData(); } -IMPL_LINK_NOARG(WeldRefButton, LoseFocus, weld::Widget&, void) +IMPL_LINK_NOARG(RefButton, LoseFocus, weld::Widget&, void) { maLoseFocusHdl.Call(*this); if (pRefEdit) diff --git a/formula/source/ui/dlg/parawin.cxx b/formula/source/ui/dlg/parawin.cxx index 4774b7ba415b..a255041abca8 100644 --- a/formula/source/ui/dlg/parawin.cxx +++ b/formula/source/ui/dlg/parawin.cxx @@ -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); diff --git a/formula/source/ui/dlg/parawin.hxx b/formula/source/ui/dlg/parawin.hxx index 8bb6443fed64..8af875d50337 100644 --- a/formula/source/ui/dlg/parawin.hxx +++ b/formula/source/ui/dlg/parawin.hxx @@ -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); diff --git a/include/formula/IControlReferenceHandler.hxx b/include/formula/IControlReferenceHandler.hxx index f73a7618d346..e1096c47ae38 100644 --- a/include/formula/IControlReferenceHandler.hxx +++ b/include/formula/IControlReferenceHandler.hxx @@ -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() {} diff --git a/include/formula/formula.hxx b/include/formula/formula.hxx index 7b4464e80019..5c1db3aca36b 100644 --- a/include/formula/formula.hxx +++ b/include/formula/formula.hxx @@ -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); diff --git a/include/formula/funcutl.hxx b/include/formula/funcutl.hxx index 0ed0eb59f004..7686181b40f2 100644 --- a/include/formula/funcutl.hxx +++ b/include/formula/funcutl.hxx @@ -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 diff --git a/reportdesign/source/ui/dlg/Formula.cxx b/reportdesign/source/ui/dlg/Formula.cxx index 9a2b11e8633c..919deaeec869 100644 --- a/reportdesign/source/ui/dlg/Formula.cxx +++ b/reportdesign/source/ui/dlg/Formula.cxx @@ -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(); diff --git a/reportdesign/source/ui/inc/Formula.hxx b/reportdesign/source/ui/inc/Formula.hxx index 569332e17d40..394d0b147b4e 100644 --- a/reportdesign/source/ui/inc/Formula.hxx +++ b/reportdesign/source/ui/inc/Formula.hxx @@ -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; }; diff --git a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx index 6821743fef99..0b4bf136e03f 100644 --- a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx @@ -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); diff --git a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx index 59fbb194df9f..7284cf8261eb 100644 --- a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx @@ -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 ) { diff --git a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx index 8ebaea6e488a..36558845a8ae 100644 --- a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx @@ -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"))) , mxGroupByColumnsRadio(m_xBuilder->weld_radio_button("groupedby-columns-radio")) , mxGroupByRowsRadio(m_xBuilder->weld_radio_button("groupedby-rows-radio")) , mViewData(pViewData) @@ -88,10 +88,10 @@ void ScStatisticsInputOutputDialog::Init() mxButtonOk->connect_clicked( LINK( this, ScStatisticsInputOutputDialog, OkClicked ) ); mxButtonOk->set_sensitive(false); - Link<formula::WeldRefEdit&,void> aEditLink = LINK( this, ScStatisticsInputOutputDialog, GetEditFocusHandler ); + Link<formula::RefEdit&,void> aEditLink = LINK( this, ScStatisticsInputOutputDialog, GetEditFocusHandler ); mxInputRangeEdit->SetGetFocusHdl( aEditLink ); mxOutputRangeEdit->SetGetFocusHdl( aEditLink ); - Link<formula::WeldRefButton&,void> aButtonLink = LINK( this, ScStatisticsInputOutputDialog, GetButtonFocusHandler ); + Link<formula::RefButton&,void> aButtonLink = LINK( this, ScStatisticsInputOutputDialog, GetButtonFocusHandler ); mxInputRangeButton->SetGetFocusHdl( aButtonLink ); mxOutputRangeButton->SetGetFocusHdl( aButtonLink ); @@ -102,7 +102,7 @@ void ScStatisticsInputOutputDialog::Init() mxInputRangeButton->SetLoseFocusHdl( aButtonLink ); mxOutputRangeButton->SetLoseFocusHdl( aButtonLink ); - Link<formula::WeldRefEdit&,void> aLink2 = LINK( this, ScStatisticsInputOutputDialog, RefInputModifyHandler); + Link<formula::RefEdit&,void> aLink2 = LINK( this, ScStatisticsInputOutputDialog, RefInputModifyHandler); mxInputRangeEdit->SetModifyHdl( aLink2); mxOutputRangeEdit->SetModifyHdl( aLink2); @@ -173,7 +173,7 @@ IMPL_LINK_NOARG( ScStatisticsInputOutputDialog, OkClicked, weld::Button&, void ) response(RET_OK); } -IMPL_LINK(ScStatisticsInputOutputDialog, GetEditFocusHandler, formula::WeldRefEdit&, rCtrl, void) +IMPL_LINK(ScStatisticsInputOutputDialog, GetEditFocusHandler, formula::RefEdit&, rCtrl, void) { mpActiveEdit = nullptr; @@ -186,7 +186,7 @@ IMPL_LINK(ScStatisticsInputOutputDialog, GetEditFocusHandler, formula::WeldRefEd mpActiveEdit->SelectAll(); } -IMPL_LINK(ScStatisticsInputOutputDialog, GetButtonFocusHandler, formula::WeldRefButton&, rCtrl, void) +IMPL_LINK(ScStatisticsInputOutputDialog, GetButtonFocusHandler, formula::RefButton&, rCtrl, void) { mpActiveEdit = nullptr; @@ -199,12 +199,12 @@ IMPL_LINK(ScStatisticsInputOutputDialog, GetButtonFocusHandler, formula::WeldRef mpActiveEdit->SelectAll(); } -IMPL_LINK_NOARG(ScStatisticsInputOutputDialog, LoseEditFocusHandler, formula::WeldRefEdit&, void) +IMPL_LINK_NOARG(ScStatisticsInputOutputDialog, LoseEditFocusHandler, formula::RefEdit&, void) { mDialogLostFocus = !m_xDialog->has_toplevel_focus(); } -IMPL_LINK_NOARG(ScStatisticsInputOutputDialog, LoseButtonFocusHandler, formula::WeldRefButton&, void) +IMPL_LINK_NOARG(ScStatisticsInputOutputDialog, LoseButtonFocusHandler, formula::RefButton&, void) { mDialogLostFocus = !m_xDialog->has_toplevel_focus(); } @@ -219,7 +219,7 @@ IMPL_LINK_NOARG( ScStatisticsInputOutputDialog, GroupByChanged, weld::ToggleButt ValidateDialogInput(); } -IMPL_LINK_NOARG( ScStatisticsInputOutputDialog, RefInputModifyHandler, formula::WeldRefEdit&, void ) +IMPL_LINK_NOARG( ScStatisticsInputOutputDialog, RefInputModifyHandler, formula::RefEdit&, void ) { if ( mpActiveEdit ) { diff --git a/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx index 9618474beaf2..dbc78a0dc6e1 100644 --- a/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx @@ -23,14 +23,14 @@ ScStatisticsTwoVariableDialog::ScStatisticsTwoVariableDialog( weld::Window* pParent, ScViewData* pViewData, const OUString& rUIXMLDescription, const OString& rID) : ScAnyRefDlgController(pSfxBindings, pChildWindow, pParent, rUIXMLDescription, rID) , mxVariable1RangeLabel(m_xBuilder->weld_label("variable1-range-label")) - , mxVariable1RangeEdit(new formula::WeldRefEdit(m_xBuilder->weld_entry("variable1-range-edit"))) - , mxVariable1RangeButton(new formula::WeldRefButton(m_xBuilder->weld_button("variable1-range-button"))) + , mxVariable1RangeEdit(new formula::RefEdit(m_xBuilder->weld_entry("variable1-range-edit"))) + , mxVariable1RangeButton(new formula::RefButton(m_xBuilder->weld_button("variable1-range-button"))) , mxVariable2RangeLabel(m_xBuilder->weld_label("variable2-range-label")) - , mxVariable2RangeEdit(new formula::WeldRefEdit(m_xBuilder->weld_entry("variable2-range-edit"))) - , mxVariable2RangeButton(new formula::WeldRefButton(m_xBuilder->weld_button("variable2-range-button"))) + , mxVariable2RangeEdit(new formula::RefEdit(m_xBuilder->weld_entry("variable2-range-edit"))) + , mxVariable2RangeButton(new formula::RefButton(m_xBuilder->weld_button("variable2-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"))) , mViewData(pViewData) , mDocument(pViewData->GetDocument()) , mVariable1Range(ScAddress::INITIALIZE_INVALID) @@ -67,12 +67,12 @@ void ScStatisticsTwoVariableDialog::Init() mxButtonOk->connect_clicked( LINK( this, ScStatisticsTwoVariableDialog, OkClicked ) ); mxButtonOk->set_sensitive(false); - Link<formula::WeldRefEdit&,void> aEditLink = LINK( this, ScStatisticsTwoVariableDialog, GetEditFocusHandler ); + Link<formula::RefEdit&,void> aEditLink = LINK( this, ScStatisticsTwoVariableDialog, GetEditFocusHandler ); mxVariable1RangeEdit->SetGetFocusHdl( aEditLink ); mxVariable2RangeEdit->SetGetFocusHdl( aEditLink ); mxOutputRangeEdit->SetGetFocusHdl( aEditLink ); - Link<formula::WeldRefButton&,void> aButtonLink = LINK( this, ScStatisticsTwoVariableDialog, GetButtonFocusHandler ); + Link<formula::RefButton&,void> aButtonLink = LINK( this, ScStatisticsTwoVariableDialog, GetButtonFocusHandler ); mxVariable1RangeButton->SetGetFocusHdl( aButtonLink ); mxVariable2RangeButton->SetGetFocusHdl( aButtonLink ); mxOutputRangeButton->SetGetFocusHdl( aButtonLink ); @@ -87,7 +87,7 @@ void ScStatisticsTwoVariableDialog::Init() mxVariable2RangeButton->SetLoseFocusHdl( aButtonLink ); mxOutputRangeButton->SetLoseFocusHdl( aButtonLink ); - Link<formula::WeldRefEdit&,void> aLink2 = LINK( this, ScStatisticsTwoVariableDialog, RefInputModifyHandler); + Link<formula::RefEdit&,void> aLink2 = LINK( this, ScStatisticsTwoVariableDialog, RefInputModifyHandler); mxVariable1RangeEdit->SetModifyHdl( aLink2); mxVariable2RangeEdit->SetModifyHdl( aLink2); mxOutputRangeEdit->SetModifyHdl( aLink2); @@ -185,7 +185,7 @@ IMPL_LINK_NOARG( ScStatisticsTwoVariableDialog, OkClicked, weld::Button&, void ) response(RET_OK); } -IMPL_LINK(ScStatisticsTwoVariableDialog, GetEditFocusHandler, formula::WeldRefEdit&, rCtrl, void) +IMPL_LINK(ScStatisticsTwoVariableDialog, GetEditFocusHandler, formula::RefEdit&, rCtrl, void) { mpActiveEdit = nullptr; if (&rCtrl == mxVariable1RangeEdit.get()) @@ -205,7 +205,7 @@ IMPL_LINK(ScStatisticsTwoVariableDialog, GetEditFocusHandler, formula::WeldRefEd mpActiveEdit->SelectAll(); } -IMPL_LINK( ScStatisticsTwoVariableDialog, GetButtonFocusHandler, formula::WeldRefButton&, rCtrl, void ) +IMPL_LINK( ScStatisticsTwoVariableDialog, GetButtonFocusHandler, formula::RefButton&, rCtrl, void ) { mpActiveEdit = nullptr; if (&rCtrl == mxVariable1RangeButton.get()) @@ -225,12 +225,12 @@ IMPL_LINK( ScStatisticsTwoVariableDialog, GetButtonFocusHandler, formula::WeldRe mpActiveEdit->SelectAll(); } -IMPL_LINK_NOARG( ScStatisticsTwoVariableDialog, LoseEditFocusHandler, formula::WeldRefEdit&, void ) +IMPL_LINK_NOARG( ScStatisticsTwoVariableDialog, LoseEditFocusHandler, formula::RefEdit&, void ) { mDialogLostFocus = !m_xDialog->has_toplevel_focus(); } -IMPL_LINK_NOARG( ScStatisticsTwoVariableDialog, LoseButtonFocusHandler, formula::WeldRefButton&, void ) +IMPL_LINK_NOARG( ScStatisticsTwoVariableDialog, LoseButtonFocusHandler, formula::RefButton&, void ) { mDialogLostFocus = !m_xDialog->has_toplevel_focus(); } @@ -245,7 +245,7 @@ IMPL_LINK_NOARG(ScStatisticsTwoVariableDialog, GroupByChanged, weld::ToggleButto ValidateDialogInput(); } -IMPL_LINK_NOARG( ScStatisticsTwoVariableDialog, RefInputModifyHandler, formula::WeldRefEdit&, void ) +IMPL_LINK_NOARG( ScStatisticsTwoVariableDialog, RefInputModifyHandler, formula::RefEdit&, void ) { if ( mpActiveEdit ) { diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx index 07f570b65529..a103e220a89c 100644 --- a/sc/source/ui/condformat/condformatdlg.cxx +++ b/sc/source/ui/condformat/condformatdlg.cxx @@ -423,8 +423,8 @@ ScCondFormatDlg::ScCondFormatDlg(SfxBindings* pB, SfxChildWindow* pCW, , mxBtnDown(m_xBuilder->weld_button("down")) , mxBtnCancel(m_xBuilder->weld_button("cancel")) , mxFtRange(m_xBuilder->weld_label("ftassign")) - , mxEdRange(new formula::WeldRefEdit(m_xBuilder->weld_entry("edassign"))) - , mxRbRange(new formula::WeldRefButton(m_xBuilder->weld_button("rbassign"))) + , mxEdRange(new formula::RefEdit(m_xBuilder->weld_entry("edassign"))) + , mxRbRange(new formula::RefButton(m_xBuilder->weld_button("rbassign"))) , mxCondFormList(new ScCondFormatList(this, m_xBuilder->weld_scrolled_window("listwindow"), m_xBuilder->weld_container("list"))) { @@ -530,7 +530,7 @@ bool ScCondFormatDlg::IsRefInputMode() const void ScCondFormatDlg::SetReference(const ScRange& rRef, ScDocument*) { - formula::WeldRefEdit* pEdit = mpLastEdit; + formula::RefEdit* pEdit = mpLastEdit; if (!mpLastEdit) pEdit = mxEdRange.get(); @@ -665,7 +665,7 @@ void ScCondFormatDlg::OnSelectionChange(size_t nIndex, size_t nSize, bool bSelec } } -IMPL_LINK(ScCondFormatDlg, EdRangeModifyHdl, formula::WeldRefEdit&, rEdit, void) +IMPL_LINK(ScCondFormatDlg, EdRangeModifyHdl, formula::RefEdit&, rEdit, void) { OUString aRangeStr = rEdit.GetText(); ScRangeList aRange; @@ -685,7 +685,7 @@ IMPL_LINK(ScCondFormatDlg, EdRangeModifyHdl, formula::WeldRefEdit&, rEdit, void) updateTitle(); } -IMPL_LINK(ScCondFormatDlg, RangeGetFocusHdl, formula::WeldRefEdit&, rControl, void) +IMPL_LINK(ScCondFormatDlg, RangeGetFocusHdl, formula::RefEdit&, rControl, void) { mpLastEdit = &rControl; } diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index 2a0e5f5ad34b..a55b5336622d 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -142,8 +142,8 @@ ScConditionFrmtEntry::ScConditionFrmtEntry(ScCondFormatList* pParent, ScDocument const ScAddress& rPos, const ScCondFormatEntry* pFormatEntry) : ScCondFrmtEntry(pParent, pDoc, rPos) , mxLbCondType(mxBuilder->weld_combo_box("typeis")) - , mxEdVal1(new formula::WeldRefEdit(mxBuilder->weld_entry("val1"))) - , mxEdVal2(new formula::WeldRefEdit(mxBuilder->weld_entry("val2"))) + , mxEdVal1(new formula::RefEdit(mxBuilder->weld_entry("val1"))) + , mxEdVal2(new formula::RefEdit(mxBuilder->weld_entry("val2"))) , mxFtVal(mxBuilder->weld_label("valueft")) , mxFtStyle(mxBuilder->weld_label("styleft")) , mxLbStyle(mxBuilder->weld_combo_box("style")) @@ -233,7 +233,7 @@ ScFormatEntry* ScConditionFrmtEntry::createConditionEntry() const return pEntry; } -IMPL_LINK(ScConditionFrmtEntry, OnEdChanged, formula::WeldRefEdit&, rRefEdit, void) +IMPL_LINK(ScConditionFrmtEntry, OnEdChanged, formula::RefEdit&, rRefEdit, void) { weld::Entry& rEdit = *rRefEdit.GetWidget(); OUString aFormula = rEdit.get_text(); @@ -488,7 +488,7 @@ ScFormulaFrmtEntry::ScFormulaFrmtEntry(ScCondFormatList* pParent, ScDocument* pD , mxLbStyle(mxBuilder->weld_combo_box("style")) , mxWdPreviewWin(mxBuilder->weld_widget("previewwin")) , mxWdPreview(new weld::CustomWeld(*mxBuilder, "preview", maWdPreview)) - , mxEdFormula(new formula::WeldRefEdit(mxBuilder->weld_entry("formula"))) + , mxEdFormula(new formula::RefEdit(mxBuilder->weld_entry("formula"))) { mxWdPreview->set_size_request(-1, mxLbStyle->get_preferred_size().Height()); diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx b/sc/source/ui/dbgui/PivotLayoutDialog.cxx index 070c75c62714..0efce49f4f99 100644 --- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx +++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx @@ -93,14 +93,14 @@ ScPivotLayoutDialog::ScPivotLayoutDialog( , mxSourceRadioNamedRange(m_xBuilder->weld_radio_button("source-radio-named-range")) , mxSourceRadioSelection(m_xBuilder->weld_radio_button("source-radio-selection")) , mxSourceListBox(m_xBuilder->weld_combo_box("source-list")) - , mxSourceEdit(new formula::WeldRefEdit(m_xBuilder->weld_entry("source-edit"))) - , mxSourceButton(new formula::WeldRefButton(m_xBuilder->weld_button("source-button"))) + , mxSourceEdit(new formula::RefEdit(m_xBuilder->weld_entry("source-edit"))) + , mxSourceButton(new formula::RefButton(m_xBuilder->weld_button("source-button"))) , mxDestinationRadioNewSheet(m_xBuilder->weld_radio_button("destination-radio-new-sheet")) , mxDestinationRadioNamedRange(m_xBuilder->weld_radio_button("destination-radio-named-range")) , mxDestinationRadioSelection(m_xBuilder->weld_radio_button("destination-radio-selection")) , mxDestinationListBox(m_xBuilder->weld_combo_box("destination-list")) - , mxDestinationEdit(new formula::WeldRefEdit(m_xBuilder->weld_entry("destination-edit"))) - , mxDestinationButton(new formula::WeldRefButton(m_xBuilder->weld_button("destination-button"))) + , mxDestinationEdit(new formula::RefEdit(m_xBuilder->weld_entry("destination-edit"))) + , mxDestinationButton(new formula::RefButton(m_xBuilder->weld_button("destination-button"))) , mxBtnOK(m_xBuilder->weld_button("ok")) , mxBtnCancel(m_xBuilder->weld_button("cancel")) , mxSourceFrame(m_xBuilder->weld_frame("frame2")) @@ -118,7 +118,7 @@ ScPivotLayoutDialog::ScPivotLayoutDialog( mxSourceEdit->SetReferences(this, mxSourceLabel.get()); mxSourceButton->SetReferences(this, mxSourceEdit.get()); - Link<formula::WeldRefEdit&,void> aEditLink = LINK(this, ScPivotLayoutDialog, GetEditFocusHandler); + Link<formula::RefEdit&,void> aEditLink = LINK(this, ScPivotLayoutDialog, GetEditFocusHandler); mxDestinationEdit->SetGetFocusHdl(aEditLink); mxSourceEdit->SetGetFocusHdl(aEditLink); @@ -138,7 +138,7 @@ ScPivotLayoutDialog::ScPivotLayoutDialog( mxDestinationEdit->SetReferences(this, mxDestLabel.get()); mxDestinationButton->SetReferences(this, mxDestinationEdit.get()); - Link<formula::WeldRefButton&,void> aButtonLink = LINK(this, ScPivotLayoutDialog, GetButtonFocusHandler); + Link<formula::RefButton&,void> aButtonLink = LINK(this, ScPivotLayoutDialog, GetButtonFocusHandler); mxSourceButton->SetGetFocusHdl(aButtonLink); mxDestinationButton->SetGetFocusHdl(aButtonLink); @@ -637,13 +637,13 @@ IMPL_LINK_NOARG( ScPivotLayoutDialog, CancelClicked, weld::Button&, void ) m_xDialog->response(RET_CANCEL); } -IMPL_LINK(ScPivotLayoutDialog, GetEditFocusHandler, formula::WeldRefEdit&, rCtrl, void) +IMPL_LINK(ScPivotLayoutDialog, GetEditFocusHandler, formula::RefEdit&, rCtrl, void) { mpActiveEdit = &rCtrl; mpActiveEdit->SelectAll(); } -IMPL_LINK(ScPivotLayoutDialog, GetButtonFocusHandler, formula::WeldRefButton&, rCtrl, void) +IMPL_LINK(ScPivotLayoutDialog, GetButtonFocusHandler, formula::RefButton&, rCtrl, void) { mpActiveEdit = nullptr; @@ -656,12 +656,12 @@ IMPL_LINK(ScPivotLayoutDialog, GetButtonFocusHandler, formula::WeldRefButton&, r mpActiveEdit->SelectAll(); } -IMPL_LINK_NOARG(ScPivotLayoutDialog, LoseEditFocusHandler, formula::WeldRefEdit&, void) +IMPL_LINK_NOARG(ScPivotLayoutDialog, LoseEditFocusHandler, formula::RefEdit&, void) { mbDialogLostFocus = !m_xDialog->has_toplevel_focus(); } -IMPL_LINK_NOARG(ScPivotLayoutDialog, LoseButtonFocusHandler, formula::WeldRefButton&, void) +IMPL_LINK_NOARG(ScPivotLayoutDialog, LoseButtonFocusHandler, formula::RefButton&, void) { mbDialogLostFocus = !m_xDialog->has_toplevel_focus(); } @@ -671,7 +671,7 @@ IMPL_LINK_NOARG(ScPivotLayoutDialog, SourceListSelected, weld::ComboBox&, void) UpdateSourceRange(); } -IMPL_LINK_NOARG(ScPivotLayoutDialog, SourceEditModified, formula::WeldRefEdit&, void) +IMPL_LINK_NOARG(ScPivotLayoutDialog, SourceEditModified, formula::RefEdit&, void) { UpdateSourceRange(); } diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx index 26778575f672..d5a1de99c164 100644 --- a/sc/source/ui/dbgui/consdlg.cxx +++ b/sc/source/ui/dbgui/consdlg.cxx @@ -84,11 +84,11 @@ ScConsolidateDlg::ScConsolidateDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::W , m_xLbFunc(m_xBuilder->weld_combo_box("func")) , m_xLbConsAreas(m_xBuilder->weld_tree_view("consareas")) , m_xLbDataArea(m_xBuilder->weld_combo_box("lbdataarea")) - , m_xEdDataArea(new formula::WeldRefEdit(m_xBuilder->weld_entry("eddataarea"))) - , m_xRbDataArea(new formula::WeldRefButton(m_xBuilder->weld_button("rbdataarea"))) + , m_xEdDataArea(new formula::RefEdit(m_xBuilder->weld_entry("eddataarea"))) + , m_xRbDataArea(new formula::RefButton(m_xBuilder->weld_button("rbdataarea"))) , m_xLbDestArea(m_xBuilder->weld_combo_box("lbdestarea")) - , m_xEdDestArea(new formula::WeldRefEdit(m_xBuilder->weld_entry("eddestarea"))) - , m_xRbDestArea(new formula::WeldRefButton(m_xBuilder->weld_button("rbdestarea"))) + , m_xEdDestArea(new formula::RefEdit(m_xBuilder->weld_entry("eddestarea"))) + , m_xRbDestArea(new formula::RefButton(m_xBuilder->weld_button("rbdestarea"))) , m_xExpander(m_xBuilder->weld_expander("more")) , m_xBtnByRow(m_xBuilder->weld_check_button("byrow")) , m_xBtnByCol(m_xBuilder->weld_check_button("bycol")) @@ -283,7 +283,7 @@ void ScConsolidateDlg::Deactivate() bDlgLostFocus = true; } -bool ScConsolidateDlg::VerifyEdit( formula::WeldRefEdit* pEd ) +bool ScConsolidateDlg::VerifyEdit( formula::RefEdit* pEd ) { if ( !pRangeUtil || !pDoc || ((pEd != m_xEdDataArea.get()) && (pEd != m_xEdDestArea.get())) ) @@ -316,7 +316,7 @@ bool ScConsolidateDlg::VerifyEdit( formula::WeldRefEdit* pEd ) // Handler: -IMPL_LINK( ScConsolidateDlg, GetEditFocusHdl, formula::WeldRefEdit&, rControl, void ) +IMPL_LINK( ScConsolidateDlg, GetEditFocusHdl, formula::RefEdit&, rControl, void ) { m_pRefInputEdit = &rControl; } @@ -447,7 +447,7 @@ IMPL_LINK( ScConsolidateDlg, SelectTVHdl, weld::TreeView&, rLb, void ) IMPL_LINK( ScConsolidateDlg, SelectCBHdl, weld::ComboBox&, rLb, void ) { - formula::WeldRefEdit* pEd = (&rLb == m_xLbDataArea.get()) ? m_xEdDataArea.get() : m_xEdDestArea.get(); + formula::RefEdit* pEd = (&rLb == m_xLbDataArea.get()) ? m_xEdDataArea.get() : m_xEdDestArea.get(); const sal_Int32 nSelPos = rLb.get_active(); if ( pRangeUtil @@ -476,7 +476,7 @@ IMPL_LINK( ScConsolidateDlg, SelectCBHdl, weld::ComboBox&, rLb, void ) } } -IMPL_LINK( ScConsolidateDlg, ModifyHdl, formula::WeldRefEdit&, rEd, void ) +IMPL_LINK( ScConsolidateDlg, ModifyHdl, formula::RefEdit&, rEd, void ) { if ( &rEd == m_xEdDataArea.get() ) { diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx index 0299367a240f..c0f656035311 100644 --- a/sc/source/ui/dbgui/dbnamdlg.cxx +++ b/sc/source/ui/dbgui/dbnamdlg.cxx @@ -56,7 +56,7 @@ namespace class DBSaveData { public: - DBSaveData( formula::WeldRefEdit& rEd, weld::CheckButton& rHdr, weld::CheckButton& rTot, weld::CheckButton& rSize, weld::CheckButton& rFmt, + DBSaveData( formula::RefEdit& rEd, weld::CheckButton& rHdr, weld::CheckButton& rTot, weld::CheckButton& rSize, weld::CheckButton& rFmt, weld::CheckButton& rStrip, ScRange& rArea ) : rEdAssign(rEd) , rBtnHeader(rHdr) @@ -77,7 +77,7 @@ public: void Restore(); private: - formula::WeldRefEdit& rEdAssign; + formula::RefEdit& rEdAssign; weld::CheckButton& rBtnHeader; weld::CheckButton& rBtnTotals; weld::CheckButton& rBtnSize; @@ -134,8 +134,8 @@ ScDbNameDlg::ScDbNameDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pPa , aLocalDbCol(*(pDoc->GetDBCollection())) , m_xEdName(m_xBuilder->weld_entry_tree_view("entrygrid", "entry", "entry-list")) , m_xAssignFrame(m_xBuilder->weld_frame("RangeFrame")) - , m_xEdAssign(new formula::WeldRefEdit(m_xBuilder->weld_entry("assign"))) - , m_xRbAssign(new formula::WeldRefButton(m_xBuilder->weld_button("assignrb"))) + , m_xEdAssign(new formula::RefEdit(m_xBuilder->weld_entry("assign"))) + , m_xRbAssign(new formula::RefButton(m_xBuilder->weld_button("assignrb"))) , m_xOptions(m_xBuilder->weld_widget("Options")) , m_xBtnHeader(m_xBuilder->weld_check_button("ContainsColumnLabels")) , m_xBtnTotals(m_xBuilder->weld_check_button("ContainsTotalsRow")) @@ -605,7 +605,7 @@ IMPL_LINK_NOARG(ScDbNameDlg, NameModifyHdl, weld::ComboBox&, void) } } -IMPL_LINK_NOARG(ScDbNameDlg, AssModifyHdl, formula::WeldRefEdit&, void) +IMPL_LINK_NOARG(ScDbNameDlg, AssModifyHdl, formula::RefEdit&, void) { // parse here for Save(), etc. diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx index 9a2686cb57ee..eec177bb2f91 100644 --- a/sc/source/ui/dbgui/filtdlg.cxx +++ b/sc/source/ui/dbgui/filtdlg.cxx @@ -88,8 +88,8 @@ ScFilterDlg::ScFilterDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pPa , m_xBtnUnique(m_xBuilder->weld_check_button("unique")) , m_xBtnCopyResult(m_xBuilder->weld_check_button("copyresult")) , m_xLbCopyArea(m_xBuilder->weld_combo_box("lbcopyarea")) - , m_xEdCopyArea(new formula::WeldRefEdit(m_xBuilder->weld_entry("edcopyarea"))) - , m_xRbCopyArea(new formula::WeldRefButton(m_xBuilder->weld_button("rbcopyarea"))) + , m_xEdCopyArea(new formula::RefEdit(m_xBuilder->weld_entry("edcopyarea"))) + , m_xRbCopyArea(new formula::RefButton(m_xBuilder->weld_button("rbcopyarea"))) , m_xBtnDestPers(m_xBuilder->weld_check_button("destpers")) , m_xFtDbAreaLabel(m_xBuilder->weld_label("dbarealabel")) , m_xFtDbArea(m_xBuilder->weld_label("dbarea")) diff --git a/sc/source/ui/dbgui/foptmgr.cxx b/sc/source/ui/dbgui/foptmgr.cxx index 4ceedd4934bf..84fb097dd97e 100644 --- a/sc/source/ui/dbgui/foptmgr.cxx +++ b/sc/source/ui/dbgui/foptmgr.cxx @@ -41,8 +41,8 @@ ScFilterOptionsMgr::ScFilterOptionsMgr( weld::CheckButton* refBtnCopyResult, weld::CheckButton* refBtnDestPers, weld::ComboBox* refLbCopyArea, - formula::WeldRefEdit* refEdCopyArea, - formula::WeldRefButton* refRbCopyArea, + formula::RefEdit* refEdCopyArea, + formula::RefButton* refRbCopyArea, weld::Label* refFtDbAreaLabel, weld::Label* refFtDbArea, const OUString& refStrUndefined ) @@ -213,7 +213,7 @@ IMPL_LINK( ScFilterOptionsMgr, LbAreaSelHdl, weld::ComboBox&, rLb, void ) } } -IMPL_LINK( ScFilterOptionsMgr, EdAreaModifyHdl, formula::WeldRefEdit&, rEd, void ) +IMPL_LINK( ScFilterOptionsMgr, EdAreaModifyHdl, formula::RefEdit&, rEd, void ) { if ( &rEd == pEdCopyArea ) { diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx index 6bfed89324e5..71b1693e225c 100644 --- a/sc/source/ui/dbgui/sfiltdlg.cxx +++ b/sc/source/ui/dbgui/sfiltdlg.cxx @@ -64,8 +64,8 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, we , bRefInputMode(false) , m_pRefInputEdit(nullptr) , m_xLbFilterArea(m_xBuilder->weld_combo_box("lbfilterarea")) - , m_xEdFilterArea(new formula::WeldRefEdit(m_xBuilder->weld_entry("edfilterarea"))) - , m_xRbFilterArea(new formula::WeldRefButton(m_xBuilder->weld_button("rbfilterarea"))) + , m_xEdFilterArea(new formula::RefEdit(m_xBuilder->weld_entry("edfilterarea"))) + , m_xRbFilterArea(new formula::RefButton(m_xBuilder->weld_button("rbfilterarea"))) , m_xExpander(m_xBuilder->weld_expander("more")) , m_xBtnCase(m_xBuilder->weld_check_button("case")) , m_xBtnRegExp(m_xBuilder->weld_check_button("regexp")) @@ -73,8 +73,8 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, we , m_xBtnUnique(m_xBuilder->weld_check_button("unique")) , m_xBtnCopyResult(m_xBuilder->weld_check_button("copyresult")) , m_xLbCopyArea(m_xBuilder->weld_combo_box("lbcopyarea")) - , m_xEdCopyArea(new formula::WeldRefEdit(m_xBuilder->weld_entry("edcopyarea"))) - , m_xRbCopyArea(new formula::WeldRefButton(m_xBuilder->weld_button("rbcopyarea"))) + , m_xEdCopyArea(new formula::RefEdit(m_xBuilder->weld_entry("edcopyarea"))) + , m_xRbCopyArea(new formula::RefButton(m_xBuilder->weld_button("rbcopyarea"))) , m_xBtnDestPers(m_xBuilder->weld_check_button("destpers")) , m_xFtDbAreaLabel(m_xBuilder->weld_label("dbarealabel")) , m_xFtDbArea(m_xBuilder->weld_label("dbarea")) @@ -90,8 +90,8 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, we Init( rArgSet ); - Link<formula::WeldRefEdit&, void> aLinkEdit = LINK(this, ScSpecialFilterDlg, RefInputEditHdl); - Link<formula::WeldRefButton&, void> aLinkButton = LINK(this, ScSpecialFilterDlg, RefInputButtonHdl); + Link<formula::RefEdit&, void> aLinkEdit = LINK(this, ScSpecialFilterDlg, RefInputEditHdl); + Link<formula::RefButton&, void> aLinkButton = LINK(this, ScSpecialFilterDlg, RefInputButtonHdl); m_xEdCopyArea->SetGetFocusHdl(aLinkEdit); m_xRbCopyArea->SetGetFocusHdl(aLinkButton); m_xEdFilterArea->SetGetFocusHdl(aLinkEdit); @@ -359,12 +359,12 @@ IMPL_LINK(ScSpecialFilterDlg, EndDlgHdl, weld::Button&, rBtn, void) } } -IMPL_LINK_NOARG(ScSpecialFilterDlg, RefInputEditHdl, formula::WeldRefEdit&, void) +IMPL_LINK_NOARG(ScSpecialFilterDlg, RefInputEditHdl, formula::RefEdit&, void) { RefInputHdl(); } -IMPL_LINK_NOARG(ScSpecialFilterDlg, RefInputButtonHdl, formula::WeldRefButton&, void) +IMPL_LINK_NOARG(ScSpecialFilterDlg, RefInputButtonHdl, formula::RefButton&, void) { RefInputHdl(); } @@ -405,7 +405,7 @@ IMPL_LINK(ScSpecialFilterDlg, FilterAreaSelHdl, weld::ComboBox&, rLb, void) } } -IMPL_LINK( ScSpecialFilterDlg, FilterAreaModHdl, formula::WeldRefEdit&, rEd, void ) +IMPL_LINK( ScSpecialFilterDlg, FilterAreaModHdl, formula::RefEdit&, rEd, void ) { if (&rEd == m_xEdFilterArea.get()) { diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx index c9c8bbc84be9..c611fd3933fb 100644 --- a/sc/source/ui/dbgui/validate.cxx +++ b/sc/source/ui/dbgui/validate.cxx @@ -126,7 +126,7 @@ void ScTPValidationValue:: SetActiveHdl() } } -void ScTPValidationValue::RefInputStartPreHdl( formula::WeldRefEdit* pEdit, const formula::WeldRefButton* pButton ) +void ScTPValidationValue::RefInputStartPreHdl( formula::RefEdit* pEdit, const formula::RefButton* pButton ) { if (ScValidationDlg *pValidationDlg = GetValidationDlg()) { @@ -343,12 +343,12 @@ ScTPValidationValue::ScTPValidationValue(TabPageParent pParent, const SfxItemSet , m_xLbValue(m_xBuilder->weld_combo_box("data")) , m_xFtMin(m_xBuilder->weld_label("minft")) , m_xMinGrid(m_xBuilder->weld_widget("mingrid")) - , m_xEdMin(new formula::WeldRefEdit(m_xBuilder->weld_entry("min"))) + , m_xEdMin(new formula::RefEdit(m_xBuilder->weld_entry("min"))) , m_xEdList(m_xBuilder->weld_text_view("minlist")) , m_xFtMax(m_xBuilder->weld_label("maxft")) - , m_xEdMax(new formula::WeldRefEdit(m_xBuilder->weld_entry("max"))) + , m_xEdMax(new formula::RefEdit(m_xBuilder->weld_entry("max"))) , m_xFtHint(m_xBuilder->weld_label("hintft")) - , m_xBtnRef(new formula::WeldRefButton(m_xBuilder->weld_button("validref"))) + , m_xBtnRef(new formula::RefButton(m_xBuilder->weld_button("validref"))) , m_xRefGrid(m_xBuilder->weld_container("refgrid")) , m_pRefEditParent(m_xRefGrid.get()) , m_pBtnRefParent(m_xRefGrid.get()) @@ -578,7 +578,7 @@ void ScTPValidationValue::RemoveRefDlg(bool bRestoreModal) } } -IMPL_LINK_NOARG(ScTPValidationValue, EditSetFocusHdl, formula::WeldRefEdit&, void) +IMPL_LINK_NOARG(ScTPValidationValue, EditSetFocusHdl, formula::RefEdit&, void) { const sal_Int32 nPos = m_xLbAllow->get_active(); @@ -588,7 +588,7 @@ IMPL_LINK_NOARG(ScTPValidationValue, EditSetFocusHdl, formula::WeldRefEdit&, voi } } -IMPL_LINK( ScTPValidationValue, KillEditFocusHdl, formula::WeldRefEdit&, rWnd, void ) +IMPL_LINK( ScTPValidationValue, KillEditFocusHdl, formula::RefEdit&, rWnd, void ) { if (&rWnd != m_pRefEdit) return; @@ -604,7 +604,7 @@ IMPL_LINK( ScTPValidationValue, KillEditFocusHdl, formula::WeldRefEdit&, rWnd, v } } -IMPL_LINK( ScTPValidationValue, KillButtonFocusHdl, formula::WeldRefButton&, rWnd, void ) +IMPL_LINK( ScTPValidationValue, KillButtonFocusHdl, formula::RefButton&, rWnd, void ) { if( &rWnd != m_xBtnRef.get()) return; @@ -909,7 +909,7 @@ bool ScValidationDlg::RemoveRefDlg( bool bRestoreModal /* = true */ ) return true; } -IMPL_LINK_NOARG(ScTPValidationValue, ClickHdl, formula::WeldRefButton&, void) +IMPL_LINK_NOARG(ScTPValidationValue, ClickHdl, formula::RefButton&, void) { SetupRefDlg(); } diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx index 780bd1d65985..3c412a95aa16 100644 --- a/sc/source/ui/formdlg/formula.cxx +++ b/sc/source/ui/formdlg/formula.cxx @@ -380,16 +380,8 @@ std::unique_ptr<formula::FormulaCompiler> ScFormulaDlg::createCompiler( formula: // virtual methods of ScAnyRefDlg: void ScFormulaDlg::RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton ) { - pEdit->SetSelection(Selection(0, SELECTION_MAX)); - ::std::pair<formula::RefButton*,formula::RefEdit*> aPair = RefInputStartBefore( pEdit, pButton ); - m_aHelper.RefInputStart( aPair.second, aPair.first); - RefInputStartAfter(); -} - -void ScFormulaDlg::RefInputStart( formula::WeldRefEdit* pEdit, formula::WeldRefButton* pButton ) -{ pEdit->SelectAll(); - ::std::pair<formula::WeldRefButton*,formula::WeldRefEdit*> aPair = RefInputStartBefore( pEdit, pButton ); + ::std::pair<formula::RefButton*,formula::RefEdit*> aPair = RefInputStartBefore( pEdit, pButton ); m_aHelper.RefInputStart( aPair.second, aPair.first); RefInputStartAfter(); } @@ -528,22 +520,17 @@ bool ScFormulaDlg::IsTableLocked( ) const // default: reference input can also be used to switch the table return false; } + void ScFormulaDlg::ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton) { m_aHelper.ToggleCollapsed(pEdit,pButton); } -void ScFormulaDlg::ToggleCollapsed( formula::WeldRefEdit* pEdit, formula::WeldRefButton* pButton) -{ - m_aHelper.ToggleCollapsed(pEdit,pButton); -} + void ScFormulaDlg::ReleaseFocus( formula::RefEdit* pEdit) { m_aHelper.ReleaseFocus(pEdit); } -void ScFormulaDlg::ReleaseFocus( formula::WeldRefEdit* pEdit) -{ - m_aHelper.ReleaseFocus(pEdit); -} + void ScFormulaDlg::dispatch(bool _bOK, bool _bMatrixChecked) { SfxBoolItem aRetItem( SID_DLG_RETOK, _bOK ); diff --git a/sc/source/ui/inc/IAnyRefDialog.hxx b/sc/source/ui/inc/IAnyRefDialog.hxx index 486322936ba8..0e4f81f41572 100644 --- a/sc/source/ui/inc/IAnyRefDialog.hxx +++ b/sc/source/ui/inc/IAnyRefDialog.hxx @@ -36,7 +36,6 @@ public: virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) = 0; virtual void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = nullptr ) = 0; - virtual void RefInputStart( formula::WeldRefEdit* pEdit, formula::WeldRefButton* pButton = nullptr ) = 0; virtual void RefInputDone( bool bForced = false ) = 0; virtual bool IsTableLocked() const = 0; virtual bool IsRefInputMode() const = 0; diff --git a/sc/source/ui/inc/PivotLayoutDialog.hxx b/sc/source/ui/inc/PivotLayoutDialog.hxx index 55a476b86faf..ca78e004bb74 100644 --- a/sc/source/ui/inc/PivotLayoutDialog.hxx +++ b/sc/source/ui/inc/PivotLayoutDialog.hxx @@ -49,7 +49,7 @@ private: ScAddress::Details const maAddressDetails; bool mbDialogLostFocus; - formula::WeldRefEdit* mpActiveEdit; + formula::RefEdit* mpActiveEdit; std::unique_ptr<ScPivotLayoutTreeListLabel> mxListBoxField; std::unique_ptr<ScPivotLayoutTreeList> mxListBoxPage; std::unique_ptr<ScPivotLayoutTreeList> mxListBoxColumn; @@ -67,16 +67,16 @@ private: std::unique_ptr<weld::RadioButton> mxSourceRadioSelection; std::unique_ptr<weld::ComboBox> mxSourceListBox; - std::unique_ptr<formula::WeldRefEdit> mxSourceEdit; - std::unique_ptr<formula::WeldRefButton> mxSourceButton; + std::unique_ptr<formula::RefEdit> mxSourceEdit; + std::unique_ptr<formula::RefButton> mxSourceButton; std::unique_ptr<weld::RadioButton> mxDestinationRadioNewSheet; std::unique_ptr<weld::RadioButton> mxDestinationRadioNamedRange; std::unique_ptr<weld::RadioButton> mxDestinationRadioSelection; std::unique_ptr<weld::ComboBox> mxDestinationListBox; - std::unique_ptr<formula::WeldRefEdit> mxDestinationEdit; - std::unique_ptr<formula::WeldRefButton> mxDestinationButton; + std::unique_ptr<formula::RefEdit> mxDestinationEdit; + std::unique_ptr<formula::RefButton> mxDestinationButton; std::unique_ptr<weld::Button> mxBtnOK; std::unique_ptr<weld::Button> mxBtnCancel; @@ -91,14 +91,14 @@ private: DECL_LINK(CancelClicked, weld::Button&, void); DECL_LINK(OKClicked, weld::Button&, void); - DECL_LINK(GetEditFocusHandler, formula::WeldRefEdit&, void); - DECL_LINK(GetButtonFocusHandler, formula::WeldRefButton&, void); - DECL_LINK(LoseEditFocusHandler, formula::WeldRefEdit&, void); - DECL_LINK(LoseButtonFocusHandler, formula::WeldRefButton&, void); + DECL_LINK(GetEditFocusHandler, formula::RefEdit&, void); + DECL_LINK(GetButtonFocusHandler, formula::RefButton&, void); + DECL_LINK(LoseEditFocusHandler, formula::RefEdit&, void); + DECL_LINK(LoseButtonFocusHandler, formula::RefButton&, void); DECL_LINK(ToggleSource, weld::ToggleButton&, void); DECL_LINK(ToggleDestination, weld::ToggleButton&, void); DECL_LINK(SourceListSelected, weld::ComboBox&, void); - DECL_LINK(SourceEditModified, formula::WeldRefEdit&, void); + DECL_LINK(SourceEditModified, formula::RefEdit&, void); void ToggleSource(); void ToggleDestination(); virtual void Close() override; diff --git a/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx b/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx index a281fb734566..a013d25c53c6 100644 --- a/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx +++ b/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx @@ -44,8 +44,8 @@ private: // Widgets std::unique_ptr<weld::Label> mxInputRangeText; - std::unique_ptr<formula::WeldRefEdit> mxInputRangeEdit; - std::unique_ptr<formula::WeldRefButton> mxInputRangeButton; + std::unique_ptr<formula::RefEdit> mxInputRangeEdit; + std::unique_ptr<formula::RefButton> mxInputRangeButton; std::unique_ptr<weld::ComboBox> mxDistributionCombo; std::unique_ptr<weld::Label> mxParameter1Text; std::unique_ptr<weld::SpinButton> mxParameter1Value; @@ -71,12 +71,12 @@ private: DECL_LINK( OkClicked, weld::Button&, void ); DECL_LINK( CloseClicked, weld::Button&, void ); DECL_LINK( ApplyClicked, weld::Button&, void ); - DECL_LINK( GetEditFocusHandler, formula::WeldRefEdit&, void ); - DECL_LINK( GetButtonFocusHandler, formula::WeldRefButton&, void ); - DECL_LINK( LoseEditFocusHandler, formula::WeldRefEdit&, void ); - DECL_LINK( LoseButtonFocusHandler, formula::WeldRefButton&, void ); + DECL_LINK( GetEditFocusHandler, formula::RefEdit&, void ); + DECL_LINK( GetButtonFocusHandler, formula::RefButton&, void ); + DECL_LINK( LoseEditFocusHandler, formula::RefEdit&, void ); + DECL_LINK( LoseButtonFocusHandler, formula::RefButton&, void ); - DECL_LINK( InputRangeModified, formula::WeldRefEdit&, void ); + DECL_LINK( InputRangeModified, formula::RefEdit&, void ); DECL_LINK( Parameter1ValueModified, weld::SpinButton&, void ); DECL_LINK( Parameter2ValueModified, weld::SpinButton&, void ); DECL_LINK( DistributionChanged, weld::ComboBox&, void ); diff --git a/sc/source/ui/inc/SamplingDialog.hxx b/sc/source/ui/inc/SamplingDialog.hxx index 7b0751cc4782..a702bdf2871c 100644 --- a/sc/source/ui/inc/SamplingDialog.hxx +++ b/sc/source/ui/inc/SamplingDialog.hxx @@ -31,7 +31,7 @@ public: virtual void Close() override; private: - formula::WeldRefEdit* mpActiveEdit; + formula::RefEdit* mpActiveEdit; // Data ScViewData* const mViewData; @@ -50,12 +50,12 @@ private: // Widgets std::unique_ptr<weld::Label> mxInputRangeLabel; - std::unique_ptr<formula::WeldRefEdit> mxInputRangeEdit; - std::unique_ptr<formula::WeldRefButton> mxInputRangeButton; + std::unique_ptr<formula::RefEdit> mxInputRangeEdit; + std::unique_ptr<formula::RefButton> mxInputRangeButton; std::unique_ptr<weld::Label> mxOutputRangeLabel; - std::unique_ptr<formula::WeldRefEdit> mxOutputRangeEdit; - std::unique_ptr<formula::WeldRefButton> mxOutputRangeButton; + std::unique_ptr<formula::RefEdit> mxOutputRangeEdit; + std::unique_ptr<formula::RefButton> mxOutputRangeButton; std::unique_ptr<weld::SpinButton> mxSampleSize; std::unique_ptr<weld::SpinButton> mxPeriod; @@ -78,14 +78,14 @@ private: ScRange PerformPeriodicSampling(ScDocShell* pDocShell); DECL_LINK( OkClicked, weld::Button&, void ); - DECL_LINK( GetEditFocusHandler, formula::WeldRefEdit&, void ); - DECL_LINK( GetButtonFocusHandler, formula::WeldRefButton&, void ); - DECL_LINK( LoseEditFocusHandler, formula::WeldRefEdit&, void ); - DECL_LINK( LoseButtonFocusHandler, formula::WeldRefButton&, void ); + DECL_LINK( GetEditFocusHandler, formula::RefEdit&, void ); + DECL_LINK( GetButtonFocusHandler, formula::RefButton&, void ); + DECL_LINK( LoseEditFocusHandler, formula::RefEdit&, void ); + DECL_LINK( LoseButtonFocusHandler, formula::RefButton&, void ); DECL_LINK( SamplingSizeValueModified, weld::SpinButton&, void ); DECL_LINK( PeriodValueModified, weld::SpinButton&, void ); DECL_LINK( ToggleSamplingMethod, weld::ToggleButton&, void ); - DECL_LINK( RefInputModifyHandler, formula::WeldRefEdit&, void ); + DECL_LINK( RefInputModifyHandler, formula::RefEdit&, void ); DECL_LINK( CheckHdl, weld::Button&, void ); void ToggleSamplingMethod(); }; diff --git a/sc/source/ui/inc/StatisticsInputOutputDialog.hxx b/sc/source/ui/inc/StatisticsInputOutputDialog.hxx index cd689a85db15..e7727b95071c 100644 --- a/sc/source/ui/inc/StatisticsInputOutputDialog.hxx +++ b/sc/source/ui/inc/StatisticsInputOutputDialog.hxx @@ -46,12 +46,12 @@ protected: // Widgets std::unique_ptr<weld::Label> mxInputRangeLabel; - std::unique_ptr<formula::WeldRefEdit> mxInputRangeEdit; - std::unique_ptr<formula::WeldRefButton> mxInputRangeButton; + std::unique_ptr<formula::RefEdit> mxInputRangeEdit; + std::unique_ptr<formula::RefButton> mxInputRangeButton; std::unique_ptr<weld::Label> mxOutputRangeLabel; - std::unique_ptr<formula::WeldRefEdit> mxOutputRangeEdit; - std::unique_ptr<formula::WeldRefButton> mxOutputRangeButton; + std::unique_ptr<formula::RefEdit> mxOutputRangeEdit; + std::unique_ptr<formula::RefButton> mxOutputRangeButton; std::unique_ptr<weld::RadioButton> mxGroupByColumnsRadio; std::unique_ptr<weld::RadioButton> mxGroupByRowsRadio; @@ -72,7 +72,7 @@ private: // Widgets std::unique_ptr<weld::Button> mxButtonOk; - formula::WeldRefEdit* mpActiveEdit; + formula::RefEdit* mpActiveEdit; ScAddress const mCurrentAddress; bool mDialogLostFocus; @@ -81,11 +81,11 @@ private: DECL_LINK( GroupByChanged, weld::ToggleButton&, void ); DECL_LINK( OkClicked, weld::Button&, void ); - DECL_LINK( GetEditFocusHandler, formula::WeldRefEdit&, void ); - DECL_LINK( GetButtonFocusHandler, formula::WeldRefButton&, void ); - DECL_LINK( LoseEditFocusHandler, formula::WeldRefEdit&, void ); - DECL_LINK( LoseButtonFocusHandler, formula::WeldRefButton&, void ); - DECL_LINK( RefInputModifyHandler, formula::WeldRefEdit&, void ); + DECL_LINK( GetEditFocusHandler, formula::RefEdit&, void ); + DECL_LINK( GetButtonFocusHandler, formula::RefButton&, void ); + DECL_LINK( LoseEditFocusHandler, formula::RefEdit&, void ); + DECL_LINK( LoseButtonFocusHandler, formula::RefButton&, void ); + DECL_LINK( RefInputModifyHandler, formula::RefEdit&, void ); }; diff --git a/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx b/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx index bf4db74c2fd6..430201926f86 100644 --- a/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx +++ b/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx @@ -45,16 +45,16 @@ protected: // Widgets std::unique_ptr<weld::Label> mxVariable1RangeLabel; - std::unique_ptr<formula::WeldRefEdit> mxVariable1RangeEdit; - std::unique_ptr<formula::WeldRefButton> mxVariable1RangeButton; + std::unique_ptr<formula::RefEdit> mxVariable1RangeEdit; + std::unique_ptr<formula::RefButton> mxVariable1RangeButton; std::unique_ptr<weld::Label> mxVariable2RangeLabel; - std::unique_ptr<formula::WeldRefEdit> mxVariable2RangeEdit; - std::unique_ptr<formula::WeldRefButton> mxVariable2RangeButton; + std::unique_ptr<formula::RefEdit> mxVariable2RangeEdit; + std::unique_ptr<formula::RefButton> mxVariable2RangeButton; std::unique_ptr<weld::Label> mxOutputRangeLabel; - std::unique_ptr<formula::WeldRefEdit> mxOutputRangeEdit; - std::unique_ptr<formula::WeldRefButton> mxOutputRangeButton; + std::unique_ptr<formula::RefEdit> mxOutputRangeEdit; + std::unique_ptr<formula::RefButton> mxOutputRangeButton; // Data ScViewData* const mViewData; @@ -74,7 +74,7 @@ private: std::unique_ptr<weld::RadioButton> mxGroupByColumnsRadio; std::unique_ptr<weld::RadioButton> mxGroupByRowsRadio; - formula::WeldRefEdit* mpActiveEdit; + formula::RefEdit* mpActiveEdit; ScAddress const mCurrentAddress; bool mDialogLostFocus; @@ -83,11 +83,11 @@ private: DECL_LINK( GroupByChanged, weld::ToggleButton&, void ); DECL_LINK( OkClicked, weld::Button&, void ); - DECL_LINK( GetEditFocusHandler, formula::WeldRefEdit&, void ); - DECL_LINK( GetButtonFocusHandler, formula::WeldRefButton&, void ); - DECL_LINK( LoseEditFocusHandler, formula::WeldRefEdit&, void ); - DECL_LINK( LoseButtonFocusHandler, formula::WeldRefButton&, void ); - DECL_LINK( RefInputModifyHandler, formula::WeldRefEdit&, void ); + DECL_LINK( GetEditFocusHandler, formula::RefEdit&, void ); + DECL_LINK( GetButtonFocusHandler, formula::RefButton&, void ); + DECL_LINK( LoseEditFocusHandler, formula::RefEdit&, void ); + DECL_LINK( LoseButtonFocusHandler, formula::RefButton&, void ); + DECL_LINK( RefInputModifyHandler, formula::RefEdit&, void ); }; #endif diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx index 978c733fb784..cf5e7390cd6c 100644 --- a/sc/source/ui/inc/anyrefdg.hxx +++ b/sc/source/ui/inc/anyrefdg.hxx @@ -38,38 +38,21 @@ class ScFormulaReferenceHelper { IAnyRefDialog* m_pDlg; ::std::unique_ptr<ScCompiler> m_pRefComp; - VclPtr<formula::RefEdit> m_pRefEdit; // active input field - VclPtr<formula::RefButton> m_pRefBtn; // associated button - formula::WeldRefEdit* m_pWeldRefEdit; // active input field - formula::WeldRefButton* m_pWeldRefBtn; // associated button - VclPtr<vcl::Window> m_pWindow; + formula::RefEdit* m_pRefEdit; // active input field + formula::RefButton* m_pRefBtn; // associated button weld::Dialog* m_pDialog; SfxBindings* const m_pBindings; - ::std::unique_ptr<Accelerator> - m_pAccel; // for Enter/Escape - ::std::vector<VclPtr<vcl::Window> > m_aHiddenWidgets; // vector of hidden Controls - sal_Int32 m_nOldBorderWidth; // border width for expanded dialog SCTAB m_nRefTab; // used for ShowReference OUString m_sOldDialogText; // Original title of the dialog window - Size m_aOldDialogSize; // Original size of the dialog window - Point m_aOldEditPos; // Original position of the input field - Size m_aOldEditSize; // Original size of the input field - long m_nOldEditWidthReq; - Point m_aOldButtonPos; // Original position of the button - VclPtr<vcl::Window> m_pOldEditParent; // Original parent of the edit field and the button - bool m_bOldDlgLayoutEnabled; // Original layout state of parent dialog - bool m_bOldEditParentLayoutEnabled; // Original layout state of edit widget parent bool m_bEnableColorRef; bool m_bHighlightRef; - bool m_bAccInserted; - DECL_LINK( AccelSelectHdl, Accelerator&, void ); DECL_LINK( ActivateHdl, weld::Widget&, bool ); public: - ScFormulaReferenceHelper(IAnyRefDialog* _pDlg,SfxBindings* _pBindings); + ScFormulaReferenceHelper(IAnyRefDialog* _pDlg, SfxBindings* _pBindings); ~ScFormulaReferenceHelper(); void dispose(); @@ -80,15 +63,11 @@ public: void ShowReference(const OUString& rStr); void ReleaseFocus( formula::RefEdit* pEdit ); - void ReleaseFocus( formula::WeldRefEdit* pEdit ); void HideReference( bool bDoneRefMode = true ); void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton ); - void RefInputStart( formula::WeldRefEdit* pEdit, formula::WeldRefButton* pButton ); void RefInputDone( bool bForced ); void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton ); - void ToggleCollapsed( formula::WeldRefEdit* pEdit, formula::WeldRefButton* pButton ); - void SetWindow(vcl::Window* _pWindow) { m_pWindow = _pWindow; } void SetDialog(weld::Dialog* pDialog) { m_pDialog = pDialog; } void DoClose( sal_uInt16 nId ); void SetDispatcherLock( bool bLock ); @@ -98,21 +77,15 @@ public: static void enableInput(bool _bInput); public: - static bool CanInputStart( const formula::WeldRefEdit *pEdit ){ return !!pEdit; } - bool CanInputDone( bool bForced ){ return (m_pRefEdit || m_pWeldRefEdit) && (bForced || !(m_pRefBtn || m_pWeldRefBtn)); } + static bool CanInputStart( const formula::RefEdit *pEdit ){ return !!pEdit; } + bool CanInputDone(bool bForced) { return m_pRefEdit && (bForced || !m_pRefBtn); } }; -class SC_DLLPUBLIC ScRefHandler : - public IAnyRefDialog +class SC_DLLPUBLIC ScRefHandler : public IAnyRefDialog { - VclPtr<vcl::Window> m_rWindow; weld::DialogController* m_pController; bool m_bInRefMode; -public: - friend class formula::RefButton; - friend class formula::RefEdit; - private: ScFormulaReferenceHelper m_aHelper; @@ -127,14 +100,12 @@ protected: void SetDispatcherLock( bool bLock ); virtual void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = nullptr ) override; - virtual void RefInputStart( formula::WeldRefEdit* pEdit, formula::WeldRefButton* pButton = nullptr ) override; virtual void RefInputDone( bool bForced = false ) override; bool ParseWithNames( ScRangeList& rRanges, const OUString& rStr, const ScDocument* pDoc ); public: - ScRefHandler( vcl::Window &rWindow, SfxBindings* pB, bool bBindRef ); - ScRefHandler( SfxDialogController &rController, SfxBindings* pB, bool bBindRef ); + ScRefHandler(SfxDialogController &rController, SfxBindings* pB, bool bBindRef); virtual ~ScRefHandler() override; virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) override = 0; @@ -148,9 +119,7 @@ public: virtual void HideReference( bool bDoneRefMode = true ) override; virtual void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton ) override; - virtual void ToggleCollapsed( formula::WeldRefEdit* pEdit, formula::WeldRefButton* pButton ) override; virtual void ReleaseFocus( formula::RefEdit* pEdit ) override; - virtual void ReleaseFocus( formula::WeldRefEdit* pEdit ) override; virtual void ViewShellChanged() override; void SwitchToDocument(); @@ -160,81 +129,13 @@ public: public: bool EnterRefMode(); bool LeaveRefMode(); - static inline bool CanInputStart( const formula::WeldRefEdit *pEdit ); - inline bool CanInputDone( bool bForced ); -}; - -template< class TWindow, bool bBindRef = true > -class ScRefHdlrImplBase: public TWindow, public ScRefHandler -{ -private: - template<class TBindings, class TChildWindow, class TParentWindow > - ScRefHdlrImplBase( TBindings* pB, TChildWindow* pCW, - TParentWindow* pParent, const OUString& rID, const OUString& rUIXMLDescription ); - - template<class TParentWindow, class TArg> - ScRefHdlrImplBase( TParentWindow* pParent, const OUString& rID, const OUString& rUIXMLDescription, const TArg &rArg, SfxBindings *pB ); - - virtual ~ScRefHdlrImplBase() override; - - template<class, class, bool> friend struct ScRefHdlrImpl; -}; - -template<class TWindow, bool bBindRef> -template<class TBindings, class TChildWindow, class TParentWindow> -ScRefHdlrImplBase<TWindow, bBindRef>::ScRefHdlrImplBase( TBindings* pB, TChildWindow* pCW, - TParentWindow* pParent, const OUString& rID, const OUString& rUIXMLDescription ) - : TWindow(pB, pCW, pParent, rID, rUIXMLDescription ) - , ScRefHandler( *static_cast<TWindow*>(this), pB, bBindRef ) -{ -} - -template<class TWindow, bool bBindRef > -template<class TParentWindow, class TArg> -ScRefHdlrImplBase<TWindow,bBindRef>::ScRefHdlrImplBase( TParentWindow* pParent, const OUString& rID, const OUString& rUIXMLDescription, const TArg &rArg, SfxBindings *pB ) - : TWindow( pParent, rID, rUIXMLDescription, rArg ), - ScRefHandler( *static_cast<TWindow*>(this), pB, bBindRef ) -{ -} - -template<class TWindow, bool bBindRef > -ScRefHdlrImplBase<TWindow,bBindRef>::~ScRefHdlrImplBase(){} - -template<class TDerived, class TBase, bool bBindRef = true> -struct ScRefHdlrImpl: ScRefHdlrImplBase< TBase, bBindRef > -{ - enum { UNKNOWN_SLOTID = 0U, SLOTID = UNKNOWN_SLOTID }; - - template<class T1, class T2, class T3, class T4> - ScRefHdlrImpl( const T1 & rt1, const T2 & rt2, const T3& rt3, const T4& rt4 ) - : ScRefHdlrImplBase<TBase, bBindRef >(rt1, rt2, rt3, rt4) + static bool CanInputStart( const formula::RefEdit *pEdit ) { + return ScFormulaReferenceHelper::CanInputStart( pEdit ); } - - template<class T1, class T2, class T3, class T4, class T5> - ScRefHdlrImpl( const T1 & rt1, const T2 & rt2, const T3& rt3, const T4& rt4, const T5& rt5 ) - : ScRefHdlrImplBase<TBase, bBindRef >(rt1, rt2, rt3, rt4, rt5) - { - } - - virtual void dispose() override - { - ScRefHdlrImplBase<TBase, bBindRef >::disposeRefHandler(); - TBase::dispose(); - } - - ~ScRefHdlrImpl() - { - TBase::disposeOnce(); - } -}; - -struct ScAnyRefDlg : ::ScRefHdlrImpl< ScAnyRefDlg, SfxModelessDialog> -{ - template<class T1, class T2, class T3, class T4, class T5> - ScAnyRefDlg( const T1 & rt1, const T2 & rt2, const T3& rt3, const T4& rt4, const T5& rt5 ) - : ScRefHdlrImpl< ScAnyRefDlg, SfxModelessDialog>(rt1, rt2, rt3, rt4, rt5) + bool CanInputDone( bool bForced ) { + return m_aHelper.CanInputDone( bForced ); } }; @@ -264,16 +165,6 @@ struct ScAnyRefDlgController : ScRefHdlrControllerImpl<SfxModelessDialogControll } }; -inline bool ScRefHandler::CanInputStart( const formula::WeldRefEdit *pEdit ) -{ - return ScFormulaReferenceHelper::CanInputStart( pEdit ); -} - -inline bool ScRefHandler::CanInputDone( bool bForced ) -{ - return m_aHelper.CanInputDone( bForced ); -} - #endif // INCLUDED_SC_SOURCE_UI_INC_ANYREFDG_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/inc/areasdlg.hxx b/sc/source/ui/inc/areasdlg.hxx index f006d3bdee8d..a421049e28a4 100644 --- a/sc/source/ui/inc/areasdlg.hxx +++ b/sc/source/ui/inc/areasdlg.hxx @@ -49,19 +49,19 @@ private: ScViewData* pViewData; SCTAB nCurTab; - formula::WeldRefEdit* m_pRefInputEdit; + formula::RefEdit* m_pRefInputEdit; std::unique_ptr<weld::ComboBox> m_xLbPrintArea; - std::unique_ptr<formula::WeldRefEdit> m_xEdPrintArea; - std::unique_ptr<formula::WeldRefButton> m_xRbPrintArea; + std::unique_ptr<formula::RefEdit> m_xEdPrintArea; + std::unique_ptr<formula::RefButton> m_xRbPrintArea; std::unique_ptr<weld::ComboBox> m_xLbRepeatRow; - std::unique_ptr<formula::WeldRefEdit> m_xEdRepeatRow; - std::unique_ptr<formula::WeldRefButton> m_xRbRepeatRow; + std::unique_ptr<formula::RefEdit> m_xEdRepeatRow; + std::unique_ptr<formula::RefButton> m_xRbRepeatRow; std::unique_ptr<weld::ComboBox> m_xLbRepeatCol; - std::unique_ptr<formula::WeldRefEdit> m_xEdRepeatCol; - std::unique_ptr<formula::WeldRefButton> m_xRbRepeatCol; + std::unique_ptr<formula::RefEdit> m_xEdRepeatCol; + std::unique_ptr<formula::RefButton> m_xRbRepeatCol; std::unique_ptr<weld::Button> m_xBtnOk; std::unique_ptr<weld::Button> m_xBtnCancel; @@ -77,13 +77,13 @@ private: void Impl_Reset(); bool Impl_CheckRefStrings(); void Impl_FillLists(); - bool Impl_GetItem( const formula::WeldRefEdit* pEd, SfxStringItem& rItem ); + bool Impl_GetItem( const formula::RefEdit* pEd, SfxStringItem& rItem ); // Handler: DECL_LINK( Impl_SelectHdl, weld::ComboBox&, void ); - DECL_LINK( Impl_ModifyHdl, formula::WeldRefEdit&, void ); + DECL_LINK( Impl_ModifyHdl, formula::RefEdit&, void ); DECL_LINK( Impl_BtnHdl, weld::Button&, void ); - DECL_LINK( Impl_GetEditFocusHdl, formula::WeldRefEdit&, void ); + DECL_LINK( Impl_GetEditFocusHdl, formula::RefEdit&, void ); DECL_LINK( Impl_GetFocusHdl, weld::Widget&, void ); }; diff --git a/sc/source/ui/inc/condformatdlg.hxx b/sc/source/ui/inc/condformatdlg.hxx index a2f9bae21864..39a53d408f4e 100644 --- a/sc/source/ui/inc/condformatdlg.hxx +++ b/sc/source/ui/inc/condformatdlg.hxx @@ -93,7 +93,7 @@ private: OUString msBaseTitle; - formula::WeldRefEdit* mpLastEdit; + formula::RefEdit* mpLastEdit; std::unique_ptr<weld::Button> mxBtnOk; std::unique_ptr<weld::Button> mxBtnAdd; std::unique_ptr<weld::Button> mxBtnRemove; @@ -101,12 +101,12 @@ private: std::unique_ptr<weld::Button> mxBtnDown; std::unique_ptr<weld::Button> mxBtnCancel; std::unique_ptr<weld::Label> mxFtRange; - std::unique_ptr<formula::WeldRefEdit> mxEdRange; - std::unique_ptr<formula::WeldRefButton> mxRbRange; + std::unique_ptr<formula::RefEdit> mxEdRange; + std::unique_ptr<formula::RefButton> mxRbRange; std::unique_ptr<ScCondFormatList> mxCondFormList; void updateTitle(); - DECL_LINK( EdRangeModifyHdl, formula::WeldRefEdit&, void ); + DECL_LINK( EdRangeModifyHdl, formula::RefEdit&, void ); protected: virtual void RefInputDone( bool bForced = false ) override; @@ -130,7 +130,7 @@ public: void OnSelectionChange(size_t nIndex, size_t nSize, bool bSelected = true); DECL_LINK( BtnPressedHdl, weld::Button&, void ); - DECL_LINK( RangeGetFocusHdl, formula::WeldRefEdit&, void ); ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits