Re: [api-dev] Calc: loading file with key-shortcuts .sxc v/.ods

2006-04-07 Thread Bart Aimar
Scusami Ennio, ma ti scrivo in privato... sono stanco e il mio inglese è 
scarso e domattina sono via presto.


Inoltre l'archivio del [EMAIL PROTECTED] al momento sembra non funzionare... 
pertanto ti rimanderei su su una lista italiana dove ho tenuto un diaro 
delle mie tribolazioni sull'argomento che ti interessa.


Leggi SOLO da questo mex in poi... (prima vaneggiavo)
http://www.mail-archive.com/dev@it.openoffice.org/msg00450.html

In ogni caso qui poi trovare direttamente un file di esempio...

http://aimar.mrjive.it/?q=node/12

spero di esserti stato utile...

'notte

Bart

Ennio-Sr ha scritto:

* Mathias Bauer <[EMAIL PROTECTED]> [070406, 23:54]:


Ennio-Sr wrote:

...zot...

BTW: I don't know if this is possible for you, but if you want to use a
special keyboard configuration for certain documents it could be easier
to store this configuration directly into those documents ... 



Mathias, that is exactly what I thought I was doing: for each group of
files sharing the same macro-shortkey associations I'm loading the file
where the particular configuration was stored (calling the relative
macro from within the main one associated with the 'open document'
event and saved into  the document itself) [1]; but may be I'm missing
some better feature ? In this case, I should very much appreciate it if
you would suggest any specific readings.



...or store it
into a template and create the documents from this template (documents
inherit their UI config from their template).




Not yet studied the 'template': AAMOF I've only been working on my old
lotus.123 files, imported last year into OO-1.1.4 (my last effort to get
rid of Win$ows ... ;-) ) and now  on the way to OO-2.0.
When the necessity arises I'll take advantage of your suggestions.

Thanks again for your time.
All the best,
Ennio.

--
[1] The  macro (I reported in my original post) only does half the job
up to the presentation of the menu on which I have to manually press
'Load', choose the AAA-KbdCfg file and so on; according to past
enquiries  it does not seem possible to automize the whole process.



--

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



Re: [api-dev] Calc: loading file with key-shortcuts .sxc v/.ods

2006-04-07 Thread Ennio-Sr
* Mathias Bauer <[EMAIL PROTECTED]> [070406, 23:54]:
> Ennio-Sr wrote:
> 
> > Hi Mathias,
> > 
> > The answer was 'yes' for both your questions. However, by now I've
> > re-obtained the same performance as I had under 1.1.4 after re-building
> > the file containing the keyboard configuration ('AAA-KbdCfg').
> 
> Nice to hear that it finally worked for you.
> BTW: I don't know if this is possible for you, but if you want to use a
> special keyboard configuration for certain documents it could be easier
> to store this configuration directly into those documents ... 

Mathias, that is exactly what I thought I was doing: for each group of
files sharing the same macro-shortkey associations I'm loading the file
where the particular configuration was stored (calling the relative
macro from within the main one associated with the 'open document'
event and saved into  the document itself) [1]; but may be I'm missing
some better feature ? In this case, I should very much appreciate it if
you would suggest any specific readings.

> ...or store it
> into a template and create the documents from this template (documents
> inherit their UI config from their template).
> 

Not yet studied the 'template': AAMOF I've only been working on my old
lotus.123 files, imported last year into OO-1.1.4 (my last effort to get
rid of Win$ows ... ;-) ) and now  on the way to OO-2.0.
When the necessity arises I'll take advantage of your suggestions.

Thanks again for your time.
All the best,
Ennio.

--
[1] The  macro (I reported in my original post) only does half the job
up to the presentation of the menu on which I have to manually press
'Load', choose the AAA-KbdCfg file and so on; according to past
enquiries  it does not seem possible to automize the whole process.

