[dev] Cannot read document

2008-05-09 Thread Peter Nabbefeld

Hello!

I've got a strange word document, which I cannot correctly open 
with OO.org 2.4. It has a structure like this:

paragraph
   picture/
   text/
/paragraph
...
(more paragraphs)
...
table
   tr
  td!-- empty --/td
  tdreference to a paragraph//td
  td!-- empty --/td
   /tr
   ...
   (more rows like above)
   ...
   (some other rows)
/table

Of course, this is only some kind of pseudo-code ;-)

The document itself is shown in OO, the table is only shown without the rows
containing the references. Sorry, but cannot send You the document :-(


Kind regards

Peter Nabbefeld


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] Using Boost Library

2008-05-09 Thread Daniel Boelzle
Hi Regina,

AFAIR you can configure using a sytem boost which overrides OOo's boost.

HTH, regards,
Daniel

Regina Henschel wrote:
 Hello,
 
 I want to use the functions tgamma and lgamma from the Boost library, 
 but I need some help.
 1. Can you point me to a place, were a function of the Boost library is 
 already used, so that I can see how to do it?
 2. The OOo source contains the version boost_1_34_1.tar.gz. But I need 
 the version boost_1_35_0, because tgamma and lgamma not included in the 
 older version. What do I have to do (besides downloading it)?
 
 kind regards
 Regina
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] The evil that is cppu::getCaughtException

2008-05-09 Thread Stephan Bergmann

Stephan Bergmann wrote:

Stephan Bergmann wrote:
[...]
The interesting thing, however, is that if I re-build this test 
scenario from scratch, with a main.exe and first.dll and second.dll 
(corresponding to soffice.bin, soffice.dll, sal3.dll, resp.) built by 
hand (without many of the switches used in the OOo build env.)---then 
it works!  I then do not even need the MS runtime libs in the 
C:\TEST\sub directory, the process starts happily with the runtime 
libs just in the C:\TEST directory next to the executable, and the 
re-thrown exception is caught.


So, maybe there is still hope, if we can identify the critical 
difference in the build environments for the two scenarios, and adapt 
the OOo build env. correspondingly...


The magic difference appears to be the way the Windows SDK mt tool is 
called to include XXX.dll.manifest in XXX.dll itself.  The OOo build 
environment uses a resource_id of 2 (i.e., 
ISOLATIONAWARE_MANIFEST_RESOURCE_ID, cf. WinUser.h in the Windows SDK), 
while I used the default (CREATEPROCESS_MANIFEST_RESOURCE_ID, defined as 
1).  There appears to be no particular reason to use 2 in 
solenv/inc/tg_shl.mk:1.98 and following revisions (and 
solenv/inc/_tg_shl.mk generated from it), so I am now doing a DEV300m11 
wntmsci12.pro OOo built with those places changed to the default, hoping 
that the resulting application will work fine.  (However, the sad truth 
is that such a build takes on the magnitude of days rather than hours 
for me, so it will be some time before we know for sure...)


...and the freshly built OOo indeed appears to work fine!

However, one detail still puzzles me:  During the OOo build, the gperf 
tool is called.  In the Sun Hamburg build environment, it is available 
as a pre-built executable (r:\btw\DEV300\gperf.exe) that appears to be 
built with the .Net 2005 compiler (it links against msvcr80.dll) but 
also, for whatever reason, links against OOo's own sal3.dll.  However, a 
copy of the sal3.dll is not placed next to gperf.exe in r:\btw\DEV300, 
so, due to the PATH settings in the build environment, the sal3.dll 
produced during the OOo build itself is used (the one in the solver, at 
wntmsci12.pro\bin\sal3.dll).  Bad as that may be, it appears to have 
always worked fine (not too much of a surprise, given that sal has a 
stable interface).  But with my changes (sal3.dll containing 
sal3.dll.manifest with resource_id 1 instead of 2), the calls to gperf 
during the OOo build now fail:


quote
Microsoft Visual C++ Runtime Library

Runtime Error!

Program: D:\shared\solar\r\btw\DEV300\gperf.exe

