Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/copy drawings #1472

Merged
merged 18 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
copy control vml
  • Loading branch information
AdrianEPPlus committed May 14, 2024
commit 367eee5919a175661d4ef2cd1a9645d9872e855d
2 changes: 1 addition & 1 deletion src/EPPlus/Core/Worksheet/WorksheetCopyHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ internal static void CopyBlipFillDrawing(ExcelWorksheet target, ZipPackagePart t
}
}

private static void CopyVmlDrawing(ExcelWorksheet origSheet, ExcelWorksheet newSheet)
internal static void CopyVmlDrawing(ExcelWorksheet origSheet, ExcelWorksheet newSheet)
{
var xml = origSheet.VmlDrawings.VmlDrawingXml.OuterXml;
var vmlUri = new Uri(string.Format("/xl/drawings/vmlDrawing{0}.vml", newSheet.SheetId), UriKind.Relative);
Expand Down
1 change: 1 addition & 0 deletions src/EPPlus/Drawing/ExcelDrawing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1385,6 +1385,7 @@ public void Copy(ExcelWorksheet worksheet, int row, int col, int rowOffset = 0,
private void CopyControl(ExcelWorksheet worksheet)
{
var control = this as ExcelControl;
WorksheetCopyHelper.CopyVmlDrawing(_drawings.Worksheet, worksheet);
WorksheetCopyHelper.CopyControl(worksheet._package, worksheet, control);
}

Expand Down