OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

macro recording

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
ynjiun
General User
General User


Joined: 19 Jan 2007
Posts: 20

PostPosted: Sat Apr 07, 2007 11:38 am    Post subject: macro recording Reply with quote

I try to record a macro with the following sequence:
select one char to right
select format->character->font->asian language->None->OK

then I save this as "LangNone"
When I apply this macro, it seems that only the key selection of one char to right works, the Format part has no effect at all.

What shall I do to fix this problem? Please help. Thanks.

Sincerely yours,

-Ynjiun
Back to top
View user's profile Send private message
Bhikkhu Pesala
Super User
Super User


Joined: 23 Aug 2005
Posts: 2324
Location: Seven Kings, London, UK

PostPosted: Sat Apr 07, 2007 12:49 pm    Post subject: Reply with quote

It seems to be working fine here. This is the code I get:
Code:
sub QuickMacro
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(1) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Count"
args1(0).Value = 1
args1(1).Name = "Select"
args1(1).Value = true

dispatcher.executeDispatch(document, ".uno:GoRight", "", 0, args1())

rem ----------------------------------------------------------------------
dim args2(0) as new com.sun.star.beans.PropertyValue
args2(0).Name = "DocumentLanguageCJK"
args2(0).Value = 255

dispatcher.executeDispatch(document, ".uno:DocumentLanguageCJK", "", 0, args2())


end sub

_________________
Fonts * Opera * Oo Tips * FAQ * New Forum
Oo 2.3.1 * Win XP
Back to top
View user's profile Send private message Visit poster's website
ynjiun
General User
General User


Joined: 19 Jan 2007
Posts: 20

PostPosted: Sat Apr 07, 2007 3:30 pm    Post subject: Reply with quote

I got exactly the same code as you do. But the only different is my is OO 2.1 instead of 2.2, do you think that's the reason?
Back to top
View user's profile Send private message
ynjiun
General User
General User


Joined: 19 Jan 2007
Posts: 20

PostPosted: Mon Apr 09, 2007 8:13 pm    Post subject: Reply with quote

I tried oo 2.2 and result is the same, that is, the following code has no effect:

rem ----------------------------------------------------------------------
dim args2(0) as new com.sun.star.beans.PropertyValue
args2(0).Name = "DocumentLanguageCJK"
args2(0).Value = 255

dispatcher.executeDispatch(document, ".uno:DocumentLanguageCJK", "", 0, args2())

Let's set up a character with asian language of Chinese(traditional). After applying the above macro, then check the Format-:>Character->Font, you will see the Asian language still show Chinese(traditional) instead of None.

Could any one try to duplicate and confirm this is indeed a problem? or am I missing something? Thanks.

Sincerely yours,

-Ynjiun
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group