https://wiki.openoffice.org/w/api.php?action=feedcontributions&user=Kirk&feedformat=atomApache OpenOffice Wiki - User contributions [en]2020-01-25T05:11:49ZUser contributionsMediaWiki 1.23.13https://wiki.openoffice.org/wiki/User:KirkUser:Kirk2016-01-23T03:46:18Z<p>Kirk: </p>
<hr />
<div>Current user of Open Office since version 3.1 in Windows and version 3.0 in Ubuntu.<br />
<br />
<br />
https://wiki.openoffice.org/wiki/Documentation/UserGuide/Calc<br />
<br />
[[Special:Uncategorizedpages]]</div>Kirkhttps://wiki.openoffice.org/wiki/Education_ClassRoom/Previous_Logs/Hybrid_Model_of_Teaching_OpenSourceEducation ClassRoom/Previous Logs/Hybrid Model of Teaching OpenSource2009-12-31T06:24:35Z<p>Kirk: </p>
<hr />
<div>== '''Commented version of the IRC meeting''' ==<br />
<br />
<br />
<font color=blue>'''A clean commented version of the meeting can be found at : [http://flosscom.net/index.php?option=com_content&task=view&id=93 Link to the Commented version]<br />
<br />
Thanks to Andreas Meiszner for his work.'''<br />
</font><br />
<br />
<br />
== '''Original log''' ==<br />
<br />
[17:07] <andreasmeiszner> Ok, so shall we start with questions / comments on the suggested hybrid approach to SE. Thus it would be clear to all what it is about?<br />
<br />
[17:08] * ericb2 searching the links<br />
<br />
[17:08] <chacha_chaudhry> http://www.slideshare.net/andreasmeiszner/breaking-the-silence-taking-learning-online-presentation<br />
<br />
[17:08] <chacha_chaudhry> http://www.scribd.com/doc/10933440/A-HYBRID-APPROACH-TO-COMPUTER-SCIENCE-EDUCATION<br />
<br />
[17:08] <chacha_chaudhry> ericb2: ^^<br />
<br />
[17:09] <ericb2> chacha_chaudhry: thanks :)<br />
<br />
[17:09] <andreasmeiszner> thx!<br />
<br />
[17:09] <chacha_chaudhry> andreasmeiszner: I haven't gone through the approach .. may you explain briefly how it is different from common <br />
open source development model.<br />
<br />
[17:10] * wtebbens (n=wouter@ip115-58-210-87.adsl2.static.versatel.nl) has joined #education.openoffice.org<br />
<br />
[17:10] <andreasmeiszner> ok, so basically it is a open approach to courses which is dervived from the way open source communities, but also <br />
the web more in general works.<br />
<br />
[17:10] * andreasma (n=andreasm@p3E9D2296.dip.t-dialin.net) has joined #education.openoffice.org<br />
<br />
[17:11] <wtebbens> good afternoon all!<br />
<br />
[17:11] <andreasmeiszner> hi wouter, welcome!<br />
<br />
[17:11] <chacha_chaudhry> wtebbens: hello meeting has already started.<br />
<br />
[17:11] <sroy> good evening . it is 21:45 hrs here<br />
<br />
[17:11] <andreasma> hi all<br />
<br />
[17:11] <wtebbens> hi andreas, sorry I am late (and can only stay for half an hour)<br />
<br />
[17:12] <chacha_chaudhry> andreasm wtebbens: we are already following andreasmeiszner .. andreasmeiszner may we continue<br />
<br />
[17:12] <andreasmeiszner> the hybrid approach aims to bring together the different involved stakeholders (students & educators from different <br />
institutions, open source practitioners & free learners outside of formal education) within a "semi-structured" way<br />
<br />
[17:13] <andreasmeiszner> often formal education - even if about open source - follows the traditional "style": closed, isolated, disconnected, <br />
static,...<br />
<br />
[17:13] <andreasmeiszner> does this still makes sense?<br />
<br />
[17:14] <chacha_chaudhry> yep very much.<br />
<br />
[17:14] <andreasmeiszner> ok<br />
<br />
[17:14] <andreasmeiszner> so just as an example<br />
<br />
[17:14] <andreasmeiszner> "learning processess" in open source are often visible and become learning resources for many others<br />
<br />
[17:15] <andreasmeiszner> in formal education however - they are normally "lost" or disconnected from learning materials<br />
<br />
[17:15] <andreasmeiszner> so this is the learning process side that we e.g. want to adress with the hybrid approach<br />
<br />
[17:16] <andreasmeiszner> within an open environment, such as the piloted www.netgeners.net side (still just early playing), the different <br />
stakeholders might engage analogue to the way it can be seen in open source<br />
<br />
[17:17] <andreasmeiszner> therefore providing a richer learning experience, sharing the burden amongst different institutions on providing <br />
basic information and allowing e.g. that contributions to an open source student by student A could be a useful learning resource for students <br />
X,Y,Z<br />
<br />
[17:18] <andreasmeiszner> this means "semi-structured", because contributions could also be found by students XYZ, if they "search the web" - but like this it would be more convenient for them<br />
<br />
[17:18] <andreasmeiszner> uff - hope you are still with me<br />
<br />
[17:19] daeseon david_jaco<br />
<br />
[17:19] >david_jaco< : the log will be available there : <br />
http://wiki.services.openoffice.org/wiki/Education_ClassRoom/Previous_Logs/Hybrid_Model_of_Teaching_OpenSource <br />
<br />
[17:19] <chacha_chaudhry> yes<br />
<br />
[17:19] <ericb2> andreasmeiszner: sure :)<br />
<br />
[17:19] <david_jaco> sure<br />
<br />
[17:20] <fardad> yes<br />
<br />
[17:20] <wtebbens> sounds good<br />
<br />
[17:20] <andreasmeiszner> ok - such an hybrid approach should be "less" conflicting with the educational structures we are operating at<br />
<br />
[17:21] <andreasmeiszner> because teachers can still "lecture" their courses as the need to (legal constraints), yet an environment like e.g. <br />
netgeners provides a more informal collaborative space<br />
<br />
[17:22] <andreasmeiszner> such an environment could than be - step by step - improved to gradually advance ans slowly mature<br />
<br />
[17:22] <andreasmeiszner> to respect e.g. legal and cultural constraints of formal education<br />
<br />
[17:22] <andreasmeiszner> this is the sshort to medium aspect, in the long term certainly there would be much more in it<br />
<br />
[17:23] <andreasmeiszner> e.g. virtual internships, certification against for paid assessment for "free learners outside of formal education", <br />
etcetc<br />
<br />
[17:23] <andreasmeiszner> ideally all involved sides should gain<br />
<br />
[17:24] <andreasmeiszner> ok - questions? before this ends up in a monologue?<br />
<br />
[17:24] <ericb2> andreasmeiszner: no, it isn't<br />
<br />
[17:25] <ericb2> andreasmeiszner: <br />
<br />
[17:25] <ericb2> I think the Education Project is already another model of hybrid approach, because we :<br />
<br />
[17:25] <ericb2> - work with schools, and profs<br />
<br />
[17:25] <ericb2> - we are involved in the project<br />
<br />
[17:25] <ericb2> - we propose real tasks, in production mode<br />
<br />
[17:25] <ericb2> andreasmeiszner: I don't know how close are both (your hybrid approach and Education Project approach), but they look <br />
similar<br />
<br />
[17:25] <ericb2> andreasmeiszner: excepted we have no resources <br />
<br />
[17:26] <ericb2> andreasmeiszner: but both are winner-winner models<br />
<br />
[17:26] <andreasmeiszner> yes, your work is close to this - except maybe to provide a more convenient space to make students work visible <br />
and relate it as well to educational materials as to their work in open source - but in principle your work is very close<br />
<br />
[17:26] * Sowe (n=Sowe@ws017.intech.unu.edu) has joined #education.openoffice.org<br />
<br />
[17:27] <andreasmeiszner> Hello Sulayman / Sowe<br />
<br />
[17:27] <Sowe> Hello all<br />
<br />
[17:27] <Sowe> Hello Andreas<br />
<br />
[17:27] <ericb2> andreasmeiszner: I think this will improve : I met the Computing Department director saturday, and he was very enthousiast <br />
to know what we do. He even invited me to present the project asap<br />
<br />
[17:27] <andreasmeiszner> Let me shortly introduce Sulayman: he started the work at Aristotle, sending out students to open source projects<br />
<br />
[17:27] <ericb2> Sowe: be welcome :) <br />
<br />
[17:28] <wtebbens> I wonder what differences there are between the two mentioned approaches, for the fact of the having or not having <br />
resources. ericb2 and andreasmeiszner any comment?<br />
<br />
[17:28] <andreasmeiszner> eric, this is perfect. and i think what would be a good way forward is to put the concepts together and build on our <br />
current works - type of sherry picking<br />
<br />
[17:28] <wtebbens> (if I understand correctly :))<br />
<br />
[17:29] <ericb2> wtebbens: better organization from andreasmeiszner side ? More advanced state too maybe <br />
<br />
[17:29] <ericb2> andreasmeiszner: I forgot : Computing Department director of UTBM (my school)<br />
<br />
[17:29] <andreasmeiszner> but less practical experiences - by now we mainly have set up the models / structures<br />
<br />
[17:30] <andreasmeiszner> means - our work is less advanced than OO work<br />
<br />
[17:30] <Sowe> The Auth approach, now called the outside approach worked well for us and our students<br />
<br />
[17:30] <andreasmeiszner> in practical terms<br />
<br />
[17:31] <andreasmeiszner> as detailed at the paper http://www.scribd.com/doc/10933440/A-HYBRID-APPROACH-TO-COMPUTER-SCIENCE-<br />
EDUCATION<br />
<br />
[17:31] <Sowe> the limitation we found out as highlighted with the flosscom project is that the students have less opportunity to interact with <br />
the "outside word"<br />
<br />
[17:31] <andreasmeiszner> we tried to map existing approaches to be found to models<br />
<br />
[17:32] <Sowe> i think this is where the Netgeners project by Andreas comes to be very important<br />
<br />
[17:32] <andreasmeiszner> and found out that universities either send their students out (outside approach) into well established communities<br />
<br />
[17:32] <andreasmeiszner> or tried to apply the principles of virtual communities within their institution (inside approach)<br />
<br />
[17:33] <andreasmeiszner> however, the highest value would be a mix of both - the hybrid approach<br />
<br />
[17:33] <andreasmeiszner> and this is what we suggest<br />
<br />
[17:34] <Sowe> The SE education model for the outside approach can be found here: <br />
http://sweng.csd.auth.gr/~sksowe/SE%20Education%20FLOSS%20Model/<br />
<br />
[17:34] <andreasmeiszner> wtebbens: not sure if the differnce is clear?!?<br />
<br />
[17:34] <ericb2> Sowe: thanks :)<br />
<br />
[17:35] * danielbw (n=Daniel@secured2.monstertool.com) has joined #education.openoffice.org<br />
<br />
[17:35] <danielbw> ericb2, ping?<br />
<br />
[17:35] daeseon danielbw david_jaco<br />
<br />
[17:37] <ericb2> danielbw: hello<br />
<br />
[17:38] <wtebbens> andreasmeiszner: the outside and inside approaches seem intuitive to me. however I wonder in how far can learners who <br />
are not registered as students in your institution join the learning process?<br />
<br />
[17:38] <IZBot> News from cws: fwk99: nominated || macmiscfixes: nominated<br />
<br />
[17:38] * jza (n=jza@189.132.187.165) has joined #education.openoffice.org<br />
<br />
[17:38] <jza> hey ericb2<br />
<br />
[17:38] <jza> just made it<br />
<br />
[17:39] <ericb2> jza: hello. meeting ;)<br />
<br />
[17:39] <ericb2> andreasmeiszner: how do you proceed to evaluate the candidates +?<br />
<br />
[17:40] <andreasmeiszner> ericb2: which candidates?<br />
<br />
[17:40] <ericb2> andreasmeiszner: the students<br />
<br />
[17:40] <andreasmeiszner> this is done by the Aristotle team<br />
<br />
[17:40] <ericb2> andreasmeiszner: I'm not sure of the words, but thre are two types of courses : evaluative and informative<br />
<br />
[17:40] <Sowe> wtebbens: the idea is that if our students should expose and discuss their assignments (software testing, requirement analysis, <br />
coding) on the netgeners platform, other students and free learners can engage them and exchange ideas<br />
<br />
[17:41] <andreasmeiszner> http://www.slideshare.net/andreasmeiszner/open-source-software-engineering-aristotle-students-guide-<br />
english-presentation<br />
<br />
[17:41] <andreasmeiszner> at this presentation they indicate to the students how they would be eveluated<br />
<br />
[17:42] <andreasmeiszner> one aspect still missing would be "peer-review" - for which a hybrid model might allow<br />
<br />
[17:42] <ericb2> andreasmeiszner: indeed. essential <br />
<br />
[17:42] <Sowe> previously (2005 -2008) student only downloaded software from projects, reported bugs and were only in contact with their <br />
respective project communities<br />
<br />
[17:43] <ericb2> andreasmeiszner: from my side, I proposed to define a list of expected know how and so on. and the student should proof he <br />
validated every during the project <br />
<br />
[17:43] <andreasmeiszner> ericb2: yes, e.g. the netgeners page has the (joomla) commenting and ranking option that could "complement" <br />
evaluations<br />
<br />
[17:44] <andreasmeiszner> ericb2: one option would be to have A. the students work in progress and B. let them produce an outcome to be made publicly available<br />
<br />
[17:46] <ericb2> andreasmeiszner: it was an open question :) In fact, I often see the applied task (on the outside side), as the particular case. <br />
and the inside case more generic. Hot to be sure the "generic" is validated working on the outside side ?<br />
<br />
[17:47] <ericb2> andreasmeiszner: means how to be sur the student understood the concept and not solved one case only, means it's not sure <br />
he will solve another similar problem<br />
<br />
[17:49] <andreasmeiszner> ericb2: understood. yes this is a challenge. on the theoretical side I also find this approach close to what we do: <br />
http://www.helsinki.fi/science/networkedlearning/eng/delete.html<br />
<br />
[17:49] <andreasmeiszner> ericb2: The PI model applied within project based students work<br />
<br />
[17:51] <ericb2> andreasmeiszner: bookmarked. Thanks :)<br />
<br />
[17:52] <Sowe> good helsinki approach<br />
<br />
[17:52] <Sowe> many educators seems to be doing the same thing around the globe<br />
<br />
[17:53] <Sowe> Comment on evaluation<br />
<br />
[17:53] <andreasmeiszner> Sowe: yes, with many different names - but often going into the same direction<br />
<br />
[17:53] <ericb2> andreasmeiszner: as a partial answer, in the Education Project, we have choosen to delegate the evaluation to the prof <br />
managing the student. But this is just a workaround<br />
<br />
[17:54] <Sowe> Netgeners participants from auth are still students expecting grades in their project work. how will 'self evaluation' and peer review compliment their grades?<br />
<br />
[17:55] <andreasmeiszner> ericb2: regarding "workaround" - I think for the time being "workarounds" are important to slowly build up virtual <br />
learning arrangements / environments. Means to improve them based on identified NEEDS, instead of just going back to the elearning hype <br />
mistakes and designing complex systems that than won't work as hoped<br />
<br />
[17:55] <Sowe> ericb2 do you have you evaluation process discussed somewhere?<br />
<br />
[17:56] <ericb2> Sowe: I started long time ago, but so far not too much of people were interested <br />
<br />
[17:56] <ericb2> Sowe: but this will become concrete with our growing visibility <br />
<br />
[17:57] fredus froumi<br />
<br />
[17:57] <ericb2> Sowe: e.g. Ecole Centrale Nantes appreciated what we did, and we'll discuss how to improve concretely around end of March <br />
<br />
[17:58] <ericb2> Sowe: same for UTBM , more easy, because local for me :)<br />
<br />
[17:59] <ericb2> andreasmeiszner: we build everything from scratch : often the most difficult task<br />
<br />
[17:59] <ericb2> andreasmeiszner: that's the reason why I'm glad to learn of you and all other approaches<br />
<br />
[18:00] <Sowe> ok ericb2. if you have access to the OSS 2006 proceedings, i discussed our evaluation procedure<br />
<br />
[18:00] <andreasmeiszner> ericb2: Any concrete roadmap forward? regarding "from scratch" - the netgeners space is - obvioulsy - open <br />
source components and easily to identified needs<br />
<br />
[18:00] <andreasmeiszner> sorry for the english<br />
<br />
[18:00] <Sowe> or send me email and i send you some doc on some of our experience at Auth in implementing the outside approach<br />
<br />
[18:01] <ericb2> andreasmeiszner: we need help. We wrote a lot, but don't have enough of people helping. this is another problem we have <br />
<br />
[18:01] <ericb2> Sowe: I don't think I have access.<br />
<br />
[18:02] <ericb2> andreasmeiszner: the roadmap is have results with Seneca College students (11), ECN students ( 4) and UTBM students ( 4) + <br />
finalize the work a student from Epitech did<br />
<br />
[18:02] <andreasmeiszner> ericb2: what i meant is: the netgeners space consists of open source solutions, and if you don't want to start from <br />
scratch be welcome to use the space or software.<br />
<br />
[18:03] <ericb2> andreasmeiszner: we don't start from scratch. I'm used to manage projcts too (I did for the Mac port previously). What we <br />
need is more people involved. There is too much to do <br />
<br />
[18:04] <ericb2> andreasmeiszner: in the roadmap, fardad should help me soon :) <br />
<br />
[18:04] <ericb2> andreasmeiszner: and I expect other will join, to teach what we do<br />
<br />
[18:05] <fardad> andreasmeiszner: I think what you suggest is very close to what we do in seneca where students form a small community in <br />
college and do "Open WorkShops". They can use any Open resource in the world to do their tasks. When they understand how "Open Source" <br />
work in general, they join open source communites and work on real projects.<br />
<br />
[18:05] <andreasmeiszner> ericb2: do you know if someone from here be at the educamp workshop? We are currently setting up a proposal for <br />
the Erasmus call to request funding to get this work further - though the funding available is max 300k per project over 2 years (at 75%) funding <br />
rate<br />
<br />
[18:06] <ericb2> andreasmeiszner: excepted me - I have to change my plane - I don't think thre will someone else, but I hope I'm wrong :)<br />
<br />
[18:07] <ericb2> andreasmeiszner: I'm not sure to understand how OOo Education Project could be concerned, sorry <br />
<br />
[18:07] <andreasmeiszner> fardad: this seems to be very close - what I think could still be missing is to have all of those different initiatives linked in a more structured way (like netgeners / hybrid approach suggests).<br />
<br />
[18:08] <andreasmeiszner> ericb2: andreasmeiszner: I'm not sure to understand how OOo Education Project could be concerned, sorry - could you explain this please, i don't understand it<br />
<br />
[18:09] <ericb2> andreasmeiszner: yes, if I'm not wrong Erasmus is for schools, or at least official institutions, right ? <br />
<br />
[18:09] <ericb2> andreasmeiszner: we are nothing of that<br />
<br />
[18:10] <andreasmeiszner> Specific call objective: 2.2.2. Projects focusing on cooperation between higher education institutions and <br />
enterprises<br />
<br />
[18:10] <ericb2> andreasmeiszner: the only official thing we have around is the non profit association, allowing us to manipulate money<br />
<br />
[18:10] <Sowe> My sincere apology for leaving this very interesting discussion....i have an appointment now<br />
<br />
[18:10] <andreasmeiszner> see ya sulayman!<br />
<br />
[18:10] <ericb2> Sowe: the log will be available there : <br />
http://wiki.services.openoffice.org/wiki/Education_ClassRoom/Previous_Logs/Hybrid_Model_of_Teaching_OpenSource<br />
<br />
[18:10] <ericb2> (partial log for now of course :)<br />
<br />
[18:10] <Sowe> Andreas: hopefully we should this kind of session again.<br />
<br />
[18:10] * fredus has quit (Read error: 110 (Connection timed out))<br />
<br />
[18:11] <ericb2> Sowe: you're welcome :)<br />
<br />
[18:11] <Sowe> ah thanks ericb2 for the logs<br />
<br />
[18:11] <jza> for log porpouses can someone list the conclusion<br />
<br />
<br />
[18:11] <Sowe> bye for now<br />
<br />
[18:11] <ericb2> Sowe: bye <br />
<br />
[18:12] <jza> it would be easier now that the information is still fresh<br />
<br />
[18:12] * Sowe has quit ("Leaving")<br />
<br />
[18:12] <andreasmeiszner> jza: I think we haven't summed it up yet (but should do)<br />
<br />
[18:15] <andreasmeiszner> From my side two conclusions would be A. to see if the open office educational projects and the netgeners / hybrid <br />
idea could be aligned. E.g. also Mozilla is working in the same direction https://wiki.mozilla.org/Foundation:Planning:Education<br />
<br />
[18:16] * Eleni (i=econst@sweng10.csd.auth.gr) has joined #education.openoffice.org<br />
<br />
[18:16] * ericb2 thinks the presentation is extremely important, because available documents are a good starting point<br />
<br />
[18:16] <ericb2> Eleni: hello :)<br />
<br />
[18:16] <andreasmeiszner> IMO there is much room to avoid duplicate work, look for common grounds,save resources and create triple win <br />
scenarios<br />
<br />
[18:16] <Eleni> hello!<br />
<br />
[18:16] <ericb2> andreasmeiszner: exactly. We can save years <br />
<br />
[18:16] <andreasmeiszner> hi eleni!<br />
<br />
[18:16] <Eleni> i am sorry for the delay<br />
<br />
[18:17] <andreasmeiszner> no prob<br />
<br />
[18:17] <ericb2> andreasmeiszner: I'll do my best to attend the Camp <br />
<br />
[18:17] >Eleni< the log is there : <br />
http://wiki.services.openoffice.org/wiki/Education_ClassRoom/Previous_Logs/Hybrid_Model_of_Teaching_OpenSource<br />
<br />
[18:18] <andreasmeiszner> and B. would be (in the case there is a common ground) to put in a joint project proposal for funding - Erasmus call <br />
would be the first option, but likely further to come<br />
<br />
[18:18] <andreasmeiszner> so we would have a better (financial) base - because by now also our work is "non-funded"<br />
<br />
[18:20] * katerina (i=katerina@swengpc5.csd.auth.gr) has joined #education.openoffice.org<br />
<br />
[18:20] <katerina> hello<br />
<br />
[18:20] <ericb2> katerina: hello :)<br />
<br />
[18:20] <katerina> sorry for the delay<br />
<br />
[18:20] <jza> hi katerina<br />
<br />
[18:20] >katerina< : FYI the log is there : <br />
http://wiki.services.openoffice.org/wiki/Education_ClassRoom/Previous_Logs/Hybrid_Model_of_Teaching_OpenSource<br />
<br />
[18:20] <andreasmeiszner> hi katerina!<br />
<br />
[18:21] <andreasmeiszner> Katerina & Eleni are from the Aristotl course team btw. They continue the work that Sowe started<br />
<br />
[18:21] * jza_ (n=jza@189.132.187.165) has joined #education.openoffice.org<br />
<br />
[18:22] <andreasmeiszner> @all: further sum up suggestions?<br />
<br />
[18:22] <ericb2> In the conclusion, things are clear for me: we should really take care to avoid duplicated efforts<br />
<br />
[18:22] <ericb2> the reflexion is imho enough advanced, and it's time for choose / stick to a model , or at least define rules to work together <br />
<br />
[18:22] <fardad> amen to that...<br />
<br />
[18:24] <david_jaco> I have to leave, but I'll check the wiki and documents, there's certainly room for collaboration with some of the projects <br />
we're working on<br />
<br />
[18:24] <david_jaco> see you all!<br />
<br />
[18:24] <ericb2> david_jaco: see you :)<br />
<br />
[18:24] <andreasmeiszner> ericb2: I agree as there is no added value for no side. Also: whichever "virtual solution" chosen is fine for me - but I <br />
think that it should not be a one to many approach (e.g. one university to several open source projects, or several universities to one open source projects) - max value would be a many to many solution<br />
<br />
[18:24] <andreasmeiszner> by david!<br />
<br />
[18:25] * david_jaco has quit ("Ex-Chat")<br />
<br />
[18:26] <ericb2> another question nobody asked. what is the most interesting ? create OpenOffice.org developers from inside or from outside <br />
the OpenOffice.org project. So far this is a uniq case for me<br />
<br />
[18:26] <andreasmeiszner> ericb2: ? sorry, I am lost on this?<br />
<br />
[18:26] <ericb2> fardad: if I'm not wrong, the Seneca college is not Mozila , isn't it ?<br />
<br />
[18:26] <fardad> ericb2: Oh, now I got it,<br />
<br />
[18:27] <ericb2> andreasmeiszner: OpenOffice.org Education Project aims to find developers, and teahc them everything. At least that's what I <br />
do for all the students I mentored<br />
<br />
[18:27] <fardad> no, seneca works Most activly with Mozilla, then Fedora, IBM Eclipse and then OOo<br />
<br />
[18:27] <ericb2> andreasmeiszner: so far, only OpenOffice.org does that. My question was : is it a good thing ?<br />
<br />
[18:28] * fredus (n=fredus@ip-166.net-80-236-11.asnieres.rev.numericable.fr) has joined #education.openoffice.org<br />
<br />
[18:28] <ericb2> fardad: here it is one to one<br />
<br />
[18:28] <andreasmeiszner> ericb2: it is clear to me that each open source project is looking for ways to get in contributers, but yet I think a <br />
common (many to many) approach has more to offer - at least if all sides are to win<br />
<br />
[18:30] <andreasmeiszner> ericb2: so what would be the way forward? meeting at educamp, if you can make it?<br />
<br />
[18:31] <ericb2> andreasmeiszner: this is an important point, indeed. When we discussed the point some times ago, the reason we found was: <br />
there is so much of code in OpenOffice.org that you can do approximatively everything <br />
<br />
[18:31] <ericb2> andreasmeiszner: I'll try <br />
<br />
[18:31] <ericb2> andreasmeiszner: once sure, I'll tell you <br />
<br />
[18:31] <ericb2> andreasmeiszner: not siple to change a plane once booked <br />
<br />
[18:31] <ericb2> simple<br />
<br />
[18:31] <andreasmeiszner> ericb2: ok, alternative ways forward?<br />
<br />
[18:32] <ericb2> andreasmeiszner: meeting at educamp is imho the best <br />
<br />
[18:32] <ericb2> andreasmeiszner: because lot of other proposals will be presented I guess <br />
<br />
[18:33] <fardad> ok, i think I missed it, educamp?<br />
<br />
[18:33] <ericb2> fardad: Mozilla organizes an Educamp in Bruxelles the 6th of february <br />
<br />
[18:33] <andreasmeiszner> fardad: Events/EduCamp@FOSDEM2009 - MozillaWiki<br />
<br />
[18:33] <andreasmeiszner> sorry<br />
<br />
[18:33] <fardad> I see...<br />
<br />
[18:33] <andreasmeiszner> https://wiki.mozilla.org/Events/EduCamp@FOSDEM2009<br />
<br />
[18:34] <ericb2> fardad: Mark surman announced me that 10 minutes after I booked my plane :/<br />
<br />
[18:35] <andreasmeiszner> fardad: This event should be a good opportunity to reflect on way forwards and as it looks a diverse number of <br />
people would be present<br />
<br />
[18:36] <fardad> I see<br />
<br />
[18:38] <ericb2> Other questions ? <br />
<br />
[18:38] <andreasmeiszner> so, to sum it up: we try meeting at educamp to discuss ways forward, in the case this won't work - what is the plan <br />
b?<br />
<br />
[18:39] <ericb2> andreasmeiszner: when will you quit Bruxelles ?<br />
<br />
[18:39] <fardad> Well, I'll read about it :)<br />
<br />
[18:39] <andreasmeiszner> ericb2: i will arrive on the 6th at 9.00 and leave on - let me check<br />
<br />
[18:40] <andreasmeiszner> ok, flight back is on the 7th at 11.45<br />
<br />
[18:41] <ericb2> andreasmeiszner: oops, will be difficult. So I must change my plane. I'll try asap <br />
<br />
[18:41] <ericb2> andreasmeiszner: oops, will be difficult. So I must change my plane. I'll try asap <br />
<br />
[18:42] <andreasmeiszner> ericb2: ok, so let me know - if not we can come up with a plan b<br />
<br />
[18:43] <ericb2> andreasmeiszner: yes, as I said, I'll try asap. Say in 10 minutes <br />
<br />
[18:43] <andreasmeiszner> Wouter / Eleni / Katerina - is there still anything from your side?<br />
<br />
[18:43] <andreasmeiszner> ericb2: ok<br />
<br />
[18:44] <jza_> conference call might be a good way to further this without relying on an event IMHO<br />
<br />
[18:44] <fardad> jza_: agreed...<br />
<br />
[18:45] <fardad> cheers...<br />
<br />
[18:45] <ericb2> jza_: this event is very close and extremely important. Anyway, I'll notice everything<br />
<br />
[18:45] * fardad is now known as fardad_afk<br />
<br />
[18:45] jza jza_<br />
<br />
[18:45] <ericb2> jza_: and FYI, I'll have to pay a supplement to change my plane. Nobody will fund that <br />
<br />
[18:45] <andreasmeiszner> jza_: conference call could be a plan b - or follow up after the educamp<br />
<br />
[18:46] <katerina> no<br />
<br />
[18:47] <andreasmeiszner> jza_: if you want we can use the Open University's flashmeeting videoconferencing system - sessions can also be recorded, so others could watch them later<br />
<br />
[18:50] <jza_> andreasmeiszner: I think is a very viable and cheap way to move on this affairs<br />
<br />
End of meeting<br />
<br />
<br />
[[category:Education/Classroom]]</div>Kirkhttps://wiki.openoffice.org/wiki/Education_ClassRoom/Previous_LogsEducation ClassRoom/Previous Logs2009-12-31T06:23:14Z<p>Kirk: </p>
<hr />
<div>== Previous Logs ==<br />
<br />
<br />
[[Education_ClassRoom/Previous Logs/MercurialMigration | '''OpenOffice.org Mercurial migration''' ( Heiner Rechtien, 11th of November 2009 ) ]]<br />
<br />
[[Education_ClassRoom/Previous Logs/git | '''Introduction to git''' ( Jérémie Laval, 11th of June 2009 ) ]]<br />
<br />
[[Education_ClassRoom/Previous Logs/Hybrid_Model_of_Teaching_OpenSource | '''Hybrid Model of Teaching OpenSource''' ( Andreas Meiszner, 26th of January 2009 ) ]]<br />
<br />
[[Education_ClassRoom/Previous Logs/OpenOffice.org_Coding_Guidelines | '''OOo Coding Guidelines''' ( Thorsten Behrens, 13rd of November 2008 ) ]]<br />
<br />
[[Education_ClassRoom/Previous Logs/OOo_svn_migration | '''OOo migration to svn''' ( Heiner Rechtien, 8th of October 2008 ) ]]<br />
<br />
[[Education_ClassRoom/Previous Logs/be_warning_free | '''Write warning free code''' ( Eric Bachard, 26th of July 2008 ) ]]<br />
<br />
[[Education_ClassRoom/Previous Logs/cwstooling_part1 | '''CWS Tools (part 1)''' ( Eric Bachard, 28th of June 2008 ) ]]<br />
<br />
[[Education_ClassRoom/Previous Logs/framework_part1 | '''Framework Project (part 1) ''' ( Mathias Bauer 3rd June 2008) ]]<br />
<br />
[[Education_ClassRoom/Previous Logs/gsl | '''GSL Project ''' ( Philipp Lohmann 21st May 2008) ]]<br />
<br />
[[Education_ClassRoom/Previous Logs/tinderboxes| '''All about tinderboxes''' ( Christian Lohmaier 19th May 2008) ]]<br />
<br />
[[Education_ClassRoom/Previous Logs/Introduction| '''OpenOffice.org Development Introduction''' ( Eric Bachard 7th May 2008) ]]<br />
<br />
<br />
[[category:Education/Classroom]]</div>Kirkhttps://wiki.openoffice.org/wiki/Education_ClassRoom/PracticeEducation ClassRoom/Practice2009-12-31T06:22:28Z<p>Kirk: </p>
<hr />
<div>Draft<br />
<br />
<font color=red>Since we use subversion, some parts are obsolete, and need to be updated</font><br />
<br />
Objective : create exercices, to practice OpenOffice.org tools used for development<br />
<br />
TODO : define a list of items<br />
<br />
== Join the Project ==<br />
<br />
=== Login and accounts ===<br />
<br />
* Create your login on the OpenOffice.org wiki<br />
* Become member of Education Project, using the Education Project wiki page : http://wiki.services.openoffice.org/wiki/Education_Project<br />
<br />
=== Find a page or a document === <br />
<br />
* Find the web page for your own locale in OpenOffice.org project ( e.g. nl.openoffice.org )<br />
* Find the OpenOffice.org Coding Guidelines on the Wiki ( and read it ... )<br />
* Find the page about cws ( Child Workspace )<br />
* Find dev@gsl.openoffice.org mailing list archive<br />
* Subscribe to dev@education.openoffice.org mailing list if you didn't yet<br />
* Extract mails 10 to 14 from any mailing list<br />
<br />
<br />
=== Bonsai use === <br />
<br />
* Discover Bonsai<br />
* Visualize changes in a cws<br />
1) Go to http://bonsai.go-oo.org/cvsqueryform.cgi<br />
<br />
We'll try to do a request :)<br />
<br />
2) Don't modify Module (must be All files in the repository ) Remark : note the name "repository "<br />
<br />
3) In the Field "Branch" replace HEAD with cws_dev300_aquavcl07<br />
<br />
4) in the field "Date" check "Since the beginning of time "<br />
<br />
5) do not modify the other fields<br />
<br />
6) Click "Run Query"<br />
<br />
=> all the changes in the code, based on DEV300_m9 ( we'll explain later) are on the page !!<br />
<br />
7) To see the diff for any commit, click in the Rev. columns. Back to retrieve the current page.<br />
<br />
Strongly advised : 8) Look carefully at other changes, what information you can obtain here.<br />
<br />
Remark: Bonsai helps when you are searching for changes in the code, author date .. precise information about CODE<br />
<br />
=== SVN use ===<br />
<br />
[[User:Ericb|Ericb]] 16:53, 17 February 2009 (UTC)<br />
<br />
==== Outline of the ClassRoom ====<br />
<br />
1) Create patches using svn <br />
<br />
2) apply a patch <br />
<br />
3) rebuild a module<br />
<br />
4) rebuild a module including symbols<br />
<br />
5) run OOo with gdb (introduction of gdb use)<br />
<br />
<br />
Introduction : in this part, we will create, apply patches using svn tool. To simplify, we'll suppose the patches are in unified mode. Means:<br />
<br />
- 3 lines of context before the change<br />
<br />
- a line who starts with " - " means the line before the old version (if the old version was existing)<br />
<br />
- a line starting with " + " means after the change(s), if a new version does exist<br />
<br />
- 3 lines of context after the change<br />
<br />
<br />
For example :<br />
<br />
ordinateur-de-eric-b-2:~/Desktop/ecntablet01 ericb$ svn diff sd/source/ui/slideshow/slideshow.hrc<br />
<pre><br />
Index: sd/source/ui/slideshow/slideshow.hrc<br />
===================================================================<br />
--- sd/source/ui/slideshow/slideshow.hrc (revision 267130)<br />
+++ sd/source/ui/slideshow/slideshow.hrc (working copy)<br />
@@ -38,8 +38,10 @@<br />
#define CM_SCREEN_BLACK 5<br />
#define CM_SCREEN_WHITE 6<br />
#define CM_ENDSHOW 7<br />
-#define CM_FIRST_SLIDE 8<br />
-#define CM_LAST_SLIDE 9<br />
-#define CM_SLIDES 10<br />
+#define CM_ERASE_ALLINK 8<br />
+#define CM_ERASE_INK 9<br />
+#define CM_FIRST_SLIDE 10<br />
+#define CM_LAST_SLIDE 11<br />
+#define CM_SLIDES 12<br />
<br />
#endif<br />
</pre><br />
<br />
==== Create patches using svn ====<br />
<br />
Lot of possibilities. Below some of them. Probably better solutions do exist. This is just a little inventory of the possibilities.<br />
<br />
* you got a tree, did some modifications, and you want to send the patch to a friend <br />
<br />
=> The idea is to compare your current tree with the one *before* the changes.<br />
<br />
<br />
To visualize the changes : <br />
ordinateur-de-eric-b-2:~/Desktop/moz2seamonkey01 ericb$ svn diff slideshow/source/inc/userpainteventhandler.hxx<br />
<br />
The command (without the prompt) is :<br />
<br />
svn diff slideshow/source/inc/userpainteventhandler.hxx<br />
<br />
The result is :<br />
<pre><br />
Index: slideshow/source/inc/userpainteventhandler.hxx<br />
===================================================================<br />
--- slideshow/source/inc/userpainteventhandler.hxx (revision 267652)<br />
+++ slideshow/source/inc/userpainteventhandler.hxx (working copy)<br />
@@ -53,6 +53,9 @@<br />
virtual ~UserPaintEventHandler() {}<br />
<br />
virtual bool colorChanged( RGBColor const& rUserColor ) = 0;<br />
+<br />
+ virtual bool eraseAllInkChanged(bool const& rEraseAllInk) =0;<br />
+ virtual bool eraseInkChanged(bool const& rEraseInk) =0;<br />
virtual bool disable() = 0;<br />
};<br />
</pre><br />
<br />
To create the patch for true, the command is :<br />
svn diff slideshow/source/inc/userpainteventhandler.hxx > my pretty patch.diff <br />
<br />
And " my_pretty_patch.diff " will contain the same.<br />
<br />
<br />
<br />
* you want to create a patch between a cws and a milestone (the one the cws is based on )<br />
<br />
For example, to extract the changes in helpcontent2, ab65 introduced<br />
<br />
svn diff http://svn.services.openoffice.org/ooo/tags/DEV300_m35/helpcontent2 http://svn.services.openoffice.org/ooo/cws/ab65/helpcontent2 > mydiff.diff<br />
<br />
<br />
<br />
* you want to create a patch between two svn revisions for a given cws <br />
<br />
<br />
IMPORTANT: you can follow the recent commits there : http://cia.vc/stats/project/OOo<br />
<br />
Example of change (in one line) : <br />
<br />
svn diff http://svn.services.openoffice.org/ooo/cws/ooo31gsl2/vcl@268180 http://svn.services.openoffice.org/ooo/cws/ooo31gsl2/vcl@268182<br />
<br />
<br />
* using svn log, you want to create the diff between two revisions of the same file <br />
<br />
For example :<br />
<br />
ordinateur-de-eric-b-2:~/Desktop/moz2seamonkey01 ericb$ svn log configure.in<br />
Enter passphrase for key '/Users/ericb/.ssh/id_dsa_ooo_svn': <br />
------------------------------------------------------------------------<br />
r267684 | ericb | 2009-02-12 18:13:52 +0100 (Thu, 12 Feb 2009) | 1 line<br />
<br />
#i94628# fix a path issue for finding seamonkey01 <br />
------------------------------------------------------------------------<br />
r267656 | ericb | 2009-02-12 14:13:21 +0100 (Thu, 12 Feb 2009) | 1 line<br />
<br />
#i94628# other missing changes for Windows<br />
<br />
==== Apply a patch ====<br />
<br />
Essential options :<br />
<br />
--dry-run : fakes the patch application *extremely usefull* if you want to check whether a patch will apply, without create garbage in your tree<br />
<br />
-R : reverse it -> we suppose you already applied the patch, did no change and want to reverse the patch, to retrieve the same code as before<br />
<br />
-p0 : apply a patch using the exact path the files have. Important: your tree does match with the path of the file the patch will be applied, *AND* <br />
you apply it form the right location<br />
<br />
-p1 : you remove the first subdir of the path for every to be patched file listed in th patch<br />
<br />
<br />
Correct way of application :<br />
<br />
Fake the application :<br />
<br />
patch --dry-run -p0 < my_patch.diff <br />
<br />
If nothing wrong occurs :<br />
<br />
patch -p0 < my_patch.diff<br />
<br />
<br />
Other possibility, not recommended because of the UUOC (useless use of cat) : <br />
<br />
cat my_patch.diff | patch -p0<br />
<br />
<br />
Depth of the application:<br />
<br />
e.g. let's suppose a patch has to modify :<br />
<br />
vcl/source/aqua/source/window/salframeview.mm<br />
vcl/source/aqua/source/gdi/salprn.cxx<br />
vcl/source/aqua/inc/salframeview.h<br />
<br />
<br />
You can :<br />
<br />
apply the patch from <br />
<br />
* the root of the sources : <br />
<br />
patch -p0 < my_patch.diff<br />
<br />
* inside vcl :<br />
<br />
patch -p1 < my_patch.diff<br />
<br />
* inside vcl/aqua <br />
<br />
patch -p2 < my_patch.diff<br />
<br />
<br />
You cannot apply patch from elsewhere, because the paths will no longer match with the one every of the file contained in it.<br />
<br />
<br />
* mix of applying patches + svn use <br />
<br />
e.g. you did a wrong change in a module, and you want to reverse it directly :<br />
<br />
cd module<br />
<br />
svn diff apath/afile.cxx | patch -R -p0 <br />
<br />
for the entire local tree :<br />
<br />
svn diff . | patch -R -p0 <br />
<br />
<br />
==== Rebuild a module where a patch has been applied ====<br />
<br />
* Introduction <br />
<br />
We suppose we modified some files, and we need to rebuild a lib. The scheme is always the same, in every module concerned by the build. <br />
<br />
- the first prj/build.lst does contain the modules dependencies, means all the listed modules are prerequisites<br />
- everything built inside a module is put in type_os_proc.pro<br />
<br />
e.g. on Mac OS X, type == unx , os == macx , I for Intel -> output dir is unxmacxi.pro<br />
<br />
Note: have a look in solenv/inc -> all the possible arch/os have their own makefile, containing the essential for the build.<br />
<br />
<br />
The last modification date is used to check the dependencies.<br />
<br />
Rule : If a .o is older than it's depenencies, it is rebuild<br />
-> once you modified a file ( touch file is enough) , build in a module will create a new lib<br />
<br />
* rebuild libvclmxi.dylib on Mac ( .so on Linux, .dll on Windows )<br />
<br />
Hypothesis : we suppose the build is completed, and successfull.<br />
<br />
cd vcl <br />
touch aqua/source/gdi/sallayout.cxx<br />
build<br />
<br />
If you are in aqua/source/gdi , and you want to rebuild *only* the files listed in the makefile in the current dir, do :<br />
<br />
dmake killobj<br />
build<br />
<br />
Once done, and if you want to see the changes packaged, :<br />
<br />
deliver <br />
cd ../instsetoo_native<br />
build # will rebuild a new installset<br />
<br />
Else, if you just want to test your lib, put it in the right subdir <br />
(probably in <Install_dir>/OpenOffice.org.app/Contents/basis-link/program on Mac OS X )<br />
<br />
<br />
==== Build including symbols ====<br />
<br />
Example <br />
<br />
-> in vcl <br />
<br />
cd vcl<br />
mv unxmacxi.pro unxmacxi.pro_back # keep the normal build<br />
build debug="a_non_empty_sting" # means " build debug=t " is ok <br />
<br />
The final lib, including symbols for debugging, will be in unxmacxi.pro/lib (on Mac OS X )<br />
<br />
Replace the one already in <Install_dir>/OpenOffice.org.app/Contents/basis-link/program on Mac OS X<br />
<br />
To debug using gdb,do :<br />
<br />
cd <Install_dir>/OpenOffice.org.app/Contents/program<br />
<br />
gdb --args soffice apath/afile <br />
<br />
"r" (to start) .. and so on;<br />
<br />
Happy debugging !<br />
<br />
=== gdb basics ===<br />
<br />
FIXME : make the look of the log more .. appealing ;)<br />
<br />
Candidates ?<br />
<br />
TODO : add my document providing the most usefull gdb commands<br />
<br />
<font color=blue>Outline of the ClassRoom</font><br />
<br />
* Prerequisites for the test<br />
* Reminder about what happens when building in a module<br />
* Add symbols in a library<br />
* Introduction of gdb use <br />
* Launch OOo using gdb <br />
* Play with it (discovery)<br />
<br />
<br />
[18:05] ericb2 So today, we'll start playing with gdb + Ooo <br />
<br />
[18:05] ericb2 who does have a full OOo build at hand ?<br />
<br />
[18:06] ericb2 ok :)<br />
<br />
[18:06] ericb2 As pre-requisites , I'll suppose :<br />
<br />
[18:06] ericb2 - there is a complete build working already <br />
<br />
[18:06] ericb2 - there is a working installset , and we will launch it using the terminal <br />
[18:06] ericb2 Thus, if you want to redo at home, or later, you just have to read and try <br />
<br />
[18:07] ericb2 Reminder : what happens when something is built <br />
<br />
[18:07] ericb2 we'll use <module> for whatever subdir of the OOo tree, aka "module" most of the time <br />
<br />
[18:08] ericb2 <module>/prj/build.lst does contain the list of the subdirs containing a makefile <br />
<br />
[18:08] ericb2 Means: Every product is built in the output dir. e.g. : unxmacxi.pro on Mac Intel<br />
<br />
[18:08] ericb2 we have the same tree inside all the modules: <br />
<br />
[18:08] ericb2 unxmacxi.pro/bin<br />
<br />
[18:09] ericb2 unxmacxi.pro/lib<br />
<br />
[18:09] ericb2 unxmacxi.pro/inc <br />
<br />
[18:09] ericb2 ... and so on (look yourself )<br />
<br />
[18:09] ericb2 to rebuild a module, just remove this directory <br />
<br />
[18:09] ericb2 Once all the .o are build, the libs, and/or the binaries / resources / whatever are "delivered" from the unxmacxi.pro dir to <br />
the solver<br />
<br />
[18:11] ericb2 The information providing the list of what has to be delivered is always in : <module>/prj/d.lst <br />
<br />
[18:12] ericb2 these files are text files, using a "Windows" separator, but this is not a problem at all <br />
<br />
[18:12] * l_zahir (n=chatzill@142.204.16.10) has joined #education.openoffice.org<br />
<br />
[18:13] ericb2 If we summarize : a normal build provides binaries like libraries, who are stripped when the are delivered. Between the <br />
unxmacxi.pro and their place in the "solver "<br />
<br />
[18:14] ericb2 Important: to be able to trace using gdb, we'll need to add symbols, lines of code and a lot of information inside the binaries<br />
<br />
[18:14] ericb2 Howto add symbols in a library ? <br />
<br />
[18:14] ericb2 1) first approach<br />
<br />
[18:15] ericb2 -> look at configure extra option : --disable-strip-solver<br />
<br />
[18:15] ericb2 To verify by yourself, just place you at the root of the sources (since DEV300_m40, there is no longer config_office subdir) <br />
<br />
[18:15] ericb2 and do : ./configure --help | grep -4 solver<br />
<br />
[18:16] ericb2 you'll have several lines explaining the right option <br />
<br />
[18:16] ericb2 Tip : if you're familiar with configure, better read configure itself, more informative ;-)<br />
<br />
[18:17] ericb2 and if you know a bit of autoconf, you can even hack configure.in, and run autoconf to regenerate a new configure :)<br />
<br />
<br />
[18:18] ericb2 The first approach has a drawback : just a bit of information is inside the binary, and that's not enough most of the time, <br />
<br />
when you have a complex problem to solve<br />
<br />
<br />
<br />
[18:19] ericb2 2) second approach <br />
<br />
[18:19] ericb2 consider only a part of the code, for tracing <br />
<br />
[18:20] ericb2 The method is equivalent to use --enable-debug at configure time, but nobody uses this option. the reason is simple : all <br />
libraries become huges, and OOo won't probably launch correctly. <br />
<br />
[18:21] ericb2 e.g. : the libsw (writer) becomes 660MB heavy <br />
<br />
[18:22] fardad ericb2: when you say correctly, does it mean it will be too slow, or it will not function properly?<br />
<br />
[18:22] Kamots wow, that's a lot of extra weight<br />
<br />
[18:23] ericb2 fardad: yes, imagine 10 libs of 500MB every + some other 100MB and so on <br />
<br />
[18:23] ericb2 Kamots: I'll explain you how to proceed <br />
<br />
[18:23] fardad wow, :o<br />
<br />
[18:24] ericb2 Other important information <br />
<br />
[18:24] ericb2 about assertions <br />
<br />
[18:24] ericb2 There is another option in configure <br />
<br />
[18:24] ericb2 --enable-dbgutil<br />
<br />
[18:25] ericb2 Include additional debugging utilities, such assertions, object counting, etc. Larger build.<br />
<br />
[18:25] ericb2 Independent from --enable-debug<br />
<br />
[18:25] ericb2 the *second one* does concern assertions in the code :<br />
<br />
[18:25] ericb2 DBG_ASSERT( !(rALR.flags & kATSGlyphInfoTerminatorGlyph), <br />
<br />
[18:25] ericb2 "ATSLayout::InitGIA(): terminator glyph not marked as deleted!" ); <br />
<br />
[18:26] ericb2 -> if the condition is not verified -> boom .. and a window will appear, containing the message<br />
<br />
[18:26] ericb2 if --enable-dbgutil is not in the configure command line, assertions are not included<br />
<br />
[18:27] ericb2 As you understood, assertions are for development, not for end users ;-)<br />
<br />
[18:27] ericb2 So, we use to add symbols for debugging for some libs, in a given module only <br />
<br />
[18:27] ericb2 Counterpart : needs to rebuild the module <br />
<br />
[18:28] ericb2 The process is very simple :<br />
<br />
[18:28] ericb2 cd <module> <br />
<br />
[18:28] ericb2 mv unxmacxi.pro unxmacxi.pro_backup<br />
<br />
[18:28] ericb2 build debug=t<br />
<br />
[18:28] ericb2 Do *always* a backup of your build, because the binaries in the output tree, do match with stamps in the solver<br />
<br />
[18:29] ericb2 if you modify something, you'll have to redo a build, and a "deliver". Elser, the build can break at postprocess, or at then end, <br />
because the stamp between the solver and the module do not match<br />
<br />
[18:29] ericb2 that's just harmless, but if you are not aware, you can lose a while before someone explains you what happens <br />
<br />
[18:31] ericb2 As example, I'll rebuild a little lib , to show you the difference <br />
<br />
[18:31] ericb2 cd apple_remote/<br />
<br />
[18:32] ericb2 source ../MacOSXX86Env.Set.sh<br />
<br />
[18:32] ericb2 sorry, I forgot :-)<br />
<br />
[18:32] ericb2 mv unxmacxi.pro unxmacxi.pro_back<br />
<br />
[18:32] ericb2 build debug=t<br />
<br />
[18:32] ericb2 Important: whatever you put, will work <br />
<br />
[18:33] ericb2 t is one letter, but once the string is not empty, debug is true <br />
<br />
[18:33] ericb2 means all the code included between #ifdef DEBUG ... #endif or some other macros, will be included <br />
<br />
[18:34] ericb2 e.g. :<br />
<br />
[18:34] ericb2 #ifdef DEBUG <br />
<br />
[18:34] ericb2 // debug purpose <br />
<br />
[18:34] ericb2 NSLog(@"reset... (after listening to remote)"); <br />
<br />
[18:34] ericb2 #endif <br />
<br />
[18:34] ericb2 -> in the terminal, I'll see the information<br />
<br />
[18:34] ericb2 NSLog is sort of cout <br />
<br />
[18:35] fardad ic,<br />
<br />
[18:35] ericb2 After the rebuild :<br />
<br />
[18:35] ericb2 ls -l unxmacxi.pro/lib/libAppleRemotemxi.dylib<br />
<br />
[18:35] * lgodard has quit ("Leaving.")<br />
<br />
[18:35] ericb2 -rwxr-xr-x 1 ericb ericb 159932 Feb 19 18:31 unxmacxi.pro/lib/libAppleRemotemxi.dylib<br />
<br />
[18:35] ericb2 ls -l unxmacxi.pro_back/lib/libAppleRemotemxi.dylib<br />
<br />
[18:36] ericb2 -rwxr-xr-x 1 ericb ericb 52436 Feb 12 14:31 unxmacxi.pro_back/lib/libAppleRemotemxi.dylib<br />
<br />
[18:37] ericb2 the first one does contain strings and a lot of other stuff<br />
<br />
[18:37] ericb2 Now .. Launch OOo in a terminal :)<br />
<br />
[18:37] ericb2 before, we'll copy the lib in the bundle <br />
<br />
[18:37] IZBot News from cws: native227: created<br />
<br />
[18:38] ericb2 For the rest, my bundle is in the Desktop/test_eraser folder (I'm on Mac OS X )<br />
<br />
[18:38] ericb2 Means, the Bundle is the dir : ~/Desktop/test_eraser/OpenOffice.org.app<br />
<br />
[18:38] ericb2 So, I'll open a terminal, and I'll do :<br />
<br />
[18:39] ericb2 cd ~/Desktop/test_eraser/OpenOffice.org.app/Contents/program <br />
<br />
[18:39] ericb2 the idea, is to start gdb form the directory containing soffice (the binary )<br />
<br />
[18:39] ericb2 and the command line is :<br />
<br />
[18:40] ericb2 gdb --args ~/Desktop/est.odp<br />
<br />
[18:40] ericb2 you'll see gdb tell you a lot of things. If you don't want to see that the next time, you can add -q (for quiet) option <br />
<br />
[18:41] ericb2 as you can see nothing happens :)<br />
<br />
[18:41] ericb2 the reason is: the binary is not "running" <br />
<br />
[18:42] ericb2 oops, sorry <br />
<br />
[18:42] ericb2 gdb --args soffice ~/Desktop/est.odp<br />
<br />
[18:42] ericb2 is the right command line<br />
<br />
[18:42] ericb2 to redo; just enter "q" <br />
<br />
[18:42] ericb2 and type the correct command<br />
<br />
[18:43] ericb2 now, type r ( shortcut for "run" )<br />
<br />
[18:43] ericb2 -> OOo will start <br />
<br />
[18:43] ericb2 and open the file <br />
<br />
[18:44] ericb2 in the terminal, you no longer have the control. To stop the execution, do "CTRL-C" <br />
<br />
[18:44] ericb2 Program received signal SIGINT, Interrupt.<br />
<br />
<br />
[18:44] ericb2 0x90009cd7 in mach_msg_trap ()<br />
<br />
[18:44] ericb2 (gdb) <br />
<br />
[18:44] ericb2 OOo is stopped<br />
<br />
[18:44] ericb2 you can enter whatever command, like " info frame "<br />
<br />
[18:45] ericb2 to continue, type : c<br />
<br />
[18:45] ericb2 The result is : (gdb) c<br />
<br />
[18:45] ericb2 Continuing.<br />
<br />
[18:45] ericb2 and OOo is no longer stopped<br />
<br />
[18:45] ericb2 Add a breakpoint <br />
<br />
[18:45] fardad amazing...<br />
<br />
[18:46] ericb2 fardad: I know this is difficult like that, but people will redo later, and ask whenever they want <br />
<br />
[18:46] ericb2 on the channel <br />
<br />
[18:46] ericb2 we'll explain them <br />
<br />
[18:46] fardad I understand<br />
<br />
[18:47] ericb2 Let's add a breakpoint now<br />
<br />
[18:47] ericb2 to know whether breakpoints are set or not, the command is :<br />
<br />
[18:47] ericb2 info b <br />
<br />
[18:47] ericb2 (means info breakpoints)<br />
<br />
[18:48] ericb2 exactly : <br />
<br />
[18:48] ericb2 CTRL-C <br />
<br />
[18:48] ericb2 info b<br />
<br />
[18:48] ericb2 The result is :<br />
<br />
[18:48] ericb2 (gdb) info b<br />
<br />
[18:48] ericb2 No breakpoints or watchpoints.<br />
<br />
[18:48] ericb2 of course<br />
<br />
[18:48] ericb2 so let's set one <br />
<br />
[18:49] ericb2 Since only libAppleRemotemxi.dylib has symbols, I'll have to set one in whatever file included<br />
<br />
[18:49] ericb2 say RemoteMainController.m<br />
<br />
[18:49] ericb2 We can either choose a method<br />
<br />
[18:50] ericb2 Syntax : b 'class:myMethod' <br />
<br />
[18:50] ericb2 or at some line :<br />
<br />
[18:50] ericb2 Syntax : b RemoteMainController.m:118<br />
<br />
[18:50] ericb2 The result is :<br />
<br />
[18:50] ericb2 (gdb) b RemoteMainController.m:118<br />
<br />
[18:50] ericb2 Breakpoint 1 at 0x338e1ea: file RemoteMainController.m, line 118.<br />
<br />
[18:51] ericb2 and using the up/down arrow, the history is available (no need to type several times the same command ;) <br />
<br />
[18:51] ericb2 (gdb) info b<br />
<br />
[18:51] ericb2 Num Type Disp Enb Address What<br />
<br />
[18:51] ericb2 1 breakpoint keep y 0x0338e1ea in -[MainController remoteButton:pressedDown:clickCount:] at <br />
RemoteMainController.m:118<br />
<br />
[18:52] ericb2 The line is inside a method, I'll hit every time I'll be in presentation mode, and when I'll hit a key<br />
<br />
[18:53] ericb2 start the presentation, and when I type a key, I see: <br />
<br />
[18:53] ericb2 Breakpoint 1, -[MainController remoteButton:pressedDown:clickCount:] (self=0x3433bf0, _cmd=0x338f994, <br />
buttonIdentifier=kRemoteButtonPlay, pressedDown=1 '\001', clickCount=1) at RemoteMainController.m:118<br />
<br />
[18:53] ericb2 118 pressed = @"(pressed)";<br />
<br />
[18:54] ericb2 and the presentation is stopped<br />
<br />
[18:54] ericb2 to continue, I have several choices :<br />
<br />
[18:54] ericb2 n -> next instruction <br />
<br />
[18:54] ericb2 s -> next group of instruction<br />
<br />
[18:54] ericb2 c -> continue <br />
<br />
[18:54] ericb2 l does list the matching code <br />
<br />
[18:55] ericb2 For instance :<br />
<br />
[18:55] ericb2 (gdb) l<br />
<br />
[18:55] ericb2 113 #ifdef DEBUG<br />
<br />
[18:55] ericb2 114 NSString* buttonName = nil;<br />
<br />
[18:55] ericb2 115 #endif<br />
<br />
[18:55] ericb2 116 if (pressedDown)<br />
<br />
[18:55] ericb2 117 {<br />
<br />
[18:55] ericb2 118 pressed = @"(pressed)";<br />
<br />
[18:55] ericb2 119<br />
<br />
[18:55] ericb2 120 #ifdef DEBUG<br />
<br />
[18:55] ericb2 121 switch(buttonIdentifier) <br />
<br />
[18:55] ericb2 122 {<br />
<br />
[18:55] ericb2 Current language: auto; currently objective-c<br />
<br />
[18:55] ericb2 (gdb)<br />
<br />
[18:55] ericb2 I can go up or continue<br />
<br />
[18:55] ericb2 and if I need info, I can check for the stack of frames<br />
<br />
[18:56] ericb2 (gdb) bt<br />
<br />
[18:56] ericb2 -> will return the frames, in *reverse* order. Means, the #0 is the last one, and #1 the one before .. and so on<br />
[<br />
18:56] IZBot no issue with number 1<br />
<br />
[18:56] ericb2 ooops :-) <br />
<br />
[18:57] ericb2 Lets choose "n" for next<br />
<br />
[18:57] ericb2 The result is :<br />
<br />
[18:57] ericb2 (gdb) n<br />
<br />
<br />
[18:57] ericb2 121 switch(buttonIdentifier)<br />
<br />
[18:57] ericb2 IMPORTANT: the current line is NOT executed yet<br />
<br />
[18:57] ericb2 e.g. if you have a= 10;<br />
<br />
[18:57] ericb2 p a <br />
<br />
[18:57] ericb2 can return whatevert <br />
<br />
[18:58] ericb2 *only* n will validate the line. This is the context <br />
<br />
[18:58] ericb2 execution context <br />
<br />
[18:58] ericb2 n will continue .. <br />
<br />
[18:58] ericb2 (gdb) n<br />
<br />
<br />
[18:58] ericb2 126 case kRemoteButtonPlay: buttonName = @"Play"; break; // MEDIA_COMMAND_PLAY<br />
<br />
[18:59] ericb2 and of course, we can check for the variable :<br />
<br />
[18:59] ericb2 (gdb) p buttonIdentifier <br />
<br />
[18:59] ericb2 $1 = kRemoteButtonPlay<br />
<br />
[18:59] ericb2 so, it means the slideshow will start ... <br />
<br />
[19:00] ericb2 Next instruction : <br />
<br />
[19:00] ericb2 (gdb) n<br />
<br />
[19:00] ericb2 140 [ self postTheEvent:buttonIdentifier modifierFlags: 0 ];<br />
<br />
[19:00] ericb2 -> means the remote sent a "Play" and I'll inform the vcl there is an event, containing the "Play" information. vcl will forward <br />
to Impress, and the slideshow will start <br />
<br />
[19:01] * jza (n=jza@189.132.182.161) has joined #education.openoffice.org<br />
<br />
[19:02] * xerakko (n=Miguel@debian/developer/xerakko) has joined #education.openoffice.org<br />
<br />
[19:02] ericb2 This is only the introduction (if people are intersted, we can do another workshop about gdb another day )<br />
<br />
[19:02] ericb2 To quit *cleanly* <br />
<br />
[19:02] ericb2 delete the brekapoints :<br />
<br />
[19:02] ericb2 d <br />
<br />
[19:02] ericb2 confirm with yest<br />
<br />
[19:02] ericb2 yes<br />
<br />
[19:02] * lgodard (n=lgodard@LAubervilliers-153-51-9-99.w193-252.abo.wanadoo.fr) has joined #education.openoffice.org<br />
<br />
[19:02] ericb2 c <br />
<br />
[19:02] ericb2 to continue<br />
<br />
<br />
[19:02] ericb2 and then Quit OOo using CMD Q <br />
<br />
[19:03] ericb2 The result is :<br />
<br />
[19:03] ericb2 Program exited normally.<br />
<br />
[19:03] ericb2 (gdb) <br />
<br />
[19:03] ericb2 Then quit gdb : <br />
<br />
[19:03] ericb2 q<br />
<br />
[19:03] ericb2 -> will give you the normal prompt<br />
<br />
[19:03] ericb2 back<br />
<br />
[19:03] ericb2 Questions ?<br />
<br />
[19:04] * WFred__ (n=chatzill@net1.senecac.on.ca) has joined #education.openoffice.org<br />
<br />
[19:04] BartB not at the moment, might have some later<br />
<br />
[19:05] ericb2 I forgot, to affect a value, the command is "set"<br />
<br />
[19:05] ericb2 e.g. : <br />
<br />
[19:05] MrBraini ericb2: last lecture you stated the notes from the lectures will be placed on the wiki? where can we find the notes in the wiki?<br />
<br />
[19:05] ericb2 (gdb) : set a=10 <br />
<br />
[19:05] daeseon_ not now may be later.<br />
<br />
[19:05] ericb2 MrBraini: I'll put them on the wiki, yes<br />
<br />
[19:05] l_zahir is there a y way so we can see multiple line before their execution?<br />
<br />
[19:05] l_zahir lgodard<br />
<br />
[19:05] ericb2 l_zahir: list ? <br />
<br />
[19:05] ericb2 l_zahir: l is the shortcut <br />
<br />
[19:06] ericb2 l_zahir: I forgot, there is another way to break, using conditional breakpoint<br />
<br />
<br />
[19:06] l_zahir oksu during debugging or before?<br />
<br />
[19:06] ericb2 l_zahir : you can go up and down in the frames<br />
<br />
[19:06] l_zahir lgodard<br />
<br />
[19:06] ericb2 l_zahir to retrieve a context <br />
<br />
[19:06] l_zahir ok , thanks<br />
<br />
[19:07] ericb2 l_zahir: I think, the best is to redo a workshop, with everything ready <br />
<br />
[19:07] ericb2 l_zahir: but nothing will replace the experiences<br />
[<br />
19:07] l_zahir sure<br />
<br />
[19:08] <ericb2> l_zahir: no problem.<br />
<br />
[19:08] <ericb2> BTW, I provided a patch for rhino and scripting <br />
<br />
[19:08] <l_zahir> Oh, good :)<br />
<br />
[19:08] <ericb2> was my fault: two modules where concerned, and this is what caused some issues<br />
<br />
[19:08] <ericb2> l_zahir: one minute, I'll retrive the URL <br />
<br />
[19:09] <l_zahir> thanks<br />
<br />
[19:09] <l_zahir> :)<br />
<br />
[19:09] <ericb2> <br />
http://eric.bachard.free.fr/mac/aquavcl/patches/aqua_February2009/17th_february/complete_rhino_and_scripting_patch.diff<br />
<br />
[19:09] <ericb2> l_zahir: this patch should apply cleanly on m40 <br />
<br />
[19:09] <ericb2> l_zahir: not sure it will work, I'm not a Java specialist ;)<br />
<br />
[19:10] <ericb2> ok, I'll have to stop. <br />
<br />
[19:10] <l_zahir> I'll try<br />
<br />
[19:10] <ericb2> If you have further questions, ask directly, and if I see them, I'll answer<br />
<br />
[19:10] * Remaille (n=remi@abo-166-155-68.bdx.modulonet.fr) has joined #education.openoffice.org<br />
<br />
[19:10] * ChanServ gives channel operator status to Remaille<br />
<br />
[19:11] <l_zahir> sure<br />
<br />
[19:11] <ericb2> Other questions ?<br />
<br />
[19:12] <ericb2> If you have no other questions, I'll stop for a while, but in ~2 hours max, I'll be back.<br />
<br />
[19:12] <ericb2> The content of the classroom will be on the wiki<br />
<br />
=== LXR use === <br />
<br />
[Complete me]<br />
<br />
=== Checkout the code ===<br />
<br />
<br />
Preliminary:<br />
<br />
- we suppose you have some bash knowledge, and some programming skills<br />
<br />
- your .cvsrc file is ok (else ask on #education.openoffice.org )<br />
<br />
Now, open a terminal, use bash, and do :<br />
<br />
0 ) create the environment<br />
<br />
<br />
<br />
<div align="left" style="color:green; font-size:16px">'''If you don't have a proxy, do , '''(in a terminal) :</div><br />
<br />
'''export CVSROOT=":pserver:anoncvs@anoncvs.services.openoffice.org:/cvs"'''<br />
<br />
<br />
<br />
<div align="left" style="color:red; font-size:16px">'''There is a proxy, and nothing works using the line above, do, '''(in a terminal) :</div><br />
<br />
Let the proxy be 100.101.102.103 ( name proxy.machine.education.org ) , and the open port 1234, then just do :<br />
<br />
'''export CVSROOT=":pserver;proxy=100.101.102.103;proxyport=1234:anoncvs@anoncvs.services.openoffice.org:/cvs"'''<br />
<br />
<br />
<br />
<div align="left" style="color:red; font-size:16px">'''And if you ignore the IP address of the gateway, but you know its name, do, '''(in a terminal) :</div><br />
<br />
'''export CVSROOT=":pserver;proxy=proxy.machine.education.org;proxyport=1234:anoncvs@anoncvs.services.openoffice.org:/cvs"'''<br />
<br />
<br />
'''IMPORTANT''' : proxy.machine.education.org is just a fake name, as example. Please replace it with the one in your network :)<br />
<br />
<br />
... it should work now (else, contact your sys admin).<br />
<br />
For the next step, create TMP dir (command: mkdir TMP )<br />
<br />
cd TMP<br />
<br />
1) checkout vcl module from DEV300_m31<br />
<br />
cvs co -r DEV300_m31 dtrans<br />
<br />
Question: what happens ?<br />
<br />
<br />
Download all OpenOffice.org tree :<br />
<br />
mkdir DEV300_m31<br />
<br />
cd DEV300_m31<br />
<br />
cvs -4 co -r DEV300_m31 OpenOffice2<br />
<br />
( -z4 is optional )<br />
<br />
-> once done ( can be very long), and if no error occurs, you got all OpenOffice.org source code from DEV300_m31 Milestone !!<br />
<br />
=== Create a patch === <br />
<br />
2) Modify one file, do "cvs up" , and comment on the result<br />
<br />
3) using grep , retrieve the name of the milestone in the sources<br />
<br />
4) checkout vcl from a cws under development<br />
<br />
cvs -z4 co -r cws_dev300_aquavcl07 vcl<br />
<br />
5) retrieve the cwsname in the sources<br />
<br />
6) analyse the list of the subdirectories vcl contains<br />
<br />
7) modify the code in vcl/source/gdi/sallayout.cxx<br />
<br />
(write whatever you want, respecting C++ syntax prefered ;)<br />
<br />
8) create a diff with the OpenOffice.org repository<br />
<br />
change directory outside of vcl<br />
<br />
in the current dir ( TMP ) , do :<br />
<br />
cvs diff -u vcl > my_pretty_patch.diff<br />
<br />
9) What does contain the patch ?<br />
<br />
=== Apply and Reverse a patch === <br />
<br />
* Simulate a patch application<br />
<br />
* Apply it for true<br />
<br />
<br />
10) How reverse your changes ?<br />
<br />
11) Be sure you have enough place on your hard disk ( count 2GB )<br />
<br />
=== Fix a build breaker (most common breakages ) ===<br />
<br />
==== A) Building OpenOffice.org ====<br />
<br />
Note: add your own experience here !<br />
<br />
<br />
=====Building on Ubunutu 7.10=====<br />
<br />
-----------------------------------------------------<br />
Ubuntu version : 7.10 - Gutsy Gibbon<br />
<br />
Estimated time for the cnofiguration: 1h30<br />
<br />
-----------------------------------------------------<br />
<br />
1) Download OpenOffice.org source code <br />
<br />
install subversion :<br />
sudo apt-get install subversion<br />
<br />
Command line for the download :<br />
svn checkout svn://svn.services.openoffice.org/ooo/tags/DEV300_m39<br />
<br />
-----------------------------------------------------<br />
<br />
2) Java<br />
<br />
'''Prefer the Sun JDK '''<br />
<br />
Version of the installed Java (mini 1.5.0 )<br />
Command line to check : java -version<br />
<br />
In config_office tcsh was not found<br />
<br />
'''Solution''' it to use the following option : <br />
--with-use-shell=bash<br />
<br />
-----------------------------------------------------<br />
<br />
Archive::Zip is missing :<br />
<br />
checking for required Perl modules... Can't locate Archive/Zip.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at -e line 1.<br />
BEGIN failed--compilation aborted at -e line 1.<br />
configure: error: Failed to find some modules<br />
<br />
'''Solution''' : <br />
<br />
apt-cache search archive | grep perl <br />
<br />
Returns<br />
<br />
libarchive-zip-perl - Module for manipulation of ZIP archives<br />
<br />
'''Solution'''<br />
sudo apt-get install libarchive-zip-perl<br />
<br />
-----------------------------------------------------<br />
<br />
'''Cups''' :<br />
checking for cups/cups.h... no<br />
configure: error: cups/cups.h could not be found. libcupsys2-dev or cups???-dev<br />
<br />
'''Solution''':<br />
sudo apt-get install libcupsys2-dev <br />
<br />
pam :<br />
<br />
checking for security/pam_appl.h... no<br />
configure: error: pam_appl.h could not be found. libpam-dev or pam-devel missing?<br />
<br />
'''Solution''': <br />
sudo apt-get install libpam0g-dev<br />
<br />
-----------------------------------------------------<br />
<br />
javac:<br />
checking for javac... no<br />
configure: error: javac not found set with_jdk_home<br />
<br />
'''Solution''':<br />
<br />
Install Sun Java 1.5.0 from the URL below:<br />
<br />
http://java.sun.com/javase/downloads/index_jdk5.jsp<br />
<br />
JDK2 installed in /usr/local, means the following option is mandatory :<br />
<br />
--with-jdk-home=/usr/local/jdk1.5.0_17<br />
<br />
-----------------------------------------------------<br />
<br />
Gperf:<br />
checking for gperf... no<br />
configure: error: gperf not found but needed. Install it.<br />
<br />
Solution:<br />
sudo apt-get install gperf<br />
<br />
-----------------------------------------------------<br />
<br />
unowinreg.dll:<br />
<br />
checking whether to build the ODK... yes<br />
<br />
checking for external/unowinreg/unowinreg.dll... configure: WARNING: not found, will be cross-built using mingw32<br />
<br />
Looking at external/unowinreg, the readme invites to download unowinreg.dll at <br />
<br />
http://tools.openoffice.org/unowinreg_prebuild/680<br />
<br />
cd ../DEV300_m39/external/unowinreg/<br />
<br />
'''Solution''':<br />
<br />
wget http://tools.openoffice.org/unowinreg_prebuild/680/unowinreg.dll<br />
<br />
-----------------------------------------------------<br />
<br />
gtk+ stuff :<br />
<br />
checking whether freetype is available... checking for pkg-config... /usr/bin/pkg-config<br />
checking for freetype2 >= 2.0 ... Package freetype2 was not found in the pkg-config search path<br />
<br />
Solution : install all the gtk+ stuff (first is freetype ) <br />
<br />
sudo apt-get install libfreetype6-dev <br />
<br />
-----------------------------------------------------<br />
<br />
Mozilla :<br />
<br />
checking for mozilla-source-1.7.5.tar.gz... not found<br />
checking for mozilla-source-1.7.5.tar.bz2... not found<br />
configure: error: Mozilla source archive not found.<br />
Please copy mozilla-source-1.7.5.tar.bz2 or mozilla-source-1.7.5.tar.gz to moz/download/.<br />
The archives can be found here:<br />
http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7.5/source/<br />
<br />
use prebuilt-archives downloadable from <br />
http://tools.openoffice.org/source/browse/tools/www/moz_prebuild/680/<br />
<br />
For Linux: LINUXGCCIinc.zip LINUXGCCIlib.zip LINUXGCCIruntime.zip<br />
<br />
-----------------------------------------------------<br />
<br />
Xaw:<br />
<br />
checking X11/Xaw/Label.h usability... no<br />
checking X11/Xaw/Label.h presence... no<br />
checking for X11/Xaw/Label.h... no<br />
configure: error: Xaw include headers not found<br />
<br />
Solution :<br />
<br />
sudo apt-get install libxaw6-dev<br />
<br />
-----------------------------------------------------<br />
<br />
Fontconfig:<br />
<br />
checking fontconfig/fontconfig.h usability... no<br />
checking fontconfig/fontconfig.h presence... no<br />
checking for fontconfig/fontconfig.h... no<br />
configure: error: fontconfig/fontconfig.h could not be found. libfontconfig1-dev or fontconfig???-devel missing?<br />
<br />
Solution:<br />
sudo apt-get install libfontconfig1-dev<br />
<br />
-----------------------------------------------------<br />
<br />
Xrandr:<br />
<br />
checking for X11/extensions/Xrandr.h... no<br />
configure: error: X11/extensions/Xrandr.h could not be found. X11 dev missing?<br />
<br />
Solution:<br />
sudo apt-get install libxrandr-dev<br />
<br />
-----------------------------------------------------<br />
<br />
Bison:<br />
<br />
checking for bison... no<br />
configure: error: no bison found in $PATH, install bison<br />
<br />
Solution: sudo apt-get install bison<br />
<br />
-----------------------------------------------------<br />
<br />
Flex:<br />
checking for flex... no<br />
configure: error: no flex found in $PATH, install flex<br />
<br />
Solution: sudo apt-get install flex<br />
<br />
-----------------------------------------------------<br />
<br />
Gconf-2.0:<br />
<br />
checking whether to enable GConf support... yes<br />
checking for gconf-2.0 ... Package gconf-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `gconf-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'gconf-2.0' found<br />
configure: error: Library requirements (gconf-2.0 ) not met; consider adjusti<br />
<br />
Solution:<br />
sudo apt-get install libgconf2-dev<br />
<br />
-----------------------------------------------------<br />
<br />
Gnomevfs:<br />
<br />
checking for gnome-vfs-2.0 >= 2.6.0 ... Package gnome-vfs-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `gnome-vfs-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'gnome-vfs-2.0' found<br />
configure: error: Library requirements (gnome-vfs-2.0 >= 2.6.0 ) not met; cons<br />
<br />
Solution:<br />
sudo apt-get install libgnome-vfs-dev<br />
<br />
WARNING: not available -> use the --disable-gnome-vfs option solved the issue<br />
<br />
-----------------------------------------------------<br />
<br />
libgtk+-2.0 missing:<br />
<br />
Solution: <br />
sudo apt-get install libgtk2.0-dev<br />
<br />
-----------------------------------------------------<br />
<br />
Ant missing:<br />
<br />
checking for ant.cmd... no<br />
configure: error: Ant not found - Make sure it's in the path or use --with-ant-home<br />
<br />
Solution<br />
Download apache-ant from (e.g.) : <br />
http://archive.apache.org/dist/ant/binaries/<br />
<br />
Install the decompressed archive in /usr/local<br />
<br />
use : --with-ant-home=/usr/local/apache-ant-1.7.1<br />
<br />
-----------------------------------------------------<br />
<br />
'''EXTRA INSTALLATION'''<br />
<br />
Use as much as possible system libs:<br />
<br />
<br />
libxml : --with-system-openssl<br />
<br />
To avoid broken dependencies, libxml2 + matching libxslt (development archives) must be installed.<br />
<br />
sudo apt-get install libxslt1-dev libxslt1.1 <br />
<br />
Finaly,use the foloowing option to successfully pass configure : --with-system-libxml <br />
<br />
<br />
openssl : --with-system-openssl<br />
<br />
<br />
checking for openssl ... Package openssl was not found in the pkg-config search path. Perhaps you should add the directory containing `openssl.pc' to the PKG_CONFIG_PATH environment variable No package 'openssl' found<br />
<br />
Solution: <br />
<br />
sudo apt-get install libssl-dev<br />
<br />
expat : --with-system-expat<br />
<br />
berkeleydb : --with-system-db<br />
<br />
checking for db.h... no<br />
checking for db4/db.h... no<br />
configure: error: no. install the db4 libraries<br />
<br />
Solution : sudo apt-get install libdb4.4-dev <br />
<br />
icu: --with-system-icu<br />
<br />
checking for genbrk... no<br />
configure: error: \genbrk\ not found in $PATH, install the icu development tool \genbrk""<br />
<br />
Solution : sudo apt-get install libicu36-dev <br />
<br />
neon : --with-system-neon<br />
<br />
checking which neon to use... external<br />
checking for neon >= 0.24.0... configure: error: you need neon >= 0.24.x for system-neon<br />
<br />
Solution: <br />
sudo apt-get install libneon26-dev<br />
<br />
-----------------------------------------------------<br />
<br />
<br />
Install ccache :<br />
<br />
sudo apt-get install ccache<br />
<br />
edit the ~/.bashrc and add the lines :<br />
<br />
CC="ccache gcc"<br />
CXX="ccache g++"<br />
export CC CXX<br />
<br />
save, close and open a new term => ccache will be detected at the next configure<br />
<br />
-----------------------------------------------------<br />
<br />
Final configure command line ( experimental, might be modified) :<br />
<br />
<pre><br />
./configure \<br />
--with-use-shell=bash \<br />
--with-jdk-home=/usr/local/jdk1.5.0_17 \<br />
--disable-build-mozilla \<br />
--disable-gnome-vfs \<br />
--with-ant-home=/usr/local/apache-ant-1.7.1 \<br />
--with-lang=fr \<br />
--with-system-libxml \<br />
--with-system-libxslt \<br />
--with-system-openssl \<br />
--with-system-expat \<br />
--with-system-db \<br />
--with-system-icu \<br />
--with-system-neon<br />
</pre><br />
<br />
And configure is successfull :-)<br />
<br />
Bootstrap :<br />
<br />
cd $ROOT_SOURCES <br />
<br />
./bootstrap # builds dmake<br />
<br />
either :<br />
<br />
dmake<br />
<br />
or :<br />
<br />
cd instsetoo_native<br />
<br />
build --all -P4<br />
<br />
Starts the build<br />
<br />
See you tomorrow :)<br />
<br />
===== Missing modules =====<br />
<br />
e.g. missing alias in DEV300_m13 : hyphen module is not checked, causing missing headers, never delivered and then, a breakage in lingucomponent because of undefined functions/methods and so on<br />
<br />
Solution: check out hyphen<br />
<br />
export CVSROOT=":pserver:anoncvs@anoncvs.services.openoffice.org:/cvs"<br />
<br />
Note: there is another solution for experimented devs, using tunnel <br />
<br />
cvs co -r DEV300_m13 hyphen<br />
<br />
===== Missing Files =====<br />
<br />
===== Warnings =====<br />
<br />
===== Missing headers =====<br />
<br />
<br />
<br />
===== (deprecated) gcc parser issues =====<br />
<br />
====B) Hacking OpenOffice.org ==== <br />
<br />
===== Syntax Errors =====<br />
<br />
===== Missing headers =====<br />
<br />
===== Multi inclusions =====<br />
<br />
===== Linking issues =====<br />
<br />
===== Visibility =====<br />
<br />
<br />
[[category:Education/Classroom]]</div>Kirkhttps://wiki.openoffice.org/wiki/Community_Council/Funding_And_Budgets/DeveloperCommunity Council/Funding And Budgets/Developer2009-12-04T06:42:58Z<p>Kirk: </p>
<hr />
<div>= Dashboard for the CC Developer Budget =<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! Action<br />
! Requester<br />
! Status<br />
! PO<br />
|-<br />
| Renaissance meeting<br />
| Christoph Noak<br />
| approved<br />
| open<br />
|-<br />
| [[BugBountyProgram | Bug Bounty Program]]<br />
| Martin Hollmichel<br />
| open<br />
| -<br />
|-<br />
| SVG Implementation<br />
| <br />
| open, waiting for concept proposal (Kai Ahrens)<br />
| -<br />
|-<br />
| Tinderbox: Windows and C++ license<br />
| Florian Effenberger<br />
| open, need to evaluate prices<br />
| -<br />
<br />
|}<br />
<br />
<br />
[[Category:Community Council]]</div>Kirkhttps://wiki.openoffice.org/wiki/Community_Council/Items/Candidate_Answers_200910Community Council/Items/Candidate Answers 2009102009-12-04T06:42:19Z<p>Kirk: </p>
<hr />
<div>= Elections 2009 =<br />
<br />
For the community council elections in October/November 2009, the candidates and a link to mails in which they tell some more about their ideas, are:<br />
<br />
* Alexandro Colorado [http://www.openoffice.org/servlets/ReadMsg?list=discuss&msgNo=65003 mail] (for Product Development Representative)<br />
* Charles-H. Schulz [http://www.openoffice.org/servlets/ReadMsg?list=discuss&msgNo=65010 mail] and [[Introducing_Charles | wiki]] (for NLC Representative)<br />
* Juergen Schmidt [http://www.openoffice.org/servlets/ReadMsg?list=discuss&msgNo=65098 mail] (for Code Contributor Representative)<br />
* Christoph Noach [http://www.openoffice.org/servlets/ReadMsg?list=discuss&msgNo=65091 mail] (for Product Development Representative)<br />
<br />
<br />
[[Category:Community Council]]</div>Kirkhttps://wiki.openoffice.org/wiki/Community_CouncilCommunity Council2009-12-04T06:41:15Z<p>Kirk: /* Elections 2009 */</p>
<hr />
<div>== Introduction ==<br />
<br />
The origins and purpose of the OpenOffice.org Community Council are explained on the [http://council.openoffice.org/ main Community Council site], where you will also find a list of the current members.<br />
<br />
These wiki pages are used to record the day to day running of the Council - agendas and minutes of meetings, budgets, etc.<br />
<br />
<br />
<br />
== Meetings ==<br />
<br />
* To raise an issue at the next Community Council Meeting, add it to the [[Community_Council/Agenda | Agenda of the next meeting]]. You must be an OpenOffice.org community member. The term, "Community Member," is described in our [http://www.openoffice.org/dev_docs/guidelines.html Guidelines].<br />
* Minutes of past meetings are [[Community_Council/Minutes | here]]<br />
* A Calendar of future meetings is [[Community_Council/Calendar | here]]<br />
* Channel: #OOoCouncil (freenode)<br />
<br />
== Council coordinator ==<br />
<br />
Starting from May 28 2009, the council works with a internal coordinator.<br />
<br />
The idea:<br />
* appoint a council coordinator every 4 to 5 months<br />
* he/she is chosen from the council members<br />
* no formal change of rules intended.<br />
Responsibility during that time:<br />
* looking after planning, progress of AI's<br />
* so basically: poking the colleagues ;-)<br />
Expected:<br />
* will improve overall cc-performance<br />
* will help to share the feeling of really being part of, of joined responsibility<br />
Approved:<br />
* Cor Nouws is the first to take this role<br />
* Stefan Taxhet will be the next<br />
* and in 4 months, the third person for this fine job will be choosen<br />
<br />
<br />
== Budget ==<br />
<br />
Information about the Community Council budget and payments procedure is [[Community_Council/Funding_And_Budgets | here]].<br />
<br />
== Improving the project ==<br />
<br />
Watch and help the page for [[Community_Council/Project_Improvements | improvements in the project]].<br />
<br />
== Elections 2009 ==<br />
<br />
The results of the November 2009 election are:<br />
<br />
*Code Contributor Representative: Juergen Schmidt<br />
51 Yes, 9 No (68)<br />
<br />
*NLC Representative: Charles-H. Schulz<br />
39 Yes, 3 No (111)<br />
<br />
*Product Development Representative: Christoph Noack<br />
31 Votes Christoph Noack<br />
9 Votes Alexandro Colorado<br />
(49)<br />
<br />
The observers, Sophie Gautier, Drew Jensen, and Mechtilde Stehmann, have all approved and confirmed the results. Our welcome and congratulations to the new Council members!<br />
<br />
<br />
[[Category:Community Council]]</div>Kirkhttps://wiki.openoffice.org/wiki/Calc:Tab_Color_PatchesCalc:Tab Color Patches2009-12-04T06:39:15Z<p>Kirk: /* See Also */</p>
<hr />
<div>== Code Change Justifications and Explanation ==<br />
<br />
=== Tab Color Core Support ===<br />
:officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu<br />
::Add entries for ".uno:SetTabBgColor" and ".uno:TabBgColor"<br />
----<br />
:sc/inc/globstr.hrc<br />
::Define Global Strings<br />
----<br />
:sc/inc/scextopt.hxx<br />
::Add Color maTabBgColor and BOOL IsDefaultTabBgColor() to the ScExtTabSettings Struct<br />
----<br />
:sc/inc/sc.hrc<br />
::Define ID's for the CalcCommand<br />
::Define Sc Strings<br />
::Define the dialog id<br />
----<br />
:<span style="background-color:lightgreen">sc/inc/tabbgcolor.hxx (new)</span><br />
::Define a struct: "ScUndoSetTabBgColorInfo" to store Tab Color Undo information<br />
::Declare a list: "ScUndoSetTabBgColorInfoList" of "ScUndoSetTabBgColorInfo"<br />
----<br />
:sc/inc/unonames.hxx <span style="background-color:red;color:white">***NEED TO ADD TO SPECS!!</span><br />
::define the uno name SC_UNO_TABCOLOR as "TabColor" for ODS XML label<br />
----<br />
:sc/inc/ViewSettingsSequenceDefines.hxx<br />
::Add SC_TABLE_TAB_BG_COLOR to the Table View Settings Sequence<br />
----<br />
:sc/sdi/docsh.sdi<br />
::Add FID_TAB_SET_TAB_BG_COLOR command to TableSelection interface<br />
----<br />
:sc/sdi/scalc.sdi<br />
::Add SvxColorItem TabBgColor FID_TAB_SET_TAB_BG_COLOR definition<br />
::Add SfxVoidItem SetTabBgColor FID_TAB_MENU_SET_TAB_BG_COLOR(SvxColorItem TabBgColor FID_TAB_SET_TAB_BG_COLOR) definition<br />
----<br />
:sc/sdi/tabvwsh.sdi<br />
::Add FID_TAB_MENU_SET_TAB_BG_COLOR command to Tables interface<br />
----<br />
:sc/source/ui/docshell/docfunc.cxx<br />
::Add Source for ScDocFunc::SetTabBgColor<br />
----<br />
:sc/source/ui/inc/docfunc.hxx<br />
::Define ScDocFunc::ScTabBgColor<br />
----<br />
:sc/source/ui/inc/undotab.hxx<br />
::Define ScUndoSetTabBgColor Class<br />
----<br />
:sc/source/ui/inc/viewdata.hxx<br />
::Define Private Color aTabBgColor in ScViewDataTable Class<br />
::Define Private BOOL IsDefaultTabBgColor(...) in ScViewDataTable Class<br />
::Define Public void SetTabBgColor(...) in ScViewData Class<br />
::Define Public BOOL IsDefaultTabBgColor(...) in ScViewData Class<br />
::Define Public Color GetTabBgColor(...) in ScViewData Class<br />
----<br />
:sc/source/ui/inc/viewfunc.hxx<br />
::Define Public BOOL SetTabBgColor(...) in ScViewFunc Class<br />
----<br />
:sc/source/ui/src/globstr.src<br />
::Add String data to Global Strings<br />
----<br />
:sc/source/ui/src/popup.src<br />
::Add Separator<br />
::Add FID_TAB_MENU_SET_TAB_BG_COLOR to RID_POPUP_TAB<br />
----<br />
:sc/source/ui/src/scstring.src<br />
::Add String data to Sc Strings<br />
----<br />
:sc/source/ui/undo/undotab.cxx<br />
::Add ScUndoSetTabBgColor as an SfxUndoAction class<br />
::Undo/Redo action supports single and multiple tab color operations<br />
::When a single tab is colored, then set the comment to Global String: STR_UNDO_SET_TAB_BG_COLOR<br />
::When multiple tabs were colored, then set the comment to Global String: STR_UNDO_SET_MULTI_TAB_BG_COLOR<br />
----<br />
:sc/source/ui/view/scextopt.cxx<br />
::Set maTabBgColor to COL_AUTO on ScExtTabSettings::ScExtTabSettings()<br />
----<br />
:sc/source/ui/view/tabcont.cxx<br />
::Add the following logic to ScTabControl::ScTabControl(...)<br />
:::Check to see if the current tab has a tab color value not equal to COL_AUTO<br />
::::Call ScTabControl::SetTabBgColor which belongs to the TabBar Class<br />
::Invalidate FID_TAB_SET_TAB_BG_COLOR with the rest of the items from the table Interface in ScTabControl::Select()<br />
::Add the following logic to ScTabControl::UpdateStatus()<br />
:::Check to see if new color is the same as the old color.<br />
::::If the color is different set bModified to TRUE<br />
:::Check to see if the current tab has a tab color value not equal to COL_AUTO<br />
::::Call ScTabControl::SetTabBgColor which belongs to the TabBar Class<br />
----<br />
:sc/source/ui/view/tabvwshf.cxx<br />
::Add code to execute the Dialog and save the color information.<br />
::Add code to invalidate the menu items according to criteria in spec<br />
----<br />
:sc/source/ui/view/viewdata.cxx<br />
::Add code to set aTabBgColor to COL_AUTO on ScViewDataTable::ScViewDataTable()<br />
::Add support to save to ODS in ScViewDataTable::WriteUserDataSequence(...)<br />
::Add support to read from ODS in ScViewDataTable::ReadUserDataSequence(...)<br />
::Add code for ScViewData::SetTabBgColor(...)<br />
::Add code for ScViewData::GetTabBgColor(...)<br />
::Add code for ScViewData::IsDefaultTabBgColor(...)<br />
::Add code to save the color to the ScExtTabSettings Struct in ScViewData::WriteExtOptions(...)<br />
::Add code to read the color from the ScExtTabSettings Struct in ScViewData::ReadExtOptions(...)<br />
----<br />
:sc/source/ui/view/viewfun2.cxx<br />
::Add code for ScViewFunc::SetTabBgColor(...)<br />
----<br />
:sc/uiconfig/scalc/menubar/menubar.xml<br />
::Add Separator<br />
::Add Menu Item .uno:SetTabBgColor to FormatMenu->SheetMenu <br />
----<br />
:svtools/inc/tabbar.hxx<br />
::Add definition for Public Color GetTabBgColor(...) in Class TabBar<br />
::Add definition for Public void SetTabBgColor(...) in Class TabBar<br />
::Add definition for Public BIIL IsDefaultTabBgColor(...) in Class TabBar<br />
----<br />
:svtools/source/control/tabbar.cxx<br />
::Add Color maTabBgColor to ImplTabBarItem struct<br />
::Add Color maTabTextColor to ImplTabBarItem struct<br />
::Add bool IsDefaultTabBgColor() to ImplTabBarItem struct<br />
::Add bool IsDefaultTabTextColor() to ImplTabBarItem struct<br />
::Set maTabBgColor and maTabTextColor to COL_AUTO in ImplTabBarItem::ImplTabBarItem(...)<br />
::Change aLightFont weight to WEIGHT_NORMAL instead of WEIGHT_LIGHT in TabBar::Paint()<br />
::Add code to fill tab with custom background color when tab is unselected in TabBar::Paint()<br />
::Add code to draw a 2px sliver on the bottom of selected tab(s) with custom background color in TabBar::Paint()<br />
::Add code for TabBar::GetTabBgColor<br />
::Add code for TabBar::SetTabBgColor<br />
:::Add code to auto select font color based on the luminance of the color.<br />
::Add code to choose proper Drop Position Arrow colors in TabBar::ShowDropPos(...)<br />
<br />
=== Tab Color Dialog ===<br />
:sc/inc/scabstdlg.hxx<br />
::Add class: AbstractScTabBgColorDlg a VclAbstractDialog class<br />
:sc/source/ui/attrdlg/scdlgfact.cxx<br />
::Add IMPL_ABSTDLG_BASE(AbstractTabDialog_Impl)<br />
::Add AbstractScTabBgColorDlg_Impl::GetSelectedColor(...) implementation<br />
::Add AbstractScTabBgColorDlg * ScAbstractDialogFactory_Impl::CreateScTabBgColorDlg (...) implementation<br />
:sc/source/ui/attrdlg/scdlgfact.hxx<br />
::Add class AbstractScTabBgColorDlg_Impl a AbstractScTabBgColorDlg class<br />
::Add Public virtual AbstractScTabBgColorDlg * CreateScTabBgColorDlg (...) to ScAbstractDialogFactory_Impl<br />
:sc/source/ui/inc/miscdlgs.hrc<br />
::Add definitions for Dialog and Dialog Controls<br />
:<span style="background-color:lightgreen">sc/source/ui/inc/tabbgcolordlg.hxx (new)<br />
::Add class: ScTabBgColorDlg a ModalDialog class<br />
:sc/source/ui/miscdlgs/makefile.mk<br />
::Add tabbgcolordlg.obj to make file<br />
:<span style="background-color:lightgreen">sc/source/ui/miscdlgs/tabbgcolordlg.cxx (new)<br />
::Add code for the Color Dialog according to specs<br />
:sc/source/ui/src/miscdlgs.src<br />
::Add Dialog and Dialog Control properties<br />
:sc/util/makefile.mk<br />
::Add tabbgcolordlg.obj to make file<br />
<br />
=== Excel 2003 Binary Support ===<br />
:sc/source/filter/excel/read.cxx<br />
:sc/source/filter/excel/xestyle.cxx<br />
:sc/source/filter/excel/xeview.cxx<br />
:sc/source/filter/excel/xichart.cxx<br />
:sc/source/filter/excel/xiview.cxx<br />
:sc/source/filter/excel/xlview.cxx<br />
:sc/source/filter/inc/xestyle.hxx<br />
:sc/source/filter/inc/xeview.hxx<br />
:sc/source/filter/inc/xiview.hxx<br />
:sc/source/filter/inc/xlview.hxx<br />
<br />
=== Excel 2003 XML Support ===<br />
:filter/source/xslt/export/spreadsheetml/formular.xsl<br />
:filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl<br />
<br />
=== Excel 2007 Binary / OOX Support ===<br />
:oox/inc/oox/xls/viewsettings.hxx<br />
:oox/source/xls/chartsheetfragment.cxx<br />
:oox/source/xls/viewsettings.cxx<br />
:oox/source/xls/worksheetfragment.cxx<br />
:oox/source/xls/worksheethelper.cxx<br />
:oox/source/xls/worksheetsettings.cxx<br />
<br />
== Patch Download List ==<br />
:*Download Patch<br />
<br />
== See Also ==<br />
*[[User:Danielbw]]<br />
----<br />
[[User:Danielbw|Danielbw]] 01:23, 22 January 2009 (UTC)<br />
----<br />
<br />
<br />
[[Category:Calc]]</div>Kirkhttps://wiki.openoffice.org/wiki/Calc/Performance/Specific_BottlenecksCalc/Performance/Specific Bottlenecks2009-12-04T06:38:33Z<p>Kirk: /* other */</p>
<hr />
<div>== The Zaske case ==<br />
<br />
Done. Content relocated to [[Calc/Performance/The_Zaske_case]], section preserved for external references linking here.<br />
<br />
== Sorting values within functions ==<br />
<br />
Done. Content relocated to [[Calc/Performance/sorting_values_within_functions]], section preserved for external references linking here.<br />
<br />
== other ==<br />
<br />
For other performance optimization tasks previously located here please see the individual pages listed under [[Calc/Performance]].<br />
<br />
<br />
[[Category:Calc]]</div>Kirkhttps://wiki.openoffice.org/wiki/Calc/Performance/ALLCalc/Performance/ALL2009-12-04T06:37:07Z<p>Kirk: </p>
<hr />
<div><noinclude>{{DISPLAYTITLE:List of all Calc related performance pages}}</noinclude><br />
<br />
== To-Do ==<br />
{{:Calc/To-Dos/Performance}}<br />
<br />
== In progress ==<br />
{{:Calc/InProgress/Performance}}<br />
<br />
== Done ==<br />
{{:Calc/Done/Performance}}<br />
<br />
<br />
[[Category:calc]]</div>Kirkhttps://wiki.openoffice.org/wiki/CJK_Group_Log_20090424CJK Group Log 200904242009-12-04T06:32:43Z<p>Kirk: </p>
<hr />
<div><pre><br />
<br />
<jeongkyu> Hi everybody<br />
<Forestcheng> hello to all<br />
<maho> Hello all<br />
<zlh> Hi, khirano, maho, Forestcheng, and all<br />
<zlh> I'm Zhu Lihua<br />
<maho> yes i know :)<br />
<zlh> from Redflag<br />
<maho> hello<br />
<khirano> hi all<br />
<maho> zlh : redflag office? redoffice?<br />
<maho> your e-mail address is redoffice<br />
<zlh> It's a pity that I was abcent from the first meeting because of out of internet connection.<br />
<maho> hi khirano!<br />
<Forestcheng> formal name: RedOffice<br />
<maho> oh thanks<br />
<jeongkyu> How's weather over there, guys? It just started raining my home town, GwangJu.<br />
<zlh> Yes, Redoffice is product name, and redflag is company name.<br />
<Forestcheng> It's cloudy in Beijing. a little bit cold.<br />
<khirano> hi sdq<br />
<maho> bit cloudy in Saitama<br />
<zlh> khirano: sdq is my workmate. I'm not sure he is here right now. because it's right the lunch time:)<br />
<Forestcheng> Have you had lunch in Korea or Japan? :)<br />
<khirano> zlh: I see. :) Can you introduce sdq for us? His/Her full name?<br />
<khirano> Forestcheng: No not yet! I am hungry :)<br />
<jeongkyu> Me neither~<br />
<Forestcheng> So am I :(<br />
<khirano> Hey Jeongkyu, you are coming! Thank you very much!<br />
<jeongkyu> khirano: Thanks. I am sorry not to post my comment on the agenda. :-)<br />
<khirano> jeongkyu: No problem. It's very good to have you here.<br />
<zlh> khirano: sdq's Full name is Sun Dequan. He mainly contribute in automation.<br />
<khirano> zlh: Great to hear! We have another Automation Guy! :)<br />
<maho> great :)<br />
<zlh> khirano: Yes, he is not very experienced yet, He sure will learn more from you :)<br />
<khirano> zlh: Not from me but from Maho! :)<br />
<khirano> Forestcheng: Is Peter coming? do you know?<br />
<maho> recently I don't do but matuaki-san does automated test :)<br />
<Forestcheng> No, Peter is absent.<br />
<khirano> Forestcheng: OK. thanks.<br />
<khirano> Shall we start?<br />
<maho> yes<br />
<jeongkyu> Sure, go ahead<br />
<Forestcheng> Yes<br />
<zlh> Yes, please<br />
<khirano> Who is very kind to take a log of this meeting? :)<br />
<maho> me<br />
<jeongkyu> Thanks maho.<br />
<khirano> maho: thanks<br />
<khirano> The meeting starts now.<br />
<khirano> Agenda is here: http://wiki.services.openoffice.org/wiki/CJK_Group/Agenda<br />
<khirano> 1. 3.1 Release QA Status<br />
<khirano> How is it going with you?<br />
<maho> Enoki -san has been doing a good release qa management with me.<br />
<maho> we have four testers.<br />
<maho> matuaki-san likes to do automated test VCLTestTool<br />
<khirano> maho: Who is Enoki-san?<br />
<maho> Kunimoto-san and matayoshi-san do TCM test<br />
<maho> :) you know :) Enoki-san is a release qa manager from Good-Day<br />
<maho> Good-Day Inc.<br />
<maho> Meguro-san does a release sanity test in the Forum<br />
<Forestcheng> Great! Are there still bugs blocking release?<br />
<khirano> OK, now zh and ko friends know who Enoki-san is :)<br />
<jeongkyu> There are not many testers in Korean team, so we focus on release sanity test with the latest RC.<br />
<maho> Forestcheng : no our team is not so organized to raise issues :)<br />
<maho> jeongkyu: right, and how you find testers?<br />
<jeongkyu> maho: We have a community site for Korean community, http://openoffice.or.kr/main/<br />
<jeongkyu> And the site has basic information on how to join Korean team as tester, blogger, etc.<br />
<jeongkyu> Some people show there interest in joining the team, but the problem is that they can't participate in the activity continously.<br />
<Forestcheng> Yes, It's hard to keep volunteers always active.<br />
<khirano> jeongkyu: I see the situation.<br />
<jeongkyu> So, for now, we are focus on release sanity test with few dedicated testers.<br />
* hanthana (n=hanthana@124.43.39.31) は #ooonlc へ参加しました。<br />
<maho> so jeongkyu, testers are usually participate only once?<br />
<jeongkyu> maho: It depends on.<br />
<maho> Oh<br />
<khirano> maho: We are trying to fix testers, right? Can you show us the QA project member list on the wiki?<br />
<jeongkyu> Team members are interested in the activities including testing, but they are usually *very busy* with their company work.<br />
<maho> http://wiki.services.openoffice.org/wiki/JA/QA/Members<br />
<maho> now we have five members<br />
<khirano> maho: Thanks!<br />
<maho> I think making such table is nice, as people don't feel lonely<br />
<maho> and encourage people to write thier names on wiki<br />
<Forestcheng> Great idea!<br />
<maho> (thanks khirano)<br />
<khirano> To get fixed testers is a tough work!, you know :)<br />
<khirano> we have to keep encourging them,<br />
<jeongkyu> Is there any reward or compensation for being testers in your community?<br />
<maho> No, nothing, but release<br />
<khirano> keep providing up-to-date infomation to them<br />
<khirano> jeongkyu: No reward. But we are happy when our language OpenOffice.org is released to the public.<br />
<jeongkyu> When there are user contributions such as good article or nice user support in KO community, I try to give small gift such as book or DVD.<br />
<jeongkyu> But I haven't done it for testers. :-)<br />
<maho> jeongkyu: you can ask community council budget for some supports<br />
<khirano> Users are always waiting for nice and good and new releases of their language, I am sure.<br />
<maho> khirano right<br />
<jeongkyu> Right<br />
<Forestcheng> community council budget? I just get to know.<br />
<maho> Forestcheng: http://blog.livedoor.jp/maho_nakata/archives/51110252.html<br />
<Forestcheng> Maho: thanks!<br />
<khirano> Let us keep sharing our experience including "budget" on the list ? :)<br />
<Forestcheng> yes<br />
<maho> I was asked by a person in FreeBSD community that please update your port and I'll give you 100Euro :)<br />
<jeongkyu> But, I believe that donation could be a way to participate in the community.<br />
<maho> jeongkyu: right:<br />
<khirano> jeongkyu: Indeed!<br />
<khirano> If you get an idea to how to promote donation, please give us those ideas to the list.<br />
<Forestcheng> The better marketing, the more users, and the more contributions.<br />
<khirano> Any question on the 3.1 releases?<br />
<khirano> Forestcheng: Yes!<br />
<jeongkyu> If there is no question then let's move into next item.<br />
<Forestcheng> OK!<br />
<maho> ok<br />
<khirano> 2. RegiCon Asia 2010 Spring in Seoul<br />
<khirano> Jeongkyu: Have you talked with Peter about his visit to Korea?<br />
* Jihui_Choi (n=Jihui_Ch@219.248.47.90) は #ooonlc へ参加しました。<br />
<maho> Hi Jihui<br />
<jeongkyu> khirano: Not yet.<br />
<khirano> Hi JiHui<br />
<jeongkyu> Hi JiHui<br />
<Forestcheng> Welcome! JiHui<br />
<Jihui_Choi> hi,all.<br />
<Jihui_Choi> I'm sorry. I'm late. ^^;<br />
<khirano> jeongkyu: OK. Do you have any concrete plan about the RegiCon?<br />
<Forestcheng> No so late! We're talking RegiCon Asia 2010 Spring in Seoul<br />
<khirano> jeongkyu: Venue? Date? Sponsors?<br />
<jeongkyu> khirano: Not yet.<br />
<Jihui_Choi> Forestcheng: Thank you. And it's Great. I'm really exciting about it.<br />
<jeongkyu> khirano: Before making concrete plan, I want to talk about 'what we want to achieve through RegiCon'.<br />
<khirano> jeongkyu: Sure, you are right.<br />
<khirano> "What to Achieve through RegiCon"<br />
<Jihui_Choi> So.. What do you expect through RegiCon, jeongkyu and khirano?<br />
<Jihui_Choi> I'd like to know your(both) thoughts.<br />
<khirano> To start discussion about "What to Achieve through RegiCon" on the list will be my AI :)<br />
<khirano> But I tell you now. How to get quality localized OpenOffice.org for Asian people<br />
<khirano> Then we can make good marketing of OpenOffice.org in Asia :)<br />
<maho> aha - that's a point<br />
<Forestcheng> I think the OOo quality is quite good, But compared with MS Office, there're still some bugs or inconvenience.<br />
<maho> khirano : and this can be "egg" or "chicken" problem IMHO<br />
<khirano> Forestcheng: Right. So we have to get more Asian developers and contributors.<br />
<Forestcheng> :)<br />
<Jihui_Choi> I agree with Forestcheng. But I'm feeling to need something more. especially about marketing and education.<br />
<jeongkyu> For me, 'to get familiar with each other' is the most important thing in the RegiCon. :-)<br />
<khirano> So we have many things to achieve through the Regicon in Seoul, right?<br />
<Forestcheng> I don't know if some new great chance for OOo after Oracle bought Sun.<br />
<maho> khirano: :)<br />
<maho> jeongkyu: +1 and I 've never been to Seoul<br />
<maho> and I'd like to go.<br />
<khirano> Forestcheng: It is a Chance!<br />
<Jihui_Choi> How many OOo developers are in china and japan?<br />
<maho> very small<br />
<Forestcheng> Seoul is friendly city! I got two help when going to hotel from airport by subway.<br />
<khirano> Forestcheng: You should keep watching what our Marketing project lead and colead are saying about Oracle buying Sun :)<br />
<maho> "good" developers usually very busy so they only subscribe mainstream mailing list<br />
<maho> Forestcheng : http://www.linux-magazine.com/online/news/openoffice_future_uncertain<br />
<khirano> Forestcheng: Do you have a plan to go to Seoul with Peter?<br />
<Forestcheng> Khirano: Thanks for your remind.<br />
<maho> this is what khirano e-mailed to me today<br />
<Forestcheng> Not yet.<br />
<khirano> Forestcheng: But it can be realized, right?<br />
<Forestcheng> Maybe :)<br />
<khirano> I will talk with Peter about your trip to Seoul and meeting with Jeongkyu and JiHui.<br />
<jeongkyu> khirano: Sounds good.<br />
<khirano> JiHui: How long does it take for you to go to Seoul from your place?<br />
<Jihui_Choi> khirano: Oh god.. I'm afraid of I can't see you.<br />
<Jihui_Choi> I may go to Canada in early July.<br />
<Forestcheng> IBM has a develop team, but I don't how many contribution from them.<br />
<jeongkyu> khirano: It takes 5 hours by bus and 1 hour my air from my place to seoul.<br />
<maho> Forestcheng: right. I don't see postings to MLs. Klaus (IIRC) told us that their contribuiton to the community is "C"<br />
<Jihui_Choi> khirano: and I moved in seoul.<br />
<jeongkyu> khirano: JuHui is currently living in Seoul.<br />
<khirano> Jihui: Maybe we can discuss when Peter, Forestcheng and others will come to Seoul :)<br />
<jeongkyu> khirano: Sure.<br />
<khirano> jeongkyu: Good News!<br />
<Forestcheng> Maho: what's meaning "C"<br />
<maho> A is the best, and B is the second. C is not so good @OOoCon2008 Beijing<br />
<khirano> OK, our AI: we will talk with Peter about Seoul traveling schedule :)<br />
<jeongkyu> khirano: Good! Let's talk about what I have to prepare in Seoul, and what you guys can help in detail when we meet.<br />
<khirano> Any question about RegiCon in Seoul?<br />
<jeongkyu> No question, then let's move into next item.<br />
<khirano> OK, we move to More CJK Group Coordinators<br />
<Forestcheng> No more.<br />
<khirano> did you find any kind volunteer? :)<br />
<Forestcheng> no one from volunteer :(<br />
<Jihui_Choi> What is the CJK Group Coordinator?<br />
<khirano> if you see: http://wiki.services.openoffice.org/wiki/CJK_Group/Minutes#The_1st_IRC_meeting_2009-03-21<br />
<jeongkyu> here is Korean explanation<br />
<jeongkyu> http://openoffice.or.kr/blog/?p=735<br />
<Jihui_Choi> Thank you, khirano and jeongkyu. :)<br />
<khirano> Thanks, joengkyu!<br />
<jeongkyu> JiHui: I though you already saw it.<br />
<Jihui_Choi> I alreay read both article.<br />
<khirano> Jihui: I am sure you are one of good candidates :)<br />
<Jihui_Choi> I wanted something more. However now I think I get it. :)<br />
<khirano> Jihui: Good! you want to volunteer?<br />
<Jihui_Choi> khirano: I really want. But I'll stay in cadata from july this year to May next year.<br />
<Jihui_Choi> in Canada ;;<br />
<Forestcheng> So long<br />
<khirano> Jihui: No problem. You can help us from any part of the world :)<br />
<maho> :)<br />
<khirano> Jihui: Help us from Canda<br />
<khirano> Canda/Canada<br />
<Jihui_Choi> Yes I know But I'm afraid of I can't do anything to help about Seoul Reicon.<br />
<Jihui_Choi> Anyway even I'm a very poor guy but if you're ok, I want to get it.<br />
<khirano> Jihui: Yes you can! You give us good ideas.<br />
<khirano> All: We have got a new CJK group coordinator now!<br />
<Forestcheng> JiHui: you can tell your friends in Canada to use OOo. That'll be great help to OOo!<br />
<khirano> JiHui: I am happy to work with you :)<br />
<Jihui_Choi> thank you khirano. I don't know exactly what shall I do. But I'll do my best.<br />
<Jihui_Choi> :)<br />
<maho> congratulations<br />
<Forestcheng> +1<br />
<jeongkyu> +1<br />
<khirano> Thanks all, then we move to next item.<br />
<Jihui_Choi> thank you, all.<br />
<maho> applause<br />
<khirano> 4. Zh is planning to translate OOo3.0 UserGuide in OOoAuthors<br />
<maho> Really?????? great news<br />
<Jihui_Choi> khirano: you mean OOO 3.0 getting started ?<br />
<khirano> Which English version are you translating? Forestcheng?<br />
<Forestcheng> it's OOo 3.0 in http://oooauthors.org/en<br />
<Jihui_Choi> Great.<br />
<Jihui_Choi> We're also translating it. http://openoffice.or.kr/blog/?p=623<br />
<Forestcheng> It's time consuming work. How Ko and Ja think of this? Do you have OOo UserGuide in local language? or related documents such as: tips,skills,advanced or useful features...?<br />
<Jihui_Choi> I translated to ch5<br />
<Forestcheng> Great to Ko!<br />
<maho> Forestcheng: no hesitations to say go for JA. We can expect a lot of volunteers :)<br />
<khirano> maho: does ja have Japanese version of this document?<br />
<maho> IIRC no<br />
<jeongkyu> And I translated the guide some years ago, and now outdated. It is 120 page manual.<br />
<jeongkyu> version. Here<br />
<jeongkyu> http://openoffice.or.kr/blog/?p=234<br />
<Jihui_Choi> Right. We-ko- have two version of that documents.<br />
<khirano> jeongkyu. jihui: Great! isn't it!<br />
<maho> yes great! ko team<br />
<Forestcheng> for Now: Do you translate from beginning of guide or just select some chapters?<br />
<jeongkyu> As Forestcheng said, it is very time consuming to translated the every chapter of the guides.<br />
<Jihui_Choi> But I envy you, ja. we don't have any book material. something for education.<br />
<khirano> how many korean friends did that translation?<br />
<jeongkyu> So, my initial work was to translate chapters for overall features and well used programs, such as writer, calc, and impress.<br />
<maho> translation is one good step to contribute to OOo<br />
<Jihui_Choi> Forestcheng: In case of jeongkyu, I think he translated what he needed. But in my case, I'm translating from start to end<br />
<Jihui_Choi> khirano: unfortunately, but many.<br />
<Jihui_Choi> Maybe jeongkyu and me?<br />
<khirano> Jihui: Only two translators did that work!<br />
<maho> Kubota Takaya san (now he is the coordinator) does good coordination<br />
<Jihui_Choi> yes. jeongkyu translated at first. and now I'm translating new and improving his works.<br />
<khirano> Forestcheng: What do you need to get the translation completed?<br />
<Jihui_Choi> Forestcheng: And How many people and how long do you expect for it?<br />
<Forestcheng> We've got volunteers about 5 person.<br />
<khirano> "Five" is a great number.<br />
<Jihui_Choi> wow.. cool<br />
<maho> great<br />
<Forestcheng> I think we need to translate efficient. To translate what users really need to read.<br />
<zlh> Yes, I agree.<br />
<maho> do you use SUN's translation memory?<br />
<Forestcheng> Not to translate everything. We've had some guide. We need re-organizing these documents.<br />
<Jihui_Choi> right. there're reawlly many document in wiki. But we have to make the order of priority.<br />
<khirano> Maybe Jeongkyu and JiHui can advise Forestcheng about priority, I mean which chapter should be translated first<br />
<Jihui_Choi> khirano: yes. but I think Forestcheng and all already know.<br />
<Forestcheng> Maho, we used Sun's TM in pootle translation.<br />
<maho> thanks<br />
<maho> Jihui and jeongkyu do you use SUN's translation memory<br />
<zlh> I think one of the material users need most is How to achieve the functions that operations other than MS office operation<br />
<Forestcheng> Jihui: you're welcome to tell me your thinking.<br />
<jeongkyu> khirano: I figured out the priority from the number of questions in KO forum. The number reflects which application is used most.<br />
<Jihui_Choi> Sure. we used the TM from Sun's and our own TM.<br />
<khirano> jeongkyu: That will be good infomation<br />
<zlh> I offen hear from users: How to do this? how to do that? they used to operation like MS office. and they don't know how to do the same thing with OOo.<br />
<jeongkyu> khirano: have a look at the number at the right - http://openoffice.or.kr/forums/<br />
<maho> zlh : yes. this is what I hear from the community<br />
<Jihui_Choi> zlh: me, too. But because of it, we have to make and translate documents.<br />
<jeongkyu> khirano: In Korea, writer and calc are absolutely popular then other applications.<br />
<khirano> jeongkyu: I see it. Good one.<br />
<maho> zlh : if you have a list, please publish. Then all will start translation really immedeately!<br />
<maho> a list = some operations that do in the way like MS Office<br />
<zlh> maho: I'll collect some.<br />
<maho> ok really important. you can post to [qa-dev] ML!<br />
<zlh> Ok<br />
<maho> oh UX ML might be appropreate<br />
<maho> more appropreate<br />
<maho> thanks zlh<br />
<zlh> You're welcome.<br />
<khirano> We have had good info from ko and zh community now.<br />
<khirano> AI for me: I will make a wiki page to show these good info :)<br />
<khirano> And new CJK coordinator will help me :)<br />
<Forestcheng> Khirano: thanks!<br />
<jeongkyu> Sounds good.<br />
<maho> thanks<br />
<khirano> OK, next item.<br />
<khirano> Next Meeting and How to get more people who can attend an IRC meeting<br />
<zlh> I found OOo3.1 has fixed 27 bugs submitted by our team.<br />
<maho> zlh can you blog it?<br />
<maho> do you have a blog?<br />
<zlh> Yes, I will.<br />
<zlh> 20 of them are submitted after OOo300m9.<br />
<maho> please do so. you can ask planet.go-oo.org too<br />
<maho> all good developers read planet.go-oo.org every day.<br />
<khirano> zlh: I am looking forward to seeing your blog :)<br />
<maho> and you must show up as another hero<br />
<zlh> thanks:)<br />
<khirano> Next Meeting and How to get more people who can attend an IRC meeting<br />
<maho> Get members in subproject and find motivated members :)<br />
<khirano> maho: Yes we will.<br />
<Forestcheng> Sure!<br />
<khirano> Aroud 13:00-14:00 is good for you all?<br />
<zlh> I think How to join the meeting is a important information. So I add Server and Channel section in Wiki page of CJK group<br />
<jeongkyu> khirano: No problem for me.<br />
<maho> zlh: good point. marketing<br />
<khirano> zlh: you are right! I will.<br />
<maho> marketing, marketing<br />
<khirano> maho: :)<br />
<zlh> I added.<br />
<maho> great<br />
<Forestcheng> :)<br />
<khirano> zlh: Thanks!<br />
<zlh> How about choose a time that nobody's lunch time?<br />
<khirano> zlh: :)<br />
<maho> take lunch eariler or prepare a lunch box (I bought a lunch box and onigiri today)<br />
<khirano> Yes, I am sure I will think about it indeed!<br />
<khirano> I am hungry really.<br />
<maho> :)<br />
<Forestcheng> You can mark busy during lunch time :)<br />
<zlh> maybe someone like sdq must go for lunch, or they will miss the lunch time and have nothing to eat. so they have to absent.<br />
<jeongkyu> me too!<br />
<maho> :(<br />
<maho> 14:00-16:00?<br />
<Forestcheng> Great time!<br />
<jeongkyu> nice for me.<br />
<zlh> very good for us:)<br />
<maho> ok to me too :)<br />
<Jihui_Choi> yes. it's good. actuall I'm hungry, too<br />
<khirano> OK, all<br />
<Forestcheng> I must have something to eat!<br />
<maho> oh all are hugry except for me<br />
<khirano> I will propose around 14:00-16:00 next time :)<br />
<zlh> I have had some cookies just now:)<br />
<khirano> OK, everyone, any question?<br />
<Forestcheng> Have a good appetite! So would we finish?<br />
<jeongkyu> No question for me.<br />
<maho> no questions<br />
<zlh> No questions.<br />
<Jihui_Choi> me, too<br />
<Forestcheng> Then See you! Bye!<br />
<khirano> Thanks all, now I will get someting to eat now.<br />
<khirano> The meeting is closing<br />
<Jihui_Choi> yeah. Thank you, all see you next<br />
<maho> see you all thank you all!<br />
<jeongkyu> Bye now... See you again!<br />
* jeongkyu (n=chatzill@125.136.69.54) は #ooonlc から離れました。<br />
<khirano> Thanks all, see you!<br />
<zlh> so long, have a great day!<br />
<br />
</pre><br />
<br />
[[Category:CJK issues]]</div>Kirkhttps://wiki.openoffice.org/wiki/CJK_Group_Log_20090321CJK Group Log 200903212009-12-04T06:31:49Z<p>Kirk: </p>
<hr />
<div>= Log of the first CJK IRC Meeting on March 21, 2009 =<br />
It started around 18:00 and ended around 19:45 [http://www.timeanddate.com/worldclock/fixedtime.html?day=21&month=3&year=2009&hour=18&min=0&sec=0&p1=235 Seoul Time].<br />
The log of the meeting was taken by maho.<br />
<br />
Attendees: Aijin Kim(aijin), Lin, Cheng(forestcheng), Jeongkyu Kim(jeongkyu), Kazunari Hirano(khirano), Katsuya Kobayashi(kynh), Li Heng(liheng), Nakata, Maho(maho_), Peter Junge(peter13j), Sophie Gautier(sophi1). [http://ui.openoffice.org/VisualDesign/OOo_poster.html#l10n_1 You can meet them.] See [http://wiki.services.openoffice.org/wiki/CJK_Group/Minutes#Minutes Minutes].<br />
<pre><br />
<nowiki><br />
* forestcheng (n=forestch@61.51.151.252) は #ooonlc へ参加しました。<br />
<forestcheng> Hi, Khirano San<br />
<forestcheng> and hello to maho :)<br />
<maho_> HI all, khirano!<br />
<khirano> Hi Cheng Lin<br />
<maho_> hello forestcheng<br />
<khirano> Hi Maho<br />
<maho_> ah - you are chengling<br />
<forestcheng> yes, I'm Cheng Lin<br />
<forestcheng> forestcheng is my OOo account name.<br />
<maho_> ling = forest, right?<br />
<forestcheng> Yes, 林 = forest, CHENG is my family name.<br />
<maho_> We also pronounce as "lin"<br />
* liheng (n=temp@114.255.42.178) は #ooonlc へ参加しました。<br />
<forestcheng> Great!<br />
<liheng> forestcheng:Hi :)<br />
<maho_> hi liheng<br />
<forestcheng> Hi, Liheng is coming in. He's my colleague, lead of OOo<br />
performance.<br />
* kynh (n=kynh@i121-113-71-120.s42.a013.ap.plala.or.jp) は #ooonlc へ参加<br />
しました。<br />
<liheng> Thank you, forestcheng!<br />
<liheng> Hi, maho_<br />
* jeongkyu (n=chatzill@125.136.69.121) は #ooonlc へ参加しました。<br />
<kynh> Hi all, connected as kynh. I'm Katsuya Kobayashi, JA marketing<br />
project member.<br />
<maho_> Hi kobayashi-san, (kynh)<br />
* peter13j (n=peter13j@222.28.253.158) は #ooonlc へ参加しました。<br />
<peter13j> Hi everyone :)<br />
<forestcheng> Hi, Peter, Liheng and me is here.<br />
<peter13j> Great!<br />
<liheng> Hi, peter13j good afternoon<br />
<peter13j> Hi Li Heng<br />
<maho_> Hello Peter13j<br />
<peter13j> Hi maho_<br />
<kynh> Hi peter, I'm glad to see you all again since OOoCON2008.<br />
<peter13j> Hi kynh<br />
<khirano> 안녕하세요? Hello in Korean :)<br />
<jeongkyu> Hello~<br />
<jeongkyu> You're Korean is nice :-)<br />
<khirano> 你好 Hello in Chinese :)<br />
<maho_> Hello jeongkyu<br />
<jeongkyu> Hello Maho<br />
<peter13j> Hi Hirano-san, thanks for pushing the OOoRegioCon :)<br />
<maho_> khirano: how you type chinese and korean?<br />
<khirano> こんにちは Hello in Japanese :)<br />
<maho_> yes OOo regicon is very important<br />
<sophi1> Hi all :)<br />
<khirano> Hi Sophie<br />
<khirano> Nice to have you here :)<br />
<maho_> Hello Sophie<br />
<maho_> thanks for attending...<br />
<kynh> Thanks logon from fr.<br />
<sophi1> khirano: maho_: thank you and thank you also for organizing<br />
this meeting<br />
<forestcheng> Good morning to France.<br />
<sophi1> thank all you for you welcome :)<br />
<maho_> no just khirano is organizing...<br />
<khirano> Hi all, glad to have you all here to meet and talk.<br />
<khirano> Can we start the meeting?<br />
<kynh> This is 1st meeting covered 5 lang or more, is'nt it?<br />
<maho_> maybe :(<br />
<maho_> maybe :)<br />
<maho_> sorry<br />
<khirano> Can I chair this meeting?<br />
<forestcheng> Japanese, Korean, Chinese, Franch, German.<br />
<liheng> English ;)<br />
* peter13j thinks khirano should chair the meeting<br />
<kynh> Sure you are chair, pls khirano.<br />
<maho_> khirano, yes. could you please start?<br />
<khirano> Thanks.<br />
<khirano> Who's taking a log of this meeting?<br />
<maho_> ok I'll do<br />
* aijin (n=aijin@123.113.113.63) は #ooonlc へ参加しました。<br />
<khirano> I "often" fail to log IRC meetings ;) Thanks, Maho :)<br />
<maho_> hi aijin<br />
<khirano> Hi Aijin!<br />
<jeongkyu> Hi Aijin<br />
<aijin> hi all<br />
<khirano> 안녕하세요?<br />
<maho_> annonhasimunika<br />
<aijin> khirano, maho_ ,안녕하세요!<br />
<khirano> Log of this meeting will be published on the wiki.<br />
<maho_> +1<br />
<liheng> +1<br />
<forestcheng> +1<br />
<peter13j> +1<br />
<sophi1> khirano: +1 and great, it will help other group<br />
<khirano> OK, now I hope you all have read agenda :)<br />
<maho_> sure<br />
<khirano> 1. How to get more QA and L10N TCM testers for quick and<br />
stable releases<br />
<khirano> 2. Possibilities of OpenOffice.org Regional Conference in Asia<br />
<forestcheng> yes, The same question as: How do your OOo community<br />
call for more volunteers? Or how about marketing? how to get more<br />
people to know OOo?<br />
<khirano> 3. Benefits of the group in general<br />
<khirano> 4. More coordinators for the group<br />
<khirano> 5. Next IRC meeting<br />
<khirano> forestcheng: Right!<br />
<khirano> OK, let us start with 1.<br />
<forestcheng> How about us? My question: Though my work is related to<br />
OOo, I can only spent part time on OOo. How about you? are you full<br />
time or part time? can you get paid from OOo work?<br />
<maho_> JA resut for 1. four testers + two managers, total five person<br />
(one manger was tester)<br />
<kynh> Nice viewpoint, forestcheng, It's a marketing matter.<br />
<khirano> I am just a volunteer :)<br />
<forestcheng> Great to Khirano!<br />
<maho_> me too;)<br />
<forestcheng> But Maho, it seems You've been spending much time on OOo.<br />
<maho_> haha<br />
<maho_> I e-mail while compiling ;)<br />
<forestcheng> compiling OOo?<br />
<maho_> it takes very small time, many parts are automated.<br />
<khirano> Let me start with these questions, - How was 3.0.1 QA? How<br />
many testers did you get?<br />
<maho_> but - sometimes it takes very loooong time<br />
<maho_> okay khirano<br />
<peter13j> My question would be: Will more testers really help quick<br />
and stable releases? ...<br />
<khirano> forestcheng: can you tell us about zh project?<br />
<maho_> jeongkyu : how about ko?<br />
<maho_> Mechtilde how about de?<br />
<forestcheng> We got about 10 testers in 3.0 and 3.1<br />
<maho_> sophi1: how about fr?<br />
<forestcheng> but most of testers are from our company. :(<br />
<liheng> peter13j:Yes, I think how to finish the test is more<br />
important for helping releases<br />
<jeongkyu> We had 4 testers for 3.0.<br />
<maho_> jeongkyu : thanks, are they volunteers?<br />
<sophi1> for fr there is between 10 and 15 testers it depends of the<br />
period, they are all volunteers<br />
<peter13j> liheng: well, following the mailing lists, the current<br />
problems seem mostly be before QA<br />
<jeongkyu> Sure, everybody in Koerean community is volunteer.<br />
<liheng> peter13j:Okay<br />
<khirano> jeongkyu: Thanks. do you need more testers?<br />
<maho_> khirano: thanks for good question<br />
<forestcheng> as for zh, we can get near 10 volunteers, but often they<br />
can't be available during testing period.<br />
<sophi1> peter13j: I think the first step is to have more testers for<br />
rc, then we will be able to attract them also for testing dev release<br />
and have more testers earlier in the QA process<br />
<maho_> sophi1: interesting.<br />
<maho_> JA proejct has a very good tester, matuaki-san<br />
<kynh> Important point, Sophie.<br />
<maho_> he always publish his results when rc s are available.<br />
<peter13j> sophi1: That's the problem. large testting effort starting<br />
at rc is probably too late<br />
<maho_> our release heavily depend on his activity<br />
<forestcheng> yes, kynh, how about OOo marketing in Japan? it should<br />
be helpful to more testers.<br />
<kynh> In JA, full time few Sun mambers join with us, but they work<br />
with all OSS products of Sun, as G11n, do'nt you maho?.<br />
<maho_> yes.<br />
<maho_> so - SUN empolyees not always participate release process.<br />
<forestcheng> it's same with Sun Beijing G11n. right? Aijin.<br />
<aijin> actually Sun people run test OO.o build on Solaris platform.<br />
<khirano> jeongkyu and aijin: - How was 3.1 L10N TCM? How many testers<br />
did you get?<br />
<maho_> JA marketing project is now preparing. khirano is the coordinator.<br />
<sophi1> peter13j: too late for the release, but it allows to build a<br />
group. Rc are less frightening than dev releases :)<br />
<maho_> JA: the number of participant is about 20.<br />
<maho_> for l10n TCM.<br />
<peter13j> sophi1: :)<br />
<forestcheng> Great, Can you share your marketing idea?<br />
<maho_> I asked Naoyuki-san (sun) and write an announcement<br />
<maho_> actually I wrote it<br />
<maho_> announcement should contain all relevant infomation<br />
<maho_> wait...<br />
<maho_> slow ja.oo.o site...<br />
<aijin> khirano, I did run test in l10n TCM, not sure if other Korean<br />
members used TCM for testing. jeongkyu, can you confirm?<br />
<maho_> the announement contains : object<br />
<jeongkyu> khirano: We could not do 3.1 L10n testing through TCM this time.<br />
<maho_> method, who can participate, period, and details.<br />
<maho_> also - title is important.<br />
<kynh> announcement and show prosess of testing is important,<br />
<maho_> usually JA people want to test how well localized to Japanese<br />
<maho_> kynh : yes<br />
<jeongkyu> khirano: Instead, 3 testers including me had done basic<br />
testing outside of TCM.<br />
<kynh> In fr, de, does the testers understand the process of feedback<br />
bug issue when RC phase testing?<br />
<khirano> aijin and jeongkyu: Thanks! Do you think more testers will<br />
be helpful for quick and stable releases of Korean builds?<br />
<maho_> so the title was "to reduce the Japanese related bugs for 3.1<br />
release, call for testers for l10n TCM"<br />
<sophi1> kynh: yes, they report issue they meet during testing on our qa <br />
list<br />
<forestcheng> Another problem: When build RedOffice from OOo, our<br />
testers often find much more bugs, but many of bugs can't be solved<br />
quickly. More developers are needed!<br />
<kynh> sphi1: do you have any meeting as IRC in fr qa project?<br />
<aijin> khirano, it should be, and I think it's important to get some<br />
testers who can continueously participate.<br />
<khirano> aijin: Right!<br />
<maho_> ome testers who can continueously participate. : aijin : right<br />
<liheng> foreshcheng:All software is same, but we need only decide<br />
which bugs must be solved<br />
<kynh> aijin: +1<br />
<jeongkyu> khirano: Aijin said what I wanted to say. :-)<br />
<khirano> Jeongkyu: Sure I see :)<br />
<khirano> So we will share our experience how to get more testers and <br />
developers<br />
<forestcheng> khirano: Great! Thanks!<br />
<khirano> please help, maho, sophie and others, ok?<br />
<maho_> yes.<br />
<khirano> Let us do share them on the list,<br />
com@native-lang.openoffice.org later :)<br />
<sophi1> on the marketing side, I think l10n testing could be directed<br />
to trainers because they have to know about new features for their<br />
work<br />
<sophi1> khirano: ok :)<br />
<khirano> sophi1: right!<br />
<maho_> trainers?<br />
<kynh> trainer task, good point!<br />
<forestcheng> sophi1: Yes, we've translated OOo 3.1 new feature in<br />
Chinese and posted in zh project.<br />
<sophi1> maho_: people who give lessons on OOo practice<br />
<khirano> forestcheng: great!<br />
<maho_> okay<br />
<sophi1> forestcheng: very good idea :)<br />
<khirano> forestcheng: we are doing the same on the wiki now :)<br />
<maho_> forestcheng : great.<br />
<maho_> yes :)<br />
<forestcheng> And we're trying to get terry to help us setting up<br />
Chinese OOo forum.<br />
<forestcheng> Forum is better than mailinglist for training.<br />
<forestcheng> and discussion.<br />
<maho_> why?<br />
<forestcheng> why to what?<br />
<maho_> discussion. topics are not lost and shared by users?<br />
<khirano> OK, we share our works, what good we are doing, what tools<br />
like announce list, wiki, forum and others do we use to promote QA<br />
testing etc, on the com@native-lang.openoffice.org<br />
<khirano> What do you think?<br />
<forestcheng> ++1<br />
<sophi1> khirano: +1<br />
<maho_> +1<br />
<aijin> +1<br />
<jeongkyu> +1<br />
<liheng> +1<br />
<peter13j> +1<br />
<khirano> Now we move to 2. Possibilities of OpenOffice.org Regional<br />
Conference in Asia<br />
<kynh> +1, and Specification fixing time is late, but we need to<br />
understand what will we need to define new test case for the new<br />
featueres.<br />
<kynh> go ahead.<br />
<forestcheng> +1 After OOoCon2009Orvieto<br />
<khirano> kynh: Thanks. I got the point.<br />
<khirano> forestcheng: OK, can you give us a reason?<br />
* peter13j seconds forestcheng<br />
<khirano> Peter: OK, can you give us a reason?<br />
<peter13j> khirano: RegioCon should be not too close too OOoCon ...<br />
<forestcheng> We need enough time to find topics in ReginalCon.<br />
<peter13j> ... if we have it lets say in August it's not so much time<br />
to organize it<br />
<kynh> How is kr?<br />
<khirano> If you say after Orvieto, it may be held around December or<br />
2009 January or 2009 Spring?<br />
<jeongkyu> kyhn: Are you asking about time frame?<br />
<kynh> No, need F2F or not soon, kr.<br />
<peter13j> khirano: I guess you mean 2010 spring?! Yes, would be a good <br />
time<br />
<khirano> Sorry yes, 2010 Spring ;)<br />
<peter13j> So,we could have RegioCon in spring OOoCon in autumn<br />
<peter13j> That would be a good frequency for the future<br />
<maho_> +1 for peter13j<br />
<liheng> +1 for peter13j<br />
<forestcheng> +1 for peter.<br />
<jeongkyu> +1 for 2010 spring<br />
<kynh> +1, and Before end of 2010 goals, I hope that it is mature each<br />
lang project governance. So after Orvieto is better, I think.<br />
<aijin> +1<br />
<khirano> Spring is a good season for Asia, warm :)<br />
<peter13j> :)<br />
<maho_> flower powder is serious in Japan<br />
<maho_> :)<br />
<khirano> jeongkyu: Now can you host RegiCon Asia in 2010 Spring?<br />
<jeongkyu> The decision for the location was already made? :-)<br />
<khirano> Not Yet!<br />
<khirano> You decide :)<br />
<jeongkyu> ha ha... Let's talk about the location now.<br />
<peter13j> jeongkyu: Would Seoul apply?<br />
<maho_> Souel?<br />
<maho_> Seoul<br />
<maho_> sorry<br />
<kynh> jeongkyu: yes, you just proposed on com@<br />
<khirano> Jeongkyu: Seoul sounds good!<br />
<jeongkyu> If you don't object, then I'd like to host the conference.<br />
* peter13j applauds :)<br />
<jeongkyu> :-)<br />
* sophi1 joins peter13j :)<br />
<maho_> great<br />
<kynh> Where is easier to join for zh mambers?<br />
<forestcheng> both of Korea and Japan is OK<br />
<kynh> OK, Peter will help how to hosting the meeting. :)<br />
<khirano> OK, we will start a planning discussion "RegiCon Asia 2010<br />
Spring in Seoul" on com@native-lang.openoffice.org, OK :)<br />
<peter13j> +1<br />
<aijin> +1<br />
<jeongkyu> +1<br />
<sophi1> khirano: +1<br />
<kynh> khirano: +1<br />
<peter13j> kynh: Yes.<br />
<kynh> Thanks, peter.<br />
<khirano> Thanks all, then we move to 3. Benefits of the group in general<br />
<maho_> +1<br />
<kynh> okay<br />
<forestcheng> +1<br />
<khirano> - What have Group helped group member projects such as zh,<br />
ko, ja projects?<br />
<khirano> Is the group helpful? :)<br />
<forestcheng> Yes! CJK has many common layout and align feature.<br />
<maho_> yes. recently we are talking about such kind of things<br />
<liheng> +1<br />
<aijin> we can share common issues. I know 'cjk' keyword are used in<br />
IssueTracker.<br />
<forestcheng> It's much better if getting developer from CJK together.<br />
<maho_> yes I introduced this keyword<br />
<maho_> "CJK"<br />
<aijin> maho_: great!<br />
<maho_> please use "cjk" keyword if you find CJK issues.<br />
<maho_> in IssueTracker.<br />
<khirano> maho: For Issue Tracker, right?<br />
<maho_> yes<br />
<khirano> Right.<br />
<jeongkyu> (Sorry, I got to go now. I will check IRC log later and<br />
join the discussion at mailing list.)<br />
<maho_> thanks jeongkyu<br />
<khirano> Sure, jeongkyu<br />
<jeongkyu> :-)<br />
<maho_> see you seoul<br />
<aijin> jeongkyu: see you<br />
<kynh> thanks jeongkyu<br />
<khirano> Nice to have you here and thanks for RegiCon in Seoul :)<br />
<sophi1> jeongkyu: bye !<br />
<forestcheng> thanks and see you to Jeongkyu.<br />
<khirano> Continues..., then - How can Group help group member<br />
projects such as ko, zh, ja projects more?<br />
<khirano> What do you expect more?<br />
<maho_> I'm tracking [Issue 84405] meta issue to track issues<br />
discovered by RedFlag2000 QA<br />
<khirano> I do too, maho<br />
<kynh> What is our common issues?<br />
<maho_> Sundongmei from RedOffice e-mail us helping implement grid layout <br />
...<br />
<maho_> via forestcheng.<br />
<maho_> khirano do you subscribe dev@zh or dev@ko<br />
<maho_> ?<br />
<khirano> Yes, I do :)<br />
<maho_> great.<br />
<khirano> Even if I don't read Korean and Chinese :)<br />
<kynh> I think that marketing matter for each lang refered another<br />
lang is important.<br />
<maho_> kynh : for common issue, we can make use of issue tracker with<br />
"CJK" keyword<br />
<forestcheng> Great to Khirano, Now you've chance to learn Korean and<br />
Chinese. :)<br />
<maho_> "CJK" is not common currently though.<br />
<kynh> maho: I see.<br />
<maho_> kynh : yes.<br />
<khirano> forestcheng: Right! I am happy to learn them<br />
<maho_> Sundongmei cannot read my e-mail using Kanji.<br />
<maho_> her e-mail client doesn't support Japnese Kanji ;(<br />
<khirano> With Group, "sharing many things like issues, experiences<br />
etc." is important.<br />
<maho_> do we read/write CJK characters? can we exchange e-mails ?<br />
<forestcheng> if you use UTF-8 encoding, I think she should can.<br />
<maho_> yes.<br />
<sophi1> maho_: may be you should mail about CJK keyword ont the QA<br />
and l10n list, so every body is aware and can add it to the issue<br />
related to CJK ?<br />
<forestcheng> it's better to use UTF-8 encoding in email for CJK.<br />
<maho_> sophi1 " thanks<br />
<khirano> We should utilize various tools to promote "sharing"<br />
<maho_> forestcheng : right. even though Japanese should use<br />
ISO-2022JP for e-mails<br />
<maho_> sophi1: this is marketing issue :)<br />
<sophi1> maho_: yes :)<br />
<khirano> like issue tracker, wiki, mailing list and so on, we can use<br />
them to share many things.<br />
<kynh> Sophie: yes :)<br />
<maho_> forestcheng, aijin : which encoding do you use?<br />
<aijin> maho_: i use utf-8 , but some ko members use euc-kr<br />
<maho_> okay.<br />
<forestcheng> My email client can use many encoding. I often need to<br />
set UTF-8 if CJK.<br />
<kynh> I think that technical matter for 2bye area is same as other<br />
lang locations , is't it? How do you think?<br />
<kynh> But the standards of code is deferent in each lang by national <br />
policy.<br />
<khirano> Let us talk about "encoding" another chance? :)<br />
<maho_> yes.<br />
<kynh> +1: khirano.<br />
<khirano> OK, Group is helpful :) And we can do more to share<br />
<khirano> I think, to do more, 4. More coordinators for the group, needed <br />
:)<br />
<forestcheng> +1 khirano<br />
<maho_> coordinate the subproject within native lang project.<br />
<maho_> ?<br />
<aijin> khirano: can we define the detail role of coordinator?<br />
<khirano> aijin: yes.<br />
<khirano> CJK group coorinators "coordinate" :)<br />
<khirano> Coordinate means gettng touch with member project leads,<br />
listening to their needs<br />
<khirano> Taking up issues and putting them on agenda, and leading <br />
discussion<br />
<kynh> khirano: over?<br />
<khirano> for example, the wiki, the IRC meeting, raising issues on<br />
the mailing list and so on<br />
<khirano> http://wiki.services.openoffice.org/wiki/CJK_Group<br />
<khirano> This wiki page is not organized, not updated<br />
<khirano> I need help, good idea and making this page more informative<br />
and helpful for group member projects<br />
<kynh> maho: do you mean that leagional group of NLC will make<br />
relations with each coordination subproject in each lang prject,<br />
right?<br />
<maho_> naively, right.<br />
<khirano> A biggest task for CJK group coordinators will be Organizing<br />
OOoRegiCon Asia 2010 Seoul :)<br />
<maho_> right.<br />
<khirano> - Can we have coordinators from ko and zh?<br />
<sophi1> maho_: I think it's a good idea, it's still early because<br />
there is only few groups and this one is the most active<br />
<khirano> Candiates? Nomination?<br />
<maho_> ah - understand<br />
<kynh> Sophie, How does the other leaginal group make relations , do you <br />
know?<br />
<maho_> sophi1 : thanks<br />
<maho_> kynh : thanks for good question<br />
<sophi1> kynh: I'm not sure they are active currently, but we should<br />
ask on the list to try to make them share their experience<br />
<khirano> forestcheng: Can we have a coordinator form zh community<br />
for CJK group ?<br />
<kynh> Sorry, I have to logoff. I'll check the LOG later. Thank you so <br />
much.<br />
<maho_> kynh : thanks for participating!<br />
<khirano> Thanks, kynh<br />
<sophi1> kynh: bye !<br />
<kynh> Thanks all.<br />
<aijin> kynh: bye<br />
<forestcheng> :) I'm thinking. Coor is important to CJK group. We'll<br />
try find a suitable person.<br />
* kynh は IRC から離れました ("Leaving...")<br />
<aijin> khirano: We may need to call for volunteers in each lang team.<br />
<khirano> aijin: right!<br />
<maho_> khirano : who will be for JA? you? :)<br />
<khirano> I will ask jeongkyu to call for volunteers in korean community :)<br />
<aijin> khirano: thanks.<br />
<khirano> forestcheng: Can you call for volunteers in zh community?<br />
<forestcheng> yes<br />
<khirano> Thanks!<br />
<khirano> maho: Can you call for volunteers in ja community? :)<br />
<maho_> sure!<br />
<khirano> Thanks!<br />
<forestcheng> if no one can be found, I'll try to do such role.<br />
<khirano> forestcheng: Thanks!<br />
<khirano> 5. Next IRC meeting<br />
<forestcheng> Looking forward to next IRC :)<br />
<maho_> me too.<br />
<khirano> forestcheng: Is it a good idea to have an IRC meeting in week <br />
days?<br />
<khirano> Some don't want to attend a meeting on Saturdays?<br />
<maho_> :)<br />
<forestcheng> Yes, i think most people can be available on weekend.<br />
<khirano> You mean Saturdays are OK for IRC meeting?<br />
<forestcheng> Maybe some want Sunday.<br />
<khirano> I see<br />
<khirano> OK, we will find best day on com@native-lang.openoffice.org then.<br />
<aijin> +1<br />
<forestcheng> +1 khirano<br />
<sophi1> khirano: +1<br />
<maho_> +1<br />
<khirano> I will compile a minute and put it up to the wiki, and the<br />
log of this meeting also will be uploaded<br />
<sophi1> khirano: do you know http://www.doodle.com/ ?<br />
<aijin> khirano: thanks!<br />
<khirano> sophie, what is it?<br />
* peter13j has to leave. appointment at 7<br />
* peter13j は IRC から離れました ("Goodbye folks!")<br />
<maho_> see you<br />
<sophi1> khirano: it's a tool that help you to organize meeting :)<br />
<khirano> meeting organizer or something?<br />
<forestcheng> see you, Peter<br />
<sophi1> khirano: yes<br />
<khirano> Oh, yes, I will check it up<br />
<khirano> Peter, thanks<br />
<khirano> Any more questions?<br />
<sophi1> khirano: not from my side, thanks a lot for the meeting, it<br />
was great :)<br />
<khirano> Great! OK, we will see on com@native-lang.openoffice.org<br />
and the next IRC meeting.<br />
<aijin> khirano: not from me. thanks much for orgarnizing the meeting.<br />
<forestcheng> no more question. Thank khirano very much for this IRC.<br />
I'm glad to be here.<br />
<khirano> Thanks, aijin!<br />
<khirano> Thanks, forenstcheng!<br />
<maho_> thanks, no question from me. thanks again for great IRC<br />
<khirano> Thanks, Sophie for your attendance!<br />
<forestcheng> Good bye to all, Have a nice weekend!<br />
<khirano> Yes, have a nice weekend!<br />
<maho_> I also thanks for Sophie<br />
<maho_> khirano : please call close<br />
<liheng> bye all<br />
* liheng (n=temp@114.255.42.178) は #ooonlc から離れました。<br />
<sophi1> maho_: khirano: you're welcome, I'm very pleased :)<br />
<khirano> The meeting is closing, thanks all<br />
</nowiki><br />
</pre><br />
<br />
<br />
[[Category:CJK issues]]</div>Kirkhttps://wiki.openoffice.org/wiki/CJK_Group/AgendaCJK Group/Agenda2009-12-04T06:30:48Z<p>Kirk: </p>
<hr />
<div>= Agenda for the next Meeting =<br />
== Next meeting: Starts from 13:00 Seoul Time on April 24th 2009 ==<br />
<br />
# 3.1 Release QA Status<br />
# RegiCon Asia 2010 Spring in Seoul<br />
# More CJK Group Coordinators<br />
# Zh is planning to translate OOo3.0 UserGuide in [http://oooauthors.org/en OOoAuthors].<br> It's time consuming work. How Ko and Ja think of this? Do you have OOo UserGuide in local language? or related documents such as: tips,skills,advanced or useful features...? <br> How can community help users quickly find usage answer?<br />
# Next Meeting<br />
# How to get more people who can attend an IRC meeting :)<br />
# (Please add yours)<br />
<br />
== Minutes of Previous Meetings ==<br />
See [[CJK_Group/Minutes | here]]<br />
<br />
<br />
[[Category:CJK issues]]</div>Kirkhttps://wiki.openoffice.org/wiki/Database/Drivers/MySQL_Native/1.0/Known_IssuesDatabase/Drivers/MySQL Native/1.0/Known Issues2009-11-23T01:10:27Z<p>Kirk: </p>
<hr />
<div>{{DISPLAYTITLE:MySQL Connector for OpenOffice.org 1.0 - Known Issues}}<br />
<br />
__TOC__<br />
<br />
=== Accessing non-intranet servers by IP address might fail ===<br />
<br />
If you set up a connection to a MySQL server outside your intranet, which is known by IP address, this might fail with an error code of 10060, effectively saying "Can't connect". The problem is not fully analyzed, yet, so the problem description here is somewhat rough at the moment.<br />
<br />
[[Category:Database Drivers]]</div>Kirkhttps://wiki.openoffice.org/wiki/Database/Drivers/MySQL_Native/ArchitectureDatabase/Drivers/MySQL Native/Architecture2009-11-23T01:03:18Z<p>Kirk: </p>
<hr />
<div>__TOC__<br />
=== Wrapped Access ===<br />
The below picture illustrates the current architecture for the existing MySQL driver, where a generic driver (JDBC/ODBC) is wrapped<br />
[[image:Mysql_driver_architecture_old.png|center|frame|MySQL Driver architecture - present]]<br />
'''Notes'''<br />
* Note the additional layer consisting of the JDBC/ODBC->SDBC bridge, which introduces additional complexity, and loss of information (as every abstraction layer)<br />
* The picture is not strictly correct. The applications usually do not work directly on the SDBCX layer, but instead on a layer providing yet more convenience ([http://api.openoffice.org/docs/common/ref/com/sun/star/sdb/module-ix.html SDB]).<br />
<br />
=== Direct Access ===<br />
The below picture illustrates the new architecture, where a dedicated C++ driver (Connector/OOo) talks to the MySQL server using the MySQL client library (libmysql)<br />
[[image:Mysql_driver_architecture_new.png|center|frame|MySQL Driver architecture - future]]<br />
''''Notes''''<br />
* Currently, the MySQL Client Library is linked to / shipped with the MySQL native driver, thus effectively part of OpenOffice.org.<br />
<br />
<br />
[[Category:Database Drivers]]</div>Kirkhttps://wiki.openoffice.org/wiki/Database/Drivers/MySQL_Native/1.0Database/Drivers/MySQL Native/1.02009-11-23T01:02:30Z<p>Kirk: </p>
<hr />
<div>{{DISPLAYTITLE:MySQL Connector for OpenOffice.org 1.0}}<br />
<br />
== Introduction ==<br />
<br />
MySQL Connector for OpenOffice.org is a [http://www.mysql.org MySQL] driver for [http://www.openoffice.org/ OpenOffice.org]. It can be used to connect from [http://download.openoffice.org OpenOffice.org 3.1] to a MySQL server 5.1 or newer.<br />
<br />
Before MySQL Connector for OpenOffice.org became available you'd have to use [http://dev.mysql.com/downloads/connector/j/ MySQL Connector/J (JDBC)] or [http://dev.mysql.com/downloads/connector/odbc/ MySQL Connector for ODBC] to connect to a MySQL server.<br />
<br />
Therefore the driver is also referred to as a native driver in the context of OpenOffice.org. The term native driver clashes with the MySQL definition of a native driver: MySQL Connector for OpenOffice.org does not implement the MySQL Client Server protocol. Technically speaking the MySQL Connector for OpenOffice.org is implemented as a proxy on top of the [http://dev.mysql.com/doc/refman/5.1/en/connector-cpp.html MySQL Connector/C++].<br />
<br />
The driver is delivered as an OpenOffice.org extension.<br />
<br />
=== Advantages ===<br />
<br />
Using MySQL Connector for OpenOffice.org has the following advantages:<br />
<br />
* Easy installation through the OpenOffice.org Extension Manager.<br />
* Seamless integration into OpenOffice.org.<br />
* Work on multiple MySQL schemata (databases) simultaneously<br />
* Connect to MySQL servers using named pipes (Windows) or Sockets (Unix)<br />
* No need to go through an additional Connector installation routine (ODBC/JDBC)<br />
* No need to configure or register an additional Connector (ODBC)<br />
* No need to install or configure a driver manager (ODBC)<br />
* No need for a Java Runtime Environment (JDBC)<br />
<br />
=== Status ===<br />
<br />
The MySQL Connector for OpenOffice.org is released in version 1.0, in production quality.<br />
<br />
== Installation ==<br />
<br />
=== Install or upgrade to OpenOffice.org 3.1 ===<br />
<br />
OpenOffice.org 3.1 is available from OpenOffice.org's [http://download.openoffice.org download site]. The driver does not work together with earlier versions of OpenOffice.org. It will also run in OpenOffice.org when it becomes available, but not in current developer snapshots (up to, anticipated, DEV300.m57).<br />
<br />
Please use "vanilla" OpenOffice.org: As with all extensions containing binary code, they're potentially incompatible with other OpenOffice.org distributions (like the one from your favorite Linux distribution), and are not necessarily expected to work with them. If you're using an OpenOffice.org build obtained elsewhere, e.g. by your favorite Linux distributor, then please ask this source to also provide the MySQL Connector for OpenOffice.org.<br />
<br />
=== Download MySQL Connector for OpenOffice.org ===<br />
<br />
The extension is available from the [http://extensions.services.openoffice.org/project/mysql_connector OpenOffice.org extensions repository]. It is provided for the usual 6 platforms (Windows, Linux Intel 32 Bit, Linux Intel 64 Bit, Solaris Sparc, Solaris Intel 32 Bit, Mac OS X Intel).<br />
<br />
Download the file to a location of your choice, for example <code>My Documents</code> or <code>~/Documents</code>.<br />
<br />
=== Users of the Beta version please note ===<br />
<br />
If you have installed the previous Beta version please uninstall it first manually in the Extension Manager. The final version has a new product name and therefore it is not possible to update it via the extension mechanism. Also delete the cached database connection that was previously created as it cannot be re-used again (e.g., Windows: <code>"C:\Documents and Settings\<user>\Application Data\OpenOffice.org\3\user\uno_packages\cache\registry\*"</code> or Unix: <code>"/home/<user>/.openoffice.org/3/user/uno_packages/cache/registry/*"</code>).<br />
<br />
=== Installing the extension ===<br />
<br />
Add the <code>.oxt</code> extension through the Extension Manager of OpenOffice.org. In OpenOffice.org, select <code>Tools, Extension Manager...</code> and specify the <code>.oxt</code> file as a new extension. When done, MySQL Connector for OpenOffice.org should show up as a new extension under <code>My Extensions</code>.<br />
<br />
[[Image:Conn_ooo_1.0_GA_extensions.png]]<br />
<br />
Restart OpenOffice.org to complete the installation.<br />
<br />
== Getting Started: Connecting to MySQL ==<br />
<br />
MySQL Connector for OpenOffice.org allows you to access the MySQL Server and its schemata from the OpenOffice.org suite.<br />
<br />
The following example demonstrates the creation of a new OpenOffice.org Base database which uses a local MySQL Server for storage and the new connector for connecting.<br />
<br />
=== Select the database ===<br />
<br />
Create a new database (<code>File, New, Database</code>). This starts a wizard that allows you to create a new, open an existing, or connect to existing database. Select the latter option.<br />
<br />
From the drop-down list, select <code>MySQL</code>. Click <code>Next&nbsp;&gt;&gt;</code>.<br />
<br />
[[Image:Conn_ooo_alpha_wizard1.png]]<br />
<br />
=== Select the type of the driver ===<br />
<br />
You can use three different MySQL drivers for connecting to MySQL from OpenOffice.org. You can choose a generic ODBC or JDBC connection method or the native driver. Select <code>Connect native</code>. Click <code>Next&nbsp;&gt;&gt;</code>.<br />
<br />
[[Image:Conn_ooo_alpha_wizard2.png]]<br />
<br />
=== Setting up the database connection ===<br />
<br />
Set up the database connection. Put the schema (database) you want to connect to into <code>Name of the database</code>. Enter the URL (host name, or simply type <code>localhost</code> when connecting to the server on your own PC), Port and Socket (or leave socket empty) of your MySQL Server. Click <code>Next&nbsp;&gt;&gt;</code>.<br />
<br />
[[Image:Conn_ooo_alpha_wizard3.png]]<br />
<br />
=== Fill in user credentials ===<br />
<br />
Provide the user credentials for connecting to your MySQL Server. Click <code>Next&nbsp;&gt;&gt;</code>.<br />
<br />
[[Image:Conn_ooo_alpha_wizard4.png]]<br />
<br />
=== Save and proceed ===<br />
<br />
Finish the wizard. All defaults are a safe choice. Click <code>Finish&nbsp;&gt;&gt;</code>.<br />
<br />
[[Image:Conn_ooo_alpha_wizard5.png]]<br />
<br />
== Getting Started: Usage Examples ==<br />
<br />
=== Listing Tables ===<br />
<br />
In the Database area of the Base main window, select Tables. If this is the first time you're accessing the database you'll be prompted for your credentials (username and password); you can store these settings for your current Base session. <br />
<br />
[[Image:Conn ooo alpha base.png]] <br />
<br />
Depending on your connection settings you will now see all databases with all their tables, or just the database you've specified in the connection settings.<br />
<br />
== Known Issues ==<br />
<br />
There is currently [[Database/Drivers/MySQL Native/1.0/Known Issues|1 known issue]] in MySQL Connector for OpenOffice.org. We decided to nonetheless release version 1.0, since we think that it's better for all users, which do not encounter this particular problem, to benefit from this great extension.<br />
<br />
== Contact ==<br />
<br />
If you discover a bug, or just want to give any kind of feedback on the connector, please send an email to [mailto:users@dba.openoffice.org users@dba.openoffice.org]. It's a low-volume list with less than 10 mails per day. If you prefer reading it by means other than subscribing to it, see [[Base Mailing List|here]].<br />
<br />
[[Category:Database Drivers]]</div>Kirkhttps://wiki.openoffice.org/wiki/Database/DriversDatabase/Drivers2009-11-23T01:00:49Z<p>Kirk: </p>
<hr />
<div>{{DISPLAYTITLE:Database Drivers}}<br />
<DPL><br />
titlematch=Database/Drivers/%<br />
nottitlematch=Database/Drivers/%/%<br />
replaceintitle=#Database/Drivers/#,<br />
</DPL><br />
<br />
<br />
[[Category:Database Drivers]]</div>Kirkhttps://wiki.openoffice.org/wiki/AQUA_NATIVE_MENUSAQUA NATIVE MENUS2009-11-23T00:26:53Z<p>Kirk: </p>
<hr />
<div>= AQUA_NATIVE_MENUS =<br />
<br />
If you need to solve problems with the implementation of native menu bars for the Aqua port then it might be useful to know the environment variable AQUA_NATIVE_MENUS.<br />
<br />
Native menus are defaults. If you want to use vcl menus, do:<br />
<br />
<pre><br />
AQUA_NATIVE_MENUS=FALSE ./soffice.bin<br />
</pre><br />
<br />
Note: options to not recover is -norestore , and to bypass the user informations to fill in, use -nofirststartwizard<br />
<br />
AQUA_NATIVE_MENUS=FALSE ./soffice.bin -nofirststartwizard -norestore<br />
<br />
You can also insert environement variables in a Dictionary Class of Info.plist located in the Contents directory of OpenOffice.org bundle.<br />
<br />
For example, you can add the following XML in a text editor (or make it generated by Property List Editor) in your Info.plist :<br />
<br />
<key>LSEnvironment</key><br />
<dict><br />
<key>AQUA_NATIVE_MENUS</key><br />
<string>TRUE</string><br />
<key>OOO_DISABLE_RECOVERY</key><br />
<string>TRUE</string><br />
<key>SAL_NO_NWF</key><br />
<string>TRUE</string><br />
<dict><br />
<br />
Notice that in order to work, the OOO_DISABLE_RECOVERY variable detection must be manually inserted in OOo code using the following patch :<br />
http://www.go-oo.org/patches/src680/disable-recovery.diff<br />
<br />
This patch is outdated, but you can make the modifications yourself.<br />
<br />
<br />
Notice the enviroment variable here. AQUA_NATIVE_MENUS is experimental stuff created by Pavel, SAL_NO_NWF was created some times ago, and is located in vcl/source/window/window.cxx . At the moment we have:<br />
<br />
{| border="1" cellpadding="15" cellspacing="0"<br />
|-<br />
! Variable || Function<br />
|-<br />
| SAL_NO_NWF=TRUE || disable native controls code<br />
|-<br />
| AQUA_NATIVE_MENUS=FALSE || disable native menus code<br />
|}<br />
<br />
Both changes are marked with comments in the source code, and when we remove them in the future, native controls and native menus will be enabled by default.<br />
[[category:Aqua]]</div>Kirkhttps://wiki.openoffice.org/wiki/Accessibility_Test_OOo30Accessibility Test OOo302009-11-23T00:25:21Z<p>Kirk: </p>
<hr />
<div>This page describes The results of the accessibility tests on OpenOffice.org, version OOO300m1.<br />
<br />
= Test Results - Overview =<br />
<br />
{| class="prettytable"<br />
| <br />
| <center>'''Solaris 11'''</center><br />
| <center>'''Windows'''</center><br />
| <center>'''MAC OSX'''</center><br />
<br />
|-<br />
| '''Speech/Braille'''<br />
| <center>Passed</center><br />
| <center>Passed</center><br />
| <center>Passed</center><br />
<br />
|-<br />
| '''Keyboard Navigation'''<br />
| <center>Passed</center><br />
| <center>Passed</center><br />
| <center>Passed</center><br />
<br />
|-<br />
| '''High Contrast'''<br />
| <center>Passed</center><br />
| <center>Passed</center><br />
| <center>n/a</center><br />
<br />
|}<br />
<br />
Those results are based on the [http://wiki.services.openoffice.org/wiki/Accessibility_Test_OOo30#Test_Plan_Specification_.2F_Documentation Plan Specifications and Documentation] below<br />
<br />
= Environnement Details =<br />
<br />
== Solaris (11)==<br />
<br />
* AT-Tool - Speech/Braille: Orca with braille monitor<br />
* Helpers: at-poke, accersizer<br />
<br />
== Windows ==<br />
<br />
* AT-Tool - Speech: ZoomText<br />
* Helpers: JavaMonkey, JavaFerret<br />
* Java Access Bridge: 2.0.1<br />
* JRE 1.6_04<br />
<br />
== MAC OSX ==<br />
<br />
* AT-Tools: VoiceOver<br />
<br />
Note: High-Contrast on Mac is not a "real" High Contrast. More a video variation without software automatc switch<br />
<br />
<br />
= Test Plan Specification / Documentation =<br />
<br />
* [http://wiki.services.openoffice.org/wiki/Accessibility_Test_GUI_All | General User Interface Test] (Speech/Braille) common to all applications.<br />
<br />
* [http://wiki.services.openoffice.org/wiki/Accessibility_Test_KBD_All | Keyboard Test] common to all applications.<br />
<br />
* High Contrast: no specific guidelines. The environment theme is switch on the Windows and Solaris to High Contrast Black (or similar). SO/OOo's UI must follow the theming.<br />
[[Category:Accessibility]]</div>Kirkhttps://wiki.openoffice.org/wiki/Accessibility_Test_KBD_AllAccessibility Test KBD All2009-11-23T00:24:48Z<p>Kirk: </p>
<hr />
<div>'''Goal:'''<br />
<br />
Guidleine for StarOffice / OpenOffice.org Keyboard Testing<br />
<br />
<br />
= 1. General Settings =<br />
<br />
{| class="prettytable"<br />
! What<br />
! Action<br />
! Key<br />
! UNIX<br />
<br />
|-<br />
| '''a pane -> task pane '''''(in the program window).''<br />
<br />
* '''Canvas''' (Writer document, Draw document, ..., working area)<br />
* '''Floats''' (Navigator, Stylist, Help Agent, Tear Down Toolboxes)<br />
* '''Toolbars''' (Object bar, Work bar)<br />
* '''Non modal dialogs''' (URL dialog, Search Dialog, Add Index Entry Dlg.)<br />
<br />
* '''Splitted document view''', (help window, dialogs with an external preview)<br />
<br />
<br />
| '''''Jump to/Travel'''''<br />
| '''<nowiki>[F6]</nowiki>'''<br />
| '''2 cases:- '''''If Floatings (Navigator, Stylist)'' ''OFF''<nowiki>: [F6]*** cycles between menu bar > toolbars > document - </nowiki>''If Floatings (Navigator, Stylist) ON: ''<nowiki>[F6]*** cycles between document > menu bar > toolbars > STOP</nowiki><nowiki>*** Depending of the key mapping of the window environnement.</nowiki><br />
<br />
|-<br />
| '''a pane -> another pane'''''in the program window (counterclockwise direction) ''<br />
| '''''Move'''''<br />
| '''<nowiki>[Shift]+[F6]</nowiki>'''<br />
| ''Same as Windows but see bellow''<br />
<br />
|-<br />
| '''-> main document pane'''<br />
| '''''Move'''''<br />
| '''<nowiki>[Ctrl]+[F6]</nowiki>'''<br />
| Same (if not other mapping: Linux=go to desktop 6)<br />
<br />
|-<br />
| '''-> menu bar'''<br />
| '''''Places focus'''''<br />
| '''<nowiki>[Alt] </nowiki>'''or '''<nowiki>[F10]</nowiki>'''<br />
| '''<nowiki>[F10]</nowiki>'''<br />
<br />
|-<br />
| '''active menu'''/'''toolbar '''-> '''task pane'''<br />
| '''''Move to'''''<br />
| '''<nowiki>[F6]</nowiki>'''or''' <nowiki>[Ctrl]+[Tab] </nowiki>'''or'''<nowiki> [Ctrl]+[Shift]+[Tab] </nowiki>'''''(reverse order)''<br />
| Same (if not other mapping)<br />
<br />
Same (if not other mapping â Linux=go to next desktop)<br />
<br />
|-<br />
| '''next/previous option''' ''(In active task pane)''.<br />
| '''''Select'''''<br />
| '''<nowiki>[Tab] </nowiki>'''or'''<nowiki> [Shift]+[Tab] </nowiki>'''<br />
| Same<br />
<br />
|-<br />
| - Among '''choices''' ''(in a selected submenu)''or:- Among certain '''options''' ''(in a group of options)''<br />
| '''''Move'''''<br />
| '''<nowiki>[Down] </nowiki>'''or'''<nowiki> [Up]</nowiki>'''<br />
| Same<br />
<br />
|-<br />
| '''Selected menu'''<br />
| '''''Open'''''<br />
| '''<nowiki>[Space] </nowiki>'''or'''<nowiki> [Enter]</nowiki>'''<br />
| Same<br />
<br />
|-<br />
| '''Selected button'''<br />
| '''''Perform action'''''<br />
| '''<nowiki>[Space] </nowiki>'''or'''<nowiki> [Enter]</nowiki>'''<br />
| Same<br />
<br />
|-<br />
| '''Context menu'''<br />
| '''''Open'''''<br />
| '''<nowiki>[Shift]+[F10] </nowiki>'''<br />
| Same<br />
<br />
|-<br />
| '''First/last command''' ''(of a selected (sub)menu)''<br />
| '''''Select'''''<br />
| '''<nowiki>[Home] </nowiki>'''or'''<nowiki> [End]</nowiki>'''<br />
| Same<br />
<br />
|-<br />
| '''Selected list'''<br />
| '''''Scroll up/down'''''<br />
| '''<nowiki>[PgUp] </nowiki>'''or'''<nowiki> [PgDn] </nowiki>'''<br />
| Same<br />
<br />
|-<br />
| '''Selected list'''<br />
| '''''Move to top/bottom'''''<br />
| '''<nowiki>[Ctrl]+[Home] </nowiki>'''or'''<nowiki> [Ctrl]+[End] </nowiki>'''<br />
| Same<br />
<br />
|-<br />
| '''Document'''<br />
| '''''Back to'''''<br />
| '''<nowiki>[Esc]</nowiki>'''<br />
| Same<br />
<br />
|}<br />
= 2. Access and use menus and toolbars =<br />
<br />
{| class="prettytable"<br />
! What<br />
! Action<br />
! Key<br />
! UNIX<br />
<br />
|-<br />
| the '''menu bar'''<br />
| '''Select'''<br />
| '''<nowiki>[F10]</nowiki> '''or'''<nowiki> [Alt]</nowiki>'''<br />
| '''<nowiki>[F10] </nowiki>'''<br />
<br />
|-<br />
| '''menu and submenu''' at the same time ''(when opened)''.<br />
| '''Close'''<br />
| '''<nowiki>[F10]</nowiki> '''or'''<nowiki> [Alt]</nowiki>'''<br />
| '''<nowiki>[F10] </nowiki>'''<br />
<br />
|-<br />
| (next/previous) '''toolbar '''''(when the menu bar or an other toolbar is selected)''<br />
| '''Select''' (previous)<br />
| ''<nowiki>([Shift]+)</nowiki>'''''<nowiki>[F6]</nowiki>'''or'''<nowiki>[Ctrl]+</nowiki>'''''<nowiki>([Shift]+)</nowiki>'''''<nowiki>[Tab] </nowiki>'''<br />
| SameSame (if not other mapping â Linux=go to next desktop)<br />
<br />
|-<br />
| (next/previous) '''button''' or '''menu''' ''(when a toolbar/menu bar selected)''<br />
| '''Select (previous)'''<br />
| '''<nowiki>[Tab] </nowiki>'''or'''<nowiki> [Shift]+[Tab] </nowiki>'''<br />
| Same<br />
<br />
|-<br />
| '''selected menu'''<br />
| '''Open'''<br />
| '''<nowiki>[Enter]</nowiki>'''<br />
| Same<br />
<br />
|-<br />
| '''selected button'''<br />
| '''Perform action'''<br />
| '''<nowiki>[Enter]</nowiki>'''<br />
| Same<br />
<br />
|-<br />
| '''Context menu''' ''(for an item)''<br />
| '''Open'''<br />
| '''<nowiki>[Shift]+</nowiki><nowiki>[F10]</nowiki> '''<br />
| Same<br />
<br />
|-<br />
| '''Context menu''' ''(of the window = "Control Menu")''<br />
| '''Open'''<br />
| '''<nowiki>[Alt]+[Space] </nowiki>'''<br />
| <nowiki>Same (if not other mapping â Linux = sometimes [Alt]+[F3])</nowiki><br />
<br />
|-<br />
| (next/previous) '''command''' ''(when menu/submenu open)''<br />
| '''Select'''<br />
| '''<nowiki>[Down] </nowiki>'''or'''<nowiki> [Up]</nowiki>'''<br />
| Same<br />
<br />
|-<br />
| '''menu''' to the left or right. When a submenu is open, switch between the main menu and the submenu. <br />
| '''Select'''<br />
| '''<nowiki>[Left] </nowiki>'''or'''<nowiki> [Right]</nowiki>'''<br />
| Same<br />
<br />
|-<br />
| (first/last) '''command''' (''on the menu or submenu)'' <br />
| '''Select'''<br />
| '''<nowiki>[Home] </nowiki>'''or'''<nowiki> [End]</nowiki>'''<br />
| Same<br />
<br />
|-<br />
| '''Submenu''' only ''(not the main menu)''<br />
| '''Close'''<br />
| '''<nowiki>[Esc]</nowiki>'''<br />
| Same<br />
<br />
|-<br />
| '''List of commands''' when a menu is selected. <br />
| '''Open'''<br />
| '''<nowiki>[Down]</nowiki>'''<br />
| Same<br />
<br />
|}<br />
= 3. Moving Focus In Dialogs =<br />
<br />
{| class="prettytable"<br />
| '''''What'''''<br />
| '''''Action'''''<br />
| '''''Key'''''<br />
| '''''Unix'''''<br />
<br />
|-<br />
| '''Dialog'''<br />
| '''''Close'''''<br />
| '''<nowiki>[Esc]</nowiki>'''<br />
| Same<br />
<br />
|-<br />
| '''Tab page'''<br />
| '''''Switch '''(to next/previous)''<br />
| '''<nowiki>[Ctrl]+[Tab] </nowiki>'''/ '''<nowiki>[Ctrl]+[Shift]+[Tab] </nowiki>'''<br />
| <nowiki>Same (or depending on sys config [Alt]+, [Ctrl]+, [PgUp]/[PgDn] or arrow keys)</nowiki><br />
<br />
|-<br />
| '''Option'''/'''option group'''<br />
| '''''Move '''(to next/previous)''<br />
| '''<nowiki>[Tab] </nowiki>'''/''' <nowiki>[Shift]+[Tab] </nowiki>'''<br />
| Same<br />
<br />
|-<br />
| between '''options '''in '''drop-down lists'''/'''group of options'''<br />
| '''''Move'''''<br />
| '''Arrow keys '''<br />
| Same<br />
<br />
|-<br />
| '''Option'''<br />
| '''Select'''<br />
| '''<nowiki>[Alt]+the letter underlined in an option </nowiki>'''''(="Mnemonic")''<br />
| Same<br />
<br />
|-<br />
| '''Check box/radio button'''<br />
| '''''(Un)check'''''/'''''(des)activate''''' ''(only if mnemonic is '''NOT''' double!!! )''<br />
| '''<nowiki>[Alt]+the letter underlined in an option </nowiki>'''''(="Mnemonic")''<br />
| Same<br />
<br />
|-<br />
| '''Check box'''<br />
| '''''(Un)check'''''<br />
| '''<nowiki>[Space] </nowiki>'''<br />
| Same<br />
<br />
|-<br />
| '''Button'''<br />
| '''''Perform the action'''''<br />
| '''<nowiki>[Space] </nowiki>'''<br />
| Same<br />
<br />
|-<br />
| '''Drop-down listbox'''<br />
| - '''Open''' ''(if list was close)''<br />
| '''<nowiki>- [Alt]+[Down]</nowiki>'''<br />
| Not possible<br />
<br />
|-<br />
| '''Drop-down listbox'''<br />
| '''''- Jump (to the next option which names begins with this letter)'''''<br />
| '''- First letter of an option / arrow keys'''<br />
| same<br />
<br />
|-<br />
| '''Drop-down listbox '''<br />
| '''''Close'''''<br />
| '''<nowiki>[Esc]</nowiki> '''<br />
| same<br />
<br />
|-<br />
| '''Command'''<br />
| '''''Cancel'''''<br />
| '''<nowiki>[Esc]</nowiki>'''<br />
| same<br />
<br />
|-<br />
| '''Default button'''<br />
| '''''Perform the action'''''<br />
| '''<nowiki>[Enter]</nowiki>'''<br />
| same<br />
<br />
|-<br />
| '''TreeView node'''<br />
| '''''Open/Close'''''<br />
| '''<nowiki><+> or <right></nowiki>/<nowiki><-></nowiki><nowiki> or <left></nowiki>'''<br />
| same<br />
<br />
|-<br />
| '''TreeView node'''<br />
| '''''Travel'''''<br />
| '''<nowiki>[Up]/[Down]</nowiki>'''<br />
| same<br />
<br />
|}<br />
= 4. Use edit fields / boxes within dialog boxes =<br />
<br />
{| class="prettytable"<br />
! Direction/Amplitude<br />
! Action<br />
! Key<br />
! Unix<br />
<br />
|-<br />
| ''to the '''beginning''' / '''end '''of the '''''entry'''<br />
| '''''Move'''''<br />
| '''<nowiki>[Home] </nowiki>'''/'''<nowiki> [End]</nowiki> '''<br />
| same<br />
<br />
|-<br />
| '''one character''' to the '''left''' / '''right''' <br />
| '''''Move'''''<br />
| '''<nowiki>[Left] </nowiki>'''/'''<nowiki> [Right]</nowiki>'''<br />
| same<br />
<br />
|-<br />
| '''one word''' to the '''left''' / '''right'''<br />
| '''''Move'''''<br />
| '''<nowiki>[Ctrl]+([Left] </nowiki>'''/'''<nowiki> [Right]</nowiki>''')<br />
| same<br />
<br />
|-<br />
| '''one character''' to the '''left''' / '''right''' <br />
| '''''(Un)Select'''''<br />
| '''<nowiki>[Shift]+</nowiki>'''('''<nowiki>[Left] </nowiki>'''/'''<nowiki> [Right]</nowiki>''')<br />
| same<br />
<br />
|-<br />
| '''one word''' to the '''left''' / '''right''' <br />
| '''''(Un)Select'''''<br />
| '''<nowiki>[Ctrl]+[Shift]+</nowiki>'''('''<nowiki>[Left] </nowiki>'''/'''<nowiki> [Right]</nowiki>''')<br />
| same<br />
<br />
|-<br />
| ''to the '''beginning''' / '''end '''of the '''''entry'''<br />
| '''''Select'''''<br />
| '''<nowiki>[Shift]+(</nowiki><nowiki>[Home] </nowiki>'''/'''<nowiki> [End]</nowiki>''')<br />
| same<br />
<br />
|}<br />
= 5. Move and Resize task panes =<br />
<br />
{| class="prettytable"<br />
! Item<br />
! Action<br />
! Key<br />
! Comment<br />
! Unix<br />
<br />
|-<br />
| '''ToolbarsMenusTask panes'''<br />
| '''''Select'''''<br />
| # <nowiki>[Alt] / [F10]</nowiki><br />
# '''<nowiki>[Ctrl]+[Tab] / [F6]</nowiki>'''<br />
<br />
<br />
| ''-> (select the menu bar)''<br />
<br />
''-> (travel through toolbars or task panes)''<br />
| <nowiki>[F10]</nowiki><br />
<br />
<nowiki>[F6]</nowiki><br />
<br />
|-<br />
| '''''Resize'''''<br />
| # <nowiki>[Ctrl]+[Space]</nowiki><br />
# choose "'''Size'''<nowiki>"+[Enter] </nowiki><br />
# '''''<nowiki><arrow_keys></nowiki>'''''<br />
<br />
''Or '''<nowiki>[Ctrl]+<arrow_keys</nowiki>'''>''<br />
| ''-> displays the "Options" menu''<br />
<br />
<br />
''->resize''<br />
<br />
''->resize pixel to pixel''<br />
| <nowiki>Same (if not other mapping â Linux = sometimes [Alt]+[F3])</nowiki>Solaris: '''''<nowiki>[Ctrl]+<arrow_keys</nowiki>'''> = large steps,'''<nowiki> without [Ctrl] = </nowiki>'''pixel to pixel''<br />
<br />
|-<br />
| '''''Move'''''<br />
| # ''<nowiki>[Ctrl]+[Space] </nowiki>''<br />
# choose "'''Move'''<nowiki>"+[Enter] </nowiki><br />
# '''''<nowiki><arrow_keys></nowiki>'''''<br />
<br />
''Or '''<nowiki>[Ctrl]+<arrow_keys></nowiki>'''''<br />
| ''-> displays the "Options" menu''<br />
<br />
<br />
''->resize''<br />
<br />
''->resize pixel to pixel''<br />
| <nowiki>Same (if not other mapping â Linux = sometimes [Alt]+[F3])</nowiki>Solaris: '''''<nowiki>[Ctrl]+<arrow_keys</nowiki>'''> = large steps,''' <nowiki>without [Ctrl] = </nowiki>'''pixel to pixel''<br />
<br />
|-<br />
| '''''Dock'''''<br />
| '''''<nowiki>[F4]</nowiki>'''''<br />
| ''only docking on the original place or on the left (Navigator, Stylist)''<br />
| Same<br />
<br />
|-<br />
| '''''Undock'''''<br />
| '''''<nowiki>[F4]</nowiki>'''''<br />
| &nbsp;<br />
| Same<br />
<br />
|}<br />
<br />
{| class="prettytable"<br />
! Item<br />
! Action<br />
! Key<br />
! Comment<br />
<br />
|-<br />
| '''Windows'''''(Resizable/movable Windows without menu***)''<br />
| '''Move'''<br />
| '''<nowiki>[Alt]+<arrow_keys></nowiki>'''<br />
| <nowiki>***Ex: the Table controls in the Query Design component.</nowiki><br />
<br />
|-<br />
| '''Drawing object'''<br />
| '''Select '''<br />
| ES: ------- depends on the application: must be reviewed -------<br />
<br />
# <nowiki>[F10] </nowiki>''(menu bar)''<br />
# <nowiki>[Ctrl]+[Tab] </nowiki>''(until the Drawing toolbar)''<br />
# <nowiki>[Right] </nowiki>''("'''Select Objects'''")''<br />
# '''<nowiki>[Ctrl]+[Enter]</nowiki>''' ''(selects the first drawing object)''<br />
# <nowiki>[</nowiki>'''<nowiki>Tab]/[Shift]+[Tab] </nowiki>'''''(cycle back/forward between objects)''<br />
<br />
''<nowiki>------------------</nowiki>''<br />
| <br />
<br />
|}<br />
= 6. Multi selection using keyboard =<br />
<nowiki>Normally [Ctrl] and a click of the mouse selection button extends a current selection with the new selected object or text</nowiki><br />
<br />
''FL: Needs to be discussed.''<br />
<br />
ES: <br />
<br />
<nowiki>- [Shift]+[F8] = toggles between STD/ADD selection Modes</nowiki><br />
<br />
<nowiki>- Normal text selection using [Shift]+([Ctrl])+<arrow keys>, [Home] or [End].</nowiki><br />
<br />
- AFAIK: only possible in Writer and no implementation possibility for Draw/Impress <br />
<br />
<br />
= 7. System Keyboard Setting =<br />
== 7.1. Reserved Keyboard Mappings for Mobility Access Feature ==<br />
* consecutive clicks of Shift key On/Off for '''StickyKeys'''<br />
* Shift key held down for 8 seconds On/Off for SlowKeys and RepeatKeys<br />
* consecutive clicks of Control key On/Off for screen reader numeric keypad<br />
* consecutive clicks of Alt key Future Access use<br />
<br />
== 7.2. Reserved System Keyboard Mappings for Windows ==<br />
Some of the content in this topic may not be applicable to some languages.<br />
<br />
<br />
{| class="prettytable"<br />
! Key<br />
! Action<br />
<br />
|-<br />
| '''<nowiki>[Alt]+[Tab] </nowiki>'''<br />
| Switch to the next window <br />
<br />
|-<br />
| '''<nowiki>[Alt]+[Shift]+[Tab] </nowiki>'''<br />
| Switch to the previous window <br />
<br />
|-<br />
| '''<nowiki>[Ctrl]+W or [Ctrl]+F4 </nowiki>'''<br />
| Close the active window <br />
<br />
|-<br />
| '''<nowiki>[Ctrl]+F5 </nowiki>'''<br />
| Restore the size of the active window after you've maximized it <br />
<br />
|-<br />
| '''F6 '''<br />
| Move to a task pane from another pane in the program window (clockwise direction). You may need to press F6 more than once. <br />
<br />
|-<br />
| '''<nowiki>[Shift]+F6 </nowiki>'''<br />
| Move to a pane from another pane in the program window (counterclockwise direction) <br />
<br />
|-<br />
| '''<nowiki>[Ctrl]+F6 </nowiki>'''<br />
| When more than one window is open, switch to the next window <br />
<br />
|-<br />
| '''<nowiki>[Ctrl]+[Shift]+F6 </nowiki>'''<br />
| Switch to the previous window <br />
<br />
|-<br />
| '''<nowiki>[Ctrl]+F7 </nowiki>'''<br />
| When a document window is not maximized, performs the Move command (on the Control menu for the window). Use the arrow keys to move the window, and, when finished, press ESC. <br />
<br />
|-<br />
| '''<nowiki>[Ctrl]+F8 </nowiki>'''<br />
| When a document window is not maximized, performs the Size command (on the Control menu for the window). Use the arrow keys to resize the window, and, when finished, press ESC. <br />
<br />
|-<br />
| '''<nowiki>[Ctrl]+F9 </nowiki>'''<br />
| Minimize a window to an icon (works only for some Microsoft Office programs) <br />
<br />
|-<br />
| '''<nowiki>[Ctrl]+F10 </nowiki>'''<br />
| Maximize or restore a selected window <br />
<br />
|}<br />
= 8. The Gallery =<br />
== 8.1. Common Shortcuts ==<br />
<br />
{| class="prettytable"<br />
! Item<br />
! Action<br />
! Key<br />
! Comment<br />
<br />
|-<br />
| '''Controls'''<br />
| '''Travel for|backward'''<br />
| '''<nowiki>([Shift])+[Tab]*</nowiki>'''<br />
| '''&nbsp;'''<br />
<br />
|}<br />
<nowiki>*Those are very standard shortcuts which should be intuitive enough</nowiki><br />
<br />
== 8.2. In the Themes Listbox ==<br />
<br />
{| class="prettytable"<br />
! Item<br />
! Action<br />
! Key<br />
! Comment<br />
<br />
|-<br />
| '''Theme'''<br />
| '''Travel to up/down'''<br />
| '''<nowiki>[Up]/[Down]*</nowiki>'''<br />
| '''&nbsp;'''<br />
<br />
|-<br />
| '''Theme'''<br />
| '''Show Properties'''<br />
| '''<nowiki>[Ctrl]+[Enter]</nowiki>'''<br />
| '''&nbsp;'''<br />
<br />
|-<br />
| '''Theme context menu'''<br />
| '''Open'''<br />
| '''<nowiki>[Shift] + F10*</nowiki>'''<br />
| '''&nbsp;'''<br />
<br />
|-<br />
| '''Theme'''<br />
| '''Update'''<br />
| '''<nowiki>[Ctrl] + U </nowiki>'''<br />
| '''&nbsp;'''<br />
<br />
|-<br />
| '''Theme'''<br />
| '''Rename'''<br />
| '''<nowiki>[Ctrl] + R </nowiki>'''<br />
| '''&nbsp;'''<br />
<br />
|-<br />
| '''Theme'''<br />
| '''Delete'''<br />
| '''<nowiki>[Ctrl] + D</nowiki>'''<br />
| '''&nbsp;'''<br />
<br />
|-<br />
| '''Theme'''<br />
| '''Create'''<br />
| '''<nowiki>[Ins]</nowiki>'''<br />
| '''&nbsp;'''<br />
<br />
|}<br />
''<nowiki>*Those are very standard shortcuts which should be intuitive enough</nowiki>''<br />
<br />
== 8.3. Grid Preview (Detailed or Inconized) ==<br />
<br />
{| class="prettytable"<br />
! Item<br />
! Action<br />
! Key<br />
! Comment<br />
<br />
|-<br />
| '''Image'''<br />
| '''Travel to first/last/left/right/up/down'''<br />
| '''<nowiki>[Home] / [End] / [Left] / [Right] / [Up] / [Down]*</nowiki>'''<br />
| '''&nbsp;'''<br />
<br />
|-<br />
| '''Grid Preview'''<br />
| '''Travel to one page up/down'''<br />
| '''<nowiki>[Pg Up] / [Pg Dn]</nowiki>'''<br />
| '''&nbsp;'''<br />
<br />
|-<br />
| '''Image '''<br />
| '''Paste a copy into current doc'''<br />
| '''<nowiki>[Ctrl] + I</nowiki>'''<br />
| '''&nbsp;'''<br />
<br />
|-<br />
| '''Image '''<br />
| '''Paste a linked copy into current doc'''<br />
| '''<nowiki>[Ctrl] + [Shift] + I</nowiki>'''<br />
| '''&nbsp;'''<br />
<br />
|-<br />
| '''Image title'''<br />
| '''Edit'''<br />
| '''<nowiki>[Ctrl] + T,</nowiki>'''<br />
| '''&nbsp;'''<br />
<br />
|-<br />
| '''Grid Preview'''<br />
| '''Toggle to preview'''<br />
| '''<nowiki>[Ctrl] + P, [Space], [Enter] </nowiki>'''<br />
| '''&nbsp;'''<br />
<br />
|-<br />
| '''Image'''<br />
| '''Delete'''<br />
| '''<nowiki>[Ctrl] + D</nowiki>'''<br />
| '''&nbsp;'''<br />
<br />
|}<br />
''<nowiki>*Those are very standard shortcuts which should be intuitive enough</nowiki>''<br />
<br />
== 8.4. Preview Mode (Preview is active) ==<br />
<br />
{| class="prettytable"<br />
! Item<br />
! Action<br />
! Key<br />
<br />
|-<br />
| '''Image'''<br />
| '''Travel to next'''<br />
| '''''<nowiki>[Right], </nowiki><nowiki>[Up]</nowiki><nowiki> /[Left], </nowiki><nowiki>[Down]</nowiki>''<nowiki>*</nowiki>'''<br />
<br />
|-<br />
| '''Image'''<br />
| '''Travel to first/last'''<br />
| '''<nowiki>[Home] / [End]</nowiki>'''<br />
<br />
|-<br />
| '''Grid Preview'''<br />
| '''Toggle to preview'''<br />
| '''<nowiki>[Ctrl] + P, [Space], [Enter] </nowiki>'''<br />
<br />
|-<br />
| '''Grid Preview'''<br />
| '''Toaggle back'''<br />
| '''<nowiki>[Backspace]</nowiki>'''<br />
<br />
|-<br />
| '''Image '''<br />
| '''Paste a copy into current doc'''<br />
| '''<nowiki>[Ctrl] + I</nowiki>'''<br />
<br />
|-<br />
| '''Image'''<br />
| '''Paste a linked copy into current doc'''<br />
| '''<nowiki>[Ctrl] + [Shift] + I</nowiki>'''<br />
<br />
|-<br />
| '''Theme context menu'''<br />
| '''Open'''<br />
| '''<nowiki>[Shift] + F10*</nowiki>'''<br />
<br />
|-<br />
| '''Image title'''<br />
| '''Edit'''<br />
| '''<nowiki>[Ctrl] + T</nowiki>'''<br />
<br />
|-<br />
| '''Image'''<br />
| '''Delete'''<br />
| '''<nowiki>[Ctrl] + D</nowiki>'''<br />
<br />
|}<br />
''<nowiki>*Those are very standard shortcuts which should be intuitive enough</nowiki>''<br />
<br />
<br />
= 9. Customize Toolbars =<br />
<br />
{| class="prettytable"<br />
! [[Image:customize_toolbars.jpg]]<br />
<br />
|-<br />
<br />
|}<br />
'''Extra Shortcuts'''<br />
<br />
<br />
{| class="prettytable"<br />
! Item<br />
! Action<br />
! Key<br />
<br />
|-<br />
| Entry<br />
| Add<br />
| '''''<nowiki>[Insert] / [Alt] + mnemonic of the 'Add' button</nowiki>'''''<br />
<br />
|-<br />
| Entry<br />
| Remove<br />
| '''''<nowiki>[Del] / [Alt] + mnemonic of the 'Remove' button</nowiki>'''''<br />
<br />
|}<br />
<nowiki>-------------------------------------------------------------------</nowiki><br />
<br />
Last modified by AAA BBB on 2008, Sep 09 at 15:47:01<br />
<br />
[[Category:Accessibility]]</div>Kirkhttps://wiki.openoffice.org/wiki/Accessibility_Test_GUI_AllAccessibility Test GUI All2009-11-23T00:24:03Z<p>Kirk: </p>
<hr />
<div>'''Goal:'''<br />
<br />
Guideline for StarOffice / OpenOffice.org GUI Testing - Speech / Braille output<br />
<br />
<br />
<br />
{| class="prettytable"<br />
| '''''GUI Elements / '''''Properties and actions<br />
| '''''Sample Description'''''<br />
<br />
|-<br />
| '''''Frame:'''''<br />
| <br />
<br />
|-<br />
| Window title<br />
| Verify that AT-Tools reports the correct window titles at switching between several StarOffice application windows, e.g. "Switch to window, Untitled1 - StarOffice" <br />
<br />
|-<br />
| Open/Close Dialog<br />
| Verify that AT-Tools respects a StarOffice dialog that is opened/closed, e.g. "Create window Open, Switch to window"<br />
<br />
|-<br />
| Open/Close Toolbox<br />
| Verify that AT-Tools respects a StarOffice toolbox that is opened/closed, e.g. "Create window Navigator, Switch to window"<br />
<br />
|-<br />
| '''''Menu:'''''<br />
| <br />
<br />
|-<br />
| Name, Role, shortcut/accelerator<br />
| Verify that AT-Tools reports the name, role and number of items of menu, e.g. "View, menu, twenty-two items"<br />
<br />
|-<br />
| '''''Push button:'''''<br />
| <br />
<br />
|-<br />
| Name, Role, shortcut/accelerator<br />
| Verify that AT-Tools reports the name, role and shortcut of push button, e.g. "Help, push button, shortcut Alt+H"<br />
<br />
|-<br />
| '''''Toggle button:'''''<br />
| <br />
<br />
|-<br />
| Name, Role, state<br />
| Verify that AT-Tools reports the name, role and state of toggle button, e.g. "Bold, toggle button, unpressed"<br />
<br />
|-<br />
| State change<br />
| Change the state from unpressed to pressed (or vice versa) and verify that AT-Tools reports the new state<br />
<br />
|-<br />
| '''''Radio button:'''''<br />
| <br />
<br />
|-<br />
| label, current selection, role and state<br />
| Verify that AT-Tools reports the label, current selection, role and state of radio button, e.g. "Quality Default, radio button, shortcut Alt+D, checked"<br />
<br />
|-<br />
| '''''Checkbox:'''''<br />
| <br />
<br />
|-<br />
| label, current selection, role and state<br />
| Verify that AT-Tools reports the name, role, shortcut and state of checkbox, e.g. "Read-only, checkbox, shortcut Alt+R, checked"<br />
<br />
|-<br />
| State change<br />
| Change the state from checked to unchecked (or vice versa) and verify that AT-Tools reports the new state<br />
<br />
|-<br />
| '''''Textfield:'''''<br />
| <br />
<br />
|-<br />
| Name, Role, Content<br />
| Verify that AT-Tools reports the name, role and content of textfield, e.g. "Company, text, StarOffice"<br />
<br />
|-<br />
| Input<br />
| Type text in the textfield and verify that AT-Tools reports every single character at cursor position<br />
<br />
|-<br />
| Deletion<br />
| Delete text and verify that AT-Tools reports every single character at cursor position<br />
<br />
|-<br />
| Travel<br />
| Move cursor in the text and verify that AT-Tools reports every single character at cursor position<br />
<br />
|-<br />
| '''''Spin button:'''''<br />
| <br />
<br />
|-<br />
| Name, Role, Content<br />
| Verify that AT-Tools reports the name, role and value of spin button, e.g. "number of steps, text, twenty"<br />
<br />
|-<br />
| Content change<br />
| Change the value of the spin button and verify that AT-Tools reports the entire new value<br />
<br />
|-<br />
| Input<br />
| Type a value in the textfield and verify that AT-Tools reports every single number at cursor position<br />
<br />
|-<br />
| Deletion<br />
| Delete a number and verify that AT-Tools reports every single number at cursor position<br />
<br />
|-<br />
| Travel<br />
| Move cursor in the value and verify that AT-Tools reports every single number at cursor position<br />
<br />
|-<br />
| '''''Drop down box:'''''<br />
| <br />
<br />
|-<br />
| Name, Role<br />
| Verify that AT-Tools reports name, role of visible item, e.g. "File type, list, Drawings"<br />
<br />
|-<br />
| Content change<br />
| Select another item and check that AT-Tools reports the name and role of that item.<br />
<br />
|-<br />
| '''''Combo box:'''''<br />
| <br />
<br />
|-<br />
| Name, Role<br />
| Verify that AT-Tools reports reports name, role of visible item, e.g. "Font, list, Helvetica"<br />
<br />
|-<br />
| Content change<br />
| Select another item and check that AT-Tools reports the name and role of that item.<br />
<br />
|-<br />
| Input<br />
| Type text in the textfield and verify that AT-Tools reports every single character at cursor position<br />
<br />
|-<br />
| Deletion<br />
| Delete text and verify that AT-Tools reports every single character at cursor position<br />
<br />
|-<br />
| Travel<br />
| Move cursor in the text and verify that AT-Tools reports every single character at cursor position<br />
<br />
|-<br />
| '''''List box:'''''<br />
| <br />
<br />
|-<br />
| Name, Role<br />
| Verify that AT-Tools reports name, role of visible item, e.g. "Category, list, 11 items, Currency"<br />
<br />
|-<br />
| Content change<br />
| Select another item of the list and check that AT-Tools reports the name and role of that item.<br />
<br />
|-<br />
| '''''Tab Page:'''''<br />
| <br />
<br />
|-<br />
| Label and role<br />
| Verify that AT-Tools reports the label and role of page tab, e.g. "Font, page tab"<br />
<br />
|-<br />
| '''''Tree list:'''''<br />
| <br />
<br />
|-<br />
| Name, Role<br />
| Verify that AT-Tools reports the current selected tree item with name and role e.g. "StarOffice, tree item"<br />
<br />
|}<br />
<br />
[[Category:Accessibility]]</div>Kirkhttps://wiki.openoffice.org/wiki/API/UNO_AWTAPI/UNO AWT2009-11-23T00:21:09Z<p>Kirk: </p>
<hr />
<div>{{DISPLAYTITLE:UNO AWT Toolkit}}<br />
<br />
...<br />
<br />
==UNO AWT Controls==<br />
<DPL> category=API<br />
category=UNO AWT</DPL><br />
<br />
[[Category:UNO AWT]]</div>Kirkhttps://wiki.openoffice.org/wiki/API/UNO_AWTAPI/UNO AWT2009-11-23T00:18:44Z<p>Kirk: </p>
<hr />
<div>{{DISPLAYTITLE:UNO AWT Toolkit}}<br />
<br />
...<br />
<br />
==UNO AWT Controls==<br />
<DPL> category=API<br />
category=UNO AWT</DPL><br />
<br />
<br />
{{category:API}}</div>Kirkhttps://wiki.openoffice.org/wiki/Documentation/OOo3_User_Guides/Calc_Guide/Examples_of_functionsDocumentation/OOo3 User Guides/Calc Guide/Examples of functions2009-10-06T05:47:35Z<p>Kirk: </p>
<hr />
<div>{{DISPLAYTITLE:Examples of functions}}<br />
{{Documentation/CG3Ch3TOC<br />
|ShowPrevNext=block<br />
|PrevPage=Documentation/OOo3_User_Guides/Calc Guide/Finding and fixing errors<br />
|NextPage=Documentation/OOo3_User_Guides/Calc Guide/Using regular expressions in functions<br />
}}<br />
For novices, functions are one of the most intimidating features of OpenOffice.org's Calc. New users quickly learn that functions are an important feature of spreadsheets, but there are almost four hundred, and many require input that assume specialized knowledge. Fortunately, Calc includes dozens of functions that anyone can use.<br />
<br />
== Basic arithmetic and statistic functions ==<br />
The most basic functions create formulas for basic arithmetic or for evaluating numbers in a range of cells.<br />
<br />
=== Basic arithmetic ===<br />
The simple arithmetic operations are addition, subtraction, multiplication, and division.<br />
<br />
Except for subtraction, each of these operations has a related function. You can use SUM for addition, PRODUCT for multiplication, and QUOTIENT for division. Traditionally, subtraction does not have a function.<br />
<br />
SUM, PRODUCT and QUOTIENT are useful for entering ranges of cells in the same way as any other function, with arguments in brackets after the function name.<br />
<br />
However, for basic equations, many users prefer the time-honored computer symbols for these operations, using the plus sign (+) for addition, the hyphen (–) for subtraction, the asterisk (*) for multiplication and the forward slash (/) for division. These symbols are quick to enter without requiring your hands to stray from the keyboard.<br />
<br />
A similar choice is also available if you want to raise a number by the power of another. Instead of entering =POWER(A1;2), you can enter =A1^2.<br />
<br />
Moreover, they have the advantage that you enter formulas with them in an order that more closely approximates human readable format than the spreadsheet-readable format used by the equivalent function. For instance, instead of entering =SUM (A1:A2), or possibly =SUM (A1;A2), you enter =A1+A2. This almost-human readable format is especially useful for compound operations, where writing <nowiki>=A1*(A2+A3) is briefer and easier to read than =PRODUCT(A1;SUM(A2:A3)).</nowiki><br />
<br />
The main disadvantage of using arithmetical operators is that you cannot directly use a range of cells. In other words, to enter the equivalent of =SUM (A1:A3), you would need to type =A1+A2+A3. <br />
<br />
Otherwise, whether you use a function or an operator is largely up to you—except, of course, when you are subtracting. However, if you use spreadsheets regularly in a group setting such as a class or an office, you might want to standardize on an entry format so that everyone who handles a spreadsheet becomes accustomed to a standard input.<br />
<br />
=== Simple statistics ===<br />
Another common use for spreadsheet functions is to pull useful information out of a list, such as a series of test scores in a class, or a summary of earnings per quarter for a company.<br />
<br />
You can, of course, scan a list of figures if you want basic information such as the highest or lowest entry or the average. The only trouble is, the longer the list, the more time you waste and the more likely you are to miss what you’re looking for. Instead, it is usually quicker and more efficient to enter a function. Such reasons explain the existence of a function like COUNT, which does no more than give the total number of entries in the designated cell range.<br />
<br />
Similarly, to find the highest or lowest entry, you can use MIN or MAX. For each of these formulas, all arguments are either a range of cells, or a series of cells entered individually.<br />
<br />
Each also has a related function, MINA or MAXA, which performs the same function, but treats a cell formatted for text as having a value of 0 (The same treatment of text occurs in any variation of another function that adds an "A" to the end). Either function gives the same result, and could be useful if you used a text notation to indicate, for example, if any student were absent when a test was written, and you wanted to check whether you needed to schedule a makeup exam.<br />
<br />
For more flexibility in similar operations, you could use LARGE or SMALL, both of which add a specialized argument of rank. If the rank is 1 used with LARGE, you get the same result as you would with MAX. However, if the rank is 2, then the result is the second largest result. Similarly, a rank of 2 used with SMALL gives you the second smallest number. Both LARGE and SMALL are handy as a permanent control, since, by changing the rank argument, you can quickly scan multiple results.<br />
<br />
You would need to be an expert to want to find the Poisson Distribution of a sample, or to find the skew or negative binominal of a distribution (and, if you are, you will find functions in Calc for such things). However, for the rest of us, there are simpler statistical functions that you can quickly learn to use.<br />
<br />
In particular, if you need an average, you have a number to choose from. You can find the arithmetical means—that is, the result when you add all entries in a list then divided by the number of entries by enter a range of numbers when using AVERAGE, or AVERAGE A to include text entries and to give them a value of zero.<br />
<br />
In addition, you can get several other forms of averages:<br />
<br />
* '''MEDIAN:''' The entry that is exactly half way between the highest and lowest number in a list.<br />
* '''MODE:''' The most common entry in a list of numbers.<br />
* '''QUARTILE:'''The entry at a set position in the array of numbers. Besides the cell range, you enter the type of Quartile: O for the lowest entry, 1 for the value of 25%, 2 for the value of 50%, 3 for 75%, and 4 for the highest entry. Note that the result for types 1 through 3 may not represent an actual item entered.<br />
* '''RANK:''' The position of a given entry in the entire list, measured either from top to bottom or bottom to top. You need to enter the cell address for the entry, the range of entries, and the type of rank ('''0''' for the rank from the highest, or '''1''' for the rank from the bottom.<br />
<br />
Some of these functions overlap; for example, MIN and MAX are both covered by QUARTILE. In other cases, a custom sort or filter might give much the same result. Which you use depends on your temperament and your needs. Some might prefer to use MIN and MAX because they are easy to remember, while others might prefer QUARTILE because it is more versatile.<br />
<br />
=== Using these functions ===<br />
In some cases, you may be able to get similar results to some of these functions by setting up a filter or a custom sort. However, in general, functions are more easily adjusted than filters or sorts, and provide a wide range of possibilities.<br />
<br />
At times, you may just want to enter one or more formulas temporarily in a convenient blank square, and delete it once you have satisfied your curiosity. However, if you find yourself using the same functions constantly, you should consider creating a template and including space for all the functions you use, with the cell to their left used as a label for them. Once you have created the template, you can easily update each formula as entries change, either automatically and on-the-fly or pressing the ''F9'' key to update all selected cells. The choice, really, is yours.<br />
<br />
No matter how you use these functions, you will probably find them simple to use and adaptable to many purposes. And, by the time you have mastered this handful, you will be ready to try more complex functions.<br />
<br />
== Rounding off numbers ==<br />
For statistical and mathematical purposes, Calc includes a variety of ways to round off numbers. If you’re a programmer, you may also be familiar with some of these methods. However, you don’t need to be a specialist to find some of these methods useful. You may want to round off for billing purposes, or because decimal places don’t translate well into the physical world—for instance, if the parts you need come in packages of 100, then the fact you only need 66 is irrelevant to you; you need to round up for ordering. By learning the options for rounding, you can make your spreadsheets more immediately useful.<br />
<br />
When you use a rounding function, you have two choices about how to set up your formulas. If you choose, you can nest a calculation within one of the rounding functions. For instance, the formula =ROUND((SUM(A1;A2)) adds the figures in cells A1 and A2, then rounds them off to the nearest whole number. But, even though you don’t need to work with exact figures every day, you may still want to refer to them occasionally. If that is the case, then you are probably better off separating the two functions, placing =SUM(A1;A2) in cell A3, and =ROUND (A3) in A4, and clearly labelling each function. Which choice you make for layout depends largely on your work habits.<br />
<br />
=== Rounding methods ===<br />
The most basic function for rounding numbers in Calc is ROUND. This function will round off a number according to the usual rules of symmetric arithmetic rounding: a decimal place of .4 or less gets rounded down, while one of .5 or more gets rounded up. However, at times, you may not want to follow these rules. For instance, if you are one of those contractors who bills a full hour for any fraction of an hour you work, you would want to always round up so you didn’t lose any money. Conversely, you might choose to round down to give a slight discount to a long-established customer. In these cases, you might prefer to use ROUNDUP or ROUNDDOWN, which, as their names suggest, round a number to the nearest integer above or below it. <br />
<br />
All three of these functions require the single argument of number—the cell or number to be rounded. Used with only this argument, all three functions round to the nearest whole number, so that 46.5 would round to 47 with ROUND or ROUNDUP and 46 with ROUNDDOWN. However, if you use the optional count argument, you can specify the number of decimal places to include. For instance, if number was set to 1, then 48.65 would round to 48.7 with ROUND or ROUNDUP and to 48.6 with ROUNDDOWN. <br />
<br />
As an alternative to ROUNDDOWN when working with decimals, you can use TRUNC (short for truncate). It takes exactly the same arguments as ROUNDDOWN, so which function you use is a matter of choice. If you aren't working with decimals, you might choose to use INT (short for integer), which takes only the number argument.<br />
<br />
Another option is the ODD and EVEN pair of functions. ODD rounds up to the nearest odd number if what is entered in the number argument is a positive number, and rounds down if it is a negative number, while EVEN does the same for an even number.<br />
<br />
Still another option are the CEILING and FLOOR functions. As you can guess from the names, CEILING rounds up and FLOOR rounds down. For both functions, the number that they round to is determined by the closest multiple of the number that you enter as the significance argument. For instance, if your business insurance is billed by the work week, the fact that you were only open three days one week would be irrelevant to your costs; you would still be charged for an entire week, and therefore might want to use CEILING in your monthly expenses. Conversely, if you are building customized computers and completed 4.5 in a day, your client would only be interested in the number ready to ship, so you might use FLOOR in a report of your progress.<br />
<br />
Besides number and significance, both CEILING and FLOOR include an optional argument called mode, which takes a value of 0 or 1. If mode is set to 0, and both the number and the significance are negative numbers, then the result of either function is rounded up; if it is set to 1, and both the number and the significance are negative numbers, the the results are rounded down. In other words, if the number is -11 and the significance is -5, then the result is -10 when the mode is set to 0, but -15 when set to 1.<br />
<br />
However, if you are exchanging spreadsheets between Calc and MS Excel, remember that the mode argument is not supported by Excel. If you want the answers to be consistent between the two spreadsheets, set the mode in Calc to -1.<br />
<br />
A function somewhat similar to CEILING and FLOOR is MROUND. Like CEILING AND FLOOR, MROUND requires two arguments, although, somewhat confusingly, the second one is called multiple rather than significance, even though the two are identical. The difference between MROUND and CEILING and FLOOR is that MROUND rounds up or down using symmetric arithmetic rounding. For example, if the number is 77 and the multiple is 5, then MROUND gives a result of 75. However, if the multiple is changed to 7, then MROUND's result becomes 77. <br />
<br />
Once you tease the various rounding functions out of Calc’s long, undifferentiated list of functions, you can start to decide which is most useful for your purposes.<br />
<br />
However, one last point is worth mentioning: If you are working with more than two decimal places, don't be surprised if you don’t see the same number of decimal places on the spreadsheet as you do on the function wizard. If you don’t, the reason is that '''Tools > Options > OpenOffice.org Calc > Calculate > Decimal Places''' defaults to 2. Change the number of decimal places, and, if necessary, uncheck the '''Precision as shown''' box on the same page, and the spreadsheet will display as expected.<br />
<br />
<br />
{{CCBY}}<br />
[[Category: Calc Guide (Documentation)]]</div>Kirkhttps://wiki.openoffice.org/wiki/Documentation/OOo3_User_Guides/Calc_Guide/Creating_formulasDocumentation/OOo3 User Guides/Calc Guide/Creating formulas2009-09-29T03:44:55Z<p>Kirk: /* Operators in formulas */ Cleanup editing</p>
<hr />
<div>{{DISPLAYTITLE:Creating formulas}}<br />
{{Documentation/CG3Ch3TOC<br />
|ShowPrevNext=block<br />
|PrevPage=Documentation/OOo3_User_Guides/Calc Guide/Formulas and Functions<br />
|NextPage=Documentation/OOo3_User_Guides/Calc Guide/Using functions<br />
}}<br />
==Introduction==<br />
By convention, only three kinds of data can be entered in a cell. Text, Numbers, and Formulas. You can enter formulas in two ways, either in the cell itself, or at the input line. Either way you will need to start it with one of the following symbols: "=", "+" or "-". Starting with anything else will cause the formula to be treated as if it were text.<br />
<br />
== Operators in formulas ==<br />
Each cell on the worksheet can be used as a data holder or a place for data calculations. Entering data is accomplished simply by typing in the cell and moving to the next cell or pressing Enter. With formulas the equals sign indicates that the cell will be used for a calculation. A mathematical calculation like 15 + 46 can be accomplished as shown below.<br />
<br />
{{Documentation/Note| To enter the <nowiki>=</nowiki> symbol for a purpose other than creating a formula as described in this chapter, type an apostrophe or single quotation mark before the data; for example, <nowiki>'=</nowiki> means different things to different people. Calc treats everything after the single quotation symbol as text.}}<br />
<br />
{| class="prettytable"<br />
| '''''Simple Calculation in 1 Cell'''''<br />
| '''''Calculation by Reference'''''<br />
<br />
|-<br />
| [[Image:CG3Ch3F5a.png]]<br />
| [[Image:CG3Ch3F5b.png]]<br />
<br />
|-<br />
| [[Image:CG3Ch3F5c.png]]<br />
| [[Image:CG3Ch3F5e.png]]<br />
<br />
|-<br />
| <br />
| [[Image:CG3Ch3F5d.png]]<br />
<br />
|}<br />
''A simple calculation.''<br />
<br />
While the calculation on the left was accomplished in only one cell, the real power is shown on the right where the data is placed in cells and the calculation is performed using references back to the cells. In this case, cells B3 and B4 were the data holders with B5 the cell where the calculation was performed. Note that the formula was shown as =B3 + B4. The plus sign indicates that the contents of cells B3 and B4 are to be added together and then have the result in the cell holding the formula. All formulas build upon this concept. Other ways of entering formulas are shown in Table 1.<br />
<br />
These cell references allow formulas to use data from anywhere in the worksheet being worked on or from any other worksheet in the workbook that is opened. If the data needed was on different worksheets they would be referenced by referring to the worksheet, for example <nowiki>=SUM(</nowiki>Sheet2.B12+Sheet3.A11).<br />
<br />
''Table 1: Common ways to enter formulas.''<br />
<br />
{| class="prettytable"<br />
! Formula<br />
! Description<br />
<br />
|-<br />
| <nowiki>=A1+10</nowiki><br />
| Displays the contents of cell A1 plus 10.<br />
<br />
|-<br />
| <nowiki>=A1*16%</nowiki><br />
| Displays 16% of the contents of A1.<br />
<br />
|-<br />
| <nowiki>=A1 * A2</nowiki><br />
| Displays the result of the multiplication of A1 and A2.<br />
<br />
|-<br />
| <nowiki>=ROUND(A1;1)</nowiki><br />
| Displays the contents of cell A1 rounded to one decimal place.<br />
<br />
|-<br />
| <nowiki>=EFFECTIVE(5%;12)</nowiki><br />
| Calculates the effective interest for 5% annual nominal interest with 12 payments a year.<br />
<br />
|-<br />
| <nowiki>=B8-SUM(B10:B14)</nowiki><br />
| Calculates B8 minus the sum of the cells B10 to B14.<br />
<br />
|-<br />
| <nowiki>=SUM(B8;SUM(B10:B14))</nowiki><br />
| Calculates the sum of cells B10 to B14 and adds the value to B8.<br />
<br />
|-<br />
| <nowiki>=SUM(B1:B65536)</nowiki><br />
| Sums all numbers in column B.<br />
<br />
|-<br />
| <nowiki>=AVERAGE(BloodSugar)</nowiki><br />
| Displays the average of a named range defined under the name BloodSugar.<br />
<br />
|-<br />
| <nowiki>=IF(C31>140; "HIGH"; "OK")</nowiki><br />
| Displays the results of a conditional analysis of data from two sources. If C31 = 144, then HIGH is displayed, otherwise OK is displayed.<br />
<br />
|}<br />
<br />
{{Documentation/Note| Users of Lotus 1-2-3®, Quattro Pro® and other spreadsheet software may be familiar with formulas that begin with <nowiki>+, -, =, (, @, ., $,</nowiki> or <nowiki>#</nowiki>. A mathematical formula would look like +D2+C2 or +2*3. Functions begin with the <nowiki>@</nowiki> symbol such as <nowiki>@SUM(D2..D7)</nowiki>, <nowiki>@COS(@DEGTORAD(30))</nowiki> and <nowiki>@IRR(GUESS;CASHFLOWS)</nowiki>. Ranges are identified such as <nowiki>A1..D3</nowiki>.}}<br />
<br />
Functions can be identified in Table 1 with a word, for example ROUND, followed by parentheses enclosing references or numbers.<br />
<br />
It is also possible to establish ranges for inclusion by naming them using '''Insert > Names''', for example BloodSugar representing a range such as B3:B10. Logical functions can also be performed as represented by the IF statement which results in a conditional response based upon the data in the identified cell.<br />
<br />
== Operator types ==<br />
You can use the following operators in OpenOffice.org Calc: arithmetic, comparative, text, and reference.<br />
<br />
=== Arithmetic operators ===<br />
The addition, subtraction, multiplication and division operators return numerical results. The Negation and Percent operators identify a characteristic of the number found in the cell, for example -37. The example for Exponentiation illustrates how to enter a number that is being multiplied by itself a certain number of times, for example 2<sup>3 </sup><nowiki>= 2*2*2.</nowiki><br />
<br />
''Table 2: Arithmetical operators''<br />
<br />
{| class="prettytable"<br />
| '''''Operator'''''<br />
| '''''Name'''''<br />
| '''''Example'''''<br />
<br />
|-<br />
| + (Plus)<br />
| Addition<br />
| <nowiki>=1+1</nowiki><br />
<br />
|-<br />
| - (Minus)<br />
| Subtraction<br />
| <nowiki>=2-1</nowiki><br />
<br />
|-<br />
| - (Minus)<br />
| Negation<br />
| -5<br />
<br />
|-<br />
| <nowiki>* (asterisk)</nowiki><br />
| Multiplication<br />
| <nowiki>=2*2</nowiki><br />
<br />
|-<br />
| / (Slash)<br />
| Division<br />
| <nowiki>=10/5</nowiki><br />
<br />
|-<br />
| % (Percent)<br />
| Percent<br />
| 15%<br />
<br />
|-<br />
| ^ (Caret)<br />
| Exponentiation<br />
| 2^3<br />
<br />
|}<br />
<br />
=== Comparative operators ===<br />
Comparative operators are found in formulas that use the IF function and return either a true or false answer; for example, <nowiki>=IF(B6>G12; 127; 0)</nowiki> which, loosely translated, means if the contents of cell B6 are greater than the contents of cell G12, then return the number 127, otherwise return the number 0.<br />
<br />
A direct answer of TRUE or FALSE can be obtained by entering a formula such as =B6>B12. If the numbers found in the referenced cells are accurately represented, the answer TRUE is returned, otherwise FALSE is returned.<br />
<br />
''Table 3: Comparative operators''<br />
<br />
{| class="prettytable"<br />
| '''''Operator'''''<br />
| '''''Name'''''<br />
| '''''Example'''''<br />
<br />
|-<br />
| <nowiki>= (equal sign)</nowiki><br />
| Equal<br />
| A1=B1<br />
<br />
|-<br />
| > (Greater than)<br />
| Greater than<br />
| A1>B1<br />
<br />
|-<br />
| <nowiki>< (Less than)</nowiki><br />
| Less than<br />
| <nowiki>A1<B1</nowiki><br />
<br />
|-<br />
| >= (Greater than or equal to)<br />
| Greater than or equal to<br />
| A1>=B1<br />
<br />
|-<br />
| <nowiki><= (Less than or equal to)</nowiki><br />
| Less than or equal to<br />
| <nowiki>A1<=B1</nowiki><br />
<br />
|-<br />
| <nowiki><> (Inequality)</nowiki><br />
| Inequality<br />
| <nowiki>A1<>B1</nowiki><br />
<br />
|}<br />
<br />
=== Text operators ===<br />
It is common for users to place text in spreadsheets. To provide for variability in what and how this type of data is displayed, text can be joined together in pieces coming from different places on the spreadsheet. Below is an example.<br />
<br />
[[Image:CG3Ch3F7a.png]]<br />
<br />
[[Image:CG3Ch3F7b.png]]<br />
<br />
''Text Concatenation.''<br />
<br />
In this example, specific pieces of the text were found in three different cells. To join these segments together, the formula also adds required spaces and punctuation housed within quotation marks resulting in a formula of <nowiki>=B6 & " " & C6 & ", " D6</nowiki>. The result is the concatenation into a correctly formatted date for this locale.<br />
<br />
Taking this example further, the result cell is defined as a name, then text concatenation is performed using this defined name.<br />
<br />
[[Image:CG3Ch3F8.png|thumb|none|500px|''Defining a name for a range of cells.'']]<br />
<br />
[[Image:CG3Ch3F9.png|thumb|none|500px|''Naming a cell or range of cells for inclusion in a formula.'']]<br />
<br />
[[Image:CG3Ch3F10a.png]]<br />
<br />
[[Image:CG3Ch3F10b.png]]<br />
<br />
[[Image:CG3Ch3F10c.png]]<br />
<br />
''Defining Names on a worksheet.''<br />
<br />
=== Reference operators ===<br />
In its simplest form a reference refers to a single cell. But references can also refer to a rectangle or cuboid range or a reference is a list of references. To build such references you need reference operators.<br />
<br />
An individual cell is identified by the column identifier (characters) located along the upper edge of the spreadsheet and a row identifier (number) found along the side of the spreadsheet. On spreadsheets read from left to right, the upper left cell is A1. The figure below shows these identifiers for Cell A1.<br />
<br />
[[Image:CG3Ch3F11.png|thumb|none|500px|''A single cell reference'']]<br />
<br />
====Range operator====<br />
<br />
The range operator is written as colon. An expression using the range operator has the syntax<br />
<br />
reference left ''':''' reference right<br />
<br />
The range operator builds a reference to the smallest range including both the cells referenced with the left reference and the cells referenced with the right reference.<br />
<br />
[[Image:CG3Ch3F12.png|thumb|none|500px|''Reference to a rectangle range.'']]<br />
<br />
''The picture should be exchanged with one using the new transparent highlighting for selections. ''[[User:Regina|Regina]] 18:33, 19 September 2009 (UTC)<br />
<br />
In the upper left corner of the figure above, the reference A1:D12 is shown, corresponding to the cells included in the drag operation with the mouse to highlight the range.<br />
<br />
''The following is about selecting and naming cells and should be moved somewhere else or be dropped.''[[User:Regina|Regina]] 18:33, 19 September 2009 (UTC)<br />
<br />
[start to move or drop]<br />
This same range could also be created <--wrong term! by entering in the Name Box directly as shown below. After pressing ''Enter'', the same range is selected.<br />
<br />
[[Image:CG3Ch3F13.png|thumb|none|500px|''Direct entry of Reference Operator into Name Box.'']]<br />
<br />
A reference operator <--wrong term! can also be created by defining a named area by selecting the menu item '''Insert > Names > Define''', pressing ''Ctrl+F3'', or clicking the icon, if it shows on your toolbar.<br />
<br />
[end to move or drop]<br />
<br />
Examples<br />
<br />
{|<br />
|-<br />
|style="width:14em"|A2:B4<br />
|Reference to a rectangle range with 6 cells, 2 column width × 3 row height. When you click on the reference in the formula in the input line, a border indicates the rectangle.<br />
|-<br />
|(A2:B4):C9<br />
|Reference to a rectangle range with cell A2 top left and cell C9 bottom right. So the range contains 24 cells, 3 column width × 8 row height.<br />
|-<br />
|Sheet1.A3:Sheet3.D4<br />
|Reference to a cuboid range with 24 cells, 4 column width × 2 row height × 3 sheets depth.<br />
|}<br />
<br />
When you enter B4:A2 or A4:B2 directly, then OOo will turn it to A2:B4. So the left top cell of the range is left of the colon and the bottom right cell is right of the colon. But if you name the cell B4 for example with '_start' and A2 with '_end', you can use _start:_end without any error.<br />
<br />
OOo can not reference a whole column of unspecified length via A:A or a whole row via 1:1 yet as you might know from other spreadsheet programs, see {{bug|20495}}.<br />
<br />
====Reference Concatenation Operator====<br />
<br />
The concatenation operator is written as tilde. An expression using the concatenation operator has the syntax<br />
<br />
reference left '''~''' reference right<br />
<br />
The result of such an expression is a reference list, which is an ordered list of references. Some functions can take a reference list as argument, SUM, MAX or INDEX for example.<br />
<br />
The reference concatenation is sometimes called 'union'. But it is no set union. COUNT(A1:C3~B2:D2) returns 12 (=9+3), whereas looking at it as set of cells, it has only 10 cells.<br />
<br />
Notice that SUM(A1:C3;B2:D2) is different from SUM( A1:C3~B2:D2) although they give the same result. The first is a function call with 2 parameters, each of them is reference to a range. The second is a function call with 1 parameter, which is a reference list.<br />
<br />
====Intersection Operator====<br />
<br />
The intersection operator is written as exclamation mark. An expression using the intersection operator has the syntax<br />
<br />
reference left ! reference right<br />
<br />
If the references refer to single ranges, the result is a reference to a single range, containing all cells, which are both in the left reference and in the right reference.<br />
<br />
If the references are reference lists, than each list item from the left is intersected with each one from the right and these results are concatenated to a reference list. The order is, to first intersect the first item from the left with all items from the right, then intersect the second item from the left with all items from the right, and so on. <br />
<br />
Examples<br />
<br />
{|<br />
|-<br />
|style="width:20em"|A2:B4 ! B3:D6<br />
|This results a reference to the range B3:B4, because these cells are inside A2:B4 and inside B3:D4.<br />
|-<br />
|(A2:B4~B1:C2) ! (B2:C6~C1:D3)<br />
|First the intersections A2:B4!B2:C6, A2:B4!C1:D3, B1:C2!B2:C6 and B1:C2!C1:D3 are calculated. This results in B2:B4, empty, B2:C2, and C1:C2. Then these results are concatenated, dropping empty parts. So the final result is the reference list B2:B4 ~ B2:C2 ~ C1:C2.<br />
|}<br />
<br />
You can use the intersection operator to refer a cell in a cross tabulation in an good understandable way. If you have columns labeled 'Temperature' and 'Precipitation' and the rows labeled 'January', 'February', 'March',… then the expression<br />
<br />
'February' ! !Temperature'<br />
<br />
will reference to the cell containing the temperature in February.<br />
<br />
The intersection operator ! should have a higher precedence than the concatenation operator ~, but in OOo3.1 it is wrong implemented. Therefore you should not rely on precedence, but always put the part which to be first calculated in parentheses.<br />
<br />
== Order of calculation ==<br />
''Order of calculation'' refers to the sequence that numerical operations are performed. Division and multiplication are performed before addition or subtraction. There is a common tendency to expect calculations to be made from left to right as the equation would be read in English. Calc evaluates the entire formula, then based upon programming precedence breaks the formula down executing multiplication and division operations before other operations. Due to this fact when creating formulas you should test your formula to make sure that the correct result is being obtained. An example of order of calculation in operation follows.<br />
<br />
''Table 4 – Order of Calculation''<br />
<br />
{| class="prettytable"<br />
| '''''Left To Right Calculation'''''<br />
| '''''Ordered Calculation'''''<br />
<br />
|-<br />
| 1+3*2+3 = 11<br />
| <nowiki>=1+3*2+3 result 10</nowiki><br />
<br />
|-<br />
| 1+3=4, then 4 X 2 = 8, then 8 + 3 = 11<br />
| 3*2=6, then 1 + 6 + 3 = 10<br />
<br />
|-<br />
| Another possible intention could be:<br />
| The program resolves the multiplication of 3 X 2 before dealing with the numbers being added.<br />
<br />
|-<br />
| 1+3*2+3 = 20<br />
| <br />
<br />
|}<br />
<br />
If you intend for the result to be either of the two possible solutions on the left, the way to achieve these results would be to order the formula as:<br />
<br />
{| class="prettytable"<br />
| ((1+3) * 2)+3 = 11<br />
| (1+3) * (2+3) = 20<br />
<br />
|}<br />
<br />
{{Documentation/Note| Consider using parentheses grouping operations to avoid obtaining incorrect calculations, e.g. <nowiki>= B4+G12*C4/M12</nowiki> becoming <nowiki>=((B4+G12)*C4)/M12</nowiki>.}}<br />
<br />
== Calculations linking sheets ==<br />
Another powerful feature of Calc is the ability to link data through several worksheets. The naming of worksheets can be helpful to identify where specific data may be found. A name such a Payroll or Boise Sales is much more meaningful than Sheet1. The function named SHEET() returns the sheet number in the collection of spreadsheets. With this function, if you are currently on the third sheet counting from the left along the worksheet tabs, the number 3 is returned. If you drag the worksheets around to different locations among the tabs, the number will return the number referring to the current position of this worksheet.<br />
<br />
{{Documentation/Caution| Users may experience a problem when creating a formula that references other worksheets. If you use the function <nowiki>SHEET()</nowiki> the number of the current worksheet appears even if you enter the name of the worksheet desired, e.g., <nowiki>=SHEET(Branch4)</nowiki> and you have as the top worksheet named CombinedOperations. This function only refers to the current or top worksheet and not to other worksheets found in the collection or file.}}<br />
<br />
An example of calculations obtaining data from other work can be seen in a business setting where a business combines its branch operations into a single worksheet.<br />
<br />
{| class="prettytable"<br />
| [[Image:CG3Ch3F14a.png]]<br />
| Sheet containing data for Branch 1.<br />
<br />
|-<br />
| [[Image:CG3Ch3F14b.png]]<br />
| Sheet containing data for Branch 2.<br />
<br />
|-<br />
| [[Image:CG3Ch3F14c.png]]<br />
| Sheet containing data for Branch 3.<br />
<br />
|-<br />
| [[Image:CG3Ch3F14d.png]]<br />
| Sheet containing combined data for all branches.<br />
<br />
|}<br />
''Combining data from several sheets into a single sheet.''<br />
<br />
To accomplish the links, it can be easier if the Function Wizard is used.<br />
<br />
# Open the Function Wizard by clicking the f(x) button on the toolbar, or by selecting '''Insert > Function''', or by pressing ''Ctrl+F2''. <br />
# Select a category of functions to shorten the list, then scroll down through the named functions and select the required one. When you select a function, its description appears on the right-hand side of the dialog. Double-click on the required function.<br />
# The wizard now displays an area to the right where you can enter data manually in text boxes or click the '''Shrink''' button [[Image:]] to shrink the wizard so you can select the cells from the worksheet.<br />
# To select cells, either click directly upon the needed cell or hold down the left mouse button and drag to select the needed area.<br />
# When the area has been selected, click the '''Shrink''' button again to return to the wizard. <br />
# If multiple ranges are needed, then select the next text box below the first and perform the same task for the next range. The wizard will accept in the Sum function up to 30 such ranges.<br />
<br />
The following figures show how to create the combined sheet shown in the example above.<br />
<br />
[[Image:CG3Ch3F15.png|thumb|none|500px|''Selecting the SUM function in the Function Wizard.'']]<br />
<br />
[[Image:CG3Ch3F16.png|thumb|none|500px|''Further steps in selecting cells containing data.'']]<br />
<br />
[[Image:CG3Ch3F17.png|thumb|none|500px|''Completed entries in Function Wizard.'']]<br />
<br />
== Strategies for creating formulas ==<br />
There are several broad approaches when making a decision to create a formula. In deciding on an approach, consider how many other people will need to use the worksheets, the life of the worksheets, and the variations that could be encountered from use.<br />
<br />
=== Enter a unique formula in each cell ===<br />
The first and most basic strategy is to view whatever formulas are needed as simple and with a limited use life. The strategy is then to place a unique formula in each appropriate cell.<br />
<br />
=== Break formulas into parts and combine the parts ===<br />
The second strategy is similar, but instead you break down longer formulas into smaller parts and then combine the parts into the whole.<br />
<br />
Editor's note: This needs some explanation, but it is NOT about the "formula editor" (Math).<br />
<br />
=== Use the Basic editor to create functions ===<br />
A third strategy is to use the Basic editor and create your own functions. This approach would be used where the result would greatly simplify the use of the spreadsheet by the end user and keep the formulas simple with a better chance of avoiding errors. This approach also can make the maintenance easier by having corrections or updates kept in one central location. The use of macros is described in Chapter 12 of this book.<br />
<br />
<br />
{{CCBY}}<br />
[[Category: Calc Guide (Documentation)]]</div>Kirkhttps://wiki.openoffice.org/wiki/Talk:Documentation/OOo3_User_Guides/Calc_Guide/Using_functionsTalk:Documentation/OOo3 User Guides/Calc Guide/Using functions2009-09-18T05:53:56Z<p>Kirk: (checkpoint save)</p>
<hr />
<div>+ and * are not functions but operators. The umbrella term for 2+3 and sin(0.3) and PRODUCT(3;SUM(4;5)) is 'expression'.<br />
<br />
SUM and + are not the same, and PRODUCT and * are not the same too. You see the difference, when you use ranges as parameter, or when you use them with empty cells or with cells, which contain text.<br />
<br />
The terms 'function' and 'formula' are sometimes not clear, sometimes false. For example:<br />
*"Like most functions, this one starts with an equal sign."<br />
<br />
: Formulas start with an equal sign but functions never start with an equal sign, but simple start with their function name. (To please Excel users, entering formulas can also start with a + or a - sign and the equal sign will be added automatically.) Formulas are identified by starting with an equal sign. Formulas have the syntax =expression<br />
<br />
*"Strictly speaking, when all the arguments are entered and a function is ready to run, it becomes a formula."<br />
: Something like =7 is a formula although it doesn't contain any function. Functions are part of a formula, but the function alone is not a formula and will not become a formula.<br />
<br />
*"because a formula can use functions as an argument."<br />
: The term 'argument' is inapplicable to 'formula', but is a mathematical term in connection with functions.<br />
<br />
"separated by semicolons, with no space between the arguments and the semicolons." That is wrong, you can use spaces if you want. White space is ignored.<br />
<br />
"A formula, however, is limited by the fact that it can only do one function at a time." I do not understand that. What do you mean with "do one function at a time"?<br />
<br />
Your description of nesting does not fit to the example<br />
=IF(A1<>0; A1*SIN(1/A1); 0).<br />
<br />
[[User:Regina|Regina]] 22:32, 26 May 2009 (UTC)<br />
<br />
The above issues have been dealt with, though there is still a bit of final editing to be done. --[[User:Kirk|Kirk]] 05:53, 18 September 2009 (UTC)</div>Kirkhttps://wiki.openoffice.org/wiki/Documentation/OOo3_User_Guides/Calc_Guide/Using_functionsDocumentation/OOo3 User Guides/Calc Guide/Using functions2009-09-18T05:50:47Z<p>Kirk: /* Advanced structure */</p>
<hr />
<div>{{DISPLAYTITLE:Understanding functions}}<br />
{{Documentation/CG3Ch3TOC<br />
|ShowPrevNext=block<br />
|PrevPage=Documentation/OOo3_User_Guides/Calc Guide/Creating formulas<br />
|NextPage=Documentation/OOo3_User_Guides/Calc Guide/Finding and fixing errors<br />
}}<br />
Calc includes over 350 functions to help you analyze and reference data. Many of these functions are for use with numbers, but many others are used with dates and times, or even text. A function may be as simple as adding two numbers together, or finding the average of a list of numbers. Alternatively, it may be as complex as calculating the standard deviation of a sample, or a hyperbolic tangent of a number. See a list of all functions in '''[[Documentation/How_Tos/Calc: Functions listed by category|functions listed by category]]'''.<br />
<br />
Typically, the name of a function is an abbreviated description of what the function does. For instance, the FV function gives the future value of an investment, while BIN2HEX converts a binary number to a hexadecimal number. By tradition, functions are entered entirely in upper case letters, although Calc will read them correctly if they are in lower or mixed case, too.<br />
<br />
A few basic functions are somewhat similar to operators. Examples:<br />
:"+", this operator will add two numbers together for a result. SUM() on the other hand will add a contiguous '''''range''''' of numbers together.<br />
:"*", this operator will multiply to numbers together for a result. PRODUCT() does the same for multiplying, that SUM() does for adding.<br />
<br />
Each function has a number of ''arguments'' used in the calculations. These arguments may or may not have their own name. Your task is to enter the arguments needed to run the function. In some cases, the arguments have pre-defined choices, and you may need to refer to the online help or Appendix B (Description of Functions) in this book to understand them. More often, however, an argument is a value that you enter manually, or one already entered in a cell or range of cells on the spreadsheet. In Calc, you can enter values from other cells by typing in their name or range, or by selecting cells with the mouse. Should the values in the cells change, the result of the function will be automatically updated.<br />
<br />
For compatibility, functions and their arguments in Calc have almost identical names to their counterparts in Microsoft Excel. However, both Excel and Calc have functions that the other lacks. Occasionally, too, functions with the same names in Calc and Excel have different arguments, or slightly different names for the same argument—neither of which can be imported to the other. However, perhaps nine-tenths of functions can be imported between Calc and Excel without any problems.<br />
<br />
== Understanding the structure of functions ==<br />
All functions have a similar structure. If you use the right tool for entering a function, you can escape learning this structure, but it is still worth knowing for troubleshooting.<br />
<br />
To give a typical example, the structure of a function to find cells that match entered search criteria is:<br />
<br />
<nowiki>= DCOUNT (Database;Database field;Search_criteria)</nowiki><br />
<br />
Since a function cannot exist on its' own, it must always be part of a formula. Consequently, even if the function represents the entire formula, there must be an "=" sign at the start of the formula. Regardless of where in the formula a function is, the Function will start with the function's name, DCOUNT in the example above. After the name of the function comes its arguments. All arguments are required, unless specifically listed as optional.<br />
<br />
Arguments are added within the brackets (parentheses) and separated by semicolons. Many arguments will be a number. A Calc function can take up to thirty numbers as an argument. That may not sound like much at first. However, when you realize that the number can be not only a number or a single cell, but also an array or range of cells that contain several or even hundreds of cells, then the apparent limitation vanishes.<br />
<br />
Depending on the nature of the function arguments may be entered as follow:<br />
<br />
:{|Border="1"<br />
|"text data"||The quotes establish that text or string data has been entered<br />
|-<br />
|9||In this case the number nine has been entered as a number<br />
|-<br />
|"9"||In this case the number nine is being entered as text<br />
|-<br />
|A1|| The address for whatever is in Cell A1 is being entered<br />
|}<br />
<br />
== Nested functions ==<br />
<br />
Functions can also be used as arguments within other functions.<br />
<br />
<nowiki>=SUM(2;PRODUCT(5;7))</nowiki><br />
<br />
To get an idea of what nested functions can do, imagine that you are designing a self-directed learning module. During the module, students do three quizzes, and enter the results in cells A1, A2, and A3. In A4, you can create a nested formula that begins by averaging the results of the quizzes with the formula <nowiki>=AVERAGE(A1:A3)</nowiki>. The formula then uses the IF function to give the student feedback that depends upon the average grade on the quizzes. The entire formula would read:<br />
<br />
<nowiki>=IF(AVERAGE(A1:A3) >85; "Congratulations! You are ready to advance to the next module";<br />
"Failed. Please review the material again. If necessary, contact your instructor for help")</nowiki><br />
<br />
Depending on the average, the student would receive the message for either congratulations or failure.<br />
<br />
If you are new to spreadsheets, the best way to think of functions is as a scripting language. We've used simple examples to explain more clearly, but, through nesting of functions, a Calc formula can quickly become complex.<br />
<br />
<br />
<br />
<br />
'''New in 3.1'''<br /><br />
Calc now keeps the syntax of a formula displayed in a tooltip next to the cell as a handy memory aid as you type.<br />
<br />
A more reliable method is to use the ''Function List''. Available from the '''Insert''' menu, the Function List automatically docks as a pane on the right side of the Calc editing window. If you wish, you can ''Control+double-click'' on a blank space at the top of the pane to undock this pane and make it a floating window.<br />
<br />
The Function List includes a brief description of each function and its arguments; highlight the function and look at the bottom of the pane to see the description. If necessary, hover the cursor over the division between the list and the description; when the cursor becomes a two-headed arrow, drag it upwards to increase the space for the description. Double-click on a function’s name to add it to the current cell, together with placeholders for each of the function’s arguments.<br />
<br />
Using the Function List is almost as fast as manual entry, and has the advantage of not requiring that you memorize a formula that you want to use. In theory, it should also be less error-prone. In practice, though, some users may fumble when replacing the placeholders with values. Another handy feature is the ability to display the last formulas used.<br />
<br />
[[Image:CG3Ch3F1.png|thumb|none|500px|''Function List docked to right side of Calc window.'']]<br />
<br />
The most commonly used input method is the ''Function Wizard''. To open the Function Wizard, select '''Insert > Function''', or click its button on the Function tool bar, or press ''Ctrl+F2''. Once open, the Function Wizard provides the same help features as the Function List, but adds fields in which you can see the result of a completed function, as well as the result of any larger formula of which it is part.<br />
<br />
[[Image:CG3Ch3F2.png|thumb|none|500px|''Functions page of Function Wizard.'']]<br />
<br />
You can also select the ''Structure'' tab to see a tree view of the parts of the formula. The main advantage over the Function List is that each argument is entered in its own field, making it easier to manage. The price of this reliability is slower input, but this is often a small price to pay, since precision is generally more important than speed when creating a spreadsheet.<br />
<br />
[[Image:CG3Ch3F3.png|thumb|none|500px|''Structure page of Function Wizard.'']]<br />
<br />
Another advantage of the Function Wizard is that you can reduce the window as you are adding each argument. At the end of each input field for an argument is the Shrink button [[Image:CalcShrinkIcon.png]]. The Shrink button temporarily removes all parts of the wizard except the current input field so that you can see the spreadsheet beneath. When you are finished entering the argument’s value, click the button again to return to the entire Function Wizard.<br />
<br />
[[Image:CG3Ch3F4.png|thumb|none|500px|''Function Wizard after shrinking.'']]<br />
<br />
Finally, as with many other features in OpenOffice.org, you can create a macro for any favorite function formula, and assign it to a tool bar, menu, or keystroke combination.<br />
<br />
No matter how you enter a formula, take a moment to check its structure before using it. If it looks right, press the ''Enter'' key or select the '''Accept''' button from the Function toolbar to add it to the cell and get its result (the Accept button is the green check mark beside the Input line).<br />
<br />
If you see the formula in the cell instead of the result, then Formulas are selected for display in '''Tools > Options > OpenOffice.org Calc > View > Display'''. Unselect the checkbox beside it, and the result will display. However, you can still see the formula in the formula bar field.<br />
<br />
{{CCBY}}<br />
[[Category: Calc Guide (Documentation)]]</div>Kirkhttps://wiki.openoffice.org/wiki/Documentation/OOo3_User_Guides/Calc_Guide/Using_functionsDocumentation/OOo3 User Guides/Calc Guide/Using functions2009-09-18T05:36:27Z<p>Kirk: /* Advanced structure */</p>
<hr />
<div>{{DISPLAYTITLE:Understanding functions}}<br />
{{Documentation/CG3Ch3TOC<br />
|ShowPrevNext=block<br />
|PrevPage=Documentation/OOo3_User_Guides/Calc Guide/Creating formulas<br />
|NextPage=Documentation/OOo3_User_Guides/Calc Guide/Finding and fixing errors<br />
}}<br />
Calc includes over 350 functions to help you analyze and reference data. Many of these functions are for use with numbers, but many others are used with dates and times, or even text. A function may be as simple as adding two numbers together, or finding the average of a list of numbers. Alternatively, it may be as complex as calculating the standard deviation of a sample, or a hyperbolic tangent of a number. See a list of all functions in '''[[Documentation/How_Tos/Calc: Functions listed by category|functions listed by category]]'''.<br />
<br />
Typically, the name of a function is an abbreviated description of what the function does. For instance, the FV function gives the future value of an investment, while BIN2HEX converts a binary number to a hexadecimal number. By tradition, functions are entered entirely in upper case letters, although Calc will read them correctly if they are in lower or mixed case, too.<br />
<br />
A few basic functions are somewhat similar to operators. Examples:<br />
:"+", this operator will add two numbers together for a result. SUM() on the other hand will add a contiguous '''''range''''' of numbers together.<br />
:"*", this operator will multiply to numbers together for a result. PRODUCT() does the same for multiplying, that SUM() does for adding.<br />
<br />
Each function has a number of ''arguments'' used in the calculations. These arguments may or may not have their own name. Your task is to enter the arguments needed to run the function. In some cases, the arguments have pre-defined choices, and you may need to refer to the online help or Appendix B (Description of Functions) in this book to understand them. More often, however, an argument is a value that you enter manually, or one already entered in a cell or range of cells on the spreadsheet. In Calc, you can enter values from other cells by typing in their name or range, or by selecting cells with the mouse. Should the values in the cells change, the result of the function will be automatically updated.<br />
<br />
For compatibility, functions and their arguments in Calc have almost identical names to their counterparts in Microsoft Excel. However, both Excel and Calc have functions that the other lacks. Occasionally, too, functions with the same names in Calc and Excel have different arguments, or slightly different names for the same argument—neither of which can be imported to the other. However, perhaps nine-tenths of functions can be imported between Calc and Excel without any problems.<br />
<br />
== Understanding the structure of functions ==<br />
All functions have a similar structure. If you use the right tool for entering a function, you can escape learning this structure, but it is still worth knowing for troubleshooting.<br />
<br />
To give a typical example, the structure of a function to find cells that match entered search criteria is:<br />
<br />
<nowiki>= DCOUNT (Database;Database field;Search_criteria)</nowiki><br />
<br />
Since a function cannot exist on its' own, it must always be part of a formula. Consequently, even if the function represents the entire formula, there must be an "=" sign at the start of the formula. Regardless of where in the formula a function is, the Function will start with the function's name, DCOUNT in the example above. After the name of the function comes its arguments. All arguments are required, unless specifically listed as optional.<br />
<br />
Arguments are added within the brackets (parentheses) and separated by semicolons. Many arguments will be a number. A Calc function can take up to thirty numbers as an argument. That may not sound like much at first. However, when you realize that the number can be not only a number or a single cell, but also an array or range of cells that contain several or even hundreds of cells, then the apparent limitation vanishes.<br />
<br />
Depending on the nature of the function arguments may be entered as follow:<br />
<br />
:{|Border="1"<br />
|"text data"||The quotes establish that text or string data has been entered<br />
|-<br />
|9||In this case the number nine has been entered as a number<br />
|-<br />
|"9"||In this case the number nine is being entered as text<br />
|-<br />
|A1|| The address for whatever is in Cell A1 is being entered<br />
|}<br />
<br />
== Advanced structure ==<br />
A formula, is limited by the fact that it can only do one function at a time. You need to make sure that functions are done in the right order if the formula is going to work.<br />
<br />
To help set the order for functions in a multiple-function formula, you use parentheses within parentheses. When the formula is run, Calc does the innermost function first, then works outwards. For example, in the simple calculation <nowiki>=2+(5*7)</nowiki>, Calc multiples 5 by 7 first. Only then is 2 added to the result to get 37.<br />
<br />
The placement of functions within sets of parentheses is called ''nesting''. Basically, nesting reduces a function that could run on its own to an argument in the formula. For example, in =2+(5*7), the formula (5*7) is nested within the larger formula of =2+(5*7). In other words, the nested function becomes an argument of another function.<br />
<br />
This relation is more obvious when doing a calculation using a function with a name. For all purposes,<br />
<br />
<nowiki>=SUM(2;PRODUCT(5;7))</nowiki><br />
<br />
is the same formula as <nowiki>=2+(5*7)</nowiki>. However, when SUM and PRODUCT are used, then the relation is clearer. The fact that the PRODUCT function comes after a semicolon and in a set of parentheses for the SUM function makes it clear that PRODUCT is an argument for SUM. In addition, the fact that the inner pair of parentheses is around (5;7) makes clear that this operation is done before the one defined by the outer pair of parentheses.<br />
<br />
To get an idea of what nested functions can do, imagine that you are designing a self-directed learning module. During the module, students do three quizzes, and enter the results in cells A1, A2, and A3. In A4, you can create a nested formula that begins by averaging the results of the quizzes with the formula <nowiki>=AVERAGE(A1:A3)</nowiki>. The formula then uses the IF function to give the student feedback that depends upon the average grade on the quizzes. The entire formula would read:<br />
<br />
<nowiki>=IF(AVERAGE(A1:A3) >85; "Congratulations! You are ready to advance to the next module";<br />
"Failed. Please review the material again. If necessary, contact your instructor for help")</nowiki><br />
<br />
Depending on the average, the student would receive the message for either congratulations or failure.<br />
<br />
Notice that the nested formula for the average does not require its own equal sign. The one at the start of the equation is enough for both formulas.<br />
<br />
If you are new to spreadsheets, the best way to think of functions is as a scripting language. We've used simple examples to explain more clearly, but, through nesting of functions, a Calc formula can quickly become complex.<br />
<br />
<br />
{{CCBY}}<br />
[[Category: Calc Guide (Documentation)]]<br />
<br />
'''New in 3.1'''<br /><br />
Calc now keeps the syntax of a formula displayed in a tooltip next to the cell as a handy memory aid as you type.<br />
<br />
A more reliable method is to use the ''Function List''. Available from the '''Insert''' menu, the Function List automatically docks as a pane on the right side of the Calc editing window. If you wish, you can ''Control+double-click'' on a blank space at the top of the pane to undock this pane and make it a floating window.<br />
<br />
The Function List includes a brief description of each function and its arguments; highlight the function and look at the bottom of the pane to see the description. If necessary, hover the cursor over the division between the list and the description; when the cursor becomes a two-headed arrow, drag it upwards to increase the space for the description. Double-click on a function’s name to add it to the current cell, together with placeholders for each of the function’s arguments.<br />
<br />
Using the Function List is almost as fast as manual entry, and has the advantage of not requiring that you memorize a formula that you want to use. In theory, it should also be less error-prone. In practice, though, some users may fumble when replacing the placeholders with values. Another handy feature is the ability to display the last formulas used.<br />
<br />
[[Image:CG3Ch3F1.png|thumb|none|500px|''Function List docked to right side of Calc window.'']]<br />
<br />
The most commonly used input method is the ''Function Wizard''. To open the Function Wizard, select '''Insert > Function''', or click its button on the Function tool bar, or press ''Ctrl+F2''. Once open, the Function Wizard provides the same help features as the Function List, but adds fields in which you can see the result of a completed function, as well as the result of any larger formula of which it is part.<br />
<br />
[[Image:CG3Ch3F2.png|thumb|none|500px|''Functions page of Function Wizard.'']]<br />
<br />
You can also select the ''Structure'' tab to see a tree view of the parts of the formula. The main advantage over the Function List is that each argument is entered in its own field, making it easier to manage. The price of this reliability is slower input, but this is often a small price to pay, since precision is generally more important than speed when creating a spreadsheet.<br />
<br />
[[Image:CG3Ch3F3.png|thumb|none|500px|''Structure page of Function Wizard.'']]<br />
<br />
Another advantage of the Function Wizard is that you can reduce the window as you are adding each argument. At the end of each input field for an argument is the Shrink button [[Image:CalcShrinkIcon.png]]. The Shrink button temporarily removes all parts of the wizard except the current input field so that you can see the spreadsheet beneath. When you are finished entering the argument’s value, click the button again to return to the entire Function Wizard.<br />
<br />
[[Image:CG3Ch3F4.png|thumb|none|500px|''Function Wizard after shrinking.'']]<br />
<br />
Finally, as with many other features in OpenOffice.org, you can create a macro for any favorite function formula, and assign it to a tool bar, menu, or keystroke combination.<br />
<br />
No matter how you enter a formula, take a moment to check its structure before using it. If it looks right, press the ''Enter'' key or select the '''Accept''' button from the Function toolbar to add it to the cell and get its result (the Accept button is the green check mark beside the Input line).<br />
<br />
If you see the formula in the cell instead of the result, then Formulas are selected for display in '''Tools > Options > OpenOffice.org Calc > View > Display'''. Unselect the checkbox beside it, and the result will display. However, you can still see the formula in the formula bar field.</div>Kirkhttps://wiki.openoffice.org/wiki/Documentation/OOo3_User_Guides/Calc_Guide/Using_functionsDocumentation/OOo3 User Guides/Calc Guide/Using functions2009-09-18T05:34:17Z<p>Kirk: /* Understanding the structure of functions */</p>
<hr />
<div>{{DISPLAYTITLE:Understanding functions}}<br />
{{Documentation/CG3Ch3TOC<br />
|ShowPrevNext=block<br />
|PrevPage=Documentation/OOo3_User_Guides/Calc Guide/Creating formulas<br />
|NextPage=Documentation/OOo3_User_Guides/Calc Guide/Finding and fixing errors<br />
}}<br />
Calc includes over 350 functions to help you analyze and reference data. Many of these functions are for use with numbers, but many others are used with dates and times, or even text. A function may be as simple as adding two numbers together, or finding the average of a list of numbers. Alternatively, it may be as complex as calculating the standard deviation of a sample, or a hyperbolic tangent of a number. See a list of all functions in '''[[Documentation/How_Tos/Calc: Functions listed by category|functions listed by category]]'''.<br />
<br />
Typically, the name of a function is an abbreviated description of what the function does. For instance, the FV function gives the future value of an investment, while BIN2HEX converts a binary number to a hexadecimal number. By tradition, functions are entered entirely in upper case letters, although Calc will read them correctly if they are in lower or mixed case, too.<br />
<br />
A few basic functions are somewhat similar to operators. Examples:<br />
:"+", this operator will add two numbers together for a result. SUM() on the other hand will add a contiguous '''''range''''' of numbers together.<br />
:"*", this operator will multiply to numbers together for a result. PRODUCT() does the same for multiplying, that SUM() does for adding.<br />
<br />
Each function has a number of ''arguments'' used in the calculations. These arguments may or may not have their own name. Your task is to enter the arguments needed to run the function. In some cases, the arguments have pre-defined choices, and you may need to refer to the online help or Appendix B (Description of Functions) in this book to understand them. More often, however, an argument is a value that you enter manually, or one already entered in a cell or range of cells on the spreadsheet. In Calc, you can enter values from other cells by typing in their name or range, or by selecting cells with the mouse. Should the values in the cells change, the result of the function will be automatically updated.<br />
<br />
For compatibility, functions and their arguments in Calc have almost identical names to their counterparts in Microsoft Excel. However, both Excel and Calc have functions that the other lacks. Occasionally, too, functions with the same names in Calc and Excel have different arguments, or slightly different names for the same argument—neither of which can be imported to the other. However, perhaps nine-tenths of functions can be imported between Calc and Excel without any problems.<br />
<br />
== Understanding the structure of functions ==<br />
All functions have a similar structure. If you use the right tool for entering a function, you can escape learning this structure, but it is still worth knowing for troubleshooting.<br />
<br />
To give a typical example, the structure of a function to find cells that match entered search criteria is:<br />
<br />
<nowiki>= DCOUNT (Database;Database field;Search_criteria)</nowiki><br />
<br />
Since a function cannot exist on its' own, it must always be part of a formula. Consequently, even if the function represents the entire formula, there must be an "=" sign at the start of the formula. Regardless of where in the formula a function is, the Function will start with the function's name, DCOUNT in the example above. After the name of the function comes its arguments. All arguments are required, unless specifically listed as optional.<br />
<br />
Arguments are added within the brackets (parentheses) and separated by semicolons. Many arguments will be a number. A Calc function can take up to thirty numbers as an argument. That may not sound like much at first. However, when you realize that the number can be not only a number or a single cell, but also an array or range of cells that contain several or even hundreds of cells, then the apparent limitation vanishes.<br />
<br />
Depending on the nature of the function arguments may be entered as follow:<br />
<br />
:{|Border="1"<br />
|"text data"||The quotes establish that text or string data has been entered<br />
|-<br />
|9||In this case the number nine has been entered as a number<br />
|-<br />
|"9"||In this case the number nine is being entered as text<br />
|-<br />
|A1|| The address for whatever is in Cell A1 is being entered<br />
|}<br />
<br />
== Advanced structure ==<br />
As well as being used on its own, a function can be an argument in a larger formula. A formula, however, is limited by the fact that it can only do one function at a time. You need to make sure that functions are done in the right order if the formula is going to work.<br />
<br />
To help set the order for functions in a multiple-function formula, you use parentheses within parentheses. When the formula is run, Calc does the innermost function first, then works outwards. For example, in the simple calculation <nowiki>=2+(5*7)</nowiki>, Calc multiples 5 by 7 first. Only then is 2 added to the result to get 37.<br />
<br />
The placement of functions within sets of parentheses is called ''nesting''. Basically, nesting reduces a function that could run on its own to an argument in the formula. For example, in =2+(5*7), the formula (5*7) is nested within the larger formula of =2+(5*7). In other words, the nested function becomes an argument of another function.<br />
<br />
This relation is more obvious when doing a calculation using a function with a name. For all purposes,<br />
<br />
<nowiki>=SUM(2;PRODUCT(5;7))</nowiki><br />
<br />
is the same formula as <nowiki>=2+(5*7)</nowiki>. However, when SUM and PRODUCT are used, then the relation is clearer. The fact that the PRODUCT function comes after a semicolon and in a set of parentheses for the SUM function makes it clear that PRODUCT is an argument for SUM. In addition, the fact that the inner pair of parentheses is around (5;7) makes clear that this operation is done before the one defined by the outer pair of parentheses.<br />
<br />
To get an idea of what nested functions can do, imagine that you are designing a self-directed learning module. During the module, students do three quizzes, and enter the results in cells A1, A2, and A3. In A4, you can create a nested formula that begins by averaging the results of the quizzes with the formula <nowiki>=AVERAGE(A1:A3)</nowiki>. The formula then uses the IF function to give the student feedback that depends upon the average grade on the quizzes. The entire formula would read:<br />
<br />
<nowiki>=IF(AVERAGE(A1:A3) >85; "Congratulations! You are ready to advance to the next module";<br />
"Failed. Please review the material again. If necessary, contact your instructor for help")</nowiki><br />
<br />
Depending on the average, the student would receive the message for either congratulations or failure.<br />
<br />
Notice that the nested formula for the average does not require its own equal sign. The one at the start of the equation is enough for both formulas.<br />
<br />
If you are new to spreadsheets, the best way to think of functions is as a scripting language. We've used simple examples to explain more clearly, but, through nesting of functions, a Calc formula can quickly become complex.<br />
<br />
<br />
{{CCBY}}<br />
[[Category: Calc Guide (Documentation)]]<br />
<br />
'''New in 3.1'''<br /><br />
Calc now keeps the syntax of a formula displayed in a tooltip next to the cell as a handy memory aid as you type.<br />
<br />
A more reliable method is to use the ''Function List''. Available from the '''Insert''' menu, the Function List automatically docks as a pane on the right side of the Calc editing window. If you wish, you can ''Control+double-click'' on a blank space at the top of the pane to undock this pane and make it a floating window.<br />
<br />
The Function List includes a brief description of each function and its arguments; highlight the function and look at the bottom of the pane to see the description. If necessary, hover the cursor over the division between the list and the description; when the cursor becomes a two-headed arrow, drag it upwards to increase the space for the description. Double-click on a function’s name to add it to the current cell, together with placeholders for each of the function’s arguments.<br />
<br />
Using the Function List is almost as fast as manual entry, and has the advantage of not requiring that you memorize a formula that you want to use. In theory, it should also be less error-prone. In practice, though, some users may fumble when replacing the placeholders with values. Another handy feature is the ability to display the last formulas used.<br />
<br />
[[Image:CG3Ch3F1.png|thumb|none|500px|''Function List docked to right side of Calc window.'']]<br />
<br />
The most commonly used input method is the ''Function Wizard''. To open the Function Wizard, select '''Insert > Function''', or click its button on the Function tool bar, or press ''Ctrl+F2''. Once open, the Function Wizard provides the same help features as the Function List, but adds fields in which you can see the result of a completed function, as well as the result of any larger formula of which it is part.<br />
<br />
[[Image:CG3Ch3F2.png|thumb|none|500px|''Functions page of Function Wizard.'']]<br />
<br />
You can also select the ''Structure'' tab to see a tree view of the parts of the formula. The main advantage over the Function List is that each argument is entered in its own field, making it easier to manage. The price of this reliability is slower input, but this is often a small price to pay, since precision is generally more important than speed when creating a spreadsheet.<br />
<br />
[[Image:CG3Ch3F3.png|thumb|none|500px|''Structure page of Function Wizard.'']]<br />
<br />
Another advantage of the Function Wizard is that you can reduce the window as you are adding each argument. At the end of each input field for an argument is the Shrink button [[Image:CalcShrinkIcon.png]]. The Shrink button temporarily removes all parts of the wizard except the current input field so that you can see the spreadsheet beneath. When you are finished entering the argument’s value, click the button again to return to the entire Function Wizard.<br />
<br />
[[Image:CG3Ch3F4.png|thumb|none|500px|''Function Wizard after shrinking.'']]<br />
<br />
Finally, as with many other features in OpenOffice.org, you can create a macro for any favorite function formula, and assign it to a tool bar, menu, or keystroke combination.<br />
<br />
No matter how you enter a formula, take a moment to check its structure before using it. If it looks right, press the ''Enter'' key or select the '''Accept''' button from the Function toolbar to add it to the cell and get its result (the Accept button is the green check mark beside the Input line).<br />
<br />
If you see the formula in the cell instead of the result, then Formulas are selected for display in '''Tools > Options > OpenOffice.org Calc > View > Display'''. Unselect the checkbox beside it, and the result will display. However, you can still see the formula in the formula bar field.</div>Kirkhttps://wiki.openoffice.org/wiki/Talk:Documentation/OOo3_User_Guides/Calc_Guide/Creating_formulasTalk:Documentation/OOo3 User Guides/Calc Guide/Creating formulas2009-09-18T05:28:57Z<p>Kirk: </p>
<hr />
<div>Delete the chapter " Break formulas into parts and combine the parts"! The formula editor (Insert > Object > Formula) is for typesetting formulas in texts and is very different from calculating formulas.<br />
<br />
[[User:Regina|Regina]] 00:04, 27 May 2009 (UTC)<br />
<br />
Indeed they are different and the bit on Math should not have been there. But I think the idea is correct: several cells can each hold part of a formula, with another cell combining the results from those cells into another calculation.<br />
<br />
[[User:jeanweber|Jean]] 14 Sept 2009<br />
<br />
<br />
I think the structure of the chapters is not good. If the user does not know anything, he first needs to learn how to use simple expressions, using functions are the second step.<br />
<br />
Using expressions should cover entering an expression, distinguish the shown expression result and the formula itself, using cell references, absolute and relative addressing, drag-fill, series, using labels and names and distinguish the use of them, access to external data, remarks on accuracy, precision and binary-format.<br />
<br />
The next chapter can be about functions. The description has to cover simple functions like SUM, the real array functions, forcing expressions to array mode, the group of the Database functions and SUBTOTAL, calculating with date and time, functions with conditions like COUNTIF and the group of LOOKUP-functions, working with texts, creating named expressions and BASIC functions. (Not necessary in that order.)<br />
<br />
[[User:Regina|Regina]] 22:54, 2 June 2009 (UTC)<br />
<br />
Just completed an initial cleanup of this page, and have eliminated the more obvious errors and problems. I will probably do a more complete going next after I done an initial cleanup of the other sections. In the meantime feel free to spot and/or cleanup anything that I've missed, while I work on the other pages in this chapter. --[[User:Kirk|Kirk]] 05:28, 18 September 2009 (UTC)</div>Kirkhttps://wiki.openoffice.org/wiki/Documentation/OOo3_User_Guides/Calc_Guide/Using_functionsDocumentation/OOo3 User Guides/Calc Guide/Using functions2009-09-18T05:21:40Z<p>Kirk: /* Understanding the structure of functions */</p>
<hr />
<div>{{DISPLAYTITLE:Understanding functions}}<br />
{{Documentation/CG3Ch3TOC<br />
|ShowPrevNext=block<br />
|PrevPage=Documentation/OOo3_User_Guides/Calc Guide/Creating formulas<br />
|NextPage=Documentation/OOo3_User_Guides/Calc Guide/Finding and fixing errors<br />
}}<br />
Calc includes over 350 functions to help you analyze and reference data. Many of these functions are for use with numbers, but many others are used with dates and times, or even text. A function may be as simple as adding two numbers together, or finding the average of a list of numbers. Alternatively, it may be as complex as calculating the standard deviation of a sample, or a hyperbolic tangent of a number. See a list of all functions in '''[[Documentation/How_Tos/Calc: Functions listed by category|functions listed by category]]'''.<br />
<br />
Typically, the name of a function is an abbreviated description of what the function does. For instance, the FV function gives the future value of an investment, while BIN2HEX converts a binary number to a hexadecimal number. By tradition, functions are entered entirely in upper case letters, although Calc will read them correctly if they are in lower or mixed case, too.<br />
<br />
A few basic functions are somewhat similar to operators. Examples:<br />
:"+", this operator will add two numbers together for a result. SUM() on the other hand will add a contiguous '''''range''''' of numbers together.<br />
:"*", this operator will multiply to numbers together for a result. PRODUCT() does the same for multiplying, that SUM() does for adding.<br />
<br />
Each function has a number of ''arguments'' used in the calculations. These arguments may or may not have their own name. Your task is to enter the arguments needed to run the function. In some cases, the arguments have pre-defined choices, and you may need to refer to the online help or Appendix B (Description of Functions) in this book to understand them. More often, however, an argument is a value that you enter manually, or one already entered in a cell or range of cells on the spreadsheet. In Calc, you can enter values from other cells by typing in their name or range, or by selecting cells with the mouse. Should the values in the cells change, the result of the function will be automatically updated.<br />
<br />
For compatibility, functions and their arguments in Calc have almost identical names to their counterparts in Microsoft Excel. However, both Excel and Calc have functions that the other lacks. Occasionally, too, functions with the same names in Calc and Excel have different arguments, or slightly different names for the same argument—neither of which can be imported to the other. However, perhaps nine-tenths of functions can be imported between Calc and Excel without any problems.<br />
<br />
== Understanding the structure of functions ==<br />
All functions have a similar structure. If you use the right tool for entering a function, you can escape learning this structure, but it is still worth knowing for troubleshooting.<br />
<br />
To give a typical example, the structure of a function to find cells that match entered search criteria is:<br />
<br />
<nowiki>= DCOUNT (Database;Database field;Search_criteria)</nowiki><br />
<br />
Since a function cannot exist on its' own, it must always be part of a formula. Consequently, even if the function represents the entire formula, there must be an "=" sign at the start of the formula. Regardless of where in the formula a function is, the Function will start with the function's name, DCOUNT in the example above. After the name of the function comes its arguments. All arguments are required, unless specifically listed as optional.<br />
<br />
Arguments are added within the brackets (parentheses) and separated by semicolons, with no space between the arguments and the semicolons. Many arguments will be a number. A Calc function can take up to thirty numbers as an argument. That may not sound like much at first. However, when you realize that the number can be not only a number or a single cell, but also an array or range of cells that contain several or even hundreds of cells, then the apparent limitation vanishes.<br />
<br />
Depending on the nature of the function arguments may be entered as follow:<br />
<br />
:{|Border="1"<br />
|"text data"||The quotes establish that text or string data has been entered<br />
|-<br />
|9||In this case the number nine has been entered as a number<br />
|-<br />
|"9"||In this case the number nine is being entered as text<br />
|-<br />
|A1|| The address for whatever is in Cell A1 is being entered<br />
|}<br />
<br />
== Advanced structure ==<br />
As well as being used on its own, a function can be an argument in a larger formula. A formula, however, is limited by the fact that it can only do one function at a time. You need to make sure that functions are done in the right order if the formula is going to work.<br />
<br />
To help set the order for functions in a multiple-function formula, you use parentheses within parentheses. When the formula is run, Calc does the innermost function first, then works outwards. For example, in the simple calculation <nowiki>=2+(5*7)</nowiki>, Calc multiples 5 by 7 first. Only then is 2 added to the result to get 37.<br />
<br />
The placement of functions within sets of parentheses is called ''nesting''. Basically, nesting reduces a function that could run on its own to an argument in the formula. For example, in =2+(5*7), the formula (5*7) is nested within the larger formula of =2+(5*7). In other words, the nested function becomes an argument of another function.<br />
<br />
This relation is more obvious when doing a calculation using a function with a name. For all purposes,<br />
<br />
<nowiki>=SUM(2;PRODUCT(5;7))</nowiki><br />
<br />
is the same formula as <nowiki>=2+(5*7)</nowiki>. However, when SUM and PRODUCT are used, then the relation is clearer. The fact that the PRODUCT function comes after a semicolon and in a set of parentheses for the SUM function makes it clear that PRODUCT is an argument for SUM. In addition, the fact that the inner pair of parentheses is around (5;7) makes clear that this operation is done before the one defined by the outer pair of parentheses.<br />
<br />
To get an idea of what nested functions can do, imagine that you are designing a self-directed learning module. During the module, students do three quizzes, and enter the results in cells A1, A2, and A3. In A4, you can create a nested formula that begins by averaging the results of the quizzes with the formula <nowiki>=AVERAGE(A1:A3)</nowiki>. The formula then uses the IF function to give the student feedback that depends upon the average grade on the quizzes. The entire formula would read:<br />
<br />
<nowiki>=IF(AVERAGE(A1:A3) >85; "Congratulations! You are ready to advance to the next module";<br />
"Failed. Please review the material again. If necessary, contact your instructor for help")</nowiki><br />
<br />
Depending on the average, the student would receive the message for either congratulations or failure.<br />
<br />
Notice that the nested formula for the average does not require its own equal sign. The one at the start of the equation is enough for both formulas.<br />
<br />
If you are new to spreadsheets, the best way to think of functions is as a scripting language. We've used simple examples to explain more clearly, but, through nesting of functions, a Calc formula can quickly become complex.<br />
<br />
<br />
{{CCBY}}<br />
[[Category: Calc Guide (Documentation)]]<br />
<br />
'''New in 3.1'''<br /><br />
Calc now keeps the syntax of a formula displayed in a tooltip next to the cell as a handy memory aid as you type.<br />
<br />
A more reliable method is to use the ''Function List''. Available from the '''Insert''' menu, the Function List automatically docks as a pane on the right side of the Calc editing window. If you wish, you can ''Control+double-click'' on a blank space at the top of the pane to undock this pane and make it a floating window.<br />
<br />
The Function List includes a brief description of each function and its arguments; highlight the function and look at the bottom of the pane to see the description. If necessary, hover the cursor over the division between the list and the description; when the cursor becomes a two-headed arrow, drag it upwards to increase the space for the description. Double-click on a function’s name to add it to the current cell, together with placeholders for each of the function’s arguments.<br />
<br />
Using the Function List is almost as fast as manual entry, and has the advantage of not requiring that you memorize a formula that you want to use. In theory, it should also be less error-prone. In practice, though, some users may fumble when replacing the placeholders with values. Another handy feature is the ability to display the last formulas used.<br />
<br />
[[Image:CG3Ch3F1.png|thumb|none|500px|''Function List docked to right side of Calc window.'']]<br />
<br />
The most commonly used input method is the ''Function Wizard''. To open the Function Wizard, select '''Insert > Function''', or click its button on the Function tool bar, or press ''Ctrl+F2''. Once open, the Function Wizard provides the same help features as the Function List, but adds fields in which you can see the result of a completed function, as well as the result of any larger formula of which it is part.<br />
<br />
[[Image:CG3Ch3F2.png|thumb|none|500px|''Functions page of Function Wizard.'']]<br />
<br />
You can also select the ''Structure'' tab to see a tree view of the parts of the formula. The main advantage over the Function List is that each argument is entered in its own field, making it easier to manage. The price of this reliability is slower input, but this is often a small price to pay, since precision is generally more important than speed when creating a spreadsheet.<br />
<br />
[[Image:CG3Ch3F3.png|thumb|none|500px|''Structure page of Function Wizard.'']]<br />
<br />
Another advantage of the Function Wizard is that you can reduce the window as you are adding each argument. At the end of each input field for an argument is the Shrink button [[Image:CalcShrinkIcon.png]]. The Shrink button temporarily removes all parts of the wizard except the current input field so that you can see the spreadsheet beneath. When you are finished entering the argument’s value, click the button again to return to the entire Function Wizard.<br />
<br />
[[Image:CG3Ch3F4.png|thumb|none|500px|''Function Wizard after shrinking.'']]<br />
<br />
Finally, as with many other features in OpenOffice.org, you can create a macro for any favorite function formula, and assign it to a tool bar, menu, or keystroke combination.<br />
<br />
No matter how you enter a formula, take a moment to check its structure before using it. If it looks right, press the ''Enter'' key or select the '''Accept''' button from the Function toolbar to add it to the cell and get its result (the Accept button is the green check mark beside the Input line).<br />
<br />
If you see the formula in the cell instead of the result, then Formulas are selected for display in '''Tools > Options > OpenOffice.org Calc > View > Display'''. Unselect the checkbox beside it, and the result will display. However, you can still see the formula in the formula bar field.</div>Kirkhttps://wiki.openoffice.org/wiki/Documentation/OOo3_User_Guides/Calc_Guide/Creating_formulasDocumentation/OOo3 User Guides/Calc Guide/Creating formulas2009-09-18T05:17:06Z<p>Kirk: /* Introduction */</p>
<hr />
<div>{{DISPLAYTITLE:Creating formulas}}<br />
{{Documentation/CG3Ch3TOC<br />
|ShowPrevNext=block<br />
|PrevPage=Documentation/OOo3_User_Guides/Calc Guide/Formulas and Functions<br />
|NextPage=Documentation/OOo3_User_Guides/Calc Guide/Using functions<br />
}}<br />
==Introduction==<br />
By convention, only three kinds of data can be entered in a cell. Text, Numbers, and Formulas. You can enter formulas in two ways, either in the cell itself, or at the input line. Either way you will need to start it with one of the following symbols: "=", "+" or "-". Starting with anything else will cause the formula to be treated as if it were text.<br />
<br />
== Operators in formulas ==<br />
Each cell on the worksheet can be used as a data holder or a place for data calculations. Inserting data is accomplished simply by typing the data in the cell and moving to the next cell or pressing Enter. With formulas the equal sign denotes that instead of the cell being a data holder, the cell will be used for a calculation. A mathematical calculation like 15 + 46 can be accomplished as shown below.<br />
<br />
{{Documentation/Note| To enter the <nowiki>=</nowiki> symbol for a purpose other than creating a formula as described in this chapter, type an apostrophe or single quotation mark before the data; for example, <nowiki>'=</nowiki> means different things to different people. Calc treats everything after the single quotation symbol as text.}}<br />
<br />
{| class="prettytable"<br />
| '''''Simple Calculation in 1 Cell'''''<br />
| '''''Calculation by Reference'''''<br />
<br />
|-<br />
| [[Image:CG3Ch3F5a.png]]<br />
| [[Image:CG3Ch3F5b.png]]<br />
<br />
|-<br />
| [[Image:CG3Ch3F5c.png]]<br />
| [[Image:CG3Ch3F5e.png]]<br />
<br />
|-<br />
| <br />
| [[Image:CG3Ch3F5d.png]]<br />
<br />
|}<br />
''A simple calculation.''<br />
<br />
While the calculation on the left was accomplished in only one cell, the real power is shown on the right where the data is placed in cells and the calculation is performed using references back to the cells. In this case, cells B3 and B4 were the data holders with B5 the cell where the calculation was performed. Notice that the formula was shown as =B3 + B4. The plus sign denotes addition as the operation being performed upon the data within cells B3 and B4. All formulas build upon this concept. Other ways of entering formulas are shown in Table 1.<br />
<br />
These back references to find data to perform a calculation can be found anywhere in the worksheet being worked on or upon any other worksheet in the workbook that is opened. If the data needed was on different worksheets they would be referenced by referring to the worksheet, for example <nowiki>=SUM(</nowiki>Sheet2.B12+Sheet3.A11).<br />
<br />
''Table 1: Common ways to enter formulas.''<br />
<br />
{| class="prettytable"<br />
! Formula<br />
! Description<br />
<br />
|-<br />
| <nowiki>=A1+10</nowiki><br />
| Displays the contents of cell A1 plus 10.<br />
<br />
|-<br />
| <nowiki>=A1*16%</nowiki><br />
| Displays 16% of the contents of A1.<br />
<br />
|-<br />
| <nowiki>=A1 * A2</nowiki><br />
| Displays the result of the multiplication of A1 and A2.<br />
<br />
|-<br />
| <nowiki>=ROUND(A1;1)</nowiki><br />
| Displays the contents of cell A1 rounded to one decimal place.<br />
<br />
|-<br />
| <nowiki>=EFFECTIVE(5%;12)</nowiki><br />
| Calculates the effective interest for 5% annual nominal interest with 12 payments a year.<br />
<br />
|-<br />
| <nowiki>=B8-SUM(B10:B14)</nowiki><br />
| Calculates B8 minus the sum of the cells B10 to B14.<br />
<br />
|-<br />
| <nowiki>=SUM(B8;SUM(B10:B14))</nowiki><br />
| Calculates the sum of cells B10 to B14 and adds the value to B8.<br />
<br />
|-<br />
| <nowiki>=SUM(B1:B65536)</nowiki><br />
| Sums all numbers in column B.<br />
<br />
|-<br />
| <nowiki>=AVERAGE(BloodSugar)</nowiki><br />
| Displays the average of a named range defined under the name BloodSugar.<br />
<br />
|-<br />
| <nowiki>=IF(C31>140; "HIGH"; "OK")</nowiki><br />
| Displays the results of a conditional analysis of data from two sources. If C31 = 144, then HIGH is displayed, otherwise OK is displayed.<br />
<br />
|}<br />
<br />
{{Documentation/Note| Users of Lotus 1-2-3®, Quattro Pro® and other spreadsheet software may be familiar with formulas that begin with <nowiki>+, -, =, (, @, ., $,</nowiki> or <nowiki>#</nowiki>. A mathematical formula would look like +D2+C2 or +2*3. Functions begin with the <nowiki>@</nowiki> symbol such as <nowiki>@SUM(D2..D7)</nowiki>, <nowiki>@COS(@DEGTORAD(30))</nowiki> and <nowiki>@IRR(GUESS;CASHFLOWS)</nowiki>. Ranges are identified such as <nowiki>A1..D3</nowiki>.}}<br />
<br />
Functions can be identified in Table 1 with a word, for example ROUND, followed by parentheses enclosing references or numbers.<br />
<br />
It is also possible to establish ranges for inclusion by naming them using '''Insert > Names''', for example BloodSugar representing a range such as B3:B10. Logical functions can also be performed as represented by the IF statement which results in a conditional response based upon the data in the identified cell.<br />
<br />
== Operator types ==<br />
You can use the following operators in OpenOffice.org Calc: arithmetic, comparative, text, and reference.<br />
<br />
=== Arithmetic operators ===<br />
The addition, subtraction, multiplication and division operators return numerical results. The Negation and Percent operators identify a characteristic of the number found in the cell, for example -37. The example for Exponentiation illustrates how to enter a number that is being multiplied by itself a certain number of times, for example 2<sup>3 </sup><nowiki>= 2*2*2.</nowiki><br />
<br />
''Table 2: Arithmetical operators''<br />
<br />
{| class="prettytable"<br />
| '''''Operator'''''<br />
| '''''Name'''''<br />
| '''''Example'''''<br />
<br />
|-<br />
| + (Plus)<br />
| Addition<br />
| <nowiki>=1+1</nowiki><br />
<br />
|-<br />
| - (Minus)<br />
| Subtraction<br />
| <nowiki>=2-1</nowiki><br />
<br />
|-<br />
| - (Minus)<br />
| Negation<br />
| -5<br />
<br />
|-<br />
| <nowiki>* (asterisk)</nowiki><br />
| Multiplication<br />
| <nowiki>=2*2</nowiki><br />
<br />
|-<br />
| / (Slash)<br />
| Division<br />
| <nowiki>=10/5</nowiki><br />
<br />
|-<br />
| % (Percent)<br />
| Percent<br />
| 15%<br />
<br />
|-<br />
| ^ (Caret)<br />
| Exponentiation<br />
| 2^3<br />
<br />
|}<br />
<br />
=== Comparative operators ===<br />
Comparative operators are found in formulas that use the IF function and return either a true or false answer; for example, <nowiki>=IF(B6>G12; 127; 0)</nowiki> which, loosely translated, means if the contents of cell B6 are greater than the contents of cell G12, then return the number 127, otherwise return the number 0.<br />
<br />
A direct answer of TRUE or FALSE can be obtained by entering a formula such as =B6>B12. If the numbers found in the referenced cells are accurately represented, the answer TRUE is returned, otherwise FALSE is returned.<br />
<br />
''Table 3: Comparative operators''<br />
<br />
{| class="prettytable"<br />
| '''''Operator'''''<br />
| '''''Name'''''<br />
| '''''Example'''''<br />
<br />
|-<br />
| <nowiki>= (equal sign)</nowiki><br />
| Equal<br />
| A1=B1<br />
<br />
|-<br />
| > (Greater than)<br />
| Greater than<br />
| A1>B1<br />
<br />
|-<br />
| <nowiki>< (Less than)</nowiki><br />
| Less than<br />
| <nowiki>A1<B1</nowiki><br />
<br />
|-<br />
| >= (Greater than or equal to)<br />
| Greater than or equal to<br />
| A1>=B1<br />
<br />
|-<br />
| <nowiki><= (Less than or equal to)</nowiki><br />
| Less than or equal to<br />
| <nowiki>A1<=B1</nowiki><br />
<br />
|-<br />
| <nowiki><> (Inequality)</nowiki><br />
| Inequality<br />
| <nowiki>A1<>B1</nowiki><br />
<br />
|}<br />
<br />
=== Text operators ===<br />
It is common for users to place text in spreadsheets. To provide for variability in what and how this type of data is displayed, text can be joined together in pieces coming from different places on the spreadsheet. Below is an example.<br />
<br />
[[Image:CG3Ch3F7a.png]]<br />
<br />
[[Image:CG3Ch3F7b.png]]<br />
<br />
''Text Concatenation.''<br />
<br />
In this example, specific pieces of the text were found in three different cells. To join these segments together, the formula also adds required spaces and punctuation housed within quotation marks resulting in a formula of <nowiki>=B6 & " " & C6 & ", " D6</nowiki>. The result is the concatenation into a correctly formatted date for this locale.<br />
<br />
Taking this example further, the result cell is defined as a name, then text concatenation is performed using this defined name.<br />
<br />
[[Image:CG3Ch3F8.png|thumb|none|500px|''Defining a name for a range of cells.'']]<br />
<br />
[[Image:CG3Ch3F9.png|thumb|none|500px|''Naming a cell or range of cells for inclusion in a formula.'']]<br />
<br />
[[Image:CG3Ch3F10a.png]]<br />
<br />
[[Image:CG3Ch3F10b.png]]<br />
<br />
[[Image:CG3Ch3F10c.png]]<br />
<br />
''Defining Names on a worksheet.''<br />
<br />
=== Reference operators ===<br />
Reference operators merge the values held in each individual cell within the range. Reference operators can be an individual cell identified by the column identifier located along the upper edge of the spreadsheet and a numeric identifier found along the side of the spreadsheet. On spreadsheets read from left to right, the upper left cell is A1. The figure below shows these identifiers for Cell A1.<br />
<br />
[[Image:CG3Ch3F11.png|thumb|none|500px|''The Cell Reference Operator.'']]<br />
<br />
A range is also a reference operator referenced in formulas, functions and logical operators. The range for left to right operations refers to the upper left cell running to the right and downward to the right bottommost cell as shown below.<br />
<br />
[[Image:CG3Ch3F12.png|thumb|none|500px|''Reference Operator for a range.'']]<br />
<br />
In the upper left corner of the figure above, the range A1:D12 is shown, corresponding to the cells included in the drag operation with the mouse to highlight the range. This same range could also be created by entering in the Name Box directly as shown below. After pressing ''Enter'', the same range is selected.<br />
<br />
[[Image:CG3Ch3F13.png|thumb|none|500px|''Direct entry of Reference Operator into Name Box.'']]<br />
<br />
A reference operator can also be created by defining a named area by selecting the menu item '''Insert > Names > Define''', pressing ''Ctrl+F3'', or clicking the icon, if it shows on your toolbar.<br />
<br />
Another reference operator involves the use of the '!' sign. If data appears in range A1:B6 as well as range B5:C12, using a formula such as SUM(A1:B6!B5:C12) will yield the sum of cells B5 and B6.<br />
<br />
== Order of calculation ==<br />
''Order of calculation'' refers to the sequence that numerical operations are performed. Division and multiplication are performed before addition or subtraction. There is a common tendency to expect calculations to be made from left to right as the equation would be read in English. Calc evaluates the entire formula, then based upon programming precedence breaks the formula down executing multiplication and division operations before other operations. Due to this fact when creating formulas you should test your formula to make sure that the correct result is being obtained. An example of order of calculation in operation follows.<br />
<br />
''Table 4 – Order of Calculation''<br />
<br />
{| class="prettytable"<br />
| '''''Left To Right Calculation'''''<br />
| '''''Ordered Calculation'''''<br />
<br />
|-<br />
| 1+3*2+3 = 11<br />
| <nowiki>=1+3*2+3 result 10</nowiki><br />
<br />
|-<br />
| 1+3=4, then 4 X 2 = 8, then 8 + 3 = 11<br />
| 3*2=6, then 1 + 6 + 3 = 10<br />
<br />
|-<br />
| Another possible intention could be:<br />
| The program resolves the multiplication of 3 X 2 before dealing with the numbers being added.<br />
<br />
|-<br />
| 1+3*2+3 = 20<br />
| <br />
<br />
|}<br />
<br />
If you intend for the result to be either of the two possible solutions on the left, the way to achieve these results would be to order the formula as:<br />
<br />
{| class="prettytable"<br />
| ((1+3) * 2)+3 = 11<br />
| (1+3) * (2+3) = 20<br />
<br />
|}<br />
<br />
{{Documentation/Note| Consider using parentheses grouping operations to avoid obtaining incorrect calculations, e.g. <nowiki>= B4+G12*C4/M12</nowiki> becoming <nowiki>=((B4+G12)*C4)/M12</nowiki>.}}<br />
<br />
== Calculations linking sheets ==<br />
Another powerful feature of Calc is the ability to link data through several worksheets. The naming of worksheets can be helpful to identify where specific data may be found. A name such a Payroll or Boise Sales is much more meaningful than Sheet1. The function named SHEET() returns the sheet number in the collection of spreadsheets. With this function, if you are currently on the third sheet counting from the left along the worksheet tabs, the number 3 is returned. If you drag the worksheets around to different locations among the tabs, the number will return the number referring to the current position of this worksheet.<br />
<br />
{{Documentation/Caution| Users may experience a problem when creating a formula that references other worksheets. If you use the function <nowiki>SHEET()</nowiki> the number of the current worksheet appears even if you enter the name of the worksheet desired, e.g., <nowiki>=SHEET(Branch4)</nowiki> and you have as the top worksheet named CombinedOperations. This function only refers to the current or top worksheet and not to other worksheets found in the collection or file.}}<br />
<br />
An example of calculations obtaining data from other work can be seen in a business setting where a business combines its branch operations into a single worksheet.<br />
<br />
{| class="prettytable"<br />
| [[Image:CG3Ch3F14a.png]]<br />
| Sheet containing data for Branch 1.<br />
<br />
|-<br />
| [[Image:CG3Ch3F14b.png]]<br />
| Sheet containing data for Branch 2.<br />
<br />
|-<br />
| [[Image:CG3Ch3F14c.png]]<br />
| Sheet containing data for Branch 3.<br />
<br />
|-<br />
| [[Image:CG3Ch3F14d.png]]<br />
| Sheet containing combined data for all branches.<br />
<br />
|}<br />
''Combining data from several sheets into a single sheet.''<br />
<br />
To accomplish the links, it can be easier if the Function Wizard is used.<br />
<br />
# Open the Function Wizard by clicking the f(x) button on the toolbar, or by selecting '''Insert > Function''', or by pressing ''Ctrl+F2''. <br />
# Select a category of functions to shorten the list, then scroll down through the named functions and select the required one. When you select a function, its description appears on the right-hand side of the dialog. Double-click on the required function.<br />
# The wizard now displays an area to the right where you can enter data manually in text boxes or click the '''Shrink''' button [[Image:]] to shrink the wizard so you can select the cells from the worksheet.<br />
# To select cells, either click directly upon the needed cell or hold down the left mouse button and drag to select the needed area.<br />
# When the area has been selected, click the '''Shrink''' button again to return to the wizard. <br />
# If multiple ranges are needed, then select the next text box below the first and perform the same task for the next range. The wizard will accept in the Sum function up to 30 such ranges.<br />
<br />
The following figures show how to create the combined sheet shown in the example above.<br />
<br />
[[Image:CG3Ch3F15.png|thumb|none|500px|''Selecting the SUM function in the Function Wizard.'']]<br />
<br />
[[Image:CG3Ch3F16.png|thumb|none|500px|''Further steps in selecting cells containing data.'']]<br />
<br />
[[Image:CG3Ch3F17.png|thumb|none|500px|''Completed entries in Function Wizard.'']]<br />
<br />
== Strategies for creating formulas ==<br />
There are several broad approaches when making a decision to create a formula. In deciding on an approach, consider how many other people will need to use the worksheets, the life of the worksheets, and the variations that could be encountered from use.<br />
<br />
=== Enter a unique formula in each cell ===<br />
The first and most basic strategy is to view whatever formulas are needed as simple and with a limited use life. The strategy is then to place a unique formula in each appropriate cell.<br />
<br />
=== Break formulas into parts and combine the parts ===<br />
The second strategy is similar, but instead you break down longer formulas into smaller parts and then combine the parts into the whole.<br />
<br />
Editor's note: This needs some explanation, but it is NOT about the "formula editor" (Math).<br />
<br />
=== Use the Basic editor to create functions ===<br />
A third strategy is to use the Basic editor and create your own functions. This approach would be used where the result would greatly simplify the use of the spreadsheet by the end user and keep the formulas simple with a better chance of avoiding errors. This approach also can make the maintenance easier by having corrections or updates kept in one central location. The use of macros is described in Chapter 12 of this book.<br />
<br />
<br />
{{CCBY}}<br />
[[Category: Calc Guide (Documentation)]]</div>Kirkhttps://wiki.openoffice.org/wiki/Documentation/OOo3_User_Guides/Calc_Guide/Using_functionsDocumentation/OOo3 User Guides/Calc Guide/Using functions2009-09-18T05:14:14Z<p>Kirk: </p>
<hr />
<div>{{DISPLAYTITLE:Understanding functions}}<br />
{{Documentation/CG3Ch3TOC<br />
|ShowPrevNext=block<br />
|PrevPage=Documentation/OOo3_User_Guides/Calc Guide/Creating formulas<br />
|NextPage=Documentation/OOo3_User_Guides/Calc Guide/Finding and fixing errors<br />
}}<br />
Calc includes over 350 functions to help you analyze and reference data. Many of these functions are for use with numbers, but many others are used with dates and times, or even text. A function may be as simple as adding two numbers together, or finding the average of a list of numbers. Alternatively, it may be as complex as calculating the standard deviation of a sample, or a hyperbolic tangent of a number. See a list of all functions in '''[[Documentation/How_Tos/Calc: Functions listed by category|functions listed by category]]'''.<br />
<br />
Typically, the name of a function is an abbreviated description of what the function does. For instance, the FV function gives the future value of an investment, while BIN2HEX converts a binary number to a hexadecimal number. By tradition, functions are entered entirely in upper case letters, although Calc will read them correctly if they are in lower or mixed case, too.<br />
<br />
A few basic functions are somewhat similar to operators. Examples:<br />
:"+", this operator will add two numbers together for a result. SUM() on the other hand will add a contiguous '''''range''''' of numbers together.<br />
:"*", this operator will multiply to numbers together for a result. PRODUCT() does the same for multiplying, that SUM() does for adding.<br />
<br />
Each function has a number of ''arguments'' used in the calculations. These arguments may or may not have their own name. Your task is to enter the arguments needed to run the function. In some cases, the arguments have pre-defined choices, and you may need to refer to the online help or Appendix B (Description of Functions) in this book to understand them. More often, however, an argument is a value that you enter manually, or one already entered in a cell or range of cells on the spreadsheet. In Calc, you can enter values from other cells by typing in their name or range, or by selecting cells with the mouse. Should the values in the cells change, the result of the function will be automatically updated.<br />
<br />
For compatibility, functions and their arguments in Calc have almost identical names to their counterparts in Microsoft Excel. However, both Excel and Calc have functions that the other lacks. Occasionally, too, functions with the same names in Calc and Excel have different arguments, or slightly different names for the same argument—neither of which can be imported to the other. However, perhaps nine-tenths of functions can be imported between Calc and Excel without any problems.<br />
<br />
== Understanding the structure of functions ==<br />
All functions have a similar structure. If you use the right tool for entering a function, you can escape learning this structure, but it is still worth knowing for troubleshooting.<br />
<br />
To give a typical example, the structure of a function to find cells that match entered search criteria is:<br />
<br />
<nowiki>= DCOUNT (Database;Database field;Search_criteria)</nowiki><br />
<br />
By convention, only three kinds of data can be entered in a cell. Text, Numbers, and Formulas. To distinguish Formulas from Text, it is necessary to always start a formula with an "=" sign. Since a function cannot exist on its' own, it must always be part of a formula. Consequently, even if the function represents the entire formula, there must be an "=" sign at the start of the formula. Regardless of where in the formula a function is, the Function will start with the function's name, DCOUNT in the above. After the name of the function comes its arguments. All arguments are required, unless specifically listed as optional.<br />
<br />
Arguments are added within the brackets (parentheses) and separated by semicolons, with no space between the arguments and the semicolons. Many arguments are a number. A Calc function can take up to thirty numbers as an argument. That may not sound like much at first. However, when you realize that the number can be not only a number or a single cell, but also an array or range of cells that contain several or even hundreds of cells, then the apparent limitation vanishes.<br />
<br />
Depending on the nature of the function arguments may be entered as follow:<br />
<br />
:{|Border="1"<br />
|"text data"||The quotes establish that text or string data has been entered<br />
|-<br />
|9||In this case the number nine has been entered as a number<br />
|-<br />
|"9"||In this case the number nine is being entered as text<br />
|-<br />
|A1|| The address for whatever is in Cell A1 is being entered<br />
|}<br />
<br />
== Advanced structure ==<br />
As well as being used on its own, a function can be an argument in a larger formula. A formula, however, is limited by the fact that it can only do one function at a time. You need to make sure that functions are done in the right order if the formula is going to work.<br />
<br />
To help set the order for functions in a multiple-function formula, you use parentheses within parentheses. When the formula is run, Calc does the innermost function first, then works outwards. For example, in the simple calculation <nowiki>=2+(5*7)</nowiki>, Calc multiples 5 by 7 first. Only then is 2 added to the result to get 37.<br />
<br />
The placement of functions within sets of parentheses is called ''nesting''. Basically, nesting reduces a function that could run on its own to an argument in the formula. For example, in =2+(5*7), the formula (5*7) is nested within the larger formula of =2+(5*7). In other words, the nested function becomes an argument of another function.<br />
<br />
This relation is more obvious when doing a calculation using a function with a name. For all purposes,<br />
<br />
<nowiki>=SUM(2;PRODUCT(5;7))</nowiki><br />
<br />
is the same formula as <nowiki>=2+(5*7)</nowiki>. However, when SUM and PRODUCT are used, then the relation is clearer. The fact that the PRODUCT function comes after a semicolon and in a set of parentheses for the SUM function makes it clear that PRODUCT is an argument for SUM. In addition, the fact that the inner pair of parentheses is around (5;7) makes clear that this operation is done before the one defined by the outer pair of parentheses.<br />
<br />
To get an idea of what nested functions can do, imagine that you are designing a self-directed learning module. During the module, students do three quizzes, and enter the results in cells A1, A2, and A3. In A4, you can create a nested formula that begins by averaging the results of the quizzes with the formula <nowiki>=AVERAGE(A1:A3)</nowiki>. The formula then uses the IF function to give the student feedback that depends upon the average grade on the quizzes. The entire formula would read:<br />
<br />
<nowiki>=IF(AVERAGE(A1:A3) >85; "Congratulations! You are ready to advance to the next module";<br />
"Failed. Please review the material again. If necessary, contact your instructor for help")</nowiki><br />
<br />
Depending on the average, the student would receive the message for either congratulations or failure.<br />
<br />
Notice that the nested formula for the average does not require its own equal sign. The one at the start of the equation is enough for both formulas.<br />
<br />
If you are new to spreadsheets, the best way to think of functions is as a scripting language. We've used simple examples to explain more clearly, but, through nesting of functions, a Calc formula can quickly become complex.<br />
<br />
<br />
{{CCBY}}<br />
[[Category: Calc Guide (Documentation)]]<br />
<br />
'''New in 3.1'''<br /><br />
Calc now keeps the syntax of a formula displayed in a tooltip next to the cell as a handy memory aid as you type.<br />
<br />
A more reliable method is to use the ''Function List''. Available from the '''Insert''' menu, the Function List automatically docks as a pane on the right side of the Calc editing window. If you wish, you can ''Control+double-click'' on a blank space at the top of the pane to undock this pane and make it a floating window.<br />
<br />
The Function List includes a brief description of each function and its arguments; highlight the function and look at the bottom of the pane to see the description. If necessary, hover the cursor over the division between the list and the description; when the cursor becomes a two-headed arrow, drag it upwards to increase the space for the description. Double-click on a function’s name to add it to the current cell, together with placeholders for each of the function’s arguments.<br />
<br />
Using the Function List is almost as fast as manual entry, and has the advantage of not requiring that you memorize a formula that you want to use. In theory, it should also be less error-prone. In practice, though, some users may fumble when replacing the placeholders with values. Another handy feature is the ability to display the last formulas used.<br />
<br />
[[Image:CG3Ch3F1.png|thumb|none|500px|''Function List docked to right side of Calc window.'']]<br />
<br />
The most commonly used input method is the ''Function Wizard''. To open the Function Wizard, select '''Insert > Function''', or click its button on the Function tool bar, or press ''Ctrl+F2''. Once open, the Function Wizard provides the same help features as the Function List, but adds fields in which you can see the result of a completed function, as well as the result of any larger formula of which it is part.<br />
<br />
[[Image:CG3Ch3F2.png|thumb|none|500px|''Functions page of Function Wizard.'']]<br />
<br />
You can also select the ''Structure'' tab to see a tree view of the parts of the formula. The main advantage over the Function List is that each argument is entered in its own field, making it easier to manage. The price of this reliability is slower input, but this is often a small price to pay, since precision is generally more important than speed when creating a spreadsheet.<br />
<br />
[[Image:CG3Ch3F3.png|thumb|none|500px|''Structure page of Function Wizard.'']]<br />
<br />
Another advantage of the Function Wizard is that you can reduce the window as you are adding each argument. At the end of each input field for an argument is the Shrink button [[Image:CalcShrinkIcon.png]]. The Shrink button temporarily removes all parts of the wizard except the current input field so that you can see the spreadsheet beneath. When you are finished entering the argument’s value, click the button again to return to the entire Function Wizard.<br />
<br />
[[Image:CG3Ch3F4.png|thumb|none|500px|''Function Wizard after shrinking.'']]<br />
<br />
Finally, as with many other features in OpenOffice.org, you can create a macro for any favorite function formula, and assign it to a tool bar, menu, or keystroke combination.<br />
<br />
No matter how you enter a formula, take a moment to check its structure before using it. If it looks right, press the ''Enter'' key or select the '''Accept''' button from the Function toolbar to add it to the cell and get its result (the Accept button is the green check mark beside the Input line).<br />
<br />
If you see the formula in the cell instead of the result, then Formulas are selected for display in '''Tools > Options > OpenOffice.org Calc > View > Display'''. Unselect the checkbox beside it, and the result will display. However, you can still see the formula in the formula bar field.</div>Kirkhttps://wiki.openoffice.org/wiki/Documentation/OOo3_User_Guides/Calc_Guide/Creating_formulasDocumentation/OOo3 User Guides/Calc Guide/Creating formulas2009-09-15T02:23:36Z<p>Kirk: /* Order of calculation */</p>
<hr />
<div>{{DISPLAYTITLE:Creating formulas}}<br />
{{Documentation/CG3Ch3TOC<br />
|ShowPrevNext=block<br />
|PrevPage=Documentation/OOo3_User_Guides/Calc Guide/Formulas and Functions<br />
|NextPage=Documentation/OOo3_User_Guides/Calc Guide/Using functions<br />
}}<br />
==Introduction==<br />
You can enter formulas in two ways, either in the cell itself, or at the input line. Either way you will need to start it with one of the following symbols: "=", "+" or "-". Starting with anything else will cause the formula to be treated as if it were text.<br />
<br />
== Operators in formulas ==<br />
Each cell on the worksheet can be used as a data holder or a place for data calculations. Inserting data is accomplished simply by typing the data in the cell and moving to the next cell or pressing Enter. With formulas the equal sign denotes that instead of the cell being a data holder, the cell will be used for a calculation. A mathematical calculation like 15 + 46 can be accomplished as shown below.<br />
<br />
{{Documentation/Note| To enter the <nowiki>=</nowiki> symbol for a purpose other than creating a formula as described in this chapter, type an apostrophe or single quotation mark before the data; for example, <nowiki>'=</nowiki> means different things to different people. Calc treats everything after the single quotation symbol as text.}}<br />
<br />
{| class="prettytable"<br />
| '''''Simple Calculation in 1 Cell'''''<br />
| '''''Calculation by Reference'''''<br />
<br />
|-<br />
| [[Image:CG3Ch3F5a.png]]<br />
| [[Image:CG3Ch3F5b.png]]<br />
<br />
|-<br />
| [[Image:CG3Ch3F5c.png]]<br />
| [[Image:CG3Ch3F5e.png]]<br />
<br />
|-<br />
| <br />
| [[Image:CG3Ch3F5d.png]]<br />
<br />
|}<br />
''A simple calculation.''<br />
<br />
While the calculation on the left was accomplished in only one cell, the real power is shown on the right where the data is placed in cells and the calculation is performed using references back to the cells. In this case, cells B3 and B4 were the data holders with B5 the cell where the calculation was performed. Notice that the formula was shown as =B3 + B4. The plus sign denotes addition as the operation being performed upon the data within cells B3 and B4. All formulas build upon this concept. Other ways of entering formulas are shown in Table 1.<br />
<br />
These back references to find data to perform a calculation can be found anywhere in the worksheet being worked on or upon any other worksheet in the workbook that is opened. If the data needed was on different worksheets they would be referenced by referring to the worksheet, for example <nowiki>=SUM(</nowiki>Sheet2.B12+Sheet3.A11).<br />
<br />
''Table 1: Common ways to enter formulas.''<br />
<br />
{| class="prettytable"<br />
! Formula<br />
! Description<br />
<br />
|-<br />
| <nowiki>=A1+10</nowiki><br />
| Displays the contents of cell A1 plus 10.<br />
<br />
|-<br />
| <nowiki>=A1*16%</nowiki><br />
| Displays 16% of the contents of A1.<br />
<br />
|-<br />
| <nowiki>=A1 * A2</nowiki><br />
| Displays the result of the multiplication of A1 and A2.<br />
<br />
|-<br />
| <nowiki>=ROUND(A1;1)</nowiki><br />
| Displays the contents of cell A1 rounded to one decimal place.<br />
<br />
|-<br />
| <nowiki>=EFFECTIVE(5%;12)</nowiki><br />
| Calculates the effective interest for 5% annual nominal interest with 12 payments a year.<br />
<br />
|-<br />
| <nowiki>=B8-SUM(B10:B14)</nowiki><br />
| Calculates B8 minus the sum of the cells B10 to B14.<br />
<br />
|-<br />
| <nowiki>=SUM(B8;SUM(B10:B14))</nowiki><br />
| Calculates the sum of cells B10 to B14 and adds the value to B8.<br />
<br />
|-<br />
| <nowiki>=SUM(B1:B65536)</nowiki><br />
| Sums all numbers in column B.<br />
<br />
|-<br />
| <nowiki>=AVERAGE(BloodSugar)</nowiki><br />
| Displays the average of a named range defined under the name BloodSugar.<br />
<br />
|-<br />
| <nowiki>=IF(C31>140; "HIGH"; "OK")</nowiki><br />
| Displays the results of a conditional analysis of data from two sources. If C31 = 144, then HIGH is displayed, otherwise OK is displayed.<br />
<br />
|}<br />
<br />
{{Documentation/Note| Users of Lotus 1-2-3®, Quattro Pro® and other spreadsheet software may be familiar with formulas that begin with <nowiki>+, -, =, (, @, ., $,</nowiki> or <nowiki>#</nowiki>. A mathematical formula would look like +D2+C2 or +2*3. Functions begin with the <nowiki>@</nowiki> symbol such as <nowiki>@SUM(D2..D7)</nowiki>, <nowiki>@COS(@DEGTORAD(30))</nowiki> and <nowiki>@IRR(GUESS;CASHFLOWS)</nowiki>. Ranges are identified such as <nowiki>A1..D3</nowiki>.}}<br />
<br />
Functions can be identified in Table 1 with a word, for example ROUND, followed by parentheses enclosing references or numbers.<br />
<br />
It is also possible to establish ranges for inclusion by naming them using '''Insert > Names''', for example BloodSugar representing a range such as B3:B10. Logical functions can also be performed as represented by the IF statement which results in a conditional response based upon the data in the identified cell.<br />
<br />
== Operator types ==<br />
You can use the following operators in OpenOffice.org Calc: arithmetic, comparative, text, and reference.<br />
<br />
=== Arithmetic operators ===<br />
The addition, subtraction, multiplication and division operators return numerical results. The Negation and Percent operators identify a characteristic of the number found in the cell, for example -37. The example for Exponentiation illustrates how to enter a number that is being multiplied by itself a certain number of times, for example 2<sup>3 </sup><nowiki>= 2*2*2.</nowiki><br />
<br />
''Table 2: Arithmetical operators''<br />
<br />
{| class="prettytable"<br />
| '''''Operator'''''<br />
| '''''Name'''''<br />
| '''''Example'''''<br />
<br />
|-<br />
| + (Plus)<br />
| Addition<br />
| <nowiki>=1+1</nowiki><br />
<br />
|-<br />
| - (Minus)<br />
| Subtraction<br />
| <nowiki>=2-1</nowiki><br />
<br />
|-<br />
| - (Minus)<br />
| Negation<br />
| -5<br />
<br />
|-<br />
| <nowiki>* (asterisk)</nowiki><br />
| Multiplication<br />
| <nowiki>=2*2</nowiki><br />
<br />
|-<br />
| / (Slash)<br />
| Division<br />
| <nowiki>=10/5</nowiki><br />
<br />
|-<br />
| % (Percent)<br />
| Percent<br />
| 15%<br />
<br />
|-<br />
| ^ (Caret)<br />
| Exponentiation<br />
| 2^3<br />
<br />
|}<br />
<br />
=== Comparative operators ===<br />
Comparative operators are found in formulas that use the IF function and return either a true or false answer; for example, <nowiki>=IF(B6>G12; 127; 0)</nowiki> which, loosely translated, means if the contents of cell B6 are greater than the contents of cell G12, then return the number 127, otherwise return the number 0.<br />
<br />
A direct answer of TRUE or FALSE can be obtained by entering a formula such as =B6>B12. If the numbers found in the referenced cells are accurately represented, the answer TRUE is returned, otherwise FALSE is returned.<br />
<br />
''Table 3: Comparative operators''<br />
<br />
{| class="prettytable"<br />
| '''''Operator'''''<br />
| '''''Name'''''<br />
| '''''Example'''''<br />
<br />
|-<br />
| <nowiki>= (equal sign)</nowiki><br />
| Equal<br />
| A1=B1<br />
<br />
|-<br />
| > (Greater than)<br />
| Greater than<br />
| A1>B1<br />
<br />
|-<br />
| <nowiki>< (Less than)</nowiki><br />
| Less than<br />
| <nowiki>A1<B1</nowiki><br />
<br />
|-<br />
| >= (Greater than or equal to)<br />
| Greater than or equal to<br />
| A1>=B1<br />
<br />
|-<br />
| <nowiki><= (Less than or equal to)</nowiki><br />
| Less than or equal to<br />
| <nowiki>A1<=B1</nowiki><br />
<br />
|-<br />
| <nowiki><> (Inequality)</nowiki><br />
| Inequality<br />
| <nowiki>A1<>B1</nowiki><br />
<br />
|}<br />
<br />
=== Text operators ===<br />
It is common for users to place text in spreadsheets. To provide for variability in what and how this type of data is displayed, text can be joined together in pieces coming from different places on the spreadsheet. Below is an example.<br />
<br />
[[Image:CG3Ch3F7a.png]]<br />
<br />
[[Image:CG3Ch3F7b.png]]<br />
<br />
''Text Concatenation.''<br />
<br />
In this example, specific pieces of the text were found in three different cells. To join these segments together, the formula also adds required spaces and punctuation housed within quotation marks resulting in a formula of <nowiki>=B6 & " " & C6 & ", " D6</nowiki>. The result is the concatenation into a correctly formatted date for this locale.<br />
<br />
Taking this example further, the result cell is defined as a name, then text concatenation is performed using this defined name.<br />
<br />
[[Image:CG3Ch3F8.png|thumb|none|500px|''Defining a name for a range of cells.'']]<br />
<br />
[[Image:CG3Ch3F9.png|thumb|none|500px|''Naming a cell or range of cells for inclusion in a formula.'']]<br />
<br />
[[Image:CG3Ch3F10a.png]]<br />
<br />
[[Image:CG3Ch3F10b.png]]<br />
<br />
[[Image:CG3Ch3F10c.png]]<br />
<br />
''Defining Names on a worksheet.''<br />
<br />
=== Reference operators ===<br />
Reference operators merge the values held in each individual cell within the range. Reference operators can be an individual cell identified by the column identifier located along the upper edge of the spreadsheet and a numeric identifier found along the side of the spreadsheet. On spreadsheets read from left to right, the upper left cell is A1. The figure below shows these identifiers for Cell A1.<br />
<br />
[[Image:CG3Ch3F11.png|thumb|none|500px|''The Cell Reference Operator.'']]<br />
<br />
A range is also a reference operator referenced in formulas, functions and logical operators. The range for left to right operations refers to the upper left cell running to the right and downward to the right bottommost cell as shown below.<br />
<br />
[[Image:CG3Ch3F12.png|thumb|none|500px|''Reference Operator for a range.'']]<br />
<br />
In the upper left corner of the figure above, the range A1:D12 is shown, corresponding to the cells included in the drag operation with the mouse to highlight the range. This same range could also be created by entering in the Name Box directly as shown below. After pressing ''Enter'', the same range is selected.<br />
<br />
[[Image:CG3Ch3F13.png|thumb|none|500px|''Direct entry of Reference Operator into Name Box.'']]<br />
<br />
A reference operator can also be created by defining a named area by selecting the menu item '''Insert > Names > Define''', pressing ''Ctrl+F3'', or clicking the icon, if it shows on your toolbar.<br />
<br />
Another reference operator involves the use of the '!' sign. If data appears in range A1:B6 as well as range B5:C12, using a formula such as SUM(A1:B6!B5:C12) will yield the sum of cells B5 and B6.<br />
<br />
== Order of calculation ==<br />
''Order of calculation'' refers to the sequence that numerical operations are performed. Division and multiplication are performed before addition or subtraction. There is a common tendency to expect calculations to be made from left to right as the equation would be read in English. Calc evaluates the entire formula, then based upon programming precedence breaks the formula down executing multiplication and division operations before other operations. Due to this fact when creating formulas you should test your formula to make sure that the correct result is being obtained. An example of order of calculation in operation follows.<br />
<br />
''Table 4 – Order of Calculation''<br />
<br />
{| class="prettytable"<br />
| '''''Left To Right Calculation'''''<br />
| '''''Ordered Calculation'''''<br />
<br />
|-<br />
| 1+3*2+3 = 11<br />
| <nowiki>=1+3*2+3 result 10</nowiki><br />
<br />
|-<br />
| 1+3=4, then 4 X 2 = 8, then 8 + 3 = 11<br />
| 3*2=6, then 1 + 6 + 3 = 10<br />
<br />
|-<br />
| Another possible intention could be:<br />
| The program resolves the multiplication of 3 X 2 before dealing with the numbers being added.<br />
<br />
|-<br />
| 1+3*2+3 = 20<br />
| <br />
<br />
|}<br />
<br />
If you intend for the result to be either of the two possible solutions on the left, the way to achieve these results would be to order the formula as:<br />
<br />
{| class="prettytable"<br />
| ((1+3) * 2)+3 = 11<br />
| (1+3) * (2+3) = 20<br />
<br />
|}<br />
<br />
{{Documentation/Note| Consider using parentheses grouping operations to avoid obtaining incorrect calculations, e.g. <nowiki>= B4+G12*C4/M12</nowiki> becoming <nowiki>=((B4+G12)*C4)/M12</nowiki>.}}<br />
<br />
== Calculations linking sheets ==<br />
Another powerful feature of Calc is the ability to link data through several worksheets. The naming of worksheets can be helpful to identify where specific data may be found. A name such a Payroll or Boise Sales is much more meaningful than Sheet1. The function named SHEET() returns the sheet number in the collection of spreadsheets. With this function, if you are currently on the third sheet counting from the left along the worksheet tabs, the number 3 is returned. If you drag the worksheets around to different locations among the tabs, the number will return the number referring to the current position of this worksheet.<br />
<br />
{{Documentation/Caution| Users may experience a problem when creating a formula that references other worksheets. If you use the function <nowiki>SHEET()</nowiki> the number of the current worksheet appears even if you enter the name of the worksheet desired, e.g., <nowiki>=SHEET(Branch4)</nowiki> and you have as the top worksheet named CombinedOperations. This function only refers to the current or top worksheet and not to other worksheets found in the collection or file.}}<br />
<br />
An example of calculations obtaining data from other work can be seen in a business setting where a business combines its branch operations into a single worksheet.<br />
<br />
{| class="prettytable"<br />
| [[Image:CG3Ch3F14a.png]]<br />
| Sheet containing data for Branch 1.<br />
<br />
|-<br />
| [[Image:CG3Ch3F14b.png]]<br />
| Sheet containing data for Branch 2.<br />
<br />
|-<br />
| [[Image:CG3Ch3F14c.png]]<br />
| Sheet containing data for Branch 3.<br />
<br />
|-<br />
| [[Image:CG3Ch3F14d.png]]<br />
| Sheet containing combined data for all branches.<br />
<br />
|}<br />
''Combining data from several sheets into a single sheet.''<br />
<br />
To accomplish the links, it can be easier if the Function Wizard is used.<br />
<br />
# Open the Function Wizard by clicking the f(x) button on the toolbar, or by selecting '''Insert > Function''', or by pressing ''Ctrl+F2''. <br />
# Select a category of functions to shorten the list, then scroll down through the named functions and select the required one. When you select a function, its description appears on the right-hand side of the dialog. Double-click on the required function.<br />
# The wizard now displays an area to the right where you can enter data manually in text boxes or click the '''Shrink''' button [[Image:]] to shrink the wizard so you can select the cells from the worksheet.<br />
# To select cells, either click directly upon the needed cell or hold down the left mouse button and drag to select the needed area.<br />
# When the area has been selected, click the '''Shrink''' button again to return to the wizard. <br />
# If multiple ranges are needed, then select the next text box below the first and perform the same task for the next range. The wizard will accept in the Sum function up to 30 such ranges.<br />
<br />
The following figures show how to create the combined sheet shown in the example above.<br />
<br />
[[Image:CG3Ch3F15.png|thumb|none|500px|''Selecting the SUM function in the Function Wizard.'']]<br />
<br />
[[Image:CG3Ch3F16.png|thumb|none|500px|''Further steps in selecting cells containing data.'']]<br />
<br />
[[Image:CG3Ch3F17.png|thumb|none|500px|''Completed entries in Function Wizard.'']]<br />
<br />
== Strategies for creating formulas ==<br />
There are several broad approaches when making a decision to create a formula. In deciding on an approach, consider how many other people will need to use the worksheets, the life of the worksheets, and the variations that could be encountered from use.<br />
<br />
=== Enter a unique formula in each cell ===<br />
The first and most basic strategy is to view whatever formulas are needed as simple and with a limited use life. The strategy is then to place a unique formula in each appropriate cell.<br />
<br />
=== Break formulas into parts and combine the parts ===<br />
The second strategy is similar, but instead you break down longer formulas into smaller parts and then combine the parts into the whole.<br />
<br />
Editor's note: This needs some explanation, but it is NOT about the "formula editor" (Math).<br />
<br />
=== Use the Basic editor to create functions ===<br />
A third strategy is to use the Basic editor and create your own functions. This approach would be used where the result would greatly simplify the use of the spreadsheet by the end user and keep the formulas simple with a better chance of avoiding errors. This approach also can make the maintenance easier by having corrections or updates kept in one central location. The use of macros is described in Chapter 12 of this book.<br />
<br />
<br />
{{CCBY}}<br />
[[Category: Calc Guide (Documentation)]]</div>Kirkhttps://wiki.openoffice.org/wiki/Documentation/OOo3_User_Guides/Calc_Guide/Creating_formulasDocumentation/OOo3 User Guides/Calc Guide/Creating formulas2009-09-15T02:15:56Z<p>Kirk: /* Operator types */</p>
<hr />
<div>{{DISPLAYTITLE:Creating formulas}}<br />
{{Documentation/CG3Ch3TOC<br />
|ShowPrevNext=block<br />
|PrevPage=Documentation/OOo3_User_Guides/Calc Guide/Formulas and Functions<br />
|NextPage=Documentation/OOo3_User_Guides/Calc Guide/Using functions<br />
}}<br />
==Introduction==<br />
You can enter formulas in two ways, either in the cell itself, or at the input line. Either way you will need to start it with one of the following symbols: "=", "+" or "-". Starting with anything else will cause the formula to be treated as if it were text.<br />
<br />
== Operators in formulas ==<br />
Each cell on the worksheet can be used as a data holder or a place for data calculations. Inserting data is accomplished simply by typing the data in the cell and moving to the next cell or pressing Enter. With formulas the equal sign denotes that instead of the cell being a data holder, the cell will be used for a calculation. A mathematical calculation like 15 + 46 can be accomplished as shown below.<br />
<br />
{{Documentation/Note| To enter the <nowiki>=</nowiki> symbol for a purpose other than creating a formula as described in this chapter, type an apostrophe or single quotation mark before the data; for example, <nowiki>'=</nowiki> means different things to different people. Calc treats everything after the single quotation symbol as text.}}<br />
<br />
{| class="prettytable"<br />
| '''''Simple Calculation in 1 Cell'''''<br />
| '''''Calculation by Reference'''''<br />
<br />
|-<br />
| [[Image:CG3Ch3F5a.png]]<br />
| [[Image:CG3Ch3F5b.png]]<br />
<br />
|-<br />
| [[Image:CG3Ch3F5c.png]]<br />
| [[Image:CG3Ch3F5e.png]]<br />
<br />
|-<br />
| <br />
| [[Image:CG3Ch3F5d.png]]<br />
<br />
|}<br />
''A simple calculation.''<br />
<br />
While the calculation on the left was accomplished in only one cell, the real power is shown on the right where the data is placed in cells and the calculation is performed using references back to the cells. In this case, cells B3 and B4 were the data holders with B5 the cell where the calculation was performed. Notice that the formula was shown as =B3 + B4. The plus sign denotes addition as the operation being performed upon the data within cells B3 and B4. All formulas build upon this concept. Other ways of entering formulas are shown in Table 1.<br />
<br />
These back references to find data to perform a calculation can be found anywhere in the worksheet being worked on or upon any other worksheet in the workbook that is opened. If the data needed was on different worksheets they would be referenced by referring to the worksheet, for example <nowiki>=SUM(</nowiki>Sheet2.B12+Sheet3.A11).<br />
<br />
''Table 1: Common ways to enter formulas.''<br />
<br />
{| class="prettytable"<br />
! Formula<br />
! Description<br />
<br />
|-<br />
| <nowiki>=A1+10</nowiki><br />
| Displays the contents of cell A1 plus 10.<br />
<br />
|-<br />
| <nowiki>=A1*16%</nowiki><br />
| Displays 16% of the contents of A1.<br />
<br />
|-<br />
| <nowiki>=A1 * A2</nowiki><br />
| Displays the result of the multiplication of A1 and A2.<br />
<br />
|-<br />
| <nowiki>=ROUND(A1;1)</nowiki><br />
| Displays the contents of cell A1 rounded to one decimal place.<br />
<br />
|-<br />
| <nowiki>=EFFECTIVE(5%;12)</nowiki><br />
| Calculates the effective interest for 5% annual nominal interest with 12 payments a year.<br />
<br />
|-<br />
| <nowiki>=B8-SUM(B10:B14)</nowiki><br />
| Calculates B8 minus the sum of the cells B10 to B14.<br />
<br />
|-<br />
| <nowiki>=SUM(B8;SUM(B10:B14))</nowiki><br />
| Calculates the sum of cells B10 to B14 and adds the value to B8.<br />
<br />
|-<br />
| <nowiki>=SUM(B1:B65536)</nowiki><br />
| Sums all numbers in column B.<br />
<br />
|-<br />
| <nowiki>=AVERAGE(BloodSugar)</nowiki><br />
| Displays the average of a named range defined under the name BloodSugar.<br />
<br />
|-<br />
| <nowiki>=IF(C31>140; "HIGH"; "OK")</nowiki><br />
| Displays the results of a conditional analysis of data from two sources. If C31 = 144, then HIGH is displayed, otherwise OK is displayed.<br />
<br />
|}<br />
<br />
{{Documentation/Note| Users of Lotus 1-2-3®, Quattro Pro® and other spreadsheet software may be familiar with formulas that begin with <nowiki>+, -, =, (, @, ., $,</nowiki> or <nowiki>#</nowiki>. A mathematical formula would look like +D2+C2 or +2*3. Functions begin with the <nowiki>@</nowiki> symbol such as <nowiki>@SUM(D2..D7)</nowiki>, <nowiki>@COS(@DEGTORAD(30))</nowiki> and <nowiki>@IRR(GUESS;CASHFLOWS)</nowiki>. Ranges are identified such as <nowiki>A1..D3</nowiki>.}}<br />
<br />
Functions can be identified in Table 1 with a word, for example ROUND, followed by parentheses enclosing references or numbers.<br />
<br />
It is also possible to establish ranges for inclusion by naming them using '''Insert > Names''', for example BloodSugar representing a range such as B3:B10. Logical functions can also be performed as represented by the IF statement which results in a conditional response based upon the data in the identified cell.<br />
<br />
== Operator types ==<br />
You can use the following operators in OpenOffice.org Calc: arithmetic, comparative, text, and reference.<br />
<br />
=== Arithmetic operators ===<br />
The addition, subtraction, multiplication and division operators return numerical results. The Negation and Percent operators identify a characteristic of the number found in the cell, for example -37. The example for Exponentiation illustrates how to enter a number that is being multiplied by itself a certain number of times, for example 2<sup>3 </sup><nowiki>= 2*2*2.</nowiki><br />
<br />
''Table 2: Arithmetical operators''<br />
<br />
{| class="prettytable"<br />
| '''''Operator'''''<br />
| '''''Name'''''<br />
| '''''Example'''''<br />
<br />
|-<br />
| + (Plus)<br />
| Addition<br />
| <nowiki>=1+1</nowiki><br />
<br />
|-<br />
| - (Minus)<br />
| Subtraction<br />
| <nowiki>=2-1</nowiki><br />
<br />
|-<br />
| - (Minus)<br />
| Negation<br />
| -5<br />
<br />
|-<br />
| <nowiki>* (asterisk)</nowiki><br />
| Multiplication<br />
| <nowiki>=2*2</nowiki><br />
<br />
|-<br />
| / (Slash)<br />
| Division<br />
| <nowiki>=10/5</nowiki><br />
<br />
|-<br />
| % (Percent)<br />
| Percent<br />
| 15%<br />
<br />
|-<br />
| ^ (Caret)<br />
| Exponentiation<br />
| 2^3<br />
<br />
|}<br />
<br />
=== Comparative operators ===<br />
Comparative operators are found in formulas that use the IF function and return either a true or false answer; for example, <nowiki>=IF(B6>G12; 127; 0)</nowiki> which, loosely translated, means if the contents of cell B6 are greater than the contents of cell G12, then return the number 127, otherwise return the number 0.<br />
<br />
A direct answer of TRUE or FALSE can be obtained by entering a formula such as =B6>B12. If the numbers found in the referenced cells are accurately represented, the answer TRUE is returned, otherwise FALSE is returned.<br />
<br />
''Table 3: Comparative operators''<br />
<br />
{| class="prettytable"<br />
| '''''Operator'''''<br />
| '''''Name'''''<br />
| '''''Example'''''<br />
<br />
|-<br />
| <nowiki>= (equal sign)</nowiki><br />
| Equal<br />
| A1=B1<br />
<br />
|-<br />
| > (Greater than)<br />
| Greater than<br />
| A1>B1<br />
<br />
|-<br />
| <nowiki>< (Less than)</nowiki><br />
| Less than<br />
| <nowiki>A1<B1</nowiki><br />
<br />
|-<br />
| >= (Greater than or equal to)<br />
| Greater than or equal to<br />
| A1>=B1<br />
<br />
|-<br />
| <nowiki><= (Less than or equal to)</nowiki><br />
| Less than or equal to<br />
| <nowiki>A1<=B1</nowiki><br />
<br />
|-<br />
| <nowiki><> (Inequality)</nowiki><br />
| Inequality<br />
| <nowiki>A1<>B1</nowiki><br />
<br />
|}<br />
<br />
=== Text operators ===<br />
It is common for users to place text in spreadsheets. To provide for variability in what and how this type of data is displayed, text can be joined together in pieces coming from different places on the spreadsheet. Below is an example.<br />
<br />
[[Image:CG3Ch3F7a.png]]<br />
<br />
[[Image:CG3Ch3F7b.png]]<br />
<br />
''Text Concatenation.''<br />
<br />
In this example, specific pieces of the text were found in three different cells. To join these segments together, the formula also adds required spaces and punctuation housed within quotation marks resulting in a formula of <nowiki>=B6 & " " & C6 & ", " D6</nowiki>. The result is the concatenation into a correctly formatted date for this locale.<br />
<br />
Taking this example further, the result cell is defined as a name, then text concatenation is performed using this defined name.<br />
<br />
[[Image:CG3Ch3F8.png|thumb|none|500px|''Defining a name for a range of cells.'']]<br />
<br />
[[Image:CG3Ch3F9.png|thumb|none|500px|''Naming a cell or range of cells for inclusion in a formula.'']]<br />
<br />
[[Image:CG3Ch3F10a.png]]<br />
<br />
[[Image:CG3Ch3F10b.png]]<br />
<br />
[[Image:CG3Ch3F10c.png]]<br />
<br />
''Defining Names on a worksheet.''<br />
<br />
=== Reference operators ===<br />
Reference operators merge the values held in each individual cell within the range. Reference operators can be an individual cell identified by the column identifier located along the upper edge of the spreadsheet and a numeric identifier found along the side of the spreadsheet. On spreadsheets read from left to right, the upper left cell is A1. The figure below shows these identifiers for Cell A1.<br />
<br />
[[Image:CG3Ch3F11.png|thumb|none|500px|''The Cell Reference Operator.'']]<br />
<br />
A range is also a reference operator referenced in formulas, functions and logical operators. The range for left to right operations refers to the upper left cell running to the right and downward to the right bottommost cell as shown below.<br />
<br />
[[Image:CG3Ch3F12.png|thumb|none|500px|''Reference Operator for a range.'']]<br />
<br />
In the upper left corner of the figure above, the range A1:D12 is shown, corresponding to the cells included in the drag operation with the mouse to highlight the range. This same range could also be created by entering in the Name Box directly as shown below. After pressing ''Enter'', the same range is selected.<br />
<br />
[[Image:CG3Ch3F13.png|thumb|none|500px|''Direct entry of Reference Operator into Name Box.'']]<br />
<br />
A reference operator can also be created by defining a named area by selecting the menu item '''Insert > Names > Define''', pressing ''Ctrl+F3'', or clicking the icon, if it shows on your toolbar.<br />
<br />
Another reference operator involves the use of the '!' sign. If data appears in range A1:B6 as well as range B5:C12, using a formula such as SUM(A1:B6!B5:C12) will yield the sum of cells B5 and B6.<br />
<br />
== Order of calculation ==<br />
''Order of calculation'' refers to the sequence that numerical operations are performed. Division and multiplication are performed before addition or subtraction. There is a common tendency to expect calculations to be made from left to right as the equation would be read in English. Calc evaluations the entire formula, then based upon programming precedence breaks the formula down executing multiplication and division operations before other operations. Due to this fact when creating formulas you should test your formula to make sure that the correct result is being obtained. An example of order of calculation in operation follows.<br />
<br />
''Table 4 – Order of Calculation''<br />
<br />
{| class="prettytable"<br />
| '''''Left To Right Calculation'''''<br />
| '''''Ordered Calculation'''''<br />
<br />
|-<br />
| 1+3*2+3 = 11<br />
| <nowiki>=1+3*2+3 result 10</nowiki><br />
<br />
|-<br />
| 1+3=4, then 4 X 2 = 8, then 8 + 3 = 11<br />
| 3*2=6, then 1 + 6 + 3 = 10<br />
<br />
|-<br />
| Another possible intention could be:<br />
| The program resolves the multiplication of 3 X 2 before dealing with the numbers being added.<br />
<br />
|-<br />
| 1+3*2+3 = 20<br />
| <br />
<br />
|}<br />
<br />
If you intend for the result to be either of the two possible solutions on the left, the way to achieve these results would be to order the formula as:<br />
<br />
{| class="prettytable"<br />
| ((1+3) * 2)+3 = 11<br />
| (1+3) * (2+3) = 20<br />
<br />
|}<br />
<br />
{{Documentation/Note| Consider using parentheses grouping operations to avoid obtaining incorrect calculations, e.g. <nowiki>= B4+G12*C4/M12</nowiki> becoming <nowiki>=((B4+G12)*C4)/M12</nowiki>.}}<br />
<br />
== Calculations linking sheets ==<br />
Another powerful feature of Calc is the ability to link data through several worksheets. The naming of worksheets can be helpful to identify where specific data may be found. A name such a Payroll or Boise Sales is much more meaningful than Sheet1. The function named SHEET() returns the sheet number in the collection of spreadsheets. With this function, if you are currently on the third sheet counting from the left along the worksheet tabs, the number 3 is returned. If you drag the worksheets around to different locations among the tabs, the number will return the number referring to the current position of this worksheet.<br />
<br />
{{Documentation/Caution| Users may experience a problem when creating a formula that references other worksheets. If you use the function <nowiki>SHEET()</nowiki> the number of the current worksheet appears even if you enter the name of the worksheet desired, e.g., <nowiki>=SHEET(Branch4)</nowiki> and you have as the top worksheet named CombinedOperations. This function only refers to the current or top worksheet and not to other worksheets found in the collection or file.}}<br />
<br />
An example of calculations obtaining data from other work can be seen in a business setting where a business combines its branch operations into a single worksheet.<br />
<br />
{| class="prettytable"<br />
| [[Image:CG3Ch3F14a.png]]<br />
| Sheet containing data for Branch 1.<br />
<br />
|-<br />
| [[Image:CG3Ch3F14b.png]]<br />
| Sheet containing data for Branch 2.<br />
<br />
|-<br />
| [[Image:CG3Ch3F14c.png]]<br />
| Sheet containing data for Branch 3.<br />
<br />
|-<br />
| [[Image:CG3Ch3F14d.png]]<br />
| Sheet containing combined data for all branches.<br />
<br />
|}<br />
''Combining data from several sheets into a single sheet.''<br />
<br />
To accomplish the links, it can be easier if the Function Wizard is used.<br />
<br />
# Open the Function Wizard by clicking the f(x) button on the toolbar, or by selecting '''Insert > Function''', or by pressing ''Ctrl+F2''. <br />
# Select a category of functions to shorten the list, then scroll down through the named functions and select the required one. When you select a function, its description appears on the right-hand side of the dialog. Double-click on the required function.<br />
# The wizard now displays an area to the right where you can enter data manually in text boxes or click the '''Shrink''' button [[Image:]] to shrink the wizard so you can select the cells from the worksheet.<br />
# To select cells, either click directly upon the needed cell or hold down the left mouse button and drag to select the needed area.<br />
# When the area has been selected, click the '''Shrink''' button again to return to the wizard. <br />
# If multiple ranges are needed, then select the next text box below the first and perform the same task for the next range. The wizard will accept in the Sum function up to 30 such ranges.<br />
<br />
The following figures show how to create the combined sheet shown in the example above.<br />
<br />
[[Image:CG3Ch3F15.png|thumb|none|500px|''Selecting the SUM function in the Function Wizard.'']]<br />
<br />
[[Image:CG3Ch3F16.png|thumb|none|500px|''Further steps in selecting cells containing data.'']]<br />
<br />
[[Image:CG3Ch3F17.png|thumb|none|500px|''Completed entries in Function Wizard.'']]<br />
<br />
== Strategies for creating formulas ==<br />
There are several broad approaches when making a decision to create a formula. In deciding on an approach, consider how many other people will need to use the worksheets, the life of the worksheets, and the variations that could be encountered from use.<br />
<br />
=== Enter a unique formula in each cell ===<br />
The first and most basic strategy is to view whatever formulas are needed as simple and with a limited use life. The strategy is then to place a unique formula in each appropriate cell.<br />
<br />
=== Break formulas into parts and combine the parts ===<br />
The second strategy is similar, but instead you break down longer formulas into smaller parts and then combine the parts into the whole.<br />
<br />
Editor's note: This needs some explanation, but it is NOT about the "formula editor" (Math).<br />
<br />
=== Use the Basic editor to create functions ===<br />
A third strategy is to use the Basic editor and create your own functions. This approach would be used where the result would greatly simplify the use of the spreadsheet by the end user and keep the formulas simple with a better chance of avoiding errors. This approach also can make the maintenance easier by having corrections or updates kept in one central location. The use of macros is described in Chapter 12 of this book.<br />
<br />
<br />
{{CCBY}}<br />
[[Category: Calc Guide (Documentation)]]</div>Kirkhttps://wiki.openoffice.org/wiki/Documentation/OOo3_User_Guides/Calc_Guide/Creating_formulasDocumentation/OOo3 User Guides/Calc Guide/Creating formulas2009-09-15T02:15:11Z<p>Kirk: /* Descriptive operators */ There is no such thing as a Descriptive operator. What this section was describing is an aspect of Formatting and has nothing to do with creating a formula.</p>
<hr />
<div>{{DISPLAYTITLE:Creating formulas}}<br />
{{Documentation/CG3Ch3TOC<br />
|ShowPrevNext=block<br />
|PrevPage=Documentation/OOo3_User_Guides/Calc Guide/Formulas and Functions<br />
|NextPage=Documentation/OOo3_User_Guides/Calc Guide/Using functions<br />
}}<br />
==Introduction==<br />
You can enter formulas in two ways, either in the cell itself, or at the input line. Either way you will need to start it with one of the following symbols: "=", "+" or "-". Starting with anything else will cause the formula to be treated as if it were text.<br />
<br />
== Operators in formulas ==<br />
Each cell on the worksheet can be used as a data holder or a place for data calculations. Inserting data is accomplished simply by typing the data in the cell and moving to the next cell or pressing Enter. With formulas the equal sign denotes that instead of the cell being a data holder, the cell will be used for a calculation. A mathematical calculation like 15 + 46 can be accomplished as shown below.<br />
<br />
{{Documentation/Note| To enter the <nowiki>=</nowiki> symbol for a purpose other than creating a formula as described in this chapter, type an apostrophe or single quotation mark before the data; for example, <nowiki>'=</nowiki> means different things to different people. Calc treats everything after the single quotation symbol as text.}}<br />
<br />
{| class="prettytable"<br />
| '''''Simple Calculation in 1 Cell'''''<br />
| '''''Calculation by Reference'''''<br />
<br />
|-<br />
| [[Image:CG3Ch3F5a.png]]<br />
| [[Image:CG3Ch3F5b.png]]<br />
<br />
|-<br />
| [[Image:CG3Ch3F5c.png]]<br />
| [[Image:CG3Ch3F5e.png]]<br />
<br />
|-<br />
| <br />
| [[Image:CG3Ch3F5d.png]]<br />
<br />
|}<br />
''A simple calculation.''<br />
<br />
While the calculation on the left was accomplished in only one cell, the real power is shown on the right where the data is placed in cells and the calculation is performed using references back to the cells. In this case, cells B3 and B4 were the data holders with B5 the cell where the calculation was performed. Notice that the formula was shown as =B3 + B4. The plus sign denotes addition as the operation being performed upon the data within cells B3 and B4. All formulas build upon this concept. Other ways of entering formulas are shown in Table 1.<br />
<br />
These back references to find data to perform a calculation can be found anywhere in the worksheet being worked on or upon any other worksheet in the workbook that is opened. If the data needed was on different worksheets they would be referenced by referring to the worksheet, for example <nowiki>=SUM(</nowiki>Sheet2.B12+Sheet3.A11).<br />
<br />
''Table 1: Common ways to enter formulas.''<br />
<br />
{| class="prettytable"<br />
! Formula<br />
! Description<br />
<br />
|-<br />
| <nowiki>=A1+10</nowiki><br />
| Displays the contents of cell A1 plus 10.<br />
<br />
|-<br />
| <nowiki>=A1*16%</nowiki><br />
| Displays 16% of the contents of A1.<br />
<br />
|-<br />
| <nowiki>=A1 * A2</nowiki><br />
| Displays the result of the multiplication of A1 and A2.<br />
<br />
|-<br />
| <nowiki>=ROUND(A1;1)</nowiki><br />
| Displays the contents of cell A1 rounded to one decimal place.<br />
<br />
|-<br />
| <nowiki>=EFFECTIVE(5%;12)</nowiki><br />
| Calculates the effective interest for 5% annual nominal interest with 12 payments a year.<br />
<br />
|-<br />
| <nowiki>=B8-SUM(B10:B14)</nowiki><br />
| Calculates B8 minus the sum of the cells B10 to B14.<br />
<br />
|-<br />
| <nowiki>=SUM(B8;SUM(B10:B14))</nowiki><br />
| Calculates the sum of cells B10 to B14 and adds the value to B8.<br />
<br />
|-<br />
| <nowiki>=SUM(B1:B65536)</nowiki><br />
| Sums all numbers in column B.<br />
<br />
|-<br />
| <nowiki>=AVERAGE(BloodSugar)</nowiki><br />
| Displays the average of a named range defined under the name BloodSugar.<br />
<br />
|-<br />
| <nowiki>=IF(C31>140; "HIGH"; "OK")</nowiki><br />
| Displays the results of a conditional analysis of data from two sources. If C31 = 144, then HIGH is displayed, otherwise OK is displayed.<br />
<br />
|}<br />
<br />
{{Documentation/Note| Users of Lotus 1-2-3®, Quattro Pro® and other spreadsheet software may be familiar with formulas that begin with <nowiki>+, -, =, (, @, ., $,</nowiki> or <nowiki>#</nowiki>. A mathematical formula would look like +D2+C2 or +2*3. Functions begin with the <nowiki>@</nowiki> symbol such as <nowiki>@SUM(D2..D7)</nowiki>, <nowiki>@COS(@DEGTORAD(30))</nowiki> and <nowiki>@IRR(GUESS;CASHFLOWS)</nowiki>. Ranges are identified such as <nowiki>A1..D3</nowiki>.}}<br />
<br />
Functions can be identified in Table 1 with a word, for example ROUND, followed by parentheses enclosing references or numbers.<br />
<br />
It is also possible to establish ranges for inclusion by naming them using '''Insert > Names''', for example BloodSugar representing a range such as B3:B10. Logical functions can also be performed as represented by the IF statement which results in a conditional response based upon the data in the identified cell.<br />
<br />
== Operator types ==<br />
You can use the following operators in OpenOffice.org Calc: arithmetic, comparative, descriptive, text, and reference.<br />
<br />
=== Arithmetic operators ===<br />
The addition, subtraction, multiplication and division operators return numerical results. The Negation and Percent operators identify a characteristic of the number found in the cell, for example -37. The example for Exponentiation illustrates how to enter a number that is being multiplied by itself a certain number of times, for example 2<sup>3 </sup><nowiki>= 2*2*2.</nowiki><br />
<br />
''Table 2: Arithmetical operators''<br />
<br />
{| class="prettytable"<br />
| '''''Operator'''''<br />
| '''''Name'''''<br />
| '''''Example'''''<br />
<br />
|-<br />
| + (Plus)<br />
| Addition<br />
| <nowiki>=1+1</nowiki><br />
<br />
|-<br />
| - (Minus)<br />
| Subtraction<br />
| <nowiki>=2-1</nowiki><br />
<br />
|-<br />
| - (Minus)<br />
| Negation<br />
| -5<br />
<br />
|-<br />
| <nowiki>* (asterisk)</nowiki><br />
| Multiplication<br />
| <nowiki>=2*2</nowiki><br />
<br />
|-<br />
| / (Slash)<br />
| Division<br />
| <nowiki>=10/5</nowiki><br />
<br />
|-<br />
| % (Percent)<br />
| Percent<br />
| 15%<br />
<br />
|-<br />
| ^ (Caret)<br />
| Exponentiation<br />
| 2^3<br />
<br />
|}<br />
<br />
=== Comparative operators ===<br />
Comparative operators are found in formulas that use the IF function and return either a true or false answer; for example, <nowiki>=IF(B6>G12; 127; 0)</nowiki> which, loosely translated, means if the contents of cell B6 are greater than the contents of cell G12, then return the number 127, otherwise return the number 0.<br />
<br />
A direct answer of TRUE or FALSE can be obtained by entering a formula such as =B6>B12. If the numbers found in the referenced cells are accurately represented, the answer TRUE is returned, otherwise FALSE is returned.<br />
<br />
''Table 3: Comparative operators''<br />
<br />
{| class="prettytable"<br />
| '''''Operator'''''<br />
| '''''Name'''''<br />
| '''''Example'''''<br />
<br />
|-<br />
| <nowiki>= (equal sign)</nowiki><br />
| Equal<br />
| A1=B1<br />
<br />
|-<br />
| > (Greater than)<br />
| Greater than<br />
| A1>B1<br />
<br />
|-<br />
| <nowiki>< (Less than)</nowiki><br />
| Less than<br />
| <nowiki>A1<B1</nowiki><br />
<br />
|-<br />
| >= (Greater than or equal to)<br />
| Greater than or equal to<br />
| A1>=B1<br />
<br />
|-<br />
| <nowiki><= (Less than or equal to)</nowiki><br />
| Less than or equal to<br />
| <nowiki>A1<=B1</nowiki><br />
<br />
|-<br />
| <nowiki><> (Inequality)</nowiki><br />
| Inequality<br />
| <nowiki>A1<>B1</nowiki><br />
<br />
|}<br />
<br />
=== Text operators ===<br />
It is common for users to place text in spreadsheets. To provide for variability in what and how this type of data is displayed, text can be joined together in pieces coming from different places on the spreadsheet. Below is an example.<br />
<br />
[[Image:CG3Ch3F7a.png]]<br />
<br />
[[Image:CG3Ch3F7b.png]]<br />
<br />
''Text Concatenation.''<br />
<br />
In this example, specific pieces of the text were found in three different cells. To join these segments together, the formula also adds required spaces and punctuation housed within quotation marks resulting in a formula of <nowiki>=B6 & " " & C6 & ", " D6</nowiki>. The result is the concatenation into a correctly formatted date for this locale.<br />
<br />
Taking this example further, the result cell is defined as a name, then text concatenation is performed using this defined name.<br />
<br />
[[Image:CG3Ch3F8.png|thumb|none|500px|''Defining a name for a range of cells.'']]<br />
<br />
[[Image:CG3Ch3F9.png|thumb|none|500px|''Naming a cell or range of cells for inclusion in a formula.'']]<br />
<br />
[[Image:CG3Ch3F10a.png]]<br />
<br />
[[Image:CG3Ch3F10b.png]]<br />
<br />
[[Image:CG3Ch3F10c.png]]<br />
<br />
''Defining Names on a worksheet.''<br />
<br />
=== Reference operators ===<br />
Reference operators merge the values held in each individual cell within the range. Reference operators can be an individual cell identified by the column identifier located along the upper edge of the spreadsheet and a numeric identifier found along the side of the spreadsheet. On spreadsheets read from left to right, the upper left cell is A1. The figure below shows these identifiers for Cell A1.<br />
<br />
[[Image:CG3Ch3F11.png|thumb|none|500px|''The Cell Reference Operator.'']]<br />
<br />
A range is also a reference operator referenced in formulas, functions and logical operators. The range for left to right operations refers to the upper left cell running to the right and downward to the right bottommost cell as shown below.<br />
<br />
[[Image:CG3Ch3F12.png|thumb|none|500px|''Reference Operator for a range.'']]<br />
<br />
In the upper left corner of the figure above, the range A1:D12 is shown, corresponding to the cells included in the drag operation with the mouse to highlight the range. This same range could also be created by entering in the Name Box directly as shown below. After pressing ''Enter'', the same range is selected.<br />
<br />
[[Image:CG3Ch3F13.png|thumb|none|500px|''Direct entry of Reference Operator into Name Box.'']]<br />
<br />
A reference operator can also be created by defining a named area by selecting the menu item '''Insert > Names > Define''', pressing ''Ctrl+F3'', or clicking the icon, if it shows on your toolbar.<br />
<br />
Another reference operator involves the use of the '!' sign. If data appears in range A1:B6 as well as range B5:C12, using a formula such as SUM(A1:B6!B5:C12) will yield the sum of cells B5 and B6.<br />
<br />
== Order of calculation ==<br />
''Order of calculation'' refers to the sequence that numerical operations are performed. Division and multiplication are performed before addition or subtraction. There is a common tendency to expect calculations to be made from left to right as the equation would be read in English. Calc evaluations the entire formula, then based upon programming precedence breaks the formula down executing multiplication and division operations before other operations. Due to this fact when creating formulas you should test your formula to make sure that the correct result is being obtained. An example of order of calculation in operation follows.<br />
<br />
''Table 4 – Order of Calculation''<br />
<br />
{| class="prettytable"<br />
| '''''Left To Right Calculation'''''<br />
| '''''Ordered Calculation'''''<br />
<br />
|-<br />
| 1+3*2+3 = 11<br />
| <nowiki>=1+3*2+3 result 10</nowiki><br />
<br />
|-<br />
| 1+3=4, then 4 X 2 = 8, then 8 + 3 = 11<br />
| 3*2=6, then 1 + 6 + 3 = 10<br />
<br />
|-<br />
| Another possible intention could be:<br />
| The program resolves the multiplication of 3 X 2 before dealing with the numbers being added.<br />
<br />
|-<br />
| 1+3*2+3 = 20<br />
| <br />
<br />
|}<br />
<br />
If you intend for the result to be either of the two possible solutions on the left, the way to achieve these results would be to order the formula as:<br />
<br />
{| class="prettytable"<br />
| ((1+3) * 2)+3 = 11<br />
| (1+3) * (2+3) = 20<br />
<br />
|}<br />
<br />
{{Documentation/Note| Consider using parentheses grouping operations to avoid obtaining incorrect calculations, e.g. <nowiki>= B4+G12*C4/M12</nowiki> becoming <nowiki>=((B4+G12)*C4)/M12</nowiki>.}}<br />
<br />
== Calculations linking sheets ==<br />
Another powerful feature of Calc is the ability to link data through several worksheets. The naming of worksheets can be helpful to identify where specific data may be found. A name such a Payroll or Boise Sales is much more meaningful than Sheet1. The function named SHEET() returns the sheet number in the collection of spreadsheets. With this function, if you are currently on the third sheet counting from the left along the worksheet tabs, the number 3 is returned. If you drag the worksheets around to different locations among the tabs, the number will return the number referring to the current position of this worksheet.<br />
<br />
{{Documentation/Caution| Users may experience a problem when creating a formula that references other worksheets. If you use the function <nowiki>SHEET()</nowiki> the number of the current worksheet appears even if you enter the name of the worksheet desired, e.g., <nowiki>=SHEET(Branch4)</nowiki> and you have as the top worksheet named CombinedOperations. This function only refers to the current or top worksheet and not to other worksheets found in the collection or file.}}<br />
<br />
An example of calculations obtaining data from other work can be seen in a business setting where a business combines its branch operations into a single worksheet.<br />
<br />
{| class="prettytable"<br />
| [[Image:CG3Ch3F14a.png]]<br />
| Sheet containing data for Branch 1.<br />
<br />
|-<br />
| [[Image:CG3Ch3F14b.png]]<br />
| Sheet containing data for Branch 2.<br />
<br />
|-<br />
| [[Image:CG3Ch3F14c.png]]<br />
| Sheet containing data for Branch 3.<br />
<br />
|-<br />
| [[Image:CG3Ch3F14d.png]]<br />
| Sheet containing combined data for all branches.<br />
<br />
|}<br />
''Combining data from several sheets into a single sheet.''<br />
<br />
To accomplish the links, it can be easier if the Function Wizard is used.<br />
<br />
# Open the Function Wizard by clicking the f(x) button on the toolbar, or by selecting '''Insert > Function''', or by pressing ''Ctrl+F2''. <br />
# Select a category of functions to shorten the list, then scroll down through the named functions and select the required one. When you select a function, its description appears on the right-hand side of the dialog. Double-click on the required function.<br />
# The wizard now displays an area to the right where you can enter data manually in text boxes or click the '''Shrink''' button [[Image:]] to shrink the wizard so you can select the cells from the worksheet.<br />
# To select cells, either click directly upon the needed cell or hold down the left mouse button and drag to select the needed area.<br />
# When the area has been selected, click the '''Shrink''' button again to return to the wizard. <br />
# If multiple ranges are needed, then select the next text box below the first and perform the same task for the next range. The wizard will accept in the Sum function up to 30 such ranges.<br />
<br />
The following figures show how to create the combined sheet shown in the example above.<br />
<br />
[[Image:CG3Ch3F15.png|thumb|none|500px|''Selecting the SUM function in the Function Wizard.'']]<br />
<br />
[[Image:CG3Ch3F16.png|thumb|none|500px|''Further steps in selecting cells containing data.'']]<br />
<br />
[[Image:CG3Ch3F17.png|thumb|none|500px|''Completed entries in Function Wizard.'']]<br />
<br />
== Strategies for creating formulas ==<br />
There are several broad approaches when making a decision to create a formula. In deciding on an approach, consider how many other people will need to use the worksheets, the life of the worksheets, and the variations that could be encountered from use.<br />
<br />
=== Enter a unique formula in each cell ===<br />
The first and most basic strategy is to view whatever formulas are needed as simple and with a limited use life. The strategy is then to place a unique formula in each appropriate cell.<br />
<br />
=== Break formulas into parts and combine the parts ===<br />
The second strategy is similar, but instead you break down longer formulas into smaller parts and then combine the parts into the whole.<br />
<br />
Editor's note: This needs some explanation, but it is NOT about the "formula editor" (Math).<br />
<br />
=== Use the Basic editor to create functions ===<br />
A third strategy is to use the Basic editor and create your own functions. This approach would be used where the result would greatly simplify the use of the spreadsheet by the end user and keep the formulas simple with a better chance of avoiding errors. This approach also can make the maintenance easier by having corrections or updates kept in one central location. The use of macros is described in Chapter 12 of this book.<br />
<br />
<br />
{{CCBY}}<br />
[[Category: Calc Guide (Documentation)]]</div>Kirkhttps://wiki.openoffice.org/wiki/Documentation/OOo3_User_Guides/Calc_Guide/Creating_formulasDocumentation/OOo3 User Guides/Calc Guide/Creating formulas2009-09-15T02:08:16Z<p>Kirk: /* Operators in formulas */</p>
<hr />
<div>{{DISPLAYTITLE:Creating formulas}}<br />
{{Documentation/CG3Ch3TOC<br />
|ShowPrevNext=block<br />
|PrevPage=Documentation/OOo3_User_Guides/Calc Guide/Formulas and Functions<br />
|NextPage=Documentation/OOo3_User_Guides/Calc Guide/Using functions<br />
}}<br />
==Introduction==<br />
You can enter formulas in two ways, either in the cell itself, or at the input line. Either way you will need to start it with one of the following symbols: "=", "+" or "-". Starting with anything else will cause the formula to be treated as if it were text.<br />
<br />
== Operators in formulas ==<br />
Each cell on the worksheet can be used as a data holder or a place for data calculations. Inserting data is accomplished simply by typing the data in the cell and moving to the next cell or pressing Enter. With formulas the equal sign denotes that instead of the cell being a data holder, the cell will be used for a calculation. A mathematical calculation like 15 + 46 can be accomplished as shown below.<br />
<br />
{{Documentation/Note| To enter the <nowiki>=</nowiki> symbol for a purpose other than creating a formula as described in this chapter, type an apostrophe or single quotation mark before the data; for example, <nowiki>'=</nowiki> means different things to different people. Calc treats everything after the single quotation symbol as text.}}<br />
<br />
{| class="prettytable"<br />
| '''''Simple Calculation in 1 Cell'''''<br />
| '''''Calculation by Reference'''''<br />
<br />
|-<br />
| [[Image:CG3Ch3F5a.png]]<br />
| [[Image:CG3Ch3F5b.png]]<br />
<br />
|-<br />
| [[Image:CG3Ch3F5c.png]]<br />
| [[Image:CG3Ch3F5e.png]]<br />
<br />
|-<br />
| <br />
| [[Image:CG3Ch3F5d.png]]<br />
<br />
|}<br />
''A simple calculation.''<br />
<br />
While the calculation on the left was accomplished in only one cell, the real power is shown on the right where the data is placed in cells and the calculation is performed using references back to the cells. In this case, cells B3 and B4 were the data holders with B5 the cell where the calculation was performed. Notice that the formula was shown as =B3 + B4. The plus sign denotes addition as the operation being performed upon the data within cells B3 and B4. All formulas build upon this concept. Other ways of entering formulas are shown in Table 1.<br />
<br />
These back references to find data to perform a calculation can be found anywhere in the worksheet being worked on or upon any other worksheet in the workbook that is opened. If the data needed was on different worksheets they would be referenced by referring to the worksheet, for example <nowiki>=SUM(</nowiki>Sheet2.B12+Sheet3.A11).<br />
<br />
''Table 1: Common ways to enter formulas.''<br />
<br />
{| class="prettytable"<br />
! Formula<br />
! Description<br />
<br />
|-<br />
| <nowiki>=A1+10</nowiki><br />
| Displays the contents of cell A1 plus 10.<br />
<br />
|-<br />
| <nowiki>=A1*16%</nowiki><br />
| Displays 16% of the contents of A1.<br />
<br />
|-<br />
| <nowiki>=A1 * A2</nowiki><br />
| Displays the result of the multiplication of A1 and A2.<br />
<br />
|-<br />
| <nowiki>=ROUND(A1;1)</nowiki><br />
| Displays the contents of cell A1 rounded to one decimal place.<br />
<br />
|-<br />
| <nowiki>=EFFECTIVE(5%;12)</nowiki><br />
| Calculates the effective interest for 5% annual nominal interest with 12 payments a year.<br />
<br />
|-<br />
| <nowiki>=B8-SUM(B10:B14)</nowiki><br />
| Calculates B8 minus the sum of the cells B10 to B14.<br />
<br />
|-<br />
| <nowiki>=SUM(B8;SUM(B10:B14))</nowiki><br />
| Calculates the sum of cells B10 to B14 and adds the value to B8.<br />
<br />
|-<br />
| <nowiki>=SUM(B1:B65536)</nowiki><br />
| Sums all numbers in column B.<br />
<br />
|-<br />
| <nowiki>=AVERAGE(BloodSugar)</nowiki><br />
| Displays the average of a named range defined under the name BloodSugar.<br />
<br />
|-<br />
| <nowiki>=IF(C31>140; "HIGH"; "OK")</nowiki><br />
| Displays the results of a conditional analysis of data from two sources. If C31 = 144, then HIGH is displayed, otherwise OK is displayed.<br />
<br />
|}<br />
<br />
{{Documentation/Note| Users of Lotus 1-2-3®, Quattro Pro® and other spreadsheet software may be familiar with formulas that begin with <nowiki>+, -, =, (, @, ., $,</nowiki> or <nowiki>#</nowiki>. A mathematical formula would look like +D2+C2 or +2*3. Functions begin with the <nowiki>@</nowiki> symbol such as <nowiki>@SUM(D2..D7)</nowiki>, <nowiki>@COS(@DEGTORAD(30))</nowiki> and <nowiki>@IRR(GUESS;CASHFLOWS)</nowiki>. Ranges are identified such as <nowiki>A1..D3</nowiki>.}}<br />
<br />
Functions can be identified in Table 1 with a word, for example ROUND, followed by parentheses enclosing references or numbers.<br />
<br />
It is also possible to establish ranges for inclusion by naming them using '''Insert > Names''', for example BloodSugar representing a range such as B3:B10. Logical functions can also be performed as represented by the IF statement which results in a conditional response based upon the data in the identified cell.<br />
<br />
== Operator types ==<br />
You can use the following operators in OpenOffice.org Calc: arithmetic, comparative, descriptive, text, and reference.<br />
<br />
=== Arithmetic operators ===<br />
The addition, subtraction, multiplication and division operators return numerical results. The Negation and Percent operators identify a characteristic of the number found in the cell, for example -37. The example for Exponentiation illustrates how to enter a number that is being multiplied by itself a certain number of times, for example 2<sup>3 </sup><nowiki>= 2*2*2.</nowiki><br />
<br />
''Table 2: Arithmetical operators''<br />
<br />
{| class="prettytable"<br />
| '''''Operator'''''<br />
| '''''Name'''''<br />
| '''''Example'''''<br />
<br />
|-<br />
| + (Plus)<br />
| Addition<br />
| <nowiki>=1+1</nowiki><br />
<br />
|-<br />
| - (Minus)<br />
| Subtraction<br />
| <nowiki>=2-1</nowiki><br />
<br />
|-<br />
| - (Minus)<br />
| Negation<br />
| -5<br />
<br />
|-<br />
| <nowiki>* (asterisk)</nowiki><br />
| Multiplication<br />
| <nowiki>=2*2</nowiki><br />
<br />
|-<br />
| / (Slash)<br />
| Division<br />
| <nowiki>=10/5</nowiki><br />
<br />
|-<br />
| % (Percent)<br />
| Percent<br />
| 15%<br />
<br />
|-<br />
| ^ (Caret)<br />
| Exponentiation<br />
| 2^3<br />
<br />
|}<br />
<br />
=== Comparative operators ===<br />
Comparative operators are found in formulas that use the IF function and return either a true or false answer; for example, <nowiki>=IF(B6>G12; 127; 0)</nowiki> which, loosely translated, means if the contents of cell B6 are greater than the contents of cell G12, then return the number 127, otherwise return the number 0.<br />
<br />
A direct answer of TRUE or FALSE can be obtained by entering a formula such as =B6>B12. If the numbers found in the referenced cells are accurately represented, the answer TRUE is returned, otherwise FALSE is returned.<br />
<br />
''Table 3: Comparative operators''<br />
<br />
{| class="prettytable"<br />
| '''''Operator'''''<br />
| '''''Name'''''<br />
| '''''Example'''''<br />
<br />
|-<br />
| <nowiki>= (equal sign)</nowiki><br />
| Equal<br />
| A1=B1<br />
<br />
|-<br />
| > (Greater than)<br />
| Greater than<br />
| A1>B1<br />
<br />
|-<br />
| <nowiki>< (Less than)</nowiki><br />
| Less than<br />
| <nowiki>A1<B1</nowiki><br />
<br />
|-<br />
| >= (Greater than or equal to)<br />
| Greater than or equal to<br />
| A1>=B1<br />
<br />
|-<br />
| <nowiki><= (Less than or equal to)</nowiki><br />
| Less than or equal to<br />
| <nowiki>A1<=B1</nowiki><br />
<br />
|-<br />
| <nowiki><> (Inequality)</nowiki><br />
| Inequality<br />
| <nowiki>A1<>B1</nowiki><br />
<br />
|}<br />
<br />
=== Descriptive operators ===<br />
Currency symbols are perhaps the most commonly used descriptive operators found in Calc. Calc handles as currency an amount like $0.97 or £0.97 entered into a cell formatted as general or currency. However, it does not handle other currency types entered in this fashion. For other currencies, it is best to format the cells as the specific currency type, such as Yen (¥). To do this, right-click on the affected cells and select Formatting Cells. On the tab Numbers tab, select Currency. In the Format list, select the appropriate currency type. <br />
<br />
When entering amounts, it is not necessary to enter a currency symbol. Some currency symbols such as the Yen may not display.<br />
<br />
[[Image:CG3Ch3F6.png|thumb|none|500px|''Currency symbols.'']]<br />
<br />
{{Documentation/Caution| Users experienced in the use of an adding machine may experience difficulty with data entry, with resulting loss of data or incorrect results displaying. Adding machine users typically enter numbers from left to right without entering a decimal point. For example, the entry of 97 will display as 0.97. In cells formatted as currency, the entry of 97 will display currency for the locale selected such as $97 or £97, not $0.97 or £0.97.}}<br />
<br />
=== Text operators ===<br />
It is common for users to place text in spreadsheets. To provide for variability in what and how this type of data is displayed, text can be joined together in pieces coming from different places on the spreadsheet. Below is an example.<br />
<br />
[[Image:CG3Ch3F7a.png]]<br />
<br />
[[Image:CG3Ch3F7b.png]]<br />
<br />
''Text Concatenation.''<br />
<br />
In this example, specific pieces of the text were found in three different cells. To join these segments together, the formula also adds required spaces and punctuation housed within quotation marks resulting in a formula of <nowiki>=B6 & " " & C6 & ", " D6</nowiki>. The result is the concatenation into a correctly formatted date for this locale.<br />
<br />
Taking this example further, the result cell is defined as a name, then text concatenation is performed using this defined name.<br />
<br />
[[Image:CG3Ch3F8.png|thumb|none|500px|''Defining a name for a range of cells.'']]<br />
<br />
[[Image:CG3Ch3F9.png|thumb|none|500px|''Naming a cell or range of cells for inclusion in a formula.'']]<br />
<br />
[[Image:CG3Ch3F10a.png]]<br />
<br />
[[Image:CG3Ch3F10b.png]]<br />
<br />
[[Image:CG3Ch3F10c.png]]<br />
<br />
''Defining Names on a worksheet.''<br />
<br />
=== Reference operators ===<br />
Reference operators merge the values held in each individual cell within the range. Reference operators can be an individual cell identified by the column identifier located along the upper edge of the spreadsheet and a numeric identifier found along the side of the spreadsheet. On spreadsheets read from left to right, the upper left cell is A1. The figure below shows these identifiers for Cell A1.<br />
<br />
[[Image:CG3Ch3F11.png|thumb|none|500px|''The Cell Reference Operator.'']]<br />
<br />
A range is also a reference operator referenced in formulas, functions and logical operators. The range for left to right operations refers to the upper left cell running to the right and downward to the right bottommost cell as shown below.<br />
<br />
[[Image:CG3Ch3F12.png|thumb|none|500px|''Reference Operator for a range.'']]<br />
<br />
In the upper left corner of the figure above, the range A1:D12 is shown, corresponding to the cells included in the drag operation with the mouse to highlight the range. This same range could also be created by entering in the Name Box directly as shown below. After pressing ''Enter'', the same range is selected.<br />
<br />
[[Image:CG3Ch3F13.png|thumb|none|500px|''Direct entry of Reference Operator into Name Box.'']]<br />
<br />
A reference operator can also be created by defining a named area by selecting the menu item '''Insert > Names > Define''', pressing ''Ctrl+F3'', or clicking the icon, if it shows on your toolbar.<br />
<br />
Another reference operator involves the use of the '!' sign. If data appears in range A1:B6 as well as range B5:C12, using a formula such as SUM(A1:B6!B5:C12) will yield the sum of cells B5 and B6.<br />
<br />
== Order of calculation ==<br />
''Order of calculation'' refers to the sequence that numerical operations are performed. Division and multiplication are performed before addition or subtraction. There is a common tendency to expect calculations to be made from left to right as the equation would be read in English. Calc evaluations the entire formula, then based upon programming precedence breaks the formula down executing multiplication and division operations before other operations. Due to this fact when creating formulas you should test your formula to make sure that the correct result is being obtained. An example of order of calculation in operation follows.<br />
<br />
''Table 4 – Order of Calculation''<br />
<br />
{| class="prettytable"<br />
| '''''Left To Right Calculation'''''<br />
| '''''Ordered Calculation'''''<br />
<br />
|-<br />
| 1+3*2+3 = 11<br />
| <nowiki>=1+3*2+3 result 10</nowiki><br />
<br />
|-<br />
| 1+3=4, then 4 X 2 = 8, then 8 + 3 = 11<br />
| 3*2=6, then 1 + 6 + 3 = 10<br />
<br />
|-<br />
| Another possible intention could be:<br />
| The program resolves the multiplication of 3 X 2 before dealing with the numbers being added.<br />
<br />
|-<br />
| 1+3*2+3 = 20<br />
| <br />
<br />
|}<br />
<br />
If you intend for the result to be either of the two possible solutions on the left, the way to achieve these results would be to order the formula as:<br />
<br />
{| class="prettytable"<br />
| ((1+3) * 2)+3 = 11<br />
| (1+3) * (2+3) = 20<br />
<br />
|}<br />
<br />
{{Documentation/Note| Consider using parentheses grouping operations to avoid obtaining incorrect calculations, e.g. <nowiki>= B4+G12*C4/M12</nowiki> becoming <nowiki>=((B4+G12)*C4)/M12</nowiki>.}}<br />
<br />
== Calculations linking sheets ==<br />
Another powerful feature of Calc is the ability to link data through several worksheets. The naming of worksheets can be helpful to identify where specific data may be found. A name such a Payroll or Boise Sales is much more meaningful than Sheet1. The function named SHEET() returns the sheet number in the collection of spreadsheets. With this function, if you are currently on the third sheet counting from the left along the worksheet tabs, the number 3 is returned. If you drag the worksheets around to different locations among the tabs, the number will return the number referring to the current position of this worksheet.<br />
<br />
{{Documentation/Caution| Users may experience a problem when creating a formula that references other worksheets. If you use the function <nowiki>SHEET()</nowiki> the number of the current worksheet appears even if you enter the name of the worksheet desired, e.g., <nowiki>=SHEET(Branch4)</nowiki> and you have as the top worksheet named CombinedOperations. This function only refers to the current or top worksheet and not to other worksheets found in the collection or file.}}<br />
<br />
An example of calculations obtaining data from other work can be seen in a business setting where a business combines its branch operations into a single worksheet.<br />
<br />
{| class="prettytable"<br />
| [[Image:CG3Ch3F14a.png]]<br />
| Sheet containing data for Branch 1.<br />
<br />
|-<br />
| [[Image:CG3Ch3F14b.png]]<br />
| Sheet containing data for Branch 2.<br />
<br />
|-<br />
| [[Image:CG3Ch3F14c.png]]<br />
| Sheet containing data for Branch 3.<br />
<br />
|-<br />
| [[Image:CG3Ch3F14d.png]]<br />
| Sheet containing combined data for all branches.<br />
<br />
|}<br />
''Combining data from several sheets into a single sheet.''<br />
<br />
To accomplish the links, it can be easier if the Function Wizard is used.<br />
<br />
# Open the Function Wizard by clicking the f(x) button on the toolbar, or by selecting '''Insert > Function''', or by pressing ''Ctrl+F2''. <br />
# Select a category of functions to shorten the list, then scroll down through the named functions and select the required one. When you select a function, its description appears on the right-hand side of the dialog. Double-click on the required function.<br />
# The wizard now displays an area to the right where you can enter data manually in text boxes or click the '''Shrink''' button [[Image:]] to shrink the wizard so you can select the cells from the worksheet.<br />
# To select cells, either click directly upon the needed cell or hold down the left mouse button and drag to select the needed area.<br />
# When the area has been selected, click the '''Shrink''' button again to return to the wizard. <br />
# If multiple ranges are needed, then select the next text box below the first and perform the same task for the next range. The wizard will accept in the Sum function up to 30 such ranges.<br />
<br />
The following figures show how to create the combined sheet shown in the example above.<br />
<br />
[[Image:CG3Ch3F15.png|thumb|none|500px|''Selecting the SUM function in the Function Wizard.'']]<br />
<br />
[[Image:CG3Ch3F16.png|thumb|none|500px|''Further steps in selecting cells containing data.'']]<br />
<br />
[[Image:CG3Ch3F17.png|thumb|none|500px|''Completed entries in Function Wizard.'']]<br />
<br />
== Strategies for creating formulas ==<br />
There are several broad approaches when making a decision to create a formula. In deciding on an approach, consider how many other people will need to use the worksheets, the life of the worksheets, and the variations that could be encountered from use.<br />
<br />
=== Enter a unique formula in each cell ===<br />
The first and most basic strategy is to view whatever formulas are needed as simple and with a limited use life. The strategy is then to place a unique formula in each appropriate cell.<br />
<br />
=== Break formulas into parts and combine the parts ===<br />
The second strategy is similar, but instead you break down longer formulas into smaller parts and then combine the parts into the whole.<br />
<br />
Editor's note: This needs some explanation, but it is NOT about the "formula editor" (Math).<br />
<br />
=== Use the Basic editor to create functions ===<br />
A third strategy is to use the Basic editor and create your own functions. This approach would be used where the result would greatly simplify the use of the spreadsheet by the end user and keep the formulas simple with a better chance of avoiding errors. This approach also can make the maintenance easier by having corrections or updates kept in one central location. The use of macros is described in Chapter 12 of this book.<br />
<br />
<br />
{{CCBY}}<br />
[[Category: Calc Guide (Documentation)]]</div>Kirkhttps://wiki.openoffice.org/wiki/Documentation/OOo3_User_Guides/Calc_Guide/Creating_formulasDocumentation/OOo3 User Guides/Calc Guide/Creating formulas2009-09-14T21:14:24Z<p>Kirk: /* Operators in formulas */</p>
<hr />
<div>{{DISPLAYTITLE:Creating formulas}}<br />
{{Documentation/CG3Ch3TOC<br />
|ShowPrevNext=block<br />
|PrevPage=Documentation/OOo3_User_Guides/Calc Guide/Formulas and Functions<br />
|NextPage=Documentation/OOo3_User_Guides/Calc Guide/Using functions<br />
}}<br />
==Introduction==<br />
You can enter formulas in two ways, either in the cell itself, or at the input line. Either way you will need to start it with one of the following symbols: "=", "+" or "-". Starting with anything else will cause the formula to be treated as if it were text.<br />
<br />
== Operators in formulas ==<br />
Each cell on the worksheet can be used as a data holder or a place for data calculations. Inserting data is accomplished simply by typing the data in the cell and moving to the next cell or pressing Enter. With formulas the equal sign denotes that instead of the cell being a data holder, the cell will be used for a calculation. A mathematical calculation like 15 + 46 can be accomplished as shown below.<br />
<br />
{{Documentation/Note| To enter the <nowiki>=</nowiki> symbol for a purpose other than creating a formula as described in this chapter, type an apostrophe or single quotation mark before the data; for example, <nowiki>'=</nowiki> means different things to different people. Calc treats everything after the single quotation symbol as text.}}<br />
<br />
{| class="prettytable"<br />
| '''''Simple Calculation in 1 Cell'''''<br />
| '''''Calculation by Reference'''''<br />
<br />
|-<br />
| [[Image:CG3Ch3F5a.png]]<br />
| [[Image:CG3Ch3F5b.png]]<br />
<br />
|-<br />
| [[Image:CG3Ch3F5c.png]]<br />
| [[Image:CG3Ch3F5e.png]]<br />
<br />
|-<br />
| <br />
| [[Image:CG3Ch3F5d.png]]<br />
<br />
|}<br />
''A simple calculation.''<br />
<br />
While the calculation on the left was accomplished in only one cell, the real power is shown on the right where the data is placed in cells and the calculation is performed using references back to the cells. In this case, cells B3 and B4 were the data holders with B5 the cell where the calculation was performed. Notice that the formula was shown as =B3 + B4. The plus sign denotes addition as the operation being performed upon the data within cells B3 and B4. All formulas build upon this concept. Other ways of entering formulas are shown in Table 1.<br />
<br />
These back references to find data to perform a calculation can be found anywhere in the worksheet being worked on or upon any other worksheet in the workbook that is opened. If the data needed was on different worksheets they would be referenced by referring to the worksheet, for example <nowiki>=SUM(</nowiki>Sheet2.B12+Sheet3.A11).<br />
<br />
''Table 1: Common ways to enter formulas.''<br />
<br />
{| class="prettytable"<br />
! Formula<br />
! Description<br />
<br />
|-<br />
| <nowiki>=A1+10</nowiki><br />
| Displays the contents of cell A1 plus 10.<br />
<br />
|-<br />
| <nowiki>=A1*16%</nowiki><br />
| Displays 16% of the contents of A1.<br />
<br />
|-<br />
| <nowiki>=A1 * A2</nowiki><br />
| Displays the result of the multiplication of A1 and A2.<br />
<br />
|-<br />
| <nowiki>=ROUND(A1;1)</nowiki><br />
| Displays the contents of cell A1 rounded to one decimal place.<br />
<br />
|-<br />
| <nowiki>=EFFECTIVE(5%;12)</nowiki><br />
| Calculates the effective interest for 5% annual nominal interest with 12 payments a year.<br />
<br />
|-<br />
| <nowiki>=B8-SUM(B10:B14)</nowiki><br />
| Calculates B8 minus the sum of the cells B10 to B14.<br />
<br />
|-<br />
| <nowiki>=SUM(B8;SUM(B10:B14))</nowiki><br />
| Calculates the sum of cells B10 to B14 and adds the value to B8.<br />
<br />
|-<br />
| <nowiki>=SUM(B1:B65536)</nowiki><br />
| Sums all numbers in column B.<br />
<br />
|-<br />
| <nowiki>=AVERAGE(BloodSugar)</nowiki><br />
| Displays the average of a named range defined under the name BloodSugar.<br />
<br />
|-<br />
| <nowiki>=IF(C31>140; "HIGH"; "OK")</nowiki><br />
| Displays the results of a conditional analysis of data from two sources. If C31 = 144, then HIGH is displayed, otherwise OK is displayed.<br />
<br />
|}<br />
<br />
{{Documentation/Note| Users of Lotus 1-2-3®, Quattro Pro® and other spreadsheet software may be familiar with formulas that begin with <nowiki>+, -, =, (, @, ., $,</nowiki> or </nowiki>#<nowiki>. A mathematical formula would look like +D2+C2 or +2*3. Functions begin with the <nowiki>@</nowiki> symbol such as <nowiki>@SUM(D2..D7)</nowiki>, <nowiki>@COS(@DEGTORAD(30))</nowiki> and <nowiki>@IRR(GUESS;CASHFLOWS)</nowiki>. Ranges are identified such as <nowiki>A1..D3</nowiki>.}}<br />
<br />
Functions can be identified in Table 1 with a word, for example ROUND, followed by parentheses enclosing references or numbers.<br />
<br />
It is also possible to establish ranges for inclusion by naming them using '''Insert > Names''', for example BloodSugar representing a range such as B3:B10. Logical functions can also be performed as represented by the IF statement which results in a conditional response based upon the data in the identified cell.<br />
<br />
== Operator types ==<br />
You can use the following operators in OpenOffice.org Calc: arithmetic, comparative, descriptive, text, and reference.<br />
<br />
=== Arithmetic operators ===<br />
The addition, subtraction, multiplication and division operators return numerical results. The Negation and Percent operators identify a characteristic of the number found in the cell, for example -37. The example for Exponentiation illustrates how to enter a number that is being multiplied by itself a certain number of times, for example 2<sup>3 </sup><nowiki>= 2*2*2.</nowiki><br />
<br />
''Table 2: Arithmetical operators''<br />
<br />
{| class="prettytable"<br />
| '''''Operator'''''<br />
| '''''Name'''''<br />
| '''''Example'''''<br />
<br />
|-<br />
| + (Plus)<br />
| Addition<br />
| <nowiki>=1+1</nowiki><br />
<br />
|-<br />
| - (Minus)<br />
| Subtraction<br />
| <nowiki>=2-1</nowiki><br />
<br />
|-<br />
| - (Minus)<br />
| Negation<br />
| -5<br />
<br />
|-<br />
| <nowiki>* (asterisk)</nowiki><br />
| Multiplication<br />
| <nowiki>=2*2</nowiki><br />
<br />
|-<br />
| / (Slash)<br />
| Division<br />
| <nowiki>=10/5</nowiki><br />
<br />
|-<br />
| % (Percent)<br />
| Percent<br />
| 15%<br />
<br />
|-<br />
| ^ (Caret)<br />
| Exponentiation<br />
| 2^3<br />
<br />
|}<br />
<br />
=== Comparative operators ===<br />
Comparative operators are found in formulas that use the IF function and return either a true or false answer; for example, <nowiki>=IF(B6>G12; 127; 0)</nowiki> which, loosely translated, means if the contents of cell B6 are greater than the contents of cell G12, then return the number 127, otherwise return the number 0.<br />
<br />
A direct answer of TRUE or FALSE can be obtained by entering a formula such as =B6>B12. If the numbers found in the referenced cells are accurately represented, the answer TRUE is returned, otherwise FALSE is returned.<br />
<br />
''Table 3: Comparative operators''<br />
<br />
{| class="prettytable"<br />
| '''''Operator'''''<br />
| '''''Name'''''<br />
| '''''Example'''''<br />
<br />
|-<br />
| <nowiki>= (equal sign)</nowiki><br />
| Equal<br />
| A1=B1<br />
<br />
|-<br />
| > (Greater than)<br />
| Greater than<br />
| A1>B1<br />
<br />
|-<br />
| <nowiki>< (Less than)</nowiki><br />
| Less than<br />
| <nowiki>A1<B1</nowiki><br />
<br />
|-<br />
| >= (Greater than or equal to)<br />
| Greater than or equal to<br />
| A1>=B1<br />
<br />
|-<br />
| <nowiki><= (Less than or equal to)</nowiki><br />
| Less than or equal to<br />
| <nowiki>A1<=B1</nowiki><br />
<br />
|-<br />
| <nowiki><> (Inequality)</nowiki><br />
| Inequality<br />
| <nowiki>A1<>B1</nowiki><br />
<br />
|}<br />
<br />
=== Descriptive operators ===<br />
Currency symbols are perhaps the most commonly used descriptive operators found in Calc. Calc handles as currency an amount like $0.97 or £0.97 entered into a cell formatted as general or currency. However, it does not handle other currency types entered in this fashion. For other currencies, it is best to format the cells as the specific currency type, such as Yen (¥). To do this, right-click on the affected cells and select Formatting Cells. On the tab Numbers tab, select Currency. In the Format list, select the appropriate currency type. <br />
<br />
When entering amounts, it is not necessary to enter a currency symbol. Some currency symbols such as the Yen may not display.<br />
<br />
[[Image:CG3Ch3F6.png|thumb|none|500px|''Currency symbols.'']]<br />
<br />
{{Documentation/Caution| Users experienced in the use of an adding machine may experience difficulty with data entry, with resulting loss of data or incorrect results displaying. Adding machine users typically enter numbers from left to right without entering a decimal point. For example, the entry of 97 will display as 0.97. In cells formatted as currency, the entry of 97 will display currency for the locale selected such as $97 or £97, not $0.97 or £0.97.}}<br />
<br />
=== Text operators ===<br />
It is common for users to place text in spreadsheets. To provide for variability in what and how this type of data is displayed, text can be joined together in pieces coming from different places on the spreadsheet. Below is an example.<br />
<br />
[[Image:CG3Ch3F7a.png]]<br />
<br />
[[Image:CG3Ch3F7b.png]]<br />
<br />
''Text Concatenation.''<br />
<br />
In this example, specific pieces of the text were found in three different cells. To join these segments together, the formula also adds required spaces and punctuation housed within quotation marks resulting in a formula of <nowiki>=B6 & " " & C6 & ", " D6</nowiki>. The result is the concatenation into a correctly formatted date for this locale.<br />
<br />
Taking this example further, the result cell is defined as a name, then text concatenation is performed using this defined name.<br />
<br />
[[Image:CG3Ch3F8.png|thumb|none|500px|''Defining a name for a range of cells.'']]<br />
<br />
[[Image:CG3Ch3F9.png|thumb|none|500px|''Naming a cell or range of cells for inclusion in a formula.'']]<br />
<br />
[[Image:CG3Ch3F10a.png]]<br />
<br />
[[Image:CG3Ch3F10b.png]]<br />
<br />
[[Image:CG3Ch3F10c.png]]<br />
<br />
''Defining Names on a worksheet.''<br />
<br />
=== Reference operators ===<br />
Reference operators merge the values held in each individual cell within the range. Reference operators can be an individual cell identified by the column identifier located along the upper edge of the spreadsheet and a numeric identifier found along the side of the spreadsheet. On spreadsheets read from left to right, the upper left cell is A1. The figure below shows these identifiers for Cell A1.<br />
<br />
[[Image:CG3Ch3F11.png|thumb|none|500px|''The Cell Reference Operator.'']]<br />
<br />
A range is also a reference operator referenced in formulas, functions and logical operators. The range for left to right operations refers to the upper left cell running to the right and downward to the right bottommost cell as shown below.<br />
<br />
[[Image:CG3Ch3F12.png|thumb|none|500px|''Reference Operator for a range.'']]<br />
<br />
In the upper left corner of the figure above, the range A1:D12 is shown, corresponding to the cells included in the drag operation with the mouse to highlight the range. This same range could also be created by entering in the Name Box directly as shown below. After pressing ''Enter'', the same range is selected.<br />
<br />
[[Image:CG3Ch3F13.png|thumb|none|500px|''Direct entry of Reference Operator into Name Box.'']]<br />
<br />
A reference operator can also be created by defining a named area by selecting the menu item '''Insert > Names > Define''', pressing ''Ctrl+F3'', or clicking the icon, if it shows on your toolbar.<br />
<br />
Another reference operator involves the use of the '!' sign. If data appears in range A1:B6 as well as range B5:C12, using a formula such as SUM(A1:B6!B5:C12) will yield the sum of cells B5 and B6.<br />
<br />
== Order of calculation ==<br />
''Order of calculation'' refers to the sequence that numerical operations are performed. Division and multiplication are performed before addition or subtraction. There is a common tendency to expect calculations to be made from left to right as the equation would be read in English. Calc evaluations the entire formula, then based upon programming precedence breaks the formula down executing multiplication and division operations before other operations. Due to this fact when creating formulas you should test your formula to make sure that the correct result is being obtained. An example of order of calculation in operation follows.<br />
<br />
''Table 4 – Order of Calculation''<br />
<br />
{| class="prettytable"<br />
| '''''Left To Right Calculation'''''<br />
| '''''Ordered Calculation'''''<br />
<br />
|-<br />
| 1+3*2+3 = 11<br />
| <nowiki>=1+3*2+3 result 10</nowiki><br />
<br />
|-<br />
| 1+3=4, then 4 X 2 = 8, then 8 + 3 = 11<br />
| 3*2=6, then 1 + 6 + 3 = 10<br />
<br />
|-<br />
| Another possible intention could be:<br />
| The program resolves the multiplication of 3 X 2 before dealing with the numbers being added.<br />
<br />
|-<br />
| 1+3*2+3 = 20<br />
| <br />
<br />
|}<br />
<br />
If you intend for the result to be either of the two possible solutions on the left, the way to achieve these results would be to order the formula as:<br />
<br />
{| class="prettytable"<br />
| ((1+3) * 2)+3 = 11<br />
| (1+3) * (2+3) = 20<br />
<br />
|}<br />
<br />
{{Documentation/Note| Consider using parentheses grouping operations to avoid obtaining incorrect calculations, e.g. <nowiki>= B4+G12*C4/M12</nowiki> becoming <nowiki>=((B4+G12)*C4)/M12</nowiki>.}}<br />
<br />
== Calculations linking sheets ==<br />
Another powerful feature of Calc is the ability to link data through several worksheets. The naming of worksheets can be helpful to identify where specific data may be found. A name such a Payroll or Boise Sales is much more meaningful than Sheet1. The function named SHEET() returns the sheet number in the collection of spreadsheets. With this function, if you are currently on the third sheet counting from the left along the worksheet tabs, the number 3 is returned. If you drag the worksheets around to different locations among the tabs, the number will return the number referring to the current position of this worksheet.<br />
<br />
{{Documentation/Caution| Users may experience a problem when creating a formula that references other worksheets. If you use the function <nowiki>SHEET()</nowiki> the number of the current worksheet appears even if you enter the name of the worksheet desired, e.g., <nowiki>=SHEET(Branch4)</nowiki> and you have as the top worksheet named CombinedOperations. This function only refers to the current or top worksheet and not to other worksheets found in the collection or file.}}<br />
<br />
An example of calculations obtaining data from other work can be seen in a business setting where a business combines its branch operations into a single worksheet.<br />
<br />
{| class="prettytable"<br />
| [[Image:CG3Ch3F14a.png]]<br />
| Sheet containing data for Branch 1.<br />
<br />
|-<br />
| [[Image:CG3Ch3F14b.png]]<br />
| Sheet containing data for Branch 2.<br />
<br />
|-<br />
| [[Image:CG3Ch3F14c.png]]<br />
| Sheet containing data for Branch 3.<br />
<br />
|-<br />
| [[Image:CG3Ch3F14d.png]]<br />
| Sheet containing combined data for all branches.<br />
<br />
|}<br />
''Combining data from several sheets into a single sheet.''<br />
<br />
To accomplish the links, it can be easier if the Function Wizard is used.<br />
<br />
# Open the Function Wizard by clicking the f(x) button on the toolbar, or by selecting '''Insert > Function''', or by pressing ''Ctrl+F2''. <br />
# Select a category of functions to shorten the list, then scroll down through the named functions and select the required one. When you select a function, its description appears on the right-hand side of the dialog. Double-click on the required function.<br />
# The wizard now displays an area to the right where you can enter data manually in text boxes or click the '''Shrink''' button [[Image:]] to shrink the wizard so you can select the cells from the worksheet.<br />
# To select cells, either click directly upon the needed cell or hold down the left mouse button and drag to select the needed area.<br />
# When the area has been selected, click the '''Shrink''' button again to return to the wizard. <br />
# If multiple ranges are needed, then select the next text box below the first and perform the same task for the next range. The wizard will accept in the Sum function up to 30 such ranges.<br />
<br />
The following figures show how to create the combined sheet shown in the example above.<br />
<br />
[[Image:CG3Ch3F15.png|thumb|none|500px|''Selecting the SUM function in the Function Wizard.'']]<br />
<br />
[[Image:CG3Ch3F16.png|thumb|none|500px|''Further steps in selecting cells containing data.'']]<br />
<br />
[[Image:CG3Ch3F17.png|thumb|none|500px|''Completed entries in Function Wizard.'']]<br />
<br />
== Strategies for creating formulas ==<br />
There are several broad approaches when making a decision to create a formula. In deciding on an approach, consider how many other people will need to use the worksheets, the life of the worksheets, and the variations that could be encountered from use.<br />
<br />
=== Enter a unique formula in each cell ===<br />
The first and most basic strategy is to view whatever formulas are needed as simple and with a limited use life. The strategy is then to place a unique formula in each appropriate cell.<br />
<br />
=== Break formulas into parts and combine the parts ===<br />
The second strategy is similar, but instead you break down longer formulas into smaller parts and then combine the parts into the whole.<br />
<br />
Editor's note: This needs some explanation, but it is NOT about the "formula editor" (Math).<br />
<br />
=== Use the Basic editor to create functions ===<br />
A third strategy is to use the Basic editor and create your own functions. This approach would be used where the result would greatly simplify the use of the spreadsheet by the end user and keep the formulas simple with a better chance of avoiding errors. This approach also can make the maintenance easier by having corrections or updates kept in one central location. The use of macros is described in Chapter 12 of this book.<br />
<br />
<br />
{{CCBY}}<br />
[[Category: Calc Guide (Documentation)]]</div>Kirkhttps://wiki.openoffice.org/wiki/Documentation/OOo3_User_Guides/Calc_Guide/Using_functionsDocumentation/OOo3 User Guides/Calc Guide/Using functions2009-09-14T21:11:06Z<p>Kirk: /* Advanced structure */</p>
<hr />
<div>{{DISPLAYTITLE:Understanding functions}}<br />
{{Documentation/CG3Ch3TOC<br />
|ShowPrevNext=block<br />
|PrevPage=Documentation/OOo3_User_Guides/Calc Guide/Creating formulas<br />
|NextPage=Documentation/OOo3_User_Guides/Calc Guide/Finding and fixing errors<br />
}}<br />
Calc includes over 350 functions to help you analyze and reference data. Many of these functions are for use with numbers, but many others are used with dates and times, or even text. A function may be as simple as adding two numbers together, or finding the average of a list of numbers. Alternatively, it may be as complex as calculating the standard deviation of a sample, or a hyperbolic tangent of a number. See a list of all functions in '''[[Documentation/How_Tos/Calc: Functions listed by category|functions listed by category]]'''.<br />
<br />
Typically, the name of a function is an abbreviated description of what the function does. For instance, the FV function gives the future value of an investment, while BIN2HEX converts a binary number to a hexadecimal number. By tradition, functions are entered entirely in upper case letters, although Calc will read them correctly if they are in lower or mixed case, too.<br />
<br />
A few basic functions are somewhat similar to operators. Examples:<br />
:"+", this operator will add two numbers together for a result. SUM() on the other hand will add a contiguous '''''range''''' of numbers together.<br />
:"*", this operator will multiply to numbers together for a result. PRODUCT() does the same for multiplying, that SUM() does for adding.<br />
<br />
Each function has a number of ''arguments'' used in the calculations. These arguments may or may not have their own name. Your task is to enter the arguments needed to run the function. In some cases, the arguments have pre-defined choices, and you may need to refer to the online help or Appendix B (Description of Functions) in this book to understand them. More often, however, an argument is a value that you enter manually, or one already entered in a cell or range of cells on the spreadsheet. In Calc, you can enter values from other cells by typing in their name or range, or—unlike the case in some spreadsheets—by selecting cells with the mouse. Should the values in the cells change, the result of the function will be automatically updated.<br />
<br />
Strictly speaking, when all the arguments are entered and a function is ready to run, it becomes a ''formula''. These terms are sometimes used interchangeably, but the distinction is worth preserving, because a formula can use functions as an argument.<br />
<br />
For compatibility, functions and their arguments in Calc have almost identical names to their counterparts in Microsoft Excel. However, both Excel and Calc have functions that the other lacks. Occasionally, too, functions with the same names in Calc and Excel have different arguments, or slightly different names for the same argument—neither of which can be imported to the other. However, perhaps nine-tenths of functions can be imported between Calc and Excel without any problems.<br />
<br />
== Understanding the structure of functions ==<br />
All functions have a similar structure. If you use the right tool for entering a function, you can escape learning this structure, but it is still worth knowing for troubleshooting.<br />
<br />
To give a typical example, the structure of a function to find cells that match entered search criteria is:<br />
<br />
<nowiki>= DCOUNT (Database;Database field;Search_criteria)</nowiki><br />
<br />
By convention, only three kinds of data can be entered in a cell. Text, Numbers, and Formulas. To distinguish Formulas from Text, it is necessary to always start a formula with an "=" sign. Since a function cannot exist on its' own, it must always be part of a formula. Consequently, even if the function represents the entire formula, there must be an "=" sign at the start of the formula. Regardless of where in the formula a function is, the Function will start with the function's name, DCOUNT in the above. After the name of the function comes its arguments. All arguments are required, unless specifically listed as optional.<br />
<br />
Arguments are added within the brackets (parentheses) and separated by semicolons, with no space between the arguments and the semicolons. Many arguments are a number. A Calc function can take up to thirty numbers as an argument. That may not sound like much at first. However, when you realize that the number can be not only a number or a single cell, but also an array or range of cells that contain several or even hundreds of cells, then the apparent limitation vanishes.<br />
<br />
Depending on the nature of the function arguments may be entered as follow:<br />
<br />
:{|Border="1"<br />
|"text data"||The quotes establish that text or string data has been entered<br />
|-<br />
|9||In this case the number nine has been entered as a number<br />
|-<br />
|"9"||In this case the number nine is being entered as text<br />
|-<br />
|A1|| The address for whatever is in Cell A1 is being entered<br />
|}<br />
<br />
== Advanced structure ==<br />
As well as being used on its own, a function can be an argument in a larger formula. A formula, however, is limited by the fact that it can only do one function at a time. You need to make sure that functions are done in the right order if the formula is going to work.<br />
<br />
To help set the order for functions in a multiple-function formula, you use parentheses within parentheses. When the formula is run, Calc does the innermost function first, then works outwards. For example, in the simple calculation <nowiki>=2+(5*7)</nowiki>, Calc multiples 5 by 7 first. Only then is 2 added to the result to get 37.<br />
<br />
The placement of functions within sets of parentheses is called ''nesting''. Basically, nesting reduces a function that could run on its own to an argument in the formula. For example, in =2+(5*7), the formula (5*7) is nested within the larger formula of =2+(5*7). In other words, the nested function becomes an argument of another function.<br />
<br />
This relation is more obvious when doing a calculation using a function with a name. For all purposes,<br />
<br />
<nowiki>=SUM(2;PRODUCT(5;7))</nowiki><br />
<br />
is the same formula as <nowiki>=2+(5*7)</nowiki>. However, when SUM and PRODUCT are used, then the relation is clearer. The fact that the PRODUCT function comes after a semicolon and in a set of parentheses for the SUM function makes it clear that PRODUCT is an argument for SUM. In addition, the fact that the inner pair of parentheses is around (5;7) makes clear that this operation is done before the one defined by the outer pair of parentheses.<br />
<br />
To get an idea of what nested functions can do, imagine that you are designing a self-directed learning module. During the module, students do three quizzes, and enter the results in cells A1, A2, and A3. In A4, you can create a nested formula that begins by averaging the results of the quizzes with the formula <nowiki>=AVERAGE(A1:A3)</nowiki>. The formula then uses the IF function to give the student feedback that depends upon the average grade on the quizzes. The entire formula would read:<br />
<br />
<nowiki>=IF(AVERAGE(A1:A3) >85; "Congratulations! You are ready to advance to the next module";<br />
"Failed. Please review the material again. If necessary, contact your instructor for help")</nowiki><br />
<br />
Depending on the average, the student would receive the message for either congratulations or failure.<br />
<br />
Notice that the nested formula for the average does not require its own equal sign. The one at the start of the equation is enough for both formulas.<br />
<br />
If you are new to spreadsheets, the best way to think of functions is as a scripting language. We've used simple examples to explain more clearly, but, through nesting of functions, a Calc formula can quickly become complex.<br />
<br />
<br />
{{CCBY}}<br />
[[Category: Calc Guide (Documentation)]]<br />
<br />
'''New in 3.1'''<br /><br />
Calc now keeps the syntax of a formula displayed in a tooltip next to the cell as a handy memory aid as you type.<br />
<br />
A more reliable method is to use the ''Function List''. Available from the '''Insert''' menu, the Function List automatically docks as a pane on the right side of the Calc editing window. If you wish, you can ''Control+double-click'' on a blank space at the top of the pane to undock this pane and make it a floating window.<br />
<br />
The Function List includes a brief description of each function and its arguments; highlight the function and look at the bottom of the pane to see the description. If necessary, hover the cursor over the division between the list and the description; when the cursor becomes a two-headed arrow, drag it upwards to increase the space for the description. Double-click on a function’s name to add it to the current cell, together with placeholders for each of the function’s arguments.<br />
<br />
Using the Function List is almost as fast as manual entry, and has the advantage of not requiring that you memorize a formula that you want to use. In theory, it should also be less error-prone. In practice, though, some users may fumble when replacing the placeholders with values. Another handy feature is the ability to display the last formulas used.<br />
<br />
[[Image:CG3Ch3F1.png|thumb|none|500px|''Function List docked to right side of Calc window.'']]<br />
<br />
The most commonly used input method is the ''Function Wizard''. To open the Function Wizard, select '''Insert > Function''', or click its button on the Function tool bar, or press ''Ctrl+F2''. Once open, the Function Wizard provides the same help features as the Function List, but adds fields in which you can see the result of a completed function, as well as the result of any larger formula of which it is part.<br />
<br />
[[Image:CG3Ch3F2.png|thumb|none|500px|''Functions page of Function Wizard.'']]<br />
<br />
You can also select the ''Structure'' tab to see a tree view of the parts of the formula. The main advantage over the Function List is that each argument is entered in its own field, making it easier to manage. The price of this reliability is slower input, but this is often a small price to pay, since precision is generally more important than speed when creating a spreadsheet.<br />
<br />
[[Image:CG3Ch3F3.png|thumb|none|500px|''Structure page of Function Wizard.'']]<br />
<br />
Another advantage of the Function Wizard is that you can reduce the window as you are adding each argument. At the end of each input field for an argument is the Shrink button [[Image:CalcShrinkIcon.png]]. The Shrink button temporarily removes all parts of the wizard except the current input field so that you can see the spreadsheet beneath. When you are finished entering the argument’s value, click the button again to return to the entire Function Wizard.<br />
<br />
[[Image:CG3Ch3F4.png|thumb|none|500px|''Function Wizard after shrinking.'']]<br />
<br />
Finally, as with many other features in OpenOffice.org, you can create a macro for any favorite function formula, and assign it to a tool bar, menu, or keystroke combination.<br />
<br />
No matter how you enter a formula, take a moment to check its structure before using it. If it looks right, press the ''Enter'' key or select the '''Accept''' button from the Function toolbar to add it to the cell and get its result (the Accept button is the green check mark beside the Input line).<br />
<br />
If you see the formula in the cell instead of the result, then Formulas are selected for display in '''Tools > Options > OpenOffice.org Calc > View > Display'''. Unselect the checkbox beside it, and the result will display. However, you can still see the formula in the formula bar field.</div>Kirkhttps://wiki.openoffice.org/wiki/Documentation/OOo3_User_Guides/Calc_Guide/Creating_formulasDocumentation/OOo3 User Guides/Calc Guide/Creating formulas2009-09-14T21:10:35Z<p>Kirk: /* Introduction */</p>
<hr />
<div>{{DISPLAYTITLE:Creating formulas}}<br />
{{Documentation/CG3Ch3TOC<br />
|ShowPrevNext=block<br />
|PrevPage=Documentation/OOo3_User_Guides/Calc Guide/Formulas and Functions<br />
|NextPage=Documentation/OOo3_User_Guides/Calc Guide/Using functions<br />
}}<br />
==Introduction==<br />
You can enter formulas in two ways, either in the cell itself, or at the input line. Either way you will need to start it with one of the following symbols: "=", "+" or "-". Starting with anything else will cause the formula to be treated as if it were text.<br />
<br />
== Operators in formulas ==<br />
Each cell on the worksheet can be used as a data holder or a place for data calculations. Inserting data is accomplished simply by typing the data in the cell and moving to the next cell or pressing Enter. With formulas the equal sign denotes that instead of the cell being a data holder, the cell will be used for a calculation. A mathematical calculation like 15 + 46 can be accomplished as shown below.<br />
<br />
{{Documentation/Note| To enter the <nowiki>=</nowiki> symbol for a purpose other than creating a formula as described in this chapter, type an apostrophe or single quotation mark before the data; for example, <nowiki>'=</nowiki> means different things to different people. Calc treats everything after the single quotation symbol as text.}}<br />
<br />
{| class="prettytable"<br />
| '''''Simple Calculation in 1 Cell'''''<br />
| '''''Calculation by Reference'''''<br />
<br />
|-<br />
| [[Image:CG3Ch3F5a.png]]<br />
| [[Image:CG3Ch3F5b.png]]<br />
<br />
|-<br />
| [[Image:CG3Ch3F5c.png]]<br />
| [[Image:CG3Ch3F5d.png]]<br />
<br />
|-<br />
| <br />
| [[Image:CG3Ch3F5e.png]]<br />
<br />
|}<br />
''A simple calculation.''<br />
<br />
While the calculation on the left was accomplished in only one cell, the real power is shown on the right where the data is placed in cells and the calculation is performed using references back to the cells. In this case, cells B3 and B4 were the data holders with B5 the cell where the calculation was performed. Notice that the formula was shown as =B3 + B4. The plus sign denotes addition as the operation being performed upon the data within cells B3 and B4. All formulas build upon this concept. Other ways of entering formulas are shown in Table 1.<br />
<br />
These back references to find data to perform a calculation can be found anywhere in the worksheet being worked on or upon any other worksheet in the workbook that is opened. If the data needed was on different worksheets they would be referenced by referring to the worksheet, for example <nowiki>=SUM(</nowiki>Sheet2.B12+Sheet3.A11).<br />
<br />
''Table 1: Common ways to enter formulas.''<br />
<br />
{| class="prettytable"<br />
! Formula<br />
! Description<br />
<br />
|-<br />
| <nowiki>=A1+10</nowiki><br />
| Displays the contents of cell A1 plus 10.<br />
<br />
|-<br />
| <nowiki>=A1*16%</nowiki><br />
| Displays 16% of the contents of A1.<br />
<br />
|-<br />
| <nowiki>=A1 * A2</nowiki><br />
| Displays the result of the multiplication of A1 and A2.<br />
<br />
|-<br />
| <nowiki>=ROUND(A1;1)</nowiki><br />
| Displays the contents of cell A1 rounded to one decimal place.<br />
<br />
|-<br />
| <nowiki>=EFFECTIVE(5%;12)</nowiki><br />
| Calculates the effective interest for 5% annual nominal interest with 12 payments a year.<br />
<br />
|-<br />
| <nowiki>=B8-SUM(B10:B14)</nowiki><br />
| Calculates B8 minus the sum of the cells B10 to B14.<br />
<br />
|-<br />
| <nowiki>=SUM(B8;SUM(B10:B14))</nowiki><br />
| Calculates the sum of cells B10 to B14 and adds the value to B8.<br />
<br />
|-<br />
| <nowiki>=SUM(B1:B65536)</nowiki><br />
| Sums all numbers in column B.<br />
<br />
|-<br />
| <nowiki>=AVERAGE(BloodSugar)</nowiki><br />
| Displays the average of a named range defined under the name BloodSugar.<br />
<br />
|-<br />
| <nowiki>=IF(C31>140; "HIGH"; "OK")</nowiki><br />
| Displays the results of a conditional analysis of data from two sources. If C31 = 144, then HIGH is displayed, otherwise OK is displayed.<br />
<br />
|}<br />
<br />
{{Documentation/Note| Users of Lotus 1-2-3®, Quattro Pro® and other spreadsheet software may be familiar with formulas that begin with <nowiki>+, -, =, (, @, ., $,</nowiki> or </nowiki>#<nowiki>. A mathematical formula would look like +D2+C2 or +2*3. Functions begin with the <nowiki>@</nowiki> symbol such as <nowiki>@SUM(D2..D7)</nowiki>, <nowiki>@COS(@DEGTORAD(30))</nowiki> and <nowiki>@IRR(GUESS;CASHFLOWS)</nowiki>. Ranges are identified such as <nowiki>A1..D3</nowiki>.}}<br />
<br />
Functions can be identified in Table 1 with a word, for example ROUND, followed by parentheses enclosing references or numbers.<br />
<br />
It is also possible to establish ranges for inclusion by naming them using '''Insert > Names''', for example BloodSugar representing a range such as B3:B10. Logical functions can also be performed as represented by the IF statement which results in a conditional response based upon the data in the identified cell.<br />
<br />
== Operator types ==<br />
You can use the following operators in OpenOffice.org Calc: arithmetic, comparative, descriptive, text, and reference.<br />
<br />
=== Arithmetic operators ===<br />
The addition, subtraction, multiplication and division operators return numerical results. The Negation and Percent operators identify a characteristic of the number found in the cell, for example -37. The example for Exponentiation illustrates how to enter a number that is being multiplied by itself a certain number of times, for example 2<sup>3 </sup><nowiki>= 2*2*2.</nowiki><br />
<br />
''Table 2: Arithmetical operators''<br />
<br />
{| class="prettytable"<br />
| '''''Operator'''''<br />
| '''''Name'''''<br />
| '''''Example'''''<br />
<br />
|-<br />
| + (Plus)<br />
| Addition<br />
| <nowiki>=1+1</nowiki><br />
<br />
|-<br />
| - (Minus)<br />
| Subtraction<br />
| <nowiki>=2-1</nowiki><br />
<br />
|-<br />
| - (Minus)<br />
| Negation<br />
| -5<br />
<br />
|-<br />
| <nowiki>* (asterisk)</nowiki><br />
| Multiplication<br />
| <nowiki>=2*2</nowiki><br />
<br />
|-<br />
| / (Slash)<br />
| Division<br />
| <nowiki>=10/5</nowiki><br />
<br />
|-<br />
| % (Percent)<br />
| Percent<br />
| 15%<br />
<br />
|-<br />
| ^ (Caret)<br />
| Exponentiation<br />
| 2^3<br />
<br />
|}<br />
<br />
=== Comparative operators ===<br />
Comparative operators are found in formulas that use the IF function and return either a true or false answer; for example, <nowiki>=IF(B6>G12; 127; 0)</nowiki> which, loosely translated, means if the contents of cell B6 are greater than the contents of cell G12, then return the number 127, otherwise return the number 0.<br />
<br />
A direct answer of TRUE or FALSE can be obtained by entering a formula such as =B6>B12. If the numbers found in the referenced cells are accurately represented, the answer TRUE is returned, otherwise FALSE is returned.<br />
<br />
''Table 3: Comparative operators''<br />
<br />
{| class="prettytable"<br />
| '''''Operator'''''<br />
| '''''Name'''''<br />
| '''''Example'''''<br />
<br />
|-<br />
| <nowiki>= (equal sign)</nowiki><br />
| Equal<br />
| A1=B1<br />
<br />
|-<br />
| > (Greater than)<br />
| Greater than<br />
| A1>B1<br />
<br />
|-<br />
| <nowiki>< (Less than)</nowiki><br />
| Less than<br />
| <nowiki>A1<B1</nowiki><br />
<br />
|-<br />
| >= (Greater than or equal to)<br />
| Greater than or equal to<br />
| A1>=B1<br />
<br />
|-<br />
| <nowiki><= (Less than or equal to)</nowiki><br />
| Less than or equal to<br />
| <nowiki>A1<=B1</nowiki><br />
<br />
|-<br />
| <nowiki><> (Inequality)</nowiki><br />
| Inequality<br />
| <nowiki>A1<>B1</nowiki><br />
<br />
|}<br />
<br />
=== Descriptive operators ===<br />
Currency symbols are perhaps the most commonly used descriptive operators found in Calc. Calc handles as currency an amount like $0.97 or £0.97 entered into a cell formatted as general or currency. However, it does not handle other currency types entered in this fashion. For other currencies, it is best to format the cells as the specific currency type, such as Yen (¥). To do this, right-click on the affected cells and select Formatting Cells. On the tab Numbers tab, select Currency. In the Format list, select the appropriate currency type. <br />
<br />
When entering amounts, it is not necessary to enter a currency symbol. Some currency symbols such as the Yen may not display.<br />
<br />
[[Image:CG3Ch3F6.png|thumb|none|500px|''Currency symbols.'']]<br />
<br />
{{Documentation/Caution| Users experienced in the use of an adding machine may experience difficulty with data entry, with resulting loss of data or incorrect results displaying. Adding machine users typically enter numbers from left to right without entering a decimal point. For example, the entry of 97 will display as 0.97. In cells formatted as currency, the entry of 97 will display currency for the locale selected such as $97 or £97, not $0.97 or £0.97.}}<br />
<br />
=== Text operators ===<br />
It is common for users to place text in spreadsheets. To provide for variability in what and how this type of data is displayed, text can be joined together in pieces coming from different places on the spreadsheet. Below is an example.<br />
<br />
[[Image:CG3Ch3F7a.png]]<br />
<br />
[[Image:CG3Ch3F7b.png]]<br />
<br />
''Text Concatenation.''<br />
<br />
In this example, specific pieces of the text were found in three different cells. To join these segments together, the formula also adds required spaces and punctuation housed within quotation marks resulting in a formula of <nowiki>=B6 & " " & C6 & ", " D6</nowiki>. The result is the concatenation into a correctly formatted date for this locale.<br />
<br />
Taking this example further, the result cell is defined as a name, then text concatenation is performed using this defined name.<br />
<br />
[[Image:CG3Ch3F8.png|thumb|none|500px|''Defining a name for a range of cells.'']]<br />
<br />
[[Image:CG3Ch3F9.png|thumb|none|500px|''Naming a cell or range of cells for inclusion in a formula.'']]<br />
<br />
[[Image:CG3Ch3F10a.png]]<br />
<br />
[[Image:CG3Ch3F10b.png]]<br />
<br />
[[Image:CG3Ch3F10c.png]]<br />
<br />
''Defining Names on a worksheet.''<br />
<br />
=== Reference operators ===<br />
Reference operators merge the values held in each individual cell within the range. Reference operators can be an individual cell identified by the column identifier located along the upper edge of the spreadsheet and a numeric identifier found along the side of the spreadsheet. On spreadsheets read from left to right, the upper left cell is A1. The figure below shows these identifiers for Cell A1.<br />
<br />
[[Image:CG3Ch3F11.png|thumb|none|500px|''The Cell Reference Operator.'']]<br />
<br />
A range is also a reference operator referenced in formulas, functions and logical operators. The range for left to right operations refers to the upper left cell running to the right and downward to the right bottommost cell as shown below.<br />
<br />
[[Image:CG3Ch3F12.png|thumb|none|500px|''Reference Operator for a range.'']]<br />
<br />
In the upper left corner of the figure above, the range A1:D12 is shown, corresponding to the cells included in the drag operation with the mouse to highlight the range. This same range could also be created by entering in the Name Box directly as shown below. After pressing ''Enter'', the same range is selected.<br />
<br />
[[Image:CG3Ch3F13.png|thumb|none|500px|''Direct entry of Reference Operator into Name Box.'']]<br />
<br />
A reference operator can also be created by defining a named area by selecting the menu item '''Insert > Names > Define''', pressing ''Ctrl+F3'', or clicking the icon, if it shows on your toolbar.<br />
<br />
Another reference operator involves the use of the '!' sign. If data appears in range A1:B6 as well as range B5:C12, using a formula such as SUM(A1:B6!B5:C12) will yield the sum of cells B5 and B6.<br />
<br />
== Order of calculation ==<br />
''Order of calculation'' refers to the sequence that numerical operations are performed. Division and multiplication are performed before addition or subtraction. There is a common tendency to expect calculations to be made from left to right as the equation would be read in English. Calc evaluations the entire formula, then based upon programming precedence breaks the formula down executing multiplication and division operations before other operations. Due to this fact when creating formulas you should test your formula to make sure that the correct result is being obtained. An example of order of calculation in operation follows.<br />
<br />
''Table 4 – Order of Calculation''<br />
<br />
{| class="prettytable"<br />
| '''''Left To Right Calculation'''''<br />
| '''''Ordered Calculation'''''<br />
<br />
|-<br />
| 1+3*2+3 = 11<br />
| <nowiki>=1+3*2+3 result 10</nowiki><br />
<br />
|-<br />
| 1+3=4, then 4 X 2 = 8, then 8 + 3 = 11<br />
| 3*2=6, then 1 + 6 + 3 = 10<br />
<br />
|-<br />
| Another possible intention could be:<br />
| The program resolves the multiplication of 3 X 2 before dealing with the numbers being added.<br />
<br />
|-<br />
| 1+3*2+3 = 20<br />
| <br />
<br />
|}<br />
<br />
If you intend for the result to be either of the two possible solutions on the left, the way to achieve these results would be to order the formula as:<br />
<br />
{| class="prettytable"<br />
| ((1+3) * 2)+3 = 11<br />
| (1+3) * (2+3) = 20<br />
<br />
|}<br />
<br />
{{Documentation/Note| Consider using parentheses grouping operations to avoid obtaining incorrect calculations, e.g. <nowiki>= B4+G12*C4/M12</nowiki> becoming <nowiki>=((B4+G12)*C4)/M12</nowiki>.}}<br />
<br />
== Calculations linking sheets ==<br />
Another powerful feature of Calc is the ability to link data through several worksheets. The naming of worksheets can be helpful to identify where specific data may be found. A name such a Payroll or Boise Sales is much more meaningful than Sheet1. The function named SHEET() returns the sheet number in the collection of spreadsheets. With this function, if you are currently on the third sheet counting from the left along the worksheet tabs, the number 3 is returned. If you drag the worksheets around to different locations among the tabs, the number will return the number referring to the current position of this worksheet.<br />
<br />
{{Documentation/Caution| Users may experience a problem when creating a formula that references other worksheets. If you use the function <nowiki>SHEET()</nowiki> the number of the current worksheet appears even if you enter the name of the worksheet desired, e.g., <nowiki>=SHEET(Branch4)</nowiki> and you have as the top worksheet named CombinedOperations. This function only refers to the current or top worksheet and not to other worksheets found in the collection or file.}}<br />
<br />
An example of calculations obtaining data from other work can be seen in a business setting where a business combines its branch operations into a single worksheet.<br />
<br />
{| class="prettytable"<br />
| [[Image:CG3Ch3F14a.png]]<br />
| Sheet containing data for Branch 1.<br />
<br />
|-<br />
| [[Image:CG3Ch3F14b.png]]<br />
| Sheet containing data for Branch 2.<br />
<br />
|-<br />
| [[Image:CG3Ch3F14c.png]]<br />
| Sheet containing data for Branch 3.<br />
<br />
|-<br />
| [[Image:CG3Ch3F14d.png]]<br />
| Sheet containing combined data for all branches.<br />
<br />
|}<br />
''Combining data from several sheets into a single sheet.''<br />
<br />
To accomplish the links, it can be easier if the Function Wizard is used.<br />
<br />
# Open the Function Wizard by clicking the f(x) button on the toolbar, or by selecting '''Insert > Function''', or by pressing ''Ctrl+F2''. <br />
# Select a category of functions to shorten the list, then scroll down through the named functions and select the required one. When you select a function, its description appears on the right-hand side of the dialog. Double-click on the required function.<br />
# The wizard now displays an area to the right where you can enter data manually in text boxes or click the '''Shrink''' button [[Image:]] to shrink the wizard so you can select the cells from the worksheet.<br />
# To select cells, either click directly upon the needed cell or hold down the left mouse button and drag to select the needed area.<br />
# When the area has been selected, click the '''Shrink''' button again to return to the wizard. <br />
# If multiple ranges are needed, then select the next text box below the first and perform the same task for the next range. The wizard will accept in the Sum function up to 30 such ranges.<br />
<br />
The following figures show how to create the combined sheet shown in the example above.<br />
<br />
[[Image:CG3Ch3F15.png|thumb|none|500px|''Selecting the SUM function in the Function Wizard.'']]<br />
<br />
[[Image:CG3Ch3F16.png|thumb|none|500px|''Further steps in selecting cells containing data.'']]<br />
<br />
[[Image:CG3Ch3F17.png|thumb|none|500px|''Completed entries in Function Wizard.'']]<br />
<br />
== Strategies for creating formulas ==<br />
There are several broad approaches when making a decision to create a formula. In deciding on an approach, consider how many other people will need to use the worksheets, the life of the worksheets, and the variations that could be encountered from use.<br />
<br />
=== Enter a unique formula in each cell ===<br />
The first and most basic strategy is to view whatever formulas are needed as simple and with a limited use life. The strategy is then to place a unique formula in each appropriate cell.<br />
<br />
=== Break formulas into parts and combine the parts ===<br />
The second strategy is similar, but instead you break down longer formulas into smaller parts and then combine the parts into the whole.<br />
<br />
Editor's note: This needs some explanation, but it is NOT about the "formula editor" (Math).<br />
<br />
=== Use the Basic editor to create functions ===<br />
A third strategy is to use the Basic editor and create your own functions. This approach would be used where the result would greatly simplify the use of the spreadsheet by the end user and keep the formulas simple with a better chance of avoiding errors. This approach also can make the maintenance easier by having corrections or updates kept in one central location. The use of macros is described in Chapter 12 of this book.<br />
<br />
<br />
{{CCBY}}<br />
[[Category: Calc Guide (Documentation)]]</div>Kirkhttps://wiki.openoffice.org/wiki/Documentation/OOo3_User_Guides/Calc_Guide/Creating_formulasDocumentation/OOo3 User Guides/Calc Guide/Creating formulas2009-09-14T18:58:21Z<p>Kirk: /* Introduction */</p>
<hr />
<div>{{DISPLAYTITLE:Creating formulas}}<br />
{{Documentation/CG3Ch3TOC<br />
|ShowPrevNext=block<br />
|PrevPage=Documentation/OOo3_User_Guides/Calc Guide/Formulas and Functions<br />
|NextPage=Documentation/OOo3_User_Guides/Calc Guide/Using functions<br />
}}<br />
==Introduction==<br />
You can enter formulas in two ways, either in the cell itself, or at the input line. Either way you will need to start it with one of the following symbols: "=", "+" or "-". Starting with anything else will cause the formula to be treated as if it were text.<br />
<br />
<br />
'''New in 3.1'''<br /><br />
Calc now keeps the syntax of a formula displayed in a tooltip next to the cell as a handy memory aid as you type.<br />
<br />
A more reliable method is to use the ''Function List''. Available from the '''Insert''' menu, the Function List automatically docks as a pane on the right side of the Calc editing window. If you wish, you can ''Control+double-click'' on a blank space at the top of the pane to undock this pane and make it a floating window.<br />
<br />
The Function List includes a brief description of each function and its arguments; highlight the function and look at the bottom of the pane to see the description. If necessary, hover the cursor over the division between the list and the description; when the cursor becomes a two-headed arrow, drag it upwards to increase the space for the description. Double-click on a function’s name to add it to the current cell, together with placeholders for each of the function’s arguments.<br />
<br />
Using the Function List is almost as fast as manual entry, and has the advantage of not requiring that you memorize a formula that you want to use. In theory, it should also be less error-prone. In practice, though, some users may fumble when replacing the placeholders with values. Another handy feature is the ability to display the last formulas used.<br />
<br />
[[Image:CG3Ch3F1.png|thumb|none|500px|''Function List docked to right side of Calc window.'']]<br />
<br />
The most commonly used input method is the ''Function Wizard''. To open the Function Wizard, select '''Insert > Function''', or click its button on the Function tool bar, or press ''Ctrl+F2''. Once open, the Function Wizard provides the same help features as the Function List, but adds fields in which you can see the result of a completed function, as well as the result of any larger formula of which it is part.<br />
<br />
[[Image:CG3Ch3F2.png|thumb|none|500px|''Functions page of Function Wizard.'']]<br />
<br />
You can also select the ''Structure'' tab to see a tree view of the parts of the formula. The main advantage over the Function List is that each argument is entered in its own field, making it easier to manage. The price of this reliability is slower input, but this is often a small price to pay, since precision is generally more important than speed when creating a spreadsheet.<br />
<br />
[[Image:CG3Ch3F3.png|thumb|none|500px|''Structure page of Function Wizard.'']]<br />
<br />
Another advantage of the Function Wizard is that you can reduce the window as you are adding each argument. At the end of each input field for an argument is the Shrink button [[Image:CalcShrinkIcon.png]]. The Shrink button temporarily removes all parts of the wizard except the current input field so that you can see the spreadsheet beneath. When you are finished entering the argument’s value, click the button again to return to the entire Function Wizard.<br />
<br />
[[Image:CG3Ch3F4.png|thumb|none|500px|''Function Wizard after shrinking.'']]<br />
<br />
Finally, as with many other features in OpenOffice.org, you can create a macro for any favorite function formula, and assign it to a tool bar, menu, or keystroke combination.<br />
<br />
No matter how you enter a formula, take a moment to check its structure before using it. If it looks right, press the ''Enter'' key or select the '''Accept''' button from the Function toolbar to add it to the cell and get its result (the Accept button is the green check mark beside the Input line).<br />
<br />
If you see the formula in the cell instead of the result, then Formulas are selected for display in '''Tools > Options > OpenOffice.org Calc > View > Display'''. Unselect the checkbox beside it, and the result will display. However, you can still see the formula in the formula bar field.<br />
<br />
== Operators in formulas ==<br />
Each cell on the worksheet can be used as a data holder or a place for data calculations. Inserting data is accomplished simply by typing the data in the cell and moving to the next cell or pressing Enter. With formulas the equal sign denotes that instead of the cell being a data holder, the cell will be used for a calculation. A mathematical calculation like 15 + 46 can be accomplished as shown below.<br />
<br />
{{Documentation/Note| To enter the <nowiki>=</nowiki> symbol for a purpose other than creating a formula as described in this chapter, type an apostrophe or single quotation mark before the data; for example, <nowiki>'=</nowiki> means different things to different people. Calc treats everything after the single quotation symbol as text.}}<br />
<br />
{| class="prettytable"<br />
| '''''Simple Calculation in 1 Cell'''''<br />
| '''''Calculation by Reference'''''<br />
<br />
|-<br />
| [[Image:CG3Ch3F5a.png]]<br />
| [[Image:CG3Ch3F5b.png]]<br />
<br />
|-<br />
| [[Image:CG3Ch3F5c.png]]<br />
| [[Image:CG3Ch3F5d.png]]<br />
<br />
|-<br />
| <br />
| [[Image:CG3Ch3F5e.png]]<br />
<br />
|}<br />
''A simple calculation.''<br />
<br />
While the calculation on the left was accomplished in only one cell, the real power is shown on the right where the data is placed in cells and the calculation is performed using references back to the cells. In this case, cells B3 and B4 were the data holders with B5 the cell where the calculation was performed. Notice that the formula was shown as =B3 + B4. The plus sign denotes addition as the operation being performed upon the data within cells B3 and B4. All formulas build upon this concept. Other ways of entering formulas are shown in Table 1.<br />
<br />
These back references to find data to perform a calculation can be found anywhere in the worksheet being worked on or upon any other worksheet in the workbook that is opened. If the data needed was on different worksheets they would be referenced by referring to the worksheet, for example <nowiki>=SUM(</nowiki>Sheet2.B12+Sheet3.A11).<br />
<br />
''Table 1: Common ways to enter formulas.''<br />
<br />
{| class="prettytable"<br />
! Formula<br />
! Description<br />
<br />
|-<br />
| <nowiki>=A1+10</nowiki><br />
| Displays the contents of cell A1 plus 10.<br />
<br />
|-<br />
| <nowiki>=A1*16%</nowiki><br />
| Displays 16% of the contents of A1.<br />
<br />
|-<br />
| <nowiki>=A1 * A2</nowiki><br />
| Displays the result of the multiplication of A1 and A2.<br />
<br />
|-<br />
| <nowiki>=ROUND(A1;1)</nowiki><br />
| Displays the contents of cell A1 rounded to one decimal place.<br />
<br />
|-<br />
| <nowiki>=EFFECTIVE(5%;12)</nowiki><br />
| Calculates the effective interest for 5% annual nominal interest with 12 payments a year.<br />
<br />
|-<br />
| <nowiki>=B8-SUM(B10:B14)</nowiki><br />
| Calculates B8 minus the sum of the cells B10 to B14.<br />
<br />
|-<br />
| <nowiki>=SUM(B8;SUM(B10:B14))</nowiki><br />
| Calculates the sum of cells B10 to B14 and adds the value to B8.<br />
<br />
|-<br />
| <nowiki>=SUM(B1:B65536)</nowiki><br />
| Sums all numbers in column B.<br />
<br />
|-<br />
| <nowiki>=AVERAGE(BloodSugar)</nowiki><br />
| Displays the average of a named range defined under the name BloodSugar.<br />
<br />
|-<br />
| <nowiki>=IF(C31>140; "HIGH"; "OK")</nowiki><br />
| Displays the results of a conditional analysis of data from two sources. If C31 = 144, then HIGH is displayed, otherwise OK is displayed.<br />
<br />
|}<br />
<br />
{{Documentation/Note| Users of Lotus 1-2-3®, Quattro Pro® and other spreadsheet software may be familiar with formulas that begin with <nowiki>+, -, =, (, @, ., $,</nowiki> or </nowiki>#<nowiki>. A mathematical formula would look like +D2+C2 or +2*3. Functions begin with the <nowiki>@</nowiki> symbol such as <nowiki>@SUM(D2..D7)</nowiki>, <nowiki>@COS(@DEGTORAD(30))</nowiki> and <nowiki>@IRR(GUESS;CASHFLOWS)</nowiki>. Ranges are identified such as <nowiki>A1..D3</nowiki>.}}<br />
<br />
Functions can be identified in Table 1 with a word, for example ROUND, followed by parentheses enclosing references or numbers.<br />
<br />
It is also possible to establish ranges for inclusion by naming them using '''Insert > Names''', for example BloodSugar representing a range such as B3:B10. Logical functions can also be performed as represented by the IF statement which results in a conditional response based upon the data in the identified cell.<br />
<br />
== Operator types ==<br />
You can use the following operators in OpenOffice.org Calc: arithmetic, comparative, descriptive, text, and reference.<br />
<br />
=== Arithmetic operators ===<br />
The addition, subtraction, multiplication and division operators return numerical results. The Negation and Percent operators identify a characteristic of the number found in the cell, for example -37. The example for Exponentiation illustrates how to enter a number that is being multiplied by itself a certain number of times, for example 2<sup>3 </sup><nowiki>= 2*2*2.</nowiki><br />
<br />
''Table 2: Arithmetical operators''<br />
<br />
{| class="prettytable"<br />
| '''''Operator'''''<br />
| '''''Name'''''<br />
| '''''Example'''''<br />
<br />
|-<br />
| + (Plus)<br />
| Addition<br />
| <nowiki>=1+1</nowiki><br />
<br />
|-<br />
| - (Minus)<br />
| Subtraction<br />
| <nowiki>=2-1</nowiki><br />
<br />
|-<br />
| - (Minus)<br />
| Negation<br />
| -5<br />
<br />
|-<br />
| <nowiki>* (asterisk)</nowiki><br />
| Multiplication<br />
| <nowiki>=2*2</nowiki><br />
<br />
|-<br />
| / (Slash)<br />
| Division<br />
| <nowiki>=10/5</nowiki><br />
<br />
|-<br />
| % (Percent)<br />
| Percent<br />
| 15%<br />
<br />
|-<br />
| ^ (Caret)<br />
| Exponentiation<br />
| 2^3<br />
<br />
|}<br />
<br />
=== Comparative operators ===<br />
Comparative operators are found in formulas that use the IF function and return either a true or false answer; for example, <nowiki>=IF(B6>G12; 127; 0)</nowiki> which, loosely translated, means if the contents of cell B6 are greater than the contents of cell G12, then return the number 127, otherwise return the number 0.<br />
<br />
A direct answer of TRUE or FALSE can be obtained by entering a formula such as =B6>B12. If the numbers found in the referenced cells are accurately represented, the answer TRUE is returned, otherwise FALSE is returned.<br />
<br />
''Table 3: Comparative operators''<br />
<br />
{| class="prettytable"<br />
| '''''Operator'''''<br />
| '''''Name'''''<br />
| '''''Example'''''<br />
<br />
|-<br />
| <nowiki>= (equal sign)</nowiki><br />
| Equal<br />
| A1=B1<br />
<br />
|-<br />
| > (Greater than)<br />
| Greater than<br />
| A1>B1<br />
<br />
|-<br />
| <nowiki>< (Less than)</nowiki><br />
| Less than<br />
| <nowiki>A1<B1</nowiki><br />
<br />
|-<br />
| >= (Greater than or equal to)<br />
| Greater than or equal to<br />
| A1>=B1<br />
<br />
|-<br />
| <nowiki><= (Less than or equal to)</nowiki><br />
| Less than or equal to<br />
| <nowiki>A1<=B1</nowiki><br />
<br />
|-<br />
| <nowiki><> (Inequality)</nowiki><br />
| Inequality<br />
| <nowiki>A1<>B1</nowiki><br />
<br />
|}<br />
<br />
=== Descriptive operators ===<br />
Currency symbols are perhaps the most commonly used descriptive operators found in Calc. Calc handles as currency an amount like $0.97 or £0.97 entered into a cell formatted as general or currency. However, it does not handle other currency types entered in this fashion. For other currencies, it is best to format the cells as the specific currency type, such as Yen (¥). To do this, right-click on the affected cells and select Formatting Cells. On the tab Numbers tab, select Currency. In the Format list, select the appropriate currency type. <br />
<br />
When entering amounts, it is not necessary to enter a currency symbol. Some currency symbols such as the Yen may not display.<br />
<br />
[[Image:CG3Ch3F6.png|thumb|none|500px|''Currency symbols.'']]<br />
<br />
{{Documentation/Caution| Users experienced in the use of an adding machine may experience difficulty with data entry, with resulting loss of data or incorrect results displaying. Adding machine users typically enter numbers from left to right without entering a decimal point. For example, the entry of 97 will display as 0.97. In cells formatted as currency, the entry of 97 will display currency for the locale selected such as $97 or £97, not $0.97 or £0.97.}}<br />
<br />
=== Text operators ===<br />
It is common for users to place text in spreadsheets. To provide for variability in what and how this type of data is displayed, text can be joined together in pieces coming from different places on the spreadsheet. Below is an example.<br />
<br />
[[Image:CG3Ch3F7a.png]]<br />
<br />
[[Image:CG3Ch3F7b.png]]<br />
<br />
''Text Concatenation.''<br />
<br />
In this example, specific pieces of the text were found in three different cells. To join these segments together, the formula also adds required spaces and punctuation housed within quotation marks resulting in a formula of <nowiki>=B6 & " " & C6 & ", " D6</nowiki>. The result is the concatenation into a correctly formatted date for this locale.<br />
<br />
Taking this example further, the result cell is defined as a name, then text concatenation is performed using this defined name.<br />
<br />
[[Image:CG3Ch3F8.png|thumb|none|500px|''Defining a name for a range of cells.'']]<br />
<br />
[[Image:CG3Ch3F9.png|thumb|none|500px|''Naming a cell or range of cells for inclusion in a formula.'']]<br />
<br />
[[Image:CG3Ch3F10a.png]]<br />
<br />
[[Image:CG3Ch3F10b.png]]<br />
<br />
[[Image:CG3Ch3F10c.png]]<br />
<br />
''Defining Names on a worksheet.''<br />
<br />
=== Reference operators ===<br />
Reference operators merge the values held in each individual cell within the range. Reference operators can be an individual cell identified by the column identifier located along the upper edge of the spreadsheet and a numeric identifier found along the side of the spreadsheet. On spreadsheets read from left to right, the upper left cell is A1. The figure below shows these identifiers for Cell A1.<br />
<br />
[[Image:CG3Ch3F11.png|thumb|none|500px|''The Cell Reference Operator.'']]<br />
<br />
A range is also a reference operator referenced in formulas, functions and logical operators. The range for left to right operations refers to the upper left cell running to the right and downward to the right bottommost cell as shown below.<br />
<br />
[[Image:CG3Ch3F12.png|thumb|none|500px|''Reference Operator for a range.'']]<br />
<br />
In the upper left corner of the figure above, the range A1:D12 is shown, corresponding to the cells included in the drag operation with the mouse to highlight the range. This same range could also be created by entering in the Name Box directly as shown below. After pressing ''Enter'', the same range is selected.<br />
<br />
[[Image:CG3Ch3F13.png|thumb|none|500px|''Direct entry of Reference Operator into Name Box.'']]<br />
<br />
A reference operator can also be created by defining a named area by selecting the menu item '''Insert > Names > Define''', pressing ''Ctrl+F3'', or clicking the icon, if it shows on your toolbar.<br />
<br />
Another reference operator involves the use of the '!' sign. If data appears in range A1:B6 as well as range B5:C12, using a formula such as SUM(A1:B6!B5:C12) will yield the sum of cells B5 and B6.<br />
<br />
== Order of calculation ==<br />
''Order of calculation'' refers to the sequence that numerical operations are performed. Division and multiplication are performed before addition or subtraction. There is a common tendency to expect calculations to be made from left to right as the equation would be read in English. Calc evaluations the entire formula, then based upon programming precedence breaks the formula down executing multiplication and division operations before other operations. Due to this fact when creating formulas you should test your formula to make sure that the correct result is being obtained. An example of order of calculation in operation follows.<br />
<br />
''Table 4 – Order of Calculation''<br />
<br />
{| class="prettytable"<br />
| '''''Left To Right Calculation'''''<br />
| '''''Ordered Calculation'''''<br />
<br />
|-<br />
| 1+3*2+3 = 11<br />
| <nowiki>=1+3*2+3 result 10</nowiki><br />
<br />
|-<br />
| 1+3=4, then 4 X 2 = 8, then 8 + 3 = 11<br />
| 3*2=6, then 1 + 6 + 3 = 10<br />
<br />
|-<br />
| Another possible intention could be:<br />
| The program resolves the multiplication of 3 X 2 before dealing with the numbers being added.<br />
<br />
|-<br />
| 1+3*2+3 = 20<br />
| <br />
<br />
|}<br />
<br />
If you intend for the result to be either of the two possible solutions on the left, the way to achieve these results would be to order the formula as:<br />
<br />
{| class="prettytable"<br />
| ((1+3) * 2)+3 = 11<br />
| (1+3) * (2+3) = 20<br />
<br />
|}<br />
<br />
{{Documentation/Note| Consider using parentheses grouping operations to avoid obtaining incorrect calculations, e.g. <nowiki>= B4+G12*C4/M12</nowiki> becoming <nowiki>=((B4+G12)*C4)/M12</nowiki>.}}<br />
<br />
== Calculations linking sheets ==<br />
Another powerful feature of Calc is the ability to link data through several worksheets. The naming of worksheets can be helpful to identify where specific data may be found. A name such a Payroll or Boise Sales is much more meaningful than Sheet1. The function named SHEET() returns the sheet number in the collection of spreadsheets. With this function, if you are currently on the third sheet counting from the left along the worksheet tabs, the number 3 is returned. If you drag the worksheets around to different locations among the tabs, the number will return the number referring to the current position of this worksheet.<br />
<br />
{{Documentation/Caution| Users may experience a problem when creating a formula that references other worksheets. If you use the function <nowiki>SHEET()</nowiki> the number of the current worksheet appears even if you enter the name of the worksheet desired, e.g., <nowiki>=SHEET(Branch4)</nowiki> and you have as the top worksheet named CombinedOperations. This function only refers to the current or top worksheet and not to other worksheets found in the collection or file.}}<br />
<br />
An example of calculations obtaining data from other work can be seen in a business setting where a business combines its branch operations into a single worksheet.<br />
<br />
{| class="prettytable"<br />
| [[Image:CG3Ch3F14a.png]]<br />
| Sheet containing data for Branch 1.<br />
<br />
|-<br />
| [[Image:CG3Ch3F14b.png]]<br />
| Sheet containing data for Branch 2.<br />
<br />
|-<br />
| [[Image:CG3Ch3F14c.png]]<br />
| Sheet containing data for Branch 3.<br />
<br />
|-<br />
| [[Image:CG3Ch3F14d.png]]<br />
| Sheet containing combined data for all branches.<br />
<br />
|}<br />
''Combining data from several sheets into a single sheet.''<br />
<br />
To accomplish the links, it can be easier if the Function Wizard is used.<br />
<br />
# Open the Function Wizard by clicking the f(x) button on the toolbar, or by selecting '''Insert > Function''', or by pressing ''Ctrl+F2''. <br />
# Select a category of functions to shorten the list, then scroll down through the named functions and select the required one. When you select a function, its description appears on the right-hand side of the dialog. Double-click on the required function.<br />
# The wizard now displays an area to the right where you can enter data manually in text boxes or click the '''Shrink''' button [[Image:]] to shrink the wizard so you can select the cells from the worksheet.<br />
# To select cells, either click directly upon the needed cell or hold down the left mouse button and drag to select the needed area.<br />
# When the area has been selected, click the '''Shrink''' button again to return to the wizard. <br />
# If multiple ranges are needed, then select the next text box below the first and perform the same task for the next range. The wizard will accept in the Sum function up to 30 such ranges.<br />
<br />
The following figures show how to create the combined sheet shown in the example above.<br />
<br />
[[Image:CG3Ch3F15.png|thumb|none|500px|''Selecting the SUM function in the Function Wizard.'']]<br />
<br />
[[Image:CG3Ch3F16.png|thumb|none|500px|''Further steps in selecting cells containing data.'']]<br />
<br />
[[Image:CG3Ch3F17.png|thumb|none|500px|''Completed entries in Function Wizard.'']]<br />
<br />
== Strategies for creating formulas ==<br />
There are several broad approaches when making a decision to create a formula. In deciding on an approach, consider how many other people will need to use the worksheets, the life of the worksheets, and the variations that could be encountered from use.<br />
<br />
=== Enter a unique formula in each cell ===<br />
The first and most basic strategy is to view whatever formulas are needed as simple and with a limited use life. The strategy is then to place a unique formula in each appropriate cell.<br />
<br />
=== Break formulas into parts and combine the parts ===<br />
The second strategy is similar, but instead you break down longer formulas into smaller parts and then combine the parts into the whole.<br />
<br />
Editor's note: This needs some explanation, but it is NOT about the "formula editor" (Math).<br />
<br />
=== Use the Basic editor to create functions ===<br />
A third strategy is to use the Basic editor and create your own functions. This approach would be used where the result would greatly simplify the use of the spreadsheet by the end user and keep the formulas simple with a better chance of avoiding errors. This approach also can make the maintenance easier by having corrections or updates kept in one central location. The use of macros is described in Chapter 12 of this book.<br />
<br />
<br />
{{CCBY}}<br />
[[Category: Calc Guide (Documentation)]]</div>Kirkhttps://wiki.openoffice.org/wiki/Documentation/OOo3_User_Guides/Calc_Guide/Creating_formulasDocumentation/OOo3 User Guides/Calc Guide/Creating formulas2009-09-14T18:14:32Z<p>Kirk: /* Introduction */</p>
<hr />
<div>{{DISPLAYTITLE:Creating formulas}}<br />
{{Documentation/CG3Ch3TOC<br />
|ShowPrevNext=block<br />
|PrevPage=Documentation/OOo3_User_Guides/Calc Guide/Formulas and Functions<br />
|NextPage=Documentation/OOo3_User_Guides/Calc Guide/Using functions<br />
}}<br />
==Introduction==<br />
You can enter formulas in several ways.<br />
<br />
The quickest way to enter a formula is to start typing, either in the cell itself, or at the input line. If you are typing in the cell, as soon as you type an operator, such as an equal sign or less than sign <nowiki>(<)</nowiki>, then the formula tools become active on the Formula bar. <br />
<br />
The trouble with both these methods is that typos are easy to make. Also, unless you are entering a formula that you use all the time, you may not remember its structure. For this reason, manual input of a formula is best for basic formulas or ones that you use all the time.<br />
<br />
'''New in 3.1'''<br /><br />
Calc now keeps the syntax of a formula displayed in a tooltip next to the cell as a handy memory aid as you type.<br />
<br />
A more reliable method is to use the ''Function List''. Available from the '''Insert''' menu, the Function List automatically docks as a pane on the right side of the Calc editing window. If you wish, you can ''Control+double-click'' on a blank space at the top of the pane to undock this pane and make it a floating window.<br />
<br />
The Function List includes a brief description of each function and its arguments; highlight the function and look at the bottom of the pane to see the description. If necessary, hover the cursor over the division between the list and the description; when the cursor becomes a two-headed arrow, drag it upwards to increase the space for the description. Double-click on a function’s name to add it to the current cell, together with placeholders for each of the function’s arguments.<br />
<br />
Using the Function List is almost as fast as manual entry, and has the advantage of not requiring that you memorize a formula that you want to use. In theory, it should also be less error-prone. In practice, though, some users may fumble when replacing the placeholders with values. Another handy feature is the ability to display the last formulas used.<br />
<br />
[[Image:CG3Ch3F1.png|thumb|none|500px|''Function List docked to right side of Calc window.'']]<br />
<br />
The most commonly used input method is the ''Function Wizard''. To open the Function Wizard, select '''Insert > Function''', or click its button on the Function tool bar, or press ''Ctrl+F2''. Once open, the Function Wizard provides the same help features as the Function List, but adds fields in which you can see the result of a completed function, as well as the result of any larger formula of which it is part.<br />
<br />
[[Image:CG3Ch3F2.png|thumb|none|500px|''Functions page of Function Wizard.'']]<br />
<br />
You can also select the ''Structure'' tab to see a tree view of the parts of the formula. The main advantage over the Function List is that each argument is entered in its own field, making it easier to manage. The price of this reliability is slower input, but this is often a small price to pay, since precision is generally more important than speed when creating a spreadsheet.<br />
<br />
[[Image:CG3Ch3F3.png|thumb|none|500px|''Structure page of Function Wizard.'']]<br />
<br />
Another advantage of the Function Wizard is that you can reduce the window as you are adding each argument. At the end of each input field for an argument is the Shrink button [[Image:CalcShrinkIcon.png]]. The Shrink button temporarily removes all parts of the wizard except the current input field so that you can see the spreadsheet beneath. When you are finished entering the argument’s value, click the button again to return to the entire Function Wizard.<br />
<br />
[[Image:CG3Ch3F4.png|thumb|none|500px|''Function Wizard after shrinking.'']]<br />
<br />
Finally, as with many other features in OpenOffice.org, you can create a macro for any favorite function formula, and assign it to a tool bar, menu, or keystroke combination.<br />
<br />
No matter how you enter a formula, take a moment to check its structure before using it. If it looks right, press the ''Enter'' key or select the '''Accept''' button from the Function toolbar to add it to the cell and get its result (the Accept button is the green check mark beside the Input line).<br />
<br />
If you see the formula in the cell instead of the result, then Formulas are selected for display in '''Tools > Options > OpenOffice.org Calc > View > Display'''. Unselect the checkbox beside it, and the result will display. However, you can still see the formula in the formula bar field.<br />
<br />
== Operators in formulas ==<br />
Each cell on the worksheet can be used as a data holder or a place for data calculations. Inserting data is accomplished simply by typing the data in the cell and moving to the next cell or pressing Enter. With formulas the equal sign denotes that instead of the cell being a data holder, the cell will be used for a calculation. A mathematical calculation like 15 + 46 can be accomplished as shown below.<br />
<br />
{{Documentation/Note| To enter the <nowiki>=</nowiki> symbol for a purpose other than creating a formula as described in this chapter, type an apostrophe or single quotation mark before the data; for example, <nowiki>'=</nowiki> means different things to different people. Calc treats everything after the single quotation symbol as text.}}<br />
<br />
{| class="prettytable"<br />
| '''''Simple Calculation in 1 Cell'''''<br />
| '''''Calculation by Reference'''''<br />
<br />
|-<br />
| [[Image:CG3Ch3F5a.png]]<br />
| [[Image:CG3Ch3F5b.png]]<br />
<br />
|-<br />
| [[Image:CG3Ch3F5c.png]]<br />
| [[Image:CG3Ch3F5d.png]]<br />
<br />
|-<br />
| <br />
| [[Image:CG3Ch3F5e.png]]<br />
<br />
|}<br />
''A simple calculation.''<br />
<br />
While the calculation on the left was accomplished in only one cell, the real power is shown on the right where the data is placed in cells and the calculation is performed using references back to the cells. In this case, cells B3 and B4 were the data holders with B5 the cell where the calculation was performed. Notice that the formula was shown as =B3 + B4. The plus sign denotes addition as the operation being performed upon the data within cells B3 and B4. All formulas build upon this concept. Other ways of entering formulas are shown in Table 1.<br />
<br />
These back references to find data to perform a calculation can be found anywhere in the worksheet being worked on or upon any other worksheet in the workbook that is opened. If the data needed was on different worksheets they would be referenced by referring to the worksheet, for example <nowiki>=SUM(</nowiki>Sheet2.B12+Sheet3.A11).<br />
<br />
''Table 1: Common ways to enter formulas.''<br />
<br />
{| class="prettytable"<br />
! Formula<br />
! Description<br />
<br />
|-<br />
| <nowiki>=A1+10</nowiki><br />
| Displays the contents of cell A1 plus 10.<br />
<br />
|-<br />
| <nowiki>=A1*16%</nowiki><br />
| Displays 16% of the contents of A1.<br />
<br />
|-<br />
| <nowiki>=A1 * A2</nowiki><br />
| Displays the result of the multiplication of A1 and A2.<br />
<br />
|-<br />
| <nowiki>=ROUND(A1;1)</nowiki><br />
| Displays the contents of cell A1 rounded to one decimal place.<br />
<br />
|-<br />
| <nowiki>=EFFECTIVE(5%;12)</nowiki><br />
| Calculates the effective interest for 5% annual nominal interest with 12 payments a year.<br />
<br />
|-<br />
| <nowiki>=B8-SUM(B10:B14)</nowiki><br />
| Calculates B8 minus the sum of the cells B10 to B14.<br />
<br />
|-<br />
| <nowiki>=SUM(B8;SUM(B10:B14))</nowiki><br />
| Calculates the sum of cells B10 to B14 and adds the value to B8.<br />
<br />
|-<br />
| <nowiki>=SUM(B1:B65536)</nowiki><br />
| Sums all numbers in column B.<br />
<br />
|-<br />
| <nowiki>=AVERAGE(BloodSugar)</nowiki><br />
| Displays the average of a named range defined under the name BloodSugar.<br />
<br />
|-<br />
| <nowiki>=IF(C31>140; "HIGH"; "OK")</nowiki><br />
| Displays the results of a conditional analysis of data from two sources. If C31 = 144, then HIGH is displayed, otherwise OK is displayed.<br />
<br />
|}<br />
<br />
{{Documentation/Note| Users of Lotus 1-2-3®, Quattro Pro® and other spreadsheet software may be familiar with formulas that begin with <nowiki>+, -, =, (, @, ., $,</nowiki> or </nowiki>#<nowiki>. A mathematical formula would look like +D2+C2 or +2*3. Functions begin with the <nowiki>@</nowiki> symbol such as <nowiki>@SUM(D2..D7)</nowiki>, <nowiki>@COS(@DEGTORAD(30))</nowiki> and <nowiki>@IRR(GUESS;CASHFLOWS)</nowiki>. Ranges are identified such as <nowiki>A1..D3</nowiki>.}}<br />
<br />
Functions can be identified in Table 1 with a word, for example ROUND, followed by parentheses enclosing references or numbers.<br />
<br />
It is also possible to establish ranges for inclusion by naming them using '''Insert > Names''', for example BloodSugar representing a range such as B3:B10. Logical functions can also be performed as represented by the IF statement which results in a conditional response based upon the data in the identified cell.<br />
<br />
== Operator types ==<br />
You can use the following operators in OpenOffice.org Calc: arithmetic, comparative, descriptive, text, and reference.<br />
<br />
=== Arithmetic operators ===<br />
The addition, subtraction, multiplication and division operators return numerical results. The Negation and Percent operators identify a characteristic of the number found in the cell, for example -37. The example for Exponentiation illustrates how to enter a number that is being multiplied by itself a certain number of times, for example 2<sup>3 </sup><nowiki>= 2*2*2.</nowiki><br />
<br />
''Table 2: Arithmetical operators''<br />
<br />
{| class="prettytable"<br />
| '''''Operator'''''<br />
| '''''Name'''''<br />
| '''''Example'''''<br />
<br />
|-<br />
| + (Plus)<br />
| Addition<br />
| <nowiki>=1+1</nowiki><br />
<br />
|-<br />
| - (Minus)<br />
| Subtraction<br />
| <nowiki>=2-1</nowiki><br />
<br />
|-<br />
| - (Minus)<br />
| Negation<br />
| -5<br />
<br />
|-<br />
| <nowiki>* (asterisk)</nowiki><br />
| Multiplication<br />
| <nowiki>=2*2</nowiki><br />
<br />
|-<br />
| / (Slash)<br />
| Division<br />
| <nowiki>=10/5</nowiki><br />
<br />
|-<br />
| % (Percent)<br />
| Percent<br />
| 15%<br />
<br />
|-<br />
| ^ (Caret)<br />
| Exponentiation<br />
| 2^3<br />
<br />
|}<br />
<br />
=== Comparative operators ===<br />
Comparative operators are found in formulas that use the IF function and return either a true or false answer; for example, <nowiki>=IF(B6>G12; 127; 0)</nowiki> which, loosely translated, means if the contents of cell B6 are greater than the contents of cell G12, then return the number 127, otherwise return the number 0.<br />
<br />
A direct answer of TRUE or FALSE can be obtained by entering a formula such as =B6>B12. If the numbers found in the referenced cells are accurately represented, the answer TRUE is returned, otherwise FALSE is returned.<br />
<br />
''Table 3: Comparative operators''<br />
<br />
{| class="prettytable"<br />
| '''''Operator'''''<br />
| '''''Name'''''<br />
| '''''Example'''''<br />
<br />
|-<br />
| <nowiki>= (equal sign)</nowiki><br />
| Equal<br />
| A1=B1<br />
<br />
|-<br />
| > (Greater than)<br />
| Greater than<br />
| A1>B1<br />
<br />
|-<br />
| <nowiki>< (Less than)</nowiki><br />
| Less than<br />
| <nowiki>A1<B1</nowiki><br />
<br />
|-<br />
| >= (Greater than or equal to)<br />
| Greater than or equal to<br />
| A1>=B1<br />
<br />
|-<br />
| <nowiki><= (Less than or equal to)</nowiki><br />
| Less than or equal to<br />
| <nowiki>A1<=B1</nowiki><br />
<br />
|-<br />
| <nowiki><> (Inequality)</nowiki><br />
| Inequality<br />
| <nowiki>A1<>B1</nowiki><br />
<br />
|}<br />
<br />
=== Descriptive operators ===<br />
Currency symbols are perhaps the most commonly used descriptive operators found in Calc. Calc handles as currency an amount like $0.97 or £0.97 entered into a cell formatted as general or currency. However, it does not handle other currency types entered in this fashion. For other currencies, it is best to format the cells as the specific currency type, such as Yen (¥). To do this, right-click on the affected cells and select Formatting Cells. On the tab Numbers tab, select Currency. In the Format list, select the appropriate currency type. <br />
<br />
When entering amounts, it is not necessary to enter a currency symbol. Some currency symbols such as the Yen may not display.<br />
<br />
[[Image:CG3Ch3F6.png|thumb|none|500px|''Currency symbols.'']]<br />
<br />
{{Documentation/Caution| Users experienced in the use of an adding machine may experience difficulty with data entry, with resulting loss of data or incorrect results displaying. Adding machine users typically enter numbers from left to right without entering a decimal point. For example, the entry of 97 will display as 0.97. In cells formatted as currency, the entry of 97 will display currency for the locale selected such as $97 or £97, not $0.97 or £0.97.}}<br />
<br />
=== Text operators ===<br />
It is common for users to place text in spreadsheets. To provide for variability in what and how this type of data is displayed, text can be joined together in pieces coming from different places on the spreadsheet. Below is an example.<br />
<br />
[[Image:CG3Ch3F7a.png]]<br />
<br />
[[Image:CG3Ch3F7b.png]]<br />
<br />
''Text Concatenation.''<br />
<br />
In this example, specific pieces of the text were found in three different cells. To join these segments together, the formula also adds required spaces and punctuation housed within quotation marks resulting in a formula of <nowiki>=B6 & " " & C6 & ", " D6</nowiki>. The result is the concatenation into a correctly formatted date for this locale.<br />
<br />
Taking this example further, the result cell is defined as a name, then text concatenation is performed using this defined name.<br />
<br />
[[Image:CG3Ch3F8.png|thumb|none|500px|''Defining a name for a range of cells.'']]<br />
<br />
[[Image:CG3Ch3F9.png|thumb|none|500px|''Naming a cell or range of cells for inclusion in a formula.'']]<br />
<br />
[[Image:CG3Ch3F10a.png]]<br />
<br />
[[Image:CG3Ch3F10b.png]]<br />
<br />
[[Image:CG3Ch3F10c.png]]<br />
<br />
''Defining Names on a worksheet.''<br />
<br />
=== Reference operators ===<br />
Reference operators merge the values held in each individual cell within the range. Reference operators can be an individual cell identified by the column identifier located along the upper edge of the spreadsheet and a numeric identifier found along the side of the spreadsheet. On spreadsheets read from left to right, the upper left cell is A1. The figure below shows these identifiers for Cell A1.<br />
<br />
[[Image:CG3Ch3F11.png|thumb|none|500px|''The Cell Reference Operator.'']]<br />
<br />
A range is also a reference operator referenced in formulas, functions and logical operators. The range for left to right operations refers to the upper left cell running to the right and downward to the right bottommost cell as shown below.<br />
<br />
[[Image:CG3Ch3F12.png|thumb|none|500px|''Reference Operator for a range.'']]<br />
<br />
In the upper left corner of the figure above, the range A1:D12 is shown, corresponding to the cells included in the drag operation with the mouse to highlight the range. This same range could also be created by entering in the Name Box directly as shown below. After pressing ''Enter'', the same range is selected.<br />
<br />
[[Image:CG3Ch3F13.png|thumb|none|500px|''Direct entry of Reference Operator into Name Box.'']]<br />
<br />
A reference operator can also be created by defining a named area by selecting the menu item '''Insert > Names > Define''', pressing ''Ctrl+F3'', or clicking the icon, if it shows on your toolbar.<br />
<br />
Another reference operator involves the use of the '!' sign. If data appears in range A1:B6 as well as range B5:C12, using a formula such as SUM(A1:B6!B5:C12) will yield the sum of cells B5 and B6.<br />
<br />
== Order of calculation ==<br />
''Order of calculation'' refers to the sequence that numerical operations are performed. Division and multiplication are performed before addition or subtraction. There is a common tendency to expect calculations to be made from left to right as the equation would be read in English. Calc evaluations the entire formula, then based upon programming precedence breaks the formula down executing multiplication and division operations before other operations. Due to this fact when creating formulas you should test your formula to make sure that the correct result is being obtained. An example of order of calculation in operation follows.<br />
<br />
''Table 4 – Order of Calculation''<br />
<br />
{| class="prettytable"<br />
| '''''Left To Right Calculation'''''<br />
| '''''Ordered Calculation'''''<br />
<br />
|-<br />
| 1+3*2+3 = 11<br />
| <nowiki>=1+3*2+3 result 10</nowiki><br />
<br />
|-<br />
| 1+3=4, then 4 X 2 = 8, then 8 + 3 = 11<br />
| 3*2=6, then 1 + 6 + 3 = 10<br />
<br />
|-<br />
| Another possible intention could be:<br />
| The program resolves the multiplication of 3 X 2 before dealing with the numbers being added.<br />
<br />
|-<br />
| 1+3*2+3 = 20<br />
| <br />
<br />
|}<br />
<br />
If you intend for the result to be either of the two possible solutions on the left, the way to achieve these results would be to order the formula as:<br />
<br />
{| class="prettytable"<br />
| ((1+3) * 2)+3 = 11<br />
| (1+3) * (2+3) = 20<br />
<br />
|}<br />
<br />
{{Documentation/Note| Consider using parentheses grouping operations to avoid obtaining incorrect calculations, e.g. <nowiki>= B4+G12*C4/M12</nowiki> becoming <nowiki>=((B4+G12)*C4)/M12</nowiki>.}}<br />
<br />
== Calculations linking sheets ==<br />
Another powerful feature of Calc is the ability to link data through several worksheets. The naming of worksheets can be helpful to identify where specific data may be found. A name such a Payroll or Boise Sales is much more meaningful than Sheet1. The function named SHEET() returns the sheet number in the collection of spreadsheets. With this function, if you are currently on the third sheet counting from the left along the worksheet tabs, the number 3 is returned. If you drag the worksheets around to different locations among the tabs, the number will return the number referring to the current position of this worksheet.<br />
<br />
{{Documentation/Caution| Users may experience a problem when creating a formula that references other worksheets. If you use the function <nowiki>SHEET()</nowiki> the number of the current worksheet appears even if you enter the name of the worksheet desired, e.g., <nowiki>=SHEET(Branch4)</nowiki> and you have as the top worksheet named CombinedOperations. This function only refers to the current or top worksheet and not to other worksheets found in the collection or file.}}<br />
<br />
An example of calculations obtaining data from other work can be seen in a business setting where a business combines its branch operations into a single worksheet.<br />
<br />
{| class="prettytable"<br />
| [[Image:CG3Ch3F14a.png]]<br />
| Sheet containing data for Branch 1.<br />
<br />
|-<br />
| [[Image:CG3Ch3F14b.png]]<br />
| Sheet containing data for Branch 2.<br />
<br />
|-<br />
| [[Image:CG3Ch3F14c.png]]<br />
| Sheet containing data for Branch 3.<br />
<br />
|-<br />
| [[Image:CG3Ch3F14d.png]]<br />
| Sheet containing combined data for all branches.<br />
<br />
|}<br />
''Combining data from several sheets into a single sheet.''<br />
<br />
To accomplish the links, it can be easier if the Function Wizard is used.<br />
<br />
# Open the Function Wizard by clicking the f(x) button on the toolbar, or by selecting '''Insert > Function''', or by pressing ''Ctrl+F2''. <br />
# Select a category of functions to shorten the list, then scroll down through the named functions and select the required one. When you select a function, its description appears on the right-hand side of the dialog. Double-click on the required function.<br />
# The wizard now displays an area to the right where you can enter data manually in text boxes or click the '''Shrink''' button [[Image:]] to shrink the wizard so you can select the cells from the worksheet.<br />
# To select cells, either click directly upon the needed cell or hold down the left mouse button and drag to select the needed area.<br />
# When the area has been selected, click the '''Shrink''' button again to return to the wizard. <br />
# If multiple ranges are needed, then select the next text box below the first and perform the same task for the next range. The wizard will accept in the Sum function up to 30 such ranges.<br />
<br />
The following figures show how to create the combined sheet shown in the example above.<br />
<br />
[[Image:CG3Ch3F15.png|thumb|none|500px|''Selecting the SUM function in the Function Wizard.'']]<br />
<br />
[[Image:CG3Ch3F16.png|thumb|none|500px|''Further steps in selecting cells containing data.'']]<br />
<br />
[[Image:CG3Ch3F17.png|thumb|none|500px|''Completed entries in Function Wizard.'']]<br />
<br />
== Strategies for creating formulas ==<br />
There are several broad approaches when making a decision to create a formula. In deciding on an approach, consider how many other people will need to use the worksheets, the life of the worksheets, and the variations that could be encountered from use.<br />
<br />
=== Enter a unique formula in each cell ===<br />
The first and most basic strategy is to view whatever formulas are needed as simple and with a limited use life. The strategy is then to place a unique formula in each appropriate cell.<br />
<br />
=== Break formulas into parts and combine the parts ===<br />
The second strategy is similar, but instead you break down longer formulas into smaller parts and then combine the parts into the whole.<br />
<br />
Editor's note: This needs some explanation, but it is NOT about the "formula editor" (Math).<br />
<br />
=== Use the Basic editor to create functions ===<br />
A third strategy is to use the Basic editor and create your own functions. This approach would be used where the result would greatly simplify the use of the spreadsheet by the end user and keep the formulas simple with a better chance of avoiding errors. This approach also can make the maintenance easier by having corrections or updates kept in one central location. The use of macros is described in Chapter 12 of this book.<br />
<br />
<br />
{{CCBY}}<br />
[[Category: Calc Guide (Documentation)]]</div>Kirkhttps://wiki.openoffice.org/wiki/Documentation/OOo3_User_Guides/Calc_Guide/Formulas_and_FunctionsDocumentation/OOo3 User Guides/Calc Guide/Formulas and Functions2009-09-14T18:09:49Z<p>Kirk: </p>
<hr />
<div>{{DISPLAYTITLE:Using Formulas and Functions}}<br />
{{Documentation/CG3Ch3TOC<br />
|ShowPrevNext=block<br />
|PrevPage=Documentation/OOo3_User_Guides/Calc Guide/Removing personal data<br />
|NextPage=Documentation/OOo3_User_Guides/Calc Guide/Creating formulas<br />
}}<br />
This is Chapter '''7''' of the '''OpenOffice.org 3 Calc Guide''', produced by the [http://oooauthors.org/ OOoAuthors group].<br />
<!-- A PDF of this chapter is available from [http://documentation.openoffice.org/manuals/userguide3/ Documentation] at OpenOffice.org. --><br />
<br />
==Formulas==<br />
<br />
Up to now, we have been entering one of two basic types of data into each cell that we have been using, Numbers and Text. However, it is not always the case that we will know what the contents should be. Often what should be there is dependent on the contents of other cells. This is handled by a third type of data known as the formula. Formulas are equations using ''numbers'' and ''variables'' to get a result. In a spreadsheet, the ''variables'' are cell locations that hold the data needed for the equation to be completed.<br />
<br />
==Using functions==<br />
<br />
A ''function'' is a pre-defined calculation entered in a cell to help you analyze or manipulate data in a spreadsheet. All you have to do is add the arguments, and the calculation is automatically made for you. This helps to facilitate the creation of the formulas needed to get the results that you are looking for.<br />
<br />
<br />
{{CCBY}}<br />
[[Category: Calc Guide (Documentation)]]</div>Kirkhttps://wiki.openoffice.org/wiki/Documentation/OOo3_User_Guides/Calc_Guide/Formulas_and_FunctionsDocumentation/OOo3 User Guides/Calc Guide/Formulas and Functions2009-09-14T05:23:17Z<p>Kirk: </p>
<hr />
<div>{{DISPLAYTITLE:Using Formulas and Functions}}<br />
{{Documentation/CG3Ch3TOC<br />
|ShowPrevNext=block<br />
|PrevPage=Documentation/OOo3_User_Guides/Calc Guide/Removing personal data<br />
|NextPage=Documentation/OOo3_User_Guides/Calc Guide/Using functions<br />
}}<br />
This is Chapter '''7''' of the '''OpenOffice.org 3 Calc Guide''', produced by the [http://oooauthors.org/ OOoAuthors group].<br />
<!-- A PDF of this chapter is available from [http://documentation.openoffice.org/manuals/userguide3/ Documentation] at OpenOffice.org. --><br />
<br />
<br />
==Using functions==<br />
<br />
A ''function'' is a pre-defined calculation entered in a cell to help you analyze or manipulate data in a spreadsheet. All you have to do is add the arguments, and the calculation is automatically made for you. Functions are the main reason for spreadsheets. If you understand functions, then you can start to use the real power of a spreadsheet.<br />
<br />
<br />
{{CCBY}}<br />
[[Category: Calc Guide (Documentation)]]</div>Kirkhttps://wiki.openoffice.org/wiki/Documentation/OOo3_User_Guides/Calc_Guide/Formulas_and_FunctionsDocumentation/OOo3 User Guides/Calc Guide/Formulas and Functions2009-09-14T05:21:42Z<p>Kirk: moved Documentation/OOo3 User Guides/Calc Guide/Functions and Formulas to Documentation/OOo3 User Guides/Calc Guide/Formulas and Functions:&#32;Reflect better topic sequencing</p>
<hr />
<div>{{DISPLAYTITLE:Using Functions and Creating Formulas}}<br />
{{Documentation/CG3Ch3TOC<br />
|ShowPrevNext=block<br />
|PrevPage=Documentation/OOo3_User_Guides/Calc Guide/Removing personal data<br />
|NextPage=Documentation/OOo3_User_Guides/Calc Guide/Using functions<br />
}}<br />
This is Chapter '''7''' of the '''OpenOffice.org 3 Calc Guide''', produced by the [http://oooauthors.org/ OOoAuthors group].<br />
<!-- A PDF of this chapter is available from [http://documentation.openoffice.org/manuals/userguide3/ Documentation] at OpenOffice.org. --><br />
<br />
<br />
==Using functions==<br />
<br />
A ''function'' is a pre-defined calculation entered in a cell to help you analyze or manipulate data in a spreadsheet. All you have to do is add the arguments, and the calculation is automatically made for you. Functions are the main reason for spreadsheets. If you understand functions, then you can start to use the real power of a spreadsheet.<br />
<br />
<br />
{{CCBY}}<br />
[[Category: Calc Guide (Documentation)]]</div>Kirkhttps://wiki.openoffice.org/wiki/Documentation/OOo3_User_Guides/Calc_Guide/Functions_and_FormulasDocumentation/OOo3 User Guides/Calc Guide/Functions and Formulas2009-09-14T05:21:42Z<p>Kirk: moved Documentation/OOo3 User Guides/Calc Guide/Functions and Formulas to Documentation/OOo3 User Guides/Calc Guide/Formulas and Functions:&#32;Reflect better topic sequencing</p>
<hr />
<div>#REDIRECT [[Documentation/OOo3 User Guides/Calc Guide/Formulas and Functions]]</div>Kirkhttps://wiki.openoffice.org/wiki/Documentation/OOo3_User_Guides/Calc_GuideDocumentation/OOo3 User Guides/Calc Guide2009-09-14T05:19:52Z<p>Kirk: </p>
<hr />
<div>{{DISPLAYTITLE:Spreadsheets with OpenOffice.org 3.x Calc - DRAFT}}<br />
<br />
This section contains the draft text of the user guide titled '''OpenOffice.org 3.x Calc Guide'''.<br />
<br />
The sequence of chapters has changed since an earlier draft of this book. The list below shows the current sequence.<br />
<br />
[[Documentation/OOo3_User_Guides/Calc Guide/Introducing Calc | Chapter 1 Introducing Calc]]<br /><br />
[[Documentation/OOo3_User_Guides/Calc Guide/Enter edit format | Chapter 2 Entering, Editing, and Formatting Data]]<br /><br />
[[Documentation/OOo3_User_Guides/Calc Guide/Charts and Graphs | Chapter 3 Creating Charts and Graphs]]<br /><br />
[[Documentation/OOo3_User_Guides/Calc Guide/Styles and Templates | Chapter 4 Using Styles and Templates]]<br /><br />
[[Documentation/OOo3_User_Guides/Calc Guide/Graphics in Calc | Chapter 5 Graphics in Calc]]<br /><br />
[[Documentation/OOo3_User_Guides/Calc Guide/Printing exporting emailing | Chapter 6 Printing, Exporting, and E-mailing]]<br /><br />
[[Documentation/OOo3_User_Guides/Calc Guide/Formulas and Functions | Chapter 7 Using Formulas and Functions]]<br /><br />
[[Documentation/OOo3_User_Guides/Calc Guide/DataPilot | Chapter 8 DataPilot]]<br /><br />
[[Documentation/OOo3_User_Guides/Calc Guide/Data Analysis | Chapter 9 Data Analysis]]<br /><br />
[[Documentation/OOo3_User_Guides/Calc Guide/Linking Calc Data | Chapter 10 Linking Calc Data]]<br /><br />
[[Documentation/OOo3_User_Guides/Calc Guide/Sharing and Reviewing | Chapter 11 Sharing and Reviewing]]<br /><br />
[[Documentation/OOo3_User_Guides/Calc Guide/Calc Macros | Chapter 12 Calc Macros]]<br /><br />
[[Documentation/OOo3_User_Guides/Calc Guide/Calc as a Simple Database | Chapter 13 Calc as a Simple Database]]<br /><br />
[[Documentation/OOo3_User_Guides/Calc Guide/Customizing Calc | Chapter 14 Setting up and Customizing Calc]]<br /><br />
[[Documentation/OOo3_User_Guides/Calc Guide/Keyboard Shortcuts | Appendix A Keyboard Shortcuts]]<br /><br />
[[Documentation/OOo3_User_Guides/Calc Guide/Description of Functions | Appendix B Description of Functions]]<br /><br />
[[Documentation/OOo3_User_Guides/Calc Guide/Calc Error Codes | Appendix C Calc Error Codes]]</div>Kirkhttps://wiki.openoffice.org/wiki/Documentation/OOo3_User_Guides/Calc_Guide/Using_functionsDocumentation/OOo3 User Guides/Calc Guide/Using functions2009-09-14T05:08:02Z<p>Kirk: /* Understanding the structure of functions */</p>
<hr />
<div>{{DISPLAYTITLE:Understanding functions}}<br />
{{Documentation/CG3Ch3TOC<br />
|ShowPrevNext=block<br />
|PrevPage=Documentation/OOo3_User_Guides/Calc Guide/Functions and Formulas<br />
|NextPage=Documentation/OOo3_User_Guides/Calc Guide/Creating formulas<br />
}}<br />
Calc includes over 350 functions to help you analyze and reference data. Many of these functions are for use with numbers, but many others are used with dates and times, or even text. A function may be as simple as adding two numbers together, or finding the average of a list of numbers. Alternatively, it may be as complex as calculating the standard deviation of a sample, or a hyperbolic tangent of a number. See a list of all functions in '''[[Documentation/How_Tos/Calc: Functions listed by category|functions listed by category]]'''.<br />
<br />
Typically, the name of a function is an abbreviated description of what the function does. For instance, the FV function gives the future value of an investment, while BIN2HEX converts a binary number to a hexadecimal number. By tradition, functions are entered entirely in upper case letters, although Calc will read them correctly if they are in lower or mixed case, too.<br />
<br />
A few basic functions are somewhat similar to operators. Examples:<br />
:"+", this operator will add two numbers together for a result. SUM() on the other hand will add a contiguous '''''range''''' of numbers together.<br />
:"*", this operator will multiply to numbers together for a result. PRODUCT() does the same for multiplying, that SUM() does for adding.<br />
<br />
Each function has a number of ''arguments'' used in the calculations. These arguments may or may not have their own name. Your task is to enter the arguments needed to run the function. In some cases, the arguments have pre-defined choices, and you may need to refer to the online help or Appendix B (Description of Functions) in this book to understand them. More often, however, an argument is a value that you enter manually, or one already entered in a cell or range of cells on the spreadsheet. In Calc, you can enter values from other cells by typing in their name or range, or—unlike the case in some spreadsheets—by selecting cells with the mouse. Should the values in the cells change, the result of the function will be automatically updated.<br />
<br />
Strictly speaking, when all the arguments are entered and a function is ready to run, it becomes a ''formula''. These terms are sometimes used interchangeably, but the distinction is worth preserving, because a formula can use functions as an argument.<br />
<br />
For compatibility, functions and their arguments in Calc have almost identical names to their counterparts in Microsoft Excel. However, both Excel and Calc have functions that the other lacks. Occasionally, too, functions with the same names in Calc and Excel have different arguments, or slightly different names for the same argument—neither of which can be imported to the other. However, perhaps nine-tenths of functions can be imported between Calc and Excel without any problems.<br />
<br />
== Understanding the structure of functions ==<br />
All functions have a similar structure. If you use the right tool for entering a function, you can escape learning this structure, but it is still worth knowing for troubleshooting.<br />
<br />
To give a typical example, the structure of a function to find cells that match entered search criteria is:<br />
<br />
<nowiki>= DCOUNT (Database;Database field;Search_criteria)</nowiki><br />
<br />
By convention, only three kinds of data can be entered in a cell. Text, Numbers, and Formulas. To distinguish Formulas from Text, it is necessary to always start a formula with an "=" sign. Since a function cannot exist on its' own, it must always be part of a formula. Consequently, even if the function represents the entire formula, there must be an "=" sign at the start of the formula. Regardless of where in the formula a function is, the Function will start with the function's name, DCOUNT in the above. After the name of the function comes its arguments. All arguments are required, unless specifically listed as optional.<br />
<br />
Arguments are added within the brackets (parentheses) and separated by semicolons, with no space between the arguments and the semicolons. Many arguments are a number. A Calc function can take up to thirty numbers as an argument. That may not sound like much at first. However, when you realize that the number can be not only a number or a single cell, but also an array or range of cells that contain several or even hundreds of cells, then the apparent limitation vanishes.<br />
<br />
Depending on the nature of the function arguments may be entered as follow:<br />
<br />
:{|Border="1"<br />
|"text data"||The quotes establish that text or string data has been entered<br />
|-<br />
|9||In this case the number nine has been entered as a number<br />
|-<br />
|"9"||In this case the number nine is being entered as text<br />
|-<br />
|A1|| The address for whatever is in Cell A1 is being entered<br />
|}<br />
<br />
== Advanced structure ==<br />
As well as being used on its own, a function can be an argument in a larger formula. A formula, however, is limited by the fact that it can only do one function at a time. You need to make sure that functions are done in the right order if the formula is going to work.<br />
<br />
To help set the order for functions in a multiple-function formula, you use parentheses within parentheses. When the formula is run, Calc does the innermost function first, then works outwards. For example, in the simple calculation <nowiki>=2+(5*7)</nowiki>, Calc multiples 5 by 7 first. Only then is 2 added to the result to get 37.<br />
<br />
The placement of functions within sets of parentheses is called ''nesting''. Basically, nesting reduces a function that could run on its own to an argument in the formula. For example, in =2+(5*7), the formula (5*7) is nested within the larger formula of =2+(5*7). In other words, the nested function becomes an argument of another function.<br />
<br />
This relation is more obvious when doing a calculation using a function with a name. For all purposes,<br />
<br />
<nowiki>=SUM(2;PRODUCT(5;7))</nowiki><br />
<br />
is the same formula as <nowiki>=2+(5*7)</nowiki>. However, when SUM and PRODUCT are used, then the relation is clearer. The fact that the PRODUCT function comes after a semicolon and in a set of parentheses for the SUM function makes it clear that PRODUCT is an argument for SUM. In addition, the fact that the inner pair of parentheses is around (5;7) makes clear that this operation is done before the one defined by the outer pair of parentheses.<br />
<br />
To get an idea of what nested functions can do, imagine that you are designing a self-directed learning module. During the module, students do three quizzes, and enter the results in cells A1, A2, and A3. In A4, you can create a nested formula that begins by averaging the results of the quizzes with the formula <nowiki>=AVERAGE(A1:A3)</nowiki>. The formula then uses the IF function to give the student feedback that depends upon the average grade on the quizzes. The entire formula would read:<br />
<br />
<nowiki>=IF(AVERAGE(A1:A3) >85; "Congratulations! You are ready to advance to the next module";<br />
"Failed. Please review the material again. If necessary, contact your instructor for help")</nowiki><br />
<br />
Depending on the average, the student would receive the message for either congratulations or failure.<br />
<br />
Notice that the nested formula for the average does not require its own equal sign. The one at the start of the equation is enough for both formulas.<br />
<br />
If you are new to spreadsheets, the best way to think of functions is as a scripting language. We've used simple examples to explain more clearly, but, through nesting of functions, a Calc formula can quickly become complex.<br />
<br />
<br />
{{CCBY}}<br />
[[Category: Calc Guide (Documentation)]]</div>Kirkhttps://wiki.openoffice.org/wiki/Documentation/OOo3_User_Guides/Calc_Guide/Using_functionsDocumentation/OOo3 User Guides/Calc Guide/Using functions2009-09-14T04:32:40Z<p>Kirk: Fixed paragraph comparing functions with existing operators.</p>
<hr />
<div>{{DISPLAYTITLE:Understanding functions}}<br />
{{Documentation/CG3Ch3TOC<br />
|ShowPrevNext=block<br />
|PrevPage=Documentation/OOo3_User_Guides/Calc Guide/Functions and Formulas<br />
|NextPage=Documentation/OOo3_User_Guides/Calc Guide/Creating formulas<br />
}}<br />
Calc includes over 350 functions to help you analyze and reference data. Many of these functions are for use with numbers, but many others are used with dates and times, or even text. A function may be as simple as adding two numbers together, or finding the average of a list of numbers. Alternatively, it may be as complex as calculating the standard deviation of a sample, or a hyperbolic tangent of a number. See a list of all functions in '''[[Documentation/How_Tos/Calc: Functions listed by category|functions listed by category]]'''.<br />
<br />
Typically, the name of a function is an abbreviated description of what the function does. For instance, the FV function gives the future value of an investment, while BIN2HEX converts a binary number to a hexadecimal number. By tradition, functions are entered entirely in upper case letters, although Calc will read them correctly if they are in lower or mixed case, too.<br />
<br />
A few basic functions are somewhat similar to operators. Examples:<br />
:"+", this operator will add two numbers together for a result. SUM() on the other hand will add a contiguous '''''range''''' of numbers together.<br />
:"*", this operator will multiply to numbers together for a result. PRODUCT() does the same for multiplying, that SUM() does for adding.<br />
<br />
Each function has a number of ''arguments'' used in the calculations. These arguments may or may not have their own name. Your task is to enter the arguments needed to run the function. In some cases, the arguments have pre-defined choices, and you may need to refer to the online help or Appendix B (Description of Functions) in this book to understand them. More often, however, an argument is a value that you enter manually, or one already entered in a cell or range of cells on the spreadsheet. In Calc, you can enter values from other cells by typing in their name or range, or—unlike the case in some spreadsheets—by selecting cells with the mouse. Should the values in the cells change, the result of the function will be automatically updated.<br />
<br />
Strictly speaking, when all the arguments are entered and a function is ready to run, it becomes a ''formula''. These terms are sometimes used interchangeably, but the distinction is worth preserving, because a formula can use functions as an argument.<br />
<br />
For compatibility, functions and their arguments in Calc have almost identical names to their counterparts in Microsoft Excel. However, both Excel and Calc have functions that the other lacks. Occasionally, too, functions with the same names in Calc and Excel have different arguments, or slightly different names for the same argument—neither of which can be imported to the other. However, perhaps nine-tenths of functions can be imported between Calc and Excel without any problems.<br />
<br />
== Understanding the structure of functions ==<br />
Except for simple functions such as + or *, all functions have a similar structure. If you use the right tool for entering a function, you can escape learning this structure, but it is still worth knowing for troubleshooting.<br />
<br />
To give a typical example, the structure of a function to find cells that match entered search criteria is:<br />
<br />
<nowiki>= DCOUNT (Database;Database field;Search_criteria)</nowiki><br />
<br />
Like most functions, this one starts with an equal sign. It is followed by DCOUNT, the name of the function. After the name of the function comes its arguments. All arguments are required, unless specifically listed as optional.<br />
<br />
Arguments are added within the brackets (parentheses) and separated by semicolons, with no space between the arguments and the semicolons. Many arguments are a number. A Calc function can take up to thirty numbers as an argument. That may not sound like much at first. However, when you realize that the number can be not only a number or a single cell, but also an array or range of cells that contain several or even hundreds of cells, then the apparent limitation vanishes.<br />
<br />
Other arguments may be a column label, a mathematical constant, or a value unique to that function.<br />
<br />
Depending on the function, arguments may have to be entered with straight quotation marks. However, this requirement is not consistent. Otherwise similar formulas may differ only in this requirement, and no simple rule tells you which is which. You simply have to know or check the requirements in the online help.<br />
<br />
The only exception to these structural rules are basic arithmetical functions entered with symbols. For example, instead of entering <nowiki>=SUM(2;3)</nowiki>, you can enter <nowiki>=2+3</nowiki>.<br />
<br />
== Advanced structure ==<br />
As well as being used on its own, a function can be an argument in a larger formula. A formula, however, is limited by the fact that it can only do one function at a time. You need to make sure that functions are done in the right order if the formula is going to work.<br />
<br />
To help set the order for functions in a multiple-function formula, you use parentheses within parentheses. When the formula is run, Calc does the innermost function first, then works outwards. For example, in the simple calculation <nowiki>=2+(5*7)</nowiki>, Calc multiples 5 by 7 first. Only then is 2 added to the result to get 37.<br />
<br />
The placement of functions within sets of parentheses is called ''nesting''. Basically, nesting reduces a function that could run on its own to an argument in the formula. For example, in =2+(5*7), the formula (5*7) is nested within the larger formula of =2+(5*7). In other words, the nested function becomes an argument of another function.<br />
<br />
This relation is more obvious when doing a calculation using a function with a name. For all purposes,<br />
<br />
<nowiki>=SUM(2;PRODUCT(5;7))</nowiki><br />
<br />
is the same formula as <nowiki>=2+(5*7)</nowiki>. However, when SUM and PRODUCT are used, then the relation is clearer. The fact that the PRODUCT function comes after a semicolon and in a set of parentheses for the SUM function makes it clear that PRODUCT is an argument for SUM. In addition, the fact that the inner pair of parentheses is around (5;7) makes clear that this operation is done before the one defined by the outer pair of parentheses.<br />
<br />
To get an idea of what nested functions can do, imagine that you are designing a self-directed learning module. During the module, students do three quizzes, and enter the results in cells A1, A2, and A3. In A4, you can create a nested formula that begins by averaging the results of the quizzes with the formula <nowiki>=AVERAGE(A1:A3)</nowiki>. The formula then uses the IF function to give the student feedback that depends upon the average grade on the quizzes. The entire formula would read:<br />
<br />
<nowiki>=IF(AVERAGE(A1:A3) >85; "Congratulations! You are ready to advance to the next module";<br />
"Failed. Please review the material again. If necessary, contact your instructor for help")</nowiki><br />
<br />
Depending on the average, the student would receive the message for either congratulations or failure.<br />
<br />
Notice that the nested formula for the average does not require its own equal sign. The one at the start of the equation is enough for both formulas.<br />
<br />
If you are new to spreadsheets, the best way to think of functions is as a scripting language. We've used simple examples to explain more clearly, but, through nesting of functions, a Calc formula can quickly become complex.<br />
<br />
<br />
{{CCBY}}<br />
[[Category: Calc Guide (Documentation)]]</div>Kirkhttps://wiki.openoffice.org/wiki/API/Samples/Java/Database/TableStructure(SDBCX)API/Samples/Java/Database/TableStructure(SDBCX)2009-08-17T04:54:37Z<p>Kirk: </p>
<hr />
<div>== Table Structure (extended) ==<br />
Beside the database meta data interface, the interfaces in the namespace com.sun.star.sdbcx.* supports a different more objective orientated way on looking at the database.<br />
<br />
<source lang="java"><br />
public void displayTableProperties() throws com.sun.star.uno.Exception<br />
{<br />
// the variable xTabSup is a XTablesSupplier which you get from the XDriver in conjunction with the connection<br />
XNameAccess xTables = xTabSup.getTables();<br />
String[] aTableNames = xTables.getElementNames();<br />
if ( 0 != aTableNames.length )<br />
{<br />
Object table = xTables.getByName(aTableNames[0]);<br />
XPropertySet xProp = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, table);<br />
System.out.println("Name: " + xProp.getPropertyValue(NAME));<br />
System.out.println("CatalogName: " + xProp.getPropertyValue("CatalogName"));<br />
System.out.println("SchemaName: " + xProp.getPropertyValue("SchemaName"));<br />
System.out.println("Description: " + xProp.getPropertyValue("Description"));<br />
// the following property is optional so we first must check if it exists<br />
if ( xProp.getPropertySetInfo().hasPropertyByName(TYPE) )<br />
{<br />
System.out.println("Type: " + xProp.getPropertyValue(TYPE));<br />
}<br />
System.out.println("Columns:");<br />
XColumnsSupplier columnsSupplier = (XColumnsSupplier) UnoRuntime.queryInterface(XColumnsSupplier.class, table);<br />
printColumns(columnsSupplier);<br />
System.out.println("Keys:");<br />
printKeys(columnsSupplier);<br />
}<br />
}<br />
//###########################################################<br />
// 15. example<br />
// print all columns of a XColumnsSupplier<br />
//###########################################################<br />
public static void printColumns(final XColumnsSupplier xColumnsSup) throws com.sun.star.uno.Exception, SQLException<br />
{<br />
System.out.println("Example printColumns");<br />
// the table must be at least support a XColumnsSupplier interface<br />
System.out.println("--- Columns ---");<br />
XNameAccess xColumns = xColumnsSup.getColumns();<br />
String[] aColumnNames = xColumns.getElementNames();<br />
for ( int i = 0; i <= aColumnNames.length - 1; i++ )<br />
{<br />
System.out.println(" " + aColumnNames[i]);<br />
}<br />
}<br />
//###########################################################<br />
// 16. example<br />
// print all keys inclusive the columns of a key<br />
//###########################################################<br />
<br />
public static void printKeys(final XColumnsSupplier xColumnsSup) throws com.sun.star.uno.Exception, SQLException<br />
{<br />
System.out.println("Example printKeys");<br />
XKeysSupplier xKeysSup = (XKeysSupplier) UnoRuntime.queryInterface(XKeysSupplier.class, xColumnsSup);<br />
if ( xKeysSup != null )<br />
{<br />
System.out.println("--- Keys ---");<br />
XIndexAccess xKeys = xKeysSup.getKeys();<br />
for ( int i = 0; i < xKeys.getCount(); i++ )<br />
{<br />
Object key = xKeys.getByIndex(i);<br />
XPropertySet xProp = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, key);<br />
System.out.println(" " + xProp.getPropertyValue(NAME));<br />
XColumnsSupplier xKeyColumnsSup = (XColumnsSupplier) UnoRuntime.queryInterface(XColumnsSupplier.class, xProp);<br />
printColumns(xKeyColumnsSup);<br />
}<br />
}<br />
}<br />
</source><br />
<br />
[[category:API]]</div>Kirk