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 - Automatic text hiding?
Automatic text hiding?
 
   NeoOffice Forum Index -> NeoOffice Releases
View previous topic :: View next topic  
Author Message
jmd
Guest





PostPosted: Sat Nov 26, 2005 2:52 am    Post subject: Automatic text hiding?

When drafting documents, I routinely add comments to myself in [brackets]. Usually all sorts of grammar and word choice questions that I intend to come back to later with "fresh eyes". However, I often run into the problem of wanting to export or print out a draft for consumption by others. Hitherto, I've been stuck going back and manually selecting and deleting all of the [bracketed bits].

Tonight as this occurred again, I waded through the help for a better solution. I found the section on hidden text, but from what I understood of the instructions, there's not a very easy way to create these special fields. Inserting custom fields and setting variables on them is a lot more work than just typing []s.

Is there any way to automatically hide/not print text that matches a regexp, perhaps? Or another way to do what I'm trying to do? I can't be the only one annotating his documents, can I? (Speaking of annotations, a quicker method of highlighting/un-highlighting would be grand, too).

Sincere advance thanks for any info,
Jeremy M. Dolan
Back to top
OPENSTEP
The One
The One


Joined: May 25, 2003
Posts: 4752
Location: Santa Barbara, CA

PostPosted: Sat Nov 26, 2005 8:28 am    Post subject:

This is something that I've not tried to do myself in OOo, but if you can find a way to do it on other platforms than the same should apply to Neo. One idea might be to try and use the change tracking and then hide/show changes, but that isn't exactly what you're looking for. I'd give the following OOo community a try in the Writer forums:

http://www.oooforum.org/

ed
Back to top
yoxi
Cipher


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

PostPosted: Sun Nov 27, 2005 6:06 am    Post subject:


You can use the menu option Insert->Note... to put a note anywhere in the text which will be non-printing unless you specify otherwise. It will appear as a little yellow box, and double-clicking on the box pops up the dialogue box with the note/author/date in it, which you can then edit and datestamp.
Then you can use Tools->Configure to assign this to e.g. F8 so it's a one-key action to add a new note.

I realise this isn't as immediate as being able to read your notes as you look down the page, but it is easy to see where they are, and quick to access them (and a lot less fiddly than the 'hidden text' palaver, which I still can't get to work...).

- yoxi
Back to top
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Sun Nov 27, 2005 7:48 am    Post subject:

I've never used that feature except in verifying a nasty (OOo) bug in it (it can hang if the note is too long--several pages worth--IIRC), but at least in some cases the note text appears if you hover over the note marker....

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
OPENSTEP
The One
The One


Joined: May 25, 2003
Posts: 4752
Location: Santa Barbara, CA

PostPosted: Sun Nov 27, 2005 9:02 am    Post subject:

I've not had a problem with the tooltips appearing with the note text (let the mouse hover over the small yellow square).

Yet another option would be to create a new style, such as "comment". If you then set all of that commentary to that style, you can search and delete the text based on that style. This use of styles is something that's really good in OOo but rather clunky in Word. Unfortunately, the autoformatting rules for **/__ autoformatting characters aren't extensible, so you'd need to use another way to set the style.

ed
Back to top
fabrizio venerandi
Guest





PostPosted: Mon Nov 28, 2005 5:38 am    Post subject:

I break my head on this problem, and I build a simple solution: keep using the [ and ] to write comments.
when you have to print save your document and start this macro:

***

sub seekanddestroy2
cursore=thiscomponent.text.createtextcursor()
cursore.gotostart(false)
finquando=thiscomponent.text.createEnumeration()
lettera$="a"
while lettera$<>""
cursore.goright(1,true)
rem cosa=thiscomponent.getcurrentselection().getbyindex(0)
lettera$ = cursore.getstring()

if lettera$="[" then
do until lettera$="]"
cursore.setstring("")
cursore.goright(0,false)
cursore.goright(1,true)
lettera$ = cursore.getstring()
loop
cursore.setstring("")
end if
cursore.goright(0,false)

wend
end sub

***

when the macro ends, print your document.
after, if you want to keep the comments close the document without save the file.

it is slow, but you can get a coffee while you are waiting.

let me know if this works.

f.
Back to top
ovvldc
Captain Naiobi


Joined: Sep 13, 2004
Posts: 2352
Location: Zürich, CH

PostPosted: Mon Nov 28, 2005 10:14 am    Post subject:

fabrizio venerandi wrote:
I break my head on this problem, and I build a simple solution: keep using the [ and ] to write comments.
when you have to print save your document and start this macro:


Wow, an automatic de-bracketer. That is an innovation. We should send this to the climate conference in Montreal..

(My apologies for an unintelligible joke if you haven't been to international diplomatic meetings. The modus operandi there is to put anything that hasn't been agreed on between brackets.

Then these are discussed, replaced discussed again, postponed until the next meeting, an ad-hoc group formed to provide further input, then discussed some more, revised again, then hammered out in a back-room deal and presented to the main conference. Then a final text is agreed on and half of the countries refuse to implement it....)

_________________
"What do you think of Western Civilization?"
"I think it would be a good idea!"
- Mohandas Karamchand Gandhi
Back to top
fabrizio venerandi
Guest





PostPosted: Mon Nov 28, 2005 1:12 pm    Post subject:

next time I'll go in montreal I'll sell this macro.

btw thanks to matteo cavalleri, I think this macro is cleaner and a lot faster Wink

sub seekanddestroy4
dim seek
seek = thiscomponent.createReplaceDescriptor()
seek.SearchString = "\[[^\[\]]+\]"
seek.ReplaceString = ""
seek.SearchRegularExpression=True
thiscomponent.ReplaceAll(seek)
end sub

f.
Back to top
ovvldc
Captain Naiobi


Joined: Sep 13, 2004
Posts: 2352
Location: Zürich, CH

PostPosted: Mon Nov 28, 2005 2:11 pm    Post subject:

fabrizio venerandi wrote:
next time I'll go in montreal I'll sell this macro.


Nice! Actually, I put it at the Wiki, so remove it there if you intend to milk it for all of the euros you can get..

_________________
"What do you think of Western Civilization?"
"I think it would be a good idea!"
- Mohandas Karamchand Gandhi
Back to top
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Mon Nov 28, 2005 2:37 pm    Post subject:

ovvldc wrote:
fabrizio venerandi wrote:
next time I'll go in montreal I'll sell this macro.


Nice! Actually, I put it at the Wiki, so remove it there if you intend to milk it for all of the euros you can get..

Oscar and I are on disturbingly similar wavelengths Smile I was just thinking we should have a page of "Useful Macros" or something on the wiki, to collect fabrizio's and the others mentioned here (e.g., Ianz's Find and Replace, which is already linked from the "Find and Replace tips" page, so not such a great example...).

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
ovvldc
Captain Naiobi


Joined: Sep 13, 2004
Posts: 2352
Location: Zürich, CH

PostPosted: Mon Nov 28, 2005 3:08 pm    Post subject:

sardisson wrote:

Oscar and I are on disturbingly similar wavelengths Smile


If I ever get back to DC, we're going out for some drinks Smile.

As usual, feel free to edit at http://neowiki.sixthcrusade.com/index.php/Removing_marked_text, available from the hints&tips section.

_________________
"What do you think of Western Civilization?"
"I think it would be a good idea!"
- Mohandas Karamchand Gandhi
Back to top
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Mon Nov 28, 2005 3:31 pm    Post subject:

ovvldc wrote:
sardisson wrote:

Oscar and I are on disturbingly similar wavelengths Smile


If I ever get back to DC, we're going out for some drinks Smile.

Of course! Jake is up toward Baltimore (or maybe out towards Annapolis?), I think, so he'll have to come, too Smile

(Of course, given my luck, I'll be off in Cairo when Oscar comes to DC...)

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
fabrizio venerandi
Guest





PostPosted: Mon Nov 28, 2005 3:46 pm    Post subject:

oh well, I WROTE THE MACRO I WANT THE BEER!
matteo cavalleri only wrote the '+' inside my wrong code!! Wink
when you'll come to italy I'll be happy to drink the beer.

btw, this is the macro working I'm doing in freetime, a editor for a 'idra' language to do interactive fiction (my first dialog!)


http://img312.imageshack.us/my.php?image=idra6rr.jpg


have a nice day


f.
Back to top
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Mon Nov 28, 2005 4:04 pm    Post subject:

fabrizio venerandi wrote:
oh well, I WROTE THE MACRO I WANT THE BEER!
matteo cavalleri only wrote the '+' inside my wrong code!! Wink
when you'll come to italy I'll be happy to drink the beer.

It wasn't clear to me, either, that you wrote the second one, too. It is a wiki, though, so you could edit and fix the attribution yourself Wink (but I've fixed it now Smile)

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
jmd
Guest





PostPosted: Tue Jan 17, 2006 6:50 pm    Post subject: Thanks!

A bit late, but I just wanted to thank Fabrizio for the macro. I haven't had occasion to test it out just yet, as I had already finished my term paper last semester, but I expect to be in great need of it in about a month (mid-terms). Now I just need to figure out how to install and/or run an OpenOffice macro, but I think I can handle that one on my own.

Thanks again! I can hardly wait to write my next paper now!
Back to top
Display posts from previous:   
   NeoOffice Forum Index -> NeoOffice Releases All times are GMT - 7 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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.