RE: [api-dev] Addon Howto?

2005-12-26 Thread Gautham Kasinath








I chanced upon the message in the archives, which didnt
really make sense to me before. But now it does. 

I guess the chapter 4.5 provides a means to write and deploy
a component in Java on OOo. However I havent tried it yet, hence require
your assistance to clarify if I am on the right direction. 



Thanks a bunch for the archives guys! 



Cheers

G.





Gautham Kasinath
Masters Student
School of Computing and Information Science
Edith Cowan University
Mt. Lawley Campus
Perth







IM: [EMAIL PROTECTED],
[EMAIL PROTECTED]
AOL Screen name: gkasinath42
Mobile: 0433904011

Home phone: 61 8 9444 8154

Home Page: http://www.geocities.com/gkasinath
The world is what it is, and we are what we are. - Maria Puzo (Godfather)



-Original Message-
From: Gautham Kasinath
[mailto:[EMAIL PROTECTED] 
Sent: Monday, December 26, 2005
3:14 PM
To: dev@api.openoffice.org
Subject: [api-dev] Addon Howto?



Hello, 

I am a newbie to the OOo world. And I am looking at
writing some add-ons that will check the integrity of a document, in some way
(like well

formattedness) before the same is loaded into OOo
Writer. Browsing the dev mailing list, I figured out that writing an add-on was
one of the best ways (esp. for a guy like me that lives and dies Java). 

However, I haven't found any mention or HowTo on
writing add-ons in the Dev guide. 

Can someone point me a direction to look? 



Thanks a bunch. 



Cheers

G.





Gautham Kasinath
Masters Student
School of Computing and Information Science
Edith Cowan University
Mt. Lawley Campus
Perth







IM: [EMAIL PROTECTED],
[EMAIL PROTECTED]
AOL Screen name: gkasinath42
Mobile: 0433904011

Home phone: 61 8 9444 8154

Home Page: http://www.geocities.com/gkasinath
The world is what it is, and we are what we are. - Maria Puzo (Godfather)










[api-dev] New Document from Template

2005-12-26 Thread Tam

Hi --

I thought this would be simple -- it isn't.  I just want to have a 
macro create a new document from a template (not the default template).


I recorded a macro, assigned it to CTRL+SHIFT+L.  It just opens the 
templates directory.


So I went digging around the archives of this mailing list and found 
an old message from 2001 with some code:


sub Letterhead
  dim mProps(0) as new com.sun.star.beans.PropertyValue
  mProps(0).Name = AsTemplate
  mProps(0).Value = true
  oDesk = createUNOService(com.sun.star.frame.Desktop)

oDesk.loadComponentFromUrl(D:\OOo_Templates\Letterhead.odt,_blank, 
0, mProps()


end sub

I admit I don't know what any of this means -- I further admit that I 
don't *want* to know what any of this means.  I just want to hit my 
keys and write my letter.  :-)


After some niggling, the final error message I get is that the URL 
seems to be an unsupported one.  It occurs to me that I'm using 
OOo-Dev 2.0 -- I guess there might have been some changes since 2001?  :-)


Could some kind soul please tell me what's wrong?

TIA

Tam

P.S.  I also tried to take a peek at the old messages via gmane.  I 
don't know if Mozilla is barfing on me, or it's SOP, but few of the 
old messages on this list are actually there -- just the subject lines.



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



Re: [api-dev] Addon Howto?

2005-12-26 Thread Mathias Bauer
Gautham Kasinath wrote:

 I chanced upon the message in the archives, which didn't really make sense
 to me before. But now it does. 
 
 I guess the chapter 4.5 provides a means to write and deploy a component in
 Java on OOo. However I haven't tried it yet, hence require your assistance
 to clarify if I am on the right direction. 

This is correct, it shows you the basics. There is a special chapter
about Add-Ons, it's chapter 4.7.3.

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: [api-dev] New Document from Template

2005-12-26 Thread Mathias Bauer
Tam wrote:

 sub Letterhead
dim mProps(0) as new com.sun.star.beans.PropertyValue
mProps(0).Name = AsTemplate
mProps(0).Value = true
oDesk = createUNOService(com.sun.star.frame.Desktop)
 
 oDesk.loadComponentFromUrl(D:\OOo_Templates\Letterhead.odt,_blank, 
 0, mProps()
 
 end sub
 
 I admit I don't know what any of this means -- I further admit that I 
 don't *want* to know what any of this means.  I just want to hit my 
 keys and write my letter.  :-)
 
 After some niggling, the final error message I get is that the URL 
 seems to be an unsupported one.  It occurs to me that I'm using 
 OOo-Dev 2.0 -- I guess there might have been some changes since 2001?  :-)
 
 Could some kind soul please tell me what's wrong?

The message says it all: the URL is unsupported, mainly because it isn't
a URL at all. Don't use system file names, you have to provide a valid
URL: file:///d:/OOo_Templates/Letterhead.odt should work for you.

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: [api-dev] New Document from Template

2005-12-26 Thread Marc Santhoff
Am Dienstag, den 27.12.2005, 00:21 +0100 schrieb Mathias Bauer:
  Could some kind soul please tell me what's wrong?
 
 The message says it all: the URL is unsupported, mainly because it
 isn't
 a URL at all. Don't use system file names, you have to provide a valid
 URL: file:///d:/OOo_Templates/Letterhead.odt should work for you.

In Basic this can be done by using:

ConvertToUrl(D:\OOo_Templates\Letterhead.odt)

Have Fun,
Marc



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



[api-dev] Re: New Document from Template

2005-12-26 Thread Tam

Mathias Bauer wrote:


Tam wrote:



sub Letterhead
  dim mProps(0) as new com.sun.star.beans.PropertyValue
  mProps(0).Name = AsTemplate
  mProps(0).Value = true
  oDesk = createUNOService(com.sun.star.frame.Desktop)

oDesk.loadComponentFromUrl(D:\OOo_Templates\Letterhead.odt,_blank, 
0, mProps()


end sub

I admit I don't know what any of this means -- I further admit that I 
don't *want* to know what any of this means.  I just want to hit my 
keys and write my letter.  :-)


After some niggling, the final error message I get is that the URL 
seems to be an unsupported one.  It occurs to me that I'm using 
OOo-Dev 2.0 -- I guess there might have been some changes since 2001?  :-)


Could some kind soul please tell me what's wrong?



The message says it all: the URL is unsupported, mainly because it isn't
a URL at all. Don't use system file names, you have to provide a valid
URL: file:///d:/OOo_Templates/Letterhead.odt should work for you.

Best regards,
Mathias


Hi, Mathias -- I tried that and it still isn't working.  I *can* put 
file:///d:/OOo_Templates/ in a browser and get a list of the 
templates in that directory, but this line in the macro:


oDesk.loadComponentFromUrl(file:///d:/OOo_Templates/Letterhead.odt,_blank, 
0, mProps()


leads to this error message:

BASIC runtime error.
An exception occurred
Type: com.sun.star.lang.IllegalArgumentException
Message:  URL seems to be an unsupported one..

Sorry.  :-)



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



[api-dev] Optional Parameters in Starbasic function call

2005-12-26 Thread Andrew Jensen

Question,

I attempted to write a function with the following declaration:

function findCodeVal( RegDSName as String, _
  TableName as String, _
  SrchColName as String, _
  SrchFor as variant, _
  RetColName as String, _
  optional isCaseSensitive as boolean, _
  optional isFuzzy as boolean, _
  optional aConn as variant, _
  optional UserName as String, _
  optional Password as String) _
  as variant

However, with this declaration,  isMissing returns False for every 
optional parameter, even when none have been pass in to functions call.


When I changed the order of the parameters to:

function findCodeVal( RegDSName as String, _
  TableName as String, _
  SrchColName as String, _
  SrchFor as variant, _
  RetColName as String, _
  optional UserName as String, _
  optional Password as String, _
  optional isCaseSensitive as boolean, _
  optional isFuzzy as boolean, _
  optional aConn as variant) _
  as variant

Then isMissing returned the correct response in all cases.  So is this 
because of the Boolean types as optional parameters?


If so, can any one tell me what other rules apply to order of optional 
parameters.


Thanks in advance.

Andrew 'Drew' Jensen

(Apologies if this is a second posting, I sent this yesterday but it 
does not seem to have made it for some reason)


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



[api-dev] [EMAIL PROTECTED] TOPIC: Contributing

2005-12-26 Thread Michael Hoennig
Dear OpenOffice.org community,

This is the 2-weekly announcement of current issues regarding the
OOo API project which I want to hightlight to the community.


*** =
*** Todays Issue: Contributing to the OOo API Project
*** -

The OOo community needs YOUR contribution too.  And we are sure that
you can contribute real value to OOo.  Don't know how?  YOU too can
contribute to the OOo API project by:

- Reviewing the documentation and reporting issues if you find any
- Useing the OOo API and reporting issues if you find any
- Answering the Questions of other Users of the OOo API
- Summarizing answers which were given to questions (CodeSnippets)
- Contributing your larger API examples to our example collection
- Pointing out important articles for the [EMAIL PROTECTED] NEWSLETTER 
- Tracking unanswered questions on this mailing list
- Preparing the next issue of [EMAIL PROTECTED] TOPIC
- Writing Test Cases
- Translating Examples to C++ (NEW!)
- Becoming an Official OOo Contributor

Each idea contains a short description of how you could help in
its respect, one ore more URLs for more information and an estimation
about the efford on the task.


*** =
*** Reviewing the documentation and report issues if you find any
*** -

Besides others, the OOo SDK contains a Developers Guide and a
Reference Guide.  It's not only important for developers who
want to develop applications with OOo to know these well.
There is also always room for improvement in such documents.

Thus, read the documentation:
  - http://api.openoffice.org/DevelopersGuide/DevelopersGuide.html
  - http://api.openoffice.org/docs/common/ref/com/sun/star/module-ix.html

And when you find anything to improve which you think should actually
be improved, report an issue to IssueZilla.

After once being registered with IssueZilla, reporting an issue is
just a matter of minutes.  


*** =
*** Using the OOo API and reporting issues if you find any
*** -

Next you might want to use the OOo API for your own projects.
Nothing is perfect, thus don't hesitate to report problems you
consider worth getting fixed to IssueZilla.

Here you find a description of OOos IssueZilla:
  - http://www.openoffice.org/project_issues.html

After once being registered with IssueZilla, reporting an issue is
just a matter of minutes.  Of course code examples, well stripped 
down to the point, would help us even more.  Thus count about up to
30 minutes for a complex issue. 


*** =
*** Answering the Questions of other Users of the OOo API
*** -

dev@api.openoffice.org is not an official support medium.  But that
does not mean, we do not want questions answers.  The OOo developers
will do their very best to answer questions, but WE NEED YOUR HELP!

The OOo core development team is very small compared to competing
projects.  Thus we cannot answer all questions.  If you know an
answer of somebody elses question, please post it to the list.
If you are not sure, answer anyway, but mention your incertitude.

This way you give the core developers more space to answer the tough
questions, maybe your next tough question.

If you know the answer off hand, it only needs a few minutes to
contribute by answering questions.  But we appreciate it even
more if you have a vague idea and do some research.  


*** =
*** Summarizing answers which were given to questions (CodeSnippets)
*** -

If you asked a question and got a satisfactory answer with a code
example, be so nice and save it for somebody else who might have
the same question in future.  The mail archive can be searched,
but the search features are not good enough, mostly because mails
are not structured enough.  But there is a better way:

Summarize your question and the given answer(s) in an XML format
for CodeSnippets.  You can find more information here:

  - http://api.openoffice.org/SDK/snippets/

To delopy a CodeSnippet, you need about 15 minutes each.  
Don't you think that the answer given to you was worth it?

Please submit the created codesnippet to the mailinglist
dev@api.openoffice.org and it will be integrated into the
snippet-collection on http://codesnippets.services.openoffice.org/ 
by one of the comminity members with CVS commit rights.

As an addon to easily create codesnippets Paolo Mantovani  has