RE: [api-dev] Suppressing Future Version and Recovery Dialog Boxes

2010-10-05 Thread Wei Min Teo

Hi,

 

It seems that perhaps -norestore does work. but i'm not sure -headless can 
remove update dialog boxes if u open a OO3.0 file using OO 2.4. It'll be 
great if someone can verify this. I've tried it using a cmd prompt with 
soffice.exe -headless document name and it suppresses perfectly. However if i 
first start the soffice instance with headless using createprocess and then 
bootstrap and loadcomponentwithurl, it doesn't work. 

 

Anyway, I believe the first start registration wizard can be prevented by 
editing the setup.xcu file to include the license date and filling in yes to 
OOsetupcompleted.  
 
 From: des...@gmail.com
 To: dev@api.openoffice.org
 Date: Tue, 5 Oct 2010 09:28:17 +0200
 Subject: Re: [api-dev] Suppressing Future Version and Recovery Dialog Boxes
 
 On Monday 04 October 2010, Wei Min Teo wrote:
  1) I can't seem to get rid of the recovery dialog box that appears to 
  prompt users on whether to recover files. 
  2) Also, if there's a file from a later OO version, there's also a dialog 
  box that pops up to asks if you want to upgrade or postpone to later. I 
  would like to know how to suppress these. 
  
  I've tried running soffice.exe with the -norestore and -headless switch 
  and it doesn't seem to work. I'll really appreciate any advice to solve any 
  of the 2 problems. 
 
 Hi,
 
 here is what I use:
 
 -nologo -nodefault -norestore -nocrashreport -nolockcheck -nofirststartwizard
 
 But OO 2.4.(??) has a Bug. The first start registration wizard dialog
 box will still popup once.
 
 
 -
 To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
 For additional commands, e-mail: dev-h...@api.openoffice.org
 
  

[api-dev] Suppressing Future Version and Recovery Dialog Boxes

2010-10-04 Thread Wei Min Teo

Hi all,

I'm trying to read some files programmatically with OO v2.4.x. However, as it 
runs silently in the background without user input, it sometimes hangs at some 
dialog boxes. 

1) I can't seem to get rid of the recovery dialog box that appears to prompt 
users on whether to recover files. 
2) Also, if there's a file from a later OO version, there's also a dialog box 
that pops up to asks if you want to upgrade or postpone to later. I would like 
to know how to suppress these. 

I've tried running soffice.exe with the -norestore and -headless switch and 
it doesn't seem to work. I'll really appreciate any advice to solve any of the 
2 problems. 

Thanks.



Cheers,

Wei Min
  

RE: [api-dev] pdf import programmatically

2010-06-21 Thread Wei Min Teo

Hi,

 

Thanks for the reply. 

 

My concern is that using shell execute I won't be able to get a xcomponent 
object which i need to process the file. 

http://api.openoffice.org/docs/common/ref/com/sun/star/system/XSystemShellExecute.html
 

I think using the appropriate filter should work. Will go test it.

 

 
 Date: Thu, 17 Jun 2010 12:51:35 +0200
 From: boh...@gmail.com
 To: dev@api.openoffice.org
 Subject: Re: [api-dev] pdf import programmatically
 
 2010/6/7 Wei Min Teo shaun...@hotmail.com
 
 
  Hi all,
 
  I am trying import pdf files to edit. I've installed the sun pdf import
  with openoffice 3.1. Pdf files seem to open fine in draw when i open it from
  the desktop.
 
  However, when i use the loadComponentFromURL method, it opens the file with
  writer and encoded text appears. I've also tried passing in MediaType in
  the mediadescriptor with the value of simpress8 but it doesn't work.
 
  How can i programmatically force it to open with draw and return a
  XComponent object?
 
 
 I guess you have to use
 http://api.openoffice.org/docs/common/ref/com/sun/star/system/XSystemShellExecute.html
 I don't know, I have never tried, but I found this webpage
 http://www.oooforum.org/forum/viewtopic.phtml?t=101602
 
 
 
 
 
 
  Thanks.
 
 
 
  Cheers,
 
 
 
  Wei Min
 
  _
  Hotmail: Trusted email with powerful SPAM protection.
  https://signup.live.com/signup.aspx?id=60969
 
 
 
 
 -- 
 Knut Olav Bøhmer
  
_
Hotmail: Trusted email with Microsoft’s powerful SPAM protection.
https://signup.live.com/signup.aspx?id=60969

RE: [api-dev] pdf import programmatically

2010-06-16 Thread Wei Min Teo

Hi,

 

