[api-dev] Re: ReDim driving me crazy again…

2011-08-18 Thread Laurent Godard
HI

from my poor experience
if I want to use redim, i have to define the array as dynamic

may be try this

public NDice() as integer

sub main
  redim NDice(1 to 6)

end sub

Laurent
-- 
-
To unsubscribe send email to dev-unsubscr...@api.openoffice.org
For additional commands send email to sy...@api.openoffice.org
with Subject: help


[api-dev] Re: using external libraries with Pyuno components

2011-03-17 Thread Laurent Godard
Hi paolo

long time !!!

i put my imported .py file inside the extension in a pythonpath directory

the main .py files are at extension root

i found this information long time ago and think it is a reserved
directory name

no declaration in manifest.xml

HTH

laurent
--
-
To unsubscribe send email to dev-unsubscr...@api.openoffice.org
For additional commands send email to sy...@api.openoffice.org
with Subject: help


[api-dev] deactivate a top level menu

2010-07-02 Thread Laurent Godard

Hi all

i create a top level menu using addon.xcu with a
node oor:name=OfficeMenuBar

in some cases, i want that this menu not accessible
so how can i deactivate it by code so it is greyed ?

same question for a custom toolbar
node oor:name=OfficeToolBar

i know how to deactivate submenus pointing on some macros, but not this 
kind of element.


thanks in advance

laurent

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] OOo Summer Internship Program - Improve (Python) scriptability

2010-05-27 Thread Laurent Godard

Hi

Welcome on board and thanks focusing on python :)

I personally can also think about some IDE integration of Python to 
simplify the creation, debugging, deployment of Python scripts.




+100

Python binding probably needs improvement but IMHO, a better integration 
inside OOo with its own IDE would boost the python use (or a clear 
binding with an existing one through, why not, an extension if possible)


Anyway, Eric please correct me if i am wrong. You have probably some 
more details what you expect from this project.


thanks Eric taking this

laurent

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] Sending email to multiple recipients

2010-04-21 Thread Laurent Godard

Hi

just a thought

if OOo Api can attach a file, create a plain-text file and write your 
body in it

then send this file as attachment

may work

Laurent

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] Script in one library can't find function in another

2010-01-04 Thread Laurent Godard

Hi

may be have a look at BasicLibraries.loadLibrary
here is a rough example

Laurent


function loadMyLib(optional pwd)

if isMissing(pwd) then
pwd = false
endif

if not BasicLibraries.isLibraryPasswordVerified(My_Lib) and pwd then
chkpwd = 
BasicLibraries.verifyLibraryPassword(My_Lib,thePassword)
endif

BasicLibraries.loadLibrary(My_Lib)

end function




-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



[api-dev] using css.awt.AsyncCallback in OOoBasic

2009-12-18 Thread Laurent Godard

Hi all

my problem is that a mouse listener on a calc document is called
 and i need to close the calc document in this call
it works but exiting the listerner callback _mousepressed, OOo crashes

Mikhail pointed me on AsyncCallback

using OOoBasic
asyncCallback  = createUnoService( com.sun.star.awt.AsyncCallback)

but is there a way to define the callback method or do i need to 
implement it as a uno java service


Thanks in advance

laurent



-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] using css.awt.AsyncCallback in OOoBasic

2009-12-18 Thread Laurent Godard

Hi again


thanks a lot
it works, at least i can define a callback :)



i did dome tests and i encounter a strange behaviour

my call chain is, i added a print statement at the end of each subroutine

sub listener_moussereleased -- sub 1 -- sub 2

i define the callback in sub2 and put (for the moment) a wait statement

what happens is

1. in sub2, the callback is first called
2; the wait statement in the call bask is ok
3. a print statement occurs for sub 2
4. then the print statement for the callback
5. then the call back for sub1 and sub listener_moussereleased

this does not depend on the time I wait in the callback

My goal would be have the callback at the end of sub 
listener_moussereleased


is the implementation of the css.awt.AsyncCallback ok ?

(i can write a simple example if needed)

Laurent



-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] using css.awt.AsyncCallback in OOoBasic

2009-12-18 Thread Laurent Godard

Hi peter

If you comment out your Print in the main routine, than the Print in 
the callback function works as expected.


Try to replace both print methods with Msgbox and it makes you wonder...
The Msgbox in the callback function doesn't appear without any errors.


thanks a lot
i'll have a loook

now i solved my problem, and, should I say it, i'm really happy

first i deduced that AsyncCallback is only effective at the end of the 
routine that has put the callback


so i've transported my parameters as return values of functions (instead 
of sub); At the top level caller, my listener that led me to crash, i 
used the callback

a very small wait 100 inside it did the trick

so now i have a method that enable (or do as) closing a document inside 
a listener call depending on it;

in fact this only an artefact using the async callback, but it works

thanks a lot Mikhail, Franck and Peter
A free beer the next time we meet :)

i wish you wondefull christmas hollidays

laurent




-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] base api : Tables.createDataDescriptor do not show appendByDescriptor method

2009-12-08 Thread Laurent Godard

Hi Fernand

As i told, plain example worked

The problem is that even if i can define a good TableDescriptor, the 
tables.columns do not show any .appendByDescriptor method, even if the 
connection is not read only as i can do update and insert requests


As i do some odd manipulations with moving odb files, unregistering 
datasources, registering and reconnect, i suspect things come from them


I had a look at pooling but did not find anything suitable

Btw, i had some results by reconnecting inside the sub to my datasource 
and not use the one i passed by argument to my sub.
I'll continue on this way, trying to identifiy exactly what happens and 
verify it does not work only by accident


Any hint on listing connection that are opened and manipulate 
(terminate, hard reload them) would help or at least give me some better 
knowledge over the global process of the api


Thanks again for your response

Laurent



-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



[api-dev] base api : Tables.createDataDescriptor do not show appendByDescriptor method

2009-12-07 Thread Laurent Godard

Hi all

I'm facing a problem for 3 days i cannot solve using database and OOoBasic

My goal is to dynamically create a table

It used to work in some light tests based on Andrew's document (thanks 
to him) but now, going in my whole stuff, i encounter the following problem


I create my DataDescriptor,
descCol = connection.Tables.createDataDescriptor

I define the column, good, no problem

But, it raises an error when i want to
cols = descTable.Columns
cols.appendByDescriptor(descCol)

The appendByDescriptor method is not available for the created 
dataDescriptor , confirmed with the use of XRay


Is there any known cases where this can happen ?

I have also to say that i do somme uggly stuff on 
moving/deleting/copying .odb files before creating the connection but i 
do not expect problem here as examinating the connection seems ok, 
giving for example, all the tables list and doing requests (select, 
insert, update)
Btw, is there a way to list all the currently active connections that 
OOo manages in order to explore if i do not have some already opened, 
trying to close them for testing ?


Thanks a lot for any hints you may give to a poor lost scripter in 
database API world


Laurent



-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] How to copy all properties from a style

2009-10-21 Thread Laurent Godard

Hi bernard


newStyle.ParentStyle = oldStyle.Name
oStyles.insertByName(myNewStyle, newStyle)



does it work with different spreadsheets ?
i'm not sure, i'll test when time but really not sure
actually, i loop on all properties. that is the quickest way i explored

Laurent




-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] Detecting which button was pressed with a Basic Macro

2009-08-30 Thread Laurent Godard

Hi Johnny

the event of a button in a dialog throws an event object to the called 
macro. This Event object has a Source property that contains the caller 
object


design your button, plugg it to the MySub macro

then

sub mySub (oeVt)
print oEvt.Source.name
end sub


HTH

Laurent



-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] Detecting which button was pressed with a Basic Macro

2009-08-30 Thread Laurent Godard

Hi


This helped indeed. It was wrong, but it helped… There is no
oEvt.Source.Name, but now that I know this is possible I used Xray and
found oEvt.Source.getModel().Name.



yes you're right
i wrote too fast

happy that it helped

Laurent



-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] Non modal dialog staying in front ?

2008-08-28 Thread Laurent Godard

Hi all

first thanks to Bernard and its temporary solution

Is there any other way as  anchor the window like the stylist ?
I saw api with sympathic names but want to know if it is possible before 
digging in it.

What about a Java approach with a container ?

thanks in advance

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



[api-dev] Non modal dialog staying in front ?

2008-08-22 Thread Laurent Godard

Hi all

in OOoBasic
i have a non modal dialog that is shown using

oDlgDossier = loadDialog(dlgDossier)

stopDossier = false
while not stopDossier
  wait 20
wend

oDlgDossier.setVisible(false)

This works fine if i stay always in the same document

But, when I open a new document using a lodComponentFromURL, myDialog
disapear as it is bound to the previous opened document. It goes background.

if I use a
myDialog.toFront()
then this my new file that goes background

What i want to achieve is that my dialog stays at front whatever
document is active.

any idea how to achieve that ? any link is welcommed

feel free to ask for more details

Thanks in advance

Laurent


--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] .uno:InsertDoc API equivalent ?

2007-11-08 Thread Laurent Godard

Hi again

there is the interface XDocumentInsertable, implemented at the 
TextCursor. It has a method insertDocumentFromURL( string, 
sequencePropertyValue).


The property names are FilterName, FilterOption and Password.


reading dev Guide it seems that any MediDescriptor is acceptable
(so for InputStream)

so please forget my last question

'-
The text cursor in writer supports the interface 
com.sun.star.document.XDocumentInsertable which has a single method to 
insert a file at the current cursor position:


void insertDocumentFromURL( [in] string aURL,
[in] sequence 
com::sun::star::beans::PropertyValue  aOptions)


Pass a URL and an empty sequence of PropertyValue structs. However, load 
properties could be used as described in 
com.sun.star.document.MediaDescriptor.


--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



[api-dev] .uno:InsertDoc API equivalent ?

2007-11-08 Thread Laurent Godard

Hi all

Using writer

is there an alternative to .uno:InsertDoc dispatcher command using full api
my goal is to import html file (ideally using inputstream)

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] .uno:InsertDoc API equivalent ?

2007-11-08 Thread Laurent Godard

HI oliver

there is the interface XDocumentInsertable, implemented at the 
TextCursor. It has a method insertDocumentFromURL( string, 
sequencePropertyValue).




thanks a lot


The property names are FilterName, FilterOption and Password.


any chance having an IputStream option as for loadComponentFromURL ?

Thanks again Oliver

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] .uno:InsertDoc API equivalent ?

2007-11-08 Thread Laurent Godard

Hi Olivier


Please file an issue about that and assign it to me (os).


done
http://extensions.openoffice.org/issues/show_bug.cgi?id=83449

thanks Oliver

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] XPackageManagerManager.removePackage changes

2007-10-23 Thread Laurent Godard

Hi Juergen


That would mean this functionality is close to be published!?
no, as i mentioned before it is intended for private usage ;-) I am not 
sure if  it will be published. I don't see really demand for it. for 
what exactly do you need it where you can't use the extensions manager 
or unopkg directly?




the use case would be an intelligent extension that updates itself
using XPackageManagerManager

a consequent use, a monitoring extension that monitors new versions of 
all installed ones


Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] XPaketManager.removePackage changes

2007-10-22 Thread Laurent Godard

Hi Juergen

i assume you mean XPackageManager ;-) Anyway this API is unpublished and 
intended to be used internally only. But of course important is here 
that it is unpublished and that means that it can change and users have 
to be careful when using this API.


I know that it is not really satisfying but that is the situation today.


Is it planned to make it public one day ?

Laurent


--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] Getting OOo Version via API

2007-10-22 Thread Laurent Godard

Hi



is it possible to retrieve the OpenOffice version via API?


sure, reading the config registry Setup

in what language do yo need it ?
I have it OOoBasic and Java

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] Getting OOo Version via API

2007-10-22 Thread Laurent Godard

Hi again


in what language do yo need it ?
I have it OOoBasic and Java


a first link in basic
http://codesnippets.services.openoffice.org/Office/Office.Version.snip

in java at the end

you may also consider using ooSetupVersionAboutBox instead of ooSetupVersion

Laurent
'---
public String getOpenOfficeVersion(){
	return 
getOpenOfficeProperty(org.openoffice.Setup/Product,ooSetupVersionAboutBox);

}

public String getOpenOfficeProperty(String nodePath, String node){
if (!nodePath.startsWith(/)){
nodePath = / + nodePath;
}
String property = ;
// create the provider and remember it as a XMultiServiceFactory
try {
	final String sProviderService = 
com.sun.star.configuration.ConfigurationProvider;
Object configProvider = 
connection.getRemoteServiceManager().createInstanceWithContext(

sProviderService, connection.getComponentContext());
XMultiServiceFactory  xConfigProvider = 
(XMultiServiceFactory) UnoRuntime.queryInterface(
com.sun.star.lang.XMultiServiceFactory.class, 
configProvider);


// The service name: Need only read access:
final String sReadOnlyView = 
com.sun.star.configuration.ConfigurationAccess;

// creation arguments: nodepath
PropertyValue aPathArgument = new PropertyValue();
aPathArgument.Name = nodepath;
aPathArgument.Value = nodePath;
Object[] aArguments = new Object[1];
aArguments[0] = aPathArgument;

// create the view
XInterface xElement = (XInterface) 
xConfigProvider.createInstanceWithArguments(sReadOnlyView, aArguments);

XNameAccess xChildAccess =
(XNameAccess) 
UnoRuntime.queryInterface(XNameAccess.class, xElement);


// get the value
property = (String) xChildAccess.getByName(node);
} catch (Exception exception){
		throw new OpenOfficeException(Error retreiving property, 
exception);

}
return property;
}




--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] maven plugin to build OOo extensions

2007-09-28 Thread Laurent Godard

Hi


After some discussions on the topic at the OOoCon in Barcelona, I found
out that there doesn't seem to be such a plugin. Thus I decided to start
one. For the moment, the code is on my machine and not complete. Where
should I put it on the CVS ?
can you tell us a little bit more about it. The idea, what it can, how 
it works, examples etc. Maybe you will start a wiki page documenting 
your on going work.

And for the source we will find a place in the cvs of the api project.


The extension project can also host it
(but it is a already an api subdirectory iirc)

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



[api-dev] Extending BasicIDE

2007-09-23 Thread Laurent Godard

Hi all

Is it possible to access com.sun.star.comp.basic.BasicIDE text area as a 
text object (or other type)


My goal would be to play with text frames in it

Any idea ?

Thanks in advance

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



[api-dev] Insert image in textframe visibility

2007-09-21 Thread Laurent Godard

Hi all

using API in OOoBasic, i insert an image in a textFrame.

It works but the image is in background. no effect playing with zorder

If i set to foreground manually, the image is the visible

i tried with uno slots with dispatcher. if i go step by step in my
macro, it works (set to foreground). If i run without any pause, the
image does not go to front

Any way to tell an image i insert in a TextFrame to be visible by
default ? (i would prefer get rid of the dispatcher call)

Thanks

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] Insert image in textframe visibility

2007-09-21 Thread Laurent Godard

Hi again


Any way to tell an image i insert in a TextFrame to be visible by
default ? (i would prefer get rid of the dispatcher call)


digging with Xray on my image

i find, when it is invisible
image.LayerName = Hell

If set to foreground manually
image.LayerName = Heaven

Quite poetic isn't it ?

But how can i set these layers in writer

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] Insert image in textframe visibility

2007-09-21 Thread Laurent Godard

Hi again


i find, when it is invisible
image.LayerName = Hell

If set to foreground manually
image.LayerName = Heaven

Quite poetic isn't it ?

But how can i set these layers in writer


simply
replace the valurs
monImage.LayerName=Heaven

My image is shown :)

Problem solved

Thanks lgodard
you're welcome lgodard

@other: sorry for the noise

Laurent


--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] AWT TREE: OOoBasic version of the ScriptSelector example

2007-09-20 Thread Laurent Godard

Hi


This will be fixed for OOo 2.4. So please be aware that an incompatible
change to the interface is comming.


Why incompatible ?
Mark it as deprecated, no ?

What about people starting using this and seeing their code not working 
anymore after a new OOo Version. We should avoid this


Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] Moving CoceSnippets into the Wiki?

2007-08-28 Thread Laurent Godard

HI

The same remark goes for anything published on any Wiki. You should 
not blindly trust a Wiki :(
i don't trust blindly and sometimes i thought it would be a good idea to 
 limit the access to our wiki. But anyway it is as it is! And you 
already said it, it is true for everything in the wiki. I believe in a 
working community and if the wiki is really used and active, bad 
documentation gets corrected and bad snippets gets corrected as well or 
removed. Or at least identified and marked as critical or whatever.




Is it possible to systematically initiate a mail on a dedicated mailing 
list (or volunteers) that inform that a snippet page has been created or 
modified (eg. from Sample)
Then any modification is known immediately and depending on time, the 
snippet may be reviewed quickly


A wiki works only if the users self control the content, see for example 
wikipedia.




yers, but tools has to be correctly setup to allow the management

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] Moving CoceSnippets into the Wiki?

2007-08-27 Thread Laurent Godard

Hi juergen


In other words: Are we really sure migration to the Wiki is the best
way? I'm uncertain about it.
we are not 100% sure but it is worth a test from my point of view. We 
haven't really a huge number of snippets and the question is why. My 
impression is that it is to complicate. It might be also a solution to 
have some kind of snippet creator form integrated in the existing infra 
structure. But then it is the question who would be able and have the 
time to prepare such a form ... Or we can extend the snippet creator to 
support direct import of existing snippets ...




sounds good to me
may be make a call for volunteers ?


A wiki is only one solution but quite cheap to realize ;-)



I agree :)
but still lack correct internationalisation features for really doc. 
mangement with the native-lang projects


Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] Moving CoceSnippets into the Wiki?

2007-08-27 Thread Laurent Godard

Hi Juergen

one other point is that our wiki is not suitable for translation and 
it is  very important to lower the entry barrier

that is true but it is true for everything else in the wiki


sure !
and more needed than for snippets, I agree

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] Moving CoceSnippets into the Wiki?

2007-08-25 Thread Laurent Godard

Hi bjorne

I just added a snippet for Impress (well works also for Draw), and put 
it here: 
http://wiki.services.openoffice.org/wiki/API/Samples/StarBasic/Impress/Insert_a_Chart 



I added the categories soo that it get listed
I also added a small snippet for spellchecking
http://wiki.services.openoffice.org/wiki/API/Samples/StarBasic/Office/SpellChecker

May be one should write a small guidelines on how edit/create a new 
snippet and teh basic copy/past information


Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] Moving CoceSnippets into the Wiki?

2007-08-20 Thread Laurent Godard

Hi Bernard, Hi all


+1
Using Wiki for coding is a security hazard because any malicious (or 
even a well intentioned) person may change a working code to a dangerous 
code. Most users will run the published code without checking it, and 
checking complex codes is not easy.




I totally second you concerns. We have to be carefull

If we stay with wiki, we should have reviewers or at least emails 
alerting on modification (and we will need reviewers also for extensions 
!!! any volunteers go to [EMAIL PROTECTED] mailing list)


The remark on automatically point on idl is also very important for 
newcommers so that they can check the official documentation


one other point is that our wiki is not suitable for translation and it 
is  very important to lower the entry barrier


Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] Moving CoceSnippets into the Wiki?

2007-08-17 Thread Laurent Godard

HI

with our codesnippets.services.openoffice.org we have useful resource to 
find some useful snippets. But the contribution is from my point of view 
not easy enough. Although Tom Schindl did a tremendous job to set up the 
environment and infra structure and Paolo Mantovani who provides the 
excellent Snippet Creator i would like to suggest that we move the 
examples, snippets etc. into the wiki.




tend to agree
how would you organize this by sections ?
will people put the snippets in the good section ?

I would like to thank you Tom and Paolo again for their good work. Time 
and technology is changing and i believe that we will have greater 
success with the wiki approach. And of course the Snippet Creator is an 
excellent example to show what's possible with StarBasic.




in the wiki do we have syntax highlighting ?

Thanks again to Paolo and Tom for their job

maybe, a lightened version af teh snippet creator taht would create the 
Wiki-form of the snippet would be usefull ?
Not mandatory for people wanting to contribute, but still usefull for 
newcommers ?


any opinion ?

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] Moving CoceSnippets into the Wiki?

2007-08-17 Thread Laurent Godard

Hi


tend to agree
how would you organize this by sections ?

don't understand what do you mean, can try to explain it again


actually, snippets are classified by Tom
by languages, by product (writer, calc ...)

i think we should keep this classification

laurent


--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] Draw imported graphic size

2007-07-18 Thread Laurent Godard

Hi Fernand


Laurent

java i do not understand but with basic you can do it als folows



thanks a lot
i'll have a look asap

maybe could you please send me the code as attachment as it is 
completely unreadable in this mail


but what a pain regarding the api !!
I really think should be a direct api to be used

Thanks again, i let you know

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



[api-dev] Draw imported graphic size

2007-07-12 Thread Laurent Godard

Hi all

in java
i want to import a graphic in a draw document
seems to work but the only problem is that it is 100 height  width, no 
matter the original size


how can i have my image imported with the correct proportion  size so 
that i can select it (to export it)


here is a snippet of where i am
(thx to cloph :) )

could someone put me in the right direction ?

thanks in advance

Laurent

'--

  XMultiServiceFactory xFactory = 
(XMultiServiceFactory)UnoRuntime.queryInterface( 
 XMultiServiceFactory.class, document);


Object image = 
xFactory.createInstance(com.sun.star.drawing.GraphicObjectShape);


XShape graphicShape = (XShape) 
UnoRuntime.queryInterface(XShape.class, image);


XNameContainer xBitmapContainer = null;

xBitmapContainer = (XNameContainer) UnoRuntime.queryInterface(
XNameContainer.class, xFactory.createInstance(
com.sun.star.drawing.BitmapTable));

xBitmapContainer.insertByName(someID, inputUrl);


String internalURL = AnyConverter.toString(xBitmapContainer
.getByName(someID));

XPropertySet props = 
(XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, graphicShape);


props.setPropertyValue(GraphicURL,internalURL );

// add it to the document first drawpage
XDrawPagesSupplier xDrawPagesSupplier = 
(XDrawPagesSupplier)UnoRuntime.queryInterface( 
 XDrawPagesSupplier.class, 
document);


XDrawPages xDrawPages = xDrawPagesSupplier.getDrawPages();
Object objDrawPage =  xDrawPages.getByIndex(0);

XDrawPage drawpage = (XDrawPage) 
UnoRuntime.queryInterface(XDrawPage.class, objDrawPage);

drawpage.add(graphicShape);

refreshDocument(document);

Object objShape =  drawpage.getByIndex(0);
XShape finalShape = (XShape) 
UnoRuntime.queryInterface(XShape.class, objShape);


Size currentSize = finalShape.getSize();

// width  height = 100


--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] Is there an example for packaging macros as an extension somewhere ?

2007-07-11 Thread Laurent Godard

HI Mathias


As other macros than Basic are usually not created by the internal IDE
it's an acceptable limitation IMHO. So having an extension for this task
would be the right tool. I wonder whether something like that is planned
in the NetBeans pluging.


Paolo's BaB (Basic Addon Builder) is the way
It is actually dedicated to basic macros but creating extra step 
supporting a specific language (or external sources) is totally possible


It is even packaged as an extension

http://wiki.services.openoffice.org/wiki/Extensions_Packager

So, imho, it is the way to go. Just enhance it

Laurent


--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] Getting the TextFields directly of a table (Writer)

2007-06-13 Thread Laurent Godard

Hi Micheal


But how can I access the content of the TextField in the cell?!



Look at the anchors and compare their relative position
with for example compareRegionEnds method

Laurent


--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] Introductionary information on scripting various OOo modules (meant for OOo newbies) ...

2007-05-21 Thread Laurent Godard

HI

you may perharps add a page in the extensions project
http://wiki.services.openoffice.org/wiki/Extensions_development

there are some entries for starting guides

thanks for sharing this with us

Laurent


--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] Specify the user installation while connection to OO from Java

2007-04-19 Thread Laurent Godard

Hi


which all contain user-specific configurations such as disabled menus etc.

Now i'm searching for a way to specify a certain of these installations when
connecting to OO from a Java application, i.e. i want to start app1 with the 
configuration of user1, app2 with the configuration of user 2 and so on.

Any ideas how to manage that?


make each user listen on a different port in the common.xcu 
ooConnectionURL ?


see 
http://svn.nuxeo.org/trac/nuxeo/browser/org.nuxeo.ecm.platform.transform/trunk/plugins/ooo_autoListen

for an example to setup this using an extension

Laurent


--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] external application getting OOo version number

2007-03-22 Thread Laurent Godard

Hi


I'd like to know what is the easiest way for an external application (say,
an ebuild binary) to find out OOo's version number (e.g. 2.0.2).



the information is stored in the ooo/share/registry/.../Setup.xcu file 
(Node Product/ooSetupVersion)


here is a macro i usualy use from inside OOo

HTH

Laurent

'-

function RecupereVersionOOO() as string
'recupère version de OOo
Dim aSettings, aConfigProvider
Dim aParams2(0) As new com.sun.star.beans.PropertyValue
aConfigProvider = createUnoService( 
com.sun.star.configuration.ConfigurationProvider )

aParams2(0).Name = nodepath
aParams2(0).Value = /org.openoffice.Setup/Product
aSettings = aConfigProvider.createInstanceWithArguments( 
com.sun.star.configuration.ConfigurationAccess, aParams2() )


RecupereVersionOOO=aSettings.getbyname(ooSetupVersion)

end function


--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] external application getting OOo version number

2007-03-22 Thread Laurent Godard

Hi

the information is stored in the ooo/share/registry/.../Setup.xcu file 
(Node Product/ooSetupVersion)
 
That won't work if you want to detect the minor version.


this a bug IMHO as it worked in the OOo 1.1.x branch
could it be solved ?

btw, you'll have the minor version but not the third number (build)

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] about online dictionary

2007-02-13 Thread Laurent Godard
Hi nolan

 one of our customer is developing an English translation program, so they 
 want to know how can get the words or the sentences when mouse is just on it. 
 that is so, if we open a text document through OpenOffice's Text application, 
 we can see some chars and words. can we get the words or paragraph string 
 when we move the mouse? I have refer to OpenOffice's DevelopGuide.pdf,but I 
 can't find any thing about it, some help will appreciate.
 

you may have a look at OOoWikipedia
http://www.indesko.com/telechargements/ooowikipedia/downloadFile/attachedFile/OOoWikipedia-2.3.zip

Laurent

-- 
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org -
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com -
http://www.nuxeo.org
Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] [code snippet] Improve sorting capabilities

2007-02-09 Thread Laurent Godard

Hi stefan

For me translating in english makes sens, at least, as proposed, the 
comment lines.


I did that now, hopefully in understandable english, and sent an updated 
snip-File to the list.




Thansk a lot !!!

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] [code snippet] Improve sorting capabilities

2007-02-09 Thread Laurent Godard

Hi stefan

Coming from Microsoft´s VBA I am completely spoiled by the Visual Basic 
IDE, that automatically shows up all possible methods, properties and 
subobjects while typing. I have not managed yet to develop my strategy 
in order to easily find these things in OpenOffice.org Basic.


you may have a loook at X-Ray from Bernard Marcelly
http://wiki.services.openoffice.org/wiki/Extensions_development_basic#X-Ray_tool

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] [code snippet] Improve sorting capabilities

2007-02-08 Thread Laurent Godard

Hi Stefan

first, thanks again for sharing your snippet


Does it make sense to invest any effort on this macro for translating or 
improving or whatever? As soon as the issues #7277 and #20491 will be 
fixed, my macro will be superfluous. Our efforts should aim to encourage 
the developers that they fix these very old issues!


The main interrest in snippets is to illustrate the use of some API
Sure, the snippet is usefull and may be advertized and yes, we should 
help the developeprs solving issues


For me translating in english makes sens, at least, as proposed, the 
comment lines. Then if someone volunteers to translate to an other 
language, it can do it (an for example put it in the extension xiki ?)


Anyway, thanks again for your snippet

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] [code snippet] Improve sorting capabilities

2007-02-06 Thread Laurent Godard

Hi


Thanks the snippet is update and can be access at
http://codesnippets.services.openoffice.org/Calc/Calc.ImproveSortingCapabilities.snip


thanks a lot, sounds interresting

btw, would it be possible to request english variable names and comments 
to help newcommer readers of the snippet ?

any volunteer for translating ? (unfortunatelly, my german is far too old)


Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] Status bar API ?

2006-12-29 Thread Laurent Godard

Hi Carsten

Thanks a lot for your response

Currently you have to implement a status bar controller and add it via 
ui configuration manager API. You can find some simple status bar 
controller in the framework project source tree 
(framework/source/uielement).


thanks

 I will start a status bar controller
tutorial after I finished my popup menu controller tutorial. There I 
will explain in detail how to create a status bar controller and the 
status bar environment. I also think about adding support for some 
generic status bar controller (like the complex toolbar controller). We 
shifted these ideas because until now nobody asked us for a better 
status bar support.




I'll have some tries in the comming days. I think status bar 
interraction will be needed more and more with new extensions comming 
needing to give information on their status


thanks again for your response

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



[api-dev] Status bar API ?

2006-12-28 Thread Laurent Godard

Hi all

is there any API for playing with the status bar and adding a text 
and/or an icon ?


i do not speak about the progressbar but somewhere to put a an 
information about the document that is always visible


Thanks in advance

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] getCellAddress() returns garbage

2006-12-22 Thread Laurent Godard

Hi Andrew,

Andrew Douglas Pitonyak a écrit :

Is the method getCellAddress() deprecated?
I am not able to obtain valid results. For example, I ran the following 
macro on FC6 (with what ever came with the system, which means I am 
still on 2.04 with a fedora supplied build)




it at a 64 bits platform ?

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] getCellAddress() returns garbage

2006-12-22 Thread Laurent Godard

Hi Andrew

Yes, FC6 AMD64, standard distro, which means that it also includes the 
Novell stuff.




may be the problem is related to this
http://www.openoffice.org/issues/show_bug.cgi?id=71815

I relayed to Caolan

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] [Announcement] Xray 5.2

2006-12-11 Thread Laurent Godard

Hi Bernard

Xray is a Basic macro which displays the contents of an API object and 
helps you understand the API. It can also display the content of most 
Basic variables. Xray runs in OpenOffice.org versions 1.1.x or 2.x.




Thansk a lot for this new version
I'll add a screenshot at
http://wiki.services.openoffice.org/wiki/Extensions_development_basic#X-Ray_tool

Bernard, what do you think having an a-own page for Xray starting guide 
in the extensions wiki ?


Thanks again

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] Array - max elements number

2006-11-28 Thread Laurent Godard

Hi

May be that OOo and basic are not the better tools for manipulate a 
file.txt.




it works
i have no problem with the following coding
did not test the tools - loadfromfile helper

Laurent

sub createFile
open /home/lgodard/bigfile.txt for output as #1
for i = 1 to 13
print #1, line number   cstr(i) string(100,-)
next i
print file created
end sub

this ends with a around 15 Mb file with lines like
line number 1 
line number 2 


then reading it
(i removed redim preserve for performances)

sub readFile

redim myArray(13)

counter = 0
open /home/lgodard/bigfile.txt for input as #1
while not eof(1)
line input #1, aLine
counter = counter + 1
myArray(counter) = aLine
wend
close #1
print ok   cstr(counter)
end sub



--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] Array - max elements number

2006-11-28 Thread Laurent Godard

Hi


did not test the tools - loadfromfile helper



i just test and encounter the problem
it is due to the defintion of MaxIndex as integer (limited to 65535 then)

Function LoadDataFromFile(FilePath as String, DataList()) as Boolean
Dim i as Integer
...
Dim MaxIndex as Integer

changing to
Dim i as Long
Dim MaxIndex as Long

is ok (the limit is then 2.147.483.647)

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] Newbie inserting text where the cursor is (java)

2006-11-13 Thread Laurent Godard

Hi


Do you mean the TextDocuments.java in the guide? It works fine if you
want to go to the start, then jump some sentences and a few words and
then write. But I'd like to write where the cursor (the blinking one)
is, do you think it's possible? Or... Can anybody tell me where to look
for it?



instead of playing with a Cursor, play with the ViewCursor object
http://api.openoffice.org/docs/common/ref/com/sun/star/text/XTextViewCursorSupplier.html#getViewCursor

Laurent



--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] possibility to make readonly/locked objects

2006-10-26 Thread Laurent Godard

Hi knut



Is it possible to make single objects read-only, for example tables,
bookmarks and paragraphs?



you can embed them in sections that can be made read-only

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] status of XGalleryThemeProvider

2006-10-20 Thread Laurent Godard

Hi Kai


Anyhow, since you seem to have been successfully working with it
and didn't request any new features, I assume that we can make
this API final now.

Nevertheless, I'd like to ask anybody using this API or having
a look at it to still send comments etc. If this last period of
say 1-2 weeks will have been passed, I'll finally publish the
API for the next OOo minor-release/milestone.


i'll relay this call as some french user may have some questions and 
requirements :)


thanks a lot Kai

Laurent
--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] status of XGalleryThemeProvider

2006-10-19 Thread Laurent Godard

Hu Jurgen

we have no fixed time period for unpublished APIs, the recommendation is 
to publish an API at least after two releases. But APIs can be 
unpublished forever when their usage is intended to be internally only.




ok
is it worth to setup a something for a regular review of this (not that 
often, but reglar ?)


It is always a good idea to ask frequently to publish an API if it's 
unpublished, i guess that would speed up the process. But of course the 
developer decides if the API is final or not but you can always help 
with constructive feedback ;-)


guess what did I ask this question ?

a snippet is being created on a french user work basis discovering this 
api and using it
but i do not want to advertize API that are not published and can be 
removed/modified without any warning

so my question

Thanks

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] iterating over text

2006-10-19 Thread Laurent Godard

HI Daniel

LanguageTool is already released and it has buggy OOo integration so I'd 
like to fix it now. Will the grammar checker API be in 2.1? Can you tell 
when the first binary snapshots with this feature will be available? If 
it's not too far in the future I might indeed give up working with the old 
API.


I second you in this request :)

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



[api-dev] status of XGalleryThemeProvider

2006-10-16 Thread Laurent Godard

Hi

http://api.openoffice.org/docs/common/ref/com/sun/star/gallery/XGalleryThemeProvider.html
is marked as unpublished

are there any plan on this ? how long does something stay unbpublished ?

thanks in advance

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] How to assign keyboard shortcut to add-on menu

2006-10-13 Thread Laurent Godard

HI

I have read an answer by Mathias Bauer mailed on 11/18/2004 that it was 
not currently possible to assign a keyboard shortcut to an add-on menu 
line.


Is it still impossible with OO 2.0 ?

Even if the assignment is dynamic (not persistent), made by some API 
(typically by XAcceleratorConfiguration.setKeyEvent) and not by a XCU 
file ?


Thank you if you can confirm this (in which case I feel a bit 
disapointed...).


did you try to add a ~ in your string defining the menu ?

Laurent


--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] Tweaking the api for performance

2006-10-13 Thread Laurent Godard

Hi kent

did you have a oook at lockControllers and unlockControllers ?
http://api.openoffice.org/docs/common/ref/com/sun/star/frame/XModel.html#lockControllers

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



Re: [api-dev] Calc: Switch DesignMode On/Off

2006-10-10 Thread Laurent Godard

Hi


how to switch Design Mode on/off via macro in Calc?



did you try
thisComponent.ApplyFormDesignMode = true|false

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - 
http://www.indesko.com
Nuxeo Enterprise Content Management  http://www.nuxeo.com - 
http://www.nuxeo.org

Livre Programmation OpenOffice.org, Eyrolles 2004-2006

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



[api-dev] physical directory of an extension

2006-10-02 Thread Laurent Godard

Hi all

there exists a codesnippet for an OOoBasic extension to know where the 
files are located


can someone point me directly to the right service to find the directory 
where an extension is deployed (inside uno_packages directory)


i want to do it for pyUNo, but __file__ does not seem to work :(
so i want to use ScriptProvider API
(if it is more a udk question, feel free to tell it)

thanks in advance

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



Re: [api-dev] throw exception from OOo Basic

2006-09-29 Thread Laurent Godard

Hi Mathias


For the case of close prevention we introduced a new service in OOo2.0.3
that takes over the job for you and deals with the exceptions. Currently
I don't have some basic code at hand, only some C++ code using
constructors that needs to be translated first. Will see if I can find
some time.



thanks :)

Post it here, may be someone will find time doing it for you

Thanks again

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



Re: [api-dev] How use OpenOffice API from java without start up OO?

2006-09-27 Thread Laurent Godard

Hi


I have a big problem I am using OpenOffice API from Java to convert some
document that are requested by web page. The conversion must be performed
into a server Linux (Tomcat 5.5.9) and the server isn't able to DISPLAY any
frame. In the case, the server must not open or start open office frame. I
thing this could be changed by alterating
com.sun.star.comp.helper.Bootstrap.bootstrap(), that is, changing the way
that xbootstrap is obtained or initialized.

Can someone help me?


did you try sunig Xvfb ?

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



Re: [api-dev] Obscure documentation (Was: [api-dev] insertnewbookmark)

2006-09-27 Thread Laurent Godard

Hi all

Sorry if i hurted some of you by being so unpatient


This will still not change a lot as most of the content will still come
from the core developers but at least there will be a chance for
others to contribute and of course to translate. Let's hope for the best.



i'll be patient, so ...
and perharps recall in 6 months, as usual ;)

i stop any polemic thread here

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



Re: [api-dev] Obscure documentation (Was: [api-dev] insertnewbookmark)

2006-09-26 Thread Laurent Godard

Hi



I agree. One problem though, the documentation project does not have the
source documents so it is unlikely that the documents in the issues will
ever be updated. Perhaps the component on the issues is wrong.



this is a real problem

moreover, a lot of enhancements could be done such as
- translation
- give examples in other programming language

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



Re: [api-dev] Announcement of the new Object Inspector

2006-09-22 Thread Laurent Godard

Hi Bjoerne

What is your no referring to? AFAIK, XRay is for faster typing, 
because you get a list of available functions and properties while 
typing. But it is not a debugger, is it? So, you are probably referring 
to the getting familiar part.


sorry your wrong !

XRAY is more than 3 years old and is not for faster typing

it is a powerfull and versatile runtime inspector
pass any object at runtime you'll inspect them lively
as a bonus, you'll be able to plug on IDL reference and developper's guide

you really should have a look ...

and bernard could even do better if having proper objects as treviews 
available ;-)


Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



Re: [api-dev] Announcement of the new Object Inspector

2006-09-22 Thread Laurent Godard

Hi

Ok just tried it out (I wanted to do that already for some time). Must 
have been misinformed: Xray IS a debugger. What's the difference from 
setting a breakpoint and watching the variable? (Apart from the 
different UI)




timeline
this possibility on watching object occured only few months ago in the IDE

moreover, you can plug on IDL reference

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



[api-dev] Calc : merge a cell range

2006-09-20 Thread Laurent Godard

Hi all

merging a cell range is quite easy

activeSheet = thiscomponent.currentController.activeSheet
range = activeSheet.getCellRangeByName(A3:B3)
range.merge(true)

btw, how can i merge also the datas of all merged cells so that they are 
displayed in the merged cell (having A3 and B3 content in merged A3)


thanks

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



Re: [api-dev] Calc : merge a cell range

2006-09-20 Thread Laurent Godard

Hi Niklas

Read the text from cells A3 and B3, concatenate it, put it into A3. Same 
for notes if you care about them. There's no separate API.




ok, that's what i was about to do

but this is rather strange :( i would have expected an api
(but that not simple if thinking 2D)
btw, as there were an UNO slot fordispatcher, i would guess there are 
some solution already in the code so an api


thanks for the response :(

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



[api-dev] DataArray magic

2006-09-20 Thread Laurent Godard

Hi Peter


btw:
oRange = ThisComponent.Sheets(0).GetCellRangeByName(a1:a3)
oData = oRange.GetDataArray()
msgBox uBound(oData()) ' gives me 2.

If I substitute the range with a1:c1 the uBound of the array gives me 0.
Any ideas?


yes

you'll have a variant for each row
then each row contains an array for each cell

so a1:c1 has only one row -- ubound 0

try a ubound(oData(0))
you'll have 2 (a,b, and c)

Laurent


--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



[api-dev] OOoCon meeting on Extensions Project

2006-09-07 Thread Laurent Godard

Hi all

The OOoCon meeting on Extensions Project will occur on monday 14:00

The Extensions project has been proposed last year at Koper and been 
setup some month later. Valuable work occured and the wiki is up and 
starts to be filled.


The proposed meeting will cover the following points, involving all 
participants


* State of the project

* Started work : what is currently developped (especially in 
Hamburg) ? When will it be ready ? Do we have to wait or should we 
propose an intermediate solution ...
* they're will be a NetBeans integration presentation of the 
current state and outlook

* online update of extension
* licensing of extension
* ...

* Express and formalize the needs : Help mechanism, new UNO 
controls (treeview, enhanced lists), deployement of addons at 
installation time ...


* Translations : pages of the wiki are in english. Is the 
translation mechanism proposed sufficient ?


* Pending projects : prebuilt wizards, Extension Translation framework

* Volunteers questions regarding the organization of the project

* Proposal : organize an annual developpers meeting (coding sprint) 
to push particular aspects of the project (installer, pre-built wizards, 
Extension translation framework, documentations and starting guides ... )

* Any point and discussion regarding Extensions project

All the point discussed will be recorded and a synthesis of all 
discussion will be relayed to involved project (Framework, installer, 
l10n ...)


Feel free to add any point or comment on this schedule

Thanks and see you on monday

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



Re: [api-dev] Unpublished UNO API

2006-08-17 Thread Laurent Godard

Hi Stefan

there are two issues with unpublished UNO API I want you (as both an API 
author and consumer) to be aware of:




thanks for this reminder :-)

First, if you release some unpublished API that is badly needed by UNO 
component/OOo extension writers to get their job done, chances are that 
those writers will use your API in their components/extensions anyway.


I agree

Second, we neither have nor plan to have in place a mechanism to detect 
that some UNO component/OOo extension uses an old revision of some 
unpublished API.  That is, there will not be any warning if you deploy 
such a component/extension into an environment where it will not work, 
and at runtime using that component/extension can have unexpected effects.


anything that can be done there by exploring the source code and checks 
against the deprecated/unpublished status ?

this would be a tool for Extensions designer

if valuable (still do not know), dicussions may occur at here or better 
at [EMAIL PROTECTED] mailing list


thanks again

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



Re: [api-dev] Gap analysis for OpenOffice.org awt toolkit API

2006-07-14 Thread Laurent Godard

Hi carsten

What do you desperately miss (controls, classes, functions)? Which areas 
need the most work? How do you feel about the naming of interfaces and 
functions?




thanks a lot for your proposal

- one control missing is a TREEVIEW control
with icons on nodes possibilities
and (if possible) binding to datasource (a request)

- windows that could be dockable like the stylist or the navigator

- some auto-positioning (align to grid ?) of controls

more if i think to something

btw, i'll relay your call on french lists

thanks again

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



Re: [api-dev] SOLVED: Show a message box with the UNO based toolkit

2006-07-02 Thread Laurent Godard

Hi Paolo

I would like to make a code-snippet with this solution but since I've used an 
implementation detail, not officially documented (AFAIK), I would like to hear 
your 
comments before.




i remember Bernard Marcelly proposed a toolkit to call the OOoBasic msgbox
iirc, it is inside IZ
http://fr.openoffice.org/issues/show_bug.cgi?id=58103

btw, your solution is very elegant :-)
it is officially documented in the IDL
http://api.openoffice.org/docs/common/ref/com/sun/star/awt/WindowDescriptor.html#WindowServiceName
but, like many constants, we lack the possible values
what about defining your example as class but may be it is useless
(one can also think to enhacements like positionning)

thanks for sharing this... in python :-)

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



Re: [api-dev] Mapping of the UNO type hyper in StarBasic

2006-06-23 Thread Laurent Godard

Hi


Meanwhile I encountered that you can't have/use a number that is
outside int32 range but still inside the int64 range, for example
Sub hyper
x = CreateUnoValue(hyper, 9223372036854775806)
End Sub

will give an error, yet the numeric constant is still inside the range
a variable of type hyper can take. the question now is:
What happens with such big numbers (as above) that are transfered from
a UNO function to Starbasic, like the getLength() function for ucb
file objects.



perharps a dummy question
what about double type or currency one ?
does it cover ?
not sure they are compliant though

 Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



Re: [api-dev] how to make the macros available to all users of a Windows Terminal server

2006-05-23 Thread Laurent Godard

Hi


and all the packaged files are in there, but they are not added to

C:\Program Files\OpenOffice.org 2.0\share\basic\

I had expected to see an ETUC folder appear there.



will be in C:\Program Files\OpenOffice.org 2.0\share\uno_packages 
subdirectory


And they are not registered as a library in OOo either. Nothing shows up 
there.




that is strange ..
did you close OOo (quickstarter too)

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



Re: [api-dev] [Impress] - How to export all the slides in gif

2006-05-17 Thread Laurent Godard

Hi Jerome


I would like to export all slides of a odp file in GIF format with as 
number gif files as number slides in de odp file.


Is anyone have a solution ?


you may find the solution here
http://oooconv.free.fr/oooconv/oooconv_fr.html

Regards

laurent


--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



Re: [api-dev] use of css.awt.UnoControlScrollBarModel

2006-05-15 Thread Laurent Godard

Hi


controls is how often the XAdjustmentListener which you can register at
the UnoControlScrollBar is called. The code to handle those events -
e.g. by scrolling an associated window - is still up to you.




would it be difficult to make this generic ?


Ok, now it's clear.
I'll repeat my tests using the listener for updating the client frame 
position.




could you please paolo show us the result with a code snippet (i may 
help on testing if needed)


thanks

laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



Re: [api-dev] Easy to use complex toolbar controls for add-ons

2006-05-15 Thread Laurent Godard

Hi Mathias


Hm, listeners can be registered by another macro, that itself can by
started by an event - and the listeners themselves are called by the
event source. Or what do you mean?



how is the first macro called ?



The problem with global variables is that they are, well, global. If you
have more than one extension they might use the same global variables.
Or is there something like global in the library or module scope that
still can survive the termination of the macro? (Sorry, I'm not an OOo
Basic expert.)



my fisrt thought was usin global, and yes you're right about multiple 
instances. can be tricky


regarding, the scope, as paolo sais, it seems to be possible that 
listeners are not unregistred when the macro ends
i've never tested this way but this does not solve this specific problem 
(perharps using an array ?)




As already mentioned: currently there is no way to pass an object to a
macro that shall be called by macro URL or macro name. Problem number one.



that's why i spoke about an intermediate that relay the call, adding the 
event

Btw, do you mean inside the code or through xcu files ?



If I understood correctly you want to create a listbox in the toolbar
that depending on the selected entry calls different macros, right?


no
take the uno list objetc
it has events, i want to have the same ones

 Now

let's discuss the way how the listbox gets filled. This is the point
where the status updating comes into play: a dispatch object will
initialize the listbox and also change its content. As already described
this is the second problem I see that needs to be solved if we want to
use all the new toolbar features in Basic.



right, but teh same mechanism previously proposed can be used, no ?
i tis a matter of event intializing


Your example seems to be simpler: I don't see that you want to change
the content of the listbox at runtime, so having a static dropdown menu
button that gets the macros to be called for each list entry by a
configuration file (Addon.xcu) and not by status updating as described
by Carsten would be enough. Why establishing a complex communication
channel for something that is sent only once?



argh, perharps my example was not so good explained
obviously, i want to be able to manipulate the listbox dynamically !!
fill it, remove items, retreive active item ...
like a real componenent


If you just want to allow listboxes in toolbars bound to Basic macros we
could make this possible by creating a new toolbar button type that
reads the list from the Addon.xcu, just like a sub menu in the Addon menu.



basically, i think we should look at the already combo uno object and 
provide all its feature to a basic macro

http://api.openoffice.org/docs/common/ref/com/sun/star/awt/XListBox.html

I'll try to install the last m16x to see exactly this feauture working 
thanks to the provided example.


Thanks again

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



Re: [api-dev] Easy to use complex toolbar controls for add-ons

2006-05-15 Thread Laurent Godard

Hi Carsten

Just for your infomration. The new toolbar controller enhancements are 
not a com.sun.star.awt substitution. The implementation is deeply 
integrated into the Office framework and therefore cannot support the 
same feature set as low-level awt controls! Most functions are supported 
or can be added without any problem.


thanks for your precision
but this sounds odd to me regarding UNO nature and componentization

I'll have a look (m169 just finished downloading) trying to understand 
how it actually works (with an external poor user pow)
But i think that script coders are expecting to have access to the 
standard features and events of such controls and that's why i told 
about the awt controls


Thanks

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



Re: [api-dev] Easy to use complex toolbar controls for add-ons

2006-05-15 Thread Laurent Godard

Hi Mathias


This morning I had another idea that might solve the other problems: if
we use a dispatch object service as a relay between the UI elements
and the basic code as I proposed we also can use this object as a
storage for data associated to this connection, e.g. by providing a
property container (that is used from Basic quite easily!). This way you
don't need to use global variables. And if we want to send status
updates to the UI element we can do this based on the data stored at the
object and by calling a forwarding method of the object.



Greatshot
I think this is really the way


The only problem then will be to identify the dispatch object amongst
the bunch of them that might have been created, but as we can make frame
and command URL accessible to the listener (implemented in Basic) we can
use the combination of both as a unique identifier for searching for the
dispatch object in a global container of such objects. I will draw up
this in a more detailed manner.



each toolbar objects has a name
so a getByName like over a sequence could be a solution

thanks again
let us know

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



Re: [api-dev] OfficeToolbar titlebar?

2006-05-15 Thread Laurent Godard

Hi Carsten

Thanks for your response

The title settings will be ignored as older version use a different 
resource URL schema for add-on toolbars. Therefore no problem with an 
older 2.0.x version.




yes, this was obvious, but i wanted a confirmation to make things clear

thanks

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



Re: [api-dev] Easy to use complex toolbar controls for add-ons

2006-05-14 Thread Laurent Godard

Hi Mathias

Thanks for your response


Perhaps instead of macro event bindings we could use listeners as Basic
is able to implement them? But I'm not sure wether listeners implemented
in Basic will survive the termination of the macro that registers
them. But you or Paolo as Basic experts know, I assume. ;-)



sounds interresting
listeners can survive using a global variable
but, the remaining problem is how to start the listeners


There still is the other way around: once a UI element gets a dispatch
object it will register at it as a css.frame.XStatusEventListener and
expects to receive status events. Thew new controls don't make any sense
without providing proper status information.



right


The macro code must be able to provide this information and it must be
able to *update* it when needed. So each created dispatch object must be
accessible somehow later to send a new status. This means: you must
store the information for this somewhere, you can't store it in
variables in your basic code because you shouldn't have your macro
running permanently by using a busy loop. So where should the data go?



using a global variable let you store information


You see: a lot of questions to answer. But not impossible. :-)
Perhaps it would help if you ore Paolo could describe a possible use
case where you would like to use the new toolbar control features in
basic code.



ok let's try

- a dropdown list in the toolbar nammed myToolbarObject
- this object has an event change
- reacting on this event, a macro can be called, passing an event 
objetc, containing the source of that event


to setup the called macro via the event, a new node could be insterted 
in the addon.xcu

   prop oor:name=ControlType oor:type=xs:string
valueCombobox/value
/prop
   ...
   ...
   ...
   prop oor:name=Events 
prop oor:name=change oor:type=xs:string 
  prop oor:name=URL oor:type=xs:string
valuemacro://mylib.mymodule.aMacro/value
/prop
prop oor:name=otherevent oor:type=xs:string 
  prop oor:name=URL oor:type=xs:string
valuemacro://mylib.mymodule.otherMacro/value
/prop
/prop

and then having a macro

sub aMacro(event)
  theCombo = event.source
  'print the combobox name
  print event.source.Name
end sub

So this is a kind of listeners but that are automatically launched when 
loading the toolbar (btw, this should already be done)
Then, reacting on an event is calling the specified macro with the event 
object as argument. that's why i spoke of a kind of relaying


This can be complementary to the present implementation, (the events 
call can the just be overloaded ?)


Mathias, this is only rough ideas and need to be discussed
Any comments is welcommed

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



Re: [api-dev] use of css.awt.UnoControlScrollBarModel

2006-05-14 Thread Laurent Godard

Hi Paolo

looking in the IDL documentation for the css.awt.UnoControlScrollBarModel 
service I've found this new property:


i've never used this control

