[Libreoffice-commits] .: 2 commits - svtools/inc svtools/source tools/inc tools/source unusedcode.easy
Marc-André Laverdière
malaverdiere at kemper.freedesktop.org
Mon Feb 27 17:49:12 PST 2012
svtools/inc/svtools/svlbox.hxx | 28 -------
svtools/inc/svtools/svtreebx.hxx | 1
svtools/source/contnr/svlbox.cxx | 139 ---------------------------------------
tools/inc/tools/stream.hxx | 1
tools/source/stream/strmunx.cxx | 11 ---
unusedcode.easy | 3
6 files changed, 183 deletions(-)
New commits:
commit be76f5d701c9e229e31fb77b606358e7488020d0
Author: Marc-André Laverdière-Papineau <marc-andre at atc.tcs.com>
Date: Mon Feb 27 04:56:32 2012 -0500
Removed dead code
* Removed unused SvInplaceEdit
diff --git a/svtools/inc/svtools/svlbox.hxx b/svtools/inc/svtools/svlbox.hxx
index 9fde1c6..b4f33c1 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 eab00e7..0b45b05 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 0809368..1ecfcf0 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
diff --git a/unusedcode.easy b/unusedcode.easy
index 329509a..e6668ad 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -181,8 +181,6 @@ SvI18NMap_Impl::Insert(SvI18NMapEntry_Impl* const*, unsigned short)
SvI18NMap_Impl::Insert(SvI18NMap_Impl const*, unsigned short, unsigned short)
SvI18NMap_Impl::Remove(SvI18NMapEntry_Impl* const&, unsigned short)
SvI18NMap_Impl::Remove(unsigned short, unsigned short)
-SvInplaceEdit::StopEditing(unsigned char)
-SvInplaceEdit::SvInplaceEdit(Window*, Point const&, Size const&, String const&, Link const&, Selection const&)
SvLBoxBmp::SvLBoxBmp(SvLBoxEntry*, unsigned short, Image)
SvLBoxButton::Check(SvLBox*, SvLBoxEntry*, unsigned char)
SvLBoxButtonData::SvLBoxButtonData()
commit e4dd27555a827746d50e7bdf2bb9da0e534656d2
Author: Marc-André Laverdière-Papineau <marc-andre at atc.tcs.com>
Date: Mon Feb 27 04:30:12 2012 -0500
Removed dead code
Deleted: SvFileStream::UnlockFile()
diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx
index c598efd..0f2456b 100644
--- a/tools/inc/tools/stream.hxx
+++ b/tools/inc/tools/stream.hxx
@@ -641,7 +641,6 @@ private:
sal_Bool LockRange( sal_Size nByteOffset, sal_Size nBytes );
sal_Bool UnlockRange( sal_Size nByteOffset, sal_Size nBytes );
sal_Bool LockFile();
- sal_Bool UnlockFile();
protected:
diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx
index 425a68f..9eb6b38 100644
--- a/tools/source/stream/strmunx.cxx
+++ b/tools/source/stream/strmunx.cxx
@@ -658,17 +658,6 @@ sal_Bool SvFileStream::LockFile()
/*************************************************************************
|*
-|* SvFileStream::UnlockFile()
-|*
-*************************************************************************/
-
-sal_Bool SvFileStream::UnlockFile()
-{
- return UnlockRange( 0UL, 0UL );
-}
-
-/*************************************************************************
-|*
|* SvFileStream::Open()
|*
*************************************************************************/
diff --git a/unusedcode.easy b/unusedcode.easy
index b5090c1..329509a 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -176,7 +176,6 @@ StgCache::Pos2Page(int)
StgHeader::SetClassId(ClsId const&)
StorageStream::ValidateMode(unsigned short, StgDirEntry*) const
SvBorder::SvBorder(Rectangle const&, Rectangle const&)
-SvFileStream::UnlockFile()
SvI18NMap_Impl::Insert(SvI18NMapEntry_Impl* const&, unsigned short&)
SvI18NMap_Impl::Insert(SvI18NMapEntry_Impl* const*, unsigned short)
SvI18NMap_Impl::Insert(SvI18NMap_Impl const*, unsigned short, unsigned short)
More information about the Libreoffice-commits
mailing list