Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

This website is an archive and is no longer active
NeoOffice announcements have moved to the NeoOffice News website


Support
· Forums
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


  
NeoOffice :: View topic - Button to change text cases?
Button to change text cases?
 
   NeoOffice Forum Index -> NeoOffice Releases
View previous topic :: View next topic  
Author Message
cervus
Captain


Joined: Aug 15, 2008
Posts: 57

PostPosted: Sun Oct 19, 2008 11:43 am    Post subject: Button to change text cases?

Friends --

In MS Word there was a way to highlight text, click a button on the toolbar, and change the text from lower-case to upper-case or vice versa. I can't find that in Neo Office. Does it exist?

Thanks very much

Don
Back to top
Samwise
Captain Naiobi


Joined: Apr 25, 2006
Posts: 2315
Location: Montpellier, France

PostPosted: Sun Oct 19, 2008 11:46 am    Post subject:

I edited your title - please don't shout.
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Sun Oct 19, 2008 12:04 pm    Post subject:

It doesn't exist in a toolbar button, but the feature does exist. To change text to title case, use the following steps:

1. Select the text that you want to change to title case
2. Select the Format :: Character menu and in the dialog that appears, click on the Font Effects tab
3. Change the dialog's Effects option to Title and press the OK button.

Hope that helps,

Patrick
Back to top
yoxi
Cipher


Joined: Sep 07, 2004
Posts: 1799
Location: Dawlish, Devon

PostPosted: Sun Oct 19, 2008 1:34 pm    Post subject:

There is a more direct way than that for lower/uppercase - after selecting your text, go to Format::Change Case and that gives you the option of upper or lower case, with (sometimes) keyboard shortcuts assigned to do that. If they aren't the shorcut key combos you prefer (I like cmd-shift-L and cmd-shift-U) you can set those in Tools::Customise in the Keyboard tab - the functions you want are in the Format category, and their Function names are Lowercase and Uppercase.

I prefer keyboard shortcuts myself, but you could just as easily assign those functions to buttons on your chosen buttonbar if you wanted.

- padmavyuha

*edit* to set to Title Case (as Patrick was describing) where the first character of each word is capitalised, you could put the following macro into NeoOffice Basic and assign it to a keystroke or button:
Code:
sub titleCase
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 = "CaseMap"
args1(0).Value = 3

dispatcher.executeDispatch(document, ".uno:CaseMap", "", 0, args1())
end sub

I just used the macro recorder to do what Patrick suggested above (there's no direct access to Title Case through Customise as there is with LC/UC).
Back to top
macman39
Blue Pill


Joined: Dec 05, 2008
Posts: 4

PostPosted: Fri Dec 05, 2008 6:39 am    Post subject:

I am looking for the same solution -change Lower Case to Proper Case, in spreadsheets.
So, I created a Macro using yoxi's of 19 Oct 2008. Applied it to a column of data in my spread sheet, and nothing changed. No error message either.
Any further clues please Yoxi?

Eric
Back to top
Markk
Operator


Joined: Mar 15, 2007
Posts: 43
Location: Wisconsin US

PostPosted: Sun Dec 07, 2008 4:19 pm    Post subject:

macman39 wrote:
I am looking for the same solution -change Lower Case to Proper Case, in spreadsheets.
So, I created a Macro using yoxi's of 19 Oct 2008. Applied it to a column of data in my spread sheet, and nothing changed. No error message either.
Any further clues please Yoxi?

Eric


You can't just copy Yoxi's - He is simulating selecting something from a menu in Writer. The option doesn't exist in the spreadsheet. There already is a "proper" function in the spreadsheet, so if you put into A2 the line:

=proper(A1)

you will get the text of cell A1 with all initial letters upper and the rest lower. You can make a macro out of this if you wish copying over the original, but I don't really see any reason.

The upper and lower suggestions work the same way in the spreadsheet as writer, but they also have built in functions.
Back to top
macman39
Blue Pill


Joined: Dec 05, 2008
Posts: 4

PostPosted: Mon Dec 08, 2008 3:30 am    Post subject:

Thank you, Markk. Being a novice, I had not realized the significance of the example. I will have a try with your advice shortly.
Eric
Back to top
macman39
Blue Pill


Joined: Dec 05, 2008
Posts: 4

PostPosted: Fri Dec 12, 2008 1:15 pm    Post subject:

Hi, Markk.
I made a test spreadsheet, and followed your instructions, and it worked fine.
Then today, having tried to do a demo to someone else, it does not work. All goes as expected, but when I get to the last step to delete the unwanted column, it goes wrong. Here is my working:
Spreadsheet, with data as follows:- original lower case data is in col G.
make blank column,H.
format H cells as text,
put =proper(G1) into first cell (H1). Hit enter, it inserts required content as proper case.
highlight this cell and drag down the column H.
Let go mouse, and the column is filled with text from col G, as proper case.
then, click on column label G to highlight all col G.
use EDIT/DELETE CELLS and col G goes, H label changes to G but contains the test "(hash)REF!" as if it never contained real data, but just the link to the cell I had deleted.
Same happens if I do EDIT/DELETE CONTENTS on G col.

I did an update of NeoOffice to 2.2.5 Patch4 in between the original test, and today's one.
Is this change the cause of the problem? Or am I doing the delete wrongly. Help please.
Eric
Back to top
narf
The Anomaly


Joined: Jan 21, 2007
Posts: 1075

PostPosted: Fri Dec 12, 2008 2:03 pm    Post subject:

Hello macman39,

Please try the following steps after pasting into column H which fills H cells with the proper case text.

- Highlight column H
- Select the menu Edit :: Copy
- Place cursor in G1
- Select the menu Edit :: Paste Special
- In the popup menu, uncheck Paste All in the Selection section, then uncheck everything except for Strings
- Click the OK button, you may get a warning about pasting into cells that already have data, click Yes
- Cells in column G should fill with the text with first letters of words capitalized
- Delete column H

Does that work for you?

--fran
Back to top
macman39
Blue Pill


Joined: Dec 05, 2008
Posts: 4

PostPosted: Sat Dec 13, 2008 6:18 am    Post subject:

thank you, Fran.
Yes, it worked fine on my little test spreadsheet.
After lunch, I will go and have a go at the real job.

Great to get instant help like this.

Eric
Back to top
narf
The Anomaly


Joined: Jan 21, 2007
Posts: 1075

PostPosted: Sat Dec 13, 2008 8:15 am    Post subject:

Eric -

I am glad to know that solution worked for you.

Please post back here if you have any more questions,

--fran
Back to top
Display posts from previous:   
   NeoOffice Forum Index -> NeoOffice Releases All times are GMT - 7 Hours
Page 1 of 1

 
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
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.