diff options
author | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-07-26 20:20:38 +0400 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-07-26 20:31:21 +0400 |
commit | 09cc3a1b65dbf40717c4b41f24e86450f6fb4a99 (patch) | |
tree | 8a9b421f3cd7aa110ad894289cb3a7f98cccb930 /svtools | |
parent | 9b5a4f37912620a707ad2c8390381dd9f43d5f17 (diff) |
pTabBar is always NULL
Change-Id: I0f40a54c02c0231f75fcfcae7676f529984ee0f2
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/inc/svtools/svtreebx.hxx | 1 | ||||
-rw-r--r-- | svtools/source/contnr/svimpbox.cxx | 55 | ||||
-rw-r--r-- | svtools/source/inc/svimpbox.hxx | 2 |
3 files changed, 8 insertions, 50 deletions
diff --git a/svtools/inc/svtools/svtreebx.hxx b/svtools/inc/svtools/svtreebx.hxx index b656bdb37b95..02c223e6e44c 100644 --- a/svtools/inc/svtools/svtreebx.hxx +++ b/svtools/inc/svtools/svtreebx.hxx @@ -36,7 +36,6 @@ // forward and defines --------------------------------------------------- class SvImpLBox; -class TabBar; #define SV_TAB_BORDER 8 diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index 21a0e4a92b14..d828661e2959 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -29,7 +29,6 @@ #include <vcl/svapp.hxx> #include <vcl/salnativewidgets.hxx> #include <vcl/help.hxx> -#include <svtools/tabbar.hxx> #include <stack> @@ -54,7 +53,6 @@ sal_Int32 SvImpLBox::s_nImageRefCount = 0; SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvLBoxTreeList* pLBTree, WinBits nWinStyle) : - pTabBar( NULL ), aVerSBar( pLBView, WB_DRAG | WB_VSCROLL ), aHorSBar( pLBView, WB_DRAG | WB_HSCROLL ), aScrBarBox( pLBView ), @@ -281,13 +279,7 @@ void SvImpLBox::Clear() aVerSBar.SetRange( aRange ); aOutputSize = pView->Control::GetOutputSizePixel(); nFlags &= ~(F_VER_SBARSIZE_WITH_HBAR | F_HOR_SBARSIZE_WITH_VBAR ); - if( pTabBar ) - { - aOutputSize.Height() -= nHorSBarHeight; - nFlags |= F_VER_SBARSIZE_WITH_HBAR; - } - if( !pTabBar ) - aHorSBar.Hide(); + aHorSBar.Hide(); aHorSBar.SetThumbPos( 0 ); MapMode aMapMode( pView->GetMapMode()); aMapMode.SetOrigin( Point(0,0) ); @@ -1154,39 +1146,13 @@ void SvImpLBox::DrawNet() pView->SetLineColor( aOldLineColor ); } - -static long GetOptSize( TabBar* pTabBar ) -{ - return pTabBar->CalcWindowSizePixel().Width(); -} - void SvImpLBox::PositionScrollBars( Size& rSize, sal_uInt16 nMask ) { long nOverlap = 0; Size aVerSize( nVerSBarWidth, rSize.Height() ); Size aHorSize( rSize.Width(), nHorSBarHeight ); - long nTabBarWidth = 0; - if( pTabBar ) - { - nTabBarWidth = GetOptSize( pTabBar ); - long nMaxWidth = (rSize.Width() * 700) / 1000; - if( nTabBarWidth > nMaxWidth ) - { - nTabBarWidth = nMaxWidth; - pTabBar->SetStyle( pTabBar->GetStyle() | WB_MINSCROLL ); - } - else - { - WinBits nStyle = pTabBar->GetStyle(); - nStyle &= ~(WB_MINSCROLL); - pTabBar->SetStyle( nStyle ); - } - aHorSize.Width() -= nTabBarWidth; - Size aTabSize( pTabBar->GetSizePixel() ); - aTabSize.Width() = nTabBarWidth; - pTabBar->SetSizePixel( aTabSize ); - } + if( nMask & 0x0001 ) aHorSize.Width() -= nVerSBarWidth; if( nMask & 0x0002 ) @@ -1198,23 +1164,18 @@ void SvImpLBox::PositionScrollBars( Size& rSize, sal_uInt16 nMask ) aHorSize.Width() += 2 * nOverlap; Point aHorPos( -nOverlap, rSize.Height() - aHorSize.Height() + nOverlap ); - if( pTabBar ) - pTabBar->SetPosPixel( aHorPos ); - aHorPos.X() += nTabBarWidth; + aHorSBar.SetPosSizePixel( aHorPos, aHorSize ); if( nMask & 0x0001 ) rSize.Width() = aVerPos.X(); if( nMask & 0x0002 ) rSize.Height() = aHorPos.Y(); - if( pTabBar ) - pTabBar->Show(); if( (nMask & (0x0001|0x0002)) == (0x0001|0x0002) ) aScrBarBox.Show(); else aScrBarBox.Hide(); - } // nResult: Bit0 == VerSBar Bit1 == HorSBar @@ -1236,10 +1197,11 @@ sal_uInt16 SvImpLBox::AdjustScrollBars( Size& rSize ) aOrigin.X() *= -1; nMaxRight += aOrigin.X() - 1; long nVis = nMostRight - aOrigin.X(); - if( pTabBar || ( - (nWindowStyle & WB_HSCROLL) && - (nVis < nMostRight || nMaxRight < nMostRight) )) + if( (nWindowStyle & WB_HSCROLL) && + (nVis < nMostRight || nMaxRight < nMostRight) ) + { bHorBar = sal_True; + } // number of entries that are not collapsed sal_uLong nTotalCount = pView->GetVisibleCount(); @@ -1335,8 +1297,7 @@ sal_uInt16 SvImpLBox::AdjustScrollBars( Size& rSize ) aHorSBar.Show(); else { - if( !pTabBar ) - aHorSBar.Hide(); + aHorSBar.Hide(); } rSize = aOSize; return nResult; diff --git a/svtools/source/inc/svimpbox.hxx b/svtools/source/inc/svimpbox.hxx index b12e3b959418..e8c6a5941582 100644 --- a/svtools/source/inc/svimpbox.hxx +++ b/svtools/source/inc/svimpbox.hxx @@ -44,7 +44,6 @@ class SvLBoxTreeList; class SvImpLBox; class SvLBoxEntry; class SvLBoxTab; -class TabBar; namespace comphelper { namespace string @@ -105,7 +104,6 @@ private: SvLBoxButton* pActiveButton; SvLBoxEntry* pActiveEntry; SvLBoxTab* pActiveTab; - TabBar* pTabBar; ScrollBar aVerSBar; ScrollBar aHorSBar; |