summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorIvan Timofeev <timofeev.i.s@gmail.com>2012-06-14 00:01:32 +0400
committerIvan Timofeev <timofeev.i.s@gmail.com>2012-06-21 11:18:04 +0400
commit1b7e9855d9e90bbd33b78b7da0b65dc915800cc6 (patch)
tree6bac82d9b046f3d2d89fd83e7f7952f238a24aa0 /vcl/source
parent5e0acb90224f4aa7a06db03fac56267de6b05bc6 (diff)
remove misterious NextToolbox functionality
Change-Id: Ic64d2cae56787884ff107b78c3b6567ab5d38785
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/window/toolbox.cxx128
-rw-r--r--vcl/source/window/toolbox2.cxx7
2 files changed, 1 insertions, 134 deletions
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 4ed2388811d3..b3434b5ed08e 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -945,8 +945,7 @@ Size ToolBox::ImplCalcFloatSize( ToolBox* pThis, sal_uInt16& rLines )
Size aSize( pThis->mpFloatSizeAry->mpSize[i].mnWidth,
pThis->mpFloatSizeAry->mpSize[i].mnHeight );
rLines = pThis->mpFloatSizeAry->mpSize[i].mnLines;
- if ( pThis->maNextToolBoxStr.Len() && pThis->mbScroll )
- aSize.Width() += TB_NEXT_SIZE-TB_NEXT_OFFSET;
+
return aSize;
}
@@ -1549,7 +1548,6 @@ void ToolBox::ImplInit( Window* pParent, WinBits nStyle )
mbCommandDrag = sal_False;
mbUpper = sal_False;
mbLower = sal_False;
- mbNextTool = sal_False;
mbIn = sal_False;
mbCalc = sal_True;
mbFormat = sal_False;
@@ -2501,7 +2499,6 @@ void ToolBox::ImplFormat( sal_Bool bResize )
maLowerRect = aEmptyRect;
maUpperRect = aEmptyRect;
- maNextToolRect = aEmptyRect;
}
else
{
@@ -2513,33 +2510,11 @@ void ToolBox::ImplFormat( sal_Bool bResize )
// save old scroll rectangles and reset them
Rectangle aOldLowerRect = maLowerRect;
Rectangle aOldUpperRect = maUpperRect;
- Rectangle aOldNextToolRect = maNextToolRect;
Rectangle aOldMenubuttonRect = mpData->maMenubuttonItem.maRect;
maUpperRect = aEmptyRect;
maLowerRect = aEmptyRect;
- maNextToolRect = aEmptyRect;
mpData->maMenubuttonItem.maRect = aEmptyRect;
- // additional toolboxes require a toggle button (maNextToolRect)
- if ( maNextToolBoxStr.Len() && mbScroll )
- {
- nMax -= TB_NEXT_SIZE-TB_NEXT_OFFSET;
- if ( mbHorz )
- {
- maNextToolRect.Left() = nLeft+nMax;
- maNextToolRect.Right() = maNextToolRect.Left()+TB_NEXT_SIZE-1;
- maNextToolRect.Top() = nTop;
- maNextToolRect.Bottom() = mnDY-mnBottomBorder-TB_BORDER_OFFSET2-1;
- }
- else
- {
- maNextToolRect.Top() = nTop+nMax;
- maNextToolRect.Bottom() = maNextToolRect.Top()+TB_NEXT_SIZE-1;
- maNextToolRect.Left() = nLeft;
- maNextToolRect.Right() = mnDX-mnRightBorder-TB_BORDER_OFFSET2-1;
- }
- }
-
// do we have any toolbox items at all ?
if ( !mpData->m_aItems.empty() || IsMenuEnabled() )
{
@@ -2785,11 +2760,6 @@ void ToolBox::ImplFormat( sal_Bool bResize )
maPaintRect.Union( maUpperRect );
maPaintRect.Union( aOldUpperRect );
}
- if ( aOldNextToolRect != maNextToolRect )
- {
- maPaintRect.Union( maNextToolRect );
- maPaintRect.Union( aOldNextToolRect );
- }
if ( aOldMenubuttonRect != mpData->maMenubuttonItem.maRect )
{
maPaintRect.Union( mpData->maMenubuttonItem.maRect );
@@ -3156,52 +3126,6 @@ void ToolBox::ImplDrawSpin( sal_Bool bUpperIn, sal_Bool bLowerIn )
// -----------------------------------------------------------------------
-void ToolBox::ImplDrawNext( sal_Bool bIn )
-{
- DBG_CHKTHIS( Window, ImplDbgCheckWindow );
-
- if ( maNextToolRect.IsEmpty() )
- return;
-
- DecorationView aDecoView( this );
-
- // Button malen
- long nX = SMALLBUTTON_OFF_NORMAL_X;
- long nY = SMALLBUTTON_OFF_NORMAL_Y;
- sal_uInt16 nStyle = 0;
- if ( bIn == 1 )
- {
- nStyle |= BUTTON_DRAW_PRESSED;
- nX = SMALLBUTTON_OFF_PRESSED_X;
- nY = SMALLBUTTON_OFF_PRESSED_Y;
- }
- aDecoView.DrawButton( maNextToolRect, nStyle );
-
- // Inhalt ausgeben
- sal_Bool bLeft = sal_False;
- sal_Bool bTop = sal_False;
- if ( mbHorz )
- {
- bLeft = sal_True;
- nX += (maNextToolRect.GetWidth()-6)/2-4;
- nY += (maNextToolRect.GetHeight()-6)/2-6;
- }
- else
- {
- bTop = sal_True;
- nY += (maNextToolRect.GetHeight()-6)/2-4;
- nX += (maNextToolRect.GetWidth()-6)/2-6;
- }
-
- nX += maNextToolRect.Left();
- nY += maNextToolRect.Top();
- SetLineColor();
- SetFillColor( COL_LIGHTBLUE );
- ImplDrawToolArrow( this, nX, nY, sal_True, sal_False, bLeft, bTop, 10 );
-}
-
-// -----------------------------------------------------------------------
-
void ToolBox::ImplDrawSeparator( sal_uInt16 nPos, Rectangle rRect )
{
bool bNativeOk = false;
@@ -3793,17 +3717,6 @@ sal_Bool ToolBox::ImplHandleMouseMove( const MouseEvent& rMEvt, sal_Bool bRepeat
return sal_True;
}
- if ( mbNextTool )
- {
- sal_Bool bNewIn = maNextToolRect.IsInside( aMousePos );
- if ( bNewIn != mbIn )
- {
- mbIn = bNewIn;
- ImplDrawNext( mbIn );
- }
- return sal_True;
- }
-
return sal_False;
}
@@ -3922,14 +3835,6 @@ sal_Bool ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, sal_Bool bCa
ImplDrawSpin( sal_False, sal_False );
return sal_True;
}
- else if ( mbNextTool )
- {
- mbNextTool = sal_False;
- mbIn = sal_False;
- ImplDrawNext( sal_False );
- NextToolBox();
- return sal_True;
- }
return sal_False;
}
@@ -4349,14 +4254,6 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt )
}
return;
}
- if ( maNextToolRect.IsInside( aMousePos ) )
- {
- StartTracking();
- mbNextTool = sal_True;
- mbIn = sal_True;
- ImplDrawNext( sal_True );
- return;
- }
// Linesizing testen
if ( (mnWinStyle & TB_WBLINESIZING) == TB_WBLINESIZING )
@@ -4458,9 +4355,6 @@ void ToolBox::Paint( const Rectangle& rPaintRect )
ImplDrawSpin( sal_False, sal_False );
}
- // draw NextButton
- ImplDrawNext( sal_False );
-
// draw buttons
sal_uInt16 nHighPos;
if ( mnHighItemId )
@@ -4650,26 +4544,6 @@ void ToolBox::RequestHelp( const HelpEvent& rHEvt )
}
}
}
- else if ( maNextToolRect.IsInside( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) ) )
- {
- if ( rHEvt.GetMode() & (HELPMODE_BALLOON | HELPMODE_QUICK) )
- {
- // get rectangle
- Rectangle aTempRect = maNextToolRect;
- Point aPt = OutputToScreenPixel( aTempRect.TopLeft() );
- aTempRect.Left() = aPt.X();
- aTempRect.Top() = aPt.Y();
- aPt = OutputToScreenPixel( aTempRect.BottomRight() );
- aTempRect.Right() = aPt.X();
- aTempRect.Bottom() = aPt.Y();
-
- if ( rHEvt.GetMode() & HELPMODE_BALLOON )
- Help::ShowBalloon( this, aTempRect.Center(), aTempRect, maNextToolBoxStr );
- else
- Help::ShowQuickHelp( this, aTempRect, maNextToolBoxStr );
- return;
- }
- }
DockingWindow::RequestHelp( rHEvt );
}
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index cb699c9a5f41..3c924cf2c25b 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -536,13 +536,6 @@ void ToolBox::Select()
// -----------------------------------------------------------------------
-void ToolBox::NextToolBox()
-{
- maNextToolBoxHdl.Call( this );
-}
-
-// -----------------------------------------------------------------------
-
void ToolBox::Customize( const ToolBoxCustomizeEvent& )
{
}