summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-03-08 10:56:10 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-03-08 10:57:07 +0100
commit1f2fc6e71788432f3ce29fac1678bcd39533f59e (patch)
treedd0f96b8b8a5624ff0a55c52aca4263325adedeb /sd
parent3d213b3dc5130bdbacbd64be00867eecad6373e8 (diff)
loplugin:loopvartoosmall
Change-Id: I4804a25046a35c24d19d578c014d8e52f62b70e8
Diffstat (limited to 'sd')
-rw-r--r--sd/source/filter/eppt/epptso.cxx4
-rw-r--r--sd/source/filter/ppt/pptin.cxx7
-rw-r--r--sd/source/ui/dlg/headerfooterdlg.cxx3
-rw-r--r--sd/source/ui/dlg/tpoption.cxx7
-rw-r--r--sd/source/ui/docshell/docshell.cxx2
-rw-r--r--sd/source/ui/func/fuconcs.cxx3
-rw-r--r--sd/source/ui/sidebar/RecentMasterPagesSelector.cxx5
-rw-r--r--sd/source/ui/view/DocumentRenderer.cxx2
-rw-r--r--sd/source/ui/view/ViewTabBar.cxx5
9 files changed, 16 insertions, 22 deletions
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index 0dc89037dde2..068cc542e8d0 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -2032,11 +2032,11 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
if ( !aControlName.isEmpty() )
{
- sal_uInt16 i, nBufSize;
+ sal_uInt16 nBufSize;
nBufSize = ( aControlName.getLength() + 1 ) << 1;
sal_uInt8* pBuf = new sal_uInt8[ nBufSize ];
sal_uInt8* pTmp = pBuf;
- for ( i = 0; i < aControlName.getLength(); i++ )
+ for ( sal_Int32 i = 0; i < aControlName.getLength(); i++ )
{
sal_Unicode nUnicode = *(aControlName.getStr() + i);
*pTmp++ = (sal_uInt8)nUnicode;
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index c67ed9390861..53fa340a81ad 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -726,8 +726,7 @@ bool ImplSdPPTImport::Import()
}
}
}
- sal_uInt16 i;
- for (i = 0; i < mpDoc->GetMasterPageCount(); ++i)
+ for (sal_uInt16 i = 0; i < mpDoc->GetMasterPageCount(); ++i)
{
SdPage *const pMPage(static_cast<SdPage*>(mpDoc->GetMasterPage(i)));
if (pMPage == nullptr)
@@ -1083,7 +1082,7 @@ bool ImplSdPPTImport::Import()
bOk = mpDoc->CreateMissingNotesAndHandoutPages();
if ( bOk )
{
- for ( i = 0; i < mpDoc->GetSdPageCount( PageKind::Standard ); i++ )
+ for ( sal_uInt16 i = 0; i < mpDoc->GetSdPageCount( PageKind::Standard ); i++ )
{
// set AutoLayout
@@ -1211,7 +1210,7 @@ bool ImplSdPPTImport::Import()
}
sal_uInt32 nSlideCount = GetPageCount();
- for ( i = 0; ( i < nSlideCount) && ( i < maSlideNameList.size() ); i++ )
+ for ( sal_uInt32 i = 0; ( i < nSlideCount) && ( i < maSlideNameList.size() ); i++ )
{
SdPage* pPage = mpDoc->GetSdPage( i, PageKind::Standard );
OUString &aName = maSlideNameList[ i ];
diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx
index 4e618016ca3e..201282de7bba 100644
--- a/sd/source/ui/dlg/headerfooterdlg.cxx
+++ b/sd/source/ui/dlg/headerfooterdlg.cxx
@@ -518,8 +518,7 @@ void HeaderFooterTabPage::init( const HeaderFooterSettings& rSettings, bool bNot
mpCBDateTimeLanguage->SelectLanguage( meOldLanguage );
- sal_uInt16 nPos;
- for( nPos = 0; nPos < mpCBDateTimeFormat->GetEntryCount(); nPos++ )
+ for( sal_Int32 nPos = 0; nPos < mpCBDateTimeFormat->GetEntryCount(); nPos++ )
{
int nFormat = (int)reinterpret_cast<sal_IntPtr>(mpCBDateTimeFormat->GetEntryData( nPos ));
if( nFormat == rSettings.meDateTimeFormat )
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index a2cff387542e..2700f8ee94eb 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -240,9 +240,8 @@ SdTpOptionsMisc::SdTpOptionsMisc(vcl::Window* pParent, const SfxItemSet& rInAttr
// fill ListBox with metrics
SvxStringArray aMetricArr( RID_SVXSTR_FIELDUNIT_TABLE );
- sal_uInt16 i;
- for ( i = 0; i < aMetricArr.Count(); ++i )
+ for ( sal_uInt32 i = 0; i < aMetricArr.Count(); ++i )
{
OUString sMetric = aMetricArr.GetStringByPos( i );
sal_IntPtr nFieldUnit = aMetricArr.GetValue( i );
@@ -275,9 +274,9 @@ SdTpOptionsMisc::SdTpOptionsMisc(vcl::Window* pParent, const SfxItemSet& rInAttr
sal_uInt16 aTable[ TABLE_COUNT ] =
{ 1, 2, 4, 5, 8, 10, 16, 20, 30, 40, 50, 100 };
- for( i = 0; i < TABLE_COUNT; i++ )
+ for( sal_uInt16 i = 0; i < TABLE_COUNT; i++ )
m_pCbScale->InsertEntry( GetScale( 1, aTable[i] ) );
- for( i = 1; i < TABLE_COUNT; i++ )
+ for( sal_uInt16 i = 1; i < TABLE_COUNT; i++ )
m_pCbScale->InsertEntry( GetScale( aTable[i], 1 ) );
}
diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx
index 05d27b647db1..799c2cfaa907 100644
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -334,7 +334,7 @@ void DrawDocShell::InPlaceActivate( bool bActive )
if( bActive )
{
- for( sal_uInt32 i = 0; pSfxViewFrame && (i < rViews.size()); i++ )
+ for( std::vector<FrameView*>::size_type i = 0; pSfxViewFrame && (i < rViews.size()); i++ )
{
// determine the number of FrameViews
SfxViewShell* pSfxViewSh = pSfxViewFrame->GetViewShell();
diff --git a/sd/source/ui/func/fuconcs.cxx b/sd/source/ui/func/fuconcs.cxx
index 51d73079020e..208eb37cbd2e 100644
--- a/sd/source/ui/func/fuconcs.cxx
+++ b/sd/source/ui/func/fuconcs.cxx
@@ -174,8 +174,7 @@ void FuConstructCustomShape::SetAttributes( SdrObject* pObj )
std::vector< OUString > aObjList;
if ( GalleryExplorer::FillObjListTitle( GALLERY_THEME_POWERPOINT, aObjList ) )
{
- sal_uInt16 i;
- for ( i = 0; i < aObjList.size(); i++ )
+ for ( std::vector<OUString>::size_type i = 0; i < aObjList.size(); i++ )
{
if ( aObjList[ i ].equalsIgnoreAsciiCase( aCustomShape ) )
{
diff --git a/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx b/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx
index 7387786128ed..7ff9accbfff0 100644
--- a/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx
@@ -96,8 +96,7 @@ void RecentMasterPagesSelector::Fill (ItemList& rItemList)
// Create a set of names of the master pages used by the document.
MasterPageObserver::MasterPageNameSet aCurrentNames;
sal_uInt16 nMasterPageCount = mrDocument.GetMasterSdPageCount(PageKind::Standard);
- sal_uInt16 nIndex;
- for (nIndex=0; nIndex<nMasterPageCount; nIndex++)
+ for (sal_uInt16 nIndex=0; nIndex<nMasterPageCount; nIndex++)
{
SdPage* pMasterPage = mrDocument.GetMasterSdPage (nIndex, PageKind::Standard);
if (pMasterPage != nullptr)
@@ -107,7 +106,7 @@ void RecentMasterPagesSelector::Fill (ItemList& rItemList)
// Insert the recently used master pages that are currently not used.
RecentlyUsedMasterPages& rInstance (RecentlyUsedMasterPages::Instance());
int nPageCount = rInstance.GetMasterPageCount();
- for (nIndex=0; nIndex<nPageCount; nIndex++)
+ for (int nIndex=0; nIndex<nPageCount; nIndex++)
{
// Add an entry when a) the page is already known to the
// MasterPageContainer, b) the style name is empty, i.e. it has not yet
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index 8ef2221e9dcc..0eba71c93f37 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -1641,7 +1641,7 @@ private:
pOutliner->SetFirstPageNumber(aPages[nIndex]+1);
Paragraph* pPara = nullptr;
- sal_Int32 nH (0);
+ long nH (0);
while (nH < nPageH && nIndex<nCount)
{
SdPage* pPage = GetFilteredPage(aPages[nIndex], PageKind::Standard);
diff --git a/sd/source/ui/view/ViewTabBar.cxx b/sd/source/ui/view/ViewTabBar.cxx
index fc7492c7e92c..30aa66ddfff9 100644
--- a/sd/source/ui/view/ViewTabBar.cxx
+++ b/sd/source/ui/view/ViewTabBar.cxx
@@ -405,7 +405,7 @@ void ViewTabBar::AddTabBarButton (
const css::drawing::framework::TabBarButton& rButton,
const css::drawing::framework::TabBarButton& rAnchor)
{
- sal_uInt32 nIndex;
+ TabBarButtonList::size_type nIndex;
if ( ! rAnchor.ResourceId.is()
|| (rAnchor.ResourceId->getResourceURL().isEmpty()
@@ -453,8 +453,7 @@ void ViewTabBar::AddTabBarButton (
void ViewTabBar::RemoveTabBarButton (
const css::drawing::framework::TabBarButton& rButton)
{
- sal_uInt16 nIndex;
- for (nIndex=0; nIndex<maTabBarButtons.size(); ++nIndex)
+ for (TabBarButtonList::size_type nIndex=0; nIndex<maTabBarButtons.size(); ++nIndex)
{
if (IsEqual(maTabBarButtons[nIndex], rButton))
{