Issue 77456 - main-entry-style-name contains 24000+ characters
Summary: main-entry-style-name contains 24000+ characters
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: editing (show other issues)
Version: OOo 2.2
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-17 11:40 UTC by rbos
Modified: 2013-08-07 14:44 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Test document for bug 77546 (7.85 KB, application/vnd.oasis.opendocument.text)
2007-06-13 13:54 UTC, rbos
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description rbos 2007-05-17 11:40:27 UTC
When I unpack my ODT document there is a very, very long line containing ove
24000 characters.  The value is _5f and it is repeated many many times.  
I assume that this is wrong.

This is in the content.xml file and the tag 
  <text:alphabetical-index-source,

Below a detailed copy of the offending line:
tmp> grep -R Main_5f * | sed 's/\(Main\).*_\(entry\)/\1...\2/'
content.xml:    <text:alphabetical-index-source 
text:main-entry-style-name="Main...entry" text:sort-algorithm="alphanumeric" 
fo:language="nl" fo:country="NL">

The value "Main...entry"  is shortened by me and looks actually something like:
text:main-entry-style-name="Main_5f_5f_5f_5f_5f_5f_5f_5f_5f_5f_5f_5f_5f_5f_5f_5f
etc etc 8000x times!

The only other file with 5f in it, is styles.xml:
styles.xml:  <style:style style:name="Table_5f_text" 
style:display-name="Table_text" style:family="paragraph" 
style:parent-style-name="Standard" style:master-page-name="">

A similar bug is available at:
Look at http://qa.openoffice.org/issues/show_bug.cgi?id=56518 but this one
is closed and I have still the issue.

The documents are mostly editted on MS XP with OOorg-2.2 Document is created
from scratch.  The document is a master document (.odm).
Comment 1 eric.savary 2007-05-17 12:07:05 UTC
issue 56518 is closed because it has been fixed.
The fix avoids further occurences of the bug but *doesn't repair corrupted files*.

To do so, please:
- unzip the file
- load the contenxt.xml in a editor
- replace all _5f_5f_5f_5f_5f_5f_5f_5f_5f_5f_5f_5f_5f_5f_5f_5f_5f_5f_5f... to
get only one _5f.
- save
- rezip file
Comment 2 eric.savary 2007-05-17 12:09:04 UTC
duplicate

*** This issue has been marked as a duplicate of 56518 ***
Comment 3 eric.savary 2007-05-17 12:09:35 UTC
closed
Comment 4 rbos 2007-05-17 14:46:54 UTC
I can't agree with the 'resolved/closed'' status.  Issue 56518 was closed at
27 Oct 2005.  That's actually years before I started to create my
documents.  If #56518 really solved the _5f problem, I would expect that my
documents won't show the _5f_5f problem.  I followed this logic, when opening 
this issue.

I know how to repair the document(s), as that is explained in #56518 and
because I do similar operations on my documents throughout he day.  Because
of this flexibility I use ODT and is the reason I discovered the _5f_5f
line.

Please, explain how this problem is fixed while it occured a long time
after #56518 has been resolved and closed.

Comment 5 rbos 2007-05-17 16:00:40 UTC
The problem still exists and it is probably only valid for master documents.

The problem can be easily reproduced:

=== Before repair ===
    <text:alphabetical-index-source 
text:main-entry-style-name="Main_5f_5f_5f_entry" 
text:sort-algorithm="alphanumeric" fo:language="nl" fo:country="NL">
updating: content.xml (deflated 90%)
=== After repair ===
    <text:alphabetical-index-source text:main-entry-style-name="Main_5f_entry" 
text:sort-algorithm="alphanumeric" fo:language="nl" fo:country="NL">
richard@med102:~/svn/svn> oowriter test.odm
richard@med102:~/svn/svn> ./rm_5f
=== Before repair ===
    <text:alphabetical-index-source 
text:main-entry-style-name="Main_5f_5f_5f_entry" 
text:sort-algorithm="alphanumeric" fo:language="nl" fo:country="NL">
updating: content.xml (deflated 90%)
=== After repair ===
    <text:alphabetical-index-source text:main-entry-style-name="Main_5f_entry" 
text:sort-algorithm="alphanumeric" fo:language="nl" fo:country="NL">



The rm_5f script contains:
 cat rm_5f
unzip -p test.odm content.xml > content.xml

echo === Before repair ===
grep main-entry-style-name= content.xml

sed -i 's/main-entry-style-name=\"Main.*_entry\" 
\(.*\)/main-entry-style-name=\"Main_5f_entry\" \1/' content.xml

zip test.odm content.xml

echo === After repair ===
unzip -p test.odm content.xml |
  grep main-entry-style-name=
Comment 6 kpalagin 2007-06-13 09:24:19 UTC
http://www.openoffice.org/issues/show_bug.cgi?id=77372 seems to be related.

rbos,
can you provide steps to reproduce the problem?
Comment 7 rbos 2007-06-13 13:54:32 UTC
Created attachment 45875 [details]
Test document for bug 77546
Comment 8 rbos 2007-06-13 14:14:26 UTC
To reproduce the problem, use the attached document called test.odm

- Check the precondition: 
  # unzip -p test.odm content.xml | grep "<text:alphabetical-index-source"
- Count the number of 5f_ occurences
- Open this document
- Goto the navigator (F5)
- In the navigator use the context mouse button, to click on the term
  "alphabetical Index", in the resulting pop up window click select 
  "update indexes"
- Save the document
- Check the content.xml file with:
  # unzip -p test.odm content.xml | grep "<text:alphabetical-index-source"
- Count the number of 5f_ occurences.  There are now many more 5f's

Comment 9 eric.savary 2007-06-13 14:24:56 UTC
@AMA: please have a look. As discussed, maybe same bug as another known issue
but a different root cause?
Comment 10 Martin Hollmichel 2007-09-10 13:53:05 UTC
move to 3.x accroding http://wiki.services.openoffice.org/wiki/Target_3x