[Libreoffice-commits] core.git: vcl/inc vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sat Jun 6 18:09:22 UTC 2020
vcl/inc/svimpbox.hxx | 2 --
vcl/source/treelist/svimpbox.cxx | 13 -------------
2 files changed, 15 deletions(-)
New commits:
commit 1c62824c105f5ad02f228ff9263796e9dffa9581
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Jun 6 16:50:30 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Jun 6 20:08:39 2020 +0200
focus rect in treeview doesn't match the selected area
regression from...
commit 753084a3f73bb8a88412feac7aa40a2750e6e9f3
Date: Wed Dec 11 12:56:57 2019 +0200
loplugin:singlevalfields
which detected that m_bIsCellFocusEnabled is always false but inadvertently
make a change of
-void SvImpLBox::CalcCellFocusRect( SvTreeListEntry const * pEntry, tools::Rectangle& rRect )
+void SvImpLBox::CalcCellFocusRect( tools::Rectangle& rRect )
{
- if ( !(pEntry && m_bIsCellFocusEnabled) )
- return;
which treats m_bIsCellFocusEnabled as always true. Always false would make
CalcCellFocusRect a no-op so just remove the method to fix things.
Change-Id: I46bfa122058a9e4384d2b1e2dc9e844ada22cc69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95652
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/inc/svimpbox.hxx b/vcl/inc/svimpbox.hxx
index 5d23b3f2c46b..c5a51143f141 100644
--- a/vcl/inc/svimpbox.hxx
+++ b/vcl/inc/svimpbox.hxx
@@ -189,8 +189,6 @@ private:
void UpdateContextBmpWidthMax( SvTreeListEntry const * pEntry );
void UpdateContextBmpWidthVectorFromMovedEntry( SvTreeListEntry* pEntry );
- void CalcCellFocusRect( tools::Rectangle& rRect );
-
void ExpandAll();
void CollapseTo(SvTreeListEntry* pParentToCollapse);
diff --git a/vcl/source/treelist/svimpbox.cxx b/vcl/source/treelist/svimpbox.cxx
index 1794e7ca130a..38eb83dd50e9 100644
--- a/vcl/source/treelist/svimpbox.cxx
+++ b/vcl/source/treelist/svimpbox.cxx
@@ -210,17 +210,6 @@ void SvImpLBox::UpdateContextBmpWidthMax( SvTreeListEntry const * pEntry )
}
}
-void SvImpLBox::CalcCellFocusRect( tools::Rectangle& rRect )
-{
- if (m_pCursor->ItemCount() > o3tl::make_unsigned(FIRST_ENTRY_TAB+1))
- {
- SvLBoxItem& rNextItem = m_pCursor->GetItem( FIRST_ENTRY_TAB + 1 );
- long nRight = m_pView->GetTab( m_pCursor, &rNextItem )->GetPos() - 1;
- if ( nRight < rRect.Right() )
- rRect.SetRight( nRight );
- }
-}
-
void SvImpLBox::SetStyle( WinBits i_nWinStyle )
{
m_nStyle = i_nWinStyle;
@@ -574,7 +563,6 @@ void SvImpLBox::RecalcFocusRect()
m_pView->HideFocus();
long nY = GetEntryLine( m_pCursor );
tools::Rectangle aRect = m_pView->GetFocusRect( m_pCursor, nY );
- CalcCellFocusRect( aRect );
vcl::Region aOldClip( m_pView->GetClipRegion());
vcl::Region aClipRegion( GetClipRegionRect() );
m_pView->SetClipRegion( aClipRegion );
@@ -668,7 +656,6 @@ void SvImpLBox::ShowCursor( bool bShow )
{
long nY = GetEntryLine( m_pCursor );
tools::Rectangle aRect = m_pView->GetFocusRect( m_pCursor, nY );
- CalcCellFocusRect( aRect );
vcl::Region aOldClip( m_pView->GetClipRegion());
vcl::Region aClipRegion( GetClipRegionRect() );
m_pView->SetClipRegion( aClipRegion );
More information about the Libreoffice-commits
mailing list