-- 
[Perche' usare Win$ozz (dico io) se ..."anche uno sciocco sa farlo.   \\?//
 Fa' qualche cosa di cui non sei capace!"  (diceva Henry Miller) ](°|°)
[Why use Win$ozz (I say) if ... "even a fool can do that.  )=(
 Do something you aren't good at!" (as Henry Miller used to say) ]

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



Re: [api-dev] Calc: loading file with key-shortcuts .sxc v/.ods

2006-04-07 Thread Mathias Bauer
Ennio-Sr wrote:

> Hi Mathias,
> 
> The answer was 'yes' for both your questions. However, by now I've
> re-obtained the same performance as I had under 1.1.4 after re-building
> the file containing the keyboard configuration ('AAA-KbdCfg').

Nice to hear that it finally worked for you.
BTW: I don't know if this is possible for you, but if you want to use a
special keyboard configuration for certain documents it could be easier
to store this configuration directly into those documents or store it
into a template and create the documents from this template (documents
inherit their UI config from their template).

Best regards,
Mathias

-- 
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.

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



Re: [api-dev] com.sun.star.mail

2006-04-07 Thread Mathias Bauer
Peter Eberlein wrote:

> Mathias Bauer schrieb:
> 
>> With an own builtg in SMTP engine OOo would need to provide (and
>> maintain) at least an outbox folder, that's nothing we want to do.
>> 
> You know shurely, that Caolan has solved this with python (from 2.0.1 
> upwards). So it should be possible to use this with basic or python macros.

Of course you can use mail functionality from something else (Java Mail
or something from other environments), but you need a UNO wrapper around
it, otherwise you can't call it from OOo Basic.

BTW: we had direct SMTP support in a very early alpha stage of OOo1.0,
but then we discovered that sending mails without later access to what
you have sent is not a good idea, but OTOH we didn't want to implement
an outbox in OOo. So handing over mail functionality to the system mail
client was the best choice.

Unfortunately we didn't offer access to the mail body even on the
platform where it could be possible: Windows. On Windows we are using
MAPI and this interface allows to specify a body. On other platforms
(that lack a system mail interface) we use mailto or command line
interfaces and here no access to the body is possible (IIRC, but I might
be wrong).

Best regards,
Mathias

-- 
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.

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



Re: [api-dev] com.sun.star.mail

2006-04-07 Thread Alex Thurgood

Peter Eberlein wrote:

Hi,

I can connect to SMTP (thanks to ms777) with the following snippet, but 
found no way to instanciate a com.sun.star.mail.MailMessage 
(CreateUNOService("com.sun.star.mail.MailMessage") gives me a null-object).




Is this interface not a left over stub from StarOffice, which used to 
have a mailer component ? I thought that this had been withdrawn from 
the code along with the all-in-one desktop interface.


Alex

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



Re: [api-dev] Calc: loading file with key-shortcuts .sxc v/.ods

2006-04-07 Thread Ennio-Sr
* Mathias Bauer <[EMAIL PROTECTED]> [070406, 09:33]:
> Ennio-Sr wrote:
> 
> > Hi all!
> > [OOo-2.0.2-6 on Gnu/Linux - i386]
> > 
> > I have two versions of the same Calc spreadsheet: file.sxc and file.ods.
> > A particular keyboard configuration for this file was saved in a file
> > named AAA-KbdCfg using the Organize Macros command ; then I saved an
> > OO-Basic macro to automatically load 'AAA-KbdCfg':
> > 
> > # rem ##
> > # sub kbd_cfg_macro
> > [...]
> > rem #
> > 
> > and included a call to this ('Kbd_cfg_macro') in another macro
> > started automatically when the file is opened.
> > 
> > Now, if I open file.sxc, the 'Kbd_Cfg_macro' starts regularly and
> > the "Customize" menu appears, where from I can hit 'Load' and choose the 
> > 'AAA-KbdCfg' file, whereas opening the .ods file nothing happens!
> 
> Did you check wether the ods file contains the event binding of your
> macro? And are you sure that the bound macro is started when the
> document is loaded?
> 

Hi Mathias,

The answer was 'yes' for both your questions. However, by now I've
re-obtained the same performance as I had under 1.1.4 after re-building
the file containing the keyboard configuration ('AAA-KbdCfg').

Just for the history:
Unfortunately, I cannot tell which one was the right move ...
Having changed a few times re-assignment of the bound macro (switching
between 'start application' and 'open document') in the end it started
to work up to a certain point: I was being presented with the Tools ->
'Customize' menu (with the 4 tags: Menus-Keyboard-Toolbars-Events)
evidencing the 'Events' menu (i.e. the last one I had used to bind the
event): when I realized that (remember, I was expecting the menu with the
'Load' tag!), it was sufficient to click on the 'keyboard' tag, save the
file and then, when re-opening it everything was in order ;-).

Thanks so much for your help.
Best regards,
Ennio.

-- 
[Perche' usare Win$ozz (dico io) se ..."anche uno sciocco sa farlo.   \\?//
 Fa' qualche cosa di cui non sei capace!"  (diceva Henry Miller) ](°|°)
[Why use Win$ozz (I say) if ... "even a fool can do that.  )=(
 Do something you aren't good at!" (as Henry Miller used to say) ]

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



Re: [api-dev] com.sun.star.mail

2006-04-07 Thread Peter Eberlein

Hi Mathias,

Mathias Bauer schrieb:

Peter Eberlein wrote:


Hi,

I would like to use the subject module for mailing, because 
com.sun.star.system.SimpleSystemMail has some restrictions (no access to 
body).



IIRC there is no implementation for this service in OOo at all. OOo's
strategy for mailing is to use the system mailer (via SimpleMail and
SimpleSystemMail), OOo doesn't want to be a replacement for a mail program.


If you can show me how to access the mailbody, I also would prefer this.. ;)


With an own builtg in SMTP engine OOo would need to provide (and
maintain) at least an outbox folder, that's nothing we want to do.

You know shurely, that Caolan has solved this with python (from 2.0.1 
upwards). So it should be possible to use this with basic or python macros.


Nobody there who is familiary with this stuff?

Regards

Peter


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



Re: [api-dev] com.sun.star.mail

2006-04-07 Thread Tom Schindl
You could implement your own MailService which you can instatiate from
OOBasic if you are familiar with java ;-)

http://jakarta.apache.org/commons/email/

Tom

Mathias Bauer wrote:
> Peter Eberlein wrote:
> 
> 
>>Hi,
>>
>>I would like to use the subject module for mailing, because 
>>com.sun.star.system.SimpleSystemMail has some restrictions (no access to 
>>body).
>>
>>I can connect to SMTP (thanks to ms777) with the following snippet, but 
>>found no way to instanciate a com.sun.star.mail.MailMessage 
>>(CreateUNOService("com.sun.star.mail.MailMessage") gives me a null-object).
>>
>>Any hints?
> 
> 
> IIRC there is no implementation for this service in OOo at all. OOo's
> strategy for mailing is to use the system mailer (via SimpleMail and
> SimpleSystemMail), OOo doesn't want to be a replacement for a mail program.
> 
> With an own builtg in SMTP engine OOo would need to provide (and
> maintain) at least an outbox folder, that's nothing we want to do.
> 
> Best regards,
> Mathias
> 



signature.asc
Description: OpenPGP digital signature


Re: [api-dev] OOO 2.0.2: macro for bulk or single conversion of odt to pdf?

2006-04-07 Thread Francis Jones

Tom Schindl wrote:

If I give it a filename like "C:\tmp\test\1234.odt", then it produces as
a URL "file:///C:/tmp/test/1234.odt".


That's correct:
file:// ... the protocol part
/ ... root of your filesystem


Is that right?  There are 3 slashes after "file:"; I had thought it
should be "file://C:/tmp/test/1234.odt"


This would mean realtive from your actual position which might work on
win32 where you have drives but not on *NIX.

Tom

Hi Tom

This looks like a bug on the Windows version:

Input: "C:\tmp\test\1234.odt"
Output from ConvertToURL(): "file:///C:/tmp/test/1234.odt"

There are 3 fwd slashes before the drive specifier, but there should
only be 2.



Once more this is absolutely correct. Have you ever tried to fill this
url into your Windows-Filesystem-Explorer or even Firefox (which will
correct file://C:/bla.html to file:///C:/bla.html) it works perfectly!

The thrid / only means that you start at the root of your computer urls
only holding file://C:/tmp/test/1234.odt (although working on win32)
means when being strict that you got seach for this tree relative from
your actual working directory! The reason for the third / is that there
are other operating systems who don't have the concept of drives (e.g.
Linux).


The above is what happens for me on WinXP using 2.0.2 or using most
recent developer snapshot (from 2006.April.03)

Not sure where to take this from here.  Anybody else?



Nowhere because it's correct ;-)


Frank

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



Thanks for the explanation.
begin:vcard
fn:Dr. Francis Jones
n:Jones;Dr. Francis
org:EduLink China
adr:36 Furongjiang Road;;Suite 202-203;Shanghai;;200336;China
email;internet:[EMAIL PROTECTED]
title:Head Programme Director
tel;work:+86-21-6275-5173
tel;fax:+86-21-6270-0825
tel;cell:+86-136-0166-3070
version:2.1
end:vcard


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

Re: [api-dev] OOO 2.0.2: macro for bulk or single conversion of odt to pdf?

2006-04-07 Thread Tom Schindl

>>> If I give it a filename like "C:\tmp\test\1234.odt", then it produces as
>>> a URL "file:///C:/tmp/test/1234.odt".
>>>
>>
>> That's correct:
>> file:// ... the protocol part
>> / ... root of your filesystem
>>
>>> Is that right?  There are 3 slashes after "file:"; I had thought it
>>> should be "file://C:/tmp/test/1234.odt"
>>
>>
>> This would mean realtive from your actual position which might work on
>> win32 where you have drives but not on *NIX.
>>
>> Tom
> 
> Hi Tom
> 
> This looks like a bug on the Windows version:
> 
> Input: "C:\tmp\test\1234.odt"
> Output from ConvertToURL(): "file:///C:/tmp/test/1234.odt"
> 
> There are 3 fwd slashes before the drive specifier, but there should
> only be 2.
> 

Once more this is absolutely correct. Have you ever tried to fill this
url into your Windows-Filesystem-Explorer or even Firefox (which will
correct file://C:/bla.html to file:///C:/bla.html) it works perfectly!

The thrid / only means that you start at the root of your computer urls
only holding file://C:/tmp/test/1234.odt (although working on win32)
means when being strict that you got seach for this tree relative from
your actual working directory! The reason for the third / is that there
are other operating systems who don't have the concept of drives (e.g.
Linux).

> The above is what happens for me on WinXP using 2.0.2 or using most
> recent developer snapshot (from 2006.April.03)
> 
> Not sure where to take this from here.  Anybody else?
> 

Nowhere because it's correct ;-)

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



signature.asc
Description: OpenPGP digital signature


Re: [api-dev] Calc: loading file with key-shortcuts .sxc v/.ods

2006-04-07 Thread Mathias Bauer
Ennio-Sr wrote:

> Hi all!
> [OOo-2.0.2-6 on Gnu/Linux - i386]
> 
> I have two versions of the same Calc spreadsheet: file.sxc and file.ods.
> A particular keyboard configuration for this file was saved in a file
> named AAA-KbdCfg using the Organize Macros command ; then I saved an
> OO-Basic macro to automatically load 'AAA-KbdCfg':
> 
> # rem ##
> # sub kbd_cfg_macro
> # rem --
> # rem define variables
> # dim document   as object
> # dim dispatcher as object
> # rem --
> # rem get access to the document
> # document   = ThisComponent.CurrentController.Frame
> # dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
> # rem --
> # dispatcher.executeDispatch(document, ".uno:ConfigureDialog", "", 0, Array())
> # end sub
> rem #
> 
> and included a call to this ('Kbd_cfg_macro') in another macro
> started automatically when the file is opened.
> 
> Now, if I open file.sxc, the 'Kbd_Cfg_macro' starts regularly and
> the "Customize" menu appears, where from I can hit 'Load' and choose the 
> 'AAA-KbdCfg' file, whereas opening the .ods file nothing happens!

Did you check wether the ods file contains the event binding of your
macro? And are you sure that the bound macro is started when the
document is loaded?

Best regards,
Mathias

-- 
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.

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



Re: [api-dev] OOO 2.0.2: macro for bulk or single conversion of odt to pdf?

2006-04-07 Thread Mathias Bauer
Francis Jones wrote:

> This looks like a bug on the Windows version:
> 
> Input: "C:\tmp\test\1234.odt"
> Output from ConvertToURL(): "file:///C:/tmp/test/1234.odt"
> 
> There are 3 fwd slashes before the drive specifier, but there should 
> only be 2.

No, 3 slashes are correct as Tom already pointed out in the mail you
have replied to.

Best regards,
Mathias

-- 
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.

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



Re: [api-dev] com.sun.star.mail

2006-04-07 Thread Mathias Bauer
Peter Eberlein wrote:

> Hi,
> 
> I would like to use the subject module for mailing, because 
> com.sun.star.system.SimpleSystemMail has some restrictions (no access to 
> body).
> 
> I can connect to SMTP (thanks to ms777) with the following snippet, but 
> found no way to instanciate a com.sun.star.mail.MailMessage 
> (CreateUNOService("com.sun.star.mail.MailMessage") gives me a null-object).
> 
> Any hints?

IIRC there is no implementation for this service in OOo at all. OOo's
strategy for mailing is to use the system mailer (via SimpleMail and
SimpleSystemMail), OOo doesn't want to be a replacement for a mail program.

With an own builtg in SMTP engine OOo would need to provide (and
maintain) at least an outbox folder, that's nothing we want to do.

Best regards,
Mathias

-- 
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.

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