Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
openoffice
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Expand all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Mariano  
View profile  
 More options Apr 19 2004, 1:16 pm
Newsgroups: sybase.public.powerbuilder.ole-ocx-activex
From: "Mariano" <mrka...@yahoo.com.ar>
Date: 19 Apr 2004 10:15:33 -0700
Local: Mon, Apr 19 2004 1:15 pm
Subject: openoffice
hi pals,

I'm looking some explames to integrate open office (writer) and pb 7
do you have some of it or have an idea where i can find examples?
thanks
mariano


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stephan Beck  
View profile  
 More options Apr 20 2004, 2:38 am
Newsgroups: sybase.public.powerbuilder.ole-ocx-activex
From: Stephan Beck <s...@nodomain.de>
Date: 19 Apr 2004 23:37:41 -0700
Local: Tues, Apr 20 2004 2:37 am
Subject: Re: openoffice
Mariano schrieb:
> hi pals,

> I'm looking some explames to integrate open office (writer) and pb 7
> do you have some of it or have an idea where i can find examples?
> thanks
> mariano

Here
(http://udk.openoffice.org/common/man/tutorial/office_automation.html)
you can find a VBS-Sample (OLE). See also
http://development.openoffice.org/ ... there are some links that might
be helpful... especially the Basic Programmer's Guide and the SDK.

Good luck,
Stephan B.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stephan Beck  
View profile  
 More options Apr 20 2004, 2:39 am
Newsgroups: sybase.public.powerbuilder.ole-ocx-activex
From: Stephan Beck <s...@nodomain.de>
Date: 19 Apr 2004 23:38:24 -0700
Local: Tues, Apr 20 2004 2:38 am
Subject: Re: openoffice
Mariano schrieb:

> hi pals,

> I'm looking some explames to integrate open office (writer) and pb 7
> do you have some of it or have an idea where i can find examples?
> thanks
> mariano

Here
(http://udk.openoffice.org/common/man/tutorial/office_automation.html)
you can find a VBS-Sample (OLE). See also
http://development.openoffice.org/ ... there are some links that might
be helpful... especially the Basic Programmer's Guide and the SDK.

Good luck,
Stephan B.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stephan Beck  
View profile  
 More options Apr 20 2004, 7:25 am
Newsgroups: sybase.public.powerbuilder.ole-ocx-activex
From: Stephan Beck <s...@nodomain.de>
Date: 20 Apr 2004 04:24:21 -0700
Local: Tues, Apr 20 2004 7:24 am
Subject: Re: openoffice
Stephan Beck schrieb:

Here's an untested code snippet ...
------------BEGIN---------------------->>>
OLEObject       l_objServiceManager
OLEObject       l_objDesktop
OLEObject       l_objCoreReflection
OLEObject       l_objDocument
OLEObject       l_objPropertyValue[]
OLEObject       l_objText
OLEObject       l_objCursor
long            l_lRet

l_objServiceManager = CREATE OLEObject
l_lRet = l_objServiceManager.ConnectToNewObject
("com.sun.star.ServiceManager")

IF l_lRet = 0 Then
        l_objDesktop =
l_objServiceManager.createInstance("com.sun.star.frame.Desktop")
        l_objCoreReflection =
l_objServiceManager.createInstance("com.sun.star.reflection.CoreReflection" )

        /* Set Properties for Open (!!! OR search for "Bridge_GetStruct" (since
OpenOffice1.1) on http://www.oooforum.org/forum/viewforum.php?f=9 */
        l_objPropertyValue[1] = f_oo_makepropertyvalue("ReadOnly", true)

        l_objDocument =
l_objDesktop.loadComponentFromURL("private:factory/swriter", "_blank",
0, l_objPropertyValue)

        IF IsValid(l_objDocument) THEN

                'Create a text object
                l_objText= l_objDocument.getText()

                'Create a cursor object
                l_objCursor= l_objText.createTextCursor()

                'Inserting some Text
                l_objText.insertString(l_objCursor, "The first line in the newly
created text document.")

        END IF

        l_objServiceManager.disconnectobject()
END IF
<<<------------------------------------------END-------------

/////////////////////////////////////////////////////////////
oleobject f_oo_makepropertyvalue(string sName, any aAnyValue)
// Create PropertyValue
OLEObject       l_objPropertyValue
OLEObject       l_objPropertyClass

IF IsValid(i_objCoreReflection) THEN
        l_objPropertyClass =
i_objCoreReflection.forName("com.sun.star.beans.PropertyValue")

        //!!!! CreateObject takes an OUT parameter.
        // refer to the UNO IDL interface descriptions, to find
        // the proper parameter types
        l_objPropertyClass.createObject(REF l_objPropertyValue)

        l_objPropertyValue.Name         = sName
        l_objPropertyValue.Value        = aAnyValue
END IF

RETURN l_objPropertyValue
//////////////////////////////////////////////////////////////

Hope this helps,
Stephan B.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mariano  
View profile  
 More options Apr 20 2004, 11:18 am
Newsgroups: sybase.public.powerbuilder.ole-ocx-activex
From: "Mariano" <mrka...@yahoo.com.ar>
Date: 20 Apr 2004 08:17:12 -0700
Local: Tues, Apr 20 2004 11:17 am
Subject: Re: openoffice
stephan,
thanks for your answer. should i create an user object to integrate it or i
can do in a window???
thanks for your answer
mariano

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stephan Beck  
View profile  
 More options Apr 21 2004, 7:56 am
Newsgroups: sybase.public.powerbuilder.ole-ocx-activex
From: Stephan Beck <s...@nodomain.de>
Date: 21 Apr 2004 04:55:18 -0700
Local: Wed, Apr 21 2004 7:55 am
Subject: Re: openoffice
Mariano schrieb:
> stephan,
> thanks for your answer. should i create an user object to integrate it or i
> can do in a window???
> thanks for your answer
> mariano

Hi Mariano,
Both variants are possible...But I would prefer a UserObject. Maybe you
create a basis class that contain a collection of simple functions (like
the f_oo_makepropertyvalue(...) - see my sample code) and that holds the
most important instance variables (i_objServiceManager, i_objDesktop,
i_objCoreReflection) ... after that you can inherit more classes ... for
example one class for sWriter, one for sCalc and so on ...
Maybe you decide to use your OpenOffice-UserObject in multiple ways in
your Application ...so it's easier to integrate it.

Stephan B.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mariano  
View profile  
 More options Apr 22 2004, 12:39 pm
Newsgroups: sybase.public.powerbuilder.ole-ocx-activex
From: "Mariano" <mrka...@yahoo.com.ar>
Date: 22 Apr 2004 09:38:12 -0700
Local: Thurs, Apr 22 2004 12:38 pm
Subject: Re: openoffice
Stephan
this is mariano from sybase groups
I'm having problmes with your code . with the function for example
OLEObject l_objPropertyValue
OLEObject l_objPropertyClass

-->IF IsValid(i_objCoreReflection) THEN
whta's the type of  i_objCoreReflection or this should be l_
l_objPropertyClass =
i_objCoreReflection.forName("com.sun.star.beans.PropertyValue")

//!!!! CreateObject takes an OUT parameter.
// refer to the UNO IDL interface descriptions, to find
// the proper parameter types
l_objPropertyClass.createObject(REF l_objPropertyValue)

l_objPropertyValue.Name = sName
l_objPropertyValue.Value = aAnyValue
END IF

RETURN l_objPropertyValue this seems to be a long but pb tellme it's
imcompatible

thanks for your help
mariano


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stephan Beck  
View profile  
 More options Apr 23 2004, 3:45 am
Newsgroups: sybase.public.powerbuilder.ole-ocx-activex
From: Stephan Beck <s...@nodomain.de>
Date: 23 Apr 2004 00:45:27 -0700
Local: Fri, Apr 23 2004 3:45 am
Subject: Re: openoffice
Mariano schrieb:

Regarding my last Posting I have created a NonVisualObject that holds
the important Instance-Variables ... The i_objCoreReflection (PB-Type =
"OLEObject") is one of them.
I use the constructor-event of my NVO to create all relevant
objects...therefore I declared the following instance-variables for my NVO:
//Declaration of Instance-Variables
OLEObject       i_objServiceManager
OLEObject       i_objDesktop
OLEObject       i_objCoreReflection
...

//My constructor-event creates the Objects ...
// first step is the connection to OpenOffice-ServiceManager
i_objServiceManager = CREATE OLEObject
//Success? - ConnectToNewObject() returns 0 (see PB-Help)
IF i_objServiceManager.ConnectToNewObject
("com.sun.star.ServiceManager") = 0 Then

     //see
http://api.openoffice.org/docs/common/ref/com/sun/star/frame/Desktop....
     i_objDesktop =
i_objServiceManager.createInstance("com.sun.star.frame.Desktop")
     //see
http://api.openoffice.org/docs/common/ref/com/sun/star/reflection/Cor...
     i_objCoreReflection =
i_objServiceManager.createInstance("com.sun.star.reflection.CoreReflection" )

//...and all other things you need
END IF

But don't forget to call i_objServiceManager.DisconnectObject () in the
  destrutor-event of the NVO!

My function f_oo_makepropertyvalue(string sName, any aAnyValue) returns
also an OLEObject. The PropertyValue is often used in OpenOffice-Methods
(see
http://api.openoffice.org/docs/common/ref/com/sun/star/beans/Property...)
... That's why I created the CoreReflection-Object as an
Instance-Variable of my NVO.
One method that uses a Sequence/an Array of PropertyValues is for
example the method "loadComponentFromURL"
(http://api.openoffice.org/docs/common/ref/com/sun/star/frame/XCompone...)

an example ... the creation of a new sWriter-Document in a new Frame

     OLEObject  l_objDocument
     OLEObject  l_objPropertyValue      //one
     OLEObject  l_objPropertyValues[]   //use this Variable as argument for
loadComponentFromURL/collection of "l_objPropertyValue"

     l_objPropertyValues[1] = f_oo_makepropertyvalue("ReadOnly", true)

     l_objDocument = i_objDesktop.loadComponentFromURL(
"private:factory/swriter", "_blank", 0, l_objPropertyValues)

Hope this helps.
Stephan B.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mariano  
View profile  
 More options Apr 26 2004, 12:05 pm
Newsgroups: sybase.public.powerbuilder.ole-ocx-activex
From: "Mariano" <mrka...@yahoo.com.ar>
Date: 26 Apr 2004 09:05:40 -0700
Local: Mon, Apr 26 2004 12:05 pm
Subject: Re: openoffice
hi stephan,
thanks for your sanswer. is it posible to you to send me that objects by
email to try?
if so thanks vaery much
my email is mrka...@yahoo.com.ar
thanks for all your help
mariano

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »