Skip to content

Commit c12d1f9

Browse files
committed
- bugfixes
1 parent cc6ccc1 commit c12d1f9

File tree

5 files changed

+50
-36
lines changed

5 files changed

+50
-36
lines changed

Latex4PowerPoint/Latex4PowerPoint.csproj

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<PropertyGroup>
2222
<ProjectTypeGuids>{BAA0C2D2-18E2-41B9-852F-F413020CAA33};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
2323
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
24-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
24+
<Platform Condition=" '$(Platform)' == '' ">x64</Platform>
2525
<ProjectGuid>{D7909DAA-C635-4FFA-9319-5356D6249C54}</ProjectGuid>
2626
<OutputType>Library</OutputType>
2727
<NoStandardLibraries>false</NoStandardLibraries>
@@ -30,6 +30,7 @@
3030
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
3131
<DefineConstants>VSTO40</DefineConstants>
3232
<IsWebBootstrapper>False</IsWebBootstrapper>
33+
<TargetFrameworkProfile />
3334
<BootstrapperEnabled>true</BootstrapperEnabled>
3435
<PublishUrl>publish\</PublishUrl>
3536
<InstallUrl />
@@ -40,19 +41,23 @@
4041
<UpdateInterval>0</UpdateInterval>
4142
<UpdateIntervalUnits>days</UpdateIntervalUnits>
4243
<ProductName>Latex4PowerPoint</ProductName>
43-
<PublisherName />
44+
<PublisherName>InteractiveComputerGraphics</PublisherName>
4445
<SupportUrl />
4546
<FriendlyName>Latex4PowerPoint</FriendlyName>
4647
<OfficeApplicationDescription />
4748
<LoadBehavior>3</LoadBehavior>
48-
<TargetFrameworkProfile />
4949
</PropertyGroup>
5050
<ItemGroup>
5151
<BootstrapperPackage Include=".NETFramework,Version=v4.0">
5252
<Visible>False</Visible>
5353
<ProductName>Microsoft .NET Framework 4 %28x86 und x64%29</ProductName>
5454
<Install>true</Install>
5555
</BootstrapperPackage>
56+
<BootstrapperPackage Include=".NETFramework,Version=v4.6.1">
57+
<Visible>False</Visible>
58+
<ProductName>Microsoft .NET Framework 4.6.1 %28x86 und x64%29</ProductName>
59+
<Install>true</Install>
60+
</BootstrapperPackage>
5661
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
5762
<Visible>False</Visible>
5863
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
@@ -309,7 +314,7 @@
309314
<FlavorProperties GUID="{BAA0C2D2-18E2-41B9-852F-F413020CAA33}">
310315
<ProjectProperties HostName="PowerPoint" HostPackage="{29A7B9D7-A7F1-4328-8EF0-6B2D1A56B2C1}" OfficeVersion="15.0" VstxVersion="4.0" ApplicationType="PowerPoint" Language="cs" TemplatesPath="" DebugInfoExeName="#Software\Microsoft\Office\16.0\PowerPoint\InstallRoot\Path#powerpnt.exe" AddItemTemplatesGuid="{51063C3A-E220-4D12-8922-BDA915ACD783}" />
311316
<Host Name="PowerPoint" GeneratedCodeNamespace="Latex4PowerPoint" PublishedHash="69C324AB27932AA2FBF2B7EA72250886FF164DE6" IconIndex="0">
312-
<HostItem Name="ThisAddIn" Code="ThisAddIn.cs" CanonicalName="AddIn" PublishedHash="8B8805B013E87A49A38AAA39487DD99563CF4F6F" CanActivate="false" IconIndex="1" Blueprint="ThisAddIn.Designer.xml" GeneratedCode="ThisAddIn.Designer.cs" />
317+
<HostItem Name="ThisAddIn" Code="ThisAddIn.cs" CanonicalName="AddIn" PublishedHash="B4E598A06912A2647FA4A8C8D05AB47713584EF4" CanActivate="false" IconIndex="1" Blueprint="ThisAddIn.Designer.xml" GeneratedCode="ThisAddIn.Designer.cs" />
313318
</Host>
314319
</FlavorProperties>
315320
</VisualStudio>

Latex4PowerPoint/LatexDialog.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,16 @@ public void init(LatexEquation eq, string title)
139139
m_scintilla.Text = eq.m_code;
140140
m_scintilla.Selection.SelectAll();
141141

142-
comboBoxFontSize.Text = eq.m_fontSize.ToString();
142+
string fontSizeStr = eq.m_fontSize.ToString();
143+
if (!comboBoxFontSize.Items.Contains(fontSizeStr))
144+
comboBoxFontSize.Items.Add(fontSizeStr);
145+
comboBoxFontSize.Text = fontSizeStr;
146+
147+
string dpiStr = eq.m_dpi.ToString();
148+
if (!comboBoxDPI.Items.Contains(dpiStr))
149+
comboBoxDPI.Items.Add(dpiStr);
143150
comboBoxDPI.Text = eq.m_dpi.ToString();
151+
144152
comboBoxFont.Text = eq.m_font.fontName;
145153
comboBoxSeries.Text = eq.m_fontSeries.fontSeries;
146154
comboBoxShape.Text = eq.m_fontShape.fontShape;

Latex4PowerPoint/LatexDialog.designer.cs

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Latex4PowerPoint/SelectionHandler.cs

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Latex4PowerPoint
99
public class SelectionHandler
1010
{
1111
Microsoft.Office.Interop.PowerPoint.EApplication_WindowSelectionChangeEventHandler m_eventHandler = null;
12-
Microsoft.Office.Interop.PowerPoint.Shape m_oldShape = null;
12+
//Microsoft.Office.Interop.PowerPoint.Shape m_oldShape = null;
1313

1414
public void init()
1515
{
@@ -24,36 +24,36 @@ public void cleanup()
2424

2525
void Application_WindowSelectionChange(Microsoft.Office.Interop.PowerPoint.Selection Sel)
2626
{
27-
Microsoft.Office.Interop.PowerPoint.Shape shape = null;
28-
bool run = false;
29-
if (Sel.Type == Microsoft.Office.Interop.PowerPoint.PpSelectionType.ppSelectionNone)
30-
{
31-
run = true;
32-
}
33-
else //if (Sel.Type == Microsoft.Office.Interop.PowerPoint.PpSelectionType.ppSelectionShapes)
34-
{
35-
if (Sel.ShapeRange.Count > 0)
36-
{
37-
shape = Sel.ShapeRange[1];
27+
//Microsoft.Office.Interop.PowerPoint.Shape shape = null;
28+
//bool run = false;
29+
//if (Sel.Type == Microsoft.Office.Interop.PowerPoint.PpSelectionType.ppSelectionNone)
30+
//{
31+
// run = true;
32+
//}
33+
//else if (Sel.Type == Microsoft.Office.Interop.PowerPoint.PpSelectionType.ppSelectionShapes)
34+
//{
35+
// if (Sel.ShapeRange.Count > 0)
36+
// {
37+
// shape = Sel.ShapeRange[1];
3838

39-
// Check if inline equation shape was selected
40-
selectTextShape(shape);
41-
if (shape != m_oldShape)
42-
{
43-
//removeInlineEquationShapes(shape);
44-
run = true;
39+
// // Check if inline equation shape was selected
40+
// selectTextShape(shape);
41+
// if (shape != m_oldShape)
42+
// {
43+
// //removeInlineEquationShapes(shape);
44+
// run = true;
4545

46-
}
47-
}
48-
}
49-
if (run)
50-
{
51-
if (m_oldShape != null)
52-
{
53-
InlineLatex.createInlineEquations(m_oldShape);
54-
}
55-
m_oldShape = shape;
56-
}
46+
// }
47+
// }
48+
//}
49+
//if (run)
50+
//{
51+
// if (m_oldShape != null)
52+
// {
53+
// InlineLatex.createInlineEquations(m_oldShape);
54+
// }
55+
// m_oldShape = shape;
56+
//}
5757
}
5858

5959
/** Select the text shape if an inline equation shape was selected.

Latex4PowerPoint/ShapeTags.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public static void setShapeTags(LatexEquation equation)
1919
equation.m_shape.Tags.Add("LatexFontShape", equation.m_fontShape.fontShape);
2020
equation.m_shape.Tags.Add("LatexIsInline", equation.m_isInline.ToString());
2121
equation.m_shape.Tags.Add("LatexTextShapeId", equation.m_textShapeId.ToString());
22-
equation.m_shape.Tags.Add("Latex4PowerPointVersion", AddinUtilities.getVersionString());
22+
equation.m_shape.Tags.Add("LatexAddinVersion", AddinUtilities.getVersionString());
2323
}
2424

2525
public static LatexEquation getLatexEquation(Shape s)
@@ -78,7 +78,7 @@ public static LatexFontSeries getLatexFontSeries(Shape s)
7878

7979
public static string getLatex4PowerPointVersion(Shape s)
8080
{
81-
return s.Tags["Latex4PowerPointVersion"];
81+
return s.Tags["LatexAddinVersion"];
8282
}
8383

8484
public static float getLatexFontSize(Shape s)

0 commit comments

Comments
 (0)