[Libreoffice-commits] .: 6 commits - svtools/inc svtools/source tools/inc tools/source vcl/inc vcl/source
Thomas Arnhold
tarnhold at kemper.freedesktop.org
Wed Jul 20 07:38:47 PDT 2011
svtools/inc/svtools/brwbox.hxx | 21 ---
svtools/source/brwbox/brwbox1.cxx | 188 ---------------------------
svtools/source/brwbox/brwbox2.cxx | 7 -
tools/inc/tools/bigint.hxx | 1
tools/source/generic/bigint.cxx | 69 ---------
vcl/inc/vcl/accel.hxx | 15 --
vcl/inc/vcl/animate.hxx | 3
vcl/inc/vcl/svapp.hxx | 13 -
vcl/source/app/svapp.cxx | 131 ------------------
vcl/source/gdi/animate.cxx | 44 ------
vcl/source/window/accel.cxx | 263 --------------------------------------
11 files changed, 5 insertions(+), 750 deletions(-)
New commits:
commit 0a1b95816ed9e867e1727d879b0d71466ad985c1
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Wed Jul 20 11:11:47 2011 +0200
callcatcher: bring Application::PostUserEvent back
diff --git a/vcl/inc/vcl/svapp.hxx b/vcl/inc/vcl/svapp.hxx
index e09f290..c7ef0e7 100644
--- a/vcl/inc/vcl/svapp.hxx
+++ b/vcl/inc/vcl/svapp.hxx
@@ -296,6 +296,7 @@ public:
static void RemoveMouseAndKeyEvents( Window *pWin );
static sal_Bool IsProcessedMouseOrKeyEvent( sal_uLong nEventId );
+ static sal_uLong PostUserEvent( sal_uLong nEvent, void* pEventData = NULL );
static sal_uLong PostUserEvent( const Link& rLink, void* pCaller = NULL );
static sal_Bool PostUserEvent( sal_uLong& rEventId, sal_uLong nEvent, void* pEventData = NULL );
static sal_Bool PostUserEvent( sal_uLong& rEventId, const Link& rLink, void* pCaller = NULL );
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 0ced936..5b9e31e 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -1023,6 +1023,15 @@ sal_Bool Application::IsProcessedMouseOrKeyEvent( sal_uLong nEventId )
// -----------------------------------------------------------------------
+sal_uLong Application::PostUserEvent( sal_uLong nEvent, void* pEventData )
+{
+ sal_uLong nEventId;
+ PostUserEvent( nEventId, nEvent, pEventData );
+ return nEventId;
+}
+
+// -----------------------------------------------------------------------
+
sal_uLong Application::PostUserEvent( const Link& rLink, void* pCaller )
{
sal_uLong nEventId;
commit c7514f2870da0f64c416f78d8ae1aae055d23b19
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Tue Jul 19 17:23:58 2011 +0200
callcatcher: cleanup Accelerator
diff --git a/vcl/inc/vcl/accel.hxx b/vcl/inc/vcl/accel.hxx
index 2c1f4dd..e6f188f 100644
--- a/vcl/inc/vcl/accel.hxx
+++ b/vcl/inc/vcl/accel.hxx
@@ -83,9 +83,6 @@ public:
void InsertItem( sal_uInt16 nItemId, const KeyCode& rKeyCode );
void InsertItem( const ResId& rResId );
- void RemoveItem( sal_uInt16 nItemId );
- void RemoveItem( const KeyCode rKeyCode );
- void Clear();
sal_uInt16 GetCurItemId() const { return mnCurId; }
const KeyCode& GetCurKeyCode() const { return maCurKeyCode; }
@@ -94,21 +91,9 @@ public:
sal_uInt16 GetItemCount() const;
sal_uInt16 GetItemId( sal_uInt16 nPos ) const;
- KeyCode GetItemKeyCode( sal_uInt16 nPos ) const;
- sal_uInt16 GetItemId( const KeyCode& rKeyCode ) const;
KeyCode GetKeyCode( sal_uInt16 nItemId ) const;
- sal_Bool IsIdValid( sal_uInt16 nItemId ) const;
- sal_Bool Call( const KeyCode& rKeyCode, sal_uInt16 nRepeat = 0 );
- void SetAccel( sal_uInt16 nItemId, Accelerator* pAccel );
Accelerator* GetAccel( sal_uInt16 nItemId ) const;
- void SetAccel( const KeyCode rKeyCode, Accelerator* pAccel );
- Accelerator* GetAccel( const KeyCode rKeyCode ) const;
-
- void EnableItem( sal_uInt16 nItemId, sal_Bool bEnable = sal_True );
- sal_Bool IsItemEnabled( sal_uInt16 nItemId ) const;
- void EnableItem( const KeyCode rKeyCode, sal_Bool bEnable = sal_True );
- sal_Bool IsItemEnabled( const KeyCode rKeyCode ) const;
void SetHelpText( const XubString& rHelpText ) { maHelpStr = rHelpText; }
const XubString& GetHelpText() const { return maHelpStr; }
diff --git a/vcl/source/window/accel.cxx b/vcl/source/window/accel.cxx
index 4711fce..f791f66 100644
--- a/vcl/source/window/accel.cxx
+++ b/vcl/source/window/accel.cxx
@@ -410,85 +410,6 @@ void Accelerator::InsertItem( const ResId& rResId )
// -----------------------------------------------------------------------
-void Accelerator::RemoveItem( sal_uInt16 nItemId )
-{
- DBG_CHKTHIS( Accelerator, NULL );
-
- // Aus der Id-Liste entfernen
- sal_uInt16 nIndex = ImplAccelEntryGetFirstPos( &(mpData->maIdList), nItemId );
- if ( nIndex != ACCELENTRY_NOTFOUND )
- {
- sal_uInt16 nItemCount = GetItemCount();
- do
- {
- ImplAccelEntry* pEntry = ( nIndex < mpData->maIdList.size() ) ? mpData->maIdList[ nIndex ] : NULL;
- if ( pEntry && pEntry->mnId == nItemId )
- {
- mpData->maKeyTable.Remove( pEntry->maKeyCode.GetFullKeyCode() );
-
- ImplAccelList::iterator it = mpData->maIdList.begin();
- ::std::advance( it, nIndex );
- mpData->maIdList.erase( it );
-
- // AutoResAccel zerstoeren
- if ( pEntry->mpAutoAccel )
- delete pEntry->mpAutoAccel;
-
- delete pEntry;
- }
- else
- break;
- }
- while ( nIndex < nItemCount );
- }
-}
-
-// -----------------------------------------------------------------------
-
-void Accelerator::RemoveItem( const KeyCode rKeyCode )
-{
- DBG_CHKTHIS( Accelerator, NULL );
-
- ImplAccelEntry* pEntry = ImplGetAccelData( rKeyCode );
- if ( pEntry )
- {
- // Aus der Id-Liste entfernen
- sal_uInt16 nIndex = ImplAccelEntryGetFirstPos( &(mpData->maIdList), pEntry->mnId );
- sal_uInt16 nItemCount = GetItemCount();
- do
- {
- if ( mpData->maIdList[ nIndex ] == pEntry )
- break;
- nIndex++;
- }
- while ( nIndex < nItemCount );
-
- mpData->maKeyTable.Remove( rKeyCode.GetFullKeyCode() );
-
- ImplAccelList::iterator it = mpData->maIdList.begin();
- ::std::advance( it, nIndex );
- mpData->maIdList.erase( it );
-
- // AutoResAccel zerstoeren
- if ( pEntry->mpAutoAccel )
- delete pEntry->mpAutoAccel;
-
- delete pEntry;
- }
-}
-
-// -----------------------------------------------------------------------
-
-void Accelerator::Clear()
-{
- DBG_CHKTHIS( Accelerator, NULL );
-
- ImplDeleteData();
- mpData->maKeyTable.Clear();
-}
-
-// -----------------------------------------------------------------------
-
sal_uInt16 Accelerator::GetItemCount() const
{
DBG_CHKTHIS( Accelerator, NULL );
@@ -498,45 +419,6 @@ sal_uInt16 Accelerator::GetItemCount() const
// -----------------------------------------------------------------------
-sal_uInt16 Accelerator::GetItemId( sal_uInt16 nPos ) const
-{
- DBG_CHKTHIS( Accelerator, NULL );
-
- ImplAccelEntry* pEntry = ( nPos < mpData->maIdList.size() ) ? mpData->maIdList[ nPos ] : NULL;
- if ( pEntry )
- return pEntry->mnId;
- else
- return 0;
-}
-
-// -----------------------------------------------------------------------
-
-KeyCode Accelerator::GetItemKeyCode( sal_uInt16 nPos ) const
-{
- DBG_CHKTHIS( Accelerator, NULL );
-
- ImplAccelEntry* pEntry = ( nPos < mpData->maIdList.size() ) ? mpData->maIdList[ nPos ] : NULL;
- if ( pEntry )
- return pEntry->maKeyCode;
- else
- return KeyCode();
-}
-
-// -----------------------------------------------------------------------
-
-sal_uInt16 Accelerator::GetItemId( const KeyCode& rKeyCode ) const
-{
- DBG_CHKTHIS( Accelerator, NULL );
-
- ImplAccelEntry* pEntry = ImplGetAccelData( rKeyCode );
- if ( pEntry )
- return pEntry->mnId;
- else
- return 0;
-}
-
-// -----------------------------------------------------------------------
-
KeyCode Accelerator::GetKeyCode( sal_uInt16 nItemId ) const
{
DBG_CHKTHIS( Accelerator, NULL );
@@ -550,66 +432,15 @@ KeyCode Accelerator::GetKeyCode( sal_uInt16 nItemId ) const
// -----------------------------------------------------------------------
-sal_Bool Accelerator::IsIdValid( sal_uInt16 nItemId ) const
-{
- DBG_CHKTHIS( Accelerator, NULL );
-
- sal_uInt16 nIndex = ImplAccelEntryGetIndex( &(mpData->maIdList), nItemId );
- return (nIndex != ACCELENTRY_NOTFOUND);
-}
-
-// -----------------------------------------------------------------------
-
-sal_Bool Accelerator::Call( const KeyCode& rKeyCode, sal_uInt16 nRepeat )
+sal_uInt16 Accelerator::GetItemId( sal_uInt16 nPos ) const
{
DBG_CHKTHIS( Accelerator, NULL );
- ImplAccelEntry* pEntry = ImplGetAccelData( rKeyCode );
+ ImplAccelEntry* pEntry = ( nPos < mpData->maIdList.size() ) ? mpData->maIdList[ nPos ] : NULL;
if ( pEntry )
- {
- if ( pEntry->mbEnabled )
- {
- sal_Bool bDel = sal_False;
- mnCurId = pEntry->mnId;
- maCurKeyCode = rKeyCode;
- mnCurRepeat = nRepeat;
- mpDel = &bDel;
- Select();
- if ( !bDel )
- {
- mnCurId = 0;
- maCurKeyCode = KeyCode();
- mnCurRepeat = 0;
- }
-
- return sal_True;
- }
- }
-
- return sal_False;
-}
-
-// -----------------------------------------------------------------------
-
-void Accelerator::SetAccel( sal_uInt16 nItemId, Accelerator* pAccel )
-{
- DBG_CHKTHIS( Accelerator, NULL );
-
- sal_uInt16 nIndex = ImplAccelEntryGetFirstPos( &(mpData->maIdList), nItemId );
- if ( nIndex != ACCELENTRY_NOTFOUND )
- {
- sal_uInt16 nItemCount = GetItemCount();
- do
- {
- ImplAccelEntry* pEntry = mpData->maIdList[ nIndex ];
- if ( pEntry->mnId != nItemId )
- break;
-
- pEntry->mpAccel = pAccel;
- nIndex++;
- }
- while ( nIndex < nItemCount );
- }
+ return pEntry->mnId;
+ else
+ return 0;
}
// -----------------------------------------------------------------------
@@ -627,90 +458,6 @@ Accelerator* Accelerator::GetAccel( sal_uInt16 nItemId ) const
// -----------------------------------------------------------------------
-void Accelerator::SetAccel( const KeyCode rKeyCode, Accelerator* pAccel )
-{
- DBG_CHKTHIS( Accelerator, NULL );
-
- ImplAccelEntry* pEntry = ImplGetAccelData( rKeyCode );
- if ( pEntry )
- pEntry->mpAccel = pAccel;
-}
-
-// -----------------------------------------------------------------------
-
-Accelerator* Accelerator::GetAccel( const KeyCode rKeyCode ) const
-{
- DBG_CHKTHIS( Accelerator, NULL );
-
- ImplAccelEntry* pEntry = ImplGetAccelData( rKeyCode );
- if ( pEntry )
- return pEntry->mpAccel;
- else
- return sal_False;
-}
-
-// -----------------------------------------------------------------------
-
-void Accelerator::EnableItem( sal_uInt16 nItemId, sal_Bool bEnable )
-{
- DBG_CHKTHIS( Accelerator, NULL );
-
- sal_uInt16 nIndex = ImplAccelEntryGetFirstPos( &(mpData->maIdList), nItemId );
- if ( nIndex != ACCELENTRY_NOTFOUND )
- {
- sal_uInt16 nItemCount = GetItemCount();
- do
- {
- ImplAccelEntry* pEntry = mpData->maIdList[ nIndex ];
- if ( pEntry->mnId != nItemId )
- break;
-
- pEntry->mbEnabled = bEnable;
- nIndex++;
- }
- while ( nIndex < nItemCount );
- }
-}
-
-// -----------------------------------------------------------------------
-
-sal_Bool Accelerator::IsItemEnabled( sal_uInt16 nItemId ) const
-{
- DBG_CHKTHIS( Accelerator, NULL );
-
- sal_uInt16 nIndex = ImplAccelEntryGetIndex( &(mpData->maIdList), nItemId );
- if ( nIndex != ACCELENTRY_NOTFOUND )
- return mpData->maIdList[ nIndex ]->mbEnabled;
- else
- return sal_False;
-}
-
-// -----------------------------------------------------------------------
-
-void Accelerator::EnableItem( const KeyCode rKeyCode, sal_Bool bEnable )
-{
- DBG_CHKTHIS( Accelerator, NULL );
-
- ImplAccelEntry* pEntry = ImplGetAccelData( rKeyCode );
- if ( pEntry )
- pEntry->mbEnabled = bEnable;
-}
-
-// -----------------------------------------------------------------------
-
-sal_Bool Accelerator::IsItemEnabled( const KeyCode rKeyCode ) const
-{
- DBG_CHKTHIS( Accelerator, NULL );
-
- ImplAccelEntry* pEntry = ImplGetAccelData( rKeyCode );
- if ( pEntry )
- return pEntry->mbEnabled;
- else
- return sal_False;
-}
-
-// -----------------------------------------------------------------------
-
Accelerator& Accelerator::operator=( const Accelerator& rAccel )
{
DBG_CHKTHIS( Accelerator, NULL );
commit e411ca3ed6cdc815cbfeda71cf4c16685f8f31a8
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Tue Jul 19 15:26:15 2011 +0200
callcatcher: remove unused BigInt::DivMod
diff --git a/tools/inc/tools/bigint.hxx b/tools/inc/tools/bigint.hxx
index f1da828..95bbae7 100644
--- a/tools/inc/tools/bigint.hxx
+++ b/tools/inc/tools/bigint.hxx
@@ -105,7 +105,6 @@ public:
sal_Bool IsOne() const;
sal_Bool IsLong() const { return !bIsBig; }
void Abs();
- void DivMod( const BigInt &rDivisor, BigInt &rMod );
#ifdef _TLBIGINT_INT64
sal_Bool INT64 ( SbxINT64 *p ) const;
sal_Bool UINT64( SbxUINT64 *p ) const;
diff --git a/tools/source/generic/bigint.cxx b/tools/source/generic/bigint.cxx
index cb052c3..310d33a 100644
--- a/tools/source/generic/bigint.cxx
+++ b/tools/source/generic/bigint.cxx
@@ -855,75 +855,6 @@ BigInt& BigInt::operator/=( const BigInt& rVal )
// -----------------------------------------------------------------------
-void BigInt::DivMod( const BigInt& rVal, BigInt& rMod )
-{
- if ( !rVal.bIsBig )
- {
- if ( rVal.nVal == 0 )
- {
- OSL_FAIL( "BigInt::operator/ --> divide by zero" );
- return;
- }
-
- if ( !bIsBig )
- {
- // wir bewegen uns im ungefaehrlichem Bereich
- rMod = BigInt( nVal % rVal.nVal );
- nVal /= rVal.nVal;
- return;
- }
-
- if ( rVal.nVal == 1 )
- {
- rMod = BigInt( (long)0 );
- return;
- }
-
- if ( rVal.nVal == -1 )
- {
- rMod = BigInt( (long)0 );
- bIsNeg = !bIsNeg;
- return;
- }
-
- if ( rVal.nVal <= (long)0xFFFF && rVal.nVal >= -(long)0xFFFF )
- {
- // ein BigInt durch ein sal_uInt16 teilen
- sal_uInt16 nTmp;
- if ( rVal.nVal < 0 )
- {
- nTmp = (sal_uInt16) -rVal.nVal;
- bIsNeg = !bIsNeg;
- }
- else
- nTmp = (sal_uInt16) rVal.nVal;
-
- Div( nTmp, nTmp );
- rMod = BigInt( (long)nTmp );
- Normalize();
- return;
- }
- }
-
- if ( ABS_IsLess( rVal ) )
- {
- rMod = *this;
- *this = BigInt( (long)0 );
- return;
- }
-
- // BigInt durch BigInt teilen
- BigInt aTmp1, aTmp2;
- aTmp1.MakeBigInt( *this );
- aTmp2.MakeBigInt( rVal );
- aTmp1.DivLong(aTmp2, *this);
- Normalize();
- aTmp1.ModLong(aTmp2, rMod); // nicht optimal
- rMod.Normalize();
-}
-
-// -----------------------------------------------------------------------
-
BigInt& BigInt::operator%=( const BigInt& rVal )
{
if ( !rVal.bIsBig )
commit 2e3dd76eb96318237db9ce1db007d7205b153a8b
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Tue Jul 19 15:24:13 2011 +0200
callcatcher: cleanup BrowseBox
diff --git a/svtools/inc/svtools/brwbox.hxx b/svtools/inc/svtools/brwbox.hxx
index a76fa2a..56f1512 100644
--- a/svtools/inc/svtools/brwbox.hxx
+++ b/svtools/inc/svtools/brwbox.hxx
@@ -409,9 +409,6 @@ protected:
long CalcReverseZoom(long nVal);
- HeaderBar* GetHeaderBar() const;
- // header bar access for derived classes
-
inline const DataFlavorExVector&
GetDataFlavors() const;
@@ -493,20 +490,10 @@ public:
// inserting, changing, removing and freezing of columns
void InsertHandleColumn( sal_uLong nWidth );
- void InsertDataColumn( sal_uInt16 nItemId, const Image& rImage,
- long nSize, HeaderBarItemBits nBits = HIB_STDSTYLE,
- sal_uInt16 nPos = HEADERBAR_APPEND );
void InsertDataColumn( sal_uInt16 nItemId, const XubString& rText,
long nSize, HeaderBarItemBits nBits = HIB_STDSTYLE,
sal_uInt16 nPos = HEADERBAR_APPEND );
- void InsertDataColumn( sal_uInt16 nItemId,
- const Image& rImage, const XubString& rText,
- long nSize, HeaderBarItemBits nBits = HIB_STDSTYLE,
- sal_uInt16 nPos = HEADERBAR_APPEND,
- // Hilfstext bei leerem rText
- const String* pHelpText = 0 );
void SetColumnTitle( sal_uInt16 nColumnId, const String &rTitle );
- void SetColumnMode( sal_uInt16 nColumnId, BrowserColumnMode nFlags );
void SetColumnWidth( sal_uInt16 nColumnId, sal_uLong nWidth );
void SetColumnPos( sal_uInt16 nColumnId, sal_uInt16 nPos );
void FreezeColumn( sal_uInt16 nColumnId, sal_Bool bFreeze = sal_True );
@@ -534,14 +521,12 @@ public:
void ResetScroll();
long ScrollColumns( long nColumns );
long ScrollRows( long nRows );
- long ScrollPages( long nPagesY );
sal_Bool MakeFieldVisible( long nRow, sal_uInt16 nColId, sal_Bool bComplete = sal_False );
// access and movement of cursor
long GetCurRow() const { return nCurRow; }
sal_uInt16 GetCurColumnId() const { return nCurColId; }
sal_Bool GoToRow( long nRow );
- sal_Bool GoToRowAndDoNotModifySelection( long nRow );
sal_Bool GoToColumnId( sal_uInt16 nColId );
sal_Bool GoToRowColumnId( long nRow, sal_uInt16 nColId );
@@ -557,23 +542,18 @@ public:
sal_uInt16 GetSelectColumnCount() const;
virtual bool IsRowSelected( long nRow ) const;
bool IsColumnSelected( sal_uInt16 nColumnId ) const;
- sal_Bool IsAllSelected() const;
long FirstSelectedRow( sal_Bool bInverse = sal_False );
long LastSelectedRow();
- long PrevSelectedRow();
long NextSelectedRow();
const MultiSelection* GetColumnSelection() const { return pColSel; }
const MultiSelection* GetSelection() const
{ return bMultiSelection ? uRow.pSel : 0; }
- void SetSelection( const MultiSelection &rSelection );
long FirstSelectedColumn( ) const;
- long NextSelectedColumn( ) const;
sal_Bool IsResizing() const { return bResizing; }
// access to positions of fields, column and rows
- Window& GetEventWindow() const;
Window& GetDataWindow() const { return *pDataWin; }
Rectangle GetRowRectPixel( long nRow,
sal_Bool bRelToBrowser = sal_True ) const;
@@ -599,7 +579,6 @@ public:
void Dispatch( sal_uInt16 nId );
void SetMode( BrowserMode nMode = 0 );
BrowserMode GetMode( ) const { return m_nCurrentMode; }
- bool IsInCommandEvent() const;
void SetCursorColor(const Color& _rCol);
Color GetCursorColor() const { return m_aCursorColor; }
diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx
index 8b8c155..9869660 100644
--- a/svtools/source/brwbox/brwbox1.cxx
+++ b/svtools/source/brwbox/brwbox1.cxx
@@ -266,36 +266,6 @@ void BrowseBox::InsertHandleColumn( sal_uLong nWidth )
}
//-------------------------------------------------------------------
-void BrowseBox::InsertDataColumn( sal_uInt16 nItemId, const Image& rImage,
- long nWidth, HeaderBarItemBits nBits, sal_uInt16 nPos )
-{
- DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
-
- if ( nPos < pCols->size() )
- {
- BrowserColumns::iterator it = pCols->begin();
- ::std::advance( it, nPos );
- pCols->insert( it, new BrowserColumn( nItemId, rImage, String(), nWidth, GetZoom(), nBits ) );
- }
- else
- {
- pCols->push_back( new BrowserColumn( nItemId, rImage, String(), nWidth, GetZoom(), nBits ) );
- }
- if ( nCurColId == 0 )
- nCurColId = nItemId;
- if ( getDataWindow()->pHeaderBar )
- {
- // Handlecolumn nicht in der Headerbar
- sal_uInt16 nHeaderPos = nPos;
- if (nHeaderPos != HEADERBAR_APPEND && !GetColumnId(0))
- nHeaderPos--;
- getDataWindow()->pHeaderBar->InsertItem(
- nItemId, rImage, nWidth, nBits, nHeaderPos );
- }
- ColumnInserted( nPos );
-}
-
-//-------------------------------------------------------------------
void BrowseBox::InsertDataColumn( sal_uInt16 nItemId, const XubString& rText,
long nWidth, HeaderBarItemBits nBits, sal_uInt16 nPos )
@@ -328,45 +298,6 @@ void BrowseBox::InsertDataColumn( sal_uInt16 nItemId, const XubString& rText,
}
//-------------------------------------------------------------------
-
-void BrowseBox::InsertDataColumn( sal_uInt16 nItemId,
- const Image& rImage, const XubString& rText,
- long nWidth, HeaderBarItemBits nBits, sal_uInt16 nPos,
- const String* pHelpText )
-{
- DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
-
- if ( nPos < pCols->size() )
- {
- BrowserColumns::iterator it = pCols->begin();
- ::std::advance( it, nPos );
- pCols->insert( it, new BrowserColumn( nItemId, rImage, rText, nWidth, GetZoom(), nBits ) );
- }
- else
- {
- pCols->push_back( new BrowserColumn( nItemId, rImage, rText, nWidth, GetZoom(), nBits ) );
- }
-
- if ( nCurColId == 0 )
- nCurColId = nItemId;
- if ( getDataWindow()->pHeaderBar )
- {
- // Handlecolumn nicht in der Headerbar
- sal_uInt16 nHeaderPos = nPos;
- if (nHeaderPos != HEADERBAR_APPEND && !GetColumnId(0))
- nHeaderPos--;
-
- getDataWindow()->pHeaderBar->InsertItem(
- nItemId, rImage, rText, nWidth, nBits, nHeaderPos );
- if( pHelpText && !rText.Len() )
- {
- getDataWindow()->pHeaderBar->SetHelpText(
- nItemId, *pHelpText );
- }
- }
- ColumnInserted( nPos );
-}
-//-------------------------------------------------------------------
sal_uInt16 BrowseBox::ToggleSelectedColumn()
{
sal_uInt16 nSelectedColId = USHRT_MAX;
@@ -594,35 +525,6 @@ void BrowseBox::SetColumnPos( sal_uInt16 nColumnId, sal_uInt16 nPos )
//-------------------------------------------------------------------
-void BrowseBox::SetColumnMode( sal_uInt16 nColumnId, BrowserColumnMode nFlags )
-{
- DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
-
- // never set mode of the handle-column
- if ( nColumnId == 0 )
- return;
-
- // get the position in the current array
- size_t nColumnPos = GetColumnPos( nColumnId );
- if ( nColumnPos >= pCols->size() )
- // not available!
- return;
-
- // does the state change?
- BrowserColumn *pCol = (*pCols)[ nColumnPos ];
- if ( pCol->Flags() != nFlags )
- {
- pCol->Flags() = sal::static_int_cast< HeaderBarItemBits >(nFlags);
-
- // redraw visible colums
- if ( GetUpdateMode() && ( pCol->IsFrozen() || nColumnPos > nFirstCol ) )
- Invalidate( Rectangle( Point(0,0),
- Size( GetOutputSizePixel().Width(), GetTitleHeight() ) ) );
- }
-}
-
-//-------------------------------------------------------------------
-
void BrowseBox::SetColumnTitle( sal_uInt16 nItemId, const String& rTitle )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -1213,15 +1115,6 @@ long BrowseBox::ScrollRows( long nRows )
//-------------------------------------------------------------------
-long BrowseBox::ScrollPages( long )
-{
- DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
-
- return ScrollRows( pDataWin->GetSizePixel().Height() / GetDataRowHeight() );
-}
-
-//-------------------------------------------------------------------
-
void BrowseBox::RowModified( long nRow, sal_uInt16 nColId )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -1589,12 +1482,6 @@ sal_Bool BrowseBox::GoToRow( long nRow)
//-------------------------------------------------------------------
-sal_Bool BrowseBox::GoToRowAndDoNotModifySelection( long nRow )
-{
- return GoToRow( nRow, sal_False, sal_True );
-}
-
-//-------------------------------------------------------------------
sal_Bool BrowseBox::GoToRow( long nRow, sal_Bool bRowColMove, sal_Bool bKeepSelection )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -1808,43 +1695,6 @@ void BrowseBox::SetNoSelection()
//-------------------------------------------------------------------
-void BrowseBox::SetSelection( const MultiSelection &rSel )
-{
- DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- DBG_ASSERT( bMultiSelection, "SetSelection only allowed with Multi-Selection-Mode" );
-
- // prepare inverted areas
- OSL_TRACE( "BrowseBox: %p->HideCursor", this );
- ToggleSelection();
-
- // assign Selection
- *uRow.pSel = rSel;
-
- // only highlight painted areas
- pDataWin->Update();
-
- // notify derived class
- if ( !bSelecting )
- Select();
- else
- bSelect = sal_True;
-
- // restore screen
- ToggleSelection();
- OSL_TRACE( "BrowseBox: %p->ShowCursor", this );
-
- if ( isAccessibleAlive() )
- {
- commitTableEvent(
- SELECTION_CHANGED,
- Any(),
- Any()
- );
- }
-}
-
-//-------------------------------------------------------------------
-
void BrowseBox::SelectAll()
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -2078,12 +1928,6 @@ long BrowseBox::FirstSelectedColumn( ) const
}
//-------------------------------------------------------------------
-long BrowseBox::NextSelectedColumn( ) const
-{
- return pColSel ? pColSel->NextSelected() : BROWSER_ENDOFSELECTION;
-}
-
-//-------------------------------------------------------------------
long BrowseBox::FirstSelectedRow( sal_Bool bInverse )
{
@@ -2103,15 +1947,6 @@ long BrowseBox::NextSelectedRow()
//-------------------------------------------------------------------
-long BrowseBox::PrevSelectedRow()
-{
- DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
-
- return bMultiSelection ? uRow.pSel->PrevSelected() : BROWSER_ENDOFSELECTION;
-}
-
-//-------------------------------------------------------------------
-
long BrowseBox::LastSelectedRow()
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -2140,15 +1975,6 @@ bool BrowseBox::IsColumnSelected( sal_uInt16 nColumnId ) const
//-------------------------------------------------------------------
-sal_Bool BrowseBox::IsAllSelected() const
-{
- DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
-
- return bMultiSelection && uRow.pSel->IsAllSelected();
-}
-
-//-------------------------------------------------------------------
-
sal_Bool BrowseBox::MakeFieldVisible
(
long nRow, // Zeilen-Nr des Feldes (beginnend mit 0)
@@ -2592,13 +2418,6 @@ long BrowseBox::GetDataRowHeight() const
//-------------------------------------------------------------------
-Window& BrowseBox::GetEventWindow() const
-{
- return *getDataWindow()->pEventWin;
-}
-
-//-------------------------------------------------------------------
-
BrowserHeader* BrowseBox::CreateHeaderBar( BrowseBox* pParent )
{
BrowserHeader* pNewBar = new BrowserHeader( pParent );
@@ -2663,13 +2482,6 @@ long BrowseBox::CalcReverseZoom(long nVal)
return nVal;
}
-//-------------------------------------------------------------------
-HeaderBar* BrowseBox::GetHeaderBar() const
-{
- return getDataWindow()->pHeaderBar;
-}
-//-------------------------------------------------------------------
-
void BrowseBox::CursorMoved()
{
// before implementing more here, please adjust the EditBrowseBox
diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx
index c0e9147..8f6968b 100644
--- a/svtools/source/brwbox/brwbox2.cxx
+++ b/svtools/source/brwbox/brwbox2.cxx
@@ -149,13 +149,6 @@ void BrowseBox::Command( const CommandEvent& rEvt )
//===================================================================
-bool BrowseBox::IsInCommandEvent() const
-{
- return getDataWindow()->bInCommand;
-}
-
-//===================================================================
-
void BrowseBox::StateChanged( StateChangedType nStateChange )
{
Control::StateChanged( nStateChange );
commit 25afaf22a3e4e709bd2a7205167e4a1412e68947
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Tue Jul 19 15:13:16 2011 +0200
callcatcher: cleanup Animation::Foo
diff --git a/vcl/inc/vcl/animate.hxx b/vcl/inc/vcl/animate.hxx
index aaf88c8..956f63f 100644
--- a/vcl/inc/vcl/animate.hxx
+++ b/vcl/inc/vcl/animate.hxx
@@ -192,8 +192,6 @@ public:
sal_Bool operator!=( const Animation& rAnimation ) const
{ return !(*this==rAnimation); }
- sal_Bool IsEqual( const Animation& rAnimation ) const;
-
sal_Bool IsEmpty() const;
void SetEmpty();
@@ -254,7 +252,6 @@ public:
);
sal_Bool Invert();
sal_Bool Mirror( sal_uLong nMirrorFlags );
- sal_Bool Dither( sal_uLong nDitherFlags = BMP_DITHER_MATRIX );
sal_Bool Adjust(
short nLuminancePercent = 0,
short nContrastPercent = 0,
diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx
index c4429d2..890b47a 100644
--- a/vcl/source/gdi/animate.cxx
+++ b/vcl/source/gdi/animate.cxx
@@ -190,27 +190,6 @@ sal_Bool Animation::operator==( const Animation& rAnimation ) const
// ------------------------------------------------------------------
-sal_Bool Animation::IsEqual( const Animation& rAnimation ) const
-{
- const size_t nCount = maList.size();
- sal_Bool bRet = sal_False;
-
- if( rAnimation.maList.size() == nCount
- && rAnimation.maBitmapEx.IsEqual( maBitmapEx )
- && rAnimation.maGlobalSize == maGlobalSize
- && rAnimation.meCycleMode == meCycleMode
- )
- {
- for( size_t n = 0; ( n < nCount ) && !bRet; n++ )
- if( maList[ n ]->IsEqual( *rAnimation.maList[ n ] ) )
- bRet = sal_True;
- }
-
- return bRet;
-}
-
-// ------------------------------------------------------------------
-
sal_Bool Animation::IsEmpty() const
{
return( maBitmapEx.IsEmpty() && maList.empty() );
@@ -763,29 +742,6 @@ sal_Bool Animation::Mirror( sal_uLong nMirrorFlags )
// -----------------------------------------------------------------------
-sal_Bool Animation::Dither( sal_uLong nDitherFlags )
-{
- DBG_ASSERT( !IsInAnimation(), "Animation modified while it is animated" );
-
- sal_Bool bRet;
-
- if( !IsInAnimation() && !maList.empty() )
- {
- bRet = sal_True;
-
- for( size_t i = 0, n = maList.size(); ( i < n ) && bRet; ++i )
- bRet = maList[ i ]->aBmpEx.Dither( nDitherFlags );
-
- maBitmapEx.Dither( nDitherFlags );
- }
- else
- bRet = sal_False;
-
- return bRet;
-}
-
-// -----------------------------------------------------------------------
-
sal_Bool Animation::Adjust( short nLuminancePercent, short nContrastPercent,
short nChannelRPercent, short nChannelGPercent, short nChannelBPercent,
double fGamma, sal_Bool bInvert )
commit f2ccd4078687d3b29c45855440f662e243cf8d05
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Tue Jul 19 15:10:17 2011 +0200
callcatcher: cleanup Application::Foo
diff --git a/vcl/inc/vcl/svapp.hxx b/vcl/inc/vcl/svapp.hxx
index 37ebab7..e09f290 100644
--- a/vcl/inc/vcl/svapp.hxx
+++ b/vcl/inc/vcl/svapp.hxx
@@ -232,8 +232,6 @@ public:
virtual void InitFinished();
virtual void DeInit();
- static void InitAppRes( const ResId& rResId );
-
static sal_uInt16 GetCommandLineParamCount();
static XubString GetCommandLineParam( sal_uInt16 nParam );
static const XubString& GetAppFileName();
@@ -256,7 +254,6 @@ public:
static sal_Bool IsInMain();
static sal_Bool IsInExecute();
- static sal_Bool IsShutDown();
static sal_Bool IsInModalMode();
static sal_uInt16 GetModalModeCount();
@@ -264,7 +261,6 @@ public:
static sal_Bool AnyInput( sal_uInt16 nType = INPUT_ANY );
static sal_uLong GetLastInputInterval();
static sal_Bool IsUICaptured();
- static sal_Bool IsUserActive( sal_uInt16 nTest = USERACTIVE_ALL );
virtual void SystemSettingsChanging( AllSettings& rSettings,
Window* pFrame );
@@ -300,7 +296,6 @@ public:
static void RemoveMouseAndKeyEvents( Window *pWin );
static sal_Bool IsProcessedMouseOrKeyEvent( sal_uLong nEventId );
- static sal_uLong PostUserEvent( sal_uLong nEvent, void* pEventData = NULL );
static sal_uLong PostUserEvent( const Link& rLink, void* pCaller = NULL );
static sal_Bool PostUserEvent( sal_uLong& rEventId, sal_uLong nEvent, void* pEventData = NULL );
static sal_Bool PostUserEvent( sal_uLong& rEventId, const Link& rLink, void* pCaller = NULL );
@@ -357,16 +352,11 @@ public:
static sal_Bool InsertAccel( Accelerator* pAccel );
static void RemoveAccel( Accelerator* pAccel );
- static void FlushAccel();
static sal_Bool CallAccel( const KeyCode& rKeyCode, sal_uInt16 nRepeat = 0 );
- static sal_uLong AddHotKey( const KeyCode& rKeyCode, const Link& rLink, void* pData = NULL );
- static void RemoveHotKey( sal_uLong nId );
static sal_uLong AddEventHook( VCLEventHookProc pProc, void* pData = NULL );
static void RemoveEventHook( sal_uLong nId );
static long CallEventHooks( NotifyEvent& rEvt );
- static long CallPreNotify( NotifyEvent& rEvt );
- static long CallEvent( NotifyEvent& rEvt );
static void SetHelp( Help* pHelp = NULL );
static Help* GetHelp();
@@ -390,9 +380,7 @@ public:
static sal_uInt16 GetSystemWindowMode();
static void SetDialogScaleX( short nScale );
- static short GetDialogScaleX();
- static void SetFontPath( const String& rPath );
static const String& GetFontPath();
static UniqueItemId CreateUniqueId();
@@ -407,8 +395,6 @@ public:
static void SetFilterHdl( const Link& rLink );
static const Link& GetFilterHdl();
- static sal_Bool IsAccessibilityEnabled();
-
static void EnableHeadlessMode( sal_Bool bEnable = sal_True );
static sal_Bool IsHeadlessModeEnabled();
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 0eb0a19..0ced936 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -241,12 +241,6 @@ Application::~Application()
// -----------------------------------------------------------------------
-void Application::InitAppRes( const ResId& )
-{
-}
-
-// -----------------------------------------------------------------------
-
sal_Bool Application::QueryExit()
{
WorkWindow* pAppWin = ImplGetSVData()->maWinData.mpAppWin;
@@ -549,13 +543,6 @@ sal_Bool Application::IsInExecute()
// -----------------------------------------------------------------------
-sal_Bool Application::IsShutDown()
-{
- return ImplGetSVData()->maAppData.mbAppQuit;
-}
-
-// -----------------------------------------------------------------------
-
sal_Bool Application::IsInModalMode()
{
return (ImplGetSVData()->maAppData.mnModalMode != 0);
@@ -609,34 +596,6 @@ sal_Bool Application::IsUICaptured()
// -----------------------------------------------------------------------
-sal_Bool Application::IsUserActive( sal_uInt16 nTest )
-{
- if ( nTest & (USERACTIVE_MOUSEDRAG | USERACTIVE_INPUT) )
- {
- if ( IsUICaptured() )
- return sal_True;
- }
-
- if ( nTest & USERACTIVE_INPUT )
- {
- if ( GetLastInputInterval() < 500 )
- return sal_True;
-
- if ( AnyInput( INPUT_KEYBOARD ) )
- return sal_True;
- }
-
- if ( nTest & USERACTIVE_MODALDIALOG )
- {
- if ( ImplGetSVData()->maAppData.mnModalDialog )
- return sal_True;
- }
-
- return sal_False;
-}
-
-// -----------------------------------------------------------------------
-
void Application::SystemSettingsChanging( AllSettings& /*rSettings*/,
Window* /*pFrame*/ )
{
@@ -1064,15 +1023,6 @@ sal_Bool Application::IsProcessedMouseOrKeyEvent( sal_uLong nEventId )
// -----------------------------------------------------------------------
-sal_uLong Application::PostUserEvent( sal_uLong nEvent, void* pEventData )
-{
- sal_uLong nEventId;
- PostUserEvent( nEventId, nEvent, pEventData );
- return nEventId;
-}
-
-// -----------------------------------------------------------------------
-
sal_uLong Application::PostUserEvent( const Link& rLink, void* pCaller )
{
sal_uLong nEventId;
@@ -1453,16 +1403,6 @@ void Application::RemoveAccel( Accelerator* pAccel )
// -----------------------------------------------------------------------
-void Application::FlushAccel()
-{
- ImplSVData* pSVData = ImplGetSVData();
-
- if ( pSVData->maAppData.mpAccelMgr )
- pSVData->maAppData.mpAccelMgr->FlushAccel();
-}
-
-// -----------------------------------------------------------------------
-
sal_Bool Application::CallAccel( const KeyCode& rKeyCode, sal_uInt16 nRepeat )
{
ImplSVData* pSVData = ImplGetSVData();
@@ -1535,13 +1475,6 @@ void Application::SetDialogScaleX( short nScale )
// -----------------------------------------------------------------------
-short Application::GetDialogScaleX()
-{
- return ImplGetSVData()->maAppData.mnDialogScaleX;
-}
-
-// -----------------------------------------------------------------------
-
void Application::SetDefDialogParent( Window* pWindow )
{
ImplGetSVData()->maWinData.mpDefDialogParent = pWindow;
@@ -1663,19 +1596,6 @@ const String& Application::GetFontPath()
// -----------------------------------------------------------------------
-void Application::SetFontPath( const String& rPath )
-{
- ImplSVData* pSVData = ImplGetSVData();
-
- // if it doesn't exist create a new one
- if( !pSVData->maAppData.mpFontPath )
- pSVData->maAppData.mpFontPath = new String( rPath );
- else
- *(pSVData->maAppData.mpFontPath) = rPath;
-}
-
-// -----------------------------------------------------------------------
-
UniqueItemId Application::CreateUniqueId()
{
ImplSVData* pSVData = ImplGetSVData();
@@ -1801,47 +1721,6 @@ void ImplFreeHotKeyData()
// -----------------------------------------------------------------------
-sal_uIntPtr Application::AddHotKey( const KeyCode& rKeyCode, const Link& rLink, void* pData )
-{
- ImplSVData* pSVData = ImplGetSVData();
- ImplHotKey* pHotKeyData = new ImplHotKey;
- pHotKeyData->mpUserData = pData;
- pHotKeyData->maKeyCode = rKeyCode;
- pHotKeyData->maLink = rLink;
- pHotKeyData->mpNext = pSVData->maAppData.mpFirstHotKey;
- pSVData->maAppData.mpFirstHotKey = pHotKeyData;
- return (sal_uIntPtr)pHotKeyData;
-}
-
-// -----------------------------------------------------------------------
-
-void Application::RemoveHotKey( sal_uIntPtr nId )
-{
- ImplSVData* pSVData = ImplGetSVData();
- ImplHotKey* pFindHotKeyData = (ImplHotKey*)nId;
- ImplHotKey* pPrevHotKeyData = NULL;
- ImplHotKey* pHotKeyData = pSVData->maAppData.mpFirstHotKey;
- while ( pHotKeyData )
- {
- if ( pHotKeyData == pFindHotKeyData )
- {
- if ( pPrevHotKeyData )
- pPrevHotKeyData->mpNext = pFindHotKeyData->mpNext;
- else
- pSVData->maAppData.mpFirstHotKey = pFindHotKeyData->mpNext;
- delete pFindHotKeyData;
- break;
- }
-
- pPrevHotKeyData = pHotKeyData;
- pHotKeyData = pHotKeyData->mpNext;
- }
-
- DBG_ASSERT( pHotKeyData, "Application::RemoveHotKey() - HotKey is not added" );
-}
-
-// -----------------------------------------------------------------------
-
void ImplFreeEventHookData()
{
ImplSVData* pSVData = ImplGetSVData();
@@ -1919,20 +1798,6 @@ long Application::CallEventHooks( NotifyEvent& rEvt )
// -----------------------------------------------------------------------
-long Application::CallPreNotify( NotifyEvent& rEvt )
-{
- return ImplCallPreNotify( rEvt );
-}
-
-// -----------------------------------------------------------------------
-
-long Application::CallEvent( NotifyEvent& rEvt )
-{
- return ImplCallEvent( rEvt );
-}
-
-// -----------------------------------------------------------------------
-
const LocaleDataWrapper& Application::GetAppLocaleDataWrapper()
{
return GetSettings().GetLocaleDataWrapper();
@@ -2008,11 +1873,6 @@ void Application::AddToRecentDocumentList(const rtl::OUString& rFileUrl, const r
pSVData->mpDefInst->AddToRecentDocumentList(rFileUrl, rMimeType);
}
-sal_Bool Application::IsAccessibilityEnabled()
-{
- return sal_False;
-}
-
sal_Bool InitAccessBridge( sal_Bool bShowCancel, sal_Bool &rCancelled )
{
sal_Bool bRet = true;
More information about the Libreoffice-commits
mailing list