Added aspect-ratio lock for Word, as "requested" in Bug #1443

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2450 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2013-01-31 16:48:13 +00:00
commit e30939093a
3 changed files with 13 additions and 0 deletions

View file

@ -23,11 +23,14 @@ using System.Collections.Generic;
using System.Text;
using Greenshot.Interop;
using GreenshotOfficePlugin;
using Greenshot.IniFile;
namespace Greenshot.Interop.Office {
public class WordExporter {
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(WordExporter));
private static string version = null;
private static OfficeConfiguration config = IniConfig.GetIniSection<OfficeConfiguration>();
public static bool isAfter2003() {
if (version != null) {
@ -106,6 +109,10 @@ namespace Greenshot.Interop.Office {
private static IInlineShape AddPictureToSelection(ISelection selection, string tmpFile) {
IInlineShape shape = selection.InlineShapes.AddPicture(tmpFile, false, true, Type.Missing);
// Lock aspect ratio
if (config.WordLockAspectRatio) {
shape.LockAspectRatio = MsoTriState.msoTrue;
}
selection.InsertAfter("\r\n");
return shape;
}