Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/3076
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/76/3076/1
Fix deleting templates through Template Manager.
Change-Id: Ic59d3d666ae5f3808ef7dd7324589a731a841186
---
M sfx2/source/doc/templatedlg.cxx
1 file changed, 3 insertions(+), 14 deletions(-)
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index c537321..1cea676d 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -1088,29 +1088,18 @@
else
{
sal_uInt16 nRegionItemId = maView->getCurRegionItemId();
+ std::set<const ThumbnailViewItem*,selection_cmp_fn> aSelTemplates = maSelTemplates;
//Avoid invalid iterators
std::set<const ThumbnailViewItem*,selection_cmp_fn>::const_iterator pIter;
- for (pIter = maSelTemplates.begin(); pIter != maSelTemplates.end();)
+ for (pIter = aSelTemplates.begin(); pIter != aSelTemplates.end(); ++pIter)
{
- if (maView->removeTemplate((*pIter)->mnId,nRegionItemId))
- maSelTemplates.erase(pIter++);
- else
+ if (!maView->removeTemplate((*pIter)->mnId,nRegionItemId))
{
if (aTemplateList.isEmpty())
aTemplateList = (*pIter)->maTitle;
else
aTemplateList = aTemplateList + "\n" + (*pIter)->maTitle;
-
- ++pIter;
}
- }
-
- if (maSelTemplates.empty())
- {
- mpTemplateBar->SetItemDown(TBI_TEMPLATE_DELETE,false);
- mpTemplateBar->Show(false);
- mpViewBar->Show();
- mpActionBar->Show();
}
}
--
To view, visit https://gerrit.libreoffice.org/3076
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic59d3d666ae5f3808ef7dd7324589a731a841186
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Rafael Dominguez <venccsralph@gmail.com>
Context
- [PATCH] Fix deleting templates through Template Manager. · Rafael Dominguez (via Code Review)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.