view release on metacpan or search on metacpan
socialcalc/Changes.txt view on Meta::CPAN
New recalc code:
Fixed: Remember to have UI check for circ references and display status
Fixed: =Self should be circ
Fixed: if calced value/type is the same, don't delete display value
2008-09-09:
Fixed formatnumber2.js ampmstr using non-existant constants
2008-09-10:
Moved CalculateColWidthData call into RenderSheet
Fixed bug with last two rows in pane not getting height calculations updated correctly in
CalculateEditorPositions
Removed SheetRenders before recalc
2008-09-11:
Fixed bug with pane slider into scrolled row/col too far: now it unscrolls second pane
(but must wait for position recalc, unfortunately)
2008-09-12:
Fixed bug that kept pan slider tracking lines from showing
socialcalc/Changes.txt view on Meta::CPAN
2008-11-26:
Updated simpleedit14.pl
Fixed some IE bugs with SocialCalc.SpreadsheetControlDecodeSpreadsheetSave with ^$
2008-11-29:
Fixed row hide setting load bug (typo).
2008-12-01:
Made simpleedit14.pl do server-side wikitext expansion differently than client-side.
Fixed bug with formula bar not being updated after commands (and at load).
Fixed bug with commands being executed during cell edit.
2008-12-04:
Made General format round to a maximum precision to lessen floating point artifacts.
2008-12-09:
Added editor.ctrlkeyFunction, including Ctrl-V handling.
Added embedded newline support to csv and tab format conversion.
2008-12-10:
socialcalc/formula1.js view on Meta::CPAN
};
//
// FRESHNESS INFO
//
// This information is generated during recalc.
// It may be used to help determine when the recalc data in a spreadsheet
// may be out of date.
// For example, it may be used to display a message like:
// "Dependent on sheet 'FOO' which was updated more recently than this printout"
SocialCalc.Formula.FreshnessInfo = {
// For each external sheet referenced successfully an attribute of that name with value true.
sheets: {},
// For each volatile function that is called an attribute of that name with value true.
volatile: {},
socialcalc/simpleedit14.pl view on Meta::CPAN
my $newstr;
$newstr = $q->param('pagetext');
if ($q->param('edittype') eq "clean") {
my $page = {};
load_page($q, $pagename, $page);
$newstr =~ s/^\[(spreadsheet|datatable|drawing)\:(.+?)\]/"[$1:$2:\n" . $page->{items}{$2}{text} . "\n:$1]"/gme;
}
open (PAGEFILEOUT, ">$datadir$pagename.page.txt");
print PAGEFILEOUT $newstr;
close PAGEFILEOUT;
$statusmessage .= "Saved updated page '$pagename'.<br>";
}
if ($q->param("editpage") || $q->param("editrawpage")) { # when one of the "editpage" buttons is pressed
return do_editpage($q, $pagename, $statusmessage);
}
foreach my $p ($q->param) { # go through all the parameters
if ($p =~ /^edit(spreadsheet|datatable):(.*)/) { # "editspreadsheet:sheetname" pressed
return start_editsheet($pagename, $2, $q, $statusmessage);
}
socialcalc/simpleedit14.pl view on Meta::CPAN
my $pagestr = $page->{raw};
my $sheetname = $q->param('sheetname');
my $sheettype = $page->{items}{$sheetname}{type};
$pagestr =~ s/^\[$sheettype\:$sheetname:.*?\:$sheettype\]/"[$sheettype:$sheetname:\n" . $q->param('newstr') . "\n:$sheettype]"/sme;
open (PAGEFILEOUT, ">$datadir$pagename.page.txt");
print PAGEFILEOUT $pagestr;
close PAGEFILEOUT;
$statusmessage =
"Saved updated $sheettype '$sheetname' on page '$pagename'.<br>";
}
$response = do_displaypage($q, $pagename, $statusmessage); # Otherwise, display page
return $response;
}
#
# load_page($q, $pagename, \%page)
socialcalc/simpleedit15.pl view on Meta::CPAN
my $newstr;
$newstr = $q->param('pagetext');
if ($q->param('edittype') eq "clean") {
my $page = {};
load_page($q, $pagename, $page);
$newstr =~ s/^\[(spreadsheet|datatable|drawing)\:(.+?)\]/"[$1:$2:\n" . $page->{items}{$2}{text} . "\n:$1]"/gme;
}
open (PAGEFILEOUT, ">$datadir$pagename.page.txt");
print PAGEFILEOUT $newstr;
close PAGEFILEOUT;
$statusmessage .= "Saved updated page '$pagename'.<br>";
}
if ($q->param("editpage") || $q->param("editrawpage")) { # when one of the "editpage" buttons is pressed
return do_editpage($q, $pagename, $statusmessage);
}
foreach my $p ($q->param) { # go through all the parameters
if ($p =~ /^edit(spreadsheet|datatable):(.*)/) { # "editspreadsheet:sheetname" pressed
return start_editsheet($pagename, $2, $q, $statusmessage);
}
socialcalc/simpleedit15.pl view on Meta::CPAN
my $pagestr = $page->{raw};
my $sheetname = $q->param('sheetname');
my $sheettype = $page->{items}{$sheetname}{type};
$pagestr =~ s/^\[$sheettype\:$sheetname:.*?\:$sheettype\]/"[$sheettype:$sheetname:\n" . $q->param('newstr') . "\n:$sheettype]"/sme;
open (PAGEFILEOUT, ">$datadir$pagename.page.txt");
print PAGEFILEOUT $pagestr;
close PAGEFILEOUT;
$statusmessage =
"Saved updated $sheettype '$sheetname' on page '$pagename'.<br>";
}
$response = do_displaypage($q, $pagename, $statusmessage); # Otherwise, display page
return $response;
}
#
# load_page($q, $pagename, \%page)
socialcalc/socialcalc-3.js view on Meta::CPAN
SocialCalc.GetStyleString = function(sheet, atype, num) {
if (!num) return null; // zero, null, and undefined return null
return sheet[atype+"s"][num];
}
//
// updatedformula = SocialCalc.OffsetFormulaCoords(formula, coloffset, rowoffset)
//
// Change relative cell references by offsets (even those to other worksheets so fill, paste, sort work as expected).
// If not what you want, use absolute references.
//
SocialCalc.OffsetFormulaCoords = function(formula, coloffset, rowoffset) {
var parseinfo, ttext, ttype, i, cr, newcr;
var updatedformula = "";
var scf = SocialCalc.Formula;
if (!scf) {
return "Need SocialCalc.Formula";
}
var tokentype = scf.TokenType;
var token_op = tokentype.op;
var token_string = tokentype.string;
var token_coord = tokentype.coord;
var tokenOpExpansion = scf.TokenOpExpansion;
socialcalc/socialcalc-3.js view on Meta::CPAN
if (ttext.indexOf("$", 1)==-1) { // add row offset unless absolute row
cr.row += rowoffset;
}
else {
newcr += "$";
}
newcr += cr.row;
if (cr.row < 1 || cr.col < 1) {
newcr = "#REF!";
}
updatedformula += newcr;
}
else if (ttype == token_string) {
if (ttext.indexOf('"') >= 0) { // quotes to double
updatedformula += '"' + ttext.replace(/"/, '""') + '"';
}
else updatedformula += '"' + ttext + '"';
}
else if (ttype == token_op) {
updatedformula += tokenOpExpansion[ttext] || ttext; // make sure short tokens (e.g., "G") go back full (">=")
}
else { // leave everything else alone
updatedformula += ttext;
}
}
return updatedformula;
}
//
// updatedformula = SocialCalc.AdjustFormulaCoords(formula, col, coloffset, row, rowoffset)
//
// Change all cell references to cells starting with col/row by offsets
//
SocialCalc.AdjustFormulaCoords = function(formula, col, coloffset, row, rowoffset) {
var ttype, ttext, i, newcr;
var updatedformula = "";
var sheetref = false;
var scf = SocialCalc.Formula;
if (!scf) {
return "Need SocialCalc.Formula";
}
var tokentype = scf.TokenType;
var token_op = tokentype.op;
var token_string = tokentype.string;
var token_coord = tokentype.coord;
var tokenOpExpansion = scf.TokenOpExpansion;
socialcalc/socialcalc-3.js view on Meta::CPAN
newcr = "#REF!";
}
ttext = newcr;
}
else if (ttype == token_string) {
if (ttext.indexOf('"') >= 0) { // quotes to double
ttext = '"' + ttext.replace(/"/, '""') + '"';
}
else ttext = '"' + ttext + '"';
}
updatedformula += ttext;
}
return updatedformula;
}
//
// updatedformula = SocialCalc.ReplaceFormulaCoords(formula, movedto)
//
// Change all cell references to cells that are keys in moveto to be to moveto[coord].
// Don't change references to other sheets.
// Handle range extents specially.
//
SocialCalc.ReplaceFormulaCoords = function(formula, movedto) {
var ttype, ttext, i, newcr, coord;
var updatedformula = "";
var sheetref = false;
var scf = SocialCalc.Formula;
if (!scf) {
return "Need SocialCalc.Formula";
}
var tokentype = scf.TokenType;
var token_op = tokentype.op;
var token_string = tokentype.string;
var token_coord = tokentype.coord;
var tokenOpExpansion = scf.TokenOpExpansion;
socialcalc/socialcalc-3.js view on Meta::CPAN
}
ttext = newcr;
}
}
else if (ttype == token_string) {
if (ttext.indexOf('"') >= 0) { // quotes to double
ttext = '"' + ttext.replace(/"/, '""') + '"';
}
else ttext = '"' + ttext + '"';
}
updatedformula += ttext;
}
return updatedformula;
}
// ************************
//
// Recalc Loop Code
//
// ************************
socialcalc/socialcalcserver.pl view on Meta::CPAN
return start_viewsheet($pagename, $q, $statusmessage);
}
if ($q->param('savespreadsheet')) { # save the edited spreadsheet
my $pagestr = $q->param('newstr');
open (PAGEFILEOUT, ">$datadir$pagename");
print PAGEFILEOUT $pagestr;
close PAGEFILEOUT;
$statusmessage =
"Saved updated '$pagename'.<br>";
}
if ($q->param('filecontents')) { # return contents of file
my $fileurl = $q->param('filecontents');
open (PAGEFILEIN, "$fileurl");
my $filestr;
while (my $line = <PAGEFILEIN>) {
$filestr .= $line;
}
socialcalc/third-party/Socket.IO-node/support/socket.io-client/lib/socket.js view on Meta::CPAN
this.emit('disconnect');
if (this.options.reconnect && !this.reconnecting) this.onReconnect();
}
};
/**
* The reconnection is done using an exponential back off algorithm to prevent
* the server from being flooded with connection requests. When the transport
* is disconnected we wait until the `reconnectionDelay` finishes. We multiply
* the `reconnectionDelay` (if the previous `reconnectionDelay` was 500 it will
* be updated to 1000 and than 2000>4000>8000>16000 etc.) and tell the current
* transport to connect again. When we run out of `reconnectionAttempts` we will
* do one final attempt and loop over all enabled transport methods to see if
* other transports might work. If everything fails we emit the `reconnect_failed`
* event.
*
* @api private
*/
Socket.prototype.onReconnect = function(){
this.reconnecting = true;
this.reconnectionAttempts = 0;
socialcalc/third-party/Socket.IO-node/support/socket.io-client/socket.io.js view on Meta::CPAN
this.emit('disconnect');
if (this.options.reconnect && !this.reconnecting) this.onReconnect();
}
};
/**
* The reconnection is done using an exponential back off algorithm to prevent
* the server from being flooded with connection requests. When the transport
* is disconnected we wait until the `reconnectionDelay` finishes. We multiply
* the `reconnectionDelay` (if the previous `reconnectionDelay` was 500 it will
* be updated to 1000 and than 2000>4000>8000>16000 etc.) and tell the current
* transport to connect again. When we run out of `reconnectionAttempts` we will
* do one final attempt and loop over all enabled transport methods to see if
* other transports might work. If everything fails we emit the `reconnect_failed`
* event.
*
* @api private
*/
Socket.prototype.onReconnect = function(){
this.reconnecting = true;
this.reconnectionAttempts = 0;