R6034
An application has made an attempt to load the C runtime library 
incorrectly.

Please contatct the application's support team for more information.
/quote

followed by

quote
gperf.exe - Application Error

The application failed to initialize properly (0xc142). Click on OK 
to terminate the application.

/quote

So I thought maybe the redistributable runtime files (msvcr90.dll etc.) 
were missing from the location where sal3.dll is located, so I copied 
them there (solver's wntmsci12.pro\bin), but the failure remained.


Does that mean that my change would mean that the URE libraries now only 
work in an executable compiled with the exact same Microsoft compiler 
version as the URE libraries themselves?  Maybe someone else can help 
shed some light on this...


-Stephan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[dev] How to set the GUI language when building?

2008-05-09 Thread Ma Zhenyu
I builded the code from web, and got the installation of english version?

So I want to ask one question is:
how to build Ooo of other language version, such as japanese or chinese
language,
need I download other code? Or just change some setting?

Thanks a lot in advance!

Regards,
Mynfred


[dev] Oo writer's problem

2008-05-09 Thread Dinesh Chothe
  Hello,
   I am developing writer based application using
java,oo sdk and netbeans.
 In this application object has to travels from starting of
document up to end  of document.
 While moving it may come across different txt
contents,images,tables,graphs etc...
 Now this object has to access only text contents  its
properties(like font,bold,size etc),it may
   from tables or graphs etc.
 After getting I am replacing it with some other text then
it should be replace with at exact positions with
as per its previous properties.
Can anybody guide me for how to do this?

-- 
Thanks and Regards,



Dinesh


[dev] TypeClass.hdl

2008-05-09 Thread rick cameron
Hi

I'm an absolute newbie at programming against the OOo SDK. I am looking at
the office_connect.cxx sample from the Professional UNO section of the
developer's guide, and trying to build it in Visual C++ 2005.

There is a #include of TypeClass.hdl but this file isn't in C:\Program
Files\OpenOffice.org_2.4_SDK. Where do I find it?

Thanks

- rick







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] List of 2730 uncallable methods in DEV300_m10

2008-05-09 Thread Eike Rathke
Hi Kohei,

On Thursday, 2008-05-08 00:22:10 -0400, Kohei Yoshida wrote:

  If I recall correctly, the module with the most unused methods that
  doesn't have anything in the pipeline to remove them is sc, so there's
  where the lowest hanging fruit should be.
 
 Since no one has raised hands, let me tackle that.

Thanks a lot!

Just a note though: please don't blindly remove everything that appears
to be unused, e.g. while ScCompressedArray::GetPrevValue() is currently
unused it is the counterpart of GetNextValue() and IMHO should be kept
for completeness of implementation. It is also some inline template
code, so shouldn't hurt either. Removing FillDataArray() on the other
hand is fine because it was used in just one special scenario.

Thanks
  Eike

-- 
 OOo/SO Calc core developer. Number formatter stricken i18n transpositionizer.
 SunSign   0x87F8D412 : 2F58 5236 DB02 F335 8304  7D6C 65C9 F9B5 87F8 D412
 OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
 Please don't send personal mail to the [EMAIL PROTECTED] account, which I use 
for
 mailing lists only and don't read from outside Sun. Use [EMAIL PROTECTED] 
Thanks.


pgpBgs4zeBuRZ.pgp
Description: PGP signature


[dev] Can OOo objects be used in-process?

2008-05-09 Thread rick cameron
Hi

I am just starting to learn about the OOo APIs. I have managed to get a very 
simple Java program that uses Bootstrap.bootstrap and 
XComponentContext.getServiceManager working, and noticed that when I run it 
a couple of new processes start (soffice.exe and soffice.bin).

I haven't managed to get a C++ program working yet, so don't know what 
happens in that case.

Is it possible to use OOo objects in the calling process? In particular I 
want to create a spreadsheet object, cause it to load a .xls file, then 
explore the values  formulas in the spreadsheet. I won't need to display 
the spreadsheet.

Thanks!

- rick 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] List of 2730 uncallable methods in DEV300_m10

