diff --git a/PowerPointArrangeAddin/Dialog/SettingDialog.Designer.cs b/PowerPointArrangeAddin/Dialog/SettingDialog.Designer.cs
index 68dd4cf..f9d96ba 100644
--- a/PowerPointArrangeAddin/Dialog/SettingDialog.Designer.cs
+++ b/PowerPointArrangeAddin/Dialog/SettingDialog.Designer.cs
@@ -52,6 +52,7 @@ private void InitializeComponent() {
this.chkCheckUpdateWhenStartUp = new System.Windows.Forms.CheckBox();
this.chkHideMarginSettingForTextbox = new System.Windows.Forms.CheckBox();
this.chkLessButtonsForArrangement = new System.Windows.Forms.CheckBox();
+ this.chkAllowDoublePressExtendButton = new System.Windows.Forms.CheckBox();
this.tbxDescription = new System.Windows.Forms.TextBox();
this.tlpButton = new System.Windows.Forms.TableLayoutPanel();
this.tlpMain.SuspendLayout();
@@ -228,13 +229,14 @@ private void InitializeComponent() {
// tlpOtherSetting
//
resources.ApplyResources(this.tlpOtherSetting, "tlpOtherSetting");
- this.tlpOtherSetting.Controls.Add(this.cboIconStyle, 1, 4);
- this.tlpOtherSetting.Controls.Add(this.txtIconStyle, 0, 4);
+ this.tlpOtherSetting.Controls.Add(this.cboIconStyle, 1, 5);
+ this.tlpOtherSetting.Controls.Add(this.txtIconStyle, 0, 5);
this.tlpOtherSetting.Controls.Add(this.lblLanguage, 0, 0);
this.tlpOtherSetting.Controls.Add(this.cboLanguage, 1, 0);
this.tlpOtherSetting.Controls.Add(this.chkCheckUpdateWhenStartUp, 0, 1);
this.tlpOtherSetting.Controls.Add(this.chkHideMarginSettingForTextbox, 0, 3);
this.tlpOtherSetting.Controls.Add(this.chkLessButtonsForArrangement, 0, 2);
+ this.tlpOtherSetting.Controls.Add(this.chkAllowDoublePressExtendButton, 0, 4);
this.tlpOtherSetting.Name = "tlpOtherSetting";
//
// cboIconStyle
@@ -291,6 +293,13 @@ private void InitializeComponent() {
this.chkLessButtonsForArrangement.Name = "chkLessButtonsForArrangement";
this.chkLessButtonsForArrangement.UseVisualStyleBackColor = true;
//
+ // chkAllowDoublePressExtendButton
+ //
+ resources.ApplyResources(this.chkAllowDoublePressExtendButton, "chkAllowDoublePressExtendButton");
+ this.tlpOtherSetting.SetColumnSpan(this.chkAllowDoublePressExtendButton, 2);
+ this.chkAllowDoublePressExtendButton.Name = "chkAllowDoublePressExtendButton";
+ this.chkAllowDoublePressExtendButton.UseVisualStyleBackColor = true;
+ //
// tbxDescription
//
resources.ApplyResources(this.tbxDescription, "tbxDescription");
@@ -311,7 +320,7 @@ private void InitializeComponent() {
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnCancel;
this.Controls.Add(this.tlpMain);
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "SettingDialog";
@@ -368,5 +377,6 @@ private void InitializeComponent() {
private System.Windows.Forms.CheckBox chkCheckUpdateWhenStartUp;
private System.Windows.Forms.Label txtIconStyle;
private System.Windows.Forms.ComboBox cboIconStyle;
+ private System.Windows.Forms.CheckBox chkAllowDoublePressExtendButton;
}
}
\ No newline at end of file
diff --git a/PowerPointArrangeAddin/Dialog/SettingDialog.cs b/PowerPointArrangeAddin/Dialog/SettingDialog.cs
index 00a1aaa..aaaf5ec 100644
--- a/PowerPointArrangeAddin/Dialog/SettingDialog.cs
+++ b/PowerPointArrangeAddin/Dialog/SettingDialog.cs
@@ -38,6 +38,7 @@ private void SettingDialog_Load(object sender, EventArgs e) {
chkCheckUpdateWhenStartUp.Checked = AddInSetting.Instance.CheckUpdateWhenStartUp;
chkLessButtonsForArrangement.Checked = AddInSetting.Instance.LessButtonsForArrangementGroup;
chkHideMarginSettingForTextbox.Checked = AddInSetting.Instance.HideMarginSettingForTextboxGroup;
+ chkAllowDoublePressExtendButton.Checked = AddInSetting.Instance.AllowDoublePressExtendButton;
cboIconStyle.SelectedIndex = AddInSetting.Instance.IconStyle.ToIconStyleIndex();
}
@@ -58,6 +59,7 @@ private void BtnOK_Click(object sender, EventArgs e) {
AddInSetting.Instance.CheckUpdateWhenStartUp = chkCheckUpdateWhenStartUp.Checked;
AddInSetting.Instance.LessButtonsForArrangementGroup = chkLessButtonsForArrangement.Checked;
AddInSetting.Instance.HideMarginSettingForTextboxGroup = chkHideMarginSettingForTextbox.Checked;
+ AddInSetting.Instance.AllowDoublePressExtendButton = chkAllowDoublePressExtendButton.Checked;
AddInSetting.Instance.IconStyle = cboIconStyle.SelectedIndex.ToAddInIconStyle();
AddInSetting.Instance.Save();
DialogResult = DialogResult.OK;
diff --git a/PowerPointArrangeAddin/Dialog/SettingDialog.ja.resx b/PowerPointArrangeAddin/Dialog/SettingDialog.ja.resx
index adf60ab..5a1b863 100644
--- a/PowerPointArrangeAddin/Dialog/SettingDialog.ja.resx
+++ b/PowerPointArrangeAddin/Dialog/SettingDialog.ja.resx
@@ -197,9 +197,6 @@
「描図ツール - 書式」タブの「テキストボックス」グループの余白設定を非表示する(&G)
-
- 更新を確認(&K)...
-
PowerPoint が起動される時に自動的にアドインの更新を確認(&F)
@@ -212,4 +209,7 @@
スキューモーフィズム (Microsoft Office 2010 と以前)
+
+ 「サイズ変更 - オブジェクト伸長」ボタンのダブルクリックを許可する(&E)
+
\ No newline at end of file
diff --git a/PowerPointArrangeAddin/Dialog/SettingDialog.resx b/PowerPointArrangeAddin/Dialog/SettingDialog.resx
index cb84007..13a01b4 100644
--- a/PowerPointArrangeAddin/Dialog/SettingDialog.resx
+++ b/PowerPointArrangeAddin/Dialog/SettingDialog.resx
@@ -366,216 +366,6 @@
GrowAndShrink
-
- tlpGroupVisibility
-
-
- System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- grpGroupVisibility
-
-
- 0
-
-
- <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="chkShapeTextbox" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="chkArrangement" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="chkWordArt" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="chkReplacePicture" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="chkSizeAndPosition" Row="11" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="tlpSizeAndPosition" Row="12" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0" /><Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0" /></TableLayoutSettings>
-
-
- Fill
-
-
- 8, 8
-
-
- 8, 8, 8, 0
-
-
- 10, 2, 10, 5
-
-
- 422, 226
-
-
- 0
-
-
- Group visibility
-
-
- grpGroupVisibility
-
-
- System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tlpMain
-
-
- 0
-
-
- True
-
-
- GrowAndShrink
-
-
- tlpOtherSetting
-
-
- System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- grpOtherSetting
-
-
- 0
-
-
- <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="cboIconStyle" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="txtIconStyle" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lblLanguage" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="cboLanguage" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="chkCheckUpdateWhenStartUp" Row="1" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="chkHideMarginSettingForTextbox" Row="3" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="chkLessButtonsForArrangement" Row="2" RowSpan="1" Column="0" ColumnSpan="2" /></Controls><Columns Styles="AutoSize,0,AutoSize,0" /><Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0" /></TableLayoutSettings>
-
-
- Fill
-
-
- 8, 242
-
-
- 8, 8, 8, 0
-
-
- 10, 2, 10, 5
-
-
- 422, 146
-
-
- 1
-
-
- Other setting
-
-
- grpOtherSetting
-
-
- System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tlpMain
-
-
- 1
-
-
- Fill
-
-
- 8, 396
-
-
- 8, 8, 8, 0
-
-
- 420, 150
-
-
- True
-
-
- Both
-
-
- 422, 150
-
-
- 2
-
-
- Description ...
-
-
- tbxDescription
-
-
- System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tlpMain
-
-
- 2
-
-
- True
-
-
- GrowAndShrink
-
-
- 2
-
-
- Right
-
-
- 274, 554
-
-
- 8, 8, 8, 8
-
-
- 1
-
-
- 156, 25
-
-
- 3
-
-
- tlpButton
-
-
- System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tlpMain
-
-
- 3
-
-
- <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="btnOK" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="btnCancel" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,AutoSize,0,Absolute,20,Absolute,20" /><Rows Styles="Percent,100" /></TableLayoutSettings>
-
-
- 12, 12
-
-
- 4
-
-
- 438, 587
-
-
- 0
-
-
- tlpMain
-
-
- System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- $this
-
-
- 0
-
-
- <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="grpGroupVisibility" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="grpOtherSetting" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="tbxDescription" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="tlpButton" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0" /><Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0" /></TableLayoutSettings>
-
True
@@ -585,75 +375,6 @@
1
-
- chkArrangement
-
-
- System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tlpGroupVisibility
-
-
- 1
-
-
- chkSizeAndPosition
-
-
- System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tlpGroupVisibility
-
-
- 4
-
-
- tlpSizeAndPosition
-
-
- System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tlpGroupVisibility
-
-
- 5
-
-
- <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="chkShapeSizeAndPosition" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="chkPictureSizeAndPosition" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="chkChartSizeAndPosition" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="chkSmartartSizeAndPosition" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="chkTableSizeAndPosition" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="chkAudioSizeAndPosition" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="chkVideoSizeAndPosition" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,AutoSize,0" /><Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0" /></TableLayoutSettings>
-
-
- Fill
-
-
- 10, 14
-
-
- 13
-
-
- 402, 207
-
-
- 0
-
-
- tlpGroupVisibility
-
-
- System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- grpGroupVisibility
-
-
- 0
-
-
- <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="chkShapeTextbox" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="chkArrangement" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="chkWordArt" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="chkReplacePicture" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="chkSizeAndPosition" Row="11" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="tlpSizeAndPosition" Row="12" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0" /><Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0" /></TableLayoutSettings>
-
True
@@ -732,96 +453,6 @@
2
-
- chkChartSizeAndPosition
-
-
- System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tlpSizeAndPosition
-
-
- 2
-
-
- chkSmartartSizeAndPosition
-
-
- System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tlpSizeAndPosition
-
-
- 3
-
-
- chkTableSizeAndPosition
-
-
- System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tlpSizeAndPosition
-
-
- 4
-
-
- chkAudioSizeAndPosition
-
-
- System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tlpSizeAndPosition
-
-
- 5
-
-
- chkVideoSizeAndPosition
-
-
- System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tlpSizeAndPosition
-
-
- 6
-
-
- 15, 115
-
-
- 15, 0, 0, 0
-
-
- 4
-
-
- 352, 92
-
-
- 5
-
-
- tlpSizeAndPosition
-
-
- System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tlpGroupVisibility
-
-
- 5
-
-
- <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="chkShapeSizeAndPosition" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="chkPictureSizeAndPosition" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="chkChartSizeAndPosition" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="chkSmartartSizeAndPosition" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="chkTableSizeAndPosition" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="chkAudioSizeAndPosition" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="chkVideoSizeAndPosition" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,AutoSize,0" /><Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0" /></TableLayoutSettings>
-
True
@@ -987,128 +618,113 @@
6
-
- True
-
-
- GrowAndShrink
-
-
- 2
-
-
- cboIconStyle
-
-
- System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tlpOtherSetting
+
+ 15, 115
-
- 0
+
+ 15, 0, 0, 0
-
- txtIconStyle
+
+ 4
-
- System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ 352, 92
-
- tlpOtherSetting
+
+ 5
-
- 1
+
+ tlpSizeAndPosition
-
- lblLanguage
+
+ System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ tlpGroupVisibility
-
- tlpOtherSetting
+
+ 5
-
- 2
+
+ <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="chkShapeSizeAndPosition" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="chkPictureSizeAndPosition" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="chkChartSizeAndPosition" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="chkSmartartSizeAndPosition" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="chkTableSizeAndPosition" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="chkAudioSizeAndPosition" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="chkVideoSizeAndPosition" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,AutoSize,0" /><Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0" /></TableLayoutSettings>
-
- cboLanguage
+
+ Fill
-
- System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ 10, 14
-
- tlpOtherSetting
+
+ 13
-
- 3
+
+ 402, 207
-
- chkCheckUpdateWhenStartUp
+
+ 0
-
- System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ tlpGroupVisibility
-
- tlpOtherSetting
+
+ System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- 4
+
+ grpGroupVisibility
-
- chkHideMarginSettingForTextbox
+
+ 0
-
- System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="chkShapeTextbox" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="chkArrangement" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="chkWordArt" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="chkReplacePicture" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="chkSizeAndPosition" Row="11" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="tlpSizeAndPosition" Row="12" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0" /><Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0" /></TableLayoutSettings>
-
- tlpOtherSetting
+
+ Fill
-
- 5
+
+ 8, 8
-
- chkLessButtonsForArrangement
+
+ 8, 8, 8, 0
-
- System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ 10, 2, 10, 5
-
- tlpOtherSetting
+
+ 422, 226
-
- 6
+
+ 0
-
- Fill
+
+ Group visibility
-
- 10, 14
+
+ grpGroupVisibility
-
- 5
+
+ System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- 402, 127
+
+ tlpMain
-
+
0
-
- tlpOtherSetting
+
+ True
-
- System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ GrowAndShrink
-
- grpOtherSetting
+
+ True
-
- 0
+
+ GrowAndShrink
-
- <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="cboIconStyle" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="txtIconStyle" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lblLanguage" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="cboLanguage" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="chkCheckUpdateWhenStartUp" Row="1" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="chkHideMarginSettingForTextbox" Row="3" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="chkLessButtonsForArrangement" Row="2" RowSpan="1" Column="0" ColumnSpan="2" /></Controls><Columns Styles="AutoSize,0,AutoSize,0" /><Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0" /></TableLayoutSettings>
+
+ 2
Fill
@@ -1123,7 +739,7 @@
Material style (Before Microsoft Office 2010)
- 62, 101
+ 62, 124
0, 3, 0, 6
@@ -1156,7 +772,7 @@
NoControl
- 0, 98
+ 0, 121
0, 0, 5, 0
@@ -1371,6 +987,213 @@
6
+
+ True
+
+
+ System
+
+
+ NoControl
+
+
+ 0, 101
+
+
+ 0, 3, 0, 3
+
+
+ 327, 17
+
+
+ 4
+
+
+ Allow long pressing for "Resizing - &Extend object" button
+
+
+ chkAllowDoublePressExtendButton
+
+
+ System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tlpOtherSetting
+
+
+ 7
+
+
+ Fill
+
+
+ 10, 14
+
+
+ 6
+
+
+ 402, 150
+
+
+ 0
+
+
+ tlpOtherSetting
+
+
+ System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ grpOtherSetting
+
+
+ 0
+
+
+ <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="cboIconStyle" Row="5" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="txtIconStyle" Row="5" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lblLanguage" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="cboLanguage" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="chkCheckUpdateWhenStartUp" Row="1" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="chkHideMarginSettingForTextbox" Row="3" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="chkLessButtonsForArrangement" Row="2" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="chkAllowDoublePressExtendButton" Row="4" RowSpan="1" Column="0" ColumnSpan="2" /></Controls><Columns Styles="AutoSize,0,AutoSize,0" /><Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0" /></TableLayoutSettings>
+
+
+ Fill
+
+
+ 8, 242
+
+
+ 8, 8, 8, 0
+
+
+ 10, 2, 10, 5
+
+
+ 422, 169
+
+
+ 1
+
+
+ Other setting
+
+
+ grpOtherSetting
+
+
+ System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tlpMain
+
+
+ 1
+
+
+ Fill
+
+
+ 8, 419
+
+
+ 8, 8, 8, 0
+
+
+ 420, 150
+
+
+ True
+
+
+ Both
+
+
+ 422, 150
+
+
+ 2
+
+
+ Description ...
+
+
+ tbxDescription
+
+
+ System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tlpMain
+
+
+ 2
+
+
+ True
+
+
+ GrowAndShrink
+
+
+ 2
+
+
+ Right
+
+
+ 274, 577
+
+
+ 8, 8, 8, 8
+
+
+ 1
+
+
+ 156, 25
+
+
+ 3
+
+
+ tlpButton
+
+
+ System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tlpMain
+
+
+ 3
+
+
+ <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="btnOK" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="btnCancel" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,AutoSize,0,Absolute,20,Absolute,20" /><Rows Styles="Percent,100" /></TableLayoutSettings>
+
+
+ 12, 12
+
+
+ 4
+
+
+ 438, 610
+
+
+ 0
+
+
+ tlpMain
+
+
+ System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ $this
+
+
+ 0
+
+
+ <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="grpGroupVisibility" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="grpOtherSetting" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="tbxDescription" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="tlpButton" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0" /><Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0" /></TableLayoutSettings>
+
True
@@ -1384,7 +1207,7 @@
GrowAndShrink
- 462, 611
+ 462, 640
CenterParent
diff --git a/PowerPointArrangeAddin/Dialog/SettingDialog.zh-Hans.resx b/PowerPointArrangeAddin/Dialog/SettingDialog.zh-Hans.resx
index eddc80a..7e48bc7 100644
--- a/PowerPointArrangeAddin/Dialog/SettingDialog.zh-Hans.resx
+++ b/PowerPointArrangeAddin/Dialog/SettingDialog.zh-Hans.resx
@@ -197,9 +197,6 @@
不显示「绘图工具 - 格式」选项卡的「文本框」分组的边距设置(&G)
-
- 检查更新(&K)...
-
启动 PowerPoint 时自动检查加载项的版本更新(&F)
@@ -212,4 +209,7 @@
拟物风格 (Microsoft Office 2010 及以前)
+
+ 允许双击「大小变更 - 延伸形状」按钮(&E)
+
\ No newline at end of file
diff --git a/PowerPointArrangeAddin/Dialog/SettingDialog.zh-Hant.resx b/PowerPointArrangeAddin/Dialog/SettingDialog.zh-Hant.resx
index f5609bf..0346ab1 100644
--- a/PowerPointArrangeAddin/Dialog/SettingDialog.zh-Hant.resx
+++ b/PowerPointArrangeAddin/Dialog/SettingDialog.zh-Hant.resx
@@ -197,9 +197,6 @@
不顯示「繪圖工具 - 格式」索引標簽的「文字方塊」群組的邊界設置(&G)
-
- 檢查更新(&K)...
-
啓動 PowerPoint 時自動檢查增益集的版本更新(&F)
@@ -207,9 +204,12 @@
圖示風格(&Y):
- 擬物風格 ( MicrosoftOffice 2010 及以前)
+ 扁平風格 (MicrosoftOffice 2010 及以前)
- 擬物風格 ( MicrosoftOffice 2010 及以前)
+ 擬物風格 (MicrosoftOffice 2010 及以前)
+
+
+ 允許快按兩次「大小變更 - 延伸圖案」按鈕(&E)
\ No newline at end of file
diff --git a/PowerPointArrangeAddin/Helper/ArrangementHelper.cs b/PowerPointArrangeAddin/Helper/ArrangementHelper.cs
index ac3c739..cf67e1d 100644
--- a/PowerPointArrangeAddin/Helper/ArrangementHelper.cs
+++ b/PowerPointArrangeAddin/Helper/ArrangementHelper.cs
@@ -102,82 +102,137 @@ public static void Distribute(PowerPoint.ShapeRange? shapeRange, Office.MsoDistr
break;
case AlignRelativeFlag.RelativeToFirstObject:
var shapes = shapeRange.OfType().ToArray();
- if (shapes.Length >= 3) {
- Globals.ThisAddIn.Application.StartNewUndoEntry();
- var (firstShape, secondShape) = (shapes[0], shapes[1]);
- if (cmd.Value == Office.MsoDistributeCmd.msoDistributeHorizontally) {
- var horizontalDistance = secondShape.Left - firstShape.Left;
- if (horizontalDistance == 0) {
- for (var i = 2; i < shapes.Length; i++) {
- shapes[i].Left = firstShape.Left; // same left
- }
- } else {
- var sortedShapes = shapes.Skip(2).ToArray();
- Array.Sort(sortedShapes, (a, b) => a.Left.CompareTo(b.Left));
- if (horizontalDistance > 0) {
- // first -> second -> ...
- var separated = false;
- if (horizontalDistance >= firstShape.Width) {
- horizontalDistance -= firstShape.Width;
- separated = true; // shapes are seperated // TODO improve
- }
- var left = secondShape.Left + horizontalDistance + (separated ? secondShape.Width : 0);
- foreach (var shape in sortedShapes) {
- shape.Left = left;
- left += horizontalDistance + (separated ? shape.Width : 0);
- }
- } else if (horizontalDistance < 0) {
- // ... <- second <- first
- horizontalDistance = -horizontalDistance;
- var separated = false;
- if (horizontalDistance >= secondShape.Width) {
- horizontalDistance -= secondShape.Width;
- separated = true; // shapes are seperated // TODO improve
- }
- var left = secondShape.Left - horizontalDistance;
- foreach (var shape in sortedShapes) {
- shape.Left = left - (separated ? shape.Width : 0);
- left -= horizontalDistance + (separated ? shape.Width : 0);
- }
- }
+ if (shapes.Length <= 2) {
+ break;
+ }
+ Globals.ThisAddIn.Application.StartNewUndoEntry();
+ var (firstShape, secondShape) = (shapes[0], shapes[1]);
+ if (cmd.Value == Office.MsoDistributeCmd.msoDistributeHorizontally) {
+ var horizontalDistance = secondShape.Left - firstShape.Left;
+ if (horizontalDistance == 0) {
+ for (var i = 2; i < shapes.Length; i++) {
+ shapes[i].Left = firstShape.Left; // same left
+ }
+ break;
+ }
+ var sortedShapes = shapes.Skip(2).ToArray();
+ if (horizontalDistance > 0) {
+ // first -> second -> ...
+ Array.Sort(sortedShapes, (a, b) => a.Left.CompareTo(b.Left));
+ var separated = false;
+ if (horizontalDistance >= firstShape.Width) {
+ horizontalDistance -= firstShape.Width;
+ separated = true; // shapes are seperated
+ }
+ var left = secondShape.Left + horizontalDistance + (separated ? secondShape.Width : 0);
+ foreach (var shape in sortedShapes) {
+ shape.Left = left;
+ left += horizontalDistance + (separated ? shape.Width : 0);
}
- } else if (cmd.Value == Office.MsoDistributeCmd.msoDistributeVertically) {
- var verticalDistance = secondShape.Top - firstShape.Top;
- if (verticalDistance == 0) {
- for (var i = 2; i < shapes.Length; i++) {
- shapes[i].Top = firstShape.Top; // same top
- }
- } else {
- var sortedShapes = shapes.Skip(2).ToArray();
- Array.Sort(sortedShapes, (a, b) => a.Left.CompareTo(b.Top));
- if (verticalDistance > 0) {
- // first -> second -> ...
- var separated = false;
- if (verticalDistance >= firstShape.Top) {
- verticalDistance -= firstShape.Top;
- separated = true; // shapes are seperated // TODO improve
- }
- var top = secondShape.Top + verticalDistance + (separated ? secondShape.Height : 0);
- foreach (var shape in sortedShapes) {
- shape.Top = top;
- top += verticalDistance + (separated ? shape.Top : 0);
- }
- } else if (verticalDistance < 0) {
- // ... <- second <- first
- verticalDistance = -verticalDistance;
- var separated = false;
- if (verticalDistance >= secondShape.Top) {
- verticalDistance -= secondShape.Top;
- separated = true; // shapes are seperated // TODO improve
- }
- var top = secondShape.Top - verticalDistance;
- foreach (var shape in sortedShapes) {
- shape.Top = top - (separated ? shape.Height : 0);
- top -= verticalDistance + (separated ? shape.Height : 0);
- }
- }
+ } else if (horizontalDistance < 0) {
+ // ... <- second <- first
+ Array.Sort(sortedShapes, (a, b) => b.Left.CompareTo(a.Left));
+ horizontalDistance = -horizontalDistance;
+ var separated = false;
+ if (horizontalDistance >= secondShape.Width) {
+ horizontalDistance -= secondShape.Width;
+ separated = true; // shapes are seperated
+ }
+ var left = secondShape.Left - horizontalDistance;
+ foreach (var shape in sortedShapes) {
+ shape.Left = left - (separated ? shape.Width : 0);
+ left -= horizontalDistance + (separated ? shape.Width : 0);
}
}
+ } else if (cmd.Value == Office.MsoDistributeCmd.msoDistributeVertically) {
+ var verticalDistance = secondShape.Top - firstShape.Top;
+ if (verticalDistance == 0) {
+ for (var i = 2; i < shapes.Length; i++) {
+ shapes[i].Top = firstShape.Top; // same top
+ }
+ break;
+ }
+ var sortedShapes = shapes.Skip(2).ToArray();
+ if (verticalDistance > 0) {
+ // first -> second -> ...
+ Array.Sort(sortedShapes, (a, b) => a.Top.CompareTo(b.Top));
+ var separated = false;
+ if (verticalDistance >= firstShape.Top) {
+ verticalDistance -= firstShape.Top;
+ separated = true; // shapes are seperated
+ }
+ var top = secondShape.Top + verticalDistance + (separated ? secondShape.Height : 0);
+ foreach (var shape in sortedShapes) {
+ shape.Top = top;
+ top += verticalDistance + (separated ? shape.Top : 0);
+ }
+ } else if (verticalDistance < 0) {
+ // ... <- second <- first
+ Array.Sort(sortedShapes, (a, b) => b.Top.CompareTo(a.Top));
+ verticalDistance = -verticalDistance;
+ var separated = false;
+ if (verticalDistance >= secondShape.Top) {
+ verticalDistance -= secondShape.Top;
+ separated = true; // shapes are seperated
+ }
+ var top = secondShape.Top - verticalDistance;
+ foreach (var shape in sortedShapes) {
+ shape.Top = top - (separated ? shape.Height : 0);
+ top -= verticalDistance + (separated ? shape.Height : 0);
+ }
+ }
+ }
+ break;
+ }
+ }
+
+ public enum SnapCmd {
+ SnapLeftToRight,
+ SnapRightToLeft,
+ SnapTopToBottom,
+ SnapBottomToTop
+ }
+
+ public static void Snap(PowerPoint.ShapeRange? shapeRange, SnapCmd? cmd) {
+ if (shapeRange == null || shapeRange.Count < 2) {
+ return;
+ }
+ if (cmd == null) {
+ return;
+ }
+
+ var shapes = shapeRange.OfType().ToArray();
+ var (previousLeft, previousTop) = (shapes[0].Left, shapes[0].Top);
+ var (previousWidth, previousHeight) = (shapes[0].Width, shapes[0].Height);
+
+ Globals.ThisAddIn.Application.StartNewUndoEntry();
+ switch (cmd!) {
+ case SnapCmd.SnapLeftToRight:
+ for (var i = 1; i < shapes.Length; i++) {
+ shapes[i].Left = previousLeft + previousWidth;
+ previousLeft = shapes[i].Left;
+ previousWidth = shapes[i].Width;
+ }
+ break;
+ case SnapCmd.SnapRightToLeft:
+ for (var i = 1; i < shapes.Length; i++) {
+ previousWidth = shapes[i].Width;
+ shapes[i].Left = previousLeft - previousWidth;
+ previousLeft = shapes[i].Left;
+ }
+ break;
+ case SnapCmd.SnapTopToBottom:
+ for (var i = 1; i < shapes.Length; i++) {
+ shapes[i].Top = previousTop + previousHeight;
+ previousTop = shapes[i].Top;
+ previousHeight = shapes[i].Height;
+ }
+ break;
+ case SnapCmd.SnapBottomToTop:
+ for (var i = 1; i < shapes.Length; i++) {
+ previousHeight = shapes[i].Height;
+ shapes[i].Top = previousTop - previousHeight;
+ previousTop = shapes[i].Top;
}
break;
}
@@ -202,7 +257,7 @@ public enum ScaleSizeCmd {
SameSize
}
- public static void ScaleSize(PowerPoint.ShapeRange? shapeRange, ScaleSizeCmd? cmd, Office.MsoScaleFrom? scaleFromFlag) {
+ public static void ScaleSize(PowerPoint.ShapeRange? shapeRange, ScaleSizeCmd? cmd, SizeAndPositionHelper.ScaleFromFlag? scaleFromFlag) {
if (shapeRange == null || shapeRange.Count < 2) {
return;
}
@@ -210,7 +265,7 @@ public static void ScaleSize(PowerPoint.ShapeRange? shapeRange, ScaleSizeCmd? cm
return;
}
- scaleFromFlag ??= Office.MsoScaleFrom.msoScaleFromTopLeft;
+ scaleFromFlag ??= SizeAndPositionHelper.ScaleFromFlag.FromTopLeft;
var shapes = shapeRange.OfType().ToArray();
var (firstWidth, firstHeight) = (shapes[0].Width, shapes[0].Height); // select the first shape as final size
@@ -246,7 +301,7 @@ public enum ExtendSizeCmd {
ExtendToBottom
}
- public static void ExtendSize(PowerPoint.ShapeRange? shapeRange, ExtendSizeCmd? cmd) {
+ public static void ExtendSize(PowerPoint.ShapeRange? shapeRange, ExtendSizeCmd? cmd, bool extendToFirstObject) {
if (shapeRange == null || shapeRange.Count < 2) {
return;
}
@@ -256,11 +311,18 @@ public static void ExtendSize(PowerPoint.ShapeRange? shapeRange, ExtendSizeCmd?
var shapes = shapeRange.OfType().ToArray();
float minLeft = 0x7fffffff, minTop = 0x7fffffff, maxLeftWidth = -1, maxTopHeight = -1;
- foreach (var shape in shapes) {
- minLeft = Math.Min(minLeft, shape.Left);
- minTop = Math.Min(minTop, shape.Top);
- maxLeftWidth = Math.Max(maxLeftWidth, shape.Left + shape.Width);
- maxTopHeight = Math.Max(maxTopHeight, shape.Top + shape.Height);
+ if (!extendToFirstObject) {
+ foreach (var shape in shapes) {
+ minLeft = Math.Min(minLeft, shape.Left);
+ minTop = Math.Min(minTop, shape.Top);
+ maxLeftWidth = Math.Max(maxLeftWidth, shape.Left + shape.Width);
+ maxTopHeight = Math.Max(maxTopHeight, shape.Top + shape.Height);
+ }
+ } else {
+ minLeft = shapes[0].Left;
+ minTop = shapes[0].Top;
+ maxLeftWidth = shapes[0].Left + shapes[0].Width;
+ maxTopHeight = shapes[0].Top + shapes[0].Height;
}
Globals.ThisAddIn.Application.StartNewUndoEntry();
@@ -268,77 +330,25 @@ public static void ExtendSize(PowerPoint.ShapeRange? shapeRange, ExtendSizeCmd?
case ExtendSizeCmd.ExtendToLeft:
foreach (var shape in shapes) {
var newWidth = shape.Width + shape.Left - minLeft;
- shape.ScaleWidthTo(newWidth, Office.MsoScaleFrom.msoScaleFromBottomRight);
+ shape.ScaleWidthTo(newWidth, SizeAndPositionHelper.ScaleFromFlag.FromBottomRight);
}
break;
case ExtendSizeCmd.ExtendToRight:
foreach (var shape in shapes) {
var newWidth = maxLeftWidth - shape.Left;
- shape.ScaleWidthTo(newWidth, Office.MsoScaleFrom.msoScaleFromTopLeft);
+ shape.ScaleWidthTo(newWidth, SizeAndPositionHelper.ScaleFromFlag.FromTopLeft);
}
break;
case ExtendSizeCmd.ExtendToTop:
foreach (var shape in shapes) {
var newHeight = shape.Height + shape.Top - minTop;
- shape.ScaleHeightTo(newHeight, Office.MsoScaleFrom.msoScaleFromBottomRight);
+ shape.ScaleHeightTo(newHeight, SizeAndPositionHelper.ScaleFromFlag.FromBottomRight);
}
break;
case ExtendSizeCmd.ExtendToBottom:
foreach (var shape in shapes) {
var newHeight = maxTopHeight - shape.Top;
- shape.ScaleHeightTo(newHeight, Office.MsoScaleFrom.msoScaleFromTopLeft);
- }
- break;
- }
- }
-
- public enum SnapCmd {
- SnapLeftToRight,
- SnapRightToLeft,
- SnapTopToBottom,
- SnapBottomToTop
- }
-
- public static void Snap(PowerPoint.ShapeRange? shapeRange, SnapCmd? cmd) {
- if (shapeRange == null || shapeRange.Count < 2) {
- return;
- }
- if (cmd == null) {
- return;
- }
-
- var shapes = shapeRange.OfType().ToArray();
- var (previousLeft, previousTop) = (shapes[0].Left, shapes[0].Top);
- var (previousWidth, previousHeight) = (shapes[0].Width, shapes[0].Height);
-
- Globals.ThisAddIn.Application.StartNewUndoEntry();
- switch (cmd!) {
- case SnapCmd.SnapLeftToRight:
- for (var i = 1; i < shapes.Length; i++) {
- shapes[i].Left = previousLeft + previousWidth;
- previousLeft = shapes[i].Left;
- previousWidth = shapes[i].Width;
- }
- break;
- case SnapCmd.SnapRightToLeft:
- for (var i = 1; i < shapes.Length; i++) {
- previousWidth = shapes[i].Width;
- shapes[i].Left = previousLeft - previousWidth;
- previousLeft = shapes[i].Left;
- }
- break;
- case SnapCmd.SnapTopToBottom:
- for (var i = 1; i < shapes.Length; i++) {
- shapes[i].Top = previousTop + previousHeight;
- previousTop = shapes[i].Top;
- previousHeight = shapes[i].Height;
- }
- break;
- case SnapCmd.SnapBottomToTop:
- for (var i = 1; i < shapes.Length; i++) {
- previousHeight = shapes[i].Height;
- shapes[i].Top = previousTop - previousHeight;
- previousTop = shapes[i].Top;
+ shape.ScaleHeightTo(newHeight, SizeAndPositionHelper.ScaleFromFlag.FromTopLeft);
}
break;
}
diff --git a/PowerPointArrangeAddin/Helper/DoublePressableHandler.cs b/PowerPointArrangeAddin/Helper/DoublePressableHandler.cs
new file mode 100644
index 0000000..b081e26
--- /dev/null
+++ b/PowerPointArrangeAddin/Helper/DoublePressableHandler.cs
@@ -0,0 +1,50 @@
+using System;
+using System.Drawing;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace PowerPointArrangeAddin.Helper {
+
+ public class DoublePressableHandler {
+ public DoublePressableHandler(bool enableDoublePress = true) {
+ EnableDoublePress = enableDoublePress;
+ }
+
+ public bool EnableDoublePress { get; set; }
+
+ private int _pressCheckRemaining;
+ private bool _checkingFinished;
+ private Point _cursorPosition;
+
+ public void CheckPress(Action onPressed, Action onDoublePressed) {
+ if (!EnableDoublePress) {
+ onPressed?.Invoke();
+ return;
+ }
+
+ if (_pressCheckRemaining > 0 && !_checkingFinished) {
+ onDoublePressed?.Invoke();
+ _pressCheckRemaining = 0;
+ _checkingFinished = true;
+ _cursorPosition = Point.Empty;
+ return;
+ }
+
+ _pressCheckRemaining = Convert.ToInt32(Math.Ceiling(150.0 / 10)); // 150ms totally, each 10ms, check 15 times
+ _checkingFinished = false;
+ _cursorPosition = Cursor.Position;
+ Task.Run(async () => {
+ while (_pressCheckRemaining > 0 && _cursorPosition == Cursor.Position && !_checkingFinished) {
+ await Task.Delay(10);
+ _pressCheckRemaining--;
+ }
+ if ((_pressCheckRemaining <= 0 || _cursorPosition != Cursor.Position) && !_checkingFinished) {
+ onPressed?.Invoke();
+ _pressCheckRemaining = 0;
+ _checkingFinished = true;
+ _cursorPosition = Point.Empty;
+ }
+ });
+ }
+ }
+}
diff --git a/PowerPointArrangeAddin/Helper/ReplacePictureHelper.cs b/PowerPointArrangeAddin/Helper/ReplacePictureHelper.cs
index 19a7097..e824339 100644
--- a/PowerPointArrangeAddin/Helper/ReplacePictureHelper.cs
+++ b/PowerPointArrangeAddin/Helper/ReplacePictureHelper.cs
@@ -20,9 +20,10 @@ public enum ReplacePictureCmd {
[Flags]
public enum ReplacePictureFlag : ushort {
- Default = 0,
- ReserveOriginalSize = 1 << 0,
- ReplaceToMiddle = 1 << 1
+ None = 0,
+ ReplaceToFill = 1 << 0,
+ ReplaceToContain = 1 << 1,
+ ReplaceToMiddle = 1 << 2
}
public static void ReplacePicture(PowerPoint.ShapeRange? shapeRange, ReplacePictureCmd? cmd, ReplacePictureFlag? flag, Action? uiInvalidator = null) {
@@ -65,7 +66,8 @@ public static void ReplacePicture(PowerPoint.ShapeRange? shapeRange, ReplacePict
}
private static List InternalReplacePicture(string filepath, PowerPoint.Shape[] pictures, PowerPoint.Shapes slideShapes, ReplacePictureFlag? flag) {
- var reserveOriginalSize = (flag & ReplacePictureFlag.ReserveOriginalSize) != 0;
+ var replaceToFill = (flag & ReplacePictureFlag.ReplaceToFill) != 0;
+ var replaceToContain = (flag & ReplacePictureFlag.ReplaceToContain) != 0;
var replaceToMiddle = (flag & ReplacePictureFlag.ReplaceToMiddle) != 0;
var newShapes = new List();
@@ -73,7 +75,7 @@ public static void ReplacePicture(PowerPoint.ShapeRange? shapeRange, ReplacePict
try {
var (toLink, toSaveWith) = (Office.MsoTriState.msoFalse, Office.MsoTriState.msoTrue);
var newShape = slideShapes.AddPicture(filepath, toLink, toSaveWith, shape.Left, shape.Top); // <<<
- ApplySizeAndPositionToNewShape(shape, newShape, reserveOriginalSize, replaceToMiddle);
+ ApplySizeAndPositionToNewShape(shape, newShape, replaceToFill, replaceToContain, replaceToMiddle);
ApplyFormatAndAnimationToNewShape(shape, newShape);
newShapes.Add(newShape);
shape.Delete();
@@ -133,13 +135,16 @@ public static void ReplacePicture(PowerPoint.ShapeRange? shapeRange, ReplacePict
return path;
}
- private static void ApplySizeAndPositionToNewShape(PowerPoint.Shape oldShape, PowerPoint.Shape newShape, bool reserveOriginalSize, bool replaceToMiddle) {
+ private static void ApplySizeAndPositionToNewShape(PowerPoint.Shape oldShape, PowerPoint.Shape newShape, bool replaceToFill, bool replaceToContain, bool replaceToMiddle) {
var oldLockAspectRatio = newShape.LockAspectRatio;
newShape.LockAspectRatio = Office.MsoTriState.msoFalse;
var (oldWidth, oldHeight) = (oldShape.Width, oldShape.Height);
var (oldLeft, oldTop) = (oldShape.Left, oldShape.Top);
var (newWidth, newHeight) = (newShape.Width, newShape.Height);
- if (reserveOriginalSize) {
+ if (replaceToFill) {
+ newHeight = oldHeight;
+ newWidth = oldWidth;
+ } else if (replaceToContain) {
var widthHeightRate = newWidth / newHeight;
if (oldHeight * widthHeightRate <= oldWidth) {
newHeight = oldHeight;
@@ -148,9 +153,9 @@ private static void ApplySizeAndPositionToNewShape(PowerPoint.Shape oldShape, Po
newWidth = oldWidth;
newHeight = oldWidth / widthHeightRate;
}
- newShape.Width = newWidth;
- newShape.Height = newHeight;
}
+ newShape.Width = newWidth;
+ newShape.Height = newHeight;
if (replaceToMiddle) {
newShape.Left = oldLeft - (newWidth - oldWidth) / 2;
newShape.Top = oldTop - (newHeight - oldHeight) / 2;
diff --git a/PowerPointArrangeAddin/Helper/RibbonControlExtension.cs b/PowerPointArrangeAddin/Helper/RibbonControlExtension.cs
index c2769c0..a6a88e9 100644
--- a/PowerPointArrangeAddin/Helper/RibbonControlExtension.cs
+++ b/PowerPointArrangeAddin/Helper/RibbonControlExtension.cs
@@ -28,6 +28,10 @@ public static string Group(this IRibbonControl ribbonControl) {
return parts.Length < 2 ? "" : parts[1];
}
+ public static string CombineParentId(this IRibbonExtensibility _, string a, string b) {
+ return $"{a}{Separator}{b}";
+ }
+
public static void InvalidateControl(this IRibbonUI ribbonUi, string controlId, string parentId) {
ribbonUi.InvalidateControl($"{controlId}{Separator}{parentId}");
}
diff --git a/PowerPointArrangeAddin/Helper/SizeAndPositionHelper.cs b/PowerPointArrangeAddin/Helper/SizeAndPositionHelper.cs
index 33438e7..6e6c6e5 100644
--- a/PowerPointArrangeAddin/Helper/SizeAndPositionHelper.cs
+++ b/PowerPointArrangeAddin/Helper/SizeAndPositionHelper.cs
@@ -9,38 +9,76 @@ namespace PowerPointArrangeAddin.Helper {
public static class SizeAndPositionHelper {
- public static void ScaleSizeTo(this PowerPoint.Shape shape, float? width, float? height, Office.MsoScaleFrom? scaleFromFlag) {
+ public enum ScaleFromFlag {
+ FromTopLeft,
+ FromTopRight,
+ FromBottomLeft,
+ FromBottomRight,
+ FromLeft,
+ FromRight,
+ FromTop,
+ FromBottom,
+ FromCenter
+ }
+
+ public static void ScaleSizeTo(this PowerPoint.Shape shape, float? width, float? height, ScaleFromFlag? scaleFromFlag, float? relativeToOriginSize = null) {
var oldLockSate = shape.LockAspectRatio;
shape.LockAspectRatio = Office.MsoTriState.msoFalse;
- scaleFromFlag ??= Office.MsoScaleFrom.msoScaleFromTopLeft;
+ scaleFromFlag ??= ScaleFromFlag.FromTopLeft;
var (oldLeft, oldTop) = (shape.Left, shape.Top);
var (oldWidth, oldHeight) = (shape.Width, shape.Height);
- if (width != null) shape.Width = width.Value;
- if (height != null) shape.Height = height.Value;
+ if (relativeToOriginSize == null || relativeToOriginSize <= 0) {
+ if (width != null) shape.Width = width.Value;
+ if (height != null) shape.Height = height.Value;
+ } else {
+ var factor = relativeToOriginSize.Value;
+ shape.ScaleHeight(factor, Office.MsoTriState.msoTrue); // Office.MsoScaleFrom.msoScaleFromTopLeft
+ shape.ScaleWidth(factor, Office.MsoTriState.msoTrue);
+ }
var (newWidth, newHeight) = (shape.Width, shape.Height);
switch (scaleFromFlag) {
- case Office.MsoScaleFrom.msoScaleFromTopLeft:
+ case ScaleFromFlag.FromTopLeft:
break;
- case Office.MsoScaleFrom.msoScaleFromMiddle:
- shape.Left = oldLeft - (newWidth - oldWidth) / 2;
+ case ScaleFromFlag.FromTopRight:
+ shape.Left = oldLeft - (newWidth - oldWidth);
+ break;
+ case ScaleFromFlag.FromBottomLeft:
+ shape.Top = oldTop - (newHeight - oldHeight);
+ break;
+ case ScaleFromFlag.FromBottomRight:
+ shape.Left = oldLeft - (newWidth - oldWidth);
+ shape.Top = oldTop - (newHeight - oldHeight);
+ break;
+ case ScaleFromFlag.FromLeft:
shape.Top = oldTop - (newHeight - oldHeight) / 2;
break;
- case Office.MsoScaleFrom.msoScaleFromBottomRight:
+ case ScaleFromFlag.FromRight:
shape.Left = oldLeft - (newWidth - oldWidth);
+ shape.Top = oldTop - (newHeight - oldHeight) / 2;
+ break;
+ case ScaleFromFlag.FromTop:
+ shape.Left = oldLeft - (newWidth - oldWidth) / 2;
+ break;
+ case ScaleFromFlag.FromBottom:
+ shape.Left = oldLeft - (newWidth - oldWidth) / 2;
shape.Top = oldTop - (newHeight - oldHeight);
break;
+ case ScaleFromFlag.FromCenter:
+ shape.Left = oldLeft - (newWidth - oldWidth) / 2;
+ shape.Top = oldTop - (newHeight - oldHeight) / 2;
+ break;
}
shape.LockAspectRatio = oldLockSate;
}
- public static void ScaleWidthTo(this PowerPoint.Shape shape, float width, Office.MsoScaleFrom scaleFromFlag) {
+ public static void ScaleWidthTo(this PowerPoint.Shape shape, float width, ScaleFromFlag scaleFromFlag) {
shape.ScaleSizeTo(width, null, scaleFromFlag);
}
- public static void ScaleHeightTo(this PowerPoint.Shape shape, float height, Office.MsoScaleFrom scaleFromFlag) {
+ public static void ScaleHeightTo(this PowerPoint.Shape shape, float height, ScaleFromFlag scaleFromFlag) {
shape.ScaleSizeTo(null, height, scaleFromFlag);
}
@@ -98,7 +136,7 @@ public enum SizeKind {
Width
}
- public static void ChangeSizeOfString(PowerPoint.ShapeRange? shapeRange, SizeKind? sizeKind, Office.MsoScaleFrom? scaleFromFlag, string? input, Action? uiInvalidator = null) {
+ public static void ChangeSizeOfString(PowerPoint.ShapeRange? shapeRange, SizeKind? sizeKind, ScaleFromFlag? scaleFromFlag, string? input, Action? uiInvalidator = null) {
if (shapeRange == null || shapeRange.Count <= 0) {
return;
}
@@ -111,7 +149,7 @@ public static void ChangeSizeOfString(PowerPoint.ShapeRange? shapeRange, SizeKin
return;
}
- scaleFromFlag ??= Office.MsoScaleFrom.msoScaleFromTopLeft;
+ scaleFromFlag ??= ScaleFromFlag.FromTopLeft;
Globals.ThisAddIn.Application.StartNewUndoEntry();
switch (sizeKind) {
@@ -209,6 +247,9 @@ public static (string, bool) GetPositionOfString(PowerPoint.ShapeRange? shapeRan
private static float _copiedPositionXPt = InvalidCopiedValue;
private static float _copiedPositionYPt = InvalidCopiedValue;
+ private static float _copiedDistanceHPt = InvalidCopiedValue;
+ private static float _copiedDistanceVPt = InvalidCopiedValue;
+
public static bool IsSizeCopyable(PowerPoint.ShapeRange? shapeRange) {
if (shapeRange == null || shapeRange.Count <= 0) {
return false;
@@ -231,13 +272,21 @@ public static bool IsValidCopiedPositionValue() {
return !_copiedPositionXPt.Equals(InvalidCopiedValue) && !_copiedPositionYPt.Equals(InvalidCopiedValue);
}
+ public static bool IsValidCopiedDistanceHValue() {
+ return !_copiedDistanceHPt.Equals(InvalidCopiedValue);
+ }
+
+ public static bool IsValidCopiedDistanceVValue() {
+ return !_copiedDistanceVPt.Equals(InvalidCopiedValue);
+ }
+
public enum CopyAndPasteCmd {
Copy,
Paste,
Reset
}
- public static void CopyAndPasteSize(PowerPoint.ShapeRange? shapeRange, CopyAndPasteCmd? cmd, Office.MsoScaleFrom scaleFromFlag, Action? uiInvalidator = null) {
+ public static void CopyAndPasteSize(PowerPoint.ShapeRange? shapeRange, CopyAndPasteCmd? cmd, ScaleFromFlag? scaleFromFlag, Action? uiInvalidator = null) {
if (shapeRange == null || shapeRange.Count <= 0) {
return;
}
@@ -256,6 +305,7 @@ public static void CopyAndPasteSize(PowerPoint.ShapeRange? shapeRange, CopyAndPa
case CopyAndPasteCmd.Paste:
if (IsValidCopiedSizeValue()) {
Globals.ThisAddIn.Application.StartNewUndoEntry();
+ scaleFromFlag ??= ScaleFromFlag.FromTopLeft;
foreach (var shape in shapeRange.OfType().ToArray()) {
shape.ScaleSizeTo(_copiedSizeWPt, _copiedSizeHPt, scaleFromFlag);
}
@@ -302,6 +352,153 @@ public static void CopyAndPastePosition(PowerPoint.ShapeRange? shapeRange, CopyA
}
}
+ public enum DistanceType {
+ RightLeft,
+ LeftLeft,
+ RightRight,
+ LeftRight
+ }
+
+ public static void CopyAndPasteDistance(PowerPoint.ShapeRange? shapeRange, CopyAndPasteCmd? cmd, DistanceType? type, bool isHOrV, Action? uiInvalidator = null) {
+ if (shapeRange == null) {
+ return;
+ }
+ if (cmd == null) {
+ return;
+ }
+ type ??= DistanceType.RightLeft;
+
+ switch (cmd!) {
+ case CopyAndPasteCmd.Copy: {
+ var shapes = shapeRange.OfType().ToArray();
+ if (shapes.Length != 2) {
+ return;
+ }
+ var (shape1, shape2) = (shapes[0], shapes[1]);
+ var (left1, left2) = (shape1.Left, shape2.Left);
+ var (width1, width2) = (shape1.Width, shape2.Width);
+ var (top1, top2) = (shape1.Top, shape2.Top);
+ var (height1, height2) = (shape1.Height, shape2.Height);
+ bool seperated12, seperated21, intersected12, intersected21, contained12, contained21;
+ if (isHOrV) {
+ seperated12 = left1 <= left2 && left1 + width1 <= left2;
+ seperated21 = left2 <= left1 && left2 + width2 <= left1;
+ intersected12 = left1 <= left2 && left1 + width1 >= left2 && left1 + width1 <= left2 + width2;
+ intersected21 = left2 <= left1 && left2 + width2 >= left1 && left2 + width2 <= left1 + width1;
+ contained12 = left1 <= left2 && left1 + width1 >= left2 + width2;
+ contained21 = left2 <= left1 && left2 + width2 >= left1 + width1;
+ } else {
+ seperated12 = top1 <= top2 && top1 + height1 <= top2;
+ seperated21 = top2 <= top1 && top2 + height2 <= top1;
+ intersected12 = top1 <= top2 && top1 + height1 >= top2 && top1 + height1 <= top2 + height2;
+ intersected21 = top2 <= top1 && top2 + height2 >= top1 && top2 + height2 <= top1 + height1;
+ contained12 = top1 <= top2 && top1 + height1 >= top2 + height2;
+ contained21 = top2 <= top1 && top2 + height2 >= top1 + height1;
+ }
+ float distanceH = InvalidCopiedValue, distanceV = InvalidCopiedValue;
+ switch (type!) {
+ case DistanceType.LeftLeft:
+ if (!contained12 && !contained21) {
+ distanceH = Math.Abs(left1 - left2);
+ distanceV = Math.Abs(top1 - top2);
+ } else if (contained12) {
+ distanceH = left2 - left1;
+ distanceV = top2 - top1;
+ } else if (contained21) {
+ distanceH = left1 - left2;
+ distanceV = top1 - top2;
+ }
+ break;
+ case DistanceType.RightRight:
+ if (!contained12 && !contained21) {
+ distanceH = Math.Abs((left1 + width1) - (left2 + width2));
+ distanceV = Math.Abs((top1 + height1) - (top2 + height2));
+ } else if (contained12) {
+ distanceH = (left2 + width2) - (left1 + width1);
+ distanceV = (top2 + height2) - (top1 + height1);
+ } else if (contained21) {
+ distanceH = (left1 + width1) - (left2 + width2);
+ distanceV = (top1 + height1) - (top2 + height2);
+ }
+ break;
+ case DistanceType.RightLeft:
+ if (seperated12) {
+ distanceH = left2 - (left1 + width1);
+ distanceV = top2 - (top1 + height1);
+ } else if (seperated21) {
+ distanceH = left1 - (left2 + width2);
+ distanceV = top1 - (top2 + height2);
+ } else if (intersected12 || contained12) {
+ distanceH = left2 - (left1 + width1);
+ distanceV = top2 - (top1 + height1);
+ } else if (intersected21 || contained21) {
+ distanceH = left1 - (left2 + width2);
+ distanceV = top1 - (top2 + height2);
+ }
+ break;
+ case DistanceType.LeftRight:
+ if (seperated12 || intersected12) {
+ distanceH = (left2 + width2) - left1;
+ distanceV = (top2 + height2) - top1;
+ } else if (seperated21 || intersected21) {
+ distanceH = (left1 + width1) - left2;
+ distanceV = (top1 + height1) - top2;
+ } else if (contained12) {
+ distanceH = (left2 + width2) - left1;
+ distanceV = (top2 + height2) - top1;
+ } else if (contained21) {
+ distanceH = (left1 + width1) - left2;
+ distanceV = (top1 + height1) - top2;
+ }
+ break;
+ }
+ if (isHOrV && !distanceH.Equals(InvalidCopiedValue)) {
+ _copiedDistanceHPt = distanceH;
+ } else if (!isHOrV && !distanceV.Equals(InvalidCopiedValue)) {
+ _copiedDistanceVPt = distanceV;
+ }
+ uiInvalidator?.Invoke();
+ break;
+ }
+ case CopyAndPasteCmd.Paste: {
+ var shapes = shapeRange.OfType().ToArray();
+ if (shapes.Length != 2) {
+ return;
+ }
+ var (shape1, shape2) = (shapes[0], shapes[1]);
+ if (isHOrV && IsValidCopiedDistanceHValue()) {
+ Globals.ThisAddIn.Application.StartNewUndoEntry();
+ // => move the second shape
+ shape2.Left = type! switch {
+ DistanceType.RightLeft => shape1.Left + shape1.Width + _copiedDistanceHPt,
+ DistanceType.LeftLeft => shape1.Left + _copiedDistanceHPt,
+ DistanceType.RightRight => shape1.Left + shape1.Width + _copiedDistanceHPt - shape2.Width,
+ DistanceType.LeftRight => shape1.Left + _copiedDistanceHPt - shape2.Width,
+ _ => shape2.Left
+ };
+ uiInvalidator?.Invoke();
+ } else if (!isHOrV && IsValidCopiedDistanceVValue()) {
+ Globals.ThisAddIn.Application.StartNewUndoEntry();
+ // => move the second shape
+ shape2.Top = type! switch {
+ DistanceType.RightLeft => shape1.Top + shape1.Height + _copiedDistanceVPt,
+ DistanceType.LeftLeft => shape1.Top + _copiedDistanceVPt,
+ DistanceType.RightRight => shape1.Top + shape1.Height + _copiedDistanceVPt - shape2.Height,
+ DistanceType.LeftRight => shape1.Top + _copiedDistanceVPt - shape2.Height,
+ _ => shape2.Top
+ };
+ uiInvalidator?.Invoke();
+ }
+ break;
+ }
+ case CopyAndPasteCmd.Reset:
+ _copiedDistanceHPt = InvalidCopiedValue;
+ _copiedDistanceVPt = InvalidCopiedValue;
+ uiInvalidator?.Invoke();
+ break;
+ }
+ }
+
public static bool IsSizeResettable(PowerPoint.ShapeRange? shapeRange) {
if (shapeRange == null || shapeRange.Count <= 0) {
return false;
@@ -311,7 +508,7 @@ public static bool IsSizeResettable(PowerPoint.ShapeRange? shapeRange) {
return shapes.Length > 0;
}
- public static void ResetMediaSize(PowerPoint.ShapeRange? shapeRange, Office.MsoScaleFrom? scaleFromFlag, Action? uiInvalidator = null) {
+ public static void ResetMediaSize(PowerPoint.ShapeRange? shapeRange, ScaleFromFlag? scaleFromFlag, Action? uiInvalidator = null) {
if (shapeRange == null || shapeRange.Count <= 0) {
return;
}
@@ -321,15 +518,12 @@ public static void ResetMediaSize(PowerPoint.ShapeRange? shapeRange, Office.MsoS
return;
}
- const Office.MsoTriState relativeToOriginalSize = Office.MsoTriState.msoTrue;
- scaleFromFlag ??= Office.MsoScaleFrom.msoScaleFromTopLeft;
-
+ scaleFromFlag ??= ScaleFromFlag.FromTopLeft;
Globals.ThisAddIn.Application.StartNewUndoEntry();
foreach (var shape in shapes) {
var isSound = shape.Type == Office.MsoShapeType.msoMedia && shape.MediaType == PowerPoint.PpMediaType.ppMediaTypeSound;
var factor = !isSound ? 1F : 0.25F;
- shape.ScaleWidth(factor, relativeToOriginalSize, scaleFromFlag.Value);
- shape.ScaleHeight(factor, relativeToOriginalSize, scaleFromFlag.Value);
+ shape.ScaleSizeTo(null, null, scaleFromFlag, factor);
shape.Rotation = 0;
if (shape.HorizontalFlip == Office.MsoTriState.msoTrue) {
shape.Flip(Office.MsoFlipCmd.msoFlipHorizontal);
diff --git a/PowerPointArrangeAddin/Icon/Flat/AddInOptions_32.png b/PowerPointArrangeAddin/Icon/Flat/AddInOptions_32.png
index fd5a3f7..3eb470f 100644
Binary files a/PowerPointArrangeAddin/Icon/Flat/AddInOptions_32.png and b/PowerPointArrangeAddin/Icon/Flat/AddInOptions_32.png differ
diff --git a/PowerPointArrangeAddin/Icon/Flat/GridSetting.png b/PowerPointArrangeAddin/Icon/Flat/GridSetting.png
index f870834..2110750 100644
Binary files a/PowerPointArrangeAddin/Icon/Flat/GridSetting.png and b/PowerPointArrangeAddin/Icon/Flat/GridSetting.png differ
diff --git a/PowerPointArrangeAddin/Icon/Flat/GridSetting_32.png b/PowerPointArrangeAddin/Icon/Flat/GridSetting_32.png
deleted file mode 100644
index 440bb17..0000000
Binary files a/PowerPointArrangeAddin/Icon/Flat/GridSetting_32.png and /dev/null differ
diff --git a/PowerPointArrangeAddin/Icon/Flat/GridSwitcher.png b/PowerPointArrangeAddin/Icon/Flat/GridSwitcher.png
new file mode 100644
index 0000000..f870834
Binary files /dev/null and b/PowerPointArrangeAddin/Icon/Flat/GridSwitcher.png differ
diff --git a/PowerPointArrangeAddin/Icon/Flat/ObjectFlipHorizontal.png b/PowerPointArrangeAddin/Icon/Flat/ObjectFlipHorizontal.png
index 0f9e98f..8ca02d8 100644
Binary files a/PowerPointArrangeAddin/Icon/Flat/ObjectFlipHorizontal.png and b/PowerPointArrangeAddin/Icon/Flat/ObjectFlipHorizontal.png differ
diff --git a/PowerPointArrangeAddin/Icon/Flat/ObjectFlipVertical.png b/PowerPointArrangeAddin/Icon/Flat/ObjectFlipVertical.png
index 433abac..9f9276c 100644
Binary files a/PowerPointArrangeAddin/Icon/Flat/ObjectFlipVertical.png and b/PowerPointArrangeAddin/Icon/Flat/ObjectFlipVertical.png differ
diff --git a/PowerPointArrangeAddin/Icon/Flat/PictureChange_32.png b/PowerPointArrangeAddin/Icon/Flat/PictureChange_32.png
new file mode 100644
index 0000000..fa9c788
Binary files /dev/null and b/PowerPointArrangeAddin/Icon/Flat/PictureChange_32.png differ
diff --git a/PowerPointArrangeAddin/Icon/Flat/ScaleFromBottom.png b/PowerPointArrangeAddin/Icon/Flat/ScaleFromBottom.png
new file mode 100644
index 0000000..435491b
Binary files /dev/null and b/PowerPointArrangeAddin/Icon/Flat/ScaleFromBottom.png differ
diff --git a/PowerPointArrangeAddin/Icon/Flat/ScaleFromBottomLeft.png b/PowerPointArrangeAddin/Icon/Flat/ScaleFromBottomLeft.png
new file mode 100644
index 0000000..8392b4e
Binary files /dev/null and b/PowerPointArrangeAddin/Icon/Flat/ScaleFromBottomLeft.png differ
diff --git a/PowerPointArrangeAddin/Icon/Flat/ScaleFromMiddle.png b/PowerPointArrangeAddin/Icon/Flat/ScaleFromCenter.png
similarity index 100%
rename from PowerPointArrangeAddin/Icon/Flat/ScaleFromMiddle.png
rename to PowerPointArrangeAddin/Icon/Flat/ScaleFromCenter.png
diff --git a/PowerPointArrangeAddin/Icon/Flat/ScaleFromLeft.png b/PowerPointArrangeAddin/Icon/Flat/ScaleFromLeft.png
new file mode 100644
index 0000000..4dd6964
Binary files /dev/null and b/PowerPointArrangeAddin/Icon/Flat/ScaleFromLeft.png differ
diff --git a/PowerPointArrangeAddin/Icon/Flat/ScaleFromRight.png b/PowerPointArrangeAddin/Icon/Flat/ScaleFromRight.png
new file mode 100644
index 0000000..7dc4e4a
Binary files /dev/null and b/PowerPointArrangeAddin/Icon/Flat/ScaleFromRight.png differ
diff --git a/PowerPointArrangeAddin/Icon/Flat/ScaleFromTop.png b/PowerPointArrangeAddin/Icon/Flat/ScaleFromTop.png
new file mode 100644
index 0000000..3ad27de
Binary files /dev/null and b/PowerPointArrangeAddin/Icon/Flat/ScaleFromTop.png differ
diff --git a/PowerPointArrangeAddin/Icon/Flat/ScaleFromTopRight.png b/PowerPointArrangeAddin/Icon/Flat/ScaleFromTopRight.png
new file mode 100644
index 0000000..453e8cd
Binary files /dev/null and b/PowerPointArrangeAddin/Icon/Flat/ScaleFromTopRight.png differ
diff --git a/PowerPointArrangeAddin/Icon/Flat/ScaleSameSize.png b/PowerPointArrangeAddin/Icon/Flat/ScaleSameSize.png
index da3e1fe..2f36c7b 100644
Binary files a/PowerPointArrangeAddin/Icon/Flat/ScaleSameSize.png and b/PowerPointArrangeAddin/Icon/Flat/ScaleSameSize.png differ
diff --git a/PowerPointArrangeAddin/Icon/Flat/ShapeDistanceType_LeftLeft.png b/PowerPointArrangeAddin/Icon/Flat/ShapeDistanceType_LeftLeft.png
new file mode 100644
index 0000000..db59b1b
Binary files /dev/null and b/PowerPointArrangeAddin/Icon/Flat/ShapeDistanceType_LeftLeft.png differ
diff --git a/PowerPointArrangeAddin/Icon/Flat/ShapeDistanceType_LeftRight.png b/PowerPointArrangeAddin/Icon/Flat/ShapeDistanceType_LeftRight.png
new file mode 100644
index 0000000..953c31c
Binary files /dev/null and b/PowerPointArrangeAddin/Icon/Flat/ShapeDistanceType_LeftRight.png differ
diff --git a/PowerPointArrangeAddin/Icon/Flat/ShapeDistanceType_RightLeft.png b/PowerPointArrangeAddin/Icon/Flat/ShapeDistanceType_RightLeft.png
new file mode 100644
index 0000000..42584cf
Binary files /dev/null and b/PowerPointArrangeAddin/Icon/Flat/ShapeDistanceType_RightLeft.png differ
diff --git a/PowerPointArrangeAddin/Icon/Flat/ShapeDistanceType_RightRight.png b/PowerPointArrangeAddin/Icon/Flat/ShapeDistanceType_RightRight.png
new file mode 100644
index 0000000..876b5bf
Binary files /dev/null and b/PowerPointArrangeAddin/Icon/Flat/ShapeDistanceType_RightRight.png differ
diff --git a/PowerPointArrangeAddin/Icon/FlatIconResources.Designer.cs b/PowerPointArrangeAddin/Icon/FlatIconResources.Designer.cs
index 497e709..44a3d92 100644
--- a/PowerPointArrangeAddin/Icon/FlatIconResources.Designer.cs
+++ b/PowerPointArrangeAddin/Icon/FlatIconResources.Designer.cs
@@ -223,9 +223,9 @@ internal static System.Drawing.Bitmap GridSetting {
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
- internal static System.Drawing.Bitmap GridSetting_32 {
+ internal static System.Drawing.Bitmap GridSwitcher {
get {
- object obj = ResourceManager.GetObject("GridSetting_32", resourceCulture);
+ object obj = ResourceManager.GetObject("GridSwitcher", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
@@ -480,6 +480,16 @@ internal static System.Drawing.Bitmap PictureChange {
}
}
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap PictureChange_32 {
+ get {
+ object obj = ResourceManager.GetObject("PictureChange_32", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
@@ -530,6 +540,26 @@ internal static System.Drawing.Bitmap ResetData {
}
}
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap ScaleFromBottom {
+ get {
+ object obj = ResourceManager.GetObject("ScaleFromBottom", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap ScaleFromBottomLeft {
+ get {
+ object obj = ResourceManager.GetObject("ScaleFromBottomLeft", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
@@ -543,9 +573,39 @@ internal static System.Drawing.Bitmap ScaleFromBottomRight {
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
- internal static System.Drawing.Bitmap ScaleFromMiddle {
+ internal static System.Drawing.Bitmap ScaleFromCenter {
+ get {
+ object obj = ResourceManager.GetObject("ScaleFromCenter", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap ScaleFromLeft {
+ get {
+ object obj = ResourceManager.GetObject("ScaleFromLeft", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap ScaleFromRight {
+ get {
+ object obj = ResourceManager.GetObject("ScaleFromRight", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap ScaleFromTop {
get {
- object obj = ResourceManager.GetObject("ScaleFromMiddle", resourceCulture);
+ object obj = ResourceManager.GetObject("ScaleFromTop", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
@@ -560,6 +620,16 @@ internal static System.Drawing.Bitmap ScaleFromTopLeft {
}
}
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap ScaleFromTopRight {
+ get {
+ object obj = ResourceManager.GetObject("ScaleFromTopRight", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
@@ -600,6 +670,46 @@ internal static System.Drawing.Bitmap SelectionPane {
}
}
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap ShapeDistanceType_LeftLeft {
+ get {
+ object obj = ResourceManager.GetObject("ShapeDistanceType_LeftLeft", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap ShapeDistanceType_LeftRight {
+ get {
+ object obj = ResourceManager.GetObject("ShapeDistanceType_LeftRight", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap ShapeDistanceType_RightLeft {
+ get {
+ object obj = ResourceManager.GetObject("ShapeDistanceType_RightLeft", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap ShapeDistanceType_RightRight {
+ get {
+ object obj = ResourceManager.GetObject("ShapeDistanceType_RightRight", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
diff --git a/PowerPointArrangeAddin/Icon/FlatIconResources.resx b/PowerPointArrangeAddin/Icon/FlatIconResources.resx
index 9ff0faa..1c240f1 100644
--- a/PowerPointArrangeAddin/Icon/FlatIconResources.resx
+++ b/PowerPointArrangeAddin/Icon/FlatIconResources.resx
@@ -199,12 +199,30 @@
Flat\ObjectSendToBack.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-
- Flat\ScaleFromMiddle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ Flat\ScaleFromCenter.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Flat\ScaleFromBottomRight.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ Flat\ScaleFromLeft.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ Flat\ScaleFromTop.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ Flat\ScaleFromRight.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ Flat\ScaleFromBottom.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ Flat\ScaleFromTopRight.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ Flat\ScaleFromBottomLeft.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
Flat\TextboxWrapText_32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
@@ -277,12 +295,15 @@
Flat\GridSetting.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-
- Flat\GridSetting_32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ Flat\GridSwitcher.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Flat\PictureChangeFromClipboard_32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ Flat\PictureChange_32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
Flat\TextEffectsMenu.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
@@ -310,6 +331,18 @@
Flat\ObjectPosition.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ Flat\ShapeDistanceType_RightLeft.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ Flat\ShapeDistanceType_LeftLeft.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ Flat\ShapeDistanceType_RightRight.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ Flat\ShapeDistanceType_LeftRight.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
Flat\AddInUpdate.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
diff --git a/PowerPointArrangeAddin/Icon/Material/AddInOptions_32.png b/PowerPointArrangeAddin/Icon/Material/AddInOptions_32.png
index f0256d9..c95cabf 100644
Binary files a/PowerPointArrangeAddin/Icon/Material/AddInOptions_32.png and b/PowerPointArrangeAddin/Icon/Material/AddInOptions_32.png differ
diff --git a/PowerPointArrangeAddin/Icon/Material/GridSetting.png b/PowerPointArrangeAddin/Icon/Material/GridSetting.png
index e86a981..0583b70 100644
Binary files a/PowerPointArrangeAddin/Icon/Material/GridSetting.png and b/PowerPointArrangeAddin/Icon/Material/GridSetting.png differ
diff --git a/PowerPointArrangeAddin/Icon/Material/GridSetting_32.png b/PowerPointArrangeAddin/Icon/Material/GridSetting_32.png
deleted file mode 100644
index e5e050e..0000000
Binary files a/PowerPointArrangeAddin/Icon/Material/GridSetting_32.png and /dev/null differ
diff --git a/PowerPointArrangeAddin/Icon/Material/GridSwitcher.png b/PowerPointArrangeAddin/Icon/Material/GridSwitcher.png
new file mode 100644
index 0000000..e86a981
Binary files /dev/null and b/PowerPointArrangeAddin/Icon/Material/GridSwitcher.png differ
diff --git a/PowerPointArrangeAddin/Icon/Material/PictureChange_32.png b/PowerPointArrangeAddin/Icon/Material/PictureChange_32.png
new file mode 100644
index 0000000..7a63fa5
Binary files /dev/null and b/PowerPointArrangeAddin/Icon/Material/PictureChange_32.png differ
diff --git a/PowerPointArrangeAddin/Icon/Material/ScaleFromBottom.png b/PowerPointArrangeAddin/Icon/Material/ScaleFromBottom.png
new file mode 100644
index 0000000..907cebd
Binary files /dev/null and b/PowerPointArrangeAddin/Icon/Material/ScaleFromBottom.png differ
diff --git a/PowerPointArrangeAddin/Icon/Material/ScaleFromBottomLeft.png b/PowerPointArrangeAddin/Icon/Material/ScaleFromBottomLeft.png
new file mode 100644
index 0000000..c6631b4
Binary files /dev/null and b/PowerPointArrangeAddin/Icon/Material/ScaleFromBottomLeft.png differ
diff --git a/PowerPointArrangeAddin/Icon/Material/ScaleFromMiddle.png b/PowerPointArrangeAddin/Icon/Material/ScaleFromCenter.png
similarity index 100%
rename from PowerPointArrangeAddin/Icon/Material/ScaleFromMiddle.png
rename to PowerPointArrangeAddin/Icon/Material/ScaleFromCenter.png
diff --git a/PowerPointArrangeAddin/Icon/Material/ScaleFromLeft.png b/PowerPointArrangeAddin/Icon/Material/ScaleFromLeft.png
new file mode 100644
index 0000000..df0ce28
Binary files /dev/null and b/PowerPointArrangeAddin/Icon/Material/ScaleFromLeft.png differ
diff --git a/PowerPointArrangeAddin/Icon/Material/ScaleFromRight.png b/PowerPointArrangeAddin/Icon/Material/ScaleFromRight.png
new file mode 100644
index 0000000..da236b4
Binary files /dev/null and b/PowerPointArrangeAddin/Icon/Material/ScaleFromRight.png differ
diff --git a/PowerPointArrangeAddin/Icon/Material/ScaleFromTop.png b/PowerPointArrangeAddin/Icon/Material/ScaleFromTop.png
new file mode 100644
index 0000000..656e729
Binary files /dev/null and b/PowerPointArrangeAddin/Icon/Material/ScaleFromTop.png differ
diff --git a/PowerPointArrangeAddin/Icon/Material/ScaleFromTopRight.png b/PowerPointArrangeAddin/Icon/Material/ScaleFromTopRight.png
new file mode 100644
index 0000000..f55e306
Binary files /dev/null and b/PowerPointArrangeAddin/Icon/Material/ScaleFromTopRight.png differ
diff --git a/PowerPointArrangeAddin/Icon/Material/ShapeDistanceType_LeftLeft.png b/PowerPointArrangeAddin/Icon/Material/ShapeDistanceType_LeftLeft.png
new file mode 100644
index 0000000..82d2389
Binary files /dev/null and b/PowerPointArrangeAddin/Icon/Material/ShapeDistanceType_LeftLeft.png differ
diff --git a/PowerPointArrangeAddin/Icon/Material/ShapeDistanceType_LeftRight.png b/PowerPointArrangeAddin/Icon/Material/ShapeDistanceType_LeftRight.png
new file mode 100644
index 0000000..18ae3c2
Binary files /dev/null and b/PowerPointArrangeAddin/Icon/Material/ShapeDistanceType_LeftRight.png differ
diff --git a/PowerPointArrangeAddin/Icon/Material/ShapeDistanceType_RightLeft.png b/PowerPointArrangeAddin/Icon/Material/ShapeDistanceType_RightLeft.png
new file mode 100644
index 0000000..a7541bd
Binary files /dev/null and b/PowerPointArrangeAddin/Icon/Material/ShapeDistanceType_RightLeft.png differ
diff --git a/PowerPointArrangeAddin/Icon/Material/ShapeDistanceType_RightRight.png b/PowerPointArrangeAddin/Icon/Material/ShapeDistanceType_RightRight.png
new file mode 100644
index 0000000..fb58df9
Binary files /dev/null and b/PowerPointArrangeAddin/Icon/Material/ShapeDistanceType_RightRight.png differ
diff --git a/PowerPointArrangeAddin/Icon/MaterialIconResources.Designer.cs b/PowerPointArrangeAddin/Icon/MaterialIconResources.Designer.cs
index 3474cab..c6c6b5c 100644
--- a/PowerPointArrangeAddin/Icon/MaterialIconResources.Designer.cs
+++ b/PowerPointArrangeAddin/Icon/MaterialIconResources.Designer.cs
@@ -223,9 +223,9 @@ internal static System.Drawing.Bitmap GridSetting {
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
- internal static System.Drawing.Bitmap GridSetting_32 {
+ internal static System.Drawing.Bitmap GridSwitcher {
get {
- object obj = ResourceManager.GetObject("GridSetting_32", resourceCulture);
+ object obj = ResourceManager.GetObject("GridSwitcher", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
@@ -480,6 +480,16 @@ internal static System.Drawing.Bitmap PictureChange {
}
}
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap PictureChange_32 {
+ get {
+ object obj = ResourceManager.GetObject("PictureChange_32", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
@@ -530,6 +540,26 @@ internal static System.Drawing.Bitmap ResetData {
}
}
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap ScaleFromBottom {
+ get {
+ object obj = ResourceManager.GetObject("ScaleFromBottom", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap ScaleFromBottomLeft {
+ get {
+ object obj = ResourceManager.GetObject("ScaleFromBottomLeft", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
@@ -543,9 +573,39 @@ internal static System.Drawing.Bitmap ScaleFromBottomRight {
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
- internal static System.Drawing.Bitmap ScaleFromMiddle {
+ internal static System.Drawing.Bitmap ScaleFromCenter {
+ get {
+ object obj = ResourceManager.GetObject("ScaleFromCenter", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap ScaleFromLeft {
+ get {
+ object obj = ResourceManager.GetObject("ScaleFromLeft", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap ScaleFromRight {
+ get {
+ object obj = ResourceManager.GetObject("ScaleFromRight", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap ScaleFromTop {
get {
- object obj = ResourceManager.GetObject("ScaleFromMiddle", resourceCulture);
+ object obj = ResourceManager.GetObject("ScaleFromTop", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
@@ -560,6 +620,16 @@ internal static System.Drawing.Bitmap ScaleFromTopLeft {
}
}
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap ScaleFromTopRight {
+ get {
+ object obj = ResourceManager.GetObject("ScaleFromTopRight", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
@@ -600,6 +670,46 @@ internal static System.Drawing.Bitmap SelectionPane {
}
}
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap ShapeDistanceType_LeftLeft {
+ get {
+ object obj = ResourceManager.GetObject("ShapeDistanceType_LeftLeft", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap ShapeDistanceType_LeftRight {
+ get {
+ object obj = ResourceManager.GetObject("ShapeDistanceType_LeftRight", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap ShapeDistanceType_RightLeft {
+ get {
+ object obj = ResourceManager.GetObject("ShapeDistanceType_RightLeft", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap ShapeDistanceType_RightRight {
+ get {
+ object obj = ResourceManager.GetObject("ShapeDistanceType_RightRight", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
diff --git a/PowerPointArrangeAddin/Icon/MaterialIconResources.resx b/PowerPointArrangeAddin/Icon/MaterialIconResources.resx
index dbb4b3c..8f8f3ec 100644
--- a/PowerPointArrangeAddin/Icon/MaterialIconResources.resx
+++ b/PowerPointArrangeAddin/Icon/MaterialIconResources.resx
@@ -199,12 +199,30 @@
Material\ObjectSendToBack.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-
- Material\ScaleFromMiddle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ Material\ScaleFromCenter.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Material\ScaleFromBottomRight.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ Material\ScaleFromLeft.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ Material\ScaleFromTop.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ Material\ScaleFromRight.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ Material\ScaleFromBottom.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ Material\ScaleFromTopRight.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ Material\ScaleFromBottomLeft.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
Material\TextboxWrapText_32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
@@ -277,12 +295,15 @@
Material\GridSetting.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-
- Material\GridSetting_32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ Material\GridSwitcher.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Material\PictureChangeFromClipboard_32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ Material\PictureChange_32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
Material\TextEffectsMenu.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
@@ -310,6 +331,18 @@
Material\ObjectPosition.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ Material\ShapeDistanceType_RightLeft.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ Material\ShapeDistanceType_LeftLeft.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ Material\ShapeDistanceType_RightRight.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ Material\ShapeDistanceType_LeftRight.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
Material\AddInUpdate.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
diff --git a/PowerPointArrangeAddin/Misc/AddInSetting.cs b/PowerPointArrangeAddin/Misc/AddInSetting.cs
index 9e6230b..de58390 100644
--- a/PowerPointArrangeAddin/Misc/AddInSetting.cs
+++ b/PowerPointArrangeAddin/Misc/AddInSetting.cs
@@ -32,6 +32,7 @@ public static AddInSetting Instance {
public string IgnoreUpdateRecord { get; set; } = "";
public bool LessButtonsForArrangementGroup { get; set; }
public bool HideMarginSettingForTextboxGroup { get; set; }
+ public bool AllowDoublePressExtendButton { get; set; }
public AddInIconStyle IconStyle { get; set; }
public void Load() {
@@ -52,6 +53,7 @@ public void Load() {
IgnoreUpdateRecord = Properties.Settings.Default.ignoreUpdateRecord;
LessButtonsForArrangementGroup = Properties.Settings.Default.lessButtonsForArrangementGroup;
HideMarginSettingForTextboxGroup = Properties.Settings.Default.hideMarginSettingForTextboxGroup;
+ AllowDoublePressExtendButton = Properties.Settings.Default.allowDoublePressExtendButton;
IconStyle = Properties.Settings.Default.iconStyle.ToAddInIconStyle();
}
@@ -73,6 +75,7 @@ public void Save() {
Properties.Settings.Default.ignoreUpdateRecord = IgnoreUpdateRecord;
Properties.Settings.Default.lessButtonsForArrangementGroup = LessButtonsForArrangementGroup;
Properties.Settings.Default.hideMarginSettingForTextboxGroup = HideMarginSettingForTextboxGroup;
+ Properties.Settings.Default.allowDoublePressExtendButton = AllowDoublePressExtendButton;
Properties.Settings.Default.iconStyle = IconStyle.ToIconStyleString();
Properties.Settings.Default.Save();
}
diff --git a/PowerPointArrangeAddin/PowerPointArrangeAddin.csproj b/PowerPointArrangeAddin/PowerPointArrangeAddin.csproj
index 12b7fc9..375307f 100644
--- a/PowerPointArrangeAddin/PowerPointArrangeAddin.csproj
+++ b/PowerPointArrangeAddin/PowerPointArrangeAddin.csproj
@@ -34,7 +34,7 @@
./Publish
en
- 1.1.0.0
+ 1.2.0.0
false
false
0
@@ -260,6 +260,7 @@
+
diff --git a/PowerPointArrangeAddin/Properties/AssemblyInfo.cs b/PowerPointArrangeAddin/Properties/AssemblyInfo.cs
index 5576e9e..992aeae 100644
--- a/PowerPointArrangeAddin/Properties/AssemblyInfo.cs
+++ b/PowerPointArrangeAddin/Properties/AssemblyInfo.cs
@@ -34,6 +34,6 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.1.0")]
-[assembly: AssemblyFileVersion("1.1.0")]
+[assembly: AssemblyVersion("1.2.0")]
+[assembly: AssemblyFileVersion("1.2.0")]
[assembly: NeutralResourcesLanguage("")]
diff --git a/PowerPointArrangeAddin/Properties/Settings.Designer.cs b/PowerPointArrangeAddin/Properties/Settings.Designer.cs
index 1ffdaf0..dc658d3 100644
--- a/PowerPointArrangeAddin/Properties/Settings.Designer.cs
+++ b/PowerPointArrangeAddin/Properties/Settings.Designer.cs
@@ -203,6 +203,18 @@ public bool hideMarginSettingForTextboxGroup {
}
}
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("True")]
+ public bool allowDoublePressExtendButton {
+ get {
+ return ((bool)(this["allowDoublePressExtendButton"]));
+ }
+ set {
+ this["allowDoublePressExtendButton"] = value;
+ }
+ }
+
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
diff --git a/PowerPointArrangeAddin/Properties/Settings.settings b/PowerPointArrangeAddin/Properties/Settings.settings
index 5b70c78..930ea60 100644
--- a/PowerPointArrangeAddin/Properties/Settings.settings
+++ b/PowerPointArrangeAddin/Properties/Settings.settings
@@ -47,6 +47,9 @@
False
+
+ True
+
True
diff --git a/PowerPointArrangeAddin/Ribbon/ArrangeRibbon.Internal.cs b/PowerPointArrangeAddin/Ribbon/ArrangeRibbon.Internal.cs
index d723cfd..72778d2 100644
--- a/PowerPointArrangeAddin/Ribbon/ArrangeRibbon.Internal.cs
+++ b/PowerPointArrangeAddin/Ribbon/ArrangeRibbon.Internal.cs
@@ -38,6 +38,7 @@ public string GetMenuContent(Office.IRibbonControl _) {
xml = XmlResourceHelper.ApplyTemplateForXml(xml);
xml = XmlResourceHelper.ApplyControlRandomId(xml);
xml = XmlResourceHelper.NormalizeControlIdInMenu(xml, mnuArrangement);
+ // System.Windows.Forms.Clipboard.SetText(xml);
return xml;
}
@@ -113,38 +114,8 @@ public string GetKeytip(string ribbonControlId) {
private const string grpWordArt = "grpWordArt";
// grpArrange
private const string grpArrange = "grpArrange";
- private const string btnAlignLeft = "btnAlignLeft";
- private const string btnAlignCenter = "btnAlignCenter";
- private const string btnAlignRight = "btnAlignRight";
- private const string btnAlignTop = "btnAlignTop";
- private const string btnAlignMiddle = "btnAlignMiddle";
- private const string btnAlignBottom = "btnAlignBottom";
- private const string btnDistributeHorizontal = "btnDistributeHorizontal";
- private const string btnDistributeVertical = "btnDistributeVertical";
private const string btnAlignRelative = "btnAlignRelative";
- private const string btnScaleSameWidth = "btnScaleSameWidth";
- private const string btnScaleSameHeight = "btnScaleSameHeight";
- private const string btnScaleSameSize = "btnScaleSameSize";
private const string btnScaleAnchor = "btnScaleAnchor";
- private const string btnExtendSameLeft = "btnExtendSameLeft";
- private const string btnExtendSameRight = "btnExtendSameRight";
- private const string btnExtendSameTop = "btnExtendSameTop";
- private const string btnExtendSameBottom = "btnExtendSameBottom";
- private const string btnSnapLeft = "btnSnapLeft";
- private const string btnSnapRight = "btnSnapRight";
- private const string btnSnapTop = "btnSnapTop";
- private const string btnSnapBottom = "btnSnapBottom";
- private const string btnRotateRight90 = "btnRotateRight90";
- private const string btnRotateLeft90 = "btnRotateLeft90";
- private const string btnFlipVertical = "btnFlipVertical";
- private const string btnFlipHorizontal = "btnFlipHorizontal";
- private const string btnMoveFront = "btnMoveFront";
- private const string btnMoveBack = "btnMoveBack";
- private const string btnMoveForward = "btnMoveForward";
- private const string btnMoveBackward = "btnMoveBackward";
- private const string btnGroup = "btnGroup";
- private const string btnUngroup = "btnUngroup";
- private const string btnGridSetting = "btnGridSetting";
private const string mnuArrangement = "mnuArrangement";
private const string btnAddInSetting = "btnAddInSetting";
// ===
@@ -154,10 +125,10 @@ public string GetKeytip(string ribbonControlId) {
private const string sepScaleSize = "sepScaleSize";
private const string bgpScaleSize = "bgpScaleSize";
private const string bgpExtendSize = "bgpExtendSize";
- private const string bgpSnapObjects = "bgpSnapObjects";
+ private const string bgpSnap = "bgpSnap";
private const string sepRotate = "sepRotate";
- private const string bgpMoveLayers = "bgpMoveLayers";
private const string bgpRotate = "bgpRotate";
+ private const string bgpMoveLayers = "bgpMoveLayers";
private const string bgpGroupObjects = "bgpGroupObjects";
private const string sepArrangement = "sepArrangement";
// tabArrangement
@@ -172,19 +143,53 @@ public string GetKeytip(string ribbonControlId) {
private const string lblAlignmentH = "lblAlignmentH";
private const string lblAlignmentV = "lblAlignmentV";
private const string lblDistribute = "lblDistribute";
+ private const string btnAlignLeft = "btnAlignLeft";
+ private const string btnAlignCenter = "btnAlignCenter";
+ private const string btnAlignRight = "btnAlignRight";
+ private const string btnAlignTop = "btnAlignTop";
+ private const string btnAlignMiddle = "btnAlignMiddle";
+ private const string btnAlignBottom = "btnAlignBottom";
+ private const string btnDistributeHorizontal = "btnDistributeHorizontal";
+ private const string btnDistributeVertical = "btnDistributeVertical";
+ private const string lblSnapH = "lblSnapH";
+ private const string lblSnapV = "lblSnapV";
+ private const string lblGrid = "lblGrid";
+ private const string btnSnapLeft = "btnSnapLeft";
+ private const string btnSnapRight = "btnSnapRight";
+ private const string btnSnapTop = "btnSnapTop";
+ private const string btnSnapBottom = "btnSnapBottom";
+ private const string btnGridSwitcher = "btnGridSwitcher";
+ private const string btnGridSetting = "btnGridSetting";
private const string btnAlignRelative_ToObjects = "btnAlignRelative_ToObjects";
private const string btnAlignRelative_ToFirstObject = "btnAlignRelative_ToFirstObject";
private const string btnAlignRelative_ToSlide = "btnAlignRelative_ToSlide";
private const string btnSizeAndPosition = "btnSizeAndPosition";
// ===
+ private const string sepAlignSnap = "sepAlignSnap";
private const string sepAlignRelative = "sepAlignRelative";
- // grpSizeAndSnap
- private const string grpSizeAndSnap = "grpSizeAndSnap";
+ // grpResizing
+ private const string grpResizing = "grpResizing";
private const string lblScaleSize = "lblScaleSize";
private const string lblExtendSize = "lblExtendSize";
- private const string lblSnapObjects = "lblSnapObjects";
+ private const string btnScaleSameWidth = "btnScaleSameWidth";
+ private const string btnScaleSameHeight = "btnScaleSameHeight";
+ private const string btnScaleSameSize = "btnScaleSameSize";
+ private const string btnExtendSameLeft = "btnExtendSameLeft";
+ private const string btnExtendSameRight = "btnExtendSameRight";
+ private const string btnExtendSameTop = "btnExtendSameTop";
+ private const string btnExtendSameBottom = "btnExtendSameBottom";
+ private const string chkExtendToFirstObject = "chkExtendToFirstObject";
+ private const string lblScaleAnchor_FromTop = "lblScaleAnchor_FromTop";
+ private const string lblScaleAnchor_FromCenter = "lblScaleAnchor_FromCenter";
+ private const string lblScaleAnchor_FromBottom = "lblScaleAnchor_FromBottom";
private const string btnScaleAnchor_FromTopLeft = "btnScaleAnchor_FromTopLeft";
- private const string btnScaleAnchor_FromMiddle = "btnScaleAnchor_FromMiddle";
+ private const string btnScaleAnchor_FromTop = "btnScaleAnchor_FromTop";
+ private const string btnScaleAnchor_FromTopRight = "btnScaleAnchor_FromTopRight";
+ private const string btnScaleAnchor_FromLeft = "btnScaleAnchor_FromLeft";
+ private const string btnScaleAnchor_FromCenter = "btnScaleAnchor_FromCenter";
+ private const string btnScaleAnchor_FromRight = "btnScaleAnchor_FromRight";
+ private const string btnScaleAnchor_FromBottomLeft = "btnScaleAnchor_FromBottomLeft";
+ private const string btnScaleAnchor_FromBottom = "btnScaleAnchor_FromBottom";
private const string btnScaleAnchor_FromBottomRight = "btnScaleAnchor_FromBottomRight";
// ===
private const string sepScaleAnchor = "sepScaleAnchor";
@@ -193,6 +198,10 @@ public string GetKeytip(string ribbonControlId) {
private const string lblRotateObject = "lblRotateObject";
private const string lblFlipObject = "lblFlipObject";
private const string lbl3DRotation = "lbl3DRotation";
+ private const string btnRotateRight90 = "btnRotateRight90";
+ private const string btnRotateLeft90 = "btnRotateLeft90";
+ private const string btnFlipVertical = "btnFlipVertical";
+ private const string btnFlipHorizontal = "btnFlipHorizontal";
private const string edtAngle = "edtAngle";
private const string btnCopyAngle = "btnCopyAngle";
private const string btnPasteAngle = "btnPasteAngle";
@@ -207,11 +216,17 @@ public string GetKeytip(string ribbonControlId) {
private const string grpObjectArrange = "grpObjectArrange";
private const string lblMoveLayers = "lblMoveLayers";
private const string lblGroupObjects = "lblGroupObjects";
+ private const string btnMoveFront = "btnMoveFront";
+ private const string btnMoveBack = "btnMoveBack";
+ private const string btnMoveForward = "btnMoveForward";
+ private const string btnMoveBackward = "btnMoveBackward";
+ private const string btnGroup = "btnGroup";
+ private const string btnUngroup = "btnUngroup";
// ===
private const string bgpMoveFrontAndBack = "bgpMoveFrontAndBack";
private const string bgpMoveForwardAndBackward = "bgpMoveForwardAndBackward";
private const string bgpGroupAndUngroup = "bgpGroupAndUngroup";
- private const string sepGridSettings = "sepGridSettings";
+ private const string sepSizeAndPosition = "sepSizeAndPosition";
// grpObjectSize
private const string grpObjectSize = "grpObjectSize";
private const string btnResetSize = "btnResetSize";
@@ -229,8 +244,23 @@ public string GetKeytip(string ribbonControlId) {
private const string edtPositionY = "edtPositionY";
private const string btnCopyPosition = "btnCopyPosition";
private const string btnPastePosition = "btnPastePosition";
+ private const string lblDistanceType = "lblDistanceType";
+ private const string btnDistanceType_RightLeft = "btnDistanceType_RightLeft";
+ private const string btnDistanceType_LeftLeft = "btnDistanceType_LeftLeft";
+ private const string btnDistanceType_RightRight = "btnDistanceType_RightRight";
+ private const string btnDistanceType_LeftRight = "btnDistanceType_LeftRight";
+ private const string lblDistanceH = "lblDistanceH";
+ private const string btnCopyDistanceH = "btnCopyDistanceH";
+ private const string btnPasteDistanceH = "btnPasteDistanceH";
+ private const string lblDistanceV = "lblDistanceV";
+ private const string btnCopyDistanceV = "btnCopyDistanceV";
+ private const string btnPasteDistanceV = "btnPasteDistanceV";
// ===
private const string bgpCopyAndPastePosition = "bgpCopyAndPastePosition";
+ private const string sepCopyAndPasteDistance = "sepCopyAndPasteDistance";
+ private const string bgpDistanceType = "bgpDistanceType";
+ private const string bgpDistanceH = "bgpDistanceH";
+ private const string bgpDistanceV = "bgpDistanceV";
// grpTextbox
private const string grpTextbox = "grpTextbox";
private const string btnAutofitOff = "btnAutofitOff";
@@ -254,7 +284,8 @@ public string GetKeytip(string ribbonControlId) {
private const string grpReplacePicture = "grpReplacePicture";
private const string btnReplaceWithClipboard = "btnReplaceWithClipboard";
private const string btnReplaceWithFile = "btnReplaceWithFile";
- private const string chkReserveOriginalSize = "chkReserveOriginalSize";
+ private const string chkReplaceToFill = "chkReplaceToFill";
+ private const string chkReplaceToContain = "chkReplaceToContain";
private const string chkReplaceToMiddle = "chkReplaceToMiddle";
// grpSizeAndPosition
private const string grpShapeSizeAndPosition = "grpShapeSizeAndPosition";
@@ -271,7 +302,6 @@ public string GetKeytip(string ribbonControlId) {
private const string sepAlignmentAndResizing = "sepAlignmentAndResizing";
private const string mnuAlignment = "mnuAlignment";
private const string mnuResizing = "mnuResizing";
- private const string mnuSnapping = "mnuSnapping";
private const string mnuRotation = "mnuRotation";
private const string sepLayerOrderAndGrouping = "sepLayerOrderAndGrouping";
private const string mnuLayerOrder = "mnuLayerOrder";
@@ -299,7 +329,10 @@ public UiElement(string? label = null, string? imageName = null, string? keytip
}
public string? Label { get; }
+
+ // ReSharper disable once MemberCanBePrivate.Local
public string? ImageName { get; }
+
public string? Keytip { get; }
public System.Drawing.Image? Image { get; private set; }
@@ -322,14 +355,29 @@ public UiElement ApplyNameToImage() {
var map = new Dictionary();
var specialMap = new Dictionary>();
+ // register ui element normally
void Register(string id, UiElement ui) {
map[id] = ui.ApplyNameToImage();
}
- void RegisterS(string group, string id, UiElement ui) {
- if (!specialMap.TryGetValue(group, out var m)) {
- specialMap[group] = new Dictionary();
- m = specialMap[group];
+ // register ui element in special rule (for specific group)
+ void Segister(object group, string id, UiElement ui) {
+ string groupId;
+ if (group is string s) {
+ groupId = s;
+ } else if (group is (string item1, string item2)) {
+ groupId = this.CombineParentId(item1, item2);
+ } else if (group is object[] arr) {
+ foreach (var obj in arr) {
+ Segister(obj, id, ui);
+ }
+ return;
+ } else {
+ return;
+ }
+ if (!specialMap.TryGetValue(groupId, out var m)) {
+ specialMap[groupId] = new Dictionary();
+ m = specialMap[groupId];
}
m[id] = ui.ApplyNameToImage();
}
@@ -338,38 +386,8 @@ void RegisterS(string group, string id, UiElement ui) {
Register(grpWordArt, new UiElement(RL.grpWordArt, nameof(RIM.TextEffectsMenu)));
// grpArrange
Register(grpArrange, new UiElement(RL.grpArrange, nameof(RIM.ObjectArrangement)));
- Register(btnAlignLeft, new UiElement(RL.btnAlignLeft, nameof(RIM.ObjectsAlignLeft), "DL"));
- Register(btnAlignCenter, new UiElement(RL.btnAlignCenter, nameof(RIM.ObjectsAlignCenterHorizontal), "DC"));
- Register(btnAlignRight, new UiElement(RL.btnAlignRight, nameof(RIM.ObjectsAlignRight), "DR"));
- Register(btnAlignTop, new UiElement(RL.btnAlignTop, nameof(RIM.ObjectsAlignTop), "DT"));
- Register(btnAlignMiddle, new UiElement(RL.btnAlignMiddle, nameof(RIM.ObjectsAlignMiddleVertical), "DM"));
- Register(btnAlignBottom, new UiElement(RL.btnAlignBottom, nameof(RIM.ObjectsAlignBottom), "DB"));
- Register(btnDistributeHorizontal, new UiElement(RL.btnDistributeHorizontal, nameof(RIM.AlignDistributeHorizontally), "DH"));
- Register(btnDistributeVertical, new UiElement(RL.btnDistributeVertical, nameof(RIM.AlignDistributeVertically), "DV"));
Register(btnAlignRelative, new UiElement(RL.btnAlignRelative_ToObjects, nameof(RIM.AlignRelativeToObjects), "DA"));
- Register(btnScaleSameWidth, new UiElement(RL.btnScaleSameWidth, nameof(RIM.ScaleSameWidth), "PW"));
- Register(btnScaleSameHeight, new UiElement(RL.btnScaleSameHeight, nameof(RIM.ScaleSameHeight), "PH"));
- Register(btnScaleSameSize, new UiElement(RL.btnScaleSameSize, nameof(RIM.ScaleSameSize), "PS"));
Register(btnScaleAnchor, new UiElement(RL.btnScaleAnchor_FromTopLeft, nameof(RIM.ScaleFromTopLeft), "PA"));
- Register(btnExtendSameLeft, new UiElement(RL.btnExtendSameLeft, nameof(RIM.ExtendSameLeft), "PL"));
- Register(btnExtendSameRight, new UiElement(RL.btnExtendSameRight, nameof(RIM.ExtendSameRight), "PR"));
- Register(btnExtendSameTop, new UiElement(RL.btnExtendSameTop, nameof(RIM.ExtendSameTop), "PT"));
- Register(btnExtendSameBottom, new UiElement(RL.btnExtendSameBottom, nameof(RIM.ExtendSameBottom), "PB"));
- Register(btnSnapLeft, new UiElement(RL.btnSnapLeft, nameof(RIM.SnapLeftToRight), "PE"));
- Register(btnSnapRight, new UiElement(RL.btnSnapRight, nameof(RIM.SnapRightToLeft), "PI"));
- Register(btnSnapTop, new UiElement(RL.btnSnapTop, nameof(RIM.SnapTopToBottom), "PO"));
- Register(btnSnapBottom, new UiElement(RL.btnSnapBottom, nameof(RIM.SnapBottomToTop), "PM"));
- Register(btnRotateRight90, new UiElement(RL.btnRotateRight90, nameof(RIM.ObjectRotateRight90), "HR"));
- Register(btnRotateLeft90, new UiElement(RL.btnRotateLeft90, nameof(RIM.ObjectRotateLeft90), "HL"));
- Register(btnFlipVertical, new UiElement(RL.btnFlipVertical, nameof(RIM.ObjectFlipVertical), "HV"));
- Register(btnFlipHorizontal, new UiElement(RL.btnFlipHorizontal, nameof(RIM.ObjectFlipHorizontal), "HH"));
- Register(btnMoveFront, new UiElement(RL.btnMoveFront, nameof(RIM.ObjectBringToFront), "HF"));
- Register(btnMoveBack, new UiElement(RL.btnMoveBack, nameof(RIM.ObjectSendToBack), "HB"));
- Register(btnMoveForward, new UiElement(RL.btnMoveForward, nameof(RIM.ObjectBringForward), "HO"));
- Register(btnMoveBackward, new UiElement(RL.btnMoveBackward, nameof(RIM.ObjectSendBackward), "HA"));
- Register(btnGroup, new UiElement(RL.btnGroup, nameof(RIM.ObjectsGroup), "HG"));
- Register(btnUngroup, new UiElement(RL.btnUngroup, nameof(RIM.ObjectsUngroup), "HU"));
- Register(btnGridSetting, new UiElement(RL.btnGridSetting, nameof(RIM.GridSetting), "HD"));
Register(mnuArrangement, new UiElement(RL.mnuArrangement, nameof(RIM.ObjectArrangement_32), "B"));
Register(btnAddInSetting, new UiElement(RL.btnAddInSetting, nameof(RIM.AddInOptions), "AS"));
// tabArrangement
@@ -379,30 +397,77 @@ void RegisterS(string group, string id, UiElement ui) {
Register(btnAddInCheckUpdate, new UiElement(RL.btnAddInCheckUpdate, nameof(RIM.AddInUpdate), "AU"));
Register(btnAddInHomepage, new UiElement(RL.btnAddInHomepage, nameof(RIM.AddInHomepage), "AH"));
Register(btnAddInFeedback, new UiElement(RL.btnAddInFeedback, nameof(RIM.AddInFeedback), "AF"));
- RegisterS(grpAddInSetting, btnAddInSetting, new UiElement(null, nameof(RIM.AddInOptions_32), "T"));
+ Segister(grpAddInSetting, btnAddInSetting, new UiElement(null, nameof(RIM.AddInOptions_32), "T"));
// grpAlignment
Register(grpAlignment, new UiElement(RL.grpAlignment, nameof(RIM.ObjectArrangement)));
Register(lblAlignmentH, new UiElement(RL.lblAlignmentH));
Register(lblAlignmentV, new UiElement(RL.lblAlignmentV));
Register(lblDistribute, new UiElement(RL.lblDistribute));
+ Register(btnAlignLeft, new UiElement(RL.btnAlignLeft, nameof(RIM.ObjectsAlignLeft), "DL"));
+ Register(btnAlignCenter, new UiElement(RL.btnAlignCenter, nameof(RIM.ObjectsAlignCenterHorizontal), "DC"));
+ Register(btnAlignRight, new UiElement(RL.btnAlignRight, nameof(RIM.ObjectsAlignRight), "DR"));
+ Register(btnAlignTop, new UiElement(RL.btnAlignTop, nameof(RIM.ObjectsAlignTop), "DT"));
+ Register(btnAlignMiddle, new UiElement(RL.btnAlignMiddle, nameof(RIM.ObjectsAlignMiddleVertical), "DM"));
+ Register(btnAlignBottom, new UiElement(RL.btnAlignBottom, nameof(RIM.ObjectsAlignBottom), "DB"));
+ Register(btnDistributeHorizontal, new UiElement(RL.btnDistributeHorizontal, nameof(RIM.AlignDistributeHorizontally), "DH"));
+ Register(btnDistributeVertical, new UiElement(RL.btnDistributeVertical, nameof(RIM.AlignDistributeVertically), "DV"));
+ Register(lblSnapH, new UiElement(RL.lblSnapH));
+ Register(lblSnapV, new UiElement(RL.lblSnapV));
+ Register(lblGrid, new UiElement(RL.lblGrid));
+ Register(btnSnapLeft, new UiElement(RL.btnSnapLeft, nameof(RIM.SnapLeftToRight), "PE"));
+ Register(btnSnapRight, new UiElement(RL.btnSnapRight, nameof(RIM.SnapRightToLeft), "PI"));
+ Register(btnSnapTop, new UiElement(RL.btnSnapTop, nameof(RIM.SnapTopToBottom), "PO"));
+ Register(btnSnapBottom, new UiElement(RL.btnSnapBottom, nameof(RIM.SnapBottomToTop), "PM"));
+ Register(btnGridSwitcher, new UiElement(RL.btnGridSwitcher, nameof(RIM.GridSwitcher), "HW"));
+ Register(btnGridSetting, new UiElement(RL.btnGridSetting, nameof(RIM.GridSetting), "HD"));
Register(btnAlignRelative_ToObjects, new UiElement(RL.btnAlignRelative_ToObjects, nameof(RIM.AlignRelativeToObjects), "DO"));
Register(btnAlignRelative_ToFirstObject, new UiElement(RL.btnAlignRelative_ToFirstObject, nameof(RIM.AlignRelativeToFirstObject), "DF"));
Register(btnAlignRelative_ToSlide, new UiElement(RL.btnAlignRelative_ToSlide, nameof(RIM.AlignRelativeToSlide), "DS"));
Register(btnSizeAndPosition, new UiElement(RL.btnSizeAndPosition, nameof(RIM.SizeAndPosition), "DN"));
- // grpSizeAndSnap
- Register(grpSizeAndSnap, new UiElement(RL.grpSizeAndSnap, nameof(RIM.ScaleSameWidth)));
+ // grpResizing
+ Register(grpResizing, new UiElement(RL.grpResizing, nameof(RIM.ScaleSameWidth)));
Register(lblScaleSize, new UiElement(RL.lblScaleSize));
Register(lblExtendSize, new UiElement(RL.lblExtendSize));
- Register(lblSnapObjects, new UiElement(RL.lblSnapObjects));
- Register(btnScaleAnchor_FromTopLeft, new UiElement(RL.btnScaleAnchor_FromTopLeft, nameof(RIM.ScaleFromTopLeft), "PA"));
- Register(btnScaleAnchor_FromMiddle, new UiElement(RL.btnScaleAnchor_FromMiddle, nameof(RIM.ScaleFromMiddle), "PD"));
- Register(btnScaleAnchor_FromBottomRight, new UiElement(RL.btnScaleAnchor_FromBottomRight, nameof(RIM.ScaleFromBottomRight), "PG"));
- RegisterS(grpSizeAndSnap, btnSizeAndPosition, new UiElement(keytip: "PP"));
+ Register(btnScaleSameWidth, new UiElement(RL.btnScaleSameWidth, nameof(RIM.ScaleSameWidth), "PW"));
+ Register(btnScaleSameHeight, new UiElement(RL.btnScaleSameHeight, nameof(RIM.ScaleSameHeight), "PH"));
+ Register(btnScaleSameSize, new UiElement(RL.btnScaleSameSize, nameof(RIM.ScaleSameSize), "PS"));
+ Register(btnExtendSameLeft, new UiElement(RL.btnExtendSameLeft, nameof(RIM.ExtendSameLeft), "PL"));
+ Register(btnExtendSameRight, new UiElement(RL.btnExtendSameRight, nameof(RIM.ExtendSameRight), "PR"));
+ Register(btnExtendSameTop, new UiElement(RL.btnExtendSameTop, nameof(RIM.ExtendSameTop), "PT"));
+ Register(btnExtendSameBottom, new UiElement(RL.btnExtendSameBottom, nameof(RIM.ExtendSameBottom), "PB"));
+ Register(chkExtendToFirstObject, new UiElement(RL.chkExtendToFirstObject, keytip: "PF"));
+ Segister((mnuArrangement, mnuResizing), chkExtendToFirstObject, new UiElement(RL.chkExtendToFirstObjectFull, keytip: "PF"));
+ Register(lblScaleAnchor_FromTop, new UiElement(RL.lblScaleAnchor_FromTop));
+ Register(lblScaleAnchor_FromCenter, new UiElement(RL.lblScaleAnchor_FromCenter));
+ Register(lblScaleAnchor_FromBottom, new UiElement(RL.lblScaleAnchor_FromBottom));
+ Register(btnScaleAnchor_FromTopLeft, new UiElement(RL.btnScaleAnchor_FromTopLeft, nameof(RIM.ScaleFromTopLeft), "S1"));
+ Register(btnScaleAnchor_FromTop, new UiElement(RL.btnScaleAnchor_FromTop, nameof(RIM.ScaleFromTop), "S2"));
+ Register(btnScaleAnchor_FromTopRight, new UiElement(RL.btnScaleAnchor_FromTopRight, nameof(RIM.ScaleFromTopRight), "S3"));
+ Register(btnScaleAnchor_FromLeft, new UiElement(RL.btnScaleAnchor_FromLeft, nameof(RIM.ScaleFromLeft), "S4"));
+ Register(btnScaleAnchor_FromCenter, new UiElement(RL.btnScaleAnchor_FromCenter, nameof(RIM.ScaleFromCenter), "S5"));
+ Register(btnScaleAnchor_FromRight, new UiElement(RL.btnScaleAnchor_FromRight, nameof(RIM.ScaleFromRight), "S6"));
+ Register(btnScaleAnchor_FromBottomLeft, new UiElement(RL.btnScaleAnchor_FromBottomLeft, nameof(RIM.ScaleFromBottomLeft), "S7"));
+ Register(btnScaleAnchor_FromBottom, new UiElement(RL.btnScaleAnchor_FromBottom, nameof(RIM.ScaleFromBottom), "S8"));
+ Register(btnScaleAnchor_FromBottomRight, new UiElement(RL.btnScaleAnchor_FromBottomRight, nameof(RIM.ScaleFromBottomRight), "S9"));
+ Segister(new object[] { grpResizing, (mnuArrangement, mnuResizing) }, btnScaleAnchor_FromTopLeft, new UiElement(RL.btnScaleAnchor_FromTopLeft_Full));
+ Segister(new object[] { grpResizing, (mnuArrangement, mnuResizing) }, btnScaleAnchor_FromTop, new UiElement(RL.btnScaleAnchor_FromTop_Full));
+ Segister(new object[] { grpResizing, (mnuArrangement, mnuResizing) }, btnScaleAnchor_FromTopRight, new UiElement(RL.btnScaleAnchor_FromTopRight_Full));
+ Segister(new object[] { grpResizing, (mnuArrangement, mnuResizing) }, btnScaleAnchor_FromLeft, new UiElement(RL.btnScaleAnchor_FromLeft_Full));
+ Segister(new object[] { grpResizing, (mnuArrangement, mnuResizing) }, btnScaleAnchor_FromCenter, new UiElement(RL.btnScaleAnchor_FromCenter_Full));
+ Segister(new object[] { grpResizing, (mnuArrangement, mnuResizing) }, btnScaleAnchor_FromRight, new UiElement(RL.btnScaleAnchor_FromRight_Full));
+ Segister(new object[] { grpResizing, (mnuArrangement, mnuResizing) }, btnScaleAnchor_FromBottomLeft, new UiElement(RL.btnScaleAnchor_FromBottomLeft_Full));
+ Segister(new object[] { grpResizing, (mnuArrangement, mnuResizing) }, btnScaleAnchor_FromBottom, new UiElement(RL.btnScaleAnchor_FromBottom_Full));
+ Segister(new object[] { grpResizing, (mnuArrangement, mnuResizing) }, btnScaleAnchor_FromBottomRight, new UiElement(RL.btnScaleAnchor_FromBottomRight_Full));
+ Segister(grpResizing, btnSizeAndPosition, new UiElement(keytip: "PP"));
// grpRotateAndFlip
Register(grpRotateAndFlip, new UiElement(RL.grpRotateAndFlip, nameof(RIM.ObjectRotateRight90)));
Register(lblRotateObject, new UiElement(RL.lblRotateObject));
Register(lblFlipObject, new UiElement(RL.lblFlipObject));
Register(lbl3DRotation, new UiElement(RL.lbl3DRotation));
+ Register(btnRotateRight90, new UiElement(RL.btnRotateRight90, nameof(RIM.ObjectRotateRight90), "HR"));
+ Register(btnRotateLeft90, new UiElement(RL.btnRotateLeft90, nameof(RIM.ObjectRotateLeft90), "HL"));
+ Register(btnFlipVertical, new UiElement(RL.btnFlipVertical, nameof(RIM.ObjectFlipVertical), "HV"));
+ Register(btnFlipHorizontal, new UiElement(RL.btnFlipHorizontal, nameof(RIM.ObjectFlipHorizontal), "HH"));
Register(edtAngle, new UiElement(RL.edtAngle, keytip: "AE"));
Register(btnCopyAngle, new UiElement(RL.btnCopyAngle, nameof(RIM.Copy), "AC"));
Register(btnPasteAngle, new UiElement(RL.btnPasteAngle, nameof(RIM.Paste), "AP"));
@@ -411,25 +476,41 @@ void RegisterS(string group, string id, UiElement ui) {
Register(grpObjectArrange, new UiElement(RL.grpObjectArrange, nameof(RIM.ObjectSendToBack)));
Register(lblMoveLayers, new UiElement(RL.lblMoveLayers));
Register(lblGroupObjects, new UiElement(RL.lblGroupObjects));
- RegisterS(grpObjectArrange, btnGridSetting, new UiElement(null, nameof(RIM.GridSetting_32), "G"));
- RegisterS(grpObjectArrange, btnSizeAndPosition, new UiElement(null, nameof(RIM.SizeAndPosition_32), "N"));
+ Register(btnMoveFront, new UiElement(RL.btnMoveFront, nameof(RIM.ObjectBringToFront), "HF"));
+ Register(btnMoveBack, new UiElement(RL.btnMoveBack, nameof(RIM.ObjectSendToBack), "HB"));
+ Register(btnMoveForward, new UiElement(RL.btnMoveForward, nameof(RIM.ObjectBringForward), "HO"));
+ Register(btnMoveBackward, new UiElement(RL.btnMoveBackward, nameof(RIM.ObjectSendBackward), "HA"));
+ Register(btnGroup, new UiElement(RL.btnGroup, nameof(RIM.ObjectsGroup), "HG"));
+ Register(btnUngroup, new UiElement(RL.btnUngroup, nameof(RIM.ObjectsUngroup), "HU"));
+ Segister(grpObjectArrange, btnSizeAndPosition, new UiElement(null, nameof(RIM.SizeAndPosition_32), "N"));
// grpObjectSize
Register(grpObjectSize, new UiElement(RL.grpObjectSize, nameof(RIM.ObjectHeight)));
Register(btnResetSize, new UiElement(RL.btnResetSize, nameof(RIM.PictureResetSize_32), "SR"));
Register(btnLockAspectRatio, new UiElement(RL.btnLockAspectRatio, nameof(RIM.ObjectLockAspectRatio), "L"));
- RegisterS(grpObjectSize, btnLockAspectRatio, new UiElement(null, nameof(RIM.ObjectLockAspectRatio_32)));
+ Segister(grpObjectSize, btnLockAspectRatio, new UiElement(null, nameof(RIM.ObjectLockAspectRatio_32)));
Register(edtSizeHeight, new UiElement(RL.edtSizeHeight, keytip: "SH"));
Register(edtSizeWidth, new UiElement(RL.edtSizeWidth, keytip: "SW"));
Register(btnCopySize, new UiElement(RL.btnCopySize, nameof(RIM.Copy), "SC"));
Register(btnPasteSize, new UiElement(RL.btnPasteSize, nameof(RIM.Paste), "SV"));
- RegisterS(grpObjectSize, btnSizeAndPosition, new UiElement(keytip: "SN"));
+ Segister(grpObjectSize, btnSizeAndPosition, new UiElement(keytip: "SN"));
// grpObjectPosition
Register(grpObjectPosition, new UiElement(RL.grpObjectPosition, nameof(RIM.ObjectPosition)));
Register(edtPositionX, new UiElement(RL.edtPositionX, keytip: "PX"));
Register(edtPositionY, new UiElement(RL.edtPositionY, keytip: "PY"));
Register(btnCopyPosition, new UiElement(RL.btnCopyPosition, nameof(RIM.Copy), "PC"));
Register(btnPastePosition, new UiElement(RL.btnPastePosition, nameof(RIM.Paste), "PV"));
- RegisterS(grpObjectPosition, btnSizeAndPosition, new UiElement(keytip: "PN"));
+ Register(lblDistanceType, new UiElement(RL.lblDistanceType));
+ Register(btnDistanceType_RightLeft, new UiElement(RL.btnDistanceType_RightLeft, nameof(RIM.ShapeDistanceType_RightLeft), "D1"));
+ Register(btnDistanceType_LeftLeft, new UiElement(RL.btnDistanceType_LeftLeft, nameof(RIM.ShapeDistanceType_LeftLeft), "D2"));
+ Register(btnDistanceType_RightRight, new UiElement(RL.btnDistanceType_RightRight, nameof(RIM.ShapeDistanceType_RightRight), "D3"));
+ Register(btnDistanceType_LeftRight, new UiElement(RL.btnDistanceType_LeftRight, nameof(RIM.ShapeDistanceType_LeftRight), "D4"));
+ Register(lblDistanceH, new UiElement(RL.lblDistanceH));
+ Register(btnCopyDistanceH, new UiElement(RL.btnCopyDistanceH, nameof(RIM.Copy), "RC"));
+ Register(btnPasteDistanceH, new UiElement(RL.btnPasteDistanceH, nameof(RIM.Paste), "RV"));
+ Register(lblDistanceV, new UiElement(RL.lblDistanceV));
+ Register(btnCopyDistanceV, new UiElement(RL.btnCopyDistanceV, nameof(RIM.Copy), "VC"));
+ Register(btnPasteDistanceV, new UiElement(RL.btnPasteDistanceV, nameof(RIM.Paste), "VV"));
+ Segister(grpObjectPosition, btnSizeAndPosition, new UiElement(keytip: "PN"));
// grpTextbox
Register(grpTextbox, new UiElement(RL.grpTextbox, nameof(RIM.TextboxSetting)));
Register(btnAutofitOff, new UiElement(RL.btnAutofitOff, nameof(RIM.TextboxAutofitOff), "TF"));
@@ -447,8 +528,9 @@ void RegisterS(string group, string id, UiElement ui) {
// grpReplacePicture
Register(grpReplacePicture, new UiElement(RL.grpReplacePicture, nameof(RIM.PictureChangeFromClipboard)));
Register(btnReplaceWithClipboard, new UiElement(RL.btnReplaceWithClipboard, nameof(RIM.PictureChangeFromClipboard_32), "TC"));
- Register(btnReplaceWithFile, new UiElement(RL.btnReplaceWithFile, nameof(RIM.PictureChange), "TF"));
- Register(chkReserveOriginalSize, new UiElement(RL.chkReserveOriginalSize, keytip: "TR"));
+ Register(btnReplaceWithFile, new UiElement(RL.btnReplaceWithFile, nameof(RIM.PictureChange_32), "TF"));
+ Register(chkReplaceToFill, new UiElement(RL.chkReplaceToFill, keytip: "TL"));
+ Register(chkReplaceToContain, new UiElement(RL.chkReplaceToContain, keytip: "TR"));
Register(chkReplaceToMiddle, new UiElement(RL.chkReplaceToMiddle, keytip: "TM"));
// grpSizeAndPosition
Register(grpShapeSizeAndPosition, new UiElement(RL.grpSizeAndPosition, nameof(RIM.SizeAndPosition)));
@@ -458,33 +540,32 @@ void RegisterS(string group, string id, UiElement ui) {
Register(grpTableSizeAndPosition, new UiElement(RL.grpSizeAndPosition, nameof(RIM.SizeAndPosition)));
Register(grpChartSizeAndPosition, new UiElement(RL.grpSizeAndPosition, nameof(RIM.SizeAndPosition)));
Register(grpSmartartSizeAndPosition, new UiElement(RL.grpSizeAndPosition, nameof(RIM.SizeAndPosition)));
- RegisterS(grpShapeSizeAndPosition, btnSizeAndPosition, new UiElement(keytip: "SN"));
- RegisterS(grpPictureSizeAndPosition, btnSizeAndPosition, new UiElement(keytip: "SN"));
- RegisterS(grpVideoSizeAndPosition, btnSizeAndPosition, new UiElement(keytip: "SN"));
- RegisterS(grpAudioSizeAndPosition, btnSizeAndPosition, new UiElement(keytip: "SN"));
- RegisterS(grpTableSizeAndPosition, btnSizeAndPosition, new UiElement(keytip: "SN"));
- RegisterS(grpChartSizeAndPosition, btnSizeAndPosition, new UiElement(keytip: "SN"));
- RegisterS(grpSmartartSizeAndPosition, btnSizeAndPosition, new UiElement(keytip: "SN"));
+ Segister(grpShapeSizeAndPosition, btnSizeAndPosition, new UiElement(keytip: "SN"));
+ Segister(grpPictureSizeAndPosition, btnSizeAndPosition, new UiElement(keytip: "SN"));
+ Segister(grpVideoSizeAndPosition, btnSizeAndPosition, new UiElement(keytip: "SN"));
+ Segister(grpAudioSizeAndPosition, btnSizeAndPosition, new UiElement(keytip: "SN"));
+ Segister(grpTableSizeAndPosition, btnSizeAndPosition, new UiElement(keytip: "SN"));
+ Segister(grpChartSizeAndPosition, btnSizeAndPosition, new UiElement(keytip: "SN"));
+ Segister(grpSmartartSizeAndPosition, btnSizeAndPosition, new UiElement(keytip: "SN"));
// ===
- RegisterS(grpVideoSizeAndPosition, btnLockAspectRatio, new UiElement(keytip: "SL")); // L
- RegisterS(grpVideoSizeAndPosition, btnScaleAnchor, new UiElement(keytip: "SF")); // PA
- RegisterS(grpVideoSizeAndPosition, edtPositionX, new UiElement(keytip: "SX")); // PX
- RegisterS(grpVideoSizeAndPosition, edtPositionY, new UiElement(keytip: "SY")); // PY
- RegisterS(grpVideoSizeAndPosition, btnCopyPosition, new UiElement(keytip: "SS")); // PC
- RegisterS(grpVideoSizeAndPosition, btnPastePosition, new UiElement(keytip: "ST")); // PV
+ Segister(grpVideoSizeAndPosition, btnLockAspectRatio, new UiElement(keytip: "SL")); // L
+ Segister(grpVideoSizeAndPosition, btnScaleAnchor, new UiElement(keytip: "SF")); // PA
+ Segister(grpVideoSizeAndPosition, edtPositionX, new UiElement(keytip: "SX")); // PX
+ Segister(grpVideoSizeAndPosition, edtPositionY, new UiElement(keytip: "SY")); // PY
+ Segister(grpVideoSizeAndPosition, btnCopyPosition, new UiElement(keytip: "SS")); // PC
+ Segister(grpVideoSizeAndPosition, btnPastePosition, new UiElement(keytip: "ST")); // PV
// ===
- RegisterS(grpTableSizeAndPosition, mnuArrangement, new UiElement(keytip: "SB")); // B
- RegisterS(grpTableSizeAndPosition, btnLockAspectRatio, new UiElement(keytip: "SL")); // L
- RegisterS(grpTableSizeAndPosition, btnScaleAnchor, new UiElement(keytip: "SF")); // PA
- RegisterS(grpTableSizeAndPosition, edtPositionX, new UiElement(keytip: "SX")); // PX
- RegisterS(grpTableSizeAndPosition, edtPositionY, new UiElement(keytip: "SY")); // PY
- RegisterS(grpTableSizeAndPosition, btnCopyPosition, new UiElement(keytip: "SS")); // PC
- RegisterS(grpTableSizeAndPosition, btnPastePosition, new UiElement(keytip: "ST")); // PV
+ Segister(grpTableSizeAndPosition, mnuArrangement, new UiElement(keytip: "SB")); // B
+ Segister(grpTableSizeAndPosition, btnLockAspectRatio, new UiElement(keytip: "SL")); // L
+ Segister(grpTableSizeAndPosition, btnScaleAnchor, new UiElement(keytip: "SF")); // PA
+ Segister(grpTableSizeAndPosition, edtPositionX, new UiElement(keytip: "SX")); // PX
+ Segister(grpTableSizeAndPosition, edtPositionY, new UiElement(keytip: "SY")); // PY
+ Segister(grpTableSizeAndPosition, btnCopyPosition, new UiElement(keytip: "SS")); // PC
+ Segister(grpTableSizeAndPosition, btnPastePosition, new UiElement(keytip: "ST")); // PV
// mnuArrangement
Register(sepAlignmentAndResizing, new UiElement(RL.mnuArrangement_sepAlignmentAndResizing));
Register(mnuAlignment, new UiElement(RL.mnuArrangement_mnuAlignment, nameof(RIM.ObjectArrangement)));
Register(mnuResizing, new UiElement(RL.mnuArrangement_mnuResizing, nameof(RIM.ScaleSameWidth)));
- Register(mnuSnapping, new UiElement(RL.mnuArrangement_mnuSnapping, nameof(RIM.SnapLeftToRight)));
Register(mnuRotation, new UiElement(RL.mnuArrangement_mnuRotation, nameof(RIM.ObjectRotateRight90)));
Register(sepLayerOrderAndGrouping, new UiElement(RL.mnuArrangement_sepLayerOrderAndGrouping));
Register(mnuLayerOrder, new UiElement(RL.mnuArrangement_mnuLayerOrder, nameof(RIM.ObjectSendToBack)));
diff --git a/PowerPointArrangeAddin/Ribbon/ArrangeRibbon.Menu.xml b/PowerPointArrangeAddin/Ribbon/ArrangeRibbon.Menu.xml
index 943bb39..adb4e4b 100644
--- a/PowerPointArrangeAddin/Ribbon/ArrangeRibbon.Menu.xml
+++ b/PowerPointArrangeAddin/Ribbon/ArrangeRibbon.Menu.xml
@@ -24,41 +24,44 @@
+
+
+
+
+
-
-
+
+
-
-
@@ -77,16 +82,20 @@
+
+
-
+
diff --git a/PowerPointArrangeAddin/Ribbon/ArrangeRibbon.UI.xml b/PowerPointArrangeAddin/Ribbon/ArrangeRibbon.UI.xml
index c1c82ec..735150d 100644
--- a/PowerPointArrangeAddin/Ribbon/ArrangeRibbon.UI.xml
+++ b/PowerPointArrangeAddin/Ribbon/ArrangeRibbon.UI.xml
@@ -39,56 +39,56 @@
-
-
-
+ <__use_reference name="$id=btnAlignLeft" />
+ <__use_reference name="$id=btnAlignCenter" />
+ <__use_reference name="$id=btnAlignRight" />
-
-
-
+ <__use_reference name="$id=btnAlignTop" />
+ <__use_reference name="$id=btnAlignMiddle" />
+ <__use_reference name="$id=btnAlignBottom" />
-
-
+ <__use_reference name="$id=btnDistributeHorizontal" />
+ <__use_reference name="$id=btnDistributeVertical" />
-
-
-
+ <__use_reference name="$id=btnScaleSameWidth" />
+ <__use_reference name="$id=btnScaleSameHeight" />
+ <__use_reference name="$id=btnScaleSameSize" />
-
-
-
-
+ <__use_reference name="$id=btnExtendSameLeft" />
+ <__use_reference name="$id=btnExtendSameRight" />
+ <__use_reference name="$id=btnExtendSameTop" />
+ <__use_reference name="$id=btnExtendSameBottom" />
-
-
-
-
-
+
+ <__use_reference name="$id=btnSnapLeft" />
+ <__use_reference name="$id=btnSnapRight" />
+ <__use_reference name="$id=btnSnapTop" />
+ <__use_reference name="$id=btnSnapBottom" />
-
-
-
-
+ <__use_reference name="$id=btnRotateRight90" />
+ <__use_reference name="$id=btnRotateLeft90" />
+ <__use_reference name="$id=btnFlipVertical" />
+ <__use_reference name="$id=btnFlipHorizontal" />
-
-
-
-
+ <__use_reference name="$id=btnMoveFront" />
+ <__use_reference name="$id=btnMoveBack" />
+ <__use_reference name="$id=btnMoveForward" />
+ <__use_reference name="$id=btnMoveBackward" />
-
-
-
+ <__use_reference name="$id=btnGroup" />
+ <__use_reference name="$id=btnUngroup" />
+ <__use_reference name="$id=btnGridSetting" />
@@ -112,10 +112,37 @@
<__use_template name="VSPACER" />
- <__use_template name="ARRANGE">
- <__remove_rule field="id" match_re="^((?!Align|Distribute).)*$|btnAlignRelative" />
- <__remove_rule field="@" match="dialogBoxLauncher" />
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <__use_template name="VSPACER" />
+
+
+
+
+
+
+
+
+
+
+
+
@@ -125,23 +152,41 @@
-
-
-
-
- <__use_template name="VSPACER" />
- <__use_template name="ARRANGE">
- <__remove_rule field="id" match_re="^((?!Scale|Extend|Snap).)*$|btnScaleAnchor|sepScaleSize" />
- <__remove_rule field="@" match="dialogBoxLauncher" />
-
+
+
+
+ <__use_template name="HSPACER" />
+
+
+
+
+
+
+ <__use_template name="HSPACER" />
+
+
+
+
+
+
-
-
-
+
+
+
+ <__use_template name="VSPACER" />
+
+
+
+
+
+
+
+
+
<__use_reference name="$id=btnSizeAndPosition:1" />
-
+
@@ -149,12 +194,12 @@
<__use_template name="VSPACER" />
- <__use_reference name="$id=btnRotateRight90" />
- <__use_reference name="$id=btnRotateLeft90" />
+
+
- <__use_reference name="$id=btnFlipVertical" />
- <__use_reference name="$id=btnFlipHorizontal" />
+
+
@@ -177,19 +222,18 @@
<__use_template name="VSPACER" />
- <__use_reference name="$id=btnMoveFront" />
- <__use_reference name="$id=btnMoveBack" />
+
+
- <__use_reference name="$id=btnMoveForward" />
- <__use_reference name="$id=btnMoveBackward" />
+
+
- <__use_reference name="$id=btnGroup" />
- <__use_reference name="$id=btnUngroup" />
+
+
-
-
+
@@ -218,6 +262,27 @@
+
+
+
+ <__use_template name="HSPACER" />
+
+
+
+
+
+
+
+ <__use_template name="HSPACER" />
+
+
+
+
+
+ <__use_template name="HSPACER" />
+
+
+
<__use_reference name="$id=btnSizeAndPosition:1" />
@@ -280,9 +345,10 @@
-
-
-
+
+
+
+
diff --git a/PowerPointArrangeAddin/Ribbon/ArrangeRibbon.cs b/PowerPointArrangeAddin/Ribbon/ArrangeRibbon.cs
index 9b1b229..f3de7dd 100644
--- a/PowerPointArrangeAddin/Ribbon/ArrangeRibbon.cs
+++ b/PowerPointArrangeAddin/Ribbon/ArrangeRibbon.cs
@@ -46,6 +46,9 @@ public void Ribbon_Load(Office.IRibbonUI ribbonUi) {
var _ = await AddInVersion.Instance.CheckUpdateAutomatically(hwnd);
});
}
+
+ // apply long pressable flag from setting
+ _extendDoublePressable.EnableDoublePress = AddInSetting.Instance.AllowDoublePressExtendButton;
}
private delegate bool AvailabilityRule(PowerPoint.ShapeRange? shapeRange, int shapesCount, bool hasTextFrame);
@@ -59,6 +62,11 @@ void Register(string id, AvailabilityRule rule) {
}
// grpArrange
+ Register(btnAlignRelative, (_, cnt, _) => cnt >= 1);
+ Register(btnScaleAnchor, (_, _, _) => true);
+ Register(mnuArrangement, (_, _, _) => true);
+ Register(btnAddInSetting, (_, _, _) => true);
+ // grpAlignment
Register(btnAlignLeft, (_, cnt, _) => cnt >= 1);
Register(btnAlignCenter, (_, cnt, _) => cnt >= 1);
Register(btnAlignRight, (_, cnt, _) => cnt >= 1);
@@ -67,46 +75,44 @@ void Register(string id, AvailabilityRule rule) {
Register(btnAlignBottom, (_, cnt, _) => cnt >= 1);
Register(btnDistributeHorizontal, (shapeRange, cnt, _) => cnt >= 1 && ArrangementHelper.IsDistributable(shapeRange, _alignRelativeFlag));
Register(btnDistributeVertical, (shapeRange, cnt, _) => cnt >= 1 && ArrangementHelper.IsDistributable(shapeRange, _alignRelativeFlag));
- Register(btnAlignRelative, (_, cnt, _) => cnt >= 1);
- Register(btnScaleSameWidth, (_, cnt, _) => cnt >= 2);
- Register(btnScaleSameHeight, (_, cnt, _) => cnt >= 2);
- Register(btnScaleSameSize, (_, cnt, _) => cnt >= 2);
- Register(btnScaleAnchor, (_, _, _) => true);
- Register(btnExtendSameLeft, (_, cnt, _) => cnt >= 2);
- Register(btnExtendSameRight, (_, cnt, _) => cnt >= 2);
- Register(btnExtendSameTop, (_, cnt, _) => cnt >= 2);
- Register(btnExtendSameBottom, (_, cnt, _) => cnt >= 2);
Register(btnSnapLeft, (_, cnt, _) => cnt >= 2);
Register(btnSnapRight, (_, cnt, _) => cnt >= 2);
Register(btnSnapTop, (_, cnt, _) => cnt >= 2);
Register(btnSnapBottom, (_, cnt, _) => cnt >= 2);
- Register(btnMoveFront, (_, cnt, _) => cnt >= 1);
- Register(btnMoveBack, (_, cnt, _) => cnt >= 1);
- Register(btnMoveForward, (_, cnt, _) => cnt >= 1);
- Register(btnMoveBackward, (_, cnt, _) => cnt >= 1);
- Register(btnRotateRight90, (_, cnt, _) => cnt >= 1);
- Register(btnRotateLeft90, (_, cnt, _) => cnt >= 1);
- Register(btnFlipVertical, (_, cnt, _) => cnt >= 1);
- Register(btnFlipHorizontal, (_, cnt, _) => cnt >= 1);
- Register(btnGroup, (_, cnt, _) => cnt >= 2);
- Register(btnUngroup, (sr, cnt, _) => cnt >= 1 && ArrangementHelper.IsUngroupable(sr));
+ Register(btnGridSwitcher, (_, _, _) => true);
Register(btnGridSetting, (_, _, _) => true);
- Register(mnuArrangement, (_, _, _) => true);
- Register(btnAddInSetting, (_, _, _) => true);
- // grpAlignment
Register(btnAlignRelative_ToObjects, (_, cnt, _) => cnt >= 2);
Register(btnAlignRelative_ToFirstObject, (_, cnt, _) => cnt >= 2);
Register(btnAlignRelative_ToSlide, (_, cnt, _) => cnt >= 1);
Register(btnSizeAndPosition, (_, cnt, _) => cnt >= 1);
- // grpSizeAndSnap
+ // grpResizing
+ Register(btnScaleSameWidth, (_, cnt, _) => cnt >= 2);
+ Register(btnScaleSameHeight, (_, cnt, _) => cnt >= 2);
+ Register(btnScaleSameSize, (_, cnt, _) => cnt >= 2);
+ Register(btnExtendSameLeft, (_, cnt, _) => cnt >= 2);
+ Register(btnExtendSameRight, (_, cnt, _) => cnt >= 2);
+ Register(btnExtendSameTop, (_, cnt, _) => cnt >= 2);
+ Register(btnExtendSameBottom, (_, cnt, _) => cnt >= 2);
+ Register(chkExtendToFirstObject, (_, _, _) => true);
Register(btnScaleAnchor_FromTopLeft, (_, _, _) => true);
- Register(btnScaleAnchor_FromMiddle, (_, _, _) => true);
+ Register(btnScaleAnchor_FromCenter, (_, _, _) => true);
Register(btnScaleAnchor_FromBottomRight, (_, _, _) => true);
// grpRotateAndFlip
+ Register(btnRotateRight90, (_, cnt, _) => cnt >= 1);
+ Register(btnRotateLeft90, (_, cnt, _) => cnt >= 1);
+ Register(btnFlipVertical, (_, cnt, _) => cnt >= 1);
+ Register(btnFlipHorizontal, (_, cnt, _) => cnt >= 1);
Register(edtAngle, (_, cnt, _) => cnt >= 1);
Register(btnCopyAngle, (sr, cnt, _) => cnt >= 1 && RotationHelper.IsAngleCopyable(sr));
Register(btnPasteAngle, (_, cnt, _) => cnt >= 1 && RotationHelper.IsValidCopiedAngleValue());
Register(btnResetAngle, (_, cnt, _) => cnt >= 1);
+ // grpObjectArrange
+ Register(btnMoveFront, (_, cnt, _) => cnt >= 1);
+ Register(btnMoveBack, (_, cnt, _) => cnt >= 1);
+ Register(btnMoveForward, (_, cnt, _) => cnt >= 1);
+ Register(btnMoveBackward, (_, cnt, _) => cnt >= 1);
+ Register(btnGroup, (_, cnt, _) => cnt >= 2);
+ Register(btnUngroup, (sr, cnt, _) => cnt >= 1 && ArrangementHelper.IsUngroupable(sr));
// grpObjectSize
Register(btnResetSize, (sr, cnt, _) => cnt >= 1 && SizeAndPositionHelper.IsSizeResettable(sr));
Register(btnLockAspectRatio, (_, cnt, _) => cnt >= 1);
@@ -119,6 +125,14 @@ void Register(string id, AvailabilityRule rule) {
Register(edtPositionY, (_, cnt, _) => cnt >= 1);
Register(btnCopyPosition, (sr, cnt, _) => cnt >= 1 && SizeAndPositionHelper.IsPositionCopyable(sr));
Register(btnPastePosition, (_, cnt, _) => cnt >= 1 && SizeAndPositionHelper.IsValidCopiedPositionValue());
+ Register(btnDistanceType_RightLeft, (_, _, _) => true);
+ Register(btnDistanceType_LeftLeft, (_, _, _) => true);
+ Register(btnDistanceType_RightRight, (_, _, _) => true);
+ Register(btnDistanceType_LeftRight, (_, _, _) => true);
+ Register(btnCopyDistanceH, (_, cnt, _) => cnt == 2);
+ Register(btnPasteDistanceH, (_, cnt, _) => cnt == 2 && SizeAndPositionHelper.IsValidCopiedDistanceHValue());
+ Register(btnCopyDistanceV, (_, cnt, _) => cnt == 2);
+ Register(btnPasteDistanceV, (_, cnt, _) => cnt == 2 && SizeAndPositionHelper.IsValidCopiedDistanceVValue());
// grpTextbox
Register(btnAutofitOff, (_, cnt, tf) => cnt >= 1 && tf);
Register(btnAutoShrinkText, (_, cnt, tf) => cnt >= 1 && tf);
@@ -133,7 +147,8 @@ void Register(string id, AvailabilityRule rule) {
// grpReplacePicture
Register(btnReplaceWithClipboard, (_, cnt, _) => cnt >= 1);
Register(btnReplaceWithFile, (_, cnt, _) => cnt >= 1);
- Register(chkReserveOriginalSize, (_, _, _) => true);
+ Register(chkReplaceToFill, (_, _, _) => true);
+ Register(chkReplaceToContain, (_, _, _) => true);
Register(chkReplaceToMiddle, (_, _, _) => true);
return map;
@@ -165,7 +180,7 @@ public bool GetGroupVisible(Office.IRibbonControl ribbonControl) {
grpArrange => AddInSetting.Instance.ShowArrangementGroup,
grpAddInSetting => true,
grpAlignment => true,
- grpSizeAndSnap => true,
+ grpResizing => true,
grpRotateAndFlip => true,
grpObjectArrange => true,
grpObjectSize => true,
@@ -207,6 +222,67 @@ public void InvalidateRibbon(bool onlyForDrag = false) {
return (selection.TextFrame, selection.TextFrame2);
}
+ public void BtnAddInSetting_Click(Office.IRibbonControl _) {
+ var oldLanguage = AddInSetting.Instance.Language;
+ var oldIconStyle = AddInSetting.Instance.IconStyle;
+ var dlg = new Dialog.SettingDialog();
+ var result = dlg.ShowDialog();
+ if (result != Forms.DialogResult.OK) {
+ return;
+ }
+
+ _extendDoublePressable.EnableDoublePress = AddInSetting.Instance.AllowDoublePressExtendButton;
+ if (AddInSetting.Instance.Language != oldLanguage) {
+ // include updating elements and invalidating ribbon
+ AddInLanguageChanger.ChangeLanguage(AddInSetting.Instance.Language);
+ }
+ if (AddInSetting.Instance.IconStyle != oldIconStyle) {
+ // update elements for icons and invalidating ribbon
+ UpdateUiElementsAndInvalidate();
+ }
+ if (AddInSetting.Instance.Language == oldLanguage && AddInSetting.Instance.IconStyle == oldIconStyle) {
+ // just invalidate ribbon
+ _ribbon?.Invalidate();
+ }
+ }
+
+ public void BtnAddInCheckUpdate_Click(Office.IRibbonControl _) {
+ Task.Run(async () => {
+ var hwnd = new IntPtr(Globals.ThisAddIn.Application.HWND);
+ var __ = await AddInVersion.Instance.CheckUpdateManually(hwnd);
+ });
+ }
+
+ public void BtnAddInHomepage_Click(Office.IRibbonControl _) {
+ using (new EnableThemingInScope(true)) {
+ var dialog = new TaskDialog();
+ dialog.Caption = AddInDescription.Instance.Title;
+ dialog.InstructionText = ArrangeRibbonResources.dlgChooseToVisit;
+ dialog.Icon = TaskDialogStandardIcon.Information;
+ dialog.OwnerWindowHandle = new IntPtr(Globals.ThisAddIn.Application.HWND);
+ dialog.StandardButtons = TaskDialogStandardButtons.Cancel;
+ var lnkGhHomepage = new TaskDialogCommandLink("GitHub Homepage", ArrangeRibbonResources.dlgGitHubHomepage);
+ var lnkGhRelease = new TaskDialogCommandLink("GitHub Release", ArrangeRibbonResources.dlgGitHubRelease);
+ var lnkAcRelease = new TaskDialogCommandLink("AppCenter Release", ArrangeRibbonResources.dlgAppCenterRelease);
+ lnkGhHomepage.Click += (_, _) => AccessAndClose(dialog, AddInDescription.Instance.Homepage);
+ lnkGhRelease.Click += (_, _) => AccessAndClose(dialog, AddInDescription.Instance.GitHubReleaseUrl);
+ lnkAcRelease.Click += (_, _) => AccessAndClose(dialog, AddInDescription.Instance.AppCenterReleaseUrl);
+ dialog.Controls.Add(lnkGhHomepage);
+ dialog.Controls.Add(lnkGhRelease);
+ dialog.Controls.Add(lnkAcRelease);
+ dialog.Show();
+ }
+
+ static void AccessAndClose(TaskDialog dlg, string url) {
+ Process.Start(url);
+ dlg.Close();
+ }
+ }
+
+ public void BtnAddInFeedback_Click(Office.IRibbonControl _) {
+ Process.Start(AddInDescription.Instance.GitHubFeedbackUrl);
+ }
+
public void BtnAlign_Click(Office.IRibbonControl ribbonControl) {
var shapeRange = GetShapeRange();
if (shapeRange == null) {
@@ -237,9 +313,58 @@ public void BtnDistribute_Click(Office.IRibbonControl ribbonControl) {
ArrangementHelper.Distribute(shapeRange, cmd, _alignRelativeFlag);
}
+ public void BtnSnap_Click(Office.IRibbonControl ribbonControl) {
+ var shapeRange = GetShapeRange();
+ if (shapeRange == null) {
+ return;
+ }
+ ArrangementHelper.SnapCmd? cmd = ribbonControl.Id() switch {
+ btnSnapLeft => ArrangementHelper.SnapCmd.SnapLeftToRight,
+ btnSnapRight => ArrangementHelper.SnapCmd.SnapRightToLeft,
+ btnSnapTop => ArrangementHelper.SnapCmd.SnapTopToBottom,
+ btnSnapBottom => ArrangementHelper.SnapCmd.SnapBottomToTop,
+ _ => null
+ };
+ ArrangementHelper.Snap(shapeRange, cmd);
+ }
+
+
+ public void BtnGridSwitcher_Click(Office.IRibbonControl _, bool __) {
+ const string mso = "ViewGridlinesPowerPoint";
+ try {
+ if (Globals.ThisAddIn.Application.CommandBars.GetEnabledMso(mso)) {
+ Globals.ThisAddIn.Application.CommandBars.ExecuteMso(mso);
+ }
+ } catch (Exception) {
+ // ignored
+ } finally {
+ Task.Run(async () => {
+ await Task.Delay(50);
+ _ribbon?.InvalidateControls(btnGridSwitcher, grpAlignment, mnuArrangement, (mnuArrangement, mnuAlignment));
+ });
+ }
+ }
+
+ public bool BtnGridSwitcher_GetPressed(Office.IRibbonControl _) {
+ const string mso = "ViewGridlinesPowerPoint";
+ try {
+ if (Globals.ThisAddIn.Application.CommandBars.GetEnabledMso(mso)) {
+ return Globals.ThisAddIn.Application.CommandBars.GetPressedMso(mso);
+ }
+ } catch (Exception) {
+ // ignored
+ }
+ return false;
+ }
+
+ public void BtnGridSetting_Click(Office.IRibbonControl _) {
+ ArrangementHelper.GridSettingDialog();
+ }
+
// This flag is used to adjust alignment relative behavior, is used by BtnAlign_Click and BtnDistribute_Click.
private ArrangementHelper.AlignRelativeFlag _alignRelativeFlag = ArrangementHelper.AlignRelativeFlag.RelativeToObjects;
+ // Only for btnAlignRelative* and btnScaleAnchor*.
private bool IsOptionRibbonButton(Office.IRibbonControl ribbonControl) {
return ribbonControl.Id().Contains("_To") || ribbonControl.Id().Contains("_From"); // just check by id
}
@@ -267,8 +392,8 @@ public void BtnAlignRelative_Click(Office.IRibbonControl ribbonControl, bool _ =
}
ArrangementHelper.UpdateAppAlignRelative(_alignRelativeFlag);
_ribbon?.InvalidateControl(btnAlignRelative, grpArrange);
- _ribbon?.InvalidateControl(btnDistributeHorizontal, grpArrange);
- _ribbon?.InvalidateControl(btnDistributeVertical, grpArrange);
+ _ribbon?.InvalidateControls(btnDistributeHorizontal, grpArrange, grpAlignment);
+ _ribbon?.InvalidateControls(btnDistributeVertical, grpArrange, grpAlignment);
_ribbon?.InvalidateControls(btnAlignRelative_ToObjects, grpAlignment, (mnuArrangement, mnuAlignment));
_ribbon?.InvalidateControls(btnAlignRelative_ToFirstObject, grpAlignment, (mnuArrangement, mnuAlignment));
_ribbon?.InvalidateControls(btnAlignRelative_ToSlide, grpAlignment, (mnuArrangement, mnuAlignment));
@@ -322,6 +447,10 @@ public string BtnAlignRelative_GetLabel(Office.IRibbonControl ribbonControl) {
return GetImage(ribbonControl.Id());
}
+ public void BtnSizeAndPosition_Click(Office.IRibbonControl _) {
+ SizeAndPositionHelper.SizeAndPositionDialog();
+ }
+
public void BtnScale_Click(Office.IRibbonControl ribbonControl) {
var shapeRange = GetShapeRange();
if (shapeRange == null) {
@@ -336,29 +465,94 @@ public void BtnScale_Click(Office.IRibbonControl ribbonControl) {
ArrangementHelper.ScaleSize(shapeRange, cmd, _scaleFromFlag);
}
- // This flag is used to control scale and size behavior, is used by BtnScale_Click, BtnCopyAndPasteSize_Click and BtnResetMediaSize_Click.
- private Office.MsoScaleFrom _scaleFromFlag = Office.MsoScaleFrom.msoScaleFromTopLeft;
+ private DoublePressableHandler _extendDoublePressable = new() { EnableDoublePress = true };
+
+ public void BtnExtend_Click(Office.IRibbonControl ribbonControl) {
+ var shapeRange = GetShapeRange();
+ if (shapeRange == null) {
+ return;
+ }
+ _extendDoublePressable.CheckPress(() => BtnExtend_SinglePress(ribbonControl), () => BtnExtend_DoublePress(ribbonControl));
+ }
+
+ public void BtnExtend_SinglePress(Office.IRibbonControl ribbonControl) {
+ var shapeRange = GetShapeRange();
+ if (shapeRange == null) {
+ return;
+ }
+ ArrangementHelper.ExtendSizeCmd? cmd = ribbonControl.Id() switch {
+ btnExtendSameLeft => ArrangementHelper.ExtendSizeCmd.ExtendToLeft,
+ btnExtendSameRight => ArrangementHelper.ExtendSizeCmd.ExtendToRight,
+ btnExtendSameTop => ArrangementHelper.ExtendSizeCmd.ExtendToTop,
+ btnExtendSameBottom => ArrangementHelper.ExtendSizeCmd.ExtendToBottom,
+ _ => null
+ };
+ ArrangementHelper.ExtendSize(shapeRange, cmd, _extendToFirstObject);
+ }
+
+ public void BtnExtend_DoublePress(Office.IRibbonControl ribbonControl) {
+ var shapeRange = GetShapeRange();
+ if (shapeRange == null) {
+ return;
+ }
+ ArrangementHelper.ExtendSizeCmd? cmd = ribbonControl.Id() switch {
+ btnExtendSameLeft => ArrangementHelper.ExtendSizeCmd.ExtendToLeft,
+ btnExtendSameRight => ArrangementHelper.ExtendSizeCmd.ExtendToRight,
+ btnExtendSameTop => ArrangementHelper.ExtendSizeCmd.ExtendToTop,
+ btnExtendSameBottom => ArrangementHelper.ExtendSizeCmd.ExtendToBottom,
+ _ => null
+ };
+ ArrangementHelper.ExtendSize(shapeRange, cmd, !_extendToFirstObject);
+ }
+
+ private bool _extendToFirstObject;
+
+ public void ChkExtendToFirstObject_Click(Office.IRibbonControl ribbonControl, bool _) {
+ _extendToFirstObject = !_extendToFirstObject;
+ _ribbon?.InvalidateControls(chkExtendToFirstObject, grpResizing, (mnuArrangement, mnuResizing));
+ }
+
+ public bool ChkExtendToFirstObject_GetPressed(Office.IRibbonControl ribbonControl) {
+ return _extendToFirstObject;
+ }
+
+ // This flag is used to control scale and size behavior, is used by BtnScale_Click, EdtSize_TextChanged, BtnCopyAndPasteSize_Click and BtnResetMediaSize_Click.
+ private SizeAndPositionHelper.ScaleFromFlag _scaleFromFlag = SizeAndPositionHelper.ScaleFromFlag.FromTopLeft;
public void BtnScaleAnchor_Click(Office.IRibbonControl ribbonControl, bool _ = false) {
if (!IsOptionRibbonButton(ribbonControl)) {
_scaleFromFlag = _scaleFromFlag switch {
- Office.MsoScaleFrom.msoScaleFromTopLeft => Office.MsoScaleFrom.msoScaleFromMiddle,
- Office.MsoScaleFrom.msoScaleFromMiddle => Office.MsoScaleFrom.msoScaleFromBottomRight,
- Office.MsoScaleFrom.msoScaleFromBottomRight => Office.MsoScaleFrom.msoScaleFromTopLeft,
- _ => Office.MsoScaleFrom.msoScaleFromTopLeft
+ SizeAndPositionHelper.ScaleFromFlag.FromTopLeft => SizeAndPositionHelper.ScaleFromFlag.FromTopRight,
+ SizeAndPositionHelper.ScaleFromFlag.FromTopRight => SizeAndPositionHelper.ScaleFromFlag.FromBottomLeft,
+ SizeAndPositionHelper.ScaleFromFlag.FromBottomLeft => SizeAndPositionHelper.ScaleFromFlag.FromBottomRight,
+ SizeAndPositionHelper.ScaleFromFlag.FromBottomRight => SizeAndPositionHelper.ScaleFromFlag.FromCenter,
+ SizeAndPositionHelper.ScaleFromFlag.FromCenter => SizeAndPositionHelper.ScaleFromFlag.FromTopLeft,
+ _ => SizeAndPositionHelper.ScaleFromFlag.FromTopLeft
};
} else {
_scaleFromFlag = ribbonControl.Id() switch {
- btnScaleAnchor_FromTopLeft => Office.MsoScaleFrom.msoScaleFromTopLeft,
- btnScaleAnchor_FromMiddle => Office.MsoScaleFrom.msoScaleFromMiddle,
- btnScaleAnchor_FromBottomRight => Office.MsoScaleFrom.msoScaleFromBottomRight,
+ btnScaleAnchor_FromTopLeft => SizeAndPositionHelper.ScaleFromFlag.FromTopLeft,
+ btnScaleAnchor_FromTopRight => SizeAndPositionHelper.ScaleFromFlag.FromTopRight,
+ btnScaleAnchor_FromBottomLeft => SizeAndPositionHelper.ScaleFromFlag.FromBottomLeft,
+ btnScaleAnchor_FromBottomRight => SizeAndPositionHelper.ScaleFromFlag.FromBottomRight,
+ btnScaleAnchor_FromLeft => SizeAndPositionHelper.ScaleFromFlag.FromLeft,
+ btnScaleAnchor_FromRight => SizeAndPositionHelper.ScaleFromFlag.FromRight,
+ btnScaleAnchor_FromTop => SizeAndPositionHelper.ScaleFromFlag.FromTop,
+ btnScaleAnchor_FromBottom => SizeAndPositionHelper.ScaleFromFlag.FromBottom,
+ btnScaleAnchor_FromCenter => SizeAndPositionHelper.ScaleFromFlag.FromCenter,
_ => _scaleFromFlag
};
}
_ribbon?.InvalidateControls(btnScaleAnchor, grpArrange, _sizeAndPositionGroups);
- _ribbon?.InvalidateControls(btnScaleAnchor_FromTopLeft, grpSizeAndSnap, (mnuArrangement, mnuResizing));
- _ribbon?.InvalidateControls(btnScaleAnchor_FromMiddle, grpSizeAndSnap, (mnuArrangement, mnuResizing));
- _ribbon?.InvalidateControls(btnScaleAnchor_FromBottomRight, grpSizeAndSnap, (mnuArrangement, mnuResizing));
+ _ribbon?.InvalidateControls(btnScaleAnchor_FromTopLeft, grpResizing, (mnuArrangement, mnuResizing));
+ _ribbon?.InvalidateControls(btnScaleAnchor_FromTopRight, grpResizing, (mnuArrangement, mnuResizing));
+ _ribbon?.InvalidateControls(btnScaleAnchor_FromBottomLeft, grpResizing, (mnuArrangement, mnuResizing));
+ _ribbon?.InvalidateControls(btnScaleAnchor_FromBottomRight, grpResizing, (mnuArrangement, mnuResizing));
+ _ribbon?.InvalidateControls(btnScaleAnchor_FromLeft, grpResizing, (mnuArrangement, mnuResizing));
+ _ribbon?.InvalidateControls(btnScaleAnchor_FromRight, grpResizing, (mnuArrangement, mnuResizing));
+ _ribbon?.InvalidateControls(btnScaleAnchor_FromTop, grpResizing, (mnuArrangement, mnuResizing));
+ _ribbon?.InvalidateControls(btnScaleAnchor_FromBottom, grpResizing, (mnuArrangement, mnuResizing));
+ _ribbon?.InvalidateControls(btnScaleAnchor_FromCenter, grpResizing, (mnuArrangement, mnuResizing));
}
public bool BtnScaleAnchor_GetPressed(Office.IRibbonControl ribbonControl) {
@@ -366,9 +560,15 @@ public bool BtnScaleAnchor_GetPressed(Office.IRibbonControl ribbonControl) {
return false;
}
return ribbonControl.Id() switch {
- btnScaleAnchor_FromTopLeft => _scaleFromFlag == Office.MsoScaleFrom.msoScaleFromTopLeft,
- btnScaleAnchor_FromMiddle => _scaleFromFlag == Office.MsoScaleFrom.msoScaleFromMiddle,
- btnScaleAnchor_FromBottomRight => _scaleFromFlag == Office.MsoScaleFrom.msoScaleFromBottomRight,
+ btnScaleAnchor_FromTopLeft => _scaleFromFlag == SizeAndPositionHelper.ScaleFromFlag.FromTopLeft,
+ btnScaleAnchor_FromTopRight => _scaleFromFlag == SizeAndPositionHelper.ScaleFromFlag.FromTopRight,
+ btnScaleAnchor_FromBottomLeft => _scaleFromFlag == SizeAndPositionHelper.ScaleFromFlag.FromBottomLeft,
+ btnScaleAnchor_FromBottomRight => _scaleFromFlag == SizeAndPositionHelper.ScaleFromFlag.FromBottomRight,
+ btnScaleAnchor_FromLeft => _scaleFromFlag == SizeAndPositionHelper.ScaleFromFlag.FromLeft,
+ btnScaleAnchor_FromRight => _scaleFromFlag == SizeAndPositionHelper.ScaleFromFlag.FromRight,
+ btnScaleAnchor_FromTop => _scaleFromFlag == SizeAndPositionHelper.ScaleFromFlag.FromTop,
+ btnScaleAnchor_FromBottom => _scaleFromFlag == SizeAndPositionHelper.ScaleFromFlag.FromBottom,
+ btnScaleAnchor_FromCenter => _scaleFromFlag == SizeAndPositionHelper.ScaleFromFlag.FromCenter,
_ => false
};
}
@@ -376,9 +576,15 @@ public bool BtnScaleAnchor_GetPressed(Office.IRibbonControl ribbonControl) {
public string BtnScaleAnchor_GetLabel(Office.IRibbonControl ribbonControl) {
if (!IsOptionRibbonButton(ribbonControl)) {
return _scaleFromFlag switch {
- Office.MsoScaleFrom.msoScaleFromTopLeft => GetLabel(btnScaleAnchor_FromTopLeft),
- Office.MsoScaleFrom.msoScaleFromMiddle => GetLabel(btnScaleAnchor_FromMiddle),
- Office.MsoScaleFrom.msoScaleFromBottomRight => GetLabel(btnScaleAnchor_FromBottomRight),
+ SizeAndPositionHelper.ScaleFromFlag.FromTopLeft => GetLabel(btnScaleAnchor_FromTopLeft),
+ SizeAndPositionHelper.ScaleFromFlag.FromTopRight => GetLabel(btnScaleAnchor_FromTopRight),
+ SizeAndPositionHelper.ScaleFromFlag.FromBottomLeft => GetLabel(btnScaleAnchor_FromBottomLeft),
+ SizeAndPositionHelper.ScaleFromFlag.FromBottomRight => GetLabel(btnScaleAnchor_FromBottomRight),
+ SizeAndPositionHelper.ScaleFromFlag.FromLeft => GetLabel(btnScaleAnchor_FromLeft),
+ SizeAndPositionHelper.ScaleFromFlag.FromRight => GetLabel(btnScaleAnchor_FromRight),
+ SizeAndPositionHelper.ScaleFromFlag.FromTop => GetLabel(btnScaleAnchor_FromTop),
+ SizeAndPositionHelper.ScaleFromFlag.FromBottom => GetLabel(btnScaleAnchor_FromBottom),
+ SizeAndPositionHelper.ScaleFromFlag.FromCenter => GetLabel(btnScaleAnchor_FromCenter),
_ => GetLabel(btnScaleAnchor_FromTopLeft)
};
}
@@ -388,44 +594,21 @@ public string BtnScaleAnchor_GetLabel(Office.IRibbonControl ribbonControl) {
public System.Drawing.Image? BtnScaleAnchor_GetImage(Office.IRibbonControl ribbonControl) {
if (!IsOptionRibbonButton(ribbonControl)) {
return _scaleFromFlag switch {
- Office.MsoScaleFrom.msoScaleFromTopLeft => GetImage(btnScaleAnchor_FromTopLeft),
- Office.MsoScaleFrom.msoScaleFromMiddle => GetImage(btnScaleAnchor_FromMiddle),
- Office.MsoScaleFrom.msoScaleFromBottomRight => GetImage(btnScaleAnchor_FromBottomRight),
+ SizeAndPositionHelper.ScaleFromFlag.FromTopLeft => GetImage(btnScaleAnchor_FromTopLeft),
+ SizeAndPositionHelper.ScaleFromFlag.FromTopRight => GetImage(btnScaleAnchor_FromTopRight),
+ SizeAndPositionHelper.ScaleFromFlag.FromBottomLeft => GetImage(btnScaleAnchor_FromBottomLeft),
+ SizeAndPositionHelper.ScaleFromFlag.FromBottomRight => GetImage(btnScaleAnchor_FromBottomRight),
+ SizeAndPositionHelper.ScaleFromFlag.FromLeft => GetImage(btnScaleAnchor_FromLeft),
+ SizeAndPositionHelper.ScaleFromFlag.FromRight => GetImage(btnScaleAnchor_FromRight),
+ SizeAndPositionHelper.ScaleFromFlag.FromTop => GetImage(btnScaleAnchor_FromTop),
+ SizeAndPositionHelper.ScaleFromFlag.FromBottom => GetImage(btnScaleAnchor_FromBottom),
+ SizeAndPositionHelper.ScaleFromFlag.FromCenter => GetImage(btnScaleAnchor_FromCenter),
_ => GetImage(btnScaleAnchor_FromTopLeft)
};
}
return GetImage(ribbonControl.Id());
}
- public void BtnExtend_Click(Office.IRibbonControl ribbonControl) {
- var shapeRange = GetShapeRange();
- if (shapeRange == null) {
- return;
- }
- ArrangementHelper.ExtendSizeCmd? cmd = ribbonControl.Id() switch {
- btnExtendSameLeft => ArrangementHelper.ExtendSizeCmd.ExtendToLeft,
- btnExtendSameRight => ArrangementHelper.ExtendSizeCmd.ExtendToRight,
- btnExtendSameTop => ArrangementHelper.ExtendSizeCmd.ExtendToTop,
- btnExtendSameBottom => ArrangementHelper.ExtendSizeCmd.ExtendToBottom,
- _ => null
- };
- ArrangementHelper.ExtendSize(shapeRange, cmd);
- }
-
- public void BtnSnap_Click(Office.IRibbonControl ribbonControl) {
- var shapeRange = GetShapeRange();
- if (shapeRange == null) {
- return;
- }
- ArrangementHelper.SnapCmd? cmd = ribbonControl.Id() switch {
- btnSnapLeft => ArrangementHelper.SnapCmd.SnapLeftToRight,
- btnSnapRight => ArrangementHelper.SnapCmd.SnapRightToLeft,
- btnSnapTop => ArrangementHelper.SnapCmd.SnapTopToBottom,
- btnSnapBottom => ArrangementHelper.SnapCmd.SnapBottomToTop,
- _ => null
- };
- ArrangementHelper.Snap(shapeRange, cmd);
- }
public void BtnRotate_Click(Office.IRibbonControl ribbonControl) {
var shapeRange = GetShapeRange();
@@ -454,98 +637,6 @@ public void BtnFlip_Click(Office.IRibbonControl ribbonControl) {
ArrangementHelper.Flip(shapeRange, cmd);
}
- public void BtnMove_Click(Office.IRibbonControl ribbonControl) {
- var shapeRange = GetShapeRange();
- if (shapeRange == null) {
- return;
- }
- Office.MsoZOrderCmd? cmd = ribbonControl.Id() switch {
- btnMoveForward => Office.MsoZOrderCmd.msoBringForward,
- btnMoveBackward => Office.MsoZOrderCmd.msoSendBackward,
- btnMoveFront => Office.MsoZOrderCmd.msoBringToFront,
- btnMoveBack => Office.MsoZOrderCmd.msoSendToBack,
- _ => null
- };
- ArrangementHelper.LayerMove(shapeRange, cmd);
- }
-
- public void BtnGroup_Click(Office.IRibbonControl ribbonControl) {
- var shapeRange = GetShapeRange();
- if (shapeRange == null) {
- return;
- }
- ArrangementHelper.GroupCmd? cmd = ribbonControl.Id() switch {
- btnGroup => ArrangementHelper.GroupCmd.Group,
- btnUngroup => ArrangementHelper.GroupCmd.Ungroup,
- _ => null
- };
- ArrangementHelper.Group(shapeRange, cmd, () => _ribbon?.Invalidate());
- }
-
- public void BtnAddInSetting_Click(Office.IRibbonControl _) {
- var oldLanguage = AddInSetting.Instance.Language;
- var oldIconStyle = AddInSetting.Instance.IconStyle;
- var dlg = new Dialog.SettingDialog();
- var result = dlg.ShowDialog();
- if (result != Forms.DialogResult.OK) {
- return;
- }
-
- if (AddInSetting.Instance.Language != oldLanguage) {
- // include updating elements and invalidating ribbon
- AddInLanguageChanger.ChangeLanguage(AddInSetting.Instance.Language);
- } else if (AddInSetting.Instance.IconStyle != oldIconStyle) {
- UpdateUiElementsAndInvalidate(); // update elements for icons and invalidating ribbon
- } else {
- _ribbon?.Invalidate(); // just invalidate ribbon
- }
- }
-
- public void BtnAddInCheckUpdate_Click(Office.IRibbonControl _) {
- Task.Run(async () => {
- var hwnd = new IntPtr(Globals.ThisAddIn.Application.HWND);
- var __ = await AddInVersion.Instance.CheckUpdateManually(hwnd);
- });
- }
-
- public void BtnAddInHomepage_Click(Office.IRibbonControl _) {
- using (new EnableThemingInScope(true)) {
- var dialog = new TaskDialog();
- dialog.Caption = AddInDescription.Instance.Title;
- dialog.InstructionText = ArrangeRibbonResources.dlgChooseToVisit;
- dialog.Icon = TaskDialogStandardIcon.Information;
- dialog.OwnerWindowHandle = new IntPtr(Globals.ThisAddIn.Application.HWND);
- dialog.StandardButtons = TaskDialogStandardButtons.Cancel;
- var lnkGhHomepage = new TaskDialogCommandLink("GitHub Homepage", ArrangeRibbonResources.dlgGitHubHomepage);
- var lnkGhRelease = new TaskDialogCommandLink("GitHub Release", ArrangeRibbonResources.dlgGitHubRelease);
- var lnkAcRelease = new TaskDialogCommandLink("AppCenter Release", ArrangeRibbonResources.dlgAppCenterRelease);
- lnkGhHomepage.Click += (_, _) => AccessAndClose(dialog, AddInDescription.Instance.Homepage);
- lnkGhRelease.Click += (_, _) => AccessAndClose(dialog, AddInDescription.Instance.GitHubReleaseUrl);
- lnkAcRelease.Click += (_, _) => AccessAndClose(dialog, AddInDescription.Instance.AppCenterReleaseUrl);
- dialog.Controls.Add(lnkGhHomepage);
- dialog.Controls.Add(lnkGhRelease);
- dialog.Controls.Add(lnkAcRelease);
- dialog.Show();
- }
-
- static void AccessAndClose(TaskDialog dlg, string url) {
- Process.Start(url);
- dlg.Close();
- }
- }
-
- public void BtnAddInFeedback_Click(Office.IRibbonControl _) {
- Process.Start(AddInDescription.Instance.GitHubFeedbackUrl);
- }
-
- public void BtnGridSetting_Click(Office.IRibbonControl _) {
- ArrangementHelper.GridSettingDialog();
- }
-
- public void BtnSizeAndPosition_Click(Office.IRibbonControl _) {
- SizeAndPositionHelper.SizeAndPositionDialog();
- }
-
public void EdtAngle_TextChanged(Office.IRibbonControl ribbonControl, string text) {
var shapeRange = GetShapeRange();
if (shapeRange == null) {
@@ -591,6 +682,35 @@ public void BtnResetAngle_Click(Office.IRibbonControl ribbonControl) {
});
}
+ public void BtnMove_Click(Office.IRibbonControl ribbonControl) {
+ var shapeRange = GetShapeRange();
+ if (shapeRange == null) {
+ return;
+ }
+ Office.MsoZOrderCmd? cmd = ribbonControl.Id() switch {
+ btnMoveForward => Office.MsoZOrderCmd.msoBringForward,
+ btnMoveBackward => Office.MsoZOrderCmd.msoSendBackward,
+ btnMoveFront => Office.MsoZOrderCmd.msoBringToFront,
+ btnMoveBack => Office.MsoZOrderCmd.msoSendToBack,
+ _ => null
+ };
+ ArrangementHelper.LayerMove(shapeRange, cmd);
+ }
+
+ public void BtnGroup_Click(Office.IRibbonControl ribbonControl) {
+ var shapeRange = GetShapeRange();
+ if (shapeRange == null) {
+ return;
+ }
+ ArrangementHelper.GroupCmd? cmd = ribbonControl.Id() switch {
+ btnGroup => ArrangementHelper.GroupCmd.Group,
+ btnUngroup => ArrangementHelper.GroupCmd.Ungroup,
+ _ => null
+ };
+ ArrangementHelper.Group(shapeRange, cmd, () => _ribbon?.Invalidate());
+ }
+
+
public void BtnResetMediaSize_Click(Office.IRibbonControl ribbonControl) {
var shapeRange = GetShapeRange();
if (shapeRange == null) {
@@ -715,6 +835,66 @@ public void BtnCopyAndPastePosition_Click(Office.IRibbonControl ribbonControl) {
});
}
+ private SizeAndPositionHelper.DistanceType _distanceType = SizeAndPositionHelper.DistanceType.RightLeft;
+
+ public void BtnDistanceType_Click(Office.IRibbonControl ribbonControl, bool _) {
+ switch (ribbonControl.Id()) {
+ case btnDistanceType_RightLeft:
+ _distanceType = SizeAndPositionHelper.DistanceType.RightLeft;
+ break;
+ case btnDistanceType_LeftLeft:
+ _distanceType = SizeAndPositionHelper.DistanceType.LeftLeft;
+ break;
+ case btnDistanceType_RightRight:
+ _distanceType = SizeAndPositionHelper.DistanceType.RightRight;
+ break;
+ case btnDistanceType_LeftRight:
+ _distanceType = SizeAndPositionHelper.DistanceType.LeftRight;
+ break;
+ }
+ _ribbon?.InvalidateControl(btnDistanceType_RightLeft, grpObjectPosition);
+ _ribbon?.InvalidateControl(btnDistanceType_LeftLeft, grpObjectPosition);
+ _ribbon?.InvalidateControl(btnDistanceType_RightRight, grpObjectPosition);
+ _ribbon?.InvalidateControl(btnDistanceType_LeftRight, grpObjectPosition);
+ }
+
+ public bool BtnDistanceType_GetPressed(Office.IRibbonControl ribbonControl) {
+ return ribbonControl.Id() switch {
+ btnDistanceType_RightLeft => _distanceType == SizeAndPositionHelper.DistanceType.RightLeft,
+ btnDistanceType_LeftLeft => _distanceType == SizeAndPositionHelper.DistanceType.LeftLeft,
+ btnDistanceType_RightRight => _distanceType == SizeAndPositionHelper.DistanceType.RightRight,
+ btnDistanceType_LeftRight => _distanceType == SizeAndPositionHelper.DistanceType.LeftRight,
+ _ => false
+ };
+ }
+
+ public void BtnCopyAndPasteDistance_Click(Office.IRibbonControl ribbonControl) {
+ var shapeRange = GetShapeRange();
+ if (shapeRange == null) {
+ return;
+ }
+ SizeAndPositionHelper.CopyAndPasteCmd? cmd = ribbonControl.Id() switch {
+ btnCopyDistanceH or btnCopyDistanceV => SizeAndPositionHelper.CopyAndPasteCmd.Copy,
+ btnPasteDistanceH or btnPasteDistanceV => SizeAndPositionHelper.CopyAndPasteCmd.Paste,
+ _ => null
+ };
+ if (ribbonControl.Id() == btnCopyDistanceH || ribbonControl.Id() == btnPasteDistanceH) {
+ SizeAndPositionHelper.CopyAndPasteDistance(shapeRange, cmd, _distanceType, true, () => {
+ _ribbon?.InvalidateControls(btnCopyDistanceH, grpObjectPosition);
+ _ribbon?.InvalidateControls(btnPasteDistanceH, grpObjectPosition);
+ _ribbon?.InvalidateControls(edtPositionX, grpObjectPosition, _sizeAndPositionGroups);
+ _ribbon?.InvalidateControls(edtPositionY, grpObjectPosition, _sizeAndPositionGroups);
+ });
+ } else if (ribbonControl.Id() == btnCopyDistanceV || ribbonControl.Id() == btnPasteDistanceV) {
+ SizeAndPositionHelper.CopyAndPasteDistance(shapeRange, cmd, _distanceType, false, () => {
+ _ribbon?.InvalidateControls(btnCopyDistanceV, grpObjectPosition);
+ _ribbon?.InvalidateControls(btnPasteDistanceV, grpObjectPosition);
+ _ribbon?.InvalidateControls(edtPositionX, grpObjectPosition, _sizeAndPositionGroups);
+ _ribbon?.InvalidateControls(edtPositionY, grpObjectPosition, _sizeAndPositionGroups);
+ });
+ }
+ }
+
public void BtnAutofit_Click(Office.IRibbonControl ribbonControl, bool _) {
var (_, textFrame) = GetTextFrame();
if (textFrame == null) {
@@ -822,32 +1002,46 @@ public string EdtMargin_GetText(Office.IRibbonControl ribbonControl) {
// This flag is used for picture replacing related callbacks, that is BtnReplacePicture_Click.
private ReplacePictureHelper.ReplacePictureFlag _replacePictureFlag =
- ReplacePictureHelper.ReplacePictureFlag.ReplaceToMiddle | ReplacePictureHelper.ReplacePictureFlag.ReserveOriginalSize;
-
- public void ChkReserveOriginalSize_Click(Office.IRibbonControl ribbonControl, bool _) {
- if (!ChkReserveOriginalSize_GetPressed(ribbonControl)) {
- _replacePictureFlag |= ReplacePictureHelper.ReplacePictureFlag.ReserveOriginalSize;
- } else {
- _replacePictureFlag &= ~ReplacePictureHelper.ReplacePictureFlag.ReserveOriginalSize;
- }
- _ribbon?.InvalidateControl(chkReserveOriginalSize, grpReplacePicture);
- }
-
- public bool ChkReserveOriginalSize_GetPressed(Office.IRibbonControl _) {
- return (_replacePictureFlag & ReplacePictureHelper.ReplacePictureFlag.ReserveOriginalSize) != 0;
- }
-
- public void ChkReplaceToMiddle_Click(Office.IRibbonControl ribbonControl, bool _) {
- if (!ChkReplaceToMiddle_GetPressed(ribbonControl)) {
- _replacePictureFlag |= ReplacePictureHelper.ReplacePictureFlag.ReplaceToMiddle;
- } else {
- _replacePictureFlag &= ~ReplacePictureHelper.ReplacePictureFlag.ReplaceToMiddle;
+ ReplacePictureHelper.ReplacePictureFlag.ReplaceToContain | ReplacePictureHelper.ReplacePictureFlag.ReplaceToMiddle;
+
+ public void ChkReplaceMode_Click(Office.IRibbonControl ribbonControl, bool _) {
+ switch (ribbonControl.Id()) {
+ case chkReplaceToFill:
+ if (!ChkReplaceMode_GetPressed(ribbonControl)) {
+ _replacePictureFlag |= ReplacePictureHelper.ReplacePictureFlag.ReplaceToFill;
+ _replacePictureFlag &= ~ReplacePictureHelper.ReplacePictureFlag.ReplaceToContain;
+ } else {
+ _replacePictureFlag &= ~ReplacePictureHelper.ReplacePictureFlag.ReplaceToFill;
+ }
+ break;
+ case chkReplaceToContain:
+ if (!ChkReplaceMode_GetPressed(ribbonControl)) {
+ _replacePictureFlag |= ReplacePictureHelper.ReplacePictureFlag.ReplaceToContain;
+ _replacePictureFlag &= ~ReplacePictureHelper.ReplacePictureFlag.ReplaceToFill;
+ } else {
+ _replacePictureFlag &= ~ReplacePictureHelper.ReplacePictureFlag.ReplaceToContain;
+ }
+ break;
+ case chkReplaceToMiddle:
+ if (!ChkReplaceMode_GetPressed(ribbonControl)) {
+ _replacePictureFlag |= ReplacePictureHelper.ReplacePictureFlag.ReplaceToMiddle;
+ } else {
+ _replacePictureFlag &= ~ReplacePictureHelper.ReplacePictureFlag.ReplaceToMiddle;
+ }
+ break;
}
+ _ribbon?.InvalidateControl(chkReplaceToFill, grpReplacePicture);
+ _ribbon?.InvalidateControl(chkReplaceToContain, grpReplacePicture);
_ribbon?.InvalidateControl(chkReplaceToMiddle, grpReplacePicture);
}
- public bool ChkReplaceToMiddle_GetPressed(Office.IRibbonControl _) {
- return (_replacePictureFlag & ReplacePictureHelper.ReplacePictureFlag.ReplaceToMiddle) != 0;
+ public bool ChkReplaceMode_GetPressed(Office.IRibbonControl ribbonControl) {
+ return ribbonControl.Id() switch {
+ chkReplaceToFill => (_replacePictureFlag & ReplacePictureHelper.ReplacePictureFlag.ReplaceToFill) != 0,
+ chkReplaceToContain => (_replacePictureFlag & ReplacePictureHelper.ReplacePictureFlag.ReplaceToContain) != 0,
+ chkReplaceToMiddle => (_replacePictureFlag & ReplacePictureHelper.ReplacePictureFlag.ReplaceToMiddle) != 0,
+ _ => false
+ };
}
public void BtnReplacePicture_Click(Office.IRibbonControl ribbonControl) {
diff --git a/PowerPointArrangeAddin/Ribbon/ArrangeRibbonResources.Designer.cs b/PowerPointArrangeAddin/Ribbon/ArrangeRibbonResources.Designer.cs
index 38749a3..2cce0dd 100644
--- a/PowerPointArrangeAddin/Ribbon/ArrangeRibbonResources.Designer.cs
+++ b/PowerPointArrangeAddin/Ribbon/ArrangeRibbonResources.Designer.cs
@@ -213,6 +213,24 @@ public static string btnCopyAngle {
}
}
+ ///
+ /// Looks up a localized string similar to Copy distance.
+ ///
+ public static string btnCopyDistanceH {
+ get {
+ return ResourceManager.GetString("btnCopyDistanceH", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Copy distance.
+ ///
+ public static string btnCopyDistanceV {
+ get {
+ return ResourceManager.GetString("btnCopyDistanceV", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Copy position.
///
@@ -231,6 +249,42 @@ public static string btnCopySize {
}
}
+ ///
+ /// Looks up a localized string similar to Distance between left and left, top and top.
+ ///
+ public static string btnDistanceType_LeftLeft {
+ get {
+ return ResourceManager.GetString("btnDistanceType_LeftLeft", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Distance between left and right, top and bottom.
+ ///
+ public static string btnDistanceType_LeftRight {
+ get {
+ return ResourceManager.GetString("btnDistanceType_LeftRight", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Distance between right and left, bottom and top.
+ ///
+ public static string btnDistanceType_RightLeft {
+ get {
+ return ResourceManager.GetString("btnDistanceType_RightLeft", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Distance between right and right, bottom and bottom.
+ ///
+ public static string btnDistanceType_RightRight {
+ get {
+ return ResourceManager.GetString("btnDistanceType_RightRight", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Distribute &horizontally.
///
@@ -312,6 +366,15 @@ public static string btnGridSetting {
}
}
+ ///
+ /// Looks up a localized string similar to &Show grid.
+ ///
+ public static string btnGridSwitcher {
+ get {
+ return ResourceManager.GetString("btnGridSwitcher", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to &Group shapes.
///
@@ -375,6 +438,24 @@ public static string btnPasteAngle {
}
}
+ ///
+ /// Looks up a localized string similar to Paste distance.
+ ///
+ public static string btnPasteDistanceH {
+ get {
+ return ResourceManager.GetString("btnPasteDistanceH", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Paste distance.
+ ///
+ public static string btnPasteDistanceV {
+ get {
+ return ResourceManager.GetString("btnPasteDistanceV", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Paste position.
///
@@ -466,7 +547,43 @@ public static string btnRotateRight90 {
}
///
- /// Looks up a localized string similar to Scale from botto&m right.
+ /// Looks up a localized string similar to Scale from bottom.
+ ///
+ public static string btnScaleAnchor_FromBottom {
+ get {
+ return ResourceManager.GetString("btnScaleAnchor_FromBottom", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Scal&e shape from bottom.
+ ///
+ public static string btnScaleAnchor_FromBottom_Full {
+ get {
+ return ResourceManager.GetString("btnScaleAnchor_FromBottom_Full", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Scale from bottom left.
+ ///
+ public static string btnScaleAnchor_FromBottomLeft {
+ get {
+ return ResourceManager.GetString("btnScaleAnchor_FromBottomLeft", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Scale shape from botto&m left.
+ ///
+ public static string btnScaleAnchor_FromBottomLeft_Full {
+ get {
+ return ResourceManager.GetString("btnScaleAnchor_FromBottomLeft_Full", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Scale from bottom right.
///
public static string btnScaleAnchor_FromBottomRight {
get {
@@ -475,16 +592,88 @@ public static string btnScaleAnchor_FromBottomRight {
}
///
- /// Looks up a localized string similar to Scale &from middle.
+ /// Looks up a localized string similar to Scale shape from bottom ri&ght.
+ ///
+ public static string btnScaleAnchor_FromBottomRight_Full {
+ get {
+ return ResourceManager.GetString("btnScaleAnchor_FromBottomRight_Full", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Scale from center.
+ ///
+ public static string btnScaleAnchor_FromCenter {
+ get {
+ return ResourceManager.GetString("btnScaleAnchor_FromCenter", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Scale shape from ce&nter.
+ ///
+ public static string btnScaleAnchor_FromCenter_Full {
+ get {
+ return ResourceManager.GetString("btnScaleAnchor_FromCenter_Full", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Scale from left.
+ ///
+ public static string btnScaleAnchor_FromLeft {
+ get {
+ return ResourceManager.GetString("btnScaleAnchor_FromLeft", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Scale shape from le&ft.
+ ///
+ public static string btnScaleAnchor_FromLeft_Full {
+ get {
+ return ResourceManager.GetString("btnScaleAnchor_FromLeft_Full", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Scale from right.
+ ///
+ public static string btnScaleAnchor_FromRight {
+ get {
+ return ResourceManager.GetString("btnScaleAnchor_FromRight", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to S&cale shape from right.
+ ///
+ public static string btnScaleAnchor_FromRight_Full {
+ get {
+ return ResourceManager.GetString("btnScaleAnchor_FromRight_Full", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Scale from top.
///
- public static string btnScaleAnchor_FromMiddle {
+ public static string btnScaleAnchor_FromTop {
get {
- return ResourceManager.GetString("btnScaleAnchor_FromMiddle", resourceCulture);
+ return ResourceManager.GetString("btnScaleAnchor_FromTop", resourceCulture);
}
}
///
- /// Looks up a localized string similar to Scale from t&op left.
+ /// Looks up a localized string similar to Sc&ale shape from top.
+ ///
+ public static string btnScaleAnchor_FromTop_Full {
+ get {
+ return ResourceManager.GetString("btnScaleAnchor_FromTop_Full", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Scale from top left.
///
public static string btnScaleAnchor_FromTopLeft {
get {
@@ -492,6 +681,33 @@ public static string btnScaleAnchor_FromTopLeft {
}
}
+ ///
+ /// Looks up a localized string similar to Scale shape from t&op left.
+ ///
+ public static string btnScaleAnchor_FromTopLeft_Full {
+ get {
+ return ResourceManager.GetString("btnScaleAnchor_FromTopLeft_Full", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Scale from top right.
+ ///
+ public static string btnScaleAnchor_FromTopRight {
+ get {
+ return ResourceManager.GetString("btnScaleAnchor_FromTopRight", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Scale shape from to&p right.
+ ///
+ public static string btnScaleAnchor_FromTopRight_Full {
+ get {
+ return ResourceManager.GetString("btnScaleAnchor_FromTopRight_Full", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Scale to same &height as the first shape.
///
@@ -529,7 +745,7 @@ public static string btnSizeAndPosition {
}
///
- /// Looks up a localized string similar to Snap &bottom to top.
+ /// Looks up a localized string similar to S&nap bottom to top.
///
public static string btnSnapBottom {
get {
@@ -538,7 +754,7 @@ public static string btnSnapBottom {
}
///
- /// Looks up a localized string similar to Snap &left to right.
+ /// Looks up a localized string similar to Snap l&eft to right.
///
public static string btnSnapLeft {
get {
@@ -547,7 +763,7 @@ public static string btnSnapLeft {
}
///
- /// Looks up a localized string similar to Snap &right to left.
+ /// Looks up a localized string similar to Snap r&ight to left.
///
public static string btnSnapRight {
get {
@@ -556,7 +772,7 @@ public static string btnSnapRight {
}
///
- /// Looks up a localized string similar to Snap &top to bottom.
+ /// Looks up a localized string similar to Sna&p top to bottom.
///
public static string btnSnapTop {
get {
@@ -583,20 +799,47 @@ public static string btnWrapText {
}
///
- /// Looks up a localized string similar to Replace to middle.
+ /// Looks up a localized string similar to To the first shape.
///
- public static string chkReplaceToMiddle {
+ public static string chkExtendToFirstObject {
get {
- return ResourceManager.GetString("chkReplaceToMiddle", resourceCulture);
+ return ResourceManager.GetString("chkExtendToFirstObject", resourceCulture);
}
}
///
- /// Looks up a localized string similar to Reserve original size.
+ /// Looks up a localized string similar to Extend to outline of the f&irst shape.
///
- public static string chkReserveOriginalSize {
+ public static string chkExtendToFirstObjectFull {
get {
- return ResourceManager.GetString("chkReserveOriginalSize", resourceCulture);
+ return ResourceManager.GetString("chkExtendToFirstObjectFull", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Replace and contain.
+ ///
+ public static string chkReplaceToContain {
+ get {
+ return ResourceManager.GetString("chkReplaceToContain", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Replace and fill.
+ ///
+ public static string chkReplaceToFill {
+ get {
+ return ResourceManager.GetString("chkReplaceToFill", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Replace to middle.
+ ///
+ public static string chkReplaceToMiddle {
+ get {
+ return ResourceManager.GetString("chkReplaceToMiddle", resourceCulture);
}
}
@@ -826,29 +1069,29 @@ public static string grpReplacePicture {
}
///
- /// Looks up a localized string similar to Rotate and flip.
+ /// Looks up a localized string similar to Resizing.
///
- public static string grpRotateAndFlip {
+ public static string grpResizing {
get {
- return ResourceManager.GetString("grpRotateAndFlip", resourceCulture);
+ return ResourceManager.GetString("grpResizing", resourceCulture);
}
}
///
- /// Looks up a localized string similar to Size and position.
+ /// Looks up a localized string similar to Rotate and flip.
///
- public static string grpSizeAndPosition {
+ public static string grpRotateAndFlip {
get {
- return ResourceManager.GetString("grpSizeAndPosition", resourceCulture);
+ return ResourceManager.GetString("grpRotateAndFlip", resourceCulture);
}
}
///
- /// Looks up a localized string similar to Resize and snap.
+ /// Looks up a localized string similar to Size and position.
///
- public static string grpSizeAndSnap {
+ public static string grpSizeAndPosition {
get {
- return ResourceManager.GetString("grpSizeAndSnap", resourceCulture);
+ return ResourceManager.GetString("grpSizeAndPosition", resourceCulture);
}
}
@@ -880,7 +1123,7 @@ public static string lbl3DRotation {
}
///
- /// Looks up a localized string similar to Horiz. align.
+ /// Looks up a localized string similar to H. align.
///
public static string lblAlignmentH {
get {
@@ -889,7 +1132,7 @@ public static string lblAlignmentH {
}
///
- /// Looks up a localized string similar to Vert. align.
+ /// Looks up a localized string similar to V. align.
///
public static string lblAlignmentV {
get {
@@ -897,6 +1140,33 @@ public static string lblAlignmentV {
}
}
+ ///
+ /// Looks up a localized string similar to Horiz..
+ ///
+ public static string lblDistanceH {
+ get {
+ return ResourceManager.GetString("lblDistanceH", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Distance.
+ ///
+ public static string lblDistanceType {
+ get {
+ return ResourceManager.GetString("lblDistanceType", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Vert..
+ ///
+ public static string lblDistanceV {
+ get {
+ return ResourceManager.GetString("lblDistanceV", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Distribute.
///
@@ -924,6 +1194,15 @@ public static string lblFlipObject {
}
}
+ ///
+ /// Looks up a localized string similar to Grid.
+ ///
+ public static string lblGrid {
+ get {
+ return ResourceManager.GetString("lblGrid", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Group.
///
@@ -960,6 +1239,33 @@ public static string lblRotateObject {
}
}
+ ///
+ /// Looks up a localized string similar to Scale from bottom.
+ ///
+ public static string lblScaleAnchor_FromBottom {
+ get {
+ return ResourceManager.GetString("lblScaleAnchor_FromBottom", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Scale from center.
+ ///
+ public static string lblScaleAnchor_FromCenter {
+ get {
+ return ResourceManager.GetString("lblScaleAnchor_FromCenter", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Scale from top.
+ ///
+ public static string lblScaleAnchor_FromTop {
+ get {
+ return ResourceManager.GetString("lblScaleAnchor_FromTop", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Scale.
///
@@ -970,11 +1276,20 @@ public static string lblScaleSize {
}
///
- /// Looks up a localized string similar to Snap.
+ /// Looks up a localized string similar to H. snap.
+ ///
+ public static string lblSnapH {
+ get {
+ return ResourceManager.GetString("lblSnapH", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to V. snap.
///
- public static string lblSnapObjects {
+ public static string lblSnapV {
get {
- return ResourceManager.GetString("lblSnapObjects", resourceCulture);
+ return ResourceManager.GetString("lblSnapV", resourceCulture);
}
}
@@ -1041,15 +1356,6 @@ public static string mnuArrangement_mnuRotation {
}
}
- ///
- /// Looks up a localized string similar to S&napping.
- ///
- public static string mnuArrangement_mnuSnapping {
- get {
- return ResourceManager.GetString("mnuArrangement_mnuSnapping", resourceCulture);
- }
- }
-
///
/// Looks up a localized string similar to Add-in setting.
///
diff --git a/PowerPointArrangeAddin/Ribbon/ArrangeRibbonResources.ja.resx b/PowerPointArrangeAddin/Ribbon/ArrangeRibbonResources.ja.resx
index 2dde79c..e7659db 100644
--- a/PowerPointArrangeAddin/Ribbon/ArrangeRibbonResources.ja.resx
+++ b/PowerPointArrangeAddin/Ribbon/ArrangeRibbonResources.ja.resx
@@ -173,6 +173,12 @@
同じ上端に伸ばす(&T)
+
+ 最初の図形に伸ばす
+
+
+ 最初に選択した図形の外枠に伸ばす(&I)
+
左右反転(&H)
@@ -224,13 +230,68 @@
右へ 90 度回転(&R)
-
- 中央点から変形(&F)
- 中央点をアンカーとして図形を変形
+
+ 頂部から変形
+
+
+ 中央から変形
+
+
+ 底部から変形
+
+
+ 元の左上端から図形を変形(&O)
+
+
+ 元の左下端から図形を変形(&P)
+
+
+ 元の右上端から図形を変形(&M)
+
+
+ 元の右下端から図形を変形(&G)
+
+
+ 元の左端から図形を変形(&F)
+
+
+ 元の右端から図形を変形(&C)
+
+
+ 元の上端から図形を変形(&A)
+
+
+ 元の下端から図形を変形(&E)
+
+
+ 元の中央点から図形を変形(&N)
- 左上端から変形(&O)
- 左上端をアンカーとして図形を変形
+ 左上端から変形
+
+
+ 左下端から変形
+
+
+ 右上端から変形
+
+
+ 右下端から変形
+
+
+ 左端から変形
+
+
+ 右端から変形
+
+
+ 上端から変形
+
+
+ 下端から変形
+
+
+ 中央点から変形
最初に選択した図形と同じ高さに変形(&H)
@@ -242,16 +303,16 @@
最初に選択した図形と同じ幅に変形(&W)
- 下端を上へ吸着(&B)
+ 下端を上へ吸着(&N)
- 左端を右へ吸着(&L)
+ 左端を右へ吸着(&E)
- 右端を左へ吸着(&R)
+ 右端を左へ吸着(&I)
- 上端を下へ吸着(&T)
+ 上端を下へ吸着(&P)
グループ解除(&U)
@@ -262,8 +323,11 @@
元の中央点に置換
-
- 図のサイズを保持
+
+ 拡大して置換
+
+
+ 元に合わせて置換
クリップボードに図がありませんので、置換できません。
@@ -325,9 +389,6 @@
回転(&O)
-
- 吸着(&N)
-
アドインの設定
@@ -346,10 +407,6 @@
すべてのファイル
-
- 右下端から変形(&M)
- 右下点をアンカーとして図形を変形
-
横の余白:
@@ -365,6 +422,9 @@
スライドに合わせて配置(&A)
+
+ グリッドの表示(&S)
+
グリッドの設定(&G)...
@@ -389,17 +449,23 @@
整列
-
- サイズ変更と吸着
+
+ サイズ変更
変形
- 伸ばし
+ 伸長
+
+
+ 横吸着
-
- 吸着
+
+ 縦吸着
+
+
+ グリッド
回転と反転
@@ -449,6 +515,39 @@
オブジェクトの位置
+
+ 距離の種類
+
+
+ 右端と左端・下端と上端の間の距離
+
+
+ 左端と左端・上端と上端の間の距離
+
+
+ 右端と右端・下端と下端の間の距離
+
+
+ 左端と右端・上端と下端の間の距離
+
+
+ 横方向
+
+
+ 横距離をコピー
+
+
+ 横距離を貼付
+
+
+ 縦方向
+
+
+ 縦距離をコピー
+
+
+ 縦距離を貼付
+
更新の確認
diff --git a/PowerPointArrangeAddin/Ribbon/ArrangeRibbonResources.resx b/PowerPointArrangeAddin/Ribbon/ArrangeRibbonResources.resx
index 8289fd3..5d5becf 100644
--- a/PowerPointArrangeAddin/Ribbon/ArrangeRibbonResources.resx
+++ b/PowerPointArrangeAddin/Ribbon/ArrangeRibbonResources.resx
@@ -173,6 +173,12 @@
Extend to same &top
+
+ To the first shape
+
+
+ Extend to outline of the f&irst shape
+
Flip &horizontally
@@ -224,17 +230,68 @@
Rotate &right with 90 degrees
-
- Scale from botto&m right
- ...
+
+ Scale from top
-
- Scale &from middle
- ...
+
+ Scale from center
+
+
+ Scale from bottom
+
+
+ Scale shape from t&op left
+
+
+ Scale shape from to&p right
+
+
+ Scale shape from botto&m left
+
+
+ Scale shape from bottom ri&ght
+
+
+ Scale shape from le&ft
+
+
+ S&cale shape from right
+
+
+ Sc&ale shape from top
+
+
+ Scal&e shape from bottom
+
+
+ Scale shape from ce&nter
- Scale from t&op left
- ...
+ Scale from top left
+
+
+ Scale from top right
+
+
+ Scale from bottom left
+
+
+ Scale from bottom right
+
+
+ Scale from left
+
+
+ Scale from right
+
+
+ Scale from top
+
+
+ Scale from bottom
+
+
+ Scale from center
Scale to same &height as the first shape
@@ -246,16 +303,16 @@
Scale to same &width as the first shape
- Snap &bottom to top
+ S&nap bottom to top
- Snap &left to right
+ Snap l&eft to right
- Snap &right to left
+ Snap r&ight to left
- Snap &top to bottom
+ Sna&p top to bottom
&Ungroup shapes
@@ -266,8 +323,11 @@
Replace to middle
-
- Reserve original size
+
+ Replace and fill
+
+
+ Replace and contain
There is no picture in clipboard.
@@ -329,9 +389,6 @@
R&otation
-
- S&napping
-
Add-in setting
@@ -365,6 +422,9 @@
Relative to the &first object
+
+ &Show grid
+
&Grid setting...
@@ -381,16 +441,16 @@
Alignment
- Horiz. align
+ H. align
- Vert. align
+ V. align
Distribute
-
- Resize and snap
+
+ Resizing
Scale
@@ -398,8 +458,14 @@
Extend
-
- Snap
+
+ H. snap
+
+
+ V. snap
+
+
+ Grid
Rotate and flip
@@ -449,6 +515,39 @@
Object position
+
+ Distance
+
+
+ Distance between right and left, bottom and top
+
+
+ Distance between left and left, top and top
+
+
+ Distance between right and right, bottom and bottom
+
+
+ Distance between left and right, top and bottom
+
+
+ Horiz.
+
+
+ Copy distance
+
+
+ Paste distance
+
+
+ Vert.
+
+
+ Copy distance
+
+
+ Paste distance
+
Check for updates
diff --git a/PowerPointArrangeAddin/Ribbon/ArrangeRibbonResources.zh-Hans.resx b/PowerPointArrangeAddin/Ribbon/ArrangeRibbonResources.zh-Hans.resx
index f908f88..55d8667 100644
--- a/PowerPointArrangeAddin/Ribbon/ArrangeRibbonResources.zh-Hans.resx
+++ b/PowerPointArrangeAddin/Ribbon/ArrangeRibbonResources.zh-Hans.resx
@@ -173,6 +173,12 @@
延伸至顶部(&T)
+
+ 延伸到最初的对象
+
+
+ 延伸到最初选择的对象边界(&I)
+
左右翻转(&H)
@@ -224,13 +230,68 @@
向右旋转 90 度(&R)
-
- 从中心点变形(&F)
- 将中心点视为锚点来变形图像
+
+ 从顶端变形
+
+
+ 从中间变形
+
+
+ 从底端变形
+
+
+ 从原左上角开始变形形状(&O)
+
+
+ 从原左下角开始变形形状(&P)
+
+
+ 从原右上角开始变形形状(&M)
+
+
+ 从原右下角开始变形形状(&G)
+
+
+ 从原左端开始变形形状(&F)
+
+
+ 从原右端开始变形形状(&C)
+
+
+ 从原上端开始变形形状(&A)
+
+
+ 从原下端开始变形形状(&E)
+
+
+ 从原中心点开始变形形状(&N)
- 从左上角变形(&O)
- 将左上点视为锚点来变形图像
+ 从左上角变形
+
+
+ 从左下角变形
+
+
+ 从右上角变形
+
+
+ 从右下角变形
+
+
+ 从左端变形
+
+
+ 从右端变形
+
+
+ 从上端变形
+
+
+ 从下端变形
+
+
+ 从中心点变形
变形为与最初选择的形状相同高度(&H)
@@ -242,16 +303,16 @@
变形为与最初选择的形状相同宽度(&W)
- 底端向上吸附(&B)
+ 底端向上吸附(&N)
- 左端向右吸附(&L)
+ 左端向右吸附(&E)
- 右端向左吸附(&R)
+ 右端向左吸附(&I)
- 顶端向下吸附(&T)
+ 顶端向下吸附(&P)
解除组合形状(&U)
@@ -262,8 +323,11 @@
替换到中心点
-
- 保持图片的大小
+
+ 填充替換
+
+
+ 保持比例替換
剪贴板里不存在图片,所以无法替换图片。
@@ -325,9 +389,6 @@
旋转(&O)
-
- 吸附(&N)
-
加载项设置
@@ -346,10 +407,6 @@
所有文件
-
- 从右下角变形(&M)
- 将右下点视为锚点来变形图像
-
横向边距:
@@ -365,6 +422,9 @@
对齐到最初的对象(&F)
+
+ 显示网格线(&S)
+
网格线设置(&G)...
@@ -387,10 +447,10 @@
纵向对齐
- 分布
+ 形状分布
-
- 大小变更和吸附
+
+ 大小变更
变形
@@ -398,8 +458,14 @@
延伸
-
- 吸附
+
+ 橫向吸附
+
+
+ 纵向吸附
+
+
+ 网格线
旋转和翻转
@@ -449,6 +515,39 @@
对象位置
+
+ 距离类型
+
+
+ 右边和左边/下边和上边之间的距离
+
+
+ 左边和左边/上边和上边之间的距离
+
+
+ 右边和右边/下边和下边之间的距离
+
+
+ 左边和右边/上边和下边之间的距离
+
+
+ 水平
+
+
+ 复制横向距离
+
+
+ 粘贴横向距离
+
+
+ 垂直
+
+
+ 复制纵向距离
+
+
+ 粘贴纵向距离
+
检查更新
diff --git a/PowerPointArrangeAddin/Ribbon/ArrangeRibbonResources.zh-Hant.resx b/PowerPointArrangeAddin/Ribbon/ArrangeRibbonResources.zh-Hant.resx
index af1e55e..b2bea31 100644
--- a/PowerPointArrangeAddin/Ribbon/ArrangeRibbonResources.zh-Hant.resx
+++ b/PowerPointArrangeAddin/Ribbon/ArrangeRibbonResources.zh-Hant.resx
@@ -173,7 +173,13 @@
延伸至頂端(&T)
-
+
+ 延伸到最初的圖案
+
+
+ 延伸到最初選擇的圖案邊界(&I)
+
+ g
水平翻轉(&H)
@@ -224,13 +230,68 @@
向左旋轉 90 度(&R)
-
- 從中心點變形(&F)
- 將中心點視爲錨點來變形圖案
+
+ 從頂端變形
+
+
+ 從中間變形
+
+
+ 從底端變形
+
+
+ 從原左上端開始變形圖案(&O)
+
+
+ 從原左下端開始變形圖案(&P)
+
+
+ 從原右上端開始變形圖案(&M)
+
+
+ 從原右下端開始變形圖案(&G)
+
+
+ 從原左端開始變形圖案(&F)
+
+
+ 從原右端開始變形圖案(&C)
+
+
+ 從原上端開始變形圖案(&A)
+
+
+ 從原下端開始變形圖案(&E)
+
+
+ 從原中心點開始變形圖案(&N)
- 從左上端變形(&O)
- 將左上端視爲錨點來變形圖案
+ 從左上端變形
+
+
+ 從左下端變形
+
+
+ 從右上端變形
+
+
+ 從右下端變形
+
+
+ 從左端變形
+
+
+ 從右端變形
+
+
+ 從上端變形
+
+
+ 從下端變形
+
+
+ 從中心點變形
變形為與最初選擇的圖案相同高度(&H)
@@ -242,16 +303,16 @@
變形為與最初選擇的圖案相同寬度(&W)
- 下端向上吸附(&B)
+ 下端向上吸附(&N)
- 左端向右吸附(&L)
+ 左端向右吸附(&E)
- 右端向左吸附(&R)
+ 右端向左吸附(&I)
- 上端向下吸附(&T)
+ 上端向下吸附(&P)
取消群組圖案(&U)
@@ -262,8 +323,11 @@
置換到中心點
-
- 保持圖片的大小
+
+ 填充置換
+
+
+ 保持比率置換
剪貼簿内不存在圖片,所以無法置換圖片。
@@ -325,9 +389,6 @@
旋轉(&O)
-
- 吸附(&N)
-
增益集選項
@@ -346,10 +407,6 @@
所有檔案
-
- 從右下端變形(&M)
- 將右下端視爲錨點來變形圖案
-
橫向邊界:
@@ -365,6 +422,9 @@
對齊到最初的圖案(&F)
+
+ 顯示格綫(&S)
+
格綫設定(&G)...
@@ -387,10 +447,10 @@
縱向對齊
- 均分
+ 圖案均分
-
- 大小变更和吸附
+
+ 大小变更
變形
@@ -398,8 +458,14 @@
延伸
-
- 吸附
+
+ 橫向吸附
+
+
+ 縱向吸附
+
+
+ 格綫
旋轉和翻轉
@@ -449,6 +515,39 @@
圖案位置
+
+ 距離類型
+
+
+ 右邊和左邊/下邊和上邊之間的距離
+
+
+ 左邊和左邊/上邊和上邊之間的距離
+
+
+ 右邊和右邊/下邊和下邊之間的距離
+
+
+ 左邊和右邊/上邊和下邊之間的距離
+
+
+ 水平
+
+
+ 複製橫向距離
+
+
+ 貼上橫向距離
+
+
+ 垂直
+
+
+ 複製縱向距離
+
+
+ 貼上縱向距離
+
檢查更新
diff --git a/PowerPointArrangeAddin/app.config b/PowerPointArrangeAddin/app.config
index 2375869..04a7a59 100644
--- a/PowerPointArrangeAddin/app.config
+++ b/PowerPointArrangeAddin/app.config
@@ -52,6 +52,9 @@
False
+
+ True
+
True
diff --git a/PowerPointArrangeAddinSetup/PowerPointArrangeAddinInstaller/Product.wxs b/PowerPointArrangeAddinSetup/PowerPointArrangeAddinInstaller/Product.wxs
index 903c14f..acd6fb9 100644
--- a/PowerPointArrangeAddinSetup/PowerPointArrangeAddinInstaller/Product.wxs
+++ b/PowerPointArrangeAddinSetup/PowerPointArrangeAddinInstaller/Product.wxs
@@ -4,7 +4,7 @@
-
+
diff --git a/PowerPointArrangeAddinSetup/PowerPointArrangeAddinInstallerAction/Properties/AssemblyInfo.cs b/PowerPointArrangeAddinSetup/PowerPointArrangeAddinInstallerAction/Properties/AssemblyInfo.cs
index e2ec2a1..e1bed01 100644
--- a/PowerPointArrangeAddinSetup/PowerPointArrangeAddinInstallerAction/Properties/AssemblyInfo.cs
+++ b/PowerPointArrangeAddinSetup/PowerPointArrangeAddinInstallerAction/Properties/AssemblyInfo.cs
@@ -31,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.1.0")]
-[assembly: AssemblyFileVersion("1.1.0")]
+[assembly: AssemblyVersion("1.2.0")]
+[assembly: AssemblyFileVersion("1.2.0")]
diff --git a/PowerPointArrangeAddinSetup/PowerPointArrangeAddinInstallerLauncher/PackLauncher.evb b/PowerPointArrangeAddinSetup/PowerPointArrangeAddinInstallerLauncher/PackLauncher.evb
index 6253372..e60a687 100644
--- a/PowerPointArrangeAddinSetup/PowerPointArrangeAddinInstallerLauncher/PackLauncher.evb
+++ b/PowerPointArrangeAddinSetup/PowerPointArrangeAddinInstallerLauncher/PackLauncher.evb
@@ -1,7 +1,7 @@
<>
.\bin\x64\Release\setup.exe
- .\bin\x64\Release\boxed\setup-v1.1.0.exe
+ .\bin\x64\Release\boxed\setup-v1.2.0.exe
True
False
diff --git a/PowerPointArrangeAddinSetup/PowerPointArrangeAddinInstallerLauncher/Properties/AssemblyInfo.cs b/PowerPointArrangeAddinSetup/PowerPointArrangeAddinInstallerLauncher/Properties/AssemblyInfo.cs
index 3d370f9..2443b7d 100644
--- a/PowerPointArrangeAddinSetup/PowerPointArrangeAddinInstallerLauncher/Properties/AssemblyInfo.cs
+++ b/PowerPointArrangeAddinSetup/PowerPointArrangeAddinInstallerLauncher/Properties/AssemblyInfo.cs
@@ -33,6 +33,6 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.1.0")]
-[assembly: AssemblyFileVersion("1.1.0")]
+[assembly: AssemblyVersion("1.2.0")]
+[assembly: AssemblyFileVersion("1.2.0")]
[assembly: NeutralResourcesLanguage("")]
diff --git a/README.md b/README.md
index 091086e..8edd976 100644
--- a/README.md
+++ b/README.md
@@ -63,7 +63,7 @@ call build_solution.bat
|
- |
+ |
|
@@ -99,7 +99,7 @@ call build_solution.bat
|
- |
+ |
|
diff --git a/assets/screenshot1.jpg b/assets/screenshot1.jpg
index 45e3105..db06e02 100644
Binary files a/assets/screenshot1.jpg and b/assets/screenshot1.jpg differ
diff --git a/assets/screenshot10.jpg b/assets/screenshot10.jpg
index 195c0cd..569958b 100644
Binary files a/assets/screenshot10.jpg and b/assets/screenshot10.jpg differ
diff --git a/assets/screenshot11.jpg b/assets/screenshot11.jpg
index ff444e3..8d14a0b 100644
Binary files a/assets/screenshot11.jpg and b/assets/screenshot11.jpg differ
diff --git a/assets/screenshot12.jpg b/assets/screenshot12.jpg
index 7574dc0..6dd54ea 100644
Binary files a/assets/screenshot12.jpg and b/assets/screenshot12.jpg differ
diff --git a/assets/screenshot13.jpg b/assets/screenshot13.jpg
index 9752e0e..e06ad98 100644
Binary files a/assets/screenshot13.jpg and b/assets/screenshot13.jpg differ
diff --git a/assets/screenshot14.jpg b/assets/screenshot14.jpg
index cc04193..3f6867d 100644
Binary files a/assets/screenshot14.jpg and b/assets/screenshot14.jpg differ
diff --git a/assets/screenshot15.jpg b/assets/screenshot15.jpg
index a6723fe..28e3214 100644
Binary files a/assets/screenshot15.jpg and b/assets/screenshot15.jpg differ
diff --git a/assets/screenshot16.jpg b/assets/screenshot16.jpg
index 4ad0288..00ec6b3 100644
Binary files a/assets/screenshot16.jpg and b/assets/screenshot16.jpg differ
diff --git a/assets/screenshot2.jpg b/assets/screenshot2.jpg
index 4144a34..6942ad4 100644
Binary files a/assets/screenshot2.jpg and b/assets/screenshot2.jpg differ
diff --git a/assets/screenshot4.jpg b/assets/screenshot4.jpg
index 53370de..3b0ecca 100644
Binary files a/assets/screenshot4.jpg and b/assets/screenshot4.jpg differ
diff --git a/assets/screenshot6.jpg b/assets/screenshot6.jpg
index 9e45794..1be09b4 100644
Binary files a/assets/screenshot6.jpg and b/assets/screenshot6.jpg differ
diff --git a/assets/screenshot7.jpg b/assets/screenshot7.jpg
index a672e75..82db28e 100644
Binary files a/assets/screenshot7.jpg and b/assets/screenshot7.jpg differ
diff --git a/assets/screenshot8.jpg b/assets/screenshot8.jpg
index 070598b..837e726 100644
Binary files a/assets/screenshot8.jpg and b/assets/screenshot8.jpg differ
diff --git a/assets/screenshot9.jpg b/assets/screenshot9.jpg
index d3374b9..70bba7f 100644
Binary files a/assets/screenshot9.jpg and b/assets/screenshot9.jpg differ