Allow all links in online help documents
diff --git a/main/sfx2/inc/sfx2/linkmgr.hxx b/main/sfx2/inc/sfx2/linkmgr.hxx
index f638aee..21c6f09 100644
--- a/main/sfx2/inc/sfx2/linkmgr.hxx
+++ b/main/sfx2/inc/sfx2/linkmgr.hxx
@@ -114,7 +114,10 @@
sal_Bool GetUserAllowsLinkUpdate(Window *pParent);
// Automatically ask user about update all links, on first insert
+ // If we already asked the user, we forget about it and will ask again.
void SetAutoAskUpdateAllLinks();
+ // Never ask the user: just update all links
+ void SetNeverAskUpdateAllLinks();
void UpdateAllLinks( sal_Bool bAskUpdate = sal_True,
sal_Bool bCallErrHdl = sal_True,
diff --git a/main/sfx2/source/appl/linkmgr2.cxx b/main/sfx2/source/appl/linkmgr2.cxx
index b75b4ff..e8aa0bc 100644
--- a/main/sfx2/source/appl/linkmgr2.cxx
+++ b/main/sfx2/source/appl/linkmgr2.cxx
@@ -66,8 +66,8 @@
LinkManager::LinkManager(SfxObjectShell* p)
: pPersist(p),
- mUpdateAsked(sal_False),
- mAutoAskUpdateAllLinks(sal_False)
+ mAutoAskUpdateAllLinks(sal_False),
+ mUpdateAsked(sal_False)
{
}
@@ -283,6 +283,14 @@
void LinkManager::SetAutoAskUpdateAllLinks()
{
mAutoAskUpdateAllLinks = sal_True;
+ mUpdateAsked = sal_False;
+}
+
+void LinkManager::SetNeverAskUpdateAllLinks()
+{
+ mAutoAskUpdateAllLinks = sal_False;
+ mAllowUpdate = sal_True;
+ mUpdateAsked = sal_True;
}
sal_Bool LinkManager::GetUserAllowsLinkUpdate(Window *pParentWin)
diff --git a/main/sw/source/ui/app/docsh.cxx b/main/sw/source/ui/app/docsh.cxx
index 9bd2d25..7f01665 100644
--- a/main/sw/source/ui/app/docsh.cxx
+++ b/main/sw/source/ui/app/docsh.cxx
@@ -255,6 +255,12 @@
// Restore the pool default if reading a saved document.
mpDoc->RemoveAllFmtLanguageDependencies();
+ // Trust links on help documents
+ String aFileName( rMedium.GetName() );
+ if (aFileName.SearchAscii("vnd.sun.star.help://") == 0) {
+ mpDoc->GetLinkManager().SetNeverAskUpdateAllLinks();
+ }
+
sal_uLong nErr = pRdr->Read( *pRead );
// Evtl. ein altes Doc weg