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>
diff --git a/include/sfx2/strings.hrc b/include/sfx2/strings.hrc
index 63cca69..b5128e1 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 6a6c282..f3b24cb 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();