Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
133 changes: 133 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.sln.docstates

# Build results

[Dd]ebug/
[Rr]elease/
x64/
[Bb]in/
[Oo]bj/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.log
*.svclog
*.scc

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# Click-Once directory
publish/

# Publish Web Output
*.Publish.xml
*.pubxml
*.azurePubxml

# NuGet Packages Directory
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
packages/
## TODO: If the tool you use requires repositories.config, also uncomment the next line
!packages/repositories.config

# Windows Azure Build Output
csx/
*.build.csdef

# Windows Store app package directory
AppPackages/

# Others
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
![Ss]tyle[Cc]op.targets
~$*
*~
*.dbmdl
*.[Pp]ublish.xml

*.publishsettings

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
App_Data/*.mdf
App_Data/*.ldf

# =========================
# Windows detritus
# =========================

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Mac desktop service store files
.DS_Store

_NCrunch*
2 changes: 1 addition & 1 deletion FileFormat.Slides-Test/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using PKG = DocumentFormat.OpenXml.Packaging;
using P = DocumentFormat.OpenXml.Presentation;
using System;
using GeneratedCode;
//using GeneratedCode;
using FileFormat.Slides;
using System.Collections.Generic;
using FileFormat.Slides.Common;
Expand Down
9 changes: 9 additions & 0 deletions FileFormat.Slides.Common/FileFormat.Slides.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,17 @@
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="newtonsoft.json" Version="13.0.3" />
</ItemGroup>

<!--
Should this be a relative path so people without a D drive can compile the code?
-->
<!--
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>D:\Local_Repos\FileFormat.Slides\FileFormat.Slides.Common\FileFormat.Slides.Common.xml</DocumentationFile>
</PropertyGroup>
-->

</Project>
6 changes: 5 additions & 1 deletion FileFormat.Slides.Facade/PresentationDocumentFacade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -564,8 +564,12 @@ public void InsertSlide (int index, SlideFacade slideFacade)
{
slideFacade.PresentationSlide.Save(slideFacade.SlidePart);
_PresentationSlideParts.Add(slideFacade.SlidePart);
MoveSlideToIndex(slideFacade.SlideIndex, index);

// find the current index of the slide in the list and then move it to the specified index
var relationshipId = slideFacade.RelationshipId;
var currentIndex = _SlideIdList.Elements<SlideId>().ToList().FindIndex(item => item.RelationshipId == relationshipId);

MoveSlideToIndex(slideFacade.SlideIndex, index);
}

public void MoveSlideToIndex (int currentIndex, int newIndex)
Expand Down
22 changes: 22 additions & 0 deletions FileFormat.Slides.Tests/FileFormat.Slides.Tests.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
<PackageReference Include="coverlet.collector" Version="3.1.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\FileFormat.Slides.Common\FileFormat.Slides.Common.csproj" />
<ProjectReference Include="..\Fileformat.Slides.Facade\FileFormat.Slides.Facade.csproj" />
<ProjectReference Include="..\FileFormat.Slides\FileFormat.Slides.csproj" />
</ItemGroup>

</Project>
Loading