Skip to content

Commit c9064a0

Browse files
committed
Merge pull request #8 from ZeeshanShafqat/master
Aspose.Slides Features missing in VSTO v1.1
2 parents f927936 + dd9dc5c commit c9064a0

File tree

61 files changed

+2200
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+2200
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{A246EA0E-1377-4E8C-B89D-1FBB05153FE6}</ProjectGuid>
8+
<OutputType>Exe</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>Adding_Layout_Slides</RootNamespace>
11+
<AssemblyName>Adding Layout Slides</AssemblyName>
12+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
</PropertyGroup>
15+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16+
<PlatformTarget>AnyCPU</PlatformTarget>
17+
<DebugSymbols>true</DebugSymbols>
18+
<DebugType>full</DebugType>
19+
<Optimize>false</Optimize>
20+
<OutputPath>bin\Debug\</OutputPath>
21+
<DefineConstants>DEBUG;TRACE</DefineConstants>
22+
<ErrorReport>prompt</ErrorReport>
23+
<WarningLevel>4</WarningLevel>
24+
</PropertyGroup>
25+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26+
<PlatformTarget>AnyCPU</PlatformTarget>
27+
<DebugType>pdbonly</DebugType>
28+
<Optimize>true</Optimize>
29+
<OutputPath>bin\Release\</OutputPath>
30+
<DefineConstants>TRACE</DefineConstants>
31+
<ErrorReport>prompt</ErrorReport>
32+
<WarningLevel>4</WarningLevel>
33+
</PropertyGroup>
34+
<ItemGroup>
35+
<Reference Include="Aspose.Slides">
36+
<HintPath>..\..\..\Downloads\Aspose.Slides.dll</HintPath>
37+
</Reference>
38+
<Reference Include="System" />
39+
<Reference Include="System.Core" />
40+
<Reference Include="System.Xml.Linq" />
41+
<Reference Include="System.Data.DataSetExtensions" />
42+
<Reference Include="Microsoft.CSharp" />
43+
<Reference Include="System.Data" />
44+
<Reference Include="System.Xml" />
45+
</ItemGroup>
46+
<ItemGroup>
47+
<Compile Include="Program.cs" />
48+
<Compile Include="Properties\AssemblyInfo.cs" />
49+
</ItemGroup>
50+
<ItemGroup>
51+
<None Include="App.config" />
52+
</ItemGroup>
53+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
54+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
55+
Other similar extension points exist, see Microsoft.Common.targets.
56+
<Target Name="BeforeBuild">
57+
</Target>
58+
<Target Name="AfterBuild">
59+
</Target>
60+
-->
61+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
5+
</startup>
6+
</configuration>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
using Aspose.Slides;
2+
using Aspose.Slides.Export;
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Linq;
6+
using System.Text;
7+
using System.Threading.Tasks;
8+
9+
namespace Adding_Layout_Slides
10+
{
11+
class Program
12+
{
13+
static void Main(string[] args)
14+
{
15+
//Instantiate Presentation class that represents the presentation file
16+
using (Presentation p = new Presentation("Test.pptx"))
17+
{
18+
// Try to search by layout slide type
19+
IMasterLayoutSlideCollection layoutSlides = p.Masters[0].LayoutSlides;
20+
ILayoutSlide layoutSlide =
21+
layoutSlides.GetByType(SlideLayoutType.TitleAndObject) ??
22+
layoutSlides.GetByType(SlideLayoutType.Title);
23+
24+
if (layoutSlide == null)
25+
{
26+
// The situation when a presentation doesn't contain some type of layouts.
27+
// Technographics.pptx presentation only contains Blank and Custom layout types.
28+
// But layout slides with Custom types has different slide names,
29+
// like "Title", "Title and Content", etc. And it is possible to use these
30+
// names for layout slide selection.
31+
// Also it is possible to use the set of placeholder shape types. For example,
32+
// Title slide should have only Title pleceholder type, etc.
33+
foreach (ILayoutSlide titleAndObjectLayoutSlide in layoutSlides)
34+
{
35+
if (titleAndObjectLayoutSlide.Name == "Title and Object")
36+
{
37+
layoutSlide = titleAndObjectLayoutSlide;
38+
break;
39+
}
40+
}
41+
if (layoutSlide == null)
42+
{
43+
foreach (ILayoutSlide titleLayoutSlide in layoutSlides)
44+
{
45+
if (titleLayoutSlide.Name == "Title")
46+
{
47+
layoutSlide = titleLayoutSlide;
48+
break;
49+
}
50+
}
51+
if (layoutSlide == null)
52+
{
53+
layoutSlide = layoutSlides.GetByType(SlideLayoutType.Blank);
54+
if (layoutSlide == null)
55+
{
56+
layoutSlide = layoutSlides.Add(SlideLayoutType.TitleAndObject, "Title and Object");
57+
}
58+
}
59+
}
60+
}
61+
62+
//Adding empty slide with added layout slide
63+
p.Slides.InsertEmptySlide(0, layoutSlide);
64+
65+
//Save presentation
66+
p.Save("Output.pptx", SaveFormat.Pptx);
67+
}
68+
}
69+
}
70+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("Adding Layout Slides")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("Adding Layout Slides")]
13+
[assembly: AssemblyCopyright("Copyright © 2016")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("635c21c8-1e7c-49d3-ba4a-be02234dbd71")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Build and Revision Numbers
33+
// by using the '*' as shown below:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 2012
4+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Conversion from PPt to PPtx format", "Conversion from PPt to PPtx format\Conversion from PPt to PPtx format.csproj", "{344C4019-448E-4BCB-983E-CE92F3AD1BCC}"
5+
EndProject
6+
Global
7+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
8+
Debug|Any CPU = Debug|Any CPU
9+
Release|Any CPU = Release|Any CPU
10+
EndGlobalSection
11+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
12+
{344C4019-448E-4BCB-983E-CE92F3AD1BCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13+
{344C4019-448E-4BCB-983E-CE92F3AD1BCC}.Debug|Any CPU.Build.0 = Debug|Any CPU
14+
{344C4019-448E-4BCB-983E-CE92F3AD1BCC}.Release|Any CPU.ActiveCfg = Release|Any CPU
15+
{344C4019-448E-4BCB-983E-CE92F3AD1BCC}.Release|Any CPU.Build.0 = Release|Any CPU
16+
EndGlobalSection
17+
GlobalSection(SolutionProperties) = preSolution
18+
HideSolutionNode = FALSE
19+
EndGlobalSection
20+
EndGlobal
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{344C4019-448E-4BCB-983E-CE92F3AD1BCC}</ProjectGuid>
8+
<OutputType>Exe</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>Conversion_from_PPt_to_PPtx_format</RootNamespace>
11+
<AssemblyName>Conversion from PPt to PPtx format</AssemblyName>
12+
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
</PropertyGroup>
15+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16+
<PlatformTarget>AnyCPU</PlatformTarget>
17+
<DebugSymbols>true</DebugSymbols>
18+
<DebugType>full</DebugType>
19+
<Optimize>false</Optimize>
20+
<OutputPath>bin\Debug\</OutputPath>
21+
<DefineConstants>DEBUG;TRACE</DefineConstants>
22+
<ErrorReport>prompt</ErrorReport>
23+
<WarningLevel>4</WarningLevel>
24+
</PropertyGroup>
25+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26+
<PlatformTarget>AnyCPU</PlatformTarget>
27+
<DebugType>pdbonly</DebugType>
28+
<Optimize>true</Optimize>
29+
<OutputPath>bin\Release\</OutputPath>
30+
<DefineConstants>TRACE</DefineConstants>
31+
<ErrorReport>prompt</ErrorReport>
32+
<WarningLevel>4</WarningLevel>
33+
</PropertyGroup>
34+
<ItemGroup>
35+
<Reference Include="System" />
36+
<Reference Include="System.Data" />
37+
<Reference Include="System.Xml" />
38+
</ItemGroup>
39+
<ItemGroup>
40+
<Compile Include="Program.cs" />
41+
<Compile Include="Properties\AssemblyInfo.cs" />
42+
</ItemGroup>
43+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
44+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
45+
Other similar extension points exist, see Microsoft.Common.targets.
46+
<Target Name="BeforeBuild">
47+
</Target>
48+
<Target Name="AfterBuild">
49+
</Target>
50+
-->
51+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace Conversion_from_PPt_to_PPtx_format
6+
{
7+
class Program
8+
{
9+
static void Main(string[] args)
10+
{
11+
string MyDir = @"Files\";
12+
PresentationEx presentation = new PresentationEx(MyDir + "Sample.ppt");
13+
presentation.Save(MyDir + "Converted.pptx", Aspose.Slides.Export.SaveFormat.Pptx);
14+
15+
}
16+
}
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("Conversion from PPt to PPtx format")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("Conversion from PPt to PPtx format")]
13+
[assembly: AssemblyCopyright("Copyright © 2014")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("75778e44-ee6f-4146-9822-386261d8b1bc")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Build and Revision Numbers
33+
// by using the '*' as shown below:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 2012
4+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Converting From and To ODP", "Converting From and To ODP\Converting From and To ODP.csproj", "{C720EFAF-21EE-482A-B565-AED4CCB5E732}"
5+
EndProject
6+
Global
7+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
8+
Debug|Any CPU = Debug|Any CPU
9+
Release|Any CPU = Release|Any CPU
10+
EndGlobalSection
11+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
12+
{C720EFAF-21EE-482A-B565-AED4CCB5E732}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13+
{C720EFAF-21EE-482A-B565-AED4CCB5E732}.Debug|Any CPU.Build.0 = Debug|Any CPU
14+
{C720EFAF-21EE-482A-B565-AED4CCB5E732}.Release|Any CPU.ActiveCfg = Release|Any CPU
15+
{C720EFAF-21EE-482A-B565-AED4CCB5E732}.Release|Any CPU.Build.0 = Release|Any CPU
16+
EndGlobalSection
17+
GlobalSection(SolutionProperties) = preSolution
18+
HideSolutionNode = FALSE
19+
EndGlobalSection
20+
EndGlobal
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
5+
</startup>
6+
</configuration>

0 commit comments

Comments
 (0)