2008-05-09 Thread Caolan McNamara
On Fri, 2008-05-09 at 16:47 +0200, Eike Rathke wrote:
 while ScCompressedArray::GetPrevValue() is currently
 unused it is the counterpart of GetNextValue() and IMHO should be kept
 for completeness of implementation. 

Perhaps #ifdef FUTURE around it, or else I can add such things to the
whitelist if that's undesirable.

C.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] List of 2730 uncallable methods in DEV300_m10

2008-05-09 Thread Kohei Yoshida

On Fri, 2008-05-09 at 16:47 +0200, Eike Rathke wrote:

 Just a note though: please don't blindly remove everything that appears
 to be unused, e.g. while ScCompressedArray::GetPrevValue() is currently
 unused it is the counterpart of GetNextValue() and IMHO should be kept
 for completeness of implementation. It is also some inline template
 code, so shouldn't hurt either. Removing FillDataArray() on the other
 hand is fine because it was used in just one special scenario.

Done!  I've restored ScCompressedArray::GetPrevValue().

I'll be more careful about removing one of getter-setter pair.  Let me
know if there is more that I've removed but you want to restore.

Kohei

-- 
Kohei Yoshida - OpenOffice.org Engineer - Novell, Inc.
[EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] List of 2730 uncallable methods in DEV300_m10

2008-05-09 Thread Kohei Yoshida

On Fri, 2008-05-09 at 16:11 +0100, Caolan McNamara wrote:
 On Fri, 2008-05-09 at 16:47 +0200, Eike Rathke wrote:
  while ScCompressedArray::GetPrevValue() is currently
  unused it is the counterpart of GetNextValue() and IMHO should be kept
  for completeness of implementation. 
 
 Perhaps #ifdef FUTURE around it, or else I can add such things to the
 whitelist if that's undesirable.

For now, I'll put '#define MAYBE_REMOVE_THIS 0' in global.hxx and use it
for the codes I'm not sure about.

Kohei

-- 
Kohei Yoshida - OpenOffice.org Engineer - Novell, Inc.
[EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] List of 2730 uncallable methods in DEV300_m10

2008-05-09 Thread Niklas Nebel

Caolan McNamara wrote:

On Fri, 2008-05-09 at 16:47 +0200, Eike Rathke wrote:

while ScCompressedArray::GetPrevValue() is currently
unused it is the counterpart of GetNextValue() and IMHO should be kept
for completeness of implementation. 


Perhaps #ifdef FUTURE around it, or else I can add such things to the
whitelist if that's undesirable.


Good old opt-in vs. opt-out choice. I'd prefer to leave all methods in 
the header files, commented out and marked somehow, unless someone has 
(manually) determined that they really shouldn't be there.


Otherwise, inevitably, it will cause problems much later, where you look 
at a class and ask yourself, how is that supposed to work, I can (for 
example) add an entry but not remove it.


I know these marks are ugly and tend to stay there forever (example: 
CHINA001), but it's still better than always having to dig through the 
CVS log to see if the class you're looking at is still the class as it 
was intended to be.


Niklas

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] How to set the GUI language when building?

2008-05-09 Thread Christian Lohmaier
Hi *,
On Fri, May 09, 2008 at 04:40:15PM +0800, Ma Zhenyu wrote:
 I builded the code from web, and got the installation of english version?
 
 So I want to ask one question is:
 how to build Ooo of other language version, such as japanese or chinese
 language,
 need I download other code? Or just change some setting?

You need to run configure with the --with-lang=list of language-codes
options. See configure --help for samples.

if you want to create languagepacks, you can run dmake ooolanguagepack
in instsetoo_native/util after you built the whole thing.

ciao
Christian

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] List of 2730 uncallable methods in DEV300_m10

2008-05-09 Thread Mathias Bauer
Hi Malte,

Malte Timmermann wrote:

 Hi Caolan,
 
 thanks for the updated list! :)
 
 I wonder: Who dares / volunteers to simply remove these methods?
This is ongoing already. I have a CWS where the biggest chunks have been
put in already (binfilter, filter, svtools, filter, desktop...). CWS is
mba30patches01 and is still in QA.

A warning to everyone committing such cleanups to cvs: please use
non-pro builds on at least one platform (--enable-dbgutil in
configure) as I found some cases where the stripped code only compiled
for pro builds. Without a non-pro build I had broke the master for all
developers using non-pro versions.

Another interesting discovery was that removing ctors can be dangerous
at times because some compilers automatically create default or copy
ctors for classes even if they aren't used. If the corresponding ctor of
the base class was removed, the build broke. Easiest fix for that was
removing the classes completely as a class that isn't constructed surely
also isn't really used, even if the methods are stilled called somewhere
else in obviously also superfluous code. I found this problem mainly in
binfilter - a fact that doesn't surprise a lot.

I didn't find a pattern for when which compiler chose which class, I had
broken builds on all platforms for different classes!

Ciao,
Mathias

-- 
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to [EMAIL PROTECTED].
I use it for the OOo lists and only rarely read other mails sent to it.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] RFC: java 1.5

2008-05-09 Thread Mathias Bauer
Hi all,

Christoph Neumann wrote:

 Kay Ramme - Sun Germany - Hamburg wrote:
 Stephan Bergmann wrote:
 Malte Timmermann wrote:
 My point of view:

 Most people agree that OOo mustn't loose (meta) data when Java is not
 available, but plug ins for working with meta data can rely on Java.

 Changing OOo's Java base line from 1.4 to 1.5 is fine for most people 
 then.

 AFAIK the current Java baseline is 1.3.1.
 That is correct, the (still) valid consensus regarding Java can be found 
 here:
 
 http://tools.openoffice.org/policies/java_usage.html
 
 respectively the background:
 
 http://tools.openoffice.org/servlets/ReadMsg?list=jdkmsgNo=90
 
 This document is aged four. Shouldn't we reconsider about this status?

I think what we need is a list of complete and 100% free Java
implementations on all relevant platforms and the Java version they are
compatible to. Do we have one? Or do we have a volunteer creating one?

Ciao,
Mathias

-- 
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to [EMAIL PROTECTED].
I use it for the OOo lists and only rarely read other mails sent to it.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] List of 2730 uncallable methods in DEV300_m10

2008-05-09 Thread Caolan McNamara
On Fri, 2008-05-09 at 20:01 +0200, Mathias Bauer wrote:
  A warning to everyone committing such cleanups to cvs: please use
 non-pro builds on at least one platform 

Indeed. The unused methods are always pulled from a .pro build. The same
issue arises with stuff used only on one platform but included in all
platforms, e.g. some ole2 stuff under windows.

 Another interesting discovery was that removing ctors can be dangerous
 at times because some compilers automatically create default or copy
 ctors for classes even if they aren't used. ... I found this problem mainly 
 in binfilter - a fact that doesn't surprise a lot.

Yeah, given the rather poor state of standalone C++ parsing frameworks
the current mechanism is a somewhat horrific (but functional) scraping
of the output gcc assembly stage. The output data is correct, but there
is the limitation that it's not easy to tell that a specific ctor of a
range of ctors is unused vs that objects of that class are impossible to
actually create at all even if other code accepts pointers to such
objects and call methods on them.

FWIW http://people.redhat.com/caolanm/GoOOoCon08.odp has some brief
notes on it.

C.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] List of 2730 uncallable methods in DEV300_m10

2008-05-09 Thread Kohei Yoshida

On Fri, 2008-05-09 at 19:17 +0200, Niklas Nebel wrote:
 Good old opt-in vs. opt-out choice. I'd prefer to leave all methods
 in 
 the header files, commented out and marked somehow, unless someone
 has 
 (manually) determined that they really shouldn't be there.

I can start using REMOVE_THIS macro and use it like this:

#if REMOVE_THIS
  void RemoveMe();
#endif

for all future removals.  I've already removed quite a bit so I can't go
back and do this for the code that's already been removed, though.

I also don't remove code blindly; I at least spend some time to take a
brief look at the method and check its references before removing it, to
make sure it is in fact ok to remove it, or if it is desirable to leave
it in.

Having said that, I would like to still reserve the right to just
outright remove code if I think with strong certainty that the code
shouldn't be there at all. ;-)

Kohei

-- 
Kohei Yoshida - OpenOffice.org Engineer - Novell, Inc.
[EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] List of 2730 uncallable methods in DEV300_m10

2008-05-09 Thread Kohei Yoshida

On Fri, 2008-05-09 at 15:16 -0400, Kohei Yoshida wrote:
 Having said that, I would like to still reserve the right to just
 outright remove code if I think with strong certainty that the code
 shouldn't be there at all. ;-)

And again, if I removed something by mistake that you want to leave in,
please let me know, and I'll restore it back.

Kohei

-- 
Kohei Yoshida - OpenOffice.org Engineer - Novell, Inc.
[EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] List of 2730 uncallable methods in DEV300_m10

2008-05-09 Thread Kohei Yoshida

On Fri, 2008-05-09 at 20:01 +0200, Mathias Bauer wrote:
 Another interesting discovery was that removing ctors can be dangerous
 at times because some compilers automatically create default or copy
 ctors for classes even if they aren't used.

One technique to work around this is to put the default and copy ctors
in the private section of the class declaration, and leave their
definitions out.  That should prevent the compiler from automatically
generating those ctors, and if any code constructs that class via
default or copy constructor, then the link should fail.

