summaryrefslogtreecommitdiff
path: root/include/formula
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-05-08 11:14:52 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-05-11 20:31:04 +0200
commitd56ee7339f1a2ca73167791a5b39b6da38b401d5 (patch)
tree72c5572c4a68b8c14b8c5cfc853c3be173caeb64 /include/formula
parentd6a43b40736fef259402177cb50e6d1428112cfc (diff)
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 <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/formula')
-rw-r--r--include/formula/IControlReferenceHandler.hxx4
-rw-r--r--include/formula/formula.hxx10
-rw-r--r--include/formula/funcutl.hxx105
3 files changed, 24 insertions, 95 deletions
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