diff options
author | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-06-14 00:01:32 +0400 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-06-21 11:18:04 +0400 |
commit | 1b7e9855d9e90bbd33b78b7da0b65dc915800cc6 (patch) | |
tree | 6bac82d9b046f3d2d89fd83e7f7952f238a24aa0 | |
parent | 5e0acb90224f4aa7a06db03fac56267de6b05bc6 (diff) |
remove misterious NextToolbox functionality
Change-Id: Ic64d2cae56787884ff107b78c3b6567ab5d38785
-rw-r--r-- | vcl/inc/vcl/toolbox.hxx | 10 | ||||
-rw-r--r-- | vcl/source/window/toolbox.cxx | 128 | ||||
-rw-r--r-- | vcl/source/window/toolbox2.cxx | 7 |
3 files changed, 1 insertions, 144 deletions
diff --git a/vcl/inc/vcl/toolbox.hxx b/vcl/inc/vcl/toolbox.hxx index 705abb6eff1d..0c4e58527b7a 100644 --- a/vcl/inc/vcl/toolbox.hxx +++ b/vcl/inc/vcl/toolbox.hxx @@ -177,12 +177,10 @@ private: ImplToolBoxPrivateData* mpData; ImplToolSizeArray* mpFloatSizeAry; XubString maCvtStr; - XubString maNextToolBoxStr; ImageList maImageList; Timer maTimer; Rectangle maUpperRect; Rectangle maLowerRect; - Rectangle maNextToolRect; Rectangle maOutDockRect; Rectangle maInDockRect; Rectangle maPaintRect; @@ -220,7 +218,6 @@ private: mbCommandDrag:1, mbUpper:1, mbLower:1, - mbNextTool:1, mbIn:1, mbCalc:1, mbFormat:1, @@ -247,7 +244,6 @@ private: Link maDeactivateHdl; Link maHighlightHdl; Link maSelectHdl; - Link maNextToolBoxHdl; public: using Window::ImplInit; @@ -261,7 +257,6 @@ private: SAL_DLLPRIVATE sal_uInt16 ImplCalcBreaks( long nWidth, long* pMaxLineWidth, sal_Bool bCalcHorz ); SAL_DLLPRIVATE void ImplFormat( sal_Bool bResize = sal_False ); SAL_DLLPRIVATE void ImplDrawSpin( sal_Bool bUpperIn, sal_Bool bLowerIn ); - SAL_DLLPRIVATE void ImplDrawNext( sal_Bool bIn ); SAL_DLLPRIVATE void ImplDrawSeparator( sal_uInt16 nPos, Rectangle rRect ); SAL_DLLPRIVATE void ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight = 0, sal_Bool bPaint = sal_False, sal_Bool bLayout = sal_False ); using Window::ImplInvalidate; @@ -349,7 +344,6 @@ public: virtual void Deactivate(); virtual void Highlight(); virtual void Select(); - virtual void NextToolBox(); virtual void Customize( const ToolBoxCustomizeEvent& rCEvt ); virtual void UserDraw( const UserDrawEvent& rUDEvt ); @@ -423,8 +417,6 @@ public: // Used to enable/disable scrolling one page at a time for toolbar void SetPageScroll( sal_Bool b ); - const XubString& GetNextToolBox() const { return maNextToolBoxStr; } - sal_uInt16 GetItemCount() const; ToolBoxItemType GetItemType( sal_uInt16 nPos ) const; sal_uInt16 GetItemPos( sal_uInt16 nItemId ) const; @@ -557,8 +549,6 @@ public: const Link& GetHighlightHdl() const { return maHighlightHdl; } void SetSelectHdl( const Link& rLink ) { maSelectHdl = rLink; } const Link& GetSelectHdl() const { return maSelectHdl; } - void SetNextToolBoxHdl( const Link& rLink ) { maNextToolBoxHdl = rLink; } - const Link& GetNextToolBoxHdl() const { return maNextToolBoxHdl; } // support for custom menu (eg for configuration) // note: this menu will also be used to display currently 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& ) { } |