-- 
Kohei Yoshida - OpenOffice.org Engineer - Novell, Inc.
[EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[dev] Padding, Bjorn is out of the office.

2008-05-09 Thread Bjorn Padding

I will be out of the office starting  05/09/2008 and will not return until
05/13/2008.


Regards,
Bjorn



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[dev] CHINA001 (was: Re: [dev] List of 2730 uncallable methods in DEV300_m10)

2008-05-09 Thread Kohei Yoshida
Hi Niklas,

On Fri, 2008-05-09 at 19:17 +0200, Niklas Nebel wrote:
 example: CHINA001

In the interest of removing the unused code, I'd like know what those
CHINA001 labels are for.  Is it okay to perhaps review those commented
out lines and see if we can remove them permanently?

Kohei

-- 
Kohei Yoshida - OpenOffice.org Engineer - Novell, Inc.
[EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] TypeClass.hdl

2008-05-09 Thread Ariel Constenla-Haile

Hi Rick,

rick cameron escribió:

Hi

I'm an absolute newbie at programming against the OOo SDK. I am looking at
the office_connect.cxx sample from the Professional UNO section of the
developer's guide, and trying to build it in Visual C++ 2005.

There is a #include of TypeClass.hdl but this file isn't in C:\Program
Files\OpenOffice.org_2.4_SDK. Where do I find it?


You must dump the headers from the office's type library, using the tool
that comes with the SDK: cppumaker (in SDK\windows\bin\cppumaker.exe).

Supposing you have configured the SDK correctly, you have to do

cppumaker.exe -BUCR -O  API_headers_dump_folder
Office_inst_dir\program\types.rdb

where
* API_headers_dump_folder is the folder where you want all the headers
to be generated
* Office_inst_dir is the directory where OpenOffice.org is installed
(NOT the SDK!)

This will generate in [API_headers_dump_folder] two folders \com and
\drafts, you can delete this last one.

The \com folder has a hierarchical structure including all types
available on your Office installation. For example, the interface
com.sun.star.awt.XWindow will generate two files:

[API_headers_dump_folder]\com\sun\star\awt\XWindow.hdl
[API_headers_dump_folder]\com\sun\star\awt\XWindow.hpp

These last files with the hpp extensions are the ones that you must
include in your code; for example, for using the XWindow interface:

#include com/sun/star/awt/XWindow.hpp

The same for the enum TypeClass
(http://api.openoffice.org/docs/common/ref/com/sun/star/uno/TypeClass.html)
and all other types.



For using using OOo API in the Visual Studio, you need to configure it
to find these headers, and the ones in the include dir. on the SDK.

To configure the Visual Studio (explanation only valid for a simple
client application on OOo 2.4, using only OOo UNO API, and linking
agains URE libraries only):

* open the VS Options dialog

* select from the tree in the left Projects and Solutions - VC++
Directories

* in the listbox Show direcotires for, select Include files, and add
 -   the SDK include directory, and
 -   the one where you dumped all the office types

* then in the listbox Show direcotires for, select Library files,
and add
 -  C:\Program Files\OpenOffice.org 2.4\program
 -  C:\Program Files\OpenOffice.org 2.4_SDK\windows\lib


Then for *every* Visual C++ Project you must configure the following
settings:

* in the menu Project select [Your project name] Properties... (for
me ALT+F7 works)

* for the preprocessor directives: select in the tree Configuration
Properties - C/C++ - Preprocessor. In Preprocessor Definitions
add   WNT;CPPU_ENV=msci

* in Configuration Properties - C/C++ - Advanced, you may want
to disable some warnings, in Disable Specific Warnings type
 4251;4275;4290;4675;4786;4800

* in Configuration Properties - Linker - Command Line, type in
Addition options
  icppuhelper.lib  icppu.lib  isalhelper.lib  isal.lib
stlport_vc71.lib



For client applications, I use the New Project wizard

* choose the Win32 Console Application template
* in the Win32 Application Wizard press next, and in the step
Application Settings choose
   Applcation Type-   Console application
   Aditional options  -   Empty project

this way it won't create the precompiled header stdafx.h


I hope these explanations are complete, as I'm now on Linux and can not
test them (even with lots of RAM, virtualization is a crap... at least
for using the Visual Studio).
If any problem, please let me know, and I send you a Visual Studio
Project (sure you'll have to change it as the directories are in Spanish
[Archivos de Programa, instead of Program Files, ...])


And by the way, all these is only valid if you want to program with OOo
*API*; if you want to *hack* OOo, you won't need the SDK build
environment, but the build environment used to compile OOo's source code.

And as this mailing list is primary for people working on the source
code, not for only-API-related topics, I would suggest you to subscribe
to the dedicated mailing list for API topics: [EMAIL PROTECTED];
just send a message to [EMAIL PROTECTED] and follow the
instructions in the mail they send you back.


Regards
Ariel.


--
Ariel Constenla-Haile
La Plata, Argentina

[EMAIL PROTECTED]
[EMAIL PROTECTED]

http://www.ArielConstenlaHaile.com.ar/ooo/



Aus der Kriegsschule des Lebens
- Was mich nicht umbringt,
macht mich härter.
Nietzsche Götzendämmerung, Sprüche und Pfeile, 8.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] Can OOo objects be used in-process?

2008-05-09 Thread Ariel Constenla-Haile

Hi Rick,

rick cameron escribió:

Hi

I am just starting to learn about the OOo APIs. I have managed to get a very 
simple Java program that uses Bootstrap.bootstrap and 
XComponentContext.getServiceManager working, and noticed that when I run it 
a couple of new processes start (soffice.exe and soffice.bin).


I haven't managed to get a C++ program working yet, so don't know what 
happens in that case.


the same, that is for the C++ bridge there is also a simple bootstrap
mechanism (IIRC broken in the three layer OOo, so test it with OOo 2.4 
[also IIRC it's already fixed, or they are working in fixing this]):


Reference XComponentContext  rContext;
Reference XMultiComponentFactory  rMCF;
try
{
// get the remote office component context
rContext = Reference XComponentContext  ( ::cppu::bootstrap() 
);
cout  Connected to a running office ...  endl;

// get the remote office service manager
rMCF = Reference XMultiComponentFactory  (
rContext-getServiceManager() );
cout  The service manager is available!  endl;

}
catch( ::cppu::BootstrapException  e )
{
cerr  caught BootstrapException: 
 GET_STR( e.getMessage() )
 '\n';
throw e;
}
catch( Exception e)
{
cerr  caught UNO exception: 
 GET_STR( e.Message )
 '\n';
throw e;
}


Is it possible to use OOo objects in the calling process? 


from the component context you get the service manager to instantiate 
objects:



Reference XComponentContext  rContext;
Reference XMultiComponentFactory  rMCF;

//... bootstap

try
{
Reference XInterface  rDesktop = 
rMCF-createInstanceWithContext(
OUString( 
RTL_CONSTASCII_USTRINGPARAM(com.sun.star.frame.Desktop) ),
rContext);
Reference XComponentLoader  rComponentLoader ( rDesktop, 
UNO_QUERY );

		Reference XComponent  xSpreadsheetComponent = 
rComponentLoader-loadComponentFromURL(

OUString( RTL_CONSTASCII_USTRINGPARAM( 
private:factory/scalc ) ),
OUString( RTL_CONSTASCII_USTRINGPARAM( _default ) ),
sal_Int32( 0 ),
SequencePropertyValue());

		Reference XSpreadsheetDocument  xSpreadsheetDocument ( 
xSpreadsheetComponent, UNO_QUERY );


		Reference XSpreadsheets  xSpreadsheets = 
xSpreadsheetDocument-getSheets();
		xSpreadsheets-insertNewByName( OUString::createFromAscii( MySheet 
), sal_Int16( 0 ) );


//...
}//...

In particular I want to create a spreadsheet object, cause it to load a .xls file, then 
explore the values  formulas in the spreadsheet. I won't need to display 
the spreadsheet.


before jumping there, read the first chapters of the Dev's Guide, at least

#  First Steps
#  Professional UNO
#  Advanced UNO
#  Office Development

and if you want to develop components/extensions

#  Writing UNO Components
#  Extensions

and only then jump to the document specific chapters

#  Text Documents
#  Spreadsheet Documents
#  Drawing Documents and Presentation Documents
...


It's a long road.

Regards
Ariel.


--
Ariel Constenla-Haile
La Plata, Argentina

[EMAIL PROTECTED]
[EMAIL PROTECTED]

http://www.ArielConstenlaHaile.com.ar/ooo/



Aus der Kriegsschule des Lebens
- Was mich nicht umbringt,
macht mich härter.
Nietzsche Götzendämmerung, Sprüche und Pfeile, 8.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[dev] Re: TypeClass.hdl

2008-05-09 Thread rick cameron
Hi, Ariel

Muchisimas gracias for this detailed explanation! If this info isn't already 
in the wiki (and I wasn't able to find anything similar) it should be!

I'll try out your suggestions and report back. It seems odd to me that the 
SDK is incomplete - that the programmer who wants to use the API has to 
build the API! Asi es las vida ;^)

- rick 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[dev] Re: Can OOo objects be used in-process?

2008-05-09 Thread rick cameron
Hi, Ariel

Thanks again for the examples. I'll try them once I get the basics in place.

Can you tell me whether it's possible for a C++ client app to create OOo 
objects (such as a spreadsheet) in the same process as the calling code?

Ciao

- rick 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] Re: Can OOo objects be used in-process?

2008-05-09 Thread Ariel Constenla-Haile

Hi Rick,

rick cameron escribió:

Hi, Ariel

Thanks again for the examples. I'll try them once I get the basics in place.

Can you tell me whether it's possible for a C++ client app to create OOo 
objects (such as a spreadsheet) in the same process as the calling code?


that's what the snipet does: first bootstraps the office (connects to a
running office or, if not already running, it creates a new process),
then gets the service manager from the component context and start
instantiating objects.

creating a spreadsheet means loading a spreadsheet document, an
existing or a new one.

I send you some examples (they all are in a pre-alpha state) that can
be compiled with the SDK environment, they need to be cleaned but at
least they run.

Regards
Ariel.




--
Ariel Constenla-Haile
La Plata, Argentina

[EMAIL PROTECTED]
[EMAIL PROTECTED]

http://www.ArielConstenlaHaile.com.ar/ooo/



Aus der Kriegsschule des Lebens
- Was mich nicht umbringt,
macht mich härter.
Nietzsche Götzendämmerung, Sprüche und Pfeile, 8.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]