summaryrefslogtreecommitdiff
path: root/sfx2/source/doc
diff options
context:
space:
mode:
authorRafael Dominguez <venccsralph@gmail.com>2012-08-12 17:14:16 -0430
committerRafael Dominguez <venccsralph@gmail.com>2012-08-12 22:14:25 -0430
commit2b5ce6190066ed030cc221c4cfa236a8e4e4747e (patch)
tree06a2636b2d1662dd1ec325538e25ddf613f3b972 /sfx2/source/doc
parentd10b5d34a266f1e1793109a629804cd54f665258 (diff)
Display error msg when moving a template from a repository fails.
Change-Id: I5f483bcb0e216a6337e0bf70399916bd2da3faec
Diffstat (limited to 'sfx2/source/doc')
-rw-r--r--sfx2/source/doc/templatedlg.cxx18
1 files changed, 17 insertions, 1 deletions
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index b0461e7be82b..4291b6140e67 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -1243,16 +1243,32 @@ void SfxTemplateManagerDlg::remoteMoveTo(const sal_uInt16 nMenuId)
if (nItemId)
{
+ OUString aTemplateList;
+
std::set<const ThumbnailViewItem*>::const_iterator aIter;
for (aIter = maSelTemplates.begin(); aIter != maSelTemplates.end(); ++aIter)
{
const TemplateSearchViewItem *pItem =
static_cast<const TemplateSearchViewItem*>(*aIter);
- maView->copyFrom(nItemId,pItem->maPreview1,pItem->getPath());
+ if(!maView->copyFrom(nItemId,pItem->maPreview1,pItem->getPath()))
+ {
+ if (aTemplateList.isEmpty())
+ aTemplateList = pItem->maTitle;
+ else
+ aTemplateList = aTemplateList + "\n" + pItem->maTitle;
+ }
}
maView->Invalidate(INVALIDATE_NOERASE);
+
+ if (!aTemplateList.isEmpty())
+ {
+ OUString aMsg(SfxResId(STR_MSG_ERROR_REMOTE_MOVE).toString());
+ aMsg = aMsg.replaceFirst("$1",mpOnlineView->getOverlayName());
+ aMsg = aMsg.replaceFirst("$2",maView->GetItemText(nItemId));
+ ErrorBox(this,WB_OK,aMsg.replaceFirst("$1",aTemplateList)).Execute();
+ }
}
}