summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accessibility/source/extended/accessibleiconchoicectrl.cxx3
-rw-r--r--cui/source/dialogs/iconcdlg.cxx12
-rw-r--r--dbaccess/source/ui/app/AppSwapWindow.cxx9
-rw-r--r--dbaccess/source/ui/app/AppSwapWindow.hxx2
-rw-r--r--include/svtools/ivctrl.hxx14
-rw-r--r--svtools/source/contnr/imivctl.hxx10
-rw-r--r--svtools/source/contnr/imivctl1.cxx13
-rw-r--r--svtools/source/contnr/ivctrl.cxx20
8 files changed, 35 insertions, 48 deletions
diff --git a/accessibility/source/extended/accessibleiconchoicectrl.cxx b/accessibility/source/extended/accessibleiconchoicectrl.cxx
index 1d512aa0631c..4847b25cbdb2 100644
--- a/accessibility/source/extended/accessibleiconchoicectrl.cxx
+++ b/accessibility/source/extended/accessibleiconchoicectrl.cxx
@@ -96,8 +96,7 @@ namespace accessibility
SvxIconChoiceCtrlEntry* pEntry = static_cast< SvxIconChoiceCtrlEntry* >( rVclWindowEvent.GetData() );
if ( pEntry == NULL )
{
- sal_uLong nPos=0;
- pEntry = getCtrl()->GetSelectedEntry ( nPos );
+ pEntry = getCtrl()->GetSelectedEntry();
}
if ( pEntry )
{
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index 6e800d257be5..bf90a98a1af4 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -250,9 +250,9 @@ void IconChoiceDialog::dispose()
if (m_pIconCtrl)
{
// remove Userdata from Icons
- for ( sal_uLong i=0; i < m_pIconCtrl->GetEntryCount(); i++)
+ for ( sal_Int32 i=0; i < m_pIconCtrl->GetEntryCount(); i++)
{
- SvxIconChoiceCtrlEntry* pEntry = m_pIconCtrl->GetEntry ( i );
+ SvxIconChoiceCtrlEntry* pEntry = m_pIconCtrl->GetEntry( i );
delete static_cast<sal_uInt16*>(pEntry->GetUserData());
}
}
@@ -358,13 +358,11 @@ void IconChoiceDialog::ShowPage(sal_uInt16 nId)
\**********************************************************************/
IMPL_LINK_NOARG(IconChoiceDialog , ChosePageHdl_Impl)
{
- sal_uLong nPos;
-
- SvxIconChoiceCtrlEntry *pEntry = m_pIconCtrl->GetSelectedEntry ( nPos );
+ SvxIconChoiceCtrlEntry *pEntry = m_pIconCtrl->GetSelectedEntry();
if ( !pEntry )
pEntry = m_pIconCtrl->GetCursor( );
- sal_uInt16 *pId = static_cast<sal_uInt16*>(pEntry->GetUserData ());
+ sal_uInt16 *pId = static_cast<sal_uInt16*>(pEntry->GetUserData());
if( *pId != mnCurrentPageId )
{
@@ -841,7 +839,7 @@ short IconChoiceDialog::Ok()
void IconChoiceDialog::FocusOnIcon( sal_uInt16 nId )
{
// set focus to icon for the current visible page
- for ( sal_uLong i=0; i<m_pIconCtrl->GetEntryCount(); i++)
+ for ( sal_Int32 i=0; i<m_pIconCtrl->GetEntryCount(); i++)
{
SvxIconChoiceCtrlEntry* pEntry = m_pIconCtrl->GetEntry ( i );
sal_uInt16* pUserData = static_cast<sal_uInt16*>(pEntry->GetUserData());
diff --git a/dbaccess/source/ui/app/AppSwapWindow.cxx b/dbaccess/source/ui/app/AppSwapWindow.cxx
index d3654738e329..b7ddc1500474 100644
--- a/dbaccess/source/ui/app/AppSwapWindow.cxx
+++ b/dbaccess/source/ui/app/AppSwapWindow.cxx
@@ -114,8 +114,7 @@ void OApplicationSwapWindow::DataChanged( const DataChangedEvent& rDCEvt )
void OApplicationSwapWindow::clearSelection()
{
m_aIconControl->SetNoSelection();
- sal_uLong nPos = 0;
- SvxIconChoiceCtrlEntry* pEntry = m_aIconControl->GetSelectedEntry(nPos);
+ SvxIconChoiceCtrlEntry* pEntry = m_aIconControl->GetSelectedEntry();
if ( pEntry )
m_aIconControl->InvalidateEntry(pEntry);
m_aIconControl->GetClickHdl().Call(m_aIconControl.get());
@@ -138,8 +137,7 @@ bool OApplicationSwapWindow::interceptKeyInput( const KeyEvent& _rEvent )
ElementType OApplicationSwapWindow::getElementType() const
{
- sal_uLong nPos = 0;
- SvxIconChoiceCtrlEntry* pEntry = m_aIconControl->GetSelectedEntry(nPos);
+ SvxIconChoiceCtrlEntry* pEntry = m_aIconControl->GetSelectedEntry();
return ( pEntry ) ? *static_cast<ElementType*>(pEntry->GetUserData()) : E_NONE;
}
@@ -161,8 +159,7 @@ bool OApplicationSwapWindow::onContainerSelected( ElementType _eType )
IMPL_LINK(OApplicationSwapWindow, OnContainerSelectHdl, SvtIconChoiceCtrl*, _pControl)
{
- sal_uLong nPos = 0;
- SvxIconChoiceCtrlEntry* pEntry = _pControl->GetSelectedEntry( nPos );
+ SvxIconChoiceCtrlEntry* pEntry = _pControl->GetSelectedEntry();
ElementType eType = E_NONE;
if ( pEntry )
{
diff --git a/dbaccess/source/ui/app/AppSwapWindow.hxx b/dbaccess/source/ui/app/AppSwapWindow.hxx
index b655dd8e4dc1..077bc165a219 100644
--- a/dbaccess/source/ui/app/AppSwapWindow.hxx
+++ b/dbaccess/source/ui/app/AppSwapWindow.hxx
@@ -56,7 +56,7 @@ namespace dbaui
void cut() SAL_OVERRIDE { }
void paste() SAL_OVERRIDE { }
- inline sal_uLong GetEntryCount() const { return m_aIconControl->GetEntryCount(); }
+ inline sal_Int32 GetEntryCount() const { return m_aIconControl->GetEntryCount(); }
inline SvxIconChoiceCtrlEntry* GetEntry( sal_uLong nPos ) const { return m_aIconControl->GetEntry(nPos); }
inline Rectangle GetBoundingBox( SvxIconChoiceCtrlEntry* pEntry ) const { return m_aIconControl->GetBoundingBox(pEntry); }
diff --git a/include/svtools/ivctrl.hxx b/include/svtools/ivctrl.hxx
index ad8b30a5c278..baa02a0198d1 100644
--- a/include/svtools/ivctrl.hxx
+++ b/include/svtools/ivctrl.hxx
@@ -82,7 +82,7 @@ class SvxIconChoiceCtrlEntry
Rectangle aRect; // Bounding-Rect of the entry
Rectangle aGridRect; // Only valid in Grid-mode
- sal_uLong nPos;
+ sal_Int32 nPos;
/*
The insert position in the Insertlist is equal to the (sort) order stated at the Insert
@@ -148,8 +148,6 @@ public:
// Only set at AutoArrange. The head of the list is accessible via SvxIconChoiceCtrl::GetPredecessorHead
SvxIconChoiceCtrlEntry* GetSuccessor() const { return pflink; }
SvxIconChoiceCtrlEntry* GetPredecessor() const { return pblink; }
-
-// sal_Unicode GetMnemonicChar() const;
};
enum SvxIconChoiceCtrlColumnAlign
@@ -307,9 +305,9 @@ public:
bool IsEntryEditing() const;
- sal_uLong GetEntryCount() const;
- SvxIconChoiceCtrlEntry* GetEntry( sal_uLong nPos ) const;
- sal_uLong GetEntryListPos( SvxIconChoiceCtrlEntry* pEntry ) const;
+ sal_Int32 GetEntryCount() const;
+ SvxIconChoiceCtrlEntry* GetEntry( sal_Int32 nPos ) const;
+ sal_Int32 GetEntryListPos( SvxIconChoiceCtrlEntry* pEntry ) const;
using Window::SetCursor;
void SetCursor( SvxIconChoiceCtrlEntry* pEntry );
SvxIconChoiceCtrlEntry* GetCursor() const;
@@ -322,10 +320,10 @@ public:
SvxIconChoiceCtrlEntry* GetEntry( const Point& rPosPixel, bool bHit = false ) const;
// sal_uLong is the position of the selected element in the list
- SvxIconChoiceCtrlEntry* GetSelectedEntry( sal_uLong& rPos ) const;
+ SvxIconChoiceCtrlEntry* GetSelectedEntry() const;
#ifdef DBG_UTIL
- void SetEntryTextMode( SvxIconChoiceCtrlTextMode eMode, SvxIconChoiceCtrlEntry* pEntry = 0 );
+ void SetEntryTextMode( SvxIconChoiceCtrlTextMode eMode, SvxIconChoiceCtrlEntry* pEntry = 0 );
#endif
void SetFontColorToBackground ( bool bDo = true ) { _bAutoFontColor = bDo; }
diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx
index 73d193084212..bb368f508d63 100644
--- a/svtools/source/contnr/imivctl.hxx
+++ b/svtools/source/contnr/imivctl.hxx
@@ -211,7 +211,7 @@ class SvxIconChoiceCtrl_Impl
SvxIconChoiceCtrlEntry* pCurEditedEntry;
SvxIconChoiceCtrlTextMode eTextMode;
SelectionMode eSelectionMode;
- sal_uLong nSelectionCount;
+ sal_Int32 nSelectionCount;
SvxIconChoiceCtrlPositionMode ePositionMode;
bool bBoundRectsDirty;
bool bUpdateMode;
@@ -438,7 +438,7 @@ public:
void Command( const CommandEvent& rCEvt );
void ToTop( SvxIconChoiceCtrlEntry* );
- sal_uLong GetSelectionCount() const;
+ sal_Int32 GetSelectionCount() const;
void SetGrid( const Size& );
Size GetMinGrid() const;
void Scroll( long nDeltaX, long nDeltaY, bool bScrollBar = false );
@@ -457,7 +457,7 @@ public:
std::vector<Rectangle*>* pOtherRects = 0
);
- bool IsTextHit( SvxIconChoiceCtrlEntry* pEntry, const Point& rDocPos );
+ bool IsTextHit( SvxIconChoiceCtrlEntry* pEntry, const Point& rDocPos );
void MakeVisible(
const Rectangle& rDocPos,
bool bInScrollBarEvent=false,
@@ -485,7 +485,7 @@ public:
{
return aEntries[ nPos ];
}
- SvxIconChoiceCtrlEntry* GetFirstSelectedEntry( sal_uLong& ) const;
+ SvxIconChoiceCtrlEntry* GetFirstSelectedEntry() const;
SvxIconChoiceCtrlEntry* GetHdlEntry() const { return pHdlEntry; }
void SetHdlEntry( SvxIconChoiceCtrlEntry* pEntry ) { pHdlEntry = pEntry; }
@@ -500,7 +500,7 @@ public:
else
nFlags &= ~(F_MOVED_ENTRIES);
}
- sal_uLong GetEntryListPos( SvxIconChoiceCtrlEntry* ) const;
+ sal_Int32 GetEntryListPos( SvxIconChoiceCtrlEntry* ) const;
void SetEntryImageSize( const Size& rSize ) { aImageSize = rSize; }
void InitSettings();
Rectangle GetOutputRect() const;
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index 8449d5bf4496..3aa1c23aed9d 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -641,9 +641,9 @@ void SvxIconChoiceCtrl_Impl::Paint(vcl::RenderContext& rRenderContext, const Rec
{
// set cursor to item with focus-flag
bool bfound = false;
- for (sal_uLong i = 0; i < pView->GetEntryCount() && !bfound; i++)
+ for (sal_Int32 i = 0; i < pView->GetEntryCount() && !bfound; i++)
{
- SvxIconChoiceCtrlEntry* pEntry = pView->GetEntry (i);
+ SvxIconChoiceCtrlEntry* pEntry = pView->GetEntry(i);
if (pEntry->IsFocused())
{
pCursor = pEntry;
@@ -2342,7 +2342,7 @@ void SvxIconChoiceCtrl_Impl::MakeVisible( const Rectangle& rRect, bool bScrBar,
VisRectChanged();
}
-sal_uLong SvxIconChoiceCtrl_Impl::GetSelectionCount() const
+sal_Int32 SvxIconChoiceCtrl_Impl::GetSelectionCount() const
{
if( (nWinBits & WB_HIGHLIGHTFRAME) && pCurHighlightFrame )
return 1;
@@ -3073,14 +3073,13 @@ void SvxIconChoiceCtrl_Impl::StopEntryEditing( bool bCancel )
pEdit->StopEditing( bCancel );
}
-SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetFirstSelectedEntry( sal_uLong& rPos ) const
+SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetFirstSelectedEntry() const
{
if( !GetSelectionCount() )
return 0;
if( (nWinBits & WB_HIGHLIGHTFRAME) && (eSelectionMode == NO_SELECTION) )
{
- rPos = pView->GetEntryListPos( pCurHighlightFrame );
return pCurHighlightFrame;
}
@@ -3092,7 +3091,6 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetFirstSelectedEntry( sal_uLong
SvxIconChoiceCtrlEntry* pEntry = aEntries[ nCur ];
if( pEntry->IsSelected() )
{
- rPos = nCur;
return pEntry;
}
}
@@ -3104,7 +3102,6 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetFirstSelectedEntry( sal_uLong
{
if( pEntry->IsSelected() )
{
- rPos = GetEntryListPos( pEntry );
return pEntry;
}
pEntry = pEntry->pflink;
@@ -3260,7 +3257,7 @@ void IcnViewEdit_Impl::StopEditing( bool bCancel )
}
}
-sal_uLong SvxIconChoiceCtrl_Impl::GetEntryListPos( SvxIconChoiceCtrlEntry* pEntry ) const
+sal_Int32 SvxIconChoiceCtrl_Impl::GetEntryListPos( SvxIconChoiceCtrlEntry* pEntry ) const
{
if( !(nFlags & F_ENTRYLISTPOS_VALID ))
const_cast<SvxIconChoiceCtrl_Impl*>(this)->SetListPositions();
diff --git a/svtools/source/contnr/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx
index 5378693828e5..73e5c5e6959b 100644
--- a/svtools/source/contnr/ivctrl.cxx
+++ b/svtools/source/contnr/ivctrl.cxx
@@ -150,7 +150,7 @@ void SvtIconChoiceCtrl::ArrangeIcons()
Size aFullSize;
Rectangle aEntryRect;
- for ( sal_uLong i = 0; i < GetEntryCount(); i++ )
+ for ( sal_Int32 i = 0; i < GetEntryCount(); i++ )
{
SvxIconChoiceCtrlEntry* pEntry = GetEntry ( i );
aEntryRect = _pImp->GetEntryBoundRect ( pEntry );
@@ -165,7 +165,7 @@ void SvtIconChoiceCtrl::ArrangeIcons()
Size aFullSize;
Rectangle aEntryRect;
- for ( sal_uLong i = 0; i < GetEntryCount(); i++ )
+ for ( sal_Int32 i = 0; i < GetEntryCount(); i++ )
{
SvxIconChoiceCtrlEntry* pEntry = GetEntry ( i );
aEntryRect = _pImp->GetEntryBoundRect ( pEntry );
@@ -208,8 +208,7 @@ void SvtIconChoiceCtrl::GetFocus()
{
_pImp->GetFocus();
Control::GetFocus();
- sal_uLong nPos;
- SvxIconChoiceCtrlEntry* pSelectedEntry = GetSelectedEntry ( nPos );
+ SvxIconChoiceCtrlEntry* pSelectedEntry = GetSelectedEntry();
if ( pSelectedEntry )
_pImp->CallEventListeners( VCLEVENT_LISTBOX_SELECT, pSelectedEntry );
}
@@ -267,12 +266,12 @@ void SvtIconChoiceCtrl::SetEntryTextMode( SvxIconChoiceCtrlTextMode eMode, SvxIc
}
#endif
-sal_uLong SvtIconChoiceCtrl::GetEntryCount() const
+sal_Int32 SvtIconChoiceCtrl::GetEntryCount() const
{
return _pImp ? _pImp->GetEntryCount() : 0;
}
-SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetEntry( sal_uLong nPos ) const
+SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetEntry( sal_Int32 nPos ) const
{
return _pImp ? _pImp->GetEntry( nPos ) : NULL;
}
@@ -282,15 +281,14 @@ void SvtIconChoiceCtrl::CreateAutoMnemonics( MnemonicGenerator& _rUsedMnemonics
_pImp->CreateAutoMnemonics( &_rUsedMnemonics );
}
-SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetSelectedEntry( sal_uLong& rPos ) const
+SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetSelectedEntry() const
{
- return _pImp ? _pImp->GetFirstSelectedEntry( rPos ) : NULL;
+ return _pImp ? _pImp->GetFirstSelectedEntry() : NULL;
}
void SvtIconChoiceCtrl::ClickIcon()
{
- sal_uLong nPos;
- GetSelectedEntry ( nPos );
+ GetSelectedEntry();
_aClickIconHdl.Call( this );
}
bool SvtIconChoiceCtrl::IsEntryEditing() const
@@ -323,7 +321,7 @@ bool SvtIconChoiceCtrl::DoKeyInput( const KeyEvent& rKEvt )
_pCurKeyEvent = NULL;
return bHandled;
}
-sal_uLong SvtIconChoiceCtrl::GetEntryListPos( SvxIconChoiceCtrlEntry* pEntry ) const
+sal_Int32 SvtIconChoiceCtrl::GetEntryListPos( SvxIconChoiceCtrlEntry* pEntry ) const
{
return _pImp->GetEntryListPos( pEntry );
}