mirror of
https://github.com/greenshot/greenshot
synced 2025-08-19 04:59:30 -07:00
BUG-2125: Fixed OneNote export, COM interaction needs a default value for out arguments.
This commit is contained in:
parent
98415aaa81
commit
13ba150deb
1 changed files with 7 additions and 4 deletions
|
@ -106,10 +106,12 @@ namespace Greenshot.Interop.Office {
|
||||||
if(oneNoteApplication == null) {
|
if(oneNoteApplication == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
string unfiledNotesPath;
|
// ReSharper disable once RedundantAssignment
|
||||||
|
string unfiledNotesPath = "";
|
||||||
oneNoteApplication.GetSpecialLocation(specialLocation, out unfiledNotesPath);
|
oneNoteApplication.GetSpecialLocation(specialLocation, out unfiledNotesPath);
|
||||||
|
|
||||||
string notebookXml;
|
// ReSharper disable once RedundantAssignment
|
||||||
|
string notebookXml = "";
|
||||||
oneNoteApplication.GetHierarchy("", HierarchyScope.hsPages, out notebookXml, XMLSchema.xs2010);
|
oneNoteApplication.GetHierarchy("", HierarchyScope.hsPages, out notebookXml, XMLSchema.xs2010);
|
||||||
if(!string.IsNullOrEmpty(notebookXml)) {
|
if(!string.IsNullOrEmpty(notebookXml)) {
|
||||||
Log.Debug(notebookXml);
|
Log.Debug(notebookXml);
|
||||||
|
@ -144,7 +146,8 @@ namespace Greenshot.Interop.Office {
|
||||||
try {
|
try {
|
||||||
using (IOneNoteApplication oneNoteApplication = COMWrapper.GetOrCreateInstance<IOneNoteApplication>()) {
|
using (IOneNoteApplication oneNoteApplication = COMWrapper.GetOrCreateInstance<IOneNoteApplication>()) {
|
||||||
if (oneNoteApplication != null) {
|
if (oneNoteApplication != null) {
|
||||||
string notebookXml;
|
// ReSharper disable once RedundantAssignment
|
||||||
|
string notebookXml = "";
|
||||||
oneNoteApplication.GetHierarchy("", HierarchyScope.hsPages, out notebookXml, XMLSchema.xs2010);
|
oneNoteApplication.GetHierarchy("", HierarchyScope.hsPages, out notebookXml, XMLSchema.xs2010);
|
||||||
if (!string.IsNullOrEmpty(notebookXml)) {
|
if (!string.IsNullOrEmpty(notebookXml)) {
|
||||||
Log.Debug(notebookXml);
|
Log.Debug(notebookXml);
|
||||||
|
@ -215,7 +218,7 @@ namespace Greenshot.Interop.Office {
|
||||||
if(p1.IsCurrentlyViewed || p2.IsCurrentlyViewed) {
|
if(p1.IsCurrentlyViewed || p2.IsCurrentlyViewed) {
|
||||||
return p2.IsCurrentlyViewed.CompareTo(p1.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;
|
return pages;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue