callcatcher: cleanup BrowseBox
This commit is contained in:
parent
f79a846c6d
commit
c2f4124291
3 changed files with 0 additions and 216 deletions
|
@ -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; }
|
||||
|
|
|
@ -265,36 +265,6 @@ void BrowseBox::InsertHandleColumn( sal_uLong nWidth )
|
|||
ColumnInserted( 0 );
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
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,
|
||||
|
@ -327,45 +297,6 @@ void BrowseBox::InsertDataColumn( sal_uInt16 nItemId, const XubString& rText,
|
|||
ColumnInserted( nPos );
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
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()
|
||||
{
|
||||
|
@ -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);
|
||||
|
@ -2077,12 +1927,6 @@ long BrowseBox::FirstSelectedColumn( ) const
|
|||
return pColSel ? pColSel->FirstSelected() : BROWSER_ENDOFSELECTION;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
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
|
||||
|
|
|
@ -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 );
|
||||
|
|
Loading…
Reference in a new issue