Kaydet (Commit) b4a31534 authored tarafından Caolán McNamara's avatar Caolán McNamara

drop AutoHide code

only used from reportdesign and that appears to be overlooked from an earlier
eradication program

Change-Id: I196fd7ccbc909c935daf534d55e6b39de8510f23
üst 4ad249af
...@@ -73,7 +73,6 @@ private: ...@@ -73,7 +73,6 @@ private:
mbCalc:1, mbCalc:1,
mbRecalc:1, mbRecalc:1,
mbInvalidate:1, mbInvalidate:1,
mbAutoHide:1,
mbFadeIn:1, mbFadeIn:1,
mbFadeOut:1, mbFadeOut:1,
mbAutoHideIn:1, mbAutoHideIn:1,
...@@ -94,11 +93,9 @@ private: ...@@ -94,11 +93,9 @@ private:
SAL_DLLPRIVATE void ImplSetWindowSize( long nDelta ); SAL_DLLPRIVATE void ImplSetWindowSize( long nDelta );
SAL_DLLPRIVATE void ImplSplitMousePos( Point& rMousePos ); SAL_DLLPRIVATE void ImplSplitMousePos( Point& rMousePos );
SAL_DLLPRIVATE void ImplGetButtonRect( Rectangle& rRect, long nEx, bool bTest ) const; SAL_DLLPRIVATE void ImplGetButtonRect( Rectangle& rRect, long nEx, bool bTest ) const;
SAL_DLLPRIVATE void ImplGetAutoHideRect( Rectangle& rRect, bool bTest = false ) const;
SAL_DLLPRIVATE void ImplGetFadeInRect( Rectangle& rRect, bool bTest = false ) const; SAL_DLLPRIVATE void ImplGetFadeInRect( Rectangle& rRect, bool bTest = false ) const;
SAL_DLLPRIVATE void ImplGetFadeOutRect( Rectangle& rRect, bool bTest = false ) const; SAL_DLLPRIVATE void ImplGetFadeOutRect( Rectangle& rRect, bool bTest = false ) const;
SAL_DLLPRIVATE void ImplDrawButtonRect(vcl::RenderContext& rRenderContext, const Rectangle& rRect, long nSize); SAL_DLLPRIVATE void ImplDrawButtonRect(vcl::RenderContext& rRenderContext, const Rectangle& rRect, long nSize);
SAL_DLLPRIVATE void ImplDrawAutoHide(vcl::RenderContext& rRenderContext);
SAL_DLLPRIVATE void ImplDrawFadeIn(vcl::RenderContext& rRenderContext); SAL_DLLPRIVATE void ImplDrawFadeIn(vcl::RenderContext& rRenderContext);
SAL_DLLPRIVATE void ImplDrawFadeOut(vcl::RenderContext& rRenderContext); SAL_DLLPRIVATE void ImplDrawFadeOut(vcl::RenderContext& rRenderContext);
SAL_DLLPRIVATE void ImplNewAlign(); SAL_DLLPRIVATE void ImplNewAlign();
...@@ -185,8 +182,6 @@ public: ...@@ -185,8 +182,6 @@ public:
Size CalcLayoutSizePixel( const Size& aNewSize ); Size CalcLayoutSizePixel( const Size& aNewSize );
void ShowAutoHideButton( bool bShow = true );
bool IsAutoHideButtonVisible() const { return mbAutoHide; }
void ShowFadeInHideButton(); void ShowFadeInHideButton();
void ShowFadeOutButton(); void ShowFadeOutButton();
long GetFadeInSize() const; long GetFadeInSize() const;
......
...@@ -113,7 +113,6 @@ ODesignView::ODesignView( vcl::Window* pParent, ...@@ -113,7 +113,6 @@ ODesignView::ODesignView( vcl::Window* pParent,
// Splitter einrichten // Splitter einrichten
m_aSplitWin->SetSplitHdl(LINK(this, ODesignView,SplitHdl)); m_aSplitWin->SetSplitHdl(LINK(this, ODesignView,SplitHdl));
m_aSplitWin->ShowAutoHideButton();
m_aSplitWin->SetAlign(WindowAlign::Left); m_aSplitWin->SetAlign(WindowAlign::Left);
m_aSplitWin->Show(); m_aSplitWin->Show();
......
...@@ -110,7 +110,6 @@ public: ...@@ -110,7 +110,6 @@ public:
aTimer.SetTimeout( 200 ); aTimer.SetTimeout( 200 );
SetAlign( pOwner->GetAlign() ); SetAlign( pOwner->GetAlign() );
Actualize(); Actualize();
ShowAutoHideButton( pOwner->IsAutoHideButtonVisible() );
ShowFadeInHideButton(); ShowFadeInHideButton();
} }
...@@ -198,9 +197,8 @@ SfxSplitWindow::SfxSplitWindow( vcl::Window* pParent, SfxChildAlignment eAl, ...@@ -198,9 +197,8 @@ SfxSplitWindow::SfxSplitWindow( vcl::Window* pParent, SfxChildAlignment eAl,
pEmptyWin(nullptr), pEmptyWin(nullptr),
pActive(nullptr) pActive(nullptr)
{ {
if ( bWithButtons ) if (bWithButtons)
{ {
ShowAutoHideButton( false ); // no autohide button (pin) anymore
ShowFadeOutButton(); ShowFadeOutButton();
} }
......
...@@ -283,7 +283,7 @@ void SplitWindow::ImplDrawBorder(vcl::RenderContext& rRenderContext) ...@@ -283,7 +283,7 @@ void SplitWindow::ImplDrawBorder(vcl::RenderContext& rRenderContext)
void SplitWindow::ImplDrawBorderLine(vcl::RenderContext& rRenderContext) void SplitWindow::ImplDrawBorderLine(vcl::RenderContext& rRenderContext)
{ {
if (mbFadeOut || mbAutoHide) if (mbFadeOut)
{ {
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
long nDX = mnDX; long nDX = mnDX;
...@@ -1231,7 +1231,7 @@ sal_uInt16 SplitWindow::ImplTestSplit( SplitWindow* pWindow, const Point& rPos, ...@@ -1231,7 +1231,7 @@ sal_uInt16 SplitWindow::ImplTestSplit( SplitWindow* pWindow, const Point& rPos,
nTPos = rPos.X(); nTPos = rPos.X();
} }
long nSplitSize = pWindow->mpMainSet->mnSplitSize-2; long nSplitSize = pWindow->mpMainSet->mnSplitSize-2;
if ( pWindow->mbAutoHide || pWindow->mbFadeOut ) if (pWindow->mbFadeOut)
nSplitSize += SPLITWIN_SPLITSIZEEXLN; nSplitSize += SPLITWIN_SPLITSIZEEXLN;
if ( !pWindow->mbBottomRight ) if ( !pWindow->mbBottomRight )
nPos -= nSplitSize; nPos -= nSplitSize;
...@@ -1266,7 +1266,7 @@ void SplitWindow::ImplDrawSplitTracking(const Point& rPos) ...@@ -1266,7 +1266,7 @@ void SplitWindow::ImplDrawSplitTracking(const Point& rPos)
aRect.Right() = aRect.Left() + mpSplitSet->mnSplitSize - 1; aRect.Right() = aRect.Left() + mpSplitSet->mnSplitSize - 1;
if (!(mnWinStyle & WB_NOSPLITDRAW)) if (!(mnWinStyle & WB_NOSPLITDRAW))
aRect.Right()--; aRect.Right()--;
if ((mnSplitTest & SPLIT_WINDOW) && (mbAutoHide || mbFadeOut)) if ((mnSplitTest & SPLIT_WINDOW) && (mbFadeOut))
{ {
aRect.Left() += SPLITWIN_SPLITSIZEEXLN; aRect.Left() += SPLITWIN_SPLITSIZEEXLN;
aRect.Right() += SPLITWIN_SPLITSIZEEXLN; aRect.Right() += SPLITWIN_SPLITSIZEEXLN;
...@@ -1280,7 +1280,7 @@ void SplitWindow::ImplDrawSplitTracking(const Point& rPos) ...@@ -1280,7 +1280,7 @@ void SplitWindow::ImplDrawSplitTracking(const Point& rPos)
aRect.Bottom() = aRect.Top() + mpSplitSet->mnSplitSize - 1; aRect.Bottom() = aRect.Top() + mpSplitSet->mnSplitSize - 1;
if (!(mnWinStyle & WB_NOSPLITDRAW)) if (!(mnWinStyle & WB_NOSPLITDRAW))
aRect.Bottom()--; aRect.Bottom()--;
if ((mnSplitTest & SPLIT_WINDOW) && (mbAutoHide || mbFadeOut)) if ((mnSplitTest & SPLIT_WINDOW) && (mbFadeOut))
{ {
aRect.Top() += SPLITWIN_SPLITSIZEEXLN; aRect.Top() += SPLITWIN_SPLITSIZEEXLN;
aRect.Bottom() += SPLITWIN_SPLITSIZEEXLN; aRect.Bottom() += SPLITWIN_SPLITSIZEEXLN;
...@@ -1318,7 +1318,6 @@ void SplitWindow::ImplInit( vcl::Window* pParent, WinBits nStyle ) ...@@ -1318,7 +1318,6 @@ void SplitWindow::ImplInit( vcl::Window* pParent, WinBits nStyle )
mbCalc = false; mbCalc = false;
mbRecalc = true; mbRecalc = true;
mbInvalidate = true; mbInvalidate = true;
mbAutoHide = false;
mbFadeIn = false; mbFadeIn = false;
mbFadeOut = false; mbFadeOut = false;
mbAutoHideIn = false; mbAutoHideIn = false;
...@@ -1444,7 +1443,7 @@ Size SplitWindow::CalcLayoutSizePixel( const Size& aNewSize ) ...@@ -1444,7 +1443,7 @@ Size SplitWindow::CalcLayoutSizePixel( const Size& aNewSize )
Size aSize( aNewSize ); Size aSize( aNewSize );
long nSplitSize = mpMainSet->mnSplitSize-2; long nSplitSize = mpMainSet->mnSplitSize-2;
if ( mbAutoHide || mbFadeOut ) if (mbFadeOut)
nSplitSize += SPLITWIN_SPLITSIZEEXLN; nSplitSize += SPLITWIN_SPLITSIZEEXLN;
// if the window is sizeable and if it does not contain a relative window, // if the window is sizeable and if it does not contain a relative window,
...@@ -1509,7 +1508,7 @@ void SplitWindow::ImplCalcLayout() ...@@ -1509,7 +1508,7 @@ void SplitWindow::ImplCalcLayout()
return; return;
long nSplitSize = mpMainSet->mnSplitSize-2; long nSplitSize = mpMainSet->mnSplitSize-2;
if ( mbAutoHide || mbFadeOut ) if (mbFadeOut)
nSplitSize += SPLITWIN_SPLITSIZEEXLN; nSplitSize += SPLITWIN_SPLITSIZEEXLN;
// if the window is sizeable and if it does not contain a relative window, // if the window is sizeable and if it does not contain a relative window,
...@@ -1623,7 +1622,7 @@ void SplitWindow::ImplSplitMousePos( Point& rMousePos ) ...@@ -1623,7 +1622,7 @@ void SplitWindow::ImplSplitMousePos( Point& rMousePos )
void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, bool bTest ) const void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, bool bTest ) const
{ {
long nSplitSize = mpMainSet->mnSplitSize-1; long nSplitSize = mpMainSet->mnSplitSize-1;
if ( mbAutoHide || mbFadeOut || mbFadeIn ) if (mbFadeOut || mbFadeIn)
nSplitSize += SPLITWIN_SPLITSIZEEX; nSplitSize += SPLITWIN_SPLITSIZEEX;
long nButtonSize = 0; long nButtonSize = 0;
...@@ -1631,8 +1630,6 @@ void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, bool bTest ) co ...@@ -1631,8 +1630,6 @@ void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, bool bTest ) co
nButtonSize += SPLITWIN_SPLITSIZEFADE+1; nButtonSize += SPLITWIN_SPLITSIZEFADE+1;
if ( mbFadeOut ) if ( mbFadeOut )
nButtonSize += SPLITWIN_SPLITSIZEFADE+1; nButtonSize += SPLITWIN_SPLITSIZEFADE+1;
if ( mbAutoHide )
nButtonSize += SPLITWIN_SPLITSIZEAUTOHIDE+1;
long nCenterEx = 0; long nCenterEx = 0;
if ( mbHorz ) if ( mbHorz )
nCenterEx += ((mnDX-mnLeftBorder-mnRightBorder)-nButtonSize)/2; nCenterEx += ((mnDX-mnLeftBorder-mnRightBorder)-nButtonSize)/2;
...@@ -1690,21 +1687,6 @@ void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, bool bTest ) co ...@@ -1690,21 +1687,6 @@ void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, bool bTest ) co
} }
} }
void SplitWindow::ImplGetAutoHideRect( Rectangle& rRect, bool bTest ) const
{
Rectangle aRect;
if ( mbAutoHide )
{
long nEx = 0;
if ( mbFadeIn || mbFadeOut )
nEx = SPLITWIN_SPLITSIZEFADE+1;
ImplGetButtonRect( aRect, nEx, bTest && mbFadeIn );
}
rRect = aRect;
}
void SplitWindow::ImplGetFadeInRect( Rectangle& rRect, bool bTest ) const void SplitWindow::ImplGetFadeInRect( Rectangle& rRect, bool bTest ) const
{ {
Rectangle aRect; Rectangle aRect;
...@@ -1791,81 +1773,6 @@ void SplitWindow::ImplDrawButtonRect(vcl::RenderContext& rRenderContext, const R ...@@ -1791,81 +1773,6 @@ void SplitWindow::ImplDrawButtonRect(vcl::RenderContext& rRenderContext, const R
} }
} }
void SplitWindow::ImplDrawAutoHide(vcl::RenderContext& rRenderContext)
{
if (mbAutoHide)
{
Rectangle aTempRect;
ImplGetAutoHideRect( aTempRect );
// load ImageListe, if not available
ImplSVData* pSVData = ImplGetSVData();
ImageList* pImageList;
if (mbHorz)
{
if (!pSVData->maCtrlData.mpSplitHPinImgList)
{
ResMgr* pResMgr = ImplGetResMgr();
if (pResMgr)
{
Color aNonAlphaMask( 0x00, 0x00, 0xFF );
pSVData->maCtrlData.mpSplitHPinImgList = new ImageList;
pSVData->maCtrlData.mpSplitHPinImgList->InsertFromHorizontalBitmap
( ResId( SV_RESID_BITMAP_SPLITHPIN, *pResMgr ), 4, &aNonAlphaMask );
}
}
pImageList = pSVData->maCtrlData.mpSplitHPinImgList;
}
else
{
if (!pSVData->maCtrlData.mpSplitVPinImgList)
{
ResMgr* pResMgr = ImplGetResMgr();
pSVData->maCtrlData.mpSplitVPinImgList = new ImageList;
if (pResMgr)
{
Color aNonAlphaMask( 0x00, 0x00, 0xFF );
pSVData->maCtrlData.mpSplitVPinImgList->InsertFromHorizontalBitmap(
ResId( SV_RESID_BITMAP_SPLITVPIN, *pResMgr ), 4, &aNonAlphaMask);
}
}
pImageList = pSVData->maCtrlData.mpSplitVPinImgList;
}
if (!pImageList)
return;
// retrieve and return image
sal_uInt16 nId;
if (mbAutoHidePressed)
{
if (mbAutoHideIn)
nId = 3;
else
nId = 4;
}
else
{
if (mbAutoHideIn)
nId = 1;
else
nId = 2;
}
Image aImage = pImageList->GetImage( nId );
Size aImageSize = aImage.GetSizePixel();
Point aPos(aTempRect.Left() + ((aTempRect.GetWidth() - aImageSize.Width()) / 2),
aTempRect.Top() + ((aTempRect.GetHeight() - aImageSize.Height()) / 2));
long nSize;
if (mbHorz)
nSize = aImageSize.Width();
else
nSize = aImageSize.Height();
ImplDrawButtonRect(rRenderContext, aTempRect, nSize);
rRenderContext.DrawImage(aPos, aImage);
}
}
void SplitWindow::ImplDrawGrip(vcl::RenderContext& rRenderContext, const Rectangle& rRect, bool bHorizontal, bool bLeft) void SplitWindow::ImplDrawGrip(vcl::RenderContext& rRenderContext, const Rectangle& rRect, bool bHorizontal, bool bLeft)
{ {
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
...@@ -2224,37 +2131,28 @@ void SplitWindow::MouseButtonDown( const MouseEvent& rMEvt ) ...@@ -2224,37 +2131,28 @@ void SplitWindow::MouseButtonDown( const MouseEvent& rMEvt )
Rectangle aTestRect; Rectangle aTestRect;
mbFadeNoButtonMode = false; mbFadeNoButtonMode = false;
ImplGetAutoHideRect( aTestRect, true );
ImplGetFadeOutRect( aTestRect, true );
if ( aTestRect.IsInside( aMousePosPixel ) ) if ( aTestRect.IsInside( aMousePosPixel ) )
{ {
mbAutoHideDown = true; mbFadeOutDown = true;
mbAutoHidePressed = true; mbFadeOutPressed = true;
Invalidate(); Invalidate();
} }
else else
{ {
ImplGetFadeOutRect( aTestRect, true ); ImplGetFadeInRect( aTestRect, true );
if ( aTestRect.IsInside( aMousePosPixel ) ) if ( aTestRect.IsInside( aMousePosPixel ) )
{ {
mbFadeOutDown = true; mbFadeInDown = true;
mbFadeOutPressed = true; mbFadeInPressed = true;
Invalidate(); Invalidate();
} }
else else if ( !aTestRect.IsEmpty() && !(mnWinStyle & WB_SIZEABLE) )
{ {
ImplGetFadeInRect( aTestRect, true ); mbFadeNoButtonMode = true;
if ( aTestRect.IsInside( aMousePosPixel ) ) FadeIn();
{ return;
mbFadeInDown = true;
mbFadeInPressed = true;
Invalidate();
}
else if ( !aTestRect.IsEmpty() && !(mnWinStyle & WB_SIZEABLE) )
{
mbFadeNoButtonMode = true;
FadeIn();
return;
}
} }
} }
...@@ -2274,15 +2172,12 @@ void SplitWindow::MouseMove( const MouseEvent& rMEvt ) ...@@ -2274,15 +2172,12 @@ void SplitWindow::MouseMove( const MouseEvent& rMEvt )
sal_uInt16 nTempSplitPos; sal_uInt16 nTempSplitPos;
sal_uInt16 nSplitTest = ImplTestSplit( this, aPos, nTemp, &pTempSplitSet, nTempSplitPos ); sal_uInt16 nSplitTest = ImplTestSplit( this, aPos, nTemp, &pTempSplitSet, nTempSplitPos );
PointerStyle eStyle = PointerStyle::Arrow; PointerStyle eStyle = PointerStyle::Arrow;
Rectangle aAutoHideRect;
Rectangle aFadeInRect; Rectangle aFadeInRect;
Rectangle aFadeOutRect; Rectangle aFadeOutRect;
ImplGetAutoHideRect( aAutoHideRect );
ImplGetFadeInRect( aFadeInRect ); ImplGetFadeInRect( aFadeInRect );
ImplGetFadeOutRect( aFadeOutRect ); ImplGetFadeOutRect( aFadeOutRect );
if ( !aAutoHideRect.IsInside( aPos ) && if ( !aFadeInRect.IsInside( aPos ) &&
!aFadeInRect.IsInside( aPos ) &&
!aFadeOutRect.IsInside( aPos ) ) !aFadeOutRect.IsInside( aPos ) )
{ {
if ( nSplitTest && !(nSplitTest & SPLIT_NOSPLIT) ) if ( nSplitTest && !(nSplitTest & SPLIT_NOSPLIT) )
...@@ -2324,9 +2219,7 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt ) ...@@ -2324,9 +2219,7 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt )
} }
else else
{ {
Rectangle aTestRect; bool bNewPressed = false;
ImplGetAutoHideRect( aTestRect, true );
bool bNewPressed = aTestRect.IsInside( aMousePosPixel );
if ( bNewPressed != mbAutoHidePressed ) if ( bNewPressed != mbAutoHidePressed )
{ {
mbAutoHidePressed = bNewPressed; mbAutoHidePressed = bNewPressed;
...@@ -2517,7 +2410,6 @@ void SplitWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) ...@@ -2517,7 +2410,6 @@ void SplitWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
ImplDrawBorderLine(rRenderContext); ImplDrawBorderLine(rRenderContext);
ImplDrawFadeOut(rRenderContext); ImplDrawFadeOut(rRenderContext);
ImplDrawFadeIn(rRenderContext); ImplDrawFadeIn(rRenderContext);
ImplDrawAutoHide(rRenderContext);
// draw FrameSet-backgrounds // draw FrameSet-backgrounds
ImplDrawBack(rRenderContext, mpMainSet); ImplDrawBack(rRenderContext, mpMainSet);
...@@ -2549,25 +2441,14 @@ void SplitWindow::RequestHelp( const HelpEvent& rHEvt ) ...@@ -2549,25 +2441,14 @@ void SplitWindow::RequestHelp( const HelpEvent& rHEvt )
Rectangle aHelpRect; Rectangle aHelpRect;
sal_uInt16 nHelpResId = 0; sal_uInt16 nHelpResId = 0;
ImplGetAutoHideRect( aHelpRect, true ); ImplGetFadeInRect( aHelpRect, true );
if ( aHelpRect.IsInside( aMousePosPixel ) ) if ( aHelpRect.IsInside( aMousePosPixel ) )
{ nHelpResId = SV_HELPTEXT_FADEIN;
if ( mbAutoHideIn )
nHelpResId = SV_HELPTEXT_SPLITFIXED;
else
nHelpResId = SV_HELPTEXT_SPLITFLOATING;
}
else else
{ {
ImplGetFadeInRect( aHelpRect, true ); ImplGetFadeOutRect( aHelpRect, true );
if ( aHelpRect.IsInside( aMousePosPixel ) ) if ( aHelpRect.IsInside( aMousePosPixel ) )
nHelpResId = SV_HELPTEXT_FADEIN; nHelpResId = SV_HELPTEXT_FADEOUT;
else
{
ImplGetFadeOutRect( aHelpRect, true );
if ( aHelpRect.IsInside( aMousePosPixel ) )
nHelpResId = SV_HELPTEXT_FADEOUT;
}
} }
// get rectangle // get rectangle
...@@ -3192,12 +3073,6 @@ void SplitWindow::SetAlign( WindowAlign eNewAlign ) ...@@ -3192,12 +3073,6 @@ void SplitWindow::SetAlign( WindowAlign eNewAlign )
} }
} }
void SplitWindow::ShowAutoHideButton( bool bShow )
{
mbAutoHide = bShow;
ImplUpdate();
}
void SplitWindow::ShowFadeInHideButton() void SplitWindow::ShowFadeInHideButton()
{ {
mbFadeIn = true; mbFadeIn = true;
...@@ -3215,9 +3090,7 @@ void SplitWindow::SetAutoHideState( bool bAutoHide ) ...@@ -3215,9 +3090,7 @@ void SplitWindow::SetAutoHideState( bool bAutoHide )
mbAutoHideIn = bAutoHide; mbAutoHideIn = bAutoHide;
if ( IsReallyVisible() ) if ( IsReallyVisible() )
{ {
Rectangle aRect; Invalidate(Rectangle());
ImplGetAutoHideRect( aRect );
Invalidate( aRect );
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment