Hi all!
I started experimental migration of a few macros from Lotus Millennium
to OOo and, being completely new to the OOo way of dealing with macros,
am wondering whether it has to be so complex .-)

By way of example:
To freeze cols and rows left and upper a certain point in a L.M.
spreadsheet, all you have to do is:

write <~{goto}C5~/wtb~> in a cell and define a range name for it (e.g.
<A>); then, each time you press CTRL+A you get the desired behaviour.
Whereas in OOo it seems to be such long as this:

rem ##################################################################

sub wtb_title_freeze

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 -------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name ="ToPoint" 
args1(0).Value = "$C$5" 
dispatcher.executeDispatch(document,".uno:GoToCell", "", 0, args1()) 
rem --------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:FreezePanes", "", 0,Array())
_0_show_menu 

end sub 

rem ####################################################################


I learned that clicking Windows >Freeze you can freeze/unfreeze, but
there is no way to do that in a macro, as it doesn't appear possible to
verify the 'frozen' status.

In L.M. you would write:
/wtc~    # to clear the freeze
/wtb~    # to set the freeze

In OOo, apparently, you can only do:

rem ####################################################################

sub title_freeze_unfreeze

rem --------------------------------------------------------------------

rem define variables 
dim document   as object
dim dispatcher as object

rem --------------------------------------------------------------------

rem get access to the documentdocument   =ThisComponent.CurrentController.Frame 
dispatcher =createUnoService("com.sun.star.frame.DispatchHelper") 

rem --------------------------------------------------------------------

dispatcher.executeDispatch(document, ".uno:FreezePanes", "", 0, Array())

rem --------------------------------------------------------------------

dispatcher.executeDispatch(document, ".uno:FreezePanes", "", 0, Array())

end sub 

rem ####################################################################

without exactly knowing wheter the first .uno:FreezePanes is actually
going to freeze or unfreeze ...

Finally (for the time being), I noticed that prior to saving any macro
I could navigate my calc using the four arrows, pgup, pgdwn, home and
end keys; after I saved a few macros and re-accessed the spreadsheet all
thos keys are frozen and I can only move with the mouse.
What have I done to get that?

Thanks for your attention.
Regard,
        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]

Reply via email to