Re: [dev] Writer Automation with Delphi
Alejandro Rufino wrote: The problem is that the Read Only mode doesn't work, nither preview or in normal mode, and the size of the window and preview zoom can't be re adjusted. Then I'm sorry, I don't have an idea what might be the problem, it must be related to the Delphi environment and I don't know anything about it. Best regards, Mathias -- Mathias Bauer - OpenOffice.org Application Framework Project Lead Please reply to the list only, [EMAIL PROTECTED] is a spam sink. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] Writer Automation with Delphi
Hi Mathias Thanks for your help I Wrote the program that opens the document in Read Only Mode. The Code is: function TSampleCode.CreateTextDocument(cFileName:string): Boolean; var ServiceManager,StarDesktop,Document,LoadParams,PropertyValue, CoreReflection: variant; begin try ServiceManager:=CreateOleObject('com.sun.star.ServiceManager'); StarDesktop:=ServiceManager.CreateInstance('com.sun.star.frame.Desktop'); CoreReflection := ServiceManager.createInstance('com.sun.star.reflection.CoreReflection'); CoreReflection .forName('com.sun.star.beans.PropertyValue') .createObject(PropertyValue); LoadParams := VarArrayCreate([0, 1], varVariant); PropertyValue.Name := 'Readonly'; PropertyValue.Value := true; PropertyValue.Name := 'Preview'; PropertyValue.Value := true; LoadParams[0] := PropertyValue; LoadParams[1] := PropertyValue; Document:= StarDeskTop.LoadComponentFromUrl(cFileName,'_blank',0,LoadParams); CreateTextDocument:=true; except CreateTextDocument:=false; end; end; procedure TForm1.Button1Click(Sender: TObject); var SampleCode:TSampleCode; cFileName:string; begin OpenDialog1.Execute; cFileName:=OpenDialog1.FileName; cFileName := 'file:///'+StringReplace(cFileNAme , '\', '/',[rfReplaceAll]); SampleCode:=TSampleCode.Create; if (not SampleCode.CreateTextDocument(cFileName)) then Label1.Caption:='Error' else Label1.Caption:='Document Open'; end; The Lines PropertyValue.Name := 'Preview' and PropertyValue.Value := true; make that the openoffice starts in preview mode (no menus, no toolbars). The problem is that the Read Only mode doesn't work, nither preview or in normal mode, and the size of the window and preview zoom can't be re adjusted. Best Regards, Alejandro Rufino - Original Message - From: Mathias Bauer [EMAIL PROTECTED] To: dev@openoffice.org Sent: Thursday, February 02, 2006 8:18 PM Subject: Re: [dev] Writer Automation with Delphi Ale Rufino wrote: Hi This is a Kiosk application, in witch the user won't be able to see the OppenOffice instance. For this reason I have to write a program that shows to the user the complete document, I can open the document but I can't see the document is in my program. Using a TOleContainer control in Delphi it only shows the first page of the document. Other option could be, to open the OppenOficce and delete all the menus and hotkeys. I tried to use the SoActiveX component but I have no documentation to use it. please try what I suggested you to do (open the file in readonly mode). This should allow you to see the whole file and scroll through it. If this works we can see in the next step how you can remove the user interface elements. BTW: SoActiveX still has a toolbar, you won't win anything using it. Best regards, Mathias -- Mathias Bauer - OpenOffice.org Application Framework Project Lead Please reply to the list only, [EMAIL PROTECTED] is a spam sink. - 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] Writer Automation with Delphi
Ale Rufino wrote: Hi This is a Kiosk application, in witch the user won't be able to see the OppenOffice instance. For this reason I have to write a program that shows to the user the complete document, I can open the document but I can't see the document is in my program. Using a TOleContainer control in Delphi it only shows the first page of the document. Other option could be, to open the OppenOficce and delete all the menus and hotkeys. I tried to use the SoActiveX component but I have no documentation to use it. please try what I suggested you to do (open the file in readonly mode). This should allow you to see the whole file and scroll through it. If this works we can see in the next step how you can remove the user interface elements. BTW: SoActiveX still has a toolbar, you won't win anything using it. Best regards, Mathias -- Mathias Bauer - OpenOffice.org Application Framework Project Lead Please reply to the list only, [EMAIL PROTECTED] is a spam sink. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] Writer Automation with Delphi
Ale Rufino wrote: Hi Christian, When I send the first message I'm not correctly suscrived and I Think that the message not send. I need to do a Delphi Program that only do a preview of a OpenOffice document with the opcion of print them. The user has no modified then. I use a Delphi's TOleContainer Component but only can show the first page, and cant't scroll it. That sounds like you have opened the file in Preview mode. Try to open it in read only mode instead. Best regards, Mathias -- Mathias Bauer - OpenOffice.org Application Framework Project Lead Please reply to the list only, [EMAIL PROTECTED] is a spam sink. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] Writer Automation with Delphi
Hi This is a Kiosk application, in witch the user won't be able to see the OppenOffice instance. For this reason I have to write a program that shows to the user the complete document, I can open the document but I can't see the document is in my program. Using a TOleContainer control in Delphi it only shows the first page of the document. Other option could be, to open the OppenOficce and delete all the menus and hotkeys. I tried to use the SoActiveX component but I have no documentation to use it. Thanks Alejandro - Original Message - From: Mathias Bauer [EMAIL PROTECTED] To: dev@openoffice.org Sent: Wednesday, February 01, 2006 4:19 AM Subject: Re: [dev] Writer Automation with Delphi Ale Rufino wrote: Hi Christian, When I send the first message I'm not correctly suscrived and I Think that the message not send. I need to do a Delphi Program that only do a preview of a OpenOffice document with the opcion of print them. The user has no modified then. I use a Delphi's TOleContainer Component but only can show the first page, and cant't scroll it. That sounds like you have opened the file in Preview mode. Try to open it in read only mode instead. Best regards, Mathias -- Mathias Bauer - OpenOffice.org Application Framework Project Lead Please reply to the list only, [EMAIL PROTECTED] is a spam sink. - 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] Writer Automation with Delphi
Hi Christian, When I send the first message I'm not correctly suscrived and I Think that the message not send. I need to do a Delphi Program that only do a preview of a OpenOffice document with the opcion of print them. The user has no modified then. I use a Delphi's TOleContainer Component but only can show the first page, and cant't scroll it. Thanks for you response. Alejandro. - Original Message - From: Christian Junker [EMAIL PROTECTED] To: dev@openoffice.org Sent: Tuesday, January 31, 2006 7:59 AM Subject: Re: [dev] Writer Automation with Delphi Hi Ale, first of all there is no reason for repeating oneself to get attention, as you can see by the number of replies you have gotten so far. Secondly it is quite difficult to figure out what your problem is. What is a component in the form and what is a program's form without open OOo instance? Use the proper terms and make yourself clear if you want to get valuable support, thanks. 2006/1/27, Ale Rufino [EMAIL PROTECTED]: Hy I Need to write a program in Delphi 7 that open a .DOC document and display it in the program's form without open a openoffice instance (or no show it), and a option to print them. I could open the document but no could show in a component in the form. -- Best Regards Christian Junker - 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]