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

70 color options update #74

Closed
wants to merge 27 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0714464
Add shape update
DraviaVemal Jun 13, 2024
e3800d4
organizing
DraviaVemal Jun 13, 2024
ec88baa
Shape backup
DraviaVemal Jun 14, 2024
9035ab3
Organized Application settings generics
DraviaVemal Jun 14, 2024
cc64c98
Reorganizing Shape
DraviaVemal Jun 14, 2024
6057a1b
Reorganizing Shape and common components
DraviaVemal Jun 15, 2024
ceca757
Shape Extension Update
DraviaVemal Jun 15, 2024
6a394d9
renaming
DraviaVemal Jun 15, 2024
14305ff
Auto Fix Mistake undo
DraviaVemal Jun 16, 2024
6378f91
reorganizing
DraviaVemal Jun 19, 2024
ca260f5
Checking Commit
DraviaVemal Jun 20, 2024
7a06599
test commit
DraviaVemal Jun 20, 2024
22f4b2f
PR action setup update
DraviaVemal Jun 27, 2024
6ac4fde
- feat: Pie Chart Data Labels Formatting
prashanthcraft Jun 24, 2024
af3a8fc
- Feat: Added Smooth Line option for line chart
prashanthcraft Jun 25, 2024
025e03e
fix: Test case enhancement
prashanthcraft Jun 26, 2024
c26c7be
fix: Powerpoint table generation fix
prashanthcraft Jun 26, 2024
cb3fb8b
- feat: Pie Chart Data Labels Formatting
prashanthcraft Jun 24, 2024
32f20bd
Merge branch 'main' into 70-color-options-update
DraviaVemal Jun 27, 2024
6350178
bug fix
DraviaVemal Jun 27, 2024
0b3ff27
fix: Added Overlapping auto merger condition resolve
prashanthcraft Jun 27, 2024
e4d92b6
fix: Test case update
prashanthcraft Jun 27, 2024
60f2918
- feat: Pie Chart Data Labels Formatting
prashanthcraft Jun 24, 2024
5adcfa5
fix: Test case enhancement
prashanthcraft Jun 26, 2024
22d89ed
fix: Powerpoint table generation fix
prashanthcraft Jun 26, 2024
bb6382b
Merge branch 'main' into 70-color-options-update
DraviaVemal Jun 27, 2024
caae9c5
Simple commit to check rules
DraviaVemal Jun 27, 2024
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
27 changes: 12 additions & 15 deletions .github/workflows/pr-validation-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,7 @@ on:
branches:
- main
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET 7
uses: actions/setup-dotnet@v1
with:
dotnet-version: "7.0"
- name: Test Runner
working-directory: Tests
run: dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:CoverletOutput=../TestResults/cobertura.xml
- name: Publish Coverage
working-directory: TestResults
run: export CODACY_PROJECT_TOKEN=${{secrets.CODACY_PROJECT_TOKEN}} && bash <(curl -Ls https://coverage.codacy.com/get.sh)
build:
needs: coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -37,3 +22,15 @@ jobs:
run: dotnet build --no-restore -c Release
- name: Pack Project DLL
run: dotnet pack -c Release -o nupkgs
coverage:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET 7
uses: actions/setup-dotnet@v1
with:
dotnet-version: "7.0"
- name: Test Runner
working-directory: Tests
run: dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:CoverletOutput=../TestResults/cobertura.xml
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<OutputPath>..\bin\</OutputPath>
<Authors>DraviaVemal</Authors>
<Version>2.8.0-Alpha.2</Version>
<Version>2.8.0-Alpha.3</Version>
<Company>DraviaVemal</Company>
<Copyright>Copyright (c) 2023 DraviaVemal
Permission is hereby granted, free of charge, to any person obtaining a copy of this
Expand Down
2 changes: 1 addition & 1 deletion Global/Components/2007/CommonProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ protected static OpenXmlElement CreateColorComponent<ColorOption>(ColorOptionMod
/// <returns></returns>
protected C.ShapeProperties CreateChartShapeProperties()
{
return CreateChartShapeProperties(new ShapePropertiesModel<NoOptions, NoOptions>());
return CreateChartShapeProperties(new ShapePropertiesModel<NoFillOptions, NoFillOptions>());
}
/// <summary>
/// Create Shape Properties
Expand Down
22 changes: 11 additions & 11 deletions Global/Components/Charts/2007/ChartBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace OpenXMLOffice.Global_2007
/// </summary>
internal ChartSetting<ApplicationSpecificSetting> chartSetting;
private readonly C.Chart chart;
private readonly C.ChartSpace openXMLChartSpace;
private readonly C.ChartSpace documentChartSpace;
/// <summary>
/// Chart base class constructor restricted only for inheritance use
/// </summary>
Expand All @@ -38,7 +38,7 @@ internal ChartBase(ChartSetting<ApplicationSpecificSetting> chartSetting)
CategoryAxisId = chartSetting.categoryAxisId ?? CategoryAxisId;
ValueAxisId = chartSetting.valueAxisId ?? ValueAxisId;
this.chartSetting = chartSetting;
openXMLChartSpace = CreateChartSpace();
documentChartSpace = CreateChartSpace();
chart = CreateChart();
GetChartSpace().Append(chart);
}
Expand All @@ -47,7 +47,7 @@ internal ChartBase(ChartSetting<ApplicationSpecificSetting> chartSetting)
/// </summary>
public virtual C.ChartSpace GetChartSpace()
{
return openXMLChartSpace;
return documentChartSpace;
}
/// <summary>
/// Create Bubble Size Axis for the chart
Expand Down Expand Up @@ -82,7 +82,7 @@ internal C.TrendlineLabel CreateTrendLineLabel()
{
NumberingFormat = new C.NumberingFormat() { FormatCode = "General", SourceLinked = false },
};
trendlineLabel.Append(CreateChartShapeProperties(new ShapePropertiesModel<NoOptions, NoOptions>()));
trendlineLabel.Append(CreateChartShapeProperties(new ShapePropertiesModel<NoFillOptions, NoFillOptions>()));
trendlineLabel.Append(CreateChartTextProperties(new ChartTextPropertiesModel<SolidOptions>()
{
drawingBodyProperties = new DrawingBodyPropertiesModel()
Expand Down Expand Up @@ -336,7 +336,7 @@ internal OpenXmlElement CreateAxis<AxisDirection, AxisType>(AxisSetting<AxisDire
axis.Append(new C.TickLabelPosition { Val = AxisOptions<ValueAxis>.GetLabelAxesPosition(axisSetting.axisOptions.chartAxesOptions.axesLabelPosition) });
if(axisSetting.axisOptions.axisLineColor != null)
{
axis.Append(new List<OpenXmlElement> { CreateChartShapeProperties(new ShapePropertiesModel<SolidOptions, NoOptions>()
axis.Append(new List<OpenXmlElement> { CreateChartShapeProperties(new ShapePropertiesModel<SolidOptions, NoFillOptions>()
{
lineColor = new OutlineModel<SolidOptions>()
{
Expand Down Expand Up @@ -586,7 +586,7 @@ private C.BackWall CreateBackWall()
return new C.BackWall()
{
Thickness = new C.Thickness() { Val = 0 },
ShapeProperties = CreateChartShapeProperties(new ShapePropertiesModel<NoOptions, NoOptions>()
ShapeProperties = CreateChartShapeProperties(new ShapePropertiesModel<NoFillOptions, NoFillOptions>()
{
shapeProperty3D = new ShapeProperty3D()
}),
Expand All @@ -597,7 +597,7 @@ private C.SideWall CreateSideWall()
return new C.SideWall()
{
Thickness = new C.Thickness() { Val = 0 },
ShapeProperties = CreateChartShapeProperties(new ShapePropertiesModel<NoOptions, NoOptions>()
ShapeProperties = CreateChartShapeProperties(new ShapePropertiesModel<NoFillOptions, NoFillOptions>()
{
shapeProperty3D = new ShapeProperty3D()
}),
Expand All @@ -608,7 +608,7 @@ private C.Floor CreateFloor()
return new C.Floor()
{
Thickness = new C.Thickness() { Val = 0 },
ShapeProperties = CreateChartShapeProperties(new ShapePropertiesModel<NoOptions, NoOptions>()
ShapeProperties = CreateChartShapeProperties(new ShapePropertiesModel<NoFillOptions, NoFillOptions>()
{
shapeProperty3D = new ShapeProperty3D()
}),
Expand Down Expand Up @@ -746,7 +746,7 @@ protected static A.Field CreateField(string type, string text)
}
private C.MajorGridlines CreateMajorGridLine()
{
return new C.MajorGridlines(CreateChartShapeProperties(new ShapePropertiesModel<SolidOptions, NoOptions>()
return new C.MajorGridlines(CreateChartShapeProperties(new ShapePropertiesModel<SolidOptions, NoFillOptions>()
{
lineColor = new OutlineModel<SolidOptions>()
{
Expand All @@ -771,7 +771,7 @@ private C.MajorGridlines CreateMajorGridLine()
}
private C.MinorGridlines CreateMinorGridLine()
{
return new C.MinorGridlines(CreateChartShapeProperties(new ShapePropertiesModel<SolidOptions, NoOptions>()
return new C.MinorGridlines(CreateChartShapeProperties(new ShapePropertiesModel<SolidOptions, NoFillOptions>()
{
lineColor = new OutlineModel<SolidOptions>()
{
Expand Down Expand Up @@ -870,7 +870,7 @@ internal C.Trendline CreateTrendLine(TrendLineModel trendLineModel)
{
TrendlineName = new C.TrendlineName(trendLineModel.trendLineName)
};
trendLine.Append(CreateChartShapeProperties(new ShapePropertiesModel<SolidOptions, NoOptions>()
trendLine.Append(CreateChartShapeProperties(new ShapePropertiesModel<SolidOptions, NoFillOptions>()
{
lineColor = new OutlineModel<SolidOptions>()
{
Expand Down
4 changes: 2 additions & 2 deletions Global/Components/Charts/2007/LineChart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ private C.LineChartSeries CreateLineChartSeries(int seriesIndex, ChartDataGroupi
outlineModel.lineColor.colorOption.transparency = (int)lineChartLineFormat.transparency;
}
}
ShapePropertiesModel<SolidOptions, NoOptions> shapePropertiesModel = new ShapePropertiesModel<SolidOptions, NoOptions>()
ShapePropertiesModel<SolidOptions, NoFillOptions> shapePropertiesModel = new ShapePropertiesModel<SolidOptions, NoFillOptions>()
{
lineColor = outlineModel,
};
Expand Down Expand Up @@ -205,7 +205,7 @@ private C.LineChartSeries CreateLineChartSeries(int seriesIndex, ChartDataGroupi
}
else
{
MarkerModel<NoOptions, NoOptions> marketModel = new MarkerModel<NoOptions, NoOptions>()
MarkerModel<NoFillOptions, NoFillOptions> marketModel = new MarkerModel<NoFillOptions, NoFillOptions>()
{
markerShapeType = MarkerShapeTypes.NONE,
};
Expand Down
2 changes: 1 addition & 1 deletion Global/Components/Charts/2007/ScatterChart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ private C.ScatterChartSeries CreateScatterChartSeries(int seriesIndex, ChartData
}
else
{
MarkerModel<NoOptions, NoOptions> markerModel = new MarkerModel<NoOptions, NoOptions>();
MarkerModel<NoFillOptions, NoFillOptions> markerModel = new MarkerModel<NoFillOptions, NoFillOptions>();
if (scatterChartSetting.scatterChartType != ScatterChartTypes.BUBBLE && scatterChartSetting.scatterChartType != ScatterChartTypes.BUBBLE_3D)
{
series.Append(CreateMarker(markerModel));
Expand Down
73 changes: 65 additions & 8 deletions Global/Models/2007/ChartBaseModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -659,21 +659,78 @@
public class PresentationSetting : ISizeAndPosition
{
/// <summary>
/// Chart Height in EMU
/// Value in EMU
/// </summary>
public uint height = 6858000;
private int _height = 6858000;
private int _width = 12192000;

Check notice on line 665 in Global/Models/2007/ChartBaseModel.cs

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

Global/Models/2007/ChartBaseModel.cs#L665

Add underscores to this numeric value for readability.
/// <summary>
/// Chart Width in EMU
/// Value in EMU
/// </summary>
public uint width = 12192000;
private int _y = 0;

Check notice on line 669 in Global/Models/2007/ChartBaseModel.cs

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

Global/Models/2007/ChartBaseModel.cs#L669

Remove this initialization to '_y', the compiler will do that for you.
/// <summary>
/// Chart X Position in EMU
/// Value in EMU
/// </summary>
public uint x = 0;
private int _x = 0;
/// <summary>
/// Chart Y Position in EMU
/// Chart Height in Px
/// </summary>
public uint y = 0;
public int Height

Check notice on line 677 in Global/Models/2007/ChartBaseModel.cs

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

Global/Models/2007/ChartBaseModel.cs#L677

Make this an auto-implemented property and remove its backing field.
{
get
{
return _height;
}
set
{
// _height = (int)ConverterUtils.PixelsToEmu(value);
_height = value;
}
}
/// <summary>
/// Chart Width in Px
/// </summary>
public int Width

Check notice on line 692 in Global/Models/2007/ChartBaseModel.cs

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

Global/Models/2007/ChartBaseModel.cs#L692

Make this an auto-implemented property and remove its backing field.
{
get
{
return _width;
}
set
{
// _width = (int)ConverterUtils.PixelsToEmu(value);

Check warning on line 700 in Global/Models/2007/ChartBaseModel.cs

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

Global/Models/2007/ChartBaseModel.cs#L700

Remove this commented out code.
_width = value;
}
}
/// <summary>
/// Chart X Position in Px
/// </summary>
public int X

Check notice on line 707 in Global/Models/2007/ChartBaseModel.cs

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

Global/Models/2007/ChartBaseModel.cs#L707

Make this an auto-implemented property and remove its backing field.
{
get
{
return _x;
}
set
{
// _x = (int)ConverterUtils.PixelsToEmu(value);

Check warning on line 715 in Global/Models/2007/ChartBaseModel.cs

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

Global/Models/2007/ChartBaseModel.cs#L715

Remove this commented out code.
_x = value;
}
}
/// <summary>
/// Chart Y Position in Px
/// </summary>
public int Y

Check notice on line 722 in Global/Models/2007/ChartBaseModel.cs

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

Global/Models/2007/ChartBaseModel.cs#L722

Make this an auto-implemented property and remove its backing field.
{
get
{
return _y;
}
set
{
// _y = (int)ConverterUtils.PixelsToEmu(value);

Check warning on line 730 in Global/Models/2007/ChartBaseModel.cs

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

Global/Models/2007/ChartBaseModel.cs#L730

Remove this commented out code.
_y = value;
}
}
}
/// <summary>
///
Expand Down
6 changes: 3 additions & 3 deletions Global/Models/2007/CommonPropertiesModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -503,11 +503,11 @@ public class EffectListModel
/// </summary>
public interface IColorOptions { }
/// <summary>
///
/// This will update NoFill Color as result
/// </summary>
public class NoOptions : IColorOptions { }
public class NoFillOptions : IColorOptions { }
/// <summary>
///
/// Solid Fill options
/// </summary>
public class SolidOptions : IColorOptions
{
Expand Down
Loading
Loading