Find and replace graphics

Hello Community,

I have a problem with LibreOffice Writer (3.5.4.2) I just can't figure out.

I save copies of essays from a scientific database. This database adds a
little graphic to each footnote. I want to erase all these graphics from my
documents. But how can I do that?

Is there an option that enables me to select all identical objects within
the document after I selected one?

Any help will be much appreciated!

Best regards,
timecode

Hi :slight_smile:
There is a way to cheat :wink:

Make a copy of the file (hopefully a .Odt but it works with .DocX too) and change the file-ending from .Odt to .Zip.  Then just double-click on the file and it should open as though it was a compressed file with some sub-folders inside.  One of those sub-folders should be called something like "images" or "pictures".  Delete it!  Now change the file-ending back from .Zip to .Odt and magically you have no images in your file.

It's a bit of a dirty cheat and might not go completely according to plan so it's best to keep an original version and just work on the copy.

Of course you don't really need to change the file-ending at all as you can right-click on a file and choose "Open with" and then select an archive manager such as WinRar, or WinZip or something better.

Regards from
Tom :slight_smile:

Hey Tom!

Thanks for that dirty trick! :slight_smile: But unfortunately it didn't work. I made a
http://i47.tinypic.com/2ldimig.png screenshot of the contents of the
zip-file. The images remain even after deleting the "Thumbnails" folder and
a folder named "images"in the Configurations2 directory.

This http://i49.tinypic.com/6e3ouu.png screenshot here shows what I'm
trying to get rid of: the pesky arrow images.

Thanks in advance!
timecode

PS: Am I able to answer via mail or do I have to post in the forum?

Hi :slight_smile:
You can answer either way.  By email you need to use "Reply to all" instead of "Reply" because of a recent change to the way the lists work.  Using "Reply" sends the message privately, as a pm, instead of to the whole list so you suddenly get dependant on one person being right and available. It's better to send to the whole list.  Most OpenSource lists seem to work this way.

I just gave the Nabble forum route because it's easier to upload files to Nabble but you found somewhere else anyway, which is quite cool :slight_smile:

I think the arrow is probably in the "Thumbnails" folder.  If you can delete it from there it will vanish.
Regards form
Tom :slight_smile:

Howdy,

I already tried deleting this folder, but to no avail. Maybe the images
are in the content.xml?

Jannis Sokianos wrote:

Howdy,

I already tried deleting this folder, but to no avail. Maybe the images
are in the content.xml?

      Have you checked to see if the arrow is a linked graphic? (Edit -> Links) This is a possibility. But there are going to be additional problems even if the arrow is a linked graphic. Even after removing all pictures and thumbnails, the document will have a read error message.
      What has to be done is to open context.xml. Then remove all references to where the arrow graphic is located in the text document.

--Dan

Hi :slight_smile:
Ouch!  Xml is not pretty unless you can open it in a text-editor that allows you to chooose a colour-coding option.  SCiTe is good and i've heard good reports of Notepad++ but normal straight Notepad would be useless.  In Gedit i found something in the status-bar that said "Plain text" and clicking on it gave a long list of different programming languages and even included html/css.  Choosing changed the colour of all the coding brackets to different colours that helps me pick-out the bits i need to focus on.  
Regards from
Tom :slight_smile:

Hello,

indeed, I'm dealing with linked graphics. I also took a look at the xml file
and found the correspondent references. I don't think it will be worth the
effort editing all those xml files, since I got quite some essays with a
zillion footnotes each.

But thanks a lot for your help!
timecode

Hi timecode,

I save copies of essays from a scientific database. This database adds a
little graphic to each footnote. I want to erase all these graphics from my
documents. But how can I do that?

If there are no other graphic elements that you want to be shown, you can
comletely disable graphic display (Tools > Options > LibreOffice Writer > View >
Display)

Is there an option that enables me to select all identical objects within
the document after I selected one?

If you want to jump from graphics to graphics for deleting, you can use the
Navigator (F5). It's not ideal, but a bit quicker than manual navigation.

Nino

timecode wrote:

Hello Community,

I have a problem with LibreOffice Writer (3.5.4.2) I just can't figure out.

I save copies of essays from a scientific database. This database adds a
little graphic to each footnote. I want to erase all these graphics from my
documents. But how can I do that?

Is there an option that enables me to select all identical objects within
the document after I selected one?

Any help will be much appreciated!

Best regards,
timecode

      The answer may be easier than I had thought. But first of all I am still confused as to how the scientific database creates the ODT that has all of the essays and footnotes. Is this a report?
      The answer may depend upon the use of styles, specifically the style used for the footnotes. Open the document with the footnotes. Click one of the words in one of the footnotes. Use the F11 key to open the Styles and Formatting window. Then change Automatic to All in the drop down list at the bottom of this window. You should see a style highlighted. If so, right click it and select Modify. Then click the Background tab. If, I am correct, the graphic arrow is located here. If so, change Graphic to Color in the drop down list in the upper left corner of the Paragraph dialog. Click OK.
      Otherwise, could you send me a copy of the ODT in question? (off list) I would like to look at it to see what are the styles used in it.

--Dan

It all seems so difficult......

If you have a write document, run this macro and remove ALL graphic objects

Sub RemoveAllGraphics
   Dim i As Integer
   Dim oGraphic

   If ThisComponent.GraphicObjects.getCount() = 0 Then
     Exit Sub
   End If

   For i = ThisComponent.GraphicObjects.getCount() - 1 To 0 Step -1
     oGraphic = ThisComponent.GraphicObjects.getByIndex(i)
     oGraphic.Dispose()
   Next
End Sub

Hey guys!

First I'd like to thank everyone for their help! It seems I found the right
place for my problem, even if I still didn't solve it.

I don't get the essays in the odt format. http://i46.tinypic.com/zxmvpe.png
I copy them from the database and paste it in my Writer . Since I'm using
Ctrl+A, I'm also copying all the styles and graphics. Maybe I should start
there with troubleshooting...

I haven't tried the macro-approach yet. I'm new to that but will do later
on.

And Dan, I'm sending you a copy of an essay right away.

Thanks again and a good day to everyone!
timecode

You should. Copy everything as you have been doing, but use Edit | Paste Special... (or Ctrl+Shift+V) instead of ordinary Paste to insert that material into your text (Writer) document. Experiment with the options available in the Paste Special dialogue box until you discover what works for you - perhaps "Formatted text [RTF]" or just "Unformatted text". Apply your own formatting to the new text in the document.

I trust this helps.

Brian Barker

Hi :slight_smile:
+1
I have to collect articles from varies different writers for a newsletter and at first it was much easier to paste unformatted text and then apply the newsletter's styles for headings and stuff. 
Regards from
Tom :slight_smile: