Search and replace EOL character ^$ (to erase blank lines) doesn't work in Writer

Bug #478804 reported by epictete
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
libreoffice (Ubuntu)
Fix Released
Undecided
Unassigned
openoffice.org (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Binary package hint: openoffice.org

In OOo Writer 3.0.1, if you want to erase blank lines using 'search and replace' for ^$ (empty paragraph): either the blank lines are not found and nothing is replaced, either the styles may disappear and the replacement doesn't work before a page break.

This worked perfectly in versions previous than Jaunty. It doesn't work in Jaunty nor in Karmic.

If you add the extension "AltSearch 1.2.2 Alternative Find & Replace for Writer by Tomas Bilek", the extension does the job perfectly like Writer was able in the past versions.

I've tried (before a reinstallation of Jaunty) to install OOo 3.1 (using the PPA I think) but the problem remained.
In OOo 3.1.1 in Sabayon or in Parsix Linux, the problem doesn't exist.

This is useful if you want to present a phonebook spreadsheet in a document in 4 columns with differents formats for the items: you can make a mailing from the spreadsheet but then you need to erase blank lines and page breaks and keep the formating.

$ lsb_release -rd: Description: Ubuntu 9.04 Release: 9.04
$ apt-cache policy openoffice.org
openoffice.org:
  Installé : 1:3.0.1-9ubuntu3.1
  Candidat : 1:3.0.1-9ubuntu3.1
 Table de version :
 *** 1:3.0.1-9ubuntu3.1 0
        500 http://ftp.free.org jaunty-updates/main Packages
        500 http://ftp.free.org jaunty-security/main Packages
        100 /var/lib/dpkg/status
     1:3.0.1-9ubuntu3 0
        500 http://ftp.free.org jaunty/main Packages

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
NonfreeKernelModules: nvidia
Package: openoffice.org-core 1:3.0.1-9ubuntu3.1
ProcEnviron:
 PATH=(custom, no user)
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
SourcePackage: openoffice.org
Uname: Linux 2.6.28-16-generic i686
---
Architecture: i386
DistroRelease: Ubuntu 10.04
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
NonfreeKernelModules: nvidia
Package: openoffice.org 1:3.2.0-7ubuntu4
PackageArchitecture: i386
ProcEnviron:
 LANG=fr_FR.utf8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-22.33-generic 2.6.32.11+drm33.2
Tags: lucid
Uname: Linux 2.6.32-22-generic i686
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
epictete (p-latreyte) wrote :
Revision history for this message
epictete (p-latreyte) wrote :

The bug is exactly the same in Debian Testing.
As the problem doesn't exist in Sabayon or in Parsix Linux, it is clear that it is a deb-distributions bug.

Revision history for this message
epictete (p-latreyte) wrote :

My last post was wrong since Parsix is based on Debian!

Revision history for this message
epictete (p-latreyte) wrote :

There isn't any developer out there interested in this bug?

Chris Cheney (ccheney)
tags: added: jaunty
Revision history for this message
epictete (p-latreyte) wrote :

Exactly the same problem under Lucid (not an upgrade but an install from scratch): after replacing of the blank paragraph ^$ with nothing, the page breaks, between two records of the data base (spreadsheet), doesn't disappear and the text formatting sometimes is broken. With the extension AltSearch 1.3, everything's perfect.

philippe@linux-ubuntu-bqf:~$ lsb_release -rd
Description: Ubuntu 10.04 LTS
Release: 10.04

philippe@linux-ubuntu-bqf:~$ apt-cache policy openoffice.org
openoffice.org:
  Installé : (aucun)
  Candidat : 1:3.2.0-7ubuntu4
 Table de version :
     1:3.2.0-7ubuntu4 0
        500 http://www-ftp.lip6.fr/pub/linux/distributions/Ubuntu/archive/ lucid/universe Packages

philippe@linux-ubuntu-bqf:~$ uname -r -m
2.6.32-22-generic i686

Revision history for this message
Chris Cheney (ccheney) wrote :

[This is an automatic notification.]

This bug was reported against an earlier version of Ubuntu, can you test if it still occurs on Ubuntu 10.04 LTS (Lucid Lynx)?

Please note we also provide technical support for older versions of Ubuntu, but not in the bug tracker. Instead, to raise the issue through normal support channels, please see:

    http://www.ubuntu.com/support

If you are the original reporter and can still reproduce the issue on Lucid, please run the following command to refresh the report:

  apport-collect 478804

Bear in mind that you may need to install the python-launchpadlib package from the universe repository. Additionally, when prompted to give apport-collect permissions for Launchpad you will need to give it at least the ability to "Change Non-Private" data as it will be adding information to your bug report.

If you are not the original reporter, please file a new bug report, so we can work with you as the original reporter instead (you can reference bug 478804 in your report if you think it may be related):

  ubuntu-bug openoffice.org

If by chance you can no longer reproduce the issue on Lucid or if you feel it is no longer relevant, please mark the bug report 'Fix Released' or 'Invalid' as appropriate, at the following URL:

  https://bugs.launchpad.net/ubuntu/+bug/478804

Changed in openoffice.org (Ubuntu):
status: New → Incomplete
Revision history for this message
epictete (p-latreyte) wrote : Dependencies.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
Chris Cheney (ccheney) wrote : Re: Search and replace EOL character ^$ (to erase blank lines) doesn't work in OOo Writer

This bug is an upstream one and it would be quite helpful if somebody experiencing it could send the bug the to the people writing the software. http://qa.openoffice.org/issues/query.cgi

Thanks in advance!

Chris Cheney (ccheney)
Changed in openoffice.org (Ubuntu):
status: Incomplete → New
status: New → Incomplete
Chris Cheney (ccheney)
Changed in openoffice.org (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
penalvch (penalvch) wrote :
Revision history for this message
penalvch (penalvch) wrote :

epictete, this problem is unreproducible in Ubuntu 10.10, LibreOffice Writer via the Terminal:

cd ~/Desktop && wget https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/478804/+attachment/1902927/+files/example.odt && lowriter -nologo example.odt

click Edit -> Find & Replace... -> Search for combo box type ^$ -> click More Options button -> check Regular expressions checkbox -> click Replace All button, window pops up:

LibreOffice 3.3

Search key replace 2 items.

OK button

Does this work for you?

sudo add-apt-repository ppa:libreoffice/ppa && sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get -y install libreoffice-writer

 lsb_release -rd
Description: Ubuntu 10.10
Release: 10.10

apt-cache policy libreoffice-writer
libreoffice-writer:
  Installed: 1:3.3.1-1ubuntu3~maverick1
  Candidate: 1:3.3.1-1ubuntu3~maverick1
  Version table:
 *** 1:3.3.1-1ubuntu3~maverick1 0
        500 http://ppa.launchpad.net/libreoffice/ppa/ubuntu/ maverick/main i386 Packages
        100 /var/lib/dpkg/status

Changed in openoffice.org (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
epictete (p-latreyte) wrote :

Hello Christopher, first thank you very much for taking interest in this issue.

I've done your test and it works perfectly, as for you. This because your file is too simple (see infra).

My system datas today:

$ lsb_release -rd
Description: Ubuntu 10.10
Release: 10.10

$ apt-cache policy libreoffice-writer
libreoffice-writer:
  Installé : 1:3.3.1-1ubuntu3~maverick1
  Candidat : 1:3.3.1-1ubuntu3~maverick1
 Table de version :
 *** 1:3.3.1-1ubuntu3~maverick1 0
        500 http://ppa.launchpad.net/libreoffice/ppa/ubuntu/ maverick/main amd64 Packages
        100 /var/lib/dpkg/status

So I've prepared files (in attachment) so that you can watch and even reproduce the problem:

In the file Test Mailing Result S&R extension.odt, you can see that the result is perfect using AltSearch plugin by Tomas Bilek: all the records on one page, the styles are safe, no blank lines.

In the file Test Mailing Result S&R built-in.odt, you can see that, using the Search and replace fonction of LibreOffice the replacement doesn't work before a page break (and when using my own (not testing) big file, the styles may disappear too).

The file Test Mailing Result.odt is the result of the mailing; it is the file on which I make the Search & replace ^$.
The file Test Mailing Pattern.odt is the model on which I make the mailing.
The file Test Spreadsheet.ods is the table for the mailing.
The file Test Base.odb is the corresponding base.

I hope that all this may help you and I'm ready to answer to any other question.

Revision history for this message
epictete (p-latreyte) wrote :

Another help: here is a capture of the result of a good Search & replace using the plugin: no blank line left even before a page break, the styles are safe. I can then have many records on one page.

Revision history for this message
epictete (p-latreyte) wrote :

Now the bad result using the built-in Search & replace.

On the left side of the image is the first page : the styles have vanished
On the right side of the image is the second page : the styles are respected.

The Search & replace doesn't work before a page break so you've got only one record on a page!

penalvch (penalvch)
Changed in openoffice.org (Ubuntu):
status: Incomplete → New
penalvch (penalvch)
summary: Search and replace EOL character ^$ (to erase blank lines) doesn't work
- in OOo Writer
+ in Writer
Revision history for this message
sanmiguel9 (againsttcpa84) wrote :

Everything looks fine for me on a up-tp-date Natty system (LibreOffice 3.3.2 OOO330m19 (Build:202))

1) I opened your "Test Mailing Result.odt" file
2) Ctrl + F
3) ^$ → replace all
4) "ok, replaced twice"
5) Documents looks fine, empty lines before page break are removed and the text attributes are untouched

Problem solved ?

Revision history for this message
epictete (p-latreyte) wrote :

No, the page breaks doesn't disappear as they should and as it is with the Search & Replace extension.

The problem is not solved!

Revision history for this message
NoOp (glgxg) wrote :

Confirmed. Tested with:

OOo 3.2.1 (Ubuntu)
OOo-Dev (3.4.0) - standard
LO 3.3.3 (standard)
LO 3.4.2 (standard)

All with the exception of OOo-Dev (3.4.0) exhibit the problem. OOo-Dev functions exactly as the Alternate Add & Replace extention which can be found here:
<http://www.volny.cz/macrojtb/AltSearch_cs.html>

Changed in libreoffice (Ubuntu):
status: New → Confirmed
Changed in openoffice.org (Ubuntu):
status: New → Confirmed
Revision history for this message
NoOp (glgxg) wrote :

Added note: I just tested in LO 3.3.3 (Ubuntu) in Natty 11.04:
LibreOffice 3.3.3
OOO330m19 (Build:301)
tag libreoffice-3.3.3.1, Ubuntu package 1:3.3.3-1ubuntu2
and the situation is worse. That build doesn't even find any instances of ^$ in 'Test Mailing Pattern.odt', and results in a "Search key not found" error. To be clear: I am using 'Test Mailing Pattern.odt', select Edit|Find & Replace|Search for: ^$|Replace with: blank - no entry|More Options: Regular expressions|Replace All. If I add the Alternate Add & Replace extention, the F&R works properly.

Changed in openoffice.org (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
Björn Michaelsen (bjoern-michaelsen) wrote : migrating packaging from OpenOffice.org to Libreoffice

[This is an automated message.]
There are no new official OpenOffice.org releases in Ubuntu packaging anymore => Won't Fix

If the problem persists, please mark this bug as "also affects project Libreoffice" or "also affects distribution Libreoffice (Ubuntu)" if that has not happened already.

Please leave references to upstream OpenOffice.org bugs in place to allow cross pollination.

Revision history for this message
Björn Michaelsen (bjoern-michaelsen) wrote :

Tested in LibreOffice 4.2.7 on Ubuntu 14.04 it works as expected, thus closing as fix released.

Changed in libreoffice (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.