From 2140dea1413c9ef8e6e35409a15b0a3ea7149e67 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 17 May 2019 19:39:45 +0100 Subject: split width/height to allow intercept of how width is calculated MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Tested-by: Caolán McNamara --- svx/source/form/filtnav.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'svx') 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*/) { -- cgit