summaryrefslogtreecommitdiff
path: root/sw/source/uibase/docvw/PostItMgr.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-02-29 10:59:14 +0200
committerNoel Grandin <noel@peralex.com>2016-02-29 11:11:29 +0200
commitee74e401aae0543fd20d80ec4b5c11877e56dafe (patch)
treec04fa51af8f3bddad408dea7100d839ba3c1214e /sw/source/uibase/docvw/PostItMgr.cxx
parent4fe23a797291dbf582925ace1392772577506c4e (diff)
loplugin:unuseddefaultparam in sw (part3)
Change-Id: Ibff7ac9718929349ee7daa3febb0f8fe4a9fa4db
Diffstat (limited to 'sw/source/uibase/docvw/PostItMgr.cxx')
-rw-r--r--sw/source/uibase/docvw/PostItMgr.cxx20
1 files changed, 9 insertions, 11 deletions
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
index a09c6c9a89ed..0f28c5de41ab 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -965,22 +965,20 @@ void SwPostItMgr::AutoScroll(const SwSidebarWin* pPostIt,const unsigned long aPa
}
}
-void SwPostItMgr::MakeVisible(const SwSidebarWin* pPostIt,long aPage )
+void SwPostItMgr::MakeVisible(const SwSidebarWin* pPostIt )
{
- if (aPage == -1)
+ long aPage = -1;
+ // we don't know the page yet, lets find it ourselves
+ for (unsigned long n=0;n<mPages.size();n++)
{
- // we don't know the page yet, lets find it ourselves
- for (unsigned long n=0;n<mPages.size();n++)
+ if (mPages[n]->mList->size()>0)
{
- if (mPages[n]->mList->size()>0)
+ for(SwSidebarItem_iterator i = mPages[n]->mList->begin(); i != mPages[n]->mList->end(); ++i)
{
- for(SwSidebarItem_iterator i = mPages[n]->mList->begin(); i != mPages[n]->mList->end(); ++i)
+ if ((*i)->pPostIt==pPostIt)
{
- if ((*i)->pPostIt==pPostIt)
- {
- aPage = n+1;
- break;
- }
+ aPage = n+1;
+ break;
}
}
}