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

2010-10-05 Thread Wei Min Teo

Hi,

 

I'm using c++, and ran it with CreateProcess with commandline as such:

 

soffice.exe -accept=socket,host127.0.0.1,port=8100;urp; -headless 
-nofirststartwizard -norestore -nocrashreport

 

Then i just use the default cppu::bootstrap. It does connect to port 8100 by 
default right?

 

I opened the documents with loadcomponentfromurl. However, it does not seem to 
be completely headless for those cases. I must be doing something wrong..

 

 

Cheers,

 

Wei Min


 
 Date: Mon, 4 Oct 2010 21:39:02 -0400
 From: and...@pitonyak.org
 To: dev@openoffice.org
 Subject: Re: [dev] Suppressing Future Version and Recovery Dialog Boxes
 
 can you start soffice with -norestore
 
 On 10/04/2010 12:25 PM, Wei Min Teo wrote:
  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
  
 
 -- 
 Andrew Pitonyak
 My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
 My Book: http://www.hentzenwerke.com/catalog/oome.htm
 Info: http://www.pitonyak.org/oo.php
 See Also: http://documentation.openoffice.org/HOW_TO/index.html
 
 
 -
 To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
 For additional commands, e-mail: dev-h...@openoffice.org
 
  

[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: [dev] RE: [api-dev] pdf import programmatically

2010-06-21 Thread Wei Min Teo

Hi Thibault Vataire,

 

Thanks. I think this seem like it should work. It was suggested by cor nouws 
too.

 

The problem with these filter fields or other properties is that i can't seem 
to find any documentation as to what strings it accepts.

 

Thanks again
 
 Date: Thu, 17 Jun 2010 09:15:09 +
 From: tvata...@starxpert.fr
 To: dev@openoffice.org
 Subject: Re: [dev] RE: [api-dev] pdf import programmatically
 
 Hi,
 
 To open you document programmatically, you can do that :
 
 sub main
 
 dim xComp as object
 dim args(0) as new com.sun.star.beans.PropertyValue
 
 args(0).name = FilterName
 args(0).value = draw_pdf_import
 
 xComp = 
 starDesktop.loadComponentFromUrl(convertToUrl(/home/tvataire/Bureau/resultat.pdf),
  _blank, com.sun.star.frame.FrameSearchFlag.CREATE, args)
 
 end sub
 
 This works on a pdf document previously created with Writer.
 I'm working with OOo 3.2 on Ubuntu.
 
 Regards,
 Thibault Vataire
 
 
 - Mail Original -
 De: Wei Min Teo shaun...@hotmail.com
 À: dev@openoffice.org, d...@api.openoffice.org
 Envoyé: Jeudi 17 Juin 2010 04:34:36
 Objet: [dev] RE: [api-dev] pdf import programmatically
 
 
 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: dev@openoffice.org; d...@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
 
 -
 To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
 For additional commands, e-mail: dev-h...@openoffice.org
 
  
_
Hotmail: Trusted email with powerful SPAM protection.
https://signup.live.com/signup.aspx?id=60969

[dev] 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: dev@openoffice.org; d...@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

[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: [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: d...@api.openoffice.org
 CC: dev@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

[dev] Security

2009-10-20 Thread Wei Min Teo

Hi all,

 

Are there any known security flaws in the latest openoffice version that has 
been disclosed? 

 

I only seem to be able to find bulletin page for the vulnerabilites fixes for 
all the different versions. If anyone feels uncomfortable revealing this 
information even though it's disclosed, do email me privately. Thanks. 

 

 

 

Cheers,

 

Wei Min
  
_
NEW! Get Windows Live FREE.
http://www.get.live.com/wl/all

[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: [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: dev@openoffice.org
 CC: d...@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

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: dev@openoffice.org
 CC: d...@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: [dev] RE: [api-dev] MS document header formatting not retained in OO

2009-08-27 Thread Wei Min Teo

Thanks all for giving me suggestions on the fixes.

 

Anyway, I have tested the problem with some other files and it seems to work 
okay. It seems that it only occurs on one particular file and i was unable to 
recreate the problem. I'll follow up with more details if i know what's wrong. 
Thanks. 
 
 From: shaun...@hotmail.com
 To: dev@openoffice.org
 Date: Tue, 25 Aug 2009 09:45:08 +0800
 Subject: RE: [dev] RE: [api-dev] MS document header formatting not retained 
 in OO
 
 
 Hi Juergen, 
 
 
 
 The import seems to work fine because i can physically see the header in the 
 second section. The page style name was automatically renamed to Convert 1. 
 However, when i save this to odt and reopen the file, it's lost. 
 
  Date: Mon, 24 Aug 2009 12:49:08 +0200
  From: juergen.schm...@sun.com
  To: dev@openoffice.org
  Subject: Re: [dev] RE: [api-dev] MS document header formatting not retained 
  in OO
  
  when you save to odf the appropriate filter is used. The problem was 
  probably already during the import when the MS import filter was used. 
  When the info is not present the export can't the info at all...
  
  I am only guessing that this is the problem.
  
  Juergen
  
  Wei Min Teo wrote:
   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: d...@api.openoffice.org
   CC: dev@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/
   
  
  
  -
  To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
  For additional commands, e-mail: dev-h...@openoffice.org
  
 
 _
 What can you do with the new Windows Live? Find out
 http://www.microsoft.com/windows/windowslive/default.aspx

_
What can you do with the new Windows Live? Find out
http://www.microsoft.com/windows/windowslive/default.aspx

[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

[dev] 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: d...@api.openoffice.org
 CC: dev@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/

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

2009-08-24 Thread Wei Min Teo

Hi Juergen, 

 

The import seems to work fine because i can physically see the header in the 
second section. The page style name was automatically renamed to Convert 1. 
However, when i save this to odt and reopen the file, it's lost. 
 
 Date: Mon, 24 Aug 2009 12:49:08 +0200
 From: juergen.schm...@sun.com
 To: dev@openoffice.org
 Subject: Re: [dev] RE: [api-dev] MS document header formatting not retained 
 in OO
 
 when you save to odf the appropriate filter is used. The problem was 
 probably already during the import when the MS import filter was used. 
 When the info is not present the export can't the info at all...
 
 I am only guessing that this is the problem.
 
 Juergen
 
 Wei Min Teo wrote:
  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: d...@api.openoffice.org
  CC: dev@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/
  
 
 
 -
 To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
 For additional commands, e-mail: dev-h...@openoffice.org
 

_
What can you do with the new Windows Live? Find out
http://www.microsoft.com/windows/windowslive/default.aspx

[dev] How to get footer of presentation slide?

2009-08-18 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
_
See all the ways you can stay connected to friends and family
http://www.microsoft.com/windows/windowslive/default.aspx

RE: [dev] How to get footer of presentation slide?

2009-08-18 Thread Wei Min Teo

Is this the right place to ask qns regarding the api? Or i should be asking 
this questions in another mailing list?

 

Thanks. 
 
 From: shaun...@hotmail.com
 To: dev@openoffice.org
 Date: Tue, 18 Aug 2009 14:42:11 +0800
 Subject: [dev] How to get footer of presentation slide?
 
 
 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
 _
 See all the ways you can stay connected to friends and family
 http://www.microsoft.com/windows/windowslive/default.aspx

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

RE: [dev] Runtime error for DocumentLoader

2009-08-12 Thread Wei Min Teo

I think i missed out some stuff that i've tried to troubleshoot. Hope this 
helps in understanding my problem. Thanks.
Reference  XComponent  xComponent = 
xComponentLoader-loadComponentFromURL(sAbsoluteDocUrl, OUString( 
RTL_CONSTASCII_STRINGPARAM(_blank),0,Sequence 
::com::sun::star:beans::PropertyValue);

I've stepped in and the code seems to return fine from OUString. I suspect 
either a Sequence structure cannot be instantiated or some error with 
loadComponentFromURL. I tried a try/catch block and it doesn't seem to throw an 
exception as well. 

 From: shaun...@hotmail.com
 To: dev@openoffice.org
 Date: Wed, 12 Aug 2009 13:52:10 +0800
 Subject: [dev] Runtime error for DocumentLoader
 
 
 
 Hi,
 I've only recently managed to get the sdk to be configured to the VS2008 
 environment. I tried to get the document loader example to work but it 
 returns the following error:
 Unhandled expcetion at 0x00b8.. Access violation reading 
 location..
 at this line of code:Reference  XComponent  xComponent = 
 xComponentLoader-loadComponentFromURL(.);
 Nothing happens in the program, but i think an instance of the component is 
 created because it has an address. However, no interface pops out or 
 anything. Or does that only happen when i loadcomponent? Or am i passing 
 argv[1] wrongly?
 How do i resolve this? Thanks.
 Cheers,
 Wei Min
 
 
 
 
 
 Previously, I had the following runtime errors:
 Error: cannot establish a connection using 'uno:socket,host=localhost, 
 post2083;urp;StarOffice.ServiceManager'   Connector : couldn't connect to 
 socket WSANOTINITIALISED, WSAStartup() has not been called
 Resolved by:
 WSADATA wsaData;WSAStartup(MAKEWORD(2,2), wsaData);
 Error: cannot establish a connection using 'uno:socket,host=localhost, 
 post2083;urp;StarOffice.ServiceManager'   Connector : couldn't connect to 
 socket WSACONNREFUSED, Connection refused
 Resolved by:
 soffice -accept=socket,host=localhost,port=2083;urp;
 
 _
 More than messages–check out the rest of the Windows Live™.
 http://www.microsoft.com/windows/windowslive/

_
What can you do with the new Windows Live? Find out
http://www.microsoft.com/windows/windowslive/default.aspx

RE: [dev] Runtime error for DocumentLoader

2009-08-12 Thread Wei Min Teo

Hi Stephan,
I'm using Openoffice 3.1 and sdk 3.1 as well. However, it seems like the 
connection is fine... the code seems to run well passed that part once i call 
WSAStartup().

 Date: Wed, 12 Aug 2009 09:16:14 +0200
 From: stephan.bergm...@sun.com
 To: dev@openoffice.org
 Subject: Re: [dev] Runtime error for DocumentLoader
 
 On 08/12/09 07:52, Wei Min Teo wrote:
  I've only recently managed to get the sdk to be configured to the VS2008 
  environment. I tried to get the document loader example to work but it 
  returns the following error:
  Unhandled expcetion at 0x00b8.. Access violation reading 
  location..
  at this line of code:Reference  XComponent  xComponent = 
  xComponentLoader-loadComponentFromURL(.);
  Nothing happens in the program, but i think an instance of the component is 
  created because it has an address. However, no interface pops out or 
  anything. Or does that only happen when i loadcomponent? Or am i passing 
  argv[1] wrongly?
  How do i resolve this? Thanks.
  Cheers,
  Wei Min
  
  Previously, I had the following runtime errors:
  Error: cannot establish a connection using 'uno:socket,host=localhost, 
  post2083;urp;StarOffice.ServiceManager'   Connector : couldn't connect 
  to socket WSANOTINITIALISED, WSAStartup() has not been called
  Resolved by:
  WSADATA wsaData;WSAStartup(MAKEWORD(2,2), wsaData);
  Error: cannot establish a connection using 'uno:socket,host=localhost, 
  post2083;urp;StarOffice.ServiceManager'   Connector : couldn't connect 
  to socket WSACONNREFUSED, Connection refused
  Resolved by:
  soffice -accept=socket,host=localhost,port=2083;urp;
 
 What exact version of SDK (and OOo) do you use?  The WSAStartup error is 
 most probably the root of your problems.  On Windows, when the SDK 
 document loader example application (or any other application, for that 
 matter) wants to communicate with the OOo application, it does so using 
 the winsock library, which needs to be initialized to work properly. 
 This initialization code moved around a bit in OOo 3.x (it used to be in 
 the sal library, but had to be moved to the applications themselves).
 
 -Stephan
 
 -
 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

[dev] Runtime error for DocumentLoader

2009-08-11 Thread Wei Min Teo


Hi,
I've only recently managed to get the sdk to be configured to the VS2008 
environment. I tried to get the document loader example to work but it returns 
the following error:
Unhandled expcetion at 0x00b8.. Access violation reading location..
at this line of code:Reference  XComponent  xComponent = 
xComponentLoader-loadComponentFromURL(.);
Nothing happens in the program, but i think an instance of the component is 
created because it has an address. However, no interface pops out or anything. 
Or does that only happen when i loadcomponent? Or am i passing argv[1] wrongly?
How do i resolve this? Thanks.
Cheers,
Wei Min





Previously, I had the following runtime errors:
Error: cannot establish a connection using 'uno:socket,host=localhost, 
post2083;urp;StarOffice.ServiceManager'   Connector : couldn't connect to 
socket WSANOTINITIALISED, WSAStartup() has not been called
Resolved by:
WSADATA wsaData;WSAStartup(MAKEWORD(2,2), wsaData);
Error: cannot establish a connection using 'uno:socket,host=localhost, 
post2083;urp;StarOffice.ServiceManager'   Connector : couldn't connect to 
socket WSACONNREFUSED, Connection refused
Resolved by:
soffice -accept=socket,host=localhost,port=2083;urp;

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

[dev] Compile errors for OpenOffice SDK example

2009-08-05 Thread Wei Min Teo

Hi all,
I'm not sure if this is the right forum to ask this, do help me redirect if 
this is the wrong place. My problem is as follows:
I am trying to configure OpenOffice SDK 3.1.0 on Windows XP on VS2008 C++ with 
OpenOffice 3.0.1 installed. I've managed to run cppumaker and it made all the 
include files in cppinclude. However, when i tried to compile the 
documentloader example, I've have numerous compile errors(26) in type.h such as 
syntax errors, missing ')', ';' etc. There are also errors in any.h like 
missing type specifier -int assumed: C++ does not support default-int, 
'TypeClass' undeclared identifier. And type.hxx errors like {ctor} member 
function redelclaration not allowed and '_pType' : function-style initializer 
appears to be a function definition. I've also got tons of warnings(358) from 
reference.h with C+ exception specification ignored except to indicate a 
function is not __delspec(nothrow).

How can I compile and use UNO? Am i missing some other configuration?

Thanks in advance.

Cheers,Wei Min

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

RE: [dev] Compile errors for OpenOffice SDK example

2009-08-05 Thread Wei Min Teo

Actually prior to these errors,

I've had this error : Could not find 16-bit type, add support for your 
architecture.

I then added:

#define WNT
#define CPPU_ENV msci

I hope this is the right way to solve that error. And then i'm stuck again.

 From: shaun...@hotmail.com
 To: dev@openoffice.org
 Date: Wed, 5 Aug 2009 15:21:21 +0800
 Subject: [dev] Compile errors for OpenOffice SDK example
 
 
 Hi all,
 I'm not sure if this is the right forum to ask this, do help me redirect if 
 this is the wrong place. My problem is as follows:
 I am trying to configure OpenOffice SDK 3.1.0 on Windows XP on VS2008 C++ 
 with OpenOffice 3.0.1 installed. I've managed to run cppumaker and it made 
 all the include files in cppinclude. However, when i tried to compile the 
 documentloader example, I've have numerous compile errors(26) in type.h such 
 as syntax errors, missing ')', ';' etc. There are also errors in any.h like 
 missing type specifier -int assumed: C++ does not support default-int, 
 'TypeClass' undeclared identifier. And type.hxx errors like {ctor} member 
 function redelclaration not allowed and '_pType' : function-style initializer 
 appears to be a function definition. I've also got tons of warnings(358) from 
 reference.h with C+ exception specification ignored except to indicate a 
 function is not __delspec(nothrow).
 
 How can I compile and use UNO? Am i missing some other configuration?
 
 Thanks in advance.
 
 Cheers,Wei Min
 
 _
 See all the ways you can stay connected to friends and family
 http://www.microsoft.com/windows/windowslive/default.aspx

_
What can you do with the new Windows Live? Find out
http://www.microsoft.com/windows/windowslive/default.aspx