diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-05-20 11:05:46 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-05-20 21:44:12 +0200 |
commit | 5c8de864f72c4e077b7be5871a2e51f02f69c0e9 (patch) | |
tree | 3b0c48783ab00ffdbd60f479ac55d7e86ae70e1f /include/vcl | |
parent | d6d82d3f2b4a468e4ca432c964f0923ce289d862 (diff) |
calc item width on request
Change-Id: Ifa56a903b3c3a3962fd2ecf76ff101976e17fc05
Reviewed-on: https://gerrit.libreoffice.org/72600
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/vcl')
-rw-r--r-- | include/vcl/svlbitm.hxx | 2 | ||||
-rw-r--r-- | include/vcl/treelistbox.hxx | 3 | ||||
-rw-r--r-- | include/vcl/viewdataentry.hxx | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/include/vcl/svlbitm.hxx b/include/vcl/svlbitm.hxx index 16665dd8c73e..8d267e0754af 100644 --- a/include/vcl/svlbitm.hxx +++ b/include/vcl/svlbitm.hxx @@ -119,6 +119,8 @@ public: SvTreeListEntry* pEntry, SvViewDataItem* pViewData = nullptr) override; + virtual int CalcWidth(const SvTreeListBox* pView) const override; + void Emphasize(bool bEmphasize) { mbEmphasized = bEmphasize; } bool IsEmphasized() const { return mbEmphasized; } diff --git a/include/vcl/treelistbox.hxx b/include/vcl/treelistbox.hxx index d9c09d086b31..4cfd06a37937 100644 --- a/include/vcl/treelistbox.hxx +++ b/include/vcl/treelistbox.hxx @@ -140,9 +140,10 @@ public: SvLBoxItem(); virtual ~SvLBoxItem(); virtual SvLBoxItemType GetType() const = 0; + virtual int CalcWidth(const SvTreeListBox* pView) const; int GetWidth(const SvTreeListBox* pView, const SvTreeListEntry* pEntry) const; + int GetWidth(const SvTreeListBox* pView, const SvViewDataEntry* pData, sal_uInt16 nItemPos); int GetHeight(const SvTreeListBox* pView, const SvTreeListEntry* pEntry) const; - static int GetWidth(const SvViewDataEntry* pData, sal_uInt16 nItemPos); static int GetHeight(const SvViewDataEntry* pData, sal_uInt16 nItemPos); void Enable(bool bEnabled) { mbDisabled = !bEnabled; } diff --git a/include/vcl/viewdataentry.hxx b/include/vcl/viewdataentry.hxx index 7967f131b6c6..74d7d22b98de 100644 --- a/include/vcl/viewdataentry.hxx +++ b/include/vcl/viewdataentry.hxx @@ -26,6 +26,8 @@ #include <vector> +class SvTreeListBox; + struct SvViewDataItem { int mnWidth = 0; |