Kaydet (Commit) abb78009 authored tarafından Takeshi Abe's avatar Takeshi Abe Kaydeden (comit) Noel Grandin

sw: Replace std::list with std::vector for simplicity

Change-Id: I239df7b0009711eeaf025221bec9c95887681c8d
Reviewed-on: https://gerrit.libreoffice.org/58918
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 319b187e
......@@ -24,7 +24,6 @@
#include "swdllapi.h"
#include <cstddef>
#include <list>
#include <memory>
#include <vector>
#include <rtl/ustring.hxx>
......@@ -155,7 +154,7 @@ class SwPostItMgr: public SfxListener
void Scroll(const long lScroll,const unsigned long aPage );
void AutoScroll(const sw::annotation::SwAnnotationWin* pPostIt,const unsigned long aPage );
bool ScrollbarHit(const unsigned long aPage,const Point &aPoint);
bool LayoutByPage( std::list<sw::annotation::SwAnnotationWin*> &aVisiblePostItList,
bool LayoutByPage( std::vector<sw::annotation::SwAnnotationWin*> &aVisiblePostItList,
const tools::Rectangle& rBorder,
long lNeededHeight);
void CheckForRemovedPostIts();
......
......@@ -690,7 +690,7 @@ void SwPostItMgr::LayoutPostIts()
// only layout if there are notes on this page
if (pPage->mvSidebarItems.size()>0)
{
std::list<SwAnnotationWin*> aVisiblePostItList;
std::vector<SwAnnotationWin*> aVisiblePostItList;
unsigned long lNeededHeight = 0;
long mlPageBorder = 0;
long mlPageEnd = 0;
......@@ -876,8 +876,6 @@ void SwPostItMgr::LayoutPostIts()
// Layout for this post it finished now
visiblePostIt->GetSidebarItem().bPendingLayout = false;
}
aVisiblePostItList.clear();
}
else
{
......@@ -1118,7 +1116,7 @@ Color SwPostItMgr::GetArrowColor(sal_uInt16 aDirection,unsigned long aPage) cons
}
}
bool SwPostItMgr::LayoutByPage(std::list<SwAnnotationWin*> &aVisiblePostItList, const tools::Rectangle& rBorder, long lNeededHeight)
bool SwPostItMgr::LayoutByPage(std::vector<SwAnnotationWin*> &aVisiblePostItList, const tools::Rectangle& rBorder, long lNeededHeight)
{
/*** General layout idea:***/
// - if we have space left, we always move the current one up,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment