Issue 124711 - Entries in Index hide together with text entries if text entries get Font Effect property "Hidden"
Summary: Entries in Index hide together with text entries if text entries get Font Eff...
Status: UNCONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: formatting (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: needhelp
Depends on:
Blocks:
 
Reported: 2014-04-19 18:37 UTC by hadouma
Modified: 2014-04-23 11:02 UTC (History)
2 users (show)

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


Attachments
Testfile for Alphabetic Index problem (10.34 KB, application/vnd.oasis.opendocument.text)
2014-04-21 10:01 UTC, hadouma
no flags Details
Possible solution for reporter's Problem (13.61 KB, application/vnd.oasis.opendocument.text)
2014-04-22 05:09 UTC, Rainer Bielefeld
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description hadouma 2014-04-19 18:37:57 UTC
I have an alphabetical index containing text, formatted with a style (called "BriefId") which I want to give the "hidden" font attribute. (reason for this is, I want the Id to appear in the alphabetical index, but not in the document)
To create the index, I will have to uncheck the "hidden"-attribute in the BriefId-style. If I don't, the entries in the index will not show and I will see an empty index showing only the heading. After creating the index and have visible entries, I can then check the "hidden" attribute in "BriefId" again and the entries remain visible.

If I now update the index, the entries will disappear and again I will only see the heading. I will have to uncheck the "hidden" attribute in the style, used for the entries, redo the index update and, when the entries show up in the index, I must check the "hidden"-attribute and the entries will remain visible. 

It looks like for some reason the "hidden"-attribute of the text, that is used for the entries in the Alphabetical Index, is used in formatting the Index. That, of course, does not make sense.
Comment 1 Rainer Bielefeld 2014-04-20 06:12:23 UTC
@hadouma
Thank you for your feedback – unfortunately important information we will 
need to reproduce your problem is missing.
Please add all information requested in following:
b) Attach a sample document (not only screenshot) or refer to an existing 
   sample document in an other Bug with a link; to attach a file to this 
   bug report, just click on "Add an attachment" right on this page.
   If you want to attach a test kit with multiple documents zip them into
   a single testkit.zip and attach the  testkit.zip
c) Contribute a document related step by step instruction containing every 
   key press and every mouse click how to reproduce your problem 
d) Attach screenshots with comments if you believe that that might explain the 
   problem better than a text comment. Best way is to insert your screenshots
   into a DRAW document and to add comments that explain what you want to show
f) add information 
   f4) concerning your Operating System (Version, Distribution, Language)
   f5) concerning your AOO version (with Build/revision ID if it's not a 
      public release) and localization (UI language, Locale setting)
   f6) AOO settings that might be related to your problems 
      (video hardware acceleration, ...)
   f7) how you launch AOO and how you opened the sample document
   f8) Whether your problem persists after you have renamed your user profile 
     (Quit Quickstart before!) before you launch AOO (please see   <https://wiki.openoffice.org/wiki/Documentation/How_Tos/Handling_the_OpenOffice.org_User_Profile>
     <https://wiki.documentfoundation.org/User_Profile#Mac_OS_X>
   f9) Whether that worked in former OOO / AOO Versions 
   f10) whether (and how) a competitor's software (MSO, LibreOffice, ...)
        fulfills your needs

Please do not cite these hints in your reply, but cite the items like:
f7): Desktop-icon for soffice.exe / AOO File menu -> Open
Comment 2 hadouma 2014-04-21 10:01:10 UTC
Created attachment 83235 [details]
Testfile for Alphabetic Index problem

I attached a document where you can see and test the problem for yourself.

The steps I have taken are:
- Create a text document consisting of several pages
- Create a style (in my case I named it "BriefId") with all default settings
- On each page enter a line of text and give it style "BriefId"
- Create entries in the Alphabetical Index for each of these "Briefid"-lines
- Insert an Alphabetical Index

All looks well

- Now change the font effect for "BriefId" and check the "Hidden"-effect
- Next, update the Alphabetical Index
- Watch what happens: all entries in the index disappear

To make them reappear:
- change the font effect for "BriefId" and uncheck the "hidden"-effect
- Again update the index
- The entries are shown again
Comment 3 hadouma 2014-04-21 10:01:22 UTC
I attached a document where you can see and test the problem for yourself.

The steps I have taken are:
- Create a text document consisting of several pages
- Create a style (in my case I named it "BriefId") with all default settings
- On each page enter a line of text and give it style "BriefId"
- Create entries in the Alphabetical Index for each of these "Briefid"-lines
- Insert an Alphabetical Index

All looks well

- Now change the font effect for "BriefId" and check the "Hidden"-effect
- Next, update the Alphabetical Index
- Watch what happens: all entries in the index disappear

To make them reappear:
- change the font effect for "BriefId" and uncheck the "hidden"-effect
- Again update the index
- The entries are shown again
Comment 4 Edwin Sharp 2014-04-21 15:57:54 UTC
Confirmed with
AOO410m17(Build:9763)  -  Rev. 1586584
2014-04-11 09:13 - Linux x86_64
Debian
Comment 5 Rainer Bielefeld 2014-04-21 17:09:16 UTC
The effect is reproducible with "AOO 4.1.0 RC3 – English UI / German locale [AOO410m17(Build:9763)  -  Rev. 1586584 2014-04-11 08:56:50]" on German WIN7 Home Premium (64bit)", “historic” 4. User Profile used for all predecessor versions. but is that a bug? It's the the nature of hidden things to be hidden, and the entries also are no longer visible if "Hidden" has been checked for style "BriefId".

I will do some own research.

@hadouma:
Why do your think that entries in Index should stay although the "BriefId" entries in text also are invisible?
Comment 6 Rainer Bielefeld 2014-04-21 17:19:12 UTC
A first result is that the complained behavior already does exist in OOo 2.0.2
Comment 7 Rainer Bielefeld 2014-04-21 17:30:38 UTC
All the same in TOC.

I can't find any reason why hidden things should be listed in index, NOT_AN_ISSUE?
Comment 8 hadouma 2014-04-21 18:03:35 UTC
If "hidden" as a font attribute in text is used for formatting an index entry, why wouldn't the same be true for all other formatting attributes, like font, color, regular/italic, etc ? Index entries have their own formatting options.

It is a great option that hidden items can be listed in an index. This makes it possible to categorize as you like without disturbing text. That you personally can't find a reason to list hidden text in an index doesn't mean there IS no reason. Anyway, that is not the discussion. The issue is, that formatting, belonging to fonts in normal text is wrongly used to format an index entry. As said before, if this is done for the "hidden" attribute, it should be done for all attributes. Since that is not the case I take it this is a bug and not "as designed"
Comment 9 Edwin Sharp 2014-04-21 18:08:05 UTC
For me this is crystal clear:
Index has style "Index 1" linked with style "Index".
User style "BriefId" is linked with style "Default".
A change in one has no affect on the other.
Comment 10 hadouma 2014-04-21 19:06:27 UTC
Exactly. What is your point ?
Comment 11 mroe 2014-04-21 19:17:51 UTC
(In reply to Rainer Bielefeld from comment #7)
> All the same in TOC.
> 
> I can't find any reason why hidden things should be listed in index,
> NOT_AN_ISSUE?

I agree. For most users hidden text = not available and should not appear anywhere.

See e. g. issue 49960 and especially issue 111155!
Related: issue 27377.
Comment 12 hadouma 2014-04-21 19:27:13 UTC
Again, that YOU see no reason, does not mean there IS no reason. Why don't we stick to what the problem really is instead of discussing whether a function is useful for you or not? Personally I was very happy with this functionality for the use I want make of it.

The real problem, again, is that indices have there own formatting options (in this case via style "Index 1"and normal text attributes have their own (in this case "BriefId"). Formatting an index should therefor follow the formatting rules of the "Index 1"-style and NOT of the "BriefId"-style.
Comment 13 Rainer Bielefeld 2014-04-21 20:39:15 UTC
g1) Nobody will think that the text in the index will flash because the 
   related field flashes. So of course if the the "Hidden" property style 
   is a quite normal Font Effect it should be expected that it has no
   influence to the appearance in indexes.
g2) But "Hidden" is different from "Relief" or similar. So "Hidden" Style
    for example will prevent the string from being found. String with that
    property does not need room in the text flow
(g) So "Hidden" is a very special "Font Effect", may be even something different.
    Some "real life" examples where the effect can be used might help to
    decide whether 
g3) the assignment as a "Font effect" is misleading 
      or whether 
(g4) "Hidden" should should be ignored for Index entries.

Currently I can better imagine applications where I want to hide "Hidden" paragraphs completely, although I never used that feature.

"Issue 49960 - Hidden sections also counted in outline numbering" is concerning something very different, but at least underpins a policy "hidden should mean really completely hidden.

"Issue 111155 Comment 5 - Fields formatted as hidden text show in TOC/indexes": comment underpins that we do not have a bug here.

