Remove dead code
SW_CRSR_TIMER was undefined Change-Id: Ib851170ea61547e0ceaa6721c0b2fb90fecaecd3 Reviewed-on: https://gerrit.libreoffice.org/747 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
This commit is contained in:
committed by
Michael Stahl
parent
02a7bf5560
commit
c2eb9698ef
@@ -750,12 +750,6 @@ public:
|
||||
// is the whole document protected/hidden (for UI...)
|
||||
sal_Bool IsAllProtect() const { return bAllProtect; }
|
||||
|
||||
#ifdef SW_CRSR_TIMER
|
||||
// Set flag at VisCrsr. Is it triggered by Timer (TRUE) or directly (FALSE).
|
||||
// Default is triggert by Timer.
|
||||
sal_Bool ChgCrsrTimerFlag( sal_Bool bTimerOn = sal_True );
|
||||
#endif
|
||||
|
||||
sal_Bool BasicActionPend() const { return nBasicActionCnt != nStartAction; }
|
||||
|
||||
sal_Bool GotoRegion( const String& rName );
|
||||
|
@@ -39,9 +39,6 @@ class SwShellCrsr;
|
||||
// From here classes/methods for non-text cursor.
|
||||
|
||||
class SwVisCrsr
|
||||
#ifdef SW_CRSR_TIMER
|
||||
: private Timer
|
||||
#endif
|
||||
{
|
||||
friend void _InitCore();
|
||||
friend void _FinitCore();
|
||||
@@ -49,16 +46,9 @@ class SwVisCrsr
|
||||
sal_Bool bIsVisible : 1;
|
||||
sal_Bool bIsDragCrsr : 1;
|
||||
|
||||
#ifdef SW_CRSR_TIMER
|
||||
sal_Bool bTimerOn : 1;
|
||||
#endif
|
||||
|
||||
Cursor aTxtCrsr;
|
||||
const SwCrsrShell* pCrsrShell;
|
||||
|
||||
#ifdef SW_CRSR_TIMER
|
||||
virtual void Timeout();
|
||||
#endif
|
||||
void _SetPosAndShow();
|
||||
|
||||
public:
|
||||
@@ -70,10 +60,6 @@ public:
|
||||
|
||||
sal_Bool IsVisible() const { return bIsVisible; }
|
||||
void SetDragCrsr( sal_Bool bFlag = sal_True ) { bIsDragCrsr = bFlag; }
|
||||
|
||||
#ifdef SW_CRSR_TIMER
|
||||
sal_Bool ChgTimerFlag( sal_Bool bTimerOn = sal_True );
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
@@ -70,22 +70,12 @@ SwVisCrsr::SwVisCrsr( const SwCrsrShell * pCShell )
|
||||
bIsVisible = aTxtCrsr.IsVisible();
|
||||
bIsDragCrsr = sal_False;
|
||||
aTxtCrsr.SetWidth( 0 );
|
||||
|
||||
#ifdef SW_CRSR_TIMER
|
||||
bTimerOn = sal_True;
|
||||
SetTimeout( 50 ); // 50 millisecond delay
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
SwVisCrsr::~SwVisCrsr()
|
||||
{
|
||||
#ifdef SW_CRSR_TIMER
|
||||
if( bTimerOn )
|
||||
Stop(); // stop timer
|
||||
#endif
|
||||
|
||||
if( bIsVisible && aTxtCrsr.IsVisible() )
|
||||
aTxtCrsr.Hide();
|
||||
|
||||
@@ -103,21 +93,7 @@ void SwVisCrsr::Show()
|
||||
|
||||
// display at all?
|
||||
if( pCrsrShell->VisArea().IsOver( pCrsrShell->aCharRect ) )
|
||||
#ifdef SW_CRSR_TIMER
|
||||
{
|
||||
if( bTimerOn )
|
||||
Start(); // start timer
|
||||
else
|
||||
{
|
||||
if( IsActive() )
|
||||
Stop(); // stop timer
|
||||
|
||||
_SetPosAndShow();
|
||||
}
|
||||
}
|
||||
#else
|
||||
_SetPosAndShow();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,51 +105,11 @@ void SwVisCrsr::Hide()
|
||||
{
|
||||
bIsVisible = sal_False;
|
||||
|
||||
#ifdef SW_CRSR_TIMER
|
||||
if( IsActive() )
|
||||
Stop(); // stop timer
|
||||
#endif
|
||||
|
||||
if( aTxtCrsr.IsVisible() ) // Shouldn't the flags be in effect?
|
||||
aTxtCrsr.Hide();
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SW_CRSR_TIMER
|
||||
|
||||
void SwVisCrsr::Timeout()
|
||||
{
|
||||
OSL_ENSURE( !bIsDragCrsr, "stop timer before" );
|
||||
if( bIsVisible )
|
||||
{
|
||||
if ( !pCrsrShell->GetWin() ) // SwFrmFmt::GetGraphic suspends Win temporarily!
|
||||
Start();
|
||||
else
|
||||
_SetPosAndShow();
|
||||
}
|
||||
}
|
||||
|
||||
sal_Bool SwCrsrShell::ChgCrsrTimerFlag( sal_Bool bTimerOn )
|
||||
{
|
||||
return pVisCrsr->ChgTimerFlag( bTimerOn );
|
||||
}
|
||||
|
||||
|
||||
sal_Bool SwVisCrsr::ChgTimerFlag( sal_Bool bFlag )
|
||||
{
|
||||
bOld = bTimerOn;
|
||||
if( !bFlag && bIsVisible && IsActive() )
|
||||
{
|
||||
Stop(); // stop timer
|
||||
_SetPosAndShow();
|
||||
}
|
||||
bTimerOn = bFlag;
|
||||
return bOld;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
void SwVisCrsr::_SetPosAndShow()
|
||||
{
|
||||
SwRect aRect;
|
||||
|
@@ -2330,9 +2330,6 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
|
||||
sal_Bool bVis = sal_False;
|
||||
if ( pSh->ISA(SwCrsrShell) )
|
||||
{
|
||||
#ifdef SW_CRSR_TIMER
|
||||
((SwCrsrShell*)pSh)->ChgCrsrTimerFlag( sal_False );
|
||||
#endif
|
||||
bVis = ((SwCrsrShell*)pSh)->GetCharRect().IsOver(pSh->VisArea());
|
||||
}
|
||||
aBools.push_back( bVis );
|
||||
|
@@ -2007,9 +2007,6 @@ KEYINPUT_CHECKTABLE_INSDEL:
|
||||
case KEY_TAB:
|
||||
{
|
||||
|
||||
#ifdef SW_CRSR_TIMER
|
||||
sal_Bool bOld = rSh.ChgCrsrTimerFlag( sal_False );
|
||||
#endif
|
||||
if (rSh.IsFormProtected() || rSh.GetCurrentFieldmark() || rSh.GetChar(sal_False)==CH_TXT_ATR_FORMELEMENT)
|
||||
{
|
||||
eKeyState=KS_GotoNextFieldMark;
|
||||
@@ -2052,17 +2049,10 @@ KEYINPUT_CHECKTABLE_INSDEL:
|
||||
eKeyState = KS_OutlineDown;
|
||||
}
|
||||
}
|
||||
#ifdef SW_CRSR_TIMER
|
||||
rSh.ChgCrsrTimerFlag( bOld );
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case KEY_TAB | KEY_SHIFT:
|
||||
{
|
||||
#ifdef SW_CRSR_TIMER
|
||||
sal_Bool bOld = rSh.ChgCrsrTimerFlag( sal_False );
|
||||
sal_Bool bOld = rSh.ChgCrsrTimerFlag( sal_False );
|
||||
#endif
|
||||
if (rSh.IsFormProtected() || rSh.GetCurrentFieldmark()|| rSh.GetChar(sal_False)==CH_TXT_ATR_FORMELEMENT) {
|
||||
eKeyState=KS_GotoPrevFieldMark;
|
||||
}
|
||||
@@ -2103,9 +2093,6 @@ KEYINPUT_CHECKTABLE_INSDEL:
|
||||
eKeyState = KS_OutlineUp;
|
||||
}
|
||||
}
|
||||
#ifdef SW_CRSR_TIMER
|
||||
rSh.ChgCrsrTimerFlag( bOld );
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case KEY_TAB | KEY_MOD1:
|
||||
|
Reference in New Issue
Block a user