summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorJan-Marek Glogowski <jan-marek.glogowski@extern.cib.de>2019-07-17 11:52:23 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2019-07-18 17:01:14 +0200
commitd1398fd1cd6957f56992a9239929ccc64fd747f0 (patch)
tree690512b9d8ba10007760bb72e2e83ce835c5ff6b /sfx2
parent6fe3eb31304923680d04ae069621eabe84cddc24 (diff)
tdf#126461 incl. document name in link update msg
If you open a OLE-linked document from the console, LO will ask to update the linked information on open. But this happens before the document shell has even has set the title of the shell, so a user has no way to know, what "This document" really refers to. This is even more problematic if you have multiple open documents restored by a session manager. So this changes the string to include the document name. Change-Id: Ife7b21f6eeb4dd5c1aebd383752cc62279da33fb Reviewed-on: https://gerrit.libreoffice.org/75777 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/linkmgr2.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index 6a6c282dc4ab..f3b24cb66032 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -311,9 +311,12 @@ void LinkManager::UpdateAllLinks(
if( bAskUpdate )
{
+ OUString aMsg = SfxResId(STR_QUERY_UPDATE_LINKS);
+ INetURLObject aURL(pPersist->getDocumentBaseURL());
+ aMsg = aMsg.replaceFirst("%{filename}", aURL.GetLastName());
+
std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pParentWin,
- VclMessageType::Question, VclButtonsType::YesNo,
- SfxResId(STR_QUERY_UPDATE_LINKS)));
+ VclMessageType::Question, VclButtonsType::YesNo, aMsg));
xQueryBox->set_default_response(RET_YES);
int nRet = xQueryBox->run();