Skip to content

Commit

Permalink
BUG-2125: Fixed OneNote export, COM interaction needs a default value…
Browse files Browse the repository at this point in the history
… for out arguments.
  • Loading branch information
Lakritzator committed Jan 26, 2017
1 parent 98415aa commit 13ba150
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions GreenshotOfficePlugin/OfficeExport/OneNoteExporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,12 @@ private static string GetSectionId(IOneNoteApplication oneNoteApplication, Speci
if(oneNoteApplication == null) {
return null;
}
string unfiledNotesPath;
// ReSharper disable once RedundantAssignment
string unfiledNotesPath = "";
oneNoteApplication.GetSpecialLocation(specialLocation, out unfiledNotesPath);

string notebookXml;
// ReSharper disable once RedundantAssignment
string notebookXml = "";
oneNoteApplication.GetHierarchy("", HierarchyScope.hsPages, out notebookXml, XMLSchema.xs2010);
if(!string.IsNullOrEmpty(notebookXml)) {
Log.Debug(notebookXml);
Expand Down Expand Up @@ -144,7 +146,8 @@ public static List<OneNotePage> GetPages() {
try {
using (IOneNoteApplication oneNoteApplication = COMWrapper.GetOrCreateInstance<IOneNoteApplication>()) {
if (oneNoteApplication != null) {
string notebookXml;
// ReSharper disable once RedundantAssignment
string notebookXml = "";
oneNoteApplication.GetHierarchy("", HierarchyScope.hsPages, out notebookXml, XMLSchema.xs2010);
if (!string.IsNullOrEmpty(notebookXml)) {
Log.Debug(notebookXml);
Expand Down Expand Up @@ -215,7 +218,7 @@ public static List<OneNotePage> GetPages() {
if(p1.IsCurrentlyViewed || p2.IsCurrentlyViewed) {
return p2.IsCurrentlyViewed.CompareTo(p1.IsCurrentlyViewed);
}
return String.Compare(p1.DisplayName, p2.DisplayName, StringComparison.Ordinal);
return string.Compare(p1.DisplayName, p2.DisplayName, StringComparison.Ordinal);
});
return pages;
}
Expand Down

0 comments on commit 13ba150

Please sign in to comment.