User:Regina/MyDrafts

From Apache OpenOffice Wiki
< User:Regina
Revision as of 15:07, 5 December 2008 by Regina (Talk | contribs)

Jump to: navigation, search

Customize Keyboard

You need an editor, which preserves Unix line ends and the coding "UTF-8", and which will not set a byte order mark. I have used "PSPAD" or "jEdit" on WinXP. On WinXP neither WordPad nor NotePad is suitable.

On WinXP the keybord settings for the modules are in the files

<..>\user\config\soffice.cfg\modules\<module name>\accelerator\<language code>\current.xml

and the general settings are in the file

<..>\user\config\soffice.cfg\global\accelerator\<language code>\current.xml

Older versions of OOo might not have this files by default. If they are missing, goto Tool | Customize | Keyboard and change something. Then the files will be generated.

  1. Close OOo and close quickstarter.
  2. Make a copy of the file, you will work on.
  3. Open the file in an editor.
  4. Edit the file and save it.
  5. Start OOo.

If something is wrong, OOo will crash. Do not sent a crash report, it is your fault, not the fault of OOo. But restore the original file with the copy you have made in step 2.

To learn more about this file, see "StarOffice 7 Administration Guide" chapter 4 [1], "StarOFfice 8 Administration Guide" chapter 3 and appendix A [2], and "OpenOffice.org XML File Format 1.0 Technical Reference Manual", chapter 9.2 [3].

Let us have a deeper look at the file. You will see something like

<?xml version="1.0" encoding="UTF-8"?>
<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
	<accel:item accel:code="KEY_Q" accel:mod1="true" xlink:href=".uno:Quit"/>
	<accel:item accel:code="KEY_N" accel:shift="true" accel:mod1="true" xlink:href=".uno:NewDoc"/>

You will notice that the lines have all the same structure.

accel:item
A single short cut key will be defined.
accel:code="KEY_Q"

You can use only keys which has got a name. I don't know where to find a list of all possible keys and which of them will work, dependent on keyboard, operating system and language.

Next the modifier keys are listed. You need only those, which are used, because the default value of the modifier keys is "false".

accel:mod1="true"
That is the CRTL-key
accel:mod2="true"
That is the ALT-key
accel:shift="true"
That is the SHIFT-key

Instead of pressing the keys CRTL and Alt together, you can also press the key AltGr (That's on a German keyboard. Would be nice, if some correct this for an English keyboard).

The last position decribes what the shortcut should do, for example

xlink:href=".uno:Quit"
will close OOo. Inside the quotes stands a Command URL. In older OOo versions the command URL could be build as
"slot:<number>"
but that way should not be used for newer versions, if a ".uno" form exists.

You find those commands in the document [4] in the first column or in the above mentioned document "StarOFfice 8 Administration Guide".

Some of the commands need parameters. I don't know a list of those parameters, but you can get a hint, if you record a macro and look, which parameters the dispatcher gets. For example the record of inserting a special character gives you the Command URL ".uno:InsertSymbol" and the parameter "Symbols" with for example the value "δ" (Greek delta). Or look at the existing lines in the configuration files. Perhaps you can alter a parameter?

Such parameters follow the command after a ?. For inserting the character "δ" the complete Command URL is ".uno:InsertSymbol?Symbols:string=δ".

Modifier keys and command URL may be exchanged.

The complete line for inserting the special character δ when pressing the keys AltGr (German) and D together is then

<accel:item accel:code="KEY_D" accel:mod1="true" accel:mod2="true" xlink:href=".uno:InsertSymbol?Symbols:string=δ" />

CHISQINV

Calculates the inverse of the CHISQDIST function.

Syntax

CHISQINV(p; k)

k is the degrees of freedom for the χ2-distribution.
Constraint: k must be a positive integer
p is the given probability
Constraint: 0 ≤ p < 1

Semantic

CHISQINV(p; k) returns the value x, such that CHISQDIST(x; k;TRUE()) = p.

Example

CHISQINV(0.5; 9)

returns approximately 8.342832692

.

Remarks

If you need CHISQINV(p;k) for a non interger parameter k, then use GAMMAINV(p;k/2;2) instead.

See also:

CHISQDIST LEGACY.CHIDIST LEGACY.CHIINV

Statistical functions

Functions listed alphabetically, Functions listed by category

Issues:

  • This function is expected for OOo3.1


GAMMA

Returns the values of the Gamma function.

Syntax

GAMMA(x)

x is a number.
Constraint: If x is an integer, then x must be positive.

Semantic

GAMMA(x) calculates

.


Example

GAMMA(4) = 6.0 exact
GAMMA(34.56) ≈ 6.2336323276E+037
GAMMA(−4) not defined

Remarks

For x < 0.5 Eulers reflection formula is used.

The Gamma function has poles for negative integers and for zero. Near the poles the values are less accurate.

If x is a positive integer, then

But be aware, that OpenOffice.org has only a precision of 15 digits, therefore the results for x > 21 are rounded.

See also:

GAMMALN, GAMMADIST, GAMMAINV, FACT

Mathematical functions

Statistical functions

Functions listed alphabetically, Functions listed by category

Issues:

This function is expected for OOo3.1.


BETADIST

Calculates the cumulative distribution function or the probability density function of a beta distribution.

Syntax:

BETADIST(x; α; β; low; high; cumulative)

The beta distribution is a family of continuous probability distributions, defined for an interval low to high, where α and β are parameters controlling the shape of the distribution.

For cumulative = FALSE() BETADIST calculates the probability density function


BETADIST calculates the cumulative distribution function F(x; α, β) = Ix(α, β) where x = (n-a)/(b-a) and Ix(α, β) is the regularised incomplete beta function.
a and b are optional parameters which default (if omitted) to 0 and 1.

Example:

BETADIST(0.75; 3; 4)

returns approximately 0.96.

See also:

BETAINV

Statistical functions

Functions listed alphabetically, Functions listed by category


Accuracy

Precision in Calc

Calc uses for its calculation floating point numbers in double precision as defined in IEEE 754 standard. You get the best representation in a spreadsheet cell using the scientific format with format code 0.00000000000000E+000. But because a binary format is used internally, the numbers in calculation might differ slightly from the shown decimal values. Only integers in the range can be represented exactly in the internal format.

Although you can force Calc to show 15 decimal digits, these might not be all accurate. This article lists some of the problems.

Cancellation

If you subtract two non integer numbers, which have nearly the same value, the result has less significant digits then the initial values.

A B C
1 9.99411764795882E-001 =0.999411764795882
2 9.99411764705882E-001 =1699/1700
3 8.99997854020285E-011 =A1-A2
4 8.99996470588235E-011

Cell A4 shows the correct result of , calculated with a computer algebra system with high precision.

Converting Inaccuracy

Most non integer numbers have infinite decimal places in binary format, which has to be rounded somewhere. Calculating with this rounded values and converting back to decimal format gives different values then calculating manually in decimal format.

A B C
1 0.99999876543210000000 =0.99999876543210000000
2 0.00000123456790002141 =1-A1
3
4

No Symbolic π

From mathematics you know sin(π)= 0 and you know that tan(π/2) is undefined. But you cannot get this in Calc, because the value π is always treated as rounded floating point number. It makes no difference using PI() or RADIANDS(180). Calc cannot evaluate π symbolically as computer algebra systems do. That is no special limitation of Calc, but other often used spreadsheet applications work only numerically too.

A B C
1 1.63317787283838E+016 =TAN(PI()/2)
2 1.22460635382238E-016 =SIN(RADIANS(180))
3
Personal tools