summaryrefslogtreecommitdiff
path: root/sfx2/source/control/templateview.cxx
diff options
context:
space:
mode:
authorRafael Dominguez <venccsralph@gmail.com>2012-07-07 22:10:09 -0430
committerRafael Dominguez <venccsralph@gmail.com>2012-07-07 22:16:44 -0430
commit0b42f159790de9fd93322ea635c857cab72995ea (patch)
tree75abaeab9b375d9990a3d859f7fcf03638ac19e6 /sfx2/source/control/templateview.cxx
parent0e64420138d3b38979cdca3acbaaa65625d9e7ab (diff)
Only store template data instead of a ThumbnailViewItem.
- Allocates less memory because we only store the important data. - Fix a bug that makes the application crash while on debug mode when a view gets destroyed and not all selection boxes have been released before the window. Change-Id: Idd5c11811278ed77268ce56350cfa75cdefaa483
Diffstat (limited to 'sfx2/source/control/templateview.cxx')
-rw-r--r--sfx2/source/control/templateview.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/sfx2/source/control/templateview.cxx b/sfx2/source/control/templateview.cxx
index 350874167aab..a83a56804ad4 100644
--- a/sfx2/source/control/templateview.cxx
+++ b/sfx2/source/control/templateview.cxx
@@ -107,18 +107,18 @@ void TemplateView::Paint (const Rectangle &rRect)
mpProcessor->process(aSeq);
}
-void TemplateView::InsertItems (const std::vector<TemplateViewItem*> &rTemplates)
+void TemplateView::InsertItems (const std::vector<TemplateItemProperties> &rTemplates)
{
for (size_t i = 0, n = rTemplates.size(); i < n; ++i )
{
TemplateViewItem *pItem = new TemplateViewItem(*this,this);
- TemplateViewItem *pCur = rTemplates[i];
+ const TemplateItemProperties *pCur = &rTemplates[i];
- pItem->mnId = pCur->mnId;
- pItem->maText = pCur->maText;
- pItem->setPath(pCur->getPath());
- pItem->setFileType(pCur->getFileType());
- pItem->maPreview1 = pCur->maPreview1;
+ pItem->mnId = pCur->nId;
+ pItem->maText = pCur->aName;
+ pItem->setPath(pCur->aPath);
+ pItem->setFileType(pCur->aType);
+ pItem->maPreview1 = pCur->aThumbnail;
pItem->setSelectClickHdl(LINK(this,ThumbnailView,OnFolderSelected));
mItemList.push_back(pItem);