diff options
author | Jan-Marek Glogowski <jan-marek.glogowski@extern.cib.de> | 2019-07-17 11:52:23 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2019-07-18 17:01:14 +0200 |
commit | d1398fd1cd6957f56992a9239929ccc64fd747f0 (patch) | |
tree | 690512b9d8ba10007760bb72e2e83ce835c5ff6b | |
parent | 6fe3eb31304923680d04ae069621eabe84cddc24 (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>
-rw-r--r-- | include/sfx2/strings.hrc | 2 | ||||
-rw-r--r-- | sfx2/source/appl/linkmgr2.cxx | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/include/sfx2/strings.hrc b/include/sfx2/strings.hrc index 63cca694a535..b5128e136ce1 100644 --- a/include/sfx2/strings.hrc +++ b/include/sfx2/strings.hrc @@ -142,7 +142,7 @@ #define STR_QUICKSTART_FILE NC_("STR_QUICKSTART_FILE", "File") #define STR_QUICKSTART_STARTCENTER NC_("STR_QUICKSTART_STARTCENTER", "Startcenter") #define STR_QUICKSTART_RECENTDOC NC_("STR_QUICKSTART_RECENTDOC", "Recent Documents") -#define STR_QUERY_UPDATE_LINKS NC_("STR_QUERY_UPDATE_LINKS", "This document contains one or more links to external data.\n\nWould you like to change the document, and update all links\nto get the most recent data?") +#define STR_QUERY_UPDATE_LINKS NC_("STR_QUERY_UPDATE_LINKS", "The document %{filename} contains one or more links to external data.\n\nWould you like to change the document, and update all links\nto get the most recent data?") #define STR_DDE_ERROR NC_("STR_DDE_ERROR", "DDE link to %1 for %2 area %3 are not available.") #define STR_SECURITY_WARNING_NO_HYPERLINKS NC_("STR_SECURITY_WARNING_NO_HYPERLINKS", "For security reasons, the hyperlink cannot be executed.\nThe stated address will not be opened.") #define RID_SECURITY_WARNING_TITLE NC_("RID_SECURITY_WARNING_TITLE", "Security Warning") 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(); |