diff options
author | Rafael Dominguez <venccsralph@gmail.com> | 2012-07-28 18:02:34 -0430 |
---|---|---|
committer | Rafael Dominguez <venccsralph@gmail.com> | 2012-07-29 21:29:25 -0430 |
commit | e3bb872add7705ff956056c5a86cbdd1fe8e34c8 (patch) | |
tree | 27a0d4db18f4acd6e06790d894b9c21fcecb0b7a /sfx2 | |
parent | 4b0999916a17327337129dea7695648be1478529 (diff) |
Move/Copy selected templates in the search view to target region.
Change-Id: I94dfc3610925b37ca25e1fe1ea591d9b5abbeae1
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/templatedlg.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index 6c942b5f6144..739ff13d4446 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -11,6 +11,7 @@ #include "inputdlg.hxx" #include "templatesearchview.hxx" +#include "templatesearchviewitem.hxx" #include <comphelper/processfactory.hxx> #include <sfx2/filedlghelper.hxx> @@ -900,9 +901,16 @@ void SfxTemplateManagerDlg::localSearchMoveTo(sal_uInt16 nMenuId) { // Move templates to desired folder if for some reason move fails // try copying them. - if (!maView->moveTemplates(maSelTemplates,nItemId,false) && - !maView->moveTemplates(maSelTemplates,nItemId,true)) + std::set<const ThumbnailViewItem*>::const_iterator aIter; + for (aIter = maSelTemplates.begin(); aIter != maSelTemplates.end(); ++aIter) { + const TemplateSearchViewItem *pItem = + static_cast<const TemplateSearchViewItem*>(*aIter); + + if(!maView->moveTemplate(pItem,pItem->mnRegionId+1,nItemId,false) + && !maView->moveTemplate(pItem,pItem->mnRegionId+1,nItemId,true)) + { + } } } } |