Difference between revisions of "Chart2"

From Apache OpenOffice Wiki
Jump to: navigation, search
(print, assert and debug helpers)
 
(274 intermediate revisions by 12 users not shown)
Line 1: Line 1:
''Chart2'' is a sub-project of the [http://graphics.openoffice.org/chart/chart.html OpenOffice.org Chart Project]. Our goal is to develop a new Chart component for (presumably) OOo 2.6.
+
{{ChartQuickLinks}}
  
 +
The Chart module was exchanged completely on the way to OpenOffice.org 2.3.
 +
This is the basis for further enhancements and long awaited features.
  
Charts are used for visualizing data sets from e.g. spreadsheets by two and three dimensional diagrams. There are a lot of different two- and three-dimensional chart types you can choose from. This page gathers information about the new chart implementation of OpenOffice.org. It is especially written to help new comers to the process of developping in the new OOo chart module.
+
This page documents ongoing work, implemented and still missing features. It also links to further useful information around the chart.
  
If you would like to participate, if you have comments or questions related to the chart you are welcome on the graphics mailinglists:  (users,dev,features,bugs,cvs)@graphics.openoffice.org. See also the section at the bottom of this page called [Some useful information].
+
== Helping with the Chart ==
  
== Compiling the new chart module ==
+
[[Image:ProgrammingLanguage2s.png|frame|right|Example Chart made with OpenOffice.org 2.3 (ods-file see [[Image:ProgrammingLanguages.ods]])]]
  
The first step anyone need to achieve before starting to develop on the chart module
+
=== Development ===
is compiling OpenOffice.org with the needed modifications for the new chart module.
+
OpenOffice.org provides two main ways to compile it : the "Vanilla" way and the
+
"OOoBuild" way. Let's explain what they are and the differences between those two
+
ways.
+
  
=== Compiling OpenOffice.org : the theory ===
+
If you are new to OpenOffice.org development have a look at the more general pages first:
 +
*[[Documentation/Building_Guide/Getting_the_source|  Getting the source code]]
 +
*[[Documentation/Building_Guide/Building_on_Windows| Building on Windows]]
 +
*[[Cpp_Coding_Standards|C++ Coding Standards]].
  
==== Vanilla ====
+
The file format used for OpenOffice.org is the ODF format.
 +
* [http://www.oasis-open.org/specs/index.php#opendocumentv1.1 ODF 1.1] is final.
 +
* The upcoming format ODF 1.2 is still in progress (look for the latest announcements and available documents [http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office here]).
 +
* [[Chart2/Proposals| Proposals]]
  
Vanilla is the "standard" way to compile OOo. To compile OOo the "Vanilla" way,
+
If you like to help developing the chart, you can find useful information at the following places:
you only need to download the sources, unzip them, and follow the instructions given
+
*[http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Charts/Charts Chart chapter in the Developers Guide]
on the page [Add a link to the build steps from]. We will give Chart-specific details
+
*[http://wiki.services.openoffice.org/wiki/Documentation/BASIC_Guide/Charts Chart chapter in the BASIC Developers Guide]
about this in the following sections.
+
*[[FAQ about Chart API Compatibility]]
 +
*[http://api.openoffice.org/docs/common/ref/com/sun/star/chart/module-ix.html Published UNO API (com::sun::star::chart)]
 +
*[http://graphics.openoffice.org/chart/chart2codestructure.html Rough overview of the code Structure in module chart2]
 +
*[[Chart2/Open Technical Issue in Chart2|Notes on some technical issues]]
  
==== OOoBuild ====
+
The module for the chart implementation is chart2. It is a submodule of the graphics project. The chart implementation makes heavy use of UNO (Universal Network Objects), thus it would be good to learn about [http://udk.openoffice.org/ UNO] first. The new chart does support a published stable UNO API [http://api.openoffice.org/docs/common/ref/com/sun/star/chart/module-ix.html com::sun::star::chart] for external use.
 +
There is also an internal API com::sun::star::chart2. The internal API is not published and is not guaranteed to be stable. It is subject to further changes - so don't count on it in scripts or something! Furthermore several things you can set with the internal API will not be saved by the application. So for stable work please use the published standard chart API com::sun::star::chart.
  
To make it simple, OOoBuild is a "wrapper" around the OpenOffice.org build process
+
If you have questions on the chart development please use the mailing list [http://openoffice.org/projects/graphics/lists dev@graphics.openoffice.org].
to make compiling OOo more straight-forward. Some of the enhancements added are :
+
  
* patches for known compiling problems
+
To find a concrete task to work on, check the issue queries of open chart bugs and features. Maybe there is something that catches your interest:
* integration with "[[ccache]]" and "[[icecream]]" to speed-up the process
+
* [http://openoffice.org/bugzilla/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=STARTED&bug_status=REOPENED&cf_bug_type=DEFECT&cf_bug_type=TASK&cf_bug_type=PATCH&columnlist=short_desc%2Ccf_bug_type&field-1-0-0=bug_status&field0-0-0=product&field0-0-1=short_desc&query_format=advanced&type-1-0-0=anyexact&type0-0-0=equals&type0-0-1=anywordssubstr&value-1-0-0=UNCONFIRMED%2CNEW%2CSTARTED%2CREOPENED%2CRESOLVED%2CVERIFIED&value0-0-0=Chart&value0-0-1=chart%20diagram&order=bugs.bug_id%20desc&query_based_on= Open chart bugs] (defects and tasks)
* linux distribution specific compiling steps (specific splash screen for Fedora...)
+
* [http://openoffice.org/bugzilla/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=STARTED&bug_status=REOPENED&cf_bug_type=FEATURE&cf_bug_type=ENHANCEMENT&columnlist=votes%2Cshort_desc%2Ccf_bug_type&field-1-0-0=bug_status&field0-0-0=product&field0-0-1=short_desc&query_format=advanced&type-1-0-0=anyexact&type0-0-0=equals&type0-0-1=anywordssubstr&value-1-0-0=UNCONFIRMED%2CNEW%2CSTARTED%2CREOPENED%2CRESOLVED%2CVERIFIED&value0-0-0=Chart&value0-0-1=chart%20diagram&order=bugs.bug_id%20desc&query_based_on= Requested chart features] (enhancements and features)
  
So, to compile OOo with OOoBuild, just just need to download OOoBuild and put the
+
=== Testing ===
OOo standard sources in a specific directory.
+
  
=== Compiling OpenOffice.org : the practice ===
+
You can help a lot with identifying new problems or verifying fixed and integrated issues!
  
==== Commmon steps ====
+
[http://download.openoffice.org/next/ Download] the latest developer build and give it a try. When you find a bug please check whether someone else already did submit an issue for that problem. The following issue list can help you with the research:
  
===== Getting the sources =====
+
* [http://openoffice.org/bugzilla/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=STARTED&bug_status=REOPENED&bug_status=RESOLVED&bug_status=VERIFIED&columnlist=votes%2Cshort_desc%2Ccf_bug_type&field-1-0-0=bug_status&field0-0-0=product&field0-0-1=short_desc&query_format=advanced&type-1-0-0=anyexact&type0-0-0=equals&type0-0-1=anywordssubstr&value-1-0-0=UNCONFIRMED%2CNEW%2CSTARTED%2CREOPENED%2CRESOLVED%2CVERIFIED&value0-0-0=Chart&value0-0-1=chart%20diagram&order=bugs.bug_id%20desc&query_based_on= Open chart issues].
 +
* Or create your [http://openoffice.org/bugzilla/query.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=STARTED&bug_status=REOPENED&bug_status=RESOLVED&bug_status=VERIFIED&field-1-0-0=bug_status&field0-0-0=product&field0-0-1=short_desc&query_format=advanced&type-1-0-0=anyexact&type0-0-0=equals&type0-0-1=anywordssubstr&value-1-0-0=UNCONFIRMED%2CNEW%2CSTARTED%2CREOPENED%2CRESOLVED%2CVERIFIED&value0-0-0=Chart&value0-0-1=chart%20diagram own query].
  
====== Introduction ======
+
If the problem is unknown you are welcome to [http://openoffice.org/bugzilla/enter_bug.cgi?product=Chart&component=ui&rep_platform=All&op_sys=All&cc=iha@openoffice.org submit a new issue]. Please describe only one problem per issue.
 +
Thanks a lot for your help!
  
Once you have all the dependencies installed, you will need to download the sources
+
== Implemented Chart Features ==
of OOo. When working on a specific cws (for us, the "chart2mst3" cws) you will need
+
to follow two steps :
+
  
* downloading the OOo sources at a specific milestone
+
* [[Chart2/Features3.3  | Additional Features in OOo 3.3 ]]
* downloading the specific modifications for the cws from the repository
+
* [[Chart2/Features3.2  | Additional Features in OOo 3.2 ]]
 +
* [[Chart2/Features3.1  | Additional Features in OOo 3.1 ]]
 +
* [[Chart2/Features3.0  | Additional Features in OOo 3.0 ]]
 +
* [[Chart2/Features2.4  | Additional Features in OOo 2.4 ]]
 +
* [[Chart2/Features2.3  | Additional Features in OOo 2.3 ]]
  
====== Download the milestone ======
+
== Open Chart Features ==
 +
* [[Chart2/ChartTypes      | Chart-Types ]]
 +
* [[Chart2/Legend          | Legend ]]
 +
* [[Chart2/DataLabels      | Data Labels ]]
 +
* [[Chart2/Axis            | Axis ]]
 +
* [[Chart2/ChartFormatting | Chart formatting ]]
 +
* [[Chart2/TrendLines      | Trend lines and error bars ]]
 +
* [[Chart2/Range          | Range and data series ]]
 +
* [[Chart2/ChartAnnotation | Chart annotation ]]
 +
* [[Chart2/Miscellaneous  | Miscellaneous ]]
  
For the chart module, you will need to download the m172 milestone. The milestone
+
== Basic Macro Examples ==
needed will change from time to time, so stay tuned ;-)
+
  
To download the milestone, you have several choices.
+
* [[Chart2/ChangeTitleFormattingForAllChartsInACalc | Change title formatting for all charts in a spreadsheet ]]
  
* Download from the cvs servers
+
* [[Chart2/GetPositionOfAChart | Get the position of a chart within a spreadsheet ]]
* Download a pre-packaged version
+
* Download from the main OOo servers
+
  
Have a look at the following page for more explanations :
+
* [[API/Samples/StarBasic/Impress/Insert_a_Chart | Create Chart in a presentation document ]]
http://wiki.services.openoffice.org/wiki/Getting_It
+
  
Some advices :
+
* [http://www.ooowiki.de/DiagrammExport Export Charts from a Calc spreadsheet ]
  
I would recommend that you download a pre-packaged version of m172 from the  
+
Also have a look at the [http://wiki.services.openoffice.org/wiki/Documentation/BASIC_Guide/Charts BASIC Developers Guide]!
following link :
+
http://go-ooo.org/packages/SRC680/
+
  
This will save you time compared to downloading the cvs version.
+
== Contact ==
  
 +
* Development Contact: [[User:Iha|iha]]
  
If you still want to download it from the cvs, you can use the following :
 
<pre>
 
cvs -z3 co -r SRC680_m172 OpenOffice
 
</pre>
 
 
====== Update the CWS modifications ======
 
 
 
Once you downloaded the "standard" sources (also called HEAD), you need to update
 
them because the chart module modifications are in a separated cws called chart2mst3.
 
You need to update only the modified modules. To know which modules have been modified,
 
check the
 
[http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Id=1074&Path=SRC680%2Fchart2mst3 EIS page related to the chart module.]
 
On this page, you will find a section called "Modules & Files" which describes the
 
modified modules.
 
 
For each module (subdir) you will need to do :
 
 
<pre>
 
cd name_of_the_module
 
cvs -z3 update -dP -r cws_src680_chart2mst3
 
</pre>
 
 
See also cws-extract from oobuild, if you want/need to
 
work with diffs (which will get HUGE, though)
 
 
Note : cwsclone ??? What's its use ??
 
 
===== dependencies =====
 
 
First of all before starting to compile anything, you will need to install all the
 
dependencies and tools needed for the compiling steps. On the Tools project page,
 
you should find all the information on the "Building the source" section :
 
 
http://tools.openoffice.org/
 
 
There, you should read the different sub-sections, they will give you a nice
 
introduction on how everything works. You should also notice that the steps are
 
different on each OS.
 
 
==== Vanilla ====
 
 
===== Configuring =====
 
 
Once you downloaded all the sources, you can start configuring the build.
 
 
 
<pre>
 
cd config_office
 
./configure
 
</pre>
 
 
If you forgot to install some dependencies, the configure will remind you
 
which one are lacking. You can check the one needed on the
 
[http://tools.openoffice.org/ tool page]
 
 
 
A nice trick for configuring OOo is to create a script in which you write
 
all the options activated for your build. This helps if you want to see
 
which options where enabled during the build some days after you compiled
 
everything. Here is an example :
 
 
<pre>
 
#! /usr/bin/batch
 
./configure  --with-jdk-home="/home/pagalmes/bin/jdk1.5.0_06/"  --with-ant-home="/usr/bin/ant" --with-lang="en fr"
 
</pre>
 
 
===== Building the tools (dmake...) =====
 
 
During the compiling step, the compiling process needs some tools to achieve
 
the build. Before compiling, you need to build those tools. For example,
 
 
* dmake
 
* ...
 
 
To compile the tools, just type :
 
 
<pre>
 
cd openOffice.org_m172/
 
./bootstrap
 
</pre>
 
 
===== Setting the environment =====
 
 
Before starting to compile OOo, you need to set all the environment variables
 
 
<pre>
 
tcsh
 
source LinuxIntelEnv.Set
 
setenv nodep "TRUE" ; setenv NO_HIDS "TRUE" ; setenv MAXPROCESS 2
 
rehash
 
</pre>
 
 
* '''nodep'''  : inhibits generation of dependency files
 
* '''maxprocess''' : sets the number of parallel dmakes per dir
 
* '''NO_HIDS''' prevents generation of HIDs (that's used for automated testing)
 
 
===== Compiling (finally...;-) =====
 
 
<pre>
 
cd instsetoo_native
 
build -P2 --dlv_switch -link --all
 
</pre>
 
 
* ''' -P2''' : fires up more than one dmake in _different_ dirs - thus, you end up with a maximum for 4 parallel compilations
 
* '''--dlv_switch -link''' : tells deliver not to copy files to solver, but link instead -> saves space
 
 
===== Smoke tests =====
 
 
Once everything compiled, you should launch the "smoke tests". Those are
 
tests to verify that the basic functions of OpenOffice.org work. To
 
launch the smoke tests, issue the following command lines :
 
 
<pre>
 
cd smoketestoo_native/
 
setenv TEMP "/home/pagalmes/workspace/chart2_m172_exec"
 
dmake noremove
 
</pre>
 
 
Note : sometimes those tests will fail but you can just ignore them.
 
 
==== OOoBuild ====
 
 
For this section, you should read the part called "Getting started with OOo development" on the wiki :
 
http://wiki.services.openoffice.org/wiki/Main_Page
 
 
===== Downloading OOoBuild =====
 
 
===== Downloading the sources =====
 
 
 
==== The errors reported and the solutions for m166. ====
 
 
During the compiling step, you will not be able to compile the whole code without
 
facing a small number of issues. Here are the issues we already found and ways to
 
correct them.
 
 
 
===== ERROR 1 : unoxml, xmerge, xmlhelp, chart2 =====
 
 
While compiling, the following error will rise :
 
 
<pre>
 
LINK: ../uiconfig/sglobal/statusbar/statusbar.xml -> /home/pagalmes/workspace/chart2_m166/src680-m166/solver/680/unxlngi6.pro/xml/uiconfig/
 
modules/sglobal/statusbar/statusbar.xml
 
Use of uninitialized value in string eq at /home/pagalmes/workspace/chart2_m166/src680-m166/solenv/bin/deliver.pl line 791.
 
LOG: writing /home/pagalmes/workspace/chart2_m166/src680-m166/solver/680/unxlngi6.pro/inc/sw/deliver.log
 
Statistics:
 
Files copied: 137
 
Files unchanged/not matching: 6
 
 
4 module(s):
 
        unoxml
 
        xmerge
 
        xmlhelp
 
        chart2
 
need(s) to be rebuilt
 
 
Reason(s):
 
 
ERROR: error 65280 occurred while making /home/pagalmes/workspace/chart2_m166/src680-m166/xmlhelp/source/com/sun/star/help
 
ERROR: error 65280 occurred while making /home/pagalmes/workspace/chart2_m166/src680-m166/xmerge/source/xmerge
 
ERROR: error 65280 occurred while making /home/pagalmes/workspace/chart2_m166/src680-m166/chart2/source/tools
 
ERROR: error 65280 occurred while making /home/pagalmes/workspace/chart2_m166/src680-m166/unoxml/source/service
 
 
Attention: if you build and deliver the above module(s) you may prolongue your the build issuing command "build --from unoxml xmerge xmlhelp chart2"
 
</pre>
 
 
===== the solution =====
 
 
====== the unoxml problem ======
 
 
As explained in issue [http://www.openoffice.org/issues/show_bug.cgi?id=65110 65110],
 
in the file unoxml/prj/build.lst the first line has to be changed to add 'tools' in it :
 
 
<pre>
 
ux  unoxml  : '''tools''' offuh cppuhelper LIBXML2:libxml2 NULL
 
ux  unoxml\source\dom    nmake - all ux_dom      NULL
 
ux  unoxml\source\xpath    nmake - all ux_xpath    ux_dom NULL
 
ux  unoxml\source\events    nmake - all ux_events  ux_dom NULL
 
ux  unoxml\source\service  nmake - all ux_service  ux_dom ux_xpath ux_events NULL
 
</pre>
 
 
Then, to rebuild, just type :
 
 
<pre>
 
cd unoxml; build; cd ../instsetoo_native; build --all
 
</pre>
 
 
====== the xmerge problem ======
 
 
This is only a problem if you try to compile OOo with Java 1.5
 
The issue  [http://www.openoffice.org/issues/show_bug.cgi?id=59368 59368]
 
explains it in a more detailed way.
 
 
To solve this, you only need to apply the patch attached to the issue :
 
 
<pre>
 
cd src680-m166
 
patch -p0 < [filename]
 
</pre>
 
 
===== ERROR 2 : The InternalDataProvider.cxx include error =====
 
 
This error has been reported as issue [http://www.openoffice.org/issues/show_bug.cgi?id=63012 63012] :
 
 
<pre>
 
/home/pagalmes/workspace/OpenOffice/chart2/source/tools
 
------------------------------
 
Making: ../../unxlngi6/slo/InternalDataProvider.obj
 
g++ -Wreturn-type -fmessage-length=0 -c -I.  -I. -I../inc -I../../source/inc -I../../inc -I../../unx/inc -I../../unxlngi6/inc -I.
 
-I/home/pagalmes/workspace/OpenOffice/solver/680/unxlngi6/inc/stl -I/home/pagalmes/workspace/OpenOffice/solver/680/unxlngi6/inc/external
 
-I/home/pagalmes/workspace/OpenOffice/solver/680/unxlngi6/inc -I/home/pagalmes/workspace/OpenOffice/solenv/unxlngi6/inc
 
-I/home/pagalmes/workspace/OpenOffice/solenv/inc -I/home/pagalmes/workspace/OpenOffice/res
 
-I/home/pagalmes/workspace/OpenOffice/solver/680/unxlngi6/inc/stl -I/home/pagalmes/workspace/OpenOffice/solenv/inc/Xp31
 
-I/opt/j2sdk1.4.2_09/include -I/opt/j2sdk1.4.2_09/include/linux -I/opt/j2sdk1.4.2_09/include/native_threads/include -I/usr/X11R6/include
 
-I. -I../../res -I. -g  -O0  -pipe -mtune=pentiumpro -Wno-ctor-dtor-privacy -fvisibility-inlines-hidden -g -fexceptions -fno-enforce-eh-specs
 
-fpic -DLINUX -DUNX -DVCL -DGCC -DC341 -DINTEL -D_STLP_DEBUG -DCVER=C341 -D_USE_NAMESPACE -DNPTL -DGLIBC=2 -DX86 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR
 
-D_USE_NAMESPACE=1 -DSTLPORT_VERSION=400 -DHAVE_GCC_VISIBILITY_FEATURE -D__DMAKE -DUNIX -DCPPU_ENV=gcc3
 
-DGXX_INCLUDE_PATH=/usr/lib/gcc/i386-redhat-linux/4.0.2/../../../../include/c++/4.0.2 -DSUPD=680 -DDEBUG -DDBG_UTIL -DOSL_DEBUG_LEVEL=2
 
-DEXCEPTIONS_ON -DCUI -DSOLAR_JAVA -DSRC680=SRC680  -DSHAREDLIB -D_DLL_  -DMULTITHREAD  -o ../../unxlngi6/slo/InternalDataProvider.o
 
 
/home/pagalmes/workspace/OpenOffice/chart2/source/tools/InternalDataProvider.cxx
 
/home/pagalmes/workspace/OpenOffice/chart2/source/tools/InternalDataProvider.cxx
 
/usr/lib/gcc/i386-redhat-linux/4.0.2/../../../../include/c++/4.0.2/bits/cpp_type_traits.h:100:
 
erreur: use of ‘__false_type’ is ambiguous
 
/usr/lib/gcc/i386-redhat-linux/4.0.2/../../../../include/c++/4.0.2/bits/cpp_type_traits.h:94:
 
erreur:  first declared as ‘struct __false_type’ here
 
/home/pagalmes/workspace/OpenOffice/solver/680/unxlngi6/inc/stl/stl/type_traits.h:65:
 
erreur:  also declared as ‘struct _STLD::__false_type’ here
 
 
[...]
 
dmake:  Error code 1, while making '../../unxlngi6/slo/InternalDataProvider.obj'
 
'---* tg_merge.mk *---'
 
 
ERROR: Error 65280 occurred while making
 
/home/pagalmes/workspace/OpenOffice/chart2/source/tools
 
</pre>
 
 
 
===== The solution =====
 
 
The following line at the beginning of the file chart2/source/tools/InternalDataProvider.cxx :
 
 
<pre>
 
#include <valarray>
 
</pre>
 
 
Has to be put as the first include in the file. No solution has been found for now.
 
 
== Developping for the new chart module ==
 
 
 
 
 
The common steps.
 
 
 
* How to build only a particular project :
 
 
 
* How to rebuild everything from scratch :
 
(erase the ".dlp" files or smthg like that ??)
 
 
* How to test the modifications done to the chart module :
 
 
 
 
=== Coding ===
 
 
the essentials
 
 
==== print, assert and debug helpers ====
 
 
When you start developping, you will certainly need to trace your program.
 
For this, debuggers are really useful, but what is often used is to inserted
 
functions like printf() that will send messages. How do those things work in
 
OpenOffice.org ? Well there are quite a few ways to echo strings.
 
 
===== the standard functions =====
 
 
The first one is to use the classical "printf" and "fprintf" functions :
 
 
<code>[cpp,N]
 
 
#include <stdio.h>
 
 
int foo()
 
 
  printf( "Foo\n" );
 
  fprintf( stderr, "foo\n" );
 
}
 
</code>
 
 
For the ones loving C++, the second way is to use the iostreams :
 
 
<code>[cpp,N]
 
 
#include <iostream>
 
 
int foo()
 
{
 
  std::cerr << "coucou" << std::endl;
 
  std::cout << "coucou" << std::endl;
 
}
 
</code>
 
 
As two ways of doing things is not enought, you will find a few macros.
 
There are two kinds of such macros, the OSL macros and the DGB macros.
 
 
===== The OSL functions =====
 
 
The OSL_ things are intended to be used permanently, not for debugging
 
only. I.e., when you would cassert() you should OSL_ASSERT() (or ENSURE).
 
 
* OSL_TRACE( "text" )
 
* OSL_ENSURE( condition, "text" )
 
* OSL_ASSERT( condition )
 
 
"For printf debugging you can also use OSL_TRACE( "Bla" ); On Linux, this
 
prints to stdout (or stderr), so you should see it on the console, as
 
long as the file was compiled with debug=t.
 
 
OSL_ASSERT( condition ) and OSL_ENSURE( condition, "text" ) also print to
 
stderr on Linux, but they pop up a window on Windows )"
 
 
 
Here are some examples and how to use those three functions :
 
 
====== OSL_TRACE example ======
 
 
<code>[cpp,N]
 
#ifndef _OSL_DIAGNOSE_H_
 
  #include <osl/diagnose.h>
 
#endif
 
 
[...]
 
 
int foo()
 
{
 
    OSL_TRACE( "My first trace" );
 
}
 
</code>
 
 
And the result should look like :
 
 
<code>
 
  $ ./myfoo
 
  Thread:      1 :My first trace
 
</code>
 
 
====== OSL_ENSURE example ======
 
 
 
<code>[cpp,N]
 
 
#ifndef _OSL_DIAGNOSE_H_
 
  #include <osl/diagnose.h>
 
#endif
 
 
[...]
 
 
int foo()
 
{
 
  // Will not be displayed.
 
  OSL_ENSURE( true, "here I truly gooooo!!" );
 
 
  // Will be displayed.
 
  OSL_ENSURE( false, "here I gooooo!!" );
 
 
  //
 
  #if OSL_DEBUG_LEVEL > 2
 
    OSL_ENSURE( true, "here I gooooo if level is set to 3!" );
 
  #endif
 
 
}
 
</code>
 
 
And the result should look like :
 
 
<code>
 
  $ ./myfoo
 
  Error: File /home/pagalmes/workspace/chart2_m172/src680-m172/chart2/source/controller/main/ChartController.cxx, Line 1201: here I gooooo!!
 
  Backtrace: [0] /home/pagalmes/workspace/chart2_m172_exec/OpenOffice/opt/openoffice.org2.0/program/libchartcontroller680li.so: ???+0x4ac0e
 
  Backtrace: [1] /home/pagalmes/workspace/chart2_m172_exec/OpenOffice/opt/openoffice.org2.0/program/libchartcontroller680li.so: ???+0x4b73b
 
  Backtrace: [2] /home/pagalmes/workspace/chart2_m172_exec/OpenOffice/opt/openoffice.org2.0/program/libchartcontroller680li.so: ???+0x573b5
 
  Backtrace: [3] /home/pagalmes/workspace/chart2_m172_exec/OpenOffice/opt/openoffice.org2.0/program/libchartcontroller680li.so: ???+0x43964
 
  [...]
 
</code>
 
 
 
====== OSL_ASSERT example ======
 
 
<code>[cpp,N]
 
#ifndef _OSL_DIAGNOSE_H_
 
  #include <osl/diagnose.h>
 
#endif
 
 
[...]
 
 
int foo()
 
{
 
 
  bool test;
 
  test = true;
 
 
  OSL_TRACE( "test is true." );
 
  OSL_ASSERT( test );
 
 
  test = false;
 
 
  OSL_TRACE( "test is false." );
 
  OSL_ASSERT( test );
 
 
}
 
</code>
 
 
And the result should look like :
 
 
<code>
 
  Thread:      1 :test is true.
 
  Thread:      1 :test is false.
 
  Error: File /home/pagalmes/workspace/chart2_m172/src680-m172/chart2/source/controller/main/ChartController.cxx, Line 1202
 
  Backtrace: [0] /home/pagalmes/workspace/chart2_m172_exec/OpenOffice/opt/openoffice.org2.0/program/libchartcontroller680li.so: ???+0x452db
 
  Backtrace: [1] /home/pagalmes/workspace/chart2_m172_exec/OpenOffice/opt/openoffice.org2.0/program/libchartcontroller680li.so: ???+0x47361
 
  Backtrace: [2] /home/pagalmes/workspace/chart2_m172_exec/OpenOffice/opt/openoffice.org2.0/program/libchartcontroller680li.so: ???+0x56899
 
  [...]
 
</code>
 
 
 
===== the DBG functions =====
 
 
* DBG_ASSERT()
 
* DBG_ERROR()
 
 
 
 
DBG_ASSERT() and DBG_ERROR() need the tools library (the tools project not
 
the lib in chart2). Therefore I try to avoid it if a library is not linked
 
against tools anyway.
 
 
I think (not sure) that the model lib is not linked against tools.
 
 
== Documentation ==
 
 
== Some useful information ==
 
 
* Main Chart Project Page: http://graphics.openoffice.org/chart/chart.html
 
* Chart Specifications: http://specs.openoffice.org/chart/index.html
 
* Current CWS Name: [[http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Id=1074&Path=SRC680%2Fchart2mst3 chart2mst3]]
 
* IRC channel: #chart2.openoffice.org (on freenode)
 
 
 
[[Category:Calc issues]]
 
 
[[Category:Chart2]]
 
[[Category:Chart2]]
[[Category:Source_directories]]
+
[[Category:Source directories]]

Latest revision as of 16:28, 6 June 2011


The Chart module was exchanged completely on the way to OpenOffice.org 2.3. This is the basis for further enhancements and long awaited features.

This page documents ongoing work, implemented and still missing features. It also links to further useful information around the chart.

Helping with the Chart

Example Chart made with OpenOffice.org 2.3 (ods-file see File:ProgrammingLanguages.ods)

Development

If you are new to OpenOffice.org development have a look at the more general pages first:

The file format used for OpenOffice.org is the ODF format.

  • ODF 1.1 is final.
  • The upcoming format ODF 1.2 is still in progress (look for the latest announcements and available documents here).
  • Proposals

If you like to help developing the chart, you can find useful information at the following places:

The module for the chart implementation is chart2. It is a submodule of the graphics project. The chart implementation makes heavy use of UNO (Universal Network Objects), thus it would be good to learn about UNO first. The new chart does support a published stable UNO API com::sun::star::chart for external use. There is also an internal API com::sun::star::chart2. The internal API is not published and is not guaranteed to be stable. It is subject to further changes - so don't count on it in scripts or something! Furthermore several things you can set with the internal API will not be saved by the application. So for stable work please use the published standard chart API com::sun::star::chart.

If you have questions on the chart development please use the mailing list dev@graphics.openoffice.org.

To find a concrete task to work on, check the issue queries of open chart bugs and features. Maybe there is something that catches your interest:

Testing

You can help a lot with identifying new problems or verifying fixed and integrated issues!

Download the latest developer build and give it a try. When you find a bug please check whether someone else already did submit an issue for that problem. The following issue list can help you with the research:

If the problem is unknown you are welcome to submit a new issue. Please describe only one problem per issue. Thanks a lot for your help!

Implemented Chart Features

Open Chart Features

Basic Macro Examples

Also have a look at the BASIC Developers Guide!

Contact

  • Development Contact: iha
Personal tools