-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dd05683
commit 7994817
Showing
18 changed files
with
271 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
4.11.0.1383 | ||
4.12.0.1384 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
4.11.0.1383 | ||
4.12.0.1384 |
5 changes: 0 additions & 5 deletions
5
integration/lib/com/wiris/plugin/api/AccessProvider.interface.php
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
integration/lib/com/wiris/plugin/api/ImageFormatController.interface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<?php | ||
|
||
interface com_wiris_plugin_api_ImageFormatController { | ||
function scalateMetrics($dpi, $metrics); | ||
function getMetrics($bytes, &$output); | ||
function getContentType(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
integration/lib/com/wiris/plugin/provider/PhpAccessProvider.interface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?php | ||
|
||
interface com_wiris_plugin_provider_PhpAccessProvider extends com_wiris_plugin_api_AccessProvider{ | ||
interface com_wiris_plugin_provider_PhpAccessProvider extends com_wiris_util_sys_AccessProvider{ | ||
function setInitObject(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
integration/lib/com/wiris/util/sys/AccessProvider.interface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?php | ||
|
||
interface com_wiris_util_sys_AccessProvider { | ||
function isEnabled(); | ||
function requireAccess(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,195 @@ | ||
<?php | ||
|
||
class com_wiris_util_type_Arrays { | ||
public function __construct() { | ||
} | ||
static function newIntArray($length, $initValue) { | ||
$data = new _hx_array(array()); | ||
--$length; | ||
while($length >= 0) { | ||
$data[$length] = $initValue; | ||
--$length; | ||
} | ||
return $data; | ||
} | ||
static function indexOfElement($array, $element) { | ||
$i = 0; | ||
$n = $array->length; | ||
while($i < $n) { | ||
if($array[$i] !== null && $array[$i] == $element) { | ||
return $i; | ||
} | ||
++$i; | ||
} | ||
return -1; | ||
} | ||
static function fromIterator($iterator) { | ||
$array = new _hx_array(array()); | ||
while($iterator->hasNext()) { | ||
$array->push($iterator->next()); | ||
} | ||
return $array; | ||
} | ||
static function fromCSV($s) { | ||
$words = _hx_explode(",", $s); | ||
$i = 0; | ||
while($i < $words->length) { | ||
$w = trim($words[$i]); | ||
if(strlen($w) > 0) { | ||
$words[$i] = $w; | ||
++$i; | ||
} else { | ||
$words->splice($i, 1); | ||
} | ||
unset($w); | ||
} | ||
return $words; | ||
} | ||
static function contains($array, $element) { | ||
return com_wiris_util_type_Arrays::indexOfElement($array, $element) >= 0; | ||
} | ||
static function indexOfElementArray($array, $element) { | ||
$i = null; | ||
{ | ||
$_g1 = 0; $_g = $array->length; | ||
while($_g1 < $_g) { | ||
$i1 = $_g1++; | ||
if($array[$i1] !== null && _hx_equal($array[$i1], $element)) { | ||
return $i1; | ||
} | ||
unset($i1); | ||
} | ||
} | ||
return -1; | ||
} | ||
static function indexOfElementInt($array, $element) { | ||
$i = null; | ||
{ | ||
$_g1 = 0; $_g = $array->length; | ||
while($_g1 < $_g) { | ||
$i1 = $_g1++; | ||
if($array[$i1] === $element) { | ||
return $i1; | ||
} | ||
unset($i1); | ||
} | ||
} | ||
return -1; | ||
} | ||
static function containsArray($array, $element) { | ||
return com_wiris_util_type_Arrays::indexOfElementArray($array, $element) >= 0; | ||
} | ||
static function containsInt($array, $element) { | ||
return com_wiris_util_type_Arrays::indexOfElementInt($array, $element) >= 0; | ||
} | ||
static function clear($a) { | ||
$i = $a->length - 1; | ||
while($i >= 0) { | ||
$a->remove($a[$i]); | ||
$i--; | ||
} | ||
} | ||
static function sort($elements, $comparator) { | ||
com_wiris_util_type_Arrays::quicksort($elements, 0, $elements->length - 1, $comparator); | ||
} | ||
static function insertSorted($a, $e) { | ||
com_wiris_util_type_Arrays::insertSortedImpl($a, $e, false); | ||
} | ||
static function insertSortedSet($a, $e) { | ||
com_wiris_util_type_Arrays::insertSortedImpl($a, $e, true); | ||
} | ||
static function insertSortedImpl($a, $e, $set) { | ||
$imin = 0; | ||
$imax = $a->length; | ||
while($imin < $imax) { | ||
$imid = intval(($imax + $imin) / 2); | ||
$cmp = Reflect::compare($a[$imid], $e); | ||
if($cmp === 0) { | ||
if($set) { | ||
return; | ||
} else { | ||
$imin = $imid; | ||
$imax = $imid; | ||
} | ||
} else { | ||
if($cmp < 0) { | ||
$imin = $imid + 1; | ||
} else { | ||
$imax = $imid; | ||
} | ||
} | ||
unset($imid,$cmp); | ||
} | ||
$a->insert($imin, $e); | ||
} | ||
static function binarySearch($array, $key) { | ||
$imin = 0; | ||
$imax = $array->length; | ||
while($imin < $imax) { | ||
$imid = intval(($imin + $imax) / 2); | ||
$cmp = Reflect::compare($array[$imid], $key); | ||
if($cmp === 0) { | ||
return $imid; | ||
} else { | ||
if($cmp < 0) { | ||
$imin = $imid + 1; | ||
} else { | ||
$imax = $imid; | ||
} | ||
} | ||
unset($imid,$cmp); | ||
} | ||
return -1; | ||
} | ||
static function copyArray($a) { | ||
$b = new _hx_array(array()); | ||
$i = $a->iterator(); | ||
while($i->hasNext()) { | ||
$b->push($i->next()); | ||
} | ||
return $b; | ||
} | ||
static function addAll($baseArray, $additionArray) { | ||
$i = $additionArray->iterator(); | ||
while($i->hasNext()) { | ||
$baseArray->push($i->next()); | ||
} | ||
} | ||
static function quicksort($elements, $lower, $higher, $comparator) { | ||
if($lower < $higher) { | ||
$p = com_wiris_util_type_Arrays::partition($elements, $lower, $higher, $comparator); | ||
com_wiris_util_type_Arrays::quicksort($elements, $lower, $p - 1, $comparator); | ||
com_wiris_util_type_Arrays::quicksort($elements, $p + 1, $higher, $comparator); | ||
} | ||
} | ||
static function partition($elements, $lower, $higher, $comparator) { | ||
$pivot = $elements[$higher]; | ||
$i = $lower - 1; | ||
$j = $lower; | ||
while($j < $higher) { | ||
if($comparator->compare($pivot, $elements[$j]) > 0) { | ||
$i++; | ||
if($i !== $j) { | ||
$swapper = $elements[$i]; | ||
$elements[$i] = $elements[$j]; | ||
$elements[$j] = $swapper; | ||
unset($swapper); | ||
} | ||
} | ||
$j++; | ||
} | ||
if($comparator->compare($elements[$i + 1], $elements[$higher]) > 0) { | ||
$finalSwap = $elements[$i + 1]; | ||
$elements[$i + 1] = $elements[$higher]; | ||
$elements[$higher] = $finalSwap; | ||
} | ||
return $i + 1; | ||
} | ||
static function firstElement($elements) { | ||
return $elements[0]; | ||
} | ||
static function lastElement($elements) { | ||
return $elements[$elements->length - 1]; | ||
} | ||
function __toString() { return 'com.wiris.util.type.Arrays'; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?php | ||
|
||
interface com_wiris_util_type_Comparator { | ||
function compare($a, $b); | ||
} |
Oops, something went wrong.