summaryrefslogtreecommitdiff
path: root/sw/source/uibase/docvw/PostItMgr.cxx
diff options
context:
space:
mode:
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;
}
}
}