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 @@