summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-03-13 13:27:46 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-03-13 13:48:23 +0100
commit6e4d3bad807a32371fe49f0a4a28ca0e5b0f6e70 (patch)
tree9e0f0f964884306b9675ce87e0c129cbcee5b963 /cui
parent4ea76db5e53235971b597a2810a6d12618d6aaea (diff)
Clean up integer types representing positions in ToolBox's item vector
(vs. uses of sal_uInt16 representing such items' IDs). APPEND and ITEM_NOTFOUND are members of ToolBox now (and have been bumped to the corresponding type's max). The payload of VclEventIds ToolboxButtonStateChanged ToolboxClick ToolboxHighlightOff ToolboxItemAdded ToolboxItemDisabled ToolboxItemEnabled ToolboxItemRemoved ToolboxItemTextChanged ToolboxItemUpdated ToolboxItemWindowChanged ToolboxSelect has been changed too (note that reading/writing of those payloads isn't very consistent, though: for some of these, values are written that are never read, while for some others no values are ever written but the reading code would like to receive some value if the payload wasn't a nullptr). Change-Id: I4856ffb3637404b8d866621a3503d7922b1b8141
Diffstat (limited to 'cui')
-rw-r--r--cui/source/customize/cfg.cxx19
1 files changed, 10 insertions, 9 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index e2067c3f72c6..0f47c1856b3a 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -5185,6 +5185,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( vcl::Window *pWindow,
pBtnDelete->SetClickHdl( LINK(this, SvxIconSelectorDialog, DeleteHdl) );
m_nNextId = pTbSymbol->GetItemCount()+1;
+ //TODO: ToolBox::ImplToolItems::size_type -> sal_uInt16!
}
SvxIconSelectorDialog::~SvxIconSelectorDialog()
@@ -5196,9 +5197,9 @@ void SvxIconSelectorDialog::dispose()
{
if (pTbSymbol)
{
- sal_uInt16 nCount = pTbSymbol->GetItemCount();
+ ToolBox::ImplToolItems::size_type nCount = pTbSymbol->GetItemCount();
- for (sal_uInt16 n = 0; n < nCount; ++n )
+ for (ToolBox::ImplToolItems::size_type n = 0; n < nCount; ++n )
{
sal_uInt16 nId = pTbSymbol->GetItemId(n);
@@ -5222,7 +5223,7 @@ uno::Reference< graphic::XGraphic> SvxIconSelectorDialog::GetSelectedIcon()
uno::Reference< graphic::XGraphic > result;
sal_uInt16 nId;
- for ( sal_uInt16 n = 0; n < pTbSymbol->GetItemCount(); ++n )
+ for ( ToolBox::ImplToolItems::size_type n = 0; n < pTbSymbol->GetItemCount(); ++n )
{
nId = pTbSymbol->GetItemId( n );
if ( pTbSymbol->IsItemChecked( nId ) )
@@ -5238,9 +5239,9 @@ IMPL_LINK( SvxIconSelectorDialog, SelectHdl, ToolBox *, pToolBox, void )
{
(void)pToolBox;
- sal_uInt16 nCount = pTbSymbol->GetItemCount();
+ ToolBox::ImplToolItems::size_type nCount = pTbSymbol->GetItemCount();
- for (sal_uInt16 n = 0; n < nCount; ++n )
+ for (ToolBox::ImplToolItems::size_type n = 0; n < nCount; ++n )
{
sal_uInt16 nId = pTbSymbol->GetItemId( n );
@@ -5295,9 +5296,9 @@ IMPL_LINK_NOARG( SvxIconSelectorDialog, DeleteHdl, Button *, void )
OUString message = CUI_RES( RID_SVXSTR_DELETE_ICON_CONFIRM );
if (ScopedVclPtrInstance<WarningBox>(this, WinBits(WB_OK_CANCEL), message)->Execute() == RET_OK)
{
- sal_uInt16 nCount = pTbSymbol->GetItemCount();
+ ToolBox::ImplToolItems::size_type nCount = pTbSymbol->GetItemCount();
- for (sal_uInt16 n = 0; n < nCount; ++n )
+ for (ToolBox::ImplToolItems::size_type n = 0; n < nCount; ++n )
{
sal_uInt16 nId = pTbSymbol->GetItemId( n );
@@ -5353,8 +5354,8 @@ bool SvxIconSelectorDialog::ReplaceGraphicItem(
}
bool bResult( false );
- sal_uInt16 nCount = pTbSymbol->GetItemCount();
- for (sal_uInt16 n = 0; n < nCount; ++n )
+ ToolBox::ImplToolItems::size_type nCount = pTbSymbol->GetItemCount();
+ for (ToolBox::ImplToolItems::size_type n = 0; n < nCount; ++n )
{
sal_uInt16 nId = pTbSymbol->GetItemId( n );