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

2006-04-10 Thread Ennio-Sr
* Mathias Bauer <[EMAIL PROTECTED]> [090406, 17:47]:
> Ennio-Sr wrote:
> [...] 
> My recommendation would be to use the template mechanism: create a
> document template that contains the configuration you want to have:
> create a new document, store the shortcut configuration into it 
 
This was the hardest part for me to understand until Bart sent me that
'private' post and suggested me to download a few of his examples: these
were very useful, but I still have to master them!

> and then
> save this document with "File-Templates-Save".
> 
> Then create all new documents that should use this shortcut
> configuration from this template using "File-New-Templates and Documents".
> 

I'll take advantage of your suggestions.
Thank you again, Mathias, and have my 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] Calc: loading file with key-shortcuts .sxc v/.ods

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

> 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.

My recommendation would be to use the template mechanism: create a
document template that contains the configuration you want to have:
create a new document, store the shortcut configuration into it and then
save this document with "File-Templates-Save".

Then create all new documents that should use this shortcut
configuration from this template using "File-New-Templates and Documents".

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] 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] 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] 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]