Can anyone help me on this? Is there a way to force a document to open with 
draw programmatically? 
 
 From: shaun...@hotmail.com
 To: d...@openoffice.org; dev@api.openoffice.org
 Date: Mon, 7 Jun 2010 15:32:58 +0800
 Subject: [api-dev] pdf import programmatically
 
 
 Hi all,
 
 
 
 I am trying import pdf files to edit. I've installed the sun pdf import with 
 openoffice 3.1. Pdf files seem to open fine in draw when i open it from the 
 desktop.
 
 
 
 However, when i use the loadComponentFromURL method, it opens the file with 
 writer and encoded text appears. I've also tried passing in MediaType in 
 the mediadescriptor with the value of simpress8 but it doesn't work. 
 
 
 
 How can i programmatically force it to open with draw and return a XComponent 
 object?
 
 
 
 Thanks.
 
 
 
 Cheers,
 
 
 
 Wei Min
 
 _
 Hotmail: Trusted email with powerful SPAM protection.
 https://signup.live.com/signup.aspx?id=60969
  
_
Hotmail: Free, trusted and rich email service.
https://signup.live.com/signup.aspx?id=60969

[api-dev] pdf import programmatically

2010-06-07 Thread Wei Min Teo

Hi all,

 

I am trying import pdf files to edit. I've installed the sun pdf import with 
openoffice 3.1. Pdf files seem to open fine in draw when i open it from the 
desktop.

 

However, when i use the loadComponentFromURL method, it opens the file with 
writer and encoded text appears. I've also tried passing in MediaType in the 
mediadescriptor with the value of simpress8 but it doesn't work. 

 

How can i programmatically force it to open with draw and return a XComponent 
object?

 

Thanks.

 

Cheers,

 

Wei Min
  
_
Hotmail: Trusted email with powerful SPAM protection.
https://signup.live.com/signup.aspx?id=60969

RE: [api-dev] RE: [dev] Re: [api-dev] multiple connections to openoffice service

2010-03-31 Thread Wei Min Teo

Hi,

 

I am able to connect to openoffice fine. I can open multiple ports and also 
implement mutexes so that requests to the openoffice server is sort of 
serialised. However, I'm not sure if this will worsen performance for multiple 
processes connecting to the openoffice server. I seem to be unable to start 
more than 1 instance of openoffice unless they are of different users. Is there 
a way to start more than 1 openoffice for the same user?
 
 Date: Mon, 29 Mar 2010 09:27:01 +0200
 From: juergen.schm...@sun.com
 To: dev@api.openoffice.org
 Subject: Re: [api-dev] RE: [dev] Re: [api-dev] multiple connections to 
 openoffice service
 
 On 3/29/10 4:23 AM, Wei Min Teo wrote:
 
  Thanks.
 
 
 
  How do i go about running 2 instances of openoffice? Also, how can I ensure 
  that each process bootstraps and connect to its own instance?
 
 Please read the DevGuide and see the SDK examples how to connect to an 
 office.
 
 
 Juergen
 
 
  Date: Fri, 26 Mar 2010 08:21:33 +0100
  From: juergen.schm...@sun.com
  To: dev@api.openoffice.org
  CC: d...@openoffice.org
  Subject: [dev] Re: [api-dev] multiple connections to openoffice service
 
  On 3/26/10 4:16 AM, Wei Min Teo wrote:
 
  Hi all,
 
  I tried to connect to the openoffice service using 2 processes by running 
  2 instances of my program. They both connect to openoffice using the 
  default bootstrap c++ api. However, there seems to be unexpected 
  closure error and it keeps crashing openoffice. Was wondering if anyone 
  did something like this before?
 
  Do I have to implement some sort of mutex?
  Or is it possible to run 2 instances of openoffice and bootstrap to 2 
  different ports?
 
  Any suggestions on this?
  it is well known that OOo has threading problems and it is not
  surprising that you run into trouble quite fast in your described scenario.
 
  The best approach is indeed to put some mechanism around the connection
  stuff to dispatch the requests and work with more than one office instance.
 
  Juergen
 
  -
  To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
  For additional commands, e-mail: dev-h...@openoffice.org
 
  
  _
  Your E-mail and More On-the-Go. Get Windows Live Hotmail Free.
  https://signup.live.com/signup.aspx?id=60969
 
 
 
 -- 
 Sun Microsystems GmbH Juergen Schmidt
 Nagelsweg 55 Technical Lead Programmability
 20097 Hamburg, Germany
 
 Sitz der Gesellschaft:
 Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten
 Amtsgericht München: HRB 161028
 Geschäftsführer: Thomas Schröder
 
 -
 To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
 For additional commands, e-mail: dev-h...@api.openoffice.org
 
  
_
Hotmail: Trusted email with Microsoft’s powerful SPAM protection.
https://signup.live.com/signup.aspx?id=60969

[api-dev] RE: [dev] Re: [api-dev] multiple connections to openoffice service

2010-03-28 Thread Wei Min Teo

Thanks. 

 

How do i go about running 2 instances of openoffice? Also, how can I ensure 
that each process bootstraps and connect to its own instance? 
 
 Date: Fri, 26 Mar 2010 08:21:33 +0100
 From: juergen.schm...@sun.com
 To: dev@api.openoffice.org
 CC: d...@openoffice.org
 Subject: [dev] Re: [api-dev] multiple connections to openoffice service
 
 On 3/26/10 4:16 AM, Wei Min Teo wrote:
 
  Hi all,
 
  I tried to connect to the openoffice service using 2 processes by running 2 
  instances of my program. They both connect to openoffice using the default 
  bootstrap c++ api. However, there seems to be unexpected closure error 
  and it keeps crashing openoffice. Was wondering if anyone did something 
  like this before?
 
  Do I have to implement some sort of mutex?
  Or is it possible to run 2 instances of openoffice and bootstrap to 2 
  different ports?
 
  Any suggestions on this?
 it is well known that OOo has threading problems and it is not 
 surprising that you run into trouble quite fast in your described scenario.
 
 The best approach is indeed to put some mechanism around the connection 
 stuff to dispatch the requests and work with more than one office instance.
 
 Juergen
 
 -
 To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
 For additional commands, e-mail: dev-h...@openoffice.org
 
  
_
Your E-mail and More On-the-Go. Get Windows Live Hotmail Free.
https://signup.live.com/signup.aspx?id=60969

[api-dev] multiple connections to openoffice service

2010-03-25 Thread Wei Min Teo

Hi all, 

I tried to connect to the openoffice service using 2 processes by running 2 
instances of my program. They both connect to openoffice using the default 
bootstrap c++ api. However, there seems to be unexpected closure error and it 
keeps crashing openoffice. Was wondering if anyone did something like this 
before?

Do I have to implement some sort of mutex? 
Or is it possible to run 2 instances of openoffice and bootstrap to 2 different 
ports? 

Any suggestions on this? 

Thanks.   
_
Hotmail: Trusted email with Microsoft’s powerful SPAM protection.
https://signup.live.com/signup.aspx?id=60969

RE: [api-dev] loadcomponentfromurl

2009-11-08 Thread Wei Min Teo

Hi all,

 

Thanks for your responses. 

 

Let's assume that indeed those files are not legitimate .doc files. If 
someone creates a text file and renames it as .doc, the Writer encoding text 
dialog will pop out a UI. If I do choose a encoding such as UTF-8, it will be 
able to open the text file with no problems and the text will be readable. This 
is what i want to do programatically, to open with a specified encoding without 
using the pop-out UI. 

 

Is it possible to do this?

 

 

 

Cheers,

 

Wei Min
 
 Date: Fri, 6 Nov 2009 12:10:58 +0100
 From: mikhail.voyte...@sun.com
 To: dev@api.openoffice.org
 Subject: Re: [api-dev] loadcomponentfromurl
 
 Hi,
 
 On 11/06/09 10:26, Juergen Schmidt wrote:
  Mikhail Voytenko wrote:
  Hi,
 
  On 11/06/09 08:50, Juergen Schmidt wrote:
  Ariel Constenla-Haile wrote:
  Hello Wei,
 
  On Thursday 05 November 2009, 22:51, Wei Min Teo wrote:
  I'm not going to use any filters or perhaps it automatically uses a 
  default
  filter. Anyway, to clarify, I think my problem occurs with opening 
  *.doc
  or *.ppt files. When I open it prompts me on which character 
  encoding i
  want to use. This would hang an automation program. 
 
  this sounds like the Writer encoding text dialog, that shows up for 
  example when you try to open with OOo an unkown file format (by 
  default is treated as text, and you are prompted to select the 
  encoding, etc.)
 
  Aren't you passing a filter name?
 
  even if he doesn't use a filter name, the type detection should work 
  well for .doc and .ppt files. Sounds strange.
 
  The type detection works well and the correct filter is detected as I 
  understand. The problem here, is that the mentioned filters need 
  character encoding, thus the FilterOptions dialog ( not Unknown file 
  format dialog ) is shown.
 
  i don't think so. A valid .doc file is auto detected and the word filter 
  doesn't have a filter options dialog as far as i know. It looks more 
  like the scenario that Ariel has described.
 
 Sorry, I was wrong in my last comment.
 Indeed the text filter still wins sometimes by unknown formats, although 
 actually the filter selection dialog should be shown. And MSWord filter 
 has no filter options dialog.
 
  
  Maybe a complete code snippet could help to understand ...
 
 It is probably more interesting to take a look to the document. I 
 suspect that Bernard is right and the document is no valid .doc document.
 
 Best regards,
 Mikhail.
 
  
  Juergen
  
 
 -
 To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
 For additional commands, e-mail: dev-h...@api.openoffice.org
 
  
_
Windows 7: Simplify what you do everyday. Find the right PC for you.
http://windows.microsoft.com/shop

RE: [api-dev] loadcomponentfromurl

2009-11-05 Thread Wei Min Teo

Hi,

 

I'm not going to use any filters or perhaps it automatically uses a default 
filter. Anyway, to clarify, I think my problem occurs with opening *.doc or 
*.ppt files. When I open it prompts me on which character encoding i want to 
use. This would hang an automation program. Thus, I thought I could pass in 
the character encoding set for it to open by using ChracterSet UTF8 in the 
media descriptor. However, this didn't work even with UTF8. Do I have to use 
this with some filter implementation? If so, how can i do that? 

 

Or perhaps I need to implement an exceptionhandler for this case?

 

Thanks.

 

Cheers,

 

Wei Min
 
 Date: Thu, 5 Nov 2009 12:49:04 +0100
 From: mikhail.voyte...@sun.com
 To: dev@api.openoffice.org
 Subject: Re: [api-dev] loadcomponentfromurl
 
 Hi Wei Min,
 
 Please try UTF8 as the value.
 Although I am not sure that all the filters check the property. Which
 filter are you going to use?
 
 Best regards,
 Mikhail.
 
 On 11/05/09 09:50, Wei Min Teo wrote:
  Hi,
  
  
  
  I would like to specify a character encoding set to use when opening a 
  file. 
  
  Using 
  
  
  
  ploadprops[0].Name = CharacterSet
  
  ploadprops[0].Value = OUString::createFromAscii(UTF-8)
  
  ..
  
  
  
  However, this still doesn't seem to work. I suspect that the string i've 
  passed in is not valid. 
  
  How get i get a list of legitimate strings that characterset will take in 
  for loadcomponentfromurl??
  
  
  
  Thanks.
  
  
  
  
  
  Cheers,
  
  
  
  Wei Min
  
  _
  Windows 7: Simplify what you do everyday. Find the right PC for you.
  http://windows.microsoft.com/shop
  
 
 -
 To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
 For additional commands, e-mail: dev-h...@api.openoffice.org
 
  
_
New Windows 7: Simplify what you do everyday. Find the right PC for you.
http://windows.microsoft.com/shop

RE: [api-dev] password protected files

2009-11-04 Thread Wei Min Teo

Hi Mikhail,

 

Thanks for the reply. You're right, i'm using loadComponentFromURL(). 

 

How can i code a simple interactionhandler to detect the password event? 

If this is the only case i implement the interactionhandler to handle, will all 
other cases run through the default interactionhandler to throw the default 
exceptions?

 

Thanks. 

 

Cheers,

 

Wei Min
 
 Date: Wed, 4 Nov 2009 13:15:14 +0100
 From: mikhail.voyte...@sun.com
 To: dev@api.openoffice.org
 Subject: Re: [api-dev] password protected files
 
 Hi Wei Min,
 
 it depends from the API you are using.
 
 I suspect that you are using loadComponentFromURL(), in this case you
 can provide the InteractionHandler in the MediaDescriptor, the
 InteractionHandler would handle the document password request in this case.
 
 If the standard InteractionHandler implementation is provided to the
 call, the password dialog would be shown to user. You can also provide
 an own simple InteractionHandler implementation, that could for example
 detect whether document password request was done on loading ( that
 means that the document is encrypted one ). In the same way other
 problems during the loading could be handled.
 
 Hope that helps.
 
 Best regards,
 Mikhail.
 
 
 On 11/04/09 11:05, Wei Min Teo wrote:
  Hi,
  
  
  
  I was wondering if there's any way to identify password protected files 
  before opening it? 
  
  
  
  It doesn't seem to throw an aIOException or illegalArgumentException. It 
  just seems to fail XComponent.is(). The thing is that this could fail due 
  to other reasons. 
  
  
  
  
  
  
  
  
  
  Cheers,
  
  
  
  Wei Min
  
  
  
  
  
  _
  New Windows 7: Find the right PC for you. Learn more.
  http://windows.microsoft.com/shop
  
 
 -
 To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
 For additional commands, e-mail: dev-h...@api.openoffice.org
 
  
_
New Windows 7: Find the right PC for you. Learn more.
http://windows.microsoft.com/shop

[api-dev] Long file names

2009-09-30 Thread Wei Min Teo



Hi all,
 
It seems that openoffice has a maximum path name of 260 chars? 

However, I think the maximum path name for windows is 32,767 and file name is 
260 in unicode. 

 

