mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 10:47:02 -07:00
Merge remote-tracking branch 'remotes/origin/master' into release/1.2.9
This commit is contained in:
commit
0323705513
276 changed files with 5382 additions and 3666 deletions
|
@ -18,16 +18,13 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
using System;
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using GreenshotPlugin.Core;
|
||||
using Greenshot.Plugin;
|
||||
using Greenshot.Interop.Office;
|
||||
using Greenshot.IniFile;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace GreenshotOfficePlugin {
|
||||
|
@ -38,8 +35,8 @@ namespace GreenshotOfficePlugin {
|
|||
private static log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(ExcelDestination));
|
||||
private const int ICON_APPLICATION = 0;
|
||||
private const int ICON_WORKBOOK = 1;
|
||||
private static string exePath = null;
|
||||
private string workbookName = null;
|
||||
private static readonly string exePath = null;
|
||||
private readonly string workbookName = null;
|
||||
|
||||
static ExcelDestination() {
|
||||
exePath = PluginUtils.GetExePath("EXCEL.EXE");
|
||||
|
@ -107,7 +104,7 @@ namespace GreenshotOfficePlugin {
|
|||
}
|
||||
|
||||
public override ExportInformation ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) {
|
||||
ExportInformation exportInformation = new ExportInformation(this.Designation, this.Description);
|
||||
ExportInformation exportInformation = new ExportInformation(Designation, Description);
|
||||
bool createdFile = false;
|
||||
string imageFile = captureDetails.Filename;
|
||||
if (imageFile == null || surface.Modified || !Regex.IsMatch(imageFile, @".*(\.png|\.gif|\.jpg|\.jpeg|\.tiff|\.bmp)$")) {
|
||||
|
|
|
@ -29,11 +29,11 @@ using System.IO;
|
|||
|
||||
namespace GreenshotOfficePlugin {
|
||||
public class OneNoteDestination : AbstractDestination {
|
||||
private static log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(WordDestination));
|
||||
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(WordDestination));
|
||||
private const int ICON_APPLICATION = 0;
|
||||
public const string DESIGNATION = "OneNote";
|
||||
private static string exePath = null;
|
||||
private OneNotePage page = null;
|
||||
private static readonly string exePath = null;
|
||||
private readonly OneNotePage page = null;
|
||||
|
||||
static OneNoteDestination() {
|
||||
exePath = PluginUtils.GetExePath("ONENOTE.EXE");
|
||||
|
@ -99,7 +99,7 @@ namespace GreenshotOfficePlugin {
|
|||
}
|
||||
|
||||
public override ExportInformation ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) {
|
||||
ExportInformation exportInformation = new ExportInformation(this.Designation, this.Description);
|
||||
ExportInformation exportInformation = new ExportInformation(Designation, Description);
|
||||
|
||||
if (page == null) {
|
||||
try {
|
||||
|
|
|
@ -34,18 +34,18 @@ namespace GreenshotOfficePlugin {
|
|||
/// Description of OutlookDestination.
|
||||
/// </summary>
|
||||
public class OutlookDestination : AbstractDestination {
|
||||
private static log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(OutlookDestination));
|
||||
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(OutlookDestination));
|
||||
private const int ICON_APPLICATION = 0;
|
||||
private const int ICON_MEETING = 2;
|
||||
|
||||
private static Image mailIcon = GreenshotPlugin.Core.GreenshotResources.getImage("Email.Image");
|
||||
private static OfficeConfiguration conf = IniConfig.GetIniSection<OfficeConfiguration>();
|
||||
private static string exePath = null;
|
||||
private static bool isActiveFlag = false;
|
||||
private static string mapiClient = "Microsoft Outlook";
|
||||
private static readonly Image mailIcon = GreenshotResources.getImage("Email.Image");
|
||||
private static readonly OfficeConfiguration conf = IniConfig.GetIniSection<OfficeConfiguration>();
|
||||
private static readonly string exePath = null;
|
||||
private static readonly bool isActiveFlag = false;
|
||||
private static readonly string mapiClient = "Microsoft Outlook";
|
||||
public const string DESIGNATION = "Outlook";
|
||||
private string outlookInspectorCaption;
|
||||
private OlObjectClass outlookInspectorType;
|
||||
private readonly string outlookInspectorCaption;
|
||||
private readonly OlObjectClass outlookInspectorType;
|
||||
|
||||
static OutlookDestination() {
|
||||
if (EmailConfigHelper.HasOutlook()) {
|
||||
|
@ -142,7 +142,7 @@ namespace GreenshotOfficePlugin {
|
|||
/// <param name="captureDetails"></param>
|
||||
/// <returns></returns>
|
||||
public override ExportInformation ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) {
|
||||
ExportInformation exportInformation = new ExportInformation(this.Designation, this.Description);
|
||||
ExportInformation exportInformation = new ExportInformation(Designation, Description);
|
||||
// Outlook logic
|
||||
string tmpFile = captureDetails.Filename;
|
||||
if (tmpFile == null || surface.Modified || !Regex.IsMatch(tmpFile, @".*(\.png|\.gif|\.jpg|\.jpeg|\.tiff|\.bmp)$")) {
|
||||
|
|
|
@ -18,16 +18,13 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
using System;
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using GreenshotPlugin.Core;
|
||||
using Greenshot.Plugin;
|
||||
using Greenshot.Interop.Office;
|
||||
using Greenshot.IniFile;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace GreenshotOfficePlugin {
|
||||
|
@ -39,8 +36,8 @@ namespace GreenshotOfficePlugin {
|
|||
private const int ICON_APPLICATION = 0;
|
||||
private const int ICON_PRESENTATION = 1;
|
||||
|
||||
private static string exePath = null;
|
||||
private string presentationName = null;
|
||||
private static readonly string exePath = null;
|
||||
private readonly string presentationName = null;
|
||||
|
||||
static PowerpointDestination() {
|
||||
exePath = PluginUtils.GetExePath("POWERPNT.EXE");
|
||||
|
@ -109,7 +106,7 @@ namespace GreenshotOfficePlugin {
|
|||
}
|
||||
|
||||
public override ExportInformation ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) {
|
||||
ExportInformation exportInformation = new ExportInformation(this.Designation, this.Description);
|
||||
ExportInformation exportInformation = new ExportInformation(Designation, Description);
|
||||
string tmpFile = captureDetails.Filename;
|
||||
Size imageSize = Size.Empty;
|
||||
if (tmpFile == null || surface.Modified || !Regex.IsMatch(tmpFile, @".*(\.png|\.gif|\.jpg|\.jpeg|\.tiff|\.bmp)$")) {
|
||||
|
|
|
@ -33,11 +33,11 @@ namespace GreenshotOfficePlugin {
|
|||
/// Description of EmailDestination.
|
||||
/// </summary>
|
||||
public class WordDestination : AbstractDestination {
|
||||
private static log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(WordDestination));
|
||||
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(WordDestination));
|
||||
private const int ICON_APPLICATION = 0;
|
||||
private const int ICON_DOCUMENT = 1;
|
||||
private static string exePath = null;
|
||||
private string documentCaption = null;
|
||||
private static readonly string exePath = null;
|
||||
private readonly string documentCaption = null;
|
||||
|
||||
static WordDestination() {
|
||||
exePath = PluginUtils.GetExePath("WINWORD.EXE");
|
||||
|
@ -51,7 +51,7 @@ namespace GreenshotOfficePlugin {
|
|||
}
|
||||
|
||||
public WordDestination(string wordCaption) {
|
||||
this.documentCaption = wordCaption;
|
||||
documentCaption = wordCaption;
|
||||
}
|
||||
|
||||
public override string Designation {
|
||||
|
@ -104,7 +104,7 @@ namespace GreenshotOfficePlugin {
|
|||
}
|
||||
|
||||
public override ExportInformation ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) {
|
||||
ExportInformation exportInformation = new ExportInformation(this.Designation, this.Description);
|
||||
ExportInformation exportInformation = new ExportInformation(Designation, Description);
|
||||
string tmpFile = captureDetails.Filename;
|
||||
if (tmpFile == null || surface.Modified || !Regex.IsMatch(tmpFile, @".*(\.png|\.gif|\.jpg|\.jpeg|\.tiff|\.bmp)$")) {
|
||||
tmpFile = ImageOutput.SaveNamedTmpFile(surface, captureDetails, new SurfaceOutputSettings().PreventGreenshotFormat());
|
||||
|
|
|
@ -20,10 +20,7 @@
|
|||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Reflection;
|
||||
|
||||
using Greenshot.Interop;
|
||||
using System.Drawing;
|
||||
using GreenshotOfficePlugin;
|
||||
using Greenshot.IniFile;
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
*/
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Forms;
|
||||
using Greenshot.Plugin;
|
||||
using GreenshotPlugin.Core;
|
||||
using System;
|
||||
|
|
|
@ -24,13 +24,7 @@ using System.Text;
|
|||
using System.IO;
|
||||
|
||||
using Microsoft.Win32;
|
||||
|
||||
using Greenshot.Interop;
|
||||
using Greenshot.Interop.IE;
|
||||
using System.Threading;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Forms;
|
||||
using GreenshotPlugin.Core;
|
||||
using GreenshotOfficePlugin;
|
||||
using Greenshot.IniFile;
|
||||
|
||||
|
|
|
@ -20,9 +20,6 @@
|
|||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
using Greenshot.Interop;
|
||||
using GreenshotOfficePlugin;
|
||||
using Greenshot.IniFile;
|
||||
|
||||
|
@ -30,7 +27,7 @@ namespace Greenshot.Interop.Office {
|
|||
public class WordExporter {
|
||||
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(WordExporter));
|
||||
private static Version wordVersion = null;
|
||||
private static OfficeConfiguration config = IniConfig.GetIniSection<OfficeConfiguration>();
|
||||
private static readonly OfficeConfiguration config = IniConfig.GetIniSection<OfficeConfiguration>();
|
||||
|
||||
/// <summary>
|
||||
/// Check if the used version is higher than Office 2003
|
||||
|
|
|
@ -601,11 +601,11 @@ namespace Greenshot.Interop.Office {
|
|||
[FieldOffset(0)]
|
||||
public uint propTag;
|
||||
[FieldOffset(4)]
|
||||
public uint alignPad;
|
||||
public readonly uint alignPad;
|
||||
[FieldOffset(8)]
|
||||
public IntPtr Value;
|
||||
[FieldOffset(8)]
|
||||
public long filler;
|
||||
public readonly long filler;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -770,7 +770,7 @@ namespace Greenshot.Interop.Office {
|
|||
Marshal.FreeHGlobal(propValue.Value);
|
||||
IMAPIProp mapiProp = (IMAPIProp)Marshal.GetTypedObjectForIUnknown(IUnknown, typeof(IMAPIProp));
|
||||
return mapiProp.SaveChanges(4) == 0;
|
||||
} catch (System.Exception ex) {
|
||||
} catch (Exception ex) {
|
||||
LOG.Error(ex);
|
||||
return false;
|
||||
} finally {
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
using Greenshot.Plugin;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue