summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2012-10-02 22:36:28 +0900
committerMichael Stahl <mstahl@redhat.com>2012-10-02 20:44:49 +0000
commitc2eb9698eff7412e6973e659f26e7e39eeaf2887 (patch)
tree01ab878915b874ae530b01ab0da0ad04818665e8
parent02a7bf55603d8b1e74b83bb2b02fa86e1e31807b (diff)
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>
-rw-r--r--sw/inc/crsrsh.hxx6
-rw-r--r--sw/inc/viscrs.hxx14
-rw-r--r--sw/source/core/crsr/viscrs.cxx64
-rw-r--r--sw/source/core/layout/layact.cxx3
-rw-r--r--sw/source/ui/docvw/edtwin.cxx13
5 files changed, 0 insertions, 100 deletions
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 4c7e48c008fa..e8678e99d783 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -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 );
diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx
index 5b0b925c3d17..f8b274bfaa83 100644
--- a/sw/inc/viscrs.hxx
+++ b/sw/inc/viscrs.hxx
@@ -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
};
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 09eebb7d37f0..88d840480b0c 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -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;
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index d5422388625e..26de885b3650 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -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 );
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index f9ae3ce43bbd..711c63c4a3d1 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -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: