Re: [api-dev] Questions about com.sun.star.awt.MenuBar and com.sun.star.awt.PopupMenu

2007-10-12 Thread Ariel Constenla-Haile

Hello Carsten,


Carsten Driesner escribió:
You should use com.sun.star.awt.MenuBar and 
com.sun.star.awt.PopupMenu. The other service names are outdated 
and only supported for compatibility reasons. Could please write an 
issue and set me ([EMAIL PROTECTED]) as the owner.


The missing IDL files for com.sun.star.awt.MenuBar and PopupMenu are 
clearly defects. The project should be API and owner cd.



done: http://api.openoffice.org/issues/show_bug.cgi?id=82512



The example on the SDK works OK, because the fixed text implementation
has no context menu, but how do I intercept the context menu of
UnoControls? Is it possible at all? (I mean, using API, not hacking
OOo's C++ code).
No, that's no possible. Currently the toolkit uno controls are just 
small wrappers around the VCL based controls. If you need something 
like this you have to write a request for enhancement. 



Done: http://api.openoffice.org/issues/show_bug.cgi?id=82514


but need feedback from extension developers. Only you can give us 
information what you really miss. Therefore please write request for 
enhancements and let us know your problems with the API.


Later I will post two mails concerning what seems to be (for me at 
least) XFilePicker and SystemPointer issues




(By the way, if could dream without any reasonable limit, I would dream
of a Java-AWT+Swing-like API; but I've got my feet on the ground, 


I can understand your dream, but resources are tight and we have to find 
the best compromise between time and feature set.


Talking with Frank Schönheit about the issue 
http://dba.openoffice.org/issues/show_bug.cgi?id=80940, I realized - 
while reading the source - that GUI programming with the APi is very 
nice, but the native C++ code has the *real wow effect*! So I hope in 
the future you'll be hearing from me offering the help I could give (by 
now, I haven't even set my OOo building environment, I'm too lazy with 
my comfortable Java NetBeans IDE).



Bye and thanks,
Ariel.



--
Ariel Constenla-Haile
La Plata, Argentina

[EMAIL PROTECTED]
[EMAIL PROTECTED]

http://www.arielconstenlahaile.com.ar/ooo/

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



Re: [api-dev] Questions about com.sun.star.awt.MenuBar and com.sun.star.awt.PopupMenu

2007-10-12 Thread Carsten Driesner

Ariel Constenla-Haile schrieb:

Hi Ariel,


Carsten Driesner escribió:
You should use com.sun.star.awt.MenuBar and 
com.sun.star.awt.PopupMenu. The other service names are outdated 
and only supported for compatibility reasons. Could please write an 
issue and set me ([EMAIL PROTECTED]) as the owner.


The missing IDL files for com.sun.star.awt.MenuBar and PopupMenu are 
clearly defects. The project should be API and owner cd.



done: http://api.openoffice.org/issues/show_bug.cgi?id=82512

Accepted.




The example on the SDK works OK, because the fixed text implementation
has no context menu, but how do I intercept the context menu of
UnoControls? Is it possible at all? (I mean, using API, not hacking
OOo's C++ code).
No, that's no possible. Currently the toolkit uno controls are just 
small wrappers around the VCL based controls. If you need something 
like this you have to write a request for enhancement. 



Done: http://api.openoffice.org/issues/show_bug.cgi?id=82514

Accepted.



but need feedback from extension developers. Only you can give us 
information what you really miss. Therefore please write request for 
enhancements and let us know your problems with the API.


Later I will post two mails concerning what seems to be (for me at 
least) XFilePicker and SystemPointer issues




(By the way, if could dream without any reasonable limit, I would dream
of a Java-AWT+Swing-like API; but I've got my feet on the ground, 


I can understand your dream, but resources are tight and we have to 
find the best compromise between time and feature set.


Talking with Frank Schönheit about the issue 
http://dba.openoffice.org/issues/show_bug.cgi?id=80940, I realized - 
while reading the source - that GUI programming with the APi is very 
nice, but the native C++ code has the *real wow effect*! So I hope in 
the future you'll be hearing from me offering the help I could give (by 
now, I haven't even set my OOo building environment, I'm too lazy with 
my comfortable Java NetBeans IDE).

You are welcome to join us.

Regards,
Carsten

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



Re: [api-dev] height/width of table cells in a complex XTextTable

2007-10-12 Thread Fernand Vanrie

ianmcr wrote:
Thanks for the link. 


However, I need to parse the XTextTable directly via the API (ie.without
saving an odt file etc). As I understand it Writer2Latex converts the
contents of the odt. Is this correct? 
  

no when used as exportfilter it works from within a writerdoc


Fernand Vanrie wrote:
  

ianmcr wrote:


I'm continuing to work on an export module for generating accessible
html. We
currently generate the correct html for simple tables - (ignoring cell
properties such as width/height etc). So each input table must have a
regular structure without merged/split cells.

We now need to handle complex tables containing cells which may have been
merged and/or split in the horizontal/vertical directions. I understand
from
the dev guide and a little experimentation that XTableColumns and
XtableColumnSeperators are empty for a complex table. Is there any other
method for determining the width of each cell?

Any advice or suggestions are much appreciated.
  
  
have a look at the work Henrik Just had done with his Writer2Latex 
http://www.hj-gym.dk/%7Ehj/writer2latex/ who is the best HTML exporter 
there is , and !he has solved already your problems :-)




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






  


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



[api-dev] css.awt.SystemPointer: undocumented values

2007-10-12 Thread Ariel Constenla-Haile

Hello people,

this time, I think this an issue (may be type:defect, component: api, 
subcomponent: code [IDL source files]):


Both the online API refrecence and the IDL file in the source code 
(offapi/com/sun/star/awt) for the constants group

com.sun.star.awt.SystemPointer references up to 72 constants:

FROM com.sun.star.awt.SystemPointer.ARROW ( = 0 )
TO com.sun.star.awt.SystemPointer.CHAIN_NOTALLOWED ( = 71 )


Playing around with it [1], you can realize that we can count up to 94 
(from 0 to 93), this at least on Windows (to try in other OS I will have 
to boot my PC...).



For example, what we can call com.sun.star.awt.SystemPointer.PIVOT_DEL 
(= 87) - regarding source/vcl/win/source/src/pivotdel.cur  - is a mouse 
pointer for Calc's data pilot NOT documented [2].





[1] The following is a very simple implementation of XMouseListener that 
increments the value of the constant everytime the mouse enters a control:


private int mousePointer = 0;
//...
public void mouseEntered(MouseEvent oEvent){
System.out.println(Mouse entered! Constant value=  + 
mousePointer);

changeMousePointer( mousePointer++, oEvent.Source );
}

public void mouseExited(MouseEvent oEvent) {
changeMousePointer(SystemPointer.ARROW, oEvent.Source );
}

private void changeMousePointer(
int aSystemPointer,
Object aControl){
try {
XControl xControl = (XControl) UnoRuntime.queryInterface(
XControl.class, aControl);
XWindowPeer xWinPeer = xControl.getPeer();
Object pointer;
pointer = xMCF.createInstanceWithContext(
com.sun.star.awt.Pointer, xCtxt);
com.sun.star.awt.XPointer xPointer = 
(com.sun.star.awt.XPointer)

UnoRuntime.queryInterface(
com.sun.star.awt.XPointer.class, pointer);
xPointer.setType( aSystemPointer );
xWinPeer.setPointer(xPointer);

} catch (com.sun.star.uno.Exception ex) {
ex.printStackTrace();
}
}

***

[2] Alphabetic list of document ones:

com.sun.star.awt.SystemPointer.ARROW = 0
com.sun.star.awt.SystemPointer.CHAIN = 70
com.sun.star.awt.SystemPointer.CHAIN_NOTALLOWED = 71
com.sun.star.awt.SystemPointer.CHART = 65
com.sun.star.awt.SystemPointer.COPYDATA = 41
com.sun.star.awt.SystemPointer.COPYDATALINK = 44
com.sun.star.awt.SystemPointer.COPYFILE = 46
com.sun.star.awt.SystemPointer.COPYFILELINK = 49
com.sun.star.awt.SystemPointer.COPYFILES = 51
com.sun.star.awt.SystemPointer.CROOK = 36
com.sun.star.awt.SystemPointer.CROP = 37
com.sun.star.awt.SystemPointer.CROSS = 5
com.sun.star.awt.SystemPointer.DETECTIVE = 66
com.sun.star.awt.SystemPointer.DRAW_ARC = 57
com.sun.star.awt.SystemPointer.DRAW_BEZIER = 56
com.sun.star.awt.SystemPointer.DRAW_CAPTION = 64
com.sun.star.awt.SystemPointer.DRAW_CIRCLECUT = 59
com.sun.star.awt.SystemPointer.DRAW_CONNECT = 62
com.sun.star.awt.SystemPointer.DRAW_ELLIPSE = 60
com.sun.star.awt.SystemPointer.DRAW_FREEHAND = 61
com.sun.star.awt.SystemPointer.DRAW_LINE = 53
com.sun.star.awt.SystemPointer.DRAW_PIE = 58
com.sun.star.awt.SystemPointer.DRAW_POLYGON = 55
com.sun.star.awt.SystemPointer.DRAW_RECT = 54
com.sun.star.awt.SystemPointer.DRAW_TEXT = 63
com.sun.star.awt.SystemPointer.ESIZE = 10
com.sun.star.awt.SystemPointer.FILL = 31
com.sun.star.awt.SystemPointer.HAND = 27
com.sun.star.awt.SystemPointer.HELP = 4
com.sun.star.awt.SystemPointer.HSHEAR = 33
com.sun.star.awt.SystemPointer.HSIZEBAR = 25
com.sun.star.awt.SystemPointer.HSPLIT = 23
com.sun.star.awt.SystemPointer.INVISIBLE = 1
com.sun.star.awt.SystemPointer.LINKDATA = 42
com.sun.star.awt.SystemPointer.LINKFILE = 47
com.sun.star.awt.SystemPointer.MAGNIFY = 30
com.sun.star.awt.SystemPointer.MIRROR = 35
com.sun.star.awt.SystemPointer.MOVE = 6
com.sun.star.awt.SystemPointer.MOVEBEZIERWEIGHT = 39
com.sun.star.awt.SystemPointer.MOVEDATA = 40
com.sun.star.awt.SystemPointer.MOVEDATALINK = 43
com.sun.star.awt.SystemPointer.MOVEFILE = 45
com.sun.star.awt.SystemPointer.MOVEFILELINK = 48
com.sun.star.awt.SystemPointer.MOVEFILES = 50
com.sun.star.awt.SystemPointer.MOVEPOINT = 38
com.sun.star.awt.SystemPointer.NESIZE = 12
com.sun.star.awt.SystemPointer.NOTALLOWED = 52
com.sun.star.awt.SystemPointer.NSIZE = 7
com.sun.star.awt.SystemPointer.NWSIZE = 11
com.sun.star.awt.SystemPointer.PEN = 29
com.sun.star.awt.SystemPointer.PIVOT_COL = 67
com.sun.star.awt.SystemPointer.PIVOT_FIELD = 69
com.sun.star.awt.SystemPointer.PIVOT_ROW = 68
com.sun.star.awt.SystemPointer.REFHAND = 28
com.sun.star.awt.SystemPointer.ROTATE = 32
com.sun.star.awt.SystemPointer.SESIZE = 14
com.sun.star.awt.SystemPointer.SSIZE = 8
com.sun.star.awt.SystemPointer.SWSIZE = 13
com.sun.star.awt.SystemPointer.TEXT = 3

[api-dev] Service names for css.ui.dialogs.XFilePicker / XFolderPicker implementation

2007-10-12 Thread Ariel Constenla-Haile

Hello people,

I think this an issue (may be type:defect, component: api, 
subcomponent: code [IDL source files]/ documentation [Dev's Guide 
20.5.2.28]):


as I said on a mail in extensions-dev
[http://extensions.openoffice.org/servlets/ReadMsg?list=devmsgNo=897],
there are three service names you can use to implement an XFilePicker or
an XFolderPicker:

XFilePicker:
 com.sun.star.ui.dialogs.FilePicker
 com.sun.star.ui.dialogs.OfficeFilePicker
 com.sun.star.ui.dialogs.SystemFilePicker
XFolderPicker:
 com.sun.star.ui.dialogs.FolderPicker
 com.sun.star.ui.dialogs.OfficeFolderPicker
 com.sun.star.ui.dialogs.SystemFolderPicker


the difference is explained there on the mail (but just covering the
XFilePicker implementation asked by the developer).

I discovered this by crash and error (crash because Linux builds,
made by distros, NOT by OOo, often broke my FilePickers implementations),
and by querying the SericeManager [1] every once in a while.

Neither the API reference

http://api.openoffice.org/docs/common/ref/com/sun/star/ui/dialogs/FilePicker.html

nor the new chapter of the Developer's Guide

http://api.openoffice.org/docs/DevelopersGuide/GUI/GUI.xhtml#1_5_2_28_File_Picker

tell us about them.
Making this services public to everyone on the API reference (that's the
first place where a developer looks(or should look) for answers [2]),
could help to prevent headaches to developers.


Thanks,
Ariel.



[1] Very simple:

public static void main(String[] args){
XMultiComponentFactory xMCF = null;
XComponentContext xContext;
try {
xContext = Bootstrap.bootstrap();
xMCF = xContext.getServiceManager();
String[] servicesNames = xMCF.getAvailableServiceNames();
java.util.Arrays.sort(servicesNames);
for (String name : servicesNames) {
System.out.println(name);
}
} catch (BootstrapException ex) {
ex.printStackTrace();
} finally {
System.exit(0);
}
}

[2] Although

* the service names can be found searching OOo website
[for example
http://www.openoffice.org/servlets/ReadMsg?list=devmsgNo=20474]

* and there is even an issue
[http://api.openoffice.org/issues/show_bug.cgi?id=81581] reported by an
OOo Basic programmer about the OfficeFilePicker,

* and of course everyone in this mailing list may know about them,

there is still a lack of official documentation in the API reference 
and the Dev's Guide.



--
Ariel Constenla-Haile
La Plata, Argentina

[EMAIL PROTECTED]
[EMAIL PROTECTED]

http://www.arielconstenlahaile.com.ar/ooo/




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



Re: [api-dev] SimpleSystemMail

2007-10-12 Thread Mathias Bauer
Hi Alexandro,

Alexandro Colorado schrieb:

 However I want to know if I would need a transport on my system so the API  
 is able to send the email.  This is a similar dilema that I face with  
 python's libsmtpd module which is capable of working as an smtpd server  
 but there is really not much reference about how to run it.

The SimpleSystemMail service uses the system mail client to send mails.
If you don't get one on your system you could try the
com.sun.star.system.SimpleCommandMail service. At least that's the
strategy the Send document as mail code in OOo uses.

Ciao,
Mathias

-- 
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to [EMAIL PROTECTED].
I use it for the OOo lists and only rarely read other mails sent to it.

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



Re: [api-dev] SimpleSystemMail

2007-10-12 Thread Alexandro Colorado
On Fri, 12 Oct 2007 12:55:51 -0500, Mathias Bauer [EMAIL PROTECTED]  
wrote:



Hi Alexandro,

Alexandro Colorado schrieb:

However I want to know if I would need a transport on my system so the  
API

is able to send the email.  This is a similar dilema that I face with
python's libsmtpd module which is capable of working as an smtpd server
but there is really not much reference about how to run it.


The SimpleSystemMail service uses the system mail client to send mails.
If you don't get one on your system you could try the
com.sun.star.system.SimpleCommandMail service. At least that's the
strategy the Send document as mail code in OOo uses.

Ciao,
Mathias




Thanks mathias, I wonder if this is actually generated from OOo or you  
mean the $mail command in Unix.  In other words is this SimpleComandMail   
cross platform at all?

--
Alexandro Colorado
CoLeader of OpenOffice.org ES
http://es.openoffice.org

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



Re: [api-dev] SimpleSystemMail

2007-10-12 Thread Paolo Mantovani
Hi Alexandro,

Alle 09:36, giovedì 11 ottobre 2007, Alexandro Colorado ha scritto:
 Hi Paolo,

 In Barcelona I asked you about the possibility of using SimpleSystemMail
 uno service to be able to send email from OpenOffice.org. The only
 reference I got to how it works is through the snippet on Andrew
 Pitonyak's Macro Book.

You can find another example in my SnippetCreator wizard (module DlgSnippet - 
Sub SnippetToEmail )


 Sub SendSimpleMail()
Dim vMailSystem, vMail, vMessage

vMailSystem=createUnoService(com.sun.star.system.SimpleSystemMail)
vMail=vMailSystem.querySimpleMailClient()

Regarding the problem that you mentioned in your follow-up I've just seen that 
Mathias has alreadly answered.
I can only add that in the SnippetCreator wizard I've used the following 
strategy:



'try to obtain a mail service
oMailService = createUnoService(com.sun.star.system.SimpleSystemMail)

If IsNull(oMailService) Then
oMailService = createUnoService(com.sun.star.system.SimpleCommandMail)
End If

If IsNull(oMailService) Then
GoTo ErrH
End If





[]
 However I want to know if I would need a transport on my system so the API
 is able to send the email.  This is a similar dilema that I face with
 python's libsmtpd module which is capable of working as an smtpd server
 but there is really not much reference about how to run it.

I don't catch this point (but I must say that I'm not very acquainted with 
network things):

Even if you run an smtpd server from Python, the API relies on an external 
mail client program for sending emails, therefore, the external mail client 
should be previously configured for using your local smtp server.
So I don't see any advantages.


ciao
Paolo M


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