Alternative dialog Find & Replace for Writer (AltSearch)

×

Warnmeldung

This extension was not updated recently. It might not work with latest versions of OpenOffice.

Haupt-Reiter

Provider:
Tomas Bilek
Maintainer:
tombil
Bewertung:
4.309525

Average: 4.3 (42 votes)

Anwendung:
Writer
Tags:
writer, Free, editing, search
Screenshots:
http://www.volny.cz/macrojtb/AltSearchScr_en.html
Beitragsdatum:
Freitag, 28 Dezember, 2007 - 15:05
Statistiken
Week: Nicht getrackt - Monat: Nicht getrackt - Jahr: Nicht getrackt - Timeline
Download extension
System Independent version - All releases
Compatible with OpenOffice 4: Ja
User feedback:
Compatible with OpenOffice 4.x?
  • Fast selection preset regular and extended expressions
  • Searched or replaced text can contain one or more paragraphs
  • Search out block of paragraphs delimited by two text marks
  • Multiple search and replacement in one step
  • Searching: Bookmarks, Notes, Text fields, Cross-references and Reference marks to their content, name or mark and their inserting
  • Searching and inserting Footnote and Endnote (from version OOo 2.3 only). It is possible to select at once texts of all footnotes or endnotes and to assign them any style
  • Searching object of Tables, Pictures and Text frames according to their name; it is possible to substitute them by any text, etc.
  • Changing into found or replaced text: paragraph style, character style, list style and Hyperlink's URL and set properties
  • Inserting and replacement: clipboard contents, insert replacement counter and page number
  • Hexadecimal also decimal submission character for search and replaced
  • Searching out manual page and column break and their set up or deactivation
  • Searching similarly or the same manually formatted part of text, according to cursor point
  • Count found occurrences
  • Redirecting result of replacing expression to the other text file
  • Batch mode: saving and loading of search and replacement parameters; it is possible to save several searching and replacing subsequently to the single sequence and that whole quickly execute after. Execute the batch with more opened text documents together.
  • Self dialogue for quick assignment of key shortcut to batches
  • Preserve capitalization - If found text begins with a capital letter, also the text replacement will begin with a capital letter
  • Searching for paragraph, character and list style; possibility to choose a style from the menu
  • Built-in help (http://www.volny.cz/macrojtb/HelpAltSearch_en.html)
  • Language: English, Czech, Russian, Spanish, German, French, Dutch, Italian

Alternative dialog Find & Replace for Writer (AltSearch)

Version Operating system Compatibility Release date
1.4.2 System Independent 2.0, 3.0, 4.1 24/03/2017 - 17:45 Weitere Informationen Download
1.4.1 System Independent 2.0, 3.0, 4.0 15/11/2015 - 14:01 Weitere Informationen Download
1.4 System Independent 3.4, 4.0 01/01/2014 - 12:55 Weitere Informationen Download
1.3.2 System Independent 3.4 17/06/2010 - 14:22 Weitere Informationen Download
1.3.1 System Independent 3.4 03/05/2010 - 15:21 Weitere Informationen Download
1.3 System Independent 3.4 25/11/2009 - 18:14 Weitere Informationen Download
1.2.2 System Independent 3.4 08/05/2009 - 17:37 Weitere Informationen Download
1.2.1 Windows, Linux, MacOS X 3.4 28/07/2008 - 15:28 Weitere Informationen Download
1.2 System Independent 3.4 12/07/2008 - 16:37 Weitere Informationen Download
1.1.2 Windows, Linux, MacOS X 3.4 24/04/2008 - 17:51 Weitere Informationen Download
1.1.1 Windows, Linux, MacOS X 3.4 07/03/2008 - 15:42 Weitere Informationen Download
1.1 Windows, Linux, MacOS X 3.4 13/02/2008 - 09:50 Weitere Informationen Download
1.0 Windows, Linux 3.4 28/12/2007 - 16:07 Weitere Informationen Download

Kommentare

Hi the OpenOffice and LibreOffice bug that the first item of
AltSearchDoc.getCurrentController.select(foundAll)
gets deselected because the cursor collapses to the end of the first found item can be workaround by adding the following text with a little bit modification to 3 places in 2 subs ( 2x in BtFindAll, 1x in SelectAllBColor):
------------------
dim oVC
AltSearchDoc.getCurrentController.select(foundAll)
oVC = AltSearchDoc.CurrentController.getViewCursor
if foundAll.count>1 then oVC.goleft(len(foundAll(0).string),true)
---------------------
Cool Extension!!!

BASIC runtime error in Line 216. Type: com.sun.star.resource.MissingResourceException

Message: StringResourceImpl: No entry for ResourceID: \p

After closing the document and re-opening it with the current development version
Version: 6.3.0.0.alpha0+
Build ID: 98630a0bd49bd80652145a21e4e0d0ded792b36b
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk3;
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2019-05-04_04:44:35
Locale: de-DE (de_DE.UTF-8); UI-Language: en-US
Calc: threaded

it did not reappear. I could do what I wanted, probably replacing \p with \n within the selected part of my document.

DE: Ich benutze AltSearch 1.4.2 oft, um innerhalb der momentanen Auswahl alle \p (Absatzmarke) in \n (erzwungener Zeilenwechsel) umzuwandeln.

Wenn ich das aber innerhalb einer Tabelle mache, dann ersetzt AltSearch aber - anders als sonst bei "freiem Text", d.h. außerhalb von Tabellen, einfach die gesamte Auswahl einfach durch einen Zeilenwechsel. Das ist natürlich falsch.

Da steckt wohl ein Fehler in dem sonst so nützlichen Werkzeug.

===

EN: I frequently use AltSearch 1.4.2 to replace all \p (paragraph mark) by \n (forced linefeed) within the current selection.

However, if my selection is inside a table, AltSearch replaces the whole selection just by a linefeed - quite different from what it normaly does outside of tables and what is useful.

It looks like a bug still hidden in this very usefull tool.

I've installed AltSearch as an extension for LibreOffice 5.3.1.2 and it ran fine until I received a "BASIC syntax error. Expected: )." which highlighted "^^2 remplacements ont été effectués. " within msg(29) = "Lot '^^1' est terminé. "+chr(10+chr(10)+"^^2 remplacements ont été effectués. " I just can't escape this error even after uninstalling and reinstalling both the extension itself and LibreOffice.

I am having a problem with trying to remove blank lines at the end of table cells.

If you turn on the display of Non-printing characters you see what appears to be a paragraph mark at the end of the cell text but this is not a true paragraph mark but an end of cell marker and cant be found by AltSearch's paragraph end searches ($ or \p)

This means that a normal empty paragraph search ^$ cant be used to remove a blank line at the end of cell when a normal paragraph mark precedes the end of cell.

Is there any way use AltSearch to detect the end of a table cell and replace trailing blank lines.

Thanks

I want to remove the page breaks inserted by the Mail Merge Wizard between each page

I try searching for \m replacing by \r and although it reports it has changed the expected number of entries the page breaks remain

If I bring up the paragraph style dialog it shows
Breaks Insert [checked] Type Page
Unchecking Insert work but I need to automate this.

PS I did find that replacing with \A{BreakType=0} worked but only if the document is type HTML but not with .odt

How about an Alt-Find&Replace function which finds "everything between".
Suppose you had a large text file with many sections delimited like this:
>NOTICE
the
quick
brown
fox
jumped
over
the
lazy
dog
>END NOTICE

It'd be great if you could:
(1) Search For NOTICE . . function for "everything between" . . END NOTICE
(2) and click "Find all"

All such sections will be selected. They could then be copied and pasted to a new file so that any other Find&Replace work could be done from there.

Thanks! I use Alt Find&Replace constantly! Great extension!

Try Extended - Series of paragraphs =>
Begin text[::BigBlock::]End text

\R - redirects the replace expression to another text file:
Replace: \R\b&\e\p\p

This extension works, allowing a lot of search/replace options that are otherwise impossible. Unfortunately, with large documents it's very, frustratingly, almost unusably, freaking slow. If it wasn't the only way in Open Office to search across paragraphs, I'd call it a piece of crap. I'm sorry to say that. I'm not a programmer, so I imagine there's a very good reason why it's so slow. I know this may be like complaining about the speed of light, but is there any way it can be sped up? Or if the regular Open Office find-and-replace function could recognize end-of-paragraph markers so that broken paragraphs fragments can be merged easily and quickly?

This extension makes my work so much easier. I wish they would incorporate it into the program. Thank you for sharing your work with the community.

It used to be ok, but now any search involving a character escape (like "\(\d+\)" to search footnotes) doesn't work anymore. I tried to reinstall the extension, then i reinstalled OpenOffice...nothing worked. Any idea?
OpenOffice regular search works ok, even with regex and characters escape, but I really miss many functionalities from your extension...

What's the shortcut key for that Find and Replace dialog box?

_________________________________
Eric Nguyen

How does one replace several paragraph marks or the tab marks with text?
I know what "regular expressions" means, but unable to remember how to use them between needs.
Can you please add these type of formatting changes?

AltSearch worked fine for me till I installed OOo 3.4.1. The green binocular has disappeared, and when I try to re-install the extension, I get a message that says "an error occurred while opening the file".
Am I alone?....

Hi,

Apologies in advance if I'm being stupid, but I can't work out how to convert image URLs into the actual images.

I start with text like this: "[img]http://www.imageurl.com[/img]

I've tried converting it to: "" but I only see the code.

Is there a way of making it so that the document displays the actual image itself, rather than just the address?

Thanks.

Iain

It is probably result of changes processing regular expressions in OOo 3.4, without the backward compatibility...
See https://issues.apache.org/ooo/show_bug.cgi?id=119375

With this extension, searching for
\(
\)
\[
\]
do not work on AOO 3.4. This makes "Text between ( )" fail too. Changing those expressions by \u0028, \u0029... works. (NOTE: \( and all the others work without problem on native RegEx system).

The suggested way to search for non breaking dash, \x2011, do not work, but \u2011 does.

Other than that, the [::BigBlock::] thing is a killer feature!! :)

I use the search for text between [] all the time. I put citations and notes in between brackets when I'm working on a paper. Then I convert the citations to hidden text when I'm done with the report. AltSearch used to make quick work of this. Then it broke in Apache's OO. But, with rgb's comments above, I got it working again. I just replaced the standard search string for text within [] with the following:
(\u005B([^\u005D])+\u005D)
I then put in my normal replace string to change the formatting to hidden. Then I hit the batch button and gave it a name. Now when I need to do the search, I just hit the 'batch >>' button, choose it from the list, and hit the 'transfer' button. Now I can single step through my conversions. Works like a charm!

It seems like a simple solution to the new format for unicode in OO 3.4.1 would be change the AltSearch code to check for the Apache version of OO and use all \u prefixes in place of all the \x prefixes. Maybe that's not as easy as it sounds.

In any case, I'm back to loving AltSearch!

I want to replace underlined characters with bold ones. I can search for underlines but I can't find out how to replace them with the same text but with another attribute (or just remove the underlining). Thanks for your help.

I don't know with what version this error began. I am currently using LibreOffice 3.5 and Java 1.6 but it also occurred on earlier versions. To reproduce the error just create a new document with one word. Put that word in the search for box and & in the replace box. Enable regular expressions and do a search and replace and it will fail in both Linux and Windows. In the AltSearch macro, under D_choice, if line 1589 of the code (seznam.addItem(neco,0)) in the Common tab is commented out it seems to work but I have no idea as to what it may break by doing that.

Thank you for the response. It looks like \0 will do the job.

I have a text file with carriage returns. In all cases, the carriage returns are proceeded by either a letter or a space. I need to delete all cases of space followed by carriage return. To do this, I'm using s\$ in the find dialog box and leaving the replace box blank. While the find tool accurately locates all cases of s\$, when I click replace, only the space is deleted. Interestingly, if I search using just $, and click replace, the carriage return is deleted. Any suggestions?

Great extension ! Works well on ubuntu with open office 3.2.0
Thank you !

Hi, I hope this is still being maintained as it's a great extension.
I've got a dual boot set-up and it works perfectly under Wndows 7 with libreoffic 3.4.1

Running Ubuntu 11.04 & libreoffice 3.4.1 it mostly works - except for regular / extended / properites buttons.

Is there a fix for this?

I would also like to report having problems with this extension - it doesn't react at all. Can this be corrected? I am using the latest OpenOffice. Thank you in advance.

Short Description: Alt Search and Replace stopped working after an upgrade. Instead of opening a Search and Replace dialog, it opens a new OOo window for My Macros & Dialogs and displays a 'BASIC runtime error' error message

Long Description: I upgraded Alt Search and Replace about a month ago. Previous version worked to my great satisfaction and delight. Sadly, this most wonderful extension stopped working after updating. When I click on the green binoculars, the application pauses for a moment, clangs an error alarm and opens a
> window: [MyMacros & Dialogs]:AltSearch
> tab: fromTools
> Error Dialog: "BASIC runtime error. An exception occourred. Type: com.sun.star.container.No.SuchElementException Message: {OK button}

Environment:
Vista HP sp2
OOo 3.1.1

Attempted work-arounds:
1. Reinstalled the extension. No joy.
2. Uninstalled the extension, reinstalled the extension, shut down OOo, restarted OOo. No joy
3. Uninstalled the extension, reinstalled the extension, shut down OOo, shut down PC, restarted PC, restarted OOo. No joy.

Comment: From scrolling through this thread, this "No.SuchElementException" problem seems to occour with some frequency. For those of us who are not BASIC programmers, is there a step by step work around for this problem? I really miss having this extension.

Thanks for any help anyone can suggest

Hi,
This looks like it would be a good extension, but I can't get it to load. I went through the installation process, and got no complaints or errors. However, the Binocular icon doesn't show (yes, I did shut down OOo and then restarted) in the Tool bar.

I am running OOo 3.1.1 on a Ubuntu 9.10 system if that makes a difference. Any suggestions?

I've found AltSearch a huge help working with old converted files; the LibreOffice people are nuts to build in the extensions they did and not this one!

Unfortunately, installing your latest version with current official-RPM versions of OOo (and, after completely removing OOo, LibreO) today threw an error similar to someone else's; it was auto-disabled & error reappears if I enable it. Rebooting didn't help.
The error (with the .office and variable after Backend/ changing based on the install):
(com.sun.star.uno.RuntimeException) { { Message = "bad root element in file:///home/xyzzy/.libreoffice/3/user/uno_packages/cache/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/1o6kOG_/addon.xcu", Context = (com.sun.star.uno.XInterface) @0 } }

This is a great and useful tool! I use the Italian version on Mac.
However, I detected a problem in the "entire word" option search, that is not working properly and should be arranged because so crucial!
Thanks,
m.

it is great tool!
Author! thank's a lot for this excellent addon!
may be it will be useful for anybody(and not only me) to get "element of table of contents"(or how it named in english) in "replace" list?
last target is to get table of contents based on text with specific symbol style.

This tool is amazingly usefull. How hard would it be to make this available for Calc as well as writer? I work with huge spread sheets on a regular basis and often wish I could use regular expressions in find & replace to alter large groups of cells based on patterns. Right now I usually just save the file as a tsv and open it in notepad++ to use regular expressions, but that doesn't always work out as predictably as I would like, and it would be oh so convenient to be able to do the searches right in Calc.

This is a great tool!

I had been having a hard time replacing fonts or changing font size of pieces of text intersperse within a huge document. It was a extremely tedious.

This tool saved me lots of time.

The only problem I find is that it is not able to search for Asian fonts.

For example, I can search for CharFontName=Times Roman and replace it with an Chinese Font CharFontNameAsian=KaiTi.

But I can't search for CharFontNameAsian=KaiTi.

It seems strange that I can replace the CharFontNameAsian attribute of the text but not able to search based on the CharFontNameAsian attribute. The search only works on the CharFontName attribute.

This would be a refinement I would look forward too!

God bless the author!

I read back on previous comments and tried rebooting the whole system, which worked. Sorry about that. Relieved as well :).

This great extension has always been my favorite. I upgraded to the latest version of OOo, 3.2.1, and now nothing happens. When I click on the icon it simply does nothing. I am running Vista.

Thank you so much, this extension is great!
Saved me many times ... the search and replace of Writer has several limitations.
Coming from MSWORD helped me a lot to get used to using Writer.
If you're looking for inspiration ...
http://gregmaxey.mvps.org/VBA_Find_And_Replace.htm
http://www.jambient.com/indexassistant/
This extension will recommend it to everyone! A must try!
Thank you again.

I cannot install version 1.3.1 into OOo_Dev300m80
I get the msg
(com.sun.star.uno.RuntimeException){{Message = "bad root element in file:
///Users/~/Library/Application Support/OOo-dev/3/user/uno_packages/cache/
uno_packages/7irZ2Z_/AltSearch.oxt/addon.mod", Context = (com.sun.star.uno.Xinterface)@0}}
-------------------
Al Maloney
Using OOo_Dev_DEV300 on Mac OS X 10.6.3
"Velox Versutus Vigilans"

I would really like to use this extension again.
Is it incompatible with my version of OOo?
Is there something I can do to resolve the problem?
(I have the same problem with TestFonts)
-------------------
Al Maloney
Using OOo_Dev_DEV300 on Mac OS X 10.6.4
"Velox Versutus Vigilans"

Thank you Tomas!
That works now.
Can you do the same for TestFonts?
-------------------
Al Maloney
Using OOo_Dev_DEV300 on Mac OS X 10.6.4
"Velox Versutus Vigilans"

Hi - I love this extension, but since upgrading my system it won't install for me. I recently installed Ubuntu Lucid 10.04LTS, which comes with OOo 3.2 (OOO320m13, Build:9483, to be precise). The extension shows as installed under the Extension Manager, but no toolbar button or menu item is created. Is there anywhere I can file a bug report or get some support?

1. Make sure you have installed JRE - ooo Java Runtime Enviroment.
2. Sometimes it is necessary to restart OOo, including quickstarter (if is used). or whole operating system.

On win XP and OOo 3.2 it is working OK.

Try direct run: Tools - Macros - Organize macros - OOo basic: My macros - Altsearch and direct run _Altsearch.

(try JRE instal by terminal: sudo apt-get install default-jre)

on the basis of my last comment, it (finally) occurred to me that I might have a corrupt download, so I downloaded again, and sure enough the md5sums were different. Installation of the new file has proceeded as expected. (I'm getting a OOBasic runtime crash if I try to resize the window, but I don't think that issues is specific to this extension :)).

Sorry to have wasted your time, and thank again.

Hi tombil, thanks for your continued interest in this.

Well, it seems like it's an installation problem of some kind - Altsearch doesn't exist under "My Macros". Can I extract the macro manually from the package and add it myself? Is there a tool I can use to open the package? (File Roller reports "End-of-central-directory signature not found.", and `jar -x` just hangs.... know very little about java programming and nothing about OOo extensions, and don't have time to bone up right now!)

Thanks again!

... and same error message:

"BASIC runtime error.
An exception occurred.
Type: com.sun.star.container.NoSuchElementException
Message: ."

but my highlighted line in the code reads:

oLibContainer.LoadLibrary(LibName)

(Just in case, I've tried the solution the author proposed in reply to the other comment, a previous version of the extension, but no luck)

Any idea what might be the problem, anybody? This extension is really useful, I'd hate to do without it!

Running OOo 3.1.1

Thanks

It was installed & working just fine on my system (SimplyMEPIS Linux 8.5, OOo 3.1.1) until I uninstalled the spreadsheet/database programs... It promptly started giving me the same error screen you described, and kept doing it until I decided to try reinstalling the "missing" programs -- at that point it started working again.

There is an issue with searching within large paragraphs:
http://www.openoffice.org/issues/show_bug.cgi?id=108273

I wonder if you can make this excellent extension to work where the native one fails.

I have the same problem as Mike. Clicking on the green binoculars or accessing the menu does nothing, and does not produce an error message.

I have OOo 3.0.1 on Ubuntu 9.04, 64 bit version.

Sometimes it is necessary to restart OOo, including quickstarter (if is used).
In the worst case the entire operating system too.