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

How to add toolbar button for hidden text?

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


Joined: 24 Apr 2010
Posts: 3

PostPosted: Sat Apr 24, 2010 11:29 am    Post subject: How to add toolbar button for hidden text? Reply with quote

Hi--I'm a long-time user of MS-Word, finally switching to OO-Writer.

My Q: In OO-Writer, how do I add a dedicated toolbar button to format selected text as hidden?

The long path for hidden text seems to be:
select text, click Format menu--Character--Font Effects, click Hidden checkbox, then OK.

But I'd like to simply select text and click a "Hidden" toolbar button.

So I tried this path: Tools--Customize--Toolbars--Add; In the Add Commands dbox, in Category list, select Format; but in the Commands list for Format, there's no Hidden--the commands list shows Group, Half-width, Highlight Fill; no Hidden. Other text-formatting commands appear in the list, including Bold, Italic, Strikethrough, Underline. Where's Hidden?

So, how would I add a dedicated "Hidden" toolbar button?

I checked Help, but see only topics about variables, values, types, conditions, conditional text, etc.

Thanks in advance--help appreciated!
Back to top
View user's profile Send private message
floris_v
Moderator
Moderator


Joined: 12 Jul 2007
Posts: 4791
Location: Netherlands

PostPosted: Sat Apr 24, 2010 12:03 pm    Post subject: Reply with quote

It seems that you can't do that. You can however define a character style Hidden, and bind that to a keyboard shortcut - you can't bind it to a toolbar button, but it's something.
_________________
LibreOffice 3.6.3; OOo 3.4.1 on Windows Vista
Join the Official community forum - in several languages, including Nederlandstalig forum
Back to top
View user's profile Send private message
nw
Newbie
Newbie


Joined: 24 Apr 2010
Posts: 3

PostPosted: Sun Apr 25, 2010 4:38 am    Post subject: Reply with quote

Thanks for info, floris_v.

Would this be regarded as a bug? Listing dozens of format-related commands, including background color--even specific commands for blue and red!--bold, double-underline, highlighting, italic, shadow, strikethrough, underline, many others--but omitting hidden?

Should I submit a bug report or feature request?
Back to top
View user's profile Send private message
stevesaunders
OOo Advocate
OOo Advocate


Joined: 26 Dec 2009
Posts: 408

PostPosted: Sun Apr 25, 2010 6:06 am    Post subject: Displaying Hidden Text Reply with quote

Displaying Hidden Text
If you have a text that was hidden by defining a condition with a variable, you have several options to display the hidden text. Do one of the following:
Enable the check mark at View - Hidden Paragraphs.
Double-click in front of the variable that you used to define the condition for hiding the text, and enter a different value for the variable.
Double-click in front of the hidden text field or the hidden paragraph field, and change the condition statement.
_________________
Steve ~ Tennessee USA
Mac OS X 10.6.2 Open Office 3.1
Back to top
View user's profile Send private message
nw
Newbie
Newbie


Joined: 24 Apr 2010
Posts: 3

PostPosted: Sun Apr 25, 2010 7:42 am    Post subject: Reply with quote

Thanks Steve, but I'm not talking about anything as complex as conditions and variables.

I'm talking about something elementary for the user: select text, click the Bold button. Select a word, click the Italic button. Select text, click the Hidden button. The only difference is that Bold, Italic, Underline, etc are standard toolbar buttons, but Hidden isn't.

To add a Hidden button in MS-Word, you follow a similar "Customize Toolbar, add a command" path that I noted above in my original post. You just select a command from the list, and drag it to the toolbar, which then adds a button for that command. Very simple.

My point is, that while the list of formatting commands in the OO-Writer commands list includes tons of formatting commands, Hidden isn't included, which is so odd it must be an oversight, hence a bug.

[Were this MS-Word, the response would be: That's not a bug, it's a feature!]
Back to top
View user's profile Send private message
Ward
Newbie
Newbie


Joined: 03 Jul 2011
Posts: 2
Location: Seattle, WA

PostPosted: Sun Jul 03, 2011 7:36 am    Post subject: How to add toolbar button for hidden text? Reply with quote

My situation is similar to nw's. In my case, I do a lot of editing and I'd like the convenience of certain editing commands in a toolbar. I'd like to have a button to toggle "Show Changes" on or off. The manual method is Edit > Changes > Show, but in the Add Commands dialog box the Edit category doesn't display a Changes or Show command in the Commands list.

In OO Help it's implied that all commands are available in Add Commands, but there seems to be only a subset. Better that Help should say this is the case. Also (while I'm heaping on the abuse Wink ), the Add Commands lists don't map well with the commands as they're displayed on the regular menus, which leads to some uncertainty for the user.

These are intended less as complaints than as suggestions for further interface refinement. I'm always impressed with the sophistication of OpenOffice applications in general.
Back to top
View user's profile Send private message Visit poster's website
JohnV
Administrator
Administrator


Joined: 07 Mar 2003
Posts: 9183
Location: Lexinton, Kentucky, USA

PostPosted: Sun Jul 03, 2011 8:33 am    Post subject: Reply with quote

You can record Edit > Changes > ON/OFF and from there create a macro that will reverse the current state. Because it utilizes a Global variable that initializes to False you may have to run it twice the first time you use it on a file.

Code:
Global boo as Boolean
Sub ShowHideChanges
If boo then
  boo = false
 Else boo = true
EndIf
dim document   as object
dim dispatcher as object
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "ShowTrackedChanges"
args1(0).Value = boo
dispatcher.executeDispatch(document, ".uno:ShowTrackedChanges", "", 0, args1())
End Sub
Back to top
View user's profile Send private message
Ward
Newbie
Newbie


Joined: 03 Jul 2011
Posts: 2
Location: Seattle, WA

PostPosted: Sun Jul 03, 2011 10:36 am    Post subject: How to add toolbar button for hidden text? Reply with quote

Thanks for your code, JohnV. When I ran the macro, I got "BASIC syntax error. Global not allowed within a procedure." So I just recorded two macros instead, one to show edits and the other to hide them. They work fine, but I prefer your code to toggle the state. Any idea why I got the "global not allowed" error?

And a supplementary question: What's the default save location for macros? I specified my own location for one of my macros and OO is complaining that it can't find it.
Back to top
View user's profile Send private message Visit poster's website
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