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

Increase/decrease font size?

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
padmavyuha
General User
General User


Joined: 17 Mar 2004
Posts: 48
Location: Norwich, UK

PostPosted: Wed Nov 24, 2004 1:46 pm    Post subject: Increase/decrease font size? Reply with quote

Excuse me if this has already been addressed here - I searched through the forum but couldn't find anything here, but maybe I'm looking under the wrong headings...

What I'm after is a macro way to take the font size of selected text and down/up it by one (or do nothing if there's more than one font size in the selection, of course!).

There doesn't appear to be any direct built-in way to do this in Ooo.

- padmavyuha
Back to top
View user's profile Send private message
mterk
General User
General User


Joined: 05 Sep 2003
Posts: 40

PostPosted: Wed Nov 24, 2004 2:22 pm    Post subject: Reply with quote

Why a macro?

There are toolbar buttons (hidden by default) that will increase or decrease the font size of the selected text.

Right click the Object bar --> Visible buttons --> Check Increase Font Size / Decrese Font Size
Back to top
View user's profile Send private message
padmavyuha
General User
General User


Joined: 17 Mar 2004
Posts: 48
Location: Norwich, UK

PostPosted: Wed Nov 24, 2004 2:47 pm    Post subject: Reply with quote

Yes, but that's only available in Writer, not in Calc...

If anyone knows of a way to get Writer-specific options into the global options, that'd solve my problem, but at the moment, there's no direct way to do increase/reduce font in Calc.

- padmavyuha
Back to top
View user's profile Send private message
DannyB
Moderator
Moderator


Joined: 02 Apr 2003
Posts: 3991
Location: Lawrence, Kansas, USA

PostPosted: Wed Dec 01, 2004 7:38 am    Post subject: Reply with quote

Here is one possible answer I just added to my Calc Examples thread.
_________________
Want to make OOo Drawings like the colored flower design to the left?
Back to top
View user's profile Send private message
padmavyuha
General User
General User


Joined: 17 Mar 2004
Posts: 48
Location: Norwich, UK

PostPosted: Wed Dec 01, 2004 8:07 am    Post subject: Reply with quote

Thanks very much...
Code:
   ' Select ALL of the text.
   oCursor.gotoStart( False ) ' goto start of text
   oCursor.gotoEnd( True ) ' goto end of text while holding down SHIFT key
   ' Change selected char's height
   oCursor.CharHeight = oCursor.CharHeight + 1

is just what I needed!

- padmavyuha
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 Macros and API 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