diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-05-17 19:39:45 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-05-20 18:01:17 +0200 |
commit | 2140dea1413c9ef8e6e35409a15b0a3ea7149e67 (patch) | |
tree | f2f28dfda11cdd4dc982299669be56ec81fc0aab /svx | |
parent | 259d01a34d27df2fbfd11c3bf6fe9dc508ff6ac2 (diff) |
split width/height to allow intercept of how width is calculated
in order to possibly get width on demand
Change-Id: I1e6fcb6849705f2b166821516ebe72b179e00ee7
Reviewed-on: https://gerrit.libreoffice.org/72513
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/form/filtnav.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index 08a975fca685..c7b755317d89 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -965,7 +965,8 @@ void FmFilterItemsString::Paint(const Point& rPos, SvTreeListBox& rDev, vcl::Ren rRenderContext.Push(PushFlags::LINECOLOR); rRenderContext.SetLineColor(rRenderContext.GetTextColor()); - tools::Rectangle aRect(rPos, GetSize(&rDev, &rEntry)); + Size aSize(GetWidth(&rDev, &rEntry), GetHeight(&rDev, &rEntry)); + tools::Rectangle aRect(rPos, aSize); Point aFirst(rPos.X(), aRect.Bottom() - 6); Point aSecond(aFirst .X() + 2, aFirst.Y() + 3); @@ -991,7 +992,8 @@ void FmFilterItemsString::InitViewData( SvTreeListBox* pView,SvTreeListEntry* pE Size aSize(pView->GetTextWidth(GetText()), pView->GetTextHeight()); aSize.AdjustWidth(nxDBmp ); - pViewData->maSize = aSize; + pViewData->mnWidth = aSize.Width(); + pViewData->mnHeight = aSize.Height(); } class FmFilterString : public SvLBoxString @@ -1013,7 +1015,6 @@ public: const int nxD = 4; - void FmFilterString::InitViewData( SvTreeListBox* pView,SvTreeListEntry* pEntry, SvViewDataItem* pViewData) { if( !pViewData ) @@ -1027,10 +1028,10 @@ void FmFilterString::InitViewData( SvTreeListBox* pView,SvTreeListEntry* pEntry, Size aSize(pView->GetTextWidth(m_aName), pView->GetTextHeight()); pView->Control::SetFont( aOldFont ); aSize.AdjustWidth(pView->GetTextWidth(GetText()) + nxD ); - pViewData->maSize = aSize; + pViewData->mnWidth = aSize.Width(); + pViewData->mnHeight = aSize.Height(); } - void FmFilterString::Paint(const Point& rPos, SvTreeListBox& rDev, vcl::RenderContext& rRenderContext, const SvViewDataEntry* /*pView*/, const SvTreeListEntry& /*rEntry*/) { |