Kaydet (Commit) 6b6ec280 authored tarafından Michael Stahl's avatar Michael Stahl

fdo#74787, rhbz#1072553: fix Template Mananger import crash

File dialog causes call to ThumbnailView::LoseFocus() and clears
selected folders.

(regression from 0314034d)

Change-Id: Ic5f2602e9dd1d12aad8c68c48f6bbb119ee6492c
üst 958616a3
......@@ -901,6 +901,9 @@ void SfxTemplateManagerDlg::OnTemplateImport ()
aFileDlg.AddFilter( sFilterName, sFilterExt );
aFileDlg.SetCurrentFilter( sFilterName );
// fdo#74787 file dialog causes ThumbnailView::LoseFocus() - save selection
std::set<const ThumbnailViewItem*,selection_cmp_fn> selFolders(maSelFolders);
ErrCode nCode = aFileDlg.Execute();
if ( nCode == ERRCODE_NONE )
......@@ -909,11 +912,11 @@ void SfxTemplateManagerDlg::OnTemplateImport ()
if (aFiles.hasElements())
{
if (!maSelFolders.empty())
if (!selFolders.empty())
{
//Import to the selected regions
std::set<const ThumbnailViewItem*,selection_cmp_fn>::const_iterator pIter;
for (pIter = maSelFolders.begin(); pIter != maSelFolders.end(); ++pIter)
for (pIter = selFolders.begin(); pIter != selFolders.end(); ++pIter)
{
OUString aTemplateList;
TemplateContainerItem *pFolder = (TemplateContainerItem*)(*pIter);
......
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