"Issue 27377  - Character formatting not retained in entries of TOC, table lists, etc": I need to find though all those arguments, I doubt that CONFIRMED is appropriate for that general summary.

I will try to find some more info in ODF specifications later.

@hadouma:
Is there a "real life" application where the current behavior causes problems?
Comment 14 hadouma 2014-04-21 20:59:19 UTC
Yes, there is. I have created a document from letters my brother has sent home when he did service ion the army in Indonesia in 1949/1950. I wanted to create an alphabetical index showing recipient and date for each letter. So I added a line of text to each letter, congaing name and date and gave that line the "BriefId" style. Obviously I don't want that line to show in the final document, so that is why I gave it the "hidden"-attribute. 

Initially, when entering all these identification-lines, the hidden-attribute was not checked, of course, until I had created the index. Then, when I saw it did what I wanted, I checked "hidden" in the fint-effect of BriefId. No problem, because the index entries where still there.

It was only after making changes to the document, which made it necessary to update the indices, that I found the entries where gone missing. It took me a while to find out why.

Luckily there is a way around the problem (first uncheck the hidden-attribute in BriefId, then update the index and then re-check the hidden attribute. Although this works it is a pain in the neck and, as said earlier, in my opinion it is a bug.
Comment 15 Rainer Bielefeld 2014-04-22 05:09:11 UTC
Created attachment 83241 [details]
Possible solution for reporter's Problem

Attachment shows a possible solution for reporter's needs:
At the beginning of each paragraph an index entry has been inserted via 'Insert -> Indexes and tables -> Entry - Alphabetical Index', what is invisible in Text, but shows up in Index Table. Disadvantage is that these entries are not very visible, so that I added comments (what can be hidden).
For reporter's special needs this solution is more awkward to do than he might have expected, but it works with current features of AOO.
Comment 16 Rainer Bielefeld 2014-04-22 05:29:24 UTC
An other alternative are bookmarks, but the visibility in text is even worse than index entries
Comment 17 hadouma 2014-04-22 07:39:41 UTC
Thanks for the suggestions, but why not just fix the bug ?
Comment 18 Rainer Bielefeld 2014-04-22 17:48:52 UTC
I did some additional research.
Hiding is done in styles.xml:
<style:style style:name="BriefId" style:family="paragraph" style:parent-style-name="Standard"><style:text-properties text:display="none"/>
instead of 
<style:style style:name="BriefId" style:family="paragraph" style:parent-style-name="Standard"><style:text-properties text:display="true"/> 

ODF 1.2 specifications are far beyond my skills for this, I more or less only see a "text will be hidden"

More informative is Specification "Hidden Text in Writer" 4.0.6 4.0.6 Indexes and Cross-Reference of “Hidden Text”
<http://www.openoffice.org/specs/writer/hidden_text/hidden_text.sxw>:
"“Hidden Text” never appears in indexes and cross-references. In case a whole heading/reference is formatted hidden than no entry it to be made."

1 more indicator NOT_AN_ISSUE
Comment 19 Edwin Sharp 2014-04-22 18:33:25 UTC
If this specification is still valid then indeed not a bug, but at least help should state this fact clearly.
Comment 20 Rainer Bielefeld 2014-04-22 20:26:51 UTC
(In reply to Edwin Sharp from comment #19)
> help should state this fact clearly.

Definitively! We will have to keep eyes open for a while, I think we will find some related issues, and after a final decision whether that specification still is valid (I currently think so) we can create a bundle of reports concerning related issues for fixing.

Some observations with other ODF software (Calligra, WORD2010, LibO, FreeOffice, ... might be useful.
Comment 21 hadouma 2014-04-23 09:25:43 UTC
If this is a "works-as-designed" issue, I would strongly suggest to revise this. In my view this specification contradicts other specs, such as formatting using styles. Both BriefId and Index-1 have their own set of attributes in the corresponding styles. I have not set the hidden-attribute of the Index-1 style, so I don't expect the index entry to be hidden, just because the style for the entry, supplying the text for the index, has the hidden attribute. In my view these two are unrelated as far as formatting is concerned.
Comment 22 hadouma 2014-04-23 10:50:07 UTC
Please also check out this forum entry and then in particular acknak's post 
https://forum.openoffice.org/en/forum/viewtopic.php?t=43008

Here it is explained how to select a block of rows. Although this is not exactly the solution to my problem, it is a work around. It is also showing the odd behavior of OO Writer in this matter, which is very different from any other implementation of selecting.
Comment 23 hadouma 2014-04-23 11:02:19 UTC
Sorry...wrong bugid