This seems very interesting so I've done some investigations, but without any 
luck.

Below my testing code:

Before run it create an empty dialog and place on it an horizontal scrollbar 
with sufficient dimensions (f.e. 100x100).


As you will see in the code I've put a control inside the scrollbar window.



why inside rthe scrollbar ? is it the legal use of it ?
i would expect attach a dialog window or frame to it ? how would you 
implement both horizontal and vertical slides

but as i already told, i've never experimented this object

The code runs without any errors but I don't see any movement when I move the 
slider.




same for me, i'll try to invistigate
Let us know

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



Re: [api-dev] Easy to use complex toolbar controls for add-ons

2006-05-10 Thread Laurent Godard

Hi Carsten

Thansk a lot for all if these very interresting features

I hope that this enhancement will enable more people to create better 
add-ons. Questions and comments are welcome.




i red rapidelly but is it possible to implement the reactors of objects 
in Basic ?It seems to me that Paolo already asked something like this, no ?


a way could be a generic service taking the macro name as argument and 
doing a transparent relay. Would it be difficult to do ? i do not think  so


thanks again, i'll try asap

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



Re: [api-dev] Where Is a List of Version and Build Numbers?

2006-04-27 Thread Laurent Godard

Hi Hal

Is there a list somewhere of build numbers and their corresponding 
version numbers?  For example, what build (or builds) was version 1.0, 
or any other versions up to 2.0.2?  Isn't there a list somewhere I can 
use to go through and match up build numbers with version numbers?




I thoink this answers your question
http://development.openoffice.org/releases/OpenOffice_org_2_x.html

HTH

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



[api-dev] Lockcontrollers keyboard

2006-04-05 Thread Laurent Godard

Hi

using lockControllers, screen is not refreshed but what the user types 
on the keyboard is displayed once unlockControllers called


I used a KeyHandler to solve this problem, not forwarding any keystroke
is there a cleanest way to totally lock (screen  inputs) a document

Thanks in advance

Laurent
'
Sub Main

on error goto cleanExit

RegisterKeyHandler
thisComponent.lockControllers
wait(5000)

cleanExit:
thisComponent.unlockControllers
unRegisterKeyHandler
print exit
End Sub

Sub RegisterKeyHandler
oDocView = ThisComponent.getCurrentController
	oKeyHandler = createUnoListener(keyHandler_, 
com.sun.star.awt.XKeyHandler)

oDocView.addKeyHandler(oKeyHandler)
End Sub
'
Sub UnregisterKeyHandler
on error resume next
oDocView.removeKeyHandler(oKeyHandler)
End Sub
'
Function keyHandler_KeyPressed(oEvt)
keyHandler_KeyPressed=True
End Function
'
Function keyHandler_KeyReleased(oEvt)
  keyHandler_KeyReleased = False
End Function
'
Function keyHandler_disposing()
end function

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



Re: [api-dev] Impossible to close a Base document

2006-03-14 Thread Laurent Godard

Hi Frank

I reproduced the problem


...
dbDoc.close(True)

The document usine.odb shows up, but the close instruction receives an 
exception.


what kind of exception?


com.sun.star.util.CloseVetoException

Laurent


--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



Re: [api-dev] Impossible to close a Base document

2006-03-14 Thread Laurent Godard

Hi Frank


They're bound to the model, but that's not necessarily the same as
creator.



yes


For instance, you could load a model without any view, by retrieving the
DataSource at the DatabaseContext (getByName( URL ) ), and asking this
DataSource for its Document (.getDatabaseDocument). In this case, you'd
have a model, but no view at all.



ok



So, while the document knows that there exists a view for it, it cannot
know who's the owner of this view.



Would it be possible to identify controllers that are loaded by 
different ways ?


Thanks again for your response Frank

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



Re: [api-dev] Impossible to close a Base document

2006-03-14 Thread Laurent Godard

Hi Bernard,


In the original code, I can understand that, although it is not obvious.
But if I directly load the odb file, I still get the same exception



the datasource is loaded to be accessed
so you end with the same previous case i guess

this is the difference with other document types : there is no 
extra-binding to setup to display the document


Your solution works, but it is a workaround. It is not described in Dev' 
Guide 6.4.5, sub-section Closing a document. See in particular the 
flowchart Closing a model.

I will file an issue.


please send me the IZ number

thanks

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



Re: [api-dev] Impossible to close a Base document

2006-03-14 Thread Laurent Godard

Hi bernard

Bernard Marcelly a écrit :

Bonjour Frank
Message du 2006-03-14 12:33:

Hmm. Do you mind submitting an issue for this (and assigning it to me)?
Not sure how it could be solved, since database documents are a little
bit different (as you can obtain them without loading, via the
  DatabaseContext.getByName( url ).getDatabaseDocument()
way, as described in another mail). But we should try to be consistent 
here.




Issue filed : http://www.openoffice.org/issues/show_bug.cgi?id=63162



thanks :-)

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



Re: [api-dev] Code Snippet page

2006-03-08 Thread Laurent Godard

Hi Jurgen

i join you on the lack of time but also to the emphasis of Tom and Paolo 
great work !!


Even for the last point i think that it could make sense to move into 
the OO wiki with the snippet collection but i am not sure.
What are your opinions? Do you would expect more contributions, 
improvements when the snippets would be in a wiki system where changes 
are easier?




Hi would say that the reference has to stay stable (non easely editable) 
as snippets are usually tested and are working

But for translation, here is what i plan to do for the extensions projetc

- a reference text in english on the OOo site
- the translations on the wiki pointed from the site
(perharps directly by languages, or with an intermediate page (less work 
on update when new languages)


Then someone contributes in english, and a chapter is opened on the wiki 
to gather translations that can be an iterative work


The next step will be to reverse the process as a complementary approach 
: create something in a language and progressively translate it in 
english. Once ok, lets put it as static on the page


So for the code snippet, a link pointing on the wiki with the access to 
its translation - Did Ian achieve its syntax highlighting job ?



Let start us an open discussion to find the best solution to spread the 
API knowledge to make programming with and for OpenOffice easier.




The article contest is also a way
And the translation of articles may be could help

Regarding documentation, is the developpers guide free ? what licence ?
Some parts (not all) could be translatable

Other ideas are also welcome and this shouldn't be competing to our new 
extensions project. I would like to address more the technical 
features and documentation, where the stuff gets hosted later is not 
important here. But that something (and hopefully more in the future) is 
available, is easy to find, is well structured ... is important for the 
success of any programmability story around OpenOffice.




I totally agree and hope having time to help through the developpers 
part of the extension project


Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



Re: [api-dev] OOoBean correct termination

2006-03-06 Thread Laurent Godard

HI


I the patch I sent, I tested this case: the bean connection is simply stopped: I
found very stupid to terminate the whole office if the user has another document
opened on the desktop.



I totally agree with you Cedric
But is it stil possible ?
did you implement the optional way (force terminate) we discussed ?

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



Re: [api-dev] Java Snippet Suggestion: how to convert documents - please review

2006-03-06 Thread Laurent Godard

Hi tobias


yes and no. For one part I agree. If you are an expert, it is useful for
you to see only the relevant part of an application.
But I disagree because I am a newbie. And I waste 90% of my time with
finding out the conditions for code snippets and how to get them to
work. And you can imagine, this work is really discouraging.



yes you're right ! both approaches are valuable

I can propose the following :
* do a small snippet as required
* join the extensions incubator project and start an how to
The easiest, i think is using the OOoWiki. then i can point on it form 
the OOo site and call for translators (from eglish to other languages)


- joining the extensions project
[EMAIL PROTECTED]

- OOoWiki
http://wiki.services.openoffice.org/wiki/Main_Page

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

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



  1   2   >