summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-11-04 13:06:04 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-12-09 13:28:35 +0100
commit1efeb17837c22499f00299c033ae59ba3910f7d7 (patch)
treea8db0b758e942b3b14fba26129dc51a95ff5c10c /include
parent4da3e0a0e5b2260c26186890724978bfd00f796c (diff)
weld Property Browser
Replaced the odd HyperlinkField Edit whose text can be clicked on to activate listeners, with an ordinary Edit and a Button beside it which can be clicked instead to do that. I couldn't find a real world use of this HyperlinkField in the forms or control properties, nor in casual experimentation in the sidebar in the basicide dialog editor. Also replaced the other strange Edit-alike TextView with a real Edit entry and a dropdown which can be used to support entry of multi-line labels Change-Id: Iad5265e404f6de14c8e760d617dbad49cd6ddead Reviewed-on: https://gerrit.libreoffice.org/82213 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/svtools/ctrlbox.hxx5
-rw-r--r--include/svtools/inettbc.hxx8
-rw-r--r--include/svx/colorbox.hxx1
-rw-r--r--include/vcl/builderpage.hxx1
-rw-r--r--include/vcl/ivctrl.hxx2
-rw-r--r--include/vcl/weld.hxx19
6 files changed, 34 insertions, 2 deletions
diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx
index 1de4677ffb77..0a5e5124811e 100644
--- a/include/svtools/ctrlbox.hxx
+++ b/include/svtools/ctrlbox.hxx
@@ -310,6 +310,10 @@ public:
void grab_focus() { m_xControl->grab_focus(); }
void connect_activated(const Link<SvtCalendarBox&, void>& rActivatedHdl) { m_aActivatedHdl = rActivatedHdl; }
+ void connect_selected(const Link<SvtCalendarBox&, void>& rSelectHdl) { m_aSelectHdl = rSelectHdl; }
+
+ void connect_focus_in(const Link<weld::Widget&, void>& rLink) { m_xControl->connect_focus_in(rLink); }
+ void connect_focus_out(const Link<weld::Widget&, void>& rLink) { m_xControl->connect_focus_out(rLink); }
private:
DECL_LINK(SelectHdl, weld::Calendar&, void);
DECL_LINK(ActivateHdl, weld::Calendar&, void);
@@ -320,6 +324,7 @@ private:
std::unique_ptr<weld::Calendar> m_xCalendar;
Link<SvtCalendarBox&, void> m_aActivatedHdl;
+ Link<SvtCalendarBox&, void> m_aSelectHdl;
void set_label_from_date();
};
diff --git a/include/svtools/inettbc.hxx b/include/svtools/inettbc.hxx
index b6851e845f14..37f18b53d95a 100644
--- a/include/svtools/inettbc.hxx
+++ b/include/svtools/inettbc.hxx
@@ -85,6 +85,7 @@ class SVT_DLLPUBLIC URLBox
Idle aChangedIdle;
OUString aBaseURL;
+ OUString aPlaceHolder;
rtl::Reference< MatchContext_Impl > pCtx;
std::unique_ptr<SvtURLBox_Impl> pImpl;
INetProtocol eSmartProtocol;
@@ -139,6 +140,13 @@ public:
static OUString ParseSmart( const OUString& aText, const OUString& aBaseURL );
+ void SetPlaceHolder(const OUString& sPlaceHolder) { aPlaceHolder = sPlaceHolder; }
+ const OUString& GetPlaceHolder() const { return aPlaceHolder; }
+ bool MatchesPlaceHolder(const OUString& sToMatch) const
+ {
+ return (!aPlaceHolder.isEmpty() && aPlaceHolder == sToMatch);
+ }
+
void SetFilter(const OUString& _sFilter);
};
diff --git a/include/svx/colorbox.hxx b/include/svx/colorbox.hxx
index 5bbc7e45dbde..dcf9aa85b37c 100644
--- a/include/svx/colorbox.hxx
+++ b/include/svx/colorbox.hxx
@@ -142,6 +142,7 @@ public:
void set_visible(bool bShow) { m_xButton->set_visible(bShow); }
void set_help_id(const OString& rHelpId) { m_xButton->set_help_id(rHelpId); }
void connect_focus_in(const Link<weld::Widget&, void>& rLink) { m_xButton->connect_focus_in(rLink); }
+ void connect_focus_out(const Link<weld::Widget&, void>& rLink) { m_xButton->connect_focus_out(rLink); }
weld::MenuButton& get_widget() { return *m_xButton; }
};
diff --git a/include/vcl/builderpage.hxx b/include/vcl/builderpage.hxx
index 6f721dde233a..85d9accd9a1c 100644
--- a/include/vcl/builderpage.hxx
+++ b/include/vcl/builderpage.hxx
@@ -33,6 +33,7 @@ public:
virtual void Activate();
virtual void Deactivate();
+ void SetHelpId(const OString& rHelpId) { m_xContainer->set_help_id(rHelpId); }
OString GetHelpId() const { return m_xContainer->get_help_id(); }
protected:
diff --git a/include/vcl/ivctrl.hxx b/include/vcl/ivctrl.hxx
index 3328d8202b69..82e44af84a79 100644
--- a/include/vcl/ivctrl.hxx
+++ b/include/vcl/ivctrl.hxx
@@ -314,7 +314,7 @@ public:
VclPtr<vcl::Window> GetPage(const OString& rPageId);
void RemovePage(const OString& rPageId);
- void InsertPage(const OString& rPageId, const OUString& rLabel, const Image& rImage, const OUString& rTooltip, VclPtr<vcl::Window> xPage);
+ void InsertPage(const OString& rPageId, const OUString& rLabel, const Image& rImage, const OUString& rTooltip, VclPtr<vcl::Window> xPage, int nPos = -1);
void SetActivatePageHdl( const Link<VerticalTabControl*,void>& rLink ) { m_aActivateHdl = rLink; }
void SetDeactivatePageHdl( const Link<VerticalTabControl*, bool>& rLink ) { m_aDeactivateHdl = rLink; }
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 82dd5fb2c00c..e68d46c420d6 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -361,7 +361,11 @@ public:
virtual void set_current_page(int nPage) = 0;
virtual void set_current_page(const OString& rIdent) = 0;
virtual void remove_page(const OString& rIdent) = 0;
- virtual void append_page(const OString& rIdent, const OUString& rLabel) = 0;
+ virtual void insert_page(const OString& rIdent, const OUString& rLabel, int nPos) = 0;
+ void append_page(const OString& rIdent, const OUString& rLabel)
+ {
+ insert_page(rIdent, rLabel, -1);
+ }
virtual void set_tab_label_text(const OString& rIdent, const OUString& rLabel) = 0;
virtual OUString get_tab_label_text(const OString& rIdent) const = 0;
virtual int get_n_pages() const = 0;
@@ -1413,9 +1417,14 @@ public:
}
virtual void set_formatter(SvNumberFormatter* pFormatter) = 0;
+ virtual SvNumberFormatter* get_formatter() = 0;
virtual sal_Int32 get_format_key() const = 0;
virtual void set_format_key(sal_Int32 nFormatKey) = 0;
+ virtual void set_digits(unsigned int digits) = 0;
+
+ virtual void treat_as_number(bool bSet) = 0;
+
void connect_value_changed(const Link<FormattedSpinButton&, void>& rLink)
{
m_aValueChangedHdl = rLink;
@@ -1763,6 +1772,14 @@ public:
void set_position(int nCursorPos) { m_xSpinButton->set_position(nCursorPos); }
void set_text(const OUString& rText) { m_xSpinButton->set_text(rText); }
OUString get_text() const { return m_xSpinButton->get_text(); }
+ void connect_focus_in(const Link<Widget&, void>& rLink)
+ {
+ m_xSpinButton->connect_focus_in(rLink);
+ }
+ void connect_focus_out(const Link<Widget&, void>& rLink)
+ {
+ m_xSpinButton->connect_focus_out(rLink);
+ }
weld::SpinButton& get_widget() { return *m_xSpinButton; }
};