Skip to content

Commit

Permalink
refactored @:enum to enum
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexHaxe committed May 15, 2023
1 parent 83c3a68 commit 93d01cc
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 23 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## dev branch / next version (0.x.x)

## version 0.3.1 (2023-05-15)

- Refactored @:enum abstract to enum abstract
- Dropped Haxe 3 support

## version 0.3.0 (2019-05-12)

- Added Xls and Xlsx readers for spreadsheet
Expand Down
4 changes: 2 additions & 2 deletions haxelib.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"externs"
],
"description": "Haxe externs for PHPOffice",
"version": "0.3.0",
"releasenote": "added Xls and Xlsx readers - see CHANGELOG",
"version": "0.3.1",
"releasenote": "refactored @:enum to enum - see CHANGELOG",
"contributors": [
"AlexHaxe"
],
Expand Down
2 changes: 1 addition & 1 deletion src/php/phpoffice/phpspreadsheet/Spreadsheet.hx
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ extern class Spreadsheet {
public function setTabRatio(tabRatio:Int):Void;
}

@:enum abstract Visibility(String) to String {
enum abstract Visibility(String) to String {
// // Allowable values for workbook window visilbity
var VISIBILITY_VISIBLE = 'visible';
var VISIBILITY_HIDDEN = 'hidden';
Expand Down
2 changes: 1 addition & 1 deletion src/php/phpoffice/phpspreadsheet/document/Properties.hx
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ extern class Properties {
public function setCustomProperty(propertyName:String, propertyValue:Any, propertyType:Null<PropertyType> = null):Properties;
}

@:enum abstract PropertyType(String) to String {
enum abstract PropertyType(String) to String {
var PROPERTY_TYPE_BOOLEAN = "b";
var PROPERTY_TYPE_INTEGER = "i";
var PROPERTY_TYPE_FLOAT = "f";
Expand Down
2 changes: 1 addition & 1 deletion src/php/phpoffice/phpspreadsheet/style/NumberFormat.hx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ extern class NumberFormat {
}

// Pre-defined formats
@:enum abstract NumberFormatType(String) from String to String {
enum abstract NumberFormatType(String) from String to String {
var General = "General";
var Text = "@";
var Number = "0";
Expand Down
6 changes: 3 additions & 3 deletions src/php/phpoffice/phpspreadsheet/worksheet/PageSetup.hx
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ extern class PageSetup {
public function resetFirstPageNumber():PageSetup;
}

@:enum abstract PaperSize(Int) to Int {
enum abstract PaperSize(Int) to Int {
// Paper size
var LETTER = 1;
var LETTER_SMALL = 2;
Expand Down Expand Up @@ -505,14 +505,14 @@ extern class PageSetup {
}

// Page orientation
@:enum abstract Orientation(String) to String {
enum abstract Orientation(String) to String {
var DEFAULT = 'default';
var LANDSCAPE = 'landscape';
var PORTRAIT = 'portrait';
}

// Print Range Set Method
@:enum abstract SetPrintRange(String) to String {
enum abstract SetPrintRange(String) to String {
var OVERWRITE = 'O';
var INSERT = 'I';
}
2 changes: 1 addition & 1 deletion src/php/phpoffice/phpspreadsheet/worksheet/Worksheet.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,7 @@ extern class Worksheet {
public function hasCodeName():Bool;
}

@:enum abstract Breaktype(Int) to Int {
enum abstract Breaktype(Int) to Int {
var BREAK_NONE = 0;
var BREAK_ROW = 1;
var BREAK_COLUMN = 2;
Expand Down
4 changes: 2 additions & 2 deletions src/php/phpoffice/phpword/IOFactory.hx
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ extern class IOFactory {
public static function load(filename:String, readerName:ReaderTypes = Word2007):PhpWord;
}

@:enum abstract ReaderTypes(String) to String {
enum abstract ReaderTypes(String) to String {
var OdText = "ODText";
var Rtf = "RTF";
var Word2007 = "Word2007";
var Html = "HTML";
var Pdf = "PDF";
}

@:enum abstract WriterTypes(String) to String {
enum abstract WriterTypes(String) to String {
var OdText = "ODText";
var Rtf = "RTF";
var Word2007 = "Word2007";
Expand Down
4 changes: 2 additions & 2 deletions src/php/phpoffice/phpword/style/Font.hx
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ extern class Font extends AbstractStyle {
*
* @const string
*/
@:enum abstract Underline(String) from String to String {
enum abstract Underline(String) from String to String {
var None = "none";
var Dash = "dash";
var DashHeavy = "dashHeavy";
Expand All @@ -450,7 +450,7 @@ extern class Font extends AbstractStyle {
*
* @const string
*/
@:enum abstract ForegroundColor(String) from String to String {
enum abstract ForegroundColor(String) from String to String {
var Yellow = "yellow";
var LigthGreen = "green";
var Cyan = "cyan";
Expand Down
12 changes: 6 additions & 6 deletions src/php/phpoffice/phpword/style/Frame.hx
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ extern class Frame extends AbstractStyle {
*
* @const string
*/
@:enum abstract PosType(String) from String to String {
enum abstract PosType(String) from String to String {
var Absolute = "absolute";
var Relative = "relative";
}
Expand All @@ -313,7 +313,7 @@ extern class Frame extends AbstractStyle {
*
* @const string
*/
@:enum abstract HPosType(String) from String to String {
enum abstract HPosType(String) from String to String {
var Absolute = "absolute";
var Left = "left";
var Center = "center";
Expand All @@ -327,7 +327,7 @@ extern class Frame extends AbstractStyle {
*
* @const string
*/
@:enum abstract VPosType(String) from String to String {
enum abstract VPosType(String) from String to String {
var Absolute = "absolute";
var Top = "top";
var Center = "center";
Expand All @@ -341,7 +341,7 @@ extern class Frame extends AbstractStyle {
*
* @const string
*/
@:enum abstract HPosRelType(String) from String to String {
enum abstract HPosRelType(String) from String to String {
var Margin = "margin";
var Page = "page";
var Column = "column";
Expand All @@ -357,7 +357,7 @@ extern class Frame extends AbstractStyle {
*
* @const string
*/
@:enum abstract VPosRelType(String) from String to String {
enum abstract VPosRelType(String) from String to String {
var Margin = "margin";
var Page = "page";
var Text = "text";
Expand All @@ -373,7 +373,7 @@ extern class Frame extends AbstractStyle {
*
* @const string
*/
@:enum abstract WrapType(String) from String to String {
enum abstract WrapType(String) from String to String {
var Inline = "inline";
var Square = "square";
var Tight = "tight";
Expand Down
2 changes: 1 addition & 1 deletion src/php/phpoffice/phpword/style/Paragraph.hx
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ extern class Paragraph extends Border {
public function setSuppressAutoHyphens(suppressAutoHyphens:Bool):Void;
}

@:enum abstract TextAlignment(String) from String to String {
enum abstract TextAlignment(String) from String to String {
// Align Text at Top
var Top = "top";
// Align Text at Center
Expand Down
2 changes: 1 addition & 1 deletion src/php/phpoffice/phpword/style/Section.hx
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ extern class Section extends Border {
*
* @const string
*/
@:enum abstract Orientation(String) from String to String {
enum abstract Orientation(String) from String to String {
var Portrait = "portrait";
var Landscape = "landscape";
}
4 changes: 2 additions & 2 deletions src/php/phpoffice/phpword/style/Tab.hx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ extern class Tab extends AbstractStyle {
*
* @const string
*/
@:enum abstract TabStopType(String) from String to String {
enum abstract TabStopType(String) from String to String {
var Clear = "clear";
var Left = "left";
var Center = "center";
Expand All @@ -82,7 +82,7 @@ extern class Tab extends AbstractStyle {
*
* @const string
*/
@:enum abstract TabLeaderType(String) from String to String {
enum abstract TabLeaderType(String) from String to String {
var None = "none";
var Dot = "dot";
var Hyphen = "hyphen";
Expand Down

0 comments on commit 93d01cc

Please sign in to comment.