diff --git a/GreenshotOfficePlugin/OfficeExport/OneNoteExporter.cs b/GreenshotOfficePlugin/OfficeExport/OneNoteExporter.cs index 68619db38..98ee9f834 100644 --- a/GreenshotOfficePlugin/OfficeExport/OneNoteExporter.cs +++ b/GreenshotOfficePlugin/OfficeExport/OneNoteExporter.cs @@ -106,10 +106,12 @@ namespace Greenshot.Interop.Office { 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); @@ -144,7 +146,8 @@ namespace Greenshot.Interop.Office { try { using (IOneNoteApplication oneNoteApplication = COMWrapper.GetOrCreateInstance()) { 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); @@ -215,7 +218,7 @@ namespace Greenshot.Interop.Office { 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; }