summaryrefslogtreecommitdiff
path: root/svx/source/tbxctrls
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-03-08 11:03:22 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-03-08 11:03:22 +0100
commitdf016bf7f46122b79d9c8df6fbb1a95faa44c465 (patch)
tree79d7afb70328ee952afa64875dbc7eff00fd939f /svx/source/tbxctrls
parent6412b9c5dd10af511cc255a952be4b18a25ab9a8 (diff)
loplugin:loopvartoosmall
Change-Id: Iedec0d8b1f031f8c311acba80609b59df5f9f4cf
Diffstat (limited to 'svx/source/tbxctrls')
-rw-r--r--svx/source/tbxctrls/fontworkgallery.cxx7
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx21
2 files changed, 11 insertions, 17 deletions
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx
index e9b19cda26d6..b34387986f49 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -106,7 +106,7 @@ void FontWorkGalleryDialog::dispose()
void FontWorkGalleryDialog::initFavorites(sal_uInt16 nThemeId)
{
// Ueber die Gallery werden die Favoriten eingelesen
- sal_uIntPtr nFavCount = GalleryExplorer::GetSdrObjCount( nThemeId );
+ sal_uInt32 nFavCount = GalleryExplorer::GetSdrObjCount( nThemeId );
// Gallery thema locken
GalleryExplorer::BeginLocking(nThemeId);
@@ -167,12 +167,11 @@ void FontWorkGalleryDialog::fillFavorites(sal_uInt16 nThemeId)
mpCtlFavorites->Clear();
- sal_uInt32 nFavorite;
- for( nFavorite = 1; nFavorite <= nFavCount; nFavorite++ )
+ for( std::vector<Bitmap *>::size_type nFavorite = 1; nFavorite <= nFavCount; nFavorite++ )
{
OUString aStr(SVX_RESSTR(RID_SVXFLOAT3D_FAVORITE));
aStr += " ";
- aStr += OUString::number((sal_Int32)nFavorite);
+ aStr += OUString::number(nFavorite);
Image aThumbImage( maFavoritesHorizontal[nFavorite-1] );
mpCtlFavorites->InsertItem( (sal_uInt16)nFavorite, aThumbImage, aStr );
}
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index a0f5c5eece48..28f17997f6d9 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -2445,9 +2445,6 @@ void SvxStyleToolBoxControl::FillStyleBox()
pBox->Clear();
{
- sal_uInt16 _i;
- sal_uInt32 nCnt = pImpl->aDefaultStyles.size();
-
pStyle = pStyleSheetPool->First();
if( pImpl->bSpecModeWriter || pImpl->bSpecModeCalc )
@@ -2457,9 +2454,9 @@ void SvxStyleToolBoxControl::FillStyleBox()
// sort out default styles
bool bInsert = true;
OUString aName( pStyle->GetName() );
- for( _i = 0 ; _i < nCnt ; ++_i )
+ for( auto const & _i: pImpl->aDefaultStyles )
{
- if( pImpl->aDefaultStyles[_i] == aName )
+ if( _i == aName )
{
bInsert = false;
break;
@@ -2489,12 +2486,10 @@ void SvxStyleToolBoxControl::FillStyleBox()
pBox->SetStyle( nWinBits );
// insert default styles
- sal_uInt16 _i;
- sal_uInt32 nCnt = pImpl->aDefaultStyles.size();
sal_uInt16 nPos = 1;
- for( _i = 0 ; _i < nCnt ; ++_i )
+ for( auto const & _i: pImpl->aDefaultStyles )
{
- pBox->InsertEntry( pImpl->aDefaultStyles[_i], nPos );
+ pBox->InsertEntry( _i, nPos );
++nPos;
}
@@ -3161,7 +3156,7 @@ void SvxCurrencyToolBoxControl::GetCurrencySymbols( std::vector<OUString>& rList
aStr += ApplyLreOrRleEmbedding( SvtLanguageTable::GetLanguageString(
rCurrencyTable[i].GetLanguage() ) );
- sal_uInt16 j = nStart;
+ std::vector<OUString>::size_type j = nStart;
for( ; j < rList.size(); ++j )
if ( aCollator.compareString( aStr, rList[j] ) < 0 )
break; // insert before first greater than
@@ -3173,14 +3168,14 @@ void SvxCurrencyToolBoxControl::GetCurrencySymbols( std::vector<OUString>& rList
// Append ISO codes to symbol list.
// XXX If this is to be changed, various other places would had to be
// adapted that assume this order!
- sal_uInt16 nCont = rList.size();
+ std::vector<OUString>::size_type nCont = rList.size();
for ( sal_uInt16 i = 1; i < nCount; ++i )
{
bool bInsert = true;
OUString aStr( ApplyLreOrRleEmbedding( rCurrencyTable[i].GetBankSymbol() ) );
- sal_uInt16 j = nCont;
+ std::vector<OUString>::size_type j = nCont;
for ( ; j < rList.size() && bInsert; ++j )
{
if( rList[j] == aStr )
@@ -3252,7 +3247,7 @@ void SvxColorListBox::LockWidthRequest()
NamedColor aLongestColor;
long nMaxStandardColorTextWidth = 0;
XColorListRef const xColorTable = XColorList::CreateStdColorList();
- for (sal_Int32 i = 0; i != xColorTable->Count(); ++i)
+ for (long i = 0; i != xColorTable->Count(); ++i)
{
XColorEntry& rEntry = *xColorTable->GetColor(i);
long nColorTextWidth = GetTextWidth(rEntry.GetName());