[Libreoffice-commits] core.git: include/vcl svtools/source vcl/source
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jun 11 09:09:09 UTC 2019
include/vcl/svimpbox.hxx | 110 -
svtools/source/contnr/iconviewimpl.cxx | 358 +++---
vcl/source/app/salvtables.cxx | 2
vcl/source/treelist/svimpbox.cxx | 1862 ++++++++++++++++-----------------
vcl/source/treelist/treelistbox.cxx | 42
5 files changed, 1187 insertions(+), 1187 deletions(-)
New commits:
commit 425db2cc9881e00a28cf6184451ffc1eca841299
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Tue Jun 11 08:18:21 2019 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Tue Jun 11 11:08:11 2019 +0200
vcl: prefix members of SvImpLBox
Change-Id: Ida7ca49ee99cf13029c6a1cb84b8d3b7ffe44ed7
Reviewed-on: https://gerrit.libreoffice.org/73799
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
Tested-by: Jenkins
diff --git a/include/vcl/svimpbox.hxx b/include/vcl/svimpbox.hxx
index 07e792950cf1..aba51a91ed9e 100644
--- a/include/vcl/svimpbox.hxx
+++ b/include/vcl/svimpbox.hxx
@@ -92,15 +92,15 @@ friend class SvTreeListBox;
friend class SalInstanceTreeView;
friend class IconView;
private:
- SvTreeList* pTree;
- SvTreeListEntry* pAnchor;
- SvTreeListEntry* pMostRightEntry;
- SvLBoxButton* pActiveButton;
- SvTreeListEntry* pActiveEntry;
- SvLBoxTab* pActiveTab;
+ SvTreeList* m_pTree;
+ SvTreeListEntry* m_pAnchor;
+ SvTreeListEntry* m_pMostRightEntry;
+ SvLBoxButton* m_pActiveButton;
+ SvTreeListEntry* m_pActiveEntry;
+ SvLBoxTab* m_pActiveTab;
- VclPtr<ScrollBar> aHorSBar;
- VclPtr<ScrollBarBox> aScrBarBox;
+ VclPtr<ScrollBar> m_aHorSBar;
+ VclPtr<ScrollBarBox> m_aScrBarBox;
::vcl::AccessibleFactoryAccess
m_aFactoryAccess;
@@ -124,31 +124,31 @@ private:
o3tl::enumarray<ImageType, Image>
m_aNodeAndEntryImages;
- ImpLBSelEng aFctSet;
- Idle aAsyncBeginDragIdle;
- Point aAsyncBeginDragPos;
-
- long nNodeBmpWidth;
- long nMostRight;
- short nHorSBarHeight, nVerSBarWidth;
- sal_uInt16 nCurTabPos;
-
- bool bUpdateMode : 1;
- bool bAsyncBeginDrag : 1;
- bool bSubLstOpRet : 1; // open/close sublist with return/enter, defaulted with false
- bool bSubLstOpLR : 1; // open/close sublist with cursor left/right, defaulted with false
- bool bSubLstOpDblClick : 1; // open/close sublist with mouse double click, defaulted with true
- bool bContextMenuHandling : 1;
- bool bIsCellFocusEnabled : 1;
- bool bAreChildrenTransient;
+ ImpLBSelEng m_aFctSet;
+ Idle m_aAsyncBeginDragIdle;
+ Point m_aAsyncBeginDragPos;
+
+ long m_nNodeBmpWidth;
+ long m_nMostRight;
+ short m_nHorSBarHeight, m_nVerSBarWidth;
+ sal_uInt16 m_nCurTabPos;
+
+ bool m_bUpdateMode : 1;
+ bool m_bAsyncBeginDrag : 1;
+ bool m_bSubLstOpRet : 1; // open/close sublist with return/enter, defaulted with false
+ bool m_bSubLstOpLR : 1; // open/close sublist with cursor left/right, defaulted with false
+ bool m_bSubLstOpDblClick : 1; // open/close sublist with mouse double click, defaulted with true
+ bool m_bContextMenuHandling : 1;
+ bool m_bIsCellFocusEnabled : 1;
+ bool m_bAreChildrenTransient;
bool mbForceMakeVisible;
- Point aEditClickPos;
- Idle aEditIdle;
+ Point m_aEditClickPos;
+ Idle m_aEditIdle;
std::unique_ptr<comphelper::string::NaturalStringSorter> m_pStringSorter;
- std::vector< short > aContextBmpWidthVector;
+ std::vector< short > m_aContextBmpWidthVector;
DECL_LINK(EditTimerCall, Timer *, void);
@@ -201,25 +201,25 @@ private:
void CalcCellFocusRect( SvTreeListEntry const * pEntry, tools::Rectangle& rRect );
- bool AreChildrenTransient() const { return bAreChildrenTransient; }
- void SetChildrenNotTransient() { bAreChildrenTransient = false; }
+ bool AreChildrenTransient() const { return m_bAreChildrenTransient; }
+ void SetChildrenNotTransient() { m_bAreChildrenTransient = false; }
protected:
- VclPtr<SvTreeListBox> pView;
- VclPtr<ScrollBar> aVerSBar;
- SvTreeListEntry* pCursor;
- SvTreeListEntry* pStartEntry;
- ImplSVEvent* nCurUserEvent;
- Size aOutputSize;
- LBoxFlags nFlags;
+ VclPtr<SvTreeListBox> m_pView;
+ VclPtr<ScrollBar> m_aVerSBar;
+ SvTreeListEntry* m_pCursor;
+ SvTreeListEntry* m_pStartEntry;
+ ImplSVEvent* m_nCurUserEvent;
+ Size m_aOutputSize;
+ LBoxFlags m_nFlags;
WinBits m_nStyle;
bool mbNoAutoCurEntry; // disable the behavior of automatically selecting a "CurEntry" upon painting the control
- SelectionEngine aSelEng;
- sal_uLong nVisibleCount; // Number of lines in control
- bool bInVScrollHdl : 1;
- bool bSimpleTravel : 1; // is true if SelectionMode::Single
- long nNextVerVisSize;
- long nNodeBmpTabDistance; // typical smaller than 0
+ SelectionEngine m_aSelEng;
+ sal_uLong m_nVisibleCount; // Number of lines in control
+ bool m_bInVScrollHdl : 1;
+ bool m_bSimpleTravel : 1; // is true if SelectionMode::Single
+ long m_nNextVerVisSize;
+ long m_nNodeBmpTabDistance; // typical smaller than 0
virtual long GetEntryLine( SvTreeListEntry* pEntry ) const;
virtual void CursorDown();
@@ -250,7 +250,7 @@ public:
void Clear();
void SetStyle( WinBits i_nWinStyle );
void SetNoAutoCurEntry( bool b );
- void SetModel( SvTreeList* pModel ) { pTree = pModel;}
+ void SetModel( SvTreeList* pModel ) { m_pTree = pModel;}
void EntryInserted( SvTreeListEntry*);
void RemovingEntry( SvTreeListEntry* pEntry );
@@ -281,12 +281,12 @@ public:
void SetDragDropMode( DragDropMode eDDMode );
void SetSelectionMode( SelectionMode eSelMode );
- SvTreeListEntry* GetCurrentEntry() const { return pCursor; }
+ SvTreeListEntry* GetCurrentEntry() const { return m_pCursor; }
virtual bool IsEntryInView( SvTreeListEntry* pEntry ) const;
virtual SvTreeListEntry* GetEntry( const Point& rPos ) const;
// returns last entry, if Pos below last entry
virtual SvTreeListEntry* GetClickedEntry( const Point& ) const;
- SvTreeListEntry* GetCurEntry() const { return pCursor; }
+ SvTreeListEntry* GetCurEntry() const { return m_pCursor; }
void SetCurEntry( SvTreeListEntry* );
virtual Point GetEntryPosition( SvTreeListEntry* ) const;
void MakeVisible( SvTreeListEntry* pEntry, bool bMoveToTop = false );
@@ -312,32 +312,32 @@ public:
static const Image& GetDefaultExpandedNodeImage( );
static const Image& GetDefaultCollapsedNodeImage( );
- const Size& GetOutputSize() const { return aOutputSize;}
+ const Size& GetOutputSize() const { return m_aOutputSize;}
virtual void KeyUp( bool bPageUp );
virtual void KeyDown( bool bPageDown );
void Command( const CommandEvent& rCEvt );
void Invalidate();
- void DestroyAnchor() { pAnchor=nullptr; aSelEng.Reset(); }
+ void DestroyAnchor() { m_pAnchor=nullptr; m_aSelEng.Reset(); }
void SelAllDestrAnch( bool bSelect, bool bDestroyAnchor = true, bool bSingleSelToo = false );
void ShowCursor( bool bShow );
bool RequestHelp( const HelpEvent& rHEvt );
void EndSelection();
bool IsNodeButton( const Point& rPosPixel, SvTreeListEntry* pEntry ) const;
- void EnableAsyncDrag( bool b ) { bAsyncBeginDrag = b; }
+ void EnableAsyncDrag( bool b ) { m_bAsyncBeginDrag = b; }
void SetUpdateMode( bool bMode );
- bool GetUpdateMode() const { return bUpdateMode; }
+ bool GetUpdateMode() const { return m_bUpdateMode; }
tools::Rectangle GetClipRegionRect() const;
- bool HasHorScrollBar() const { return aHorSBar->IsVisible(); }
+ bool HasHorScrollBar() const { return m_aHorSBar->IsVisible(); }
void ShowFocusRect( const SvTreeListEntry* pEntry );
void CallEventListeners( VclEventId nEvent, void* pData = nullptr );
/** Enables, that one cell of a tablistbox entry can be focused */
- bool IsCellFocusEnabled() const { return bIsCellFocusEnabled; }
- void EnableCellFocus() { bIsCellFocusEnabled = true; }
+ bool IsCellFocusEnabled() const { return m_bIsCellFocusEnabled; }
+ void EnableCellFocus() { m_bIsCellFocusEnabled = true; }
bool SetCurrentTabPos( sal_uInt16 _nNewPos );
- sal_uInt16 GetCurrentTabPos() const { return nCurTabPos; }
+ sal_uInt16 GetCurrentTabPos() const { return m_nCurTabPos; }
bool IsSelectable( const SvTreeListEntry* pEntry );
void SetForceMakeVisible(bool bEnable) { mbForceMakeVisible = bEnable; }
@@ -403,7 +403,7 @@ inline Point SvImpLBox::GetEntryPosition( SvTreeListEntry* pEntry ) const
inline bool SvImpLBox::IsLineVisible( long nY ) const
{
bool bRet = true;
- if ( nY < 0 || nY >= aOutputSize.Height() )
+ if ( nY < 0 || nY >= m_aOutputSize.Height() )
bRet = false;
return bRet;
}
diff --git a/svtools/source/contnr/iconviewimpl.cxx b/svtools/source/contnr/iconviewimpl.cxx
index 804dc06db627..14f3a65942f2 100644
--- a/svtools/source/contnr/iconviewimpl.cxx
+++ b/svtools/source/contnr/iconviewimpl.cxx
@@ -29,88 +29,88 @@ IconViewImpl::IconViewImpl( SvTreeListBox* pTreeListBox, SvTreeList* pTreeList,
void IconViewImpl::CursorUp()
{
- if (!pStartEntry)
+ if (!m_pStartEntry)
return;
- SvTreeListEntry* pPrevFirstToDraw = pStartEntry;
+ SvTreeListEntry* pPrevFirstToDraw = m_pStartEntry;
- for(short i = 0; i < pView->GetColumnsCount() && pPrevFirstToDraw; i++)
- pPrevFirstToDraw = pView->PrevVisible(pPrevFirstToDraw);
+ for(short i = 0; i < m_pView->GetColumnsCount() && pPrevFirstToDraw; i++)
+ pPrevFirstToDraw = m_pView->PrevVisible(pPrevFirstToDraw);
if( !pPrevFirstToDraw )
return;
- nFlags &= ~LBoxFlags::Filling;
- long nEntryHeight = pView->GetEntryHeight();
+ m_nFlags &= ~LBoxFlags::Filling;
+ long nEntryHeight = m_pView->GetEntryHeight();
ShowCursor( false );
- pView->Update();
- pStartEntry = pPrevFirstToDraw;
+ m_pView->Update();
+ m_pStartEntry = pPrevFirstToDraw;
tools::Rectangle aArea( GetVisibleArea() );
aArea.AdjustBottom( -nEntryHeight );
- pView->Scroll( 0, nEntryHeight, aArea, ScrollFlags::NoChildren );
- pView->Update();
+ m_pView->Scroll( 0, nEntryHeight, aArea, ScrollFlags::NoChildren );
+ m_pView->Update();
ShowCursor( true );
- pView->NotifyScrolled();
+ m_pView->NotifyScrolled();
}
void IconViewImpl::CursorDown()
{
- if (!pStartEntry)
+ if (!m_pStartEntry)
return;
- SvTreeListEntry* pNextFirstToDraw = pStartEntry;
+ SvTreeListEntry* pNextFirstToDraw = m_pStartEntry;
- for(short i = 0; i < pView->GetColumnsCount(); i++)
- pNextFirstToDraw = pView->NextVisible(pNextFirstToDraw);
+ for(short i = 0; i < m_pView->GetColumnsCount(); i++)
+ pNextFirstToDraw = m_pView->NextVisible(pNextFirstToDraw);
if( pNextFirstToDraw )
{
- nFlags &= ~LBoxFlags::Filling;
+ m_nFlags &= ~LBoxFlags::Filling;
ShowCursor( false );
- pView->Update();
- pStartEntry = pNextFirstToDraw;
+ m_pView->Update();
+ m_pStartEntry = pNextFirstToDraw;
tools::Rectangle aArea( GetVisibleArea() );
- pView->Scroll( 0, -(pView->GetEntryHeight()), aArea, ScrollFlags::NoChildren );
- pView->Update();
+ m_pView->Scroll( 0, -(m_pView->GetEntryHeight()), aArea, ScrollFlags::NoChildren );
+ m_pView->Update();
ShowCursor( true );
- pView->NotifyScrolled();
+ m_pView->NotifyScrolled();
}
}
void IconViewImpl::PageDown( sal_uInt16 nDelta )
{
- sal_uInt16 nRealDelta = nDelta * pView->GetColumnsCount();
+ sal_uInt16 nRealDelta = nDelta * m_pView->GetColumnsCount();
if( !nDelta )
return;
- if (!pStartEntry)
+ if (!m_pStartEntry)
return;
- SvTreeListEntry* pNext = pView->NextVisible(pStartEntry, nRealDelta);
- if( pNext == pStartEntry )
+ SvTreeListEntry* pNext = m_pView->NextVisible(m_pStartEntry, nRealDelta);
+ if( pNext == m_pStartEntry )
return;
ShowCursor( false );
- nFlags &= ~LBoxFlags::Filling;
- pView->Update();
- pStartEntry = pNext;
+ m_nFlags &= ~LBoxFlags::Filling;
+ m_pView->Update();
+ m_pStartEntry = pNext;
- if( nRealDelta >= nVisibleCount )
+ if( nRealDelta >= m_nVisibleCount )
{
- pView->Invalidate( GetVisibleArea() );
- pView->Update();
+ m_pView->Invalidate( GetVisibleArea() );
+ m_pView->Update();
}
else
{
tools::Rectangle aArea( GetVisibleArea() );
- long nScroll = pView->GetEntryHeight() * static_cast<long>(nRealDelta);
+ long nScroll = m_pView->GetEntryHeight() * static_cast<long>(nRealDelta);
nScroll = -nScroll;
- pView->Update();
- pView->Scroll( 0, nScroll, aArea, ScrollFlags::NoChildren );
- pView->Update();
- pView->NotifyScrolled();
+ m_pView->Update();
+ m_pView->Scroll( 0, nScroll, aArea, ScrollFlags::NoChildren );
+ m_pView->Update();
+ m_pView->NotifyScrolled();
}
ShowCursor( true );
@@ -118,35 +118,35 @@ void IconViewImpl::PageDown( sal_uInt16 nDelta )
void IconViewImpl::PageUp( sal_uInt16 nDelta )
{
- sal_uInt16 nRealDelta = nDelta * pView->GetColumnsCount();
+ sal_uInt16 nRealDelta = nDelta * m_pView->GetColumnsCount();
if( !nDelta )
return;
- if (!pStartEntry)
+ if (!m_pStartEntry)
return;
- SvTreeListEntry* pPrev = pView->PrevVisible(pStartEntry, nRealDelta);
- if( pPrev == pStartEntry )
+ SvTreeListEntry* pPrev = m_pView->PrevVisible(m_pStartEntry, nRealDelta);
+ if( pPrev == m_pStartEntry )
return;
- nFlags &= ~LBoxFlags::Filling;
+ m_nFlags &= ~LBoxFlags::Filling;
ShowCursor( false );
- pView->Update();
- pStartEntry = pPrev;
- if( nRealDelta >= nVisibleCount )
+ m_pView->Update();
+ m_pStartEntry = pPrev;
+ if( nRealDelta >= m_nVisibleCount )
{
- pView->Invalidate( GetVisibleArea() );
- pView->Update();
+ m_pView->Invalidate( GetVisibleArea() );
+ m_pView->Update();
}
else
{
- long nEntryHeight = pView->GetEntryHeight();
+ long nEntryHeight = m_pView->GetEntryHeight();
tools::Rectangle aArea( GetVisibleArea() );
- pView->Update();
- pView->Scroll( 0, nEntryHeight*nRealDelta, aArea, ScrollFlags::NoChildren );
- pView->Update();
- pView->NotifyScrolled();
+ m_pView->Update();
+ m_pView->Scroll( 0, nEntryHeight*nRealDelta, aArea, ScrollFlags::NoChildren );
+ m_pView->Update();
+ m_pView->NotifyScrolled();
}
ShowCursor( true );
@@ -154,24 +154,24 @@ void IconViewImpl::PageUp( sal_uInt16 nDelta )
void IconViewImpl::KeyDown( bool bPageDown )
{
- if( !aVerSBar->IsVisible() )
+ if( !m_aVerSBar->IsVisible() )
return;
long nDelta;
if( bPageDown )
- nDelta = aVerSBar->GetPageSize();
+ nDelta = m_aVerSBar->GetPageSize();
else
nDelta = 1;
- long nThumbPos = aVerSBar->GetThumbPos();
+ long nThumbPos = m_aVerSBar->GetThumbPos();
if( nDelta <= 0 )
return;
- nFlags &= ~LBoxFlags::Filling;
+ m_nFlags &= ~LBoxFlags::Filling;
BeginScroll();
- aVerSBar->SetThumbPos( nThumbPos+nDelta );
+ m_aVerSBar->SetThumbPos( nThumbPos+nDelta );
if( bPageDown )
PageDown( static_cast<short>(nDelta) );
else
@@ -182,16 +182,16 @@ void IconViewImpl::KeyDown( bool bPageDown )
void IconViewImpl::KeyUp( bool bPageUp )
{
- if( !aVerSBar->IsVisible() )
+ if( !m_aVerSBar->IsVisible() )
return;
long nDelta;
if( bPageUp )
- nDelta = aVerSBar->GetPageSize();
+ nDelta = m_aVerSBar->GetPageSize();
else
nDelta = 1;
- long nThumbPos = aVerSBar->GetThumbPos();
+ long nThumbPos = m_aVerSBar->GetThumbPos();
if( nThumbPos < nDelta )
nDelta = nThumbPos;
@@ -199,10 +199,10 @@ void IconViewImpl::KeyUp( bool bPageUp )
if( nDelta < 0 )
return;
- nFlags &= ~LBoxFlags::Filling;
+ m_nFlags &= ~LBoxFlags::Filling;
BeginScroll();
- aVerSBar->SetThumbPos( nThumbPos - nDelta );
+ m_aVerSBar->SetThumbPos( nThumbPos - nDelta );
if( bPageUp )
PageUp( static_cast<short>(nDelta) );
else
@@ -213,11 +213,11 @@ void IconViewImpl::KeyUp( bool bPageUp )
long IconViewImpl::GetEntryLine( SvTreeListEntry* pEntry ) const
{
- if(!pStartEntry )
+ if(!m_pStartEntry )
return -1; // invisible position
- long nFirstVisPos = pView->GetVisiblePos( pStartEntry );
- long nEntryVisPos = pView->GetVisiblePos( pEntry );
+ long nFirstVisPos = m_pView->GetVisiblePos( m_pStartEntry );
+ long nEntryVisPos = m_pView->GetVisiblePos( pEntry );
nFirstVisPos = nEntryVisPos - nFirstVisPos;
return nFirstVisPos;
@@ -225,25 +225,25 @@ long IconViewImpl::GetEntryLine( SvTreeListEntry* pEntry ) const
Point IconViewImpl::GetEntryPosition( SvTreeListEntry* pEntry ) const
{
- const int pos = pView->GetAbsPos( pEntry );
+ const int pos = m_pView->GetAbsPos( pEntry );
- return Point( ( pos % pView->GetColumnsCount() ) * pView->GetEntryWidth(),
- ( pos / pView->GetColumnsCount() ) * pView->GetEntryHeight() );
+ return Point( ( pos % m_pView->GetColumnsCount() ) * m_pView->GetEntryWidth(),
+ ( pos / m_pView->GetColumnsCount() ) * m_pView->GetEntryHeight() );
}
SvTreeListEntry* IconViewImpl::GetClickedEntry( const Point& rPoint ) const
{
- DBG_ASSERT( pView->GetModel(), "IconViewImpl::GetClickedEntry: how can this ever happen?" );
- if ( !pView->GetModel() )
+ DBG_ASSERT( m_pView->GetModel(), "IconViewImpl::GetClickedEntry: how can this ever happen?" );
+ if ( !m_pView->GetModel() )
return nullptr;
- if( pView->GetEntryCount() == 0 || !pStartEntry || !pView->GetEntryHeight() || !pView->GetEntryWidth())
+ if( m_pView->GetEntryCount() == 0 || !m_pStartEntry || !m_pView->GetEntryHeight() || !m_pView->GetEntryWidth())
return nullptr;
- sal_uInt16 nY = static_cast<sal_uInt16>(rPoint.Y() / pView->GetEntryHeight() );
- sal_uInt16 nX = static_cast<sal_uInt16>(rPoint.X() / pView->GetEntryWidth() );
- sal_uInt16 nTemp = nY * pView->GetColumnsCount() + nX;
+ sal_uInt16 nY = static_cast<sal_uInt16>(rPoint.Y() / m_pView->GetEntryHeight() );
+ sal_uInt16 nX = static_cast<sal_uInt16>(rPoint.X() / m_pView->GetEntryWidth() );
+ sal_uInt16 nTemp = nY * m_pView->GetColumnsCount() + nX;
- SvTreeListEntry* pEntry = pView->NextVisible(pStartEntry, nTemp);
+ SvTreeListEntry* pEntry = m_pView->NextVisible(m_pStartEntry, nTemp);
return pEntry;
}
@@ -251,44 +251,44 @@ SvTreeListEntry* IconViewImpl::GetClickedEntry( const Point& rPoint ) const
bool IconViewImpl::IsEntryInView( SvTreeListEntry* pEntry ) const
{
// parent collapsed
- if( !pView->IsEntryVisible(pEntry) )
+ if( !m_pView->IsEntryVisible(pEntry) )
return false;
- long nY = GetEntryLine( pEntry ) / pView->GetColumnsCount() * pView->GetEntryHeight();
+ long nY = GetEntryLine( pEntry ) / m_pView->GetColumnsCount() * m_pView->GetEntryHeight();
if( nY < 0 )
return false;
- long nMax = nVisibleCount / pView->GetColumnsCount() * pView->GetEntryHeight();
+ long nMax = m_nVisibleCount / m_pView->GetColumnsCount() * m_pView->GetEntryHeight();
if( nY >= nMax )
return false;
- long nStart = GetEntryLine( pEntry ) - GetEntryLine( pStartEntry );
+ long nStart = GetEntryLine( pEntry ) - GetEntryLine( m_pStartEntry );
return nStart >= 0;
}
void IconViewImpl::AdjustScrollBars( Size& rSize )
{
- long nEntryHeight = pView->GetEntryHeight();
+ long nEntryHeight = m_pView->GetEntryHeight();
if( !nEntryHeight )
return;
sal_uInt16 nResult = 0;
- Size aOSize( pView->Control::GetOutputSizePixel() );
+ Size aOSize( m_pView->Control::GetOutputSizePixel() );
- const WinBits nWindowStyle = pView->GetStyle();
+ const WinBits nWindowStyle = m_pView->GetStyle();
bool bVerSBar = ( nWindowStyle & WB_VSCROLL ) != 0;
// number of entries that are not collapsed
- sal_uLong nTotalCount = pView->GetVisibleCount();
+ sal_uLong nTotalCount = m_pView->GetVisibleCount();
// number of entries visible within the view
- nVisibleCount = aOSize.Height() / nEntryHeight * pView->GetColumnsCount();
+ m_nVisibleCount = aOSize.Height() / nEntryHeight * m_pView->GetColumnsCount();
- long nRows = ( nTotalCount / pView->GetColumnsCount() ) + 1;
+ long nRows = ( nTotalCount / m_pView->GetColumnsCount() ) + 1;
// do we need a vertical scrollbar?
- if( bVerSBar || nTotalCount > nVisibleCount )
+ if( bVerSBar || nTotalCount > m_nVisibleCount )
{
nResult = 1;
}
@@ -300,23 +300,23 @@ void IconViewImpl::AdjustScrollBars( Size& rSize )
// refresh output size, in case we have to scroll
tools::Rectangle aRect;
aRect.SetSize( aOSize );
- aSelEng.SetVisibleArea( aRect );
+ m_aSelEng.SetVisibleArea( aRect );
// vertical scrollbar
- if( !bInVScrollHdl )
+ if( !m_bInVScrollHdl )
{
- aVerSBar->SetPageSize( nTotalCount );
- aVerSBar->SetVisibleSize( nTotalCount - nRows );
+ m_aVerSBar->SetPageSize( nTotalCount );
+ m_aVerSBar->SetVisibleSize( nTotalCount - nRows );
}
else
{
- nFlags |= LBoxFlags::EndScrollSetVisSize;
+ m_nFlags |= LBoxFlags::EndScrollSetVisSize;
}
if( nResult & 0x0001 )
- aVerSBar->Show();
+ m_aVerSBar->Show();
else
- aVerSBar->Hide();
+ m_aVerSBar->Hide();
rSize = aOSize;
}
@@ -324,15 +324,15 @@ void IconViewImpl::AdjustScrollBars( Size& rSize )
// returns 0 if position is just past the last entry
SvTreeListEntry* IconViewImpl::GetEntry( const Point& rPoint ) const
{
- if( (pView->GetEntryCount() == 0) || !pStartEntry ||
- (rPoint.Y() > aOutputSize.Height())
- || !pView->GetEntryHeight()
- || !pView->GetEntryWidth())
+ if( (m_pView->GetEntryCount() == 0) || !m_pStartEntry ||
+ (rPoint.Y() > m_aOutputSize.Height())
+ || !m_pView->GetEntryHeight()
+ || !m_pView->GetEntryWidth())
return nullptr;
- sal_uInt16 nClickedEntry = static_cast<sal_uInt16>(rPoint.Y() / pView->GetEntryHeight() * pView->GetColumnsCount() + rPoint.X() / pView->GetEntryWidth() );
+ sal_uInt16 nClickedEntry = static_cast<sal_uInt16>(rPoint.Y() / m_pView->GetEntryHeight() * m_pView->GetColumnsCount() + rPoint.X() / m_pView->GetEntryWidth() );
sal_uInt16 nTemp = nClickedEntry;
- SvTreeListEntry* pEntry = pView->NextVisible(pStartEntry, nTemp);
+ SvTreeListEntry* pEntry = m_pView->NextVisible(m_pStartEntry, nTemp);
if( nTemp != nClickedEntry )
pEntry = nullptr;
return pEntry;
@@ -340,120 +340,120 @@ SvTreeListEntry* IconViewImpl::GetEntry( const Point& rPoint ) const
void IconViewImpl::SyncVerThumb()
{
- if( pStartEntry )
+ if( m_pStartEntry )
{
- long nEntryPos = pView->GetVisiblePos( pStartEntry );
- aVerSBar->SetThumbPos( nEntryPos );
+ long nEntryPos = m_pView->GetVisiblePos( m_pStartEntry );
+ m_aVerSBar->SetThumbPos( nEntryPos );
}
else
- aVerSBar->SetThumbPos( 0 );
+ m_aVerSBar->SetThumbPos( 0 );
}
void IconViewImpl::UpdateAll( bool bInvalidateCompleteView )
{
FindMostRight( nullptr );
- aVerSBar->SetRange( Range( 0, pView->GetVisibleCount() ) );
+ m_aVerSBar->SetRange( Range( 0, m_pView->GetVisibleCount() ) );
SyncVerThumb();
FillView();
ShowVerSBar();
- if( bSimpleTravel && pCursor && pView->HasFocus() )
- pView->Select( pCursor );
+ if( m_bSimpleTravel && m_pCursor && m_pView->HasFocus() )
+ m_pView->Select( m_pCursor );
ShowCursor( true );
if( bInvalidateCompleteView )
- pView->Invalidate();
+ m_pView->Invalidate();
else
- pView->Invalidate( GetVisibleArea() );
+ m_pView->Invalidate( GetVisibleArea() );
}
void IconViewImpl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
- if (!pView->GetVisibleCount())
+ if (!m_pView->GetVisibleCount())
return;
- nFlags |= LBoxFlags::InPaint;
+ m_nFlags |= LBoxFlags::InPaint;
- if (nFlags & LBoxFlags::Filling)
+ if (m_nFlags & LBoxFlags::Filling)
{
- SvTreeListEntry* pFirst = pView->First();
- if (pFirst != pStartEntry)
+ SvTreeListEntry* pFirst = m_pView->First();
+ if (pFirst != m_pStartEntry)
{
ShowCursor(false);
- pStartEntry = pView->First();
- aVerSBar->SetThumbPos( 0 );
+ m_pStartEntry = m_pView->First();
+ m_aVerSBar->SetThumbPos( 0 );
StopUserEvent();
ShowCursor(true);
- nCurUserEvent = Application::PostUserEvent(LINK(this, SvImpLBox, MyUserEvent),
+ m_nCurUserEvent = Application::PostUserEvent(LINK(this, SvImpLBox, MyUserEvent),
reinterpret_cast<void*>(1));
return;
}
}
- if (!pStartEntry)
+ if (!m_pStartEntry)
{
- pStartEntry = pView->First();
+ m_pStartEntry = m_pView->First();
}
long nRectHeight = rRect.GetHeight();
long nRectWidth = rRect.GetWidth();
- long nEntryHeight = pView->GetEntryHeight();
- long nEntryWidth = pView->GetEntryWidth();
+ long nEntryHeight = m_pView->GetEntryHeight();
+ long nEntryWidth = m_pView->GetEntryWidth();
// calculate area for the entries we want to draw
- sal_uInt16 nStartId = static_cast<sal_uInt16>(rRect.Top() / nEntryHeight * pView->GetColumnsCount() + (rRect.Left() / nEntryWidth));
+ sal_uInt16 nStartId = static_cast<sal_uInt16>(rRect.Top() / nEntryHeight * m_pView->GetColumnsCount() + (rRect.Left() / nEntryWidth));
sal_uInt16 nCount = static_cast<sal_uInt16>(( nRectHeight / nEntryHeight + 1 ) * nRectWidth / nEntryWidth);
nCount += 2; // don't miss an entry
- long nY = nStartId / pView->GetColumnsCount() * nEntryHeight;
+ long nY = nStartId / m_pView->GetColumnsCount() * nEntryHeight;
long nX = 0;
- SvTreeListEntry* pEntry = pStartEntry;
+ SvTreeListEntry* pEntry = m_pStartEntry;
while (nStartId && pEntry)
{
- pEntry = pView->NextVisible(pEntry);
+ pEntry = m_pView->NextVisible(pEntry);
nStartId--;
}
vcl::Region aClipRegion(GetClipRegionRect());
- if (!pCursor && !mbNoAutoCurEntry)
+ if (!m_pCursor && !mbNoAutoCurEntry)
{
// do not select if multiselection or explicit set
- bool bNotSelect = (aSelEng.GetSelectionMode() == SelectionMode::Multiple ) || ((m_nStyle & WB_NOINITIALSELECTION) == WB_NOINITIALSELECTION);
- SetCursor(pStartEntry, bNotSelect);
+ bool bNotSelect = (m_aSelEng.GetSelectionMode() == SelectionMode::Multiple ) || ((m_nStyle & WB_NOINITIALSELECTION) == WB_NOINITIALSELECTION);
+ SetCursor(m_pStartEntry, bNotSelect);
}
for(sal_uInt16 n = 0; n< nCount && pEntry; n++)
{
- static_cast<IconView*>(pView.get())->PaintEntry(*pEntry, nX, nY, rRenderContext);
+ static_cast<IconView*>(m_pView.get())->PaintEntry(*pEntry, nX, nY, rRenderContext);
nX += nEntryWidth;
- if(nX + pView->GetEntryWidth() > nEntryWidth * pView->GetColumnsCount())
+ if(nX + m_pView->GetEntryWidth() > nEntryWidth * m_pView->GetColumnsCount())
{
nY += nEntryHeight;
nX = 0;
}
- pEntry = pView->NextVisible(pEntry);
+ pEntry = m_pView->NextVisible(pEntry);
}
- nFlags &= ~LBoxFlags::DeselectAll;
+ m_nFlags &= ~LBoxFlags::DeselectAll;
rRenderContext.SetClipRegion();
- nFlags &= ~LBoxFlags::InPaint;
+ m_nFlags &= ~LBoxFlags::InPaint;
}
void IconViewImpl::InvalidateEntry( long nId ) const
{
- if( nFlags & LBoxFlags::InPaint )
+ if( m_nFlags & LBoxFlags::InPaint )
return;
tools::Rectangle aRect( GetVisibleArea() );
long nMaxBottom = aRect.Bottom();
- aRect.SetTop( nId / pView->GetColumnsCount() * pView->GetEntryHeight() );
- aRect.SetBottom( aRect.Top() ); aRect.AdjustBottom(pView->GetEntryHeight() );
+ aRect.SetTop( nId / m_pView->GetColumnsCount() * m_pView->GetEntryHeight() );
+ aRect.SetBottom( aRect.Top() ); aRect.AdjustBottom(m_pView->GetEntryHeight() );
if( aRect.Top() > nMaxBottom )
return;
if( aRect.Bottom() > nMaxBottom )
aRect.SetBottom( nMaxBottom );
- pView->Invalidate( aRect );
+ m_pView->Invalidate( aRect );
}
bool IconViewImpl::KeyInput( const KeyEvent& rKEvt )
@@ -463,11 +463,11 @@ bool IconViewImpl::KeyInput( const KeyEvent& rKEvt )
if( rKeyCode.IsMod2() )
return false; // don't evaluate Alt key
- nFlags &= ~LBoxFlags::Filling;
+ m_nFlags &= ~LBoxFlags::Filling;
- if( !pCursor )
- pCursor = pStartEntry;
- if( !pCursor )
+ if( !m_pCursor )
+ m_pCursor = m_pStartEntry;
+ if( !m_pCursor )
return false;
sal_uInt16 aCode = rKeyCode.GetCode();
@@ -480,57 +480,57 @@ bool IconViewImpl::KeyInput( const KeyEvent& rKEvt )
bool bHandled = true;
long i;
- long nColumns = pView->GetColumnsCount();
+ long nColumns = m_pView->GetColumnsCount();
switch( aCode )
{
case KEY_LEFT:
- if( !IsEntryInView( pCursor ) )
- MakeVisible( pCursor );
+ if( !IsEntryInView( m_pCursor ) )
+ MakeVisible( m_pCursor );
- pNewCursor = pCursor;
+ pNewCursor = m_pCursor;
do
{
- pNewCursor = pView->PrevVisible(pNewCursor);
+ pNewCursor = m_pView->PrevVisible(pNewCursor);
} while( pNewCursor && !IsSelectable(pNewCursor) );
// if there is no next entry, take the current one
// this ensures that in case of _one_ entry in the list, this entry is selected when pressing
// the cursor key
if (!pNewCursor)
- pNewCursor = pCursor;
+ pNewCursor = m_pCursor;
- aSelEng.CursorPosChanging( bShift, bMod1 );
+ m_aSelEng.CursorPosChanging( bShift, bMod1 );
SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
if( !IsEntryInView( pNewCursor ) )
KeyUp( false );
break;
case KEY_RIGHT:
- if( !IsEntryInView( pCursor ) )
- MakeVisible( pCursor );
+ if( !IsEntryInView( m_pCursor ) )
+ MakeVisible( m_pCursor );
- pNewCursor = pCursor;
+ pNewCursor = m_pCursor;
do
{
- pNewCursor = pView->NextVisible(pNewCursor);
+ pNewCursor = m_pView->NextVisible(pNewCursor);
} while( pNewCursor && !IsSelectable(pNewCursor) );
// if there is no next entry, take the current one
// this ensures that in case of _one_ entry in the list, this entry is selected when pressing
// the cursor key
- if ( !pNewCursor && pCursor )
- pNewCursor = pCursor;
+ if ( !pNewCursor && m_pCursor )
+ pNewCursor = m_pCursor;
if( pNewCursor )
{
- aSelEng.CursorPosChanging( bShift, bMod1 );
+ m_aSelEng.CursorPosChanging( bShift, bMod1 );
if( IsEntryInView( pNewCursor ) )
SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
else
{
- if( pCursor )
- pView->Select( pCursor, false );
+ if( m_pCursor )
+ m_pView->Select( m_pCursor, false );
KeyDown( false );
SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
}
@@ -542,27 +542,27 @@ bool IconViewImpl::KeyInput( const KeyEvent& rKEvt )
case KEY_UP:
{
- if( !IsEntryInView( pCursor ) )
- MakeVisible( pCursor );
+ if( !IsEntryInView( m_pCursor ) )
+ MakeVisible( m_pCursor );
- pNewCursor = pCursor;
+ pNewCursor = m_pCursor;
for( i = 0; i < nColumns && pNewCursor; i++)
{
do
{
- pNewCursor = pView->PrevVisible(pNewCursor);
+ pNewCursor = m_pView->PrevVisible(pNewCursor);
} while( pNewCursor && !IsSelectable(pNewCursor) );
}
// if there is no next entry, take the current one
// this ensures that in case of _one_ entry in the list, this entry is selected when pressing
// the cursor key
- if ( !pNewCursor && pCursor )
- pNewCursor = pCursor;
+ if ( !pNewCursor && m_pCursor )
+ pNewCursor = m_pCursor;
if( pNewCursor )
{
- aSelEng.CursorPosChanging( bShift, bMod1 );
+ m_aSelEng.CursorPosChanging( bShift, bMod1 );
SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
if( !IsEntryInView( pNewCursor ) )
KeyUp( false );
@@ -572,33 +572,33 @@ bool IconViewImpl::KeyInput( const KeyEvent& rKEvt )
case KEY_DOWN:
{
- if( !IsEntryInView( pCursor ) )
- MakeVisible( pCursor );
+ if( !IsEntryInView( m_pCursor ) )
+ MakeVisible( m_pCursor );
- pNewCursor = pCursor;
+ pNewCursor = m_pCursor;
for( i = 0; i < nColumns && pNewCursor; i++)
{
do
{
- pNewCursor = pView->NextVisible(pNewCursor);
+ pNewCursor = m_pView->NextVisible(pNewCursor);
} while( pNewCursor && !IsSelectable(pNewCursor) );
}
// if there is no next entry, take the current one
// this ensures that in case of _one_ entry in the list, this entry is selected when pressing
// the cursor key
- if ( !pNewCursor && pCursor )
- pNewCursor = pCursor;
+ if ( !pNewCursor && m_pCursor )
+ pNewCursor = m_pCursor;
if( pNewCursor )
{
- aSelEng.CursorPosChanging( bShift, bMod1 );
+ m_aSelEng.CursorPosChanging( bShift, bMod1 );
if( IsEntryInView( pNewCursor ) )
SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
else
{
- if( pCursor )
- pView->Select( pCursor, false );
+ if( m_pCursor )
+ m_pView->Select( m_pCursor, false );
KeyDown( false );
SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
}
@@ -611,7 +611,7 @@ bool IconViewImpl::KeyInput( const KeyEvent& rKEvt )
case KEY_RETURN:
{
- pView->aDoubleClickHdl.Call( pView );
+ m_pView->aDoubleClickHdl.Call( m_pView );
bHandled = true;
break;
@@ -619,24 +619,24 @@ bool IconViewImpl::KeyInput( const KeyEvent& rKEvt )
case KEY_END:
{
- pNewCursor = pView->GetModel()->Last();
+ pNewCursor = m_pView->GetModel()->Last();
while( pNewCursor && !IsSelectable(pNewCursor) )
{
- pNewCursor = pView->PrevVisible(pNewCursor);
+ pNewCursor = m_pView->PrevVisible(pNewCursor);
}
- pStartEntry = pNewCursor;
+ m_pStartEntry = pNewCursor;
- while( pStartEntry && pView->GetAbsPos( pStartEntry ) % pView->GetColumnsCount() != 0 )
+ while( m_pStartEntry && m_pView->GetAbsPos( m_pStartEntry ) % m_pView->GetColumnsCount() != 0 )
{
- pStartEntry = pView->PrevVisible(pStartEntry);
+ m_pStartEntry = m_pView->PrevVisible(m_pStartEntry);
}
- if( pNewCursor && pNewCursor != pCursor)
+ if( pNewCursor && pNewCursor != m_pCursor)
{
// SelAllDestrAnch( false );
- aSelEng.CursorPosChanging( bShift, bMod1 );
+ m_aSelEng.CursorPosChanging( bShift, bMod1 );
SetCursor( pNewCursor );
SyncVerThumb();
}
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index b6c5dfde1b68..9fb6062ec089 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -3833,7 +3833,7 @@ IMPL_LINK(SalInstanceTreeView, ToggleHdl, SvLBoxButtonData*, pData, void)
// toggled signal handlers can query get_cursor to get which
// node was clicked
- m_xTreeView->pImpl->pCursor = pEntry;
+ m_xTreeView->pImpl->m_pCursor = pEntry;
for (int i = 1, nCount = pEntry->ItemCount(); i < nCount; ++i)
{
diff --git a/vcl/source/treelist/svimpbox.cxx b/vcl/source/treelist/svimpbox.cxx
index ede98aa18f7f..c4b819ada619 100644
--- a/vcl/source/treelist/svimpbox.cxx
+++ b/vcl/source/treelist/svimpbox.cxx
@@ -47,75 +47,75 @@ Image* SvImpLBox::s_pDefExpanded = nullptr;
oslInterlockedCount SvImpLBox::s_nImageRefCount = 0;
SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvTreeList* pLBTree, WinBits nWinStyle)
- : aHorSBar(VclPtr<ScrollBar>::Create(pLBView, WB_DRAG | WB_HSCROLL))
- , aScrBarBox(VclPtr<ScrollBarBox>::Create(pLBView))
- , aFctSet(this, pLBView)
- , bAreChildrenTransient(true)
+ : m_aHorSBar(VclPtr<ScrollBar>::Create(pLBView, WB_DRAG | WB_HSCROLL))
+ , m_aScrBarBox(VclPtr<ScrollBarBox>::Create(pLBView))
+ , m_aFctSet(this, pLBView)
+ , m_bAreChildrenTransient(true)
, mbForceMakeVisible (false)
- , aVerSBar(VclPtr<ScrollBar>::Create(pLBView, WB_DRAG | WB_VSCROLL))
- , aOutputSize(0, 0)
+ , m_aVerSBar(VclPtr<ScrollBar>::Create(pLBView, WB_DRAG | WB_VSCROLL))
+ , m_aOutputSize(0, 0)
, mbNoAutoCurEntry(false)
- , aSelEng(pLBView, nullptr)
- , nNextVerVisSize(0)
+ , m_aSelEng(pLBView, nullptr)
+ , m_nNextVerVisSize(0)
{
osl_atomic_increment(&s_nImageRefCount);
- pView = pLBView;
- pTree = pLBTree;
- aSelEng.SetFunctionSet( static_cast<FunctionSet*>(&aFctSet) );
- aSelEng.ExpandSelectionOnMouseMove( false );
+ m_pView = pLBView;
+ m_pTree = pLBTree;
+ m_aSelEng.SetFunctionSet( static_cast<FunctionSet*>(&m_aFctSet) );
+ m_aSelEng.ExpandSelectionOnMouseMove( false );
SetStyle( nWinStyle );
SetSelectionMode( SelectionMode::Single );
SetDragDropMode( DragDropMode::NONE );
- aVerSBar->SetScrollHdl( LINK( this, SvImpLBox, ScrollUpDownHdl ) );
- aHorSBar->SetScrollHdl( LINK( this, SvImpLBox, ScrollLeftRightHdl ) );
- aHorSBar->SetEndScrollHdl( LINK( this, SvImpLBox, EndScrollHdl ) );
- aVerSBar->SetEndScrollHdl( LINK( this, SvImpLBox, EndScrollHdl ) );
- aVerSBar->SetRange( Range(0,0) );
- aVerSBar->Hide();
- aHorSBar->SetRange( Range(0,0) );
- aHorSBar->SetPageSize( 24 ); // pixels
- aHorSBar->SetLineSize( 8 ); // pixels
-
- nHorSBarHeight = static_cast<short>(aHorSBar->GetSizePixel().Height());
- nVerSBarWidth = static_cast<short>(aVerSBar->GetSizePixel().Width());
-
- pStartEntry = nullptr;
- pCursor = nullptr;
- pAnchor = nullptr;
- nVisibleCount = 0; // number of rows of data in control
- nNodeBmpTabDistance = NODE_BMP_TABDIST_NOTVALID;
- nNodeBmpWidth = 0;
-
- bAsyncBeginDrag = false;
- aAsyncBeginDragIdle.SetPriority( TaskPriority::HIGHEST );
- aAsyncBeginDragIdle.SetInvokeHandler( LINK(this,SvImpLBox,BeginDragHdl));
+ m_aVerSBar->SetScrollHdl( LINK( this, SvImpLBox, ScrollUpDownHdl ) );
+ m_aHorSBar->SetScrollHdl( LINK( this, SvImpLBox, ScrollLeftRightHdl ) );
+ m_aHorSBar->SetEndScrollHdl( LINK( this, SvImpLBox, EndScrollHdl ) );
+ m_aVerSBar->SetEndScrollHdl( LINK( this, SvImpLBox, EndScrollHdl ) );
+ m_aVerSBar->SetRange( Range(0,0) );
+ m_aVerSBar->Hide();
+ m_aHorSBar->SetRange( Range(0,0) );
+ m_aHorSBar->SetPageSize( 24 ); // pixels
+ m_aHorSBar->SetLineSize( 8 ); // pixels
+
+ m_nHorSBarHeight = static_cast<short>(m_aHorSBar->GetSizePixel().Height());
+ m_nVerSBarWidth = static_cast<short>(m_aVerSBar->GetSizePixel().Width());
+
+ m_pStartEntry = nullptr;
+ m_pCursor = nullptr;
+ m_pAnchor = nullptr;
+ m_nVisibleCount = 0; // number of rows of data in control
+ m_nNodeBmpTabDistance = NODE_BMP_TABDIST_NOTVALID;
+ m_nNodeBmpWidth = 0;
+
+ m_bAsyncBeginDrag = false;
+ m_aAsyncBeginDragIdle.SetPriority( TaskPriority::HIGHEST );
+ m_aAsyncBeginDragIdle.SetInvokeHandler( LINK(this,SvImpLBox,BeginDragHdl));
// button animation in listbox
- pActiveButton = nullptr;
- pActiveEntry = nullptr;
- pActiveTab = nullptr;
+ m_pActiveButton = nullptr;
+ m_pActiveEntry = nullptr;
+ m_pActiveTab = nullptr;
- nFlags = LBoxFlags::NONE;
- nCurTabPos = FIRST_ENTRY_TAB;
+ m_nFlags = LBoxFlags::NONE;
+ m_nCurTabPos = FIRST_ENTRY_TAB;
- aEditIdle.SetPriority( TaskPriority::LOWEST );
- aEditIdle.SetInvokeHandler( LINK(this,SvImpLBox,EditTimerCall) );
+ m_aEditIdle.SetPriority( TaskPriority::LOWEST );
+ m_aEditIdle.SetInvokeHandler( LINK(this,SvImpLBox,EditTimerCall) );
- nMostRight = -1;
- pMostRightEntry = nullptr;
- nCurUserEvent = nullptr;
+ m_nMostRight = -1;
+ m_pMostRightEntry = nullptr;
+ m_nCurUserEvent = nullptr;
- bUpdateMode = true;
- bInVScrollHdl = false;
- nFlags |= LBoxFlags::Filling;
+ m_bUpdateMode = true;
+ m_bInVScrollHdl = false;
+ m_nFlags |= LBoxFlags::Filling;
- bSubLstOpRet = bSubLstOpLR = bContextMenuHandling = bIsCellFocusEnabled = false;
- bSubLstOpDblClick = true;
+ m_bSubLstOpRet = m_bSubLstOpLR = m_bContextMenuHandling = m_bIsCellFocusEnabled = false;
+ m_bSubLstOpDblClick = true;
}
SvImpLBox::~SvImpLBox()
{
- aEditIdle.Stop();
+ m_aEditIdle.Stop();
StopUserEvent();
if ( osl_atomic_decrement(&s_nImageRefCount) == 0 )
@@ -123,9 +123,9 @@ SvImpLBox::~SvImpLBox()
DELETEZ(s_pDefCollapsed);
DELETEZ(s_pDefExpanded);
}
- aVerSBar.disposeAndClear();
- aHorSBar.disposeAndClear();
- aScrBarBox.disposeAndClear();
+ m_aVerSBar.disposeAndClear();
+ m_aHorSBar.disposeAndClear();
+ m_aScrBarBox.disposeAndClear();
}
void SvImpLBox::UpdateStringSorter()
@@ -152,26 +152,26 @@ void SvImpLBox::UpdateStringSorter()
short SvImpLBox::UpdateContextBmpWidthVector( SvTreeListEntry const * pEntry, short nWidth )
{
- DBG_ASSERT( pView->pModel, "View and Model aren't valid!" );
+ DBG_ASSERT( m_pView->pModel, "View and Model aren't valid!" );
- sal_uInt16 nDepth = pView->pModel->GetDepth( pEntry );
+ sal_uInt16 nDepth = m_pView->pModel->GetDepth( pEntry );
// initialize vector if necessary
- std::vector< short >::size_type nSize = aContextBmpWidthVector.size();
+ std::vector< short >::size_type nSize = m_aContextBmpWidthVector.size();
while ( nDepth > nSize )
{
- aContextBmpWidthVector.resize( nSize + 1 );
- aContextBmpWidthVector.at( nSize ) = nWidth;
+ m_aContextBmpWidthVector.resize( nSize + 1 );
+ m_aContextBmpWidthVector.at( nSize ) = nWidth;
++nSize;
}
- if( aContextBmpWidthVector.size() == nDepth )
+ if( m_aContextBmpWidthVector.size() == nDepth )
{
- aContextBmpWidthVector.resize( nDepth + 1 );
- aContextBmpWidthVector.at( nDepth ) = 0;
+ m_aContextBmpWidthVector.resize( nDepth + 1 );
+ m_aContextBmpWidthVector.at( nDepth ) = 0;
}
- short nContextBmpWidth = aContextBmpWidthVector[ nDepth ];
+ short nContextBmpWidth = m_aContextBmpWidthVector[ nDepth ];
if( nContextBmpWidth < nWidth )
{
- aContextBmpWidthVector.at( nDepth ) = nWidth;
+ m_aContextBmpWidthVector.at( nDepth ) = nWidth;
return nWidth;
}
else
@@ -190,44 +190,44 @@ void SvImpLBox::UpdateContextBmpWidthVectorFromMovedEntry( SvTreeListEntry* pEnt
if( pEntry->HasChildren() ) // recursive call, whether expanded or not
{
- SvTreeListEntry* pChild = pView->FirstChild( pEntry );
+ SvTreeListEntry* pChild = m_pView->FirstChild( pEntry );
DBG_ASSERT( pChild, "The first child is invalid!" );
do
{
UpdateContextBmpWidthVectorFromMovedEntry( pChild );
- pChild = pView->Next( pChild );
+ pChild = m_pView->Next( pChild );
} while ( pChild );
}
}
void SvImpLBox::UpdateContextBmpWidthMax( SvTreeListEntry const * pEntry )
{
- sal_uInt16 nDepth = pView->pModel->GetDepth( pEntry );
- if( aContextBmpWidthVector.empty() )
+ sal_uInt16 nDepth = m_pView->pModel->GetDepth( pEntry );
+ if( m_aContextBmpWidthVector.empty() )
return;
- short nWidth = aContextBmpWidthVector[ nDepth ];
- if( nWidth != pView->nContextBmpWidthMax ) {
- pView->nContextBmpWidthMax = nWidth;
- nFlags |= LBoxFlags::IgnoreChangedTabs;
- pView->SetTabs();
- nFlags &= ~LBoxFlags::IgnoreChangedTabs;
+ short nWidth = m_aContextBmpWidthVector[ nDepth ];
+ if( nWidth != m_pView->nContextBmpWidthMax ) {
+ m_pView->nContextBmpWidthMax = nWidth;
+ m_nFlags |= LBoxFlags::IgnoreChangedTabs;
+ m_pView->SetTabs();
+ m_nFlags &= ~LBoxFlags::IgnoreChangedTabs;
}
}
void SvImpLBox::CalcCellFocusRect( SvTreeListEntry const * pEntry, tools::Rectangle& rRect )
{
- if ( !(pEntry && bIsCellFocusEnabled) )
+ if ( !(pEntry && m_bIsCellFocusEnabled) )
return;
- if ( nCurTabPos > FIRST_ENTRY_TAB )
+ if ( m_nCurTabPos > FIRST_ENTRY_TAB )
{
- SvLBoxItem& rItem = pCursor->GetItem( nCurTabPos );
- rRect.SetLeft( pView->GetTab( pCursor, &rItem )->GetPos() );
+ SvLBoxItem& rItem = m_pCursor->GetItem( m_nCurTabPos );
+ rRect.SetLeft( m_pView->GetTab( m_pCursor, &rItem )->GetPos() );
}
- if (pCursor->ItemCount() > static_cast<size_t>(nCurTabPos+1))
+ if (m_pCursor->ItemCount() > static_cast<size_t>(m_nCurTabPos+1))
{
- SvLBoxItem& rNextItem = pCursor->GetItem( nCurTabPos + 1 );
- long nRight = pView->GetTab( pCursor, &rNextItem )->GetPos() - 1;
+ SvLBoxItem& rNextItem = m_pCursor->GetItem( m_nCurTabPos + 1 );
+ long nRight = m_pView->GetTab( m_pCursor, &rNextItem )->GetPos() - 1;
if ( nRight < rRect.Right() )
rRect.SetRight( nRight );
}
@@ -236,8 +236,8 @@ void SvImpLBox::CalcCellFocusRect( SvTreeListEntry const * pEntry, tools::Rectan
void SvImpLBox::SetStyle( WinBits i_nWinStyle )
{
m_nStyle = i_nWinStyle;
- if ( ( m_nStyle & WB_SIMPLEMODE) && ( aSelEng.GetSelectionMode() == SelectionMode::Multiple ) )
- aSelEng.AddAlways( true );
+ if ( ( m_nStyle & WB_SIMPLEMODE) && ( m_aSelEng.GetSelectionMode() == SelectionMode::Multiple ) )
+ m_aSelEng.AddAlways( true );
}
void SvImpLBox::SetNoAutoCurEntry( bool b )
@@ -249,43 +249,43 @@ void SvImpLBox::SetNoAutoCurEntry( bool b )
void SvImpLBox::Clear()
{
StopUserEvent();
- pStartEntry = nullptr;
- pAnchor = nullptr;
+ m_pStartEntry = nullptr;
+ m_pAnchor = nullptr;
- pActiveButton = nullptr;
- pActiveEntry = nullptr;
- pActiveTab = nullptr;
+ m_pActiveButton = nullptr;
+ m_pActiveEntry = nullptr;
+ m_pActiveTab = nullptr;
- nMostRight = -1;
- pMostRightEntry = nullptr;
+ m_nMostRight = -1;
+ m_pMostRightEntry = nullptr;
// don't touch the cursor any more
- if( pCursor )
+ if( m_pCursor )
{
- if( pView->HasFocus() )
- pView->HideFocus();
- pCursor = nullptr;
+ if( m_pView->HasFocus() )
+ m_pView->HideFocus();
+ m_pCursor = nullptr;
}
- aVerSBar->Hide();
- aVerSBar->SetThumbPos( 0 );
+ m_aVerSBar->Hide();
+ m_aVerSBar->SetThumbPos( 0 );
Range aRange( 0, 0 );
- aVerSBar->SetRange( aRange );
- aOutputSize = pView->Control::GetOutputSizePixel();
- aHorSBar->Hide();
- aHorSBar->SetThumbPos( 0 );
- MapMode aMapMode( pView->GetMapMode());
+ m_aVerSBar->SetRange( aRange );
+ m_aOutputSize = m_pView->Control::GetOutputSizePixel();
+ m_aHorSBar->Hide();
+ m_aHorSBar->SetThumbPos( 0 );
+ MapMode aMapMode( m_pView->GetMapMode());
aMapMode.SetOrigin( Point(0,0) );
- pView->Control::SetMapMode( aMapMode );
- aHorSBar->SetRange( aRange );
- aHorSBar->SetSizePixel(Size(aOutputSize.Width(),nHorSBarHeight));
- pView->SetClipRegion();
+ m_pView->Control::SetMapMode( aMapMode );
+ m_aHorSBar->SetRange( aRange );
+ m_aHorSBar->SetSizePixel(Size(m_aOutputSize.Width(),m_nHorSBarHeight));
+ m_pView->SetClipRegion();
if( GetUpdateMode() )
- pView->Invalidate( GetVisibleArea() );
- nFlags |= LBoxFlags::Filling;
- if( !aHorSBar->IsVisible() && !aVerSBar->IsVisible() )
- aScrBarBox->Hide();
+ m_pView->Invalidate( GetVisibleArea() );
+ m_nFlags |= LBoxFlags::Filling;
+ if( !m_aHorSBar->IsVisible() && !m_aVerSBar->IsVisible() )
+ m_aScrBarBox->Hide();
- aContextBmpWidthVector.clear();
+ m_aContextBmpWidthVector.clear();
CallEventListeners( VclEventId::ListboxItemRemoved );
}
@@ -296,10 +296,10 @@ void SvImpLBox::Clear()
IMPL_LINK_NOARG(SvImpLBox, EndScrollHdl, ScrollBar*, void)
{
- if( nFlags & LBoxFlags::EndScrollSetVisSize )
+ if( m_nFlags & LBoxFlags::EndScrollSetVisSize )
{
- aVerSBar->SetVisibleSize( nNextVerVisSize );
- nFlags &= ~LBoxFlags::EndScrollSetVisSize;
+ m_aVerSBar->SetVisibleSize( m_nNextVerVisSize );
+ m_nFlags &= ~LBoxFlags::EndScrollSetVisSize;
}
EndScroll();
}
@@ -308,19 +308,19 @@ IMPL_LINK_NOARG(SvImpLBox, EndScrollHdl, ScrollBar*, void)
IMPL_LINK( SvImpLBox, ScrollUpDownHdl, ScrollBar *, pScrollBar, void )
{
- DBG_ASSERT(!bInVScrollHdl,"Scroll handler out-paces itself!");
+ DBG_ASSERT(!m_bInVScrollHdl,"Scroll handler out-paces itself!");
long nDelta = pScrollBar->GetDelta();
if( !nDelta )
return;
- nFlags &= ~LBoxFlags::Filling;
+ m_nFlags &= ~LBoxFlags::Filling;
- bInVScrollHdl = true;
+ m_bInVScrollHdl = true;
- if( pView->IsEditingActive() )
+ if( m_pView->IsEditingActive() )
{
- pView->EndEditing( true ); // Cancel
- pView->Update();
+ m_pView->EndEditing( true ); // Cancel
+ m_pView->Update();
}
BeginScroll();
@@ -339,50 +339,50 @@ IMPL_LINK( SvImpLBox, ScrollUpDownHdl, ScrollBar *, pScrollBar, void )
else
PageUp( static_cast<sal_uInt16>(nDelta) );
}
- bInVScrollHdl = false;
+ m_bInVScrollHdl = false;
}
void SvImpLBox::CursorDown()
{
- if (!pStartEntry)
+ if (!m_pStartEntry)
return;
- SvTreeListEntry* pNextFirstToDraw = pView->NextVisible(pStartEntry);
+ SvTreeListEntry* pNextFirstToDraw = m_pView->NextVisible(m_pStartEntry);
if( pNextFirstToDraw )
{
- nFlags &= ~LBoxFlags::Filling;
+ m_nFlags &= ~LBoxFlags::Filling;
ShowCursor( false );
- pView->Update();
- pStartEntry = pNextFirstToDraw;
+ m_pView->Update();
+ m_pStartEntry = pNextFirstToDraw;
tools::Rectangle aArea( GetVisibleArea() );
- pView->Scroll( 0, -(pView->GetEntryHeight()), aArea, ScrollFlags::NoChildren );
- pView->Update();
+ m_pView->Scroll( 0, -(m_pView->GetEntryHeight()), aArea, ScrollFlags::NoChildren );
+ m_pView->Update();
ShowCursor( true );
- pView->NotifyScrolled();
+ m_pView->NotifyScrolled();
}
}
void SvImpLBox::CursorUp()
{
- if (!pStartEntry)
+ if (!m_pStartEntry)
return;
- SvTreeListEntry* pPrevFirstToDraw = pView->PrevVisible(pStartEntry);
+ SvTreeListEntry* pPrevFirstToDraw = m_pView->PrevVisible(m_pStartEntry);
if( !pPrevFirstToDraw )
return;
- nFlags &= ~LBoxFlags::Filling;
- long nEntryHeight = pView->GetEntryHeight();
+ m_nFlags &= ~LBoxFlags::Filling;
+ long nEntryHeight = m_pView->GetEntryHeight();
ShowCursor( false );
- pView->Update();
- pStartEntry = pPrevFirstToDraw;
+ m_pView->Update();
+ m_pStartEntry = pPrevFirstToDraw;
tools::Rectangle aArea( GetVisibleArea() );
aArea.AdjustBottom( -nEntryHeight );
- pView->Scroll( 0, nEntryHeight, aArea, ScrollFlags::NoChildren );
- pView->Update();
+ m_pView->Scroll( 0, nEntryHeight, aArea, ScrollFlags::NoChildren );
+ m_pView->Update();
ShowCursor( true );
- pView->NotifyScrolled();
+ m_pView->NotifyScrolled();
}
void SvImpLBox::PageDown( sal_uInt16 nDelta )
@@ -392,33 +392,33 @@ void SvImpLBox::PageDown( sal_uInt16 nDelta )
if( !nDelta )
return;
- if (!pStartEntry)
+ if (!m_pStartEntry)
return;
- SvTreeListEntry* pNext = pView->NextVisible(pStartEntry, nRealDelta);
- if( pNext == pStartEntry )
+ SvTreeListEntry* pNext = m_pView->NextVisible(m_pStartEntry, nRealDelta);
+ if( pNext == m_pStartEntry )
return;
ShowCursor( false );
- nFlags &= ~LBoxFlags::Filling;
- pView->Update();
- pStartEntry = pNext;
+ m_nFlags &= ~LBoxFlags::Filling;
+ m_pView->Update();
+ m_pStartEntry = pNext;
- if( nRealDelta >= nVisibleCount )
+ if( nRealDelta >= m_nVisibleCount )
{
- pView->Invalidate( GetVisibleArea() );
- pView->Update();
+ m_pView->Invalidate( GetVisibleArea() );
+ m_pView->Update();
}
else
{
tools::Rectangle aArea( GetVisibleArea() );
- long nScroll = pView->GetEntryHeight() * static_cast<long>(nRealDelta);
+ long nScroll = m_pView->GetEntryHeight() * static_cast<long>(nRealDelta);
nScroll = -nScroll;
- pView->Update();
- pView->Scroll( 0, nScroll, aArea, ScrollFlags::NoChildren );
- pView->Update();
- pView->NotifyScrolled();
+ m_pView->Update();
+ m_pView->Scroll( 0, nScroll, aArea, ScrollFlags::NoChildren );
+ m_pView->Update();
+ m_pView->NotifyScrolled();
}
ShowCursor( true );
@@ -430,31 +430,31 @@ void SvImpLBox::PageUp( sal_uInt16 nDelta )
if( !nDelta )
return;
- if (!pStartEntry)
+ if (!m_pStartEntry)
return;
- SvTreeListEntry* pPrev = pView->PrevVisible(pStartEntry, nRealDelta);
- if( pPrev == pStartEntry )
+ SvTreeListEntry* pPrev = m_pView->PrevVisible(m_pStartEntry, nRealDelta);
+ if( pPrev == m_pStartEntry )
return;
- nFlags &= ~LBoxFlags::Filling;
+ m_nFlags &= ~LBoxFlags::Filling;
ShowCursor( false );
- pView->Update();
- pStartEntry = pPrev;
- if( nRealDelta >= nVisibleCount )
+ m_pView->Update();
+ m_pStartEntry = pPrev;
+ if( nRealDelta >= m_nVisibleCount )
{
- pView->Invalidate( GetVisibleArea() );
- pView->Update();
+ m_pView->Invalidate( GetVisibleArea() );
+ m_pView->Update();
}
else
{
- long nEntryHeight = pView->GetEntryHeight();
+ long nEntryHeight = m_pView->GetEntryHeight();
tools::Rectangle aArea( GetVisibleArea() );
- pView->Update();
- pView->Scroll( 0, nEntryHeight*nRealDelta, aArea, ScrollFlags::NoChildren );
- pView->Update();
- pView->NotifyScrolled();
+ m_pView->Update();
+ m_pView->Scroll( 0, nEntryHeight*nRealDelta, aArea, ScrollFlags::NoChildren );
+ m_pView->Update();
+ m_pView->NotifyScrolled();
}
ShowCursor( true );
@@ -462,16 +462,16 @@ void SvImpLBox::PageUp( sal_uInt16 nDelta )
void SvImpLBox::KeyUp( bool bPageUp )
{
- if( !aVerSBar->IsVisible() )
+ if( !m_aVerSBar->IsVisible() )
return;
long nDelta;
if( bPageUp )
- nDelta = aVerSBar->GetPageSize();
+ nDelta = m_aVerSBar->GetPageSize();
else
nDelta = 1;
- long nThumbPos = aVerSBar->GetThumbPos();
+ long nThumbPos = m_aVerSBar->GetThumbPos();
if( nThumbPos < nDelta )
nDelta = nThumbPos;
@@ -479,10 +479,10 @@ void SvImpLBox::KeyUp( bool bPageUp )
if( nDelta <= 0 )
return;
- nFlags &= ~LBoxFlags::Filling;
+ m_nFlags &= ~LBoxFlags::Filling;
BeginScroll();
- aVerSBar->SetThumbPos( nThumbPos - nDelta );
+ m_aVerSBar->SetThumbPos( nThumbPos - nDelta );
if( bPageUp )
PageUp( static_cast<short>(nDelta) );
else
@@ -494,18 +494,18 @@ void SvImpLBox::KeyUp( bool bPageUp )
void SvImpLBox::KeyDown( bool bPageDown )
{
- if( !aVerSBar->IsVisible() )
+ if( !m_aVerSBar->IsVisible() )
return;
long nDelta;
if( bPageDown )
- nDelta = aVerSBar->GetPageSize();
+ nDelta = m_aVerSBar->GetPageSize();
else
nDelta = 1;
- long nThumbPos = aVerSBar->GetThumbPos();
- long nVisibleSize = aVerSBar->GetVisibleSize();
- long nRange = aVerSBar->GetRange().Len();
+ long nThumbPos = m_aVerSBar->GetThumbPos();
+ long nVisibleSize = m_aVerSBar->GetVisibleSize();
+ long nRange = m_aVerSBar->GetRange().Len();
long nTmp = nThumbPos+nVisibleSize;
while( (nDelta > 0) && (nTmp+nDelta) >= nRange )
@@ -514,10 +514,10 @@ void SvImpLBox::KeyDown( bool bPageDown )
if( nDelta <= 0 )
return;
- nFlags &= ~LBoxFlags::Filling;
+ m_nFlags &= ~LBoxFlags::Filling;
BeginScroll();
- aVerSBar->SetThumbPos( nThumbPos+nDelta );
+ m_aVerSBar->SetThumbPos( nThumbPos+nDelta );
if( bPageDown )
PageDown( static_cast<short>(nDelta) );
else
@@ -529,27 +529,27 @@ void SvImpLBox::KeyDown( bool bPageDown )
void SvImpLBox::InvalidateEntriesFrom( long nY ) const
{
- if( !(nFlags & LBoxFlags::InPaint ))
+ if( !(m_nFlags & LBoxFlags::InPaint ))
{
tools::Rectangle aRect( GetVisibleArea() );
aRect.SetTop( nY );
- pView->Invalidate( aRect );
+ m_pView->Invalidate( aRect );
}
}
void SvImpLBox::InvalidateEntry( long nY ) const
{
- if( !(nFlags & LBoxFlags::InPaint ))
+ if( !(m_nFlags & LBoxFlags::InPaint ))
{
tools::Rectangle aRect( GetVisibleArea() );
long nMaxBottom = aRect.Bottom();
aRect.SetTop( nY );
- aRect.SetBottom( nY ); aRect.AdjustBottom(pView->GetEntryHeight() );
+ aRect.SetBottom( nY ); aRect.AdjustBottom(m_pView->GetEntryHeight() );
if( aRect.Top() > nMaxBottom )
return;
if( aRect.Bottom() > nMaxBottom )
aRect.SetBottom( nMaxBottom );
- pView->Invalidate( aRect );
+ m_pView->Invalidate( aRect );
}
}
@@ -557,15 +557,15 @@ void SvImpLBox::InvalidateEntry( SvTreeListEntry* pEntry )
{
if( GetUpdateMode() )
{
- long nPrev = nMostRight;
+ long nPrev = m_nMostRight;
SetMostRight( pEntry );
- if( nPrev < nMostRight )
+ if( nPrev < m_nMostRight )
ShowVerSBar();
}
- if( !(nFlags & LBoxFlags::InPaint ))
+ if( !(m_nFlags & LBoxFlags::InPaint ))
{
bool bHasFocusRect = false;
- if( pEntry==pCursor && pView->HasFocus() )
+ if( pEntry==m_pCursor && m_pView->HasFocus() )
{
bHasFocusRect = true;
ShowCursor( false );
@@ -579,17 +579,17 @@ void SvImpLBox::InvalidateEntry( SvTreeListEntry* pEntry )
void SvImpLBox::RecalcFocusRect()
{
- if( pView->HasFocus() && pCursor )
+ if( m_pView->HasFocus() && m_pCursor )
{
- pView->HideFocus();
- long nY = GetEntryLine( pCursor );
- tools::Rectangle aRect = pView->GetFocusRect( pCursor, nY );
- CalcCellFocusRect( pCursor, aRect );
- vcl::Region aOldClip( pView->GetClipRegion());
+ m_pView->HideFocus();
+ long nY = GetEntryLine( m_pCursor );
+ tools::Rectangle aRect = m_pView->GetFocusRect( m_pCursor, nY );
+ CalcCellFocusRect( m_pCursor, aRect );
+ vcl::Region aOldClip( m_pView->GetClipRegion());
vcl::Region aClipRegion( GetClipRegionRect() );
- pView->SetClipRegion( aClipRegion );
- pView->ShowFocus( aRect );
- pView->SetClipRegion( aOldClip );
+ m_pView->SetClipRegion( aClipRegion );
+ m_pView->ShowFocus( aRect );
+ m_pView->SetClipRegion( aOldClip );
}
}
@@ -601,9 +601,9 @@ void SvImpLBox::SetCursor( SvTreeListEntry* pEntry, bool bForceNoSelect )
{
SvViewDataEntry* pViewDataNewCur = nullptr;
if( pEntry )
- pViewDataNewCur= pView->GetViewDataEntry(pEntry);
+ pViewDataNewCur= m_pView->GetViewDataEntry(pEntry);
if( pEntry &&
- pEntry == pCursor &&
+ pEntry == m_pCursor &&
pViewDataNewCur &&
pViewDataNewCur->HasFocus() &&
pViewDataNewCur->IsSelected())
@@ -614,78 +614,78 @@ void SvImpLBox::SetCursor( SvTreeListEntry* pEntry, bool bForceNoSelect )
// if this cursor is not selectable, find first visible that is and use it
while( pEntry && pViewDataNewCur && !pViewDataNewCur->IsSelectable() )
{
- pEntry = pView->NextVisible(pEntry);
- pViewDataNewCur = pEntry ? pView->GetViewDataEntry(pEntry) : nullptr;
+ pEntry = m_pView->NextVisible(pEntry);
+ pViewDataNewCur = pEntry ? m_pView->GetViewDataEntry(pEntry) : nullptr;
}
- SvTreeListEntry* pOldCursor = pCursor;
- if( pCursor && pEntry != pCursor )
+ SvTreeListEntry* pOldCursor = m_pCursor;
+ if( m_pCursor && pEntry != m_pCursor )
{
- pView->SetEntryFocus( pCursor, false );
- if( bSimpleTravel )
- pView->Select( pCursor, false );
- pView->HideFocus();
+ m_pView->SetEntryFocus( m_pCursor, false );
+ if( m_bSimpleTravel )
+ m_pView->Select( m_pCursor, false );
+ m_pView->HideFocus();
}
- pCursor = pEntry;
- if( pCursor )
+ m_pCursor = pEntry;
+ if( m_pCursor )
{
if (pViewDataNewCur)
pViewDataNewCur->SetFocus( true );
- if(!bForceNoSelect && bSimpleTravel && !(nFlags & LBoxFlags::DeselectAll) && GetUpdateMode())
+ if(!bForceNoSelect && m_bSimpleTravel && !(m_nFlags & LBoxFlags::DeselectAll) && GetUpdateMode())
{
- pView->Select( pCursor );
- CallEventListeners( VclEventId::ListboxTreeFocus, pCursor );
+ m_pView->Select( m_pCursor );
+ CallEventListeners( VclEventId::ListboxTreeFocus, m_pCursor );
}
// multiple selection: select in cursor move if we're not in
// Add mode (Ctrl-F8)
else if( GetUpdateMode() &&
- pView->GetSelectionMode() == SelectionMode::Multiple &&
- !(nFlags & LBoxFlags::DeselectAll) && !aSelEng.IsAddMode() &&
+ m_pView->GetSelectionMode() == SelectionMode::Multiple &&
+ !(m_nFlags & LBoxFlags::DeselectAll) && !m_aSelEng.IsAddMode() &&
!bForceNoSelect )
{
- pView->Select( pCursor );
- CallEventListeners( VclEventId::ListboxTreeFocus, pCursor );
+ m_pView->Select( m_pCursor );
+ CallEventListeners( VclEventId::ListboxTreeFocus, m_pCursor );
}
else
{
ShowCursor( true );
if (bForceNoSelect && GetUpdateMode())
{
- CallEventListeners( VclEventId::ListboxTreeFocus, pCursor);
+ CallEventListeners( VclEventId::ListboxTreeFocus, m_pCursor);
}
}
- if( pAnchor )
+ if( m_pAnchor )
{
- DBG_ASSERT(aSelEng.GetSelectionMode() != SelectionMode::Single,"Mode?");
- SetAnchorSelection( pOldCursor, pCursor );
+ DBG_ASSERT(m_aSelEng.GetSelectionMode() != SelectionMode::Single,"Mode?");
+ SetAnchorSelection( pOldCursor, m_pCursor );
}
}
- nFlags &= ~LBoxFlags::DeselectAll;
+ m_nFlags &= ~LBoxFlags::DeselectAll;
- pView->OnCurrentEntryChanged();
+ m_pView->OnCurrentEntryChanged();
}
void SvImpLBox::ShowCursor( bool bShow )
{
- if( !bShow || !pCursor || !pView->HasFocus() )
+ if( !bShow || !m_pCursor || !m_pView->HasFocus() )
{
- vcl::Region aOldClip( pView->GetClipRegion());
+ vcl::Region aOldClip( m_pView->GetClipRegion());
vcl::Region aClipRegion( GetClipRegionRect() );
- pView->SetClipRegion( aClipRegion );
- pView->HideFocus();
- pView->SetClipRegion( aOldClip );
+ m_pView->SetClipRegion( aClipRegion );
+ m_pView->HideFocus();
+ m_pView->SetClipRegion( aOldClip );
}
else
{
- long nY = GetEntryLine( pCursor );
- tools::Rectangle aRect = pView->GetFocusRect( pCursor, nY );
- CalcCellFocusRect( pCursor, aRect );
- vcl::Region aOldClip( pView->GetClipRegion());
+ long nY = GetEntryLine( m_pCursor );
+ tools::Rectangle aRect = m_pView->GetFocusRect( m_pCursor, nY );
+ CalcCellFocusRect( m_pCursor, aRect );
+ vcl::Region aOldClip( m_pView->GetClipRegion());
vcl::Region aClipRegion( GetClipRegionRect() );
- pView->SetClipRegion( aClipRegion );
- pView->ShowFocus( aRect );
- pView->SetClipRegion( aOldClip );
+ m_pView->SetClipRegion( aClipRegion );
+ m_pView->ShowFocus( aRect );
+ m_pView->SetClipRegion( aOldClip );
}
}
@@ -693,17 +693,17 @@ void SvImpLBox::ShowCursor( bool bShow )
void SvImpLBox::UpdateAll( bool bInvalidateCompleteView )
{
FindMostRight(nullptr);
- aVerSBar->SetRange( Range(0, pView->GetVisibleCount()-1 ) );
+ m_aVerSBar->SetRange( Range(0, m_pView->GetVisibleCount()-1 ) );
SyncVerThumb();
FillView();
ShowVerSBar();
- if( bSimpleTravel && pCursor && pView->HasFocus() )
- pView->Select( pCursor );
+ if( m_bSimpleTravel && m_pCursor && m_pView->HasFocus() )
+ m_pView->Select( m_pCursor );
ShowCursor( true );
if( bInvalidateCompleteView )
- pView->Invalidate();
+ m_pView->Invalidate();
else
- pView->Invalidate( GetVisibleArea() );
+ m_pView->Invalidate( GetVisibleArea() );
}
IMPL_LINK( SvImpLBox, ScrollLeftRightHdl, ScrollBar *, pScrollBar, void )
@@ -711,61 +711,61 @@ IMPL_LINK( SvImpLBox, ScrollLeftRightHdl, ScrollBar *, pScrollBar, void )
long nDelta = pScrollBar->GetDelta();
if( nDelta )
{
- if( pView->IsEditingActive() )
+ if( m_pView->IsEditingActive() )
{
- pView->EndEditing( true ); // Cancel
- pView->Update();
+ m_pView->EndEditing( true ); // Cancel
+ m_pView->Update();
}
- pView->nFocusWidth = -1;
+ m_pView->nFocusWidth = -1;
KeyLeftRight( nDelta );
}
}
void SvImpLBox::KeyLeftRight( long nDelta )
{
- if( !(nFlags & LBoxFlags::InResize) )
- pView->Update();
+ if( !(m_nFlags & LBoxFlags::InResize) )
+ m_pView->Update();
BeginScroll();
- nFlags &= ~LBoxFlags::Filling;
+ m_nFlags &= ~LBoxFlags::Filling;
ShowCursor( false );
// calculate new origin
- long nPos = aHorSBar->GetThumbPos();
+ long nPos = m_aHorSBar->GetThumbPos();
Point aOrigin( -nPos, 0 );
- MapMode aMapMode( pView->GetMapMode() );
+ MapMode aMapMode( m_pView->GetMapMode() );
aMapMode.SetOrigin( aOrigin );
- pView->SetMapMode( aMapMode );
+ m_pView->SetMapMode( aMapMode );
- if( !(nFlags & LBoxFlags::InResize) )
+ if( !(m_nFlags & LBoxFlags::InResize) )
{
tools::Rectangle aRect( GetVisibleArea() );
- pView->Scroll( -nDelta, 0, aRect, ScrollFlags::NoChildren );
+ m_pView->Scroll( -nDelta, 0, aRect, ScrollFlags::NoChildren );
}
else
- pView->Invalidate();
+ m_pView->Invalidate();
RecalcFocusRect();
ShowCursor( true );
- pView->NotifyScrolled();
+ m_pView->NotifyScrolled();
}
// returns the last entry if position is just past the last entry
SvTreeListEntry* SvImpLBox::GetClickedEntry( const Point& rPoint ) const
{
- DBG_ASSERT( pView->GetModel(), "SvImpLBox::GetClickedEntry: how can this ever happen? Please tell me (frank.schoenheit at sun.com) how to reproduce!" );
- if ( !pView->GetModel() )
+ DBG_ASSERT( m_pView->GetModel(), "SvImpLBox::GetClickedEntry: how can this ever happen? Please tell me (frank.schoenheit at sun.com) how to reproduce!" );
+ if ( !m_pView->GetModel() )
// this is quite impossible. Nevertheless, stack traces from the crash reporter
// suggest it isn't. Okay, make it safe, and wait for somebody to reproduce it
// reliably :-\ ....
// #122359# / 2005-05-23 / frank.schoenheit at sun.com
return nullptr;
- if( pView->GetEntryCount() == 0 || !pStartEntry || !pView->GetEntryHeight())
+ if( m_pView->GetEntryCount() == 0 || !m_pStartEntry || !m_pView->GetEntryHeight())
return nullptr;
- sal_uInt16 nClickedEntry = static_cast<sal_uInt16>(rPoint.Y() / pView->GetEntryHeight() );
+ sal_uInt16 nClickedEntry = static_cast<sal_uInt16>(rPoint.Y() / m_pView->GetEntryHeight() );
sal_uInt16 nTemp = nClickedEntry;
- SvTreeListEntry* pEntry = pView->NextVisible(pStartEntry, nTemp);
+ SvTreeListEntry* pEntry = m_pView->NextVisible(m_pStartEntry, nTemp);
return pEntry;
}
@@ -781,15 +781,15 @@ bool SvImpLBox::EntryReallyHit(SvTreeListEntry* pEntry, const Point& rPosPixel,
if( pEntry->ItemCount() >= 3 )
return true;
- tools::Rectangle aRect( pView->GetFocusRect( pEntry, nLine ));
- aRect.SetRight( GetOutputSize().Width() - pView->GetMapMode().GetOrigin().X() );
+ tools::Rectangle aRect( m_pView->GetFocusRect( pEntry, nLine ));
+ aRect.SetRight( GetOutputSize().Width() - m_pView->GetMapMode().GetOrigin().X() );
SvLBoxContextBmp* pBmp = static_cast<SvLBoxContextBmp*>(pEntry->GetFirstItem(SvLBoxItemType::ContextBmp));
- aRect.AdjustLeft( -pBmp->GetWidth(pView,pEntry) );
+ aRect.AdjustLeft( -pBmp->GetWidth(m_pView,pEntry) );
aRect.AdjustLeft( -4 ); // a little tolerance
Point aPos( rPosPixel );
- aPos -= pView->GetMapMode().GetOrigin();
+ aPos -= m_pView->GetMapMode().GetOrigin();
bRet = aRect.IsInside( aPos );
return bRet;
}
@@ -798,14 +798,14 @@ bool SvImpLBox::EntryReallyHit(SvTreeListEntry* pEntry, const Point& rPosPixel,
// returns 0 if position is just past the last entry
SvTreeListEntry* SvImpLBox::GetEntry( const Point& rPoint ) const
{
- if( (pView->GetEntryCount() == 0) || !pStartEntry ||
- (rPoint.Y() > aOutputSize.Height())
- || !pView->GetEntryHeight())
+ if( (m_pView->GetEntryCount() == 0) || !m_pStartEntry ||
+ (rPoint.Y() > m_aOutputSize.Height())
+ || !m_pView->GetEntryHeight())
return nullptr;
- sal_uInt16 nClickedEntry = static_cast<sal_uInt16>(rPoint.Y() / pView->GetEntryHeight() );
+ sal_uInt16 nClickedEntry = static_cast<sal_uInt16>(rPoint.Y() / m_pView->GetEntryHeight() );
sal_uInt16 nTemp = nClickedEntry;
- SvTreeListEntry* pEntry = pView->NextVisible(pStartEntry, nTemp);
+ SvTreeListEntry* pEntry = m_pView->NextVisible(m_pStartEntry, nTemp);
if( nTemp != nClickedEntry )
pEntry = nullptr;
return pEntry;
@@ -814,20 +814,20 @@ SvTreeListEntry* SvImpLBox::GetEntry( const Point& rPoint ) const
SvTreeListEntry* SvImpLBox::MakePointVisible(const Point& rPoint)
{
- if( !pCursor )
+ if( !m_pCursor )
return nullptr;
long nY = rPoint.Y();
SvTreeListEntry* pEntry = nullptr;
- long nMax = aOutputSize.Height();
+ long nMax = m_aOutputSize.Height();
if( nY < 0 || nY >= nMax ) // aOutputSize.Height() )
{
if( nY < 0 )
- pEntry = pView->PrevVisible(pCursor);
+ pEntry = m_pView->PrevVisible(m_pCursor);
else
- pEntry = pView->NextVisible(pCursor);
+ pEntry = m_pView->NextVisible(m_pCursor);
- if( pEntry && pEntry != pCursor )
- pView->SetEntryFocus( pCursor, false );
+ if( pEntry && pEntry != m_pCursor )
+ m_pView->SetEntryFocus( m_pCursor, false );
if( nY < 0 )
KeyUp( false );
@@ -841,14 +841,14 @@ SvTreeListEntry* SvImpLBox::MakePointVisible(const Point& rPoint)
{
sal_uInt16 nSteps = 0xFFFF;
// TODO: LastVisible is not yet implemented!
- pEntry = pView->NextVisible(pStartEntry, nSteps);
+ pEntry = m_pView->NextVisible(m_pStartEntry, nSteps);
}
if( pEntry )
{
- if( pEntry != pCursor &&
- aSelEng.GetSelectionMode() == SelectionMode::Single
+ if( pEntry != m_pCursor &&
+ m_aSelEng.GetSelectionMode() == SelectionMode::Single
)
- pView->Select( pCursor, false );
+ m_pView->Select( m_pCursor, false );
}
}
return pEntry;
@@ -856,9 +856,9 @@ SvTreeListEntry* SvImpLBox::MakePointVisible(const Point& rPoint)
tools::Rectangle SvImpLBox::GetClipRegionRect() const
{
- Point aOrigin( pView->GetMapMode().GetOrigin() );
+ Point aOrigin( m_pView->GetMapMode().GetOrigin() );
aOrigin.setX( aOrigin.X() * -1 ); // conversion document coordinates
- tools::Rectangle aClipRect( aOrigin, aOutputSize );
+ tools::Rectangle aClipRect( aOrigin, m_aOutputSize );
aClipRect.AdjustBottom( 1 );
return aClipRect;
}
@@ -866,37 +866,37 @@ tools::Rectangle SvImpLBox::GetClipRegionRect() const
void SvImpLBox::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
- if (!pView->GetVisibleCount())
+ if (!m_pView->GetVisibleCount())
return;
- nFlags |= LBoxFlags::InPaint;
+ m_nFlags |= LBoxFlags::InPaint;
- if (nFlags & LBoxFlags::Filling)
+ if (m_nFlags & LBoxFlags::Filling)
{
- SvTreeListEntry* pFirst = pView->First();
- if (pFirst != pStartEntry)
+ SvTreeListEntry* pFirst = m_pView->First();
+ if (pFirst != m_pStartEntry)
{
ShowCursor(false);
- pStartEntry = pView->First();
- aVerSBar->SetThumbPos( 0 );
+ m_pStartEntry = m_pView->First();
+ m_aVerSBar->SetThumbPos( 0 );
StopUserEvent();
ShowCursor(true);
- nCurUserEvent = Application::PostUserEvent(LINK(this, SvImpLBox, MyUserEvent),
+ m_nCurUserEvent = Application::PostUserEvent(LINK(this, SvImpLBox, MyUserEvent),
reinterpret_cast<void*>(1));
return;
}
}
- if (!pStartEntry)
+ if (!m_pStartEntry)
{
- pStartEntry = pView->First();
+ m_pStartEntry = m_pView->First();
}
- if (nNodeBmpTabDistance == NODE_BMP_TABDIST_NOTVALID)
+ if (m_nNodeBmpTabDistance == NODE_BMP_TABDIST_NOTVALID)
SetNodeBmpTabDistance();
long nRectHeight = rRect.GetHeight();
- long nEntryHeight = pView->GetEntryHeight();
+ long nEntryHeight = m_pView->GetEntryHeight();
// calculate area for the entries we want to draw
sal_uInt16 nStartLine = static_cast<sal_uInt16>(rRect.Top() / nEntryHeight);
@@ -904,10 +904,10 @@ void SvImpLBox::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle
nCount += 2; // don't miss a row
long nY = nStartLine * nEntryHeight;
- SvTreeListEntry* pEntry = pStartEntry;
+ SvTreeListEntry* pEntry = m_pStartEntry;
while (nStartLine && pEntry)
{
- pEntry = pView->NextVisible(pEntry);
+ pEntry = m_pView->NextVisible(pEntry);
nStartLine--;
}
@@ -920,24 +920,24 @@ void SvImpLBox::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle
rRenderContext.SetClipRegion(aClipRegion);
- if (!pCursor && !mbNoAutoCurEntry)
+ if (!m_pCursor && !mbNoAutoCurEntry)
{
// do not select if multiselection or explicit set
- bool bNotSelect = (aSelEng.GetSelectionMode() == SelectionMode::Multiple ) || ((m_nStyle & WB_NOINITIALSELECTION) == WB_NOINITIALSELECTION);
- SetCursor(pStartEntry, bNotSelect);
+ bool bNotSelect = (m_aSelEng.GetSelectionMode() == SelectionMode::Multiple ) || ((m_nStyle & WB_NOINITIALSELECTION) == WB_NOINITIALSELECTION);
+ SetCursor(m_pStartEntry, bNotSelect);
}
for(sal_uInt16 n=0; n< nCount && pEntry; n++)
{
/*long nMaxRight=*/
- pView->PaintEntry1(*pEntry, nY, rRenderContext );
+ m_pView->PaintEntry1(*pEntry, nY, rRenderContext );
nY += nEntryHeight;
- pEntry = pView->NextVisible(pEntry);
+ pEntry = m_pView->NextVisible(pEntry);
}
- nFlags &= ~LBoxFlags::DeselectAll;
+ m_nFlags &= ~LBoxFlags::DeselectAll;
rRenderContext.SetClipRegion();
- nFlags &= ~LBoxFlags::InPaint;
+ m_nFlags &= ~LBoxFlags::InPaint;
}
void SvImpLBox::MakeVisible( SvTreeListEntry* pEntry, bool bMoveToTop )
@@ -947,24 +947,24 @@ void SvImpLBox::MakeVisible( SvTreeListEntry* pEntry, bool bMoveToTop )
bool bInView = IsEntryInView( pEntry );
- if( bInView && (!bMoveToTop || pStartEntry == pEntry) )
+ if( bInView && (!bMoveToTop || m_pStartEntry == pEntry) )
return; // is already visible
- if( pStartEntry || mbForceMakeVisible )
- nFlags &= ~LBoxFlags::Filling;
+ if( m_pStartEntry || mbForceMakeVisible )
+ m_nFlags &= ~LBoxFlags::Filling;
if( !bInView )
{
- if( !pView->IsEntryVisible(pEntry) ) // Parent(s) collapsed?
+ if( !m_pView->IsEntryVisible(pEntry) ) // Parent(s) collapsed?
{
- SvTreeListEntry* pParent = pView->GetParent( pEntry );
+ SvTreeListEntry* pParent = m_pView->GetParent( pEntry );
while( pParent )
{
- if( !pView->IsExpanded( pParent ) )
+ if( !m_pView->IsExpanded( pParent ) )
{
- bool bRet = pView->Expand( pParent );
+ bool bRet = m_pView->Expand( pParent );
DBG_ASSERT(bRet,"Not expanded!");
}
- pParent = pView->GetParent( pParent );
+ pParent = m_pView->GetParent( pParent );
}
// do the parent's children fit into the view or do we have to scroll?
if( IsEntryInView( pEntry ) && !bMoveToTop )
@@ -972,47 +972,47 @@ void SvImpLBox::MakeVisible( SvTreeListEntry* pEntry, bool bMoveToTop )
}
}
- pStartEntry = pEntry;
+ m_pStartEntry = pEntry;
ShowCursor( false );
FillView();
- aVerSBar->SetThumbPos( static_cast<long>(pView->GetVisiblePos( pStartEntry )) );
+ m_aVerSBar->SetThumbPos( static_cast<long>(m_pView->GetVisiblePos( m_pStartEntry )) );
ShowCursor( true );
- pView->Invalidate();
+ m_pView->Invalidate();
}
void SvImpLBox::ScrollToAbsPos( long nPos )
{
- if( pView->GetVisibleCount() == 0 )
+ if( m_pView->GetVisibleCount() == 0 )
return;
- long nLastEntryPos = pView->GetAbsPos( pView->Last() );
+ long nLastEntryPos = m_pView->GetAbsPos( m_pView->Last() );
if( nPos < 0 )
nPos = 0;
else if( nPos > nLastEntryPos )
nPos = nLastEntryPos;
- SvTreeListEntry* pEntry = pView->GetEntryAtAbsPos( nPos );
- if( !pEntry || pEntry == pStartEntry )
+ SvTreeListEntry* pEntry = m_pView->GetEntryAtAbsPos( nPos );
+ if( !pEntry || pEntry == m_pStartEntry )
return;
- if( pStartEntry || mbForceMakeVisible )
- nFlags &= ~LBoxFlags::Filling;
+ if( m_pStartEntry || mbForceMakeVisible )
+ m_nFlags &= ~LBoxFlags::Filling;
- if( pView->IsEntryVisible(pEntry) )
+ if( m_pView->IsEntryVisible(pEntry) )
{
- pStartEntry = pEntry;
+ m_pStartEntry = pEntry;
ShowCursor( false );
- aVerSBar->SetThumbPos( nPos );
+ m_aVerSBar->SetThumbPos( nPos );
ShowCursor( true );
if (GetUpdateMode())
- pView->Invalidate();
+ m_pView->Invalidate();
}
}
void SvImpLBox::DrawNet(vcl::RenderContext& rRenderContext)
{
- if (pView->GetVisibleCount() < 2 && !pStartEntry->HasChildrenOnDemand() &&
- !pStartEntry->HasChildren())
+ if (m_pView->GetVisibleCount() < 2 && !m_pStartEntry->HasChildrenOnDemand() &&
+ !m_pStartEntry->HasChildren())
{
return;
}
@@ -1029,20 +1029,20 @@ void SvImpLBox::DrawNet(vcl::RenderContext& rRenderContext)
}
}
- long nEntryHeight = pView->GetEntryHeight();
+ long nEntryHeight = m_pView->GetEntryHeight();
long nEntryHeightDIV2 = nEntryHeight / 2;
if( nEntryHeightDIV2 && !(nEntryHeight & 0x0001))
nEntryHeightDIV2--;
SvTreeListEntry* pChild;
- SvTreeListEntry* pEntry = pStartEntry;
+ SvTreeListEntry* pEntry = m_pStartEntry;
- SvLBoxTab* pFirstDynamicTab = pView->GetFirstDynamicTab();
- while (pTree->GetDepth( pEntry ) > 0)
+ SvLBoxTab* pFirstDynamicTab = m_pView->GetFirstDynamicTab();
+ while (m_pTree->GetDepth( pEntry ) > 0)
{
- pEntry = pView->GetParent(pEntry);
+ pEntry = m_pView->GetParent(pEntry);
}
- sal_uInt16 nOffs = static_cast<sal_uInt16>(pView->GetVisiblePos(pStartEntry) - pView->GetVisiblePos(pEntry));
+ sal_uInt16 nOffs = static_cast<sal_uInt16>(m_pView->GetVisiblePos(m_pStartEntry) - m_pView->GetVisiblePos(pEntry));
long nY = 0;
nY -= (nOffs * nEntryHeight);
@@ -1058,63 +1058,63 @@ void SvImpLBox::DrawNet(vcl::RenderContext& rRenderContext)
rRenderContext.SetLineColor(aCol);
Point aPos1, aPos2;
sal_uInt16 nDistance;
- sal_uLong nMax = nVisibleCount + nOffs + 1;
+ sal_uLong nMax = m_nVisibleCount + nOffs + 1;
const Image& rExpandedNodeBitmap = GetExpandedNodeBmp();
for (sal_uLong n=0; n< nMax && pEntry; n++)
{
- if (pView->IsExpanded(pEntry))
+ if (m_pView->IsExpanded(pEntry))
{
- aPos1.setX( pView->GetTabPos(pEntry, pFirstDynamicTab) );
+ aPos1.setX( m_pView->GetTabPos(pEntry, pFirstDynamicTab) );
// if it is not a context bitmap, go a little to the right below the
// first text (node bitmap, too)
- if (!pView->nContextBmpWidthMax)
+ if (!m_pView->nContextBmpWidthMax)
aPos1.AdjustX(rExpandedNodeBitmap.GetSizePixel().Width() / 2 );
aPos1.setY( nY );
aPos1.AdjustY(nEntryHeightDIV2 );
- pChild = pView->FirstChild( pEntry );
+ pChild = m_pView->FirstChild( pEntry );
assert(pChild && "Child?");
pChild = pChild->LastSibling();
- nDistance = static_cast<sal_uInt16>(pView->GetVisiblePos(pChild) - pView->GetVisiblePos(pEntry));
+ nDistance = static_cast<sal_uInt16>(m_pView->GetVisiblePos(pChild) - m_pView->GetVisiblePos(pEntry));
aPos2 = aPos1;
aPos2.AdjustY(nDistance * nEntryHeight );
rRenderContext.DrawLine(aPos1, aPos2);
}
// visible in control?
- if (n >= nOffs && ((m_nStyle & WB_HASLINESATROOT) || !pTree->IsAtRootDepth(pEntry)))
+ if (n >= nOffs && ((m_nStyle & WB_HASLINESATROOT) || !m_pTree->IsAtRootDepth(pEntry)))
{
// can we recycle aPos1?
- if (!pView->IsExpanded(pEntry))
+ if (!m_pView->IsExpanded(pEntry))
{
// nope
- aPos1.setX( pView->GetTabPos(pEntry, pFirstDynamicTab) );
+ aPos1.setX( m_pView->GetTabPos(pEntry, pFirstDynamicTab) );
// if it is not a context bitmap, go a little to the right below
// the first text (node bitmap, too)
- if (!pView->nContextBmpWidthMax)
+ if (!m_pView->nContextBmpWidthMax)
aPos1.AdjustX(rExpandedNodeBitmap.GetSizePixel().Width() / 2 );
aPos1.setY( nY );
aPos1.AdjustY(nEntryHeightDIV2 );
aPos2.setX( aPos1.X() );
}
aPos2.setY( aPos1.Y() );
- aPos2.AdjustX( -(pView->GetIndent()) );
+ aPos2.AdjustX( -(m_pView->GetIndent()) );
rRenderContext.DrawLine(aPos1, aPos2);
}
nY += nEntryHeight;
- pEntry = pView->NextVisible(pEntry);
+ pEntry = m_pView->NextVisible(pEntry);
}
if (m_nStyle & WB_HASLINESATROOT)
{
- pEntry = pView->First();
- aPos1.setX( pView->GetTabPos(pEntry, pFirstDynamicTab) );
+ pEntry = m_pView->First();
+ aPos1.setX( m_pView->GetTabPos(pEntry, pFirstDynamicTab) );
// if it is not a context bitmap, go a little to the right below the
// first text (node bitmap, too)
- if (!pView->nContextBmpWidthMax)
+ if (!m_pView->nContextBmpWidthMax)
aPos1.AdjustX(rExpandedNodeBitmap.GetSizePixel().Width() / 2 );
- aPos1.AdjustX( -(pView->GetIndent()) );
+ aPos1.AdjustX( -(m_pView->GetIndent()) );
aPos1.setY( GetEntryLine( pEntry ) );
aPos1.AdjustY(nEntryHeightDIV2 );
pChild = pEntry->LastSibling();
@@ -1130,22 +1130,22 @@ void SvImpLBox::PositionScrollBars( Size& rSize, sal_uInt16 nMask )
{
long nOverlap = 0;
- Size aVerSize( nVerSBarWidth, rSize.Height() );
- Size aHorSize( rSize.Width(), nHorSBarHeight );
+ Size aVerSize( m_nVerSBarWidth, rSize.Height() );
+ Size aHorSize( rSize.Width(), m_nHorSBarHeight );
if( nMask & 0x0001 )
- aHorSize.AdjustWidth( -nVerSBarWidth );
+ aHorSize.AdjustWidth( -m_nVerSBarWidth );
if( nMask & 0x0002 )
- aVerSize.AdjustHeight( -nHorSBarHeight );
+ aVerSize.AdjustHeight( -m_nHorSBarHeight );
aVerSize.AdjustHeight(2 * nOverlap );
Point aVerPos( rSize.Width() - aVerSize.Width() + nOverlap, -nOverlap );
- aVerSBar->SetPosSizePixel( aVerPos, aVerSize );
+ m_aVerSBar->SetPosSizePixel( aVerPos, aVerSize );
aHorSize.AdjustWidth(2 * nOverlap );
Point aHorPos( -nOverlap, rSize.Height() - aHorSize.Height() + nOverlap );
- aHorSBar->SetPosSizePixel( aHorPos, aHorSize );
+ m_aHorSBar->SetPosSizePixel( aHorPos, aHorSize );
if( nMask & 0x0001 )
rSize.setWidth( aVerPos.X() );
@@ -1153,50 +1153,50 @@ void SvImpLBox::PositionScrollBars( Size& rSize, sal_uInt16 nMask )
rSize.setHeight( aHorPos.Y() );
if( (nMask & (0x0001|0x0002)) == (0x0001|0x0002) )
- aScrBarBox->Show();
+ m_aScrBarBox->Show();
else
- aScrBarBox->Hide();
+ m_aScrBarBox->Hide();
}
void SvImpLBox::AdjustScrollBars( Size& rSize )
{
- long nEntryHeight = pView->GetEntryHeight();
+ long nEntryHeight = m_pView->GetEntryHeight();
if( !nEntryHeight )
return;
sal_uInt16 nResult = 0;
- Size aOSize( pView->Control::GetOutputSizePixel() );
+ Size aOSize( m_pView->Control::GetOutputSizePixel() );
- const WinBits nWindowStyle = pView->GetStyle();
+ const WinBits nWindowStyle = m_pView->GetStyle();
bool bVerSBar = ( nWindowStyle & WB_VSCROLL ) != 0;
bool bHorBar = false;
long nMaxRight = aOSize.Width(); //GetOutputSize().Width();
- Point aOrigin( pView->GetMapMode().GetOrigin() );
+ Point aOrigin( m_pView->GetMapMode().GetOrigin() );
aOrigin.setX( aOrigin.X() * -1 );
nMaxRight += aOrigin.X() - 1;
- long nVis = nMostRight - aOrigin.X();
+ long nVis = m_nMostRight - aOrigin.X();
if( (nWindowStyle & (WB_AUTOHSCROLL|WB_HSCROLL)) &&
- (nVis < nMostRight || nMaxRight < nMostRight) )
+ (nVis < m_nMostRight || nMaxRight < m_nMostRight) )
{
bHorBar = true;
}
// number of entries that are not collapsed
- sal_uLong nTotalCount = pView->GetVisibleCount();
+ sal_uLong nTotalCount = m_pView->GetVisibleCount();
// number of entries visible within the view
- nVisibleCount = aOSize.Height() / nEntryHeight;
+ m_nVisibleCount = aOSize.Height() / nEntryHeight;
// do we need a vertical scrollbar?
- if( bVerSBar || nTotalCount > nVisibleCount )
+ if( bVerSBar || nTotalCount > m_nVisibleCount )
{
nResult = 1;
- nMaxRight -= nVerSBarWidth;
+ nMaxRight -= m_nVerSBarWidth;
if( !bHorBar )
{
if( (nWindowStyle & (WB_AUTOHSCROLL|WB_HSCROLL)) &&
- (nVis < nMostRight || nMaxRight < nMostRight) )
+ (nVis < m_nMostRight || nMaxRight < m_nMostRight) )
bHorBar = true;
}
}
@@ -1207,10 +1207,10 @@ void SvImpLBox::AdjustScrollBars( Size& rSize )
nResult |= 0x0002;
// the number of entries visible within the view has to be recalculated
// because the horizontal scrollbar is now visible.
- nVisibleCount = (aOSize.Height() - nHorSBarHeight) / nEntryHeight;
+ m_nVisibleCount = (aOSize.Height() - m_nHorSBarHeight) / nEntryHeight;
// we might actually need a vertical scrollbar now
if( !(nResult & 0x0001) &&
- ((nTotalCount > nVisibleCount) || bVerSBar) )
+ ((nTotalCount > m_nVisibleCount) || bVerSBar) )
{
nResult = 3;
}
@@ -1223,195 +1223,195 @@ void SvImpLBox::AdjustScrollBars( Size& rSize )
// refresh output size, in case we have to scroll
tools::Rectangle aRect;
aRect.SetSize( aOSize );
- aSelEng.SetVisibleArea( aRect );
+ m_aSelEng.SetVisibleArea( aRect );
// vertical scrollbar
- long nTemp = static_cast<long>(nVisibleCount);
+ long nTemp = static_cast<long>(m_nVisibleCount);
nTemp--;
- if( nTemp != aVerSBar->GetVisibleSize() )
+ if( nTemp != m_aVerSBar->GetVisibleSize() )
{
- if( !bInVScrollHdl )
+ if( !m_bInVScrollHdl )
{
- aVerSBar->SetPageSize( nTemp - 1 );
- aVerSBar->SetVisibleSize( nTemp );
+ m_aVerSBar->SetPageSize( nTemp - 1 );
+ m_aVerSBar->SetVisibleSize( nTemp );
}
else
{
- nFlags |= LBoxFlags::EndScrollSetVisSize;
- nNextVerVisSize = nTemp;
+ m_nFlags |= LBoxFlags::EndScrollSetVisSize;
+ m_nNextVerVisSize = nTemp;
}
}
// horizontal scrollbar
- nTemp = aHorSBar->GetThumbPos();
- aHorSBar->SetVisibleSize( aOSize.Width() );
- long nNewThumbPos = aHorSBar->GetThumbPos();
- Range aRange( aHorSBar->GetRange() );
- if( aRange.Max() < nMostRight+25 )
+ nTemp = m_aHorSBar->GetThumbPos();
+ m_aHorSBar->SetVisibleSize( aOSize.Width() );
+ long nNewThumbPos = m_aHorSBar->GetThumbPos();
+ Range aRange( m_aHorSBar->GetRange() );
+ if( aRange.Max() < m_nMostRight+25 )
{
- aRange.Max() = nMostRight+25;
- aHorSBar->SetRange( aRange );
+ aRange.Max() = m_nMostRight+25;
+ m_aHorSBar->SetRange( aRange );
}
if( nTemp != nNewThumbPos )
{
nTemp = nNewThumbPos - nTemp;
- if( pView->IsEditingActive() )
+ if( m_pView->IsEditingActive() )
{
- pView->EndEditing( true ); // Cancel
- pView->Update();
+ m_pView->EndEditing( true ); // Cancel
+ m_pView->Update();
}
- pView->nFocusWidth = -1;
+ m_pView->nFocusWidth = -1;
KeyLeftRight( nTemp );
}
if( nResult & 0x0001 )
- aVerSBar->Show();
+ m_aVerSBar->Show();
else
- aVerSBar->Hide();
+ m_aVerSBar->Hide();
if( nResult & 0x0002 )
- aHorSBar->Show();
+ m_aHorSBar->Show();
else
{
- aHorSBar->Hide();
+ m_aHorSBar->Hide();
}
rSize = aOSize;
}
void SvImpLBox::InitScrollBarBox()
{
- aScrBarBox->SetSizePixel( Size(nVerSBarWidth, nHorSBarHeight) );
- Size aSize( pView->Control::GetOutputSizePixel() );
- aScrBarBox->SetPosPixel( Point(aSize.Width()-nVerSBarWidth, aSize.Height()-nHorSBarHeight));
+ m_aScrBarBox->SetSizePixel( Size(m_nVerSBarWidth, m_nHorSBarHeight) );
+ Size aSize( m_pView->Control::GetOutputSizePixel() );
+ m_aScrBarBox->SetPosPixel( Point(aSize.Width()-m_nVerSBarWidth, aSize.Height()-m_nHorSBarHeight));
}
void SvImpLBox::Resize()
{
- aOutputSize = pView->Control::GetOutputSizePixel();
- if( aOutputSize.Width() <= 0 || aOutputSize.Height() <= 0 )
+ m_aOutputSize = m_pView->Control::GetOutputSizePixel();
+ if( m_aOutputSize.Width() <= 0 || m_aOutputSize.Height() <= 0 )
return;
- nFlags |= LBoxFlags::InResize;
+ m_nFlags |= LBoxFlags::InResize;
InitScrollBarBox();
- if( pView->GetEntryHeight())
+ if( m_pView->GetEntryHeight())
{
- AdjustScrollBars( aOutputSize );
+ AdjustScrollBars( m_aOutputSize );
UpdateAll(false);
}
// HACK, as in floating and docked windows the scrollbars might not be drawn
// correctly/not be drawn at all after resizing!
- if( aHorSBar->IsVisible())
- aHorSBar->Invalidate();
- if( aVerSBar->IsVisible())
- aVerSBar->Invalidate();
- nFlags &= ~LBoxFlags::InResize;
+ if( m_aHorSBar->IsVisible())
+ m_aHorSBar->Invalidate();
+ if( m_aVerSBar->IsVisible())
+ m_aVerSBar->Invalidate();
+ m_nFlags &= ~LBoxFlags::InResize;
}
void SvImpLBox::FillView()
{
- if( !pStartEntry )
+ if( !m_pStartEntry )
{
- sal_uLong nVisibleViewCount = pView->GetVisibleCount();
- long nTempThumb = aVerSBar->GetThumbPos();
+ sal_uLong nVisibleViewCount = m_pView->GetVisibleCount();
+ long nTempThumb = m_aVerSBar->GetThumbPos();
if( nTempThumb < 0 )
nTempThumb = 0;
else if( static_cast<unsigned long>(nTempThumb) >= nVisibleViewCount )
nTempThumb = nVisibleViewCount == 0 ? 0 : nVisibleViewCount - 1;
- pStartEntry = pView->GetEntryAtVisPos(nTempThumb);
+ m_pStartEntry = m_pView->GetEntryAtVisPos(nTempThumb);
}
- if( !pStartEntry )
+ if( !m_pStartEntry )
return;
- sal_uInt16 nLast = static_cast<sal_uInt16>(pView->GetVisiblePos(pView->LastVisible()));
- sal_uInt16 nThumb = static_cast<sal_uInt16>(pView->GetVisiblePos( pStartEntry ));
+ sal_uInt16 nLast = static_cast<sal_uInt16>(m_pView->GetVisiblePos(m_pView->LastVisible()));
+ sal_uInt16 nThumb = static_cast<sal_uInt16>(m_pView->GetVisiblePos( m_pStartEntry ));
sal_uLong nCurDispEntries = nLast-nThumb+1;
- if( nCurDispEntries >= nVisibleCount )
+ if( nCurDispEntries >= m_nVisibleCount )
return;
ShowCursor( false );
// fill window by moving the thumb up incrementally
bool bFound = false;
- SvTreeListEntry* pTemp = pStartEntry;
- while( nCurDispEntries < nVisibleCount && pTemp )
+ SvTreeListEntry* pTemp = m_pStartEntry;
+ while( nCurDispEntries < m_nVisibleCount && pTemp )
{
- pTemp = pView->PrevVisible(pStartEntry);
+ pTemp = m_pView->PrevVisible(m_pStartEntry);
if( pTemp )
{
nThumb--;
- pStartEntry = pTemp;
+ m_pStartEntry = pTemp;
nCurDispEntries++;
bFound = true;
}
}
if( bFound )
{
- aVerSBar->SetThumbPos( nThumb );
+ m_aVerSBar->SetThumbPos( nThumb );
ShowCursor( true ); // recalculate focus rectangle
- pView->Invalidate();
+ m_pView->Invalidate();
}
}
void SvImpLBox::ShowVerSBar()
{
- bool bVerBar = ( pView->GetStyle() & WB_VSCROLL ) != 0;
+ bool bVerBar = ( m_pView->GetStyle() & WB_VSCROLL ) != 0;
sal_uLong nVis = 0;
if( !bVerBar )
- nVis = pView->GetVisibleCount();
- if( bVerBar || (nVisibleCount && nVis > static_cast<sal_uLong>(nVisibleCount-1)) )
+ nVis = m_pView->GetVisibleCount();
+ if( bVerBar || (m_nVisibleCount && nVis > static_cast<sal_uLong>(m_nVisibleCount-1)) )
{
- if( !aVerSBar->IsVisible() )
+ if( !m_aVerSBar->IsVisible() )
{
- pView->nFocusWidth = -1;
- AdjustScrollBars( aOutputSize );
+ m_pView->nFocusWidth = -1;
+ AdjustScrollBars( m_aOutputSize );
if( GetUpdateMode() )
- aVerSBar->Update();
+ m_aVerSBar->Update();
}
}
else
{
- if( aVerSBar->IsVisible() )
+ if( m_aVerSBar->IsVisible() )
{
- pView->nFocusWidth = -1;
- AdjustScrollBars( aOutputSize );
+ m_pView->nFocusWidth = -1;
+ AdjustScrollBars( m_aOutputSize );
}
}
long nMaxRight = GetOutputSize().Width();
- Point aPos( pView->GetMapMode().GetOrigin() );
+ Point aPos( m_pView->GetMapMode().GetOrigin() );
aPos.setX( aPos.X() * -1 ); // convert document coordinates
nMaxRight = nMaxRight + aPos.X() - 1;
- if( nMaxRight < nMostRight )
+ if( nMaxRight < m_nMostRight )
{
- if( !aHorSBar->IsVisible() )
+ if( !m_aHorSBar->IsVisible() )
{
- pView->nFocusWidth = -1;
- AdjustScrollBars( aOutputSize );
+ m_pView->nFocusWidth = -1;
+ AdjustScrollBars( m_aOutputSize );
if( GetUpdateMode() )
- aHorSBar->Update();
+ m_aHorSBar->Update();
}
else
{
- Range aRange( aHorSBar->GetRange() );
- if( aRange.Max() < nMostRight+25 )
+ Range aRange( m_aHorSBar->GetRange() );
+ if( aRange.Max() < m_nMostRight+25 )
{
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list