summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorMarc-André Laverdière-Papineau <marc-andre@atc.tcs.com>2012-02-27 04:56:32 -0500
committerMarc-André Laverdière-Papineau <marc-andre@atc.tcs.com>2012-02-27 19:03:44 -0500
commitbe76f5d701c9e229e31fb77b606358e7488020d0 (patch)
tree83d73c811be3ff6740549258fb7937112535178d /svtools
parente4dd27555a827746d50e7bdf2bb9da0e534656d2 (diff)
Removed dead code
* Removed unused SvInplaceEdit
Diffstat (limited to 'svtools')
-rw-r--r--svtools/inc/svtools/svlbox.hxx28
-rw-r--r--svtools/inc/svtools/svtreebx.hxx1
-rw-r--r--svtools/source/contnr/svlbox.cxx139
3 files changed, 0 insertions, 168 deletions
diff --git a/svtools/inc/svtools/svlbox.hxx b/svtools/inc/svtools/svlbox.hxx
index 9fde1c6d395f..b4f33c172386 100644
--- a/svtools/inc/svtools/svlbox.hxx
+++ b/svtools/inc/svtools/svlbox.hxx
@@ -54,7 +54,6 @@ class SvLBox;
class SvLBoxEntry;
class SvViewDataItem;
class SvViewDataEntry;
-class SvInplaceEdit;
class SvInplaceEdit2;
class SvLBoxString;
class SvLBoxButton;
@@ -581,33 +580,6 @@ struct SvLBoxDDInfo
sal_uLong nRes1,nRes2,nRes3,nRes4;
};
-class SvInplaceEdit : public Edit
-{
- Link aCallBackHdl;
- Accelerator aAccReturn;
- Accelerator aAccEscape;
- Timer aTimer;
- sal_Bool bCanceled;
- sal_Bool bAlreadyInCallBack;
-
- void CallCallBackHdl_Impl();
- DECL_LINK( Timeout_Impl, Timer * );
- DECL_LINK( ReturnHdl_Impl, Accelerator * );
- DECL_LINK( EscapeHdl_Impl, Accelerator * );
-
-public:
- SvInplaceEdit( Window* pParent, const Point& rPos, const Size& rSize,
- const String& rData, const Link& rNotifyEditEnd,
- const Selection& );
- ~SvInplaceEdit();
-
- virtual void KeyInput( const KeyEvent& rKEvt );
- virtual void LoseFocus();
- sal_Bool EditingCanceled() const { return bCanceled; }
- String GetText() const { return Edit::GetText(); }
- void StopEditing( sal_Bool bCancel = sal_False );
-};
-
class SvInplaceEdit2
{
Link aCallBackHdl;
diff --git a/svtools/inc/svtools/svtreebx.hxx b/svtools/inc/svtools/svtreebx.hxx
index eab00e7c4368..0b45b0556305 100644
--- a/svtools/inc/svtools/svtreebx.hxx
+++ b/svtools/inc/svtools/svtreebx.hxx
@@ -36,7 +36,6 @@
// forward and defines ---------------------------------------------------
class SvImpLBox;
-class SvInplaceEdit;
class TabBar;
#define SV_TAB_BORDER 8
diff --git a/svtools/source/contnr/svlbox.cxx b/svtools/source/contnr/svlbox.cxx
index 0809368e0aab..1ecfcf0f61cc 100644
--- a/svtools/source/contnr/svlbox.cxx
+++ b/svtools/source/contnr/svlbox.cxx
@@ -54,150 +54,11 @@ using namespace ::com::sun::star::accessibility;
static SvLBox* pDDSource = NULL;
static SvLBox* pDDTarget = NULL;
-DBG_NAME(SvInplaceEdit)
DBG_NAME(SvInplaceEdit2)
#define SVLBOX_ACC_RETURN 1
#define SVLBOX_ACC_ESCAPE 2
-SvInplaceEdit::SvInplaceEdit
-(
- Window* pParent,
- const Point& rPos,
- const Size& rSize,
- const String& rData,
- const Link& rNotifyEditEnd,
- const Selection& rSelection
-) :
-
- Edit( pParent, WB_LEFT ),
-
- aCallBackHdl ( rNotifyEditEnd ),
- bCanceled ( sal_False ),
- bAlreadyInCallBack ( sal_False )
-
-{
- DBG_CTOR(SvInplaceEdit,0);
-
- Font aFont( pParent->GetFont() );
- aFont.SetTransparent( sal_False );
- Color aColor( pParent->GetBackground().GetColor() );
- aFont.SetFillColor(aColor );
- SetFont( aFont );
- SetBackground( pParent->GetBackground() );
- SetPosPixel( rPos );
- SetSizePixel( rSize );
- SetText( rData );
- SetSelection( rSelection );
- SaveValue();
-
- aAccReturn.InsertItem( SVLBOX_ACC_RETURN, KeyCode(KEY_RETURN) );
- aAccEscape.InsertItem( SVLBOX_ACC_ESCAPE, KeyCode(KEY_ESCAPE) );
-
- aAccReturn.SetActivateHdl( LINK( this, SvInplaceEdit, ReturnHdl_Impl) );
- aAccEscape.SetActivateHdl( LINK( this, SvInplaceEdit, EscapeHdl_Impl) );
- GetpApp()->InsertAccel( &aAccReturn );
- GetpApp()->InsertAccel( &aAccEscape );
-
- Show();
- GrabFocus();
-}
-
-SvInplaceEdit::~SvInplaceEdit()
-{
- DBG_DTOR(SvInplaceEdit,0);
- if( !bAlreadyInCallBack )
- {
- GetpApp()->RemoveAccel( &aAccReturn );
- GetpApp()->RemoveAccel( &aAccEscape );
- }
-}
-
-IMPL_LINK_INLINE_START( SvInplaceEdit, ReturnHdl_Impl, Accelerator *, EMPTYARG )
-{
- DBG_CHKTHIS(SvInplaceEdit,0);
- bCanceled = sal_False;
- CallCallBackHdl_Impl();
- return 1;
-}
-IMPL_LINK_INLINE_END( SvInplaceEdit, ReturnHdl_Impl, Accelerator *, EMPTYARG )
-
-IMPL_LINK_INLINE_START( SvInplaceEdit, EscapeHdl_Impl, Accelerator *, EMPTYARG )
-{
- DBG_CHKTHIS(SvInplaceEdit,0);
- bCanceled = sal_True;
- CallCallBackHdl_Impl();
- return 1;
-}
-IMPL_LINK_INLINE_END( SvInplaceEdit, EscapeHdl_Impl, Accelerator *, EMPTYARG )
-
-void SvInplaceEdit::KeyInput( const KeyEvent& rKEvt )
-{
- DBG_CHKTHIS(SvInplaceEdit,0);
- sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
- switch ( nCode )
- {
- case KEY_ESCAPE:
- bCanceled = sal_True;
- CallCallBackHdl_Impl();
- break;
-
- case KEY_RETURN:
- bCanceled = sal_False;
- CallCallBackHdl_Impl();
- break;
-
- default:
- Edit::KeyInput( rKEvt );
- }
-}
-
-void SvInplaceEdit::StopEditing( sal_Bool bCancel )
-{
- DBG_CHKTHIS(SvInplaceEdit,0);
- if ( !bAlreadyInCallBack )
- {
- bCanceled = bCancel;
- CallCallBackHdl_Impl();
- }
-}
-
-void SvInplaceEdit::LoseFocus()
-{
- DBG_CHKTHIS(SvInplaceEdit,0);
- if ( !bAlreadyInCallBack )
- {
- bCanceled = sal_False;
- aTimer.SetTimeout(10);
- aTimer.SetTimeoutHdl(LINK(this,SvInplaceEdit,Timeout_Impl));
- aTimer.Start();
- }
-}
-
-IMPL_LINK_INLINE_START( SvInplaceEdit, Timeout_Impl, Timer *, EMPTYARG )
-{
- DBG_CHKTHIS(SvInplaceEdit,0);
- CallCallBackHdl_Impl();
- return 0;
-}
-IMPL_LINK_INLINE_END( SvInplaceEdit, Timeout_Impl, Timer *, EMPTYARG )
-
-void SvInplaceEdit::CallCallBackHdl_Impl()
-{
- DBG_CHKTHIS(SvInplaceEdit,0);
- aTimer.Stop();
- if ( !bAlreadyInCallBack )
- {
- bAlreadyInCallBack = sal_True;
- GetpApp()->RemoveAccel( &aAccReturn );
- GetpApp()->RemoveAccel( &aAccEscape );
- Hide();
- aCallBackHdl.Call( this );
- // bAlreadyInCallBack = sal_False;
- }
-}
-
-
// ***************************************************************
class MyEdit_Impl : public Edit