diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-11-04 13:06:04 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-12-09 13:28:35 +0100 |
commit | 1efeb17837c22499f00299c033ae59ba3910f7d7 (patch) | |
tree | a8db0b758e942b3b14fba26129dc51a95ff5c10c /vcl/source | |
parent | 4da3e0a0e5b2260c26186890724978bfd00f796c (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 'vcl/source')
-rw-r--r-- | vcl/source/app/salvtables.cxx | 23 | ||||
-rw-r--r-- | vcl/source/control/ivctrl.cxx | 15 |
2 files changed, 31 insertions, 7 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index ae1aaa090823..844281cb806e 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -2334,12 +2334,12 @@ public: } } - virtual void append_page(const OString& rIdent, const OUString& rLabel) override + virtual void insert_page(const OString& rIdent, const OUString& rLabel, int nPos) override { sal_uInt16 nPageCount = m_xNotebook->GetPageCount(); sal_uInt16 nLastPageId = nPageCount ? m_xNotebook->GetPageId(nPageCount - 1) : 0; sal_uInt16 nNewPageId = nLastPageId + 1; - m_xNotebook->InsertPage(nNewPageId, rLabel); + m_xNotebook->InsertPage(nNewPageId, rLabel, nPos == -1 ? TAB_APPEND : nPos); VclPtrInstance<TabPage> xPage(m_xNotebook); VclPtrInstance<VclGrid> xGrid(xPage); xPage->Show(); @@ -2458,12 +2458,12 @@ public: m_aPages.erase(m_aPages.begin() + nPageIndex); } - virtual void append_page(const OString& rIdent, const OUString& rLabel) override + virtual void insert_page(const OString& rIdent, const OUString& rLabel, int nPos) override { VclPtrInstance<VclGrid> xGrid(m_xNotebook->GetPageParent()); xGrid->set_hexpand(true); xGrid->set_vexpand(true); - m_xNotebook->InsertPage(rIdent, rLabel, Image(), "", xGrid); + m_xNotebook->InsertPage(rIdent, rLabel, Image(), "", xGrid, nPos); } virtual int get_n_pages() const override @@ -5242,6 +5242,11 @@ public: m_xButton->SetFormatter(pFormatter); } + virtual SvNumberFormatter* get_formatter() override + { + return m_xButton->GetFormatter(); + } + virtual sal_Int32 get_format_key() const override { return m_xButton->GetFormatKey(); @@ -5251,6 +5256,16 @@ public: { m_xButton->SetFormatKey(nFormatKey); } + + virtual void treat_as_number(bool bSet) override + { + m_xButton->TreatAsNumber(bSet); + } + + virtual void set_digits(unsigned int digits) override + { + m_xButton->SetDecimalDigits(digits); + } }; class SalInstanceLabel : public SalInstanceWidget, public virtual weld::Label diff --git a/vcl/source/control/ivctrl.cxx b/vcl/source/control/ivctrl.cxx index 8cef33be5232..5a20afa0ed1a 100644 --- a/vcl/source/control/ivctrl.cxx +++ b/vcl/source/control/ivctrl.cxx @@ -554,13 +554,22 @@ OString VerticalTabControl::GetPageId(sal_uInt16 nIndex) const } void VerticalTabControl::InsertPage(const rtl::OString &rIdent, const rtl::OUString& rLabel, const Image& rImage, - const rtl::OUString& rTooltip, VclPtr<vcl::Window> xPage) + const rtl::OUString& rTooltip, VclPtr<vcl::Window> xPage, int nPos) { SvxIconChoiceCtrlEntry* pEntry = m_xChooser->InsertEntry(rLabel, rImage); pEntry->SetQuickHelpText(rTooltip); m_xChooser->ArrangeIcons(); - maPageList.emplace_back(new VerticalTabPageData); - VerticalTabPageData* pNew = maPageList.back().get(); + VerticalTabPageData* pNew; + if (nPos == -1) + { + maPageList.emplace_back(new VerticalTabPageData); + pNew = maPageList.back().get(); + } + else + { + maPageList.emplace(maPageList.begin() + nPos, new VerticalTabPageData); + pNew = maPageList[nPos].get(); + } pNew->sId = rIdent; pNew->pEntry = pEntry; pNew->xPage = xPage; |