Changeset 3448
- Timestamp:
- 04/15/09 16:48:29 (3 years ago)
- Location:
- trunk/SpreadSheetPlugin
- Files:
-
- 3 edited
-
data/System/SpreadSheetPlugin.txt (modified) (2 diffs)
-
lib/Foswiki/Plugins/SpreadSheetPlugin.pm (modified) (2 diffs)
-
lib/Foswiki/Plugins/SpreadSheetPlugin/Calc.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/SpreadSheetPlugin/data/System/SpreadSheetPlugin.txt
r3328 r3448 737 737 ---++ Plugin Settings 738 738 739 Plugin settings are stored as [[%SYSTEMWEB%.PreferenceSettings][preference settings]]. To reference 740 a plugin setting write ==%<nop><plugin>_<setting>%==, i.e. ==%<nop>SPREADSHEETPLUGIN_SHORTDESCRIPTION%== 741 742 * One line description, is shown in the %SYSTEMWEB%.TextFormattingRules topic:743 * Set SHORTDESCRIPTION = Add spreadsheet calculation like ="$SUM( $ABOVE() )"= to Foswiki tables and other topic text 744 745 * Debug plugin: (See output in =data/debug.txt=) 746 * Set DEBUG = 0 747 748 * Do not handle =%<nop>CALC{}%= variable in included topic while including topic: (default: 1) 749 * Set SKIPINCLUDE = 1 750 751 <noautolink> 752 * [[%SYSTEMWEB%.WikiWord][WikiWords]] to exclude from being spaced out by the ==$PROPERSPACE(text)== function. This comma delimited list can be overloaded by a DONTSPACE [[%SYSTEMWEB%.PreferenceSettings][preference setting]]: 753 * Set DONTSPACE = CodeWarrior, MacDonald, McIntosh, RedHat, SuSE 754 </noautolink> 755 739 You can override some default settings in the plugin by setting the following [[%SYSTEMWEB%.PreferenceSettings][preferences]]. 740 741 <!-- 742 * Set SHORTDESCRIPTION = Add spreadsheet calculation like ="$SUM( $ABOVE() )"= to Foswiki tables and other topic text 743 --> 744 | *Preference* | *Meaning* | *Default* | 745 | =SPREADSHEETPLUGIN_DEBUG= | \ 746 Debug plugin: (See output in =data/debug.txt=) | 0 | 747 | =SPREADSHEETPLUGIN_SKIPINCLUDE= | \ 748 Do not handle =%<nop>CALC{}%= variable in included \ 749 topic while including topic | 1 | 750 | =SPREADSHEETPLUGIN_DONTSPACE= | Comma-delimited list of \ 751 [[%SYSTEMWEB%.WikiWord][WikiWords]] to exclude from being spaced out by \ 752 the ==$PROPERSPACE(text)== function. | \ 753 <noautolink>CodeWarrior, MacDonald, McIntosh, RedHat, SuSE</noautolink> | 754 755 Note that the =DONTSPACE= global preference overrides the =SPREADSHEETPLUGIN_DONTSPACE= preference for historical reasons. 756 756 757 757 ---++ Plugin Installation Instructions 758 759 *Note:* You do not need to install anything on the browser to use this plugin. Below installation instructions are for the administrator who needs to install this plugin on the Foswiki server. 760 761 * Download the ZIP file from the <nop>%TOPIC% home 762 * Unzip ==SpreadSheetPlugin.zip== in your Foswiki installation directory. Content: 763 | *File:* | *Description:* | 764 | ==data/System/%TOPIC%.txt== | Plugin topic | 765 | ==data/System/%TOPIC%.txt,v== | Plugin topic repository | 766 | ==lib/Foswiki/Plugins/%TOPIC%.pm== | Plugin Perl module | 767 * Visit =configure= in your Foswiki installation, and enable the Plugin in the {Plugins} section. 758 %$INSTALL_INSTRUCTIONS% 768 759 * Test if the "Total" in the first table in this topic is correct. 769 760 … … 817 808 | 16 Apr 2001: | Fixed div by 0 bug in $AVERAGE() | 818 809 | 17 Mar 2001: | Initial version with $ABOVE(), $AVERAGE(), $COLUMN(), $COUNTITEMS(), $EVAL(), $INT(), $LEFT(), $LOWER(), $MAX(), $MIN(), $ROW(), $SUM(), $T(), $UPPER() | 819 | CPAN Dependencies: | none |820 | Other Dependencies: | none |821 | Perl Version: | 5.008 |822 810 | Plugin Home: | http://foswiki.org/Extensions/%TOPIC% | 823 811 | Support: | http://foswiki.org/Support/%TOPIC% | -
trunk/SpreadSheetPlugin/lib/Foswiki/Plugins/SpreadSheetPlugin.pm
r3328 r3448 28 28 # ========================= 29 29 use vars qw( 30 $web $topic $user $installWeb $ VERSION $RELEASE $debug $skipInclude $doInit30 $web $topic $user $installWeb $debug $skipInclude $doInit 31 31 ); 32 32 33 # This should always be $Rev: 13748 $ so that Foswiki can determine the checked-in 34 # status of the plugin. It is used by the build automation tools, so 35 # you should leave it alone. 36 $VERSION = '$Rev: 13748 $'; 37 38 # This is a free-form string you can use to "name" your own plugin version. 39 # It is *not* used by the build automation tools, but is reported as part 40 # of the version number in PLUGINDESCRIPTIONS. 41 $RELEASE = '29 Mar 2009'; 33 our $VERSION = '$Rev: 13748 $'; 34 our $RELEASE = '29 Mar 2009'; 35 our $NO_PREFS_IN_TOPIC = 1; 42 36 43 37 $doInit = 0; … … 55 49 56 50 # Get plugin debug flag 57 $debug = Foswiki::Func::getPreferencesFlag( "SPREADSHEETPLUGIN_DEBUG" ) ;51 $debug = Foswiki::Func::getPreferencesFlag( "SPREADSHEETPLUGIN_DEBUG" ) || 0; 58 52 59 53 # Flag to skip calc if in include 60 $skipInclude = Foswiki::Func::getPreferencesFlag( "SPREADSHEETPLUGIN_SKIPINCLUDE" ) ;54 $skipInclude = Foswiki::Func::getPreferencesFlag( "SPREADSHEETPLUGIN_SKIPINCLUDE" ) || 1; 61 55 62 56 # Plugin correctly initialized -
trunk/SpreadSheetPlugin/lib/Foswiki/Plugins/SpreadSheetPlugin/Calc.pm
r3328 r3448 1293 1293 unless( $dontSpaceRE ) { 1294 1294 $dontSpaceRE = &Foswiki::Func::getPreferencesValue( "DONTSPACE" ) || 1295 &Foswiki::Func::getPreferencesValue( "SPREADSHEETPLUGIN_DONTSPACE" ) || 1296 "UnlikelyGibberishWikiWord"; 1295 &Foswiki::Func::getPreferencesValue( "SPREADSHEETPLUGIN_DONTSPACE" ) || "CodeWarrior, MacDonald, McIntosh, RedHat, SuSE"; 1297 1296 $dontSpaceRE =~ s/[^a-zA-Z0-9\,\s]//go; 1298 1297 $dontSpaceRE = "(" . join( "|", split( /[\,\s]+/, $dontSpaceRE ) ) . ")";
Note: See TracChangeset
for help on using the changeset viewer.