Is it possible to pass in to the loadComponentFromUrl function using a relative 
path instead of an absolute path?

Are there any other workarounds? I can only think of making a copying to a temp 
file, do your work and copy back. 
 
Thanks.
 

 


Cheers,
Wei Min 
 

 







With Windows Live, you can organize, edit, and share your photos.
  
_
NEW! Get Windows Live FREE.
http://www.get.live.com/wl/all

RE: [api-dev] Re: [dev] Openoffice automation using a service

2009-09-17 Thread Wei Min Teo

Hi Tora,

 

Thanks for your replies and suggestions. However, I do not want to start 
soffice.exe as a normal user account as I would need the user account password 
or wait for a user logon. 

 

I realised the problem running a OO service as SYSTEM is that:

the service runs as a special account and OpenOffice.org will try to show the 
license agreement dialog as if it was a new user instead of starting the 
application.

 

To avoid this, you need to edit share\registry\data\org\openoffice\Setup.xcu 
(it's an XML file) inside the OpenOffice.org installation directory and replace 
this bit

 

This is the article that explains it: http://www.artofsolving.com/node/11
 

Cheers,

 

Wei Min

 
 Date: Mon, 14 Sep 2009 20:09:00 +0900
 From: t...@openoffice.org
 To: d...@openoffice.org
 CC: dev@api.openoffice.org
 Subject: [api-dev] Re: [dev] Openoffice automation using a service
 
 Sorry for multiple emails.
 
 If you attempt to use the following way, the user account for (1) and (2) 
 must be identical. Otherwise, (2) will start another instance of soffice.bin 
 from the scratch even though (1) is already running.
 
 The reason is that (1) will be waiting at its own named pipe, whose name will 
 be created based on a folder name for the user account or like that - I 
 forgot -, and (2) will also use the identical named pipe. So they will be 
 able to handshake each other.
 
 Please correct me if anyone finds misunderstandings.
 
 Tora
 
 tora - Takamichi Akiyama wrote:
  Another possible way (still, I am not sure, though):
  
  (1) Start soffice.exe as a normal user account with the following command 
  line options.
  soffice.exe -nofirststartwizard -nologo -nodefault -norestore 
  -nocrashreport -nolockcheck
  
  (2) And then use a recent way such as ::cppu::bootstrap() to connect to the 
  process of soffice.bin.
 
 -
 To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
 For additional commands, e-mail: dev-h...@api.openoffice.org
 

_
Share your memories online with anyone you want.
http://www.microsoft.com/singapore/windows/windowslive/products/photos-share.aspx?tab=1

[api-dev] RE: [dev] Openoffice automation using a service

2009-09-14 Thread Wei Min Teo

Hi,

 

Sorry for the confusion, I meant using the bootstrap function instead of the 
bootstrap command. This is in a program ran as local system. I used C++ for 
coding.

 

I used the sample code from this url 
:http://wiki.services.openoffice.org/wiki/UNO_registery_and_Bootstrapping under 
The new ::cppu::bootstrap() function.

Reference XComponentContext x_component_context(::cppu::bootstrap());
_x_multi_component_factory_client = Reference XMultiComponentFactory 
(x_component_context-getServiceManager());
_x_interface = Reference 
XInterface(_x_multi_component_factory_client-createInstanceWithContext(OUString::createFromAscii(com.sun.star.bridge.UnoUrlResolver
 ), x_component_context));
Reference XUnoUrlResolver resolver(_x_interface, UNO_QUERY);
_x_interface = Reference XInterface (resolver-resolve(connection_string), 
UNO_QUERY);
Reference XPropertySet x_prop_set(_x_interface, UNO_QUERY);
x_prop_set-getPropertyValue(OUString::createFromAscii(DefaultContext)) = 
x_component_context;
Reference XMultiComponentFactory 
x_multi_component_factory_server(x_component_context-getServiceManager());
_x_component_loader = Reference 
XComponentLoader(x_multi_component_factory_server-createInstanceWithContext(OUString(RTL_CONSTASCII_USTRINGPARAM(com.sun.star.frame.Desktop)),
 x_component_context), UNO_QUERY);

 
 Date: Mon, 14 Sep 2009 16:02:21 +0900
 From: t...@openoffice.org
 To: d...@openoffice.org
 CC: dev@api.openoffice.org
 Subject: Re: [dev] Openoffice automation using a service
 
 Hi,
 
 Wei Min Teo wrote:
  The first instance of soffice.exe is start by the bootstrap command, it is 
  ran as SYSTEM. I did not use any command line options just the default 
  bootstrap function cppu::bootstrap().
 
 I am sorry, but I cannot understand what you are saying.
 bootstrap command, bootstrap function cppu::bootstrap(), ...
 Maybe, I would need to study about that more.
 
 Possible recommended command line options could be found in this file,
 which is a source code of .jar file frequently used in the SDK to start 
 and/or connect to the process of soffice.bin through a named pipe.
 http://svn.services.openoffice.org/ooo/branches/OOO310/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
 
 Running soffice.bin as an account SYSTEM might be discouraged
 since the OpenOffice.org is a huge software and is not bug-free.
 There are possibilities to harm your system caused by a bug and/or security 
 hole.
 
 
  Another abnormality is that if i try to rerun the service,
  an additional copy of soffice will be run which shouldn't
  be the case because it usually searches for an existing instance.
 
 The phenomenon can be often observed, if a running user account
 has not yet accepted the license agreement. The first instance
 of soffice.bin is just waiting for user's actions, i.e. clicking
 on the 'OK' button behind the scene. The second one has established
 a connection to the first one and is waiting for its response.
 
 Ciao,
 Tora
 
 
 -
 To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
 For additional commands, e-mail: dev-h...@openoffice.org
 

_
See all the ways you can stay connected to friends and family
http://www.microsoft.com/windows/windowslive/default.aspx

[api-dev] Openoffice automation using a service

2009-09-13 Thread Wei Min Teo

Hi all,

 

I'm trying to do some openoffice automation using a service running as 
LOCAL_SYSTEM on XP so that it runs without needing a login. However, the 
program seems to get stuck at bootstrap command: cppu::bootstrap(). It does not 
throw any exception and it does not crash. 

 

Soffice.bin/Soffice.exe is run as LOCAL_SYSTEM as well which means bootstrap is 
able to run soffice at least... Another abnormality is that if i try to rerun 
the service, an additional copy of soffice will be run which shouldn't be the 
case because it usually searches for an existing instance. 

 

Has anyone encountered a similar problem before? How can i resolve this? 

 

Thanks.

 

Cheers,

Wei Min 

 


 

_
With Windows Live, you can organize, edit, and share your photos.
http://www.microsoft.com/singapore/windows/windowslive/products/photo-gallery-edit.aspx

[api-dev] RE: [dev] Openoffice automation using a service

2009-09-13 Thread Wei Min Teo

Hi,

 

The first instance of soffice.exe is start by the bootstrap command, it is ran 
as SYSTEM. I did not use any command line options just the default bootstrap 
function cppu::bootstrap(). 
 
 Date: Mon, 14 Sep 2009 13:18:15 +0900
 From: t...@openoffice.org
 To: d...@openoffice.org
 CC: dev@api.openoffice.org
 Subject: Re: [dev] Openoffice automation using a service
 
 Hi,
 
 How do you start the first instance of soffice.exe?
 You mentioned a service running as LOCAL_SYSTEM.
 
 Could you give us a little bit details about that?
 What command line options do you give to the soffice.exe?
 What user account is being used for the process of soffice.exe?
 etc...
 
 I guess that behavior is well-known and its solution is described somewhere.
 Does anyone know that?
 
 Cheers,
 Tora
 
 Wei Min Teo wrote:
  Hi all,
  
  I'm trying to do some openoffice automation using a service running as 
  LOCAL_SYSTEM on XP so that it runs without needing a login. However, the 
  program seems to get stuck at bootstrap command: cppu::bootstrap(). It does 
  not throw any exception and it does not crash. 
  
  Soffice.bin/Soffice.exe is run as LOCAL_SYSTEM as well which means 
  bootstrap is able to run soffice at least... Another abnormality is that if 
  i try to rerun the service, an additional copy of soffice will be run which 
  shouldn't be the case because it usually searches for an existing instance. 
  
  Has anyone encountered a similar problem before? How can i resolve this? 
  
  Thanks.
  
  Cheers,
  Wei Min 
 
 
 -
 To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
 For additional commands, e-mail: dev-h...@openoffice.org
 

_
With Windows Live, you can organize, edit, and share your photos.
http://www.microsoft.com/singapore/windows/windowslive/products/photo-gallery-edit.aspx

RE: [api-dev] Any way to turn off error reporting in openoffice?

2009-08-28 Thread Wei Min Teo

Thanks. However, won't setting -norestore cause openoffice not to automatically 
start up after the crash?

 

Can I pass this parameter in programatically instead of running via 
commandline? I am presently using just the simple bootstrap function for c++. 
 
 Date: Fri, 28 Aug 2009 09:06:50 +0200
 From: nospamfor...@gmx.de
 To: dev@api.openoffice.org
 Subject: Re: [api-dev] Any way to turn off error reporting in openoffice?
 
 Wei Min Teo wrote:
 
  Hi all,
  
  
  
  I've had some error opening the following file: XL8GALRY.XLS (some file in 
  MS office installation files). Openoffice tries to open it and i see a 
  progress bar telling me it's calculating but it gets stuck halfway and 
  crashes openoffice. It then brings up a recovery file screen and prompts me 
  to report the error.
  
  
  
  My questions are:
  
  
  
  1) Any idea why i have problems opening the file? (Initially i suspected 
  that it runs some macro but i passed in NEVER EXECUTE in the media 
  description)
  
  
  
  2) Is there anyway to catch this problem or turn off error reporting so 
  that i can continue with automation of openoffice?
 
 You can switch off the file recovery process (IIRC by passing
 --norestore on the command line), but of course the crash caused by
 this file will happen also.
 
 Perhaps you can create a bug report and attach your file so that the
 Calc developers can reproduce the problem easily.
 
 Regards,
 Mathias
 
 -- 
 Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
 OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
 Please don't reply to nospamfor...@gmx.de.
 I use it for the OOo lists and only rarely read other mails sent to it.
 
 
 -
 To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
 For additional commands, e-mail: dev-h...@api.openoffice.org
 

_
With Windows Live, you can organize, edit, and share your photos.
http://www.microsoft.com/singapore/windows/windowslive/products/photo-gallery-edit.aspx

[api-dev] Any way to turn off error reporting in openoffice?

2009-08-27 Thread Wei Min Teo

Hi all,

 

I've had some error opening the following file: XL8GALRY.XLS (some file in MS 
office installation files). Openoffice tries to open it and i see a progress 
bar telling me it's calculating but it gets stuck halfway and crashes 
openoffice. It then brings up a recovery file screen and prompts me to report 
the error.

 

My questions are:

 

1) Any idea why i have problems opening the file? (Initially i suspected that 
it runs some macro but i passed in NEVER EXECUTE in the media description)

 

2) Is there anyway to catch this problem or turn off error reporting so that i 
can continue with automation of openoffice?

 

Thanks. 

 

Cheers,

Wei Min

_
More than messages–check out the rest of the Windows Live™.
http://www.microsoft.com/windows/windowslive/

[api-dev] MS document header formatting not retained in OO

2009-08-24 Thread Wei Min Teo

Hi all,

 

I am trying to open and read the different headers of different pages on a 
document in order to sort them. So far, my code works fine for openoffice 
files, i'm able to access each page and get their relevant pagestyle names to 
get the different headers. However, using this same code on MS files however 
seem to result on a bug. The problem is as follows:

 

I am able to access the headers fine for only the first section. If there are 
headers on a new section, the headers read by the program appears as . 
However, when i physically open the MS document, I am able to physically see 
the header of the second section. But I am just not able to get it 
programatically, I also lose that formatting when i save it as a ODT file. 

 

Am I doing something wrong or there are just some compatability issues with MS 
documents? Would this be updated with future versions of the sdk? I am 
currently using 3.1.

 

Thanks.

 

 

Cheers,

 

Wei Min

_
With Windows Live, you can organize, edit, and share your photos.
http://www.microsoft.com/singapore/windows/windowslive/products/photo-gallery-edit.aspx

RE: [api-dev] MS document header formatting not retained in OO

2009-08-24 Thread Wei Min Teo

Hi Juergen,

 

That is what i found strange. I did not set any filters. Even when i did not do 
any programatically, I simply used openoffice to open the MS document using 
swriter and save as ODT document. The header in section 2 is still lost. 
However, different headers in section 1 are retained. Or are there filters 
automatically set with the openoffice 'save as' function?
 
 Date: Mon, 24 Aug 2009 10:29:36 +0200
 From: juergen.schm...@sun.com
 To: dev@api.openoffice.org
 CC: d...@openoffice.org
 Subject: Re: [api-dev] MS document header formatting not retained in OO
 
 Hi Wei Min,
 
 it sounds like a filter problem. Once a document is loaded in the 
 internal document model the API access should be same regardless the 
 format. Please someone correct me if i am wrong
 
 Juergen
 
 Wei Min Teo wrote:
  Hi all,
  
  
  
  I am trying to open and read the different headers of different pages on a 
  document in order to sort them. So far, my code works fine for openoffice 
  files, i'm able to access each page and get their relevant pagestyle names 
  to get the different headers. However, using this same code on MS files 
  however seem to result on a bug. The problem is as follows:
  
  
  
  I am able to access the headers fine for only the first section. If there 
  are headers on a new section, the headers read by the program appears as 
  . However, when i physically open the MS document, I am able to 
  physically see the header of the second section. But I am just not able to 
  get it programatically, I also lose that formatting when i save it as a ODT 
  file. 
  
  
  
  Am I doing something wrong or there are just some compatability issues with 
  MS documents? Would this be updated with future versions of the sdk? I am 
  currently using 3.1.
  
  
  
  Thanks.
  
  
  
  
  
  Cheers,
  
  
  
  Wei Min
  
  _
  With Windows Live, you can organize, edit, and share your photos.
  http://www.microsoft.com/singapore/windows/windowslive/products/photo-gallery-edit.aspx
  
 
 
 -
 To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
 For additional commands, e-mail: dev-h...@api.openoffice.org
 

_
More than messages–check out the rest of the Windows Live™.
http://www.microsoft.com/windows/windowslive/

[api-dev] How to enumerate text document by pages?

2009-08-20 Thread Wei Min Teo

Basically i want to get the header of every page. I can get HeaderText, 
HeaderTextLeft, and HeaderTextRight.

However, there may be additional headers for different sections. 

 

How can i enumerate through a text document by pages to check its individual 
header?

I tried using construct XIndexAccess using a XDocument but it doesn't seem to 
work.

Also, I've tried using XTextCursor, but it doesn't seem to have a gotopage 
method. 

 

Thanks. 

 

Cheers,

Wei Min

_
With Windows Live, you can organize, edit, and share your photos.
http://www.microsoft.com/singapore/windows/windowslive/products/photo-gallery-edit.aspx

[api-dev] How to get footer of presentation slide?

2009-08-19 Thread Wei Min Teo


Hi all,
 
1) I was wondering how i can access the footer of presentation slides? 

Sample:

Reference XDrawPagesSupplier  rDrawDoc(xcomponent, UNO_QUERY);
Reference XDrawPages  rDrawPages = rDrawDoc-getDrawPages();
Reference XNameAccess  rNameAccess (rDrawPages, UNO_QUERY);
Reference 
XNameContainerxNameContainer(rNameAccess-getByName(OUString::CreateFromAscii(PageStyles)),
 UNO_QUERY);
Reference XStyle 
xStyle(xNameContainer-getByName(OUString::CreateFromAscii(default)), 
UNO_QUERY);
Reference XPropertySet  xStyleProps(xStyle, UNO_QUERY);
Reference XText 
xtxt(xStyleProps-getPropertyValue(OUString::CreateFromAscii(FooterText)), 
UNO_QUERY) ;
OUString footer = xtxt- getString();

However, rNameAccess doesn't seem to have an element that is called 
PageStyles. 
I tried:

Sequence  OUString xSeq = rNameAccess - getElemenetNames();
but this doesn't seem to populate the xSeq properly. 
2) How can i get element names or property names of an object?

3) Also, How can I do it so that i iterate through and check the footer of 
every page because the pages seem to be of Any type rather than something 
NameAccess can handle?
 
Reference XIndexAccess  rPageIndexAccess(rDrawPages, UNO_QUERY);
Any DrawPage = rPageIndexAccess-getByIndex(0);

Thanks

_
Share your memories online with anyone you want.
http://www.microsoft.com/singapore/windows/windowslive/products/photos-share.aspx?tab=1

[api-dev] How to get footer from presentation?

2009-08-18 Thread Wei Min Teo

Hi all,

 

Sorry if u're receiving this again. I've sent this previously without 
subscribing to the group and wasn't sure if it went through. 
 
1) I was wondering how i can access the footer of presentation slides? 

Sample:

Reference XDrawPagesSupplier  rDrawDoc(xcomponent, UNO_QUERY);
Reference XDrawPages  rDrawPages = rDrawDoc-getDrawPages();
Reference XNameAccess  rNameAccess (rDrawPages, UNO_QUERY);
Reference 
XNameContainerxNameContainer(rNameAccess-getByName(OUString::CreateFromAscii(PageStyles)),
 UNO_QUERY);
Reference XStyle 
xStyle(xNameContainer-getByName(OUString::CreateFromAscii(default)), 
UNO_QUERY);
Reference XPropertySet  xStyleProps(xStyle, UNO_QUERY);
Reference XText 
xtxt(xStyleProps-getPropertyValue(OUString::CreateFromAscii(FooterText)), 
UNO_QUERY) ;
OUString footer = xtxt- getString();

However, rNameAccess doesn't seem to have an element that is called 
PageStyles. 
I tried:

Sequence  OUString xSeq = rNameAccess - getElemenetNames();
but this doesn't seem to populate the xSeq properly. 
2) How can i get element names or property names of an object?

3) Also, How can I do it so that i iterate through and check the footer of 
every page because the pages seem to be of Any type rather than something 
NameAccess can handle?
 
Reference XIndexAccess  rPageIndexAccess(rDrawPages, UNO_QUERY);
Any DrawPage = rPageIndexAccess-getByIndex(0);

Thanks



_
More than messages–check out the rest of the Windows Live™.
http://www.microsoft.com/windows/windowslive/