Browse Source

Fixed SD2-812: Synchronising non-existent TOC

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.0@1433 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 19 years ago
parent
commit
8c95c75fb7
  1. 28
      src/AddIns/Misc/HtmlHelp2/Project/src/BaseControls/TocPad.cs

28
src/AddIns/Misc/HtmlHelp2/Project/src/BaseControls/TocPad.cs

@ -300,7 +300,11 @@ namespace HtmlHelp2
#region published Help2 TOC Commands #region published Help2 TOC Commands
public void SynchronizeToc(string topicUrl) public void SynchronizeToc(string topicUrl)
{ {
tocControl.Synchronize(topicUrl); try {
tocControl.Synchronize(topicUrl);
} catch (System.Runtime.InteropServices.COMException) {
// SD2-812: ignore exception when trying to synchronize non-existing URL
}
} }
public void GetNextFromNode() public void GetNextFromNode()
@ -312,9 +316,14 @@ namespace HtmlHelp2
public void GetNextFromUrl(string url) public void GetNextFromUrl(string url)
{ {
int currentNode = tocControl.Hierarchy.GetNextFromUrl(url); try {
string topicUrl = tocControl.Hierarchy.GetURL(currentNode); int currentNode = tocControl.Hierarchy.GetNextFromUrl(url);
this.CallHelp(topicUrl, true); string topicUrl = tocControl.Hierarchy.GetURL(currentNode);
this.CallHelp(topicUrl, true);
} catch (System.Runtime.InteropServices.COMException) {
} catch (ArgumentException) {
// SD2-812: ignore exception when trying to synchronize non-existing URL
}
} }
public void GetPrevFromNode() public void GetPrevFromNode()
@ -326,9 +335,14 @@ namespace HtmlHelp2
public void GetPrevFromUrl(string url) public void GetPrevFromUrl(string url)
{ {
int currentNode = tocControl.Hierarchy.GetPrevFromUrl(url); try {
string topicUrl = tocControl.Hierarchy.GetURL(currentNode); int currentNode = tocControl.Hierarchy.GetPrevFromUrl(url);
this.CallHelp(topicUrl, true); string topicUrl = tocControl.Hierarchy.GetURL(currentNode);
this.CallHelp(topicUrl, true);
} catch (ArgumentException) {
} catch (System.Runtime.InteropServices.COMException) {
// SD2-812: ignore exception when trying to synchronize non-existing URL
}
} }
public bool IsNotFirstNode public bool IsNotFirstNode

Loading…
Cancel
Save